--- runit-1.8.0.orig/debian/2
+++ runit-1.8.0/debian/2
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin
+
+exec env - PATH=$PATH \
+runsvdir -P /etc/service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
--- runit-1.8.0.orig/debian/changelog
+++ runit-1.8.0/debian/changelog
@@ -0,0 +1,611 @@
+runit (1.8.0-5~bpo40+1) etch-backports; urgency=low
+
+  * build for etch.
+
+ -- Gerrit Pape <pape@smarden.org>  Sun, 30 Mar 2008 22:53:44 +0000
+
+runit (1.8.0-5) unstable; urgency=low
+
+  * debian/runit.postinst: do not kill and restart runsvdir at all (closes:
+    #468642); it'll still run in /var/service/, but a backward compatibility
+    symlink is provided.
+
+ -- Gerrit Pape <pape@smarden.org>  Sun, 02 Mar 2008 15:42:22 +0000
+
+runit (1.8.0-4) unstable; urgency=low
+
+  * debian/runit.preinst: /etc/service transition: check whether
+    /var/service/ is empty before copying its content (closes: #467412),
+    when moving create compatibility symlink.
+  * debian/update-service.8: typo.
+  * debian/runit.postinst: /etc/service transition: don't explicitely use
+    sv to take down services; exec into kill to SIGHUP runsvdir or pid 1.
+
+ -- Gerrit Pape <pape@smarden.org>  Mon, 25 Feb 2008 18:51:47 +0000
+
+runit (1.8.0-3) unstable; urgency=low
+
+  * debian/update-service: enforce argument; enforce <service-name> must
+    not start with a dot and must not contain a slash.
+  * debian/update-service: prefix fatal and warn message with progname;
+    only warn on --remove if service is not registered, still fatal if it
+    is not a symlink.
+  * debian/2, debian/rules, debian/runit.README.Debian,
+    debian/runsvdir-start.8, debian/update-service, debian/update-service.8:
+    switch directory for services from /var/service/ to /etc/service/
+    (#461478).
+  * debian/runit.postrm: purge: adapt paths in /var/run/, remove ./supervise/
+    subdirectories (or symlinks) in getty-5 service directory.
+  * debian/update-service: when successfully adding a service simply print
+    "Service <service-name> added." (thx Daniel Kahn Gillmor, closes:
+    #466579).
+  * debian/runit.preinst, debian/runit.postinst: move away from /var/service/
+    to /etc/service/; restart runsvdir; retain backward compatibility symlink
+    /var/service -> /etc/service until rdepends have adopted (#461478).
+  * debian/update-service, debian/update-service.8: create symbolic links for
+    ./supervise/ directories only if the service-directory resides in /etc/;
+    don't re-create ./log/supervise/ symlink if it already is a symlink, just
+    as already done for ./supervise/ (thx Jameson Rollins, closes: #466885).
+  * debian/update-service, debian/update-service.8: symbolic links for
+    ./supervise/ directories now point into /var/lib/supervise/ instead of
+    /var/run/, so that they survive a reboot.
+  * debian/rules: install /var/lib/supervise/.
+  * debian/update-service: don't get confused if service-directory ends with
+    a slash.
+  * debian/runit.postrm: purge: remove /var/service compatibility symlink.
+  * debian/diff/0001-runit-s-directory-for-services-on-Debian-is-etc-ser.diff:
+    new: runit's directory for services on Debian is /etc/service/, not
+    /var/service/.
+  * debian/rules: target unpack: apply patch debian/diff/0001-*.
+
+ -- Gerrit Pape <pape@smarden.org>  Sun, 24 Feb 2008 18:34:35 +0000
+
+runit (1.8.0-2) unstable; urgency=low
+
+  * debian/update-service, debian/update-service.8: new; add/remove a
+    service to/from system-wide service supervision (helps to move away
+    from /var/service/, #461478).
+  * debian/rules: install update-service program and its manpage.
+
+ -- Gerrit Pape <pape@smarden.org>  Mon, 11 Feb 2008 22:38:24 +0000
+
+runit (1.8.0-1) unstable; urgency=low
+
+  * new upstream version.
+    * builds against recent dietlibc-dev (closes: #406217).
+    * man/svlogd.8: add hint about increasing the buffer size if lots of
+      data is to be processed in short time (closes: #386608).
+    * man/svlogd.8: add hint on how to manually remove log files after the
+      number of log files svlogd should maintain has been reduced (closes:
+      #391360).
+
+ -- Gerrit Pape <pape@smarden.org>  Fri, 21 Sep 2007 01:01:14 +0000
+
+runit (1.7.2-1) unstable; urgency=low
+
+  * new upstream version.
+
+ -- Gerrit Pape <pape@smarden.org>  Tue, 21 Nov 2006 15:14:55 +0000
+
+runit (1.7.1-1) unstable; urgency=low
+
+  * new upstream version.
+    * clarifies that chpst looks up users/groups in /etc/passwd/group
+      only, allows to specify users/groups by uid/gid (closes: #380261).
+
+ -- Gerrit Pape <pape@smarden.org>  Sat,  4 Nov 2006 19:24:50 +0000
+
+runit (1.7.0-1) unstable; urgency=low
+
+  * new upstream version.
+  * debian/control: Standards-Version: 3.7.2.1.
+
+ -- Gerrit Pape <pape@smarden.org>  Mon, 16 Oct 2006 19:17:32 +0000
+
+runit (1.6.0-1) unstable; urgency=low
+
+  * new upstream version.
+    * cleanup *.t files possibly leftover by processor when interrupted by
+      signal, also on startup (thx Andras Korn, closes: #369840).
+
+ -- Gerrit Pape <pape@smarden.org>  Thu, 29 Jun 2006 07:55:14 +0000
+
+runit (1.5.1-1) unstable; urgency=low
+
+  * new upstream version.
+  * debian/runit.NEWS.Debian: new (1.4.1-1): the sv program replaces
+    runsvctrl, runsvstat, svwaitdown, svwaitup (closes: #364732).
+
+ -- Gerrit Pape <pape@smarden.org>  Sat, 13 May 2006 15:30:53 +0000
+
+runit (1.5.0-1) unstable; urgency=low
+
+  * new upstream version.
+    * adds configuration option p (prefix) to svlogd (closes: #356339).
+  * debian/implicit: update to revision 1.11.
+  * debian/control: Recommends: fgetty; Suggests: socklog-run.
+
+ -- Gerrit Pape <pape@smarden.org>  Sun, 16 Apr 2006 12:40:11 +0000
+
+runit (1.4.1-1) unstable; urgency=low
+
+  * new upstream version.
+    * fixes setting of multiple groups with dietlibc (thx Tino Keitel,
+      closes: #356016).
+  * debian/rules: no longer install the runsvctrl, runsvstat, svwaitdown,
+    svwaitup programsi an man pages, use sv instead; move getty-5 service
+    directory to /etc/sv/getty-5/; move /var/run/getty-5/ to
+    /var/run/sv.getty-5/.
+  * debian/runit.conffiles: adapt.
+  * debian/runit.preinst, debian/runit.postinst: move conffiles, preserve
+    user changes.
+
+ -- Gerrit Pape <pape@smarden.org>  Mon, 20 Mar 2006 19:34:34 +0000
+
+runit (1.3.3-1) unstable; urgency=low
+
+  * new upstream version.
+
+ -- Gerrit Pape <pape@smarden.org>  Mon,  2 Jan 2006 20:41:54 +0000
+
+runit (1.3.2-1) unstable; urgency=low
+
+  * new upstream version.
+    * svlogd.c: don't print extra newlines to the log if additionally
+      writing to the network through udp (thx Andras Korn, closes: #339030).
+  * debian/control: update long description; Standards-Version: 3.6.2.1.
+  * debian/rules: get upstream version from debian/changelog.
+
+ -- Gerrit Pape <pape@smarden.org>  Sun, 18 Dec 2005 11:52:21 +0000
+
+runit (1.3.1-1) unstable; urgency=low
+
+  * new upstream version.
+  * debian/runit.README.Debian: typo.
+  * debian/getty-tty5.run: dev-null output of 'type fgetty'.
+  * debian/2 (runsvdir-start): use -P option to runsvdir.
+
+ -- Gerrit Pape <pape@smarden.org>  Wed, 24 Aug 2005 20:15:39 +0000
+
+runit (1.3.0-1) unstable; urgency=low
+
+  * new upstream version.
+  * debian/diff/runsv.8.diff: remove; obsolete.
+  * debian/rules: adjust CFLAGS, LDFLAGS; install new sv program.
+
+ -- Gerrit Pape <pape@smarden.org>  Sun, 24 Jul 2005 16:51:07 +0000
+
+runit (1.2.3-1) unstable; urgency=low
+
+  * new upstream version.
+  * debian/copyright: 2005.
+  * debian/control: Suggests: fgetty.
+  * debian/getty-tty5.run: use fgetty if available.
+  * debian/diff/runsv.8.diff: new; fix typo in man page.
+  * debian/rules: target unpack: apply diff; install debian/getty-tty5.run,
+    debian/getty-tty5.finish.
+
+ -- Gerrit Pape <pape@smarden.org>  Sun,  8 May 2005 17:49:37 +0000
+
+runit (1.0.5-3) unstable; urgency=low
+
+  * debian/control, debian/rules: add Build-Depends: dietlibc-dev [ppc64];
+    add ppc64 to DIET_ARCHS (thx Andreas Jochens, closes: #299302).
+
+ -- Gerrit Pape <pape@smarden.org>  Fri, 25 Mar 2005 11:22:46 +0000
+
+runit (1.0.5-2) unstable; urgency=low
+
+  * debian/control: Build-Depends: dietlibc-dev (>> 0.28-0) to make diet
+    compiled programs work with a kernel with stack protection (thx Csillag
+    Tamas, closes: 299550).
+  * debian/runit.README.Debian: minor.
+
+ -- Gerrit Pape <pape@smarden.org>  Sun, 20 Mar 2005 19:49:38 +0000
+
+runit (1.0.5-1) unstable; urgency=low
+
+  * new upstream release.
+  * debian/getty-tty5.run: don't use absolute pathname.
+  * debian/control, debian/rules, runit.postinst, runit.postrm: minor
+    cleanup.
+  * debian/diff/svlogd.diff: remove; obsolete.
+  * debian/rules: don't apply patch.
+
+ -- Gerrit Pape <pape@smarden.org>  Tue, 21 Sep 2004 18:18:31 +0000
+
+runit (1.0.4-2) unstable; urgency=medium
+
+  * debian/diff/svlogd.diff: new; from upstream CVS: several minor fixes to
+    svlogd.
+  * debian/rules: apply patch in target unpack.
+
+ -- Gerrit Pape <pape@smarden.org>  Mon, 13 Sep 2004 08:37:27 +0000
+
+runit (1.0.4-1) unstable; urgency=low
+
+  * new upstream release.
+  * debian/control: Build-Depends: dietlibc-dev (>> 0.27-0).
+  * debian/rules: minor cleanup.
+  * debian/implicit: update to revision 1.10.
+  * debian/runit.README.Debian: minor.
+  * debian/runit.postinst, debian/runit.postrm, debian/runit.preinst:
+    simplify; cleanup.
+
+ -- Gerrit Pape <pape@smarden.org>  Sun,  1 Aug 2004 18:38:36 +0000
+
+runit (1.0.3-1) unstable; urgency=low
+
+  * new upstream release.
+  * debian/diff/chpst-chroot.diff: remove; included upstream.
+  * debian/rules: don't apply diff; shorten architecture-check.
+
+ -- Gerrit Pape <pape@smarden.org>  Sat, 26 Jun 2004 14:50:51 +0000
+
+runit (1.0.2-3) unstable; urgency=low
+
+  * debian/diff/chpst-chroot.diff: chdir before chroot; update
+    runscripts.html.
+  * debian/control: Build-Depends: dietlibc-dev (>> 0.26-0).
+
+ -- Gerrit Pape <pape@smarden.org>  Fri, 30 Apr 2004 18:55:09 +0000
+
+runit (1.0.2-2) unstable; urgency=low
+
+  * debian/diff/chpst-chroot.diff: new; chpst supports chroot though -/
+    option.
+  * debian/rules: new target unpack; apply chpst-chroot.diff; use
+    dietlibc-dev on amd64 (thx Andreas Jochens).
+  * debian/control: Build-Depends: dietlibc-dev +[amd64].
+
+ -- Gerrit Pape <pape@smarden.org>  Tue, 27 Apr 2004 17:55:40 +0000
+
+runit (1.0.2-1) unstable; urgency=low
+
+  * new upstream release.
+  * debian/implicit: update to revision 1.8.
+  * debian/control: Build-Depends: dietlibc-dev (>> 0.25-0) (fixes
+    build/testing failure on arm).
+  * debian/rules: remove workaround to suppress gcc-3.3 warnings (closes:
+    #239995).
+
+ -- Gerrit Pape <pape@smarden.org>  Tue, 30 Mar 2004 17:02:58 +0000
+
+runit (1.0.1-1) unstable; urgency=low
+
+  * new upstream release.
+   * chpst -e dir doesn't barf on subdirectories of dir (closes: #234172).
+  * debian/runsvdir-start.8: new; thx Bastian Kleineidam (closes: #234114).
+  * debian/rules: run make check; no longer provide /usr/sbin/setuidgid;
+    install runsvdir-start man page; create .diet/gcc on i386 to suppress
+    gcc warnings in build logs; minor.
+
+ -- Gerrit Pape <pape@smarden.org>  Mon,  8 Mar 2004 15:49:54 +0000
+
+runit (1.0.0-1) unstable; urgency=low
+
+  * upstream stable release.
+  * debian/implicit: update to revision 1.5.
+
+ -- Gerrit Pape <pape@smarden.org>  Tue, 10 Feb 2004 13:20:21 +0000
+
+runit (0.13.1-1) unstable; urgency=low
+
+  * new upstream version: fixes svlogd to print new-line character on end
+    of line properly (closes: #228446).
+
+ -- Gerrit Pape <pape@smarden.org>  Mon, 19 Jan 2004 13:37:13 +0000
+
+runit (0.13.0-1) unstable; urgency=low
+
+  * new upstream version: svlogd.8 documents -tt option (closes: #213011);
+    fixes typos in runsv.8 (closes: #223076).
+  * debian/control: Build-Depends: dietlibc, now also on s390.
+  * debian/rules: use dietlibc on s390.
+
+ -- Gerrit Pape <pape@smarden.org>  Mon, 12 Jan 2004 16:07:06 +0100
+
+runit (0.12.1-2) unstable; urgency=low
+
+  * debian/control: no longer Build-Depends: debhelper; Standards-Version:
+    3.6.1.0.
+  * debian/rules: stop using debhelper, use implicit rules; install runit,
+    runit-init mode 0755 (closes: #224800).
+  * debian/implicit: new; implicit Makefile rules.
+  * debian/README.Debian: rename to debian/runit.README.Debian.
+  * debian/runit.dirs, debian/runit.links: remove; obsolete.
+  * debian/runit.conffiles, debian/runit.docs: new.
+  * debian/runit.postinst, debian/runit.postrm, debian/runit.preinst: minor
+    cleanup.
+
+ -- Gerrit Pape <pape@smarden.org>  Mon, 29 Dec 2003 14:51:48 +0000
+
+runit (0.12.1-1) unstable; urgency=low
+
+  * new upstream version.
+  * debian/control: Build-Depends: dietlibc-dev (>> 0.24-0).
+
+ -- Gerrit Pape <pape@smarden.org>  Tue, 18 Nov 2003 15:45:02 +0000
+
+runit (0.12.0-1) unstable; urgency=low
+
+  * new upstream version.
+  * debian/control: adapt long description; Build-Depends: dietlibc-dev
+    (>= 0.23-3) (ia64).
+
+ -- Gerrit Pape <pape@smarden.org>  Mon,  3 Nov 2003 09:55:50 +0000
+
+runit (0.11.2-1) unstable; urgency=low
+
+  * new upstream version.
+  * debian/rules: install stage 2 as /usr/sbin/runsvdir-start for the use
+    with /etc/inittab; enable dh_link.
+  * debian/runit.dirs: add /var/service, /var/run/getty-5.
+  * debian/README.Debian: adapt; package now automatically enables service
+    supervision when used with sysvinit.
+  * debian/runit.links: new; create symlink for getty-5 service supervise
+    directory to /var/run/.
+  * debian/runit.postinst: new; add SV entry to /etc/inittab if not present
+    on install and upgrade; barf on fresh install if SV entry is present
+    (closes: #212311).
+  * debian/runit.postrm: new; remove SV inittab entry on de-install; force
+    remove /var/run/getty-5/ on purge.
+  * debian/control: Standards-Version: 3.6.0
+  * debian/1, debian/3: remove; obsolete.
+
+ -- Gerrit Pape <pape@smarden.org>  Tue, 23 Sep 2003 08:56:19 +0000
+
+runit (0.11.0-1) unstable; urgency=low
+
+  * new upstream version:
+    * chpst: new; run a program with a changed process state.
+  * debian/rules: install chpst program, install setuidgid as symlink
+    to chpst.
+
+ -- Gerrit Pape <pape@smarden.org>  Fri,  8 Aug 2003 13:37:45 +0200
+
+runit (0.10.0-1) unstable; urgency=low
+
+  * new upstream version.
+
+ -- Gerrit Pape <pape@smarden.org>  Sun, 22 Jun 2003 20:45:12 +0200
+
+runit (0.9.5-1) unstable; urgency=low
+
+  * new upstream version.
+  * debian/rules: don't extra build setuidgid, upstream Makefile
+    does.
+
+ -- Gerrit Pape <pape@smarden.org>  Tue, 17 Jun 2003 15:55:49 +0200
+
+runit (0.9.4-1) unstable; urgency=medium
+
+  * new upstream version.
+  * debian/diff/defaultsize.diff: remove; applied upstream.
+  * debian/getty.run, debian/getty.finish: remove; obsolete.
+  * debian/rules: remove temporary patch; install upstream example
+    getty service directory; build and install setuidgid (drop-in
+    replacement for daemontools' setuidgid).
+  * debian/control: Standards-Version: 3.5.10.
+
+ -- Gerrit Pape <pape@smarden.org>  Tue, 10 Jun 2003 09:45:28 +0200
+
+runit (0.9.3-2) unstable; urgency=low
+
+  * debian/README.Debian: more detailed instructions on how to use
+    service supervision without replacing sysvinit.
+
+ -- Gerrit Pape <pape@smarden.org>  Wed, 21 May 2003 21:16:48 +0200
+
+runit (0.9.3-1) unstable; urgency=low
+
+  * new upstream version.
+  * debian/diff/defaultsize.diff: new; fix default max. size for single
+    log files to match the documentation.
+  * debian/rules: patch upstream; show compiler version.
+
+ -- Gerrit Pape <pape@smarden.org>  Thu, 15 May 2003 12:03:22 +0200
+
+runit (0.9.2-1) unstable; urgency=low
+
+  * new upstream version.
+
+ -- Gerrit Pape <pape@smarden.org>  Sat,  3 May 2003 17:58:14 +0200
+
+runit (0.9.1-1) unstable; urgency=low
+
+  * new upstream version.
+
+ -- Gerrit Pape <pape@smarden.org>  Wed, 30 Apr 2003 22:22:17 +0200
+
+runit (0.9.0-1) unstable; urgency=low
+
+  * new upstream version.
+  * debian/rules: minor cleanup.
+  * debian/control: Standards-Version: 3.5.9.
+
+ -- Gerrit Pape <pape@smarden.org>  Fri, 25 Apr 2003 09:22:27 +0200
+
+runit (0.8.4-1) unstable; urgency=low
+
+  * new upstream version.
+
+ -- Gerrit Pape <pape@smarden.org>  Sun, 20 Apr 2003 19:34:37 +0200
+
+runit (0.8.1-1) unstable; urgency=low
+
+  * new upstream version.
+
+ -- Gerrit Pape <pape@smarden.org>  Wed, 12 Mar 2003 15:10:16 +0100
+
+runit (0.8.0-1) unstable; urgency=low
+
+  * new upstream version.
+
+ -- Gerrit Pape <pape@smarden.org>  Tue, 25 Feb 2003 16:17:46 +0100
+
+runit (0.7.2-2) unstable; urgency=low
+
+  * debian/rules: resurrect copyright file.
+
+ -- Gerrit Pape <pape@smarden.org>  Wed, 29 Jan 2003 19:29:33 +0100
+
+runit (0.7.2-1) unstable; urgency=low
+
+  * new upstream version.
+  * debian/rules: do not install /etc/runit/{1,2,3,ctrlaltdel} (now
+    included in the runit-run package); install docs without
+    dh_installdocs.
+  * debian/control: Standards-Version: 3.5.8.
+  * debian/runit.docs: remove.
+
+ -- Gerrit Pape <pape@smarden.org>  Wed, 29 Jan 2003 14:30:33 +0100
+
+runit (0.7.1-5) unstable; urgency=low
+
+  * debian/3: stop getties after all other services.
+  * debian/control: Architecture: any, build dependency sorts out;
+    build-depends on dietlibc >> 0.22-0 (available on ia64).
+  * debian/rules: use dh_installdocs -n.
+  * debian/runit.preinst: remove #DEBHELPER#.
+
+ -- Gerrit Pape <pape@smarden.org>  Thu,  5 Dec 2002 22:17:18 +0100
+
+runit (0.7.1-4) unstable; urgency=low
+
+  * debian/rules: install debian specific stage 3: fix path to service
+    directory.
+  * debian/3: new.
+
+ -- Gerrit Pape <pape@smarden.org>  Thu,  7 Nov 2002 18:33:52 +0100
+
+runit (0.7.1-3) unstable; urgency=low
+
+  * debian/control: build-depends on dietlibc >= 0.21-3 (fixes build
+    failure on mips/mipsel).
+  * debian/rules: debian/1: new.
+
+ -- Gerrit Pape <pape@smarden.org>  Sun,  3 Nov 2002 23:20:23 +0100
+
+runit (0.7.1-2) unstable; urgency=low
+
+  * debian/rules: let diet be verbose and mangle gcc options for platform
+    specific optimization (fixes build failure on sparc).
+
+ -- Gerrit Pape <pape@smarden.org>  Thu, 24 Oct 2002 22:54:08 +0200
+
+runit (0.7.1-1) unstable; urgency=low
+
+  * new upstream version.
+
+ -- Gerrit Pape <pape@smarden.org>  Wed, 23 Oct 2002 11:46:01 +0200
+
+runit (0.7.0-3) unstable; urgency=low
+
+  * initial official debian package (closes: #164301).
+  * debian/runsvstat.8, debian/runsvctrl.8: new.
+
+ -- Gerrit Pape <pape@smarden.org>  Fri, 18 Oct 2002 13:25:33 +0200
+
+runit (0.7.0-2) unstable; urgency=low
+
+  * rework debian packaging to be debian policy compliant.
+  * runit: add lintian override: statically-linked-binary; the runit
+    programs are knowingly compiled statically with the diet libc.
+
+ -- Gerrit Pape <pape@smarden.org>  Fri, 11 Oct 2002 14:21:25 +0200
+
+runit (0.7.0-1) sarge; urgency=low
+
+  * See /package/admin/runit/package/CHANGES.
+  * preinst: new; create hardlink /sbin/runit.old -> /sbin/runit on
+    upgrade.
+
+ -- Gerrit Pape <pape@smarden.org>  Mon,  7 Oct 2002 11:25:47 +0200
+
+runit (0.6.0-1) sarge; urgency=low
+
+  * See /package/admin/runit/package/CHANGES.
+
+ -- Gerrit Pape <pape@smarden.org>  Fri, 27 Sep 2002 16:35:53 +0200
+
+runit (0.5.2-1) sarge; urgency=low
+
+  * See /package/admin/runit/package/CHANGES.
+
+ -- Gerrit Pape <pape@smarden.org>  Mon, 23 Sep 2002 12:06:09 +0200
+
+runit (0.5.0-1) sarge; urgency=low
+
+  * See /package/admin/runit/package/CHANGES.
+
+ -- Gerrit Pape <pape@smarden.org>  Wed, 28 Aug 2002 13:23:11 +0200
+
+runit (0.4.1-1) woody; urgency=low
+
+  * See /package/admin/runit/package/CHANGES.
+
+ -- Gerrit Pape <pape@smarden.org>  Mon, 24 Jun 2002 16:07:53 +0200
+
+runit (0.4.0-1) woody; urgency=low
+
+  * See /package/admin/runit/package/CHANGES.
+  * build and install the utmpset program.
+
+ -- Gerrit Pape <pape@smarden.org>  Sun, 19 May 2002 12:31:09 +0200
+
+runit (0.3.2-2) woody; urgency=low
+
+  * getty service directory /etc/runit/getty-tty5 moved to
+    /etc/runit/getty-5 according to updated doc/replaceinit.html.
+  * compiled with dietlibc 0.16.
+
+ -- Gerrit Pape <pape@smarden.org>  Sat, 30 Mar 2002 13:05:28 +0100
+
+runit (0.3.2-1) woody; urgency=low
+
+  * See /package/admin/runit/package/CHANGES.
+
+ -- Gerrit Pape <pape@smarden.org>  Wed, 13 Feb 2002 10:56:17 +0100
+
+runit (0.3.1-1) woody; urgency=low
+
+  * See /package/admin/runit/package/CHANGES.
+
+ -- Gerrit Pape <pape@smarden.org>  Sun,  3 Feb 2002 16:30:55 +0100
+
+runit (0.3.0-1) woody; urgency=low
+
+  * See /package/admin/runit/package/CHANGES.
+
+ -- Gerrit Pape <pape@smarden.org>  Tue, 29 Jan 2002 19:54:06 +0100
+
+runit (0.2.7-1) woody; urgency=low
+
+  * See /package/admin/runit/package/CHANGES.
+
+ -- Gerrit Pape <pape@smarden.org>  Tue,  1 Jan 2002 16:20:14 +0100
+
+runit (0.2.6-1) woody; urgency=low
+
+  * See /package/admin/runit/package/CHANGES.
+  * manpages svwait*.8 installed.
+
+ -- Gerrit Pape <pape@smarden.org>  Sun, 30 Dec 2001 17:29:29 +0100
+
+runit (0.2.3-1) woody; urgency=low
+
+  * See /package/admin/runit/package/CHANGES.
+  * Build-Depends on dietlibc, uses diet to compile programs.
+
+ -- Gerrit Pape <pape@smarden.org>  Sat, 22 Dec 2001 20:37:03 +0100
+
+runit (0.1.1-1) woody; urgency=low
+
+  * Initial Release.
+
+ -- Gerrit Pape <pape@smarden.org>  Tue, 20 Nov 2001 11:56:58 +0100
+
+Local variables:
+mode: debian-changelog
+End:
--- runit-1.8.0.orig/debian/control
+++ runit-1.8.0/debian/control
@@ -0,0 +1,27 @@
+Source: runit
+Section: admin
+Priority: optional
+Maintainer: Gerrit Pape <pape@smarden.org>
+Build-Depends: dietlibc-dev (>> 0.28-0) [alpha amd64 arm hppa i386 ia64 mips mipsel powerpc ppc64 s390 sparc]
+Standards-Version: 3.7.2.1
+
+Package: runit
+Architecture: any
+Depends: ${shlibs:Depends}
+Recommends: fgetty
+Suggests: runit-run, socklog-run
+Description: a UNIX init scheme with service supervision
+ runit is a replacement for SysV-init and other init schemes.  It runs on
+ Debian GNU/Linux, *BSD, MacOSX, and Solaris, and may be easily adapted
+ to other Unix operating systems.  runit implements a simple three-stage
+ concept.  Stage 1 performs the system's one-time initialization tasks.
+ Stage 2 starts the system's uptime services (via the runsvdir program).
+ Stage 3 handles the tasks necessary to shutdown and halt or reboot.
+ .
+ The runit programs are compiled and linked statically with the diet libc
+ on architectures the diet libc is available for.
+ .
+ See http://smarden.org/runit/ for more information.
+ .
+ This package does not replace the /sbin/init binary.  To do so you need
+ to follow the documentation or install the runit-run package.
--- runit-1.8.0.orig/debian/copyright
+++ runit-1.8.0/debian/copyright
@@ -0,0 +1,30 @@
+This package was downloaded from http://smarden.org/runit/install.html
+
+Upstream Author: Gerrit Pape <pape@smarden.org>
+
+Copyright:
+
+Copyright (c) 2001-2007, Gerrit Pape
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+   2. Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+   3. The name of the author may not be used to endorse or promote products
+      derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--- runit-1.8.0.orig/debian/getty-tty5.finish
+++ runit-1.8.0/debian/getty-tty5.finish
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec utmpset -w tty5
--- runit-1.8.0.orig/debian/getty-tty5.run
+++ runit-1.8.0/debian/getty-tty5.run
@@ -0,0 +1,3 @@
+#!/bin/sh
+! type fgetty >/dev/null 2>&1 || exec chpst -P fgetty tty5
+exec getty 38400 tty5 linux
--- runit-1.8.0.orig/debian/implicit
+++ runit-1.8.0/debian/implicit
@@ -0,0 +1,93 @@
+# $Id$
+
+.PHONY: deb-checkdir deb-checkuid
+
+deb-checkdir:
+	@test -e debian/control || sh -cx '! : wrong directory'
+deb-checkuid:
+	@test "`id -u`" -eq 0 || sh -cx '! : need root privileges'
+
+%.deb: %.deb-docs %.deb-DEBIAN
+	@rm -f $*.deb $*.deb-checkdir $*.deb-docs $*.deb-docs-base \
+	  $*.deb-docs-docs $*.deb-docs-examples $*.deb-DEBIAN \
+	  $*.deb-DEBIAN-dir $*.deb-DEBIAN-scripts $*.deb-DEBIAN-md5sums
+
+%.udeb: %.deb-DEBIAN
+	@rm -f $*.deb $*.deb-checkdir $*.deb-DEBIAN $*.deb-DEBIAN-dir \
+	  $*.deb-DEBIAN-scripts $*.deb-DEBIAN-md5sums
+
+%.deb-checkdir:
+	@test -d debian/$* || sh -cx '! : directory debian/$* missing'
+	@test "`id -u`" -eq 0 || sh -cx '! : need root privileges'
+
+%.deb-docs-base:
+	: implicit
+	@rm -f debian/$*/usr/share/doc/$*/* || :
+	@install -d -m0755 debian/$*/usr/share/doc/$*
+	: debian/$*/usr/share/doc/$*/
+	@sh -cx 'install -m0644 debian/copyright debian/$*/usr/share/doc/$*/'
+	@sh -cx 'install -m0644 debian/changelog \
+	  debian/$*/usr/share/doc/$*/changelog.Debian'
+	@test ! -r changelog || \
+	  sh -cx 'install -m0644 changelog debian/$*/usr/share/doc/$*/'
+	@test -r debian/$*/usr/share/doc/$*/changelog || \
+	  sh -cx 'mv debian/$*/usr/share/doc/$*/changelog.Debian \
+	    debian/$*/usr/share/doc/$*/changelog'
+	@test -s debian/$*/usr/share/doc/$*/changelog || \
+	  sh -cx 'rm -f debian/$*/usr/share/doc/$*/changelog'
+	@gzip -9 debian/$*/usr/share/doc/$*/changelog*
+%.deb-docs-docs:
+	@for i in `cat debian/$*.docs 2>/dev/null || :`; do \
+	  if test -d $$i; then \
+	    sh -cx "install -d -m0755 debian/$*/usr/share/doc/$*/$${i##*/}" && \
+	    for j in $$i/*; do \
+	      sh -cx "install -m0644 $$j \
+	        debian/$*/usr/share/doc/$*/$${i##*/}/" || exit 1; \
+	    done || exit 1; \
+	    continue; \
+	  fi; \
+	  sh -cx "install -m0644 $$i debian/$*/usr/share/doc/$*/" || exit 1; \
+	done
+	@test ! -r debian/$*.README.Debian || \
+	  sh -cx 'install -m0644 debian/$*.README.Debian \
+	    debian/$*/usr/share/doc/$*/README.Debian'
+	@if test -r debian/$*.NEWS.Debian; then \
+	  sh -cx 'install -m0644 debian/$*.NEWS.Debian \
+	    debian/$*/usr/share/doc/$*/NEWS.Debian && \
+	      gzip -9 debian/$*/usr/share/doc/$*/NEWS.Debian'; \
+	fi
+%.deb-docs-examples:
+	@rm -rf debian/$*/usr/share/doc/$*/examples
+	: debian/$*/usr/share/doc/$*/examples/
+	@test ! -r debian/$*.examples || \
+	  install -d -m0755 debian/$*/usr/share/doc/$*/examples
+	@for i in `cat debian/$*.examples 2>/dev/null || :`; do \
+	  sh -cx "install -m0644 $$i debian/$*/usr/share/doc/$*/examples/" \
+	    || exit 1; \
+	done
+%.deb-docs: %.deb-checkdir %.deb-docs-base %.deb-docs-docs %.deb-docs-examples
+	: debian/$*/usr/share/doc/$*/ ok
+
+%.deb-DEBIAN-base:
+	@rm -rf debian/$*/DEBIAN
+	: debian/$*/DEBIAN/
+	@install -d -m0755 debian/$*/DEBIAN
+	@for i in conffiles shlibs templates; do \
+	  test ! -r debian/$*.$$i || \
+	    sh -cx "install -m0644 debian/$*.$$i debian/$*/DEBIAN/$$i" \
+	      || exit 1; \
+	done
+%.deb-DEBIAN-scripts:
+	@for i in preinst prerm postinst postrm config; do \
+	  test ! -r debian/$*.$$i || \
+	    sh -cx "install -m0755 debian/$*.$$i debian/$*/DEBIAN/$$i" \
+	      || exit 1; \
+	done
+%.deb-DEBIAN-md5sums:
+	: debian/$*/DEBIAN/md5sums
+	@rm -f debian/$*/DEBIAN/md5sums
+	@cd debian/$* && find * -path 'DEBIAN' -prune -o \
+	  -type f -exec md5sum {} >>DEBIAN/md5sums \;
+%.deb-DEBIAN: %.deb-checkdir %.deb-DEBIAN-base %.deb-DEBIAN-scripts \
+	  %.deb-DEBIAN-md5sums
+	: debian/$*/DEBIAN/ ok
--- runit-1.8.0.orig/debian/rules
+++ runit-1.8.0/debian/rules
@@ -0,0 +1,112 @@
+#!/usr/bin/make -f
+
+VERSION =$(shell head -n1 debian/changelog |sed -e 's/.*(\(.*\)-.*).*/\1/')
+
+CFLAGS =-Wall
+LDFLAGS =-pipe
+CC =diet -v -Os gcc
+STRIP =strip
+
+DIET_ARCHS =alpha amd64 arm hppa i386 ia64 mips mipsel powerpc ppc64 s390 sparc
+ARCH ?=$(shell dpkg-architecture -qDEB_HOST_ARCH)
+ifeq (,$(findstring $(ARCH),$(DIET_ARCHS)))
+  CC =gcc
+  CFLAGS =-O2 -Wall
+endif
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+  CFLAGS +=-g
+endif
+ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+  STRIP =: nostrip
+endif
+
+DIR =$(shell pwd)/debian/runit
+
+unpack: deb-checkdir unpack-stamp
+unpack-stamp:
+	tar xzf runit-'$(VERSION)'.tar.gz
+	ln -s runit-'$(VERSION)' admin/runit
+	(cd admin/runit && patch -p1) < \
+	  debian/diff/0001-runit-s-directory-for-services-on-Debian-is-etc-ser.diff
+	echo '$(CC) $(CFLAGS)' >admin/runit/src/conf-cc
+	echo '$(CC) $(LDFLAGS)' >admin/runit/src/conf-ld
+	touch unpack-stamp
+
+build: deb-checkdir build-stamp
+build-stamp: unpack-stamp
+	-gcc -v
+	$(MAKE) -Cadmin/runit/src default check
+	touch build-stamp
+
+clean: deb-checkdir deb-checkuid
+	rm -rf admin
+	rm -f unpack-stamp build-stamp
+	rm -rf '$(DIR)'
+	rm -f debian/files debian/substvars changelog
+
+install: deb-checkdir deb-checkuid build-stamp
+	rm -rf '$(DIR)'
+	install -d -m0755 '$(DIR)'/etc/service
+	install -d -m0755 '$(DIR)'/var/lib/supervise
+	install -d -m0755 '$(DIR)'/sbin
+	install -d -m0755 '$(DIR)'/usr/bin
+	install -d -m0755 '$(DIR)'/usr/sbin
+	for i in runit runit-init; do \
+	  install -m0755 admin/runit/src/$$i '$(DIR)'/sbin/ || exit 1; \
+	done
+	for i in runsvdir runsv sv svlogd chpst; do \
+	  install -m0755 admin/runit/src/$$i '$(DIR)'/usr/bin/ || exit 1; \
+	done
+	for i in runsvchdir utmpset; do \
+	  install -m0755 admin/runit/src/$$i '$(DIR)'/usr/sbin/ || exit 1; \
+	done
+	$(STRIP) -R .comment -R .note '$(DIR)'/sbin/* '$(DIR)'/usr/sbin/* \
+	  '$(DIR)'/usr/bin/*
+	# runsvdir-start to be used from /etc/inittab
+	install -m0755 debian/2 '$(DIR)'/usr/sbin/runsvdir-start
+	# update-service
+	install -m0755 debian/update-service '$(DIR)'/usr/sbin/update-service
+	# getty-5 service
+	install -d -m0755 '$(DIR)'/etc/sv/getty-5
+	install -m0755 debian/getty-tty5.run '$(DIR)'/etc/sv/getty-5/run
+	install -m0755 debian/getty-tty5.finish \
+	  '$(DIR)'/etc/sv/getty-5/finish
+	# lintian overrides
+	install -m0755 -d '$(DIR)'/usr/share/lintian/overrides
+	install -m0644 debian/runit.lintian \
+	  '$(DIR)'/usr/share/lintian/overrides/runit
+	# man pages
+	install -d -m0755 '$(DIR)'/usr/share/man/man8
+	for i in runit runit-init runsvdir runsv sv svlogd chpst runsvchdir \
+	 utmpset; do \
+	  install -m0644 admin/runit/man/$$i.8 \
+	    '$(DIR)'/usr/share/man/man8/ || exit 1; \
+	done
+	install -m0644 debian/runsvdir-start.8 '$(DIR)'/usr/share/man/man8/
+	install -m0644 debian/update-service.8 '$(DIR)'/usr/share/man/man8/
+	gzip -9 '$(DIR)'/usr/share/man/man8/*.8
+	# links
+	ln -s /var/run/sv.getty-5 '$(DIR)'/etc/sv/getty-5/supervise
+	# additional docs
+	install -d -m0755 '$(DIR)'/usr/share/doc/runit/debian
+	for i in 1 2 3 ctrlaltdel; do \
+	  install -m0644 admin/runit/etc/debian/$$i \
+	    '$(DIR)'/usr/share/doc/runit/debian/ || exit 1; \
+	done
+	# changelog
+	rm -f changelog && ln -s admin/runit/package/CHANGES changelog
+
+binary-indep:
+
+binary-arch: install runit.deb
+	test '$(CC)' != 'gcc' || \
+	  dpkg-shlibdeps '$(DIR)'/usr/sbin/* '$(DIR)'/usr/bin/*
+	dpkg-gencontrol -isp -prunit -P'$(DIR)'
+	dpkg -b '$(DIR)' ..
+
+binary: binary-indep binary-arch
+
+.PHONY: unpack build clean install binary-indep binary-arch binary
+
+include debian/implicit
--- runit-1.8.0.orig/debian/runit.NEWS.Debian
+++ runit-1.8.0/debian/runit.NEWS.Debian
@@ -0,0 +1,11 @@
+runit (1.4.1-1) unstable; urgency=low
+
+    With this version the runsvctrl, runsvstat, svwaitdown, and svwaitup
+    programs no longer are being installed, the functionality of these
+    programs has been incorporated into the sv program.
+    
+    The documentation now suggest to put service directories by default
+    into the /etc/sv/ directory, and a list of frequently asked questions
+    with answers has been added.
+
+ -- Gerrit Pape <pape@smarden.org>  Sat, 13 May 2006 14:55:09 +0000
--- runit-1.8.0.orig/debian/runit.README.Debian
+++ runit-1.8.0/debian/runit.README.Debian
@@ -0,0 +1,16 @@
+runit for Debian
+----------------
+
+This package provides the runit programs, an example getty service, and
+adds an entry with the name SV to /etc/inittab in order to provide runit's
+service supervision on systems running sysvinit as init scheme.
+
+The package does not replace the /sbin/init program, and so does not
+enable runit to run as process no 1.  To do so, you need to follow the
+documentation[0] or install the runit-run package.
+
+runit's default directory for services is /etc/service/.
+
+[0] http://smarden.org/runit/replaceinit.html
+
+ -- Gerrit Pape <pape@smarden.org>, Mon, 22 Sep 2003 10:34:51 +0200
--- runit-1.8.0.orig/debian/runit.conffiles
+++ runit-1.8.0/debian/runit.conffiles
@@ -0,0 +1,2 @@
+/etc/sv/getty-5/run
+/etc/sv/getty-5/finish
--- runit-1.8.0.orig/debian/runit.docs
+++ runit-1.8.0/debian/runit.docs
@@ -0,0 +1,3 @@
+admin/runit/package/README
+admin/runit/package/THANKS
+admin/runit/doc/*.html
--- runit-1.8.0.orig/debian/runit.lintian
+++ runit-1.8.0/debian/runit.lintian
@@ -0,0 +1 @@
+runit: statically-linked-binary
--- runit-1.8.0.orig/debian/runit.postinst
+++ runit-1.8.0/debian/runit.postinst
@@ -0,0 +1,55 @@
+#!/bin/sh
+set -e
+
+test "$1" = 'configure' || exit 0
+
+mv_conffile() {
+  test -e "$1" || return 0
+  echo "Preserving user changes to $2..."
+  mv -f "$2" "$2".dpkg-new
+  mv -f "$1" "$2"
+}
+
+if dpkg --compare-versions "$2" lt '1.4.0-0'; then
+  mv_conffile /etc/runit/getty-5/run /etc/sv/getty-5/run
+  mv_conffile /etc/runit/getty-5/finish /etc/sv/getty-5/finish
+  rmdir /etc/runit/getty-5 2>/dev/null || :
+fi
+
+if test -z "$2"; then
+  # not upgrading
+  if grep '^SV:' /etc/inittab >/dev/null; then
+    cat <<\EOT >&2
+
+There already is an SV entry in /etc/inittab.  In order to have this package
+add an entry with the name SV to have runit's service supervision started
+by sysvinit, you need to remove or rename the current SV entry first.
+
+Installation failed.
+
+EOT
+    exit 1
+  fi
+fi
+
+# retain backward compatibility symlink until rdepends have adopted
+if test ! -h /var/service ||
+ test "$(readlink /var/service)" != /etc/service; then
+  if test -e /var/service; then
+    rm -rf /var/service'{old}'
+    mv /var/service /var/service'{old}'
+  fi
+  ln -s /etc/service /var/service
+fi
+
+if ! grep '^SV:' /etc/inittab >/dev/null; then
+  echo 'Adding SV inittab entry...'
+  cp /etc/inittab /etc/inittab'{new}'
+  cat >>/etc/inittab'{new}' <<-\EOT
+	#-- runit begin
+	SV:123456:respawn:/usr/sbin/runsvdir-start
+	#-- runit end
+	EOT
+  mv -f /etc/inittab'{new}' /etc/inittab
+  exec kill -s HUP 1  
+fi
--- runit-1.8.0.orig/debian/runit.postrm
+++ runit-1.8.0/debian/runit.postrm
@@ -0,0 +1,18 @@
+#!/bin/sh
+set -e
+
+test "$1" = 'remove' || test "$1" = 'purge' || exit 0
+
+if grep '#-- runit begin' /etc/inittab >/dev/null; then
+  echo 'Removing SV inittab entry...'
+  rm -f /etc/inittab'{new}'
+  sed -e '/#-- runit begin/,/#-- runit end/d' \
+    </etc/inittab >/etc/inittab'{new}'
+  mv -f /etc/inittab'{new}' /etc/inittab
+  kill -s HUP 1 || :
+fi
+
+test "$1" = 'purge' || exit 0
+
+rm -rf /etc/sv/getty-5/supervise /var/run/sv.getty-5
+test ! -h /var/service || rm -f /var/service
--- runit-1.8.0.orig/debian/runit.preinst
+++ runit-1.8.0/debian/runit.preinst
@@ -0,0 +1,42 @@
+#!/bin/sh
+set -e
+
+test "$1" = 'install' || test "$1" = 'upgrade' || exit 0
+
+check_conffile() {
+  test -e "$1" || return 0
+  md5=`md5sum <"$1"`
+  md5=${md5%% *}
+  md5orig=`grep " $1 " </var/lib/dpkg/status || :`
+  md5orig=${md5orig## * }
+  test "$md5" != "$md5orig" || rm -f "$1"
+}
+
+if dpkg --compare-versions "$2" lt '1.4.0-0'; then
+  check_conffile /etc/runit/getty-5/run
+  check_conffile /etc/runit/getty-5/finish
+  ! test -d /var/run/getty-5 ||
+    mv -f /var/run/getty-5 /var/run/sv.getty-5
+fi
+
+test "$1" = 'upgrade' || exit 0
+
+if test -n "$2" && dpkg --compare-versions "$2" le '1.8.0-2'; then
+  # move /var/service/ to /etc/service/
+  if test -h /var/service &&
+   test "$(readlink /var/service)" = /etc/runit/runsvdir/current; then
+    test ! -e /etc/service || rmdir /etc/service 2>/dev/null ||
+      mv /etc/service /etc/service'{old}'
+    mv /var/service /etc/service
+    ln -s /etc/service /var/service
+  else
+    if test -e /var/service; then
+      mkdir -p /etc/service
+      test -z "$(ls -1 /var/service/ 2>/dev/null)" ||
+        cp -a /var/service/* /etc/service/
+    fi
+  fi
+fi
+
+test ! -x /sbin/runit || test -e /sbin/runit.old || \
+  ln /sbin/runit /sbin/runit.old
--- runit-1.8.0.orig/debian/runsvdir-start.8
+++ runit-1.8.0/debian/runsvdir-start.8
@@ -0,0 +1,28 @@
+.TH RUNSVDIR-START 8 "22 February 2004"
+.SH NAME
+runsvdir-start \- monitor and start runsv(8) processes in /etc/service
+.SH SYNOPSIS
+.B runsvdir-start
+.SH DESCRIPTION
+Intended to be run at boot time, the script monitors and starts processes
+in the
+.I /etc/service/
+directory.
+.SH EXAMPLE
+Include the following line into your
+.IR /etc/inittab :
+
+ SV:123456:respawn:/usr/sbin/runsvdir-start
+.SH FILES
+ /etc/service/
+ /etc/inittab
+.SH SEE ALSO
+runsvdir(8), runsv(8), inittab(5)
+
+http://smarden.org/runit/
+.SH AUTHOR
+This manpage was originally written by Bastian Kleineidam
+<calvin@debian.org> for the Debian distribution of runit
+(but may be used by others).
+
+The main author of runit is Gerrit Pape <pape@smarden.org>.
--- runit-1.8.0.orig/debian/update-service
+++ runit-1.8.0/debian/update-service
@@ -0,0 +1,86 @@
+#!/bin/sh
+set -e
+
+servicedir=$SVDIR
+test -n "$servicedir" || servicedir=/etc/service
+
+err() { >&2 printf '%s\n\n' "$*"; exit 1; }
+fatal() { err "${0##*/}: fatal: $*"; }
+warn() { err "${0##*/}: warning: $*"; }
+usage() {
+  err "Usage: ${0##*/} --add|--remove <service-directory> [<service-name>]
+       ${0##*/} --list|--check [<service-name>]"
+}
+
+opt=$1
+svdir=${2%/}
+sv=$3
+test -z "${opt##-*}" || usage
+
+case "$opt" in
+  -c|--check) exec >/dev/null; exec 2>/dev/null; opt=-l;;
+esac
+case "$opt" in
+  -l|--list)
+    test -n "$svdir" || exec ls -1 "$servicedir"
+    test -h "$servicedir"/"$svdir" || err "Service $svdir not registered."
+    printf '%s -> %s\n' "$svdir" "$(readlink "$servicedir"/"$svdir")"
+    exit 0
+  ;;
+esac
+
+test -n "$svdir" || usage
+test -d "$svdir" ||
+  fatal "$svdir does not exist, or is not a directory."
+test -z "${svdir%%/*}" ||
+  fatal "The <service-directory> must start with a slash."
+test -n "$sv" || sv=${svdir##*/}
+test -n "${sv##.*}" ||
+  fatal "The <service-name> must not start with a dot."
+test "$sv" = "${sv#*/}" ||
+  fatal "The <service-name> must not contain a slash."
+
+case "$opt" in
+  -a|--add)
+    test "$(id -u)" = 0 || fatal "${0##*/} -a must be run by root."
+    if test -e "$servicedir"/"$sv"; then
+      test -h "$servicedir"/"$sv" ||
+        fatal "$servicedir/$sv exists, but is not a symbolic link."
+      test "$(readlink "$servicedir"/"$sv")" = "$svdir" ||
+        fatal "$servicedir/$sv exists, but doesn't point to $svdir."
+      printf '%s\n' "Service $sv already added."
+      exit 0
+    fi
+    ! sv stat "$svdir" >/dev/null 2>&1 ||
+      fatal "$svdir is currently controlled by a runsv(8) process."
+    if test "${svdir#/etc/}" != "$svdir"; then
+      if test ! -h "$svdir"/supervise; then
+        rm -rf "$svdir"/supervise
+        ln -s /var/lib/supervise/"$sv" "$svdir"/supervise
+      fi
+      if test -d "$svdir"/log && test ! -h "$svdir"/log/supervise; then
+        rm -rf "$svdir"/log/supervise
+        ln -s /var/lib/supervise/"$sv".log "$svdir"/log/supervise
+      fi
+    fi
+    ln -s "$svdir" "$servicedir"/"$sv"
+    printf '%s\n' "Service $sv added."
+    exit 0
+  ;;
+  -r|--remove)
+    test "$(id -u)" = 0 || fatal "${0##*/} -r must be run by root."
+    test -e "$servicedir"/"$sv" ||
+      warn "$servicedir/$sv does not exist."
+    test -h "$servicedir"/"$sv" ||
+      fatal "$servicedir/$sv is not a symbolic link."
+    test "$svdir" = "$(readlink "$servicedir"/"$sv")" ||
+      fatal "$servicedir/$sv does not point to $svdir."
+    rm -f "$servicedir"/"$sv"
+    printf '%s %s\n' \
+      "Service $sv removed," \
+      "the service daemon received the TERM and CONT signals."
+    exit 0
+  ;;
+  *) usage
+  ;;
+esac
--- runit-1.8.0.orig/debian/update-service.8
+++ runit-1.8.0/debian/update-service.8
@@ -0,0 +1,121 @@
+.TH update-service 8
+.SH NAME
+update-service \- add/remove a service to/from system-wide service supervision
+.SH SYNOPSIS
+.B update-service
+\--add|--remove
+.I service-directory
+[\fIservice-name\fB]
+.P
+.B update-service
+\--list|--check
+[\fIservice-name\fB]
+.SH DESCRIPTION
+.I service-directory
+must be a directory to be used by
+.BR runsv (8),
+.I service-name
+must not start with a dot, and must not contain a slash.
+.P
+.B update-service
+adds or removes the
+.I service-directory
+to the system-wide service supervision provided through runit 's
+.BR runsvdir (8),
+lists all registered system-wide services, or checks for a specific
+.I service-name
+whether it is registered.
+.P
+When adding a service,
+and the
+.I service-directory
+resides in /etc/,
+.B update-service
+makes sure that the ./supervise/ subdirectories in the
+.IR service-directory ,
+and the optional
+.IR service-directory /log/,
+are symbolic links pointing into /var/lib/supervise/, unless they
+already are symbolic links.
+.SH OPTIONS
+.TP
+.B \--add | \-a
+Add the service directory
+.I service-directory
+to the system-wide service supervision,
+under the name
+.IR service-name .
+If
+.I service-name
+is not specified,
+.B update-service
+will use the basename of
+.IR service-directory .
+You can use the
+.BR sv (8)
+program to control the newly added service, or query its status, e.g.:
+
+# sv status
+.I service-name
+
+.TP
+.B \--remove | \-r
+Remove the service directory
+.IR service-directory ,
+which has been added under the name
+.IR service-name ,
+from the system-wide service supervision.
+If
+.I service-name
+is not specified,
+.B update-service
+will use the basename of
+.IR service-directory .
+When removing the
+.IR service-directory ,
+the
+.I exit
+command is sent to the corresponding
+.BR runsv (8)
+process, telling it to take the service down and exit afterwards.
+You can use the
+.BR sv (8)
+program to control the removed service, or query its status, e.g.:
+
+# sv status
+.I service-directory
+
+.TP
+.B \--list | \-l
+If
+.I service-name
+is specified,
+.B update-service
+checks whether
+.I service-name
+is registered as system-wide service, prints a message and exits non-zero
+if not, or prints the
+.I service-name
+and the directory it points to and exits zero if yes.
+If
+.I service-name
+is not specified, it prints the names of all system-widely registered
+services, one per line.
+.TP
+.B \--check | \-c
+The same as --list, but
+.B update-service
+doesn't print anything to standard out or standard error.
+.SH ENVIRONMENT
+.TP
+.B SVDIR
+The environment variable $SVDIR overrides the default services directory
+.IR /etc/service/ .
+.SH FILES
+/etc/service/
+.SH SEE ALSO
+sv(8), runsv(8), runsvdir(8)
+.P
+http://smarden.org/runit/
+.SH AUTHOR
+Gerrit Pape <pape@smarden.org>
--- runit-1.8.0.orig/debian/diff/0001-runit-s-directory-for-services-on-Debian-is-etc-ser.diff
+++ runit-1.8.0/debian/diff/0001-runit-s-directory-for-services-on-Debian-is-etc-ser.diff
@@ -0,0 +1,25 @@
+From cb1cf4372ccb44ae2bae46a912e32a7d31f4e6d5 Mon Sep 17 00:00:00 2001
+From: Gerrit Pape <pape@smarden.org>
+Date: Sun, 24 Feb 2008 18:32:23 +0000
+Subject: [PATCH] runit's directory for services on Debian is /etc/service/, not /var/service/.
+
+---
+ src/sv.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/sv.c b/src/sv.c
+index 855ae39..7af1b9d 100644
+--- a/src/sv.c
++++ b/src/sv.c
+@@ -32,7 +32,7 @@
+ char *progname;
+ char *action;
+ char *acts;
+-char *varservice ="/var/service/";
++char *varservice ="/etc/service/";
+ char **service;
+ char **servicex;
+ unsigned int services;
+-- 
+1.5.4.2
+
