Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package debhelper for openSUSE:Factory 
checked in at 2023-01-05 15:01:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/debhelper (Old)
 and      /work/SRC/openSUSE:Factory/.debhelper.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "debhelper"

Thu Jan  5 15:01:32 2023 rev:14 rq:1056155 version:13.11.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/debhelper/debhelper.changes      2022-12-12 
17:42:12.157962709 +0100
+++ /work/SRC/openSUSE:Factory/.debhelper.new.1563/debhelper.changes    
2023-01-05 15:01:48.853358320 +0100
@@ -1,0 +2,20 @@
+Thu Jan  5 07:13:31 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- update to 13.11.4:
+  * meson.pm: Pass --destdir to `meson install`.  (Closes: #1027014)
+  * Dh_Lib.pm: Have addsubstvars check the value for newlines (Closes: 
#1026014)
+  * Stop using (fake)root for mkdirs again.
+    Should have been removed as a part of the clean up in the previous
+    upload but was overlooked causing breakage in packages still having
+    `Rules-Requires-Root: binary-targets`. (Closes: #1026125)
+  * PROGRAMMING.md: Fix typos
+  * Dh_Lib.pm: Remove unused third parameter from install_dh_config_file
+  * makefile.pm: Provide hook for subclasses to reuse cross-build support
+  * Dh_Lib.pm: Revert change where `install_{file,prog,lib}` would use chown.
+    The problem that prompted this change was not caused by debhelper but
+    by fakeroot (#1024544) and the change in debhelper would not even
+    function as a work around in this case.  Accordingly, the extra
+    complexity is not worth it and has been reverted.
+  * Dh_Lib.pm: Fix typo in warning message about dherroron
+
+-------------------------------------------------------------------

Old:
----
  debhelper-debian-13.11.1.tar.gz

New:
----
  debhelper-debian-13.11.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ debhelper.spec ++++++
--- /var/tmp/diff_new_pack.dAqWh0/_old  2023-01-05 15:01:49.349361863 +0100
+++ /var/tmp/diff_new_pack.dAqWh0/_new  2023-01-05 15:01:49.353361891 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package debhelper
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           debhelper
-Version:        13.11.1
+Version:        13.11.4
 Release:        0
 Summary:        Helper programs for debian/rules
 License:        GPL-2.0-or-later

++++++ debhelper-debian-13.11.1.tar.gz -> debhelper-debian-13.11.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debhelper-debian-13.11.1/debian/changelog 
new/debhelper-debian-13.11.4/debian/changelog
--- old/debhelper-debian-13.11.1/debian/changelog       2022-11-21 
01:06:40.000000000 +0100
+++ new/debhelper-debian-13.11.4/debian/changelog       2023-01-02 
15:54:54.000000000 +0100
@@ -1,3 +1,38 @@
+debhelper (13.11.4) unstable; urgency=medium
+
+  [ Peter Pentchev ]
+  * meson.pm: Pass --destdir to `meson install`.  (Closes: #1027014)
+
+ -- Niels Thykier <ni...@thykier.net>  Mon, 02 Jan 2023 14:54:26 +0000
+
+debhelper (13.11.3) unstable; urgency=medium
+
+  * Dh_Lib.pm: Have addsubstvars check the value for newlines (Closes: 
#1026014)
+  * Stop using (fake)root for mkdirs again.
+    Should have been removed as a part of the clean up in the previous
+    upload but was overlooked causing breakage in packages still having
+    `Rules-Requires-Root: binary-targets`. (Closes: #1026125)
+  * PROGRAMMING.md: Fix typos
+
+ -- Niels Thykier <ni...@thykier.net>  Thu, 15 Dec 2022 09:07:38 +0000
+
+debhelper (13.11.2) unstable; urgency=medium
+
+  [ Niels Thykier ]
+  * Dh_Lib.pm: Remove unused third parameter from install_dh_config_file
+  * makefile.pm: Provide hook for subclasses to reuse cross-build support
+    (Closes: #1024296)
+  * Dh_Lib.pm: Revert change where `install_{file,prog,lib}` would use chown.
+    The problem that prompted this change was not caused by debhelper but
+    by fakeroot (#1024544) and the change in debhelper would not even
+    function as a work around in this case.  Accordingly, the extra
+    complexity is not worth it and has been reverted.
+
+  [ Jakub Wilk ]
+  * Dh_Lib.pm: Fix typo in warning message about dherroron
+
+ -- Niels Thykier <ni...@thykier.net>  Wed, 14 Dec 2022 20:32:18 +0000
+
 debhelper (13.11.1) unstable; urgency=medium
 
   * Team upload.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debhelper-debian-13.11.1/dh_strip 
new/debhelper-debian-13.11.4/dh_strip
--- old/debhelper-debian-13.11.1/dh_strip       2022-11-21 01:06:40.000000000 
+0100
+++ new/debhelper-debian-13.11.4/dh_strip       2023-01-02 15:54:54.000000000 
+0100
@@ -251,7 +251,7 @@
        my ($package, $build_ids) = @_;
        my $dir = "debian/.debhelper/${package}";
        my $path = "${dir}/dbgsym-build-ids";
-       mkdirs($dir);
+       install_dir($dir);
        open(my $fd, '>>', $path) or error("open $path failed: $!");
        print {$fd} join(q{ }, sort(@{$build_ids})) . ' ';
        close($fd) or error("close $path failed: $!");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debhelper-debian-13.11.1/doc/PROGRAMMING.md 
new/debhelper-debian-13.11.4/doc/PROGRAMMING.md
--- old/debhelper-debian-13.11.1/doc/PROGRAMMING.md     2022-11-21 
01:06:40.000000000 +0100
+++ new/debhelper-debian-13.11.4/doc/PROGRAMMING.md     2023-01-02 
15:54:54.000000000 +0100
@@ -89,7 +89,7 @@
 `%dh` hash.
 
 | switch              | variable        | description                          
                                                                                
                                                                                
                            |
-| ------------------- | --------------- | 
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+|---------------------|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
 | `-v`                | `VERBOSE`       | should the program verbosely output 
what it is doing?                                                               
                                                                                
                             |
 | `--no-act`          | `NO_ACT`        | should the program not actually do 
anything?                                                                       
                                                                                
                              |
 | `-i`,`-a`,`-p`,`-N` | `DOPACKAGES`    | a space delimited list of the binary 
packages to act on (in `Dh_Lib.pm`, this is an array)                           
                                                                                
                            |
@@ -361,9 +361,10 @@
   *must* be a real regular file.  Dirs, devices and symlinks
   (and everything else) *cannot* be restored by this.
   If `$file` is passed multiple times (e.g. from different programs)
-  only the first version is stored.  
+  only the first version is stored.
   CAVEAT: This *cannot* undo arbitrary "rm -fr"'ing.  The dir,
-  which is/was in `$file`, must be present when `dh_clean` is called.
+  which the `$file` is/was in, must be present when `dh_clean` is
+  called.
 
 - `make_symlink($src, $dest, $tmp)`
 
@@ -371,9 +372,9 @@
   `$src`. If `$tmp` is given, then `$tmp` will be prefixed to `$dest`
   when creating the actual symlink.
 
-- `install_dh_config_file($src, $dest[, $mode])`
+- `install_dh_config_file($src, $dest)`
 
-  Installs `$src` into `$dest` with `$mode` (defaults to 0644).
+  Installs `$src` into `$dest` using mode 0644.
   If compat is 9 (or later) and `$src` is executable, `$src` will
   be executed instead and its output will be used to generate the
   `$dest` file.
@@ -387,10 +388,9 @@
 
   The `install_dir` function should be used for directories
   installed in a final package while `mkdirs` should be used
-  for other directories.  The difference is that `install_dir`
-  will attempt to chown the directory to `root:root` if required
-  whereas `mkdirs` will not.  The `mkdirs` function requires
-  `debhelper (>= 13.11~)`.
+  for other directories.  The difference is related to whether
+  the change will be shown via -v/--verbose or not.  The
+  `mkdirs` function requires `debhelper (>= 13.11~)`.
 
 - `install_file($src, $dest)`
 
@@ -665,7 +665,7 @@
   times (once with `-a` and once with `-i`).  It is completely fine if this
   leaves duplicate entries as dh_missing will deduplicate these.
 - If your helper has a PROMISE, it must use `pkgfile-logged(<file>)`
-  for its config files (see [#867246]).  
+  for its config files (see [#867246]).
   CAVEAT: This requires a dependency on "debhelper (>= 10.2.5)".  Prior
   to that version, debhelper will wrongly optimize your helper out.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/debhelper-debian-13.11.1/lib/Debian/Debhelper/Buildsystem/makefile.pm 
new/debhelper-debian-13.11.4/lib/Debian/Debhelper/Buildsystem/makefile.pm
--- old/debhelper-debian-13.11.1/lib/Debian/Debhelper/Buildsystem/makefile.pm   
2022-11-21 01:06:40.000000000 +0100
+++ new/debhelper-debian-13.11.4/lib/Debian/Debhelper/Buildsystem/makefile.pm   
2023-01-02 15:54:54.000000000 +0100
@@ -142,11 +142,17 @@
        return 0;
 }
 
+sub _should_inject_cross_build_tools {
+       my ($this) = @_;
+       return ref($this) eq 'Debian::Debhelper::Buildsystem::makefile';
+}
+
+
 sub build {
        my $this=shift;
        if (not $this->_is_targetbuildsystem
-                       and ref($this) eq 
'Debian::Debhelper::Buildsystem::makefile'
-                       and is_cross_compiling()) {
+                       and is_cross_compiling()
+                       and $this->_should_inject_cross_build_tools) {
                # Only inject build tools variables during cross-compile when
                # makefile is the explicit *main* build system.
                for my $var (sort(keys(%DEB_DEFAULT_TOOLS))) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/debhelper-debian-13.11.1/lib/Debian/Debhelper/Buildsystem/meson.pm 
new/debhelper-debian-13.11.4/lib/Debian/Debhelper/Buildsystem/meson.pm
--- old/debhelper-debian-13.11.1/lib/Debian/Debhelper/Buildsystem/meson.pm      
2022-11-21 01:06:40.000000000 +0100
+++ new/debhelper-debian-13.11.4/lib/Debian/Debhelper/Buildsystem/meson.pm      
2023-01-02 15:54:54.000000000 +0100
@@ -135,11 +135,11 @@
 }
 
 sub install {
-       my $this = shift;
+       my ($this, $destdir, @args) = @_;
        my $target = $this->get_targetbuildsystem;
 
        if (compat(13) or $target->NAME ne 'ninja') {
-               $target->install(@_);
+               $target->install($destdir, @args);
        } else {
                # In compat 14 with meson+ninja, we prefer using "meson install"
                # over "ninja install"
@@ -148,7 +148,7 @@
                                'LC_ALL' => 'C.UTF-8',
                        }
                );
-               $this->doit_in_builddir(\%options, 'meson', 'install', @_);
+               $this->doit_in_builddir(\%options, 'meson', 'install', 
'--destdir', $destdir, @args);
        }
        return 1;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/debhelper-debian-13.11.1/lib/Debian/Debhelper/Dh_Lib.pm 
new/debhelper-debian-13.11.4/lib/Debian/Debhelper/Dh_Lib.pm
--- old/debhelper-debian-13.11.1/lib/Debian/Debhelper/Dh_Lib.pm 2022-11-21 
01:06:40.000000000 +0100
+++ new/debhelper-debian-13.11.4/lib/Debian/Debhelper/Dh_Lib.pm 2023-01-02 
15:54:54.000000000 +0100
@@ -631,64 +631,49 @@
 {
        my $_loaded = 0;
        sub install_file {
-               unshift(@_, 1, 0644);
+               unshift(@_, 0644);
                goto \&_install_file_to_path;
        }
 
        sub install_prog {
-               unshift(@_, 1, 0755);
+               unshift(@_, 0755);
                goto \&_install_file_to_path;
        }
        sub install_lib {
-               unshift(@_, 1, 0644);
+               unshift(@_, 0644);
                goto \&_install_file_to_path;
        }
 
        sub _install_file_to_path {
-               my ($consider_using_root, $mode, $source, $dest) = @_;
+               my ($mode, $source, $dest) = @_;
                if (not $_loaded) {
                        $_loaded++;
                        require File::Copy;
                }
-               my $use_root = !$consider_using_root && should_use_root();
-               if ($dh{VERBOSE}) {
-                       my $install_opts = $use_root ? '-o 0 -g 0 ' : '';
-                       verbose_print(sprintf('install -p %s-m%04o %s', 
$install_opts, $mode, escape_shell($source, $dest)))
-               }
+               verbose_print(sprintf('install -p -m%04o %s', $mode, 
escape_shell($source, $dest)))
+                       if $dh{VERBOSE};
                return 1 if $dh{NO_ACT};
                # "install -p -mXXXX foo bar" silently discards broken
                # symlinks to install the file in place.  File::Copy does not,
                # so emulate it manually.  (#868204)
                if ( -l $dest and not -e $dest and not unlink($dest) and $! != 
ENOENT) {
-                       error("unlink(\"$dest\") failed: $!");
-               }
-               File::Copy::copy($source, $dest) or error("copy(\"$source\", 
\"$dest\"): $!");
-               chmod($mode, $dest) or error("chmod($mode, \"$dest\"): $!");
-               if ($use_root) {
-                       chown(0, 0, $dest) or error("chown(0, 0, \"$dest\") 
failed: $!");
+                       error("unlink $dest failed: $!");
                }
+               File::Copy::copy($source, $dest) or error("copy($source, 
$dest): $!");
+               chmod($mode, $dest) or error("chmod($mode, $dest): $!");
                my (@stat) = stat($source);
                error("stat($source): $!") if not @stat;
                utime($stat[8], $stat[9], $dest)
-                       or error(sprintf("utime(%d, %d, \"%s\"): $!", $stat[8] 
, $stat[9], $dest));
+                       or error(sprintf("utime(%d, %d, %s): $!", $stat[8] , 
$stat[9], $dest));
                return 1;
        }
 }
 
 
 sub _mkdirs {
-       my ($maybe_chown, @dirs) = @_;
+       my ($log, @dirs) = @_;
        return if not @dirs;
-       my $do_chown = $maybe_chown && should_use_root();
-       if ($do_chown) {
-               # Use the real install for the case that requires root.  The 
error handling
-               # of File::Path for this case seems a bit too fragile for my 
liking.
-               # (E.g., chown failures are carp warnings rather than hard 
errors and
-               # intercepting them via the error parameter does not seem to 
work so well)
-               doit('install', '-m0755', '-o', '0', '-g', '0', '-d', @dirs);
-               return;
-       }
-       if (not $maybe_chown && $dh{VERBOSE}) {
+       if ($log && $dh{VERBOSE}) {
                verbose_print(sprintf('install -m0755 -d %s', 
escape_shell(@dirs)));
        }
        return 1 if $dh{NO_ACT};
@@ -719,8 +704,7 @@
 
 sub install_dir {
        my @dirs = @_;
-       my $maybe_chown = (defined($main::VERSION) && $main::VERSION eq 
DH_BUILTIN_VERSION) ? 1 : 0;
-       return _mkdirs($maybe_chown, @dirs);
+       return _mkdirs(1, @dirs);
 }
 
 sub rename_path {
@@ -1448,6 +1432,19 @@
        my $substvarfile = "debian/${ext}substvars";
        my $str = $deppackage;
        $str .= " ($verinfo)" if defined $verinfo && length $verinfo;
+
+       if (not defined($deppackage) and not $remove) {
+               error("Bug in helper: Must provide a value for addsubstvar (or 
set the remove flag, but then use delsubstvar instead)")
+       }
+
+       if (defined($str) and $str =~ m/[\n]/) {
+               $str =~ s/\n/\\n/g;
+               # Per #1026014
+               warning('Unescaped newlines in the value of a substvars can 
cause broken substvars files (see #1025714).');
+               warning("Hint: If you really need a newline character, provide 
it as \"\${Newline}\".");
+               error("Bug in helper: The substvar must not contain a raw 
newline character (${substvar}=${str})");
+       }
+
        my $update_logic = sub {
                my ($line) = @_;
                return $line if $line !~ m/^\Q${substvar}\E([?]?=)(.*)/;
@@ -2674,7 +2671,7 @@
                } elsif ($opt =~ m/^dherroron=(\S*)$/ && $wanted eq 
'dherroron') {
                        my $value = $1;
                        if ($value ne 'obsolete-compat-levels') {
-                               warning("Unknown value \"${value}\" as 
parameter for \"dherrron\" seen in DEB_BUILD_OPTIONS");
+                               warning("Unknown value \"${value}\" as 
parameter for \"dherroron\" seen in DEB_BUILD_OPTIONS");
                        }
                        return $value;
                } elsif ($opt eq $wanted) {
@@ -2723,15 +2720,14 @@
 # the package.  Under compat 9+ it may execute the file and use its
 # output instead.
 #
-# install_dh_config_file(SOURCE, TARGET[, MODE])
+# install_dh_config_file(SOURCE, TARGET)
 sub install_dh_config_file {
-       my ($source, $target, $mode) = @_;
-       $mode = 0644 if not defined($mode);
+       my ($source, $target) = @_;
 
        if (!compat(8) and -x $source) {
                my @sstat = stat(_) || error("cannot stat $source: $!");
                open(my $tfd, '>', $target) || error("cannot open $target: $!");
-               chmod($mode, $tfd) || error("cannot chmod $target: $!");
+               chmod(0644, $tfd) || error("cannot chmod $target: $!");
                open(my $sfd, '-|', $source) || error("cannot run $source: $!");
                while (my $line = <$sfd>) {
                        print ${tfd} $line;
@@ -2743,7 +2739,7 @@
                # Set the mtime (and atime) to ensure reproducibility.
                utime($sstat[9], $sstat[9], $target);
        } else {
-               _install_file_to_path(1, $mode, $source, $target);
+               install_file($source, $target);
        }
        return 1;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/debhelper-debian-13.11.1/t/Test/DH.pm 
new/debhelper-debian-13.11.4/t/Test/DH.pm
--- old/debhelper-debian-13.11.1/t/Test/DH.pm   2022-11-21 01:06:40.000000000 
+0100
+++ new/debhelper-debian-13.11.4/t/Test/DH.pm   2023-01-02 15:54:54.000000000 
+0100
@@ -58,7 +58,7 @@
 sub copy_file {
        my ($src, $dest, $mode) = @_;
        $mode //= 0644;
-       return Debian::Debhelper::Dh_Lib::_install_file_to_path(0, $mode, $src, 
$dest);
+       return Debian::Debhelper::Dh_Lib::_install_file_to_path($mode, $src, 
$dest);
 }
 
 sub run_dh_tool {

Reply via email to