runit

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

commit 9a2500c965ca2477069c509173b8220dc8c54926
parent f4788637cee576b3df1aa28d238e34312ad11778
Author: Gerrit Pape <pape@smarden.org>
Date:   Mon, 29 Dec 2003 14:58:26 +0000

  * debian/control: no longer Build-Depends: debhelper; Standards-Version:
    3.6.1.0.
  * debian/rules: stop using debhelper, use implicit rules.
  * 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.
-2.

Diffstat:
Mdebian/changelog | 14++++++++++++++
Mdebian/control | 4++--
Adebian/implicit | 67+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mdebian/rules | 197+++++++++++++++++++++++++++++--------------------------------------------------
Rdebian/README.Debian -> debian/runit.README.Debian | 0
Adebian/runit.conffiles | 2++
Ddebian/runit.dirs | 6------
Adebian/runit.docs | 3+++
Ddebian/runit.links | 1-
Mdebian/runit.postinst | 27---------------------------
Mdebian/runit.postrm | 21---------------------
Mdebian/runit.preinst | 39+++++++++++++--------------------------
12 files changed, 173 insertions(+), 208 deletions(-)

diff --git a/debian/changelog b/debian/changelog @@ -1,3 +1,17 @@ +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. + * debian/implicit: new; implicit Makefile rules. + * debian/README.Debian: rename to debian/runit.README.Debian. + * debian/runit.dirs, debian/runit.links: remove; obsolete. + * debian/runit.conffiles, debian/runit.docs: new. + * debian/runit.postinst, debian/runit.postrm, debian/runit.preinst: minor + cleanup. + + -- Gerrit Pape <pape@smarden.org> Mon, 29 Dec 2003 14:51:48 +0000 + runit (0.12.1-1) unstable; urgency=low * new upstream version. diff --git a/debian/control b/debian/control @@ -2,8 +2,8 @@ Source: runit Section: admin Priority: optional Maintainer: Gerrit Pape <pape@smarden.org> -Build-Depends: dietlibc-dev (>> 0.24-0) [alpha arm hppa i386 ia64 mips mipsel powerpc sparc], debhelper (>> 3.0.0) -Standards-Version: 3.6.0 +Build-Depends: dietlibc-dev (>> 0.24-0) [alpha arm hppa i386 ia64 mips mipsel powerpc sparc] +Standards-Version: 3.6.1.0 Package: runit Architecture: any diff --git a/debian/implicit b/debian/implicit @@ -0,0 +1,67 @@ +# $Id$ + +.PHONY: deb-checkdir deb-checkuid + +deb-checkdir: + test -e debian/control || ! : wrong directory +deb-checkuid: + test "`id -u`" -eq 0 || ! : need root privileges + +%.deb: %.deb-docs %.deb-DEBIAN + @rm -f $*.deb $*.deb-checkdir $*.deb-docs \ + $*.deb-docs-examples $*.deb-docs-base \ + $*.deb-DEBIAN $*.deb-DEBIAN-dir \ + $*.deb-DEBIAN-scripts $*.deb-DEBIAN-md5sums + +%.deb-checkdir: + test -d debian/$* || ! : directory missing + test "`id -u`" -eq 0 || ! : need root privileges + +%.deb-docs-base: + : implicit + -rm -f debian/$*/usr/share/doc/$*/* + install -d -m0755 debian/$*/usr/share/doc/$* + install -m0644 debian/copyright debian/$*/usr/share/doc/$*/ + install -m0644 debian/changelog \ + debian/$*/usr/share/doc/$*/changelog.Debian + test ! -r changelog || \ + install -m0644 changelog debian/$*/usr/share/doc/$*/ + test -r debian/$*/usr/share/doc/$*/changelog || \ + mv debian/$*/usr/share/doc/$*/changelog.Debian \ + debian/$*/usr/share/doc/$*/changelog + gzip -9 debian/$*/usr/share/doc/$*/changelog* +%.deb-docs-examples: + rm -rf 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 \ + install -m0644 $$i debian/$*/usr/share/doc/$*/examples/ || exit 1; \ + done +%.deb-docs: %.deb-checkdir %.deb-docs-base %.deb-docs-examples + for i in `cat debian/$*.docs 2>/dev/null || :`; do \ + install -m0644 $$i debian/$*/usr/share/doc/$*/ || exit 1; \ + done + test ! -r debian/$*.README.Debian || \ + install -m0644 debian/$*.README.Debian \ + debian/$*/usr/share/doc/$*/README.Debian + : debian/$*/usr/share/doc/$*/ created + +%.deb-DEBIAN-base: + rm -rf debian/$*/DEBIAN + install -d -m0755 debian/$*/DEBIAN + for i in conffiles shlibs; do \ + test ! -r debian/$*.$$i || \ + install -m0644 debian/$*.$$i debian/$*/DEBIAN/$$i || exit 1; \ + done +%.deb-DEBIAN-scripts: + for i in preinst prerm postinst postrm; do \ + test ! -r debian/$*.$$i || \ + install -m0755 debian/$*.$$i debian/$*/DEBIAN/$$i || exit 1; \ + done +%.deb-DEBIAN-md5sums: + (cd debian/$* && \ + find * -type f ! -regex '^DEBIAN/.*' -print0 |xargs -r0 md5sum \ + >DEBIAN/md5sums) +%.deb-DEBIAN: %.deb-checkdir %.deb-DEBIAN-base %.deb-DEBIAN-scripts \ + %.deb-DEBIAN-md5sums + : debian/$*/DEBIAN/ created diff --git a/debian/rules b/debian/rules @@ -1,15 +1,11 @@ #!/usr/bin/make -f -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -export DH_COMPAT=3 - DEB_HOST_ARCH ?=$(shell dpkg-architecture -qDEB_HOST_ARCH) CFLAGS =-O2 -Wall LDFLAGS =-s -Os -pipe CC =diet -v -Os gcc +STRIP =strip ifneq ($(DEB_HOST_ARCH),alpha) ifneq ($(DEB_HOST_ARCH),arm) @@ -20,7 +16,7 @@ ifneq ($(DEB_HOST_ARCH),mips) ifneq ($(DEB_HOST_ARCH),mipsel) ifneq ($(DEB_HOST_ARCH),powerpc) ifneq ($(DEB_HOST_ARCH),sparc) - CC =gcc + CC =gcc endif endif endif @@ -31,141 +27,92 @@ endif endif endif -configure: configure-stamp -configure-stamp: - dh_testdir - - touch configure-stamp +ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) + CFLAGS +=-g +endif +ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + STRIP =: nostrip +endif -build-arch: configure-stamp build-arch-stamp -build-arch-stamp: - dh_testdir +DIR =`pwd`/debian/runit - tar xfzvp runit-0.12.1.tar.gz -# for i in debian/diff/*.diff; do \ -# cat $$i | ( cd admin/runit-0.12.1 && patch -p0 ); \ -# done +build: deb-checkdir build-stamp +build-stamp: + tar xfzp runit-0.12.1.tar.gz -gcc -v - ( \ - set -e; \ - cd admin/runit-0.12.1/src; \ - ln -s runit-0.12.1 runit; mv runit ../..; \ - echo "$(CC) $(CFLAGS)" >conf-cc; \ - echo "$(CC) $(LDFLAGS)" >conf-ld; \ + cd admin/runit-0.12.1/src && \ + ln -s runit-0.12.1 runit && mv runit ../.. && \ + echo "$(CC) $(CFLAGS)" >conf-cc && \ + echo "$(CC) $(LDFLAGS)" >conf-ld && \ $(MAKE); \ ) + touch build-stamp - touch build-arch-stamp - -build-indep: configure-stamp build-indep-stamp -build-indep-stamp: - dh_testdir - - touch build-indep-stamp - -build: build-arch build-indep - -clean: - dh_testdir - dh_testroot - rm -f build-arch-stamp build-indep-stamp configure-stamp - +clean: deb-checkdir deb-checkuid rm -rf admin - dh_clean - -install: DH_OPTIONS= -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # runit - install -m0500 admin/runit-0.12.1/src/runit \ - $(CURDIR)/debian/runit/sbin/runit - install -m0500 admin/runit-0.12.1/src/runit-init \ - $(CURDIR)/debian/runit/sbin/runit-init - install -m0755 admin/runit-0.12.1/src/runsvdir \ - $(CURDIR)/debian/runit/usr/bin/runsvdir - install -m0755 admin/runit-0.12.1/src/runsv \ - $(CURDIR)/debian/runit/usr/bin/runsv - install -m0755 admin/runit-0.12.1/src/runsvchdir \ - $(CURDIR)/debian/runit/usr/sbin/runsvchdir - install -m0755 admin/runit-0.12.1/src/svlogd \ - $(CURDIR)/debian/runit/usr/bin/svlogd - install -m0755 admin/runit-0.12.1/src/svwaitdown \ - $(CURDIR)/debian/runit/usr/bin/svwaitdown - install -m0755 admin/runit-0.12.1/src/svwaitup \ - $(CURDIR)/debian/runit/usr/bin/svwaitup - install -m0755 admin/runit-0.12.1/src/utmpset \ - $(CURDIR)/debian/runit/usr/sbin/utmpset - install -m0755 admin/runit-0.12.1/src/runsvstat \ - $(CURDIR)/debian/runit/usr/bin/runsvstat - install -m0755 admin/runit-0.12.1/src/runsvctrl \ - $(CURDIR)/debian/runit/usr/bin/runsvctrl - install -m0755 admin/runit-0.12.1/src/chpst \ - $(CURDIR)/debian/runit/usr/bin/chpst - + rm -f build-stamp + rm -rf "$(DIR)" + rm -f debian/files debian/substvars changelog + +install: deb-checkdir deb-checkuid build-stamp + rm -rf "$(DIR)" + install -d -m0755 "$(DIR)"/var/service + install -d -m0755 "$(DIR)"/sbin + install -d -m0755 "$(DIR)"/usr/bin + install -d -m0755 "$(DIR)"/usr/sbin + for i in runit runit-init; do \ + install -m0755 admin/runit/src/$$i "$(DIR)"/sbin/ || exit 1; \ + done + for i in runsvdir runsv svlogd svwaitdown svwaitup runsvstat \ + runsvctrl chpst; do \ + install -m0755 admin/runit/src/$$i "$(DIR)"/usr/bin/ || exit 1; \ + done + for i in runsvchdir utmpset; do \ + install -m0755 admin/runit/src/$$i "$(DIR)"/usr/sbin/ || exit 1; \ + done + install -m0755 admin/runit/src/utmpset "$(DIR)"/usr/sbin/ + $(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 \ - $(CURDIR)/debian/runit/usr/sbin/runsvdir-start - + install -m0755 debian/2 "$(DIR)"/usr/sbin/runsvdir-start # temporary? - ( cd $(CURDIR)/debian/runit/usr/sbin/ && ln -s ../bin/chpst setuidgid ) - - install -m0755 admin/runit-0.12.1/etc/debian/getty-tty5/run \ - $(CURDIR)/debian/runit/etc/runit/getty-5/run - install -m0755 admin/runit-0.12.1/etc/debian/getty-tty5/finish \ - $(CURDIR)/debian/runit/etc/runit/getty-5/finish - + ln -s ../bin/chpst "$(DIR)"/usr/sbin/setuidgid + # getty-5 service + install -d -m0755 "$(DIR)"/etc/runit/getty-5 + install -m0755 admin/runit/etc/debian/getty-tty5/run \ + "$(DIR)"/etc/runit/getty-5/run + install -m0755 admin/runit/etc/debian/getty-tty5/finish \ + "$(DIR)"/etc/runit/getty-5/finish # lintian overrides - install -m0755 -d $(CURDIR)/debian/runit/usr/share/lintian/overrides + install -m0755 -d "$(DIR)"/usr/share/lintian/overrides install -m0644 debian/runit.lintian \ - $(CURDIR)/debian/runit/usr/share/lintian/overrides/runit - - # docs - install -m0755 -d $(CURDIR)/debian/runit/usr/share/doc/runit - for i in README THANKS; do \ - install -m0644 admin/runit/package/$$i \ - $(CURDIR)/debian/runit/usr/share/doc/runit/; \ - done - for i in README.Debian copyright; do \ - install -m0644 debian/$$i \ - $(CURDIR)/debian/runit/usr/share/doc/runit/; \ - done - install -m0755 -d $(CURDIR)/debian/runit/usr/share/doc/runit/doc - for i in admin/runit/doc/*.html; do \ - install -m0644 $$i $(CURDIR)/debian/runit/usr/share/doc/runit/doc/; \ - done - install -m0755 -d $(CURDIR)/debian/runit/usr/share/doc/runit/doc/debian + "$(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/ + 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 + # additional docs + install -m0755 -d "$(DIR)"/usr/share/doc/runit/debian for i in 1 2 3 ctrlaltdel; do \ install -m0644 admin/runit/etc/debian/$$i \ - $(CURDIR)/debian/runit/usr/share/doc/runit/doc/debian/; \ + "$(DIR)"/usr/share/doc/runit/debian/; \ done + # changelog + rm -f changelog && ln -s admin/runit/package/CHANGES changelog -# Build architecture-independent files here. -binary-indep: build install +binary-indep: -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir -a - dh_testroot -a -# dh_installdebconf -a -# dh_installdocs -an -# dh_installexamples -a - dh_installman -a admin/runit/man/*.8 - dh_installchangelogs -a admin/runit-0.12.1/package/CHANGES - dh_strip -a - dh_link -a - dh_compress -a - dh_fixperms -a -X/sbin -# dh_makeshlibs -a - dh_installdeb -a - dh_shlibdeps -a - dh_gencontrol -a - dh_md5sums -a - dh_builddeb -a +binary-arch: deb-checkdir deb-checkuid 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: build clean binary-indep binary-arch binary install configure +.PHONY: build clean install binary-indep binary-arch binary + +include debian/implicit diff --git a/debian/README.Debian b/debian/runit.README.Debian diff --git a/debian/runit.conffiles b/debian/runit.conffiles @@ -0,0 +1,2 @@ +/etc/runit/getty-5/run +/etc/runit/getty-5/finish diff --git a/debian/runit.dirs b/debian/runit.dirs @@ -1,6 +0,0 @@ -sbin -usr/sbin -usr/bin -var/service -etc/runit/getty-5 -var/run/getty-5 diff --git a/debian/runit.docs b/debian/runit.docs @@ -0,0 +1,3 @@ +admin/runit/package/README +admin/runit/package/THANKS +admin/runit/doc/*.html diff --git a/debian/runit.links b/debian/runit.links @@ -1 +0,0 @@ -/var/run/getty-5 /etc/runit/getty-5/supervise diff --git a/debian/runit.postinst b/debian/runit.postinst @@ -1,28 +1,6 @@ #! /bin/sh -# postinst script for runit -# -# see: dh_installdeb(1) - set -e -# summary of how this script can be called: -# * <postinst> `configure' <most-recently-configured-version> -# * <old-postinst> `abort-upgrade' <new version> -# * <conflictor's-postinst> `abort-remove' `in-favour' <package> -# <new-version> -# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' -# <failed-install-package> <version> `removing' -# <conflicting-package> <version> -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package -# -# quoting from the policy: -# Any necessary prompting should almost always be confined to the -# post-installation script, and should be protected with a conditional -# so that unnecessary prompting doesn't happen if a package's -# installation fails and the `postinst' is called with `abort-upgrade', -# `abort-remove' or `abort-deconfigure'. - case "$1" in configure) if test -z "$2"; then @@ -60,9 +38,4 @@ EOT ;; esac -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - exit 0 diff --git a/debian/runit.postrm b/debian/runit.postrm @@ -1,22 +1,6 @@ #! /bin/sh -# postrm script for runit -# -# see: dh_installdeb(1) - set -e -# summary of how this script can be called: -# * <postrm> `remove' -# * <postrm> `purge' -# * <old-postrm> `upgrade' <new-version> -# * <new-postrm> `failed-upgrade' <old-version> -# * <new-postrm> `abort-install' -# * <new-postrm> `abort-install' <old-version> -# * <new-postrm> `abort-upgrade' <old-version> -# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version> -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - case "$1" in remove) if grep -q "#-- runit begin" /etc/inittab; then @@ -39,9 +23,4 @@ case "$1" in ;; esac -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - exit 0 diff --git a/debian/runit.preinst b/debian/runit.preinst @@ -1,32 +1,19 @@ #! /bin/sh -# preinst script for runit -# -# see: dh_installdeb(1) - set -e -# summary of how this script can be called: -# * <new-preinst> `install' -# * <new-preinst> `install' <old-version> -# * <new-preinst> `upgrade' <old-version> -# * <old-preinst> `abort-upgrade' <new-version> -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - case "$1" in - install) - ;; - upgrade) - if [ -x /sbin/runit -a ! -e /sbin/runit.old ]; then - ln /sbin/runit /sbin/runit.old - fi - ;; - abort-upgrade) - ;; - *) - echo "preinst called with unknown argument \`$1'" >&2 - exit 1 + install) + ;; + upgrade) + test ! -x /sbin/runit || test -e /sbin/runit.old || \ + ln /sbin/runit /sbin/runit.old + ;; + abort-upgrade) ;; + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; esac + +exit 0