[Python-modules-commits] r23330 - in packages/celery/tags/2.5.3-1/debian (9 files)

fladi-guest at users.alioth.debian.org fladi-guest at users.alioth.debian.org
Thu Jan 17 10:40:38 UTC 2013


    Date: Thursday, January 17, 2013 @ 10:40:36
  Author: fladi-guest
Revision: 23330

Create user celery and provide separate default files for each init script (Closes: #697195).

Added:
  packages/celery/tags/2.5.3-1/debian/python-celery.celerybeat.default
  packages/celery/tags/2.5.3-1/debian/python-celery.celeryevcam.default
  packages/celery/tags/2.5.3-1/debian/python-celery.postinst
  packages/celery/tags/2.5.3-1/debian/python-celery.postrm
Modified:
  packages/celery/tags/2.5.3-1/debian/changelog
  packages/celery/tags/2.5.3-1/debian/control
  packages/celery/tags/2.5.3-1/debian/patches/lsb-init.patch
  packages/celery/tags/2.5.3-1/debian/python-celery.celeryd.default
  packages/celery/tags/2.5.3-1/debian/rules

Modified: packages/celery/tags/2.5.3-1/debian/changelog
===================================================================
--- packages/celery/tags/2.5.3-1/debian/changelog	2013-01-17 00:35:25 UTC (rev 23329)
+++ packages/celery/tags/2.5.3-1/debian/changelog	2013-01-17 10:40:36 UTC (rev 23330)
@@ -1,3 +1,10 @@
+celery (2.5.3-2) UNRELEASED; urgency=low
+
+  * Create user celery and provide separate default files for each init
+    script (Closes: #697195).
+
+ -- Michael Fladischer <FladischerMichael at fladi.at>  Sun, 13 Jan 2013 19:10:12 +0100
+
 celery (2.5.3-1) unstable; urgency=low
 
   * New upstream release.

Modified: packages/celery/tags/2.5.3-1/debian/control
===================================================================
--- packages/celery/tags/2.5.3-1/debian/control	2013-01-17 00:35:25 UTC (rev 23329)
+++ packages/celery/tags/2.5.3-1/debian/control	2013-01-17 10:40:36 UTC (rev 23330)
@@ -36,7 +36,8 @@
 
 Package: python-celery
 Architecture: all
-Depends: python-amqplib,
+Depends: adduser,
+         python-amqplib,
          python-anyjson (>= 0.3.1),
          python-cl,
          python-dateutil (>= 1.5),

Modified: packages/celery/tags/2.5.3-1/debian/patches/lsb-init.patch
===================================================================
--- packages/celery/tags/2.5.3-1/debian/patches/lsb-init.patch	2013-01-17 00:35:25 UTC (rev 23329)
+++ packages/celery/tags/2.5.3-1/debian/patches/lsb-init.patch	2013-01-17 10:40:36 UTC (rev 23330)
@@ -8,7 +8,7 @@
 
 --- a/contrib/generic-init.d/celeryd
 +++ b/contrib/generic-init.d/celeryd
-@@ -16,6 +16,7 @@
+@@ -16,28 +16,35 @@
  # Default-Start:     2 3 4 5
  # Default-Stop:      0 1 6
  # Short-Description: celery task worker daemon
@@ -16,11 +16,17 @@
  ### END INIT INFO
  
  #set -e
-@@ -25,16 +26,18 @@
+ 
+-DEFAULT_PID_FILE="/var/run/celeryd@%n.pid"
+-DEFAULT_LOG_FILE="/var/log/celeryd@%n.log"
++DEFAULT_PID_FILE="/var/run/celery/celeryd@%n.pid"
++DEFAULT_LOG_FILE="/var/log/celery/celeryd@%n.log"
  DEFAULT_LOG_LEVEL="INFO"
++DEFAULT_USER="celery"
++DEFAULT_GROUP="celery"
  DEFAULT_NODES="celery"
  DEFAULT_CELERYD="-m celery.bin.celeryd_detach"
-+ENABLED="false"
++CELERYD_ENABLED="false"
  
 -# /etc/init.d/celeryd: start and stop the celery task worker daemon.
 +[ -r "$CELERY_DEFAULTS" ] && . "$CELERY_DEFAULTS"
@@ -31,7 +37,7 @@
 -test -f "$CELERY_DEFAULTS" && . "$CELERY_DEFAULTS"
 -if [ -f "/etc/default/celeryd" ]; then
 -    . /etc/default/celeryd
-+if [ "$ENABLED" != "true" ]; then
++if [ "$CELERYD_ENABLED" != "true" ]; then
 +    echo "celery daemon disabled - see /etc/default/celeryd."
 +    exit 0
  fi
@@ -40,6 +46,11 @@
  CELERYD_PID_FILE=${CELERYD_PID_FILE:-${CELERYD_PIDFILE:-$DEFAULT_PID_FILE}}
  CELERYD_LOG_FILE=${CELERYD_LOG_FILE:-${CELERYD_LOGFILE:-$DEFAULT_LOG_FILE}}
  CELERYD_LOG_LEVEL=${CELERYD_LOG_LEVEL:-${CELERYD_LOGLEVEL:-$DEFAULT_LOG_LEVEL}}
++CELERYD_USER=${CELERYD_USER:-$DEFAULT_USER}
++CELERYD_GROUP=${CELERYD_GROUP:-$DEFAULT_GROUP}
+ CELERYD_MULTI=${CELERYD_MULTI:-"celeryd-multi"}
+ CELERYD=${CELERYD:-$DEFAULT_CELERYD}
+ CELERYCTL=${CELERYCTL:="celeryctl"}
 --- a/contrib/generic-init.d/celeryevcam
 +++ b/contrib/generic-init.d/celeryevcam
 @@ -1,6 +1,6 @@
@@ -50,7 +61,7 @@
  # ============================================
  #
  # :Usage: /etc/init.d/celeryd {start|stop|force-reload|restart|try-restart|status}
-@@ -78,12 +78,13 @@
+@@ -78,35 +78,44 @@
  #       Full path to the virtualenv environment to activate. Default is none.
  
  ### BEGIN INIT INFO
@@ -65,11 +76,19 @@
  ### END INIT INFO
  
  # Cannot use set -e/bash -e since the kill -0 command will abort
-@@ -94,13 +95,15 @@
- DEFAULT_LOG_FILE="/var/log/celeryev.log"
+ # abnormally in the absence of a valid process ID.
+ #set -e
+ 
+-DEFAULT_PID_FILE="/var/run/celeryev.pid"
+-DEFAULT_LOG_FILE="/var/log/celeryev.log"
++DEFAULT_PID_FILE="/var/run/celery/celeryev.pid"
++DEFAULT_LOG_FILE="/var/log/celery/celeryev.log"
  DEFAULT_LOG_LEVEL="INFO"
++DEFAULT_USER="celery"
++DEFAULT_GROUP="celery"
  DEFAULT_CELERYEV="/usr/bin/celeryev"
-+ENABLED="false"
++DEFAULT_CAM="djcelery.snapshot.Camera"
++CELERYEV_ENABLED="false"
  
 -if test -f /etc/default/celeryd; then
 -    . /etc/default/celeryd
@@ -80,13 +99,22 @@
  
 -if test -f /etc/default/celeryev; then
 -    . /etc/default/celeryev
-+if [ "$ENABLED" != "true" ]; then
-+    echo "celeryevcam daemon disabled - see /etc/default/celeryd."
++if [ "$CELERYEV_ENABLED" != "true" ]; then
++    echo "celeryevcam daemon disabled - see /etc/default/celeryevcam."
 +    exit 0
  fi
  
  CELERYEV=${CELERYEV:-$DEFAULT_CELERYEV}
-@@ -197,7 +200,16 @@
+ CELERYEV_PID_FILE=${CELERYEV_PID_FILE:-${CELERYEV_PIDFILE:-$DEFAULT_PID_FILE}}
+ CELERYEV_LOG_FILE=${CELERYEV_LOG_FILE:-${CELERYEV_LOGFILE:-$DEFAULT_LOG_FILE}}
+ CELERYEV_LOG_LEVEL=${CELERYEV_LOG_LEVEL:-${CELERYEV_LOG_LEVEL:-$DEFAULT_LOG_LEVEL}}
++CELERYEV_USER=${CELERYEV_USER:-${CELERYD_USER:-$DEFAULT_USER}}
++CELERYEV_GROUP=${CELERYEV_GROUP:-${CELERYD_GROUP:-$DEFAULT_GROUP}}
++CELERYEV_CAM= ${CELERYEV_CAM:-$DEFAULT_CAM}
+ 
+ export CELERY_LOADER
+ 
+@@ -197,7 +206,16 @@
                --pidfile="$CELERYEV_PID_FILE"
  }
  
@@ -104,7 +132,7 @@
  
  case "$1" in
    start)
