cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [cloudstack] 02/02: packaging: read/load jars from /lib directory
Date Mon, 07 Aug 2017 16:44:46 GMT
This is an automated email from the ASF dual-hosted git repository.

bhaisaab pushed a commit to branch CLOUDSTACK-10012
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit 79c302dadbb4e6bd9a7a066e2d5dc6e4a29aeab5
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
AuthorDate: Mon Aug 7 18:43:24 2017 +0200

    packaging: read/load jars from /lib directory
    
    Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
---
 debian/rules                                    | 9 ++++-----
 packaging/centos7/cloud.spec                    | 9 ++++++---
 packaging/debian/init/cloud-management          | 3 ++-
 packaging/systemd/cloudstack-management.default | 4 +++-
 4 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/debian/rules b/debian/rules
index b250650..bb0ada6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -66,7 +66,8 @@ override_dh_auto_install:
 	mkdir -p $(DESTDIR)/$(SYSCONFDIR)/security/limits.d/
 	mkdir -p $(DESTDIR)/$(SYSCONFDIR)/sudoers.d/
 	mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-management
-	mkdir $(DESTDIR)/usr/share/$(PACKAGE)-management/setup
+	mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-management/lib
+	mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-management/setup
 	mkdir $(DESTDIR)/var/log/$(PACKAGE)/management
 	mkdir $(DESTDIR)/var/cache/$(PACKAGE)/management
 	mkdir $(DESTDIR)/var/cache/$(PACKAGE)/management/work
@@ -77,10 +78,8 @@ override_dh_auto_install:
 	cp -r client/target/utilities/scripts/db/* $(DESTDIR)/usr/share/$(PACKAGE)-management/setup/
 	cp server/target/conf/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/server/
 	cp client/target/conf/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/
-	cp client/target/cloud-client-ui-$(VERSION).jar $(DESTDIR)/usr/share/$(PACKAGE)-management/
-	# To have a uniq name across versions for the startup script
-	ln -s cloud-client-ui-$(VERSION).jar $(DESTDIR)/usr/share/$(PACKAGE)-management/cloud-management-server.jar
-	cp client/target/bcprov-jdk15on-1.55.jar $(DESTDIR)/usr/share/$(PACKAGE)-management/
+	cp client/target/cloud-client-ui-$(VERSION).jar $(DESTDIR)/usr/share/$(PACKAGE)-management/cloud-management-server.jar
+	cp client/target/bcprov-jdk15on-1.55.jar $(DESTDIR)/usr/share/$(PACKAGE)-management/lib/
 	# To make jetty happy from the 1st line of log
 	ln -s log4j-cloud.xml $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/log4j.xml
 
diff --git a/packaging/centos7/cloud.spec b/packaging/centos7/cloud.spec
index 8251b74..ff96414 100644
--- a/packaging/centos7/cloud.spec
+++ b/packaging/centos7/cloud.spec
@@ -251,10 +251,11 @@ install -D client/target/utilities/bin/cloud-sysvmadm ${RPM_BUILD_ROOT}%{_bindir
 install -D client/target/utilities/bin/cloud-update-xenserver-licenses ${RPM_BUILD_ROOT}%{_bindir}/%{name}-update-xenserver-licenses
 
 cp -r client/target/utilities/scripts/db/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/setup
+
 cp -r client/target/cloud-client-ui-%{_maventag}.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/
-ln -s cloud-client-ui-%{_maventag}.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/cloud-management-server.jar
-cp client/target/bcprov-jdk15on-1.55.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/
-ln -s log4j-cloud.xml ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/log4j.xml
+mv ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/cloud-client-ui-%{_maventag}.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/cloud-management-server.jar
+mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/lib
+cp client/target/bcprov-jdk15on-1.55.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/lib/
 
 # Don't package the scripts in the management webapp
 rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/scripts
@@ -482,6 +483,7 @@ pip install --upgrade /usr/share/cloudstack-marvin/Marvin-*.tar.gz
 %attr(0755,root,root) %{_bindir}/%{name}-setup-management
 %attr(0755,root,root) %{_bindir}/%{name}-update-xenserver-licenses
 %{_datadir}/%{name}-management/conf
+%{_datadir}/%{name}-management/lib
 %{_datadir}/%{name}-management/logs
 %attr(0755,root,root) %{_bindir}/%{name}-setup-databases
 %attr(0755,root,root) %{_bindir}/%{name}-migrate-databases
@@ -489,6 +491,7 @@ pip install --upgrade /usr/share/cloudstack-marvin/Marvin-*.tar.gz
 %attr(0755,root,root) %{_bindir}/%{name}-set-guest-sshkey
 %attr(0755,root,root) %{_bindir}/%{name}-sysvmadm
 %attr(0755,root,root) %{_bindir}/%{name}-setup-encryption
+%{_datadir}/%{name}-management/cloud-management-server.jar
 %{_datadir}/%{name}-management/setup/*.sql
 %{_datadir}/%{name}-management/setup/db/*.sql
 %{_datadir}/%{name}-management/setup/*.sh
diff --git a/packaging/debian/init/cloud-management b/packaging/debian/init/cloud-management
index a1d64a8..bcd1b18 100755
--- a/packaging/debian/init/cloud-management
+++ b/packaging/debian/init/cloud-management
@@ -42,7 +42,8 @@ GROUP="cloud"
 UBER_JAR="$MANAGEMENT_HOME/cloud-management-server.jar"
 BOOTSTRAP_CLASS="org.apache.cloudstack.ServerDaemon"
 MANAGEMENT_PID="/var/run/$NAME.pid"
-JSVC_CLASSPATH="/usr/share/java/commons-daemon.jar:$MANAGEMENT_HOME/bcprov-jdk15on-1.55.jar:$MANAGEMENT_CONFIG:/usr/share/$NAME/setup:$MANAGEMENT_HOME:$UBER_JAR"
+JARS=$(ls $MANAGEMENT_HOME/lib/*.jar | tr '\n' ':' | sed s'/.$//')
+JSVC_CLASSPATH="/usr/share/java/commons-daemon.jar:$JARS:$MANAGEMENT_CONFIG:/usr/share/$NAME/setup:$MANAGEMENT_HOME:$UBER_JAR"
 
 
 # We have to explicitly set the HOME variable to the homedir from the user "cloud"
diff --git a/packaging/systemd/cloudstack-management.default b/packaging/systemd/cloudstack-management.default
index 809cbde..a23997e 100644
--- a/packaging/systemd/cloudstack-management.default
+++ b/packaging/systemd/cloudstack-management.default
@@ -44,6 +44,8 @@ SHUTDOWN_VERBOSE="false"
 
 CLOUDSTACK_PID="/var/run/cloudstack-management.pid"
 
-CLASSPATH=/etc/cloudstack/management:/usr/share/cloudstack-common:/usr/share/cloudstack-management/setup:/usr/share/cloudstack-management:/usr/share/cloudstack-management/bcprov-jdk15on-1.55.jar:/usr/share/cloudstack-management/cloud-management-server.jar
+JARS=$(ls /usr/share/cloudstack-management/lib/*.jar | tr '\n' ':' | sed s'/.$//')
+
+CLASSPATH="/etc/cloudstack/management:/usr/share/cloudstack-common:/usr/share/cloudstack-management/setup:/usr/share/cloudstack-management:/usr/share/cloudstack-management/cloud-management-server.jar:$JARS"
 
 BOOTSTRAP_CLASS=org.apache.cloudstack.ServerDaemon

-- 
To stop receiving notification emails like this one, please contact
"commits@cloudstack.apache.org" <commits@cloudstack.apache.org>.

Mime
View raw message