]> git.donarmstrong.com Git - debhelper.git/commitdiff
r1763: releasing version 4.9.0 4.9.0
authorjoey <joey>
Mon, 13 Jun 2005 19:59:53 +0000 (19:59 +0000)
committerjoey <joey>
Mon, 13 Jun 2005 19:59:53 +0000 (19:59 +0000)
13 files changed:
Debian/Debhelper/Dh_Lib.pm
debhelper.pod
debian/changelog
debian/compat
debian/control
debian/rules
dh_compress
dh_desktop [changed mode: 0644->0755]
dh_installdocs
dh_installmenu
dh_strip
doc/TODO
run [new file with mode: 0755]

index 5ae611c62c6e5dd7f837b4046317b7a7d0db4226..eba314d89c78fc2c1b1a528064eba8f724dae46c 100644 (file)
@@ -16,7 +16,7 @@ use vars qw(@ISA @EXPORT %dh);
            &compat &addsubstvar &delsubstvar &excludefile &package_arch
            &is_udeb &udeb_filename &debhelper_script_subst);
 
-my $max_compat=4;
+my $max_compat=5;
 
 sub init {
        # If DH_OPTIONS is set, prepend it @ARGV.
@@ -245,31 +245,43 @@ sub dirname {
 
 # Pass in a number, will return true iff the current compatibility level
 # is less than or equal to that number.
-sub compat {
-       my $num=shift;
+{
+       my $warned_compat=0;
+       my $c;
+
+       sub compat {
+               my $num=shift;
        
-       my $c=1;
-       if (defined $ENV{DH_COMPAT}) {
-               $c=$ENV{DH_COMPAT};
-       }
-       elsif (-e 'debian/compat') {
-               # Try the file..
-               open (COMPAT_IN, "debian/compat") || error "debian/compat: $!";
-               my $l=<COMPAT_IN>;
-               if (! defined $l || ! length $l) {
-                       warning("debian/compat is empty, assuming level $c");
+               if (! defined $c) {
+                       $c=1;
+                       if (defined $ENV{DH_COMPAT}) {
+                               $c=$ENV{DH_COMPAT};
+                       }
+                       elsif (-e 'debian/compat') {
+                               # Try the file..
+                               open (COMPAT_IN, "debian/compat") || error "debian/compat: $!";
+                               my $l=<COMPAT_IN>;
+                               if (! defined $l || ! length $l) {
+                                       warning("debian/compat is empty, assuming level $c");
+                               }
+                               else {
+                                       chomp $l;
+                                       $c=$l;
+                               }
+                       }
                }
-               else {
-                       chomp $l;
-                       $c=$l
+
+               if ($c < 3 && ! $warned_compat) {
+                       warning("Compatibility levels before 4 are deprecated.");
+                       $warned_compat=1;
+               }
+       
+               if ($c > $max_compat) {
+                       error("Sorry, but $max_compat is the highest compatibility level supported by this debhelper.");
                }
-       }
 
-       if ($c > $max_compat) {
-               error("Sorry, but $max_compat is the highest compatibility 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
@@ -492,6 +504,11 @@ sub filedoublearray {
        my @ret;
        open (DH_FARRAY_IN, $file) || error("cannot read $file: $1");
        while (<DH_FARRAY_IN>) {
+               chomp;
+               # Only ignore comments and empty lines in v5 mode.
+               if (! compat(4)) {
+                       next if /^#/ || /^$/;
+               }
                my @line;
                # Only do glob expansion in v3 mode.
                #
index 1aeec099b2014ebe18b5453ee2f3cf30931f3ba1..76ee5eb6b8dcc5759a217dcf76b3496fd8effeb9 100644 (file)
@@ -72,6 +72,9 @@ files. Documentation or example files to install, files to move, and so on.
 When appropriate, in cases like these, you can use standard shell wildcard
 characters ('?' and '*' and '[..]' character classes) in the files.
 
+You can also put comments in these files; lines beginning with "#" are
+ignored.
+
 =head1 SHARED DEBHELPER OPTIONS
 
 The following command line options are supported by all debhelper programs.
@@ -256,6 +259,7 @@ This is the original debhelper compatibility level, and so it is the default
 one. In this mode, debhelper will use debian/tmp as the package tree
 directory for the first binary package listed in the control file, while using
 debian/<package> for all other packages listed in the control file.
+
 This mode is deprecated.
 
 =item V2
@@ -263,6 +267,8 @@ This mode is deprecated.
 In this mode, debhelper will consistently use debian/<package>
 as the package tree directory for every package that is built.
 
+This mode is deprecated.
+
 =item V3
 
 This mode works like V2, with the following additions:
@@ -312,6 +318,27 @@ dh_link will correct existing links to conform with policy.
 
 =back
 
+=item V5
+
+This mode is still under development. Its changes from V4 are:
+
+=over 8
+
+=item -
+
+Comments are ignored in debhelper config files.
+
+=item -
+
+dh_strip --dbg-package now specifies the name of a package to put debugging
+symbols in, not the packages to take the symbols from.
+
+=item -
+
+dh_installdocs skips installing empty files.
+
+=back
+
 =back
 
 =head2 Doc directory symlinks
@@ -340,7 +367,7 @@ In general, if any debhelper program needs a directory to exist under
 debian/, it will create it. I haven't bothered to document this in all the
 man pages, but for example, dh_installdeb knows to make debian/<package>/DEBIAN/
 before trying to put files there, dh_installmenu knows you need a
-debian/<package>/usr/lib/menu/ before installing the menu files, etc.
+debian/<package>/usr/share/menu/ before installing the menu files, etc.
 
 Once your package uses debhelper to build, be sure to add
 debhelper to your Build-Depends line in debian/control. You should
index 48bf2090d8cc5891d3b609050a129aafdece1a35..ec536070ee305ffdc4f5d4b7c0e31454d1474b71 100644 (file)
@@ -1,10 +1,31 @@
-debhelper (4.2.38) UNRELEASED; urgency=low
-
+debhelper (4.9.0) unstable; urgency=low
+
+  * Begin work on compatability level 5. The set of changes in this mode is
+    still being determined, and will be until debhelper version 5.0 is 
+    released, so use at your own risk.
+  * dh_strip: In v5, make --dbg-package specify a single debugging package
+    that gets the debugging symbols from the other packages acted on.
+    Closes: #230588
+  * In v5, ignore comments in config files. Only comments at the start of
+    lines are ignored. Closes: #206422
+  * In v5, also ignore empty lines in config files. Closes: #212162
+  * In v5, empty files are skipped by dh_installdocs.
+  * Use v5 to build debhelper.
+  * Add deprecation warnings for debhelper v1 and v2.
   * Document getpackages in PROGRAMMING.
   * Add another test-case for dh_link.
   * dh_python: Minimal fix from Joss for -V to make it search the right
     site-packages directories. Closes: #312661
-  * 
+  * Make compat() cache the expensive bits, since we run it more and more,
+    including twice per config file line now..
+  * Add a "run" program to source tree to make local testing easier
+    and simplfy the rules file.
+  * Man page typo fixes. Closes: #305806, #305816
+  * dh_installmenu: menus moved to /usr/share/menu. Closes: #228618
+    Anyone with a binary executable menu file is SOL but there are none in
+    debian currently.
+  * Removed old versioned build deps for stuff that shipped in sarge or
+    earlier, mostly to shut up linda and lintian's stupid messages.
 
  -- Joey Hess <joeyh@debian.org>  Thu,  9 Jun 2005 10:01:20 -0400
 
index b8626c4cff2849624fb67f87cd0ad72b163671ad..7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69 100644 (file)
@@ -1 +1 @@
-4
+5
index ec19e89b32b0f4872184b32f196b640107a9a4d8..6d9d74e6d48a622c8d45924708b4462f582f06b1 100644 (file)
@@ -2,7 +2,6 @@ Source: debhelper
 Section: devel
 Priority: optional
 Maintainer: Joey Hess <joeyh@debian.org>
-Build-Depends: perl (>= 5.6.1), coreutils | fileutils (>= 4.0-2.1), file (>= 3.23-1), dpkg-dev (>= 1.9.0)
 Standards-Version: 3.6.1.0
 
 Package: debhelper
index 08f8e5d24a4637b9b1b9d8176940657cfd4241a2..dbd7bf61d52e9cfacd7a795844f3332d855800d3 100755 (executable)
@@ -1,20 +1,9 @@
 #!/usr/bin/make -f
-# Note that I have to refer to debhelper programs with ./, to make sure
-# I run the most current ones.
-#
 # This is _not_ a good example of a debhelper rules file.
 # See examples/ for some good examples.
 
-# Ensure that builds are self-hosting, which means I have to use the .pm
-# files in this package, not any that may be on the system.
-export PERL5LIB=.
-
-# If any automatic script generation is done in building this package, 
-# be sure to use the new templates from this package.
-export DH_AUTOSCRIPTDIR=autoscripts
-
 # This generates a list of synopses of debhelper commands, and substitutes
-# it in to the #LIST# line on the man page fed to it on stdin. Must be passes
+# it in to the #LIST# line on the man page fed to it on stdin. Must be passed
 # parameters of all the executables or pod files to get the synopses from.
 # (Like I said, this is not a good example of a debhelper rules file..)
 MAKEMANLIST=perl -e ' \
@@ -65,37 +54,37 @@ build-stamp:
        touch build-stamp
 
 clean:
-       ./dh_testdir
-       ./dh_testroot
-       ./dh_clean *.1 *.7 *-stamp Debian/Debhelper/Dh_Version.pm
+       ./run dh_testdir
+       ./run dh_testroot
+       ./run dh_clean *.1 *.7 *-stamp Debian/Debhelper/Dh_Version.pm
 
 test: test-stamp
 test-stamp:
-       ./dh_clean
-       DH_VERSION=10 perl -MTest::Harness -e 'runtests grep { ! /CVS/ && ! /\.svn/ } @ARGV' t/*
-       ./dh_clean
+       ./run dh_clean
+       ./run perl -MTest::Harness -e 'runtests grep { ! /CVS/ && ! /\.svn/ } @ARGV' t/*
+       ./run dh_clean
        touch test-stamp
 
 binary-indep: build
-       ./dh_testdir
-       ./dh_testroot
-       ./dh_clean -k
-       ./dh_install -X .1 dh_* usr/bin
-       ./dh_install Debian/Debhelper/*.pm $(PERLLIBDIR)/Debian/Debhelper/
-       ./dh_install autoscripts usr/share/debhelper
-       ./dh_installdocs doc/*
-       ./dh_installexamples examples/*
-       ./dh_installman *.1 *.7
-       ./dh_installchangelogs
-       ./dh_shlibdeps
-       ./dh_link
-       ./dh_compress
-       ./dh_fixperms
-       ./dh_perl
-       ./dh_installdeb
-       ./dh_gencontrol
-       ./dh_md5sums
-       ./dh_builddeb
+       ./run dh_testdir
+       ./run dh_testroot
+       ./run dh_clean -k
+       ./run dh_install -X .1 dh_* usr/bin
+       ./run dh_install Debian/Debhelper/*.pm $(PERLLIBDIR)/Debian/Debhelper/
+       ./run dh_install autoscripts usr/share/debhelper
+       ./run dh_installdocs doc/*
+       ./run dh_installexamples examples/*
+       ./run dh_installman *.1 *.7
+       ./run dh_installchangelogs
+       ./run dh_shlibdeps
+       ./run dh_link
+       ./run dh_compress
+       ./run dh_fixperms
+       ./run dh_perl
+       ./run dh_installdeb
+       ./run dh_gencontrol
+       ./run dh_md5sums
+       ./run dh_builddeb
 
 # Update the debhelper web page. Not intended for use by anyone except the
 # author.
index cbdf627c55e72205efd1d75f328e5ccc7bb3b3f6..e8d5fcb7942134c59b36596773c232c29c951e39 100755 (executable)
@@ -42,7 +42,7 @@ if you really have to.
 =item B<-X>I<item>, B<--exclude=>I<item>
 
 Exclude files that contain "item" anywhere in their filename from being
-compressed. For example, -X.jpeg will exclude jpeg's from compression.
+compressed. For example, -X.jpeg will exclude jpeg files from compression.
 You may use this option multiple times to build up a list of things to
 exclude. You can accomplish the same thing by using a debian/compress file,
 but this is easier.
old mode 100644 (file)
new mode 100755 (executable)
index f1c6619798c9ff494ca005d3b69ea459d0fdd2a0..52d1675fb7ff787c17603ef38b0953a7099005cd 100755 (executable)
@@ -127,6 +127,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                }
                foreach my $doc (@docs) {
                        next if excludefile($doc);
+                       next if ! -s $doc && ! compat(4); # ignore empty BUGS, etc
                        if (-d $doc && $exclude) {
                            my ($dir_basename) = basename($doc);
                            # Pity there's no cp --exclude ..
index e61b9adf4be6b4c853f2ec8bc05c56b7beb7ecb6..bf827782e59ef82b4597f237303c4db4e42f0d13 100755 (executable)
@@ -23,7 +23,7 @@ interface with the debian menu package. See L<dh_installdeb(1)> for an
 explanation of how this works.
 
 If a file named debian/package.menu exists, then it is installed into
-usr/lib/menu/package in the package build directory. This is a debian menu
+usr/share/menu/package in the package build directory. This is a debian menu
 file. See L<menufile(5)> for its format.
 
 If a file named debian/package.menu-method exits, then it is installed into
@@ -50,10 +50,10 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        my $menu_method=pkgfile($package,"menu-method");
        
        if ($menu ne '') {
-               if (! -d "$tmp/usr/lib/menu") {
-                       doit("install","-d","$tmp/usr/lib/menu");
+               if (! -d "$tmp/usr/share/menu") {
+                       doit("install","-d","$tmp/usr/share/menu");
                }
-               doit("install","-p","-m644",$menu,"$tmp/usr/lib/menu/$package");
+               doit("install","-p","-m644",$menu,"$tmp/usr/share/menu/$package");
                
                # Add the scripts if a menu-method file doesn't exist.
                # The scripts for menu-method handle everything these do, too.
index edab8b9bee9661a44023a610c592a6fe2453ef60..dd21a8ca6fe5ee578f9ca713e15ae9c10255164a 100755 (executable)
--- a/dh_strip
+++ b/dh_strip
@@ -44,19 +44,18 @@ things to exclude.
 
 =item B<--dbg-package=>I<package>
 
-This option tells dh_strip that the given package has an associated "-dbg"
-package. dh_strip will, when stripping off the debug symbols of files in
-the given package, save them to independent files in the package build
-directory for the "-dbg" package.
+Causes dh_strip to save debug symbols stripped from the packages it acts on
+as independent files in the package build directory of the specified debugging
+package.
 
-For example, you might have a package named libfoo, and want to include a
-libfoo-dbg package that contains debugging symbols. The command "dh_strip
---dbg-package=libfoo" will make dh_strip save the debugging symbols for
-usr/lib/libfoo.so.0 into usr/lib/debug/usr/lib/libfoo.so.0 in the package
-build directory for libfoo-dbg. If libfoo-dbg is installed, gdb will
-automatically load up the debugging symbols from it when debugging libfoo.
+For example, if your packages are lifoo and foo and you want to include a
+foo-dbg package with debugging symbols, use dh_strip --dbg-to=foo-dbg.
 
-This option may be repeated to list more than one package.
+Note that this option behaves significantly different in debhelper
+compatibility levels 4 and below. Instead of specifying the name of a debug
+package to put symbols in, it specifies a package (or packages) which
+should have separated debug symbols, and the separated symbols are placed
+in packages with "-dbg" added to their name.
 
 Note that if you use this option, your package should build-depend on
 binutils (>= 2.14.90.0.7).
@@ -180,9 +179,19 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        # Support for keeping the debugging symbols in a detached file.
        my $keep_debug=$dh{KEEP_DEBUG};
        my $debugtmp=$tmp;
-       if (ref $dh{DEBUGPACKAGES} && grep { $_ eq $package } @{$dh{DEBUGPACKAGES}}) {
-               $keep_debug=1;
-               $debugtmp=tmpdir($package."-dbg");
+       if (! compat(4)) {
+               if (ref $dh{DEBUGPACKAGES}) {
+                       $keep_debug=1;
+                       # Note that it's only an array for the v4 stuff;
+                       # for v5 only one value is used.
+                       $debugtmp=tmpdir(@{$dh{DEBUGPACKAGES}}[0]);
+               }
+       }
+       else
+               if (ref $dh{DEBUGPACKAGES} && grep { $_ eq $package } @{$dh{DEBUGPACKAGES}}) {
+                       $keep_debug=1;
+                       $debugtmp=tmpdir($package."-dbg");
+               }
        }
        
        @shared_libs=@executables=@static_libs=();
index bb05d92369042e24cd44175dc23c06d7c23f45aa..94aa95af330a546077ac4a7786f384a8d685df92 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -36,7 +36,6 @@ Wishlist items:
 
 v5:
 
-* comments in config files 
 * escaping in config files (for whitespace)?
 * make dh_installman set up slave links, always assuming wm and man page
   are in same area (/usr/bin and /usr/share/man, or /usr/X11/). Or, if the
@@ -45,9 +44,9 @@ v5:
 
 Deprecated:
 
-* 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 (I do this now),
+* DH_COMPAT 1, 2. Can be removed once all packages are seen to be using 3 or
+  higher. I won't hold my breath. Now with evil warning messages though.
+* Also, grep the entire archive for all dh_* command lines,
   and check to see what other switches are not being used, and maybe remove
   some of them. I'd also like to deprecate/remove debian/compress files, -X is
   a better idea.
diff --git a/run b/run
new file mode 100755 (executable)
index 0000000..00449b0
--- /dev/null
+++ b/run
@@ -0,0 +1,18 @@
+#!/bin/sh
+# Run a debhelper command using files from this directory.
+
+# Run items from current directory by preference.
+PATH=.:$PATH
+
+# Ensure that builds are self-hosting, which means I have to use the .pm
+# files in this package, not any that may be on the system.
+export PERL5LIB=$(pwd)
+
+# If any automatic script generation is done in building this package, 
+# be sure to use the new templates from this package.
+export DH_AUTOSCRIPTDIR=$(pwd)/autoscripts
+
+prog=$1
+shift 1
+
+exec $prog "$@"