Tags: patch I have updated supervisor to the latest version available, 3.0b2, and updated packaging for the moved source files and heavily updated python packaging guidelines since the last upload a long time ago.
This was done for Ubuntu, the UDD branch (source with packaging) is available at https://code.launchpad.net/~menesis/ubuntu/raring/supervisor/raring and a package was built for several Ubuntu releases in a PPA: https://launchpad.net/~schooltool-owners/+archive/dev/ Attached is a diff of debian/ , solving this and many other Debian bugs regarding supervisor.
=== renamed file 'debian/README.conf' => 'debian/README' === modified file 'debian/changelog' --- debian/changelog 2011-05-08 16:45:52 +0000 +++ debian/changelog 2013-07-22 13:35:52 +0000 @@ -1,3 +1,34 @@ +supervisor (3.0b2-1) unstable; urgency=low + + * New upstream release. (Closes: #697883) + - fixes parsing of environment option (Closes: #700370) + * debian/control: + - remove python-support from Build-Depends + - requires Python >= 2.4 + - bump Standards-Version to 3.9.4 + - replace Depends with dh_python2's substvars + - drop Depends on python-medusa because a patched version is included + in the tarball. + - fix lintian warnings in description (Closes: #697622) + * debian/rules: + - replace everything by dh --with python2 + - install test files + - do not install medusa/debian subdirectory + * debian/supervisor.install: install conffiles, remove dirs installed by + default. + * debian/supervisor.dirs: create etc/supervisor/conf.d + * debian/supervisor.pyinstall: add to install version.txt + * debian/supervisor.init: fix restart (Closes: #609457) + * debian/supervisor.examples, debian/supervisor.docs: update for renamed + source files. + * debian/watch: download from PyPI, there are no files at supervisord.org + * Switch to 3.0 (quilt) source format. + * debian/patches/read-version.txt.patch: add to fix finding the version.txt file + * debian/patches/etc-supervisor.patch: add /etc/supervisor/supervisord.conf + to config file search path. + + -- Gediminas Paulauskas <mene...@pov.lt> Wed, 05 Jun 2013 18:47:18 +0300 + supervisor (3.0a8-1.1) unstable; urgency=low * Non-maintainer upload. === modified file 'debian/control' --- debian/control 2009-11-07 13:06:00 +0000 +++ debian/control 2013-07-22 13:35:50 +0000 @@ -2,19 +2,19 @@ Section: admin Priority: extra Maintainer: Anders Hammarquist <i...@debian.org> -Build-Depends: debhelper (>= 7), python-setuptools (>= 0.6c7), python-support, python-all (>= 2.3.5-7) -XS-Python-Version: >= 2.3 -Standards-Version: 3.8.3 +Build-Depends: debhelper (>= 7.0.50~), python-setuptools, python-all (>= 2.6.6-3~) +XS-Python-Version: >= 2.4 +Standards-Version: 3.9.4 Homepage: http://supervisord.org/ Package: supervisor Architecture: all -Depends: python (>= 2.3), python-medusa (>= 0.5.4), python-meld3, python-pkg-resources (>= 0.6c7), ${python:Depends} -Description: A system for controlling process state +Depends: ${python:Depends}, ${misc:Depends} +Description: System for controlling process state Supervisor is a system for controlling and maintaining process state, similar to what init does, but not intended as an init replacement. . - It will manage individual processess or groups of processes that + It will manage individual processes or groups of processes that need to be started and stopped in order, and it is possible to - control individual process state via an rpc mechanism, thus allowing + control individual process state via an RPC mechanism, thus allowing ordinary users to restart processes. === added directory 'debian/patches' === added file 'debian/patches/etc-supervisor.patch' --- debian/patches/etc-supervisor.patch 1970-01-01 00:00:00 +0000 +++ debian/patches/etc-supervisor.patch 2013-06-07 18:05:20 +0000 @@ -0,0 +1,14 @@ +Index: supervisor/supervisor/options.py +=================================================================== +--- supervisor.orig/supervisor/options.py ++++ supervisor/supervisor/options.py +@@ -99,7 +99,8 @@ class Options: + searchpaths = [os.path.join(here, 'etc', 'supervisord.conf'), + os.path.join(here, 'supervisord.conf'), + 'supervisord.conf', 'etc/supervisord.conf', +- '/etc/supervisord.conf'] ++ '/etc/supervisord.conf', ++ '/etc/supervisor/supervisord.conf'] + self.searchpaths = searchpaths + + def default_configfile(self): === added file 'debian/patches/read-version.txt.patch' --- debian/patches/read-version.txt.patch 1970-01-01 00:00:00 +0000 +++ debian/patches/read-version.txt.patch 2013-06-06 21:43:52 +0000 @@ -0,0 +1,15 @@ +Index: supervisor/supervisor/options.py +=================================================================== +--- supervisor.orig/supervisor/options.py ++++ supervisor/supervisor/options.py +@@ -51,9 +51,7 @@ from supervisor import loggers + from supervisor import states + from supervisor import xmlrpc + +-mydir = os.path.abspath(os.path.dirname(__file__)) +-version_txt = os.path.join(mydir, 'version.txt') +-VERSION = open(version_txt).read().strip() ++VERSION = pkg_resources.resource_string('supervisor', 'version.txt').strip() + + def normalize_path(v): + return os.path.normpath(os.path.abspath(os.path.expanduser(v))) === added file 'debian/patches/series' --- debian/patches/series 1970-01-01 00:00:00 +0000 +++ debian/patches/series 2013-06-07 18:04:23 +0000 @@ -0,0 +1,2 @@ +read-version.txt.patch +etc-supervisor.patch === modified file 'debian/rules' --- debian/rules 2009-11-07 13:06:00 +0000 +++ debian/rules 2013-07-22 13:33:43 +0000 @@ -1,109 +1,11 @@ #!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -export DH_VERBOSE=1 -PYDEF=$(shell pyversions -d) -PYVERS=$(shell pyversions -r) - --include /usr/share/python/python.mk - -configure: configure-stamp -configure-stamp: - dh_testdir - # Add here commands to configure the package. - - touch configure-stamp - - -build: build-stamp - -build-stamp: configure-stamp - dh_testdir - - # Add here commands to compile the package. - for python in $(PYVERS); do \ - python=$$(echo $$python | sed "s/$(PYDEF)/python/"); \ - $$python setup.py build; \ - done - touch $@ - -clean: - dh_testdir - dh_testroot - for python in $(PYVERS); do \ - python=$$(echo $$python | sed "s/$(PYDEF)/python/"); \ - $$python setup.py clean; \ - done - rm -f *.pyc build-stamp configure-stamp src/supervisor.egg-info/SOURCES.txt - - # Add here commands to clean up after the build process. - rm -rf build/ - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_prep - dh_installdirs - - # Add here commands to install the package into debian/supervisor. - set -e; \ - for python in $(PYVERS); do \ - pydir=$$python \ - python=$$(echo $$python | sed "s/$(PYDEF)/python/"); \ - $$python setup.py install --single-version-externally-managed --root=debian/tmp --no-compile $(py_setup_install_args); \ - done - rm -f debian/tmp/usr/lib/python*/*-packages/supervisor*.egg-info/requires.txt - - : # Replace all '#!' calls to python with /usr/bin/python - : # and make them executable - for i in `find debian -mindepth 3 -type f`; do \ - sed '1s,#!.*python[^ ]*\(.*\),#! /usr/bin/python\1,' \ - $$i > $$i.temp; \ - if cmp --quiet $$i $$i.temp; then \ - rm -f $$i.temp; \ - else \ - mv -f $$i.temp $$i; \ - chmod 755 $$i; \ - echo "fixed interpreter: $$i"; \ - fi; \ - done - - # Configuration - install -d debian/tmp/etc/supervisor/conf.d - install -m 644 debian/README.conf debian/tmp/etc/supervisor/conf.d/README - install -m 644 debian/supervisord.conf debian/tmp/etc/supervisor/supervisord.conf - -# Build architecture-independent files here. -binary-arch: build install -# We have nothing to do. - -# Build architecture-dependent files here. -binary-indep: build install - dh_testdir - dh_testroot + +%: + dh $@ --with python2 + +override_dh_auto_install: + rm -rf supervisor/medusa/debian + dh_auto_install + +override_dh_installchangelogs: dh_installchangelogs CHANGES.txt - dh_installdocs - dh_installexamples - dh_install --sourcedir=debian/tmp --exclude=test - dh_pysupport - dh_installinit - dh_installman - dh_link - dh_strip - dh_compress - dh_fixperms - dh_installdeb - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure === added directory 'debian/source' === added file 'debian/source/format' --- debian/source/format 1970-01-01 00:00:00 +0000 +++ debian/source/format 2013-06-06 20:46:50 +0000 @@ -0,0 +1,1 @@ +3.0 (quilt) === modified file 'debian/supervisor.dirs' --- debian/supervisor.dirs 2009-07-30 11:29:24 +0000 +++ debian/supervisor.dirs 2013-06-06 20:31:09 +0000 @@ -1,2 +1,2 @@ var/log/supervisor - +etc/supervisor/conf.d === modified file 'debian/supervisor.docs' --- debian/supervisor.docs 2009-07-30 11:29:24 +0000 +++ debian/supervisor.docs 2013-06-06 20:31:09 +0000 @@ -1,2 +1,2 @@ -README.txt +README.rst TODO.txt === modified file 'debian/supervisor.examples' --- debian/supervisor.examples 2009-07-30 11:29:24 +0000 +++ debian/supervisor.examples 2013-06-06 20:31:09 +0000 @@ -1,6 +1,6 @@ -src/supervisor/scripts/loop_eventgen.py -src/supervisor/scripts/loop_listener.py -src/supervisor/scripts/sample_commevent.py -src/supervisor/scripts/sample_eventlistener.py -src/supervisor/scripts/sample_exiting_eventlistener.py -src/supervisor/skel/sample.conf +supervisor/scripts/loop_eventgen.py +supervisor/scripts/loop_listener.py +supervisor/scripts/sample_commevent.py +supervisor/scripts/sample_eventlistener.py +supervisor/scripts/sample_exiting_eventlistener.py +supervisor/skel/sample.conf === modified file 'debian/supervisor.init' --- debian/supervisor.init 2009-07-30 11:29:24 +0000 +++ debian/supervisor.init 2013-06-06 20:31:09 +0000 @@ -1,15 +1,4 @@ #! /bin/sh -# -# skeleton example file to build /etc/init.d/ scripts. -# This file should be used to construct scripts for /etc/init.d. -# -# Written by Miquel van Smoorenburg <miqu...@cistron.nl>. -# Modified for Debian -# by Ian Murdock <imurd...@gnu.ai.mit.edu>. -# Further changes by Javier Fernandez-Sanguino <j...@debian.org> -# -# Version: @(#)skeleton 1.9 26-Feb-2001 miqu...@cistron.nl -# ### BEGIN INIT INFO # Provides: supervisor # Required-Start: $remote_fs $network $named @@ -91,7 +80,7 @@ start) echo -n "Starting $DESC: " start-stop-daemon --start --quiet --pidfile $PIDFILE \ - --exec $DAEMON -- $DAEMON_OPTS + --startas $DAEMON -- $DAEMON_OPTS test -f $PIDFILE || sleep 1 if running ; then echo "$NAME." @@ -123,7 +112,7 @@ # # echo "Reloading $DESC configuration files." # start-stop-daemon --stop --signal 1 --quiet --pidfile \ - # /var/run/$NAME.pid --exec $DAEMON + # $PIDFILE --exec $DAEMON #;; force-reload) # @@ -132,18 +121,17 @@ # just the same as "restart" except that it does nothing if the # daemon isn't already running. # check wether $DAEMON is running. If so, restart - start-stop-daemon --stop --test --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON \ + start-stop-daemon --stop --test --quiet --pidfile $PIDFILE\ + --startas $DAEMON \ && $0 restart \ || exit 0 ;; restart) echo -n "Restarting $DESC: " - start-stop-daemon --stop --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON + start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE [ -n "$DODTIME" ] && sleep $DODTIME - start-stop-daemon --start --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS + start-stop-daemon --start --quiet --pidfile $PIDFILE\ + --startas $DAEMON -- $DAEMON_OPTS echo "$NAME." ;; status) === modified file 'debian/supervisor.install' --- debian/supervisor.install 2009-07-30 11:29:24 +0000 +++ debian/supervisor.install 2013-06-06 20:35:32 +0000 @@ -1,3 +1,2 @@ -etc -usr/bin -usr/lib +debian/README etc/supervisor/conf.d +debian/supervisord.conf etc/supervisor === added file 'debian/supervisor.pyinstall' --- debian/supervisor.pyinstall 1970-01-01 00:00:00 +0000 +++ debian/supervisor.pyinstall 2013-06-06 20:14:19 +0000 @@ -0,0 +1,1 @@ +supervisor/version.txt supervisor === modified file 'debian/supervisord.conf' --- debian/supervisord.conf 2009-07-30 11:29:24 +0000 +++ debian/supervisord.conf 2013-06-06 20:31:09 +0000 @@ -1,7 +1,7 @@ ; supervisor config file [unix_http_server] -file=/var/run//supervisor.sock ; (the path to the socket file) +file=/var/run/supervisor.sock ; (the path to the socket file) chmod=0700 ; sockef file mode (default 0700) [supervisord] @@ -16,7 +16,7 @@ supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface [supervisorctl] -serverurl=unix:///var/run//supervisor.sock ; use a unix:// URL for a unix socket +serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket ; The [include] section can just contain the "files" setting. This ; setting can list multiple files (separated by whitespace or === modified file 'debian/watch' --- debian/watch 2009-07-30 11:29:24 +0000 +++ debian/watch 2013-06-05 15:49:56 +0000 @@ -1,9 +1,2 @@ -# Example watch control file for uscan -# Rename this file to "watch" and then you can run the "uscan" command -# to check for upstream updates and more. -# See uscan(1) for format - -# Compulsory line, this is a version 3 file version=3 - -http://dist.supervisord.org/supervisor-(.*)\.tar\.gz +http://pypi.python.org/packages/source/s/supervisor/supervisor-(.*).tar.gz