summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2015-09-02 13:37:53 +0200
committerGuillem Jover <guillem@debian.org>2016-05-02 04:03:19 +0200
commitc26060b71e8c69e2306fa570628b58ab306c99d8 (patch)
tree476abe9cfe592a494b51ceb653d73cbabddc12c1 /scripts
parentd01212f2d7e59fc713c66b5d60421ac2296c1463 (diff)
downloaddpkg-c26060b71e8c69e2306fa570628b58ab306c99d8.tar.gz
Dpkg::Source::Package: Include upstream orig tarball signatures
If there are upstream signatures for orig.tar files, pick them up and include them in the .dsc file. See: #759478
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Dpkg/Source/Package/V1.pm3
-rw-r--r--scripts/Dpkg/Source/Package/V2.pm2
-rwxr-xr-xscripts/dpkg-genchanges.pl1
3 files changed, 6 insertions, 0 deletions
diff --git a/scripts/Dpkg/Source/Package/V1.pm b/scripts/Dpkg/Source/Package/V1.pm
index 5959b6e81..8e5fa7f34 100644
--- a/scripts/Dpkg/Source/Package/V1.pm
+++ b/scripts/Dpkg/Source/Package/V1.pm
@@ -345,6 +345,7 @@ sub do_build {
}
my ($tarname, $tardirname, $tardirbase);
+ my $tarsign;
if ($sourcestyle ne 'n') {
my ($origdirname, $origdirbase) = fileparse($origdir);
@@ -357,6 +358,7 @@ sub do_build {
$tardirname = $origdirname;
$tarname = $origtargz || "$basename.orig.tar.gz";
+ $tarsign = "$tarname.asc";
unless ($tarname =~ /\Q$basename\E\.orig\.tar\.gz/) {
warning(g_('.orig.tar name %s is not <package>_<upstreamversion>' .
'.orig.tar (wanted %s)'),
@@ -399,6 +401,7 @@ sub do_build {
}
$self->add_file($tarname) if $tarname;
+ $self->add_file($tarsign) if $tarsign and -e $tarsign;
if ($sourcestyle =~ m/[kpKP]/) {
if (stat($origdir)) {
diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm
index 83611a375..6268b5559 100644
--- a/scripts/Dpkg/Source/Package/V2.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -405,10 +405,12 @@ sub generate_patch {
$tarfile = $file;
push @origtarballs, $file;
$self->add_file($file);
+ $self->add_file("$file.asc") if -e "$file.asc";
} elsif ($file =~ /\.orig-([[:alnum:]-]+)\.tar\.$comp_ext_regex$/) {
$addonfile{$1} = $file;
push @origtarballs, $file;
$self->add_file($file);
+ $self->add_file("$file.asc") if -e "$file.asc";
}
}
diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl
index 0c47bd516..1455b5dd6 100755
--- a/scripts/dpkg-genchanges.pl
+++ b/scripts/dpkg-genchanges.pl
@@ -270,6 +270,7 @@ if (build_has_any(BUILD_SOURCE)) {
$origsrcmsg = g_('not including original source code in upload');
foreach my $f (grep { m/\.orig(-.+)?\.tar\.$ext$/ } $checksums->get_files()) {
$checksums->remove_file($f);
+ $checksums->remove_file("$f.asc");
}
} else {
if ($sourcestyle =~ m/d/ &&