directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccust...@apache.org
Subject svn commit: r548506 - in /directory/sandbox/ccustine/new_installers/apacheds: core/src/main/java/org/apache/directory/server/core/configuration/ server-installers/ server-installers/src/main/installers/ server-main/src/main/java/org/apache/directory/se...
Date Mon, 18 Jun 2007 22:04:46 GMT
Author: ccustine
Date: Mon Jun 18 15:04:45 2007
New Revision: 548506

URL: http://svn.apache.org/viewvc?view=rev&rev=548506
Log:
- Changes to support multiple instances and data paths
- Support for new Tanuki wrapper and new installer

Added:
    directory/sandbox/ccustine/new_installers/apacheds/server-installers/src/main/installers/rpm-tanuki-apacheds.spec
Modified:
    directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
    directory/sandbox/ccustine/new_installers/apacheds/server-installers/pom.xml
    directory/sandbox/ccustine/new_installers/apacheds/server-main/src/main/java/org/apache/directory/server/Service.java

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java?view=diff&rev=548506&r1=548505&r2=548506
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
(original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
Mon Jun 18 15:04:45 2007
@@ -69,7 +69,7 @@
     public static final int MAX_SIZE_LIMIT_DEFAULT = 100;
     public static final int MAX_TIME_LIMIT_DEFAULT = 10000;
 
-    private File workingDirectory = new File( "server-work" );
+    private File workingDirectory = null;
     private boolean exitVmOnShutdown = true; // allow by default
     private boolean shutdownHookEnabled = true; // allow by default
     private boolean allowAnonymousAccess = true; // allow by default
@@ -90,6 +90,7 @@
      */
     public StartupConfiguration()
     {
+        configureWorkingDirectory();
         setDefaultAuthenticatorConfigurations();
         setDefaultInterceptorConfigurations();
     }
@@ -101,6 +102,7 @@
      */
     public StartupConfiguration(String instanceId)
     {
+        configureWorkingDirectory();
         setDefaultAuthenticatorConfigurations();
         setDefaultInterceptorConfigurations();
         setInstanceId( instanceId );
@@ -486,4 +488,11 @@
     {
         this.denormalizeOpAttrsEnabled = denormalizeOpAttrsEnabled;
     }
+
+    private void configureWorkingDirectory()
+    {
+        String work = System.getProperty("partition.work.dir");
+        workingDirectory = (work != null ? new File(work) : new File("server-work"));
+    }
+    
 }

Modified: directory/sandbox/ccustine/new_installers/apacheds/server-installers/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/server-installers/pom.xml?view=diff&rev=548506&r1=548505&r2=548506
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/server-installers/pom.xml (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/server-installers/pom.xml Mon Jun 18
15:04:45 2007
@@ -48,6 +48,13 @@
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>nlog4j</artifactId>
+        <version>1.2.25</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j13</artifactId>
+      <version>1.0.1</version>
     </dependency>
 
     <dependency>
@@ -162,6 +169,7 @@
           </applicationClass>
 
           <rpmTargets>
+<!--
             <rpmTarget>
               <packagedFiles>
                 <packagedFile>
@@ -174,6 +182,7 @@
               </packagedFiles>
               <id>linux-jsvc-rpm</id>
               <rpmSpecificationFile>src/main/installers/rpm-apacheds.spec</rpmSpecificationFile>
+              <rpmTopDir>${user.home}/rpmbuild</rpmTopDir>
               <finalName>
                 apacheds-${pom.version}-linux-i386.rpm
               </finalName>
@@ -182,6 +191,30 @@
               <osArch>i386</osArch>
               <daemonFramework>jsvc</daemonFramework>
             </rpmTarget>
+-->
+              <rpmTarget>
+                <packagedFiles>
+                  <packagedFile>
+                    <source>rpm-apacheds-tools.sh</source>
+                    <destinationPath>bin/apacheds-tools.sh</destinationPath>
+                    <installationBundleId>Binaries</installationBundleId>
+                    <executable>true</executable>
+                    <filtered>true</filtered>
+                  </packagedFile>
+                </packagedFiles>
+                <id>linux-tanuki-rpm</id>
+                <rpmSpecificationFile>src/main/installers/rpm-tanuki-apacheds.spec</rpmSpecificationFile>
+                <rpmTopDir>${user.home}/rpmbuild</rpmTopDir>
+                <finalName>
+                  apacheds-tanuki-${pom.version}-linux-i386.rpm
+                </finalName>
+                <osName>Linux</osName>
+                <osFamily>unix</osFamily>
+                <osArch>i386</osArch>
+                <daemonFramework>tanuki</daemonFramework>
+                <scriptFile>../../daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/wrapper/src/sh.script.in</scriptFile>
+                <bootstrapperConfigurationFile>../../daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/wrapper/conf/apacheds.conf</bootstrapperConfigurationFile>
+              </rpmTarget>
           </rpmTargets>
 
           <innoTargets>

Added: directory/sandbox/ccustine/new_installers/apacheds/server-installers/src/main/installers/rpm-tanuki-apacheds.spec
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/server-installers/src/main/installers/rpm-tanuki-apacheds.spec?view=auto&rev=548506
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/server-installers/src/main/installers/rpm-tanuki-apacheds.spec
(added)
+++ directory/sandbox/ccustine/new_installers/apacheds/server-installers/src/main/installers/rpm-tanuki-apacheds.spec
Mon Jun 18 15:04:45 2007
@@ -0,0 +1,112 @@
+Summary: ${app.display.name} Server 
+Name: ${app}
+Version: ${app.version}
+Release: ${app.release}
+License: ${app.license.type}
+Group: System Environment/Daemons
+URL: ${app.url}
+Source0: %{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+
+%description
+${app.description}
+
+%define adsdata %{_localstatedir}/lib/%{name}
+%define adshome /opt/%{name}-%{version}
+
+%prep
+echo $RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT
+cp -rf ${image.basedir} $RPM_BUILD_ROOT/%{name}-%{version}
+cd $RPM_BUILD_ROOT
+tar -zcvf %{_topdir}/SOURCES/%{name}-%{version}.tar.gz %{name}-%{version}
+
+%setup -q
+
+%build
+cd $RPM_BUILD_ROOT/%{name}-%{version}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT%{adshome}/bin
+mkdir -p $RPM_BUILD_ROOT%{adshome}/conf
+mkdir -p $RPM_BUILD_ROOT%{adshome}/lib/ext
+mkdir -p $RPM_BUILD_ROOT%{adsdata}/instances/default/conf
+mkdir -p $RPM_BUILD_ROOT%{adsdata}/instances/default/partitions
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}/default
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/%{name}/default
+touch $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}/default/stderr.log
+touch $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}/default/stdout.log
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d
+${mk.docs.dirs}
+${mk.sources.dirs}
+
+pwd
+install -m 755 ${image.basedir}/bin/%{name} $RPM_BUILD_ROOT%{adshome}/bin/%{name}
+install -m 644 ${image.basedir}/lib/wrapper.jar $RPM_BUILD_ROOT%{adshome}/lib/wrapper.jar
+install -m 644 ${image.basedir}/lib/bootstrapper.jar $RPM_BUILD_ROOT%{adshome}/lib/bootstrapper.jar
+install -m 644 ${image.basedir}/lib/libwrapper.so $RPM_BUILD_ROOT%{adshome}/lib/libwrapper.so
+install -m 644 ${image.basedir}/bin/apacheds-tools.jar $RPM_BUILD_ROOT%{adshome}/bin/apacheds-tools.jar
+install -m 755 ${image.basedir}/bin/apacheds-tools.sh $RPM_BUILD_ROOT%{adshome}/bin/apacheds-tools.sh
+install -m 644 ${image.basedir}/bin/logger.jar $RPM_BUILD_ROOT%{adshome}/bin/logger.jar
+#install -m 644 ${image.basedir}/bin/daemon.jar $RPM_BUILD_ROOT%{adshome}/bin/daemon.jar
+install -m 600 ${image.basedir}/conf/server.xml $RPM_BUILD_ROOT%{adsdata}/instances/default/conf/server.xml
+install -m 644 ${image.basedir}/conf/apacheds.conf $RPM_BUILD_ROOT%{adshome}/conf/apacheds.conf
+install -m 644 ${image.basedir}/conf/apacheds-default.conf $RPM_BUILD_ROOT%{adsdata}/instances/default/conf/apacheds.conf
+install -m 644 ${image.basedir}/conf/log4j.properties $RPM_BUILD_ROOT%{adsdata}/instances/default/conf/log4j.properties
+install -m 744 ${image.basedir}/bin/${server.init} $RPM_BUILD_ROOT/etc/init.d/%{name}
+install -m 644 ${image.basedir}/${app.license.name} $RPM_BUILD_ROOT%{adshome}
+install -m 644 ${image.basedir}/${app.readme.name} $RPM_BUILD_ROOT%{adshome}
+install -m 644 ${image.basedir}/${app.icon} $RPM_BUILD_ROOT%{adshome}
+${install.append.libs}
+${install.docs}
+${install.sources}
+${install.notice.file}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%pre
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
+%{_sbindir}/groupadd apacheds >/dev/null 2>&1 || :
+%{_sbindir}/useradd -g apacheds -d %{adsdata} apacheds >/dev/null 2>&1 || :
+
+%post
+/sbin/chkconfig --add %{name}
+
+%files
+%defattr(-,apacheds,apacheds,-)
+#%doc ${app.license.name} ${app.readme.name}
+%config %attr(0755, root, root) /etc/init.d/%{name}
+%{adshome}
+%{adshome}/bin
+%{adshome}/lib
+%{adshome}/lib/ext
+%{adsdata}
+%{adsdata}/instances
+%{adsdata}/instances/default
+%{adsdata}/instances/default/conf
+%{adsdata}/instances/default/partitions
+%{_localstatedir}/log/%{name}
+%{_localstatedir}/log/%{name}/default
+%{_localstatedir}/run/%{name}
+%{_localstatedir}/run/%{name}/default
+%{adshome}/bin/%{name}
+%{adshome}/lib/wrapper.jar
+%{adshome}/lib/bootstrapper.jar
+%{adshome}/bin/apacheds-tools.jar
+%{adshome}/bin/apacheds-tools.sh
+%{adshome}/bin/logger.jar
+%config %{adsdata}/instances/default/conf/log4j.properties
+%config %{adsdata}/instances/default/conf/apacheds.conf
+%config %{adsdata}/instances/default/conf/server.xml
+%{_localstatedir}/log/%{name}/default/stderr.log
+%{_localstatedir}/log/%{name}/default/stdout.log
+%{adshome}/${app.readme.name}
+%{adshome}/${app.license.name}
+%{adshome}/${app.icon}
+${verify.append.libs}
+${verify.docs}
+${verify.sources}
+${verify.notice.file}

