From 15d3633b2c184da3d11e5d692add12ea8d00b341 Mon Sep 17 00:00:00 2001 From: ian Date: Fri, 31 Oct 2003 22:55:41 +0000 Subject: [PATCH] @@ -1,3 +1,22 @@ +userv (1.0.1.99.1) unstable; urgency=low + + Debian packaging improvements: + * Standards-Version 3.6.1. + * /etc/init.d/userv nicer output: colons, . printed after done. + * Maintainer scripts use invoke-rc.d if it's available. + * Maintainer scripts discard stdout from update-rc.d. + * No more messing with /usr/doc, must have /usr/share/doc. + * Support unstripped binaries in the .deb, with DEB_BUILD_OPTIONS. + * Fixed typo in debian/copyright. + * When doing /etc/init.d/userv restart, don't mind if not already + running. + * debian/rules clean removes whole spec.html subdirectory. + * Ship spec.ps (Closes: #210859) + * added lintian override for suid binary userv (Closes: #211055) + (Thanks to Martin Pitt's NMU for inspirations and one-liners.) + + -- Ian Jackson Fri, 31 Oct 2003 22:55:37 +0000 + userv (1.0.1.99.0) unstable; urgency=low Bugfixes: --- debian/changelog | 19 ++++++++++++++ debian/control | 2 +- debian/copyright | 2 +- debian/initd | 17 +++++++++---- debian/lintian | 1 + debian/postinst | 12 ++++----- debian/postrm | 2 +- debian/prerm | 9 ++++--- debian/rules | 64 +++++++++++++++++++++++++++--------------------- 9 files changed, 82 insertions(+), 46 deletions(-) create mode 100644 debian/lintian diff --git a/debian/changelog b/debian/changelog index 95df7f5..f168fc5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,22 @@ +userv (1.0.1.99.1) unstable; urgency=low + + Debian packaging improvements: + * Standards-Version 3.6.1. + * /etc/init.d/userv nicer output: colons, . printed after done. + * Maintainer scripts use invoke-rc.d if it's available. + * Maintainer scripts discard stdout from update-rc.d. + * No more messing with /usr/doc, must have /usr/share/doc. + * Support unstripped binaries in the .deb, with DEB_BUILD_OPTIONS. + * Fixed typo in debian/copyright. + * When doing /etc/init.d/userv restart, don't mind if not already + running. + * debian/rules clean removes whole spec.html subdirectory. + * Ship spec.ps (Closes: #210859) + * added lintian override for suid binary userv (Closes: #211055) + (Thanks to Martin Pitt's NMU for inspirations and one-liners.) + + -- Ian Jackson Fri, 31 Oct 2003 22:55:37 +0000 + userv (1.0.1.99.0) unstable; urgency=low Bugfixes: diff --git a/debian/control b/debian/control index 8fa7546..6bf5d86 100644 --- a/debian/control +++ b/debian/control @@ -2,8 +2,8 @@ Source: userv Section: admin Priority: optional Maintainer: Ian Jackson -Standards-Version: 2.1.1.0 Build-Depends: debiandoc-sgml, tetex-bin +Standards-Version: 3.6.1 Package: userv Architecture: any diff --git a/debian/copyright b/debian/copyright index 41b1bb3..2ebce1b 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,4 +1,4 @@ -This is Debian/GNU Linux's prepackaged version of Ian Jackson's +This is Debian GNU/Linux's prepackaged version of Ian Jackson's `userv' system utility. This package was put together from the upstream sources by the diff --git a/debian/initd b/debian/initd index 4a01629..11d5637 100644 --- a/debian/initd +++ b/debian/initd @@ -4,23 +4,30 @@ test -f /usr/sbin/uservd || exit 0 case "$1" in start) - echo "Starting user services daemon uservd" + echo -n "Starting user services daemon: uservd" start-stop-daemon --start --quiet --exec /usr/sbin/uservd -- -daemon + echo "." ;; + stop) - echo "Stopping user services daemon uservd" + echo -n "Stopping user services daemon: uservd" start-stop-daemon --stop --quiet --user root --exec /usr/sbin/uservd + echo "." ;; + restart) - echo "Restarting user services daemon uservd" - start-stop-daemon --stop --quiet --user root --exec /usr/sbin/uservd + echo -n "Restarting user services daemon: uservd" + start-stop-daemon --stop --oknodo --quiet --user root \ + --exec /usr/sbin/uservd sleep 1 start-stop-daemon --start --quiet --exec /usr/sbin/uservd -- -daemon + echo "." ;; + reload | force-reload) ;; *) - echo "Usage: /etc/init.d/userv {start|stop|reload}" + echo "Usage: /etc/init.d/userv {start|stop|restart|reload|force-reload}" exit 1 esac diff --git a/debian/lintian b/debian/lintian new file mode 100644 index 0000000..b497efa --- /dev/null +++ b/debian/lintian @@ -0,0 +1 @@ +userv: setuid-binary usr/bin/userv 4755 root/root diff --git a/debian/postinst b/debian/postinst index 8e10e0e..0341112 100644 --- a/debian/postinst +++ b/debian/postinst @@ -1,11 +1,9 @@ #!/bin/sh set -e -update-rc.d userv defaults 19 50 -/etc/init.d/userv start >/dev/null +update-rc.d userv defaults 19 50 > /dev/null -if [ "$1" = "configure" ]; then - if [ -d /usr/doc -a ! -e /usr/doc/userv -a -d /usr/share/doc/userv ]; then - ln -sf ../share/doc/userv /usr/doc/userv - fi +if type -p invoke-rc.d >/dev/null 2>&1; then + invoke-rc.d userv start +else + /etc/init.d/userv start fi - diff --git a/debian/postrm b/debian/postrm index caab552..9072e11 100644 --- a/debian/postrm +++ b/debian/postrm @@ -2,5 +2,5 @@ set -e if test "$1" = purge then - update-rc.d userv remove + update-rc.d userv remove >/dev/null fi diff --git a/debian/prerm b/debian/prerm index cfb68f1..fb21d38 100644 --- a/debian/prerm +++ b/debian/prerm @@ -1,8 +1,11 @@ #!/bin/sh set -e -/etc/init.d/userv stop >/dev/null +if type -p invoke-rc.d >/dev/null 2>&1; then + invoke-rc.d userv stop +else + /etc/init.d/userv stop +fi if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/userv ]; then - rm -f /usr/doc/userv + rm -f /usr/doc/userv fi - diff --git a/debian/rules b/debian/rules index 66c9299..bdd1fa9 100755 --- a/debian/rules +++ b/debian/rules @@ -2,6 +2,14 @@ package=userv +t=debian/tmp + +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTOPTS= LDFLAGS=-s INSTALL_PROGRAM='install -c -s' +else + INSTOPTS= INSTALL_PROGRAM='install -c' +endif + build: $(checkdir) ./configure --prefix=/usr @@ -12,7 +20,8 @@ clean: $(checkdir) -rm -f build -$(MAKE) -i distclean || $(MAKE) -f Makefile.in distclean - -rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars* + -rm -rf *~ $t debian/*~ debian/files* debian/substvars* + -rm -rf spec.html binary-indep: checkroot build $(checkdir) @@ -22,36 +31,35 @@ binary-indep: checkroot build binary-arch: checkroot build $(checkdir) - -rm -rf debian/tmp - install -d debian/tmp/{DEBIAN,etc/init.d} debian/tmp/usr/{sbin,bin} - install -d debian/tmp/etc/userv/{override,default}.d - install -d debian/tmp/usr/doc/$(package)/examples/ - install -d debian/tmp/var/run/$(package)/ - cp debian/{postinst,prerm,postrm,conffiles} debian/tmp/DEBIAN/. - cp debian/initd debian/tmp/etc/init.d/userv - chmod 755 debian/tmp/DEBIAN/{postinst,prerm,postrm} - chmod 755 debian/tmp/etc/init.d/userv - $(MAKE) LDFLAGS=-s INSTALL_PROGRAM='install -c -s' \ - prefix=debian/tmp/usr etcdir=debian/tmp/etc \ - docdir=debian/tmp/usr/doc/userv \ + -rm -rf $t + install -d $t/{DEBIAN,etc/init.d} $t/usr/{sbin,bin} + install -d $t/etc/userv/{override,default}.d + install -d $t/usr/share/doc/$(package)/examples/ + install -d $t/var/run/$(package)/ + install -d $t/usr/share/lintian/overrides/ + cp debian/{postinst,prerm,postrm,conffiles} $t/DEBIAN/. + cp debian/initd $t/etc/init.d/userv + chmod 755 $t/DEBIAN/{postinst,prerm,postrm} + chmod 755 $t/etc/init.d/userv + $(MAKE) $(INSTOPTS) \ + prefix=$t/usr etcdir=$t/etc \ + docdir=$t/usr/share/doc/userv \ + mandir=$t/usr/share/man \ install install-doc - cp debian/copyright debian/tmp/usr/doc/$(package)/. - cp debian/changelog debian/tmp/usr/doc/$(package)/changelog - cp README debian/tmp/usr/doc/$(package)/README.upstream - cp system.default system.override debian/tmp/usr/doc/$(package)/examples - ln -s changelog.gz debian/tmp/usr/doc/$(package)/changelog.Debian.gz - gzip -9v debian/tmp/usr/doc/$(package)/changelog debian/tmp/usr/man/man1/*.1 - rm debian/tmp/usr/doc/userv/*.ps - -mkdir -p -m 0755 debian/tmp/usr/share/doc - mv debian/tmp/usr/doc/* debian/tmp/usr/share/doc/ - mv debian/tmp/usr/man debian/tmp/usr/share/man - rm -rf debian/tmp/usr/doc + cp debian/copyright $t/usr/share/doc/$(package)/. + cp debian/changelog $t/usr/share/doc/$(package)/changelog + cp README $t/usr/share/doc/$(package)/README.upstream + cp system.default system.override $t/usr/share/doc/$(package)/examples + ln -s changelog.gz $t/usr/share/doc/$(package)/changelog.Debian.gz + gzip -9v $t/usr/share/doc/$(package)/changelog \ + $t/usr/share/man/man1/*.1 $t/usr/share/doc/userv/*.ps + cp debian/lintian $t/usr/share/lintian/overrides/userv dpkg-shlibdeps daemon client dpkg-gencontrol -isp - chown -R root.root debian/tmp - chmod -R og=rX debian/tmp - chmod 700 debian/tmp/var/run/userv - dpkg --build debian/tmp .. + chown -R root.root $t + chmod -R og=rX $t + chmod 700 $t/var/run/userv + dpkg --build $t .. define checkdir test -f overlord.c -a -f lexer.l.m4 -a -f debian/rules -- 2.30.2