From 0d5739b6e1d2cf7098c7700df17809e84133845b Mon Sep 17 00:00:00 2001 From: Dmitry Burmistrov Date: Tue, 22 Oct 2013 12:34:45 +0400 Subject: [PATCH] Update DEB-specs to 2013.2 version --- debian/changelog | 154 ++++++++++++++++++++++ debian/compat | 1 + debian/control | 183 +++++++++++++++++++++++++++ debian/copyright | 47 +++++++ debian/gbp.conf | 9 ++ debian/heat-api-cfn.init | 87 +++++++++++++ debian/heat-api-cfn.install | 1 + debian/heat-api-cfn.logrotate | 4 + debian/heat-api-cfn.manpages | 1 + debian/heat-api-cfn.postrm | 14 ++ debian/heat-api-cfn.upstart | 8 ++ debian/heat-api-cloudwatch.init | 87 +++++++++++++ debian/heat-api-cloudwatch.install | 1 + debian/heat-api-cloudwatch.logrotate | 4 + debian/heat-api-cloudwatch.manpages | 1 + debian/heat-api-cloudwatch.postrm | 14 ++ debian/heat-api-cloudwatch.upstart | 8 ++ debian/heat-api.init | 87 +++++++++++++ debian/heat-api.install | 1 + debian/heat-api.logrotate | 4 + debian/heat-api.manpages | 1 + debian/heat-api.postrm | 14 ++ debian/heat-api.upstart | 8 ++ debian/heat-common.dirs | 3 + debian/heat-common.install | 5 + debian/heat-common.manpages | 1 + debian/heat-common.postinst | 22 ++++ debian/heat-common.postrm | 15 +++ debian/heat-engine.init | 87 +++++++++++++ debian/heat-engine.install | 1 + debian/heat-engine.logrotate | 4 + debian/heat-engine.manpages | 1 + debian/heat-engine.postinst | 12 ++ debian/heat-engine.postrm | 14 ++ debian/heat-engine.upstart | 8 ++ debian/patches/default-sqlite.patch | 16 +++ debian/patches/series | 1 + debian/python-heat.install | 1 + debian/rules | 29 +++++ debian/source/format | 1 + debian/tests/control | 3 + debian/tests/heat-daemons | 15 +++ debian/tests/python-heat | 14 ++ debian/tests/test_import_heat.py | 4 + debian/watch | 3 + 45 files changed, 999 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/gbp.conf create mode 100644 debian/heat-api-cfn.init create mode 100644 debian/heat-api-cfn.install create mode 100644 debian/heat-api-cfn.logrotate create mode 100644 debian/heat-api-cfn.manpages create mode 100644 debian/heat-api-cfn.postrm create mode 100644 debian/heat-api-cfn.upstart create mode 100644 debian/heat-api-cloudwatch.init create mode 100644 debian/heat-api-cloudwatch.install create mode 100644 debian/heat-api-cloudwatch.logrotate create mode 100644 debian/heat-api-cloudwatch.manpages create mode 100644 debian/heat-api-cloudwatch.postrm create mode 100644 debian/heat-api-cloudwatch.upstart create mode 100644 debian/heat-api.init create mode 100644 debian/heat-api.install create mode 100644 debian/heat-api.logrotate create mode 100644 debian/heat-api.manpages create mode 100644 debian/heat-api.postrm create mode 100644 debian/heat-api.upstart create mode 100644 debian/heat-common.dirs create mode 100644 debian/heat-common.install create mode 100644 debian/heat-common.manpages create mode 100644 debian/heat-common.postinst create mode 100644 debian/heat-common.postrm create mode 100644 debian/heat-engine.init create mode 100644 debian/heat-engine.install create mode 100644 debian/heat-engine.logrotate create mode 100644 debian/heat-engine.manpages create mode 100644 debian/heat-engine.postinst create mode 100644 debian/heat-engine.postrm create mode 100644 debian/heat-engine.upstart create mode 100644 debian/patches/default-sqlite.patch create mode 100644 debian/patches/series create mode 100644 debian/python-heat.install create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/tests/control create mode 100755 debian/tests/heat-daemons create mode 100755 debian/tests/python-heat create mode 100644 debian/tests/test_import_heat.py create mode 100644 debian/watch diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..9fa63433 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,154 @@ +heat (2013.2-0ubuntu1~cloud0) precise-havana; urgency=low + + * New upstream release for the Ubuntu Cloud Archive. + + -- James Page Sun, 13 Oct 2013 11:08:42 +0100 + +heat (2013.2~rc2-0ubuntu1) saucy; urgency=low + + * New upstream release candidate (LP: #1239156). + + -- James Page Sat, 12 Oct 2013 16:53:03 +0100 + +heat (2013.2~rc1-0ubuntu1) saucy; urgency=low + + * New upstream release. + * debian/control: Dropped python-d2to1 build dependency. + + -- Chuck Short Thu, 03 Oct 2013 09:43:04 -0400 + +heat (2013.2~b3-0ubuntu1) saucy; urgency=low + + [ Chuck Short ] + * New upstream release. + * debian/control: Add python-netaddr as build-dep. + * debian/heat-common.install: Remove heat-boto and associated man-page + * debian/heat-common.install: Remove heat-cfn and associated man-page + * debian/heat-common.install: Remove heat-watch and associated man-page + * debian/patches/fix-sqlalchemy-0.8.patch: Dropped + + [ Adam Gandelman ] + * debian/patches/default-kombu.patch: Dropped. + * debian/patches/default-sqlite.patch: Refreshed. + * debian/*.install, rules: Install heat.conf.sample as common + config file in heat-common. Drop other per-package configs, they + are no longer used. + * debian/rules: Clean pbr .egg from build dir if it exists. + + -- Chuck Short Mon, 09 Sep 2013 13:10:26 -0400 + +heat (2013.2~b2.a186.g2b4b248-0ubuntu2) saucy; urgency=low + + * d/rules: Limit test execution concurrency to 1 to avoid test failures + in buildds. + + -- James Page Thu, 08 Aug 2013 15:42:32 +0100 + +heat (2013.2~b2.a186.g2b4b248-0ubuntu1) saucy; urgency=low + + [ Chuck Short ] + * debian/patches/rename-quantumclient.patch: Dropped no longer needed. + * debian/control: Add python-oslo.sphinx + + [ James Page ] + * New upstream snapshot. + * d/watch: Updated to track releases on launchpad. + * d/control: Drop BD in pep8, no longer required. + * d/control,rules: Drop use of openstack-pkg-tools, revert use of xz + compression for debs. + * d/control,*.config,*.templates,po: Drop use of debconf/dbconfig-common + to configure heat. + * d/*.upstart: Add upstart configurations for Ubuntu. + * d/p/default-kombu.patch: Switch default messaging from qpid to + kombu. + * d/p/default-sqlite.patch: Use sqlite as default database option. + * d/control: Add python-ceilometerclient to BD's. + * d/rules: Fail package build for unit test failures. + * d/*.install: Directly install configuration files to /etc/heat. + * d/control: Update VCS locations to ubuntu-server-dev branches. + * d/heat-common.{install,manpages}: Include new binaries and associated + manpages. + + -- James Page Thu, 08 Aug 2013 15:23:59 +0100 + +heat (2013.2~b2-0ubuntu4) saucy; urgency=low + + [ Chuck Short ] + * debian/rules: Enable testsuite during builds. + * debian/patches/fix-sqlalchemy-0.8.patch: Build against sqlalchemy 0.8. + * debian/patches/rename-quantumclient.patch: quantumclient -> neutronclient. + + -- Chuck Short Thu, 08 Aug 2013 01:08:42 +0000 + +heat (2013.2~b2-0ubuntu3) saucy; urgency=low + + * Resynchronize with debian, remaining changes: + - Add sqlite3 to heat-common depends to fix + an autopkgtest failure. + - Add autopkg tests. + - Pass the testsuite if it fails. + + -- Chuck Short Wed, 07 Aug 2013 10:36:33 -0400 + +heat (2013.2~b2-0ubuntu2) saucy; urgency=low + + * debian/control: Add sqlite3 to heat-common depends to fix + an autopkgtest failure. + + -- Chuck Short Tue, 06 Aug 2013 15:36:33 +0000 + +heat (2013.2~b2-0ubuntu1) saucy; urgency=low + + [ Yolanda Robla ] + * debian/tests: added autopkg tests + + [ Chuck Short ] + * New upstream release + * debian/control: + - Add python-pbr to build-depends. + - Add python-d2to to build-depends. + - Dropped python-argparse. + - Add python-six to build-depends. + - Dropped python-sendfile. + - Dropped python-nose. + - Added testrepository. + - Added python-testtools. + * debian/rules: Run testrepository instead of nosetets. + * debian/patches/removes-lxml-version-limitation-from-pip-requires.patch: Dropped + no longer needed. + * debian/patches/fix-package-version-detection-when-building-doc.patch: Dropped + no longer needed. + + -- Chuck Short Mon, 22 Jul 2013 16:22:29 -0400 + +heat (2013.1-4) unstable; urgency=low + + * Fixed the dbsync to the new thing upstream is using (it was crashing the + postinst). + * Fixed the prerm script of heat-engine that was calling dbc_go heat instead + of dbc_go heat-engine. + * Added missing dependency: python-mysqldb. + + -- Thomas Goirand Wed, 22 May 2013 23:57:49 +0800 + +heat (2013.1-3) unstable; urgency=low + + * Added missing dbconfig-common depends (Closes: #709126). Thanks to Andrea + Beckmann for the bug report. + + -- Thomas Goirand Tue, 21 May 2013 12:38:11 +0800 + +heat (2013.1-2) unstable; urgency=low + + * Uploading to unstable. + * Removes the <=2.3.5 from python-lxml requirements. + * Fix package version detection when building docs. + * Cleans doc/build on the clean target. + + -- Thomas Goirand Thu, 16 May 2013 13:15:54 +0000 + +heat (2013.1-1) experimental; urgency=low + + * Initial release (Closes: #695302). + + -- Thomas Goirand Mon, 04 Feb 2013 21:56:59 +0800 diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..ec635144 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..b36544c1 --- /dev/null +++ b/debian/control @@ -0,0 +1,183 @@ +Source: heat +Section: web +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: PKG OpenStack +Uploaders: + Loic Dachary (OuoU) , + Julien Danjou , + Thomas Goirand , + Ghe Rivero , + Mehdi Abaakouk +Build-Depends: + debhelper (>= 9), + python-all (>= 2.6.6-3~), + python-pbr +Build-Depends-Indep: + python-argparse, + python-babel, + python-boto (>= 2.4), + python-ceilometerclient, + python-cinderclient, + python-coverage, + python-crypto, + python-eventlet (>= 0.12.0), + python-extras, + python-glanceclient, + python-greenlet (>= 0.3.2), + python-httplib2, + python-iso8601, + python-keystoneclient (>= 1:0.2.3), + python-kombu, + python-lxml (>= 2.3), + python-memcache, + python-migrate, + python-mox, + python-netaddr, + python-neutronclient (>= 1:2.2.0), + python-nose, + python-nosexcover, + python-novaclient, + python-oslo.config, + python-oslo.sphinx, + python-paramiko, + python-paste, + python-pastedeploy, + python-pycryptopp, + python-qpid, + python-routes, + python-sendfile, + python-setuptools, + python-six, + python-sphinx, + python-sqlalchemy (>= 0.7.8), + python-swiftclient, + python-testrepository (>= 0.0.13), + python-testtools (>= 0.9.29), + python-webob (>= 1.2.3), + python-yaml, + testrepository (>= 0.0.13) +Standards-Version: 3.9.4 +Vcs-Browser: http://bazaar.launchpad.net/~ubuntu-server-dev/heat/havana/files +Vcs-Bzr: https://code.launchpad.net/~ubuntu-server-dev/heat/havana +Homepage: http://wiki.openstack.org/Heat +XS-Testsuite: autopkgtest + +Package: python-heat +Section: python +Architecture: all +Depends: + python-argparse, + python-boto (>= 2.4), + python-cinderclient, + python-crypto, + python-eventlet (>= 0.12.0), + python-extras, + python-glanceclient, + python-greenlet (>= 0.3.2), + python-httplib2, + python-iso8601, + python-keystoneclient (>= 1:0.2.3), + python-kombu, + python-lxml (>= 2.3), + python-memcache, + python-migrate, + python-mysqldb, + python-neutronclient (>= 1:2.2.0), + python-novaclient, + python-oslo.config, + python-paste, + python-pastedeploy, + python-pycryptopp, + python-qpid, + python-routes, + python-sendfile, + python-setuptools, + python-six, + python-sqlalchemy (>= 0.7.8), + python-swiftclient, + python-webob (>= 1.2.3), + python-yaml, + ${misc:Depends}, + ${python:Depends} +Description: OpenStack orchestration service - Python files + Heat is a service to orchestrate multiple composite cloud applications using + templates, through both an OpenStack-native ReST API and a + CloudFormation-compatible Query API. + . + This package contains the Python libraries. + +Package: heat-common +Architecture: all +Depends: + adduser, + python-heat (=${binary:Version}), + ${misc:Depends}, + ${python:Depends} +Description: OpenStack orchestration service - common files + Heat is a service to orchestrate multiple composite cloud applications using + templates, through both an OpenStack-native ReST API and a + CloudFormation-compatible Query API. + . + This package contains the common files. + +Package: heat-engine +Architecture: all +Depends: + adduser, + heat-common (=${binary:Version}), + ${misc:Depends}, + ${ostack-lsb-base}, + ${python:Depends} +Description: OpenStack orchestration service - engine + Heat is a service to orchestrate multiple composite cloud applications using + templates, through both an OpenStack-native ReST API and a + CloudFormation-compatible Query API. + . + This package contains the heat engine, which is the core service of heat, and + which the API servers will use. + +Package: heat-api +Architecture: all +Depends: + adduser, + heat-common (=${binary:Version}), + ${misc:Depends}, + ${ostack-lsb-base}, + ${python:Depends} +Description: OpenStack orchestration service - ReST API + Heat is a service to orchestrate multiple composite cloud applications using + templates, through both an OpenStack-native ReST API and a + CloudFormation-compatible Query API. + . + This package contains the ReST API. + +Package: heat-api-cfn +Architecture: all +Depends: + adduser, + heat-common (=${binary:Version}), + ${misc:Depends}, + ${ostack-lsb-base}, + ${python:Depends} +Description: OpenStack orchestration service - CFN API + Heat is a service to orchestrate multiple composite cloud applications using + templates, through both an OpenStack-native ReST API and a + CloudFormation-compatible Query API. + . + This package contains the CloudFormation (CFN) API. + +Package: heat-api-cloudwatch +Architecture: all +Depends: + adduser, + heat-common (=${binary:Version}), + ${misc:Depends}, + ${ostack-lsb-base}, + ${python:Depends} +Description: OpenStack orchestration service - CloudWatch API + Heat is a service to orchestrate multiple composite cloud applications using + templates, through both an OpenStack-native ReST API and a + CloudFormation-compatible Query API. + . + This package contains the CloudWatch API. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..6e0954ae --- /dev/null +++ b/debian/copyright @@ -0,0 +1,47 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: heat +Upstream-Contact: +Source: https://github.com/openstack/heat + +Files: debian/* +Copyright: 2012 Thomas Goirand +License: Apache-2 + +Files: * +Copyright: Angus Salkeld + Zane Bitter + Steven Hardy + Steven Dake + Jenkins + Chris Alfonso + Tomas Sedovic + Steve Baker + Jeff Peeler + Ian Main + Jenkins + Steve Baker + Andrew Hutchings + Mark McLoughlin + Greg Blomquist + Eoghan Glynn + root + Monty Taylor + Jesse Andrews + Jeremy Stanley +License: Apache-2 + +License: Apache-2 + Licensed 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. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 00000000..61fb874f --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,9 @@ +[DEFAULT] +upstream-branch = master +debian-branch = debian/havana +upstream-tag = %(version)s +compression = xz + +[git-buildpackage] +export-dir = ../build-area/ +#cleaner = true diff --git a/debian/heat-api-cfn.init b/debian/heat-api-cfn.init new file mode 100644 index 00000000..112c78ee --- /dev/null +++ b/debian/heat-api-cfn.init @@ -0,0 +1,87 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: heat-api-cfn +# Required-Start: $network $local_fs $remote_fs $syslog +# Required-Stop: $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Heat CFN API +# Description: Heat CFN API server +### END INIT INFO + +# Author: Thomas Goirand + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="Heat API" +NAME=heat-api-cfn +DAEMON=/usr/bin/heat-api-cfn +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME +SYSTEM_USER=heat + +# Exit if the package is not installed +[ -x $DAEMON ] || exit 0 + +. /lib/lsb/init-functions + +if [ ! -e /var/log/heat ] ; then + mkdir -p /var/log/heat + chown ${SYSTEM_USER} /var/log/heat +fi + +do_start () { + start-stop-daemon --start --background --quiet --chuid ${SYSTEM_USER}:${SYSTEM_USER} --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null || return 1 + start-stop-daemon --start --background --quiet --chuid ${SYSTEM_USER}:${SYSTEM_USER} --make-pidfile --pidfile $PIDFILE --startas $DAEMON || return 2 +} + +do_stop () { + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE + RETVAL="$?" + rm -f $PIDFILE + return "$RETVAL" +} + +case "$1" in + start) + log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) log_end_msg 0 ;; + 2) log_end_msg 1 ;; + esac + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) log_end_msg 0 ;; + 2) log_end_msg 1 ;; + esac + ;; + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac diff --git a/debian/heat-api-cfn.install b/debian/heat-api-cfn.install new file mode 100644 index 00000000..7b207c47 --- /dev/null +++ b/debian/heat-api-cfn.install @@ -0,0 +1 @@ +usr/bin/heat-api-cfn diff --git a/debian/heat-api-cfn.logrotate b/debian/heat-api-cfn.logrotate new file mode 100644 index 00000000..a533079f --- /dev/null +++ b/debian/heat-api-cfn.logrotate @@ -0,0 +1,4 @@ +/var/log/heat/api-cfn.log { + daily + missingok +} diff --git a/debian/heat-api-cfn.manpages b/debian/heat-api-cfn.manpages new file mode 100644 index 00000000..2e0b356e --- /dev/null +++ b/debian/heat-api-cfn.manpages @@ -0,0 +1 @@ +doc/build/man/heat-api-cfn.1 diff --git a/debian/heat-api-cfn.postrm b/debian/heat-api-cfn.postrm new file mode 100644 index 00000000..af1cb591 --- /dev/null +++ b/debian/heat-api-cfn.postrm @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +if [ "${1}" = "purge" ] ; then + rm -f /etc/heat/heat-api-cfn.conf + [ -d /etc/heat ] && rmdir --ignore-fail-on-non-empty /etc/heat + rm -rf /var/log/heat/api-cfn* + [ -d /var/log/heat ] && rmdir --ignore-fail-on-non-empty /var/log/heat +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/heat-api-cfn.upstart b/debian/heat-api-cfn.upstart new file mode 100644 index 00000000..04fa55ea --- /dev/null +++ b/debian/heat-api-cfn.upstart @@ -0,0 +1,8 @@ +# vim: set ft=upstart ts=2 et: +description "Heat API CFN server" +author "James Page " + +start on runlevel [2345] +stop on runlevel [!2345] + +exec start-stop-daemon --start --chuid heat --exec /usr/bin/heat-api-cfn diff --git a/debian/heat-api-cloudwatch.init b/debian/heat-api-cloudwatch.init new file mode 100644 index 00000000..f4f4f3e8 --- /dev/null +++ b/debian/heat-api-cloudwatch.init @@ -0,0 +1,87 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: heat-api-cloudwatch +# Required-Start: $network $local_fs $remote_fs $syslog +# Required-Stop: $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Heat cloudwatch API +# Description: Heat cloudwatch API server +### END INIT INFO + +# Author: Thomas Goirand + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="Heat API" +NAME=heat-api-cloudwatch +DAEMON=/usr/bin/heat-api-cloudwatch +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME +SYSTEM_USER=heat + +# Exit if the package is not installed +[ -x $DAEMON ] || exit 0 + +. /lib/lsb/init-functions + +if [ ! -e /var/log/heat ] ; then + mkdir -p /var/log/heat + chown ${SYSTEM_USER} /var/log/heat +fi + +do_start () { + start-stop-daemon --start --background --quiet --chuid ${SYSTEM_USER}:${SYSTEM_USER} --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null || return 1 + start-stop-daemon --start --background --quiet --chuid ${SYSTEM_USER}:${SYSTEM_USER} --make-pidfile --pidfile $PIDFILE --startas $DAEMON || return 2 +} + +do_stop () { + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE + RETVAL="$?" + rm -f $PIDFILE + return "$RETVAL" +} + +case "$1" in + start) + log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) log_end_msg 0 ;; + 2) log_end_msg 1 ;; + esac + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) log_end_msg 0 ;; + 2) log_end_msg 1 ;; + esac + ;; + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac diff --git a/debian/heat-api-cloudwatch.install b/debian/heat-api-cloudwatch.install new file mode 100644 index 00000000..04ac6110 --- /dev/null +++ b/debian/heat-api-cloudwatch.install @@ -0,0 +1 @@ +/usr/bin/heat-api-cloudwatch diff --git a/debian/heat-api-cloudwatch.logrotate b/debian/heat-api-cloudwatch.logrotate new file mode 100644 index 00000000..b89b06b6 --- /dev/null +++ b/debian/heat-api-cloudwatch.logrotate @@ -0,0 +1,4 @@ +/var/log/heat/api-cloudwatch.log { + daily + missingok +} diff --git a/debian/heat-api-cloudwatch.manpages b/debian/heat-api-cloudwatch.manpages new file mode 100644 index 00000000..6817f5f5 --- /dev/null +++ b/debian/heat-api-cloudwatch.manpages @@ -0,0 +1 @@ +doc/build/man/heat-api-cloudwatch.1 diff --git a/debian/heat-api-cloudwatch.postrm b/debian/heat-api-cloudwatch.postrm new file mode 100644 index 00000000..e2bd0e09 --- /dev/null +++ b/debian/heat-api-cloudwatch.postrm @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +if [ "${1}" = "purge" ] ; then + rm -f /etc/heat/heat-api-cloudwatch.conf + [ -d /etc/heat ] && rmdir --ignore-fail-on-non-empty /etc/heat + rm -rf /var/log/heat/api-cloudwatch* + [ -d /var/log/heat ] && rmdir --ignore-fail-on-non-empty /var/log/heat +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/heat-api-cloudwatch.upstart b/debian/heat-api-cloudwatch.upstart new file mode 100644 index 00000000..7983c9bf --- /dev/null +++ b/debian/heat-api-cloudwatch.upstart @@ -0,0 +1,8 @@ +# vim: set ft=upstart ts=2 et: +description "Heat API Cloudwatch server" +author "James Page " + +start on runlevel [2345] +stop on runlevel [!2345] + +exec start-stop-daemon --start --chuid heat --exec /usr/bin/heat-api-cloudwatch diff --git a/debian/heat-api.init b/debian/heat-api.init new file mode 100644 index 00000000..57d647ec --- /dev/null +++ b/debian/heat-api.init @@ -0,0 +1,87 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: heat-api +# Required-Start: $network $local_fs $remote_fs $syslog +# Required-Stop: $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Heat API +# Description: Heat API server +### END INIT INFO + +# Author: Thomas Goirand + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="Heat API" +NAME=heat-api +DAEMON=/usr/bin/heat-api +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME +SYSTEM_USER=heat + +# Exit if the package is not installed +[ -x $DAEMON ] || exit 0 + +. /lib/lsb/init-functions + +if [ ! -e /var/log/heat ] ; then + mkdir -p /var/log/heat + chown ${SYSTEM_USER} /var/log/heat +fi + +do_start () { + start-stop-daemon --start --background --quiet --chuid ${SYSTEM_USER}:${SYSTEM_USER} --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null || return 1 + start-stop-daemon --start --background --quiet --chuid ${SYSTEM_USER}:${SYSTEM_USER} --make-pidfile --pidfile $PIDFILE --startas $DAEMON || return 2 +} + +do_stop () { + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE + RETVAL="$?" + rm -f $PIDFILE + return "$RETVAL" +} + +case "$1" in + start) + log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) log_end_msg 0 ;; + 2) log_end_msg 1 ;; + esac + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) log_end_msg 0 ;; + 2) log_end_msg 1 ;; + esac + ;; + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac diff --git a/debian/heat-api.install b/debian/heat-api.install new file mode 100644 index 00000000..16eff75f --- /dev/null +++ b/debian/heat-api.install @@ -0,0 +1 @@ +usr/bin/heat-api diff --git a/debian/heat-api.logrotate b/debian/heat-api.logrotate new file mode 100644 index 00000000..2a03cdbb --- /dev/null +++ b/debian/heat-api.logrotate @@ -0,0 +1,4 @@ +/var/log/heat/api.log { + daily + missingok +} diff --git a/debian/heat-api.manpages b/debian/heat-api.manpages new file mode 100644 index 00000000..fff3bf39 --- /dev/null +++ b/debian/heat-api.manpages @@ -0,0 +1 @@ +doc/build/man/heat-api.1 diff --git a/debian/heat-api.postrm b/debian/heat-api.postrm new file mode 100644 index 00000000..de9e1c4a --- /dev/null +++ b/debian/heat-api.postrm @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +if [ "${1}" = "purge" ] ; then + rm -f /etc/heat/heat-api.conf + [ -d /etc/heat ] && rmdir --ignore-fail-on-non-empty /etc/heat + rm -rf /var/log/heat/api.* + [ -d /var/log/heat ] && rmdir --ignore-fail-on-non-empty /var/log/heat +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/heat-api.upstart b/debian/heat-api.upstart new file mode 100644 index 00000000..af5b3221 --- /dev/null +++ b/debian/heat-api.upstart @@ -0,0 +1,8 @@ +# vim: set ft=upstart ts=2 et: +description "Heat API server" +author "James Page " + +start on runlevel [2345] +stop on runlevel [!2345] + +exec start-stop-daemon --start --chuid heat --exec /usr/bin/heat-api diff --git a/debian/heat-common.dirs b/debian/heat-common.dirs new file mode 100644 index 00000000..8d8667e2 --- /dev/null +++ b/debian/heat-common.dirs @@ -0,0 +1,3 @@ +var/log/heat +var/lib/heat +etc/heat diff --git a/debian/heat-common.install b/debian/heat-common.install new file mode 100644 index 00000000..d08df917 --- /dev/null +++ b/debian/heat-common.install @@ -0,0 +1,5 @@ +/usr/bin/heat-manage +/usr/bin/heat-keystone-setup +etc/heat/policy.json +etc/heat/api-paste.ini +etc/heat/heat.conf etc/heat diff --git a/debian/heat-common.manpages b/debian/heat-common.manpages new file mode 100644 index 00000000..1bf51c33 --- /dev/null +++ b/debian/heat-common.manpages @@ -0,0 +1 @@ +doc/build/man/heat-keystone-setup.1 diff --git a/debian/heat-common.postinst b/debian/heat-common.postinst new file mode 100644 index 00000000..4f1baac3 --- /dev/null +++ b/debian/heat-common.postinst @@ -0,0 +1,22 @@ +#!/bin/sh + +set -e + +if [ "$1" = "configure" ] ; then + if ! getenv group heat > /dev/null 2>&1; then + addgroup --system heat >/dev/null + fi + if ! getenv passwd heat > /dev/null 2>&1; then + adduser --system --home /var/lib/heat --ingroup heat --no-create-home \ + --shell /bin/false heat + fi + chown -R heat:adm /var/log/heat + chmod 0750 /var/log/heat + mkdir -p /etc/heat + mkdir -p /var/lib/heat + chown heat:heat -R /var/lib/heat /etc/heat +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/heat-common.postrm b/debian/heat-common.postrm new file mode 100644 index 00000000..f90e6ae1 --- /dev/null +++ b/debian/heat-common.postrm @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +if [ "${1}" = "purge" ] ; then + [ -d /etc/heat ] && rmdir --ignore-fail-on-non-empty /etc/heat + rm -rf /var/log/heat/engine* + [ -d /var/log/heat ] && rmdir --ignore-fail-on-non-empty /var/log/heat + [ -d /var/lib/heat/cache ] && rmdir --ignore-fail-on-non-empty /var/lib/heat/cache + [ -d /var/lib/heat ] && rmdir --ignore-fail-on-non-empty /var/lib/heat +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/heat-engine.init b/debian/heat-engine.init new file mode 100644 index 00000000..ba201d7e --- /dev/null +++ b/debian/heat-engine.init @@ -0,0 +1,87 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: heat-engine +# Required-Start: $network $local_fs $remote_fs $syslog +# Required-Stop: $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Heat Engine +# Description: Heat Engine server +### END INIT INFO + +# Author: Thomas Goirand + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="Heat Engine" +NAME=heat-engine +DAEMON=/usr/bin/heat-engine +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME +SYSTEM_USER=heat + +# Exit if the package is not installed +[ -x $DAEMON ] || exit 0 + +. /lib/lsb/init-functions + +if [ ! -e /var/log/heat ] ; then + mkdir -p /var/log/heat + chown ${SYSTEM_USER} /var/log/heat +fi + +do_start () { + start-stop-daemon --start --background --quiet --chuid ${SYSTEM_USER}:${SYSTEM_USER} --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null || return 1 + start-stop-daemon --start --background --quiet --chuid ${SYSTEM_USER}:${SYSTEM_USER} --make-pidfile --pidfile $PIDFILE --startas $DAEMON || return 2 +} + +do_stop () { + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE + RETVAL="$?" + rm -f $PIDFILE + return "$RETVAL" +} + +case "$1" in + start) + log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) log_end_msg 0 ;; + 2) log_end_msg 1 ;; + esac + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) log_end_msg 0 ;; + 2) log_end_msg 1 ;; + esac + ;; + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac diff --git a/debian/heat-engine.install b/debian/heat-engine.install new file mode 100644 index 00000000..20db4659 --- /dev/null +++ b/debian/heat-engine.install @@ -0,0 +1 @@ +usr/bin/heat-engine diff --git a/debian/heat-engine.logrotate b/debian/heat-engine.logrotate new file mode 100644 index 00000000..eebdeeea --- /dev/null +++ b/debian/heat-engine.logrotate @@ -0,0 +1,4 @@ +/var/log/heat/engine.log { + daily + missingok +} diff --git a/debian/heat-engine.manpages b/debian/heat-engine.manpages new file mode 100644 index 00000000..80485a1f --- /dev/null +++ b/debian/heat-engine.manpages @@ -0,0 +1 @@ +doc/build/man/heat-engine.1 diff --git a/debian/heat-engine.postinst b/debian/heat-engine.postinst new file mode 100644 index 00000000..c3f5de11 --- /dev/null +++ b/debian/heat-engine.postinst @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + + +if [ "$1" = "configure" ] ; then + su -s /bin/sh -c "heat-manage db_sync" heat +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/heat-engine.postrm b/debian/heat-engine.postrm new file mode 100644 index 00000000..a4fe1e41 --- /dev/null +++ b/debian/heat-engine.postrm @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +if [ "${1}" = "purge" ] ; then + rm -f /etc/heat/heat-engine.conf + [ -d /etc/heat ] && rmdir --ignore-fail-on-non-empty /etc/heat + rm -rf /var/log/heat/engine* + [ -d /var/log/heat ] && rmdir --ignore-fail-on-non-empty /var/log/heat +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/heat-engine.upstart b/debian/heat-engine.upstart new file mode 100644 index 00000000..bd9b6348 --- /dev/null +++ b/debian/heat-engine.upstart @@ -0,0 +1,8 @@ +# vim: set ft=upstart ts=2 et: +description "Heat Engine server" +author "James Page " + +start on runlevel [2345] +stop on runlevel [!2345] + +exec start-stop-daemon --start --chuid heat --exec /usr/bin/heat-engine diff --git a/debian/patches/default-sqlite.patch b/debian/patches/default-sqlite.patch new file mode 100644 index 00000000..de86e252 --- /dev/null +++ b/debian/patches/default-sqlite.patch @@ -0,0 +1,16 @@ +Description: Default to using sqlite +Author: James Page +Forwarded: not-needed +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: heat/etc/heat/heat.conf.sample +--- heat.orig/etc/heat/heat.conf.sample 2013-09-06 16:37:54.000000000 -0700 ++++ heat/etc/heat/heat.conf.sample 2013-09-06 16:39:31.363547917 -0700 +@@ -7,6 +7,7 @@ + # The SQLAlchemy connection string used to connect to the + # database (string value) + #sql_connection=mysql://heat:heat@localhost/heat ++sql_connection = sqlite:////var/lib/heat/heat.sqlite + + # timeout before idle sql connections are reaped (integer + # value) diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000..2b6b02c4 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +default-sqlite.patch diff --git a/debian/python-heat.install b/debian/python-heat.install new file mode 100644 index 00000000..036c6b9d --- /dev/null +++ b/debian/python-heat.install @@ -0,0 +1 @@ +usr/lib/python*/dist-packages/* diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..feb332a8 --- /dev/null +++ b/debian/rules @@ -0,0 +1,29 @@ +#!/usr/bin/make -f + +#export DH_VERBOSE=1 + +%: + dh $@ --with python2 + +ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) +override_dh_auto_test: + ./run_tests.sh -u --concurrency=1 +endif + +override_dh_clean: + dh_clean + rm -rf heat.egg-info + rm -rf doc/build + find . -iname '*.pyc' -delete + rm -f run_tests.err.log + rm -rf pbr*.egg + rm -f etc/heat/heat.conf + +override_dh_install: + cp etc/heat/heat.conf.sample etc/heat/heat.conf + dh_install + +override_dh_installman: + python setup.py build + make -C doc man + dh_installman diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 00000000..f691333d --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,3 @@ +Tests: python-heat heat-daemons +Depends: python-heat, heat-engine, heat-api, heat-api-cfn, heat-api-cloudwatch +Restrictions: needs-root diff --git a/debian/tests/heat-daemons b/debian/tests/heat-daemons new file mode 100755 index 00000000..b4952613 --- /dev/null +++ b/debian/tests/heat-daemons @@ -0,0 +1,15 @@ +#!/bin/bash +#--------------------- +# Testing nova-daemons +#--------------------- +set -e +DAEMONS=('heat-engine' 'heat-api' 'heat-api-cfn' 'heat-api-cloudwatch') + +for daemon in "${DAEMONS[@]}"; do + if pidof -x $daemon > /dev/null; then + echo "OK" + else + echo "ERROR: ${daemon} IS NOT RUNNING" + exit 1 + fi +done diff --git a/debian/tests/python-heat b/debian/tests/python-heat new file mode 100755 index 00000000..de2504d1 --- /dev/null +++ b/debian/tests/python-heat @@ -0,0 +1,14 @@ +#!/bin/bash +#------------------------- +# Testing client utilities +#------------------------- +set -e + +result=$(python `dirname $0`/test_import_heat.py 2>&1) +if [ "$result" ]; then + echo "ERROR: PYTHON-HEAT MODULE CANNOT BE IMPORTED" + exit 1 +else + echo "OK" + exit 0 +fi diff --git a/debian/tests/test_import_heat.py b/debian/tests/test_import_heat.py new file mode 100644 index 00000000..538ccf19 --- /dev/null +++ b/debian/tests/test_import_heat.py @@ -0,0 +1,4 @@ +try: + import heat +except ImportError, e: + print "ERROR IMPORTING MODULE" diff --git a/debian/watch b/debian/watch new file mode 100644 index 00000000..b8f101b7 --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts="uversionmangle=s/\.([a-zA-Z])/~$1/;s/%7E/~/" \ + https://launchpad.net/heat/+download https://launchpad.net/heat/.*/.*/.*/heat-(.*)\.tar\.gz -- 2.45.2