]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
* Added missing cinder-backup binary package.
authorThomas Goirand <thomas@goirand.fr>
Sat, 6 Apr 2013 18:24:33 +0000 (02:24 +0800)
committerThomas Goirand <thomas@goirand.fr>
Sat, 6 Apr 2013 18:35:14 +0000 (02:35 +0800)
* 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.

Rewritten-From: 299810316717e8e9329936fc06a29b73abbd0569

xenial/debian/cinder-backup.init [new file with mode: 0644]
xenial/debian/cinder-backup.install [new file with mode: 0644]
xenial/debian/cinder-backup.logrotate [new file with mode: 0644]
xenial/debian/cinder-backup.upstart.in [new file with mode: 0644]
xenial/debian/cinder-common.install
xenial/debian/cinder-volume.install
xenial/debian/cinder.conf
xenial/debian/control
xenial/debian/copyright
xenial/debian/rules
xenial/debian/watch

diff --git a/xenial/debian/cinder-backup.init b/xenial/debian/cinder-backup.init
new file mode 100644 (file)
index 0000000..30e7774
--- /dev/null
@@ -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
diff --git a/xenial/debian/cinder-backup.install b/xenial/debian/cinder-backup.install
new file mode 100644 (file)
index 0000000..b362ab5
--- /dev/null
@@ -0,0 +1 @@
+usr/bin/cinder-backup
diff --git a/xenial/debian/cinder-backup.logrotate b/xenial/debian/cinder-backup.logrotate
new file mode 100644 (file)
index 0000000..fd6419d
--- /dev/null
@@ -0,0 +1,7 @@
+/var/log/cinder/cinder-backup.log {
+    daily
+    missingok
+    compress
+    delaycompress
+    notifempty
+}
diff --git a/xenial/debian/cinder-backup.upstart.in b/xenial/debian/cinder-backup.upstart.in
new file mode 100644 (file)
index 0000000..a95de6f
--- /dev/null
@@ -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
index c0e2f1028523d2c9a13624ff21aff8e79b3123ca..9f5b95cefa924031238e4fc9c1278874b783d793 100644 (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
index 267af421f96cba0f904722fee0fdca580418ccaf..d3bad5c4f9111b84793e1dbdc338ce145bf4c4bb 100644 (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
index a116a7e208da0d3aedea46d24042317d61d2d1f9..d57e2be5b6ef738f236984ff08a46e3e37f57c98 100644 (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
index b6604704bd905116fab6a6c4f832772d4b3c6ef2..1b55d7b585ecc3b5627b0d042e47e4e7b7c3fb59 100644 (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.
index 4b57f0805db8eeb645affea0c1b88965e64abf77..01bbb0ece9d7d4bf44cb19e31f773b4de7a8e0bb 100644 (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
index 0f3d99f66288fefe4bb45173717532804249f747..212b3b6927bee4e469806a63c4fe4430d3f50c33 100755 (executable)
@@ -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:
index 2f1457415dd3d1bd3ace447ebae1b1e7190d2fc6..fdb4071c8a8cd7382de65f51f3ee6d6f037887fe 100644 (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