Niels Thykier:
> Holger Levsen:
>> Hi ftp folks,
>>
> 
> Hi,
> 
>> while we still appreciate your comments on this proposal as last week 
>> described in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763822 I'd 
>> like 
>> to make a intermediate very simple proposal, so that reproducible builds in 
>> Debian get one step forward:
>>
> 
> I have started a git branch, build-info-support, available from:
> 
> * ssh://release.debian.org/~nthykier/dak
> 
> [...]
> 
> Thanks,
> ~Niels
> 
> 

Hi,

Thanks to h01ger and jwilk, who spotted a ".changes" that should have
been a ".buildinfo" in regexes.py.  I have rebased the patches (and
resigned them) on to master.  The changed patch is also attached.

Thanks,
~Niels


From ce901421acfc505d9d5787940dc964dceed1b32c Mon Sep 17 00:00:00 2001
From: Niels Thykier <ni...@thykier.net>
Date: Mon, 14 Dec 2015 20:46:28 +0000
Subject: [PATCH 1/2] daklib/upload.py: Silently accept and discard .buildinfo
 files

Besides some very trivial validation of the filename, accept
.buildinfo files without really looking at them.

Signed-off-by: Niels Thykier <ni...@thykier.net>
---
 daklib/regexes.py | 4 ++++
 daklib/upload.py  | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/daklib/regexes.py b/daklib/regexes.py
index ae8fd91..16dd7ca 100644
--- a/daklib/regexes.py
+++ b/daklib/regexes.py
@@ -141,6 +141,10 @@ re_file_source = re.compile(_re_file_prefix + r'(?:(?:\.orig(?:-[a-zA-Z0-9-]+)?|
 # Groups: package, version
 re_file_orig = re.compile(_re_file_prefix + r'\.orig(?:-[a-zA-Z0-9-]+)?(?:\.tar\.(?:bz2|gz|xz)|\.asc)')
 
+# Match buildinfo file
+# Groups: package, version, suffix
+re_file_buildinfo = re.compile(_re_file_prefix + r'_(?P<suffix>[a-zA-Z0-9+]+)\.buildinfo')
+
 ######################################################################
 # Patterns matching fields                                           #
 ######################################################################
diff --git a/daklib/upload.py b/daklib/upload.py
index b78d100..4c10f45 100644
--- a/daklib/upload.py
+++ b/daklib/upload.py
@@ -374,6 +374,8 @@ class Changes(object):
         for f in self.files.itervalues():
             if re_file_dsc.match(f.filename) or re_file_source.match(f.filename) or re_file_binary.match(f.filename):
                 continue
+            if re_file_buildinfo.match(f.filename):
+                continue
             if f.section != 'byhand' and f.section[:4] != 'raw-':
                 raise InvalidChangesException("{0}: {1} looks like a byhand package, but is in section {2}".format(self.filename, f.filename, f.section))
             byhand.append(f)
-- 
2.6.2

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to