[ I sent a similar reply to the reject mail, but filing it here so
  that it does not get lost. ]

Hi!

On Thu, 2015-08-20 at 09:44:50 +0200, Ansgar Burchardt wrote:
> Daniel Kahn Gillmor <d...@fifthhorseman.net> writes:
> > Just a ping on #759401 -- can dak accept upstream signature .asc files
> > yet?
> 
> I don't know if it works, but you are welcome to try. I did at least a
> few changes that might make it work already.

I was trying to upload a .dsc with an upstream tarball signature, with
a modifed dpkg I've got locally (patch attached against master) and it
barfed with the error below:

On Mon, 2015-09-14 at 16:38:04 +0000, Debian FTP Masters wrote:
> device3dfx_2013.08.08-4_source.changes uploaded successfully to localhost
> along with the files:
>   device3dfx_2013.08.08-4.dsc
>   device3dfx_2013.08.08.orig.tar.xz.asc
>   device3dfx_2013.08.08-4.debian.tar.xz

On Mon, 2015-09-14 at 16:48:58 +0000, Debian FTP Masters wrote:
> Processing raised an exception: global name 'reject' is not defined.
> Traceback (most recent call last):
>   File "/srv/ftp-master.debian.org/dak/dak/daklib/archive.py", line 955, in 
> check
>     chk().check(self)
>   File "/srv/ftp-master.debian.org/dak/dak/daklib/checks.py", line 497, in 
> check
>     rejects = utils.check_dsc_files(dsc_fn, control, source.files.keys())
>   File "/srv/ftp-master.debian.org/dak/dak/daklib/utils.py", line 341, in 
> check_dsc_files
>     reject("%s: unexpected source file '%s'" % (dsc_filename, f))
> NameError: global name 'reject' is not defined

Thanks,
Guillem
From 916a49d80de5ecd13b04bb87e1fb381a6ab4a634 Mon Sep 17 00:00:00 2001
From: Guillem Jover <guil...@debian.org>
Date: Wed, 2 Sep 2015 13:37:53 +0200
Subject: [PATCH] Dpkg::Source::Package::V2: Pick up upstream signatures for
 orig.tar

If there are upstream signatures for orig.tar files, pick them up and
include them in the .dsc file.

See: #759478
---
 scripts/Dpkg/Source/Package/V2.pm | 2 ++
 scripts/dpkg-buildpackage.pl      | 3 ++-
 scripts/dpkg-genchanges.pl        | 6 ++++--
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm
index 58244b2..30ace15 100644
--- a/scripts/Dpkg/Source/Package/V2.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -353,10 +353,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-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index 17ada97..9ee40ec 100755
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -109,6 +109,7 @@ sub usage {
 'Options passed to dpkg-genchanges:
   -si            source includes orig, if new upstream (default).
   -sa            source includes orig, always.
+  -sg            source includes orig detached signature.
   -sd            source is diff and .dsc only.
   -v<version>    changes since version <version>.
   -m<maint>      maintainer for package is <maint>.
@@ -280,7 +281,7 @@ while (@ARGV) {
     } elsif (/^-P(.*)$/) {
 	my $arg = $1;
 	@build_profiles = split /,/, $arg;
-    } elsif (/^-s[iad]$/) {
+    } elsif (/^-s[iagd]$/) {
 	push @changes_opts, $_;
     } elsif (/^-(?:s[insAkurKUR]|[zZ].*|i.*|I.*)$/) {
 	push @source_opts, $_; # passed to dpkg-source
diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl
index 30c7abd..72b33f5 100755
--- a/scripts/dpkg-genchanges.pl
+++ b/scripts/dpkg-genchanges.pl
@@ -147,6 +147,7 @@ sub usage {
   -u<upload-files-dir>     directory with files (default is '..').
   -si                      source includes orig, if new upstream (default).
   -sa                      source includes orig, always.
+  -sg                      source includes orig detached signature.
   -sd                      source is diff and .dsc only.
   -q                       quiet - no informational messages on stderr.
   -F<changelog-format>     force changelog format.
@@ -174,7 +175,7 @@ while (@ARGV) {
 	set_build_type(BUILD_SOURCE_DEP, $_);
     } elsif (m/^-g$/) {
 	set_build_type(BUILD_SOURCE_INDEP, $_);
-    } elsif (m/^-s([iad])$/) {
+    } elsif (m/^-s([iagd])$/) {
         $sourcestyle= $1;
     } elsif (m/^-q$/) {
         $quiet= 1;
@@ -294,12 +295,13 @@ if ($include & BUILD_SOURCE) {
 
     my $ext = compression_get_file_extension_regex();
     if ((($sourcestyle =~ m/i/ && !$include_tarball) ||
-         $sourcestyle =~ m/d/) &&
+         $sourcestyle =~ m/d/ || $sourcestyle eq 'g') &&
         any { m/\.(?:debian\.tar|diff)\.$ext$/ } $checksums->get_files())
     {
         $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") if $sourcestyle ne 'g';
         }
     } else {
         if ($sourcestyle =~ m/d/ &&
-- 
2.6.0.rc0.131.gf624c3d

Reply via email to