[debhelper-devel] [debhelper] 01/04: dh_builddeb: Pass --root-owner-group to dpkg-deb under R³

Niels Thykier nthykier at moszumanska.debian.org
Wed Oct 18 21:29:00 UTC 2017


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

nthykier pushed a commit to branch support-rrr
in repository debhelper.

commit bfe8280a7d13cf7aecf0810d0f217ab2d0f5ba8c
Author: Niels Thykier <niels at thykier.net>
Date:   Sun Oct 15 14:24:11 2017 +0000

    dh_builddeb: Pass --root-owner-group to dpkg-deb under R³
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 debian/changelog |  2 ++
 dh_builddeb      | 10 ++++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index dc1510d..7d610e3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,8 @@ debhelper (10.9.3) UNRELEASED; urgency=medium
   * dh_testroot: Update check for root to support R³.
   * makefile.pm: Call "make install" with DPKG_GAIN_ROOT_CMD when
     R³ contains the "debhelper/upstream-make-install" keyword.
+  * dh_builddeb: Pass --root-owner-group to dpkg-deb in packages
+    with R³ (except for "binary-targets").
 
  -- Niels Thykier <niels at thykier.net>  Sat, 14 Oct 2017 11:18:19 +0000
 
diff --git a/dh_builddeb b/dh_builddeb
index a412789..28df322 100755
--- a/dh_builddeb
+++ b/dh_builddeb
@@ -25,6 +25,9 @@ and L<dh_gencontrol(1)> have prepared them.
 It supports building multiple binary packages in parallel, when enabled by
 DEB_BUILD_OPTIONS.
 
+In a non-legacy R³ build, B<dh_builddeb> will pass
+B<--root-owner-group> to L<dpkg-deb(1)>.
+
 =head1 OPTIONS
 
 =over 4
@@ -99,6 +102,8 @@ sub build_and_rename_deb {
 }
 
 my @items;
+my @dpkg_options;
+push(@dpkg_options, '--root-owner-group') if not should_use_root();
 
 for my $package (@{$dh{DOPACKAGES}}) {
 	push(@items, [$package, 0]);
@@ -123,7 +128,7 @@ on_items_in_parallel(\@items, sub {
 
 		if ($dbgsym) {
 			my $dbgsym_tmpdir = "debian/.debhelper/${package}/dbgsym-root";
-			doit("dpkg-deb", @{$dh{U_PARAMS}},
+			doit("dpkg-deb", @dpkg_options, @{$dh{U_PARAMS}},
 				"--build", $dbgsym_tmpdir, $dh{DESTDIR});
 			next;
 		}
@@ -139,11 +144,12 @@ on_items_in_parallel(\@items, sub {
 			}
 		}
 		if (! is_udeb($package)) {
-			doit("dpkg-deb", @{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$dh{FILENAME});
+			doit("dpkg-deb", @dpkg_options, @{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$dh{FILENAME});
 		}
 		else {
 			my $filename=$dh{FILENAME};
 			my @cmd = qw(dpkg-deb -z6 -Zxz -Sextreme);
+			push(@cmd, @dpkg_options);
 			push(@cmd, @{$dh{U_PARAMS}}) if $dh{U_PARAMS};
 			push(@cmd, '--build', $tmp);
 			if (! $filename) {

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




More information about the debhelper-devel mailing list