* Added missing cinder-backup binary package.

* reduced differences with Ubuntu.
* fixed watch file to use the github tag.
* added missing (new) binaries in cinder-volume.
* Fixed double-declaration of (build-)dependencies.
* Reordered dependencies by alph order.
* Fixed Sources: field.
This commit is contained in:
Thomas Goirand 2013-04-07 02:24:33 +08:00
parent f67ccc00d2
commit 2998103167
11 changed files with 186 additions and 19 deletions

115
debian/cinder-backup.init vendored Normal file
View File

@ -0,0 +1,115 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: cinder-backup
# 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: Cinder Backup
# Description: Provides Cinder Backup
### END INIT INFO
# Author: Thomas Goirand <zigo@debian.org>
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="OpenStack Cinder Backup"
NAME=cinder-backup
DAEMON=/usr/bin/cinder-backup
DAEMON_ARGS="--config-file=/etc/cinder/cinder.conf"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
CINDER_USER=cinder
LOCK_DIR=/var/lock/cinder/
DEFAULTS_FILE=/etc/default/cinder-common
# Exit if the package is not installed
[ -x $DAEMON ] || exit 0
mkdir -p ${LOCK_DIR}
chown ${CINDER_USER} ${LOCK_DIR}
. /lib/lsb/init-functions
# Read configuration variable file if it is present
if [ -s $DEFAULTS_FILE ]; then
. $DEFAULTS_FILE
case "x$CINDER_ENABLE" in
xtrue|xfalse) ;;
*) log_failure_msg "Value of CINDER_ENABLE in $DEFAULTS_FILE must be either 'true' or 'false';"
log_failure_msg "not starting $NAME daemon."
exit 1
;;
esac
fi
do_start()
{
start-stop-daemon --start --quiet --background --chuid ${CINDER_USER}:cinder --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --background --chuid ${CINDER_USER}:cinder --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \
$DAEMON_ARGS \
|| 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)
if "$CINDER_ENABLE"; then
log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) log_end_msg 0 ;;
2) log_end_msg 1 ;;
esac
else
log_warning_msg "cinder daemons not enabled in $DEFAULTS_FILE, not starting..."
fi
;;
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)
if "$CINDER_ENABLE"; then
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
else
log_warning_msg "cinder daemons not enabled in $DEFAULTS_FILE, not starting..."
fi
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
exit 3
;;
esac

1
debian/cinder-backup.install vendored Normal file
View File

@ -0,0 +1 @@
usr/bin/cinder-backup

7
debian/cinder-backup.logrotate vendored Normal file
View File

@ -0,0 +1,7 @@
/var/log/cinder/cinder-backup.log {
daily
missingok
compress
delaycompress
notifempty
}

18
debian/cinder-backup.upstart.in vendored Normal file
View File

@ -0,0 +1,18 @@
description "Cinder backup server"
author "Chuck Short <zulcss@ubuntu.com>"
start on runlevel [2345]
stop on runlevel [!2345]
chdir /var/run
pre-start script
mkdir -p /var/run/cinder
chown cinder:cinder /var/run/cinder
mkdir -p /var/lock/cinder
chown cinder:root /var/lock/cinder
end script
exec start-stop-daemon --start --chuid cinder --exec /usr/bin/cinder-backup \
-- --config-file=/etc/cinder/cinder.conf --log-file=/var/log/cinder/cinder-backup.log

View File

@ -3,6 +3,5 @@ usr/bin/cinder-rootwrap
etc/cinder/policy.json /etc/cinder
debian/logging.conf /etc/cinder
etc/cinder/rootwrap.conf /etc/cinder
etc/cinder/rootwrap.d/volume.filters /etc/cinder/rootwrap.d
debian/cinder.conf /usr/share/cinder-common
etc/cinder/api-paste.ini /usr/share/cinder-common

View File

@ -1,2 +1,5 @@
usr/bin/cinder-volume
debian/cinder_tgt.conf etc/tgt/conf.d
etc/cinder/rootwrap.d/volume.filters /etc/cinder/rootwrap.d
usr/bin/cinder-volume-usage-audit
usr/bin/cinder-clear-rabbit-queues

2
debian/cinder.conf vendored
View File

@ -1,6 +1,6 @@
[DEFAULT]
rootwrap_config = /etc/cinder/rootwrap.conf
sql_connection = sqlite:////var/lib/cinder/cinder.sqlite
sql_connection = sqlite:////var/lib/cinder/cinderdb
api_paste_confg = /etc/cinder/api-paste.ini
iscsi_helper = tgtadm
volume_name_template = volume-%s

49
debian/control vendored
View File

