Control: tags -1 + patch Hi!
On Thu, 2015-09-24 at 16:01:39 +0200, Guillem Jover wrote: > 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 I think I've fixed this with the attached patch. I'd like enable support for this in dpkg-source, after it has been enabled in dak, but otherwise I might just add it anyway. (I've noticed that the ‘.’ are not escaped for the three first regexes, and they are already covered by subsequent ones, they might deserve to be removed. Also it could make sense to merge the «.asc» addition to the existing orig.tar regexes so that they don't get out of sync, let me know if you'd prefer that, or change it yourself if it's more convenient.) Thanks, Guillem
From d47371ed08a857354bd988f00ad10881fcc5b67f Mon Sep 17 00:00:00 2001 From: Guillem Jover <guil...@debian.org> Date: Sun, 17 Jan 2016 02:08:12 +0100 Subject: [PATCH] Add support for detached upstream signatures Upstream tarballs usually come with detached signatures, which would be useful to have in the source package, as an additional check that could be performed to verify its integrity and provenance. dpkg-source supports this since 1.17.20. Closes: #759401 --- daklib/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/daklib/utils.py b/daklib/utils.py index 9d45cdc..5ac015c 100644 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -316,8 +316,10 @@ def check_dsc_files(dsc_filename, dsc, dsc_files): (r'tar.gz', ('native_tar_gz', 'native_tar')), (r'debian\.tar\.(gz|bz2|xz)', ('debian_tar',)), (r'orig\.tar\.(gz|bz2|xz)', ('orig_tar',)), + (r'orig\.tar\.(gz|bz2|xz)\.asc', ('orig_tar_sig',)), (r'tar\.(gz|bz2|xz)', ('native_tar',)), (r'orig-.+\.tar\.(gz|bz2|xz)', ('more_orig_tar',)), + (r'orig-.+\.tar\.(gz|bz2|xz)\.asc', ('more_orig_tar_sig',)), ) for f in dsc_files: @@ -341,7 +343,7 @@ def check_dsc_files(dsc_filename, dsc, dsc_files): reject("%s: unexpected source file '%s'" % (dsc_filename, f)) # Check for multiple files - for file_type in ('orig_tar', 'native_tar', 'debian_tar', 'debian_diff'): + for file_type in ('orig_tar', 'orig_tar_sig', 'native_tar', 'debian_tar', 'debian_diff'): if has[file_type] > 1: rejmsg.append("%s: lists multiple %s" % (dsc_filename, file_type)) -- 2.7.0.rc3