cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From muralire...@apache.org
Subject git commit: updated refs/heads/master to 29b4fe6
Date Tue, 29 Apr 2014 09:14:19 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 8d92d00c8 -> 29b4fe6d9


CLOUDSTACK-6271: The cloud-setup-databases was failing when your jasypt jar path has spaces
in it's path


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/29b4fe6d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/29b4fe6d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/29b4fe6d

Branch: refs/heads/master
Commit: 29b4fe6d9f94739c11a368a52cf0122916b1e4d2
Parents: 8d92d00
Author: Damodar Reddy <damoder.reddy@citrix.com>
Authored: Mon Apr 28 14:16:06 2014 +0530
Committer: Murali Reddy <muralimmreddy@gmail.com>
Committed: Tue Apr 29 14:44:03 2014 +0530

----------------------------------------------------------------------
 client/pom.xml                        | 24 +++++++++++++++++++++++-
 scripts/installer/windows/acs.wxs     | 21 +++++++++++++++------
 setup/bindir/cloud-setup-databases.in |  2 +-
 3 files changed, 39 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/29b4fe6d/client/pom.xml
----------------------------------------------------------------------
diff --git a/client/pom.xml b/client/pom.xml
index 5c56d08..e30d97b 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -705,6 +705,11 @@
                         <include name="**/*" />
                       </fileset>
                     </copy>
+                    <copy todir="./target/python-site-packages">
+                      <fileset dir="../python/lib">
+                        <include name="**/*" />
+                      </fileset>
+                    </copy>
                    </target>
                   </configuration>
                  </execution>
@@ -779,6 +784,21 @@
                     <goal>heat</goal>
                   </goals>
                 </execution>
+                <execution>
+                  <id>python-site-packages</id>
+                  <configuration>
+                    <vars>-var wix.PythonSitePackagesDir</vars>
+                    <workingDirectory>${basedir}/target</workingDirectory>
+                    <dir>python-site-packages</dir>
+                    <template>fragment</template>
+                    <directoryName>INSTALLDIR</directoryName>
+                    <outputFile>target/python-site-packages.wxs</outputFile>
+                    <componentGroup>PythonSitePackagesPath</componentGroup>
+                  </configuration>
+                  <goals>
+                    <goal>heat</goal>
+                  </goals>
+                </execution>
             </executions>
           </plugin>
           <plugin>
@@ -791,7 +811,7 @@
               <extension>WixFirewallExtension</extension>
               <extension>WixUIExtension</extension>
             </extensions>
-            <arguments>-dSourceClient=SourceDir\client -dSetupPathDir=SourceDir\setup
-dUtilitiesPathDir=SourceDir\scripts</arguments>
+            <arguments>-dSourceClient=SourceDir\client -dSetupPathDir=SourceDir\setup
-dUtilitiesPathDir=SourceDir\scripts -dPythonSitePackagesDir=SourceDir\python-site-packages</arguments>
             <sourceFiles>
               <sourceFile>../scripts/installer/windows/acs.wxs</sourceFile>
               <sourceFile>../scripts/installer/windows/WixInstallerDialog.wxs</sourceFile>
@@ -799,6 +819,7 @@
               <sourceFile>target/client.wxs</sourceFile>
               <sourceFile>target/setupdb.wxs</sourceFile>
               <sourceFile>target/utilities.wxs</sourceFile>
+              <sourceFile>target/python-site-packages.wxs</sourceFile>
             </sourceFiles>
             <outputDirectory>target</outputDirectory>
             <objectFiles>
@@ -808,6 +829,7 @@
               <objectFile>target/utilities.wixobj</objectFile>
               <objectFile>target/WixInstallerDialog.wixobj</objectFile>
               <objectFile>target/Setup_Databases.wixobj</objectFile>
+              <objectFile>target/python-site-packages.wixobj</objectFile>
             </objectFiles>
             <outputFile>target/acs.msi</outputFile>
             </configuration>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/29b4fe6d/scripts/installer/windows/acs.wxs
----------------------------------------------------------------------
diff --git a/scripts/installer/windows/acs.wxs b/scripts/installer/windows/acs.wxs
index f959f1c..150c472 100644
--- a/scripts/installer/windows/acs.wxs
+++ b/scripts/installer/windows/acs.wxs
@@ -226,17 +226,23 @@
     <CustomAction Id="UpdateTomcatClassPath"
       ExeCommand='//US//Tomcat6 --Classpath="[TOMCATDIRECTORY]\bin\bootstrap.jar";"[TOMCATDIRECTORY]\bin\tomcat-juli.jar";[CSMANAGEMENT]\conf;[CSMANAGEMENT]\lib;[CSMANAGEMENT]\setup'
       Property="TOMCATDIRECTORY1" Execute="commit" Return="check" />
+    <CustomAction Id="CopySitePackages" Directory='INSTALLDIR'
+      ExeCommand='[SystemFolder]cmd.exe /c xcopy /S "[INSTALLDIR]\python-site-packages" [PYTHON_HOME]\Lib\site-packages'
+      Execute="commit" Return="check" />
+    <CustomAction Id="DeleteDirectory" Directory='INSTALLDIR'
+      ExeCommand='[SystemFolder]cmd.exe /c RD /S /Q "[INSTALLDIR]\python-site-packages"'
+      Execute="commit" Return="check" />
     <CustomAction Id="DeleteFiles" Directory='CSMANAGEMENT'
