diff -Nru debhelper-11.1.3ubuntu1~cloud2/debian/changelog debhelper-11.1.4ubuntu1~cloud0/debian/changelog --- debhelper-11.1.3ubuntu1~cloud2/debian/changelog 2018-02-01 12:38:52.000000000 +0000 +++ debhelper-11.1.4ubuntu1~cloud0/debian/changelog 2018-02-05 11:47:23.000000000 +0000 @@ -1,8 +1,55 @@ -debhelper (11.1.3ubuntu1~cloud2) xenial-queens; urgency=medium +debhelper (11.1.4ubuntu1~cloud0) xenial-queens; urgency=medium * New upstream release for the Ubuntu Cloud Archive. - -- Openstack Ubuntu Testing Bot Thu, 01 Feb 2018 12:38:52 +0000 + -- Openstack Ubuntu Testing Bot Mon, 05 Feb 2018 11:47:23 +0000 + +debhelper (11.1.4ubuntu1) bionic; urgency=medium + + * Merge with Debian unstable; remaining changes: + - Generate ddebs from debhelper instead of pkg-create-dbgsym + + Make debhelper Conflict/Replace pkg-create-dbgsym to force it off. + + Set DBGSYM_PACKAGE_TYPE to ddeb to get correct debian/files output. + - dh_installchangelogs: Do not install upstream changelog in compat + level 7 and higher to avoid pointlessly bloating installed packages. + + -- Adam Conrad Fri, 02 Feb 2018 22:14:23 -0700 + +debhelper (11.1.4) unstable; urgency=medium + + * qmake.pm/qmake4.pm: Avoid global state in the build systems. + * dh_makeshlibs: Fix --no-act, which could still cause writes + to the shlibs file. Thanks to Sven Joachim for reporting it. + (Closes: #888974) + * dh_installdocs: Discard auto-detected main doc package when + passed -A/--all as it causes file-conflicts. + (Closes: #886108, #888294) + * Dh_Lib: Fix regression where "foo{bar}" would not be matched + when the pattern was handled as a glob. The bug was + introduced in debhelper/10.6. Thanks to Wouter Verhelst for + finding the bug. (Closes: #888251) + * d/control: Update the Vcs-* fields to point to + salsa.debian.org as a part of the migration from alioth. + * d/control: Update maintainer address debhelper@packages.d.o + as a part of the migration from alioth. Any subscription + to debhelper-devel@lists.alioth.debian.org should be + replaced by a subscription in tracker.debian.org or + salsa.debian.org. + * d/control: Remove Bernhard R. Link from uploaders as he does + not appear to be active in debhelper at the moment. Thanks + to Bernhard for his past contributions. + * d/control: Bump (Build-)Dependency on dpkg to ensure that + dpkg provides DEB_RULES_REQUIRES_ROOT and DEB_GAIN_ROOT_CMD + as a part of its Rules-Requires-Root support. + * Dh_Lib.pm: Rely on DEB_RULRES_REQUIRES_ROOT instead of the + field to determine whether or not tools may "root-only" + actions (such as chown'ing). + * d/control: Bump dependency on dh-autoreconf to ensure that + packages do not experience #887482. + * makefile.pm: Ensure that command line arguments are passed + deterministically to make when cross-compiling. + + -- Niels Thykier Wed, 31 Jan 2018 21:36:13 +0000 debhelper (11.1.3ubuntu1) bionic; urgency=medium diff -Nru debhelper-11.1.3ubuntu1~cloud2/debian/control debhelper-11.1.4ubuntu1~cloud0/debian/control --- debhelper-11.1.3ubuntu1~cloud2/debian/control 2018-02-01 12:38:52.000000000 +0000 +++ debhelper-11.1.4ubuntu1~cloud0/debian/control 2018-02-05 11:47:23.000000000 +0000 @@ -2,24 +2,24 @@ Section: devel Priority: optional Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Debhelper Maintainers +XSBC-Original-Maintainer: Debhelper Maintainers Uploaders: Niels Thykier , - Bernhard R. Link Build-Depends: dpkg-dev (>= 1.18.0~), perl:any, po4a, Standards-Version: 4.1.3 Testsuite: autopkgtest-pkg-perl -Vcs-Git: https://anonscm.debian.org/git/debhelper/debhelper.git -Vcs-Browser: https://anonscm.debian.org/git/debhelper/debhelper.git +Vcs-Git: https://salsa.debian.org/debian/debhelper.git +Vcs-Browser: https://salsa.debian.org/debian/debhelper Package: debhelper Architecture: all Depends: autotools-dev, binutils, -# Version where dh-autoreconf supports --sourcedirectory. Can be +# Version 12 is where dh-autoreconf supports --sourcedirectory. Can be # relaxed if no packages rely on it. - dh-autoreconf (>= 12~), +# Version 16 fixes #887482 + dh-autoreconf (>= 16~), # Version constraint is to get a version of dh-strip-nondeterminism # without several bugs. The constraint can be relaxed if an older # version is sufficient. @@ -40,8 +40,7 @@ cmake (<< 3.9~), # meson build system uses --wrap-mode, which requires meson (>= 0.40.0) meson (<< 0.40.0~), -Replaces: dh-systemd (<< 1.38), pkg-create-dbgsym -Conflicts: pkg-create-dbgsym +Replaces: dh-systemd (<< 1.38) Suggests: dh-make, dwz Multi-Arch: foreign Description: helper programs for debian/rules diff -Nru debhelper-11.1.3ubuntu1~cloud2/dh debhelper-11.1.4ubuntu1~cloud0/dh --- debhelper-11.1.3ubuntu1~cloud2/dh 2018-01-20 16:40:00.000000000 +0000 +++ debhelper-11.1.4ubuntu1~cloud0/dh 2018-01-28 12:30:39.000000000 +0000 @@ -690,7 +690,7 @@ # In compat <= 8, the sequences are always inlined (those versions do not # recurse into debian/rules anyway). In compat 9+, we never inline an # existing rules target. -my ($rules_targets, $full_sequence) = optimize_sequence(\%sequences, +my ($rules_targets, $full_sequence) = unpack_sequence(\%sequences, $sequence, (!compat(8) ? 0 : 1), \%completed_sequences @@ -754,7 +754,7 @@ run("debian/rules", $rules_target); my $override_packages = $sequence2packages{$rules_target} // \@packages; for my $package (@{$override_packages}) { - my (undef, $seq) = optimize_sequence(\%sequences, $rules_target, 1); + my (undef, $seq) = unpack_sequence(\%sequences, $rules_target, 1); COMMAND: for my $c (reverse(@{$seq})) { for my $j (0 .. $#{$full_sequence}) { if ($c eq $full_sequence->[$j]) { diff -Nru debhelper-11.1.3ubuntu1~cloud2/dh_installdocs debhelper-11.1.4ubuntu1~cloud0/dh_installdocs --- debhelper-11.1.3ubuntu1~cloud2/dh_installdocs 2018-01-07 15:08:16.000000000 +0000 +++ debhelper-11.1.4ubuntu1~cloud0/dh_installdocs 2018-01-24 19:55:12.000000000 +0000 @@ -289,6 +289,9 @@ if (not defined($target_package)) { warning("Cannot auto-detect main package for ${package}. If the default is wrong, please use --doc-main-package"); $target_package = $package; + } elsif ($dh{PARAMS_ALL} and $package ne $target_package and not $dh{DOC_MAIN_PACKAGE}) { + warning("Not using auto-detected $target_package as main doc package for $package: With -A/--all, this would cause file-conflicts."); + $target_package = $package; } if ($dh{EXCLUDE_FIND}) { $exclude .= ' -and ! \( '.$dh{EXCLUDE_FIND}.' \)'; diff -Nru debhelper-11.1.3ubuntu1~cloud2/dh_makeshlibs debhelper-11.1.4ubuntu1~cloud0/dh_makeshlibs --- debhelper-11.1.3ubuntu1~cloud2/dh_makeshlibs 2018-01-07 15:08:16.000000000 +0000 +++ debhelper-11.1.4ubuntu1~cloud0/dh_makeshlibs 2018-01-22 07:17:56.000000000 +0000 @@ -242,10 +242,12 @@ verbose_print('echo ' . escape_shell($_) . ' >> ' . escape_shell("$tmp/DEBIAN/shlibs")) for @deb_lines, @udeb_lines; } - open(my $shlibs_fd, '>', "$tmp/DEBIAN/shlibs") or error("open($tmp/DEBIAN/shlibs): $!"); - # Write the shlibs file with the udeb: lines last. - print {$shlibs_fd} "$_\n" for @deb_lines, @udeb_lines; - close($shlibs_fd) or error("close($tmp/DEBIAN/shlibs"); + if (not $dh{NO_ACT}) { + open(my $shlibs_fd, '>', "$tmp/DEBIAN/shlibs") or error("open($tmp/DEBIAN/shlibs): $!"); + # Write the shlibs file with the udeb: lines last. + print {$shlibs_fd} "$_\n" for @deb_lines, @udeb_lines; + close($shlibs_fd) or error("close($tmp/DEBIAN/shlibs"); + } } if (-e "$tmp/DEBIAN/shlibs") { diff -Nru debhelper-11.1.3ubuntu1~cloud2/dh_strip debhelper-11.1.4ubuntu1~cloud0/dh_strip --- debhelper-11.1.3ubuntu1~cloud2/dh_strip 2018-01-07 15:08:16.000000000 +0000 +++ debhelper-11.1.4ubuntu1~cloud0/dh_strip 2018-02-05 11:47:23.000000000 +0000 @@ -162,6 +162,8 @@ error("--dbgsym-migration and --no-automatic-dbgsym are mutually exclusive"); } +$dh{ENABLE_DBGSYM} = 0 if not $ENV{'DH_BUILD_DDEBS'}; + # This variable can be used to turn off stripping (see Policy). exit 0 if (get_buildoption('nostrip')); diff -Nru debhelper-11.1.3ubuntu1~cloud2/dh_testroot debhelper-11.1.4ubuntu1~cloud0/dh_testroot --- debhelper-11.1.3ubuntu1~cloud2/dh_testroot 2018-01-07 15:08:16.000000000 +0000 +++ debhelper-11.1.4ubuntu1~cloud0/dh_testroot 2018-01-28 17:07:57.000000000 +0000 @@ -66,7 +66,7 @@ if ($requirements eq 'legacy-root') { error("You must run this as root (or use fakeroot)."); } else { - my $env = $ENV{DEB_GAIN_ROOT_CMD} // $ENV{DPKG_GAIN_ROOT_CMD}; + my $env = $ENV{DEB_GAIN_ROOT_CMD}; error("Package needs targetted root but builder has not provided a gain-root command via \${DEB_GAIN_ROOT_CMD}") if not $env; } diff -Nru debhelper-11.1.3ubuntu1~cloud2/lib/Debian/Debhelper/Buildsystem/makefile.pm debhelper-11.1.4ubuntu1~cloud0/lib/Debian/Debhelper/Buildsystem/makefile.pm --- debhelper-11.1.3ubuntu1~cloud2/lib/Debian/Debhelper/Buildsystem/makefile.pm 2018-01-07 15:08:16.000000000 +0000 +++ debhelper-11.1.4ubuntu1~cloud0/lib/Debian/Debhelper/Buildsystem/makefile.pm 2018-01-31 20:21:22.000000000 +0000 @@ -139,7 +139,8 @@ sub build { my $this=shift; if (ref($this) eq 'Debian::Debhelper::Buildsystem::makefile' and is_cross_compiling()) { - while (my ($var, $tool) = each %DEB_DEFAULT_TOOLS) { + for my $var (sort(keys(%DEB_DEFAULT_TOOLS))) { + my $tool = $DEB_DEFAULT_TOOLS{$var}; if ($ENV{$var}) { unshift @_, $var . "=" . $ENV{$var}; } else { diff -Nru debhelper-11.1.3ubuntu1~cloud2/lib/Debian/Debhelper/Buildsystem/qmake.pm debhelper-11.1.4ubuntu1~cloud0/lib/Debian/Debhelper/Buildsystem/qmake.pm --- debhelper-11.1.3ubuntu1~cloud2/lib/Debian/Debhelper/Buildsystem/qmake.pm 2018-01-07 15:08:16.000000000 +0000 +++ debhelper-11.1.4ubuntu1~cloud0/lib/Debian/Debhelper/Buildsystem/qmake.pm 2018-01-21 08:18:16.000000000 +0000 @@ -11,8 +11,6 @@ use Debian::Debhelper::Dh_Lib qw(dpkg_architecture_value error generated_file is_cross_compiling); use parent qw(Debian::Debhelper::Buildsystem::makefile); -our $qmake="qmake"; - my %OS_MKSPEC_MAPPING = ( 'linux' => 'linux-g++', 'kfreebsd' => 'gnukfreebsd-g++', @@ -134,7 +132,7 @@ } $this->mkdir_builddir(); - $this->doit_in_builddir($qmake, @options, @flags, @_); + $this->doit_in_builddir($this->_qmake(), @options, @flags, @_); } sub install { @@ -146,4 +144,8 @@ $this->SUPER::install($destdir, "INSTALL_ROOT=$destdir", @_); } +sub _qmake { + return 'qmake'; +} + 1 diff -Nru debhelper-11.1.3ubuntu1~cloud2/lib/Debian/Debhelper/Buildsystem/qmake_qt4.pm debhelper-11.1.4ubuntu1~cloud0/lib/Debian/Debhelper/Buildsystem/qmake_qt4.pm --- debhelper-11.1.3ubuntu1~cloud2/lib/Debian/Debhelper/Buildsystem/qmake_qt4.pm 2018-01-07 15:08:16.000000000 +0000 +++ debhelper-11.1.4ubuntu1~cloud0/lib/Debian/Debhelper/Buildsystem/qmake_qt4.pm 2018-01-21 08:18:00.000000000 +0000 @@ -8,10 +8,8 @@ "qmake for QT 4 (*.pro)"; } -sub configure { - my $this=shift; - $Debian::Debhelper::Buildsystem::qmake::qmake="qmake-qt4"; - $this->SUPER::configure(@_); +sub _qmake { + return 'qmake-qt4'; } 1 diff -Nru debhelper-11.1.3ubuntu1~cloud2/lib/Debian/Debhelper/Dh_Lib.pm debhelper-11.1.4ubuntu1~cloud0/lib/Debian/Debhelper/Dh_Lib.pm --- debhelper-11.1.3ubuntu1~cloud2/lib/Debian/Debhelper/Dh_Lib.pm 2018-02-01 12:38:52.000000000 +0000 +++ debhelper-11.1.4ubuntu1~cloud0/lib/Debian/Debhelper/Dh_Lib.pm 2018-02-03 05:14:13.000000000 +0000 @@ -14,9 +14,6 @@ # Lowest compat level that does *not* cause deprecation # warnings 'LOWEST_NON_DEPRECATED_COMPAT_LEVEL' => 9, - # Highest "open-beta" compat level. Remember to notify - # debian-devel@l.d.o before bumping this. - 'BETA_TESTER_COMPAT' => 10, # Highest compat level permitted 'MAX_COMPAT_LEVEL' => 12, # Magic value for xargs @@ -25,9 +22,6 @@ 'DH_BUILTIN_VERSION' => \'', #'# Hi emacs. # Default Package-Type / extension (must be aligned with dpkg) 'DEFAULT_PACKAGE_TYPE' => 'deb', - - # Kill-switch for R³ (for backports) - 'DH_ENABLE_RRR_SUPPORT' => 0, }; use constant { @@ -1187,8 +1181,14 @@ for my $pattern (@patterns) { my @m; for my $dir (@dirs) { - @m = bsd_glob("$dir/$pattern", GLOB_CSH & ~(GLOB_NOMAGIC|GLOB_TILDE)); - last if @m;# > 1 or (@m and (-l $m[0] or -e _)); + my $full_pattern = "$dir/$pattern"; + @m = bsd_glob($full_pattern, GLOB_CSH & ~(GLOB_NOMAGIC|GLOB_TILDE)); + last if @m; + # Handle "foo{bar}" pattern (#888251) + if (-l $full_pattern or -e _) { + push(@m, $full_pattern); + last; + } } if (not @m) { $error_handler //= \&glob_expand_error_handler_reject; @@ -1360,7 +1360,7 @@ # As a side effect, populates %package_arches and %package_types # with the types of all packages (not only those returned). my (%package_types, %package_arches, %package_multiarches, %packages_by_type, - %package_sections, $sourcepackage, %rrr, %package_cross_type); + %package_sections, $sourcepackage, %package_cross_type); # Returns source package name sub sourcepackage { @@ -1403,11 +1403,6 @@ if (/^Source:\s*(.*)/i) { $sourcepackage = $1; next; - } elsif (/^Rules-Requires-Root:\s*(.*)/i) { - for my $keyword (split(' ', $1)) { - $rrr{$keyword} = 1; - } - next; } elsif (/^Section:\s(.*)$/i) { $source_section = $1; next; @@ -1416,7 +1411,6 @@ last if (!$_ or eof); # end of stanza. } error("could not find Source: line in control file.") if not defined($sourcepackage); - $rrr{'binary-targets'} = 1 if not %rrr; while (<$fd>) { chomp; @@ -1509,32 +1503,36 @@ # - Takes an optional keyword; if passed, this will return true if the keyword is listed in R^3 (Rules-Requires-Root) # - If the optional keyword is omitted or not present in R^3 and R^3 is not 'binary-targets', then returns false # - Returns true otherwise (i.e. keyword is in R^3 or R^3 is 'binary-targets') -sub should_use_root { - my ($keyword) = @_; - return 1 if not DH_ENABLE_RRR_SUPPORT; - getpackages() if not %rrr; - - return 0 if exists($rrr{'no'}); - return 1 if exists($rrr{'binary-targets'}); - return 0 if not defined($keyword); - return 1 if exists($rrr{$keyword}); - return 0; +{ + my %rrr; + sub should_use_root { + my ($keyword) = @_; + my $rrr_env = $ENV{'DEB_RULES_REQUIRES_ROOT'} // 'binary-targets'; + $rrr_env =~ s/^\s++//; + $rrr_env =~ s/\s++$//; + return 0 if $rrr_env eq 'no'; + return 1 if $rrr_env eq 'binary-targets'; + return 0 if not defined($keyword); + + %rrr = map { $_ => 1 } split(' ', $rrr_env) if not %rrr; + return 1 if exists($rrr{$keyword}); + return 0; + } } # Returns the "gain root command" as a list suitable for passing as a part of the command to "doit()" sub gain_root_cmd { - my $raw_cmd = $ENV{DEB_GAIN_ROOT_CMD} // $ENV{DPKG_GAIN_ROOT_CMD}; + my $raw_cmd = $ENV{DEB_GAIN_ROOT_CMD}; return if not defined($raw_cmd) or $raw_cmd =~ m/^\s*+$/; return split(' ', $raw_cmd); } sub root_requirements { - return 'legacy-root' if not DH_ENABLE_RRR_SUPPORT; - - getpackages() if not %rrr; - - return 'none' if exists($rrr{'no'}); - return 'legacy-root' if exists($rrr{'binary-targets'}); + my $rrr_env = $ENV{'DEB_RULES_REQUIRES_ROOT'} // 'binary-targets'; + $rrr_env =~ s/^\s++//; + $rrr_env =~ s/\s++$//; + return 'none' if $rrr_env eq 'no'; + return 'legacy-root' if $rrr_env eq 'binary-targets'; return 'targeted-promotion'; } @@ -1677,7 +1675,7 @@ if (@generated_scripts) { if ($dh{VERBOSE}) { verbose_print('cp -f ' . escape_shell($file) . " $tmp/DEBIAN/$script"); - verbose_print("perl -p -i -e s~#DEBHELPER#~qx{cat @generated_scripts}~eg\" $tmp/DEBIAN/$script"); + verbose_print("perl -p -i -e \"s~#DEBHELPER#~qx{cat @generated_scripts}~eg\" $tmp/DEBIAN/$script"); } # Add this into the script, where it has #DEBHELPER# my $text = _concat_slurp_script_files(@generated_scripts); diff -Nru debhelper-11.1.3ubuntu1~cloud2/lib/Debian/Debhelper/SequencerUtil.pm debhelper-11.1.4ubuntu1~cloud0/lib/Debian/Debhelper/SequencerUtil.pm --- debhelper-11.1.3ubuntu1~cloud2/lib/Debian/Debhelper/SequencerUtil.pm 2018-01-07 15:08:16.000000000 +0000 +++ debhelper-11.1.4ubuntu1~cloud0/lib/Debian/Debhelper/SequencerUtil.pm 2018-01-28 12:30:39.000000000 +0000 @@ -12,7 +12,7 @@ our @EXPORT = qw( extract_rules_target_name to_rules_target - optimize_sequence + unpack_sequence rules_explicit_target DUMMY_TARGET ); @@ -31,9 +31,11 @@ return 'debian/rules '.join(' ', @_); } -sub optimize_sequence { +sub unpack_sequence { my ($sequences, $sequence_name, $always_inline, $completed_sequences) = @_; my (@sequence, @targets, %seen, %non_inlineable_targets, @stack); + # Walk through the sequence effectively doing a DFS of the rules targets + # (when we are allowed to inline them). push(@stack, [@{$sequences->{$sequence_name}}]); while (@stack) { my $current_sequence = pop(@stack); diff -Nru debhelper-11.1.3ubuntu1~cloud2/t/buildsystems/buildsystem_tests.t debhelper-11.1.4ubuntu1~cloud0/t/buildsystems/buildsystem_tests.t --- debhelper-11.1.3ubuntu1~cloud2/t/buildsystems/buildsystem_tests.t 2018-01-07 15:08:16.000000000 +0000 +++ debhelper-11.1.4ubuntu1~cloud0/t/buildsystems/buildsystem_tests.t 2018-01-28 21:09:50.000000000 +0000 @@ -252,6 +252,7 @@ $tmp = write_debian_rules(<<'EOF'); #!/usr/bin/make -f +export DEB_RULES_REQUIRES_ROOT:=no override_dh_auto_build: $(MAKE) %: diff -Nru debhelper-11.1.3ubuntu1~cloud2/t/dh_installdocs/dh_installdocs.t debhelper-11.1.4ubuntu1~cloud0/t/dh_installdocs/dh_installdocs.t --- debhelper-11.1.3ubuntu1~cloud2/t/dh_installdocs/dh_installdocs.t 2018-01-07 15:08:16.000000000 +0000 +++ debhelper-11.1.4ubuntu1~cloud0/t/dh_installdocs/dh_installdocs.t 2018-01-31 21:12:25.000000000 +0000 @@ -16,15 +16,10 @@ debian/copyright )); -if (uid_0_test_is_ok()) { - plan(tests => 5); -} else { - plan skip_all => 'fakeroot required'; -} - -my $NEEDS_ROOT = { 'needs_root' => 1 }; -my $NEEDS_ROOT_NODOC_PROFILE = { - 'needs_root' => 1, +plan(tests => 5); + + +my $NODOC_PROFILE = { 'env' => { 'DEB_BUILD_PROFILES' => 'nodoc', }, @@ -33,14 +28,14 @@ my $doc = "debian/docfile"; each_compat_subtest { - ok(run_dh_tool($NEEDS_ROOT, 'dh_installdocs', '-pbar', $doc)); + ok(run_dh_tool('dh_installdocs', '-pbar', $doc)); ok(-e "debian/bar/usr/share/doc/bar/docfile"); remove_tree(qw(debian/foo debian/bar debian/baz)); }; each_compat_subtest { #regression in debhelper 9.20160702 (#830309) - ok(run_dh_tool($NEEDS_ROOT, 'dh_installdocs', '-pbaz', '--link-doc=foo', $doc)); + ok(run_dh_tool('dh_installdocs', '-pbaz', '--link-doc=foo', $doc)); ok(-l "debian/baz/usr/share/doc/baz"); ok(readlink("debian/baz/usr/share/doc/baz") eq 'foo'); @@ -49,7 +44,7 @@ }; each_compat_subtest { - ok(run_dh_tool($NEEDS_ROOT, 'dh_installdocs', '-pfoo', '--link-doc=bar', $doc)); + ok(run_dh_tool('dh_installdocs', '-pfoo', '--link-doc=bar', $doc)); ok(-l "debian/foo/usr/share/doc/foo"); ok(readlink("debian/foo/usr/share/doc/foo") eq 'bar'); @@ -61,7 +56,7 @@ each_compat_subtest { # docs are ignored, but copyright file is still there - ok(run_dh_tool($NEEDS_ROOT_NODOC_PROFILE, 'dh_installdocs', $doc)); + ok(run_dh_tool($NODOC_PROFILE, 'dh_installdocs', $doc)); for my $pkg (qw(foo bar baz)) { ok(! -e "debian/$pkg/usr/share/doc/$pkg/docfile"); ok(-e "debian/$pkg/usr/share/doc/$pkg/copyright"); @@ -71,7 +66,7 @@ each_compat_subtest { # docs are ignored, but symlinked doc dir is still there - ok(run_dh_tool($NEEDS_ROOT_NODOC_PROFILE, 'dh_installdocs', '-pfoo', '--link-doc=bar', $doc)); + ok(run_dh_tool($NODOC_PROFILE, 'dh_installdocs', '-pfoo', '--link-doc=bar', $doc)); ok(-l "debian/foo/usr/share/doc/foo"); ok(readlink("debian/foo/usr/share/doc/foo") eq 'bar'); ok(! -e "debian/foo/usr/share/doc/bar/docfile"); diff -Nru debhelper-11.1.3ubuntu1~cloud2/t/dh_installinit/dh_installinit.t debhelper-11.1.4ubuntu1~cloud0/t/dh_installinit/dh_installinit.t --- debhelper-11.1.3ubuntu1~cloud2/t/dh_installinit/dh_installinit.t 2018-01-07 15:08:16.000000000 +0000 +++ debhelper-11.1.4ubuntu1~cloud0/t/dh_installinit/dh_installinit.t 2018-01-31 21:13:03.000000000 +0000 @@ -14,15 +14,11 @@ debian/foo.service )); -if (uid_0_test_is_ok()) { - plan(tests => 2); -} else { - plan skip_all => 'fakeroot required'; -} +plan(tests => 2); each_compat_up_to_and_incl_subtest(10, sub { make_path(qw(debian/foo debian/bar debian/baz)); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_installinit')); + ok(run_dh_tool('dh_installinit')); ok(-e "debian/foo/lib/systemd/system/foo.service"); ok(find_script('foo', 'postinst')); ok(run_dh_tool('dh_clean')); @@ -32,14 +28,14 @@ each_compat_from_and_above_subtest(11, sub { make_path(qw(debian/foo debian/bar debian/baz)); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_installinit')); + ok(run_dh_tool('dh_installinit')); ok(! -e "debian/foo/lib/systemd/system/foo.service"); ok(!find_script('foo', 'postinst')); ok(run_dh_tool('dh_clean')); make_path(qw(debian/foo/lib/systemd/system/ debian/bar debian/baz)); install_file('debian/foo.service', 'debian/foo/lib/systemd/system/foo.service'); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_installinit')); + ok(run_dh_tool('dh_installinit')); ok(!find_script('foo', 'postinst')); ok(run_dh_tool('dh_clean')); }); diff -Nru debhelper-11.1.3ubuntu1~cloud2/t/dh_installsystemd/dh_installsystemd.t debhelper-11.1.4ubuntu1~cloud0/t/dh_installsystemd/dh_installsystemd.t --- debhelper-11.1.3ubuntu1~cloud2/t/dh_installsystemd/dh_installsystemd.t 2018-01-14 10:22:41.000000000 +0000 +++ debhelper-11.1.4ubuntu1~cloud0/t/dh_installsystemd/dh_installsystemd.t 2018-01-31 21:12:44.000000000 +0000 @@ -15,11 +15,7 @@ debian/foo2.service )); -if (uid_0_test_is_ok()) { - plan(tests => 1); -} else { - plan skip_all => 'fakeroot required'; -} +plan(tests => 1); sub unit_is_enabled { my ($package, $unit, $num_enables, $num_masks) = @_; @@ -55,7 +51,7 @@ # Units are installed and enabled each_compat_subtest { - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_installsystemd')); + ok(run_dh_tool( 'dh_installsystemd')); ok(-e "debian/foo/lib/systemd/system/foo.service"); ok(find_script('foo', 'postinst')); unit_is_enabled('foo', 'foo', 1); @@ -66,7 +62,7 @@ make_path('debian/foo/lib/systemd/system/'); install_file('debian/foo2.service', 'debian/foo/lib/systemd/system/foo2.service'); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_installsystemd')); + ok(run_dh_tool('dh_installsystemd')); ok(-e "debian/foo/lib/systemd/system/foo.service"); ok(find_script('foo', 'postinst')); unit_is_enabled('foo', 'foo', 1); @@ -77,7 +73,7 @@ make_path('debian/foo/lib/systemd/system/'); install_file('debian/foo2.service', 'debian/foo/lib/systemd/system/foo2.service'); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_installsystemd', '--no-start')); + ok(run_dh_tool('dh_installsystemd', '--no-start')); ok(-e "debian/foo/lib/systemd/system/foo.service"); ok(find_script('foo', 'postinst')); unit_is_enabled('foo', 'foo', 1); @@ -88,8 +84,8 @@ make_path('debian/foo/lib/systemd/system/'); install_file('debian/foo2.service', 'debian/foo/lib/systemd/system/foo2.service'); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_installsystemd', '--no-start', 'debian/foo.service')); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_installsystemd', '-p', 'foo', 'foo2.service')); + ok(run_dh_tool('dh_installsystemd', '--no-start', 'debian/foo.service')); + ok(run_dh_tool('dh_installsystemd', '-p', 'foo', 'foo2.service')); ok(-e "debian/foo/lib/systemd/system/foo.service"); ok(find_script('foo', 'postinst')); unit_is_enabled('foo', 'foo', 1); @@ -100,8 +96,8 @@ make_path('debian/foo/lib/systemd/system/'); install_file('debian/foo2.service', 'debian/foo/lib/systemd/system/foo2.service'); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_installsystemd', '--no-enable', 'debian/foo.service')); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_installsystemd', '-p', 'foo', 'foo2.service')); + ok(run_dh_tool('dh_installsystemd', '--no-enable', 'debian/foo.service')); + ok(run_dh_tool('dh_installsystemd', '-p', 'foo', 'foo2.service')); ok(-e "debian/foo/lib/systemd/system/foo.service"); ok(find_script('foo', 'postinst')); unit_is_enabled('foo', 'foo', 0, 1); # Disabled units are still masked on removal @@ -111,7 +107,7 @@ ok(run_dh_tool('dh_clean')); make_path('debian/foo/lib/systemd/system/'); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_installsystemd', '--no-restart-after-upgrade')); + ok(run_dh_tool('dh_installsystemd', '--no-restart-after-upgrade')); my @foo_postinst = find_script('foo', 'postinst'); ok(@foo_postinst); my $matches = @foo_postinst ? grep { m{deb-systemd-invoke start .*foo.service} } `cat @foo_postinst` : -1; @@ -121,7 +117,7 @@ # Quoting #764730 make_path('debian/foo/lib/systemd/system/'); install_file('debian/foo.service', 'debian/foo/lib/systemd/system/foo\x2dfuse.service'); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_installsystemd')); + ok(run_dh_tool('dh_installsystemd')); unit_is_enabled('foo', 'foo\x2dfuse', 1); unit_is_started('foo', 'foo\x2dfuse', 1); ok(run_dh_tool('dh_clean')); @@ -129,12 +125,12 @@ # --name flag #870768 make_path('debian/foo/lib/systemd/system/'); install_file('debian/foo2.service', 'debian/foo/lib/systemd/system/foo2.service'); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_installsystemd', '--name=foo')); + ok(run_dh_tool('dh_installsystemd', '--name=foo')); unit_is_enabled('foo', 'foo', 1); unit_is_started('foo', 'foo', 1); unit_is_enabled('foo', 'foo2', 0); unit_is_started('foo', 'foo2', 0); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_installsystemd', '--name=foo2')); + ok(run_dh_tool('dh_installsystemd', '--name=foo2')); unit_is_enabled('foo', 'foo', 1); unit_is_started('foo', 'foo', 1); unit_is_enabled('foo', 'foo2', 1); diff -Nru debhelper-11.1.3ubuntu1~cloud2/t/dh_installsystemd/dh_installsystemd_tmpfiles.t debhelper-11.1.4ubuntu1~cloud0/t/dh_installsystemd/dh_installsystemd_tmpfiles.t --- debhelper-11.1.3ubuntu1~cloud2/t/dh_installsystemd/dh_installsystemd_tmpfiles.t 2018-01-07 15:08:16.000000000 +0000 +++ debhelper-11.1.4ubuntu1~cloud0/t/dh_installsystemd/dh_installsystemd_tmpfiles.t 2018-01-31 21:12:54.000000000 +0000 @@ -15,18 +15,14 @@ debian/foo.init )); -if (uid_0_test_is_ok()) { - plan(tests => 1); -} else { - plan skip_all => 'fakeroot required'; -} +plan(tests => 1); # Units are installed and enabled each_compat_from_and_above_subtest(11, sub { make_path('debian/foo/usr/lib/tmpfiles.d'); create_empty_file('debian/foo/usr/lib/tmpfiles.d/foo.conf'); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_installinit')); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_installsystemd')); + ok(run_dh_tool('dh_installinit')); + ok(run_dh_tool('dh_installsystemd')); ok(-e "debian/foo/etc/init.d/foo"); ok(-e "debian/foo/lib/systemd/system/foo.service"); my @postinst = find_script('foo', 'postinst'); diff -Nru debhelper-11.1.3ubuntu1~cloud2/t/dh_installsystemd/dh_systemd.t debhelper-11.1.4ubuntu1~cloud0/t/dh_installsystemd/dh_systemd.t --- debhelper-11.1.3ubuntu1~cloud2/t/dh_installsystemd/dh_systemd.t 2018-01-14 10:22:18.000000000 +0000 +++ debhelper-11.1.4ubuntu1~cloud0/t/dh_installsystemd/dh_systemd.t 2018-01-31 21:18:24.000000000 +0000 @@ -15,11 +15,7 @@ debian/foo2.service )); -if (uid_0_test_is_ok()) { - plan(tests => 1); -} else { - plan skip_all => 'fakeroot required'; -} +plan(tests => 1); sub unit_is_enabled { my ($package, $unit, $num_enables, $num_masks) = @_; @@ -51,8 +47,8 @@ # Units are installed and enabled each_compat_up_to_and_incl_subtest(10, sub { - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_systemd_enable')); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_systemd_start')); + ok(run_dh_tool('dh_systemd_enable')); + ok(run_dh_tool('dh_systemd_start')); ok(-e "debian/foo/lib/systemd/system/foo.service"); ok(-e "debian/foo.postinst.debhelper"); unit_is_enabled('foo', 'foo', 1); @@ -63,8 +59,8 @@ make_path('debian/foo/lib/systemd/system/'); install_file('debian/foo2.service', 'debian/foo/lib/systemd/system/foo2.service'); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_systemd_enable')); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_systemd_start')); + ok(run_dh_tool('dh_systemd_enable')); + ok(run_dh_tool('dh_systemd_start')); ok(-e "debian/foo/lib/systemd/system/foo.service"); ok(-e "debian/foo.postinst.debhelper"); unit_is_enabled('foo', 'foo', 1); @@ -75,8 +71,8 @@ make_path('debian/foo/lib/systemd/system/'); install_file('debian/foo2.service', 'debian/foo/lib/systemd/system/foo2.service'); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_systemd_enable')); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_systemd_start', '--no-start')); + ok(run_dh_tool('dh_systemd_enable')); + ok(run_dh_tool('dh_systemd_start', '--no-start')); ok(-e "debian/foo/lib/systemd/system/foo.service"); ok(-e "debian/foo.postinst.debhelper"); unit_is_enabled('foo', 'foo', 1); @@ -87,9 +83,9 @@ make_path('debian/foo/lib/systemd/system/'); install_file('debian/foo2.service', 'debian/foo/lib/systemd/system/foo2.service'); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_systemd_enable')); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_systemd_start', '--no-start', 'debian/foo.service')); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_systemd_start', '-p', 'foo', 'foo2.service')); + ok(run_dh_tool('dh_systemd_enable')); + ok(run_dh_tool('dh_systemd_start', '--no-start', 'debian/foo.service')); + ok(run_dh_tool('dh_systemd_start', '-p', 'foo', 'foo2.service')); ok(-e "debian/foo/lib/systemd/system/foo.service"); ok(-e "debian/foo.postinst.debhelper"); unit_is_enabled('foo', 'foo', 1); @@ -100,9 +96,9 @@ make_path('debian/foo/lib/systemd/system/'); install_file('debian/foo2.service', 'debian/foo/lib/systemd/system/foo2.service'); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_systemd_enable', '--no-enable', 'debian/foo.service')); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_systemd_enable', '-p', 'foo', 'foo2.service')); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_systemd_start')); + ok(run_dh_tool('dh_systemd_enable', '--no-enable', 'debian/foo.service')); + ok(run_dh_tool('dh_systemd_enable', '-p', 'foo', 'foo2.service')); + ok(run_dh_tool('dh_systemd_start')); ok(-e "debian/foo/lib/systemd/system/foo.service"); ok(-e "debian/foo.postinst.debhelper"); unit_is_enabled('foo', 'foo', 0, 1); # Disabled units are still masked on removal @@ -113,7 +109,7 @@ make_path('debian/foo/lib/systemd/system/'); install_file('debian/foo.service', 'debian/foo/lib/systemd/system/foo.service'); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_systemd_start', '--no-restart-after-upgrade')); + ok(run_dh_tool('dh_systemd_start', '--no-restart-after-upgrade')); my $matches = grep { m{deb-systemd-invoke start .*foo.service} } `cat debian/foo.postinst.debhelper`; ok($matches == 1); ok(run_dh_tool('dh_clean')); @@ -121,8 +117,8 @@ # Quoting #764730 make_path('debian/foo/lib/systemd/system/'); install_file('debian/foo.service', 'debian/foo/lib/systemd/system/foo\x2dfuse.service'); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_systemd_enable')); - ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_systemd_start')); + ok(run_dh_tool('dh_systemd_enable')); + ok(run_dh_tool('dh_systemd_start')); unit_is_enabled('foo', 'foo\x2dfuse', 1); unit_is_started('foo', 'foo\x2dfuse', 1); ok(run_dh_tool('dh_clean')); diff -Nru debhelper-11.1.3ubuntu1~cloud2/t/dh-sequencer.t debhelper-11.1.4ubuntu1~cloud0/t/dh-sequencer.t --- debhelper-11.1.3ubuntu1~cloud2/t/dh-sequencer.t 2018-01-07 15:08:16.000000000 +0000 +++ debhelper-11.1.4ubuntu1~cloud0/t/dh-sequencer.t 2018-01-28 12:30:39.000000000 +0000 @@ -55,33 +55,33 @@ is_deeply( - [optimize_sequence(\%sequences, 'build')], + [unpack_sequence(\%sequences, 'build')], [[], [@bd]], 'Inlined build sequence matches build-indep/build-arch'); is_deeply( - [optimize_sequence(\%sequences, 'install')], + [unpack_sequence(\%sequences, 'install')], [[], [@bd, @i]], 'Inlined install sequence matches build-indep/build-arch + install commands'); is_deeply( - [optimize_sequence(\%sequences, 'binary-arch')], + [unpack_sequence(\%sequences, 'binary-arch')], [[], [@bd, @i, @ba, @b]], 'Inlined binary-arch sequence has all the commands'); is_deeply( - [optimize_sequence(\%sequences, 'binary-indep')], + [unpack_sequence(\%sequences, 'binary-indep')], [[], [@bd, @i, @b]], 'Inlined binary-indep sequence has all the commands except @bd'); is_deeply( - [optimize_sequence(\%sequences, 'binary')], + [unpack_sequence(\%sequences, 'binary')], [[], [@bd, @i, @ba, @b]], 'Inlined binary sequence has all the commands'); is_deeply( - [optimize_sequence(\%sequences, 'binary', 0, { 'build' => 1, 'build-arch' => 1, 'build-indep' => 1})], + [unpack_sequence(\%sequences, 'binary', 0, { 'build' => 1, 'build-arch' => 1, 'build-indep' => 1})], [[], [@i, @ba, @b]], 'Inlined binary sequence with build-* done has @i, @ba and @b'); @@ -89,17 +89,17 @@ local $Debian::Debhelper::SequencerUtil::EXPLICIT_TARGETS{'build'} = 1; is_deeply( - [optimize_sequence(\%sequences, 'binary')], + [unpack_sequence(\%sequences, 'binary')], [[to_rules_target('build')], [@i, @ba, @b]], 'Inlined binary sequence has all the commands but build target is opaque'); is_deeply( - [optimize_sequence(\%sequences, 'binary', 0, { 'build' => 1, 'build-arch' => 1, 'build-indep' => 1})], + [unpack_sequence(\%sequences, 'binary', 0, { 'build' => 1, 'build-arch' => 1, 'build-indep' => 1})], [[], [@i, @ba, @b]], 'Inlined binary sequence has all the commands with build-* done and not build-target'); is_deeply( - [optimize_sequence(\%sequences, 'build')], + [unpack_sequence(\%sequences, 'build')], [[], [@bd]], 'build sequence is inlineable'); @@ -109,9 +109,9 @@ local $Debian::Debhelper::SequencerUtil::EXPLICIT_TARGETS{'install-arch'} = 1; is_deeply( - [optimize_sequence(\%sequences, 'binary')], + [unpack_sequence(\%sequences, 'binary')], # @bd_minimal, @bd and @i should be "-i"-only, @ba + @b should be both. - # Unfortunately, optimize_sequence cannot show that. + # Unfortunately, unpack_sequence cannot show that. [[to_rules_target('install-arch')], [@bd, @i, @ba, @b]], 'Inlined binary sequence has all the commands'); } @@ -120,9 +120,9 @@ local $Debian::Debhelper::SequencerUtil::EXPLICIT_TARGETS{'install-arch'} = 1; local $Debian::Debhelper::SequencerUtil::EXPLICIT_TARGETS{'build'} = 1; - my $actual = [optimize_sequence(\%sequences, 'binary')]; + my $actual = [unpack_sequence(\%sequences, 'binary')]; # @i should be "-i"-only, @ba + @b should be both. - # Unfortunately, optimize_sequence cannot show that. + # Unfortunately, unpack_sequence cannot show that. my $expected = [[to_rules_target('build'), to_rules_target('install-arch')], [@i, @ba, @b]]; # Permit some fuzz on the order between build and install-arch if ($actual->[0][0] eq to_rules_target('install-arch')) { diff -Nru debhelper-11.1.3ubuntu1~cloud2/t/maintscript.t debhelper-11.1.4ubuntu1~cloud0/t/maintscript.t --- debhelper-11.1.3ubuntu1~cloud2/t/maintscript.t 2018-01-07 15:08:16.000000000 +0000 +++ debhelper-11.1.4ubuntu1~cloud0/t/maintscript.t 2018-01-31 21:16:13.000000000 +0000 @@ -9,11 +9,7 @@ use Test::DH; use Debian::Debhelper::Dh_Lib qw(!dirname); -if (uid_0_test_is_ok()) { - plan(tests => 2); -} else { - plan skip_all => 'fakeroot required'; -} +plan(tests => 2); each_compat_up_to_and_incl_subtest(10, sub { my @scripts = qw{postinst preinst prerm postrm}; @@ -29,7 +25,7 @@ EOF close($fd) or die("close($file): $!\n"); - run_dh_tool( { 'needs_root' => 1 }, 'dh_installdeb'); + run_dh_tool('dh_installdeb'); for my $script (@scripts) { my @output=`cat debian/debhelper.$script.debhelper`; @@ -50,7 +46,7 @@ EOF close($fd) or die("close($file): $!\n"); - my $res = run_dh_tool( { 'needs_root' => 1, 'quiet' => 1 }, 'dh_installdeb'); + my $res = run_dh_tool( { 'quiet' => 1 }, 'dh_installdeb'); remove_tree('debian/debhelper', 'debian/tmp', 'debian/.debhelper'); rm_files(@scripts); diff -Nru debhelper-11.1.3ubuntu1~cloud2/t/Test/DH.pm debhelper-11.1.4ubuntu1~cloud0/t/Test/DH.pm --- debhelper-11.1.3ubuntu1~cloud2/t/Test/DH.pm 2018-01-07 15:08:16.000000000 +0000 +++ debhelper-11.1.4ubuntu1~cloud0/t/Test/DH.pm 2018-01-28 21:11:14.000000000 +0000 @@ -26,6 +26,8 @@ $ENV{PERL5LIB} = join(':', "${ROOT_DIR}/lib", (grep { defined } $ENV{PERL5LIB})) if not $ENV{PERL5LIB} or $ENV{PERL5LIB} !~ m{\Q$ROOT_DIR\E(?:/lib)?/?:}; $ENV{DH_AUTOSCRIPTDIR} = "$ROOT_DIR/autoscripts"; +# Nothing in the tests requires root. +$ENV{DEB_RULES_REQUIRES_ROOT} = 'no'; # Drop DEB_BUILD_PROFILES and DEB_BUILD_OPTIONS so they don't interfere delete($ENV{DEB_BUILD_PROFILES}); @@ -87,7 +89,7 @@ sub uid_0_test_is_ok { return $ROOT_OK if defined($ROOT_OK); my $ok = 0; - if (Debian::Debhelper::Dh_Lib::DH_ENABLE_RRR_SUPPORT or $< == 0) { + if ($< == 0) { $ok = 1; } else { system('fakeroot true 2>/dev/null');