cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chipchild...@apache.org
Subject [2/2] git commit: refs/heads/4.1 - CLOUDSTACK-1415: Merge in the Debian/Ubuntu packaging work from master
Date Fri, 15 Mar 2013 01:02:55 GMT
Updated Branches:
  refs/heads/4.1 e30c90ba7 -> 8d333ec66


CLOUDSTACK-1415: Merge in the Debian/Ubuntu packaging work from master

This patch inclused the packaging work from master tailored for 4.1

Not everything has been tested yet, but it should generate DEB packages.

Signed-off-by: Wido den Hollander <wido@42on.com>


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

Branch: refs/heads/4.1
Commit: 8d333ec6648ae6e114309da4b497ef74a1c47912
Parents: 7aa1625
Author: Wido den Hollander <wido@42on.com>
Authored: Wed Mar 13 21:28:01 2013 +0100
Committer: Chip Childers <chip.childers@gmail.com>
Committed: Thu Mar 14 21:02:30 2013 -0400

----------------------------------------------------------------------
 debian/cloudstack-agent.install       |   11 +-
 debian/cloudstack-common.install      |    2 -
 debian/cloudstack-management.install  |   10 +-
 debian/cloudstack-management.postinst |    8 +-
 debian/cloudstack-usage.install       |    7 +-
 debian/control                        |    6 +-
 debian/rules                          |  140 ++++++++++++++-------------
 packaging/debian/init/cloud-agent     |   10 ++-
 packaging/debian/init/cloud-usage     |   20 ++---
 packaging/debian/replace.properties   |   26 +++---
 plugins/hypervisors/kvm/pom.xml       |    5 -
 usage/pom.xml                         |   18 ++++
 12 files changed, 141 insertions(+), 122 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8d333ec6/debian/cloudstack-agent.install
----------------------------------------------------------------------
diff --git a/debian/cloudstack-agent.install b/debian/cloudstack-agent.install
index 84eee10..b142571 100644
--- a/debian/cloudstack-agent.install
+++ b/debian/cloudstack-agent.install
@@ -15,11 +15,12 @@
 # specific language governing permissions and limitations
 # under the License.
 
-/etc/cloud/agent/agent.properties
-/etc/cloud/agent/environment.properties
-/etc/cloud/agent/log4j-cloud.xml
-/etc/init.d/cloud-agent
+/etc/cloudstack/agent/agent.properties
+/etc/cloudstack/agent/environment.properties
+/etc/cloudstack/agent/log4j-cloud.xml
+/etc/init.d/cloudstack-agent
 /usr/bin/cloud-setup-agent
 /usr/bin/cloud-ssh
 /var/log/cloudstack/agent
-/usr/share/cloudstack-agent/lib/cloudstack-agent-kvm.jar
+/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/8d333ec6/debian/cloudstack-common.install
----------------------------------------------------------------------
diff --git a/debian/cloudstack-common.install b/debian/cloudstack-common.install
index de97ee9..9677f87 100644
--- a/debian/cloudstack-common.install
+++ b/debian/cloudstack-common.install
@@ -15,8 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.
 
