[Reproducible-commits] [debhelper] 52/61: Let dh_makeshlibs install shlibs files (instead of dh_installdeb)

Mattia Rizzolo mattia at mapreri.org
Sat Apr 4 18:37:39 UTC 2015


This is an automated email from the git hooks/post-receive script.

mapreri-guest pushed a commit to branch pu/reproducible_builds
in repository debhelper.

commit ad2042ad1a02eedc8d667a00d9a765e9c46f9c0b
Author: Niels Thykier <niels at thykier.net>
Date:   Wed Jan 7 21:52:45 2015 +0100

    Let dh_makeshlibs install shlibs files (instead of dh_installdeb)
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 debhelper.pod    |  6 ++++++
 debian/changelog |  4 ++++
 dh_installdeb    |  8 +++++++-
 dh_makeshlibs    | 24 ++++++++++++++++++++++++
 4 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/debhelper.pod b/debhelper.pod
index 82e3133..2c33aab 100644
--- a/debhelper.pod
+++ b/debhelper.pod
@@ -559,6 +559,12 @@ I<ldconfig> in its generated maintainer scripts snippets.  The new
 call will only update the ld cache (instead of also updating
 symlinks).
 
+=item -
+
+B<dh_installdeb> no longer installs a maintainer-provided
+debian/I<package>.shlibs file.  This is now done by B<dh_makeshlibs>
+instead.
+
 =back
 
 =back
diff --git a/debian/changelog b/debian/changelog
index 3e8489e..959bac0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -74,6 +74,10 @@ debhelper (9.20150101.1) UNRELEASED; urgency=medium
     (Closes: #659044)
   * dh_usrlocal: Apply patch from Jérémy Bobbio to generate
     deterministic output.  (Closes: #775020)
+  * dh_makelibs: In compat 10, install the maintainer-provided shlibs
+    file (replacing the generated one).  (Closes: #676168)
+  * dh_installdeb: In compat 10, stop installing the maintainer-provided
+    shilibs file as it is now done by dh_makeibs instead.
 
   [ Bernhard R. Link ]
   * Dh_lib: apply patch from Guillem Jover to support case-insensitive
diff --git a/dh_installdeb b/dh_installdeb
index 26c2b0c..569b0a4 100755
--- a/dh_installdeb
+++ b/dh_installdeb
@@ -42,6 +42,9 @@ shell script snippets generated by other debhelper commands.
 
 These control files are installed into the F<DEBIAN> directory.
 
+Note that I<package>.shlibs is only installed in compat level 9 and
+earlier.  In compat 10, please use L<dh_makeshlibs(1)>.
+
 =item I<package>.conffiles
 
 This control file will be installed into the F<DEBIAN> directory.
@@ -117,7 +120,10 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 	}
 
 	# Install non-executable files
-	foreach my $file (qw{shlibs conffiles triggers}) {
+	my @non_exec_files = (qw{conffiles triggers});
+	# In compat 10, we let dh_makeshlibs handle "shlibs".
+	push(@non_exec_files, 'shlibs') if compat(9);
+	foreach my $file (@non_exec_files) {
 		my $f=pkgfile($package,$file);
 		if ($f) {
 			install_file($f, "$tmp/DEBIAN/$file");
diff --git a/dh_makeshlibs b/dh_makeshlibs
index 66e446a..c315641 100755
--- a/dh_makeshlibs
+++ b/dh_makeshlibs
@@ -30,6 +30,15 @@ debian/control file for packages supporting multiarch.
 
 =over 4
 
+=item debian/I<package>.shlibs
+
+Installs this file, if present, into the package as DEBIAN/shlibs.  If
+omitted, debhelper will generate a shlibs file automatically if it
+detects any libraries.
+
+Note in compat levels 9 and earlier, this file was installed by
+qL<dh_installdeb(1)> rather than B<dh_makeshlibs>.
+
 =item debian/I<package>.symbols
 
 =item debian/I<package>.symbols.I<arch>
@@ -139,6 +148,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 	my %seen;
 	my $need_ldconfig = 0;
 	my $is_multiarch = 0;
+	my $shlibs_file = pkgfile($package, 'shlibs');
 
 	doit("rm", "-f", "$tmp/DEBIAN/shlibs");
 
@@ -181,6 +191,13 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 		}
 		my $deps=$package;
 		if ($dh{V_FLAG_SET}) {
+			if ($shlibs_file) {
+				warning("The provided ${shlibs_file} file overwrites -V");
+				# Clear the flag to avoid duplicate warnings.  Note
+				# we can safely fallthrough as the result will be
+				# replaced regardless.
+				$dh{V_FLAG_SET} = 0;
+			}
 			if ($dh{V_FLAG} ne '') {
 				$deps=$dh{V_FLAG};
 			}	
@@ -233,6 +250,13 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 		}
 	}
 
+	if ($shlibs_file) {
+		if (! -d "$tmp/DEBIAN") {
+			install_dir("$tmp/DEBIAN");
+		}
+		install_file($shlibs_file, "$tmp/DEBIAN/shlibs");
+	}
+
 	if (-e "$tmp/DEBIAN/shlibs") {
 		doit("chmod","0644","$tmp/DEBIAN/shlibs");
 		doit("chown","0:0","$tmp/DEBIAN/shlibs");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/debhelper.git



More information about the Reproducible-commits mailing list