runit

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 1756a093fdeee412054f85b0d2a86ba95451effc
parent eed66e2a51ad5988f94c452aae146d0d6bb7f67f
Author: Gerrit Pape <pape@smarden.org>
Date:   Mon, 20 Mar 2006 19:12:20 +0000

  * 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.
-1.

Diffstat:
Mdebian/changelog | 15+++++++++++++++
Mdebian/rules | 17+++++++++--------
Mdebian/runit.conffiles | 4++--
Mdebian/runit.postinst | 13+++++++++++++
Mdebian/runit.preinst | 19+++++++++++++++++++
5 files changed, 58 insertions(+), 10 deletions(-)

diff --git a/debian/changelog b/debian/changelog @@ -1,3 +1,18 @@ +runit (1.4.1-1) unstable; urgency=low + + * new upstream version. + * fixes setting of multiple groups with dietlibc (thx Tino Keitel, + closes: #356016). + * debian/rules: no longer install the runsvctrl, runsvstat, svwaitdown, + svwaitup programsi an man pages, use sv instead; move getty-5 service + directory to /etc/sv/getty-5/; move /var/run/getty-5/ to + /var/run/sv.getty-5/. + * debian/runit.conffiles: adapt. + * debian/runit.preinst, debian/runit.postinst: move conffiles, preserve + user changes. + + -- Gerrit Pape <pape@smarden.org> Mon, 20 Mar 2006 19:11:51 +0000 + runit (1.3.3-1) unstable; urgency=low * new upstream version. diff --git a/debian/rules b/debian/rules @@ -52,8 +52,7 @@ install: deb-checkdir deb-checkuid build-stamp for i in runit runit-init; do \ install -m0755 admin/runit/src/$$i '$(DIR)'/sbin/ || exit 1; \ done - for i in runsvdir runsv sv svlogd svwaitdown svwaitup runsvstat \ - runsvctrl chpst; do \ + for i in runsvdir runsv sv svlogd chpst; do \ install -m0755 admin/runit/src/$$i '$(DIR)'/usr/bin/ || exit 1; \ done for i in runsvchdir utmpset; do \ @@ -64,22 +63,24 @@ install: deb-checkdir deb-checkuid build-stamp # runsvdir-start to be used from /etc/inittab install -m0755 debian/2 '$(DIR)'/usr/sbin/runsvdir-start # getty-5 service - install -d -m0755 '$(DIR)'/etc/runit/getty-5 - install -m0755 debian/getty-tty5.run '$(DIR)'/etc/runit/getty-5/run + 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/runit/getty-5/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 - install -m0644 admin/runit/man/*.8 '$(DIR)'/usr/share/man/man8/ + for i in runsvdir runsv sv svlogd chpst runsvchdir utmpset; do \ + install -m0644 admin/runit/man/$$i.8 \ + '$(DIR)'/usr/share/man/man8/ || exit 1; \ + done install -m0644 debian/runsvdir-start.8 '$(DIR)'/usr/share/man/man8/ gzip -9 '$(DIR)'/usr/share/man/man8/*.8 # links - install -d -m0755 '$(DIR)'/var/run/getty-5 - ln -s /var/run/getty-5 '$(DIR)'/etc/runit/getty-5/supervise + 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 \ diff --git a/debian/runit.conffiles b/debian/runit.conffiles @@ -1,2 +1,2 @@ -/etc/runit/getty-5/run -/etc/runit/getty-5/finish +/etc/sv/getty-5/run +/etc/sv/getty-5/finish diff --git a/debian/runit.postinst b/debian/runit.postinst @@ -3,6 +3,19 @@ set -e test "$1" = 'configure' || exit 0 +mv_conffile() { + test -e "$1" || return 0 + echo "Preserving user changes to $2..." + mv -f "$2" "$2".dpkg-new + mv -f "$1" "$2" +} + +if dpkg --compare-versions "$2" lt '1.4.0-0'; then + mv_conffile /etc/runit/getty-5/run /etc/sv/getty-5/run + mv_conffile /etc/runit/getty-5/finish /etc/sv/getty-5/finish + rmdir /etc/runit/getty-5 2>/dev/null || : +fi + if test -z "$2"; then # not upgrading if grep '^SV:' /etc/inittab >/dev/null; then diff --git a/debian/runit.preinst b/debian/runit.preinst @@ -1,6 +1,25 @@ #!/bin/sh set -e +test "$1" = 'install' || test "$1" = 'upgrade' || exit 0 + +check_conffile() { + test -e "$1" || return 0 + md5=`md5sum <"$1"` + md5=${md5%% *} + md5orig=`grep " $1 " </var/lib/dpkg/status || :` + md5orig=${md5orig## * } + test "$md5" != "$md5orig" || rm -f "$1" +} + +if dpkg --compare-versions "$2" lt '1.4.0-0'; then + check_conffile /etc/runit/getty-5/run + check_conffile /etc/runit/getty-5/finish + ! test -d /var/run/getty-5 || + mv -f /var/run/getty-5 /var/run/sv.getty-5 +fi + test "$1" = 'upgrade' || exit 0 + test ! -x /sbin/runit || test -e /sbin/runit.old || \ ln /sbin/runit /sbin/runit.old