X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fprocess_unchecked.py;h=6e62c431284b95790fe7f22b53fca747a5710b0e;hb=55a4e729db84095b12a67974092216be09ea384c;hp=c4fcf4b7e63065e91080cb5f90006404a6417eb1;hpb=195caf3ae4b2150a7234de64d0907d74f9a4c0be;p=dak.git diff --git a/dak/process_unchecked.py b/dak/process_unchecked.py index c4fcf4b7..6e62c431 100755 --- a/dak/process_unchecked.py +++ b/dak/process_unchecked.py @@ -916,14 +916,32 @@ def check_hashes (): else: hashes = [] + for x in changes: + if x.startswith("checksum-"): + h = x.split("-",1)[1] + if h not in dict(hashes): + reject("Unsupported checksum field in .changes" % (h)) + + for x in dsc: + if x.startswith("checksum-"): + h = x.split("-",1)[1] + if h not in dict(hashes): + reject("Unsupported checksum field in .dsc" % (h)) + for h,f in hashes: - fs = daklib.utils.build_file_list(changes, 0, "checksums-%s" % h, h) - check_hash( ".changes %s" % (h), fs, h, f, files) + try: + fs = daklib.utils.build_file_list(changes, 0, "checksums-%s" % h, h) + check_hash(".changes %s" % (h), fs, h, f, files) + except daklib.utils.no_files_exc: + reject("No Checksums-%s: field in .changes file" % (h)) if "source" not in changes["architecture"]: continue - fs = daklib.utils.build_file_list(dsc, 1, "checksums-%s" % h, h) - check_hash( ".dsc %s" % (h), fs, h, f, dsc_files) + try: + fs = daklib.utils.build_file_list(dsc, 1, "checksums-%s" % h, h) + check_hash(".dsc %s" % (h), fs, h, f, dsc_files) + except daklib.utils.no_files_exc: + reject("No Checksums-%s: field in .changes file" % (h)) ################################################################################ @@ -1054,6 +1072,12 @@ def check_signed_by_key(): if uid_name == "": sponsored = 1 else: sponsored = 1 + if ("source" not in changes["architecture"] and + daklib.utils.is_email_alias(uid_email)): + sponsor_addresses = daklib.utils.gpg_get_key_addresses(changes["fingerprint"]) + if (changes["maintaineremail"] not in sponsor_addresses and + changes["changedbyemail"] not in sponsor_addresses): + changes["sponsoremail"] = uid_email if sponsored and not may_sponsor: reject("%s is not authorised to sponsor uploads" % (uid))