incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject [2/2] git commit: refs/heads/master - CLOUDSTACK-1415: Debian & Ubuntu packaging work
Date Wed, 27 Feb 2013 15:47:36 GMT
Updated Branches:
  refs/heads/master 23e232f5f -> 2f135be15


CLOUDSTACK-1415: Debian & Ubuntu packaging work

Some concepts included:

* the replace.properties location used by maven is parameterized to allow
  for a build that does not modify the currently git tracked files
* package naming is updated along the lines of what was discussed on the
  -dev mailing list and between committers at the Build a Cloud Day in Belgi
* package version pattern is updated (since we redo all package names,
  we might as well drop the epoch)


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

Branch: refs/heads/master
Commit: 2f135be15f1850280d27585153de2650f13f1dcb
Parents: 23e232f
Author: Noa Resare <noa@spotify.com>
Authored: Wed Feb 27 08:55:24 2013 +0000
Committer: Noa Resare <noa@spotify.com>
Committed: Wed Feb 27 15:44:46 2013 +0000

----------------------------------------------------------------------
 agent/pom.xml                          |   22 +++-
 awsapi/pom.xml                         |    2 +-
 client/pom.xml                         |   26 +++-
 client/tomcatconf/classpath.conf.in    |   24 +--
 debian/README                          |    6 -
 debian/changelog                       |    6 +
 debian/cloud-agent-deps.install        |   18 --
 debian/cloud-agent-libs.install        |   19 --
 debian/cloud-agent.config              |   17 --
 debian/cloud-agent.install             |   25 ---
 debian/cloud-agent.postinst            |   34 ----
 debian/cloud-cli.config                |   17 --
 debian/cloud-cli.install               |   21 ---
 debian/cloud-client-ui.install         |   19 --
 debian/cloud-client.config             |   17 --
 debian/cloud-client.install            |   58 -------
 debian/cloud-client.postinst           |   49 ------
 debian/cloud-core.install              |   19 --
 debian/cloud-deps.install              |   34 ----
 debian/cloud-management.config         |   17 --
 debian/cloud-python.install            |   18 --
 debian/cloud-scripts.install           |   27 ---
 debian/cloud-server.install            |   32 ----
 debian/cloud-setup.install             |   25 ---
 debian/cloud-system-iso.install        |   18 --
 debian/cloud-usage.install             |   23 ---
 debian/cloud-usage.postinst            |   47 -----
 debian/cloud-utils.install             |   22 ---
 debian/cloudstack-agent.install        |   25 +++
 debian/cloudstack-awsapi.install       |   18 ++
 debian/cloudstack-cli.install          |   16 ++
 debian/cloudstack-common.install       |   33 ++++
 debian/cloudstack-docs.install         |   16 ++
 debian/cloudstack-management.install   |   31 ++++
 debian/cloudstack-management.postinst  |   26 +++
 debian/cloudstack-usage.install        |   21 +++
 debian/control                         |  133 ++++-----------
 debian/rules                           |  124 +++++++++++---
 framework/rest/pom.xml                 |    4 +
 packaging/debian/init/cloud-agent      |  167 ++++++++++++++++++
 packaging/debian/init/cloud-management |  244 +++++++++++++++++++++++++++
 packaging/debian/init/cloud-usage      |  131 ++++++++++++++
 packaging/debian/replace.properties    |    6 +-
 plugins/hypervisors/kvm/pom.xml        |   68 ++------
 pom.xml                                |    1 +
 server/pom.xml                         |   37 ++++
 usage/pom.xml                          |    4 +-
 47 files changed, 971 insertions(+), 796 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/agent/pom.xml
----------------------------------------------------------------------
diff --git a/agent/pom.xml b/agent/pom.xml
index a3d071b..aceb4d7 100644
--- a/agent/pom.xml
+++ b/agent/pom.xml
@@ -83,7 +83,7 @@
                     <filterreader
                       classname="org.apache.tools.ant.filters.ReplaceTokens">
                       <param type="propertiesfile"
-                        value="${basedir}/../build/replace.properties" />
+                        value="${cs.replace.properties}" />
                     </filterreader>
                   </filterchain>
                 </copy>
@@ -97,7 +97,7 @@
                     <filterreader
                       classname="org.apache.tools.ant.filters.ReplaceTokens">
                       <param type="propertiesfile"
-                        value="${basedir}/../build/replace.properties" />
+                        value="${cs.replace.properties}" />
                     </filterreader>
                   </filterchain>
                 </copy>
@@ -106,6 +106,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>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/awsapi/pom.xml
----------------------------------------------------------------------
diff --git a/awsapi/pom.xml b/awsapi/pom.xml
index 8e07f9e..f19a713 100644
--- a/awsapi/pom.xml
+++ b/awsapi/pom.xml
@@ -354,7 +354,7 @@
                     <filterreader
                       classname="org.apache.tools.ant.filters.ReplaceTokens">
                       <param type="propertiesfile"
-                        value="${basedir}/../build/replace.properties" />
+                        value="${cs.replace.properties}" />
                     </filterreader>
                   </filterchain>
                 </copy>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/client/pom.xml
----------------------------------------------------------------------
diff --git a/client/pom.xml b/client/pom.xml
index b485be5..8e1ad2b 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -308,7 +308,7 @@
                     <filterreader
                       classname="org.apache.tools.ant.filters.ReplaceTokens">
                       <param type="propertiesfile"
-                        value="${basedir}/../build/replace.properties" />
+                        value="${cs.replace.properties}" />
                     </filterreader>
                   </filterchain>
                 </copy>
@@ -319,7 +319,7 @@
                   <globmapper from="*.in" to="*" />
                   <filterchain>
                     <filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
-                      <param type="propertiesfile" value="${basedir}/../build/replace.properties" />
+                      <param type="propertiesfile" value="${cs.replace.properties}" />
                     </filterreader>
                   </filterchain>
                 </copy>
@@ -330,7 +330,7 @@
                   <globmapper from="*.in" to="*" />
                   <filterchain>
                     <filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
-                      <param type="propertiesfile" value="${basedir}/../build/replace.properties" />
+                      <param type="propertiesfile" value="${cs.replace.properties}" />
                     </filterreader>
                   </filterchain>
                 </copy>
@@ -341,7 +341,7 @@
                   <globmapper from="*.in" to="*" />
                   <filterchain>
                     <filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
-                      <param type="propertiesfile" value="${basedir}/../build/replace.properties" />
+                      <param type="propertiesfile" value="${cs.replace.properties}" />
                     </filterreader>
                   </filterchain>
                 </copy>
@@ -351,10 +351,26 @@
                   </fileset>
                   <filterchain>
                     <filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
-                      <param type="propertiesfile" value="${basedir}/../build/replace.properties" />
+                      <param type="propertiesfile" value="${cs.replace.properties}" />
                     </filterreader>
                   </filterchain>
                 </copy>