-@@ -216,9 +228,12 @@
+@@ -216,9 +234,12 @@
      check_dev_null
      start_evcam
      ;;
@@ -120,7 +148,7 @@
  
 --- a/contrib/generic-init.d/celerybeat
 +++ b/contrib/generic-init.d/celerybeat
-@@ -15,6 +15,7 @@
+@@ -15,31 +15,37 @@
  # Default-Start:     2 3 4 5
  # Default-Stop:      0 1 6
  # Short-Description: celery periodic task scheduler
@@ -128,11 +156,18 @@
  ### END INIT INFO
  
  # Cannot use set -e/bash -e since the kill -0 command will abort
-@@ -25,15 +26,15 @@
- DEFAULT_LOG_FILE="/var/log/celerybeat.log"
+ # abnormally in the absence of a valid process ID.
+ #set -e
+ 
+-DEFAULT_PID_FILE="/var/run/celerybeat.pid"
+-DEFAULT_LOG_FILE="/var/log/celerybeat.log"
++DEFAULT_PID_FILE="/var/run/celery/celerybeat.pid"
++DEFAULT_LOG_FILE="/var/log/celery/celerybeat.log"
++DEFAULT_USER="celery"
++DEFAULT_GROUP="celery"
  DEFAULT_LOG_LEVEL="INFO"
  DEFAULT_CELERYBEAT="celerybeat"