-/usr/share/cloudstack-common/lib/cloudstack-core.jar
-/usr/share/cloudstack-common/lib/cloudstack-api.jar
 /usr/share/cloudstack-common/vms/systemvm.iso
 /usr/share/cloudstack-common/scripts/installer/*
 /usr/share/cloudstack-common/scripts/network/*

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8d333ec6/debian/cloudstack-management.install
----------------------------------------------------------------------
diff --git a/debian/cloudstack-management.install b/debian/cloudstack-management.install
index e87b444..12478e1 100644
--- a/debian/cloudstack-management.install
+++ b/debian/cloudstack-management.install
@@ -15,15 +15,15 @@
 # specific language governing permissions and limitations
 # under the License.
 
-/etc/cloud/server/*
-/etc/cloud/management/*
-/etc/init.d/cloud-management
+/etc/cloudstack/server/*
+/etc/cloudstack/management/*
+/etc/init.d/cloudstack-management
 /var/cache/cloudstack/management
 /var/cache/cloudstack/management/work
 /var/cache/cloudstack/management/temp
 /var/log/cloudstack/management
-/var/lib/cloud/mnt
-/var/lib/cloud/management
+/var/lib/cloudstack/mnt
+/var/lib/cloudstack/management
 /usr/bin/cloud-update-xenserver-licenses
 /usr/bin/cloud-setup-management
 /usr/bin/cloud-setup-databases

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8d333ec6/debian/cloudstack-management.postinst
----------------------------------------------------------------------
diff --git a/debian/cloudstack-management.postinst b/debian/cloudstack-management.postinst
index 6fe0145..7b6a1ed 100644
--- a/debian/cloudstack-management.postinst
+++ b/debian/cloudstack-management.postinst
@@ -18,9 +18,9 @@
 
 if [ "$1" = configure ]; then
     if ! getent passwd cloud >/dev/null; then
-        adduser --quiet --system --group --no-create-home --home /usr/share/cloudstack-manager
cloud
+        adduser --quiet --system --group --no-create-home --home /var/lib/cloudstack/management
cloud
+    else
+        usermod -m -d /var/lib/cloudstack/management cloud
     fi
     chown cloud /var/log/cloudstack/management
-fi
-
-#DEBHELPER#
+fi
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8d333ec6/debian/cloudstack-usage.install
----------------------------------------------------------------------
diff --git a/debian/cloudstack-usage.install b/debian/cloudstack-usage.install
index 2696c20..4722e68 100644
--- a/debian/cloudstack-usage.install
+++ b/debian/cloudstack-usage.install
@@ -15,7 +15,8 @@
 # specific language governing permissions and limitations
 # under the License.
 
-/usr/share/cloudstack-usage/lib/cloudstack-usage.jar
-/etc/init.d/cloud-usage
+/usr/share/cloudstack-usage/lib/*
+/usr/share/cloudstack-usage/plugins
+/etc/init.d/cloudstack-usage
 /var/log/cloudstack/usage
-/etc/cloud/usage/*
+/etc/cloudstack/usage/*

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8d333ec6/debian/control
----------------------------------------------------------------------
diff --git a/debian/control b/debian/control
index 659084c..8f82fc3 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: cloudstack
 Section: libs
 Priority: extra
 Maintainer: Wido den Hollander <wido@widodh.nl>
-Build-Depends: debhelper (>= 7), openjdk-6-jdk, tomcat6, genisoimage,
+Build-Depends: debhelper (>= 7), openjdk-6-jdk | openjdk-7-jdk, tomcat6, genisoimage,
  python-mysqldb, maven3 | maven (>= 3), python (>= 2.6.6-3~)
 Standards-Version: 3.8.1
 Homepage: http://www.cloudstack.org/
@@ -22,7 +22,7 @@ Description: CloudStack server library
 
 Package: cloudstack-agent
 Architecture: all
-Depends: openjdk-6-jre, cloudstack-common (= ${source:Version}), lsb-base (>= 3.2), openssh-client,
libvirt0, sysvinit-utils, chkconfig, qemu-kvm, libvirt-bin, uuid-runtime, rsync, grep, iproute,
ebtables, vlan, wget, jsvc
+Depends: openjdk-6-jre | openjdk-7-jre, cloudstack-common (= ${source:Version}), lsb-base
(>= 3.2), libcommons-daemon-java, libjna-java, openssh-client, libvirt0, sysvinit-utils,
chkconfig, qemu-kvm, libvirt-bin, uuid-runtime, rsync, grep, iproute, perl-base, perl-modules,
ebtables, vlan, wget, jsvc
 Conflicts: cloud-agent, cloud-agent-libs, cloud-agent-deps, cloud-agent-scripts
 Description: CloudStack agent
  The CloudStack agent is in charge of managing shared computing resources in
@@ -31,7 +31,7 @@ Description: CloudStack agent
 
 Package: cloudstack-usage
 Architecture: all
-Depends: openjdk-6-jre, cloudstack-common (= ${source:Version}), jsvc
+Depends: openjdk-6-jre | openjdk-7-jre, cloudstack-common (= ${source:Version}), jsvc
 Description: CloudStack usage monitor
  The CloudStack usage monitor provides usage accounting across the entire cloud for
  cloud operators to charge based on usage parameters.

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8d333ec6/debian/rules
----------------------------------------------------------------------
diff --git a/debian/rules b/debian/rules
index d537d86..a135601 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,6 +12,9 @@
 
 DEBVERS := $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p')
 VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/^[[:digit:]]*://' -e 's/[~-].*//')