+                <copy overwrite="true" todir="${basedir}/target/conf">
+                  <fileset dir="${basedir}/tomcatconf">
+                    <include name="*.in" />
+                  </fileset>
+                  <globmapper from="*.in" to="*" />
+                  <filterchain>
+                    <filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
+                      <param type="propertiesfile" value="${cs.replace.properties}" />
+                    </filterreader>
+                  </filterchain>
+                </copy>
+                <copy overwrite="true" todir="${basedir}/target/conf">
+                  <fileset dir="${basedir}/tomcatconf">
+                    <exclude name="*.in" />
+                  </fileset>
+                </copy>
               </target>
             </configuration>
           </execution>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/client/tomcatconf/classpath.conf.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/classpath.conf.in b/client/tomcatconf/classpath.conf.in
index 3ae0fb4..5625f69 100644
--- a/client/tomcatconf/classpath.conf.in
+++ b/client/tomcatconf/classpath.conf.in
@@ -16,23 +16,11 @@
 # specific language governing permissions and limitations
 # under the License.
 
-SYSTEMJARS="@SYSTEMJARS@"
-SCP=$(build-classpath $SYSTEMJARS 2>/dev/null) ; if [ $? != 0 ] ; then export SCP="@SYSTEMCLASSPATH@" ; fi
-MCP="@MSCLASSPATH@"
-DCP="@DEPSCLASSPATH@"
-CLASSPATH=$SCP:$DCP:$MCP:@MSCONF@:@SETUPDATADIR@
-for jarfile in "@PREMIUMJAVADIR@"/* ; do
-	if [ ! -e "$jarfile" ] ; then continue ; fi
-	CLASSPATH=$jarfile:$CLASSPATH
-done
-for plugin in "@PLUGINJAVADIR@"/* ; do
-	if [ ! -e "$plugin" ] ; then continue ; fi
-	CLASSPATH=$plugin:$CLASSPATH
-done
-for vendorconf in "@MSCONF@"/vendor/* ; do
-	if [ ! -d "$vendorconf" ] ; then continue ; fi
-	CLASSPATH=$vendorconf:$CLASSPATH
+# We use WEB-INF/lib in the webapp for including things into
+# the classpath nowdays
+
+for jar in /usr/share/tomcat6/lib/*.jar; do
+    CLASSPATH=$jar:$CLASSPATH
 done
+CLASSPATH=${CLASSPATH}/usr/share/cloudstack-management/webapps/client/WEB-INF/lib/mysql-connector-java-5.1.21.jar
 export CLASSPATH
-PATH=/sbin:/usr/sbin:$PATH
-export PATH

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/README
----------------------------------------------------------------------
diff --git a/debian/README b/debian/README
deleted file mode 100644
index cbfbf1b..0000000
--- a/debian/README
+++ /dev/null
@@ -1,6 +0,0 @@
-The Debian Package 
-----------------------------
-
-This is part of the Cloud Stack collection of packages.
-
- -- Manuel Amador (Rudd-O) <manuel@vmops.com>  Thu, 25 Mar 2010 15:12:06 -0700

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/changelog
----------------------------------------------------------------------
diff --git a/debian/changelog b/debian/changelog
index c3243aa..cbbaad3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+cloudstack (4.1.0-incubating-0.0.snapshot) unstable; urgency=low
+
+  * Incorporate incubating into version, remove epoch
+
+ -- Noa Resare <noa@spotify.com>  Tue, 05 Feb 2013 18:05:28 +0000
+
 cloud (1:4.0.0-1) unstable; urgency=low
 
   * Bumping the version to 4.0.0

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-agent-deps.install
----------------------------------------------------------------------
diff --git a/debian/cloud-agent-deps.install b/debian/cloud-agent-deps.install
deleted file mode 100644
index b05b7d1..0000000
--- a/debian/cloud-agent-deps.install
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-/usr/share/java/libvirt-0.4.9.jar

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-agent-libs.install
----------------------------------------------------------------------
diff --git a/debian/cloud-agent-libs.install b/debian/cloud-agent-libs.install
deleted file mode 100644
index ba25935..0000000
--- a/debian/cloud-agent-libs.install
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-/usr/share/java/cloud-agent.jar
-/usr/share/java/cloud-plugin-hypervisor-kvm.jar

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-agent.config
----------------------------------------------------------------------
diff --git a/debian/cloud-agent.config b/debian/cloud-agent.config
deleted file mode 100644
index 00ae6c0..0000000
--- a/debian/cloud-agent.config
+++ /dev/null
@@ -1,17 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-agent.install
----------------------------------------------------------------------
diff --git a/debian/cloud-agent.install b/debian/cloud-agent.install
deleted file mode 100644
index c67e90a..0000000
--- a/debian/cloud-agent.install
+++ /dev/null
@@ -1,25 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-/etc/cloud/agent/agent.properties
-/etc/cloud/agent/developer.properties.template
-/etc/cloud/agent/environment.properties
-/etc/cloud/agent/log4j-cloud.xml
-/etc/init.d/cloud-agent
-/usr/bin/cloud-setup-agent
-/usr/bin/cloud-ssh
-/var/log/cloud/agent

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-agent.postinst
----------------------------------------------------------------------
diff --git a/debian/cloud-agent.postinst b/debian/cloud-agent.postinst
deleted file mode 100644
index f022f6d..0000000
--- a/debian/cloud-agent.postinst
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh -e
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-case "$1" in
-    configure)
-
-	for i in /var/log/cloud/agent
-	do
-		chmod 0770 $i
-	done
-	
-	if [ "$2" = "" ] ; then # no recently configured version, this is a first install
-		/usr/sbin/update-rc.d cloud-agent defaults || true
-	fi
-	
-    ;;
-esac
-
-#DEBHELPER#

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-cli.config
----------------------------------------------------------------------
diff --git a/debian/cloud-cli.config b/debian/cloud-cli.config
deleted file mode 100644
index 00ae6c0..0000000
--- a/debian/cloud-cli.config
+++ /dev/null
@@ -1,17 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-cli.install
----------------------------------------------------------------------
diff --git a/debian/cloud-cli.install b/debian/cloud-cli.install
deleted file mode 100644
index ce17846..0000000
--- a/debian/cloud-cli.install
+++ /dev/null
@@ -1,21 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-/etc/cloud/cli/commands.xml
-/usr/bin/cloud-grab-dependent-library-versions
-/usr/bin/cloud-tool
-/usr/bin/cloudvoladm

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-client-ui.install
----------------------------------------------------------------------
diff --git a/debian/cloud-client-ui.install b/debian/cloud-client-ui.install
deleted file mode 100644
index ba1408a..0000000
--- a/debian/cloud-client-ui.install
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-/usr/share/cloud/management/webapps/client/*
-

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-client.config
----------------------------------------------------------------------
diff --git a/debian/cloud-client.config b/debian/cloud-client.config
deleted file mode 100644
index 00ae6c0..0000000
--- a/debian/cloud-client.config
+++ /dev/null
@@ -1,17 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-client.install
----------------------------------------------------------------------
diff --git a/debian/cloud-client.install b/debian/cloud-client.install
deleted file mode 100644
index aadb145..0000000
--- a/debian/cloud-client.install
+++ /dev/null
@@ -1,58 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-/etc/cloud/management/catalina.policy
-/etc/cloud/management/catalina.properties
-/etc/cloud/management/commands.properties
-/etc/cloud/management/components.xml
-/etc/cloud/management/context.xml
-/etc/cloud/management/db.properties
-/etc/cloud/management/environment.properties
-/etc/cloud/management/ehcache.xml
-/etc/cloud/management/log4j-cloud.xml
-/etc/cloud/management/logging.properties
-/etc/cloud/management/server.xml
-/etc/cloud/management/tomcat6.conf
-/etc/cloud/management/classpath.conf
-/etc/cloud/management/tomcat-users.xml
-/etc/cloud/management/web.xml
-/etc/cloud/management/server-nonssl.xml
-/etc/cloud/management/tomcat6-nonssl.conf
-/etc/cloud/management/virtualrouter_commands.properties
-/etc/cloud/management/f5bigip_commands.properties
-/etc/cloud/management/junipersrx_commands.properties
-/etc/cloud/management/netscalerloadbalancer_commands.properties
-/etc/cloud/management/cisconexusvsm_commands.properties
-/etc/cloud/management/Catalina
-/etc/cloud/management/Catalina/localhost
-/etc/cloud/management/Catalina/localhost/client
-/etc/init.d/cloud-management
-/usr/share/cloud/management/bin
-/usr/share/cloud/management/conf
-/usr/share/cloud/management/lib
-/usr/share/cloud/management/logs
-/usr/share/cloud/management/temp
-/usr/share/cloud/management/work
-/var/cache/cloud/management
-/var/cache/cloud/management/work
-/var/cache/cloud/management/temp
-/var/log/cloud/management
-/var/lib/cloud/mnt
-/var/lib/cloud/management
-/usr/bin/cloud-setup-management
-/usr/bin/cloud-update-xenserver-licenses
-/etc/cloud/management/commands-ext.properties

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-client.postinst
----------------------------------------------------------------------
diff --git a/debian/cloud-client.postinst b/debian/cloud-client.postinst
deleted file mode 100644
index 87c7610..0000000
--- a/debian/cloud-client.postinst
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/sh -e
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-case "$1" in
-    configure)
-        if ! id cloud > /dev/null 2>&1 ; then
-            adduser --system --home /var/lib/cloud/management --no-create-home \
-                --group --disabled-password --shell /bin/sh cloud
-                # update me in all the .postinst that you can find me in, as well
-        fi
-
-	for i in /var/lib/cloud/mnt /var/cache/cloud/management \
-	  /var/cache/cloud/management/work /var/cache/cloud/management/temp \
-	  /var/log/cloud/management /etc/cloud/management/Catalina \
-	  /etc/cloud/management/Catalina/localhost /var/lib/cloud/management /etc/cloud/management/Catalina/localhost/client
-	do
-		chmod 0770 $i
-		chgrp cloud $i
-	done
-
-	for i in /etc/cloud/management/db.properties
-	do
-		chmod 0640 $i
-		chgrp cloud $i
-	done
-	
-	if [ "$2" = "" ] ; then # no recently configured version, this is a first install
-		/usr/sbin/update-rc.d cloud-management defaults || true
-	fi
-	
-    ;;
-esac
-
-#DEBHELPER#

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-core.install
----------------------------------------------------------------------
diff --git a/debian/cloud-core.install b/debian/cloud-core.install
deleted file mode 100644
index 00a43d4..0000000
--- a/debian/cloud-core.install
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-/usr/share/java/cloud-core.jar
-

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-deps.install
----------------------------------------------------------------------
diff --git a/debian/cloud-deps.install b/debian/cloud-deps.install
deleted file mode 100644
index 74aade1..0000000
--- a/debian/cloud-deps.install
+++ /dev/null
@@ -1,34 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-/usr/share/java/ehcache-1.5.0.jar
-/usr/share/java/mail-1.4.jar
-/usr/share/java/httpcore-4.0.jar
-/usr/share/java/log4j-*.jar
-/usr/share/java/apache-log4j-extras-1.1.jar
-/usr/share/java/trilead-ssh2-build213-svnkit-1.3-patch.jar
-/usr/share/java/xmlrpc-common-3.*.jar
-/usr/share/java/xmlrpc-client-3.*.jar
-/usr/share/java/jstl-1.2.jar
-/usr/share/java/axis2-1.5.1.jar
-/usr/share/java/wsdl4j-1.6.2.jar
-/usr/share/java/bcprov-*.jar
-/usr/share/java/jasypt-1.*.jar
-/usr/share/java/ejb-api-3.0.jar
-/usr/share/java/javax.persistence-2.0.0.jar
-/usr/share/java/gson-1.7.1.jar
-/usr/share/java/xapi-5.6.100-1-SNAPSHOT.jar

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-management.config
----------------------------------------------------------------------
diff --git a/debian/cloud-management.config b/debian/cloud-management.config
deleted file mode 100644
index 00ae6c0..0000000
--- a/debian/cloud-management.config
+++ /dev/null
@@ -1,17 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-python.install
----------------------------------------------------------------------
diff --git a/debian/cloud-python.install b/debian/cloud-python.install
deleted file mode 100644
index b8eac72..0000000
--- a/debian/cloud-python.install
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-/usr/lib/python*/dist-packages/cloud*

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-scripts.install
----------------------------------------------------------------------
diff --git a/debian/cloud-scripts.install b/debian/cloud-scripts.install
deleted file mode 100644
index 5e8896d..0000000
--- a/debian/cloud-scripts.install
+++ /dev/null
@@ -1,27 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-/usr/lib/cloud/common/scripts/installer/*
-/usr/lib/cloud/common/scripts/network/*
-/usr/lib/cloud/common/scripts/storage/*
-/usr/lib/cloud/common/scripts/util/*
-/usr/lib/cloud/common/scripts/vm/network/*
-/usr/lib/cloud/common/scripts/vm/systemvm/*
-/usr/lib/cloud/common/scripts/vm/pingtest.sh
-/usr/lib/cloud/common/scripts/vm/hypervisor/kvm/*
-/usr/lib/cloud/common/scripts/vm/hypervisor/versions.sh
-/usr/lib/cloud/common/scripts/vm/hypervisor/xenserver/*

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-server.install
----------------------------------------------------------------------
diff --git a/debian/cloud-server.install b/debian/cloud-server.install
deleted file mode 100644
index f792cc2..0000000
--- a/debian/cloud-server.install
+++ /dev/null
@@ -1,32 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-/usr/share/java/cloud-server.jar
-/usr/share/java/cloud-ovm.jar
-/etc/cloud/server/*
-/usr/share/java/cloud-dp-user-concentrated-pod.jar
-/usr/share/java/cloud-dp-user-dispersing.jar
-/usr/share/java/cloud-host-allocator-random.jar
-/usr/share/java/cloud-plugin-elb.jar
-/usr/share/java/cloud-plugin-ovs.jar
-/usr/share/java/cloud-plugin-nicira-nvp.jar
-/usr/share/java/cloud-plugin-bigswitch-vns.jar
-/usr/share/java/cloud-storage-allocator-random.jar
-/usr/share/java/cloud-user-authenticator-ldap.jar
-/usr/share/java/cloud-user-authenticator-md5.jar
-/usr/share/java/cloud-user-authenticator-plaintext.jar
-/usr/share/java/cloud-plugin-hypervisor-xen.jar

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-setup.install
----------------------------------------------------------------------
diff --git a/debian/cloud-setup.install b/debian/cloud-setup.install
deleted file mode 100644
index 5c37c64..0000000
--- a/debian/cloud-setup.install
+++ /dev/null
@@ -1,25 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-/usr/bin/cloud-setup-databases
-/usr/bin/cloud-migrate-databases
-/usr/bin/cloud-set-guest-password
-/usr/bin/cloud-set-guest-sshkey
-/usr/share/cloud/setup/*.sql
-/usr/share/cloud/setup/*.sh
-/usr/share/cloud/setup/server-setup.xml
-/usr/share/cloud/setup/db/*.sql

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-system-iso.install
----------------------------------------------------------------------
diff --git a/debian/cloud-system-iso.install b/debian/cloud-system-iso.install
deleted file mode 100644
index 5a0b636..0000000
--- a/debian/cloud-system-iso.install
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-/usr/lib/cloud/common/vms/systemvm.iso

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-usage.install
----------------------------------------------------------------------
diff --git a/debian/cloud-usage.install b/debian/cloud-usage.install
deleted file mode 100644
index 22f5834..0000000
--- a/debian/cloud-usage.install
+++ /dev/null
@@ -1,23 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-/usr/share/java/cloud-usage.jar
-/etc/init.d/cloud-usage
-/var/log/cloud/usage
-/etc/cloud/usage/usage-components.xml
-/etc/cloud/usage/log4j-cloud_usage.xml
-/etc/cloud/usage/db.properties

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-usage.postinst
----------------------------------------------------------------------
diff --git a/debian/cloud-usage.postinst b/debian/cloud-usage.postinst
deleted file mode 100644
index 56f895d..0000000
--- a/debian/cloud-usage.postinst
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/sh -e
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-case "$1" in
-    configure)
-
-        if ! id cloud > /dev/null 2>&1 ; then
-            adduser --system --home /var/lib/cloud/management --no-create-home \
-                --group --disabled-password --shell /bin/sh cloud
-                # update me in cloud-client.postinst as well
-        fi
-
-	for i in /var/log/cloud/usage
-	do
-		chmod 0770 $i
-		chgrp cloud $i
-	done
-	
-	for i in /etc/cloud/usage/db.properties
-	do
-		chmod 0640 $i
-		chgrp cloud $i
-	done
-	
-	if [ "$2" = "" ] ; then # no recently configured version, this is a first install
-		/usr/sbin/update-rc.d cloud-usage defaults || true
-	fi
-	
-    ;;
-esac
-
-#DEBHELPER#

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloud-utils.install
----------------------------------------------------------------------
diff --git a/debian/cloud-utils.install b/debian/cloud-utils.install
deleted file mode 100644
index 39c357a..0000000
--- a/debian/cloud-utils.install
+++ /dev/null
@@ -1,22 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-/usr/share/java/cloud-utils.jar
-/usr/share/java/cloud-api.jar
-/usr/share/doc/cloud/version-info
-/usr/bin/cloud-sccs
-/usr/bin/cloud-gitrevs

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloudstack-agent.install
----------------------------------------------------------------------
diff --git a/debian/cloudstack-agent.install b/debian/cloudstack-agent.install
new file mode 100644
index 0000000..84eee10
--- /dev/null
+++ b/debian/cloudstack-agent.install
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# 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
+/usr/bin/cloud-setup-agent
+/usr/bin/cloud-ssh
+/var/log/cloudstack/agent
+/usr/share/cloudstack-agent/lib/cloudstack-agent-kvm.jar

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloudstack-awsapi.install
----------------------------------------------------------------------
diff --git a/debian/cloudstack-awsapi.install b/debian/cloudstack-awsapi.install
new file mode 100644
index 0000000..02ba668
--- /dev/null
+++ b/debian/cloudstack-awsapi.install
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+/var/log/cloudstack/awsapi
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloudstack-cli.install
----------------------------------------------------------------------
diff --git a/debian/cloudstack-cli.install b/debian/cloudstack-cli.install
new file mode 100644
index 0000000..287f9b1
--- /dev/null
+++ b/debian/cloudstack-cli.install
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloudstack-common.install
----------------------------------------------------------------------
diff --git a/debian/cloudstack-common.install b/debian/cloudstack-common.install
new file mode 100644
index 0000000..de97ee9
--- /dev/null
+++ b/debian/cloudstack-common.install
@@ -0,0 +1,33 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# 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/*
+/usr/share/cloudstack-common/scripts/storage/*
+/usr/share/cloudstack-common/scripts/util/*
+/usr/share/cloudstack-common/scripts/vm/network/*
+/usr/share/cloudstack-common/scripts/vm/systemvm/*
+/usr/share/cloudstack-common/scripts/vm/pingtest.sh
+/usr/share/cloudstack-common/scripts/vm/hypervisor/kvm/*
+/usr/share/cloudstack-common/scripts/vm/hypervisor/versions.sh
+/usr/share/cloudstack-common/scripts/vm/hypervisor/xenserver/*
+/usr/bin/cloud-set-guest-password
+/usr/bin/cloud-set-guest-sshkey
+/usr/lib/python2.?/*-packages/*

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloudstack-docs.install
----------------------------------------------------------------------
diff --git a/debian/cloudstack-docs.install b/debian/cloudstack-docs.install
new file mode 100644
index 0000000..287f9b1
--- /dev/null
+++ b/debian/cloudstack-docs.install
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloudstack-management.install
----------------------------------------------------------------------
diff --git a/debian/cloudstack-management.install b/debian/cloudstack-management.install
new file mode 100644
index 0000000..e87b444
--- /dev/null
+++ b/debian/cloudstack-management.install
@@ -0,0 +1,31 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+/etc/cloud/server/*
+/etc/cloud/management/*
+/etc/init.d/cloud-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
+/usr/bin/cloud-update-xenserver-licenses
+/usr/bin/cloud-setup-management
+/usr/bin/cloud-setup-databases
+/usr/bin/cloud-migrate-databases
+/usr/share/cloudstack-management/*

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloudstack-management.postinst
----------------------------------------------------------------------
diff --git a/debian/cloudstack-management.postinst b/debian/cloudstack-management.postinst
new file mode 100644
index 0000000..6fe0145
--- /dev/null
+++ b/debian/cloudstack-management.postinst
@@ -0,0 +1,26 @@
+#!/bin/sh -e
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+if [ "$1" = configure ]; then
+    if ! getent passwd cloud >/dev/null; then
+        adduser --quiet --system --group --no-create-home --home /usr/share/cloudstack-manager cloud
+    fi
+    chown cloud /var/log/cloudstack/management
+fi
+
+#DEBHELPER#

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/cloudstack-usage.install
----------------------------------------------------------------------
diff --git a/debian/cloudstack-usage.install b/debian/cloudstack-usage.install
new file mode 100644
index 0000000..2696c20
--- /dev/null
+++ b/debian/cloudstack-usage.install
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+/usr/share/cloudstack-usage/lib/cloudstack-usage.jar
+/etc/init.d/cloud-usage
+/var/log/cloudstack/usage
+/etc/cloud/usage/*

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/control
----------------------------------------------------------------------
diff --git a/debian/control b/debian/control
index e9697ea..659084c 100644
--- a/debian/control
+++ b/debian/control
@@ -1,118 +1,51 @@
-Source: cloud
+Source: cloudstack
 Section: libs
 Priority: extra
 Maintainer: Wido den Hollander <wido@widodh.nl>
-Build-Depends: debhelper (>= 7), openjdk-6-jdk, tomcat6, libws-commons-util-java, libcommons-codec-java (>= 1.5), libcommons-httpclient-java (>= 3.1), libservlet2.5-java, genisoimage, python-mysqldb, maven3 | maven (>= 3), liblog4j1.2-java (>= 1.2.16)
+Build-Depends: debhelper (>= 7), openjdk-6-jdk, tomcat6, genisoimage,
+ python-mysqldb, maven3 | maven (>= 3), python (>= 2.6.6-3~)
 Standards-Version: 3.8.1
 Homepage: http://www.cloudstack.org/
 
-Package: cloud-deps
-Architecture: any
-Depends: openjdk-6-jre, libcommons-codec-java (>= 1.5), libcommons-httpclient-java (>= 3.1)
-Description: CloudStack library dependencies
- This package contains a number of third-party dependencies
- not shipped by distributions, required to run the CloudStack
- Management Server.
+Package: cloudstack-common
+Architecture: all
+Depends: bash, genisoimage
+Conflicts: cloud-scripts, cloud-utils, cloud-system-iso, cloud-console-proxy, cloud-daemonize, cloud-deps, cloud-python, cloud-setup
+Description: A common package which contains files which are shared by several CloudStack packages
 
-Package: cloud-agent-deps
-Architecture: any
-Depends: openjdk-6-jre, cloud-deps (= ${source:Version})
-Description: CloudStack agent library dependencies
- This package contains a number of third-party dependencies
- not shipped by distributions, required to run the CloudStack
- Agent.
-
-Package: cloud-utils
-Architecture: any
-Depends: openjdk-6-jre, python, libcglib-java (>= 2.2.2), libjsch-java (>= 0.1.42), libbackport-util-concurrent-java (>= 3.1), libcommons-dbcp-java (>= 1.4), libcommons-pool-java (>= 1.5.6)
-Description: CloudStack utility library
- The CloudStack utility libraries provide a set of Java classes used
- in the CloudStack environment.
-
-Package: cloud-client-ui
-Architecture: any
-Depends: openjdk-6-jre, cloud-client (= ${source:Version})
-Description: CloudStack management server UI
- The CloudStack management server is the central point of coordination,
- management, and intelligence in the CloudStack Cloud Stack.  This package
- is a requirement of the cloud-client package, which installs the
- CloudStack management server.
-
-Package: cloud-server
-Architecture: any
-Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-deps (= ${source:Version}), cloud-scripts (= ${source:Version}), libservlet2.5-java
+Package: cloudstack-management
+Architecture: all
+Depends: cloudstack-common (= ${source:Version}), tomcat6, sysvinit-utils, chkconfig, sudo, jsvc, python-mysqldb, python-paramiko, augeas-tools
+Conflicts: cloud-server, cloud-client, cloud-client-ui
 Description: CloudStack server library
- The CloudStack server libraries provide a set of Java classes used
- in the CloudStack management server.
-
-Package: cloud-scripts
-Replaces: cloud-agent-scripts
-Architecture: any
-Depends: openjdk-6-jre, python, bash, bzip2, gzip, unzip, nfs-common, openssh-client, lsb-release
-Description: CloudStack scripts
- This package contains a number of scripts needed for the CloudStack Agent and Management Server.
- Both the CloudStack Agent and Management server depend on this package
-
-Package: cloud-core
-Architecture: any
-Depends: openjdk-6-jre, cloud-utils (= ${source:Version})
-Description: CloudStack core library
- The CloudStack core libraries provide a set of Java classes used
- in the CloudStack Cloud Stack.
-
-
-Package: cloud-client
-Architecture: any
-Depends: openjdk-6-jre, cloud-deps (= ${source:Version}), cloud-utils (= ${source:Version}), cloud-server (= ${source:Version}), cloud-client-ui (= ${source:Version}), cloud-setup (= ${source:Version}), cloud-python (= ${source:Version}), tomcat6, libws-commons-util-java, sysvinit-utils, chkconfig, sudo, jsvc, python-mysqldb, python-paramiko, augeas-tools, genisoimage, cloud-system-iso, libmysql-java (>= 5.1)
-Description: CloudStack client
- The CloudStack management server is the central point of coordination,
- management, and intelligence in the CloudStack Cloud Stack.  This package
- is required for the management server to work.
-
-Package: cloud-setup
-Architecture: any
-Depends: openjdk-6-jre, python, cloud-utils (= ${source:Version}), cloud-deps (= ${source:Version}), cloud-server (= ${source:Version}), cloud-python (= ${source:Version}), python-mysqldb
-Description: CloudStack client
- The CloudStack setup tools let you set up your Management Server and Usage Server.
+ The CloudStack management server
 
-Package: cloud-python
-Architecture: any
-Depends: python
-Description: CloudStack Python library
- The CloudStack Python library contains a few Python modules that the
- CloudStack uses.
-
-Package: cloud-agent-libs
-Architecture: any
-Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-agent-deps (= ${source:Version})
-Description: CloudStack agent libraries
- The CloudStack agent libraries are used by the Cloud Agent.
-
-Package: cloud-agent
-Architecture: any
-Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-agent-deps (= ${source:Version}), cloud-python (= ${source:Version}), cloud-agent-libs (= ${source:Version}), cloud-scripts (= ${source:Version}), cloud-system-iso (= ${source:Version}), libvirt0, sysvinit-utils, chkconfig, qemu-kvm, libvirt-bin, uuid-runtime, rsync, grep, iproute, ebtables, vlan, liblog4j1.2-java (>= 1.2.16), libjna-java, wget, jsvc, lsb-base (>= 3.2)
+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
+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
  a CloudStack powered cloud.  Install this package if this computer
  will participate in your cloud as a KVM HyperVisor.
 
-Package: cloud-system-iso
-Architecture: any
-Description: CloudStack system iso
- The CloudStack agent is in charge of managing shared computing resources in
- a CloudStack powered cloud.  Install this package if this computer
- will participate in your cloud.
-
-Package: cloud-usage
-Architecture: any
-Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-deps (= ${source:Version}), cloud-server (= ${source:Version}), cloud-setup (= ${source:Version}), cloud-client (= ${source:Version}), jsvc
+Package: cloudstack-usage
+Architecture: all
+Depends: openjdk-6-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.
 
-Package: cloud-cli
-Provides: cloud-cli
-Architecture: any
-Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-deps (= ${source:Version}), cloud-server (= ${source:Version}), cloud-setup (= ${source:Version}), cloud-client (= ${source:Version})
-Description: CloudStack commandline tool
- The CloudStack commandline tool for invoking APi
+Package: cloudstack-awsapi
+Architecture: all
+Depends: cloudstack-common (= ${source:Version}), cloudstack-management (= ${source:Version})
+Description: CloudStack Amazon EC2 API
+
+Package: cloudstack-cli
+Architecture: all
+Depends: cloudstack-common (= ${source:Version})
+Description: The CloudStack CLI called CloudMonkey
+
+Package: cloudstack-docs
+Architecture: all
+Description: The CloudStack documentation

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/debian/rules
----------------------------------------------------------------------
diff --git a/debian/rules b/debian/rules
index 69fba7a..d537d86 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,6 +10,9 @@
 # Modified to make a template file for a multi-binary package with separated
 # build-arch and build-indep targets  by Bill Allombert 2001
 
+DEBVERS := $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p')
+VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/^[[:digit:]]*://' -e 's/[~-].*//')
+
 # Uncomment this to turn on verbose mode.
 export DH_VERBOSE=1
 
