Skip to content
Commits on Source (3)
......@@ -1022,6 +1022,7 @@ class ArchiveUpload(object):
for chk in (
checks.TransitionCheck,
checks.ACLCheck,
checks.NewOverrideCheck,
checks.NoSourceOnlyCheck,
checks.LintianCheck,
):
......
......@@ -137,6 +137,8 @@ class SignatureAndHashesCheck(Check):
"""
def check(self, upload):
allow_source_untrusted_sig_keys = Config().value_list('Dinstall::AllowSourceUntrustedSigKeys')
changes = upload.changes
if not changes.valid_signature:
raise Reject("Signature for .changes not valid.")
......@@ -149,6 +151,7 @@ class SignatureAndHashesCheck(Check):
except Exception as e:
raise Reject("Invalid dsc file: {0}".format(e))
if source is not None:
if changes.primary_fingerprint not in allow_source_untrusted_sig_keys:
if not source.valid_signature:
raise Reject("Signature for .dsc not valid.")
if source.primary_fingerprint != changes.primary_fingerprint:
......@@ -833,6 +836,22 @@ class NoSourceOnlyCheck(Check):
return True
class NewOverrideCheck(Check):
"""Override NEW requirement
"""
def check(self, upload):
if not upload.new:
return True
new_override_keys = Config().value_list('Dinstall::NewOverrideKeys')
changes = upload.changes
if changes.primary_fingerprint in new_override_keys:
upload.new = False
return True
class ArchAllBinNMUCheck(Check):
"""Check for arch:all binNMUs"""
......