From 93a4b4298d7ec022216f403674583dd04b7f4f5e Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:24:34 +0000 Subject: r8: Initial Import --- examples/rules | 1 + examples/rules.multi | 1 + 2 files changed, 2 insertions(+) (limited to 'examples') diff --git a/examples/rules b/examples/rules index b18213c3..efd4b76c 100755 --- a/examples/rules +++ b/examples/rules @@ -35,6 +35,7 @@ binary-arch: build dh_installmenu dh_installmanpages dh_installchangelogs + dh_strip dh_compress dh_installdebfiles dh_fixperms diff --git a/examples/rules.multi b/examples/rules.multi index 118737cb..b31578e6 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -51,6 +51,7 @@ binary-arch: build dh_installmenu -a dh_installmanpages -a dh_installchangelogs -a + dh_strip -a dh_compress -a dh_installdebfiles -a dh_fixperms -a -- cgit v1.2.3 From dd838eee7e75da018b2722f0ce4dbccd9f6d1a5d Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:24:34 +0000 Subject: r10: Initial Import --- debian/changelog | 6 ++++++ dh_installdebfiles.1 | 2 +- examples/rules | 1 + examples/rules.multi | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index 27594de9..99a22f79 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +debhelper (0.5) unstable; urgency=low + + * Added dh_installcron to install cron jobs. + + -- Joey Hess Tue, 30 Sep 1997 19:37:41 -0400 + debhelper (0.4) unstable; urgency=low * Added dh_strip to strip binaries and libraries. diff --git a/dh_installdebfiles.1 b/dh_installdebfiles.1 index 3a7e93c5..9827656a 100644 --- a/dh_installdebfiles.1 +++ b/dh_installdebfiles.1 @@ -7,7 +7,7 @@ dh_installdebfiles \- install files into the DEBIAN directory .SH "DESCRIPTION" dh_installdebfiles is a debhelper program that is responsible for installing files into the DEBIAN directory in package build directories with the -correct prmissions. +correct permissions. .P dh_installdocs automatically installs the following files from debian/ into the DEBIAN directory: diff --git a/examples/rules b/examples/rules index efd4b76c..65e6878e 100755 --- a/examples/rules +++ b/examples/rules @@ -33,6 +33,7 @@ binary-arch: build dh_installdocs dh_installexamples dh_installmenu + dh_installcron dh_installmanpages dh_installchangelogs dh_strip diff --git a/examples/rules.multi b/examples/rules.multi index b31578e6..f5e82597 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -32,6 +32,7 @@ binary-indep: build dh_installdocs -i dh_installexamples -i dh_installmenu -i + dh_installcron -i # dh_installmanpages -i dh_installchangelogs -i dh_compress -i @@ -49,6 +50,7 @@ binary-arch: build dh_installdocs -a dh_installexamples -a dh_installmenu -a + dh_installcron -a dh_installmanpages -a dh_installchangelogs -a dh_strip -a -- cgit v1.2.3 From d079e6683cfcbef6a979eb7a02780eebdf480a74 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:34:25 +0000 Subject: r12: Initial Import --- .foo | 0 BUGS | 3 + autoscripts/postinst-init | 2 + autoscripts/postinst-init-norestart | 1 + autoscripts/postinst-suid | 6 ++ autoscripts/postrm-init | 3 + autoscripts/postrm-suid | 3 + autoscripts/prerm-init | 1 + debian/changelog | 6 ++ dh_builddeb | 2 +- dh_clean | 2 +- dh_compress | 2 +- dh_du | 19 +++++ dh_du.1 | 42 +++++++++++ dh_fixperms | 2 +- dh_gencontrol | 19 +++++ dh_gencontrol.1 | 55 ++++++++++++++ dh_getopt.pl | 138 ++++++++++++++++++++++++++++++++++++ dh_installchangelogs | 2 +- dh_installcron | 2 +- dh_installdeb | 46 ++++++++++++ dh_installdeb.1 | 67 +++++++++++++++++ dh_installdebfiles | 2 +- dh_installdirs | 39 ++++++++++ dh_installdirs.1 | 59 +++++++++++++++ dh_installdocs | 2 +- dh_installdocs.1 | 13 ++-- dh_installexamples | 2 +- dh_installexamples.1 | 4 ++ dh_installinit | 58 +++++++++++++++ dh_installinit.1 | 70 ++++++++++++++++++ dh_installmanpages | 2 +- dh_installmenu | 2 +- dh_lib | 12 ++-- dh_makeshlibs | 30 ++++++++ dh_makeshlibs.1 | 47 ++++++++++++ dh_md5sums | 22 ++++++ dh_md5sums.1 | 45 ++++++++++++ dh_movefiles.1 | 46 ++++++++++++ dh_shlibdeps | 24 +++++++ dh_shlibdeps.1 | 56 +++++++++++++++ dh_strip | 2 +- dh_suidregister | 58 +++++++++++++++ dh_suidregister.1 | 62 ++++++++++++++++ dh_testdir | 2 +- dh_testroot | 2 +- dh_testversion.1 | 46 ++++++++++++ dh_testversion.in | 23 ++++++ dh_undocumented | 51 +++++++++++++ dh_undocumented.1 | 68 ++++++++++++++++++ examples/rules.indep | 56 +++++++++++++++ 51 files changed, 1304 insertions(+), 24 deletions(-) create mode 100644 .foo create mode 100644 BUGS create mode 100644 autoscripts/postinst-init create mode 100644 autoscripts/postinst-init-norestart create mode 100644 autoscripts/postinst-suid create mode 100644 autoscripts/postrm-init create mode 100644 autoscripts/postrm-suid create mode 100644 autoscripts/prerm-init create mode 100755 dh_du create mode 100644 dh_du.1 create mode 100755 dh_gencontrol create mode 100644 dh_gencontrol.1 create mode 100755 dh_getopt.pl create mode 100755 dh_installdeb create mode 100644 dh_installdeb.1 create mode 100755 dh_installdirs create mode 100644 dh_installdirs.1 create mode 100755 dh_installinit create mode 100644 dh_installinit.1 create mode 100755 dh_makeshlibs create mode 100644 dh_makeshlibs.1 create mode 100755 dh_md5sums create mode 100644 dh_md5sums.1 create mode 100644 dh_movefiles.1 create mode 100755 dh_shlibdeps create mode 100644 dh_shlibdeps.1 create mode 100755 dh_suidregister create mode 100644 dh_suidregister.1 create mode 100644 dh_testversion.1 create mode 100644 dh_testversion.in create mode 100755 dh_undocumented create mode 100644 dh_undocumented.1 create mode 100755 examples/rules.indep (limited to 'examples') diff --git a/.foo b/.foo new file mode 100644 index 00000000..e69de29b diff --git a/BUGS b/BUGS new file mode 100644 index 00000000..3a33f32e --- /dev/null +++ b/BUGS @@ -0,0 +1,3 @@ +dh_compress: doesn't verbose echo that it's cd'd to $TMP. +dh_installdirs, dh_md5sums: uses ../.. to cd back to original location, but + we don't know that $TMP is 2 levels deep. diff --git a/autoscripts/postinst-init b/autoscripts/postinst-init new file mode 100644 index 00000000..976c6b34 --- /dev/null +++ b/autoscripts/postinst-init @@ -0,0 +1,2 @@ +update-rc.d #SCRIPT# #INITPARMS# >/dev/null +/etc/init.d/#SCRIPT# start diff --git a/autoscripts/postinst-init-norestart b/autoscripts/postinst-init-norestart new file mode 100644 index 00000000..05357d07 --- /dev/null +++ b/autoscripts/postinst-init-norestart @@ -0,0 +1 @@ +update-rc.d #SCRIPT# #INITPARMS# >/dev/null diff --git a/autoscripts/postinst-suid b/autoscripts/postinst-suid new file mode 100644 index 00000000..1294d313 --- /dev/null +++ b/autoscripts/postinst-suid @@ -0,0 +1,6 @@ +if [ -e /etc/suid.conf -a -x /usr/sbin/suidregister ]; then + suidregister -s #PACKAGE# /#FILE# #OWNER# #GROUP# #PERMS# +else + chown #OWNER#.#GROUP# /#FILE# + chmod #PERMS# /#FILE# +fi diff --git a/autoscripts/postrm-init b/autoscripts/postrm-init new file mode 100644 index 00000000..9596dd97 --- /dev/null +++ b/autoscripts/postrm-init @@ -0,0 +1,3 @@ +if [ "$1" = "purge" ] ; then + update-rc.d #SCRIPT# remove #INITPARMS# >/dev/null +fi diff --git a/autoscripts/postrm-suid b/autoscripts/postrm-suid new file mode 100644 index 00000000..9712d256 --- /dev/null +++ b/autoscripts/postrm-suid @@ -0,0 +1,3 @@ +if [ -e /etc/suid.conf -a -x /usr/sbin/suidunregister ]; then + suidunregister -s #PACKAGE# /#FILE# +fi diff --git a/autoscripts/prerm-init b/autoscripts/prerm-init new file mode 100644 index 00000000..64975a38 --- /dev/null +++ b/autoscripts/prerm-init @@ -0,0 +1 @@ +/etc/init.d/#SCRIPT# stop diff --git a/debian/changelog b/debian/changelog index 99a22f79..a4d47c4c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +debhelper (0.6) unstable; urgency=low + + * Got rid of bashisms - this package should work now if /bin/sh is ash. + + -- Joey Hess Fri, 10 Oct 1997 15:24:40 -0400 + debhelper (0.5) unstable; urgency=low * Added dh_installcron to install cron jobs. diff --git a/dh_builddeb b/dh_builddeb index 7bea3c06..aea8a1b1 100755 --- a/dh_builddeb +++ b/dh_builddeb @@ -3,7 +3,7 @@ # Build the .deb package, assuming all the files are set up. PATH=debian:$PATH:/usr/lib/debhelper -source dh_lib +. dh_lib for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` diff --git a/dh_clean b/dh_clean index cb20e973..964eec3d 100755 --- a/dh_clean +++ b/dh_clean @@ -4,7 +4,7 @@ # build process. PATH=debian:$PATH:/usr/lib/debhelper -source dh_lib +. dh_lib for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` diff --git a/dh_compress b/dh_compress index a1ff97e3..347f0f5f 100755 --- a/dh_compress +++ b/dh_compress @@ -4,7 +4,7 @@ # compressed files get fixed. PATH=debian:$PATH:/usr/lib/debhelper -source dh_lib +. dh_lib for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` diff --git a/dh_du b/dh_du new file mode 100755 index 00000000..a7ec6f48 --- /dev/null +++ b/dh_du @@ -0,0 +1,19 @@ +#!/bin/sh -e +# +# Generate a DEBIAN/du file, that lists the disk usage of the directories in +# the package. + +PATH=debian:$PATH:/usr/lib/debhelper +. dh_lib + +for PACKAGE in $DH_DOPACKAGES; do + TMP=`tmpdir $PACKAGE` + + if [ ! -d "debian/$TMP/DEBIAN" ]; then + doit "install -d debian/$TMP/DEBIAN" + fi + + verbose_echo "du -k debian/$TMP | sed \"s: debian/$TMP/: :\" | grep -v \" DEBIAN$\" | grep -v \" debian/$TMP$\" > debian/$TMP/DEBIAN/du" + du -k debian/$TMP | sed "s: debian/$TMP/: :" | grep -v " DEBIAN$" | grep -v " debian/$TMP$" >debian/$TMP/DEBIAN/du + doit "chown root.root debian/tmp/DEBIAN/du" +done diff --git a/dh_du.1 b/dh_du.1 new file mode 100644 index 00000000..98a9c80a --- /dev/null +++ b/dh_du.1 @@ -0,0 +1,42 @@ +.TH DH_DU 1 +.SH NAME +dh_du \- generate DEBIAN/du file +.SH SYNOPSIS +.B dh_md5sums +.I "[-v] [-a] [-i] [-ppackage]" +.SH "DESCRIPTION" +dh_du is a debhelper program that is responsible for generating +a DEBIAN/du file, which lists the disk usage of directories in the package. +This file isn't used by anthing yet, but it could be helpful for a future +debian installer program. +.P +The du file is installed with proper permissions and ownerships. +.SH OPTIONS +.TP +.B \-v +Verbose mode; show all commands that modify the package build directory. +.TP +.B \-a +Generate du files for all architecture dependent packages. +.TP +.B \-i +Generate du files for all architecture independent packages. +.TP +.B \-ppackage +Generate du file for the package named "package". +.SH NOTES +The +.B \-a +.B \-i +and +.B \-p +arguments are cumulative. If none are specified, then all packages listed in +the control file will be effected. +.SH ENVIRONMENT +.TP +.I DH_VERBOSE +Enables verbose mode +.SH "SEE ALSO" +.BR /usr/doc/debhelper/README +.SH AUTHOR +Joey Hess diff --git a/dh_fixperms b/dh_fixperms index 97738313..6e935a8a 100755 --- a/dh_fixperms +++ b/dh_fixperms @@ -3,7 +3,7 @@ # Do some general file permission fixups. PATH=debian:$PATH:/usr/lib/debhelper -source dh_lib +. dh_lib for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` diff --git a/dh_gencontrol b/dh_gencontrol new file mode 100755 index 00000000..e2a4e701 --- /dev/null +++ b/dh_gencontrol @@ -0,0 +1,19 @@ +#!/bin/sh -e +# +# Generate and install the control file. Simple dpkg-gencontrol wrapper. + +PATH=debian:$PATH:/usr/lib/debhelper +. dh_lib + +for PACKAGE in $DH_DOPACKAGES; do + TMP=`tmpdir $PACKAGE` + EXT=`pkgext $PACKAGE` + + if [ ! -d $TMP/DEBIAN ]; then + doit "install -o root -g root -d $TMP/DEBIAN" + fi + + # Generate and install control file. + doit "dpkg-gencontrol -p$PACKAGE -Tdebian/${EXT}substvars -P$TMP $DH_U_PARAMS" + doit "chown root.root $TMP/DEBIAN/control" +done diff --git a/dh_gencontrol.1 b/dh_gencontrol.1 new file mode 100644 index 00000000..7b78248f --- /dev/null +++ b/dh_gencontrol.1 @@ -0,0 +1,55 @@ +.TH DH_INSTALLDEBFILES 1 +.SH NAME +dh_gencontrol \- generate and install control file +.SH SYNOPSIS +.B dh_gencontrol +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [-uparams]" +.SH "DESCRIPTION" +dh_gencontrol is a debhelper program that is responsible for generating and +installing control files, and installing them into the DEBIAN directory with +the proper permissions. +.P +This program is merely a wrapper around +.BR dpkg-gencontrol (1) +You may prefer to simply run +.BR dpkg-gencontrol (1) +by hand. +.SH OPTIONS +.TP +.B \-v +Verbose mode; show all commands that modify the package build directory. +.TP +.B \-a +Install files for all architecture dependent packages. +.TP +.B \-i +Install files for all architecture independent packages. +.TP +.B \-ppackage +Install files for the package named "package". +.TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. +.TP +.B \-uparams +Pass "params" to +.BR dpkg-gencontrol (1) +.SH NOTES +The +.B \-a +.B \-i +and +.B \-p +arguments are cumulative. If none are specified, then all packages listed in +the control file will be effected. +.SH ENVIRONMENT +.TP +.I DH_VERBOSE +Enables verbose mode +.SH "SEE ALSO" +.BR /usr/doc/debhelper/README +.BR dpkg-shlibdeps (1) +.SH "CONFORMS TO" +Debian policy, version 2.3.0.0 +.SH AUTHOR +Joey Hess diff --git a/dh_getopt.pl b/dh_getopt.pl new file mode 100755 index 00000000..bb7d5133 --- /dev/null +++ b/dh_getopt.pl @@ -0,0 +1,138 @@ +#!/usr/bin/perl +# +# Because the getopt() program is so horribly broken, I wrote my own argument +# processer that uses the find Getopt::Long module. This is used by all +# debhelper scripts. +# +# Joey Hess, GPL copyright 1998. + +# Returns a list of packages in the control file. +# Must pass "arch" or "indep" to specify arch-dependant or -independant +# packages. +sub GetPackages { $type=shift; + my $package; + my $arch; + my @list; + open (CONTROL,") { + chomp; + s/\s+$//; + if (/^Package:\s+(.*)/) { + $package=$1; + } + if (/^Architecture:\s+(.*)/) { + $arch=$1; + } + if (!$_ or eof) { # end of stanza. + if ($package && + (($type eq 'indep' && $arch eq 'all') || + ($type eq 'arch' && $arch ne 'all'))) { + push @list, $package; + undef $package, $arch; + } + } + } + close CONTROL; + + return @list; +} + +# Passed an option name and an option value, adds packages to the list +# of packages. We need this so the list will be built up in the right +# order. +sub AddPackage { my($option,$value)=@_; + if ($option eq 'i' or $option eq 'indep') { + push @packages, GetPackages('indep'); + $indep=1; + } + elsif ($option eq 'a' or $option eq 'arch') { + push @packages, GetPackages('arch'); + $arch=1; + } + elsif ($option eq 'p' or $option eq 'package') { + push @packages, $value; + } + else { + $parse_error="bad option $option - should never happen!\n"; + } +} + +use Getopt::Long; + +# Enable bundling of short command line options. +Getopt::Long::config("bundling"); + +# Parse options. +GetOptions( + "v" => \$verbose, + "verbose" => \$verbose, + + "i" => \&AddPackage, + "indep" => \&AddPackage, + + "a" => \&AddPackage, + "arch" => \&AddPackage, + + "p=s" => \&AddPackage, + "package=s" => \&AddPackage, + + "n" => \$noscripts, + "noscripts" => \$noscripts, + + "x" => \$include, # is -x for some unknown historical reason.. + "include-conffiles" => \$include, + + "d" => \$d_flag, + "remove-d" => \$d_flag, + + "r" => \$r_flag, + "no-restart-on-upgrade" => \$r_flag, + + "k" => \$k_flag, + "keep" => \$k_flag, + + "P=s" => \$tmpdir, + "tmpdir=s" => \$tmpdir, + + "u=s", => \$u_params, + "update-rcd-params=s", => \$u_params, + "dpkg-shlibdeps-params=s", => \$u_params, + + "m=s", => \$major, + "major=s" => \$major, + + "V:s", => \$version_info, + "version-info:s" => \$version_info, + + "A" => \$all, + "all" => \$all, +); + +# Check to see if -V was specified. If so, but no parameters were passed, +# the variable will be defined but empty. +if (defined($version_info)) { + $version_info_set=1; +} + +# Now output everything, in a format suitable for a shell to eval it. +# Note the last line sets $@ in the shell to whatever arguements remain. +print qq{ +DH_VERBOSE='$verbose' +DH_DOPACKAGES='@packages' +DH_DOINDEP='$indep' +DH_DOARCH='$arch' +DH_NOSCRIPTS='$noscripts' +DH_EXCLUDE='$include' +DH_D_FLAG='$d_flag' +DH_R_FLAG='$r_flag' +DH_K_FLAG='$k_flag' +DH_TMPDIR='$tmpdir' +DH_U_PARAMS='$u_params' +DH_M_PARAMS='$major' +DH_V_FLAG='$version_info' +DH_V_FLAG_SET='$version_info_set' +DH_PARAMS_ALL='$all' +DH_PARSE_ERROR='$parse_error' +set -- @ARGV +}; diff --git a/dh_installchangelogs b/dh_installchangelogs index 4a93188c..17ff7312 100755 --- a/dh_installchangelogs +++ b/dh_installchangelogs @@ -8,7 +8,7 @@ # error to specify an upstream changelog on the command line. PATH=debian:$PATH:/usr/lib/debhelper -source dh_lib +. dh_lib UPSTREAM=$1 diff --git a/dh_installcron b/dh_installcron index 7db8cdc6..f5c4f8b8 100755 --- a/dh_installcron +++ b/dh_installcron @@ -3,7 +3,7 @@ # Install cron scripts into the appropriate places. PATH=debian:$PATH:/usr/lib/debhelper -source dh_lib +. dh_lib for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` diff --git a/dh_installdeb b/dh_installdeb new file mode 100755 index 00000000..43aca902 --- /dev/null +++ b/dh_installdeb @@ -0,0 +1,46 @@ +#!/bin/sh -e +# +# Install files from debian/ into the package's DEBIAN directory. + +PATH=debian:$PATH:/usr/lib/debhelper +. dh_lib + +for PACKAGE in $DH_DOPACKAGES; do + TMP=`tmpdir $PACKAGE` + EXT=`pkgext $PACKAGE` + + if [ ! -d $TMP/DEBIAN ]; then + doit "install -o root -g root -d $TMP/DEBIAN" + fi + + # Install debian install scripts. + # If any .debhelper files exist, add them into the scripts. + for file in postinst preinst prerm postrm; do + if [ -f debian/$EXT$file ]; then + # Add this into the script, where it has #DEBHELPER# + if [ -f debian/$EXT$file.debhelper ]; then + complex_doit "perl -pe 's~#DEBHELPER#~qx{cat debian/$EXT$file.debhelper}~eg' < debian/$EXT$file > $TMP/DEBIAN/$file" + doit "chown root.root $TMP/DEBIAN/$file" + doit "chmod 755 $TMP/DEBIAN/$file" + else + doit "install -o root -g root -p debian/$EXT$file $TMP/DEBIAN/$file" + fi + else + # Auto-generate script header and add .debhelper + # content to it. + if [ -f debian/$EXT$file.debhelper ]; then + complex_doit "echo '#!/bin/sh -e' > $TMP/DEBIAN/$file" + complex_doit "cat debian/$EXT$file.debhelper >> $TMP/DEBIAN/$file" + doit "chown root.root $TMP/DEBIAN/$file" + doit "chmod 755 $TMP/DEBIAN/$file" + fi + fi + done + + # Install non-executable files + for file in shlibs conffiles; do + if [ -f debian/$EXT$file ]; then + doit "install -o root -g root -m 644 -p debian/$EXT$file $TMP/DEBIAN/$file" + fi + done +done diff --git a/dh_installdeb.1 b/dh_installdeb.1 new file mode 100644 index 00000000..08b6cbae --- /dev/null +++ b/dh_installdeb.1 @@ -0,0 +1,67 @@ +.TH DH_INSTALLDEBFILES 1 +.SH NAME +dh_installdeb \- install files into the DEBIAN directory +.SH SYNOPSIS +.B dh_installdeb +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir]" +.SH "DESCRIPTION" +dh_installdeb is a debhelper program that is responsible for installing +files into the DEBIAN directory in package build directories with the +correct permissions. +.P +dh_installdeb automatically installs the following files from debian/ into +the DEBIAN directory: +.IP postinst +.IP preinst +.IP postrm +.IP prerm +.IP shlibs +.IP conffiles +.P +(For packages other than the first binary package listed in debian/control, +prefix these filenames with then name of the "package.", for example, +"foo.postinst".) +.P +The files postinst, preinst, postrm, and prerm are handled specially: If a +corresponding file named debian/script.debhelper exists, the contents of that +file are merged into the script as follows: If the script exists, then +anywhere in it that "#DEBHELPER#" appears, the text of the .debhelper file is +inserted. If the script does not exist, then a script is generated from +the .debhelper file. The .debhelper files are created by other debhelper +programs, such as +.BR dh_installmenu (1) +, and are shell scripts. +.SH OPTIONS +.TP +.B \-v +Verbose mode; show all commands that modify the package build directory. +.TP +.B \-a +Install files for all architecture dependent packages. +.TP +.B \-i +Install files for all architecture independent packages. +.TP +.B \-ppackage +Install files for the package named "package". +.TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. +.SH NOTES +The +.B \-a +.B \-i +and +.B \-p +arguments are cumulative. If none are specified, then all packages listed in +the control file will be effected. +.SH ENVIRONMENT +.TP +.I DH_VERBOSE +Enables verbose mode +.SH "SEE ALSO" +.BR /usr/doc/debhelper/README +.SH "CONFORMS TO" +Debian policy, version 2.3.0.0 +.SH AUTHOR +Joey Hess diff --git a/dh_installdebfiles b/dh_installdebfiles index 37c63089..58aed3b3 100755 --- a/dh_installdebfiles +++ b/dh_installdebfiles @@ -4,7 +4,7 @@ # Also generates the control file. PATH=debian:$PATH:/usr/lib/debhelper -source dh_lib +. dh_lib for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` diff --git a/dh_installdirs b/dh_installdirs new file mode 100755 index 00000000..bab883d7 --- /dev/null +++ b/dh_installdirs @@ -0,0 +1,39 @@ +#!/bin/sh -e +# +# Reads debian/dirs, creates the directories listed there there + +PATH=debian:$PATH:/usr/lib/debhelper +. dh_lib + +for PACKAGE in $DH_DOPACKAGES; do + TMP=`tmpdir $PACKAGE` + EXT=`pkgext $PACKAGE` + + if [ ! -d $TMP/usr/doc/$PACKAGE ]; then + doit "install -d $TMP/usr/doc/$PACKAGE" + fi + + dirs="" + + if [ -e debian/${EXT}dirs ]; then + dirs=`tr "\n" " " < debian/${EXT}dirs` + fi + + if [ "$PACKAGE" = "$MAINPACKAGE" -a "$*" ]; then + dirs="$* $dirs" + fi + + if [ "$dirs" ]; then + # Check to see if any of the dirs are absolute. + for dir in "$dirs" ; do + if expr "$dir" : "/" >/dev/null ; then + error "Absolute directory name \"$dir\" specified." + fi + done + # Create dirs. + verbose_echo "cd $TMP && install -d $dirs && cd ../.." + cd $TMP + install -d $dirs + cd ../.. + fi +done diff --git a/dh_installdirs.1 b/dh_installdirs.1 new file mode 100644 index 00000000..41dd0fd8 --- /dev/null +++ b/dh_installdirs.1 @@ -0,0 +1,59 @@ +.TH DH_INSTALLDIRS 1 +.SH NAME +dh_installdirs \- create subdirectories in package build directories +.SH SYNOPSIS +.B dh_installdirs +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [dir ...]" +.SH "DESCRIPTION" +dh_installdirs is a debhelper program that is responsible for creating +subdirectories in package build directories. +.P +Any directory names specified as parameters will be created in the package +build directory of the first binary package listed in debian/control, if +dh_installdirs is acting on that package. +.P +A file named debian/dirs (for the first binary package in debian/control), +or debian/package.dirs (for each additional package in debian/control) can +list other directories to be created. Seperate the directory names with +whitespace. +.P +Be sure to only use directory names relative to the package build +directory. Ie, "/usr/bin" should not be used, use "usr/bin" instead. +.SH OPTIONS +.TP +.B \-v +Verbose mode; show all commands that modify the package build directory. +.TP +.B \-a +Create directories for all architecture dependent packages. +.TP +.B \-i +Create directories for all architecture independent packages. +.TP +.B \-ppackage +Create directories for the package named "package". +.TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. +.TP +.B dir ... +Create these directories in the package build directory of the first binary +package listed in debian/control, if we are acting on that package. +.SH NOTES +The +.B \-a +.B \-i +and +.B \-p +arguments are cumulative. If none are specified, then all packages listed in +the control file will be effected. +.SH ENVIRONMENT +.TP +.I DH_VERBOSE +Enables verbose mode +.SH "SEE ALSO" +.BR /usr/doc/debhelper/README +.SH BUGS +Directories with spaces in them will not currently be installed. +.SH AUTHOR +Joey Hess diff --git a/dh_installdocs b/dh_installdocs index dc216288..90be53c7 100755 --- a/dh_installdocs +++ b/dh_installdocs @@ -4,7 +4,7 @@ # Also installs the debian/copyright and debian/README.debian and debian/TODO PATH=debian:$PATH:/usr/lib/debhelper -source dh_lib +. dh_lib for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` diff --git a/dh_installdocs.1 b/dh_installdocs.1 index f21563ca..4b5f068e 100644 --- a/dh_installdocs.1 +++ b/dh_installdocs.1 @@ -12,10 +12,11 @@ dh_installdocs automatically installs debian/copyright if it exists. If dh_installdocs is acting on multiple packages, debian/copyright files will be installed into all packages. .P -Any filenames specified as parameters, as well as debian/README.debian and -debian/TODO, if they exist, will be installed into the first binary -package listed in debian/control, if dh_installdocs is acting on that -package. +Any filenames specified as parameters, as well as debian/README.debian (or +debian/README.Debian) and debian/TODO, if they exist, will be installed into +the first binary package listed in debian/control, if dh_installdocs is acting +on that package. Note that debian/TODO will be installed named TODO.Debian, +if the package is not a debian native package. .P A file named debian/docs (for the first binary package in debian/control), or debian/package.docs (for each additional package in debian/control) can @@ -45,6 +46,10 @@ and .B \-p arguments are cumulative. If none are specified, then all packages listed in the control file will be effected. +.P +Note that dh_installdocs will happily copy entire directory hiearchies if +you ask it to (it uses cp -a internally). If it is asked to install a +directory, it will install the complete contents of the directory. .SH ENVIRONMENT .TP .I DH_VERBOSE diff --git a/dh_installexamples b/dh_installexamples index f82b0004..23d11af8 100755 --- a/dh_installexamples +++ b/dh_installexamples @@ -4,7 +4,7 @@ # /usr/doc/$PACKAGE/examples PATH=debian:$PATH:/usr/lib/debhelper -source dh_lib +. dh_lib for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` diff --git a/dh_installexamples.1 b/dh_installexamples.1 index 1fb5c44a..e7ad6c62 100644 --- a/dh_installexamples.1 +++ b/dh_installexamples.1 @@ -40,6 +40,10 @@ and .B \-p arguments are cumulative. If none are specified, then all packages listed in the control file will be effected. +.P +Note that dh_examples will happily copy entire directory hiearchies if +you ask it to (it uses cp -a internally). If it is asked to install a +directory, it will install the complete contents of the directory. .SH ENVIRONMENT .TP .I DH_VERBOSE diff --git a/dh_installinit b/dh_installinit new file mode 100755 index 00000000..2ea3440f --- /dev/null +++ b/dh_installinit @@ -0,0 +1,58 @@ +#!/bin/sh -e +# +# Install debian/init[.d], and set up the postinst and postrm for init +# scripts. + +PATH=debian:$PATH:/usr/lib/debhelper +. dh_lib + +for PACKAGE in $DH_DOPACKAGES; do + TMP=`tmpdir $PACKAGE` + EXT=`pkgext $PACKAGE` + + if [ -e debian/${EXT}init ]; then + if [ ! -d $TMP/etc/init.d ]; then + doit "install -d $TMP/etc/init.d" + fi + + # Figure out what filename to install it as. + if [ "$DH_D_FLAG" ]; then + # -d on the command line sets DH_D_FLAG. We will + # remove a trailing 'd' from the package name and + # use that as the name. + script=`expr $PACKAGE : '\(.*\)d$'` || true + if [ ! "$script" ]; then + echo `basename $0`" warning: \"$PACKAGE\" has no final -d, but -d was specified." + script=$PACKAGE + fi + else + script=$PACKAGE + fi + doit "install -p -m755 debian/${EXT}init $TMP/etc/init.d/$script" + + # This is set by the -u "foo" command line switch, it's + # the parameters to pass to update-rc.d. If not set, + # we have to say "defaults". + if [ "$DH_U_PARAMS" = "" ]; then + DH_U_PARAMS="defaults" + fi + + # -r on the command line sets DH_R_FLAG. If it's set, there + # is no restart on upgrade. + if [ ! "$DH_NOSCRIPTS" ]; then + if [ "$DH_R_FLAG" ]; then + autoscript "postinst" "postinst-init-norestart" \ + "s/#SCRIPT#/$script/;s/#INITPARMS#/$DH_U_PARAMS/" + autoscript "postrm" "postrm-init" \ + "s/#SCRIPT#/$script/;s/#INITPARMS#/$DH_U_PARAMS/" + else + autoscript "postinst" "postinst-init" \ + "s/#SCRIPT#/$script/;s/#INITPARMS#/$DH_U_PARAMS/" + autoscript "postrm" "postrm-init" \ + "s/#SCRIPT#/$script/;s/#INITPARMS#/$DH_U_PARAMS/" + autoscript "prerm" "prerm-init" \ + "s/#SCRIPT#/$script/;s/#INITPARMS#/$DH_U_PARAMS/" + fi + fi + fi +done diff --git a/dh_installinit.1 b/dh_installinit.1 new file mode 100644 index 00000000..4eb4ee07 --- /dev/null +++ b/dh_installinit.1 @@ -0,0 +1,70 @@ +.TH DH_INSTALLINIT 1 +.SH NAME +dh_installinit \- install init scripts into package build directories +.SH SYNOPSIS +.B dh_installinit +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [-n] [-r] [-d] [-u params]" +.SH "DESCRIPTION" +dh_installmenu is a debhelper program that is responsible for installing +init scripts into package build directories. +.P +It also automatically generates the postinst and postrm and prerm commands +needed to set up the symlinks in /etc/rc*.d/ and to start and stop the init +scripts. +.P +If a file named debian/init exists, then it is installed into +etc/init.d/package in the package build directory (with "package" replaced +by the package name, unless the -d flag is specified, see below) +.P +For packages other than the first binary package listed in +the control file, use debian/package.init instead (replace "package" with +the name of the package.) +.SH OPTIONS +.TP +.B \-v +Verbose mode; show all commands that modify the package build directory. +.TP +.B \-a +Install init scripts into all architecture dependent packages. +.TP +.B \-i +Install init scripts into all architecture independent packages. +.TP +.B \-ppackage +Install init scripts into the package named "package". +.TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. +.TP +.B \-n +Do not modify postinst/postrm/prerm scripts. +.TP +.B \-r +Do not restart daemon on upgrade. +.TP +.B \-d +Remove trailing "d" from the name of the package, and use the result for the +filename the init script is installed as in etc/init.d/ . This may be useful +for daemons with named ending in "d". +.TP +.B \-u params +Pass "params" to +.BR update-rc.d (8) +If not specified, "default" will be passed to +.BR update-rc.d (8) +.SH NOTES +The +.B \-a +.B \-i +and +.B \-p +arguments are cumulative. If none are specified, then all packages listed in +the control file will be effected. +.SH ENVIRONMENT +.TP +.I DH_VERBOSE +Enables verbose mode +.SH "SEE ALSO" +.BR /usr/doc/debhelper/README +.SH AUTHOR +Joey Hess diff --git a/dh_installmanpages b/dh_installmanpages index 7ee35a90..304c3b12 100755 --- a/dh_installmanpages +++ b/dh_installmanpages @@ -5,7 +5,7 @@ # This is a little bit DWIMish, but still very handy. PATH=debian:$PATH:/usr/lib/debhelper -source dh_lib +. dh_lib for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` diff --git a/dh_installmenu b/dh_installmenu index 1180c60b..c837e04f 100755 --- a/dh_installmenu +++ b/dh_installmenu @@ -9,7 +9,7 @@ # Also, add to postinst and postrm. PATH=debian:$PATH:/usr/lib/debhelper -source dh_lib +. dh_lib for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` diff --git a/dh_lib b/dh_lib index b18c7e5a..618953d8 100644 --- a/dh_lib +++ b/dh_lib @@ -5,20 +5,20 @@ # function. # Unfortunatly, this function doesn't work if your command uses redirection, # you will have to call verbose_echo by hand then. -function doit() { +doit() { verbose_echo "$*" $* } # Echo something if the verbose flag is on. -function verbose_echo() { +verbose_echo() { if [ "$DH_VERBOSE" ]; then echo " $*" fi } # Echo an error message and exit. -function error() { +error() { echo `basename $0`": $1" >&2 exit 1 } @@ -26,7 +26,7 @@ function error() { # Pass it a name of a binary package, it returns the name of the tmp dir to # use, for that package, relative to debian/ # This is for back-compatability with the debian/tmp tradition. -function tmpdir() { +tmpdir() { if [ "$1" = "$MAINPACKAGE" ]; then echo tmp else @@ -36,7 +36,7 @@ function tmpdir() { # Pass it a name of a binary package, it returns the name to prefix to files # in debian for this package. -function pkgext() { +pkgext() { if [ "$1" != "$MAINPACKAGE" ]; then echo "$PACKAGE." fi @@ -49,7 +49,7 @@ function pkgext() { # 1: script to add to # 2: filename of snippet # 3: sed commands to run on the snippet. Ie, s/#PACKAGE#/$PACKAGE/ -function autoscript() { +autoscript() { autoscript_script=$1 autoscript_filename=$2 autoscript_sed=$3 diff --git a/dh_makeshlibs b/dh_makeshlibs new file mode 100755 index 00000000..a09e26f6 --- /dev/null +++ b/dh_makeshlibs @@ -0,0 +1,30 @@ +#!/bin/sh -e +# +# Automatically generate shlibs files. + +PATH=debian:$PATH:/usr/lib/debhelper +. dh_lib + +for PACKAGE in $DH_DOPACKAGES; do + TMP=`tmpdir $PACKAGE` + + if [ -e "debian/$TMP/DEBIAN/shlibs" ]; then + error "debian/$TMP/DEBIAN/shlibs already exists." + fi + + for file in `find debian/$TMP -type f -name "*.so*" | tr "\n" " "` ; do + LIBRARY=`expr $file : ".*/\(.*\)\.so\..*"` || true + VERSION=`expr $file : ".*/.*\.so\.\(.*\)"` || true + MAJOR=`expr $VERSION : "\([0-9]*\)\."` || true + LIBSTUB=`expr $file : "\(.*\/.*\.so\)\..*"` || true + if [ ! -d "debian/$TMP/DEBIAN" ] ; then + doit "install -d debian/$TMP/DEBIAN" + fi + verbose_echo "echo \"$LIBRARY $MAJOR $PACKAGE\" >>debian/$TMP/DEBIAN/shlibs" + echo "$LIBRARY $MAJOR $PACKAGE" >>debian/$TMP/DEBIAN/shlibs + done + + if [ -e "debian/$TMP/DEBIAN/shlibs" ]; then + doit "chown root.root debian/$TMP/DEBIAN/shlibs" + fi +done diff --git a/dh_makeshlibs.1 b/dh_makeshlibs.1 new file mode 100644 index 00000000..51ba8fee --- /dev/null +++ b/dh_makeshlibs.1 @@ -0,0 +1,47 @@ +.TH DH_MAKESHLIBS 1 +.SH NAME +dh_makeshlibs \- automatically create shlibs file +.SH SYNOPSIS +.B dh_makeshlibs +.I "[-v] [-a] [-i] [-ppackage]" +.SH "DESCRIPTION" +dh_makeshlibs is a debhelper program that automatically scans for shared +libraries, and generates a shlibs file for the libraries it finds. +.P +For this program to work, you cannot have already installed a DEBIAN/shlibs +file. If such a file exits, the program will exit with an error. +.SH OPTIONS +.TP +.B \-v +Verbose mode; show all commands that modify the package build directory. +.TP +.B \-a +Generate shlibs files for all architecture dependent packages. +.TP +.B \-i +Generate shlibs files for all architecture independent packages. +.TP +.B \-ppackage +Generate shlibs file for the package named "package". +.SH NOTES +The +.B \-a +.B \-i +and +.B \-p +arguments are cumulative. If none are specified, then all packages listed in +the control file will be effected. +.SH ENVIRONMENT +.TP +.I DH_VERBOSE +Enables verbose mode +.SH "SEE ALSO" +.BR /usr/doc/debhelper/README +.SH BUGS +There is no guarentee that the program will get the shlibs file right. For +example, it may not correctly guess the major number of your package. In +casews like these (and perhaps in general, just to be safe), it is better to +create a debian/shlibs file by hand. +This is a "do what I Mean" type program - you have been warned! +.SH AUTHOR +Joey Hess diff --git a/dh_md5sums b/dh_md5sums new file mode 100755 index 00000000..634e2fd6 --- /dev/null +++ b/dh_md5sums @@ -0,0 +1,22 @@ +#!/bin/sh -e +# +# Generate a DEBIAN/md5sums file, that lists the md5sums of all +# non-conffiles in the package + +PATH=debian:$PATH:/usr/lib/debhelper +. dh_lib + +for PACKAGE in $DH_DOPACKAGES; do + TMP=`tmpdir $PACKAGE` + + if [ ! -d "debian/$TMP/DEBIAN" ]; then + doit "install -d debian/$TMP/DEBIAN" + fi + + doit "pushd debian/$TMP" >/dev/null + # Doit isn't smart enough to hande this next command so echo by hand. (sigh) + verbose_echo 'md5sum `find * -type f ! -regex "^DEBIAN/.*"` > DEBIAN/md5sums DEBIAN/md5sums /dev/null" >/dev/null +done diff --git a/dh_md5sums.1 b/dh_md5sums.1 new file mode 100644 index 00000000..422a4aa7 --- /dev/null +++ b/dh_md5sums.1 @@ -0,0 +1,45 @@ +.TH DH_MD5SUMS 1 +.SH NAME +dh_md5sums \- generate DEBIAN/md5sums file +.SH SYNOPSIS +.B dh_md5sums +.I "[-v] [-a] [-i] [-ppackage]" +.SH "DESCRIPTION" +dh_md5sums is a debhelper program that is responsible for generating +a DEBIAN/md5sums file, which lists the md5sums of each file in the package. +.P +All files in DEBIAN/ are omitted from the md5sums file. +.P +The md5sums file is installed with proper permissions and ownerships. +.SH OPTIONS +.TP +.B \-v +Verbose mode; show all commands that modify the package build directory. +.TP +.B \-a +Generate md5sums files for all architecture dependent packages. +.TP +.B \-i +Generate md5sums files for all architecture independent packages. +.TP +.B \-ppackage +Generate md5sums file for the package named "package". +.SH NOTES +The +.B \-a +.B \-i +and +.B \-p +arguments are cumulative. If none are specified, then all packages listed in +the control file will be effected. +.SH ENVIRONMENT +.TP +.I DH_VERBOSE +Enables verbose mode +.SH BUGS +It would be better if it did not include md5sums of conffiles, since this +info is duplicated elsewhere. +.SH "SEE ALSO" +.BR /usr/doc/debhelper/README +.SH AUTHOR +Joey Hess diff --git a/dh_movefiles.1 b/dh_movefiles.1 new file mode 100644 index 00000000..228f9401 --- /dev/null +++ b/dh_movefiles.1 @@ -0,0 +1,46 @@ +.TH DH_MOVEFILES 1 +.SH NAME +dh_movefiles \- moves files out of debian/tmp into subpackages +.SH SYNOPSIS +.B dh_movefiles +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir]" +.SH "DESCRIPTION" +dh_movefiles is a debhelper program that is responsible for moving files out +of debian/tmp and into other package build directories. This may be useful +if your package has a Makefile that installs everything into debian/tmp, and +you need to break that up into subpackages. +.P +Files named debian/package.files list the files to be moved, separated by +whitespace. +.SH OPTIONS +.TP +.B \-v +Verbose mode; show all commands that modify the package build directory. +.TP +.B \-a +Move files for all architecture dependent packages. +.TP +.B \-i +Move files for all architecture independent packages. +.TP +.B \-ppackage +Move files for the package named "package". +.TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. +.SH NOTES +The +.B \-a +.B \-i +and +.B \-p +arguments are cumulative. If none are specified, then all packages listed in +the control file will be effected. +.SH ENVIRONMENT +.TP +.I DH_VERBOSE +Enables verbose mode +.SH "SEE ALSO" +.BR /usr/doc/debhelper/README +.SH AUTHOR +Joey Hess diff --git a/dh_shlibdeps b/dh_shlibdeps new file mode 100755 index 00000000..e30c4a5b --- /dev/null +++ b/dh_shlibdeps @@ -0,0 +1,24 @@ +#!/bin/sh -e +# +# Find dependancies. Simple dpkg-shlibdeps wrapper. + +PATH=debian:$PATH:/usr/lib/debhelper +. dh_lib + +for PACKAGE in $DH_DOPACKAGES; do + TMP=`tmpdir $PACKAGE` + EXT=`pkgext $PACKAGE` + + # Run dpkg-shlibdeps to generate dependancies. + filelist="" + for file in `find $TMP -type f \( -perm +111 -or -name "*.so*" \) | tr "\n" " "` ; do + case "`file $file`" in + *ELF*) + filelist="$file $filelist" + ;; + esac + done + if [ "$filelist" ]; then + doit "dpkg-shlibdeps -Tdebian/${EXT}substvars $DH_U_PARAMS $filelist" + fi +done diff --git a/dh_shlibdeps.1 b/dh_shlibdeps.1 new file mode 100644 index 00000000..77d90c25 --- /dev/null +++ b/dh_shlibdeps.1 @@ -0,0 +1,56 @@ +.TH DH_INSTALLDEBFILES 1 +.SH NAME +dh_shlibdeps \- calculate shared library dependancies +.SH SYNOPSIS +.B dh_shlibdeps +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [-uparams]" +.SH "DESCRIPTION" +dh_shlibdeps is a debhelper program that is responsible for calculating +shared library dependancies for all executables found in the package build +directory. +.P +This program is merely a wrapper around +.BR dpkg-shlibdeps (1) +that calls it once for each package listed in the control file. You may +prefer to simply run +.BR dpkg-shlibdeps (1) +by hand. +.SH OPTIONS +.TP +.B \-v +Verbose mode; show all commands that modify the package build directory. +.TP +.B \-a +Install files for all architecture dependent packages. +.TP +.B \-i +Install files for all architecture independent packages. +.TP +.B \-ppackage +Install files for the package named "package". +.TP +.B \-Ptmpdir +Use "tmpdir" for package build directory. +.TP +.B \-uparams +Pass "params" to +.BR dpkg-shlibdeps (1) +.SH NOTES +The +.B \-a +.B \-i +and +.B \-p +arguments are cumulative. If none are specified, then all packages listed in +the control file will be effected. +.SH ENVIRONMENT +.TP +.I DH_VERBOSE +Enables verbose mode +.SH "SEE ALSO" +.BR /usr/doc/debhelper/README +.BR dpkg-shlibdeps (1) +.SH "CONFORMS TO" +Debian policy, version 2.3.0.0 +.SH AUTHOR +Joey Hess diff --git a/dh_strip b/dh_strip index 2ecdcd2c..77d670a6 100755 --- a/dh_strip +++ b/dh_strip @@ -3,7 +3,7 @@ # Strip files. PATH=debian:$PATH:/usr/lib/debhelper -source dh_lib +. dh_lib for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` diff --git a/dh_suidregister b/dh_suidregister new file mode 100755 index 00000000..4ca72a1c --- /dev/null +++ b/dh_suidregister @@ -0,0 +1,58 @@ +#!/bin/sh -e +# +# If no parameters are given, and no debian/suid files exists, scan for +# suid/sgid files and suidregister them. +# +# If there are parameters, or there is a debian/suid, register the files +# listed there. + +PATH=debian:$PATH:/usr/lib/debhelper +. dh_lib + +for PACKAGE in $DH_DOPACKAGES; do + TMP=`tmpdir $PACKAGE` + EXT=`pkgext $PACKAGE` + + files="" + + if [ -e debian/${EXT}suid ]; then + files=`tr "\n" " " < debian/${EXT}suid` + fi + + if [ "$PACKAGE" = "$MAINPACKAGE" -a "$*" ]; then + files="$* $files" + fi + + if [ ! "$files" -a ! -e debian/${EXT}suid ]; then + # No files specified (and no empty debian/suid file), so + # guess what files to process. + files=`find debian/$TMP -type f -perm +6000` + + # We will strip the debian working directory off of the + # filenames. + tostrip="debian/$TMP/" + else + # We will strip leading /'s, so the user can feed this + # program either absolute filenames, or relative filenames, + # and it will do the right thing either way. + tostrip="/" + fi + + if [ "$files" ]; then + for file in $files; do + # Strip leading $tostrip from $file. If not there, + # leave $file untouched. + if [ `expr "$file" : "$tostrip\\(.*\\)"` ]; then + file=`expr "$file" : "$tostrip\\(.*\\)"` + fi + + # Create the sed string that will be used to + # fill in the blanks in the autoscript files. + # Fill with the owner, group, and perms of the file. + sedstr=`find debian/$TMP/$file -printf "s:#FILE#:$file:;s/#PACKAGE#/$PACKAGE/;s/#OWNER#/%u/;s/#GROUP#/%g/;s/#PERMS#/%m/"` + + autoscript "postinst" "postinst-suid" "$sedstr" + autoscript "postrm" "postrm-suid" "$sedstr" + done + fi +done diff --git a/dh_suidregister.1 b/dh_suidregister.1 new file mode 100644 index 00000000..e15e6d5f --- /dev/null +++ b/dh_suidregister.1 @@ -0,0 +1,62 @@ +.TH DH_SUIDREGISTER 1 +.SH NAME +dh_suidregister \- set up package to register files with suidregister +.SH SYNOPSIS +.B dh_suidregister +.I "[-v] [-a] [-i] [-ppackage] [file ...]" +.SH "DESCRIPTION" +dh_suidregister is a debhelper program that is responsible for modifying the +postinst and postrm scripts of a package so the package will register files +with +.BR suidregister (1) +when it is installed. +.P +Any files specified as parameters will be registered, if dh_suidregister is +acting on the first binary package listed in debian/control. +.P +The files debian/suid (for the first binary package in debian/control) or +debian/package.suid (for each additional package in debian/control) can +list other files to be registered. +.P +If neither of these methods is used to specify files, dh_suidregister will +scan the package build directory for files that have suid permissions, and +will automatically register all files it finds. +.P +Note that this package modifies your postinst and postrm files. See +.BR dh_installdebfiles (1) +for an explination of how this works. +.SH OPTIONS +.TP +.B \-v +Verbose mode; show all commands that modify the package build directory. +.TP +.B \-a +Register files for all architecture dependent packages. +.TP +.B \-i +Register files for all architecture independent packages. +.TP +.B \-ppackage +Register files for the package named "package". +.TP +.B file ... +Register these files in the first binary package listed in debian/control, +if we are acting on that package. +.SH NOTES +The +.B \-a +.B \-i +and +.B \-p +arguments are cumulative. If none are specified, then all packages listed in +the control file will be effected. +.SH ENVIRONMENT +.TP +.I DH_VERBOSE +Enables verbose mode +.SH "SEE ALSO" +.BR /usr/doc/debhelper/README +, +.BR suidregister (1) +.SH AUTHOR +Joey Hess diff --git a/dh_testdir b/dh_testdir index 4d3c700b..4e482fce 100755 --- a/dh_testdir +++ b/dh_testdir @@ -5,7 +5,7 @@ # of any other files you specify on the command line. PATH=debian:$PATH:/usr/lib/debhelper -source dh_lib +. dh_lib for file in debian/control $@; do if [ ! -e "$file" ] ; then diff --git a/dh_testroot b/dh_testroot index fcc9b474..36577b29 100755 --- a/dh_testroot +++ b/dh_testroot @@ -3,7 +3,7 @@ # Checks to make sure you are root. PATH=debian:$PATH:/usr/lib/debhelper -source dh_lib +. dh_lib if [ "`whoami`" != root ]; then error "You must run this as root." diff --git a/dh_testversion.1 b/dh_testversion.1 new file mode 100644 index 00000000..f385a8ca --- /dev/null +++ b/dh_testversion.1 @@ -0,0 +1,46 @@ +.TH DH_TESTROOT 1 +.SH NAME +dh_testversion \- ensure that the correct version of debhelper is installed +.SH SYNOPSIS +.B dh_testversion [operator] [version] +.SH "DESCRIPTION" +dh_testversion compares the version of debhelper against the version you +specify, and if the condition is not met, exits with an error message. +.P +You should use this in your debian/rules files if a new debhelper feature is +introduced, and your package requires that feature to build correctly. Use +debhelper's changelog to figure out the version you need. +.P +Be sure not to overuse dh_testversion. If debhelper version 9.5 +introduces a new dh_autofixbugs command, and your package uses it, then if +someone tries to build it with debhelper 1.0, the build will fail anyway when +dh_autofixbugs cannot be found, so there is no need for you to use +dh_testversion. +.SH OPTIONS +.TP +.B operator +Optional comparison operator used in comparing the versions. If not +specified, ">=" is used. For descriptions of the comparison operators, see +dpkg --help. +.TP +.B version +Version number to compare against the current version of debhelper. If not +specified, dh_testroot does nothing. +.SH EXAMPLES +.TP +.I dh_testversion 0.50 +Make sure debhelper version 0.50 or higher is installed. +.TP +.I dh_testversion ge 0.50 +Another way to make sure debhelper version 0.50 or higher is installed. +.TP +.I dh_testversion le 0.50 +Make sure a version of debhelper less than version 0.50 is installed. +.SH ENVIRONMENT +.TP +.I DH_VERBOSE +Enables verbose mode. +.SH "SEE ALSO" +.BR /usr/doc/debhelper/README +.SH AUTHOR +Joey Hess diff --git a/dh_testversion.in b/dh_testversion.in new file mode 100644 index 00000000..9e2f14ef --- /dev/null +++ b/dh_testversion.in @@ -0,0 +1,23 @@ +#!/bin/sh -e +# +# Debhelper version check. + +# Current version of debhelper is: +DH_VERSION=#DEBHELPER_VERSION# + +PATH=debian:$PATH:/usr/lib/debhelper +. dh_lib + +if [ "$1" -a "$2" ]; then + compare=$1 + ver=$2 +elif [ "$1" ]; then + compare=">=" + ver=$1 +fi + +if [ "$compare" -a "$ver" ] ; then + if ! dpkg --compare-versions $DH_VERSION $compare $ver; then + error "debhelper version $DH_VERSION is installed, but a version $compare $ver is needed to build this package." + fi +fi diff --git a/dh_undocumented b/dh_undocumented new file mode 100755 index 00000000..ebde8904 --- /dev/null +++ b/dh_undocumented @@ -0,0 +1,51 @@ +#!/bin/sh -e +# +# Passed a list of undocumented man pages, generates symlinks to +# undocumented.7 for those man pages. +# +# Also, it looks for debian/undocumented files for more lists of +# undocumented man pages. + +PATH=debian:$PATH:/usr/lib/debhelper +. dh_lib + +for PACKAGE in $DH_DOPACKAGES; do + TMP=`tmpdir $PACKAGE` + EXT=`pkgext $PACKAGE` + + undoc="" + + if [ -e debian/${EXT}undocumented ]; then + undoc=`tr "\n" " " < debian/${EXT}undocumented` + fi + + if [ "$PACKAGE" = "$MAINPACKAGE" -a "$*" ]; then + undoc="$* $undoc" + fi + + if [ "$undoc" ]; then + for file in $undoc; do + # Remove .gz extention from the filename, if present. + if [ `expr "$file" : '\(.*\).gz'` ]; then + file=`expr "$file" : '\(.*\).gz'` + fi + + # Determine what directory the file belongs in, + # /usr/man, or /usr/X11R6/man. + section=`expr "$file" : '.*\.\([123456789]\)'` + if [ `expr "$file" : '.*\.[123456789]\(x\)'` ] ; then + dir=usr/X11R6/man/man$section + reldir=../../../man + else + dir=usr/man/man$section + reldir=.. + fi + + if [ ! -d debian/$TMP/$dir ]; then + doit "install -d debian/$TMP/$dir" + fi + + doit ln -s $reldir/man7/undocumented.7.gz debian/$TMP/$dir/$file.gz + done + fi +done diff --git a/dh_undocumented.1 b/dh_undocumented.1 new file mode 100644 index 00000000..ab45baad --- /dev/null +++ b/dh_undocumented.1 @@ -0,0 +1,68 @@ +.TH DH_UNDOCUMENTED 1 +.SH NAME +dh_undocumented \- make symlinks to undocumented.7 man page +.SH SYNOPSIS +.B dh_undocumented +.I "[-v] [-a] [-i] [-ppackage] [manpage ...]" +.SH "DESCRIPTION" +dh_undocumented is a debhelper program that is responsible for making +symlinks to the +.BR undocumented (7) +man page for man pages that are not present in your package. +.P +The program takes a list of man pages that should be symlinked to +.BR undocumented (7) +It determines what directory the man pages should be placed in by examining +their extentions - pages ending in "x" go into /usr/X11R6/man/, while pages +that end in anything else go in /usr/man/. It also examines the extention to +see what section the man page belongs in. After figuring this out, it +generates the necessary symlinks to +.BR undocumented (7) +, placing the sylinks in the package build directory. +.P +The lists of man pages that need +.BR undocumented (7) +symlinks can be specified in two ways. Any man page names specified as +parameters will be set up in the first binary package listed in +debian/control, if dh_installdocs is acting on that package. +Also, if a file named debian/undocumented (for the first binary package in +debian/control), or debian/package.undocumented (for each additional package +in debian/control) can list other man page names to set up. +.SH OPTIONS +.TP +.B \-v +Verbose mode; show all commands that modify the package build directory. +.TP +.B \-a +Install undocumented man page symlinks for all architecture dependent packages. +.TP +.B \-i +Install undocumented man page symlinks for all architecture independent packages. +.TP +.B \-ppackage +Install undocumented man page symlinks for the package named "package". +.TP +.B manpage ... +Install undocumented man page symlinks for each of these man pages +into the first binary package listed in debian/control, if we are acting on +that package. +.SH NOTES +The +.B \-a +.B \-i +and +.B \-p +arguments are cumulative. If none are specified, then all packages listed in +the control file will be effected. +.SH ENVIRONMENT +.TP +.I DH_VERBOSE +Enables verbose mode +.SH "SEE ALSO" +.BR /usr/doc/debhelper/README +, +.BR undocumented (7) +.SH "CONFORMS TO" +Debian policy, version 2.3.0.0 +.SH AUTHOR +Joey Hess diff --git a/examples/rules.indep b/examples/rules.indep new file mode 100755 index 00000000..a257a197 --- /dev/null +++ b/examples/rules.indep @@ -0,0 +1,56 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. +# This version is for packages that are architecure independant. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +build: build-stamp +build-stamp: + dh_testdir + # Add here commands to compile the pacckage. + #$(MAKE) + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + # Add here commands to clean up after the build process. + #-$(MAKE) distclean + dh_clean + +# Build architecture-independent files here. +binary-indep: build + dh_testdir + dh_testroot + dh_clean + dh_installdirs + # Add here commands to install the files into debian/tmp + #$(MAKE) PREFIX=debian/tmp install + dh_installdocs + dh_installexamples + dh_installmenu +# dh_installinit + dh_installcron +# dh_installmanpages +# dh_undocumented + dh_installchangelogs + dh_compress + dh_fixperms + dh_suidregister + dh_installdeb + dh_gencontrol + dh_du + dh_md5sums + dh_builddeb + +# Build architecture-dependent files here. +binary-arch: build +# We have nothing to do by default. + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary -- cgit v1.2.3 From a63461740c5f769c9a11d53a8b652dfbbfee7503 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:35:41 +0000 Subject: r13: Initial Import --- README | 4 +++- debian/changelog | 17 +++++++++++++++++ debian/rules | 1 + dh_installdocs | 20 +++++++++++++------- dh_installexamples | 4 +--- examples/rules | 3 ++- examples/rules.multi | 6 ++++-- 7 files changed, 41 insertions(+), 14 deletions(-) (limited to 'examples') diff --git a/README b/README index a13c7726..e43ee336 100644 --- a/README +++ b/README @@ -4,7 +4,9 @@ dh_* commands. To help you get started, I've included an example of a debian/rules file that uses debhelper commands extensivly. See -/usr/doc/debhelper/examples/rules . +/usr/doc/debhelper/examples/rules . These files are also useful as they give +one good order you can run the different debhelper scripts in (though other +variations are possible). Automatic generation of debian install scripts: ---------------------------------------------- diff --git a/debian/changelog b/debian/changelog index a4d47c4c..e865dc67 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,20 @@ +debhelper (0.7) unstable; urgency=low + + * Sped up some things by removing unnecesary for loops. + * dh_installdocs: behavior modifcation: if there is a debian/TODO, it is + named like a debian/changelog file: if the package is a debian native + package, it is installed as TODO. If the package is not a native package, + it is installed as TODO.Debian. + * dh_installdocs: handle debian/README.Debian as well as + debian/README.debian. + * Added dh_undocumented program, which can set up undocumented.7 symlinks. + * Moved dh_installdebfiles to come after dh_fixperms in the example rules + files. (dh_installdebfiles makes sure it installs things with the proper + permissions, and this reorganization makes the file a bit more flexable + in a few situations.) + + -- Joey Hess Mon, 13 Oct 1997 20:08:05 -0400 + debhelper (0.6) unstable; urgency=low * Got rid of bashisms - this package should work now if /bin/sh is ash. diff --git a/debian/rules b/debian/rules index c6a4fa95..55fd8e98 100755 --- a/debian/rules +++ b/debian/rules @@ -44,6 +44,7 @@ binary-indep: build ./dh_compress ./dh_installdebfiles ./dh_fixperms + ./dh_md5sums ./dh_builddeb binary: binary-indep binary-arch diff --git a/dh_installdocs b/dh_installdocs index 90be53c7..3859d34b 100755 --- a/dh_installdocs +++ b/dh_installdocs @@ -25,18 +25,24 @@ for PACKAGE in $DH_DOPACKAGES; do fi if [ "$docs" ]; then - for file in $docs; do - doit "cp -a $file debian/$TMP/usr/doc/$PACKAGE/" - done + doit "cp -a $docs debian/$TMP/usr/doc/$PACKAGE/" fi # Install these files only into the main package by default. if [ "$PACKAGE" = "$MAINPACKAGE" ]; then - for file in README.debian TODO ; do - if [ -f debian/$file ]; then - doit "install -m 644 -p debian/$file debian/$TMP/usr/doc/$PACKAGE/" + if [ -f debian/README.debian ]; then + doit "install -m 644 -p debian/README.debian debian/$TMP/usr/doc/$PACKAGE/" + fi + if [ -f debian/README.Debian ]; then + doit "install -m 644 -p debian/README.Debian debian/$TMP/usr/doc/$PACKAGE/" + fi + if [ -f debian/TODO ]; then + if [ "$NATIVE" ]; then + doit "install -m 655 -p debian/TODO debian/$TMP/usr/doc/$PACKAGE/TODO" + else + doit "install -m 644 -p debian/TODO debian/$TMP/usr/doc/$PACKAGE/TODO.Debian" fi - done + fi fi if [ -f debian/copyright ]; then diff --git a/dh_installexamples b/dh_installexamples index 23d11af8..61ceae20 100755 --- a/dh_installexamples +++ b/dh_installexamples @@ -25,8 +25,6 @@ for PACKAGE in $DH_DOPACKAGES; do doit "install -d debian/$TMP/usr/doc/$PACKAGE/examples" fi - for file in $examples; do - doit "cp -a $file debian/$TMP/usr/doc/$PACKAGE/examples/" - done + doit "cp -a $examples debian/$TMP/usr/doc/$PACKAGE/examples/" fi done diff --git a/examples/rules b/examples/rules index 65e6878e..961ab459 100755 --- a/examples/rules +++ b/examples/rules @@ -35,11 +35,12 @@ binary-arch: build dh_installmenu dh_installcron dh_installmanpages +# dh_undocumented dh_installchangelogs dh_strip dh_compress - dh_installdebfiles dh_fixperms + dh_installdebfiles dh_builddeb binary: binary-indep binary-arch diff --git a/examples/rules.multi b/examples/rules.multi index f5e82597..fd9bf5de 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -34,10 +34,11 @@ binary-indep: build dh_installmenu -i dh_installcron -i # dh_installmanpages -i +# dh_undocumented dh_installchangelogs -i dh_compress -i - dh_installdebfiles -i dh_fixperms -i + dh_installdebfiles -i dh_builddeb -i # Build architecture-dependent files here. @@ -52,11 +53,12 @@ binary-arch: build dh_installmenu -a dh_installcron -a dh_installmanpages -a +# dh_undocumented dh_installchangelogs -a dh_strip -a dh_compress -a - dh_installdebfiles -a dh_fixperms -a + dh_installdebfiles -a dh_builddeb -a binary: binary-indep binary-arch -- cgit v1.2.3 From be3ec728c4139e5b550bcd3e8fa352f95d581891 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:36:18 +0000 Subject: r14: Initial Import --- TODO | 3 +-- debian/changelog | 7 +++++++ debian/rules | 3 ++- dh_clean | 7 +++---- dh_installdebfiles.1 | 6 +++--- dh_md5sums | 4 ++-- examples/rules | 1 + examples/rules.multi | 2 ++ 8 files changed, 21 insertions(+), 12 deletions(-) (limited to 'examples') diff --git a/TODO b/TODO index 8bf234fd..07796f92 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,3 @@ -.so files of compressed manpages change to symlinks +.so files of compressed manpages -- change to symlinks add all other functionality of debstd (??) dh_fixperms: allow listing of files not to be touched (diffucult). -add suidregister support diff --git a/debian/changelog b/debian/changelog index e865dc67..c06f0be1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debhelper (0.8) unstable; urgency=low + + * Added dh_md5sum, generates a md5sums file. + * dh_clean: fixed to echo all commands when verbose mode is on. + + -- Joey Hess Fri, 17 Oct 1997 14:18:26 -0400 + debhelper (0.7) unstable; urgency=low * Sped up some things by removing unnecesary for loops. diff --git a/debian/rules b/debian/rules index 55fd8e98..8b635e7b 100755 --- a/debian/rules +++ b/debian/rules @@ -42,8 +42,9 @@ binary-indep: build ./dh_installmanpages ./dh_installchangelogs ./dh_compress - ./dh_installdebfiles ./dh_fixperms + ./dh_suidregister + ./dh_installdebfiles ./dh_md5sums ./dh_builddeb diff --git a/dh_clean b/dh_clean index 964eec3d..76522dda 100755 --- a/dh_clean +++ b/dh_clean @@ -14,8 +14,7 @@ for PACKAGE in $DH_DOPACKAGES; do done doit "rm -f debian/files* debian/*.debhelper $*" -# Remove other temp files. I don't run this through doit becuase -# I haven't figured out what I have to esacape to put it in quotes. -# However, it doesn't modify debian/$TMP, so I guess it's ok to not run it -# through doit. +# Remove other temp files. doit isn't smart enough to handle this, so I echo +# by hand (sigh). +verbose_echo "find . \( -name "\#*\#" -o -name "*~" -o -name "DEADJOE" \) -exec rm -f {} \;" find . \( -name "\#*\#" -o -name "*~" -o -name "DEADJOE" \) -exec rm -f {} \; diff --git a/dh_installdebfiles.1 b/dh_installdebfiles.1 index 9827656a..924e04b4 100644 --- a/dh_installdebfiles.1 +++ b/dh_installdebfiles.1 @@ -26,9 +26,9 @@ The files postinst, preinst, postrm, and prerm are handled specially: If a corresponding file named debian/script.debhelper exists, the contents of that file are merged into the script as follows: If the script exists, then anywhere in it that "#DEBHELPER#" appears, the text of the .debhelper file is -inserted. If the script does not exist, then a script is generated from the -.debhelper file. The .debhelper files are created by other debhelper programs, -such as +inserted. If the script does not exist, then a script is generated from +the .debhelper file. The .debhelper files are created by other debhelper +programs, such as .BR dh_installmenu (1) , and are shell scripts. .P diff --git a/dh_md5sums b/dh_md5sums index 634e2fd6..8b37bc29 100755 --- a/dh_md5sums +++ b/dh_md5sums @@ -1,7 +1,7 @@ #!/bin/sh -e # -# Generate a DEBIAN/md5sums file, that lists the md5sums of all -# non-conffiles in the package +# Generate a DEBIAN/md5sums file, that lists the md5sums of all files in the +# package. PATH=debian:$PATH:/usr/lib/debhelper . dh_lib diff --git a/examples/rules b/examples/rules index 961ab459..4b4d69d3 100755 --- a/examples/rules +++ b/examples/rules @@ -41,6 +41,7 @@ binary-arch: build dh_compress dh_fixperms dh_installdebfiles + dh_m5dsums dh_builddeb binary: binary-indep binary-arch diff --git a/examples/rules.multi b/examples/rules.multi index fd9bf5de..15ed5a4b 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -39,6 +39,7 @@ binary-indep: build dh_compress -i dh_fixperms -i dh_installdebfiles -i + dh_md5sums -i dh_builddeb -i # Build architecture-dependent files here. @@ -59,6 +60,7 @@ binary-arch: build dh_compress -a dh_fixperms -a dh_installdebfiles -a + dh_md5sums -a dh_builddeb -a binary: binary-indep binary-arch -- cgit v1.2.3 From b4a402edd5f740b8afee9b50cfb85906042a65fd Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:36:18 +0000 Subject: r15: Initial Import --- debian/changelog | 7 +++++++ examples/rules | 1 + examples/rules.multi | 2 ++ 3 files changed, 10 insertions(+) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index c06f0be1..112147c8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debhelper (0.9) unstable; urgency=low + + * Added dh_suidregister, interfaces to to the suidmanager package. + * dh_installdebfiles: fixed typo on man page. + + -- Joey Hess Sat, 18 Oct 1997 20:55:39 -0400 + debhelper (0.8) unstable; urgency=low * Added dh_md5sum, generates a md5sums file. diff --git a/examples/rules b/examples/rules index 4b4d69d3..054e33ae 100755 --- a/examples/rules +++ b/examples/rules @@ -40,6 +40,7 @@ binary-arch: build dh_strip dh_compress dh_fixperms + dh_suidregister dh_installdebfiles dh_m5dsums dh_builddeb diff --git a/examples/rules.multi b/examples/rules.multi index 15ed5a4b..bb0f4fec 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -38,6 +38,7 @@ binary-indep: build dh_installchangelogs -i dh_compress -i dh_fixperms -i + dh_suidregister -i dh_installdebfiles -i dh_md5sums -i dh_builddeb -i @@ -59,6 +60,7 @@ binary-arch: build dh_strip -a dh_compress -a dh_fixperms -a + dh_suidregister -a dh_installdebfiles -a dh_md5sums -a dh_builddeb -a -- cgit v1.2.3 From fbabb8038535361c7e4f9ab538f2b9cfa3023367 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:36:40 +0000 Subject: r17: Initial Import --- README | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ debian/changelog | 10 ++++++++++ debian/copyright | 10 +++++++--- debian/rules | 1 + dh_lib | 6 +++++- dh_md5sums | 17 ++++++++++++----- dh_md5sums.1 | 12 +++++++----- examples/rules | 1 + examples/rules.multi | 2 ++ 9 files changed, 98 insertions(+), 14 deletions(-) (limited to 'examples') diff --git a/README b/README index e43ee336..21ecd519 100644 --- a/README +++ b/README @@ -8,6 +8,58 @@ that uses debhelper commands extensivly. See one good order you can run the different debhelper scripts in (though other variations are possible). + +Converting from debstd to debhelper: +----------------------------------- + +Debhelper is designed to be mostly backwards compatable to debstd. I say +mostly becuase I haven't made debhelper handle everything that debstd does +yet, and in a few cases, it does things differently (and I hope, better). + +In general, you can switch over to using debhelper as follows. In your +debian/rules, where you used to have some lines that read something like: + + debstd CHANGES TODO README + dpkg-gencontrol + dpkg --build debian/tmp .. + +Remove that and replace it with something like: + + dh_installdocs TODO README + dh_installexamples + dh_installmenu + dh_installcron + dh_installmanpages + dh_installchangelogs CHANGES + dh_strip + dh_compress + dh_fixperms + dh_suidregister + dh_installdebfiles + dh_m5dsums + dh_builddeb + +Notice that the parameters sent to debstd get split up among the dh_* +programs. The upstream changelog is passed to dh_installchangelogs, and the +docs are passed to dh_installdocs. + +Debstd has many switches, that turn off differnt parts of it. So if you +were using debstd -m to tell it not to automatically install manpages, +for example, you can just comment out the dh_installmanpages line. + +Finally, debstd automatically modified postinst, postrm, etc scripts. Some +of the dehelper apps do that too, but they do it differnently. Debstd just +appends its commands to the end of the script. Debhelper reqyires that you +insert a tag into your scripts, that will tell debhelper where to insert +commands. So if you have postinst, postrm, etc scripts, add a line reading +"#DEBHELPER" to the end of them. + +Once you think it's all set up properly, do a test build of your package. If +it works ok, I reccommend that you compare the new package and the old +debstd-generated package very closely. Pay special attention to the postint, +postrm, etc scripts. + + Automatic generation of debian install scripts: ---------------------------------------------- @@ -23,6 +75,7 @@ by the -n parameter. Note that it will be shell code, so you cannot directly use it in a perl script. + Notes on multiple binary packages: --------------------------------- diff --git a/debian/changelog b/debian/changelog index e70ccf07..a1b09908 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +debhelper (0.11) unstable; urgency=low + + * dh_md5sums: behavior modification: do not generate md5sums for conffiles. + (Thanks to Charles Briscoe-Smith ) #14048. + * dh_md5sums: can generate conffile md5sums with -x parameter. + * Added a "converting from debstd" section to the README. + * Added dh_du, generates a DEBIAN/du file with disk usage stats (#14048). + + -- Joey Hess Tue, 21 Oct 1997 13:17:28 -0400 + debhelper (0.10) unstable; urgency=medium * dh_installdebfiles: fixed *bad* bug that messed up the names of all diff --git a/debian/copyright b/debian/copyright index 0feed1b2..2845a267 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,5 +1,9 @@ Debhelper is written by Joey Hess . -Parts of the code came from debmake, by Christoph Lameter -. -The copyright of this package is GPL. +Parts of the code (and certianly my inspiration from the whole thing) came +from debmake, by Christoph Lameter . + +Some of the dh_md5sums and dh_du commands is from a program by Charles +Briscoe-Smith . + +The copyright of this package is GPL, version 2 or later. diff --git a/debian/rules b/debian/rules index 8b635e7b..eaaeb54d 100755 --- a/debian/rules +++ b/debian/rules @@ -45,6 +45,7 @@ binary-indep: build ./dh_fixperms ./dh_suidregister ./dh_installdebfiles + ./dh_du ./dh_md5sums ./dh_builddeb diff --git a/dh_lib b/dh_lib index 618953d8..1cc7e308 100644 --- a/dh_lib +++ b/dh_lib @@ -77,7 +77,7 @@ autoscript() { # Argument processing and global variable initialization is below. # Parse command line. -set -- `getopt vianp: $*` +set -- `getopt xvianp: $*` for i; do case "$i" @@ -103,6 +103,10 @@ for i; do DH_NOSCRIPTS=1 shift ;; + -x) + DH_EXCLUDE=1 + shift + ;; --) shift break diff --git a/dh_md5sums b/dh_md5sums index 273faf34..5400bad9 100755 --- a/dh_md5sums +++ b/dh_md5sums @@ -13,10 +13,17 @@ for PACKAGE in $DH_DOPACKAGES; do doit "install -d debian/$TMP/DEBIAN" fi - doit "cd debian/$TMP" # Doit isn't smart enough to hande this next command so echo by hand. (sigh) - verbose_echo 'md5sum `find * -type f ! -regex "^DEBIAN/.*"` > DEBIAN/md5sums DEBIAN/md5sums debian/$TMP/DEBIAN/allfiles' + find debian/$TMP/* -type f ! -regex "^debian/$TMP/DEBIAN/.*" | sed s:debian/$TMP:: | sort > debian/$TMP/DEBIAN/allfiles + # Check if we should exclude conffiles. + if [ ! "$DH_EXCLUDE" -a -r debian/$TMP/DEBIAN/conffiles ]; then + verbose_echo "sort debian/$TMP/DEBIAN/conffiles | comm -13 - debian/$TMP/DEBIAN/allfiles > debian/$TMP/DEBIAN/allfiles.new" + sort debian/$TMP/DEBIAN/conffiles | comm -13 - debian/$TMP/DEBIAN/allfiles > debian/$TMP/DEBIAN/allfiles.new + doit "mv debian/$TMP/DEBIAN/allfiles.new debian/$TMP/DEBIAN/allfiles" + fi + verbose_echo "cd debian/$TMP ; sed 's:^/::' < DEBIAN/allfiles | xargs md5sum > DEBIAN/md5sums ; cd ../.." + cd debian/$TMP ; sed 's:^/::' < DEBIAN/allfiles | xargs md5sum > DEBIAN/md5sums ; cd ../.. + doit "chown root.root debian/$TMP/DEBIAN/md5sums" + doit "rm -f debian/$TMP/DEBIAN/allfiles" done diff --git a/dh_md5sums.1 b/dh_md5sums.1 index 422a4aa7..a54c1c15 100644 --- a/dh_md5sums.1 +++ b/dh_md5sums.1 @@ -3,12 +3,13 @@ dh_md5sums \- generate DEBIAN/md5sums file .SH SYNOPSIS .B dh_md5sums -.I "[-v] [-a] [-i] [-ppackage]" +.I "[-x] [-v] [-a] [-i] [-ppackage]" .SH "DESCRIPTION" dh_md5sums is a debhelper program that is responsible for generating a DEBIAN/md5sums file, which lists the md5sums of each file in the package. .P -All files in DEBIAN/ are omitted from the md5sums file. +All files in DEBIAN/ are omitted from the md5sums file, as are all conffiles +(unless you use the -x switch). .P The md5sums file is installed with proper permissions and ownerships. .SH OPTIONS @@ -24,6 +25,10 @@ Generate md5sums files for all architecture independent packages. .TP .B \-ppackage Generate md5sums file for the package named "package". +.TP +.B \-x +Include conffiles in the md5sums list. Note that this is redundant, and +included elsewhere in debian packages. .SH NOTES The .B \-a @@ -36,9 +41,6 @@ the control file will be effected. .TP .I DH_VERBOSE Enables verbose mode -.SH BUGS -It would be better if it did not include md5sums of conffiles, since this -info is duplicated elsewhere. .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH AUTHOR diff --git a/examples/rules b/examples/rules index 054e33ae..fc300e6a 100755 --- a/examples/rules +++ b/examples/rules @@ -42,6 +42,7 @@ binary-arch: build dh_fixperms dh_suidregister dh_installdebfiles + dh_du dh_m5dsums dh_builddeb diff --git a/examples/rules.multi b/examples/rules.multi index bb0f4fec..4e8b30ed 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -40,6 +40,7 @@ binary-indep: build dh_fixperms -i dh_suidregister -i dh_installdebfiles -i + dh_du -a dh_md5sums -i dh_builddeb -i @@ -62,6 +63,7 @@ binary-arch: build dh_fixperms -a dh_suidregister -a dh_installdebfiles -a + dh_du -a dh_md5sums -a dh_builddeb -a -- cgit v1.2.3 From 6f0cb0d4410fedd208b0ce137684faccdef268c6 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:36:45 +0000 Subject: r18: Initial Import --- README | 2 +- TODO | 7 ++++--- debian/changelog | 7 +++++++ examples/rules | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/README b/README index 21ecd519..ba468150 100644 --- a/README +++ b/README @@ -36,7 +36,7 @@ Remove that and replace it with something like: dh_fixperms dh_suidregister dh_installdebfiles - dh_m5dsums + dh_md5sums dh_builddeb Notice that the parameters sent to debstd get split up among the dh_* diff --git a/TODO b/TODO index 07796f92..1a5f1cef 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,4 @@ -.so files of compressed manpages -- change to symlinks -add all other functionality of debstd (??) -dh_fixperms: allow listing of files not to be touched (diffucult). +* .so files of compressed manpages -- change to symlinks +* add all other functionality of debstd (??) +* dh_fixperms: allow listing of files not to be touched (diffucult). +* add a dh_debstd, which mimics debstd, but uses debhelper tools internally. diff --git a/debian/changelog b/debian/changelog index a1b09908..c2130315 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debhelper (0.12) unstable; urgency=low + + * Fixed mispelling of dh_md5sums in examples rules files and README. + (#13990) Thanks, Adrian. + + -- Joey Hess Fri, 24 Oct 1997 14:35:30 -0400 + debhelper (0.11) unstable; urgency=low * dh_md5sums: behavior modification: do not generate md5sums for conffiles. diff --git a/examples/rules b/examples/rules index fc300e6a..a02783f7 100755 --- a/examples/rules +++ b/examples/rules @@ -43,7 +43,7 @@ binary-arch: build dh_suidregister dh_installdebfiles dh_du - dh_m5dsums + dh_md5sums dh_builddeb binary: binary-indep binary-arch -- cgit v1.2.3 From 01a4f306b02b341f777ac93178b5661df62f2193 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:36:51 +0000 Subject: r19: Initial Import --- README | 1 + debian/changelog | 6 ++++++ examples/rules | 1 + examples/rules.multi | 1 + 4 files changed, 9 insertions(+) (limited to 'examples') diff --git a/README b/README index ba468150..d84add45 100644 --- a/README +++ b/README @@ -36,6 +36,7 @@ Remove that and replace it with something like: dh_fixperms dh_suidregister dh_installdebfiles + dh_makeshlibs dh_md5sums dh_builddeb diff --git a/debian/changelog b/debian/changelog index c2130315..e0caa2cc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +debhelper (0.13) unstable; urgency=low + + * Added dh_makeshlibs, automatically generates a shlibs file. + + -- Joey Hess Fri, 24 Oct 1997 20:33:14 -0400 + debhelper (0.12) unstable; urgency=low * Fixed mispelling of dh_md5sums in examples rules files and README. diff --git a/examples/rules b/examples/rules index a02783f7..d5170a78 100755 --- a/examples/rules +++ b/examples/rules @@ -42,6 +42,7 @@ binary-arch: build dh_fixperms dh_suidregister dh_installdebfiles +# dh_makeshlibs dh_du dh_md5sums dh_builddeb diff --git a/examples/rules.multi b/examples/rules.multi index 4e8b30ed..fbefadd3 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -63,6 +63,7 @@ binary-arch: build dh_fixperms -a dh_suidregister -a dh_installdebfiles -a +# dh_makeshlibs -a dh_du -a dh_md5sums -a dh_builddeb -a -- cgit v1.2.3 From c71c19eb874374de4b11b740af49c7d2d202dbc3 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:37:17 +0000 Subject: r22: Initial Import --- debian/changelog | 7 +++++++ dh_compress | 2 +- dh_compress.1 | 5 +++-- examples/rules | 1 + 4 files changed, 12 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index f7d47b17..b6a5a496 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debhelper (0.16) unstable; urgency=low + + * dh_compress: always compress changelog and upstream changelog, no + matter what their size (#14604) (policy 5.8) + + -- Joey Hess Thu, 6 Nov 1997 19:50:36 -0500 + debhelper (0.15) unstable; urgency=low * README: documented what temporary directories are used by default for diff --git a/dh_compress b/dh_compress index 86ab8373..a54cd2f8 100755 --- a/dh_compress +++ b/dh_compress @@ -23,7 +23,7 @@ for PACKAGE in $DH_DOPACKAGES; do # By default fall back on what the policy manual says to compress. files=` find usr/info usr/man usr/X11*/man -type f 2>/dev/null ; - find usr/doc -type f -size +4k \ + find usr/doc -type f \( -size +4k -or -name "changelog*" \) \ ! -name "*.htm*" ! -name "*.gif" \ ! -name "copyright" 2>/dev/null ` diff --git a/dh_compress.1 b/dh_compress.1 index d7e8dc5c..0e6c6198 100644 --- a/dh_compress.1 +++ b/dh_compress.1 @@ -13,7 +13,7 @@ to the new files. By default, dh_compress compresses files that debian policy mandates should be compressed, namely all files in usr/info, usr/man, usr/X11R6/man, and all files in usr/doc that are larger than 4k in size, except -the copyright file, .html files and .gif files. +the copyright file, .html files and .gif files, and all changelog files. .P If a debian/compress file exits, however, it will be ran as a shell script, and all filenames that the shell script outputs will be compressed instead @@ -25,7 +25,8 @@ the same files as it would by default. This is a good starting point for customization of what files are compressed: .PP find usr/info usr/man usr/X11*/man -type f - find usr/doc -type f -size +4k \\ + find usr/doc -type f \\ + \\( -size +4k -or -name "changelog*" \\) \\ ! -name "*.htm*" ! -name "*.gif" \\ ! -name "copyright" .SH OPTIONS diff --git a/examples/rules b/examples/rules index d5170a78..5d0f7085 100755 --- a/examples/rules +++ b/examples/rules @@ -28,6 +28,7 @@ binary-arch: build dh_testdir dh_testroot dh_clean + dh_installdirs # Add here commands to install the files into debian/tmp #$(MAKE) PREFIX=debian/tmp install dh_installdocs -- cgit v1.2.3 From ffe38a05c38d561ff59df28ed52363cf4b578f9c Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:37:17 +0000 Subject: r23: Initial Import --- debian/changelog | 8 ++++++++ debian/rules | 5 ++--- dh_lib | 2 +- examples/rules.multi | 2 ++ 4 files changed, 13 insertions(+), 4 deletions(-) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index b6a5a496..bbbdb268 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +debhelper (0.17) unstable; urgency=low + + * Added dh_installdirs, automatically creates subdirectories (for + compatability with debstd's debian/dirs file. + * dh_lib: fixed problem with -P flag. + + -- Joey Hess Fri, 7 Nov 1997 16:07:11 -0500 + debhelper (0.16) unstable; urgency=low * dh_compress: always compress changelog and upstream changelog, no diff --git a/debian/rules b/debian/rules index eaaeb54d..e2d4da03 100755 --- a/debian/rules +++ b/debian/rules @@ -28,15 +28,14 @@ binary-indep: build ./dh_testdir $(test_files) ./dh_testroot ./dh_clean + ./dh_installdirs usr/bin usr/lib/debhelper - install -d debian/tmp/usr/bin find . -perm +111 -maxdepth 1 -type f \ -exec install -p {} debian/tmp/usr/bin \; - install -d debian/tmp/usr/lib/debhelper cp dh_lib debian/tmp/usr/lib/debhelper cp -a autoscripts debian/tmp/usr/lib/debhelper - ./dh_installdocs TODO README + ./dh_installdocs TODO README BUGS ./dh_installexamples examples/* ./dh_installmenu ./dh_installmanpages diff --git a/dh_lib b/dh_lib index c2dd9777..8dad88c5 100644 --- a/dh_lib +++ b/dh_lib @@ -182,6 +182,6 @@ fi # Check to see if -P was specified. If so, we can only act on a single # package. -if [ "$DH_TMPDIR" ] && echo "$DH_DOPACKAGES" | grep -q " "; then +if [ "$DH_TMPDIR" ] && echo "$DH_DOPACKAGES" | egrep -q '.+ .+' ; then error "-P was specified, but multiple packages would be acted on." fi diff --git a/examples/rules.multi b/examples/rules.multi index fbefadd3..6fd70889 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -27,6 +27,7 @@ binary-indep: build dh_testdir -i dh_testroot -i dh_clean -i + dh_installdirs -i # Add here commands to install the files into debian/tmp #$(MAKE) PREFIX=debian/tmp install dh_installdocs -i @@ -49,6 +50,7 @@ binary-arch: build dh_testdir -a dh_testroot -a dh_clean -a + dh_installdirs -a # Add here commands to install the files into debian/tmp #$(MAKE) PREFIX=debian/tmp install dh_installdocs -a -- cgit v1.2.3 From 1c596507129a7022904405114e2bced37ace1cd7 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:37:25 +0000 Subject: r24: Initial Import --- TODO | 2 ++ debian/changelog | 11 +++++++++++ dh_clean | 6 ++++-- dh_du | 4 ++-- dh_installdebfiles | 9 +++------ dh_installdirs | 5 +---- dh_lib | 17 ++++++----------- dh_makeshlibs | 3 +-- dh_md5sums | 10 +++------- examples/rules | 3 +++ examples/rules.multi | 3 +++ 11 files changed, 39 insertions(+), 34 deletions(-) (limited to 'examples') diff --git a/TODO b/TODO index 1a5f1cef..5ed6f9bb 100644 --- a/TODO +++ b/TODO @@ -2,3 +2,5 @@ * add all other functionality of debstd (??) * dh_fixperms: allow listing of files not to be touched (diffucult). * add a dh_debstd, which mimics debstd, but uses debhelper tools internally. +* dh_du: change it so it doesn't grep for things with tabs in them. That's + nasty. (and makes cut-and-paste from dh_du -v not work). diff --git a/debian/changelog b/debian/changelog index bbbdb268..6f26f1ee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +debhelper (0.18) unstable; urgency=low + + * examples/*: added source, diff targets that just print an error. + * dh_clean: clean up more files - *.orig, *.rej, *.bak, .*.orig, .*.rej, + .SUMS, TAGS, and empty files. + * dh_lib: doit(): use eval on parameters, instead of directly running + them. This lets me clean up several nasty areas where I had to echo the + commands once, and then run them seperatly. + + -- Joey Hess Mon, 10 Nov 1997 19:48:36 -0500 + debhelper (0.17) unstable; urgency=low * Added dh_installdirs, automatically creates subdirectories (for diff --git a/dh_clean b/dh_clean index 874604ed..73c094fe 100755 --- a/dh_clean +++ b/dh_clean @@ -16,5 +16,7 @@ doit "rm -f debian/files* debian/*.debhelper $*" # Remove other temp files. doit isn't smart enough to handle this, so I echo # by hand (sigh). -verbose_echo "find . \( -name "\#*\#" -o -name "*~" -o -name "DEADJOE" \) -exec rm -f {} \;" -find . \( -name "\#*\#" -o -name "*~" -o -name "DEADJOE" \) -exec rm -f {} \; +doit "find . \( -name '#*#' -o -name '*~' -o -name DEADJOE -o -name '*.orig' \ + -o -name '*.rej' -o -name '*.bak' -o -name '.*.orig' \ + -o -name '.*.rej' -o -name .SUMS -o -name TAGS -o -name core \ + -o -size 0 \) -exec rm -f {} \;" diff --git a/dh_du b/dh_du index 5fcb1418..c06f9c27 100755 --- a/dh_du +++ b/dh_du @@ -13,7 +13,7 @@ for PACKAGE in $DH_DOPACKAGES; do doit "install -d $TMP/DEBIAN" fi - verbose_echo "du -k $TMP | sed \"s: $TMP/: :\" | grep -v \" DEBIAN$\" | grep -v \" $TMP$\" > $TMP/DEBIAN/du" - du -k $TMP | sed "s: $TMP/: :" | grep -v " DEBIAN$" | grep -v " $TMP$" >$TMP/DEBIAN/du + # Note that the tabs in this next line are important. + doit "du -k $TMP | sed 's: $TMP/: :' | grep -v ' DEBIAN$' | grep -v ' $TMP$' >$TMP/DEBIAN/du" doit "chown root.root debian/tmp/DEBIAN/du" done diff --git a/dh_installdebfiles b/dh_installdebfiles index ad08f8d3..a9954963 100755 --- a/dh_installdebfiles +++ b/dh_installdebfiles @@ -20,8 +20,7 @@ for PACKAGE in $DH_DOPACKAGES; do if [ -f debian/$EXT$file ]; then # Add this into the script, where it has #DEBHELPER# if [ -f debian/$EXT$file.debhelper ]; then - verbose_echo "perl -pe \"s~#DEBHELPER#~qx{cat debian/$EXT$file.debhelper}~eg\" < debian/$EXT$file > $TMP/DEBIAN/$file" - perl -pe "s~#DEBHELPER#~qx{cat debian/$EXT$file.debhelper}~eg" < debian/$EXT$file > $TMP/DEBIAN/$file + doit "perl -pe 's~#DEBHELPER#~qx{cat debian/$EXT$file.debhelper}~eg' < debian/$EXT$file > $TMP/DEBIAN/$file" doit "chown root.root $TMP/DEBIAN/$file" doit "chmod 755 $TMP/DEBIAN/$file" else @@ -31,10 +30,8 @@ for PACKAGE in $DH_DOPACKAGES; do # Auto-generate script header and add .debhelper # content to it. if [ -f debian/$EXT$file.debhelper ]; then - verbose_echo "echo '#!/bin/sh -e' > $TMP/DEBIAN/$file" - echo '#!/bin/sh -e' > $TMP/DEBIAN/$file - verbose_echo "cat debian/$EXT$file.debhelper >> $TMP/DEBIAN/$file" - cat debian/$EXT$file.debhelper >> $TMP/DEBIAN/$file + doit "echo '#!/bin/sh -e' > $TMP/DEBIAN/$file" + doit "cat debian/$EXT$file.debhelper >> $TMP/DEBIAN/$file" doit "chown root.root $TMP/DEBIAN/$file" doit "chmod 755 $TMP/DEBIAN/$file" fi diff --git a/dh_installdirs b/dh_installdirs index bab883d7..a44de9ab 100755 --- a/dh_installdirs +++ b/dh_installdirs @@ -31,9 +31,6 @@ for PACKAGE in $DH_DOPACKAGES; do fi done # Create dirs. - verbose_echo "cd $TMP && install -d $dirs && cd ../.." - cd $TMP - install -d $dirs - cd ../.. + doit "cd $TMP && install -d $dirs && cd ../.." fi done diff --git a/dh_lib b/dh_lib index 8dad88c5..1b17151d 100644 --- a/dh_lib +++ b/dh_lib @@ -3,17 +3,15 @@ # Run a command, and display the command to stdout if verbose mode is on. # All commands that modifiy files in $TMP should be ran via this # function. -# Unfortunatly, this function doesn't work if your command uses redirection, -# you will have to call verbose_echo by hand then. doit() { - verbose_echo "$*" - $* + verbose_echo "$@" + eval "$@" } # Echo something if the verbose flag is on. verbose_echo() { if [ "$DH_VERBOSE" ]; then - echo " $*" + echo " $@" fi } @@ -68,12 +66,9 @@ autoscript() { fi # Running doit doesn't cut it here. - verbose_echo echo "# Automatically added by `basename $0` on `822-date`" ">>" $autoscript_debscript - echo "# Automatically added by `basename $0` on `822-date`" >> $autoscript_debscript - verbose_echo sed "$autoscript_sed" $autoscript_filename ">>" $autoscript_debscript - sed "$autoscript_sed" $autoscript_filename >> $autoscript_debscript - verbose_echo echo "# End automatically added section" ">>" $autoscript_debscript - echo "# End automatically added section" >> $autoscript_debscript + doit "echo \"# Automatically added by `basename $0` on `822-date`\" >> $autoscript_debscript" + doit "sed \"$autoscript_sed\" $autoscript_filename >> $autoscript_debscript" + doit "echo '# End automatically added section' >> $autoscript_debscript" } # Argument processing and global variable initialization is below. diff --git a/dh_makeshlibs b/dh_makeshlibs index f1ab8899..1f8dd92c 100755 --- a/dh_makeshlibs +++ b/dh_makeshlibs @@ -20,8 +20,7 @@ for PACKAGE in $DH_DOPACKAGES; do if [ ! -d "$TMP/DEBIAN" ] ; then doit "install -d $TMP/DEBIAN" fi - verbose_echo "echo \"$LIBRARY $MAJOR $PACKAGE\" >>$TMP/DEBIAN/shlibs" - echo "$LIBRARY $MAJOR $PACKAGE" >>$TMP/DEBIAN/shlibs + doit "echo '$LIBRARY $MAJOR $PACKAGE" >>$TMP/DEBIAN/shlibs" done if [ -e "$TMP/DEBIAN/shlibs" ]; then diff --git a/dh_md5sums b/dh_md5sums index f71ab529..5278ed51 100755 --- a/dh_md5sums +++ b/dh_md5sums @@ -13,17 +13,13 @@ for PACKAGE in $DH_DOPACKAGES; do doit "install -d $TMP/DEBIAN" fi - # Doit isn't smart enough to hande this next command so echo by hand. (sigh) - verbose_echo 'find $TMP/* -type f ! -regex "^$TMP/DEBIAN/.*" | sed s:$TMP/:: | sort > $TMP/DEBIAN/allfiles' - find $TMP/* -type f ! -regex "^$TMP/DEBIAN/.*" | sed s:$TMP:: | sort > $TMP/DEBIAN/allfiles + doit "find $TMP/* -type f ! -regex '^$TMP/DEBIAN/.*' | sed s:$TMP:: | sort > $TMP/DEBIAN/allfiles" # Check if we should exclude conffiles. if [ ! "$DH_EXCLUDE" -a -r $TMP/DEBIAN/conffiles ]; then - verbose_echo "sort $TMP/DEBIAN/conffiles | comm -13 - $TMP/DEBIAN/allfiles > $TMP/DEBIAN/allfiles.new" - sort $TMP/DEBIAN/conffiles | comm -13 - $TMP/DEBIAN/allfiles > $TMP/DEBIAN/allfiles.new + doit "sort $TMP/DEBIAN/conffiles | comm -13 - $TMP/DEBIAN/allfiles > $TMP/DEBIAN/allfiles.new" doit "mv $TMP/DEBIAN/allfiles.new $TMP/DEBIAN/allfiles" fi - verbose_echo "cd $TMP ; sed 's:^/::' < DEBIAN/allfiles | xargs md5sum > DEBIAN/md5sums ; cd ../.." - cd $TMP ; sed 's:^/::' < DEBIAN/allfiles | xargs md5sum > DEBIAN/md5sums ; cd ../.. + doit "cd $TMP ; sed 's:^/::' < DEBIAN/allfiles | xargs md5sum > DEBIAN/md5sums ; cd ../.." doit "chown root.root $TMP/DEBIAN/md5sums" doit "rm -f $TMP/DEBIAN/allfiles" done diff --git a/examples/rules b/examples/rules index 5d0f7085..72ce3e66 100755 --- a/examples/rules +++ b/examples/rules @@ -48,5 +48,8 @@ binary-arch: build dh_md5sums dh_builddeb +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary diff --git a/examples/rules.multi b/examples/rules.multi index 6fd70889..c5d16183 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -70,5 +70,8 @@ binary-arch: build dh_md5sums -a dh_builddeb -a +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary -- cgit v1.2.3 From fae527d4b0eae350f5e43bd82c706bab4b8774b4 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:37:41 +0000 Subject: r25: Initial Import --- debian/changelog | 6 ++++++ dh_installmenu.1 | 2 +- examples/rules | 1 + examples/rules.multi | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index 6f26f1ee..b66816d8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +debhelper (0.19) unstable; urgency=low + + * dh_installmenu.1: menufile is in section 5, not 1. + + -- Joey Hess Wed, 12 Nov 1997 19:54:48 -0500 + debhelper (0.18) unstable; urgency=low * examples/*: added source, diff targets that just print an error. diff --git a/dh_installmenu.1 b/dh_installmenu.1 index b5337f30..6dcffff2 100644 --- a/dh_installmenu.1 +++ b/dh_installmenu.1 @@ -58,6 +58,6 @@ Enables verbose mode .SH "SEE ALSO" .BR /usr/doc/debhelper/README , -.BR menufile (1) +.BR menufile (5) .SH AUTHOR Joey Hess diff --git a/examples/rules b/examples/rules index 72ce3e66..86ec8a70 100755 --- a/examples/rules +++ b/examples/rules @@ -34,6 +34,7 @@ binary-arch: build dh_installdocs dh_installexamples dh_installmenu +# dh_installinit dh_installcron dh_installmanpages # dh_undocumented diff --git a/examples/rules.multi b/examples/rules.multi index c5d16183..1fce1c0b 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -33,6 +33,7 @@ binary-indep: build dh_installdocs -i dh_installexamples -i dh_installmenu -i +# dh_installinit -i dh_installcron -i # dh_installmanpages -i # dh_undocumented @@ -56,6 +57,7 @@ binary-arch: build dh_installdocs -a dh_installexamples -a dh_installmenu -a +# dh_installinit -a dh_installcron -a dh_installmanpages -a # dh_undocumented -- cgit v1.2.3 From e6259191673f34ae6d56f1c0b746a3cc97455dac Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:38:40 +0000 Subject: r30: Initial Import --- BUGS | 2 ++ debian/changelog | 6 ++++++ dh_clean | 5 ++--- examples/rules | 2 +- examples/rules.multi | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/BUGS b/BUGS index 3a33f32e..51a7b613 100644 --- a/BUGS +++ b/BUGS @@ -1,3 +1,5 @@ dh_compress: doesn't verbose echo that it's cd'd to $TMP. dh_installdirs, dh_md5sums: uses ../.. to cd back to original location, but we don't know that $TMP is 2 levels deep. +dh_compress: refers to ../compress (meaning debian/compress), but we don't +know that this will work - exp if $TMP is not under debian/. diff --git a/debian/changelog b/debian/changelog index d453632c..209cfb66 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +debhelper (0.24) unstable; urgency=low + + * dh_clean: no longer clean up empty (0 byte) files (#15240). + + -- Joey Hess Tue, 25 Nov 1997 14:29:37 -0500 + debhelper (0.23) unstable; urgency=low * Now depends on fileutils (>= 3.16-4), becuase with any earlier version diff --git a/dh_clean b/dh_clean index 73c094fe..8e92fc8d 100755 --- a/dh_clean +++ b/dh_clean @@ -14,9 +14,8 @@ for PACKAGE in $DH_DOPACKAGES; do done doit "rm -f debian/files* debian/*.debhelper $*" -# Remove other temp files. doit isn't smart enough to handle this, so I echo -# by hand (sigh). +# Remove other temp files. doit "find . \( -name '#*#' -o -name '*~' -o -name DEADJOE -o -name '*.orig' \ -o -name '*.rej' -o -name '*.bak' -o -name '.*.orig' \ -o -name '.*.rej' -o -name .SUMS -o -name TAGS -o -name core \ - -o -size 0 \) -exec rm -f {} \;" + \) -exec rm -f {} \;" diff --git a/examples/rules b/examples/rules index 86ec8a70..10661223 100755 --- a/examples/rules +++ b/examples/rules @@ -15,9 +15,9 @@ clean: dh_testdir dh_testroot rm -f build-stamp - dh_clean # Add here commands to clean up after the build process. #-$(MAKE) distclean + dh_clean # Build architecture-independent files here. binary-indep: build diff --git a/examples/rules.multi b/examples/rules.multi index 1fce1c0b..496c3366 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -18,9 +18,9 @@ clean: dh_testdir dh_testroot rm -f build-stamp - dh_clean # Add here commands to clean up after the build process. #-$(MAKE) distclean + dh_clean # Build architecture-independent files here. binary-indep: build -- cgit v1.2.3 From 99b34ff691012e69828ea2167b7a3089ac4953f3 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:39:16 +0000 Subject: r37: Initial Import --- README | 6 +++-- debian/changelog | 6 +++++ dh_installdebfiles | 64 +++++----------------------------------------------- dh_installdebfiles.1 | 2 +- dh_installinit.1 | 4 ++-- examples/rules | 4 +++- examples/rules.multi | 9 +++++--- 7 files changed, 28 insertions(+), 67 deletions(-) (limited to 'examples') diff --git a/README b/README index e192504d..280da781 100644 --- a/README +++ b/README @@ -35,7 +35,9 @@ Remove that and replace it with something like: dh_compress dh_fixperms dh_suidregister - dh_installdebfiles + dh_installdeb + dh_shlibdeps + dh_gencontrol dh_makeshlibs dh_md5sums dh_builddeb @@ -68,7 +70,7 @@ Some debhelper commands will automatically generate parts of debian install scripts. If you want these automatically generated things included in your debian install scripts, then you need to add "#DEBHELPER#" to your scripts, in the place the code should be added. "#DEBHELPER#" will be replaced by any -autogenerated code when you run dh_installdebfiles. +autogenerated code when you run dh_installdeb. All scripts that automatically generate code in this way let it be disabled by the -n parameter. diff --git a/debian/changelog b/debian/changelog index d2f17f96..96c4971b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +debhelper (0.31) unstable; urgency=low + + * Fixed man page typos #15685. + + -- Joey Hess Sat, 6 Dec 1997 21:44:58 -0500 + debhelper (0.30) unstable; urgency=low * dh_md5sumes, dh_installdirs, dh_compress: fixed assorted cd bugs. diff --git a/dh_installdebfiles b/dh_installdebfiles index 825c9ee5..8b1e0962 100755 --- a/dh_installdebfiles +++ b/dh_installdebfiles @@ -1,64 +1,12 @@ #!/bin/sh -e # -# Install files from debian/ into the package's DEBIAN directory. -# Also generates the control file. +# This program is depricated, but left in the package for backwards +# compatability. It simply calls the 3 programs that replaced it. PATH=debian:$PATH:/usr/lib/debhelper -. dh_lib -for PACKAGE in $DH_DOPACKAGES; do - TMP=`tmpdir $PACKAGE` - EXT=`pkgext $PACKAGE` +echo "* Note: dh_installdebfiles is depricated." >&2 - if [ ! -d $TMP/DEBIAN ]; then - doit "install -o root -g root -d $TMP/DEBIAN" - fi - - # Install debian install scripts. - # If any .debhelper files exist, add them into the scripts. - for file in postinst preinst prerm postrm; do - if [ -f debian/$EXT$file ]; then - # Add this into the script, where it has #DEBHELPER# - if [ -f debian/$EXT$file.debhelper ]; then - complex_doit "perl -pe 's~#DEBHELPER#~qx{cat debian/$EXT$file.debhelper}~eg' < debian/$EXT$file > $TMP/DEBIAN/$file" - doit "chown root.root $TMP/DEBIAN/$file" - doit "chmod 755 $TMP/DEBIAN/$file" - else - doit "install -o root -g root -p debian/$EXT$file $TMP/DEBIAN/$file" - fi - else - # Auto-generate script header and add .debhelper - # content to it. - if [ -f debian/$EXT$file.debhelper ]; then - complex_doit "echo '#!/bin/sh -e' > $TMP/DEBIAN/$file" - complex_doit "cat debian/$EXT$file.debhelper >> $TMP/DEBIAN/$file" - doit "chown root.root $TMP/DEBIAN/$file" - doit "chmod 755 $TMP/DEBIAN/$file" - fi - fi - done - - # Install non-executable files - for file in shlibs conffiles; do - if [ -f debian/$EXT$file ]; then - doit "install -o root -g root -m 644 -p debian/$EXT$file $TMP/DEBIAN/$file" - fi - done - - # Run dpkg-shlibdeps to generate dependancies. - filelist="" - for file in `find $TMP -type f \( -perm +111 -or -name "*.so*" \) | tr "\n" " "` ; do - case "`file $file`" in - *ELF*) - filelist="$file $filelist" - ;; - esac - done - if [ "$filelist" ]; then - doit "dpkg-shlibdeps -Tdebian/${EXT}substvars $filelist" - fi - - # Generate and install control file. - doit "dpkg-gencontrol -p$PACKAGE -Tdebian/${EXT}substvars -P$TMP" - doit "chown root.root $TMP/DEBIAN/control" -done +dh_installdeb $* +dh_shlibdeps $* +dh_gencontrol $* diff --git a/dh_installdebfiles.1 b/dh_installdebfiles.1 index 429481f4..8b34b910 100644 --- a/dh_installdebfiles.1 +++ b/dh_installdebfiles.1 @@ -2,7 +2,7 @@ .SH NAME dh_installdebfiles \- install files into the DEBIAN directory .SH SYNOPSIS -.B dh_installdebfils +.B dh_installdebfiles .I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir]" .SH "DESCRIPTION" dh_installdebfiles is a debhelper program that is responsible for installing diff --git a/dh_installinit.1 b/dh_installinit.1 index f87c0c58..e0daac42 100644 --- a/dh_installinit.1 +++ b/dh_installinit.1 @@ -3,7 +3,7 @@ dh_installinit \- install init scripts into package build directories .SH SYNOPSIS .B dh_installinit -.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [-n] [-r] [-d] [-u params]" +.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir] [-n] [-r] [-d] [-uparams]" .SH "DESCRIPTION" dh_installinit is a debhelper program that is responsible for installing init scripts into package build directories. @@ -47,7 +47,7 @@ Remove trailing "d" from the name of the package, and use the result for the filename the init script is installed as in etc/init.d/ . This may be useful for daemons with named ending in "d". .TP -.B \-u params +.B \-uparams Pass "params" to .BR update-rc.d (8) If not specified, "default" will be passed to diff --git a/examples/rules b/examples/rules index 10661223..87692ccd 100755 --- a/examples/rules +++ b/examples/rules @@ -43,7 +43,9 @@ binary-arch: build dh_compress dh_fixperms dh_suidregister - dh_installdebfiles + dh_installdeb + dh_shlibdeps + dh_gencontrol # dh_makeshlibs dh_du dh_md5sums diff --git a/examples/rules.multi b/examples/rules.multi index 496c3366..f0bd78a6 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -41,8 +41,9 @@ binary-indep: build dh_compress -i dh_fixperms -i dh_suidregister -i - dh_installdebfiles -i - dh_du -a + dh_installdeb -i + dh_gencontrol -i + dh_du -i dh_md5sums -i dh_builddeb -i @@ -66,7 +67,9 @@ binary-arch: build dh_compress -a dh_fixperms -a dh_suidregister -a - dh_installdebfiles -a + dh_installdeb -a + dh_shlibdeps -a + dh_gencontrol -a # dh_makeshlibs -a dh_du -a dh_md5sums -a -- cgit v1.2.3 From 918dbc752efd1d35a3ef667524062d4a0dcd3e3e Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:39:21 +0000 Subject: r38: Initial Import --- TODO | 2 ++ debian/changelog | 10 ++++++++ debian/rules | 4 ++- dh_clean | 12 ++++++--- dh_installdeb | 11 +++++--- dh_installdebfiles.1 | 71 +++++++++++----------------------------------------- dh_installmenu.1 | 2 +- dh_lib | 6 ++++- dh_suidregister.1 | 2 +- examples/rules | 4 +-- examples/rules.indep | 4 +-- examples/rules.multi | 8 +++--- 12 files changed, 59 insertions(+), 77 deletions(-) (limited to 'examples') diff --git a/TODO b/TODO index 5ed6f9bb..3118ab95 100644 --- a/TODO +++ b/TODO @@ -4,3 +4,5 @@ * add a dh_debstd, which mimics debstd, but uses debhelper tools internally. * dh_du: change it so it doesn't grep for things with tabs in them. That's nasty. (and makes cut-and-paste from dh_du -v not work). +* dh_compress: add --exclude "*.conf" type-thingy +* info support for debhelper diff --git a/debian/changelog b/debian/changelog index 96c4971b..f739f89b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +debhelper (0.32) unstable; urgency=low + + * Split dh_installdebfiles into 3 programs (dh_installdeb, dh_shlibdeps, + and dh_gencontrol). dh_installdebfiles still works, but is depricated. + * Added an examples/rules.indep file. + * examples/rules.multi: changed dh_du -a to dh_du -i in binary-indep + section. + + -- Joey Hess Wed, 10 Dec 1997 19:53:13 -0500 + debhelper (0.31) unstable; urgency=low * Fixed man page typos #15685. diff --git a/debian/rules b/debian/rules index e2d4da03..8a240f9b 100755 --- a/debian/rules +++ b/debian/rules @@ -43,7 +43,9 @@ binary-indep: build ./dh_compress ./dh_fixperms ./dh_suidregister - ./dh_installdebfiles + ./dh_installdeb + ./dh_shlibdeps + ./dh_gencontrol ./dh_du ./dh_md5sums ./dh_builddeb diff --git a/dh_clean b/dh_clean index b170494b..6306adda 100755 --- a/dh_clean +++ b/dh_clean @@ -12,11 +12,15 @@ for PACKAGE in $DH_DOPACKAGES; do doit "rm -rf $TMP" doit "rm -f debian/${EXT}substvars" done -doit "rm -f debian/files* debian/*.debhelper $*" +doit "rm -f debian/*.debhelper $*" +if [ ! "$DH_K_FLAG" ]; then + doit "rm -f debian/files*" +fi # Remove other temp files. # Use complex_doit so we can properly escape things. -complex_doit "find . \( -name '#*#' -o -name '*~' -o -name DEADJOE -o -name '*.orig' \ - -o -name '*.rej' -o -name '*.bak' -o -name '.*.orig' \ - -o -name '.*.rej' -o -name .SUMS -o -name TAGS -o -name core \ +complex_doit "find . \( -name '#*#' -o -name '*~' -o -name DEADJOE \ + -o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \ + -o -name '.*.orig' -o -name '.*.rej' -o -name .SUMS \ + -o -name TAGS -o -name core \ \) -exec rm -f {} \;" diff --git a/dh_installdeb b/dh_installdeb index 43aca902..d9e1e7b3 100755 --- a/dh_installdeb +++ b/dh_installdeb @@ -17,14 +17,17 @@ for PACKAGE in $DH_DOPACKAGES; do # If any .debhelper files exist, add them into the scripts. for file in postinst preinst prerm postrm; do if [ -f debian/$EXT$file ]; then - # Add this into the script, where it has #DEBHELPER# if [ -f debian/$EXT$file.debhelper ]; then + # Add this into the script, where it has + # #DEBHELPER# complex_doit "perl -pe 's~#DEBHELPER#~qx{cat debian/$EXT$file.debhelper}~eg' < debian/$EXT$file > $TMP/DEBIAN/$file" - doit "chown root.root $TMP/DEBIAN/$file" - doit "chmod 755 $TMP/DEBIAN/$file" else - doit "install -o root -g root -p debian/$EXT$file $TMP/DEBIAN/$file" + # Just get rid of any #DEBHELOPER# in the + # script. + complex_doit "sed s/#DEBHELPER#// < debian/$EXT$file > $TMP/DEBIAN/$file" fi + doit "chown root.root $TMP/DEBIAN/$file" + doit "chmod 755 $TMP/DEBIAN/$file" else # Auto-generate script header and add .debhelper # content to it. diff --git a/dh_installdebfiles.1 b/dh_installdebfiles.1 index 8b34b910..0240f938 100644 --- a/dh_installdebfiles.1 +++ b/dh_installdebfiles.1 @@ -3,70 +3,27 @@ dh_installdebfiles \- install files into the DEBIAN directory .SH SYNOPSIS .B dh_installdebfiles -.I "[-v] [-a] [-i] [-ppackage] [-Ptmpdir]" .SH "DESCRIPTION" dh_installdebfiles is a debhelper program that is responsible for installing files into the DEBIAN directory in package build directories with the -correct permissions. +correct permissions, canculating shared library dependancies, and creating a +control file. .P -dh_installdocs automatically installs the following files from debian/ into -the DEBIAN directory: -.IP postinst -.IP preinst -.IP postrm -.IP prerm -.IP shlibs -.IP conffiles +This program is depricated. It is now merely a wrapper around three other +programs, and you may replace any calls to this program by: .P -(For packages other than the first binary package listed in debian/control, -prefix these filenames with then name of the "package.", for example, -"foo.postinst".) -.P -The files postinst, preinst, postrm, and prerm are handled specially: If a -corresponding file named debian/script.debhelper exists, the contents of that -file are merged into the script as follows: If the script exists, then -anywhere in it that "#DEBHELPER#" appears, the text of the .debhelper file is -inserted. If the script does not exist, then a script is generated from -the .debhelper file. The .debhelper files are created by other debhelper -programs, such as -.BR dh_installmenu (1) -, and are shell scripts. -.P -In addition, it will generate a DEBIAN/control file, by running -.BR dpkg-shlibdeps (1) -and -.BR dpkg-gencontrol (1) + dh_installdeb + dh_shlibdeps + dh_gencontrol +.SH WARNING +This program will be removed at some time in the furture. .SH OPTIONS -.TP -.B \-v -Verbose mode; show all commands that modify the package build directory. -.TP -.B \-a -Install files for all architecture dependent packages. -.TP -.B \-i -Install files for all architecture independent packages. -.TP -.B \-ppackage -Install files for the package named "package". -.TP -.B \-Ptmpdir -Use "tmpdir" for package build directory. -.SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will be effected. -.SH ENVIRONMENT -.TP -.I DH_VERBOSE -Enables verbose mode +Any options passed to this program will be sent to each of the 3 programs +listed above. .SH "SEE ALSO" .BR /usr/doc/debhelper/README -.SH "CONFORMS TO" -Debian policy, version 2.3.0.0 +.BR dh_installdeb (1) +.BR dh_shlibdeps (1) +.BR dh_gencontrol (1) .SH AUTHOR Joey Hess diff --git a/dh_installmenu.1 b/dh_installmenu.1 index abbff8de..11bc71b8 100644 --- a/dh_installmenu.1 +++ b/dh_installmenu.1 @@ -10,7 +10,7 @@ files used by the debian menu package into package build directories. .P It also automatically generates the postinst and postrm commands needed to interface with the debian menu package. See -.BR dh_installdebfiles (1) +.BR dh_installdeb (1) for an explanation of how this works. .P If a file named debian/menu exists, then it is installed into diff --git a/dh_lib b/dh_lib index 4c8c68c6..388b7f72 100644 --- a/dh_lib +++ b/dh_lib @@ -82,7 +82,7 @@ autoscript() { # Argument processing and global variable initialization is below. # Parse command line. -set -- `getopt xvidrnap:P:u: $*` +set -- `getopt xvidrnakp:P:u: $*` for i; do case "$i" @@ -120,6 +120,10 @@ for i; do DH_R_FLAG=1 shift ;; + -k) + DH_K_FLAG=1 + shift + ;; -P) DH_TMPDIR="$2" shift diff --git a/dh_suidregister.1 b/dh_suidregister.1 index c69f6128..b66c2140 100644 --- a/dh_suidregister.1 +++ b/dh_suidregister.1 @@ -23,7 +23,7 @@ scan the package build directory for files that have suid permissions, and will automatically register all files it finds. .P Note that this package modifies your postinst and postrm files. See -.BR dh_installdebfiles (1) +.BR dh_installdeb (1) for an explanation of how this works. .SH OPTIONS .TP diff --git a/examples/rules b/examples/rules index 87692ccd..105d91c0 100755 --- a/examples/rules +++ b/examples/rules @@ -27,10 +27,10 @@ binary-indep: build binary-arch: build dh_testdir dh_testroot - dh_clean + dh_clean -k dh_installdirs # Add here commands to install the files into debian/tmp - #$(MAKE) PREFIX=debian/tmp install + #$(MAKE) prefix=`pwd`/debian/tmp install dh_installdocs dh_installexamples dh_installmenu diff --git a/examples/rules.indep b/examples/rules.indep index a257a197..5bd756de 100755 --- a/examples/rules.indep +++ b/examples/rules.indep @@ -24,10 +24,10 @@ clean: binary-indep: build dh_testdir dh_testroot - dh_clean + dh_clean -k dh_installdirs # Add here commands to install the files into debian/tmp - #$(MAKE) PREFIX=debian/tmp install + #$(MAKE) prefix=`pwd`/debian/tmp install dh_installdocs dh_installexamples dh_installmenu diff --git a/examples/rules.multi b/examples/rules.multi index f0bd78a6..eceee350 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -26,10 +26,10 @@ clean: binary-indep: build dh_testdir -i dh_testroot -i - dh_clean -i + dh_clean -i -k dh_installdirs -i # Add here commands to install the files into debian/tmp - #$(MAKE) PREFIX=debian/tmp install + #$(MAKE) prefix=`pwd`/debian/tmp install dh_installdocs -i dh_installexamples -i dh_installmenu -i @@ -51,10 +51,10 @@ binary-indep: build binary-arch: build dh_testdir -a dh_testroot -a - dh_clean -a + dh_clean -a -k dh_installdirs -a # Add here commands to install the files into debian/tmp - #$(MAKE) PREFIX=debian/tmp install + #$(MAKE) prefix=`pwd`/debian/tmp install dh_installdocs -a dh_installexamples -a dh_installmenu -a -- cgit v1.2.3 From 8828415f7d08350f236cc60d3c801ccd0ba199d6 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:40:08 +0000 Subject: r42: Initial Import --- debian/changelog | 7 +++++++ dh_lib | 29 ++++++++++++++++------------- dh_undocumented | 3 ++- examples/rules | 2 +- examples/rules.indep | 2 +- examples/rules.multi | 2 +- 6 files changed, 28 insertions(+), 17 deletions(-) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index bfc05796..80d0aaa3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debhelper (0.36) unstable; urgency=low + + * dh_undocumented: exit with an error message if the man page specified + does not have a section. + + -- Joey Hess Sat, 27 Dec 1997 14:14:04 -0500 + debhelper (0.35) unstable; urgency=low * dh_lib: use dpkg-parsechangelog instead of parsing it by hand. This diff --git a/dh_lib b/dh_lib index 7a56c156..8347aae8 100644 --- a/dh_lib +++ b/dh_lib @@ -51,6 +51,22 @@ pkgext() { fi } +# Returns 1 if the package is a native debian package, null otherwise. +isnative() { + # Get the package version. + # Note that the 2>/dev/null is because a bug in dpkg-parsechangelog makes it + # output a bogus error message to stderr. + # If it actually has a real error, then the expr will fail, and this whole + # script will come crashing to a halt, which is good enough to inform + # the user something's wrong. :-) + VERSION=`expr "\`dpkg-parsechangelog 2>/dev/null\`" : \ + '.*Version: \(.*\).*Distribution:'` + # Is this a native Debian package? + if expr "$VERSION" : '.*-' >/dev/null; then + return 1 + fi +} + # Automatically add a shell script snippet to a debian script. # Only works if the script has #DEBHELPER# in it. # @@ -141,22 +157,9 @@ for i; do esac done -# Get the package version. -# Note that the 2>/dev/null is because a bug in dpkg-parsechangelog makes it -# output a bogus error message to stderr. -# If it actually has a real error, then the expr will fail, and this whole -# script will come crashing to a halt, which is good enough to inform -# the user something's wrong. :-) -VERSION=`expr "\`dpkg-parsechangelog 2>/dev/null\`" : '.*Version: \(.*\).*Distribution:'` - # Get the name of the main binary package. MAINPACKAGE=`grep ^Package: debian/control | cut -d " " -f 2 | head -1` -# Is this a native Debian package? -if ! expr "$VERSION" : '.*-' >/dev/null; then - NATIVE=1 -fi - if [ "$DH_DOINDEP" -o "$DH_DOARCH" ]; then # Figure out all the binary packages to be produced, by looking at the # control file. Break it into 2 lists, INDEP_PACKAGES and ARCH_PACKAGES. diff --git a/dh_undocumented b/dh_undocumented index ee161c52..d0a8febd 100755 --- a/dh_undocumented +++ b/dh_undocumented @@ -32,7 +32,8 @@ for PACKAGE in $DH_DOPACKAGES; do # Determine what directory the file belongs in, # /usr/man, or /usr/X11R6/man. - section=`expr "$file" : '.*\.\([123456789]\)'` + section=`expr "$file" : '.*\.\([123456789]\)'` \ + || error "\"$file\" does not have an extention." if [ `expr "$file" : '.*\.[123456789]\(x\)'` ] ; then dir=usr/X11R6/man/man$section reldir=../../../man diff --git a/examples/rules b/examples/rules index 105d91c0..29c79dee 100755 --- a/examples/rules +++ b/examples/rules @@ -7,7 +7,7 @@ build: build-stamp build-stamp: dh_testdir - # Add here commands to compile the pacckage. + # Add here commands to compile the package. #$(MAKE) touch build-stamp diff --git a/examples/rules.indep b/examples/rules.indep index 5bd756de..fb46c623 100755 --- a/examples/rules.indep +++ b/examples/rules.indep @@ -8,7 +8,7 @@ build: build-stamp build-stamp: dh_testdir - # Add here commands to compile the pacckage. + # Add here commands to compile the package. #$(MAKE) touch build-stamp diff --git a/examples/rules.multi b/examples/rules.multi index eceee350..205ed4c8 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -10,7 +10,7 @@ build: build-stamp build-stamp: dh_testdir - # Add here commands to compile the pacckage. + # Add here commands to compile the package. #$(MAKE) touch build-stamp -- cgit v1.2.3 From b8fc5a1b99da4ffb113d42f373b7c84772d1413a Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:42:23 +0000 Subject: r49: Initial Import --- debian/changelog | 11 +++++++++++ dh_clean | 2 +- dh_clean.1 | 12 ++++++------ dh_compress.1 | 10 +++++----- dh_du.1 | 10 +++++----- dh_fixperms.1 | 10 +++++----- dh_installdirs.1 | 12 ++++++------ dh_installdocs.1 | 12 ++++++------ dh_installexamples.1 | 14 +++++++------- dh_installinit.1 | 25 +++++++++---------------- dh_installmanpages.1 | 10 +++++----- dh_installmenu.1 | 12 ++++++------ dh_makeshlibs | 6 +++--- dh_makeshlibs.1 | 24 ++++++++---------------- dh_suidregister.1 | 12 ++++++------ dh_undocumented.1 | 12 ++++++------ examples/rules | 7 +++++++ examples/rules.indep | 7 +++++++ examples/rules.multi | 12 ++++++++++++ 19 files changed, 121 insertions(+), 99 deletions(-) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index ea45ec9d..3a5a9200 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +debhelper (0.54) unstable; urgency=low + + * dh_lib: no longer call getopt(1) to parse options. I wrote my own + argument processor in perl. + * Added long versions of all arguments. TODO: document them. + * All parameters may now be passed values that include whitespace (ie, + dh_installinit -u"defaults 10") + * Now depends on perl (needs Getopt::Long). + + -- Joey Hess Sat, 10 Jan 1998 15:44:09 -0500 + debhelper (0.53) unstable; urgency=low * dh_installmanpages: ignore all man pages installed into debian/tmp diff --git a/dh_clean b/dh_clean index ba20e3ea..73fb88f0 100755 --- a/dh_clean +++ b/dh_clean @@ -10,7 +10,7 @@ for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` substvars=`pkgfile $PACKAGE substvars` if [ "$substvars" ]; then - doit "rm -f debian/$substvars" + doit "rm -f $substvars" fi doit "rm -rf $TMP" done diff --git a/dh_clean.1 b/dh_clean.1 index 5d9180a9..f4f14c5a 100644 --- a/dh_clean.1 +++ b/dh_clean.1 @@ -11,22 +11,22 @@ other files, such as debian/substvars, debian/files, DEADJOE, emacs backup files, etc. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Clean up the package build directory for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Clean up the package build directory for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Clean up the package build directory for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP -.B \-k +.B \-k, \--keep Do not delete debian/files. When do you want to use this? Anytime you have a debian/rules that has 2 binary targets that build different .deb packages; for example, one target is binary-arch, and the other is binary-indep, or diff --git a/dh_compress.1 b/dh_compress.1 index ce8f539a..9e23a8f0 100644 --- a/dh_compress.1 +++ b/dh_compress.1 @@ -31,19 +31,19 @@ customization of what files are compressed: ! -name "copyright" .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Compress files for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Compress files for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Compress files for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .SH NOTES The diff --git a/dh_du.1 b/dh_du.1 index 315d0b98..41bd1c43 100644 --- a/dh_du.1 +++ b/dh_du.1 @@ -13,19 +13,19 @@ debian installer program. The du file is installed with proper permissions and ownerships. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Generate du files for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Generate du files for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Generate du file for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .SH NOTES The diff --git a/dh_fixperms.1 b/dh_fixperms.1 index 1fac26c3..316644d6 100644 --- a/dh_fixperms.1 +++ b/dh_fixperms.1 @@ -15,19 +15,19 @@ root, and it removes group and other write permission from all files. Finally, it removes execute permissions from any libraries that have it set. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Fix permissions for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Fix permissions for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Fix permissions for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .SH NOTES The diff --git a/dh_installdirs.1 b/dh_installdirs.1 index 56c641b3..0c6aaa54 100644 --- a/dh_installdirs.1 +++ b/dh_installdirs.1 @@ -21,22 +21,22 @@ Be sure to only use directory names relative to the package build directory. Ie, "/usr/bin" should not be used, use "usr/bin" instead. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Create directories for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Create directories for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Create directories for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP -.B \-A +.B \-A, \--all Create any directories specified by command line parameters in ALL packages acted on. .TP diff --git a/dh_installdocs.1 b/dh_installdocs.1 index 6a0290a4..6b8b33a6 100644 --- a/dh_installdocs.1 +++ b/dh_installdocs.1 @@ -27,22 +27,22 @@ 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. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Install files for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Install files for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Install files for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP -.B \-A +.B \-A, \--all Install all files specified by command line parameters in ALL packages acted on. .TP diff --git a/dh_installexamples.1 b/dh_installexamples.1 index e038faf7..c2997d95 100644 --- a/dh_installexamples.1 +++ b/dh_installexamples.1 @@ -17,22 +17,22 @@ A file named debian/package.examples (debian/examples may be used for the first binary package in debian/control) can list other files to be installed. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Install files for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Install files for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Install files for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP -.B \-A +.B \-A, \--all Install any files specified by command line parameters in ALL packages acted on. .TP @@ -48,7 +48,7 @@ and arguments are cumulative. If none are specified, then all packages listed in the control file will be effected. .P -Note that dh_examples will happily copy entire directory hierarchies if +Note that dh_installexamples will happily copy entire directory hierarchies if you ask it to (it uses cp -a internally). If it is asked to install a directory, it will install the complete contents of the directory. .SH ENVIRONMENT diff --git a/dh_installinit.1 b/dh_installinit.1 index 6a2ab321..29bb867a 100644 --- a/dh_installinit.1 +++ b/dh_installinit.1 @@ -18,33 +18,33 @@ by the packagename. (You may use debian/init for the first binary package listed in the control file.) .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Install init scripts into all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Install init scripts into all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Install init scripts into the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP -.B \-n +.B \-n, \--noscripts Do not modify postinst/postrm/prerm scripts. .TP -.B \-r +.B \-r, \--no-restart-on-upgrade Do not restart daemon on upgrade. .TP -.B \-d +.B \-d, \--remove-d Remove trailing "d" from the name of the package, and use the result for the filename the init script is installed as in etc/init.d/ . This may be useful for daemons with named ending in "d". .TP -.B \-uparams +.B \-uparams, \--update-rcd-params=params Pass "params" to .BR update-rc.d (8) If not specified, "default" will be passed to @@ -57,13 +57,6 @@ and .B \-p arguments are cumulative. If none are specified, then all packages listed in the control file will be effected. -.P -Due to a bug in -.BR getopt (1) -, you cannot really text with spaces in it to the -u flag. However, this bug -has been worked around, and it should appear to work. What it's really doing -is looking at any parameters passed that are not known flags, and appending -that text onto the end of the text specified by the -u flag. .SH ENVIRONMENT .TP .I DH_VERBOSE diff --git a/dh_installmanpages.1 b/dh_installmanpages.1 index b8b580e1..e44eaf22 100644 --- a/dh_installmanpages.1 +++ b/dh_installmanpages.1 @@ -20,19 +20,19 @@ This is useful if by default it installs some man pages that you do not want to be installed. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Install man pages into all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Install man pages into all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Install man pages into the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP .B file ... diff --git a/dh_installmenu.1 b/dh_installmenu.1 index 320e1005..cf54949c 100644 --- a/dh_installmenu.1 +++ b/dh_installmenu.1 @@ -25,22 +25,22 @@ For the first first binary package listed in the control file, you may use debian/menu and debian/menu-method instead. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Install menu files into all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Install menu files into all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Install menu files into the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP -.B \-n +.B \-n, \--noscripts Do not modify postinst/postrm scripts. .SH NOTES The diff --git a/dh_makeshlibs b/dh_makeshlibs index f96c327f..d595c3b5 100755 --- a/dh_makeshlibs +++ b/dh_makeshlibs @@ -24,9 +24,9 @@ for PACKAGE in $DH_DOPACKAGES; do if [ ! -d "$TMP/DEBIAN" ] ; then doit "install -d $TMP/DEBIAN" fi - if [ "$DH_V_FLAG" ]; then - if [ "$*" ]; then - PACKAGE="$*" + if [ "$DH_V_FLAG_SET" ]; then + if [ "$DH_V_FLAG" ]; then + PACKAGE="$DH_V_FLAG" else # Call isnative becuase it sets $VERSION # as a side effect. diff --git a/dh_makeshlibs.1 b/dh_makeshlibs.1 index 056cc0f2..cb2703f4 100644 --- a/dh_makeshlibs.1 +++ b/dh_makeshlibs.1 @@ -3,7 +3,7 @@ dh_makeshlibs \- automatically create shlibs file .SH SYNOPSIS .B dh_makeshlibs -.I "[-v] [-a] [-i] [-mmajor] [-Ptmpdir] [-ppackage] [-mmajor] [-V [dependancies]]" +.I "[-v] [-a] [-i] [-mmajor] [-Ptmpdir] [-ppackage] [-mmajor] [-V[dependancies]]" .SH "DESCRIPTION" dh_makeshlibs is a debhelper program that automatically scans for shared libraries, and generates a shlibs file for the libraries it finds. @@ -12,26 +12,26 @@ For this program to work, you cannot have already installed a DEBIAN/shlibs file. If such a file exits, the program will exit with an error. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Generate shlibs files for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Generate shlibs files for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Generate shlibs file for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP -.B \-mmajor +.B \-mmajor, \--major=major Instead of trying to guess the major number of the library from the filename of the library, use the major number specified after the -m parameter. .TP -.B \-V [dependancies] +.B \-V[dependancies], \--version-info, \--version-info=dependancies By default, the shlibs file generated by this program does not make packages depend on any particular version of the package containing the shared library. It may be necessary for you to add some version dependancy @@ -70,14 +70,6 @@ Enables verbose mode .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH BUGS -Due to limitations in -.BR getopt (1) -, I had to fudge a bit on how the -V parameter really works. When -V is -specified, it's really examining the rest of the command line for any text -that isn't a switch, and using that for the dependancy information. This -means that the -V switch and any dependancy parameters should come last on -the command line. -.P There is no guarantee that the program will get the shlibs file right. For example, it may not correctly guess the major number of your package. In cases like these (and perhaps in general, just to be safe), it is better to diff --git a/dh_suidregister.1 b/dh_suidregister.1 index 29fc504b..51e08fe5 100644 --- a/dh_suidregister.1 +++ b/dh_suidregister.1 @@ -28,22 +28,22 @@ Note that this package modifies your postinst and postrm files. See for an explanation of how this works. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Register files for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Register files for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Register files for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP -.B \-A +.B \-A, \--all Register any files specified by command line parameters in ALL packages acted on. I doubt anyone will find this useful, it's here for consitency with other debhelper programs. diff --git a/dh_undocumented.1 b/dh_undocumented.1 index 677c90f8..26498934 100644 --- a/dh_undocumented.1 +++ b/dh_undocumented.1 @@ -32,22 +32,22 @@ the first binary package in debian/control) can list other man page names to set up. .SH OPTIONS .TP -.B \-v +.B \-v, \--verbose Verbose mode; show all commands that modify the package build directory. .TP -.B \-a +.B \-a, \--arch Install undocumented man page symlinks for all architecture dependent packages. .TP -.B \-i +.B \-i, \--indep Install undocumented man page symlinks for all architecture independent packages. .TP -.B \-ppackage +.B \-ppackage, \--package=package Install undocumented man page symlinks for the package named "package". .TP -.B \-Ptmpdir +.B \-Ptmpdir, \--tmpdir=tmpdir Use "tmpdir" for package build directory. .TP -.B \-A +.B \-A, \--all Install undocumented man page symlinks for any man pages specified by command line parameters in ALL packages acted on. I doubt anyone will find this useful, it's here for consitency with other debhelper programs. diff --git a/examples/rules b/examples/rules index 29c79dee..8e6683c1 100755 --- a/examples/rules +++ b/examples/rules @@ -7,16 +7,20 @@ build: build-stamp build-stamp: dh_testdir + # Add here commands to compile the package. #$(MAKE) + touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp + # Add here commands to clean up after the build process. #-$(MAKE) distclean + dh_clean # Build architecture-independent files here. @@ -25,12 +29,15 @@ binary-indep: build # Build architecture-dependent files here. binary-arch: build +# dh_testversion dh_testdir dh_testroot dh_clean -k dh_installdirs + # Add here commands to install the files into debian/tmp #$(MAKE) prefix=`pwd`/debian/tmp install + dh_installdocs dh_installexamples dh_installmenu diff --git a/examples/rules.indep b/examples/rules.indep index fb46c623..601c5e3e 100755 --- a/examples/rules.indep +++ b/examples/rules.indep @@ -8,26 +8,33 @@ build: build-stamp build-stamp: dh_testdir + # Add here commands to compile the package. #$(MAKE) + touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp + # Add here commands to clean up after the build process. #-$(MAKE) distclean + dh_clean # Build architecture-independent files here. binary-indep: build +# dh_testversion dh_testdir dh_testroot dh_clean -k dh_installdirs + # Add here commands to install the files into debian/tmp #$(MAKE) prefix=`pwd`/debian/tmp install + dh_installdocs dh_installexamples dh_installmenu diff --git a/examples/rules.multi b/examples/rules.multi index 205ed4c8..a5be1efe 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -10,26 +10,34 @@ build: build-stamp build-stamp: dh_testdir + # Add here commands to compile the package. #$(MAKE) + touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp + # Add here commands to clean up after the build process. #-$(MAKE) distclean + dh_clean # Build architecture-independent files here. binary-indep: build +# dh_testversion dh_testdir -i dh_testroot -i dh_clean -i -k dh_installdirs -i + # Add here commands to install the files into debian/tmp #$(MAKE) prefix=`pwd`/debian/tmp install + + dh_movefiles -i dh_installdocs -i dh_installexamples -i dh_installmenu -i @@ -49,12 +57,16 @@ binary-indep: build # Build architecture-dependent files here. binary-arch: build +# dh_testversion dh_testdir -a dh_testroot -a dh_clean -a -k dh_installdirs -a + # Add here commands to install the files into debian/tmp #$(MAKE) prefix=`pwd`/debian/tmp install + + dh_movefiles -a dh_installdocs -a dh_installexamples -a dh_installmenu -a -- cgit v1.2.3 From 220da53f5dda9555b3c1ab4cf494ec539d458a9f Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:45:57 +0000 Subject: r59: Initial Import --- TODO | 7 +++++++ debian/changelog | 13 +++++++++++++ debian/rules | 1 - dh_du | 24 ++++++++++++++---------- dh_du.1 | 46 +++++----------------------------------------- dh_gencontrol | 2 ++ dh_installmanpages | 1 - dh_makeshlibs | 1 + dh_md5sums | 1 + examples/rules | 1 - examples/rules.indep | 1 - examples/rules.multi | 2 -- 12 files changed, 43 insertions(+), 57 deletions(-) (limited to 'examples') diff --git a/TODO b/TODO index 6683d0dd..3e34c070 100644 --- a/TODO +++ b/TODO @@ -23,3 +23,10 @@ * maybe make dh_installmanpages look at the .TH line of man pages whose filenames end in .man, to figure out what section they go it. This would require a switch to turn on, for backwards compatability. +* All debhelper programs should be checked that they output files with the + correct permissions no matter what the umask is set to. Currently, only + those programs that run after dh_fixperms have been so checked. (Checking + the rest is low priority, since dh_fixperms fixes any incorrect permissions + they might have; still it would be nice to check them too, just to make + debhelper more flexible.) One easy fix is to add umask 022 to dh_lib, + however, there may be unforseen ramifications of such a change. diff --git a/debian/changelog b/debian/changelog index 8d2df4b2..df4abff5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +debhelper (0.63) unstable; urgency=low + + * Removed some debugging output from dh_installmanpages. + * du_du: no longer does anything, becuase it has been decided on + debian-policy that du control files are bad. + * examples/*: removed dh_du calls. + * debian/rules: removed dh_du call. + * Modified dh_gencontrol, dh_makeshlibs, and dh_md5sums to generate files + with the correct permissions even if the umask is set to unusual + values. (#18283) + + -- Joey Hess Mon, 16 Feb 1998 23:34:36 -0800 + debhelper (0.62) unstable; urgency=low * dh_installmanpages: if the man page filename ends in 'x', install it in diff --git a/debian/rules b/debian/rules index 892f7e69..13aaea5f 100755 --- a/debian/rules +++ b/debian/rules @@ -53,7 +53,6 @@ binary-indep: build ./dh_suidregister ./dh_installdeb ./dh_gencontrol - ./dh_du ./dh_md5sums ./dh_builddeb diff --git a/dh_du b/dh_du index 71ce2b13..73df2a0b 100755 --- a/dh_du +++ b/dh_du @@ -2,18 +2,22 @@ # # Generate a DEBIAN/du file, that lists the disk usage of the directories in # the package. +# +# No longer - it was decided these files are a bad idea. PATH=debian:$PATH:/usr/lib/debhelper . dh_lib -for PACKAGE in $DH_DOPACKAGES; do - TMP=`tmpdir $PACKAGE` - - if [ ! -d "$TMP/DEBIAN" ]; then - doit "install -d $TMP/DEBIAN" - fi +echo "* Note: dh_du does nothing and is deprecated. Remove it from debian/rules." >&2 - # Note that the tabs in this next line are important. - complex_doit "du -k $TMP | sed 's: $TMP/: :' | grep -v ' DEBIAN$' | grep -v ' $TMP$' >$TMP/DEBIAN/du" - doit "chown root.root $TMP/DEBIAN/du" -done +#for PACKAGE in $DH_DOPACKAGES; do +# TMP=`tmpdir $PACKAGE` +# +# if [ ! -d "$TMP/DEBIAN" ]; then +# doit "install -d $TMP/DEBIAN" +# fi +# +# # Note that the tabs in this next line are important. +# complex_doit "du -k $TMP | sed 's: $TMP/: :' | grep -v ' DEBIAN$' | grep -v ' $TMP$' >$TMP/DEBIAN/du" +# doit "chown root.root $TMP/DEBIAN/du" +#done diff --git a/dh_du.1 b/dh_du.1 index 9c04106e..9497a61d 100644 --- a/dh_du.1 +++ b/dh_du.1 @@ -3,49 +3,13 @@ dh_du \- generate DEBIAN/du file .SH SYNOPSIS .B dh_du -.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Ptmpdir]" .SH "DESCRIPTION" -dh_du is a debhelper program that is responsible for generating -a DEBIAN/du file, which lists the disk usage of directories in the package. -This file isn't used by anything yet, but it could be helpful for a future -debian installer program. +dh_du is a debhelper program that was responsible for generating +a DEBIAN/du file, which listed the disk usage of directories in the package. .P -The du file is installed with proper permissions and ownerships. -.SH OPTIONS -.TP -.B \-v, \--verbose -Verbose mode; show all commands that modify the package build directory. -.TP -.B \-a, \--arch -Generate du files for all architecture dependent packages. -.TP -.B \-i, \--indep -Generate du files for all architecture independent packages. -.TP -.B \--no-act -Do not really do anything. If used with -v, the result is that this command -will output a list of what it would have done. -.TP -.B \-ppackage, \--package=package -Generate du file for the package named "package". -.TP -.B \-Ptmpdir, \--tmpdir=tmpdir -Use "tmpdir" for package build directory. -.SH NOTES -The -.B \-a -.B \-i -and -.B \-p -arguments are cumulative. If none are specified, then all packages listed in -the control file will be effected. -.SH ENVIRONMENT -.TP -.I DH_VERBOSE -Enables verbose mode -.TP -.I DH_NO_ACT -Enables no-act mode (see above). +This program is now depricated, and does nothing, after a decision by the +debian developers that du control files should not exit. It will simply +output a warning message now. .SH "SEE ALSO" .BR /usr/doc/debhelper/README .SH AUTHOR diff --git a/dh_gencontrol b/dh_gencontrol index e2a4e701..f30b4104 100755 --- a/dh_gencontrol +++ b/dh_gencontrol @@ -15,5 +15,7 @@ for PACKAGE in $DH_DOPACKAGES; do # Generate and install control file. doit "dpkg-gencontrol -p$PACKAGE -Tdebian/${EXT}substvars -P$TMP $DH_U_PARAMS" + # This chmod is only necessary if the user sets the umask to something odd. + doit "chmod 644 $TMP/DEBIAN/control" doit "chown root.root $TMP/DEBIAN/control" done diff --git a/dh_installmanpages b/dh_installmanpages index 0c968a3f..fe611389 100755 --- a/dh_installmanpages +++ b/dh_installmanpages @@ -39,7 +39,6 @@ for PACKAGE in $DH_DOPACKAGES; do SECTION=man`expr $NAME : '.*\.\([123456789]\)'` # Test to see if the filename ends with 'x', # if so, this is an X man page. - echo $NAME if expr $NAME : '.*\.[123456789]x' >/dev/null; then EXTDIR="X11R6" else diff --git a/dh_makeshlibs b/dh_makeshlibs index d595c3b5..28695552 100755 --- a/dh_makeshlibs +++ b/dh_makeshlibs @@ -38,6 +38,7 @@ for PACKAGE in $DH_DOPACKAGES; do done if [ -e "$TMP/DEBIAN/shlibs" ]; then + doit "chmod 644 $TMP/DEBIAN/shlibs" doit "chown root.root $TMP/DEBIAN/shlibs" fi done diff --git a/dh_md5sums b/dh_md5sums index ae470926..8db01761 100755 --- a/dh_md5sums +++ b/dh_md5sums @@ -21,6 +21,7 @@ for PACKAGE in $DH_DOPACKAGES; do fi olddir=`pwd` complex_doit "cd $TMP ; sed 's:^/::' < DEBIAN/allfiles | xargs md5sum > DEBIAN/md5sums ; cd $olddir" + doit "chmod 644 $TMP/DEBIAN/md5sums" doit "chown root.root $TMP/DEBIAN/md5sums" doit "rm -f $TMP/DEBIAN/allfiles" done diff --git a/examples/rules b/examples/rules index 8e6683c1..7fbd9d99 100755 --- a/examples/rules +++ b/examples/rules @@ -54,7 +54,6 @@ binary-arch: build dh_shlibdeps dh_gencontrol # dh_makeshlibs - dh_du dh_md5sums dh_builddeb diff --git a/examples/rules.indep b/examples/rules.indep index 601c5e3e..2e74e852 100755 --- a/examples/rules.indep +++ b/examples/rules.indep @@ -48,7 +48,6 @@ binary-indep: build dh_suidregister dh_installdeb dh_gencontrol - dh_du dh_md5sums dh_builddeb diff --git a/examples/rules.multi b/examples/rules.multi index a5be1efe..1cfeb425 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -51,7 +51,6 @@ binary-indep: build dh_suidregister -i dh_installdeb -i dh_gencontrol -i - dh_du -i dh_md5sums -i dh_builddeb -i @@ -83,7 +82,6 @@ binary-arch: build dh_shlibdeps -a dh_gencontrol -a # dh_makeshlibs -a - dh_du -a dh_md5sums -a dh_builddeb -a -- cgit v1.2.3 From 8a27e8edfd06c742fe3ff2aceda1588daf175527 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:49:12 +0000 Subject: r75: Initial Import --- PROGRAMMING | 2 +- README | 9 ++++++++- TODO | 14 +++++++------- debian/changelog | 7 +++++++ examples/rules.indep | 2 +- examples/rules.multi | 2 +- 6 files changed, 25 insertions(+), 11 deletions(-) (limited to 'examples') diff --git a/PROGRAMMING b/PROGRAMMING index c290c34d..22e015af 100644 --- a/PROGRAMMING +++ b/PROGRAMMING @@ -37,7 +37,7 @@ merge these modifications into the actual postinst scripts. There are always exceptions. Just ask me. Introducing dh_lib: -------------------- +------------------ All debhelper programs use the dh_lib library (actually it's a shell script) to parse their arguments and set some useful variables. It's not mandatory diff --git a/README b/README index ae0e53a1..f821e8c0 100644 --- a/README +++ b/README @@ -7,6 +7,13 @@ that use debhelper commands extensively. See /usr/doc/debhelper/examples/ . These files are also useful as they give one good order you can run the various debhelper scripts in (though other variations are possible). +Starting a new package: +---------------------- + +You can just use the example rules files and do the rest of the new package +set up by hand, or you could try the new dh-make package, which contains a +"dh_make" command that is similar to debmake, and tries to automate the +process. Converting from debstd to debhelper: ----------------------------------- @@ -59,7 +66,7 @@ commands. So if you have postinst, postrm, etc scripts, add a line reading Once you think it's all set up properly, do a test build of your package. If it works ok, I recommend that you compare the new package and the old -debstd-generated package very closely. Pay special attention to the postint, +debstd-generated package very closely. Pay special attention to the postinst, postrm, etc scripts. diff --git a/TODO b/TODO index a6646b11..064dcbf0 100644 --- a/TODO +++ b/TODO @@ -3,28 +3,28 @@ debmake (wishlist bug #17043). I just never saw the point of that file.. - Make dh_movefiles remove emptied directories after it's moved all the files out of them (wishlist bug #17111). -* dh_fixperms: allow listing of files not to be touched (diffucult). +* dh_fixperms: allow listing of files not to be touched (difficult). * add a dh_debstd, which mimics debstd, but uses debhelper tools internally. - Note thatthe idea here is not just another debstd. This program will have + Note that the idea here is not just another debstd. This program will have a -v switch, that lists all the other debhelper commands it needs to run to do what debstd had to do. The intent is to make it easy to switch from debstd to debhelper. * dh_compress: add --exclude "*.conf" type-thingy, since that's the change - you most often want to make to what it does, and a debian/conpress file is + you most often want to make to what it does, and a debian/compress file is overkill in those cases. -* info support for debhelper (currently implmented, but I hate how I did it, +* info support for debhelper (currently implemented, but I hate how I did it, so it's not in the package.) (wishlist bug #15717) * enhance dh_installmanpages so it associates binaries and man pages and installs the man pages into the correct areas to suit the binaries they document. I may need to make this only happen when a switch is given, to - preserve backward compatability. + preserve backward compatibility. * maybe make dh_installmanpages look at the .TH line of man pages whose filenames end in .man, to figure out what section they go it. This would - require a switch to turn on, for backwards compatability. + require a switch to turn on, for backwards compatibility. * All debhelper programs should be checked that they output files with the correct permissions no matter what the umask is set to. Currently, only those programs that run after dh_fixperms have been so checked. (Checking the rest is low priority, since dh_fixperms fixes any incorrect permissions they might have; still it would be nice to check them too, just to make debhelper more flexible.) One easy fix is to add umask 022 to dh_lib, - however, there may be unforseen ramifications of such a change. + however, there may be unforeseen ramifications of such a change. diff --git a/debian/changelog b/debian/changelog index 567dbb9f..1ee38252 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debhelper (0.77) frozen unstable; urgency=low + + * Fixed a nasty bug in dh_makeshlibs when it was called with -V, but with + no version string after the -V. + + -- Joey Hess Sun, 29 Mar 1998 16:08:27 -0800 + debhelper (0.76) frozen unstable; urgency=low * I intended version 0.75 to make it in before the freeze, and it did not. diff --git a/examples/rules.indep b/examples/rules.indep index 2e74e852..7ba839ad 100755 --- a/examples/rules.indep +++ b/examples/rules.indep @@ -1,6 +1,6 @@ #!/usr/bin/make -f # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. -# This version is for packages that are architecure independant. +# This version is for packages that are architecture independent. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 diff --git a/examples/rules.multi b/examples/rules.multi index 1cfeb425..33a1a4ac 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -1,7 +1,7 @@ #!/usr/bin/make -f # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. # This version is for a hypothetical package that builds an -# architecture-dependant package, as well as an architecture-independant +# architecture-dependant package, as well as an architecture-independent # package. # Uncomment this to turn on verbose mode. -- cgit v1.2.3 From 2508377c60059fc5012d1c2304dafa12afaa0b8f Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:50:15 +0000 Subject: r80: Initial Import --- debian/changelog | 8 ++++++++ examples/rules | 22 +++++++++++++++------- examples/rules.indep | 22 +++++++++++++++------- examples/rules.multi | 26 +++++++++++++++----------- 4 files changed, 53 insertions(+), 25 deletions(-) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index ce1e3814..24830908 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +debhelper (0.83) unstable; urgency=low + + * Generate symlinks in build stage of debian/rules. cvs cannot create them + properly. Note that version 0.80 and 0.81 could not build some packages + because of missing symlinks. + + -- Joey Hess Tue, 31 Mar 1998 19:27:29 -0800 + debhelper (0.81) unstable; urgency=low * dh_movefiles: empty $tomove (#20495). diff --git a/examples/rules b/examples/rules index 7fbd9d99..631e5cb7 100755 --- a/examples/rules +++ b/examples/rules @@ -16,28 +16,36 @@ build-stamp: clean: dh_testdir dh_testroot - rm -f build-stamp + rm -f build-stamp install-stamp # Add here commands to clean up after the build process. + #-$(MAKE) clean #-$(MAKE) distclean dh_clean +install: install-stamp +install-stamp: build + dh_testdir + dh_testroot + dh_clean + + # Add here commands to install the package into debian/tmp. + #$(MAKE) prefix=`pwd`/debian/tmp/usr install + + touch install-stamp + # Build architecture-independent files here. -binary-indep: build +binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. -binary-arch: build +binary-arch: build install # dh_testversion dh_testdir dh_testroot dh_clean -k dh_installdirs - - # Add here commands to install the files into debian/tmp - #$(MAKE) prefix=`pwd`/debian/tmp install - dh_installdocs dh_installexamples dh_installmenu diff --git a/examples/rules.indep b/examples/rules.indep index 7ba839ad..08ce4b62 100755 --- a/examples/rules.indep +++ b/examples/rules.indep @@ -17,24 +17,32 @@ build-stamp: clean: dh_testdir dh_testroot - rm -f build-stamp + rm -f build-stamp install-stamp # Add here commands to clean up after the build process. + #-$(MAKE) clean #-$(MAKE) distclean dh_clean +install: install-stamp +install-stamp: build + dh_testdir + dh_testroot + dh_clean + + # Add here commands to install the package into debian/tmp. + #$(MAKE) prefix=`pwd`/debian/tmp/usr install + + touch install-stamp + # Build architecture-independent files here. -binary-indep: build +binary-indep: build install # dh_testversion dh_testdir dh_testroot dh_clean -k dh_installdirs - - # Add here commands to install the files into debian/tmp - #$(MAKE) prefix=`pwd`/debian/tmp install - dh_installdocs dh_installexamples dh_installmenu @@ -52,7 +60,7 @@ binary-indep: build dh_builddeb # Build architecture-dependent files here. -binary-arch: build +binary-arch: build install # We have nothing to do by default. source diff: diff --git a/examples/rules.multi b/examples/rules.multi index 33a1a4ac..92e2e830 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -19,24 +19,32 @@ build-stamp: clean: dh_testdir dh_testroot - rm -f build-stamp + rm -f build-stamp install-stamp # Add here commands to clean up after the build process. + #-$(MAKE) clean #-$(MAKE) distclean dh_clean +install: install-stamp +install-stamp: build + dh_testdir + dh_testroot + dh_clean + + # Add here commands to install the package into debian/tmp. + #$(MAKE) prefix=`pwd`/debian/tmp/usr install + + touch install-stamp + # Build architecture-independent files here. -binary-indep: build +binary-indep: build install # dh_testversion dh_testdir -i dh_testroot -i dh_clean -i -k dh_installdirs -i - - # Add here commands to install the files into debian/tmp - #$(MAKE) prefix=`pwd`/debian/tmp install - dh_movefiles -i dh_installdocs -i dh_installexamples -i @@ -55,16 +63,12 @@ binary-indep: build dh_builddeb -i # Build architecture-dependent files here. -binary-arch: build +binary-arch: build install # dh_testversion dh_testdir -a dh_testroot -a dh_clean -a -k dh_installdirs -a - - # Add here commands to install the files into debian/tmp - #$(MAKE) prefix=`pwd`/debian/tmp install - dh_movefiles -a dh_installdocs -a dh_installexamples -a -- cgit v1.2.3 From 4a6b98a0f93fd348a316bb00d1c168be99db4a2e Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:50:51 +0000 Subject: r81: Initial Import --- debian/changelog | 7 +++++++ examples/rules | 5 ++--- examples/rules.multi | 7 ++----- 3 files changed, 11 insertions(+), 8 deletions(-) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index 24830908..0ddba87b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debhelper (0.84) unstable; urgency=low + + * Applied Che_Fox'x patches to example rules files, which makes them use + an install target internally to move things into place in debian/tmp. + + -- Joey Hess Thu, 9 Apr 1998 12:08:45 -0700 + debhelper (0.83) unstable; urgency=low * Generate symlinks in build stage of debian/rules. cvs cannot create them diff --git a/examples/rules b/examples/rules index 631e5cb7..7f339dc9 100755 --- a/examples/rules +++ b/examples/rules @@ -28,7 +28,8 @@ install: install-stamp install-stamp: build dh_testdir dh_testroot - dh_clean + dh_clean -k + dh_installdirs # Add here commands to install the package into debian/tmp. #$(MAKE) prefix=`pwd`/debian/tmp/usr install @@ -44,8 +45,6 @@ binary-arch: build install # dh_testversion dh_testdir dh_testroot - dh_clean -k - dh_installdirs dh_installdocs dh_installexamples dh_installmenu diff --git a/examples/rules.multi b/examples/rules.multi index 92e2e830..32eeddfe 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -31,7 +31,8 @@ install: install-stamp install-stamp: build dh_testdir dh_testroot - dh_clean + dh_clean -k + dh_installdirs # Add here commands to install the package into debian/tmp. #$(MAKE) prefix=`pwd`/debian/tmp/usr install @@ -43,8 +44,6 @@ binary-indep: build install # dh_testversion dh_testdir -i dh_testroot -i - dh_clean -i -k - dh_installdirs -i dh_movefiles -i dh_installdocs -i dh_installexamples -i @@ -67,8 +66,6 @@ binary-arch: build install # dh_testversion dh_testdir -a dh_testroot -a - dh_clean -a -k - dh_installdirs -a dh_movefiles -a dh_installdocs -a dh_installexamples -a -- cgit v1.2.3 From 97f0356f8695f1830d2b3073187971b2ee3e7b21 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:50:57 +0000 Subject: r82: Initial Import --- debian/changelog | 13 +++++++++++++ debian/control | 2 +- dh_compress | 4 ++-- examples/rules.indep | 5 ++--- 4 files changed, 18 insertions(+), 6 deletions(-) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index 0ddba87b..0103f06e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +debhelper (0.85) unstable; urgency=low + + * Moved a few things around that were broken by Che's patch: + - dh_installdirs should go in install target. + - dh_clean should not run in binary targets. + * This is just a quick fix to make it work, I'm not happy with it. I'm + going to discuss my problems with it with Che, and either make a new + version fixing them, or revert to 0.83. + * So be warned that the example rules files are not currently in good + shape if you're starting a new package. + + -- Joey Hess Sat, 18 Apr 1998 23:30:38 -0700 + debhelper (0.84) unstable; urgency=low * Applied Che_Fox'x patches to example rules files, which makes them use diff --git a/debian/control b/debian/control index d35fa0ae..4ec15b01 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: debhelper Section: devel Priority: optional Maintainer: Joey Hess -Standards-Version: 2.4.0.0 +Standards-Version: 2.4.1.0 Package: debhelper Architecture: all diff --git a/dh_compress b/dh_compress index 5af172c8..27f931f5 100755 --- a/dh_compress +++ b/dh_compress @@ -22,9 +22,9 @@ for PACKAGE in $DH_DOPACKAGES; do else # By default fall back on what the policy manual says to compress. files=` - find usr/info usr/man usr/X11*/man -type f 2>/dev/null ; + find usr/info usr/man usr/X11*/man -type f ! -name "*.gz" 2>/dev/null ; find usr/doc -type f \( -size +4k -or -name "changelog*" \) \ - ! -name "*.htm*" ! -name "*.gif" \ + ! -name "*.htm*" ! -name "*.gif" ! -name "*.gz" \ ! -name "copyright" 2>/dev/null ; true ` diff --git a/examples/rules.indep b/examples/rules.indep index 08ce4b62..d0cce466 100755 --- a/examples/rules.indep +++ b/examples/rules.indep @@ -29,7 +29,8 @@ install: install-stamp install-stamp: build dh_testdir dh_testroot - dh_clean + dh_clean -k + dh_installdirs # Add here commands to install the package into debian/tmp. #$(MAKE) prefix=`pwd`/debian/tmp/usr install @@ -41,8 +42,6 @@ binary-indep: build install # dh_testversion dh_testdir dh_testroot - dh_clean -k - dh_installdirs dh_installdocs dh_installexamples dh_installmenu -- cgit v1.2.3 From 94daae34cb1be6ed6a4591604af22c5d43542475 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:53:30 +0000 Subject: r94: Initial Import --- debian/changelog | 14 ++++++++++++++ dh_lib | 7 ++++++- doc/PROGRAMMING | 2 ++ doc/from-debstd | 8 ++++---- examples/rules | 2 +- examples/rules.indep | 2 +- examples/rules.multi | 2 +- 7 files changed, 29 insertions(+), 8 deletions(-) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index 873cfa6e..180a6423 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +debhelper (0.97) unstable; urgency=low + + * doc/from-debstd: fixed a typo. + * examples/*: install-stamp no longer depends on phony build targey; now + install-stamp depends on build-stamp instead (#24234). + * dh_fixperms: applied patch from Herbert Xu + to fix bad uses of the find command, so it should now work on packages + with files with spaces in them (#22005). It's also much cleaner. Thanks, + Herbert! + * dh_getopt.pl, doc/PROGRAMMING: added DH_EXCLUDE_FIND, to make the above + fix work. + + -- Joey Hess Sun, 5 Jul 1998 18:09:25 -0700 + debhelper (0.96) unstable; urgency=low * dh_movefiles: fixed serious breakage introduced in the last version. diff --git a/dh_lib b/dh_lib index 9e826499..7ebc8be1 100644 --- a/dh_lib +++ b/dh_lib @@ -82,13 +82,18 @@ pkgext() { # Caches return code so it only needs to run dpkg-parsechangelog once. isnative() { if [ -z "$DH_ISNATIVE" ]; then + # Make sure we look at the correct changelog. + isnative_changelog=`pkgfile $PACKAGE changelog` + if [ ! "$isnative_changelog" ]; then + isnative_changelog=debian/changelog + fi # Get the package version. # Note that the 2>/dev/null is because a bug in dpkg-parsechangelog makes it # output a bogus error message to stderr. # If it actually has a real error, then the expr will fail, and this whole # script will come crashing to a halt, which is good enough to inform # the user something's wrong. :-) - VERSION=`expr "\`dpkg-parsechangelog 2>/dev/null\`" : \ + VERSION=`expr "\`dpkg-parsechangelog -l$isnative_changelog 2>/dev/null\`" : \ '.*Version: \(.*\).*Distribution:'` # Is this a native Debian package? if expr "$VERSION" : '.*-' >/dev/null; then diff --git a/doc/PROGRAMMING b/doc/PROGRAMMING index 7dc0c638..faaa9360 100644 --- a/doc/PROGRAMMING +++ b/doc/PROGRAMMING @@ -81,6 +81,8 @@ switch variable description DH_EXCLUDE_GREP same as DH_EXCLUDE, except all items are separated by '|' characters, instead of spaces, handy for egrep -v + DH_EXCLUDE_FIND same as DH_EXCLUDE, except all items are + separated by " -or " -x DH_INCLUDE_CONFFILES include conffiles. It's -x for obscure historical reasons. diff --git a/doc/from-debstd b/doc/from-debstd index 31fd0cdd..50bf4ffb 100644 --- a/doc/from-debstd +++ b/doc/from-debstd @@ -20,10 +20,10 @@ your package you are converting, run: dh_debstd CHANGES TODO README --verbose --no-act -Notice the parallel to the debstd command above, I just added "--verbose --act" -to the end. This will make dh_debstd output a list of commands that it thinks -will emulate what debstd would have done, without actually doing anything to -your package. The list will look similar to this: +Notice the parallel to the debstd command above, I just added +"--verbose --noact" to the end. This will make dh_debstd output a list of +commands that it thinks will emulate what debstd would have done, without +actually doing anything to your package. The list will look similar to this: dh_installdirs dh_installdocs TODO README diff --git a/examples/rules b/examples/rules index 7f339dc9..e3e6c3b5 100755 --- a/examples/rules +++ b/examples/rules @@ -25,7 +25,7 @@ clean: dh_clean install: install-stamp -install-stamp: build +install-stamp: build-stamp dh_testdir dh_testroot dh_clean -k diff --git a/examples/rules.indep b/examples/rules.indep index d0cce466..bb2e00ba 100755 --- a/examples/rules.indep +++ b/examples/rules.indep @@ -26,7 +26,7 @@ clean: dh_clean install: install-stamp -install-stamp: build +install-stamp: build-stamp dh_testdir dh_testroot dh_clean -k diff --git a/examples/rules.multi b/examples/rules.multi index 32eeddfe..42e4052a 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -28,7 +28,7 @@ clean: dh_clean install: install-stamp -install-stamp: build +install-stamp: build-stamp dh_testdir dh_testroot dh_clean -k -- cgit v1.2.3 From 3d85a497a3d346e2e6072e31c3a12147e1521134 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:56:41 +0000 Subject: r106: Initial Import --- debian/changelog | 11 +++++++++++ dh_clean.1 | 2 +- dh_strip | 26 +++++++++++++++++++------- dh_strip.1 | 7 ++++++- doc/TODO | 20 +++++++++++++++++++- examples/rules | 1 + examples/rules.indep | 1 + examples/rules.multi | 2 ++ 8 files changed, 60 insertions(+), 10 deletions(-) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index 38ae7771..63e04237 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +debhelper (1.1.1) unstable; urgency=low + + * dh_movefiles: try to move all files specified, and only then bomb out if + some of the file could not be found. Makes it easier for some packages + that don't always have the same files in them. + * dh_compress: any parameters passed to it on the command line specify + additional files to be compressed in the first package acted on. + * dh_compress: recognize standard -A parameter. + + -- Joey Hess Sat, 8 Aug 1998 22:48:01 -0700 + debhelper (1.1.0) unstable; urgency=low * New unstable branch of debhelper. diff --git a/dh_clean.1 b/dh_clean.1 index 333fa174..3c1d2795 100644 --- a/dh_clean.1 +++ b/dh_clean.1 @@ -8,7 +8,7 @@ dh_clean \- clean up package build directories dh_clean is a debhelper program that is responsible for cleaning up after a package is built. It removes the package build directories, and removes some other files, such as debian/substvars, debian/files, DEADJOE, emacs backup -files, etc. +files, any detritus left behind by other debhelper commands, etc. .SH OPTIONS .TP .B debhelper options diff --git a/dh_strip b/dh_strip index daea754c..385efeff 100755 --- a/dh_strip +++ b/dh_strip @@ -5,26 +5,38 @@ PATH=debian:$PATH:/usr/lib/debhelper . dh_lib +# This reads in a list of files, and excludes any that match what's in +# DH_EXCLUDE_GREP. +filelist_excluded () { + if [ "$DH_EXCLUDE_GREP" ]; then + # Use grep -F so we don't have to worry about regexp's. + grep -v -F "`(cd $TMP; echo "$DH_EXCLUDE_GREP" | tr "|" "\n")`" + else + # Just pass all files through. + cat + fi +} + for PACKAGE in $DH_DOPACKAGES; do TMP=`tmpdir $PACKAGE` - + # Handle executables and shared libraries. - for file in `find $TMP -type f \( -perm +111 -or -name "*.so*" \) 2>/dev/null` ; do - case "`file $file`" in + for file in `(cd $TMP; find -type f \( -perm +111 -or -name "*.so*" \) 2>/dev/null) | filelist_excluded` ; do + case "`file $TMP/$file`" in *ELF*shared*) - doit "strip --strip-unneeded $file" + doit "strip --strip-unneeded $TMP/$file" ;; *ELF*executable*) - doit "strip --remove-section=.comment --remove-section=.note $file" + doit "strip --remove-section=.comment --remove-section=.note $TMP/$file" ;; esac done # Handle static libraries. - for file in `find $TMP -type f -name "lib*.a" 2>/dev/null` ; do + for file in `(cd $TMP; find -type f -name "lib*.a" 2>/dev/null) | filelist_excluded` ; do # Don't strip debug libraries. if ! expr "$file" : ".*_g\.a" >/dev/null ; then - doit "strip --strip-debug $file" + doit "strip --strip-debug $TMP/$file" fi done done diff --git a/dh_strip.1 b/dh_strip.1 index 960dc72e..6ddcde13 100644 --- a/dh_strip.1 +++ b/dh_strip.1 @@ -3,7 +3,7 @@ dh_strip \- strip executables, shared libraries, and some static libraries. .SH SYNOPSIS .B dh_strip -.I "[debhelper options]" +.I "[debhelper options] [-Xitem]" .SH "DESCRIPTION" dh_strip is a debhelper program that is responsible for stripping executables, shared libraries, and static libraries that are not used for @@ -17,6 +17,11 @@ used in debugging, and will not strip them. See .BR debhelper (1) for a list of options common to all debhelper commands. +.TP +.B \-Xitem, \--exclude=item +Exclude files that contain "item" anywhere in their filename from being +stripped. You may use this option multiple times to build up a list of +things to exclude. .SH ENVIRONMENT See .BR debhelper (1) diff --git a/doc/TODO b/doc/TODO index 0a2a5bde..83f38659 100644 --- a/doc/TODO +++ b/doc/TODO @@ -11,7 +11,6 @@ Bugs: Wishlist items: -* Add emacsen support to debhelper. (#21401) * Make dh_movefiles remove emptied directories after it's moved all the files out of them (#17111). * info support for debhelper (currently implemented, but I hate how I did it, @@ -59,3 +58,22 @@ Depricated: * remove dh_installdebfiles, dh_du. - need to wait a reasonable length of time. I'm currently planning on doing this after slink is released. + +Long term goals: + +Convert selected and then selected debhelper commands (dh_installmanpages?) +to be perl programs, for speed, ease of maintainence, and 8-bit cleanness. +Tricky, because of the -v option -- they'd have to call external commands +like install and cp, and log such calls if verbose was on. Maybe something +like: + +doit { + system @_; + if ($DH_VERBOSE) { + print join " ", @_; + } +} + +However, this will output commands that are incorrect if the filenames in +them contain spaces or other weird characters. Hmm, maybe such things should +just be escaped with \'s in the output? diff --git a/examples/rules b/examples/rules index e3e6c3b5..8756505e 100755 --- a/examples/rules +++ b/examples/rules @@ -48,6 +48,7 @@ binary-arch: build install dh_installdocs dh_installexamples dh_installmenu +# dh_installemacsen # dh_installinit dh_installcron dh_installmanpages diff --git a/examples/rules.indep b/examples/rules.indep index bb2e00ba..eabd4840 100755 --- a/examples/rules.indep +++ b/examples/rules.indep @@ -45,6 +45,7 @@ binary-indep: build install dh_installdocs dh_installexamples dh_installmenu +# dh_installemacsen # dh_installinit dh_installcron # dh_installmanpages diff --git a/examples/rules.multi b/examples/rules.multi index 42e4052a..5852751e 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -48,6 +48,7 @@ binary-indep: build install dh_installdocs -i dh_installexamples -i dh_installmenu -i +# dh_installemacsen -i # dh_installinit -i dh_installcron -i # dh_installmanpages -i @@ -70,6 +71,7 @@ binary-arch: build install dh_installdocs -a dh_installexamples -a dh_installmenu -a +# dh_installemacsen -a # dh_installinit -a dh_installcron -a dh_installmanpages -a -- cgit v1.2.3 From 2de581368c8b8d4edd57210dc54eade8c15f0354 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:58:22 +0000 Subject: r112: Initial Import --- Dh_Lib.pm | 3 ++- debian/changelog | 7 +++++++ doc/README | 10 ++++++++++ examples/rules.multi | 3 +-- 4 files changed, 20 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/Dh_Lib.pm b/Dh_Lib.pm index 49e337a9..b4d0db53 100644 --- a/Dh_Lib.pm +++ b/Dh_Lib.pm @@ -74,7 +74,8 @@ sub init { # Escapes out shell metacharacters in a word of shell script. sub escape_shell { my $word=shift; - $word=~s/([\s><&!\[\]\{\}\(\)\$])/\\$1/g; + # This list is from )Unix in a Nutshell_. (except '#') + $word=~s/([-\s!"$()*+#;<>?@\[\]\\`|~])/\\$1/g; return $word; } diff --git a/debian/changelog b/debian/changelog index 05caf2c9..b96ab89d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debhelper (1.1.6) unstable; urgency=low + + * dh_movefiles: don't die on symlinks (#25642). (Hope I got the fix right + this time..) + + -- Joey Hess Tue, 11 Aug 1998 20:11:13 -0700 + debhelper (1.1.5) unstable; urgency=low * dh_builddeb, dh_installchangelogs: converted to perl. diff --git a/doc/README b/doc/README index 845f94ef..76b2263e 100644 --- a/doc/README +++ b/doc/README @@ -41,4 +41,14 @@ print << `EOF` #DEBHELPER# EOF +Other notes: +----------- + +Note that if you are generating a debian package that has arch-indep and +arch-dependant portions, and you are using dh_movefiles to move the +arch-indep files out of debian/tmp, you need to make sure that dh_movefiles +does this even if only the arch-dependant package is being built (for ports +to other architectures). I handle this in debian/rules.multi by calling +dh_movefiles in the install target. + -- Joey Hess diff --git a/examples/rules.multi b/examples/rules.multi index 5852751e..04732edb 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -37,6 +37,7 @@ install-stamp: build-stamp # Add here commands to install the package into debian/tmp. #$(MAKE) prefix=`pwd`/debian/tmp/usr install + dh_movefiles touch install-stamp # Build architecture-independent files here. @@ -44,7 +45,6 @@ binary-indep: build install # dh_testversion dh_testdir -i dh_testroot -i - dh_movefiles -i dh_installdocs -i dh_installexamples -i dh_installmenu -i @@ -67,7 +67,6 @@ binary-arch: build install # dh_testversion dh_testdir -a dh_testroot -a - dh_movefiles -a dh_installdocs -a dh_installexamples -a dh_installmenu -a -- cgit v1.2.3 From 1225012d118cdc75892d02a41eb3ffcede466473 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:02:01 +0000 Subject: r127: Initial Import --- Dh_Getopt.pm | 9 ++++++++- Dh_Lib.pm | 24 +++++++++++++++++------- autoscripts/postinst-init-norestart | 5 +++++ debhelper.1 | 15 +++++++++++++-- debian/changelog | 10 ++++++++++ debian/rules | 2 +- dh_lib | 2 +- examples/rules.indep | 2 +- 8 files changed, 56 insertions(+), 13 deletions(-) (limited to 'examples') diff --git a/Dh_Getopt.pm b/Dh_Getopt.pm index e9240893..1592d5d0 100644 --- a/Dh_Getopt.pm +++ b/Dh_Getopt.pm @@ -31,6 +31,10 @@ sub AddPackage { my($option,$value)=@_; elsif ($option eq 'p' or $option eq 'package') { push @{$options{DOPACKAGES}}, $value; } + elsif ($option eq 's' or $option eq 'same-arch') { + push @{$options{DOPACKAGES}}, GetPackages('same'); + $options{DOSAME}=1; + } else { error("bad option $option - should never happen!\n"); } @@ -63,6 +67,9 @@ sub parseopts { "p=s" => \&AddPackage, "package=s" => \&AddPackage, + "s" => \&AddPackage, + "same-arch" => \&AddPackage, + "N=s" => \&ExcludePackage, "no-package=s" => \&ExcludePackage, @@ -120,7 +127,7 @@ sub parseopts { # want us to act on them all. Note we have to do this before excluding # packages out, below. if (! defined $options{DOPACKAGES} || ! @{$options{DOPACKAGES}}) { - if ($options{DOINDEP} || $options{DOARCH}) { + if ($options{DOINDEP} || $options{DOARCH} || $options{DOSAME}) { # User specified that all arch (in)dep package be # built, and there are none of that type. error("I have no package to build"); diff --git a/Dh_Lib.pm b/Dh_Lib.pm index be8a3e04..2b80ce45 100644 --- a/Dh_Lib.pm +++ b/Dh_Lib.pm @@ -21,8 +21,8 @@ sub init { } # Check to see if an argument on the command line starts with a dash. - # if so, we need to pass this off to the resource intensive Getopt::Long, - # which I'd prefer to avoid loading at all if possible. + # if so, we need to pass this off to the resource intensive + # Getopt::Long, which I'd prefer to avoid loading at all if possible. my $parseopt=undef; my $arg; foreach $arg (@ARGV) { @@ -54,10 +54,10 @@ sub init { my @allpackages=GetPackages(); $dh{MAINPACKAGE}=$allpackages[0]; - # Check if packages to build have been specified, if not, fall back to + # Check if packages to build have been specified, if not, fall back to # the default, doing them all. if (! defined $dh{DOPACKAGES} || ! @{$dh{DOPACKAGES}}) { - if ($dh{DOINDEP} || $dh{DOARCH}) { + if ($dh{DOINDEP} || $dh{DOARCH} || $dh{DOSAME}) { # User specified that all arch (in)dep package be # built, and there are none of that type. error("I have no package to build"); @@ -270,14 +270,23 @@ sub filearray { my $file=shift; } # Returns a list of packages in the control file. -# Must pass "arch" or "indep" to specify arch-dependant or -independant -# packages. If nothing is specified, returns all packages. +# Must pass "arch" or "indep" or "same" to specify arch-dependant or +# -independant or same arch packages. If nothing is specified, returns all +# packages. sub GetPackages { my $type=shift; $type="" if ! defined $type; + + # Look up the build arch if we need to. + my$buildarch=''; + if ($type eq 'same') { + $buildarch=`dpkg --print-architecture` || error($!); + chomp $buildarch; + } + my $package=""; my $arch=""; my @list=(); - open (CONTROL,") { chomp; @@ -292,6 +301,7 @@ sub GetPackages { my $type=shift; if ($package && (($type eq 'indep' && $arch eq 'all') || ($type eq 'arch' && $arch ne 'all') || + ($type eq 'same' && ($arch eq 'any' || $arch =~ /\b$buildarch\b/)) || ! $type)) { push @list, $package; $package=""; diff --git a/autoscripts/postinst-init-norestart b/autoscripts/postinst-init-norestart index 05357d07..b33702c5 100644 --- a/autoscripts/postinst-init-norestart +++ b/autoscripts/postinst-init-norestart @@ -1 +1,6 @@ update-rc.d #SCRIPT# #INITPARMS# >/dev/null +if [ "$1" = "configure" ]; then + if [ -z "$2" -o "$2" = "" ]; then + /etc/init.d/#SCRIPT# start + fi +fi diff --git a/debhelper.1 b/debhelper.1 index 9051d438..62906dc5 100644 --- a/debhelper.1 +++ b/debhelper.1 @@ -3,7 +3,7 @@ debhelper \- overview of the debhelper commands .SH SYNOPSIS .B dh_* -.I "[-v] [-a] [-i] [--no-act] [-ppackage] [-Npackage] [-Ptmpdir]" +.I "[-v] [-a] [-i] [-s] [--no-act] [-ppackage] [-Npackage] [-Ptmpdir]" .SH "DESCRIPTION" Debhelper is a collection of programs that can be used in debian/rules files to automate common tasks related to building debian binary packages. All the @@ -29,6 +29,15 @@ Act on all architecture independent packages. .B \-ppackage, \--package=package Act on the package named "package". .TP +.B \-s, \--same-arch +This is a smarter version of the -a flag, that is used in some rare +circumstances. It understands that if the control file lists "Architecture: i386" +for the package, the package should not be acted on on other architectures. So +this flag makes the command act on all "Architecture: any" packages, as well +as on any packages that have the current architecture explicitly specified. +Constrast to the -a flag, which makes the command work on all packages that +are not architecture independant. +.TP .B \-Npackage, \--no-package=package Do not act on the specified package even if an -a, -i, or -p option lists the package as one that should be acted on. @@ -52,8 +61,10 @@ are acted on by debhelper programs, all debhelper programs accept the .B -a , .B -i -, and +, .B -p +, and +.B -s parameters. These parameters are cumulative. If none are given, debhelper programs default to acting on all packages listed in the control file. diff --git a/debian/changelog b/debian/changelog index 283a88e3..3c867107 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +debhelper (1.1.20) unstable; urgency=low + + * Added a --same-arch flag, that is useful in the rare case when you have + a package that builds only for 1 architecture, as part of a multi-part, + multi-architecture source package. (Ie, netscape-dmotif). + * Modified dh_installinit -r so it does start the daemon on the initial + install (#26680). + + -- Joey Hess Fri, 2 Oct 1998 15:55:13 -0700 + debhelper (1.1.19) unstable; urgency=low * dh_installmanpages: look at basename of man pacges specified on command diff --git a/debian/rules b/debian/rules index 20ba1a70..bb790cd3 100755 --- a/debian/rules +++ b/debian/rules @@ -54,7 +54,7 @@ binary-indep: build # Install in the proper location on my ftp server and web server. Not intended # for use by anyone except the author. OLD_VER=$(shell perl -e '<>;<>;while(<>){last if /^ --/};<>;$$_=<>;print m/\((.*?)\)/'&2 'source and diff are obsolete - use dpkg-source -b'; false binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary +.PHONY: build clean binary-indep binary-arch binary install -- cgit v1.2.3 From 2b197c28c63bdd7a316fdc3938be2e411c69fa33 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:02:08 +0000 Subject: r129: Initial Import --- Test.pm | 254 ++++++++++++++++++++++++++++++++++++++++++ autoscripts/postinst-doc-base | 3 + autoscripts/postinst-wm | 3 + autoscripts/postinst-xaw | 3 + autoscripts/postrm-wm | 3 + autoscripts/prerm-doc-base | 3 + debian/changelog | 6 + debian/emacsen-install | 0 debian/emacsen-remove | 0 debian/init.d | 0 debian/links | 4 + dh_installmime.1 | 38 +++++++ dh_installmodules.1 | 35 ++++++ dh_installpam.1 | 30 +++++ dh_installwm | 21 ++++ dh_installwm.1 | 42 +++++++ dh_installxaw | 30 +++++ dh_installxaw.1 | 40 +++++++ dh_link | 70 ++++++++++++ dh_link.1 | 75 +++++++++++++ dh_listpackages | 8 ++ dh_listpackages.1 | 25 +++++ dh_perl.1 | 44 ++++++++ examples/rules | 2 +- examples/rules.multi | 2 +- me | 0 pgptemp.$00 | 0 27 files changed, 739 insertions(+), 2 deletions(-) create mode 100644 Test.pm create mode 100644 autoscripts/postinst-doc-base create mode 100644 autoscripts/postinst-wm create mode 100644 autoscripts/postinst-xaw create mode 100644 autoscripts/postrm-wm create mode 100644 autoscripts/prerm-doc-base create mode 100644 debian/emacsen-install create mode 100644 debian/emacsen-remove create mode 100644 debian/init.d create mode 100644 debian/links create mode 100644 dh_installmime.1 create mode 100644 dh_installmodules.1 create mode 100644 dh_installpam.1 create mode 100755 dh_installwm create mode 100644 dh_installwm.1 create mode 100755 dh_installxaw create mode 100644 dh_installxaw.1 create mode 100755 dh_link create mode 100644 dh_link.1 create mode 100755 dh_listpackages create mode 100644 dh_listpackages.1 create mode 100644 dh_perl.1 create mode 100644 me create mode 100644 pgptemp.$00 (limited to 'examples') diff --git a/Test.pm b/Test.pm new file mode 100644 index 00000000..55f80ac2 --- /dev/null +++ b/Test.pm @@ -0,0 +1,254 @@ +use strict; +package Test; +use Test::Harness 1.1501 (); +use Carp; +use vars (qw($VERSION @ISA @EXPORT @EXPORT_OK $ntest $TestLevel), #public-ish + qw($TESTOUT $ONFAIL %todo %history $planned @FAILDETAIL)); #private-ish +$VERSION = '1.13'; +require Exporter; +@ISA=('Exporter'); +@EXPORT=qw(&plan &ok &skip); +@EXPORT_OK=qw($ntest $TESTOUT); + +$TestLevel = 0; # how many extra stack frames to skip +$|=1; +#$^W=1; ? +$ntest=1; +$TESTOUT = *STDOUT{IO}; + +# Use of this variable is strongly discouraged. It is set mainly to +# help test coverage analyzers know which test is running. +$ENV{REGRESSION_TEST} = $0; + +sub plan { + croak "Test::plan(%args): odd number of arguments" if @_ & 1; + croak "Test::plan(): should not be called more than once" if $planned; + my $max=0; + for (my $x=0; $x < @_; $x+=2) { + my ($k,$v) = @_[$x,$x+1]; + if ($k =~ /^test(s)?$/) { $max = $v; } + elsif ($k eq 'todo' or + $k eq 'failok') { for (@$v) { $todo{$_}=1; }; } + elsif ($k eq 'onfail') { + ref $v eq 'CODE' or croak "Test::plan(onfail => $v): must be CODE"; + $ONFAIL = $v; + } + else { carp "Test::plan(): skipping unrecognized directive '$k'" } + } + my @todo = sort { $a <=> $b } keys %todo; + if (@todo) { + print $TESTOUT "1..$max todo ".join(' ', @todo).";\n"; + } else { + print $TESTOUT "1..$max\n"; + } + ++$planned; +} + +sub to_value { + my ($v) = @_; + (ref $v or '') eq 'CODE' ? $v->() : $v; +} + +sub ok ($;$$) { + croak "ok: plan before you test!" if !$planned; + my ($pkg,$file,$line) = caller($TestLevel); + my $repetition = ++$history{"$file:$line"}; + my $context = ("$file at line $line". + ($repetition > 1 ? " fail \#$repetition" : '')); + my $ok=0; + my $result = to_value(shift); + my ($expected,$diag); + if (@_ == 0) { + $ok = $result; + } else { + $expected = to_value(shift); + my ($regex,$ignore); + if (!defined $expected) { + $ok = !defined $result; + } elsif (!defined $result) { + $ok = 0; + } elsif ((ref($expected)||'') eq 'Regexp') { + $ok = $result =~ /$expected/; + } elsif (($regex) = ($expected =~ m,^ / (.+) / $,sx) or + ($ignore, $regex) = ($expected =~ m,^ m([^\w\s]) (.+) \1 $,sx)) { + $ok = $result =~ /$regex/; + } else { + $ok = $result eq $expected; + } + } + my $todo = $todo{$ntest}; + if ($todo and $ok) { + $context .= ' TODO?!' if $todo; + print $TESTOUT "ok $ntest # ($context)\n"; + } else { + print $TESTOUT "not " if !$ok; + print $TESTOUT "ok $ntest\n"; + + if (!$ok) { + my $detail = { 'repetition' => $repetition, 'package' => $pkg, + 'result' => $result, 'todo' => $todo }; + $$detail{expected} = $expected if defined $expected; + $diag = $$detail{diagnostic} = to_value(shift) if @_; + $context .= ' *TODO*' if $todo; + if (!defined $expected) { + if (!$diag) { + print $TESTOUT "# Failed test $ntest in $context\n"; + } else { + print $TESTOUT "# Failed test $ntest in $context: $diag\n"; + } + } else { + my $prefix = "Test $ntest"; + print $TESTOUT "# $prefix got: ". + (defined $result? "'$result'":'')." ($context)\n"; + $prefix = ' ' x (length($prefix) - 5); + if ((ref($expected)||'') eq 'Regexp') { + $expected = 'qr/'.$expected.'/' + } else { + $expected = "'$expected'"; + } + if (!$diag) { + print $TESTOUT "# $prefix Expected: $expected\n"; + } else { + print $TESTOUT "# $prefix Expected: $expected ($diag)\n"; + } + } + push @FAILDETAIL, $detail; + } + } + ++ $ntest; + $ok; +} + +sub skip ($$;$$) { + my $whyskip = to_value(shift); + if ($whyskip) { + $whyskip = 'skip' if $whyskip =~ m/^\d+$/; + print $TESTOUT "ok $ntest # $whyskip\n"; + ++ $ntest; + 1; + } else { + local($TestLevel) = $TestLevel+1; #ignore this stack frame + &ok; + } +} + +END { + $ONFAIL->(\@FAILDETAIL) if @FAILDETAIL && $ONFAIL; +} + +1; +__END__ + +=head1 NAME + + Test - provides a simple framework for writing test scripts + +=head1 SYNOPSIS + + use strict; + use Test; + + # use a BEGIN block so we print our plan before MyModule is loaded + BEGIN { plan tests => 14, todo => [3,4] } + + # load your module... + use MyModule; + + ok(0); # failure + ok(1); # success + + ok(0); # ok, expected failure (see todo list, above) + ok(1); # surprise success! + + ok(0,1); # failure: '0' ne '1' + ok('broke','fixed'); # failure: 'broke' ne 'fixed' + ok('fixed','fixed'); # success: 'fixed' eq 'fixed' + ok('fixed',qr/x/); # success: 'fixed' =~ qr/x/ + + ok(sub { 1+1 }, 2); # success: '2' eq '2' + ok(sub { 1+1 }, 3); # failure: '2' ne '3' + ok(0, int(rand(2)); # (just kidding :-) + + my @list = (0,0); + ok @list, 3, "\@list=".join(',',@list); #extra diagnostics + ok 'segmentation fault', '/(?i)success/'; #regex match + + skip($feature_is_missing, ...); #do platform specific test + +=head1 DESCRIPTION + +L expects to see particular output when it executes +tests. This module aims to make writing proper test scripts just a +little bit easier (and less error prone :-). + +=head1 TEST TYPES + +=over 4 + +=item * NORMAL TESTS + +These tests are expected to succeed. If they don't something's +screwed up! + +=item * SKIPPED TESTS + +Skip is for tests that might or might not be possible to run depending +on the availability of platform specific features. The first argument +should evaluate to true (think "yes, please skip") if the required +feature is not available. After the first argument, skip works +exactly the same way as do normal tests. + +=item * TODO TESTS + +TODO tests are designed for maintaining an B. +These tests are expected NOT to succeed. If a TODO test does succeed, +the feature in question should not be on the TODO list, now should it? + +Packages should NOT be released with succeeding TODO tests. As soon +as a TODO test starts working, it should be promoted to a normal test +and the newly working feature should be documented in the release +notes or change log. + +=back + +=head1 RETURN VALUE + +Both C and C return true if their test succeeds and false +otherwise in a scalar context. + +=head1 ONFAIL + + BEGIN { plan test => 4, onfail => sub { warn "CALL 911!" } } + +While test failures should be enough, extra diagnostics can be +triggered at the end of a test run. C is passed an array ref +of hash refs that describe each test failure. Each hash will contain +at least the following fields: C, C, and +C. (The file, line, and test number are not included because +their correspondence to a particular test is tenuous.) If the test +had an expected value or a diagnostic string, these will also be +included. + +The B C hook might be used simply to print out the +version of your package and/or how to report problems. It might also +be used to generate extremely sophisticated diagnostics for a +particularly bizarre test failure. However it's not a panacea. Core +dumps or other unrecoverable errors prevent the C hook from +running. (It is run inside an C block.) Besides, C is +probably over-kill in most cases. (Your test code should be simpler +than the code it is testing, yes?) + +=head1 SEE ALSO + +L and, perhaps, test coverage analysis tools. + +=head1 AUTHOR + +Copyright (c) 1998-1999 Joshua Nathaniel Pritikin. All rights reserved. + +This package is free software and is provided "as is" without express +or implied warranty. It may be used, redistributed and/or modified +under the terms of the Perl Artistic License (see +http://www.perl.com/perl/misc/Artistic.html) + +=cut diff --git a/autoscripts/postinst-doc-base b/autoscripts/postinst-doc-base new file mode 100644 index 00000000..a53ed7bf --- /dev/null +++ b/autoscripts/postinst-doc-base @@ -0,0 +1,3 @@ +if command -v install-docs >/dev/null 2>&1; then + install-docs -i /usr/share/doc-base/#PACKAGE# +fi diff --git a/autoscripts/postinst-wm b/autoscripts/postinst-wm new file mode 100644 index 00000000..94c052fc --- /dev/null +++ b/autoscripts/postinst-wm @@ -0,0 +1,3 @@ +if [ -x /usr/sbin/register-window-manager ] ; then + register-window-manager --add #WM# +fi diff --git a/autoscripts/postinst-xaw b/autoscripts/postinst-xaw new file mode 100644 index 00000000..b8d718ea --- /dev/null +++ b/autoscripts/postinst-xaw @@ -0,0 +1,3 @@ +if test -x /usr/sbin/update-xaw-wrappers; then + /usr/sbin/update-xaw-wrappers +fi diff --git a/autoscripts/postrm-wm b/autoscripts/postrm-wm new file mode 100644 index 00000000..6dc9f5da --- /dev/null +++ b/autoscripts/postrm-wm @@ -0,0 +1,3 @@ +if [ "$1" == "purge" -a -x /usr/sbin/register-window-manager ] ; then + register-window-manager --remove #WM# +fi diff --git a/autoscripts/prerm-doc-base b/autoscripts/prerm-doc-base new file mode 100644 index 00000000..339361a5 --- /dev/null +++ b/autoscripts/prerm-doc-base @@ -0,0 +1,3 @@ +if command -v install-docs >/dev/null 2>&1; then + install-docs -r #PACKAGE# +fi diff --git a/debian/changelog b/debian/changelog index 3c867107..25279d3f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +debhelper (1.1.21) unstable; urgency=low + + * Added install to .PHONY target of example rules files. + + -- Joey Hess Sun, 11 Oct 1998 22:36:10 -0700 + debhelper (1.1.20) unstable; urgency=low * Added a --same-arch flag, that is useful in the rare case when you have diff --git a/debian/emacsen-install b/debian/emacsen-install new file mode 100644 index 00000000..e69de29b diff --git a/debian/emacsen-remove b/debian/emacsen-remove new file mode 100644 index 00000000..e69de29b diff --git a/debian/init.d b/debian/init.d new file mode 100644 index 00000000..e69de29b diff --git a/debian/links b/debian/links new file mode 100644 index 00000000..9a72e0fb --- /dev/null +++ b/debian/links @@ -0,0 +1,4 @@ +usr/bin/sysdb-wrapper usr/bin/chfn +usr/bin/sysdb-wrapper usr/bin/chsh +usr/bin/sysdb-wrapper usr/bin/passwd + diff --git a/dh_installmime.1 b/dh_installmime.1 new file mode 100644 index 00000000..4ace9985 --- /dev/null +++ b/dh_installmime.1 @@ -0,0 +1,38 @@ +.TH DH_INSTALLMIME 1 "" "Debhelper Commands" "Debhelper Commands" +.SH NAME +dh_installmime \- install mime files into package build directories +.SH SYNOPSIS +.B dh_installmime +.I "[debhelper options] [-n]" +.SH "DESCRIPTION" +dh_installmime is a debhelper program that is responsible for installing +mime files into package build directories. +.P +It also automatically generates the postinst and postrm commands needed to +interface with the debian mime-support package. See +.BR dh_installdeb (1) +for an explanation of how this works. +.P +If a file named debian/package.mime exists, then it is installed into +usr/lib/mime/packages/package in the package build directory. +.P +For the first first binary package listed in the control file, you may use +debian/mime instead. +.SH OPTIONS +.TP +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. +.TP +.B \-n, \--noscripts +Do not modify postinst/postrm scripts. +.SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" +.TP +.BR debhelper (1) +.SH AUTHOR +Joey Hess diff --git a/dh_installmodules.1 b/dh_installmodules.1 new file mode 100644 index 00000000..6d9016fe --- /dev/null +++ b/dh_installmodules.1 @@ -0,0 +1,35 @@ +.TH DH_INSTALLMODULES 1 "" "Debhelper Commands" "Debhelper Commands" +.SH NAME +dh_installmodules \- register modules with modutils +.SH SYNOPSIS +.B dh_installmodules +.I "[debhelper options] [-n]" +.SH "DESCRIPTION" +dh_installmodules is a debhelper program that is responsible for registering +kernel modules with modutils. +.P +A file named debian/package.modules (debian/modules my be used for the first +binary package in debian/control) will be installed as etc/modutils/package +in the package build directory. +.P +Then postinst and postrm commands are automatically generated to register +the modules when the package is installed. See +.BR dh_installdeb (1) +for an explanation of how this works. +.SH OPTIONS +.TP +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. +.TP +.B \-n, \--noscripts +Do not modify postinst/postrm scripts. +.SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" +.BR debhelper (1) +.SH AUTHOR +Joey Hess diff --git a/dh_installpam.1 b/dh_installpam.1 new file mode 100644 index 00000000..bb34a45c --- /dev/null +++ b/dh_installpam.1 @@ -0,0 +1,30 @@ +.TH DH_INSTALLPAM 1 "" "Debhelper Commands" "Debhelper Commands" +.SH NAME +dh_installpam \- install pam support files +.SH SYNOPSIS +.B dh_installpam +.I "[debhelper options] [-n]" +.SH "DESCRIPTION" +dh_installpam is a debhelper program that is responsible for installing +files used by PAM into package build directories. +.P +If a file named debian/package.pam exists, then it is installed into +etc/pam.d/package in the package build directory. +.P +For the first first binary package listed in the control file, you may use +debian/pam instead. +.SH OPTIONS +.TP +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. +.SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" +.TP +.BR debhelper (1) +.SH AUTHOR +Joey Hess diff --git a/dh_installwm b/dh_installwm new file mode 100755 index 00000000..be3a1373 --- /dev/null +++ b/dh_installwm @@ -0,0 +1,21 @@ +#!/bin/sh -e +# +# Add to postinst and postrm to register a window manager. + +PATH=debian:$PATH:/usr/lib/debhelper +. dh_lib + +wm=$1 + +if [ -z "$wm" ]; then + error "No window manager was specified." +fi + +for PACKAGE in $DH_DOPACKAGES; do + TMP=`tmpdir $PACKAGE` + + if [ ! "$DH_NOSCRIPTS" ]; then + autoscript "postinst" "postinst-wm" "s/#WM#/$wm/" + autoscript "postrm" "postrm-wm" "s/#WM#/$wm/" + fi +done diff --git a/dh_installwm.1 b/dh_installwm.1 new file mode 100644 index 00000000..bc6ea446 --- /dev/null +++ b/dh_installwm.1 @@ -0,0 +1,42 @@ +.TH DH_INSTALLWM 1 "" "Debhelper Commands" "Debhelper Commands" +.SH NAME +dh_installwm \- register a window manager +.SH SYNOPSIS +.B dh_installmenu +.I "[debhelper options] [-n] wmfilename" +.SH "DESCRIPTION" +dh_installwm is a debhelper program that is responsible for +generating the postinst and postrm commands needed to +interface with the the +.BR register-window-manager (1) +command. This results in a window manager being registered when it is +installed. +.SH OPTIONS +.TP +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. +.TP +.B \-n, \--noscripts +Do not modify postinst/postrm scripts. Turns this command into a no-op. +.TP +.B wmfilename +The filename of the window manager you wish to register. May be either a +simple filename if the window manager is in /usr/X11R6/bin/, or a complete +path otherwise. +.SH NOTES +Note that this command will set up postinst and postrm scripts for every +package it acts on. It's wise to limit its action to a single package with, +for example, the -p switch. +.SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" +.TP +.BR debhelper (1) +.TP +.BR register-window-manager (1) +.SH AUTHOR +Joey Hess diff --git a/dh_installxaw b/dh_installxaw new file mode 100755 index 00000000..31867f15 --- /dev/null +++ b/dh_installxaw @@ -0,0 +1,30 @@ +#!/usr/bin/perl -w +# +# Integration with xaw-wrappers +# +# If debian/xaw-wrappers file exists, save it to +# $TMP/usr/lib/xaw-wrappers/conf/$PACKAGE +# +# Also, add calls to postinst and postrm. + +BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +use Dh_Lib; +init(); + +foreach $PACKAGE (@{$dh{DOPACKAGES}}) { + $TMP=tmpdir($PACKAGE); + $xaw=pkgfile($PACKAGE,'xaw'); + + if ($xaw ne '') { + if (! -d "$TMP/usr/lib/xaw-wrappers/conf") { + doit("install","-d","$TMP/usr/lib/xaw-wrappers/conf"); + } + doit("install","-p","-m644",$xaw, + "$TMP/usr/lib/xaw-wrappers/conf/$PACKAGE"); + + if (! $dh{NOSCRIPTS}) { + autoscript($PACKAGE,"postinst","postinst-xaw"); + autoscript($PACKAGE,"postrm","postrm-xaw"); + } + } +} diff --git a/dh_installxaw.1 b/dh_installxaw.1 new file mode 100644 index 00000000..19f47423 --- /dev/null +++ b/dh_installxaw.1 @@ -0,0 +1,40 @@ +.TH DH_INSTALLXAW 1 "" "Debhelper Commands" "Debhelper Commands" +.SH NAME +dh_installxaw \- install xaw wrappers config files into package build directories +.SH SYNOPSIS +.B dh_installxaw +.I "[debhelper options] [-n]" +.SH "DESCRIPTION" +dh_installxaw is a debhelper program that is responsible for installing +xaw wrappers config files into package build directories. +.P +It also automatically generates the postinst and postrm commands needed to +interface with the debian xaw-wrappers package. See +.BR dh_installdeb (1) +for an explanation of how this works. +.P +If a file named debian/package.xaw exists, then it is installed into +usr/lib/xaw-wrappers/conf/package in the package build directory. +.P +For the first first binary package listed in the control file, you may use +debian/xaw instead. +.SH OPTIONS +.TP +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. +.TP +.B \-n, \--noscripts +Do not modify postinst/postrm scripts. +.SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" +.TP +.BR debhelper (1) +.TP +.BR update-xaw-wrappers (8) +.SH AUTHOR +Joey Hess diff --git a/dh_link b/dh_link new file mode 100755 index 00000000..8d4c32ad --- /dev/null +++ b/dh_link @@ -0,0 +1,70 @@ +#!/usr/bin/perl -w +# +# Generate symlinks in debian packages, reading debian/links. The +# file contains pairs of files and symlinks. + +BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +use Dh_Lib; +init(); + +foreach $PACKAGE (@{$dh{DOPACKAGES}}) { + $TMP=tmpdir($PACKAGE); + $file=pkgfile($PACKAGE,"links"); + + undef @links; + if ($file) { + @links=filearray($file); + } + + # Make sure it has pairs of symlinks and destinations. If it + # doesn't, $#links will be _odd_ (not even, -- it's zero-based). + if (int($#links/2) eq $#links/2) { + error("$file lists a link without a destination."); + } + + if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) { + push @links, @ARGV; + } + + # Same test as above, including arguments this time. + if (int($#links/2) eq $#links/2) { + error("parameters list a link without a destination."); + } + + # Now I'd prefer to work with a hash. + %links=@links; + + foreach $src (keys %links) { + $dest=$links{$src}; + + # Make sure the directory the link will be in exists. + $basedir=Dh_Lib::dirname("$TMP/$dest"); + if (! -e $basedir) { + doit("install","-d",$basedir); + } + + # Policy says that if the link is all within one toplevel + # directory, it should be relative. If it's between + # top level directories, leave it absolute. + @src_dirs=split(m:/+:,$src); + @dest_dirs=split(m:/+:,$dest); + if ($src_dirs[0] eq $dest_dirs[0]) { + # Figure out how much of a path $src and $dest + # share in common. + for ($x=0; $x<$#src_dirs && $src_dirs[$x] eq $dest_dirs[$x]; $x++) {} + + # Build up the new src. + $src=""; + for (1..$#dest_dirs - $x) { + $src.="../"; + } + # The + 1 is here to include the actual filename. + for (1..$#src_dirs - $x + 1) { + $src.=$src_dirs[$_]."/"; + } + $src=~s:/$::; + } + + doit("ln","-sf",$src,"$TMP/$dest"); + } +} diff --git a/dh_link.1 b/dh_link.1 new file mode 100644 index 00000000..5a3fbbc2 --- /dev/null +++ b/dh_link.1 @@ -0,0 +1,75 @@ +.TH DH_LINK 1 "" "Debhelper Commands" "Debhelper Commands" +.SH NAME +dh_link \- create symlinks in package build directories +.SH SYNOPSIS +.B dh_link +.I "[debhelper options] [-A] [source destination ...]" +.SH "DESCRIPTION" +dh_link is a debhelper program that creates symlinks in package build +directories. +.P +dh_link accepts a list of pairs of source and destination files. The source +files are the already existing files that will be symlinked from. The +destination files are the symlinks that will be created. There +.B must +be an equal number of source and destination files specified. +.P +The list can be specified in two ways. A file named debian/package.links +(debian/links may be used for the first binary package in debian/control) +can list pairs of files. If you use this file, you should put each pair +of files on its own line, and separate the files within the pair with +whitespace. Also, pairs of files can be specified as parameters - these +pairs will only be created in the package build directory of the first +ackage dh_link is told to act on. By default, this is the first binary +package in debian/control, but if you use -p, -i, or -a flags, it will be +the first package specified by those flags. +.P +Be sure to only use file names relative to the package build +directory. Ie, "/usr/bin/foo" should not be used, use "usr/bin/foo" instead. +Also, be sure you +.B do +specify the full filename to both the source and destination files (unlike +you would do if you were using something like +.BR ln (1) +) +.P +dh_link will generate symlinks that comply with debian policy - absolute +when policy says they should be absolute, and relative links with as short a +path as possible. It will also create any subdirectories it needs to to put +the symlinks in. +.SH OPTIONS +.TP +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. +.TP +.B \-A, \--all +Create any links specified by command line parameters in ALL packages +acted on, not just the first. +.TP +.B source destination ... +Create a file named "destination" as a link to a file named "source". Do +this in the package build directory of the first package acted on. +(Or in all packages if -A is specified.) +.SH EXAMPLES +.TP +.B dh_link usr/man/man1/foo.1 usr/man/man1/bar.1 +Make bar.1 be a symlink to foo.1 +.TP +.B dh_link var/lib/foo usr/lib/foo usr/X11R6/man/man1/foo.1x usr/man/man1/bar.1 +Make /usr/lib/foo/ be a link to /var/lib/foo/, and bar.1 be a symlink to the +X man page foo.1x +.SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" +.BR debhelper (1) +.SH BUGS +It's impossible to specify filenames with spaces or other whitespace in them +in debian/links file. This is more a historical design flaw than a bug. +.SH "CONFORMS TO" +Debian policy, version 2.5.0.0 +.SH AUTHOR +Joey Hess diff --git a/dh_listpackages b/dh_listpackages new file mode 100755 index 00000000..7a764af5 --- /dev/null +++ b/dh_listpackages @@ -0,0 +1,8 @@ +#!/usr/bin/perl -w +# +# Output a list of all packages debhelper will act on. + +BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +use Dh_Lib; +init(); +print join("\n",@{$dh{DOPACKAGES}})."\n"; diff --git a/dh_listpackages.1 b/dh_listpackages.1 new file mode 100644 index 00000000..aa4e7419 --- /dev/null +++ b/dh_listpackages.1 @@ -0,0 +1,25 @@ +.TH DH_LISTPACKAGES 1 "" "Debhelper Commands" "Debhelper Commands" +.SH NAME +dh_listpackages \- list binary packages debhelper will act on +.SH SYNOPSIS +.B dh_listpackages +.I "[debhelper options]" +.SH "DESCRIPTION" +dh_listpackages is a debhelper program that outputs a list of all binary +packages debhelper commands will act on. If you pass it some options, it +will change the list to match the packages other debhelper commands would +act on if passed the same options. +.SH OPTIONS +.TP +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. +.SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" +.BR debhelper (1) +.SH AUTHOR +Joey Hess diff --git a/dh_perl.1 b/dh_perl.1 new file mode 100644 index 00000000..f1277b0b --- /dev/null +++ b/dh_perl.1 @@ -0,0 +1,44 @@ +.TH DH_PERLCHECK 1 "22 June 1999" "Debhelper Commands" "Debhelper Commands" +.SH NAME +dh_perl \- calculates perl scripts & modules dependencies +.SH SYNOPSIS +.B dh_perl +.I "[debhelper options] [-k]" +.SH "DESCRIPTION" +dh_perl is a debhelper program that is responsible for generating +the perl:Depends substitutions and adding them to substvars files. +.P +The program will look for the location of installed modules and will +use this information to generate a dependency (at the present time +it can only be perl5, perl5-thread, perl-5.00X or perl-5.00X-thread). +.P +It will also look at #! lines of perl scripts in order to be able +to calculate a dependency for perl scripts and not only perl modules. +.P +In addition it will automatically remove .packlist file and will +remove the directory in which it was if it's empty. You can +switch off this option by passing -k. +.SH OPTIONS +.TP +.TP +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. +.TP +.B -k +Keep .packlist files. +.SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" +.TP +.BR debhelper (1) +.SH "CONFORMS TO" +.P +Debian policy, version 2.5.0.0 +.P +Perl policy, version 1.0 +.SH AUTHOR +Raphaël Hertzog diff --git a/examples/rules b/examples/rules index 8756505e..4573ebf8 100755 --- a/examples/rules +++ b/examples/rules @@ -69,4 +69,4 @@ source diff: @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary +.PHONY: build clean binary-indep binary-arch binary install diff --git a/examples/rules.multi b/examples/rules.multi index 04732edb..77714982 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -91,4 +91,4 @@ source diff: @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary +.PHONY: build clean binary-indep binary-arch binary install diff --git a/me b/me new file mode 100644 index 00000000..e69de29b diff --git a/pgptemp.$00 b/pgptemp.$00 new file mode 100644 index 00000000..e69de29b -- cgit v1.2.3 From a7548a2bec041aeefd49526563a13d9f5fedcd78 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:04:38 +0000 Subject: r143: Initial Import --- debian/changelog | 7 +++++++ examples/rules.indep | 1 + 2 files changed, 8 insertions(+) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index d5aed54b..4f49077e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debhelper (1.2.9) unstable; urgency=low + + * Added dh_link, which generates policy complient symlinks in binary + packages, painlessly. + + -- Joey Hess Thu, 19 Nov 1998 18:43:36 -0800 + debhelper (1.2.8) unstable; urgency=low * Suggest dh-make (#29376). diff --git a/examples/rules.indep b/examples/rules.indep index 4b80f1c8..142b99fe 100755 --- a/examples/rules.indep +++ b/examples/rules.indep @@ -51,6 +51,7 @@ binary-indep: build install # dh_installmanpages # dh_undocumented dh_installchangelogs + dh_link dh_compress dh_fixperms dh_suidregister -- cgit v1.2.3 From 3da73dffff8be46160d58a0c1ee2566d6bf1e7f8 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:04:38 +0000 Subject: r144: Initial Import --- debian/changelog | 6 ++++++ examples/rules | 1 + examples/rules.multi | 2 ++ 3 files changed, 9 insertions(+) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index 4f49077e..3c124e77 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +debhelper (1.2.10) unstable; urgency=low + + * examples/*: added dh_link calls to example rules files. + + -- Joey Hess Fri, 20 Nov 1998 15:43:07 -0800 + debhelper (1.2.9) unstable; urgency=low * Added dh_link, which generates policy complient symlinks in binary diff --git a/examples/rules b/examples/rules index 4573ebf8..e1a9c260 100755 --- a/examples/rules +++ b/examples/rules @@ -54,6 +54,7 @@ binary-arch: build install dh_installmanpages # dh_undocumented dh_installchangelogs + dh_link dh_strip dh_compress dh_fixperms diff --git a/examples/rules.multi b/examples/rules.multi index 77714982..c4302007 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -54,6 +54,7 @@ binary-indep: build install # dh_installmanpages -i # dh_undocumented dh_installchangelogs -i + dh_link -i dh_compress -i dh_fixperms -i dh_suidregister -i @@ -77,6 +78,7 @@ binary-arch: build install # dh_undocumented dh_installchangelogs -a dh_strip -a + dh_link -a dh_compress -a dh_fixperms -a dh_suidregister -a -- cgit v1.2.3 From d66756072ecd58a965f726bad6e0173142f6b4db Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:04:52 +0000 Subject: r147: Initial Import --- debian/changelog | 10 ++++++++++ dh_suidregister | 5 ++++- examples/rules | 2 +- examples/rules.multi | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index b93b1471..09eea311 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +debhelper (1.2.12) unstable; urgency=low + + * examples/*: moved dh_makeshlibs call to before dh_installdeb call. + (#29762). This is just so if you replace dh_makeshlibs with something + that generates debian/shlibs, it still gets installed properly. + * dh_suidregister: use names instead of uid's and gid's, at request of + suidregister maintainer (#29802). + + -- Joey Hess Sat, 21 Nov 1998 13:13:10 -0800 + debhelper (1.2.11) unstable; urgency=low * dh_movefiles: if given absolute filenames to move (note that that is diff --git a/dh_suidregister b/dh_suidregister index 86188cd4..d5b10ebd 100755 --- a/dh_suidregister +++ b/dh_suidregister @@ -47,8 +47,11 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { # fill in the blanks in the autoscript files. # Fill with the owner, group, and perms of the file. (undef,undef,$mode,undef,$uid,$gid,undef) = stat("$TMP/$file"); + # Now come up with the user and group names for the uid and gid. + $user=getpwuid($uid); + $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#/$uid/;s/#GROUP#/$gid/;s/#PERMS#/%#o/", + $sedstr=sprintf("s:#FILE#:$file:;s/#PACKAGE#/$PACKAGE/;s/#OWNER#/$user/;s/#GROUP#/$group/;s/#PERMS#/%#o/", $mode & 07777); autoscript($PACKAGE,"postinst","postinst-suid",$sedstr); diff --git a/examples/rules b/examples/rules index e1a9c260..091a67a6 100755 --- a/examples/rules +++ b/examples/rules @@ -61,8 +61,8 @@ binary-arch: build install dh_suidregister dh_installdeb dh_shlibdeps - dh_gencontrol # dh_makeshlibs + dh_gencontrol dh_md5sums dh_builddeb diff --git a/examples/rules.multi b/examples/rules.multi index c4302007..c7426b2e 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -84,8 +84,8 @@ binary-arch: build install dh_suidregister -a dh_installdeb -a dh_shlibdeps -a - dh_gencontrol -a # dh_makeshlibs -a + dh_gencontrol -a dh_md5sums -a dh_builddeb -a -- cgit v1.2.3 From dd15d8928f80c2860bee3fe1a8122f48d4f06bc4 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:05:53 +0000 Subject: r150: Initial Import --- debian/changelog | 8 ++++++++ debian/control | 2 +- examples/rules | 2 +- examples/rules.multi | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index 6608522a..fa047f8a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +debhelper (1.2.14) unstable; urgency=low + + * Really fixed #29762 this time. This also fixes #30025, which asked that + dh_makeshlibs come before dh_shlibdeps, so the files it generates can + also be used as a shlibs.local file, which will be used by dh_shlibdeps. + + -- Joey Hess Thu, 29 Oct 1998 04:00:14 -0800 + debhelper (1.2.13) unstable; urgency=low * Spelling and typo fixes. diff --git a/debian/control b/debian/control index 8edb5aa9..b9870780 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: debhelper Section: devel Priority: optional Maintainer: Joey Hess -Standards-Version: 2.5.0.0 +Standards-Version: 2.4.1.4 Package: debhelper Architecture: all diff --git a/examples/rules b/examples/rules index 091a67a6..89263a1a 100755 --- a/examples/rules +++ b/examples/rules @@ -59,9 +59,9 @@ binary-arch: build install dh_compress dh_fixperms dh_suidregister +# dh_makeshlibs dh_installdeb dh_shlibdeps -# dh_makeshlibs dh_gencontrol dh_md5sums dh_builddeb diff --git a/examples/rules.multi b/examples/rules.multi index c7426b2e..6f01cc82 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -83,9 +83,9 @@ binary-arch: build install dh_fixperms -a dh_suidregister -a dh_installdeb -a - dh_shlibdeps -a # dh_makeshlibs -a dh_gencontrol -a + dh_shlibdeps -a dh_md5sums -a dh_builddeb -a -- cgit v1.2.3 From b45f254fc53ba0418eb6a95dc0cf2677beabbe1f Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:07:54 +0000 Subject: r159: Initial Import --- autoscripts/postrm-wm | 2 +- debian/changelog | 6 ++++++ dh_fixperms | 3 +++ dh_fixperms.1 | 3 ++- examples/rules.indep | 1 + 5 files changed, 13 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/autoscripts/postrm-wm b/autoscripts/postrm-wm index 8345aa97..6a7eb47a 100644 --- a/autoscripts/postrm-wm +++ b/autoscripts/postrm-wm @@ -1,4 +1,4 @@ -if [ "$1" == "purge" ] && command -v register-window-manager >/dev/null 2>&1 +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 2a15b97a..f15c8dd6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +debhelper (1.2.23) unstable; urgency=low + + * autoscripts/postrm-wm: use "=", not "==" (#31727). + + -- Joey Hess Mon, 11 Jan 1999 13:35:00 -0800 + debhelper (1.2.22) unstable; urgency=low * Reversed change in last version; don't clobber mode (#31628). diff --git a/dh_fixperms b/dh_fixperms index 7f047fbd..10baaa01 100755 --- a/dh_fixperms +++ b/dh_fixperms @@ -17,6 +17,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { doit("chown","-R","root.root",$TMP); doit("chmod","-R","go=rX",$TMP); doit("chmod","-R","u+rw",$TMP); + doit("chmod","-R","a-s",$TMP); } $find_options=""; @@ -29,6 +30,8 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { 2>/dev/null | xargs -0r chmod go=rX"); complex_doit("find $TMP ! \\( $dh{EXCLUDE_FIND} \\) -print0 \ 2>/dev/null | xargs -0r chmod u+rw"); + complex_doit("find $TMP ! \\( $dh{EXCLUDE_FIND} \\) -print0 \ + 2>/dev/null | xargs -0r chmod a-s"); $find_options="! \\( $dh{EXCLUDE_FIND} \\)"; } diff --git a/dh_fixperms.1 b/dh_fixperms.1 index 9e016d17..f45f0c3c 100644 --- a/dh_fixperms.1 +++ b/dh_fixperms.1 @@ -12,7 +12,8 @@ dh_fixperms makes all files in usr/doc in the package build directory (excluding files in the examples/ directory) be mode 644. It also changes the permissions of all man pages to mode 644. It makes all files be owned by root, and it removes group and other write permission from all files. -Finally, it removes execute permissions from any libraries that have it set. +It removes execute permissions from any libraries that have it set. Finally, +it removes the setuid and setgid bits from all files in the package. .SH OPTIONS .TP .B debhelper options diff --git a/examples/rules.indep b/examples/rules.indep index 142b99fe..34b78d89 100755 --- a/examples/rules.indep +++ b/examples/rules.indep @@ -54,6 +54,7 @@ binary-indep: build install dh_link dh_compress dh_fixperms + # You may want to make some executables suid here. dh_suidregister dh_installdeb dh_gencontrol -- cgit v1.2.3 From 6b0e8f6773b98cc4905cc0329e471ade8db3ac32 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:07:54 +0000 Subject: r160: Initial Import --- debian/changelog | 16 ++++++++++++++++ examples/rules | 1 + examples/rules.multi | 2 ++ 3 files changed, 19 insertions(+) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index f15c8dd6..4feee157 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,19 @@ +debhelper (1.2.24) unstable; urgency=low + + * dh_fixperms: linux 2.1.x and 2.2.x differ from earlier versions in that + they do not clear the suid bit on a file when the owner of that file + changes. It seems that fakeroot behaves the same as linux 2.1 here. I + was relying on the old behavior to get rid of suid and sgid bits on files. + Since this no longer happens implicitly, I've changed to clearing the + bits explicitly. + * There's also a small behavior change involved here. Before, dh_fixperms + did not clear suid permissions on files that were already owned by root. + Now it does. + * dh_fixperms.1: cleaned up the docs to mention that those bits are + cleared. + + -- Joey Hess Fri, 15 Jan 1999 16:54:44 -0800 + debhelper (1.2.23) unstable; urgency=low * autoscripts/postrm-wm: use "=", not "==" (#31727). diff --git a/examples/rules b/examples/rules index 89263a1a..a0806c1d 100755 --- a/examples/rules +++ b/examples/rules @@ -58,6 +58,7 @@ binary-arch: build install dh_strip dh_compress dh_fixperms + # You may want to make some executables suid here. dh_suidregister # dh_makeshlibs dh_installdeb diff --git a/examples/rules.multi b/examples/rules.multi index 6f01cc82..f03909f6 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -57,6 +57,7 @@ binary-indep: build install dh_link -i dh_compress -i dh_fixperms -i + # You may want to make some executables suid here. dh_suidregister -i dh_installdeb -i dh_gencontrol -i @@ -81,6 +82,7 @@ binary-arch: build install dh_link -a dh_compress -a dh_fixperms -a + # You may want to make some executables suid here. dh_suidregister -a dh_installdeb -a # dh_makeshlibs -a -- cgit v1.2.3 From 4dcd2be0df92f2b63fe7a9f498e0bebc989f5ecc Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:12:42 +0000 Subject: r196: Initial Import --- debian/changelog | 6 ++++++ examples/rules | 2 +- examples/rules.multi | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index 2ece6258..5a1bd35f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +debhelper (1.2.57) unstable; urgency=low + + * examples/*: killed trailing spaces after diff: target + + -- Joey Hess Mon, 12 Apr 1999 22:02:32 -0700 + debhelper (1.2.56) unstable; urgency=low * dh_suidregister: make the chown/chmod only happen if the file actually diff --git a/examples/rules b/examples/rules index a0806c1d..108e38cd 100755 --- a/examples/rules +++ b/examples/rules @@ -67,7 +67,7 @@ binary-arch: build install dh_md5sums dh_builddeb -source diff: +source diff: @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false binary: binary-indep binary-arch diff --git a/examples/rules.multi b/examples/rules.multi index f03909f6..4b4c2a0a 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -91,7 +91,7 @@ binary-arch: build install dh_md5sums -a dh_builddeb -a -source diff: +source diff: @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false binary: binary-indep binary-arch -- cgit v1.2.3 From c02584b60ccccd6abec16130a41f9345f26b1fb5 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:13:47 +0000 Subject: r205: Initial Import --- debian/changelog | 7 +++++++ examples/rules.multi | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index 42fc7a38..dce70aa2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debhelper (1.2.66) unstable; urgency=low + + * examples/rules.multi: dh_shlibdeps must be run before dh_gencontrol + (#37346) + + -- Joey Hess Sun, 9 May 1999 14:03:05 -0700 + debhelper (1.2.65) unstable; urgency=low * Added to docs. diff --git a/examples/rules.multi b/examples/rules.multi index 4b4c2a0a..6292b8aa 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -86,8 +86,8 @@ binary-arch: build install dh_suidregister -a dh_installdeb -a # dh_makeshlibs -a - dh_gencontrol -a dh_shlibdeps -a + dh_gencontrol -a dh_md5sums -a dh_builddeb -a -- cgit v1.2.3 From fa2a2d233b7de82a4c667eca3ff39110c4a0b6d3 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:15:31 +0000 Subject: r217: Initial Import --- debian/changelog | 7 +++++++ examples/rules | 1 + examples/rules.indep | 1 + examples/rules.multi | 2 ++ 4 files changed, 11 insertions(+) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index a695ab83..2d944aec 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debhelper (1.2.77) unstable; urgency=low + + * dh_installpam: new program by Sean + * Wrote man page for same. + + -- Joey Hess Fri, 11 Jun 1999 13:08:04 -0700 + debhelper (1.2.76) unstable; urgency=low * dh_fixperms: Do not use chmod/chown -R at all anymore, instead it uses diff --git a/examples/rules b/examples/rules index 108e38cd..806092ca 100755 --- a/examples/rules +++ b/examples/rules @@ -49,6 +49,7 @@ binary-arch: build install dh_installexamples dh_installmenu # dh_installemacsen +# dh_installpam # dh_installinit dh_installcron dh_installmanpages diff --git a/examples/rules.indep b/examples/rules.indep index 34b78d89..688ba7f8 100755 --- a/examples/rules.indep +++ b/examples/rules.indep @@ -46,6 +46,7 @@ binary-indep: build install dh_installexamples dh_installmenu # dh_installemacsen +# dh_installpam # dh_installinit dh_installcron # dh_installmanpages diff --git a/examples/rules.multi b/examples/rules.multi index 6292b8aa..433c16fe 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -49,6 +49,7 @@ binary-indep: build install dh_installexamples -i dh_installmenu -i # dh_installemacsen -i +# dh_installpam -i # dh_installinit -i dh_installcron -i # dh_installmanpages -i @@ -73,6 +74,7 @@ binary-arch: build install dh_installexamples -a dh_installmenu -a # dh_installemacsen -a +# dh_installpam -a # dh_installinit -a dh_installcron -a dh_installmanpages -a -- cgit v1.2.3 From db2831b1ccd9f2ecf064194724486367efcef4be Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:16:18 +0000 Subject: r223: Initial Import --- debian/changelog | 7 +++++++ examples/rules.indep | 3 +++ 2 files changed, 10 insertions(+) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index 04ba51a8..b4296a04 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debhelper (1.2.83) unstable; urgency=medium + + * dh_perl: fixed substvars typo. Urgency medium since a lot of people will + be using this script RSN. + + -- Joey Hess Thu, 1 Jul 1999 11:44:05 -0700 + debhelper (1.2.82) unstable; urgency=low * dh_installinit: applied patch from Yann Dirson diff --git a/examples/rules.indep b/examples/rules.indep index 688ba7f8..b40281d9 100755 --- a/examples/rules.indep +++ b/examples/rules.indep @@ -5,6 +5,9 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +# This is the debhelper compatability version to use. +export DH_COMPAT=1 + build: build-stamp build-stamp: dh_testdir -- cgit v1.2.3 From 84c6650150baff1dddc4205443995d75e1c0ec08 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:16:26 +0000 Subject: r224: Initial Import --- Dh_Lib.pm | 17 +++++++++++++++-- debhelper.1 | 8 ++++++++ debian/changelog | 10 ++++++++++ doc/PROGRAMMING | 4 ++++ doc/README | 7 +++++++ examples/rules | 3 +++ examples/rules.multi | 3 +++ 7 files changed, 50 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/Dh_Lib.pm b/Dh_Lib.pm index 25174312..b7f281ba 100644 --- a/Dh_Lib.pm +++ b/Dh_Lib.pm @@ -187,14 +187,27 @@ sub dirname { my $fn=shift; return $fn; } +# Pass in a number, will return true iff the current compatability level +# is equal to that number. +sub compat { + my $num=shift; + + my $c=1; + if (defined $ENV{DH_COMPAT}) { + $c=$ENV{DH_COMPAT}; + } + + return ($c == $num); +} + # Pass it a name of a binary package, it returns the name of the tmp dir to # use, for that package. -# This is for back-compatability with the debian/tmp tradition. sub tmpdir { my $package=shift; if ($dh{TMPDIR}) { return $dh{TMPDIR}; } - elsif ($package eq $dh{MAINPACKAGE}) { + elsif (compat(1) && $package eq $dh{MAINPACKAGE}) { + # This is for back-compatability with the debian/tmp tradition. return "debian/tmp"; } else { diff --git a/debhelper.1 b/debhelper.1 index 1562b2bf..6834594a 100644 --- a/debhelper.1 +++ b/debhelper.1 @@ -120,6 +120,14 @@ Here is the complete list of available debhelper commands. .I DH_VERBOSE Enables verbose mode. .TP +.I DH_COMPAT +Specifies what compatability level debhelper should run at. The default is 1, +which makes debhelper behave in a manner compatable with the 1.x series of +debhelper. If set to 2, debhelper's behavior will change to use the new +features of the 2.x series. Use this with caution, as the 2.x series makes +major changes that will break most packages. For documentation on these +changes, read /usr/doc/debhelper/v2 +.TP .I DH_NO_ACT Enables no-act mode. .TP diff --git a/debian/changelog b/debian/changelog index b4296a04..212c1ee5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +debhelper (1.9.00) unstable; urgency=low + + * This is a release of debhelper in preparation for debhelper v2. + * doc/v2: added, documented status of v2 changes. + * README: mention doc/v2 + * debhelper.1: docuimented DH_COMPAT + * examples/*: added DH_COMAPT=1 to top of rules files + + -- Joey Hess Thu, 1 Jul 1999 13:16:41 -0700 + debhelper (1.2.83) unstable; urgency=medium * dh_perl: fixed substvars typo. Urgency medium since a lot of people will diff --git a/doc/PROGRAMMING b/doc/PROGRAMMING index 4f071496..02b11a21 100644 --- a/doc/PROGRAMMING +++ b/doc/PROGRAMMING @@ -169,6 +169,10 @@ tmpdir() name of the tmp directory that will be used as this package's package build directory. Typically, this will be "debian/tmp" or "debian/package". +compat() + Pass this command a number, and if the current compatability level + equals that number, it will return true. Looks at DH_COMPAT to get + the compatability level. pkgfile() Pass this command the name of a binary package, and the base name of a file, and it will return the actual filename to use. This is used diff --git a/doc/README b/doc/README index 7ba69863..ff43553e 100644 --- a/doc/README +++ b/doc/README @@ -12,6 +12,13 @@ various debhelper scripts in (though other variations are possible). For a more gentle introduction, the maint-guide debian package contains a tutorial about making your first package using Debhelper. +Debhelper v2: +------------ + +Debhelper v2 is a major new version of Debhelper, still under development. +Debhelper will continue to work in v1 compatability mode for now, if you're +interested in trying the new versiln, read the file named "v2". + Starting a new package: ---------------------- diff --git a/examples/rules b/examples/rules index 806092ca..5e805edb 100755 --- a/examples/rules +++ b/examples/rules @@ -4,6 +4,9 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +# This is the debhelper compatability version to use. +export DH_COMPAT=1 + build: build-stamp build-stamp: dh_testdir diff --git a/examples/rules.multi b/examples/rules.multi index 433c16fe..7a609e6c 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -7,6 +7,9 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +# This is the debhelper compatability version to use. +export DH_COMPAT=1 + build: build-stamp build-stamp: dh_testdir -- cgit v1.2.3 From 92a3a307c88b231be4981ca4e76e85c515727a75 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:17:06 +0000 Subject: r231: Initial Import --- debian/changelog | 7 +++++++ debian/control | 2 +- examples/rules.indep | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index f8e4f45d..1556aebc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debhelper (2.0.06) unstable; urgency=low + + * Now depends on perl5 | perl, I'll kill the | perl bit later on, but it + seems to make sense for the transition. + + -- Joey Hess Sun, 4 Jul 1999 10:56:03 -0700 + debhelper (2.0.05) unstable; urgency=low * dh_clean: clean debian/tmp even if v2 is being used. If you're diff --git a/debian/control b/debian/control index 45834e1b..7dc9496c 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,7 @@ Standards-Version: 2.5.1.0 Package: debhelper Architecture: all -Depends: perl (>= 5.004), fileutils (>= 3.16-4), file (>= 3.23-1) +Depends: perl5 | perl (>= 5.004), fileutils (>= 3.16-4), file (>= 3.23-1) Suggests: dh-make Description: helper programs for debian/rules A collection of programs that can be used in a debian/rules file to diff --git a/examples/rules.indep b/examples/rules.indep index b40281d9..748fb629 100755 --- a/examples/rules.indep +++ b/examples/rules.indep @@ -61,6 +61,7 @@ binary-indep: build install # You may want to make some executables suid here. dh_suidregister dh_installdeb +# dh_perl dh_gencontrol dh_md5sums dh_builddeb -- cgit v1.2.3 From c5cca23df59c38a414d7b8ef4725f0533723d77c Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:17:11 +0000 Subject: r232: Initial Import --- debian/changelog | 6 ++++++ dh_md5sums | 2 +- dh_movefiles | 6 +++--- examples/rules | 1 + examples/rules.multi | 2 ++ 5 files changed, 13 insertions(+), 4 deletions(-) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index 1556aebc..c5b997d1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +debhelper (2.0.07) unstable; urgency=low + + * Added dh_perl calls to example rules files. + + -- Joey Hess Sun, 4 Jul 1999 15:57:51 -0700 + debhelper (2.0.06) unstable; urgency=low * Now depends on perl5 | perl, I'll kill the | perl bit later on, but it diff --git a/dh_md5sums b/dh_md5sums index 2b626292..8015df79 100755 --- a/dh_md5sums +++ b/dh_md5sums @@ -34,7 +34,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { } $olddir=getcwd(); - complex_doit("cd $TMP ; find * -type f $exclude ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum > DEBIAN/md5sums ; cd $olddir"); + complex_doit("cd $TMP >/dev/null ; find * -type f $exclude ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum > DEBIAN/md5sums ; cd $olddir >/dev/null"); # If the file's empty, no reason to waste inodes on it. if (-z "$TMP/DEBIAN/md5sums") { doit("rm","-f","$TMP/DEBIAN/md5sums"); diff --git a/dh_movefiles b/dh_movefiles index 2ed8e376..09159d3b 100755 --- a/dh_movefiles +++ b/dh_movefiles @@ -59,15 +59,15 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { $file=$_; $ret=1 if (! -e $file && ! -l $file); $file=~s:^$sourcedir/+::; - complex_doit("(cd $sourcedir ; find $file ! -type d -and ! -type l -print || true) >> movelist"); + complex_doit("(cd $sourcedir >/dev/null ; find $file ! -type d -and ! -type l -print || true) >> movelist"); } foreach (@filelist) { $file=$_; $ret=1 if (! -e $file && ! -l $file); $file=~s:^$sourcedir/+::; - complex_doit("(cd $sourcedir ; find $file ! -type d -and -type l -print || true) >> movelist"); + complex_doit("(cd $sourcedir >/dev/null ; find $file ! -type d -and -type l -print || true) >> movelist"); } - complex_doit("(cd $sourcedir;tar --create --remove-files --files-from=../../movelist --file -) | (cd $TMP;tar xpf -)"); + complex_doit("(cd $sourcedir >/dev/null ; tar --create --remove-files --files-from=../../movelist --file -) | (cd $TMP >/dev/null ;tar xpf -)"); doit("rm","-f","movelist"); } } diff --git a/examples/rules b/examples/rules index 5e805edb..5ad68924 100755 --- a/examples/rules +++ b/examples/rules @@ -66,6 +66,7 @@ binary-arch: build install dh_suidregister # dh_makeshlibs dh_installdeb +# dh_perl dh_shlibdeps dh_gencontrol dh_md5sums diff --git a/examples/rules.multi b/examples/rules.multi index 7a609e6c..034a4514 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -64,6 +64,7 @@ binary-indep: build install # You may want to make some executables suid here. dh_suidregister -i dh_installdeb -i +# dh_perl -i dh_gencontrol -i dh_md5sums -i dh_builddeb -i @@ -91,6 +92,7 @@ binary-arch: build install dh_suidregister -a dh_installdeb -a # dh_makeshlibs -a +# dh_perl -a dh_shlibdeps -a dh_gencontrol -a dh_md5sums -a -- cgit v1.2.3 From 77ec5eed71bb5dc83dbfa856a586ce15614c6cc6 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:17:35 +0000 Subject: r235: Initial Import --- debian/changelog | 10 ++++++++++ dh_compress.1 | 2 +- doc/TODO | 2 -- examples/rules.indep | 1 + 4 files changed, 12 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index 53242d0c..0e1bea1c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +debhelper (2.0.10) unstable; urgency=low + + * dh_compress: compress changelog.html files. (Closes: #40626) + * dh_installchangelogs: installs a link from changelog.html.gz to changelog.gz, + because I think it's important that upstream changelogs always be accessable + at that name. + * dh_compress: removed the usr/share/X11R6/man bit. Note part of FHS. + + -- Joey Hess Wed, 7 Jul 1999 10:46:03 -0700 + debhelper (2.0.09) unstable; urgency=low * dh_compress: added some FHS support. Though debhelper doesn't put stuff diff --git a/dh_compress.1 b/dh_compress.1 index b0eba3ea..bab5c199 100644 --- a/dh_compress.1 +++ b/dh_compress.1 @@ -68,6 +68,6 @@ for a list of environment variables that affect all debhelper commands. .SH BUGS Filenames with spaces in them may not properly be compressed. .SH "CONFORMS TO" -Debian policy, version 2.5.0.0 +Debian policy, version 3.0.0.0 .SH AUTHOR Joey Hess diff --git a/doc/TODO b/doc/TODO index 75006f05..e3b999bc 100644 --- a/doc/TODO +++ b/doc/TODO @@ -6,8 +6,6 @@ Wishlist items: * Make dh_* "use strict". * Make dh_movefiles remove emptied directories after it's moved all the files out of them (#17111). -* info support for debhelper (currently implemented, but I hate how I did it, - so it's not in the package.) (#15717) * enhance dh_installmanpages so it associates binaries and man pages and installs the man pages into the correct areas to suit the binaries they document. I may need to make this only happen when a switch is given, to diff --git a/examples/rules.indep b/examples/rules.indep index 748fb629..e8a2b5d5 100755 --- a/examples/rules.indep +++ b/examples/rules.indep @@ -53,6 +53,7 @@ binary-indep: build install # dh_installinit dh_installcron # dh_installmanpages + dh_installinfo # dh_undocumented dh_installchangelogs dh_link -- cgit v1.2.3 From a0061c2bdf1020c3475604422755eabd3a46da76 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:17:43 +0000 Subject: r236: Initial Import --- debian/changelog | 7 +++++++ debian/rules | 1 + dh_installinfo | 2 +- examples/rules | 1 + examples/rules.multi | 2 ++ 5 files changed, 12 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/debian/changelog b/debian/changelog index 0e1bea1c..0906c8d5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debhelper (2.0.11) unstable; urgency=low + + * At long, long last, dh_installinfo is written. It takes a simple list of + info files and figures out the rest for you. (Closes: #15717) + + -- Joey Hess Wed, 7 Jul 1999 17:04:48 -0700 + debhelper (2.0.10) unstable; urgency=low * dh_compress: compress changelog.html files. (Closes: #40626) diff --git a/debian/rules b/debian/rules index e1f8d237..ef833d1c 100755 --- a/debian/rules +++ b/debian/rules @@ -52,6 +52,7 @@ binary-indep: build ./dh_installexamples examples/* ./dh_installmenu ./dh_installmanpages + ./dh_installinfo # Fix up all man pages, filling in the modification time for them. # Note this runs beofre the command below so debhelper.1 gets the right # date on it. diff --git a/dh_installinfo b/dh_installinfo index b6ae40f9..20d5e003 100755 --- a/dh_installinfo +++ b/dh_installinfo @@ -49,7 +49,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { if ($section ne '') { autoscript($PACKAGE,"postinst","postinst-info", - "s/#SECTION#/$section/;s:#FILE#:$fn:"); + "s/#SECTION#/$section/g;s:#FILE#:$fn:"); } else { autoscript($PACKAGE,"postinst","postinst-info-nosection", diff --git a/examples/rules b/examples/rules index 5ad68924..78cfed49 100755 --- a/examples/rules +++ b/examples/rules @@ -56,6 +56,7 @@ binary-arch: build install # dh_installinit dh_installcron dh_installmanpages + dh_installinfo # dh_undocumented dh_installchangelogs dh_link diff --git a/examples/rules.multi b/examples/rules.multi index 034a4514..7329437a 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -56,6 +56,7 @@ binary-indep: build install # dh_installinit -i dh_installcron -i # dh_installmanpages -i + dh_installinfo -i # dh_undocumented dh_installchangelogs -i dh_link -i @@ -82,6 +83,7 @@ binary-arch: build install # dh_installinit -a dh_installcron -a dh_installmanpages -a + dh_installinfo -a # dh_undocumented dh_installchangelogs -a dh_strip -a -- cgit v1.2.3