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

guillem pushed a commit to branch master
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=df8dca6671184a7108bf43b04fb641929f9cab3e

commit df8dca6671184a7108bf43b04fb641929f9cab3e
Author: Guillem Jover <[email protected]>
AuthorDate: Sun Jul 5 16:48:11 2020 +0200

    Dpkg::Source::Package: Explicitly initialize constructor options
    
    Some of the options had not been explicitly initialized to their
    implicit default value, which broke when the code to verify signatures
    got refactored into Dpkg::OpenPGP::verify_signature() with a default
    for require_valid_signature of 1.
    
    We explicitly initialize all supported options so that this does not
    happen again in the future.
    
    Closes: #964017
---
 debian/changelog               | 4 ++++
 scripts/Dpkg/Source/Package.pm | 7 +++++++
 2 files changed, 11 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 7fd9d0ccf..da2f8c284 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,10 @@
 dpkg (1.20.4) UNRELEASED; urgency=medium
 
   [ Guillem Jover ]
+  * Perl modules:
+    - Dpkg::Source::Package: Explicitly initialize constructor options to
+      their implicit values, otherwise other code end up assuming different
+      defaults. Closes: #964017
   * Build system:
     - Add Module::Signature as configure recommends for CPAN.
 
diff --git a/scripts/Dpkg/Source/Package.pm b/scripts/Dpkg/Source/Package.pm
index fc9f4b123..9698b7527 100644
--- a/scripts/Dpkg/Source/Package.pm
+++ b/scripts/Dpkg/Source/Package.pm
@@ -248,9 +248,16 @@ sub init_options {
          'debian/source/local-patch-header',
          'debian/files',
          'debian/files.new';
+    $self->{options}{copy_orig_tarballs} //= 0;
+
     # Skip debianization while specific to some formats has an impact
     # on code common to all formats
     $self->{options}{skip_debianization} //= 0;
+    $self->{options}{skip_patches} //= 0;
+
+    # Set default validation checks.
+    $self->{options}{require_valid_signature} //= 0;
+    $self->{options}{require_strong_checksums} //= 0;
 
     # Set default compressor for new formats.
     $self->{options}{compression} //= 'xz';

-- 
Dpkg.Org's dpkg

Reply via email to