Modified: directory/sandbox/ccustine/new_installers/apacheds/server-main/src/main/java/org/apache/directory/server/Service.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/server-main/src/main/java/org/apache/directory/server/Service.java?view=diff&rev=548506&r1=548505&r2=548506
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/server-main/src/main/java/org/apache/directory/server/Service.java
(original)
+++ directory/sandbox/ccustine/new_installers/apacheds/server-main/src/main/java/org/apache/directory/server/Service.java
Mon Jun 18 15:04:45 2007
@@ -61,15 +61,16 @@
         printBanner();
         long startTime = System.currentTimeMillis();
 
-        if ( install != null )
-        {
-            log.info( "server: loading settings from ", install.getConfigurationFile() );
-            ApplicationContext factory = null;
-            factory = new FileSystemXmlApplicationContext( install.getConfigurationFile().toURL().toString()
);
-            cfg = ( MutableServerStartupConfiguration ) factory.getBean( "configuration"
);
-            env = ( Properties ) factory.getBean( "environment" );
-        }
-        else if ( args.length > 0 && new File( args[0] ).exists() ) // hack that
takes server.xml file argument
+//        if ( install != null )
+//        {
+//            log.info( "server: loading settings from ", install.getConfigurationFile()
);
+//            ApplicationContext factory = null;
+//            factory = new FileSystemXmlApplicationContext( install.getConfigurationFile().toURL().toString()
);
+//            cfg = ( MutableServerStartupConfiguration ) factory.getBean( "configuration"
);
+//            env = ( Properties ) factory.getBean( "environment" );
+//        }
+//        else if ( args.length > 0 && new File( args[0] ).exists() ) // hack
that takes server.xml file argument
+        if ( args.length > 0 && new File( args[0] ).exists() ) // hack that takes
server.xml file argument
         {
             log.info( "server: loading settings from ", args[0] );
             ApplicationContext factory = null;



Mime
View raw message