@@ -19,55 +22,118 @@ export DH_OPTIONS
 configure: configure-stamp
 configure-stamp:
 	dh_testdir
-	cp packaging/debian/replace.properties build/replace.properties
-	echo VERSION=$VERSION >> build/replace.properties
+	cp packaging/debian/replace.properties replace.properties.tmp
+	echo VERSION=${VERSION} >> replace.properties.tmp
 	touch configure-stamp
 
-build: build-arch
+build: build-indep
+
+build-indep: build-indep-stamp
 
-build-arch: build-arch-stamp
-build-arch-stamp: configure-stamp  
-	mvn package -Dsystemvm
+build-indep-stamp: configure
+	mvn package -DskipTests -Dsystemvm \
+        -Dcs.replace.properties=replace.properties.tmp
 	touch $@
 
 clean: 
 	dh_testdir
 	dh_testroot
 	rm -f build-arch-stamp build-indep-stamp configure-stamp
+	rm -f replace.properties.tmp
 	dh_clean 
 
 install:
 	dh_testdir
 	dh_testroot
 	dh_prep -s
-	mkdir -p debian/tmp/usr/bin
-	mkdir -p debian/tmp/usr/share/cloud/management
-	mkdir -p debian/tmp/var/log/cloud
-	mkdir debian/tmp/var/log/cloud/managament
-	mkdir debian/tmp/var/log/cloud/awsapi
-	mkdir debian/tmp/var/log/cloud/agent
-	mkdir debian/tmp/var/log/cloud/ipallocator
-	mkdir debian/tmp/var/log/cloud/usage
+
+	# 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
+
+	# 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
+
+	# 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
+
+	# 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
+
+	# 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
+
+	# cloudstack-usage
 	mkdir debian/tmp/etc/cloud/usage
