summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey>2000-11-27 03:56:52 +0000
committerjoey <joey>2000-11-27 03:56:52 +0000
commitdffd90e48bd1c4bb45cf42b6394478a7d2590b5a (patch)
treec8fa58d435b7fe86b0dd45846e0fed84e7101161
parent63f01a93ebb8f4d8be40d10f7075e8a69567911d (diff)
downloaddebhelper-dffd90e48bd1c4bb45cf42b6394478a7d2590b5a.tar.gz
r392: * DH_COMPAT=3 now enables the following new features which I can't just
turn on by default for fear of breaking backwards compatability: - dh_makeshlibs makes the postinst/postrm call ldconfig. Closes: #77154 Patch from Masato Taruishi <taru@debian.org> (modified). If you use this, be sure dh_makeshlibs runs before dh_installdeb; many old rules files have the ordering backwards. - dh_installdeb now causes all files in /etc to be registered as conffiles. - debian/README is now supported: it is treated exactly like debian/README.Debian. Either file is installed as README.Debian in non-native packages, and now as just README in native packages. Closes: #34628 * This is really only the start of the changes for v3, so use with caution.. * dh_du has finally been removed. It has been deprecated for ages, and a grep of the archive shows that nothing is using it except biss-awt and scsh. I filed bugs on both almost exactly a year ago. Those bugs should now be raised to severity important.. * --number option (to dh_installemacsen) is removed. It has been deprecated for a while and nothing uses it. Use --priority instead.
-rw-r--r--Debian/Debhelper/Dh_Getopt.pm1
-rw-r--r--Debian/Debhelper/Dh_Lib.pm4
-rw-r--r--autoscripts/postinst-makeshlibs3
-rw-r--r--autoscripts/postrm-makeshlibs3
-rw-r--r--debian/changelog25
-rw-r--r--debian/copyright6
-rwxr-xr-xdh_du10
-rw-r--r--dh_du.116
-rwxr-xr-xdh_fixperms1
-rwxr-xr-xdh_installdeb10
-rw-r--r--dh_installdeb.16
-rwxr-xr-xdh_installdocs15
-rw-r--r--dh_installdocs.110
-rwxr-xr-xdh_makeshlibs9
-rw-r--r--dh_makeshlibs.18
-rw-r--r--doc/TODO16
-rw-r--r--doc/v318
-rwxr-xr-xexamples/rules.multi2
18 files changed, 91 insertions, 72 deletions
diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm
index 02045bbe..18157bf0 100644
--- a/Debian/Debhelper/Dh_Getopt.pm
+++ b/Debian/Debhelper/Dh_Getopt.pm
@@ -126,7 +126,6 @@ sub parseopts {
"filename=s" => \$options{FILENAME},
- "number=i" => \$options{PRIORITY}, # deprecated
"priority=i" => \$options{PRIORITY},
"flavor=s" => \$options{FLAVOR},
diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index e71895e4..82877340 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -190,7 +190,7 @@ sub dirname { my $fn=shift;
}
# Pass in a number, will return true iff the current compatability level
-# is equal to that number.
+# is less than or equal to that number.
sub compat {
my $num=shift;
@@ -203,7 +203,7 @@ sub compat {
error("Sorry, but $max_compat is the highest compatability level of debhelper currently supported.");
}
- return ($c == $num);
+ return ($c <= $num);
}
# Pass it a name of a binary package, it returns the name of the tmp dir to
diff --git a/autoscripts/postinst-makeshlibs b/autoscripts/postinst-makeshlibs
new file mode 100644
index 00000000..8a25b9e9
--- /dev/null
+++ b/autoscripts/postinst-makeshlibs
@@ -0,0 +1,3 @@
+if [ "$1" = "configure" ]; then
+ ldconfig
+fi
diff --git a/autoscripts/postrm-makeshlibs b/autoscripts/postrm-makeshlibs
new file mode 100644
index 00000000..96bf24ed
--- /dev/null
+++ b/autoscripts/postrm-makeshlibs
@@ -0,0 +1,3 @@
+if [ "$1" = "remove" ]; then
+ ldconfig
+fi
diff --git a/debian/changelog b/debian/changelog
index 2e812794..1930e77c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,28 @@
+debhelper (2.2.0) unstable; urgency=low
+
+ * DH_COMPAT=3 now enables the following new features which I can't just
+ turn on by default for fear of breaking backwards compatability:
+ - dh_makeshlibs makes the postinst/postrm call ldconfig. Closes: #77154
+ Patch from Masato Taruishi <taru@debian.org> (modified). If you
+ use this, be sure dh_makeshlibs runs before dh_installdeb; many
+ old rules files have the ordering backwards.
+ - dh_installdeb now causes all files in /etc to be registered as
+ conffiles.
+ - debian/README is now supported: it is treated exactly like
+ debian/README.Debian. Either file is installed as README.Debian in
+ non-native packages, and now as just README in native packages.
+ Closes: #34628
+ * This is really only the start of the changes for v3, so use with
+ caution..
+ * dh_du has finally been removed. It has been deprecated for ages, and
+ a grep of the archive shows that nothing is using it except biss-awt
+ and scsh. I filed bugs on both almost exactly a year ago. Those bugs
+ should now be raised to severity important..
+ * --number option (to dh_installemacsen) is removed. It has been
+ deprecated for a while and nothing uses it. Use --priority instead.
+
+ -- Joey Hess <joeyh@debian.org> Sun, 26 Nov 2000 17:51:58 -0800
+
debhelper (2.1.28) unstable; urgency=low
* Ok, fine, I'll make debhelper depend on lynx for the one or two
diff --git a/debian/copyright b/debian/copyright
index 3e209586..76867829 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,9 +1,9 @@
Debhelper is written by and copyright 1997-2000 Joey Hess <joeyh@debian.org>.
-Parts of the code (and certainly my inspiration from the whole thing) came
-from debmake, by Christoph Lameter <clameter@debian.org>.
+Increasinly miniscule parts of the code (and certainly my inspiration from the
+whole thing) came from debmake, by Christoph Lameter <clameter@debian.org>.
-Some of the dh_md5sums and dh_du commands is from a program by Charles
+Some of the dh_md5sums command is from a program by Charles
Briscoe-Smith <cpb4@ukc.ac.uk>.
The copyright of this package is GPL, version 2 or later. Files in the
diff --git a/dh_du b/dh_du
deleted file mode 100755
index d786e497..00000000
--- a/dh_du
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/perl -w
-#
-# 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.
-
-use Debian::Debhelper::Dh_Lib;
-
-warning("this program does nothing and is deprecated. Remove it from debian/rules.");
diff --git a/dh_du.1 b/dh_du.1
deleted file mode 100644
index e7487b79..00000000
--- a/dh_du.1
+++ /dev/null
@@ -1,16 +0,0 @@
-.TH DH_DU 1 "" "Debhelper Commands" "Debhelper Commands"
-.SH NAME
-dh_du \- generate DEBIAN/du file (deprecated)
-.SH SYNOPSIS
-.B dh_du
-.SH "DESCRIPTION"
-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
-This program is now deprecated, 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 debhelper (1)
-.SH AUTHOR
-Joey Hess <joeyh@debian.org>
diff --git a/dh_fixperms b/dh_fixperms
index 616747e3..36ce73cc 100755
--- a/dh_fixperms
+++ b/dh_fixperms
@@ -21,7 +21,6 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
complex_doit("find $TMP ! -type l $find_options -print0",
"2>/dev/null | xargs -0r chmod go=rX,u+rw,a-s");
-
# Fix up premissions in usr/share/doc, setting everything to not
# executable by default, but leave examples directories alone.
complex_doit("find $TMP/usr/share/doc $TMP/usr/doc -type f $find_options ! -regex '.*/examples/.*' -print0",
diff --git a/dh_installdeb b/dh_installdeb
index 6eddb38f..1447ebfe 100755
--- a/dh_installdeb
+++ b/dh_installdeb
@@ -51,4 +51,14 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
doit("install","-o",0,"-g",0,"-m",644,"-p",$f,"$TMP/DEBIAN/$file");
}
}
+
+ # Automatic conffiles registration: If it is in /etc, it is a
+ # conffile.
+ if (! Debian::Debhelper::Dh_Lib::compat(2) && -d "$TMP/etc") {
+ complex_doit("find $TMP/etc -type f |sed 's~^$TMP~~' >> $TMP/DEBIAN/conffiles");
+ # Anything found?
+ if (-z "$TMP/DEBIAN/conffiles") {
+ doit("rm", "-f", "$TMP/DEBIAN/conffiles");
+ }
+ }
}
diff --git a/dh_installdeb.1 b/dh_installdeb.1
index df305978..78f1d7c6 100644
--- a/dh_installdeb.1
+++ b/dh_installdeb.1
@@ -6,7 +6,7 @@ dh_installdeb \- install files into the DEBIAN directory
.I "[debhelper options]"
.SH "DESCRIPTION"
dh_installdeb is a debhelper program that is responsible for installing
-files into the DEBIAN directory in package build directories with the
+files into the DEBIAN directories in package build directories with the
correct permissions.
.P
dh_installdeb automatically installs the following files from debian/ into
@@ -27,6 +27,10 @@ the .debhelper file. The .debhelper files are created by other debhelper
programs, such as
.BR dh_installmenu (1)
, and are shell script fragments.
+.P
+If DH_COMPAT is set to 3 or higher, all files in the etc/ directory in a
+package will automatically be flagged as conffiles by this program, so
+there is no need to list them manually in package.conffiles.
.SH OPTIONS
.TP
.B debhelper options
diff --git a/dh_installdocs b/dh_installdocs
index 7af38094..50bc1712 100755
--- a/dh_installdocs
+++ b/dh_installdocs
@@ -39,10 +39,21 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
$readme_debian=pkgfile($PACKAGE,'README.Debian');
if (! $readme_debian) {
$readme_debian=pkgfile($PACKAGE,'README.debian');
+ if (! $readme_debian) {
+ $readme_debian=pkgfile($PACKAGE,'README');
+ }
}
if ($readme_debian) {
- doit("install","-g",0,"-o",0,"-m","644","-p","$readme_debian",
- "$TMP/usr/share/doc/$PACKAGE/README.Debian");
+ if (isnative($PACKAGE)) {
+ doit("install","-g",0,"-o",0,"-m","644","-p",
+ $readme_debian,
+ "$TMP/usr/share/doc/$PACKAGE/README");
+ }
+ else {
+ doit("install","-g",0,"-o",0,"-m","644","-p",
+ $readme_debian,
+ "$TMP/usr/share/doc/$PACKAGE/README.Debian");
+ }
}
$todo=pkgfile($PACKAGE,'TODO');
diff --git a/dh_installdocs.1 b/dh_installdocs.1
index 7cc0623f..5f2bf993 100644
--- a/dh_installdocs.1
+++ b/dh_installdocs.1
@@ -19,13 +19,13 @@ package dh_installdocs 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
-Also, debian/README.Debian (or debian/README.debian) and debian/TODO, if
+Also, debian/README (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. Also note that README.debian is installed as
-README.Debian, for consitency. Note that debian/package.README.Debian and
-debian/package.TODO can be used to specify files for subpackages.
+they will be named README.Debian and TODO.Debian, if the package is not a
+debian native package, and README and TODO if it is. Also note that
+Additionally, debian/package.README and debian/package.TODO can be used
+to specify files for subpackages.
.P
Files named debian/package.docs can list other files to be installed.
.P
diff --git a/dh_makeshlibs b/dh_makeshlibs
index 6b3ff411..1b50ea11 100755
--- a/dh_makeshlibs
+++ b/dh_makeshlibs
@@ -9,12 +9,14 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
$TMP=tmpdir($PACKAGE);
my %seen;
+ my $need_ldconfig = 0;
doit("rm", "-f", "$TMP/DEBIAN/shlibs");
open (FIND, "find $TMP -xtype f -name '*.so*' |");
while (<FIND>) {
chomp;
+ $need_ldconfig=1;
# The second evil regexp is for db3, whose author should
# be shot.
if (m#.*/(.*)\.so\.(\d*)\.?# || m#.*/(.*)-(\S+)\.so$#) {
@@ -51,6 +53,13 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
}
close FIND;
+ # New as of dh_v3.
+ if (! Debian::Debhelper::Dh_Lib::compat(2) &&
+ ! $dh{NOSCRIPTS} && $need_ldconfig) {
+ autoscript($PACKAGE,"postinst","postinst-makeshlibs");
+ autoscript($PACKAGE,"postrm","postrm-makeshlibs");
+ }
+
if (-e "$TMP/DEBIAN/shlibs") {
doit("chmod",644,"$TMP/DEBIAN/shlibs");
doit("chown","0.0","$TMP/DEBIAN/shlibs");
diff --git a/dh_makeshlibs.1 b/dh_makeshlibs.1
index 68d331b8..488356da 100644
--- a/dh_makeshlibs.1
+++ b/dh_makeshlibs.1
@@ -3,10 +3,13 @@
dh_makeshlibs \- automatically create shlibs file
.SH SYNOPSIS
.B dh_makeshlibs
-.I "[debhelper options] [-mmajor] [-V[dependancies]]"
+.I "[debhelper options] [-mmajor] [-V[dependancies]] [-n]"
.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
+It also adds a call to ldconfig in the postinst and postrm scripts (in
+DH_COMPAT=3 mode and above only).
.SH OPTIONS
.TP
.B debhelper options
@@ -27,6 +30,9 @@ information, the current version of the package is plugged into a dependancy
that looks like "packagename (>= packageversion)". If -V is specified with
parameters, the parameters can be used to specify the exact dependancy
information needed (be sure to include the package name).
+.TP
+.B \-n, \--noscripts
+Do not modify postinst/postrm scripts.
.SH EXAMPLES
.TP
.B dh_makeshlibs
diff --git a/doc/TODO b/doc/TODO
index 9277132e..fa5fc033 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -4,8 +4,6 @@ list grows - I welcome patches to fix items on it!
Wishlist items:
* Make dh_* "use strict".
-* Make dh_movefiles remove emptied directories after it's moved all the
- files out of them (#17111).
* 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
@@ -23,12 +21,6 @@ Wishlist items:
* All programs should also make sure the files they install are owned by
root.root. Situation is currently the same as with permissions above, plus
dh_installchangelogs is fixed.
-* something should add ldconfig calls properly to the postinst of packages
- that contain shared libraries. maybe dh_makeshlibs? But it wasn't designed
- to do that originally, and even worse, it is often run after
- dh_installdeb, so the fragments wouldn't go into the postinst. So maybe a
- new script is called for. But it's probably be best to just have a switch
- to enable this.
* Need a way to make dh_strip not strip any static libs. Also, it'd be nice
if there were options to dh_strip, dh_compress, etc, to allow inclusion of
directories and exclusion of files based on filename globbing. (Request from
@@ -51,14 +43,6 @@ Wishlist items:
Deprecated:
-* remove dh_du.
- - need to wait a reasonable length of
- time. I'm currently planning on doing this after slink is released or
- one year after they were deprecated, whichever comes first. Be sure to
- grep whole debian archive for all of them before removing them, though!
- - currently, a few packages in potato use dh_du, but bugs have been filed.
-* Remove support for --number option
- - only dh_installemacsen ever used it, it is not --priority.
* DH_COMPAT 1. Can be removed once all packages are seen to be using 2 or
higher. I won't hold my breath.
* Also, grep the entire archive for all dh_* command lines, and check to
diff --git a/doc/v3 b/doc/v3
index bd923de6..1f38b83c 100644
--- a/doc/v3
+++ b/doc/v3
@@ -25,17 +25,9 @@ them.
the .man filenames properly. It'll probably just assume all man pages have
an extension, and delete that extentation, and add the correct one.
-* dh_movefiles will use a name other than debian/<package>.files for the
- list of what to move, because it can't use debian/files for the first
- package, since that file is already used elsewhere. It'll use
- debian/<package>.move
-
-* dh_movefiles should delete empty directories after it's moved all files
- out of them. (#17111)
-
-* debian/README will be installed as /usr/share/doc/<package>/README in
++ debian/README is installed as /usr/share/doc/<package>/README in
native packages, and as README.Debian in non-native packages. This is
- consistent with the handing of debian/TODO and debian/changelog. (#34628)
+ consistent with the handing of debian/TODO and debian/changelog.
* There will be no change to the names of debhelper config files used, I've
decided against debian/<package>/* and the like, because although those
@@ -45,12 +37,12 @@ them.
documenting that debian/<foo> works, and will deprecate that usage.
debian/<package>.<foo> will be preferred even in single binary packages.
-* Every file in etc/ will be automatically be flagged as a conffile.
++ Every file in etc/ is automatically flagged as a conffile by dh_installdeb.
* Debhelper config files will support globbing via * and ?, when
appropriate. To turn this off and use those changarcters raw, just quote
them.
-* dh_makeshlibs will generate autoscript fragments for ldconfig. This will
- require you call it before dh_installdeb, which isn't always done now.
++ dh_makeshlibs will generate autoscript fragments for ldconfig. This will
+ require you call it before dh_installdeb.
diff --git a/examples/rules.multi b/examples/rules.multi
index 0b5d7941..6ba2bc88 100755
--- a/examples/rules.multi
+++ b/examples/rules.multi
@@ -99,8 +99,8 @@ binary-arch: build install
dh_fixperms -a
# You may want to make some executables suid here.
dh_suidregister -a
- dh_installdeb -a
# dh_makeshlibs -a
+ dh_installdeb -a
# dh_perl -a
dh_shlibdeps -a
dh_gencontrol -a