[dpkg] 09/27: dpkg-buildpackage: Do not rehash .dsc file when signing binary-only builds
Mattia Rizzolo
mattia at debian.org
Mon Oct 23 18:10:28 UTC 2017
This is an automated email from the git hooks/post-receive script.
mattia pushed a commit to branch master
in repository dpkg.
commit 7e48a3921244dcaa0c2bf9fadd53a52ab230212a
Author: Guillem Jover <guillem at debian.org>
Date: Tue Oct 17 22:42:16 2017 +0200
dpkg-buildpackage: Do not rehash .dsc file when signing binary-only builds
Reported-by: Ximin Luo <infinity0 at debian.org>
Stable-Candidate: 1.18.x
---
debian/changelog | 2 ++
scripts/dpkg-buildpackage.pl | 6 ++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index fd9c8a8..6311ed2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ dpkg (1.19.1) UNRELEASED; urgency=medium
* Fix logic in dpkg-buildpackage to decide whether to run build targets,
which broke tons of packages that are violating Debian policy MUSTs.
Thanks to James Clarke <jrtc27 at debian.org>. Closes: #878899
+ * Do not try to recompute hashes for the .dsc file when signing binary-only
+ builds in dpkg-buildpackage. Reported by Ximin Luo <infinity0 at debian.org>.
* Packaging:
- Install update-alternatives policykit-1 file.
- Add Breaks to libdpkg-perl against pkg-kde-tools (<< 0.15.28~), as
diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index e7408c2..0705aca 100755
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -657,11 +657,13 @@ if ($signsource or $signbuildinfo) {
# Recompute the checksums as the .dsc and/or .buildinfo have changed.
my $checksums = Dpkg::Checksums->new();
$checksums->add_from_control($changes);
- $checksums->add_from_file("../$pv.dsc", update => 1, key => "$pv.dsc");
+ $checksums->add_from_file("../$pv.dsc", update => 1, key => "$pv.dsc")
+ if $signsource;
$checksums->add_from_file("../$pva.buildinfo", update => 1, key => "$pva.buildinfo");
$checksums->export_to_control($changes);
delete $changes->{'Checksums-Md5'};
- update_files_field($changes, $checksums, "$pv.dsc");
+ update_files_field($changes, $checksums, "$pv.dsc")
+ if $signsource;
update_files_field($changes, $checksums, "$pva.buildinfo");
$changes->save($chg);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list