-	mkdir -p debian/tmp/var/cache/cloud
-	mkdir debian/tmp/var/cache/cloud/management
-	mkdir -p debian/tmp/usr/share/cloud
-	mkdir debian/tmp/usr/share/cloud/setup
-	mkdir -p debian/tmp/usr/share/cloud/management/webapps/client
-	
-	cp -r client/target/utilities/scripts/db/* debian/tmp/usr/share/cloud/setup/
-	cp -r client/target/cloud-client-ui-*-SNAPSHOT/* debian/tmp/usr/share/cloud/management/webapps/client/
-	dh_installdirs -s
-	dh_install -s
-
-binary: binary-common
-binary-common:
-	dh_testdir
-	dh_testroot
+	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
+
+	# cloudstack-awsapi
+	mkdir debian/tmp/var/log/cloudstack/awsapi
+
+	dh_installdirs
+	dh_install
+	dh_python2
+
+binary: install
+	dh_install
 	dh_installchangelogs
 	dh_installdocs LICENSE
 	dh_installdocs DISCLAIMER

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/framework/rest/pom.xml
----------------------------------------------------------------------
diff --git a/framework/rest/pom.xml b/framework/rest/pom.xml
index 2a22155..a783bc8 100644
--- a/framework/rest/pom.xml
+++ b/framework/rest/pom.xml
@@ -67,6 +67,10 @@
           <groupId>org.eclipse.jetty</groupId>
           <artifactId>jetty-server</artifactId>
         </exclusion>
+        <exclusion>
+          <groupId>org.apache.geronimo.specs</groupId>
+          <artifactId>geronimo-servlet_3.0_spec</artifactId>
+        </exclusion>
       </exclusions>
     </dependency>
   </dependencies>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/packaging/debian/init/cloud-agent
----------------------------------------------------------------------
diff --git a/packaging/debian/init/cloud-agent b/packaging/debian/init/cloud-agent
new file mode 100755
index 0000000..8b64693
--- /dev/null
+++ b/packaging/debian/init/cloud-agent
@@ -0,0 +1,167 @@
+#!/bin/bash
+
+### BEGIN INIT INFO
+# Provides:          cloud agent
+# Required-Start:    $network $local_fs
+# Required-Stop:     $network $local_fs
+# Default-Start:     3 4 5
+# Default-Stop:      0 1 2 6
+# Short-Description: Start/stop Apache CloudStack Agent
+# Description: This scripts Starts/Stops the Apache CloudStack agent
+##  The CloudStack Agent is a part of the Apache CloudStack project and is used
+##  for managing KVM-based Hypervisors and performing secondary storage tasks inside
+##  the Secondary Storage System Virtual Machine.
+## JSVC (Java daemonizing) is used for starting and stopping the agent
+### END INIT INFO
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+. /lib/lsb/init-functions
+
+SHORTNAME="cloud-agent"
+PIDFILE=/var/run/"$SHORTNAME".pid
+LOCKFILE=/var/lock/subsys/"$SHORTNAME"
+PROGNAME="CloudStack Agent"
+CLASS="com.cloud.agent.AgentShell"
+PROG="jsvc"
+DAEMON="/usr/bin/jsvc"
+SHUTDOWN_WAIT="30"
+
+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"
+
+for jdir in $JDK_DIRS; do
+    if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
+        JAVA_HOME="$jdir"
+    fi
+done
+export JAVA_HOME
+
+# 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"
+
+wait_for_network() {
+    i=1
+    while [ $i -lt 10 ]
+    do
+        # Under Ubuntu and Debian libvirt by default creates a bridge called virbr0.
+        # That's why we want more then 3 lines back from brctl, so that there is a manually created bridge
+        if [ "$(brctl show|wc -l)" -gt 2 ]; then
+            break
+        else
+            sleep 1
+            let i=$i+1
+            continue
+        fi
+    done
+}
+
+start() {
+    if [ -s "$PIDFILE" ] && kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then
+        log_daemon_msg "$PROGNAME apparently already running"
+        log_end_msg 0
+        exit 0
+    fi
+
+    log_daemon_msg "Starting $PROGNAME" "$SHORTNAME"
+    if hostname --fqdn >/dev/null 2>&1 ; then
+        true
+    else
+        log_failure_msg "The host name does not resolve properly to an IP address. Cannot start $PROGNAME"
+        log_end_msg 1
+        exit 1
+    fi
+
+    wait_for_network
+
+    if start_daemon -p $PIDFILE $DAEMON -cp "$CLASSPATH" -pidfile "$PIDFILE" -errfile SYSLOG -D jna.nosys=true $CLASS
+        RETVAL=$?
+    then
+        rc=0
+        sleep 1
+        if ! kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then
+            log_failure_msg "$PROG failed to start"
+            rc=1
+        fi
+    else
+        rc=1
+    fi
+
+    if [ $rc -eq 0 ]; then
+        log_end_msg 0
+    else
+        log_end_msg 1
+        rm -f "$PIDFILE"
+    fi
+}
+
+stop() {
+    count="0"
+
+    log_daemon_msg "Stopping $PROGNAME" "$SHORTNAME"
+    killproc -p $PIDFILE $DAEMON
+
+    until [ "$count" -gt "$SHUTDOWN_WAIT" ]
+    do
+        agentPid=$(ps aux|grep [j]svc|grep $SHORTNAME)
+        if [ "$?" -gt "0" ];then
+            break
+        fi
+        sleep 1
+        let count="${count}+1"
+    done
+
+    agentPid=$(ps aux|grep [j]svc|grep $SHORTNAME)
+    if [ "$?" -eq "0" ]; then
+        agentPid=$(ps aux|grep [j]svc|awk '{print $2}')
+        if [ "$agentPid" != "" ]; then
+            log_warning_msg "$PROG still running, forcing kill"
+            kill -9 $agentPid
+        fi
+    fi
+
+    log_end_msg $?
+    rm -f "$PIDFILE"
+}
+
+case "$1" in
+    start)
+        start
+        ;;
+    stop)
+        stop
+        ;;
+    status)
+        status_of_proc -p "$PIDFILE" "$PROG" "$SHORTNAME"
+        RETVAL=$?
+        ;;
+    restart | force-reload)
+        stop
+        sleep 3
+        start
+        ;;
+    *)
+    echo "Usage: $0 {start|stop|restart|force-reload|status}"
+    RETVAL=3
+esac
+
+exit $RETVAL

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/packaging/debian/init/cloud-management
----------------------------------------------------------------------
diff --git a/packaging/debian/init/cloud-management b/packaging/debian/init/cloud-management
new file mode 100755
index 0000000..490bf1e
--- /dev/null
+++ b/packaging/debian/init/cloud-management
@@ -0,0 +1,244 @@
+#!/bin/sh
+#
+# /etc/init.d/tomcat6 -- startup script for the Tomcat 6 servlet engine
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+### BEGIN INIT INFO
+# Provides:          tomcat-vmops
+# Required-Start:    $local_fs $remote_fs $network
+# Required-Stop:     $local_fs $remote_fs $network
+# Should-Start:      $named
+# Should-Stop:       $named
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Start Tomcat (CloudStack).
+# Description:       Start the Tomcat servlet engine that runs the CloudStack Management Server.
+### END INIT INFO
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+NAME=cloud-management
+DESC="CloudStack-specific Tomcat servlet engine"
+DAEMON=/usr/bin/jsvc
+CATALINA_HOME=/usr/share/cloud/management
+DEFAULT=/etc/cloud/management/tomcat6.conf
+JVM_TMP=/tmp/$NAME-temp
+
+# We have to explicitly set the HOME variable to the homedir from the user "cloud"
+# This is because various scripts run by the management server read the HOME variable
+# and fail when this init script is run manually.
+HOME=$(echo ~cloud)
+
+if [ `id -u` -ne 0 ]; then
+	echo "You need root privileges to run this script"
+	exit 1
+fi
+ 
+# Make sure tomcat is started with system locale
+if [ -r /etc/default/locale ]; then
+	. /etc/default/locale
+	export LANG
+fi
+
+. /lib/lsb/init-functions
+. /etc/default/rcS
+
+
+# The following variables can be overwritten in $DEFAULT
+
+# Run Tomcat 6 as this user ID
+TOMCAT6_USER=tomcat6
+
+# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not
+# defined in $DEFAULT)
+JDK_DIRS="/usr/lib/jvm/java-1.6.0-openjdk-amd64/ /usr/lib/jvm/java-1.6.0-openjdk-i386/ /usr/lib/jvm/java-1.6.0-openjdk/ /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun"
+
+# Look for the right JVM to use
+for jdir in $JDK_DIRS; do
+    if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
+	JAVA_HOME="$jdir"
+    fi
+done
+export JAVA_HOME
+
+# Directory for per-instance configuration files and webapps
+CATALINA_BASE=/usr/share/cloud/management
+
+# Use the Java security manager? (yes/no)
+TOMCAT6_SECURITY=no
+
+# Default Java options
+# Set java.awt.headless=true if JAVA_OPTS is not set so the
+# Xalan XSL transformer can work without X11 display on JDK 1.4+
+# It also looks like the default heap size of 64M is not enough for most cases
+# so the maximum heap size is set to 128M
+if [ -z "$JAVA_OPTS" ]; then
+	JAVA_OPTS="-Djava.awt.headless=true -Xmx128M"
+fi
+
+# End of variables that can be overwritten in $DEFAULT
+
+# overwrite settings from default file
+if [ -f "$DEFAULT" ]; then
+	. "$DEFAULT"
+fi
+
+if [ ! -f "$CATALINA_HOME/bin/bootstrap.jar" ]; then
+	log_failure_msg "$NAME is not installed"
+	exit 1
+fi
+
+[ -f "$DAEMON" ] || exit 0
+
+POLICY_CACHE="$CATALINA_BASE/work/catalina.policy"
+
+JAVA_OPTS="$JAVA_OPTS -Djava.endorsed.dirs=$CATALINA_HOME/endorsed -Dcatalina.base=$CATALINA_BASE -Dcatalina.home=$CATALINA_HOME -Djava.io.tmpdir=$JVM_TMP"
+
+# Set the JSP compiler if set in the tomcat6.default file
+if [ -n "$JSP_COMPILER" ]; then
+	JAVA_OPTS="$JAVA_OPTS -Dbuild.compiler=$JSP_COMPILER"
+fi
+
+if [ "$TOMCAT6_SECURITY" = "yes" ]; then
+	JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$POLICY_CACHE"
+fi
+
+# Set juli LogManager if logging.properties is provided
+if [ -r "$CATALINA_BASE"/conf/logging.properties ]; then
+  JAVA_OPTS="$JAVA_OPTS "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" "-Djava.util.logging.config.file="$CATALINA_BASE/conf/logging.properties"
+fi
+
+# Define other required variables
+CATALINA_PID="/var/run/$NAME.pid"
+BOOTSTRAP_CLASS=org.apache.catalina.startup.Bootstrap
+JSVC_CLASSPATH="/usr/share/java/commons-daemon.jar:$CATALINA_HOME/bin/bootstrap.jar"
+JSVC_CLASSPATH=$CLASSPATH:$JSVC_CLASSPATH
+
+# Look for Java Secure Sockets Extension (JSSE) JARs
+if [ -z "${JSSE_HOME}" -a -r "${JAVA_HOME}/jre/lib/jsse.jar" ]; then
+    JSSE_HOME="${JAVA_HOME}/jre/"
+fi
+export JSSE_HOME
+
+case "$1" in
+  start)
+	if [ -z "$JAVA_HOME" ]; then
+		log_failure_msg "no JDK found - please set JAVA_HOME"
+		exit 1
+	fi
+
+	if [ ! -d "$CATALINA_BASE/conf" ]; then
+		log_failure_msg "invalid CATALINA_BASE: $CATALINA_BASE"
+		exit 1
+	fi
+
+	log_daemon_msg "Starting $DESC" "$NAME"
+	if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
+		--user $TOMCAT6_USER --startas "$JAVA_HOME/bin/java" \
+		>/dev/null; then
+
+		# Regenerate POLICY_CACHE file
+		umask 022
+		echo "// AUTO-GENERATED FILE from /etc/tomcat6/policy.d/" \
+			> "$POLICY_CACHE"
+		echo ""  >> "$POLICY_CACHE"
+		if ls $CATALINA_BASE/conf/policy.d/*.policy > /dev/null 2>&1 ; then
+		cat $CATALINA_BASE/conf/policy.d/*.policy \
+			>> "$POLICY_CACHE"
+		fi
+
+		# Remove / recreate JVM_TMP directory
+		rm -rf "$JVM_TMP"
+		mkdir "$JVM_TMP" || {
+			log_failure_msg "could not create JVM temporary directory"
+			exit 1
+		}
+		chown $TOMCAT6_USER "$JVM_TMP"
+		cd "$JVM_TMP"
+
+
+		# fix storage issues on nfs mounts
+		umask 000
+		$DAEMON -user "$TOMCAT6_USER" -cp "$JSVC_CLASSPATH" \
+		    -outfile SYSLOG -errfile SYSLOG \
+		    -pidfile "$CATALINA_PID" $JAVA_OPTS "$BOOTSTRAP_CLASS"
+
+		sleep 5
+        	if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
+			--user $TOMCAT6_USER --startas "$JAVA_HOME/bin/java" \
+			>/dev/null; then
+			log_end_msg 1
+		else
+			log_end_msg 0
+		fi
+	else
+	        log_progress_msg "(already running)"
+		log_end_msg 0
+	fi
+	;;
+  stop)
+	log_daemon_msg "Stopping $DESC" "$NAME"
+        if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
+		--user "$TOMCAT6_USER" --startas "$JAVA_HOME/bin/java" \
+		>/dev/null; then
+		log_progress_msg "(not running)"
+	else
+		$DAEMON -cp "$JSVC_CLASSPATH" -pidfile "$CATALINA_PID" \
+		     -stop "$BOOTSTRAP_CLASS"
+	fi
+	rm -rf "$JVM_TMP"
+	log_end_msg 0
+	;;
+   status)
+        if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
+		--user $TOMCAT6_USER --startas "$JAVA_HOME/bin/java" \
+		>/dev/null; then
+
+		if [ -f "$CATALINA_PID" ]; then
+		    log_success_msg "$DESC is not running, but pid file exists."
+			exit 1
+		else
+		    log_success_msg "$DESC is not running."
+			exit 3
+		fi
+	else
+		log_success_msg "$DESC is running with pid `cat $CATALINA_PID`"
+	fi
+        ;;
+  restart|force-reload)
+        if start-stop-daemon --test --stop --pidfile "$CATALINA_PID" \
+		--user $TOMCAT6_USER --startas "$JAVA_HOME/bin/java" \
+		>/dev/null; then
+		$0 stop
+		sleep 1
+	fi
+	$0 start
+	;;
+  try-restart)
+        if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
+		--user $TOMCAT6_USER --startas "$JAVA_HOME/bin/java" \
+		>/dev/null; then
+		$0 start
+	fi
+        ;;
+  *)
+	log_success_msg "Usage: $0 {start|stop|restart|try-restart|force-reload|status}"
+	exit 1
+	;;
+esac
+
+exit 0

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2f135be1/packaging/debian/init/cloud-usage
----------------------------------------------------------------------
diff --git a/packaging/debian/init/cloud-usage b/packaging/debian/init/cloud-usage
new file mode 100755
index 0000000..6b17ea8
--- /dev/null
+++ b/packaging/debian/init/cloud-usage
@@ -0,0 +1,131 @@
+#!/bin/bash
+
+### BEGIN INIT INFO
+# Provides:          cloud usage
+# Required-Start:    $network $local_fs
+# Required-Stop:     $network $local_fs
+# Default-Start:     3 4 5
+# Default-Stop:      0 1 2 6
+# Short-Description: Start/stop Apache CloudStack Usage Monitor
+# Description: This scripts Starts/Stops the Apache CloudStack Usage Monitor
+##  The CloudStack Usage Monitor is a part of the Apache CloudStack project and is used
+##  for storing usage statistics from instances.
+## JSVC (Java daemonizing) is used for starting and stopping the usage monitor.
+### END INIT INFO
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+. /lib/lsb/init-functions
+
+SHORTNAME="cloud-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"
+
+# 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"
+
+for jdir in $JDK_DIRS; do
+    if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
+        JAVA_HOME="$jdir"
+    fi
+done
+export JAVA_HOME
+
+SCP="@SYSTEMCLASSPATH@"
+DCP="@DEPSCLASSPATH@"
+UCP="@USAGECLASSPATH@"
+JCP="/usr/share/java/commons-daemon.jar"
+
+# We need to append the JSVC daemon JAR to the classpath
+# AgentShell implements the JSVC daemon methods
+export CLASSPATH="$SCP:$DCP:$UCP:$JCP:@USAGESYSCONFDIR@"
+
+start() {
+    if [ -s "$PIDFILE" ] && kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then
+        log_daemon_msg "$PROGNAME apparently already running"
+        log_end_msg 0
+        exit 0
+    fi
+
+    log_daemon_msg "Starting $PROGNAME" "$SHORTNAME"
+    if hostname --fqdn >/dev/null 2>&1 ; then
+        true
+    else
+        log_failure_msg "The host name does not resolve properly to an IP address. Cannot start $PROGNAME"
+        log_end_msg 1
+        exit 1
+    fi
+
+    if start_daemon -p $PIDFILE $DAEMON -cp "$CLASSPATH" -pidfile "$PIDFILE" -user "$USER" -outfile SYSLOG -errfile SYSLOG -Dpid=$$ $CLASS
+        RETVAL=$?
+    then
+        rc=0
+        sleep 1
+        if ! kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then
+            log_failure_msg "$PROG failed to start"
+            rc=1
+        fi
+    else
+        rc=1
+    fi
+
+    if [ $rc -eq 0 ]; then
+        log_end_msg 0
+    else
+        log_end_msg 1
+        rm -f "$PIDFILE"
+    fi
+}
+
+stop() {
+    log_daemon_msg "Stopping $PROGNAME" "$SHORTNAME"
+    killproc -p $PIDFILE $DAEMON
+    log_end_msg $?
+    rm -f "$PIDFILE"
+}
+
+case "$1" in
+    start)
+        start
+        ;;
+    stop)
+        stop
+        ;;
+    status)
+        status_of_proc -p "$PIDFILE" "$PROG" "$SHORTNAME"
+        RETVAL=$?
+        ;;
+    restart | force-reload)
+        stop
+        sleep 3
+        start
+        ;;
+    *)
+    echo "Usage: $0 {start|stop|restart|force-reload|status}"
+    RETVAL=3
+esac
+
+exit $RETVAL


Mime
View raw message