cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From muralire...@apache.org
Subject [4/50] [abbrv] git commit: refs/heads/gslb-wip - packaging: Include the Agent plugins dir in the classpath
Date Mon, 18 Mar 2013 10:14:50 GMT
packaging: Include the Agent plugins dir in the classpath

For both the RPM and DEB packages are new directory for plugins
for the agent is created.

All JAR files in that directory will be added to the classpath
on boot of the agent.


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

Branch: refs/heads/gslb-wip
Commit: 9e02ed139fe8f7cd9fcb6a989dbe94c326774c6b
Parents: 03bc74b
Author: Wido den Hollander <wido@42on.com>
Authored: Wed Mar 6 19:09:02 2013 +0100
Committer: Wido den Hollander <wido@42on.com>
Committed: Wed Mar 6 19:26:18 2013 +0100

----------------------------------------------------------------------
 debian/cloudstack-agent.install   |    1 +
 debian/rules                      |    3 +++
 packaging/centos63/cloud-agent.rc |    3 ++-
 packaging/centos63/cloud.spec     |    2 ++
 packaging/debian/init/cloud-agent |    3 ++-
 5 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9e02ed13/debian/cloudstack-agent.install
----------------------------------------------------------------------
diff --git a/debian/cloudstack-agent.install b/debian/cloudstack-agent.install
index cf57bfe..b142571 100644
--- a/debian/cloudstack-agent.install
+++ b/debian/cloudstack-agent.install
@@ -23,3 +23,4 @@
 /usr/bin/cloud-ssh
 /var/log/cloudstack/agent
 /usr/share/cloudstack-agent/lib/*
+/usr/share/cloudstack-agent/plugins
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9e02ed13/debian/rules
----------------------------------------------------------------------
diff --git a/debian/rules b/debian/rules
index cf950d1..612a154 100755
--- a/debian/rules
+++ b/debian/rules
@@ -56,10 +56,13 @@ install:
 	mkdir -p debian/tmp/var/log/$(PACKAGE)
 	mkdir -p debian/tmp/var/lib/$(PACKAGE)
 	mkdir -p debian/tmp/usr/bin
+	mkdir -p debian/tmp/usr/share
 
 	# cloudstack-agent
 	mkdir debian/tmp$(SYSCONFDIR)/$(PACKAGE)/agent
 	mkdir debian/tmp/var/log/$(PACKAGE)/agent
+	mkdir debian/tmp/usr/share/$(PACKAGE)-agent
+	mkdir debian/tmp/usr/share/$(PACKAGE)-agent/plugins
 	install -D agent/target/cloud-agent-4.2.0-SNAPSHOT.jar debian/tmp/usr/share/$(PACKAGE)-agent/lib/$(PACKAGE)-agent.jar
 	install -D plugins/hypervisors/kvm/target/cloud-plugin-hypervisor-kvm-4.2.0-SNAPSHOT.jar
debian/tmp/usr/share/$(PACKAGE)-agent/lib/
 	install -D plugins/hypervisors/kvm/target/dependencies/* debian/tmp/usr/share/$(PACKAGE)-agent/lib/

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9e02ed13/packaging/centos63/cloud-agent.rc
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud-agent.rc b/packaging/centos63/cloud-agent.rc
index 58611f2..6d53473 100755
--- a/packaging/centos63/cloud-agent.rc
+++ b/packaging/centos63/cloud-agent.rc
@@ -57,11 +57,12 @@ done
 export JAVA_HOME
 
 ACP=`ls /usr/share/cloudstack-agent/lib/*.jar | tr '\n' ':' | sed s'/.$//'`
+PCP=`ls /usr/share/cloudstack-agent/plugins/*.jar 2>/dev/null | tr '\n' ':' | sed s'/.$//'`
 
 # We need to append the JSVC daemon JAR to the classpath
 # AgentShell implements the JSVC daemon methods
 # We also need JNA in the classpath (from the distribution) for the Libvirt Java bindings
-export CLASSPATH="/usr/share/java/commons-daemon.jar:/usr/share/java/jna.jar:$ACP:/etc/cloudstack/agent:/usr/share/cloudstack-common/scripts"
+export CLASSPATH="/usr/share/java/commons-daemon.jar:/usr/share/java/jna.jar:$ACP:$PCP:/etc/cloudstack/agent:/usr/share/cloudstack-common/scripts"
 
 start() {
     echo -n $"Starting $PROGNAME: "

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9e02ed13/packaging/centos63/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec
index 369ff7f..a4db501 100644
--- a/packaging/centos63/cloud.spec
+++ b/packaging/centos63/cloud.spec
@@ -256,6 +256,7 @@ chmod 770 ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/agent
 mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/agent
 mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/agent
 mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-agent/lib
+mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-agent/plugins
 install -D packaging/centos63/cloud-agent.rc ${RPM_BUILD_ROOT}%{_sysconfdir}/init.d/%{name}-agent
 install -D agent/target/transformed/agent.properties ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/agent/agent.properties
 install -D agent/target/transformed/environment.properties ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/agent/environment.properties
@@ -395,6 +396,7 @@ fi
 %config(noreplace) %{_sysconfdir}/%{name}/agent
 %dir %{_localstatedir}/log/%{name}/agent
 %attr(0644,root,root) %{_datadir}/%{name}-agent/lib/*.jar
+%dir %{_datadir}/%{name}-agent/plugins
 %doc LICENSE
 %doc NOTICE
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9e02ed13/packaging/debian/init/cloud-agent
----------------------------------------------------------------------
diff --git a/packaging/debian/init/cloud-agent b/packaging/debian/init/cloud-agent
index 502bef4..c87a5c0 100755
--- a/packaging/debian/init/cloud-agent
+++ b/packaging/debian/init/cloud-agent
@@ -56,11 +56,12 @@ done
 export JAVA_HOME
 
 ACP=`ls /usr/share/cloudstack-agent/lib/*.jar | tr '\n' ':' | sed s'/.$//'`
+PCP=`ls /usr/share/cloudstack-agent/plugins/*.jar 2>/dev/null | tr '\n' ':' | sed s'/.$//'`
 
 # We need to append the JSVC daemon JAR to the classpath
 # AgentShell implements the JSVC daemon methods
 # We also need JNA in the classpath (from the distribution) for the Libvirt Java bindings
-export CLASSPATH="/usr/share/java/commons-daemon.jar:/usr/share/java/jna.jar:$ACP:/etc/cloudstack/agent"
+export CLASSPATH="/usr/share/java/commons-daemon.jar:/usr/share/java/jna.jar:$ACP:$PCP:/etc/cloudstack/agent"
 
 wait_for_network() {
     i=1


Mime
View raw message