-      ExeCommand="[SystemFolder]cmd.exe /c del [CSMANAGEMENT]\webapps\client\WEB-INF\classes\db.properties
[CSMANAGEMENT]\webapps\client\WEB-INF\classes\log4j*.xml"
+      ExeCommand='[SystemFolder]cmd.exe /c del "[CSMANAGEMENT]\webapps\client\WEB-INF\classes\db.properties"
"[CSMANAGEMENT]\webapps\client\WEB-INF\classes\log4j*.xml"'
       Execute="commit" Return="check" />
     <CustomAction Id="GenerateSSLKey" Directory='CSMANAGEMENT'
-      ExeCommand="[PYTHON_HOME]\python [CSMANAGEMENT]\webapps\client\WEB-INF\classes\scripts\common\keys\ssl-keys.py
[CSMANAGEMENT]\lib"
+      ExeCommand='[PYTHON_HOME]\python "[CSMANAGEMENT]\webapps\client\WEB-INF\classes\scripts\common\keys\ssl-keys.py"
"[CSMANAGEMENT]\lib"'
       Execute="commit" Return="check" />
     <CustomAction Id="DeployDB" Directory='CSMANAGEMENT'
-      ExeCommand="[PYTHON_HOME]\python [INSTALLDIR]\scripts\cloud-setup-databases [DB_USERNAME]:[DB_PASSWORD]@[DB_HOSTNAME]
--deploy-as=root:[DB_ROOT_PASSWORD] -c [CSMANAGEMENT]\lib -f [CSMANAGEMENT]\setup -j [CSMANAGEMENT]\webapps\client\WEB-INF\lib\jasypt-1.9.0.jar
-n [CSMANAGEMENT]\lib\key"
+      ExeCommand='[PYTHON_HOME]\python "[INSTALLDIR]\scripts\cloud-setup-databases" [DB_USERNAME]:[DB_PASSWORD]@[DB_HOSTNAME]
--deploy-as=root:[DB_ROOT_PASSWORD] -c "[CSMANAGEMENT]\lib" -f "[CSMANAGEMENT]\setup" -j "[CSMANAGEMENT]\webapps\client\WEB-INF\lib\jasypt-1.9.0.jar"
-n "[CSMANAGEMENT]\lib\key"'
       Execute="commit" Return="check" />
     <CustomAction Id="SetupDatabases" Directory='CSMANAGEMENT'
-      ExeCommand="[PYTHON_HOME]\python [INSTALLDIR]\scripts\cloud-setup-databases [DB_USERNAME]:[DB_PASSWORD]@[DB_HOSTNAME]
-c [CSMANAGEMENT]\lib -f [CSMANAGEMENT]\setup -j [CSMANAGEMENT]\webapps\client\WEB-INF\lib\jasypt-1.9.0.jar
-n [CSMANAGEMENT]\lib\key"
+      ExeCommand='[PYTHON_HOME]\python "[INSTALLDIR]\scripts\cloud-setup-databases" [DB_USERNAME]:[DB_PASSWORD]@[DB_HOSTNAME]
-c "[CSMANAGEMENT]\lib" -f "[CSMANAGEMENT]\setup" -j "[CSMANAGEMENT]\webapps\client\WEB-INF\lib\jasypt-1.9.0.jar"
-n "[CSMANAGEMENT]\lib\key"'
       Execute="commit" Return="check" />
 
     <InstallExecuteSequence>
@@ -244,9 +250,11 @@
       <Custom Action="TomcatPath" Before="UpdateTomcatClassPath">NOT Installed</Custom>
       <Custom Action="UpdateTomcatClassPath" Before="UpdateTomcatCatalinaBase">NOT
Installed
       </Custom>
-      <Custom Action="UpdateTomcatCatalinaBase" Before="DeleteFiles">NOT
+      <Custom Action="UpdateTomcatCatalinaBase" Before="CopySitePackages">NOT
         Installed</Custom>
-      <Custom Action="DeleteFiles" Before="GenerateSSLKey">NOT Installed</Custom>
+      <Custom Action="CopySitePackages" Before="DeleteFiles">NOT Installed</Custom>
+      <Custom Action="DeleteFiles" Before="DeleteDirectory">NOT Installed</Custom>
+      <Custom Action="DeleteDirectory" Before="GenerateSSLKey">NOT Installed</Custom>
       <Custom Action="GenerateSSLKey" Before="InstallFinalize">NOT Installed
       </Custom>
       <Custom Action="DeployDB" Before="InstallFinalize">(NOT Installed) AND (CREATE_DATABASE
= "1")
@@ -262,6 +270,7 @@
         <ComponentGroupRef Id='ClientPath' />
         <ComponentGroupRef Id='SetupPath' />
         <ComponentGroupRef Id='UtilitiesPath' />
+        <ComponentGroupRef Id='PythonSitePackagesPath' />
         <ComponentRef Id='ProgramMenuDir' />
         <ComponentRef Id='confFolder' />
         <ComponentRef Id='libFolder' />

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/29b4fe6d/setup/bindir/cloud-setup-databases.in
----------------------------------------------------------------------
diff --git a/setup/bindir/cloud-setup-databases.in b/setup/bindir/cloud-setup-databases.in
index dd22e56..d9dc54f 100755
--- a/setup/bindir/cloud-setup-databases.in
+++ b/setup/bindir/cloud-setup-databases.in
@@ -397,7 +397,7 @@ for example:
 
     def processEncryptionStuff(self):
         def encrypt(input):
-            cmd = ['java','-classpath',self.encryptionJarPath,'org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI',
'encrypt.sh', 'input=%s'%input, 'password=%s'%self.mgmtsecretkey,'verbose=false']
+            cmd = ['java','-classpath','"' + self.encryptionJarPath + '"','org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI',
'encrypt.sh', 'input=%s'%input, 'password=%s'%self.mgmtsecretkey,'verbose=false']
             return runCmd(cmd).strip('\r\n')
 
         def saveMgmtServerSecretKey():


Mime
View raw message