-+ENABLED="false"
++CELERYBEAT_ENABLED="false"
  
 -# /etc/init.d/ssh: start and stop the celery task worker daemon.
 +[ -r /etc/default/celeryd ] && . /etc/default/celeryd
@@ -144,13 +179,22 @@
  
 -if test -f /etc/default/celerybeat; then
 -    . /etc/default/celerybeat
-+if [ "$ENABLED" != "true" ]; then
-+    echo "celerybeat daemon disabled - read /etc/default/celeryd."
++if [ "$CELERYBEAT_ENABLED" != "true" ]; then
++    echo "celerybeat daemon disabled - see /etc/default/celerybeat."
 +    exit 0
  fi
  
  CELERYBEAT=${CELERYBEAT:-$DEFAULT_CELERYBEAT}
-@@ -125,7 +126,16 @@
+ CELERYBEAT_PID_FILE=${CELERYBEAT_PID_FILE:-${CELERYBEAT_PIDFILE:-$DEFAULT_PID_FILE}}
+ CELERYBEAT_LOG_FILE=${CELERYBEAT_LOG_FILE:-${CELERYBEAT_LOGFILE:-$DEFAULT_LOG_FILE}}
+ CELERYBEAT_LOG_LEVEL=${CELERYBEAT_LOG_LEVEL:-${CELERYBEAT_LOGLEVEL:-$DEFAULT_LOG_LEVEL}}
++CELERYBEAT_USER=${CELERYBEAT_USER:-$DEFAULT_USER}
++CELERYBEAT_USER=${CELERYBEAT_USER:-${CELERYD_USER:-$DEFAULT_USER}}
++CELERYBEAT_GROUP=${CELERYBEAT_GROUP:-${CELERYD_GROUP:-$DEFAULT_GROUP}}
+ 
+ export CELERY_LOADER
+ 
+@@ -125,7 +131,16 @@
                  --pidfile="$CELERYBEAT_PID_FILE"
  }
  