@ -30,6 +30,7 @@ Build-Depends-Indep: pep8 (>= 1.3.3),
python-lockfile,
python-lxml,
python-migrate,
python-mock,
python-mox,
python-mysqldb,
python-netaddr,
@ -49,10 +50,10 @@ Build-Depends-Indep: pep8 (>= 1.3.3),
python-suds,
python-swiftclient,
python-webob (>= 1.2.3),
Standards-Version: 3.9.3
Homepage: http://cinder.openstack.org/
Standards-Version: 3.9.4
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=openstack/cinder.git;a=summary
Vcs-Git: git://anonscm.debian.org/openstack/cinder.git
Homepage: http://cinder.openstack.org/
Package: python-cinder
Section: python
@ -63,14 +64,14 @@ Depends: ${python:Depends},
python-anyjson,
python-argparse,
python-babel,
python-cheetah,
python-daemon,
python-cheetah,
python-daemon,
python-eventlet (>= 0.9.17),
python-glanceclient (>= 1:0.5.0),
python-greenlet,
python-iso8601,
python-keystoneclient (>= 1:0.2.0),
python-kombu,
python-kombu,
python-lockfile,
python-lxml,
python-migrate,
@ -80,13 +81,11 @@ Depends: ${python:Depends},
python-paramiko,
python-paste,
python-pastedeploy,
python-migrate,
python-netaddr,
python-rtslib,
python-routes,
python-suds,
python-rtslib,
python-sqlalchemy,
python-stevedore (>= 0.7),
python-suds,
python-swiftclient,
python-webob (>= 1.2.3),
${misc:Depends}
@ -102,7 +101,13 @@ Description: Openstack block storage as a service - Python libraries
Package: cinder-common
Architecture: all
Pre-Depends: dpkg (>= 1.15.6~)
Depends: python-cinder (= ${binary:Version}), ${python:Depends}, ${misc:Depends}, adduser, debconf, dbconfig-common
Depends:
adduser,
python-cinder (= ${binary:Version}),
debconf,
dbconfig-common,
${misc:Depends},
${python:Depends}
Provides: ${python:Provides}
Description: Openstack block storage as a service - common files
Cinder is a block storage as service system for the Openstack cloud computing
@ -130,8 +135,15 @@ Description: Openstack block storage as a service - API server
Package: cinder-volume
Architecture: all
Pre-Depends: dpkg (>= 1.15.6~)
Depends: ${ostack-lsb-base}, cinder-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends},
lvm2, tgt, adduser
Depends:
adduser,
${ostack-lsb-base},
cinder-common (= ${binary:Version}),
lvm2,
tgt,
${misc:Depends},
${python:Depends}
Suggests: ceph-common
Description: Openstack block storage as a service - Volume server
Cinder is a block storage as service system for the Openstack cloud computing
software suite. It is a direct replacement for nova-volume as a separate
@ -153,3 +165,16 @@ Description: Openstack block storage as a service - Scheduler server
running on Nova.
.
This package contains the Scheduler server.
Package: cinder-backup
Architecture: all
Pre-Depends: dpkg (>= 1.15.6~)
Depends: adduser, ${ostack-lsb-base}, cinder-common (= ${binary:Version}), ${misc:Depends}, ${python:Depends}
Description: Openstack block storage as a service - Backup server
Cinder is a block storage as service system for the Openstack cloud computing
software suite. It is a direct replacement for nova-volume as a separate
project. Cinder users LVM partitions of your volume servers in order to
provide iSCSI permanent block storage devices for your virtual machines
running on Nova.
.
This package contains the Cinder backup service.

2
debian/copyright vendored
View File

@ -1,6 +1,6 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: cinder
Source: https://code.launchpad.net/cinder
Source: git://github.com/openstack/cinder.git
Files: *
Copyright: (c) 2010 United States Government as represented

4
debian/rules vendored
View File

@ -9,7 +9,7 @@ export OSLO_PACKAGE_VERSION=$(VERSION)
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
./run_tests.sh -N -P || true
PYTHONPATH=$(CURDIR) bash run_tests.sh -N -P || true
endif
override_dh_clean:
@ -18,7 +18,7 @@ override_dh_clean:
rm -rf setuptools_git-*-py*.egg/
override_dh_install:
dh_install
dh_install --fail-missing -Xbin/cinder-all
install -D -m 0440 debian/cinder-common.sudoers $(CURDIR)/debian/cinder-common/etc/sudoers.d/cinder-common
override_dh_fixperms:

3
debian/watch vendored
View File

@ -1,3 +1,2 @@
version=3
opts="uversionmangle=s/%7E/~/" https://launchpad.net/cinder/+download https://launchpad.net/cinder/.*/.*/.*/cinder-(.*)\.tar\.gz
http://tarballs.openstack.org/cinder/ cinder-(\d.*).tar.gz
https://github.com/openstack/nova/tags .*/(\d[\d\.]+)\.tar\.gz