]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Add debian dir
authorMehdi Abaakouk <sileht@sileht.net>
Thu, 13 Sep 2012 14:14:57 +0000 (16:14 +0200)
committerMehdi Abaakouk <sileht@sileht.net>
Thu, 13 Sep 2012 14:14:57 +0000 (16:14 +0200)
39 files changed:
debian/changelog [new file with mode: 0644]
debian/cinder-api.init [new file with mode: 0644]
debian/cinder-api.install [new file with mode: 0644]
debian/cinder-api.logrotate [new file with mode: 0644]
debian/cinder-api.manpages [new file with mode: 0644]
debian/cinder-api.postrm [new file with mode: 0644]
debian/cinder-common.config [new file with mode: 0644]
debian/cinder-common.dirs [new file with mode: 0644]
debian/cinder-common.install [new file with mode: 0644]
debian/cinder-common.manpages [new file with mode: 0644]
debian/cinder-common.postinst [new file with mode: 0644]
debian/cinder-scheduler.init [new file with mode: 0644]
debian/cinder-scheduler.install [new file with mode: 0644]
debian/cinder-scheduler.logrotate [new file with mode: 0644]
debian/cinder-scheduler.manpages [new file with mode: 0644]
debian/cinder-scheduler.postinst [new file with mode: 0644]
debian/cinder-scheduler.postrm [new file with mode: 0644]
debian/cinder-volume.init [new file with mode: 0644]
debian/cinder-volume.install [new file with mode: 0644]
debian/cinder-volume.logrotate [new file with mode: 0644]
debian/cinder-volume.manpages [new file with mode: 0644]
debian/cinder-volume.postrm [new file with mode: 0644]
debian/cinder.conf [new file with mode: 0644]
debian/cinder_sudoers [new file with mode: 0644]
debian/clean [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/docs [new file with mode: 0644]
debian/logging.conf [new file with mode: 0644]
debian/man/cinder-api.8 [new file with mode: 0644]
debian/man/cinder-manage.8 [new file with mode: 0644]
debian/man/cinder-rootwrap.8 [new file with mode: 0644]
debian/man/cinder-scheduler.8 [new file with mode: 0644]
debian/man/cinder-volume.8 [new file with mode: 0644]
debian/python-cinder.install [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/source/format [new file with mode: 0644]
debian/watch [new file with mode: 0644]

diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..d3d1401
--- /dev/null
@@ -0,0 +1,88 @@
+cinder (2012.2~f3-1) experimental; urgency=low
+
+  * First debian release
+
+ -- Mehdi Abaakouk <sileht@sileht.net>  Thu, 13 Sep 2012 15:52:06 +0200
+
+cinder (2012.2~rc1~20120907.230-0ubuntu4) quantal; urgency=low
+
+  [Chuck Short]
+  * New upstream version.
+  * debian/cinder.conf: Fix path for cinder-rootwrap. (LP: #1045438) 
+  * debian/control: Add python-glanceclient as a dep. 
+  * debian/cinder-common.postinst: Fix chmod thinko.
+  * debian/*.upstart: Specify the configuration files.
+
+  [Soren Hansen]
+  * Update debian/watch to account for symbolically named tarballs and
+    use newer URL.
+  * Fix Launchpad URLs in debian/watch.
+
+ -- Chuck Short <zulcss@ubuntu.com>  Fri, 07 Sep 2012 11:27:55 -0500
+
+cinder (2012.2~f3-0ubuntu3) quantal; urgency=low
+
+  * debian/cinder.conf: Re-add sql_connection and set it to sqllite.
+
+ -- Chuck Short <zulcss@ubuntu.com>  Wed, 22 Aug 2012 20:14:41 -0500
+
+cinder (2012.2~f3-0ubuntu2) quantal; urgency=low
+
+  * debian/cinder.conf: Get rid of deprecated warnings.
+    (LP: #1036240) 
+
+ -- Chuck Short <zulcss@ubuntu.com>  Sun, 19 Aug 2012 13:36:22 -0500
+
+cinder (2012.2~f3-0ubuntu1) quantal; urgency=low
+
+  * New upstream version.
+  * debian/patches/0001-Use-setuptools-git.patch: Dropped
+  * debian/control: Add python-glanceclient
+
+ -- Chuck Short <zulcss@ubuntu.com>  Fri, 17 Aug 2012 10:18:57 -0500
+
+cinder (2012.2~f3~20120809.102-0ubuntu2) quantal; urgency=low
+
+  * debian/cinder.conf, cinder-common.install: Use rootwrap.conf. (LP: #1036240) 
+  * debian/control: Drop python-babel.
+
+ -- Chuck Short <zulcss@ubuntu.com>  Mon, 13 Aug 2012 14:14:31 -0500
+
+cinder (2012.2~f3~20120809.102-0ubuntu1) quantal; urgency=low
+
+  [ Adam Gandelman ]
+  * debian/control: Add python-setuptools dependency.
+  * debian/cinder-common.postinst: Fix syntax errors, fix permissions.
+  * debian/cinder-common.dirs: Correct, etc/nova -> etc/cinder.
+  * debian/{cinder_sudoers, rules, cinder-common.install}: Install proper
+    cinder_sudoers.
+  * debian/cinder-*.upstart: Close quotes, replace 'nova' references with
+    'cinder'.
+  * debian/cinder.conf: Specify correct sql_connection.
+  * debian/cinder-scheduler.postinst: Added.  Migrate local databases only.
+
+  [ Chuck Short ]
+  * debian/*.upstart: Fix upstart jobs to run with right interfaces.
+    (LP: #1030197)
+  * debian/control: Drop python-babel, python-nosexcover
+  * debian/control: Add python-mox, pep8
+  * debian/rules: Re-add get-orig-source
+  * debian/rules: Enable testsuite.
+  * debian/cinder.conf: Update config file.
+  * debian/cinder-{api,volumes,scheduler}.manpages: Add manpages.
+  * New upstream version.
+  * debian/rules: Don't run pep8 tests
+  * debian/patches/0001-Use-setuptools-git.patch: Cleanup manifest
+  * debian/control: Add python-setuptools-git
+  * debian/control: Add section for python-cinder
+  * fix lintian warnings and errors.
+  * debian/cinder-common.install: Remove clear_rabbit_queues since it
+    will conflict with nova installed.
+
+ -- Chuck Short <zulcss@ubuntu.com>  Fri, 10 Aug 2012 12:05:11 -0500
+
+cinder (2012.2~f1~20120503.2-0ubuntu1) quantal; urgency=low
+
+  * Initial release.
+
+ -- Chuck Short <zulcss@ubuntu.com>  Tue, 22 May 2012 09:57:46 -0400
diff --git a/debian/cinder-api.init b/debian/cinder-api.init
new file mode 100644 (file)
index 0000000..739981c
--- /dev/null
@@ -0,0 +1,116 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          cinder-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: Cinder Api
+# Description:       Provides EBS like storage for your
+#                    virtual machine instances
+### END INIT INFO
+
+# Author: Julien Danjou <acid@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 Api"
+NAME=cinder-api
+DAEMON=/usr/bin/cinder-api
+DAEMON_ARGS="--configfile=/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/debian/cinder-api.install b/debian/cinder-api.install
new file mode 100644 (file)
index 0000000..98e58c1
--- /dev/null
@@ -0,0 +1 @@
+usr/bin/cinder-api
diff --git a/debian/cinder-api.logrotate b/debian/cinder-api.logrotate
new file mode 100644 (file)
index 0000000..6df00bf
--- /dev/null
@@ -0,0 +1,4 @@
+/var/log/cinder/cinder-api.log {
+       daily
+       missingok
+}
diff --git a/debian/cinder-api.manpages b/debian/cinder-api.manpages
new file mode 100644 (file)
index 0000000..0cc348b
--- /dev/null
@@ -0,0 +1 @@
+debian/man/cinder-api.8
diff --git a/debian/cinder-api.postrm b/debian/cinder-api.postrm
new file mode 100644 (file)
index 0000000..f1fec48
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh -e
+
+if [ "$1" = purge ]; then
+       update-rc.d cinder-api remove
+fi
+
+#DEBHELPER#
diff --git a/debian/cinder-common.config b/debian/cinder-common.config
new file mode 100644 (file)
index 0000000..a7c6007
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+set -e
+
+. /usr/share/debconf/confmodule
+
+NOVA_COM_DEF=/etc/default/nova-common
+
+# Set the debconf value to whatever is in the config file
+if [ -f ${NOVA_COM_DEF} ] ; then
+    . ${NOVA_COM_DEF}
+fi
+if ! [ "${NOVA_ENABLE}" = "true" ] ; then
+    NOVA_ENABLE=false
+fi
+db_set nova-common/start_services ${NOVA_ENABLE}
+
+db_input low nova-common/start_services || true
+db_go
+
+# Write a default config file if it doesn't exist yet
+# note that the value will be overwritten by the postinst
+if ! [ -f ${NOVA_COM_DEF} ] ; then
+    echo "# defaults file for nova daemons
+
+# start nova daemons from init.d script?
+#  only allowed values are \"true\" and \"false\"
+NOVA_ENABLE=true" >${NOVA_COM_DEF}
+fi
+
diff --git a/debian/cinder-common.dirs b/debian/cinder-common.dirs
new file mode 100644 (file)
index 0000000..990209e
--- /dev/null
@@ -0,0 +1,4 @@
+etc/cinder
+etc/cinder/rootwrap.d
+var/lib/cinder
+var/log/cinder
diff --git a/debian/cinder-common.install b/debian/cinder-common.install
new file mode 100644 (file)
index 0000000..6d744e2
--- /dev/null
@@ -0,0 +1,9 @@
+usr/bin/cinder-manage
+usr/bin/cinder-rootwrap
+etc/cinder/policy.json etc/cinder
+etc/cinder/api-paste.ini etc/cinder
+etc/cinder/rootwrap.d/volume.filters /etc/cinder/rootwrap.d
+etc/cinder/rootwrap.conf etc/cinder
+debian/cinder.conf etc/cinder
+debian/logging.conf etc/cinder
+debian/cinder_sudoers etc/sudoers.d
diff --git a/debian/cinder-common.manpages b/debian/cinder-common.manpages
new file mode 100644 (file)
index 0000000..23a27cc
--- /dev/null
@@ -0,0 +1,2 @@
+debian/man/cinder-manage.8
+debian/man/cinder-rootwrap.8
diff --git a/debian/cinder-common.postinst b/debian/cinder-common.postinst
new file mode 100644 (file)
index 0000000..2ac7870
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/sh -e
+
+if [ "$1" = "configure" ]; then
+    if ! getenv group cinder > /dev/null 2>&1; then
+        addgroup --system cinder >/dev/null
+    fi
+
+    if ! getenv passwd cinder > /dev/null 2>&1; then
+        adduser --system --home /var/lib/cinder --ingroup cinder --no-create-home \
+            --shell /bin/false cinder
+    fi
+
+    chown -R cinder:adm /var/log/cinder
+    chmod 0750 /var/log/cinder
+    chown -R cinder:cinder /var/lib/cinder /etc/cinder
+    chmod 0750 /etc/cinder
+    chmod 0440 /etc/sudoers.d/cinder_sudoers
+
+    if ! grep -q sql_connection /etc/cinder/cinder.conf
+    then
+        su -s /bin/sh -c 'cinder-manage db sync' cinder
+    fi
+
+    if [ -e /var/lib/cinder/cinder.sqlite ]; then
+        chown cinder:cinder /var/lib/cinder/cinder.sqlite
+        chown 0600 /var/lib/cinder/cinder.sqlite
+    fi
+
+    . /usr/share/debconf/confmodule
+
+    db_get nova-common/start_services
+    if [ " $RET" = "false" ]; then
+        sed -e "s,^NOVA_ENABLE=.\+,NOVA_ENABLE=false," -i /etc/default/nova
+    fi
+
+fi
+
+#DEBHELPER#
diff --git a/debian/cinder-scheduler.init b/debian/cinder-scheduler.init
new file mode 100644 (file)
index 0000000..58b4418
--- /dev/null
@@ -0,0 +1,116 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          cinder-scheduler
+# 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 Scheduler
+# Description:       Provides EBS like storage for your
+#                    virtual machine instances
+### END INIT INFO
+
+# Author: Julien Danjou <acid@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 Scheduler"
+NAME=cinder-scheduler
+DAEMON=/usr/bin/cinder-scheduler
+DAEMON_ARGS="--configfile=/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/debian/cinder-scheduler.install b/debian/cinder-scheduler.install
new file mode 100644 (file)
index 0000000..8d994a1
--- /dev/null
@@ -0,0 +1 @@
+usr/bin/cinder-scheduler
diff --git a/debian/cinder-scheduler.logrotate b/debian/cinder-scheduler.logrotate
new file mode 100644 (file)
index 0000000..0d3a307
--- /dev/null
@@ -0,0 +1,4 @@
+/var/log/cinder/cinder-scheduler.log {
+       daily
+       missingok
+}
diff --git a/debian/cinder-scheduler.manpages b/debian/cinder-scheduler.manpages
new file mode 100644 (file)
index 0000000..4d6e93c
--- /dev/null
@@ -0,0 +1 @@
+debian/man/cinder-scheduler.8
diff --git a/debian/cinder-scheduler.postinst b/debian/cinder-scheduler.postinst
new file mode 100644 (file)
index 0000000..30bfd11
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh -e
+
+if [ "$1" = "configure" ]; then
+  # only migrate the database if configured to use a local sqlite db (default)
+  if grep -q 'sql_connection=sqlite' /etc/cinder/cinder.conf ; then
+    su -s /bin/sh -c 'cinder-manage db sync' cinder
+  fi
+  if [ -e /var/lib/cinder/cinder.sql ] ; then
+    chown cinder:cinder /var/lib/cinder/cinder.sqlite
+    chmod 0640 /var/lib/cinder/cinder.sqlite
+  fi
+fi
+
+#DEBHELPER#
diff --git a/debian/cinder-scheduler.postrm b/debian/cinder-scheduler.postrm
new file mode 100644 (file)
index 0000000..9204841
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh -e
+
+if [ "$1" = purge ]; then
+       update-rc.d cinder-scheduler remove
+fi
+
+#DEBHELPER#
diff --git a/debian/cinder-volume.init b/debian/cinder-volume.init
new file mode 100644 (file)
index 0000000..9999b30
--- /dev/null
@@ -0,0 +1,116 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          cinder-volume
+# 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 Volume
+# Description:       Provides EBS like storage for your
+#                    virtual machine instances
+### END INIT INFO
+
+# Author: Julien Danjou <acid@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 Volume"
+NAME=cinder-volume
+DAEMON=/usr/bin/cinder-volume
+DAEMON_ARGS="--configfile=/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/debian/cinder-volume.install b/debian/cinder-volume.install
new file mode 100644 (file)
index 0000000..188598f
--- /dev/null
@@ -0,0 +1 @@
+usr/bin/cinder-volume
diff --git a/debian/cinder-volume.logrotate b/debian/cinder-volume.logrotate
new file mode 100644 (file)
index 0000000..b514331
--- /dev/null
@@ -0,0 +1,4 @@
+/var/log/cinder/cinder-volume.log {
+       daily
+       missingok
+}
diff --git a/debian/cinder-volume.manpages b/debian/cinder-volume.manpages
new file mode 100644 (file)
index 0000000..87e53e9
--- /dev/null
@@ -0,0 +1 @@
+debian/man/cinder-volume.8
diff --git a/debian/cinder-volume.postrm b/debian/cinder-volume.postrm
new file mode 100644 (file)
index 0000000..9667a99
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh -e
+
+if [ "$1" = purge ]; then
+       update-rc.d cinder-volume remove
+fi
+
+#DEBHELPER#
diff --git a/debian/cinder.conf b/debian/cinder.conf
new file mode 100644 (file)
index 0000000..143ecac
--- /dev/null
@@ -0,0 +1,9 @@
+[DEFAULT]
+rootwrap_config = sudo /usr/bin/cinder-rootwrap /etc/cinder/rootwrap.conf
+sql_connection = sqlite:////var/lib/cinder/cinder.sqlite
+api_paste_confg = /etc/cinder/api-paste.ini
+icssi_helper = tgtadm
+volume_name_template = volume-%s
+volume_group = cinder-volumes
+verbose = True
+auth_strategy = keystone
diff --git a/debian/cinder_sudoers b/debian/cinder_sudoers
new file mode 100644 (file)
index 0000000..73142ab
--- /dev/null
@@ -0,0 +1,3 @@
+Defaults:cinder !requiretty
+
+cinder ALL = (root) NOPASSWD: /usr/bin/cinder-rootwrap 
diff --git a/debian/clean b/debian/clean
new file mode 100644 (file)
index 0000000..e932b02
--- /dev/null
@@ -0,0 +1 @@
+setup.cfg
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..45a4fb7
--- /dev/null
@@ -0,0 +1 @@
+8
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..578261f
--- /dev/null
@@ -0,0 +1,103 @@
+Source: cinder
+Section: net
+Priority: extra
+Maintainer: PKG OpenStack <openstack-devel@lists.alioth.debian.org>
+Uploaders: Mehdi Abaakouk <sileht@sileht.net>
+Build-Depends: debhelper (>= 8.0.0),
+ python-all (>= 2.6),
+ python-all-dev (>= 2.6.6-3~)
+Build-Depends-Indep:
+ python-sqlalchemy,
+ python-setuptools,
+ python-cheetah,
+ python-amqplib,
+ python-anyjson,
+ python-eventlet,
+ python-kombu,
+ python-lockfile,
+ python-lxml,
+ python-daemon,
+ python-routes,
+ python-webob,
+ python-greenlet,
+ python-glanceclient,
+ python-pastedeploy,
+ python-paste,
+ python-migrate,
+ python-netaddr,
+ python-glance,
+ python-suds,
+ python-paramiko,
+ python-iso8601,
+ python-coverage,
+ python-mox,
+ python-nose,
+ python-sphinx,
+ python-mysqldb,
+ python-setuptools-git,
+ pep8,
+Standards-Version: 3.9.3
+Homepage: http://launchpad.net/cinder
+
+Package: python-cinder
+Section: python
+Architecture: all
+Depends: ${python:Depends}, python-sqlalchemy,
+ python-cheetah,
+ python-amqplib,
+ python-anyjson,
+ python-eventlet,
+ python-kombu,
+ python-lockfile,
+ python-lxml,
+ python-daemon,
+ python-routes,
+ python-webob,
+ python-greenlet,
+ python-pastedeploy,
+ python-paste,
+ python-migrate,
+ python-netaddr,
+ python-glance,
+ python-suds,
+ python-paramiko,
+ python-iso8601,
+ python-glanceclient,
+ ${misc:Depends}
+Description: Cinder python libraries
+ Cinder is a storage service for the Openstack project.
+ .
+ This package contains the proython parts of cinder.
+
+Package: cinder-common
+Architecture: all
+Depends: python-cinder (= ${binary:Version}), ${python:Depends}, ${misc:Depends}, adduser
+Provides: ${python:Provides}
+Description: Cinder starage service - common files
+ Cinder is a storage service for the Openstack project
+ .
+ This package contains things that are needed for all parts of cinder
+
+Package: cinder-api
+Architecture: all
+Depends: cinder-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends}
+Description: Cinder storage service - api server
+ Cinder is a storage service for the Openstack project
+ .
+ This package contains the api server
+
+Package: cinder-volume
+Architecture: all
+Depends: cinder-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends}
+Description: Cinder storage service - api server
+ Cinder is a storage service for the Openstack project
+ .
+ This package contains the volume server
+
+Package: cinder-scheduler
+Architecture: all
+Depends: cinder-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends}
+Description: Cinder storage service - api server
+ Cinder is a storage service for the Openstack project
+ .
+ This package contains the scheduler server
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..ab9fa23
--- /dev/null
@@ -0,0 +1,26 @@
+Format: http://dep.debian.net/deps/dep5-
+Upstream-Name: nova
+Source: https://code.launchpad.net/nova
+
+Files: *
+Copyright: 2010 United States Government as represented
+                by the Administrator of the National Aeronautics
+                and Space Administration.
+Copyright: 2010 OpenStack LLC
+Copyright: Others (See individual files for more details)
+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/docs b/debian/docs
new file mode 100644 (file)
index 0000000..a1320b1
--- /dev/null
@@ -0,0 +1 @@
+README.rst
diff --git a/debian/logging.conf b/debian/logging.conf
new file mode 100644 (file)
index 0000000..476425b
--- /dev/null
@@ -0,0 +1,76 @@
+[loggers]
+keys = root, cinder
+
+[handlers]
+keys = stderr, stdout, watchedfile, syslog, null
+
+[formatters]
+keys = legacycinder, default
+
+[logger_root]
+level = WARNING
+handlers = null
+
+[logger_cinder]
+level = INFO
+handlers = stderr
+qualname = cinder
+
+[logger_amqplib]
+level = WARNING
+handlers = stderr
+qualname = amqplib
+
+[logger_sqlalchemy]
+level = WARNING
+handlers = stderr
+qualname = sqlalchemy
+# "level = INFO" logs SQL queries.
+# "level = DEBUG" logs SQL queries and results.
+# "level = WARNING" logs neither.  (Recommended for production systems.)
+
+[logger_boto]
+level = WARNING
+handlers = stderr
+qualname = boto
+
+[logger_suds]
+level = INFO
+handlers = stderr
+qualname = suds
+
+[logger_eventletwsgi]
+level = WARNING
+handlers = stderr
+qualname = eventlet.wsgi.server
+
+[handler_stderr]
+class = StreamHandler
+args = (sys.stderr,)
+formatter = legacycinder
+
+[handler_stdout]
+class = StreamHandler
+args = (sys.stdout,)
+formatter = legacycinder
+
+[handler_watchedfile]
+class = handlers.WatchedFileHandler
+args = ('cinder.log',)
+formatter = legacycinder
+
+[handler_syslog]
+class = handlers.SysLogHandler
+args = ('/dev/log', handlers.SysLogHandler.LOG_USER)
+formatter = legacycinder
+
+[handler_null]
+class = cinder.log.NullHandler
+formatter = default
+args = ()
+
+[formatter_legacycinder]
+class = cinder.log.LegacyCinderFormatter
+
+[formatter_default]
+format = %(message)s
diff --git a/debian/man/cinder-api.8 b/debian/man/cinder-api.8
new file mode 100644 (file)
index 0000000..e3f870e
--- /dev/null
@@ -0,0 +1,20 @@
+.TH cinder\-api 8
+.SH NAME
+cinder\-api \- frontend API server for cinder
+
+.SH SYNOPSIS
+.B cinder\-api
+.B \-\-config-file=<config-filepath>
+
+.SH DESCRIPTION
+.B cinder\-api
+
+This man page is a stub. Please contribute.
+
+.SH PARAMETERS
+
+.LP
+.B \-\-config-file=<config-filepath>
+.IP
+
+Path to the file containing options.
diff --git a/debian/man/cinder-manage.8 b/debian/man/cinder-manage.8
new file mode 100644 (file)
index 0000000..687bb7b
--- /dev/null
@@ -0,0 +1,21 @@
+.TH cinder\-manage 8
+.SH NAME
+cinder\-manage \- manages the cinder daemons
+
+.SH SYNOPSIS
+.B cinder\-manage
+.B <command>
+
+.SH DESCRIPTION
+.B cinder\-manage
+
+This man page is a stub. Please contribute.
+
+.SH PARAMETERS
+
+.LP
+.B <command>
+.IP
+
+cinder-manage.8 (END)
+
diff --git a/debian/man/cinder-rootwrap.8 b/debian/man/cinder-rootwrap.8
new file mode 100644 (file)
index 0000000..94d7f29
--- /dev/null
@@ -0,0 +1,22 @@
+.TH cinder\-rootwrap 8
+.SH NAME
+cinder\-rootwrap \- Authorizes and executes sudo commands on cinder's behalf
+
+.SH SYNOPSIS
+.B cinder\-rootwrap
+.B <command>
+
+.SH DESCRIPTION
+.B cinder\-rootwrap
+
+This man page is a stub. Please contribute.
+
+.SH PARAMETERS
+
+.LP
+.B <command>
+.IP
+
+Command to be executed with sudo
+cinder-rootwrap.8 (END)
+
diff --git a/debian/man/cinder-scheduler.8 b/debian/man/cinder-scheduler.8
new file mode 100644 (file)
index 0000000..e3f870e
--- /dev/null
@@ -0,0 +1,20 @@
+.TH cinder\-api 8
+.SH NAME
+cinder\-api \- frontend API server for cinder
+
+.SH SYNOPSIS
+.B cinder\-api
+.B \-\-config-file=<config-filepath>
+
+.SH DESCRIPTION
+.B cinder\-api
+
+This man page is a stub. Please contribute.
+
+.SH PARAMETERS
+
+.LP
+.B \-\-config-file=<config-filepath>
+.IP
+
+Path to the file containing options.
diff --git a/debian/man/cinder-volume.8 b/debian/man/cinder-volume.8
new file mode 100644 (file)
index 0000000..e3f870e
--- /dev/null
@@ -0,0 +1,20 @@
+.TH cinder\-api 8
+.SH NAME
+cinder\-api \- frontend API server for cinder
+
+.SH SYNOPSIS
+.B cinder\-api
+.B \-\-config-file=<config-filepath>
+
+.SH DESCRIPTION
+.B cinder\-api
+
+This man page is a stub. Please contribute.
+
+.SH PARAMETERS
+
+.LP
+.B \-\-config-file=<config-filepath>
+.IP
+
+Path to the file containing options.
diff --git a/debian/python-cinder.install b/debian/python-cinder.install
new file mode 100644 (file)
index 0000000..036c6b9
--- /dev/null
@@ -0,0 +1 @@
+usr/lib/python*/dist-packages/*
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..97219c2
--- /dev/null
@@ -0,0 +1,15 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+%:
+       dh $@  --with python2
+
+get-orig-source:
+       uscan --verbose --force-download --rename --destdir=../build-area
+
+ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
+override_dh_auto_test:
+       ./run_tests.sh -N -P || true
+endif
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644 (file)
index 0000000..2f14574
--- /dev/null
@@ -0,0 +1,3 @@
+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