Add checksum API

Fixes: https://pagure.io/koji/issue/3627
This commit is contained in:
Jana Cupova 2022-11-29 09:21:41 +01:00 committed by Tomas Kopecek
parent 530de712d8
commit 9bf31de75f
9 changed files with 501 additions and 2 deletions

View file

@ -497,7 +497,9 @@ def load_config(environ):
['MaxNameLengthInternal', 'integer', 256],
['RegexNameInternal', 'string', r'^[A-Za-z0-9/_.+-]+$'],
['RegexUserName', 'string', r'^[A-Za-z0-9/_.@-]+$']
['RegexUserName', 'string', r'^[A-Za-z0-9/_.@-]+$'],
['RPMDefaultChecksums', 'string', 'md5 sha256']
]
opts = {}
for name, dtype, default in cfgmap:
@ -532,6 +534,7 @@ def load_config(environ):
opts['RegexNameInternal.compiled'] = re.compile(opts['RegexNameInternal'])
if opts['RegexUserName'] != '':
opts['RegexUserName.compiled'] = re.compile(opts['RegexUserName'])
return opts