+PACKAGE = $(shell dh_listpackages|head -n 1|cut -d '-' -f 1)
+SYSCONFDIR = "/etc"
+DESTDIR = "debian/tmp"
 
 # Uncomment this to turn on verbose mode.
 export DH_VERBOSE=1
@@ -48,85 +51,88 @@ install:
 	dh_prep -s
 
 	# Common packages
-	mkdir -p debian/tmp/etc/cloud
-	mkdir -p debian/tmp/etc/init.d
-	mkdir -p debian/tmp/var/cache/cloudstack
-	mkdir -p debian/tmp/var/log/cloudstack
-	mkdir -p debian/tmp/var/lib/cloud
-	mkdir -p debian/tmp/usr/bin
-	mkdir -p debian/tmp/usr/share/cloud
-	mkdir -p debian/tmp/usr/lib/cloud
+	mkdir -p $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)
+	mkdir -p $(DESTDIR)/$(SYSCONFDIR)/init.d
+	mkdir -p $(DESTDIR)/var/cache/$(PACKAGE)
+	mkdir -p $(DESTDIR)/var/log/$(PACKAGE)
+	mkdir -p $(DESTDIR)/var/lib/$(PACKAGE)
+	mkdir -p $(DESTDIR)/usr/bin
+	mkdir -p $(DESTDIR)/usr/share
 
 	# cloudstack-agent
