[debhelper-devel] Bug#844077: dh_auto_install --buildsystem=makefile should be told not to strip
Helmut Grohne
helmut at subdivi.de
Sat Nov 12 09:53:34 UTC 2016
Package: debhelper
Version: 10.2.2
Severity: wishlist
Tags: patch
User: helmutg at debian.org
Usertags: rebootstrap
Hi Niels et al,
While working on cross builds I am observing a recurring phenomenon.
Some upstreams like to trip their executables by passing -s to install.
While this may be useful in a number of ways it has two major drawbacks
from a Debian pov.
* cross: install defaults to calling plain strip. That happens to be
the build architecture strip. So any cross build with "install -s"
usually just fails hard.
* dbgsym: Since make install produces stripped executables, none of
DEB_BUILD_OPTIONS=nostrip or -dbgsym packages work.
The best solution to both problems is not to strip during installation,
but letting dh_strip handle that instead. Thus nullifying the -s option
seems like the way to go to me. The usual approach is to specify:
INSTALL=install --strip-program=true
Thus I am proposing to add this parameter to the makefile buildsystem
(and just the makefile buildsystem) in compat level 11.
Examples for using this technique:
* konwert #844070 (not using dh_auto_*)
* http://sources.debian.net/src/ifmail/2.14tx8.10-22/debian/patches/config/?hl=73#L73
I'm currently failing to find more examples, but a vague memory says
that there are some. Looking for packages with missing -dbgsym might
help here, but I don't have a good idea how to do that.
Thus I am putting the proposal up for discussion. This is not as clear
cut as it could be. Carrying this patch has a cost and it might not be
worth the effort. I'm still unsure. What do you think?
Helmut
-------------- next part --------------
diff --minimal -Nru debhelper-10.2.2/Debian/Debhelper/Buildsystem/makefile.pm debhelper-10.2.2+nmu1/Debian/Debhelper/Buildsystem/makefile.pm
--- debhelper-10.2.2/Debian/Debhelper/Buildsystem/makefile.pm 2016-10-01 10:13:53.000000000 +0200
+++ debhelper-10.2.2+nmu1/Debian/Debhelper/Buildsystem/makefile.pm 2016-11-12 10:35:37.000000000 +0100
@@ -8,7 +8,7 @@
use strict;
use warnings;
-use Debian::Debhelper::Dh_Lib qw(dpkg_architecture_value escape_shell clean_jobserver_makeflags is_cross_compiling);
+use Debian::Debhelper::Dh_Lib qw(dpkg_architecture_value escape_shell clean_jobserver_makeflags is_cross_compiling compat);
use parent qw(Debian::Debhelper::Buildsystem);
my %DEB_DEFAULT_TOOLS = (
@@ -141,6 +141,9 @@
}
}
}
+ if (ref($this) eq 'Debian::Debhelper::Buildsystem::makefile' and ! compat(10)) {
+ unshift @_, "INSTALL=install --strip-program=true";
+ }
$this->do_make(@_);
}
@@ -152,6 +155,9 @@
sub install {
my $this=shift;
my $destdir=shift;
+ if (ref($this) eq 'Debian::Debhelper::Buildsystem::makefile' and ! compat(10)) {
+ unshift @_, "INSTALL=install --strip-program=true";
+ }
$this->make_first_existing_target(['install'],
"DESTDIR=$destdir",
"AM_UPDATE_INFO_DIR=no", @_);
diff --minimal -Nru debhelper-10.2.2/debian/changelog debhelper-10.2.2+nmu1/debian/changelog
--- debhelper-10.2.2/debian/changelog 2016-10-08 12:16:23.000000000 +0200
+++ debhelper-10.2.2+nmu1/debian/changelog 2016-11-12 10:38:17.000000000 +0100
@@ -1,3 +1,11 @@
+debhelper (10.2.2+nmu1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Disable stripping during dh_auto_* in makefile buildsystem in compat 11.
+ (Closs: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de> Sat, 12 Nov 2016 10:38:17 +0100
+
debhelper (10.2.2) unstable; urgency=medium
* Fix typo in changelog entry for release 10.2. Thanks to
More information about the debhelper-devel
mailing list