]> git.donarmstrong.com Git - debhelper.git/commitdiff
r392: * DH_COMPAT=3 now enables the following new features which I can't just
authorjoey <joey>
Mon, 27 Nov 2000 03:56:52 +0000 (03:56 +0000)
committerjoey <joey>
Mon, 27 Nov 2000 03:56:52 +0000 (03:56 +0000)
     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.

18 files changed:
Debian/Debhelper/Dh_Getopt.pm
Debian/Debhelper/Dh_Lib.pm
autoscripts/postinst-makeshlibs [new file with mode: 0644]
autoscripts/postrm-makeshlibs [new file with mode: 0644]
debian/changelog
debian/copyright
dh_du [deleted file]
dh_du.1 [deleted file]
dh_fixperms
dh_installdeb
dh_installdeb.1
dh_installdocs
dh_installdocs.1
dh_makeshlibs
dh_makeshlibs.1
doc/TODO
doc/v3
examples/rules.multi

index 02045bbe5620f8ef197678e3c8faafd009d88c51..18157bf0c6eb70172fe00b7af9a7645c1e8b2c5b 100644 (file)
@@ -126,7 +126,6 @@ sub parseopts {
 
                "filename=s" => \$options{FILENAME},
                
-               "number=i" => \$options{PRIORITY},      # deprecated
                "priority=i" => \$options{PRIORITY},
                
                "flavor=s" => \$options{FLAVOR},
index e71895e4d19a11e450698f1a0b3ecf0852ff0e9a..82877340729920eec93ac569f7cd22ca59b47753 100644 (file)
@@ -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 (file)
index 0000000..8a25b9e
--- /dev/null
@@ -0,0 +1,3 @@
+if [ "$1" = "configure" ]; then
+       ldconfig
+fi
diff --git a/autoscripts/postrm-makeshlibs b/autoscripts/postrm-makeshlibs
new file mode 100644 (file)
index 0000000..96bf24e
--- /dev/null
@@ -0,0 +1,3 @@
+if [ "$1" = "remove" ]; then
+       ldconfig
+fi
index 2e812794c63826361901cabcc8618eab433d6093..1930e77c1d84180469f2e9f756c6451fc0af25bc 100644 (file)
@@ -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
index 3e2095860962255555cb2b05d387bbd7a615a285..76867829d4e8202955e9de1747f6d3550f9d69a1 100644 (file)
@@ -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 (executable)
index d786e49..0000000
--- 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 (file)
index e7487b7..0000000
--- 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>
index 616747e3afd7d9cd049bf5bbbce63a411819593d..36ce73cc44824228d7666f7f7d855e4e9299d736 100755 (executable)
@@ -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",
index 6eddb38fa2417aa5d94e9d4552e21fd1958aa641..1447ebfe32c50c4ccdea5e98d7c9d6927076638f 100755 (executable)
@@ -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");
+               }
+       }
 }
index df30597809595125a4a80f061d0e85116950a153..78f1d7c60a5776a6cf7b41bbfed3c76a3d59af82 100644 (file)
@@ -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
index 7af380947bd1a27853ea870896b286052c3dca76..50bc171209cf178ce5d5faed5394c73c50db9dfb 100755 (executable)
@@ -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');
index 7cc0623f14e0b8a67d94883f87d7cd84e7069dff..5f2bf993dec41ee4a61665c7b830051ed3e6b265 100644 (file)
@@ -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
index 6b3ff411af0005d137637c1f35dea7f1879ae1e0..1b50ea115a7e7bae350c30d7d12b9c3c53bfa85a 100755 (executable)
@@ -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");
index 68d331b8a4a00a7fc34f06beada8719946206203..488356dac1fd8d9139a377a2a1aead9e0e336afc 100644 (file)
@@ -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
index 9277132e60a93623c05413ff514a7476c752cab1..fa5fc0339bdc995923df799d1459bc27c10769ae 100644 (file)
--- 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 bd923de63004cf8dffa8db0f781f2291c7fa9f79..1f38b83cf652f967c1d005c31f34c018a746e218 100644 (file)
--- 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.
 
index 0b5d79411a750d9f52ceadc8e437015beba01157..6ba2bc88c8f40e4a5239fb8e8bc6263f080b99d0 100755 (executable)
@@ -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