diff options
-rw-r--r-- | autoscripts/postinst-menu | 2 | ||||
-rw-r--r-- | autoscripts/postinst-menu-method | 2 | ||||
-rw-r--r-- | autoscripts/postinst-suid | 2 | ||||
-rw-r--r-- | autoscripts/postinst-wm | 2 | ||||
-rw-r--r-- | autoscripts/postrm-menu-method | 2 | ||||
-rw-r--r-- | autoscripts/postrm-suid | 2 | ||||
-rw-r--r-- | autoscripts/postrm-wm | 3 | ||||
-rw-r--r-- | debian/changelog | 14 | ||||
-rw-r--r-- | debian/control | 3 | ||||
-rwxr-xr-x | debian/rules | 2 | ||||
-rwxr-xr-x | dh_installdocs | 15 | ||||
-rw-r--r-- | dh_installdocs.1 | 16 | ||||
-rwxr-xr-x | dh_suidregister | 2 |
13 files changed, 56 insertions, 11 deletions
diff --git a/autoscripts/postinst-menu b/autoscripts/postinst-menu index a73a1692..49b2c5de 100644 --- a/autoscripts/postinst-menu +++ b/autoscripts/postinst-menu @@ -1 +1 @@ -if [ -x /usr/bin/update-menus ] ; then update-menus ; fi +if command -v update-menus >/dev/null 2>&1 ; then update-menus ; fi diff --git a/autoscripts/postinst-menu-method b/autoscripts/postinst-menu-method index 0ea7959b..7f7aaa96 100644 --- a/autoscripts/postinst-menu-method +++ b/autoscripts/postinst-menu-method @@ -1,5 +1,5 @@ inst=/etc/menu-methods/#PACKAGE# -if [ -x /usr/bin/update-menus -a -f $inst -a -x /usr/sbin/install-menu ] ; then +if command -v update-menus >/dev/null 2>&1 && [ -f $inst ] ; then chmod a+x $inst update-menus fi diff --git a/autoscripts/postinst-suid b/autoscripts/postinst-suid index 1294d313..de638efe 100644 --- a/autoscripts/postinst-suid +++ b/autoscripts/postinst-suid @@ -1,4 +1,4 @@ -if [ -e /etc/suid.conf -a -x /usr/sbin/suidregister ]; then +if command -v suidregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then suidregister -s #PACKAGE# /#FILE# #OWNER# #GROUP# #PERMS# else chown #OWNER#.#GROUP# /#FILE# diff --git a/autoscripts/postinst-wm b/autoscripts/postinst-wm index 94c052fc..925c7883 100644 --- a/autoscripts/postinst-wm +++ b/autoscripts/postinst-wm @@ -1,3 +1,3 @@ -if [ -x /usr/sbin/register-window-manager ] ; then +if command -v register-window-manager >/dev/null 2>&1; then register-window-manager --add #WM# fi diff --git a/autoscripts/postrm-menu-method b/autoscripts/postrm-menu-method index 3e63f2f4..0c2baae9 100644 --- a/autoscripts/postrm-menu-method +++ b/autoscripts/postrm-menu-method @@ -1,3 +1,3 @@ inst=/etc/menu-methods/#PACKAGE# if [ "$1" = "remove" -a -f "$inst" ]; then chmod a-x $inst ; fi -if [ -x /usr/bin/update-menus ] ; then update-menus; fi +if command -v update-menus >/dev/null 2>&1 ; then update-menus; fi diff --git a/autoscripts/postrm-suid b/autoscripts/postrm-suid index 9712d256..d4a76199 100644 --- a/autoscripts/postrm-suid +++ b/autoscripts/postrm-suid @@ -1,3 +1,3 @@ -if [ -e /etc/suid.conf -a -x /usr/sbin/suidunregister ]; then +if command -v suidunregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then suidunregister -s #PACKAGE# /#FILE# fi diff --git a/autoscripts/postrm-wm b/autoscripts/postrm-wm index 6dc9f5da..8345aa97 100644 --- a/autoscripts/postrm-wm +++ b/autoscripts/postrm-wm @@ -1,3 +1,4 @@ -if [ "$1" == "purge" -a -x /usr/sbin/register-window-manager ] ; then +if [ "$1" == "purge" ] && command -v register-window-manager >/dev/null 2>&1 +then register-window-manager --remove #WM# fi diff --git a/debian/changelog b/debian/changelog index 3db2cd84..5cdf2f47 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +debhelper (1.2.21) unstable; urgency=low + + * dh_installdocs: Added doc-base support, if debian/<package>.doc-base + exists, it will be installed as a doc-base control file. If you use this, + you probably want to add "dh_testversion 1.2.21" to the rules file to make + sure your package is built with a new enough debhelper. + * dh_installdocs: now supports -n to make it not modify postinst/prerm. + * dh_suidregister: turned off leading 0/1 in permissions settings, until + suidregister actually supports it. + * autoscripts/*: instead of "text -x", use "command -v" to see if various + binaries exist. This gets rid of lots of hard-coded paths. + + -- Joey Hess <joeyh@master.debian.org> Wed, 30 Dec 1998 22:50:04 -0500 + debhelper (1.2.20) unstable; urgency=low * dh_compress: handle the hard link stuff properly, it was broken. Also diff --git a/debian/control b/debian/control index 8edb5aa9..7254be98 100644 --- a/debian/control +++ b/debian/control @@ -12,4 +12,5 @@ Description: helper programs for debian/rules A collection of programs that can be used in a debian/rules file to automate common tasks related to building binary debian packages. Programs are included to install various files into your package, compress files, fix - file permissions, integrate your package with the debian menu system, etc. + file permissions, integrate your package with the debian menu system, + suidmanager, doc-base, etc. diff --git a/debian/rules b/debian/rules index 14b5e7f0..0d9676f2 100755 --- a/debian/rules +++ b/debian/rules @@ -73,4 +73,4 @@ dist: fi binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary localdist +.PHONY: build clean binary-indep binary-arch binary dist diff --git a/dh_installdocs b/dh_installdocs index 97117a34..347881cc 100755 --- a/dh_installdocs +++ b/dh_installdocs @@ -2,6 +2,7 @@ # # Reads debian/docs, installs all files listed there into /usr/doc/$PACKAGE # Also installs the debian/copyright and debian/README.debian and debian/TODO +# and handles debian/doc-base. BEGIN { push @INC, "debian", "/usr/lib/debhelper" } use Dh_Lib; @@ -60,4 +61,18 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { if ($copyright) { doit("install","-m","644","-p",$copyright,"$TMP/usr/doc/$PACKAGE/copyright"); } + + # Handle doc-base files. + $file=pkgfile($PACKAGE,"doc-base"); + if ($file) { + if (! -d "$TMP/usr/share/doc-base/") { + doit("install","-d","$TMP/usr/share/doc-base/"); + } + doit("install","-p","-m644",$file, + "$TMP/usr/share/doc-base/$PACKAGE"); + if (! $dh{NOSCRIPTS}) { + autoscript($PACKAGE,"postinst","postinst-doc-base"); + autoscript($PACKAGE,"postrm","postrm-doc-base") + } + } } diff --git a/dh_installdocs.1 b/dh_installdocs.1 index f711492b..abdef780 100644 --- a/dh_installdocs.1 +++ b/dh_installdocs.1 @@ -3,7 +3,7 @@ dh_installdocs \- install documentation into package build directories .SH SYNOPSIS .B dh_installdocs -.I "[debhelper options] [-A] [file ...]" +.I "[debhelper options] [-A] [-n] [file ...]" .SH "DESCRIPTION" dh_installdocs is a debhelper program that is responsible for installing documentation into usr/doc/package in package build directories. @@ -29,6 +29,15 @@ debian/package.TODO can be used to specify files for subpackages. .P A file named debian/package.docs (debian/docs may be used for the first binary package in debian/control) can list other files to be installed. +.P +A file named debian/package.doc-base (debian/doc-base may be used for the +first binary package in debian/control), if it exists, will make +dh_installdocs use that file as a doc-base control file, and will +automatically generate the postinst and prerm commands needed to +interface with the doc-base package. See +.BR dh_installdeb (1) +for an explanation of how this works. Note that the package name will be +used as the doc-base document id. .SH OPTIONS .TP .B debhelper options @@ -40,6 +49,9 @@ for a list of options common to all debhelper commands. Install all files specified by command line parameters in ALL packages acted on. .TP +.B \-n, \--noscripts +DO not modify postinst/prerm scripts. +.TP .B file ... Install these files as documentation into the first package acted on. (Or in all packages if -A is specified). @@ -53,6 +65,8 @@ See for a list of environment variables that affect all debhelper commands. .SH "SEE ALSO" .BR debhelper (1) +.TP +.BR install-docs (8) .SH BUGS It's impossible to specify filenames with spaces or other whitespace in them in debian/docs file. This is more a historical design flaw than a bug. diff --git a/dh_suidregister b/dh_suidregister index d5b10ebd..951984fe 100755 --- a/dh_suidregister +++ b/dh_suidregister @@ -52,7 +52,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { $group=getgrgid($gid); # Note that I have to print mode in ocal, stripping file type. $sedstr=sprintf("s:#FILE#:$file:;s/#PACKAGE#/$PACKAGE/;s/#OWNER#/$user/;s/#GROUP#/$group/;s/#PERMS#/%#o/", - $mode & 07777); + $mode & 00777); autoscript($PACKAGE,"postinst","postinst-suid",$sedstr); autoscript($PACKAGE,"postrm","postrm-suid","$sedstr"); |