--- runit-2.1.2.orig/debian/2 +++ runit-2.1.2/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.1.2.orig/debian/changelog +++ runit-2.1.2/debian/changelog @@ -0,0 +1,1004 @@ +runit (2.1.2-3ubuntu1) vivid; urgency=low + + * Merge from Debian unstable (LP: #1407844). Remaining changes: + - debian/runsvdir.upstart: Add upstart config file. + - debian/rules: + + Install runsvdir.upstart + - debian/runit.post{inst,rm}: Don't execute anything if /etc/inittab is + not available on the system. + - debian/runit.postinst: Start the runit supervisor after install. + - debian/runit.prerm: Stop the runit supervisor before removing. + + -- Gianfranco Costamagna Tue, 06 Jan 2015 03:11:27 +0100 + +runit (2.1.2-3) unstable; urgency=medium + + * workaround #766187 by copying from sysvinit-2.88dsf: + * debian/share/inittab*: new; copy from sysvinit-2.88dsf. + * debian/rules: copy and adjust code from sysvinit-2.88dsf to install + possibly arch-specific inittab into /usr/share/runit/. + * debian/runit.postinst: copy and adjust code from sysvinit-2.88dsf + to create initial /etc/inittab (closes: #766187). + + -- Gerrit Pape Wed, 31 Dec 2014 11:32:56 +0000 + +runit (2.1.2-2ubuntu1) vivid; urgency=low + + * Merge from Debian unstable (LP: #1386581). Remaining changes: + - debian/runsvdir.upstart: Add upstart config file. + - debian/rules: + + Install runsvdir.upstart + - debian/runit.post{inst,rm}: Don't execute anything if /etc/inittab is + not available on the system. + - debian/runit.postinst: Start the runit supervisor after install. + - debian/runit.prerm: Stop the runit supervisor before removing. + + -- Gianfranco Costamagna Tue, 28 Oct 2014 09:50:40 +0100 + +runit (2.1.2-2) unstable; urgency=medium + + * debian/contrib/sv-completion.bash: bash-complete directories for + "sv" (thx Jeff King, closes: #758852). + * debian/runit.preinst, debian/runit.postinst: remove functionality + to move conffiles when upgrading from version << 1.4.0-0. + * debian/runit.preinst: remove functionality for /var/service/ to + /etc/service/ transition when upgrading from version <= 1.8.0-2. + * debian/control: Standards-Version: 3.9.6.0. + * debian/runit.lintian: remove, obsolete. + * debian/rules: no longer install lintian override file. + + -- Gerrit Pape Sat, 25 Oct 2014 10:26:19 +0000 + +runit (2.1.2-1) unstable; urgency=medium + + * new upstream version. + * debian/diff/0002-sv.c-...diff, debian/diff/0004-sv.c-...diff, + debian/diff/0005-man-sv.8-...diff: remove; applied upstream. + + -- Gerrit Pape Mon, 11 Aug 2014 18:19:38 +0000 + +runit (2.1.1-8) unstable; urgency=low + + * debian/diff/0005-man-sv.8-sv-exit-does-not-send-a-TERM-...diff: + new: man/sv.8: "sv exit" does not send a TERM signal to the log + service (thx Jonathan Nieder, closes: #627574). + * debian/diff/0006-utmpset.c-mixes-int32_t-and-time_t.diff: new: + don't pass int32_t to time() (thx Lorenzo Beretta, closes: + #754849). + * debian/rules: no longer build with dietlibc by default, support + DEB_BUILD_OPTIONS=diet; get *FLAGS through dpkg-buildflags. + * debian/control: remove Build-Depends:. + * debian/diff/0007-src-Makefile-don-t-use-static-to-link-...diff: + new: src/Makefile: don't use -static to link runit, runit-init on + Debian. + * debian/examples/start-stop-daemon.runit: updates from Andras + Korn. + * debian/control: Standards-Version: 3.9.5.0. + + -- Gerrit Pape Fri, 01 Aug 2014 06:19:57 +0000 + +runit (2.1.1-7) unstable; urgency=low + + * debian/runit.postinst, debian/runit.postrm: use test -d /proc/1 + instead of ps -p 1. + * debian/control: no longer Depends: procps. + * debian/rules: work around diet using -mpowerpc-gpopt when itself + given -Os, as -mpowerpc-gpopt generates instructions not available + on 32-bit PowerPC CPUs (thx Ryan Finnie, closes: #726008). + * debian/examples/start-stop-daemon.runit, debian/runit.examples: + new; include start-stop-daemon.runit script by Andras Korn in + /usr/share/doc/runit/examples/ (closes: #678985). + * debian/diff/0003-support-etc-runit-nosync-file-to-make-sync...diff: + new; support /etc/runit/nosync file to make sync on shutdown/reboot + optional (thx Andras Korn, closes: #695281). + * debian/contrib/sv-completion.bash: new; bash completion for sv (thx + Jeremy Lal). + * debian/rules: install sv bash completion (closes: #711335). + * debian/diff/0004-sv.c-fix-typo-that-made-sv-status-get-...diff: + new; sv.c: fix typo that made sv status get confused (closes: + #715512). + * debian/systemd/runit.service: new; runit systemd unit file (thx + Daniel Kahn Gillmor). + * debian/rules: install runit systemd unit file. + * debian/runit.postinst, debian/runit.postrm: enable and start, + disable and stop respectively, runit unit if systemd is process 1 + (closes: #722116). + + -- Gerrit Pape Mon, 28 Jul 2014 11:05:09 +0000 + +runit (2.1.1-6.2ubuntu3) raring; urgency=low + + [ Christoph Mathys ] + * Kill runsvdir with SIGHUP when entering runlevel [016]. Fixes LP: #245728, + LP: #315541 & LP: #539567. + + [ Francis Russell ] + * Remove installation of runsvdir.conf in obsolete location /etc/event.d. + * Modify postinst script so that it doesn't to try to grep /etc/inittab on + initial package install if it doesn't exist. + + -- Christoph Mathys Fri, 07 Dec 2012 20:43:15 -0500 + +runit (2.1.1-6.2ubuntu2) natty; urgency=low + + * Load debconf libraries and purge its old configuration files before + starting runsvdir so that the start command doesn't get called + twice. (LP: #708579) + + -- Bilal Akhtar Thu, 17 Mar 2011 17:43:56 +0300 + +runit (2.1.1-6.2ubuntu1) natty; urgency=low + + * Merge from Debian Unstable. Remaining changes: + - debian/runsvdir.upstart: Add upstart config file. + - debian/rules: + + Install runsvdir.upstart + + Don't compile against dietlibc on sparc and powerpc to avoid FTBFS. + - debian/runit.post{inst,rm}: Don't execute anything if /etc/inittab is + not available on the system. + - debian/runit.postinst: Start the runit supervisor after install. + - debian/runit.prerm: Stop the runit supervisor before removing. + - debian/runit.README.Debian: Add information about the change in the + location of /etc/inittab file. + + -- Bilal Akhtar Wed, 26 Jan 2011 15:26:08 +0300 + +runit (2.1.1-6.2) unstable; urgency=medium + + * Non-maintainer upload. + * remove option of suppressing HUP signal to process 1 (because it + causes upgrade failures: closes: #605912, reopens: #453106). + - debian/runit.config, debian/runit.templates.in: remove. + - debian/runit.postinst, debian/runit.postrm: signal process 1 if + and only if it is running (thx Adam D. Barratt). + - debian/rules: remove po-templates rules. + - debian/control: no longer Build-Depends: po-debconf. + * debian/control, debian/runit.README.Debian: remove vestiges of + the runit-run package. + + -- Jonathan Nieder Sun, 16 Jan 2011 13:26:58 -0600 + +runit (2.1.1-6.1ubuntu1) natty; urgency=low + + * Merge from Debian Unstable. Remaining changes: + - debian/runsvdir.upstart: Add upstart config file. + - debian/rules: + + Install runsvdir.upstart + + Don't compile against dietlibc on sparc and powerpc to avoid FTBFS. + - debian/post{inst,rm}: Don't execute anything if /etc/inittab is not + available on the system. + - debian/postinst: Start the runit supervisor after install. + - debian/prerm: Stop the runit supervisor before removing. + - debian/runit.README.Debian: Add information about the change in the + location of /etc/inittab file. + + -- Bilal Akhtar Sun, 02 Jan 2011 16:23:34 +0300 + +runit (2.1.1-6.1) unstable; urgency=low + + * Non-Maintainer Upload. + * debian/runit.config: skip preconfiguration if ps is not + installed. (Thanks, Jonathan Nieder ) + * debian/control: Depends: procps (closes: #603827). + + -- Daniel Kahn Gillmor Sun, 26 Dec 2010 14:19:53 -0500 + +runit (2.1.1-6ubuntu1) natty; urgency=low + + * Merge from debian unstable. Remaining changes: + - debian/runsvdir.upstart: Add upstart config file. + - debian/rules: + + Install runsvdir.upstart + + debian/rules: don't compile against dietlibc on sparc and powerpc to + avoid FTBFS. + - debian/post{inst,rm}: Don't execute anything if /etc/inittab is not + available on the system. + - debian/postinst: Start the runit supervisor after install. + - debian/prerm: Stop the runit supervisor before removing. + - debian/runit.README.Debian: Add information about the change in the + location of /etc/inittab file. + + -- Bilal Akhtar Sun, 17 Oct 2010 17:30:33 +0300 + +runit (2.1.1-6) unstable; urgency=high + + * debian/rules: don't set -D_FILE_OFFSET_BITS=64 on sparc (fixes + build/selftest failure on sparc). + + -- Gerrit Pape Wed, 15 Sep 2010 09:09:51 +0000 + +runit (2.1.1-5) unstable; urgency=high + + * debian/runit.postinst: make sure runsvdir starts on install (thx + alexander barakin for the patch; closes: #595334). + + -- Gerrit Pape Mon, 06 Sep 2010 15:24:12 +0000 + +runit (2.1.1-4ubuntu1) maverick; urgency=low + + * Merge from debian unstable (LP: #602686), remaining changes: + - Upstart doesn't appear to accept multiple "start on runlevel" lines. Replace + Upstart script with a version that uses a single line + - Place upstart script in the correct directory with the correct name + - No longer avoid stripping binaries on amd64. + - 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. + - runit.prerm: stop the runit supervisor. + + -- Bilal Akhtar Wed, 07 Jul 2010 15:00:34 +0300 + +runit (2.1.1-4) unstable; urgency=medium + + * debian/runit.postinst: do not write to stdout (thx alexander + barakin; closes: #584137). + + -- Gerrit Pape Wed, 09 Jun 2010 22:17:55 +0000 + +runit (2.1.1-3) unstable; urgency=low + + * debian/runit.config: typo (closes: #550816). + + -- Gerrit Pape Tue, 13 Oct 2009 08:53:18 +0000 + +runit (2.1.1-2) unstable; urgency=low + + * debian/diff/0002-sv.c-support-optional-LSB-init-script...diff: + new: sv.c: support optional LSB init script actions reload and + try-restart (closes: #545227). + + -- Gerrit Pape Sun, 11 Oct 2009 20:02:25 +0000 + +runit (2.1.1-1) unstable; urgency=low + + * new upstream version. + * debian/rules: run package/check again. + + -- Gerrit Pape Tue, 06 Oct 2009 20:02:07 +0000 + +runit (2.1.0-1) unstable; urgency=low + + * new upstream version. + * debian/runit.preinst: use dpkg-query instead of grepping + /var/lib/dpkg/status. + * debian/runit.config, debian/runit.templates.in: new; ask through + debconf before sending HUP signal to process 1 (closes: #542593, + #453106). + * debian/runit.postinst: optionally don't signal process 1. + * debian/runit.postrm: run db_purge on purge. + * debian/rules: new target po-templates. + * debian/control: Build-Depends: po-debconf. + * debian/rules: don't run package/check (workaround upstream bug). + * debian/rules: add -D_FILE_OFFSET_BITS=64 to CFLAGS (thx Alexander + Inyukhin; closes: #541280). + * debian/runit.postinst: don't fail if existing SV inittab entry is + from the runit package itself. + * debian/control: update short and long descriptions. + + -- Gerrit Pape Tue, 29 Sep 2009 23:57:08 +0000 + +runit (2.0.0-1ubuntu4) lucid; urgency=low + + [ Francis Russell ] + * Upstart doesn't appear to accept multiple "start on runlevel" lines. Replace + Upstart script with a version that uses a single line (closes LP: #439049). + + -- Chris Coulson Sat, 07 Nov 2009 16:55:18 +0000 + +runit (2.0.0-1ubuntu3) karmic; urgency=low + + * Place upstart script in the correct directory with the correct name (LP: #406621) + + -- Thom May Wed, 12 Aug 2009 10:07:55 +0100 + +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.1.2.orig/debian/contrib/sv-completion.bash +++ runit-2.1.2/debian/contrib/sv-completion.bash @@ -0,0 +1,30 @@ +# From: Jérémy Lal +# To: Debian Bug Tracking System +# Subject: runit: bash completion for sv +# Date: Thu, 06 Jun 2013 14:00:39 +0200 +# +# Please find attached a bash-completion file for sv. + +_sv_services() +{ + echo $(ls /etc/service/) +} + +_sv_commands() +{ + echo "status up down once pause cont hup alarm interrupt quit 1 2 term kill exit sv start stop reload restart shutdown force-stop force-reload force-restart force-shutdown try-restart check" +} + +_sv() +{ + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + if [ $COMP_CWORD -eq 1 ]; then + COMPREPLY=( $( compgen -W "$(_sv_commands)" $cur ) ) + elif [ $COMP_CWORD -eq 2 ]; then + COMPREPLY=( $( compgen -W "$(_sv_services)" $cur ) ) + _filedir -d + fi +} + +complete -F _sv sv --- runit-2.1.2.orig/debian/control +++ runit-2.1.2/debian/control @@ -0,0 +1,24 @@ +Source: runit +Section: admin +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Gerrit Pape +Standards-Version: 3.9.6.0 +Homepage: http://smarden.org/runit/ + +Package: runit +Architecture: any +Depends: ${shlibs:Depends} +Recommends: fgetty +Suggests: socklog-run +Description: system-wide service supervision + runit is a collection of tools to provide system-wide service supervision + and to manage services. Contrary to sysv init, it not only cares about + starting and stopping services, but also supervises the service daemons + while they are running. Amongst other things, it provides a reliable + interface to send signals to service daemons without the need for pid-files, + and a log facility with automatic log file rotation and disk space limits. + . + runit service supervision can run under sysv init or replace the init + system completely. Complete init replacement requires some manual + configuration described in the supplied documentation. --- runit-2.1.2.orig/debian/copyright +++ runit-2.1.2/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.1.2.orig/debian/diff/0001-default-directory-for-services-on-Debian-is-etc-servi.diff +++ runit-2.1.2/debian/diff/0001-default-directory-for-services-on-Debian-is-etc-servi.diff @@ -0,0 +1,87 @@ +From d99515f6c8427e5f1c8f252532df8858bdef1007 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.1.2/man/runsv.8 | 4 ++-- + runit-2.1.2/man/runsvchdir.8 | 4 ++-- + runit-2.1.2/man/sv.8 | 4 ++-- + runit-2.1.2/src/sv.c | 2 +- + 4 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/runit-2.1.2/man/runsv.8 b/runit-2.1.2/man/runsv.8 +index 7c5abfc..75bc73a 100644 +--- a/runit-2.1.2/man/runsv.8 ++++ b/runit-2.1.2/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.1.2/man/runsvchdir.8 b/runit-2.1.2/man/runsvchdir.8 +index f7f94dc..a5fc180 100644 +--- a/runit-2.1.2/man/runsvchdir.8 ++++ b/runit-2.1.2/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.1.2/man/sv.8 b/runit-2.1.2/man/sv.8 +index 7ed9852..fa56443 100644 +--- a/runit-2.1.2/man/sv.8 ++++ b/runit-2.1.2/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 +@@ -232,7 +232,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.1.2/src/sv.c b/runit-2.1.2/src/sv.c +index 0125795..887e9d1 100644 +--- a/runit-2.1.2/src/sv.c ++++ b/runit-2.1.2/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; +-- +2.0.1 + --- runit-2.1.2.orig/debian/diff/0002-support-etc-runit-nosync-file-to-make-sync-on-shutdow.diff +++ runit-2.1.2/debian/diff/0002-support-etc-runit-nosync-file-to-make-sync-on-shutdow.diff @@ -0,0 +1,106 @@ +From aed8774b9aa813cbb3e8b732f6f7ae132f86c82b Mon Sep 17 00:00:00 2001 +From: Andras Korn +Date: Thu, 6 Dec 2012 16:57:06 +0100 +Subject: [PATCH] support /etc/runit/nosync file to make sync on + shutdown/reboot optional + +https://bugs.debian.org/695281 +--- + runit-2.1.2/doc/runit.8.html | 2 ++ + runit-2.1.2/man/runit.8 | 5 +++++ + runit-2.1.2/src/runit.c | 15 ++++++++++----- + runit-2.1.2/src/runit.h | 1 + + 4 files changed, 18 insertions(+), 5 deletions(-) + +diff --git a/runit-2.1.2/doc/runit.8.html b/runit-2.1.2/doc/runit.8.html +index 6c46b39..3cc8287 100644 +--- a/runit-2.1.2/doc/runit.8.html ++++ b/runit-2.1.2/doc/runit.8.html +@@ -34,6 +34,8 @@ stage 2 if it is running, and runs /etc/runit/3. The systems tasks to shu + and possibly halt or reboot the system are done here. If stage 3 returns, + runit checks if the file /etc/runit/reboot exists and has the execute by + owner permission set. If so, the system is rebooted, it’s halted otherwise. ++If /etc/runit/nosync exists, runit doesn’t invoke ++sync(). This is useful in vservers. + +

Ctrl-alt-del

+ If runit receives the ctrl-alt-del keyboard request and the file +diff --git a/runit-2.1.2/man/runit.8 b/runit-2.1.2/man/runit.8 +index a53cf6e..faf789b 100644 +--- a/runit-2.1.2/man/runit.8 ++++ b/runit-2.1.2/man/runit.8 +@@ -48,6 +48,11 @@ checks if the file + .I /etc/runit/reboot + exists and has the execute by owner permission set. + If so, the system is rebooted, it's halted otherwise. ++If ++.I /etc/runit/nosync ++exists, ++.B runit ++doesn't invoke sync(). This is useful in vservers. + .SH CTRL-ALT-DEL + If + .B runit +diff --git a/runit-2.1.2/src/runit.c b/runit-2.1.2/src/runit.c +index 48620b3..2bb4794 100644 +--- a/runit-2.1.2/src/runit.c ++++ b/runit-2.1.2/src/runit.c +@@ -41,6 +41,11 @@ void sig_int_handler (void) { + } + void sig_child_handler (void) { write(selfpipe[1], "", 1); } + ++void sync_if_needed() { ++ struct stat s; ++ if (stat(NOSYNC, &s) == -1) sync(); ++} ++ + int main (int argc, const char * const *argv, char * const *envp) { + const char * prog[2]; + int pid, pid2; +@@ -305,28 +310,28 @@ int main (int argc, const char * const *argv, char * const *envp) { + case -1: + if ((stat(REBOOT, &s) != -1) && (s.st_mode & S_IXUSR)) { + strerr_warn2(INFO, "system reboot.", 0); +- sync(); ++ sync_if_needed(); + reboot_system(RB_AUTOBOOT); + } + else { + #ifdef RB_POWER_OFF + strerr_warn2(INFO, "power off...", 0); +- sync(); ++ sync_if_needed(); + reboot_system(RB_POWER_OFF); + sleep(2); + #endif + #ifdef RB_HALT_SYSTEM + strerr_warn2(INFO, "system halt.", 0); +- sync(); ++ sync_if_needed(); + reboot_system(RB_HALT_SYSTEM); + #else + #ifdef RB_HALT + strerr_warn2(INFO, "system halt.", 0); +- sync(); ++ sync_if_needed(); + reboot_system(RB_HALT); + #else + strerr_warn2(INFO, "system reboot.", 0); +- sync(); ++ sync_if_needed(); + reboot_system(RB_AUTOBOOT); + #endif + #endif +diff --git a/runit-2.1.2/src/runit.h b/runit-2.1.2/src/runit.h +index ba98386..bccaf2d 100644 +--- a/runit-2.1.2/src/runit.h ++++ b/runit-2.1.2/src/runit.h +@@ -1,4 +1,5 @@ + #define RUNIT "/sbin/runit" + #define STOPIT "/etc/runit/stopit" + #define REBOOT "/etc/runit/reboot" ++#define NOSYNC "/erc/runit/nosync" + #define CTRLALTDEL "/etc/runit/ctrlaltdel" +-- +2.0.1 + --- runit-2.1.2.orig/debian/diff/0003-utmpset.c-mixes-int32_t-and-time_t.diff +++ runit-2.1.2/debian/diff/0003-utmpset.c-mixes-int32_t-and-time_t.diff @@ -0,0 +1,57 @@ +From 20a0afcd367666efc17c59cf121a0d991ff1bd09 Mon Sep 17 00:00:00 2001 +From: Gerrit Pape +Date: Thu, 31 Jul 2014 12:25:49 +0000 +Subject: [PATCH] utmpset.c: mixes "int32_t *" and "time_t *" + +Don't pass int32_t to time(), thx Lorenzo Beretta, +https://bugs.debian.org/754849 +--- + runit-2.1.2/src/utmpset.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/runit-2.1.2/src/utmpset.c b/runit-2.1.2/src/utmpset.c +index eea41a5..2e8a525 100644 +--- a/runit-2.1.2/src/utmpset.c ++++ b/runit-2.1.2/src/utmpset.c +@@ -24,6 +24,7 @@ void usage(void) { strerr_die4x(1, "usage: ", progname, USAGE, "\n"); } + int utmp_logout(const char *line) { + int fd; + uw_tmp ut; ++ time_t t; + int ok =-1; + + if ((fd =open(UW_TMP_UFILE, O_RDWR, 0)) < 0) +@@ -35,7 +36,8 @@ int utmp_logout(const char *line) { + if (!ut.ut_name[0] || (str_diff(ut.ut_line, line) != 0)) continue; + memset(ut.ut_name, 0, sizeof ut.ut_name); + memset(ut.ut_host, 0, sizeof ut.ut_host); +- if (time(&ut.ut_time) == -1) break; ++ if (time(&t) == -1) break; ++ ut.ut_time = t; + #ifdef DEAD_PROCESS + ut.ut_type =DEAD_PROCESS; + #endif +@@ -52,6 +54,7 @@ int wtmp_logout(const char *line) { + int len; + struct stat st; + uw_tmp ut; ++ time_t t; + + if ((fd = open_append(UW_TMP_WFILE)) == -1) + strerr_die4sys(111, FATAL, "unable to open ", UW_TMP_WFILE, ": "); +@@ -65,10 +68,11 @@ int wtmp_logout(const char *line) { + memset(&ut, 0, sizeof(uw_tmp)); + if ((len =str_len(line)) > sizeof ut.ut_line) len =sizeof ut.ut_line -2; + byte_copy(ut.ut_line, len, line); +- if (time(&ut.ut_time) == -1) { ++ if (time(&t) == -1) { + close(fd); + return(-1); + } ++ ut.ut_time = t; + #ifdef DEAD_PROCESS + ut.ut_type =DEAD_PROCESS; + #endif +-- +2.0.1 + --- runit-2.1.2.orig/debian/diff/0004-src-Makefile-don-t-use-static-to-link-runit-runit-ini.diff +++ runit-2.1.2/debian/diff/0004-src-Makefile-don-t-use-static-to-link-runit-runit-ini.diff @@ -0,0 +1,30 @@ +From 77d0f60701a401ea0de0925d9422c78fb560b4f6 Mon Sep 17 00:00:00 2001 +From: Gerrit Pape +Date: Thu, 31 Jul 2014 12:54:32 +0000 +Subject: [PATCH] src/Makefile: don't use -static to link runit, runit-init on + Debian + +--- + runit-2.1.2/src/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/runit-2.1.2/src/Makefile b/runit-2.1.2/src/Makefile +index d9624de..507a419 100644 +--- a/runit-2.1.2/src/Makefile ++++ b/runit-2.1.2/src/Makefile +@@ -6,10 +6,10 @@ check: $(IT) + ./check-local $(IT) + + runit: load runit.o unix.a byte.a +- ./load runit unix.a byte.a -static ++ ./load runit unix.a byte.a + + runit-init: load runit-init.o unix.a byte.a +- ./load runit-init unix.a byte.a -static ++ ./load runit-init unix.a byte.a + + runsv: load runsv.o unix.a byte.a time.a + ./load runsv unix.a byte.a time.a +-- +2.0.1 + --- runit-2.1.2.orig/debian/examples/start-stop-daemon.runit +++ runit-2.1.2/debian/examples/start-stop-daemon.runit @@ -0,0 +1,309 @@ +#!/bin/zsh +# +# This script is intended to wrap start-stop-daemon. It will call the +# original start-stop-daemon with the supplied arguments unless the daemon +# to be started appears to exist as a runit service, in which case it will +# map the start-stop-daemon call to an sv(8) call. +# +# +# From: Andras Korn +# To: Debian Bug Tracking System +# Subject: Please consider including attached start-stop-daemon.runit script +# Date: Mon, 25 Jun 2012 16:46:55 +0200 +# +# Hi, +# +# Since the release of 2.88dsf-23 of sysv-rc, dependency based boot ordering +# is mandatory in Debian; however, insserv fails to recognise symlinks to +# /usr/bin/sv as valid initscripts. +# +# This makes using runit unnecessarily painful; to ease the pain, I wrote a +# pretty complete start-stop-daemon wrapper for runit (alas, in zsh). +# +# Diverting /sbin/start-stop-daemon to /sbin/start-stop-daemon.real and using +# this script, conventional initscripts continue to "work". My script +# determines whether it should pass the call through to the real +# start-stop-daemon or to use sv(8) to manage a runit service. +# +# While it's a bit of a kludge, it appears to work fairly well. +# +# An important drawback is that it needs to be adapted each time the semantics +# of start-stop-daemon change, but maybe that doesn't happen so often. +# +# The script uses few zsh-specific features; a determined person should be +# able to modify it to run in bash or even plain sh relatively easily (but I +# have no time/interest to do so myself). +# +# The script is licensed under the GPL v3, with the special exception that +# permission is granted to include it in the runit package and license it to +# users of the runit package under the same license as the rest of the +# package. +# +# Work on the script was sponsored by CAE Engineering Kft. +# +# Best regards, +# +# Andras + +# If called by non-root user, fall back to original start-stop-daemon +# unconditionally +[[ $UID -gt 0 ]] && exec /sbin/start-stop-daemon.real $@ + +set -A args $@ + +SVDIR=${SVDIR:-/etc/service} + +unset mode signal exec timeout startas testmode oknodo quiet verbose command svstat +oknodo=0 +quiet=0 + +while [[ -n "$1" ]]; do + case "$1" in + -S|--start) + mode=start + ;; + -K|--stop) + mode=stop + ;; + -T|--status) + mode=status + ;; + -H|--help|-V|--version) + exec /sbin/start-stop-daemon.real $args + ;; + -x|--exec) + shift + exec="$1" + ;; + -s|--signal) + shift + signal=$1 + ;; + --signal=*) + signal="${1/--signal=/}" + ;; + -R|--retry) + shift + timeout="$1" + ;; + --retry=*) + timeout="${1/--retry=/}" + ;; + -a|--startas) + shift + startas="$1" + ;; + -t|--test) + testmode=1 + ;; + -o|--oknodo) + oknodo=1 + ;; + -q|--quiet) + quiet=1 + exec >/dev/null + ;; + -v|--verbose) + verbose=1 + ;; + -p|--pidfile|-n|--name|-u|--user|-g|--group|-r|--chroot|-d|--chdir|-N|--nicelevel|-P|--procsched|-I|--iosched|-k|--umask|-m|--make-pidfile) + # ignored + shift + ;; + --pidfile=*|-b|--background|--nicelevel=*|--procsched=*|--iosched=*|--umask=*) + ;; + --) + # What follows is args to the daemon. Avoid parsing + # those accidentally. + break + ;; + *) + # Assume the previous was the last option; the rest + # is the name of the daemon plus args, of which we + # only care about the daemon. + command=$1 + break + ;; + esac + shift +done + +# returns success if $1 appears to be the name of a runit service +function issvname() { + if [[ -d "$SVDIR/$1/supervise/." ]]; then + return 0 + # 'supervise' could still be a symlink to a directory that doesn't exist yet + elif [[ -L $SVDIR/$1/supervise ]] && ! [[ -e $SVDIR/$1/supervise ]]; then + return 0 + else + return 1 + fi +} + +# TODO: decide what to do if the runit service we're supposed to manage +# doesn't exist in the current svdir but does in other "runlevels" + +# Try to infer runit service name. If our parent is an initscript, use its +# basename +foundsvname=0 +read -A cmdline &2 + +function sendsig() { + case "$signal" in + HUP|1) + sv hup $svname + ;; + INT|2) + sv interrupt $svname + ;; + QUIT|3) + sv quit $svname + ;; + KILL|9) + sv d $svname + sv kill $svname + ;; + USR1|10) + sv 1 $svname + ;; + USR2|12) + sv 2 $svname + ;; + ALRM|14) + sv alarm $svname + ;; + TERM|15) + sv down $svname + ;; + CONT|18) + sv cont $svname + ;; + STOP|19) + sv pause $svname + ;; + *) + echo "$0: ERROR: don't know how to send $signal signal to $svname." >&2 + exit 3 + ;; + esac +} + +function wait_until_exited() { + counter=0 + read svstat < $SVDIR/$svname/supervise/stat + while ! [[ "$svstat" = down ]]; do + ((counter++)) + [[ $counter -gt $timeout ]] && return 1 + sleep 1 + read svstat < $SVDIR/$svname/supervise/stat + done + return 0 +} + +function do_stop() { + if [[ $timeout =~ / ]]; then +# handle complex schedule + OLDIFS="$IFS" + IFS=/ + echo $timeout | read -A schedule + IFS="$OLDIFS" + while [[ -n "$schedule[1]" ]]; do + signal=$schedule[1] + sendsig + shift schedule + timeout=$schedule[1] + wait_until_exited && exit 0 + shift schedule + done + exit 2 + else +# simple timeout + if [[ -z "$signal" ]]; then + if [[ $timeout =~ ^[0-9]+$ ]]; then + export SVWAIT=$timeout + fi + if sv stop $svname; then + exit 0 + else + exit 1 + fi + else + sendsig + [[ -n "$timeout" ]] && if wait_until_exited; then + exit 0 + else + exit 1 + fi + fi + fi +} + +if [[ -r $SVDIR/$svname/supervise/stat ]]; then + read svstat < $SVDIR/$svname/supervise/stat +else + # runsv is not yet up + svstat=none +fi +case "$mode" in + start) + [[ "$svstat" = run ]] && [[ "$oknodo" = "0" ]] && exit 1 # Emulate start-stop-daemon semantics + [[ -z "$testmode" ]] && ! [[ "$svstat" = "none" ]] && sv start $svname + exit 0 + ;; + stop) + [[ "$svstat" = none ]] && exit 0 + [[ "$svstat" = down ]] && [[ "$oknodo" = "1" ]] && exit 1 # Emulate start-stop-daemon semantics + [[ -z "$testmode" ]] && do_stop # handles --retry and --signal, therefore separate function + ;; + status) + case "$svstat" in +# States are complex; we only handle the most basic cases here and bail on +# the rest (e.g. "finish" cannot be correctly reported as "running" or "not +# running") + run) + exit 0 + ;; + down|none) + exit 3 + ;; + *) + exit 4 + ;; + esac + ;; +esac +exit 0 --- runit-2.1.2.orig/debian/getty-tty5.finish +++ runit-2.1.2/debian/getty-tty5.finish @@ -0,0 +1,2 @@ +#!/bin/sh +exec utmpset -w tty5 --- runit-2.1.2.orig/debian/getty-tty5.run +++ runit-2.1.2/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.1.2.orig/debian/implicit +++ runit-2.1.2/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.1.2.orig/debian/rules +++ runit-2.1.2/debian/rules @@ -0,0 +1,156 @@ +#!/usr/bin/make -f + +VERSION =$(shell head -n1 debian/changelog |sed -e 's/.*(\(.*\)-.*).*/\1/') + +CC =gcc +STRIP =strip + +CFLAGS =$(shell DEB_BUILD_MAINT_OPTIONS=$(DEB_BUILD_MAINT_OPTIONS) \ + dpkg-buildflags --get CFLAGS) +LDFLAGS =$(shell DEB_BUILD_MAINT_OPTIONS=$(DEB_BUILD_MAINT_OPTIONS) \ + dpkg-buildflags --get LDFLAGS) +CPPFLAGS =$(shell DEB_BUILD_MAINT_OPTIONS=$(DEB_BUILD_MAINT_OPTIONS) \ + dpkg-buildflags --get CPPFLAGS) + +DEB_HOST_GNU_TYPE =$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE =$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) + CC =$(DEB_HOST_GNU_TYPE)-gcc +endif + +ifneq (,$(findstring diet,$(DEB_BUILD_OPTIONS))) + CC =diet -v -Os gcc + CFLAGS =-nostdinc -Wall + CPPFLAGS = + LDFLAGS =-pipe +endif +ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + STRIP =: strip +endif +ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) + CFLAGS +=-g +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 + # bash completion + install -d -m0755 '$(DIR)'/usr/share/bash-completion/completions + install -m0644 debian/contrib/sv-completion.bash \ + '$(DIR)'/usr/share/bash-completion/completions/sv + # 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 + # systemd service + install -d -m0755 '$(DIR)'/lib/systemd/system + install -m0644 debian/systemd/runit.service \ + '$(DIR)'/lib/systemd/system/ + + # workaround #766187 + install -d -m0755 '$(DIR)'/usr/share/runit + # copy from sysvinit-2.88dsf/debian/rules and adjust + if test -e debian/share/inittab.$(DEB_HOST_GNU_TYPE) ; \ + then \ + install -m0644 \ + debian/share/inittab.$(DEB_HOST_GNU_TYPE) \ + '$(DIR)'/usr/share/runit/inittab ; \ + elif test -e debian/share/inittab.$(DEB_HOST_GNU_SYSTEM) ; \ + then \ + install -m0644 \ + debian/share/inittab.$(DEB_HOST_GNU_SYSTEM) \ + '$(DIR)'/usr/share/runit/inittab ; \ + else \ + install -m0644 debian/share/inittab \ + '$(DIR)'/usr/share/runit/inittab ; \ + fi + # end copy from sysvinit-2.88dsf + + # changelog + rm -f changelog && ln -s runit/package/CHANGES changelog + # upstart file + install -D -m0644 debian/runsvdir.upstart \ + '$(DIR)'/etc/init/runsvdir.conf || 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.1.2.orig/debian/runit.NEWS.Debian +++ runit-2.1.2/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.1.2.orig/debian/runit.README.Debian +++ runit-2.1.2/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]. + +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.1.2.orig/debian/runit.conffiles +++ runit-2.1.2/debian/runit.conffiles @@ -0,0 +1,3 @@ +/etc/sv/getty-5/run +/etc/sv/getty-5/finish +/etc/init/runsvdir.conf --- runit-2.1.2.orig/debian/runit.docs +++ runit-2.1.2/debian/runit.docs @@ -0,0 +1,3 @@ +runit/package/README +runit/package/THANKS +runit/doc/*.html --- runit-2.1.2.orig/debian/runit.examples +++ runit-2.1.2/debian/runit.examples @@ -0,0 +1 @@ +debian/examples/* --- runit-2.1.2.orig/debian/runit.postinst +++ runit-2.1.2/debian/runit.postinst @@ -0,0 +1,61 @@ +#!/bin/sh +set -e + +test "$1" = 'configure' || exit 0 + +# workaround #766187 +# copy from sysvinit-2.88dsf/debian/sysvinit-core.postinst and adjust +if [ ! -f /etc/inittab ] +then + cp -p /usr/share/runit/inittab /etc/inittab +fi +# end copy from sysvinit-2.88dsf + +if test -z "$2"; then + # not upgrading + if [ -f /etc/inittab ] && grep '^SV:' /etc/inittab >/dev/null; then + if ! grep '^#-- runit begin' /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 +fi + +if [ -f /etc/inittab ] && ! grep '^SV:' /etc/inittab >/dev/null; then + 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 +fi + +test ! -d /proc/1 || kill -s HUP 1 + +# systemd service +test -h /etc/systemd/system/multi-user.target.wants/runit.service || + test ! -d /etc/systemd/system/multi-user.target.wants || + ln -s /lib/systemd/system/runit.service \ + /etc/systemd/system/multi-user.target.wants/ +test ! -d /run/systemd/system || systemctl start runit.service + +# remove lingering debconf-managed configuration +# from versions 2.1.0-1 through 2.1.1-6.1. +if test -r /usr/share/debconf/confmodule; then + . /usr/share/debconf/confmodule + db_purge +fi + +if [ -x /sbin/start ]; then #provided by upstart + /sbin/start runsvdir +fi + --- runit-2.1.2.orig/debian/runit.postrm +++ runit-2.1.2/debian/runit.postrm @@ -0,0 +1,30 @@ +#!/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 + test ! -d /proc/1 || kill -s HUP 1 +fi + +# systemd service +test ! -d /run/systemd/system || + ! systemctl is-active runit.service >/dev/null || + systemctl stop runit.service +rm -f /etc/systemd/system/multi-user.target.wants/runit.service + +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 + +# remove lingering debconf-managed configuration +# from versions 2.1.0-1 through 2.1.1-6.1. +test -r /usr/share/debconf/confmodule || exit 0 +. /usr/share/debconf/confmodule +db_purge --- runit-2.1.2.orig/debian/runit.preinst +++ runit-2.1.2/debian/runit.preinst @@ -0,0 +1,7 @@ +#!/bin/sh +set -e + +test "$1" = 'upgrade' || exit 0 + +test ! -x /sbin/runit || test -e /sbin/runit.old || \ + ln /sbin/runit /sbin/runit.old --- runit-2.1.2.orig/debian/runit.prerm +++ runit-2.1.2/debian/runit.prerm @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +if [ -x /sbin/stop ]; then + /sbin/stop runsvdir || true +fi --- runit-2.1.2.orig/debian/runsvdir-start.8 +++ runit-2.1.2/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.1.2.orig/debian/runsvdir.upstart +++ runit-2.1.2/debian/runsvdir.upstart @@ -0,0 +1,6 @@ +start on runlevel [2345] +stop on runlevel [016] +respawn +kill signal HUP +exec /usr/sbin/runsvdir-start + --- runit-2.1.2.orig/debian/share/inittab +++ runit-2.1.2/debian/share/inittab @@ -0,0 +1,69 @@ +# /etc/inittab: init(8) configuration. +# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $ + +# The default runlevel. +id:2:initdefault: + +# Boot-time system configuration/initialization script. +# This is run first except when booting in emergency (-b) mode. +si::sysinit:/etc/init.d/rcS + +# What to do in single-user mode. +~~:S:wait:/sbin/sulogin + +# /etc/init.d executes the S and K scripts upon change +# of runlevel. +# +# Runlevel 0 is halt. +# Runlevel 1 is single-user. +# Runlevels 2-5 are multi-user. +# Runlevel 6 is reboot. + +l0:0:wait:/etc/init.d/rc 0 +l1:1:wait:/etc/init.d/rc 1 +l2:2:wait:/etc/init.d/rc 2 +l3:3:wait:/etc/init.d/rc 3 +l4:4:wait:/etc/init.d/rc 4 +l5:5:wait:/etc/init.d/rc 5 +l6:6:wait:/etc/init.d/rc 6 +# Normally not reached, but fallthrough in case of emergency. +z6:6:respawn:/sbin/sulogin + +# What to do when CTRL-ALT-DEL is pressed. +ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now + +# Action on special keypress (ALT-UpArrow). +#kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work." + +# What to do when the power fails/returns. +pf::powerwait:/etc/init.d/powerfail start +pn::powerfailnow:/etc/init.d/powerfail now +po::powerokwait:/etc/init.d/powerfail stop + +# /sbin/getty invocations for the runlevels. +# +# The "id" field MUST be the same as the last +# characters of the device (after "tty"). +# +# Format: +# ::: +# +# Note that on most Debian systems tty7 is used by the X Window System, +# so if you want to add more getty's go ahead but skip tty7 if you run X. +# +1:2345:respawn:/sbin/getty 38400 tty1 +2:23:respawn:/sbin/getty 38400 tty2 +3:23:respawn:/sbin/getty 38400 tty3 +4:23:respawn:/sbin/getty 38400 tty4 +5:23:respawn:/sbin/getty 38400 tty5 +6:23:respawn:/sbin/getty 38400 tty6 + +# Example how to put a getty on a serial line (for a terminal) +# +#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100 +#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100 + +# Example how to put a getty on a modem line. +# +#T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3 + --- runit-2.1.2.orig/debian/share/inittab.gnu +++ runit-2.1.2/debian/share/inittab.gnu @@ -0,0 +1,70 @@ +# /etc/inittab: init(8) configuration. +# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $ + +# The default runlevel. +id:2:initdefault: + +# Boot-time system configuration/initialization script. +# This is run first except when booting in emergency (-b) mode. +si::sysinit:/etc/init.d/rcS + +# What to do in single-user mode. +~~:S:wait:/sbin/sulogin + +# /etc/init.d executes the S and K scripts upon change +# of runlevel. +# +# Runlevel 0 is halt. +# Runlevel 1 is single-user. +# Runlevels 2-5 are multi-user. +# Runlevel 6 is reboot. + +l0:0:wait:/etc/init.d/rc 0 +l1:1:wait:/etc/init.d/rc 1 +l2:2:wait:/etc/init.d/rc 2 +l3:3:wait:/etc/init.d/rc 3 +l4:4:wait:/etc/init.d/rc 4 +l5:5:wait:/etc/init.d/rc 5 +l6:6:wait:/etc/init.d/rc 6 +# Normally not reached, but fallthrough in case of emergency. +z6:6:respawn:/sbin/sulogin + +# What to do when CTRL-ALT-DEL is pressed. +ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now + +# Action on special keypress (ALT-UpArrow). +#kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work." + +# What to do when the power fails/returns. +pf::powerwait:/etc/init.d/powerfail start +pn::powerfailnow:/etc/init.d/powerfail now +po::powerokwait:/etc/init.d/powerfail stop + +# /sbin/getty invocations for the runlevels. +# +# The "id" field MUST be the same as the last +# characters of the device (after "tty"). +# +# Format: +# ::: +# +# Note that on most Debian systems tty7 is used by the X Window System, +# so if you want to add more getty's go ahead but skip tty7 if you run X. +# +1:2345:respawn:/sbin/getty 38400 tty1 +2:23:respawn:/sbin/getty 38400 tty2 +3:23:respawn:/sbin/getty 38400 tty3 +4:23:respawn:/sbin/getty 38400 tty4 +5:23:respawn:/sbin/getty 38400 tty5 +6:23:respawn:/sbin/getty 38400 tty6 +c:23:respawn:/sbin/getty 38400 console + +# Example how to put a getty on a serial line (for a terminal) +# +#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100 +#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100 + +# Example how to put a getty on a modem line. +# +#T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3 + --- runit-2.1.2.orig/debian/share/inittab.kfreebsd-gnu +++ runit-2.1.2/debian/share/inittab.kfreebsd-gnu @@ -0,0 +1,69 @@ +# /etc/inittab: init(8) configuration. +# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $ + +# The default runlevel. +id:2:initdefault: + +# Boot-time system configuration/initialization script. +# This is run first except when booting in emergency (-b) mode. +si::sysinit:/etc/init.d/rcS + +# What to do in single-user mode. +~~:S:wait:/sbin/sulogin + +# /etc/init.d executes the S and K scripts upon change +# of runlevel. +# +# Runlevel 0 is halt. +# Runlevel 1 is single-user. +# Runlevels 2-5 are multi-user. +# Runlevel 6 is reboot. + +l0:0:wait:/etc/init.d/rc 0 +l1:1:wait:/etc/init.d/rc 1 +l2:2:wait:/etc/init.d/rc 2 +l3:3:wait:/etc/init.d/rc 3 +l4:4:wait:/etc/init.d/rc 4 +l5:5:wait:/etc/init.d/rc 5 +l6:6:wait:/etc/init.d/rc 6 +# Normally not reached, but fallthrough in case of emergency. +z6:6:respawn:/sbin/sulogin + +# What to do when CTRL-ALT-DEL is pressed. +ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now + +# Action on special keypress (ALT-UpArrow). +#kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work." + +# What to do when the power fails/returns. +pf::powerwait:/etc/init.d/powerfail start +pn::powerfailnow:/etc/init.d/powerfail now +po::powerokwait:/etc/init.d/powerfail stop + +# /sbin/getty invocations for the runlevels. +# +# The "id" field MUST be the same as the last +# characters of the device (after "tty"). +# +# Format: +# ::: +# +# Note that on most Debian systems ttyv6 is used by the X Window System, +# so if you want to add more getty's go ahead but skip ttyv6 if you run X. +# +1:2345:respawn:/sbin/getty 38400 ttyv0 xterm +2:23:respawn:/sbin/getty 38400 ttyv1 xterm +3:23:respawn:/sbin/getty 38400 ttyv2 xterm +4:23:respawn:/sbin/getty 38400 ttyv3 xterm +5:23:respawn:/sbin/getty 38400 ttyv4 xterm +6:23:respawn:/sbin/getty 38400 ttyv5 xterm + +# Example how to put a getty on a serial line (for a terminal) +# +#T0:23:respawn:/sbin/getty -L cuau0 9600 vt100 +#T1:23:respawn:/sbin/getty -L cuau1 9600 vt100 + +# Example how to put a getty on a modem line. +# +#T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyd3 + --- runit-2.1.2.orig/debian/share/inittab.knetbsd-gnu +++ runit-2.1.2/debian/share/inittab.knetbsd-gnu @@ -0,0 +1,67 @@ +# /etc/inittab: init(8) configuration. +# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $ + +# The default runlevel. +id:2:initdefault: + +# Boot-time system configuration/initialization script. +# This is run first except when booting in emergency (-b) mode. +si::sysinit:/etc/init.d/rcS + +# What to do in single-user mode. +~~:S:wait:/sbin/sulogin + +# /etc/init.d executes the S and K scripts upon change +# of runlevel. +# +# Runlevel 0 is halt. +# Runlevel 1 is single-user. +# Runlevels 2-5 are multi-user. +# Runlevel 6 is reboot. + +l0:0:wait:/etc/init.d/rc 0 +l1:1:wait:/etc/init.d/rc 1 +l2:2:wait:/etc/init.d/rc 2 +l3:3:wait:/etc/init.d/rc 3 +l4:4:wait:/etc/init.d/rc 4 +l5:5:wait:/etc/init.d/rc 5 +l6:6:wait:/etc/init.d/rc 6 +# Normally not reached, but fallthrough in case of emergency. +z6:6:respawn:/sbin/sulogin + +# What to do when CTRL-ALT-DEL is pressed. +ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now + +# Action on special keypress (ALT-UpArrow). +#kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work." + +# What to do when the power fails/returns. +pf::powerwait:/etc/init.d/powerfail start +pn::powerfailnow:/etc/init.d/powerfail now +po::powerokwait:/etc/init.d/powerfail stop + +# /sbin/getty invocations for the runlevels. +# +# The "id" field MUST be the same as the last +# characters of the device (after "tty"). +# +# Format: +# ::: +# +# Note that on most Debian systems tty7 is used by the X Window System, +# so if you want to add more getty's go ahead but skip tty7 if you run X. +# +1:2345:respawn:/sbin/getty 38400 ttyE0 +2:23:respawn:/sbin/getty 38400 ttyE1 +3:23:respawn:/sbin/getty 38400 ttyE2 +4:23:respawn:/sbin/getty 38400 ttyE3 + +# Example how to put a getty on a serial line (for a terminal) +# +#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100 +#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100 + +# Example how to put a getty on a modem line. +# +#T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3 + --- runit-2.1.2.orig/debian/share/inittab.s390-linux-gnu +++ runit-2.1.2/debian/share/inittab.s390-linux-gnu @@ -0,0 +1,63 @@ +# /etc/inittab: init(8) configuration. +# $Id: inittab.s390,v 1.9 2000/01/10 10:15:30 miquels Exp $ + +# The default runlevel. +id:2:initdefault: + +# Boot-time system configuration/initialization script. +# This is run first except when booting in emergency (-b) mode. +si::sysinit:/etc/init.d/rcS + +# What to do in single-user mode. +~~:S:wait:/sbin/sulogin + +# /etc/init.d executes the S and K scripts upon change +# of runlevel. +# +# Runlevel 0 is halt. +# Runlevel 1 is single-user. +# Runlevels 2-5 are multi-user. +# Runlevel 6 is reboot. + +l0:0:wait:/etc/init.d/rc 0 +l1:1:wait:/etc/init.d/rc 1 +l2:2:wait:/etc/init.d/rc 2 +l3:3:wait:/etc/init.d/rc 3 +l4:4:wait:/etc/init.d/rc 4 +l5:5:wait:/etc/init.d/rc 5 +l6:6:wait:/etc/init.d/rc 6 +# Normally not reached, but fallthrough in case of emergency. +z6:6:respawn:/sbin/sulogin + +# What to do when CTRL-ALT-DEL is pressed. +ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now + +# Action on special keypress (ALT-UpArrow). +kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work." + +# What to do when the power fails/returns. +pf::powerwait:/etc/init.d/powerfail start +pn::powerfailnow:/etc/init.d/powerfail now +po::powerokwait:/etc/init.d/powerfail stop + +# /sbin/getty invocations for the runlevels. +# +# The "id" field MUST be the same as the last +# characters of the device (after "tty"). +# +# Format: +# ::: +# +# The s390 only has a dumb terminal on /dev/console. +# +1:2345:respawn:/sbin/getty 38400 console dumb + +# Example how to put a getty on a serial line (for a terminal) +# +#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100 +#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100 + +# Example how to put a getty on a modem line. +# +#T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3 + --- runit-2.1.2.orig/debian/share/inittab.s390x-linux-gnu +++ runit-2.1.2/debian/share/inittab.s390x-linux-gnu @@ -0,0 +1,63 @@ +# /etc/inittab: init(8) configuration. +# $Id: inittab.s390x,v 1.9 2000/01/10 10:15:30 miquels Exp $ + +# The default runlevel. +id:2:initdefault: + +# Boot-time system configuration/initialization script. +# This is run first except when booting in emergency (-b) mode. +si::sysinit:/etc/init.d/rcS + +# What to do in single-user mode. +~~:S:wait:/sbin/sulogin + +# /etc/init.d executes the S and K scripts upon change +# of runlevel. +# +# Runlevel 0 is halt. +# Runlevel 1 is single-user. +# Runlevels 2-5 are multi-user. +# Runlevel 6 is reboot. + +l0:0:wait:/etc/init.d/rc 0 +l1:1:wait:/etc/init.d/rc 1 +l2:2:wait:/etc/init.d/rc 2 +l3:3:wait:/etc/init.d/rc 3 +l4:4:wait:/etc/init.d/rc 4 +l5:5:wait:/etc/init.d/rc 5 +l6:6:wait:/etc/init.d/rc 6 +# Normally not reached, but fallthrough in case of emergency. +z6:6:respawn:/sbin/sulogin + +# What to do when CTRL-ALT-DEL is pressed. +ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now + +# Action on special keypress (ALT-UpArrow). +kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work." + +# What to do when the power fails/returns. +pf::powerwait:/etc/init.d/powerfail start +pn::powerfailnow:/etc/init.d/powerfail now +po::powerokwait:/etc/init.d/powerfail stop + +# /sbin/getty invocations for the runlevels. +# +# The "id" field MUST be the same as the last +# characters of the device (after "tty"). +# +# Format: +# ::: +# +# The s390x only has a dumb terminal on /dev/console. +# +1:2345:respawn:/sbin/getty 38400 console dumb + +# Example how to put a getty on a serial line (for a terminal) +# +#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100 +#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100 + +# Example how to put a getty on a modem line. +# +#T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3 + --- runit-2.1.2.orig/debian/systemd/runit.service +++ runit-2.1.2/debian/systemd/runit.service @@ -0,0 +1,9 @@ +[Unit] +Description=Runit service supervision + +[Service] +ExecStart=/usr/sbin/runsvdir-start +Restart=always + +[Install] +WantedBy=multi-user.target --- runit-2.1.2.orig/debian/update-service +++ runit-2.1.2/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.1.2.orig/debian/update-service.8 +++ runit-2.1.2/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