-	mkdir debian/tmp/etc/cloud/agent
-	mkdir debian/tmp/var/log/cloudstack/agent
-	install -D plugins/hypervisors/kvm/target/cloud-plugin-hypervisor-kvm-4.1.0-SNAPSHOT.jar
debian/tmp/usr/share/cloudstack-agent/lib/cloudstack-agent-kvm.jar
-	install -D packaging/debian/init/cloud-agent debian/tmp/etc/init.d/
-	install -D agent/bindir/cloud-setup-agent.in debian/tmp/usr/bin/cloud-setup-agent
-	install -D agent/bindir/cloud-ssh.in debian/tmp/usr/bin/cloud-ssh
-	cp agent/target/transformed/* debian/tmp/etc/cloud/agent
+	mkdir $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/agent
+	mkdir $(DESTDIR)/var/log/$(PACKAGE)/agent
+	mkdir $(DESTDIR)/usr/share/$(PACKAGE)-agent
+	mkdir $(DESTDIR)/usr/share/$(PACKAGE)-agent/plugins
+	install -D agent/target/cloud-agent-$(VERSION)-SNAPSHOT.jar $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/$(PACKAGE)-agent.jar
+	install -D plugins/hypervisors/kvm/target/cloud-plugin-hypervisor-kvm-$(VERSION)-SNAPSHOT.jar
$(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/
+	install -D plugins/hypervisors/kvm/target/dependencies/* $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/
+	install -D packaging/debian/init/cloud-agent $(DESTDIR)/$(SYSCONFDIR)/init.d/$(PACKAGE)-agent
+	install -D agent/bindir/cloud-setup-agent.in $(DESTDIR)/usr/bin/cloud-setup-agent
+	install -D agent/bindir/cloud-ssh.in $(DESTDIR)/usr/bin/cloud-ssh
+	install -D agent/target/transformed/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/agent
 
 	# cloudstack-management
-	mkdir debian/tmp/etc/cloud/server
-	mkdir debian/tmp/etc/cloud/management
-	mkdir -p debian/tmp/usr/share/cloudstack-management
-	mkdir -p debian/tmp/usr/share/cloudstack-management/webapps/client
-	mkdir debian/tmp/usr/share/cloudstack-management/setup
-	mkdir debian/tmp/var/log/cloudstack/management
-	mkdir debian/tmp/var/cache/cloudstack/management
-	mkdir debian/tmp/var/cache/cloudstack/management/work
-	mkdir debian/tmp/var/cache/cloudstack/management/temp
-	mkdir debian/tmp/var/log/cloudstack/ipallocator
-	mkdir debian/tmp/var/lib/cloud/management
-	mkdir debian/tmp/var/lib/cloud/mnt
-	cp -r client/target/utilities/scripts/db/* debian/tmp/usr/share/cloudstack-management/setup/
-	cp -r client/target/cloud-client-ui-4.1.0-SNAPSHOT/* debian/tmp/usr/share/cloudstack-management/webapps/client/
-	cp server/target/conf/* debian/tmp/etc/cloud/server/
-	cp client/target/conf/* debian/tmp/etc/cloud/management/
-	ln -s tomcat6-nonssl.conf debian/tmp/etc/cloud/management/tomcat6.conf
-	mkdir -p debian/tmp/etc/cloud/management/Catalina/localhost/client
-	install -D packaging/debian/init/cloud-management debian/tmp/etc/init.d/cloud-management
-	install -D client/bindir/cloud-update-xenserver-licenses.in debian/tmp/usr/bin/cloud-update-xenserver-licenses
-	install -D server/target/cloud-server-4.1.0-SNAPSHOT.jar debian/tmp/usr/share/cloudstack-management/lib/cloudstack-server.jar
-	ln -s /usr/share/tomcat6/bin debian/tmp/usr/share/cloudstack-management/bin
-	ln -s ../../../etc/cloud/management debian/tmp/usr/share/cloudstack-management/conf
-	ln -s /usr/share/tomcat6/lib debian/tmp/usr/share/cloudstack-management/lib
-	ln -s ../../../var/log/cloudstack/management debian/tmp/usr/share/cloudstack-management/logs
-	ln -s ../../../var/cache/cloudstack/management/temp debian/tmp/usr/share/cloudstack-management/temp
-	ln -s ../../../var/cache/cloudstack/management/work debian/tmp/usr/share/cloudstack-management/work
+	mkdir $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/server
+	mkdir $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management
+	mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-management
+	mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-management/webapps/client
+	mkdir $(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
+	mkdir $(DESTDIR)/var/cache/$(PACKAGE)/management/temp
+	mkdir $(DESTDIR)/var/log/$(PACKAGE)/ipallocator
+	mkdir $(DESTDIR)/var/lib/$(PACKAGE)/management
+	mkdir $(DESTDIR)/var/lib/$(PACKAGE)/mnt
+	cp -r client/target/utilities/scripts/db/* $(DESTDIR)/usr/share/$(PACKAGE)-management/setup/
+	cp -r client/target/cloud-client-ui-$(VERSION)-SNAPSHOT/* $(DESTDIR)/usr/share/$(PACKAGE)-management/webapps/client/
+	cp server/target/conf/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/server/
+	cp client/target/conf/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/
+	ln -s tomcat6-nonssl.conf $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/tomcat6.conf
+	mkdir -p $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/Catalina/localhost/client
+	install -D packaging/debian/init/cloud-management $(DESTDIR)/$(SYSCONFDIR)/init.d/$(PACKAGE)-management
+	install -D client/bindir/cloud-update-xenserver-licenses.in $(DESTDIR)/usr/bin/cloud-update-xenserver-licenses
+	install -D server/target/cloud-server-$(VERSION)-SNAPSHOT.jar $(DESTDIR)/usr/share/$(PACKAGE)-management/lib/$(PACKAGE)-server.jar
+	ln -s /usr/share/tomcat6/bin $(DESTDIR)/usr/share/$(PACKAGE)-management/bin
+	ln -s ../../..$(SYSCONFDIR)/$(PACKAGE)/management $(DESTDIR)/usr/share/$(PACKAGE)-management/conf
+	ln -s /usr/share/tomcat6/lib $(DESTDIR)/usr/share/$(PACKAGE)-management/lib
+	ln -s ../../../var/log/$(PACKAGE)/management $(DESTDIR)/usr/share/$(PACKAGE)-management/logs
+	ln -s ../../../var/cache/$(PACKAGE)/management/temp $(DESTDIR)/usr/share/$(PACKAGE)-management/temp
+	ln -s ../../../var/cache/$(PACKAGE)/management/work $(DESTDIR)/usr/share/$(PACKAGE)-management/work
 
 	# cloudstack-common
-	mkdir -p debian/tmp/usr/share/cloudstack-common
-	mkdir debian/tmp/usr/share/cloudstack-common/scripts
-	mkdir debian/tmp/usr/share/cloudstack-common/setup
-	cp -r scripts/installer debian/tmp/usr/share/cloudstack-common/scripts
-	cp -r scripts/network debian/tmp/usr/share/cloudstack-common/scripts
-	cp -r scripts/storage debian/tmp/usr/share/cloudstack-common/scripts
-	cp -r scripts/util debian/tmp/usr/share/cloudstack-common/scripts
-	cp -r scripts/vm debian/tmp/usr/share/cloudstack-common/scripts
-	install -D client/target/utilities/bin/cloud-migrate-databases debian/tmp/usr/bin
-	install -D client/target/utilities/bin/cloud-set-guest-password debian/tmp/usr/bin
-	install -D client/target/utilities/bin/cloud-set-guest-sshkey debian/tmp/usr/bin
-	install -D client/target/utilities/bin/cloud-setup-databases debian/tmp/usr/bin
-	install -D client/target/utilities/bin/cloud-setup-management debian/tmp/usr/bin
-	install -D console-proxy/dist/systemvm.iso debian/tmp/usr/share/cloudstack-common/vms/systemvm.iso
-	install -D core/target/cloud-core-4.1.0-SNAPSHOT.jar debian/tmp/usr/share/cloudstack-common/lib/cloudstack-core.jar
-	install -D api/target/cloud-api-4.1.0-SNAPSHOT.jar debian/tmp/usr/share/cloudstack-common/lib/cloudstack-api.jar
+	mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-common
+	mkdir $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts
+	mkdir $(DESTDIR)/usr/share/$(PACKAGE)-common/setup
+	cp -r scripts/installer $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts
+	cp -r scripts/network $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts
+	cp -r scripts/storage $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts
+	cp -r scripts/util $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts
+	cp -r scripts/vm $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts
+	install -D client/target/utilities/bin/cloud-migrate-databases $(DESTDIR)/usr/bin
+	install -D client/target/utilities/bin/cloud-set-guest-password $(DESTDIR)/usr/bin
+	install -D client/target/utilities/bin/cloud-set-guest-sshkey $(DESTDIR)/usr/bin
+	install -D client/target/utilities/bin/cloud-setup-databases $(DESTDIR)/usr/bin
+	install -D client/target/utilities/bin/cloud-setup-management $(DESTDIR)/usr/bin
+	install -D client/target/cloud-client-ui-$(VERSION)-SNAPSHOT/WEB-INF/classes/vms/systemvm.iso
$(DESTDIR)/usr/share/$(PACKAGE)-common/vms/systemvm.iso
 
 	# cloudstack-python
-	mkdir -p debian/tmp/usr/lib/python2.7/dist-packages
-	cp -r python/lib/cloud* debian/tmp/usr/lib/python2.7/dist-packages
+	mkdir -p $(DESTDIR)/usr/lib/python2.7/dist-packages
+	cp -r python/lib/cloud* $(DESTDIR)/usr/lib/python2.7/dist-packages
 
 	# cloudstack-usage
-	mkdir debian/tmp/etc/cloud/usage
-	mkdir debian/tmp/var/log/cloudstack/usage
-	install -D usage/target/cloud-usage-4.1.0-SNAPSHOT.jar debian/tmp/usr/share/cloudstack-usage/lib/cloudstack-usage.jar
-	cp usage/target/transformed/* debian/tmp/etc/cloud/usage/
-	ln -s ../management/db.properties debian/tmp/etc/cloud/usage/db.properties
-	install -D packaging/debian/init/cloud-usage debian/tmp/etc/init.d
+	mkdir $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/usage
+	mkdir $(DESTDIR)/var/log/$(PACKAGE)/usage
+	mkdir $(DESTDIR)/usr/share/$(PACKAGE)-usage
+	mkdir $(DESTDIR)/usr/share/$(PACKAGE)-usage/plugins
+	install -D usage/target/cloud-usage-$(VERSION)-SNAPSHOT.jar $(DESTDIR)/usr/share/$(PACKAGE)-usage/lib/$(PACKAGE)-usage.jar
+	install -D usage/target/dependencies/* $(DESTDIR)/usr/share/$(PACKAGE)-usage/lib/
+	cp usage/target/transformed/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/usage/
+	install -D packaging/debian/init/cloud-usage $(DESTDIR)/$(SYSCONFDIR)/init.d/$(PACKAGE)-usage
 
 	# cloudstack-awsapi
-	mkdir debian/tmp/var/log/cloudstack/awsapi
+	mkdir $(DESTDIR)/var/log/$(PACKAGE)/awsapi
 
 	dh_installdirs
 	dh_install

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8d333ec6/packaging/debian/init/cloud-agent
----------------------------------------------------------------------
diff --git a/packaging/debian/init/cloud-agent b/packaging/debian/init/cloud-agent
index 8b64693..c87a5c0 100755
--- a/packaging/debian/init/cloud-agent
+++ b/packaging/debian/init/cloud-agent
@@ -46,7 +46,7 @@ unset OPTIONS
 [ -r /etc/default/"$SHORTNAME" ] && source /etc/default/"$SHORTNAME"
 
 # The first existing directory is used for JAVA_HOME (if JAVA_HOME is not defined in $DEFAULT)
-JDK_DIRS="/usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk-amd64
/usr/lib/jvm/java-6-sun /usr/lib/jvm/java-1.5.0-sun /usr/lib/j2sdk1.5-sun /usr/lib/j2sdk1.5-ibm"
+JDK_DIRS="/usr/lib/jvm/java-7-openjdk-amd64 /usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-6-openjdk
/usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk-amd64 /usr/lib/jvm/java-6-sun"
 
 for jdir in $JDK_DIRS; do
     if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
@@ -55,9 +55,13 @@ for jdir in $JDK_DIRS; do
 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
-export CLASSPATH="/usr/share/java/commons-daemon.jar:/usr/share/java/cloud-agent-kvm.jar:/etc/cloud/agent"
+# 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:$PCP:/etc/cloudstack/agent"
 
 wait_for_network() {
     i=1
@@ -93,7 +97,7 @@ start() {
 
     wait_for_network
 
-    if start_daemon -p $PIDFILE $DAEMON -cp "$CLASSPATH" -pidfile "$PIDFILE" -errfile SYSLOG
-D jna.nosys=true $CLASS
+    if start_daemon -p $PIDFILE $DAEMON -cp "$CLASSPATH" -pidfile "$PIDFILE" -errfile SYSLOG
$CLASS
         RETVAL=$?
     then
         rc=0

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8d333ec6/packaging/debian/init/cloud-usage
----------------------------------------------------------------------
diff --git a/packaging/debian/init/cloud-usage b/packaging/debian/init/cloud-usage
index 6b17ea8..1cc75cc 100755
--- a/packaging/debian/init/cloud-usage
+++ b/packaging/debian/init/cloud-usage
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 ### BEGIN INIT INFO
-# Provides:          cloud usage
+# Provides:          cloudstack usage
 # Required-Start:    $network $local_fs
 # Required-Stop:     $network $local_fs
 # Default-Start:     3 4 5
@@ -32,20 +32,18 @@
 
 . /lib/lsb/init-functions
 
-SHORTNAME="cloud-usage"
+SHORTNAME="cloudstack-usage"
 PIDFILE=/var/run/"$SHORTNAME".pid
-LOGFILE=/var/log/cloud/usage/usage-server.log
 PROGNAME="CloudStack Usage Monitor"
 CLASS="com.cloud.usage.UsageServer"
 PROG="jsvc"
 DAEMON="/usr/bin/jsvc"
-USER=@MSUSER@
 
 unset OPTIONS
-[ -r @SYSCONFDIR@/default/"$SHORTNAME" ] && source @SYSCONFDIR@/default/"$SHORTNAME"
+[ -r /etc/default/"$SHORTNAME" ] && source /etc/default/"$SHORTNAME"
 
 # The first existing directory is used for JAVA_HOME (if JAVA_HOME is not defined in $DEFAULT)
-JDK_DIRS="/usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk-amd64
/usr/lib/jvm/java-6-sun /usr/lib/jvm/jre-1.6.0 /usr/lib/j2sdk1.5-sun /usr/lib/jre-openjdk"
+JDK_DIRS="/usr/lib/jvm/java-7-openjdk-amd64 /usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-6-openjdk
/usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk-amd64 /usr/lib/jvm/java-6-sun"
 
 for jdir in $JDK_DIRS; do
     if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
@@ -54,14 +52,12 @@ for jdir in $JDK_DIRS; do
 done
 export JAVA_HOME
 
-SCP="@SYSTEMCLASSPATH@"
-DCP="@DEPSCLASSPATH@"
-UCP="@USAGECLASSPATH@"
-JCP="/usr/share/java/commons-daemon.jar"
+UCP=`ls /usr/share/cloudstack-usage/lib/*.jar | tr '\n' ':' | sed s'/.$//'`
+PCP=`ls /usr/share/cloudstack-usage/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
-export CLASSPATH="$SCP:$DCP:$UCP:$JCP:@USAGESYSCONFDIR@"
+export CLASSPATH="/usr/share/java/commons-daemon.jar:$UCP:$PCP:/etc/cloudstack/usage"
 
 start() {
     if [ -s "$PIDFILE" ] && kill -0 $(cat "$PIDFILE") >/dev/null 2>&1;
then
@@ -79,7 +75,7 @@ start() {
         exit 1
     fi
 
-    if start_daemon -p $PIDFILE $DAEMON -cp "$CLASSPATH" -pidfile "$PIDFILE" -user "$USER"
-outfile SYSLOG -errfile SYSLOG -Dpid=$$ $CLASS
+    if start_daemon -p $PIDFILE $DAEMON -cp "$CLASSPATH" -pidfile "$PIDFILE" -outfile SYSLOG
-errfile SYSLOG -Dpid=$$ $CLASS
         RETVAL=$?
     then
         rc=0

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8d333ec6/packaging/debian/replace.properties
----------------------------------------------------------------------
diff --git a/packaging/debian/replace.properties b/packaging/debian/replace.properties
index d891e79..fee1def 100644
--- a/packaging/debian/replace.properties
+++ b/packaging/debian/replace.properties
@@ -26,37 +26,37 @@ COMPONENTS-SPEC=components-premium.xml
 AWSAPILOG=awsapi.log
 REMOTEHOST=localhost
 AGENTCLASSPATH=
-AGENTLOG=/var/log/cloud/agent/agent.log
-AGENTLOGDIR=/var/log/cloud/agent/
-AGENTSYSCONFDIR=/etc/cloud/agent
-APISERVERLOG=/var/log/cloud/management/apilog.log
-AWSAPILOG=/var/log/cloud/awsapi/awsapi.log
+AGENTLOG=/var/log/cloudstack/agent/agent.log
+AGENTLOGDIR=/var/log/cloudstack/agent/
+AGENTSYSCONFDIR=/etc/cloudstack/agent
+APISERVERLOG=/var/log/cloudstack/management/apilog.log
+AWSAPILOG=/var/log/cloudstack/awsapi/awsapi.log
 BINDIR=/usr/bin
-COMMONLIBDIR=/usr/share/java
+COMMONLIBDIR=/usr/share/cloudstack-common
 CONFIGUREVARS=
 DEPSCLASSPATH=
 DOCDIR=
-IPALOCATORLOG=/var/log/cloud/management/ipallocator.log
+IPALOCATORLOG=/var/log/cloudstack/management/ipallocator.log
 JAVADIR=/usr/share/cloudstack-management/webapps/client/WEB-INF/lib
 LIBEXECDIR=/usr/libexec
 LOCKDIR=/var/lock
 MSCLASSPATH=
-MSCONF=/etc/cloud/management
+MSCONF=/etc/cloudstack/management
 MSENVIRON=/usr/share/cloudstack-management
-MSLOG=/var/log/cloud/management/management-server.log
-MSLOGDIR=/var/log/cloud/management/
+MSLOG=/var/log/cloudstack/management/management-server.log
+MSLOGDIR=/var/log/cloudstack/management/
 MSMNTDIR=/var/lib/cloud/mnt
 MSUSER=cloud
 PIDDIR=/var/run
 PLUGINJAVADIR=
 PREMIUMJAVADIR=
 PYTHONDIR=/usr/lib/python2.6/site-packages/
-SERVERSYSCONFDIR=/etc/cloud/server
+SERVERSYSCONFDIR=/etc/cloudstack/server
 SETUPDATADIR=/usr/share/cloudstack-management/setup
 SYSCONFDIR=/etc
 SYSTEMCLASSPATH=
 SYSTEMJARS=
 USAGECLASSPATH=
-USAGELOG=/var/log/cloud/usage
-USAGESYSCONFDIR=/etc/cloud/usage
+USAGELOG=/var/log/cloudstack/usage
+USAGESYSCONFDIR=/etc/cloudstack/usage
 PACKAGE=cloud

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8d333ec6/plugins/hypervisors/kvm/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/pom.xml b/plugins/hypervisors/kvm/pom.xml
index 0639f20..62536dc 100644
--- a/plugins/hypervisors/kvm/pom.xml
+++ b/plugins/hypervisors/kvm/pom.xml
@@ -43,11 +43,6 @@
       <artifactId>libvirt</artifactId>
       <version>${cs.libvirt-java.version}</version>
     </dependency>
-    <dependency>
-      <groupId>net.java.dev.jna</groupId>
-      <artifactId>jna</artifactId>
-      <version>${cs.jna.version}</version>
-    </dependency>
   </dependencies>
   <build>
       <defaultGoal>install</defaultGoal>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8d333ec6/usage/pom.xml
----------------------------------------------------------------------
diff --git a/usage/pom.xml b/usage/pom.xml
index bf442a3..bc1d9c8 100644
--- a/usage/pom.xml
+++ b/usage/pom.xml
@@ -127,6 +127,24 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <version>2.5.1</version>
+        <executions>
+          <execution>
+            <id>copy-dependencies</id>
+            <phase>package</phase>
+            <goals>
+              <goal>copy-dependencies</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${project.build.directory}/dependencies</outputDirectory>
+              <includeScope>runtime</includeScope>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
   <profiles>


Mime
View raw message