@@ -168,7 +212,7 @@
  
  case "$1" in
    start)
-@@ -144,9 +154,12 @@
+@@ -144,9 +159,12 @@
      check_dev_null
      start_beat
      ;;

Added: packages/celery/tags/2.5.3-1/debian/python-celery.celerybeat.default
===================================================================
--- packages/celery/tags/2.5.3-1/debian/python-celery.celerybeat.default	                        (rev 0)
+++ packages/celery/tags/2.5.3-1/debian/python-celery.celerybeat.default	2013-01-17 10:40:36 UTC (rev 23330)
@@ -0,0 +1,37 @@
+# Edit the options in this file to match your projects environment.
+# See http://ask.github.com/celery/cookbook/daemonizing.html for the complete
+# documentation on the options.
+
+# Change this to true when done to enable the init.d script. 
+# Default: false
+CELERYBEAT_ENABLED="false"
+
+# Path to the celerybeat program.
+# You can point this to an virtualenv, or even use manage.py for django.
+#CELERYBEAT="/usr/bin/celerybeat"
+
+# Where to chdir at start. This path should point to the directory containing
+# the celeryconfig.py file of a python project.
+# (required!)
+#CELERYD_CHDIR="/opt/Myproject/"
+
+# Additional arguments to celerybeat, see `celeryd --help` for a list.
+#CELERYBEAT_OPTS=""
+
+# Full path to the pidfile.
+#CELERYBEAT_PID_FILE="/var/run/celery/celerybeat.pid"
+
+# Full path to the celerybeat logfile.
+#CELERYBEAT_LOG_FILE="/var/log/celery/celerybeat.log"
+
+# Log level to use for celerybeat.
+#CELERYBEAT_LOG_LEVEL="INFO"
+
+# User to run celerybeat as.
+#CELERYBEAT_USER="celery"
+
+# Group to run celerybeat as.
+#CELERYBEAT_GROUP="celery"
+
+# Full path to the virtualenv environment to activate.
+#VIRTUALENV=""

Modified: packages/celery/tags/2.5.3-1/debian/python-celery.celeryd.default
===================================================================
--- packages/celery/tags/2.5.3-1/debian/python-celery.celeryd.default	2013-01-17 00:35:25 UTC (rev 23329)
+++ packages/celery/tags/2.5.3-1/debian/python-celery.celeryd.default	2013-01-17 10:40:36 UTC (rev 23330)
@@ -9,27 +9,31 @@
 
 # Change this to true when done to enable the init.d script. 
 # Default: false
-ENABLED="false"
+CELERYD_ENABLED="false"
 
 # Name of nodes to start
 # here we have a single node
-CELERYD_NODES="w1"
+#CELERYD_NODES="w1"
+
 # or we could have three nodes:
 #CELERYD_NODES="w1 w2 w3"
 
-# Where to chdir at start.
-CELERYD_CHDIR="/opt/Myproject/"
+# Where to chdir at start. This path should point to the directory containing
+# the celeryconfig.py file of a python project.
+# (required!)
+#CELERYD_CHDIR="/opt/Myproject/"
 
+# Name of the celery config module.
+#CELERY_CONFIG_MODULE="celeryconfig"
+
 # Extra arguments to celeryd
-CELERYD_OPTS="--time-limit=300 --concurrency=8"
+#CELERYD_OPTS="--time-limit=300 --concurrency=8"
 
-# Name of the celery config module.
-CELERY_CONFIG_MODULE="celeryconfig"
+# Workers should run as an unprivileged user.
+#CELERYD_USER="celery"
+#CELERYD_GROUP="celery"
 
 # %n will be replaced with the nodename.
