From e0b629ab8cc69be9bfa43537879b8153ed3f2b44 Mon Sep 17 00:00:00 2001 From: clime Date: Mon, 26 Feb 2018 09:24:23 +0100 Subject: [PATCH] move fedmsgs, nomd5, old_paths config options to [upload] ini section --- configs/dist-git/dist-git.conf | 6 ++++-- scripts/httpd/upload.cgi | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/configs/dist-git/dist-git.conf b/configs/dist-git/dist-git.conf index a6b6aae..3257558 100644 --- a/configs/dist-git/dist-git.conf +++ b/configs/dist-git/dist-git.conf @@ -7,8 +7,10 @@ gitroot_dir = /var/lib/dist-git/git gitolite = True grok = True + +default_namespace = rpms + +[upload] fedmsgs = True old_paths = True nomd5 = True - -default_namespace = rpms diff --git a/scripts/httpd/upload.cgi b/scripts/httpd/upload.cgi index ae479b9..e733dcc 100644 --- a/scripts/httpd/upload.cgi +++ b/scripts/httpd/upload.cgi @@ -209,7 +209,7 @@ def main(): print 'Missing' sys.exit(0) - elif hash_type == "md5" and config['dist-git'].getboolean('nomd5', fallback=True): + elif hash_type == "md5" and config['upload'].getboolean('nomd5', fallback=True): send_error('Uploads with md5 are no longer allowed.', status='406 Not Acceptable') @@ -253,11 +253,11 @@ def main(): hash_type.upper(), checksum) # Add the file to the old path, where fedpkg is currently looking for it - if hash_type == "md5" and config['dist-git'].getboolean('old_paths', fallback=True): + if hash_type == "md5" and config['upload'].getboolean('old_paths', fallback=True): hardlink(dest_file, old_path, username) # Emit a fedmsg message. Load the config to talk to the fedmsg-relay. - if config['dist-git'].getboolean('fedmsgs', fallback=True): + if config['upload'].getboolean('fedmsgs', fallback=True): try: config = fedmsg.config.load_config([], None) config['active'] = True