summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debhelper.pod34
-rw-r--r--debian/changelog13
-rwxr-xr-xdh_strip18
-rw-r--r--doc/TODO13
4 files changed, 46 insertions, 32 deletions
diff --git a/debhelper.pod b/debhelper.pod
index d6ecac7f..5a80de2f 100644
--- a/debhelper.pod
+++ b/debhelper.pod
@@ -169,14 +169,18 @@ use this in a package that generates multiple binary packages.
=head2 Automatic generation of debian install scripts
-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 auto-generated code when you run dh_installdeb.
+Some debhelper commands will automatically generate parts of debian
+maintainer scripts. If you want these automatically generated things
+included in your existing debian maintainer scripts, then you need to add
+"#DEBHELPER#" to your scripts, in the place the code should be added.
+"#DEBHELPER#" will be replaced by any auto-generated code when you run
+dh_installdeb.
-All scripts that automatically generate code in this way let it be disabled
-by the -n parameter (see above).
+If a script does not exist at all and debhelper needs to add something to
+it, then debhelper will create the complete script.
+
+All debhelper commands that automatically generate code in this way let it
+be disabled by the -n parameter (see above).
Note that the inserted code will be shell code, so you cannot directly use
it in a perl script. If you would like to embed it into a perl script, here
@@ -324,15 +328,13 @@ 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.
-If you are generating a debian package that has arch-indep and
-arch-dependent 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-dependent package is being built (for
-ports to other architectures). I handle this in the example rules file
-"rules.multi" by calling dh_movefiles in the install target.
-
Once your package uses debhelper to build, be sure to add
-debhelper to your Build-Depends line in debian/control.
+debhelper to your Build-Depends line in debian/control. You should
+build-depend on a verson of debhelper equal to (or greater than) the
+debhelper compatability level your package uses. So if your package used
+compatability level 4:
+
+ Build-Depends: debhelper (>= 4)
=head1 ENVIRONMENT
@@ -385,7 +387,7 @@ your package is built.
A set of example debian/rules files that use debhelper.
-=item http://kitenet.net/programs/debhelper/
+=item L<http://kitenet.net/programs/debhelper/>
Debhelper web site.
diff --git a/debian/changelog b/debian/changelog
index 87cc9bd2..c4a59003 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+debhelper (4.1.12) unstable; urgency=low
+
+ * The "reverse hangover" release.
+ * dh_strip: better documentation, removed extraneous "item" from SYNOPSIS.
+ Closes: #162493
+ * dh_strip: detect and don't strip debug/*.so files.
+ * Note that 4.1.11 changelog entry was incorrect, dh_perl worked fine
+ without that change, but the new behavior is less likely to break things
+ if dpkg-gencontrol changes.
+ * Various improvements to debhelper(1).
+
+ -- Joey Hess <joeyh@debian.org> Fri, 27 Sep 2002 19:37:19 -0400
+
debhelper (4.1.11) unstable; urgency=low
* Make addsubstvars remove old instances of line before adding new. This
diff --git a/dh_strip b/dh_strip
index ac51cd5e..7e04d749 100755
--- a/dh_strip
+++ b/dh_strip
@@ -12,7 +12,7 @@ use Debian::Debhelper::Dh_Lib;
=head1 SYNOPSIS
-B<dh_strip> [S<I<debhelper options>>] [B<-X>I<item>] [item]
+B<dh_strip> [S<I<debhelper options>>] [B<-X>I<item>]
=head1 DESCRIPTION
@@ -20,8 +20,17 @@ dh_strip is a debhelper program that is responsible for stripping
executables, shared libraries, and static libraries that are not used for
debugging.
-It assumes that files that have names like lib*_g.a are static libraries
-used in debugging, and will not strip them.
+This program examines your package build directories and works out what
+to strip on its own. It uses L<file(1)> and file permisions and filenames
+to figure out what files are shared libraries (*.so), executable binaries,
+and static (lib*.a) and debugging libraries (lib*_g.a, debug/*.so), and
+strips each as much as is possible. (Which is not at all for debugging
+libraries.) In general it seems to make very good guesses, and will do the
+right thing in almost all cases.
+
+Since it is very hard to automatically guess if a file is a
+module, and hard to determine how to strip a module, dh_strip does not
+currently deal with stripping binary modules such as .o files.
=head1 OPTIONS
@@ -78,6 +87,9 @@ sub testfile {
return if ($fn=~m/\Q$f\E/);
}
+ # Is it a debug library in a debug subdir?
+ return if $fn=~m/debug\/.*\.so/;
+
# Does its filename look like a shared library?
if (m/.*\.so.*?/) {
# Ok, do the expensive test.
diff --git a/doc/TODO b/doc/TODO
index f0d31c87..99890c0f 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -30,19 +30,6 @@ Wishlist items:
This needs more thought.
-* Support use of environment variables in data taken from user, ie, in
- debian/dirs. The problem with doing this is that we really want to allow
- any filenames in that input, even those that look like environment
- variables. However, it may be worth adding a switch to make it parse
- environment variables. (#20964)
-* It's possible to speed up debhelper by having it cache some values that
- multiple commands call. One way to do this would be to write dh_cache,
- that generates the cache. The catch is that if the user runs that program,
- they are stating that they don't do anything later to invalidate the cache,
- without calling dh_cache again. (#23792)
-* Add a switch to dh_installdeb to allow it to do user defined
- substitutions. OTOH, maybe it's better if people just sed
- postinst.in before debhelper gets its hands on it... (#25235)
* install-info, as of dpkg 1.10, parses the info file for section if
--section is not given. So I should be able to stop parsing it myself for
section, after dpkg 1.10 has been around long enough.