-CELERYD_LOG_FILE="/var/log/celery/%n.log"
-CELERYD_PID_FILE="/var/run/celery/%n.pid"
+#CELERYD_LOG_FILE="/var/log/celery/%n.log"
+#CELERYD_PID_FILE="/var/run/celery/%n.pid"
 
-# Workers should run as an unprivileged user.
-CELERYD_USER="celery"
-CELERYD_GROUP="celery"

Added: packages/celery/tags/2.5.3-1/debian/python-celery.celeryevcam.default
===================================================================
--- packages/celery/tags/2.5.3-1/debian/python-celery.celeryevcam.default	                        (rev 0)
+++ packages/celery/tags/2.5.3-1/debian/python-celery.celeryevcam.default	2013-01-17 10:40:36 UTC (rev 23330)
@@ -0,0 +1,39 @@
+# Edit the options in this file to match your projects environment.
+# See http://ask.github.com/celery/cookbook/daemonizing.html for the complete
+# documentation on the options.
+
+# Change this to true when done to enable the init.d script. 
+# Default: false
+CELERYEV_ENABLED="false"
+
+# Path to the celeryev program.
+# You can point this to an virtualenv, or even use manage.py for django.
+#CELERYEV="/opt/myproject/manage.py"
+
+# Additional arguments to celeryd, see `celeryd --help` for a list.
+#CELERYEV_OPTS=""
+
+# Camera class to use.
+#CELERYEV_CAM="djcelery.snapshot.Camera"
+
+# User to run celeryev as.
+#CELERYEV_USER="celery"
+
+# Group to run celeryev as.
+#CELERYEV_GROUP="celery"
+
+# Full path to the virtualenv environment to activate.
+#VIRTUALENV=""
+      
+# Path to chdir at start.
+#CELERYEV_CHDIR="/opt/myproject"
+
+# Full path to the pidfile.
+#CELERYEV_PID_FILE="/var/run/celery/celeryev.pid"
+
+# Full path to the celeryev logfile.
+#CELERYEV_LOG_FILE="/var/log/celery/celeryev.log"
+
+# Log level to use for celeryev.
+#CELERYEV_LOG_LEVEL="INFO"
+

Added: packages/celery/tags/2.5.3-1/debian/python-celery.postinst
===================================================================
--- packages/celery/tags/2.5.3-1/debian/python-celery.postinst	                        (rev 0)
+++ packages/celery/tags/2.5.3-1/debian/python-celery.postinst	2013-01-17 10:40:36 UTC (rev 23330)
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+    configure|reconfigure)
+        getent group celery >/dev/null 2>&1 || \
+            addgroup --system --quiet celery
+        getent passwd celery >/dev/null 2>&1 || \
+            adduser --system --quiet --disabled-password --disabled-login \
+            --home /usr/share/pyshared/celery --no-create-home --ingroup celery celery
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+        exit 0
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+

Added: packages/celery/tags/2.5.3-1/debian/python-celery.postrm
===================================================================
--- packages/celery/tags/2.5.3-1/debian/python-celery.postrm	                        (rev 0)
+++ packages/celery/tags/2.5.3-1/debian/python-celery.postrm	2013-01-17 10:40:36 UTC (rev 23330)
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+    purge)
+        deluser --system --quiet celery || true
+        delgroup --system --quiet --only-if-empty celery || true
+	;;
+    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+	;;
+    *)
+	echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+esac
+
+#DEBHELPER#
+
+exit 0

Modified: packages/celery/tags/2.5.3-1/debian/rules
===================================================================
--- packages/celery/tags/2.5.3-1/debian/rules	2013-01-17 00:35:25 UTC (rev 23329)
+++ packages/celery/tags/2.5.3-1/debian/rules	2013-01-17 10:40:36 UTC (rev 23330)
@@ -43,4 +43,3 @@
 	dh_installinit --name celerybeat
 	dh_installinit --name celeryd
 	dh_installinit --name celeryevcam
-	dh_installinit --name celery




More information about the Python-modules-commits mailing list