--- runit-2.0.0.orig/debian/2 +++ runit-2.0.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-2.0.0.orig/debian/changelog +++ runit-2.0.0/debian/changelog @@ -0,0 +1,708 @@ +runit (2.0.0-1ubuntu2) jaunty; urgency=low + + * No longer avoid stripping binaries on amd64, Jaunty has a fixed + binutils which corrects this issue (see LP 254790). + + -- Luca Falavigna Sat, 10 Jan 2009 16:04:40 +0100 + +runit (2.0.0-1ubuntu1) intrepid; urgency=low + + * Merge from Debian unstable (LP: #241656). Remaining Ubuntu changes: + - debian/rules: provide runsvdir.upstart + - debian/rules: don't compile against dietlibc on sparc and powerpc to + avoid FTBFS + - debian/rules: do not strip if architecture is amd64, fix FTBFS + - don't execute anything if /etc/inittab is not available on the system + * Start the runit supervisor after install (LP: #74135), thanks to Gabriel de + Perthuis for the patch. + * runit.prerm: stop the runit supervisor. + + -- Devid Filoni Wed, 18 Jun 2008 23:33:13 +0200 + +runit (2.0.0-1) unstable; urgency=low + + * new upstream release. + * debian/control: Standards-Version: 3.8.0.1. + * debian/update-service: symlink to service-directory might end with + a slash (closes: #475512). + + -- Gerrit Pape Tue, 17 Jun 2008 20:00:08 +0000 + +runit (1.9.0-1ubuntu2) intrepid; urgency=low + + * debian/rules: do not strip if architecture is amd64, fix FTBFS. + + -- Devid Filoni Sun, 15 Jun 2008 13:06:12 +0200 + +runit (1.9.0-1ubuntu1) intrepid; urgency=low + + * Merge from Debian unstable (LP: #235042). Remaining Ubuntu changes: + - debian/rules: provide runsvdir.upstart + - debian/rules: don't compile against dietlibc on sparc and powerpc to + avoid FTBFS + - Do not execute anything if /etc/inittab is not available on the system + + -- Devid Filoni Mon, 19 May 2008 03:24:10 +0200 + +runit (1.9.0-1) unstable; urgency=low + + * new upstream version. + * debian/rules, debian/runit.docs: switch from tarball-in-tarball to + upstream orig tarball. + * debian/diff/0001-...diff: adapt. + * debian/runit.NEWS.Debian: document switch from /var/service/ to + /etc/service/, recommend compatibility symlink. + + -- Gerrit Pape Thu, 08 May 2008 00:30:53 +0000 + +runit (1.8.0-7) unstable; urgency=low + + * debian/runit.postinst: don't exec into the kill program, so that the + shell builtin is used (closes: #475619). + + -- Gerrit Pape Wed, 16 Apr 2008 21:02:04 +0000 + +runit (1.8.0-6) unstable; urgency=medium + + * debian/runit.postinst: no longer retain /var/service backward + compatibility symlink on fresh install, rdepends have adopted (closes: + #461478). + * debian/control: Standards-Version: 3.7.3.0. + + -- Gerrit Pape Wed, 09 Apr 2008 21:32:38 +0000 + +runit (1.8.0-5ubuntu2) hardy; urgency=low + + * debian/rules: + - Do not compile against dietlibc on sparc and powerpc to avoid FTBFS. + + -- Luca Falavigna Sat, 15 Mar 2008 18:40:58 +0100 + +runit (1.8.0-5ubuntu1) hardy; urgency=low + + * Merge from debian unstable, remaining changes: + - We no longer have /etc/inittab, so do not execute anything if it is + not available on the system. + - Provide runsvdir.upstart to execute runit successfully with upstart, + thanks to Adam Jacob for the suggestion. + - Update Maintainer field as per spec. + + * New git daemon needs this new version of runit. + + -- Fabio M. Di Nitto Tue, 04 Mar 2008 07:21:09 +0100 + +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 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 Mon, 25 Feb 2008 18:51:47 +0000 + +runit (1.8.0-3) unstable; urgency=low + + * debian/update-service: enforce argument; enforce 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 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 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 Mon, 11 Feb 2008 22:38:24 +0000 + +runit (1.8.0-1ubuntu1) hardy; urgency=low + + * We no longer have /etc/inittab, so do not execute anything if it is + not available on the system (LP: #74135). + * Provide runsvdir.upstart to execute runit successfully with upstart, + thanks to Adam Jacob for the suggestion. + * Update Maintainer field as per spec + + -- Luca Falavigna Sat, 22 Dec 2007 14:44:41 +0100 + +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 Fri, 21 Sep 2007 01:01:14 +0000 + +runit (1.7.2-1) unstable; urgency=low + + * new upstream version. + + -- Gerrit Pape 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 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 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 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 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 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 Mon, 20 Mar 2006 19:34:34 +0000 + +runit (1.3.3-1) unstable; urgency=low + + * new upstream version. + + -- Gerrit Pape 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 Fri, 8 Aug 2003 13:37:45 +0200 + +runit (0.10.0-1) unstable; urgency=low + + * new upstream version. + + -- Gerrit Pape 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 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 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 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 Thu, 15 May 2003 12:03:22 +0200 + +runit (0.9.2-1) unstable; urgency=low + + * new upstream version. + + -- Gerrit Pape Sat, 3 May 2003 17:58:14 +0200 + +runit (0.9.1-1) unstable; urgency=low + + * new upstream version. + + -- Gerrit Pape 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 Fri, 25 Apr 2003 09:22:27 +0200 + +runit (0.8.4-1) unstable; urgency=low + + * new upstream version. + + -- Gerrit Pape Sun, 20 Apr 2003 19:34:37 +0200 + +runit (0.8.1-1) unstable; urgency=low + + * new upstream version. + + -- Gerrit Pape Wed, 12 Mar 2003 15:10:16 +0100 + +runit (0.8.0-1) unstable; urgency=low + + * new upstream version. + + -- Gerrit Pape Tue, 25 Feb 2003 16:17:46 +0100 + +runit (0.7.2-2) unstable; urgency=low + + * debian/rules: resurrect copyright file. + + -- Gerrit Pape 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 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 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 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 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 Thu, 24 Oct 2002 22:54:08 +0200 + +runit (0.7.1-1) unstable; urgency=low + + * new upstream version. + + -- Gerrit Pape 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 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 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 Mon, 7 Oct 2002 11:25:47 +0200 + +runit (0.6.0-1) sarge; urgency=low + + * See /package/admin/runit/package/CHANGES. + + -- Gerrit Pape Fri, 27 Sep 2002 16:35:53 +0200 + +runit (0.5.2-1) sarge; urgency=low + + * See /package/admin/runit/package/CHANGES. + + -- Gerrit Pape Mon, 23 Sep 2002 12:06:09 +0200 + +runit (0.5.0-1) sarge; urgency=low + + * See /package/admin/runit/package/CHANGES. + + -- Gerrit Pape Wed, 28 Aug 2002 13:23:11 +0200 + +runit (0.4.1-1) woody; urgency=low + + * See /package/admin/runit/package/CHANGES. + + -- Gerrit Pape 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 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 Sat, 30 Mar 2002 13:05:28 +0100 + +runit (0.3.2-1) woody; urgency=low + + * See /package/admin/runit/package/CHANGES. + + -- Gerrit Pape Wed, 13 Feb 2002 10:56:17 +0100 + +runit (0.3.1-1) woody; urgency=low + + * See /package/admin/runit/package/CHANGES. + + -- Gerrit Pape Sun, 3 Feb 2002 16:30:55 +0100 + +runit (0.3.0-1) woody; urgency=low + + * See /package/admin/runit/package/CHANGES. + + -- Gerrit Pape Tue, 29 Jan 2002 19:54:06 +0100 + +runit (0.2.7-1) woody; urgency=low + + * See /package/admin/runit/package/CHANGES. + + -- Gerrit Pape 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 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 Sat, 22 Dec 2001 20:37:03 +0100 + +runit (0.1.1-1) woody; urgency=low + + * Initial Release. + + -- Gerrit Pape Tue, 20 Nov 2001 11:56:58 +0100 + +Local variables: +mode: debian-changelog +End: --- runit-2.0.0.orig/debian/control +++ runit-2.0.0/debian/control @@ -0,0 +1,28 @@ +Source: runit +Section: admin +Priority: optional +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Gerrit Pape +Build-Depends: dietlibc-dev (>> 0.28-0) [alpha amd64 arm hppa i386 ia64 mips mipsel powerpc ppc64 s390 sparc] +Standards-Version: 3.8.0.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-2.0.0.orig/debian/copyright +++ runit-2.0.0/debian/copyright @@ -0,0 +1,30 @@ +This package was downloaded from http://smarden.org/runit/install.html + +Upstream Author: Gerrit Pape + +Copyright: + +Copyright (c) 2001-2008, 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-2.0.0.orig/debian/getty-tty5.finish +++ runit-2.0.0/debian/getty-tty5.finish @@ -0,0 +1,2 @@ +#!/bin/sh +exec utmpset -w tty5 --- runit-2.0.0.orig/debian/getty-tty5.run +++ runit-2.0.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-2.0.0.orig/debian/implicit +++ runit-2.0.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-2.0.0.orig/debian/rules +++ runit-2.0.0/debian/rules @@ -0,0 +1,122 @@ +#!/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 ppc64 s390 +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 + +patch: deb-checkdir patch-stamp +patch-stamp: + for i in `ls -1 debian/diff/*.diff || :`; do \ + patch -p1 <$$i || exit 1; \ + done + touch patch-stamp + +build: deb-checkdir build-stamp +build-stamp: patch-stamp + -gcc -v + test -e runit || ln -s runit-'$(VERSION)' runit + test -r conf-cc'{orig}' || cp -f runit/src/conf-cc conf-cc'{orig}' + echo '$(CC) $(CFLAGS)' >runit/src/conf-cc + test -r conf-ld'{orig}' || cp -f runit/src/conf-ld conf-ld'{orig}' + echo '$(CC) $(LDFLAGS)' >runit/src/conf-ld + (cd runit/ && package/compile && package/check) + touch build-stamp + +clean: deb-checkdir deb-checkuid + rm -rf runit/compile runit/command + test ! -e patch-stamp || \ + for i in `ls -1r debian/diff/*.diff || :`; do patch -p1 -R <$$i; done + rm -f patch-stamp build-stamp + rm -rf '$(DIR)' + rm -f debian/files debian/substvars changelog + test ! -r conf-cc'{orig}' || mv -f conf-cc'{orig}' runit/src/conf-cc + test ! -r conf-ld'{orig}' || mv -f conf-ld'{orig}' runit/src/conf-ld + rm -f runit + +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 runit/command/$$i '$(DIR)'/sbin/ || exit 1; \ + done + for i in runsvdir runsv sv svlogd chpst; do \ + install -m0755 runit/command/$$i '$(DIR)'/usr/bin/ || exit 1; \ + done + for i in runsvchdir utmpset; do \ + install -m0755 runit/command/$$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 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 runit/etc/debian/$$i \ + '$(DIR)'/usr/share/doc/runit/debian/ || exit 1; \ + done + # changelog + rm -f changelog && ln -s runit/package/CHANGES changelog + # upstart file + install -D -m0644 debian/runsvdir.upstart \ + '$(DIR)'/etc/event.d/runsvdir || exit 1; + +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: patch build clean install binary-indep binary-arch binary + +include debian/implicit --- runit-2.0.0.orig/debian/runit.NEWS.Debian +++ runit-2.0.0/debian/runit.NEWS.Debian @@ -0,0 +1,38 @@ +runit (1.9.0-1) unstable; urgency=low + + runit's default directory for services has been /var/service/ for + quite some years. The usage of the directory /var/service/ does + not comply with the Filesystem Hierarchy Standard (FHS) though, + and there are no signs that this will change. + + With version 1.9.0 the runit upstream package switched from + /var/service/ to /service/ (which doesn't comply with the FHS + either). + + The Debian package from now on uses /etc/service/, on upgrade from + previous versions of the runit Debian package, a compatibility + symlink /var/service -> /etc/service is retained. Nevertheless, + existing programs or scripts that deal with the contents of the + default directory for services should be adapted. Take a look at + the new update-service(8) program when doing so. + + To be consistent with existing documentation, it is recommended to + create a compatibility symlink through + + ln -s /etc/service /service + + after installing the runit Debian package. + + -- Gerrit Pape Thu, 08 May 2008 00:30:39 +0000 + +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 Sat, 13 May 2006 14:55:09 +0000 --- runit-2.0.0.orig/debian/runit.README.Debian +++ runit-2.0.0/debian/runit.README.Debian @@ -0,0 +1,19 @@ +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. + +On Ubuntu systems, /etc/inittab file is replaced by /etc/event.d directory, +where you will find /etc/event.d/runsvdir file. + +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 , Mon, 22 Sep 2003 10:34:51 +0200 --- runit-2.0.0.orig/debian/runit.conffiles +++ runit-2.0.0/debian/runit.conffiles @@ -0,0 +1,2 @@ +/etc/sv/getty-5/run +/etc/sv/getty-5/finish --- runit-2.0.0.orig/debian/runit.docs +++ runit-2.0.0/debian/runit.docs @@ -0,0 +1,3 @@ +runit/package/README +runit/package/THANKS +runit/doc/*.html --- runit-2.0.0.orig/debian/runit.lintian +++ runit-2.0.0/debian/runit.lintian @@ -0,0 +1 @@ +runit: statically-linked-binary --- runit-2.0.0.orig/debian/runit.postinst +++ runit-2.0.0/debian/runit.postinst @@ -0,0 +1,49 @@ +#!/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 [ -f /etc/inittab ] && 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 + +if [ -f /etc/inittab ] && ! 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 + kill -s HUP 1 +fi + +if [ -x /sbin/start ]; then #provided by upstart + /sbin/start runsvdir +fi --- runit-2.0.0.orig/debian/runit.postrm +++ runit-2.0.0/debian/runit.postrm @@ -0,0 +1,18 @@ +#!/bin/sh +set -e + +test "$1" = 'remove' || test "$1" = 'purge' || exit 0 + +if [ -f /etc/inittab ] && 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'{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-2.0.0.orig/debian/runit.preinst +++ runit-2.0.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 " /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-2.0.0.orig/debian/runit.prerm +++ runit-2.0.0/debian/runit.prerm @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +if [ -x /sbin/stop ]; then + /sbin/stop runsvdir +fi --- runit-2.0.0.orig/debian/runsvdir-start.8 +++ runit-2.0.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 + for the Debian distribution of runit +(but may be used by others). + +The main author of runit is Gerrit Pape . --- runit-2.0.0.orig/debian/runsvdir.upstart +++ runit-2.0.0/debian/runsvdir.upstart @@ -0,0 +1,7 @@ +start on runlevel 2 +start on runlevel 3 +start on runlevel 4 +start on runlevel 5 +stop on shutdown +respawn +exec /usr/sbin/runsvdir-start --- runit-2.0.0.orig/debian/update-service +++ runit-2.0.0/debian/update-service @@ -0,0 +1,88 @@ +#!/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 [] + ${0##*/} --list|--check []" +} + +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 must start with a slash." +test -n "$sv" || sv=${svdir##*/} +test -n "${sv##.*}" || + fatal "The must not start with a dot." +test "$sv" = "${sv#*/}" || + fatal "The 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" || + 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")" || + 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-2.0.0.orig/debian/update-service.8 +++ runit-2.0.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 --- runit-2.0.0.orig/debian/diff/0001-default-directory-for-services-on-Debian-is-etc-serv.diff +++ runit-2.0.0/debian/diff/0001-default-directory-for-services-on-Debian-is-etc-serv.diff @@ -0,0 +1,86 @@ +From 644e2b0023fd372a76661ca7e81bd1cfdf13403c Mon Sep 17 00:00:00 2001 +From: Gerrit Pape +Date: Wed, 7 May 2008 23:51:16 +0000 +Subject: [PATCH] default directory for services on Debian is /etc/service/, not /service/ + +--- + runit-2.0.0/man/runsv.8 | 4 ++-- + runit-2.0.0/man/runsvchdir.8 | 4 ++-- + runit-2.0.0/man/sv.8 | 4 ++-- + runit-2.0.0/src/sv.c | 2 +- + 4 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/runit-2.0.0/man/runsv.8 b/runit-2.0.0/man/runsv.8 +index 7c5abfc..75bc73a 100644 +--- a/runit-2.0.0/man/runsv.8 ++++ b/runit-2.0.0/man/runsv.8 +@@ -157,9 +157,9 @@ This command is ignored if it is given to + .IR service /log/supervise/control. + .P + Example: to send a TERM signal to the socklog-unix service, either do +- # sv term /service/socklog-unix ++ # sv term /etc/service/socklog-unix + or +- # printf t >/service/socklog-unix/supervise/control ++ # printf t >/etc/service/socklog-unix/supervise/control + .P + .BR printf (1) + usually blocks if no +diff --git a/runit-2.0.0/man/runsvchdir.8 b/runit-2.0.0/man/runsvchdir.8 +index f7f94dc..a5fc180 100644 +--- a/runit-2.0.0/man/runsvchdir.8 ++++ b/runit-2.0.0/man/runsvchdir.8 +@@ -27,13 +27,13 @@ with a symlink pointing to + .IR dir . + .P + Normally +-.I /service ++.I /etc/service + is a symlink to + .IR current , + and + .BR runsvdir (8) + is running +-.IR /service/ . ++.IR /etc/service/ . + .SH EXIT CODES + .B runsvchdir + prints an error message and exits 111 on error. +diff --git a/runit-2.0.0/man/sv.8 b/runit-2.0.0/man/sv.8 +index cbce14e..1579269 100644 +--- a/runit-2.0.0/man/sv.8 ++++ b/runit-2.0.0/man/sv.8 +@@ -30,7 +30,7 @@ If + .I service + doesn't start with a dot or slash and doesn't end with a slash, it is + searched in the default services directory +-.IR /service/ , ++.IR /etc/service/ , + otherwise relative to the current directory. + .P + .I command +@@ -217,7 +217,7 @@ This option implies + .TP + .B SVDIR + The environment variable $SVDIR overrides the default services directory +-.IR /service/ . ++.IR /etc/service/ . + .TP + .B SVWAIT + The environment variable $SVWAIT overrides the default 7 seconds to wait +diff --git a/runit-2.0.0/src/sv.c b/runit-2.0.0/src/sv.c +index 9ccc35d..17a012b 100644 +--- a/runit-2.0.0/src/sv.c ++++ b/runit-2.0.0/src/sv.c +@@ -32,7 +32,7 @@ + char *progname; + char *action; + char *acts; +-char *varservice ="/service/"; ++char *varservice ="/etc/service/"; + char **service; + char **servicex; + unsigned int services; +-- +1.5.5.4 +