From 648230526ff1f230a9376e6f2450d57fedb6a5e1 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 16 Aug 2019 10:15:27 -0700 Subject: [PATCH] Update to 1.18.0. --- .gitignore | 1 + 1273.patch | 224 ------------------ 1398.patch | 30 --- 1411.patch | 61 ----- 1468.patch | 36 --- 1576.patch | 34 +++ 1613.patch | 76 ++++++ ...bc3dd8ed0679159aceb902409600b21f803c.patch | 96 -------- fedora-config.patch | 62 ++--- koji-PR1278-use-createrepo_c-by-default.patch | 37 --- koji.spec | 32 +-- sources | 2 +- 12 files changed, 145 insertions(+), 546 deletions(-) delete mode 100644 1273.patch delete mode 100644 1398.patch delete mode 100644 1411.patch delete mode 100644 1468.patch create mode 100644 1576.patch create mode 100644 1613.patch delete mode 100644 9828bc3dd8ed0679159aceb902409600b21f803c.patch delete mode 100644 koji-PR1278-use-createrepo_c-by-default.patch diff --git a/.gitignore b/.gitignore index 04f93f2..b8e8a9a 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ koji-1.4.0.tar.bz2 /koji-1.16.1.tar.bz2 /koji-1.16.2.tar.bz2 /koji-1.17.0.tar.bz2 +/koji-1.18.0.tar.bz2 diff --git a/1273.patch b/1273.patch deleted file mode 100644 index 7c46251..0000000 --- a/1273.patch +++ /dev/null @@ -1,224 +0,0 @@ -From 3590ab0a355adaf63c7a5f068f7a6ac0eb5e8b05 Mon Sep 17 00:00:00 2001 -From: Mikolaj Izdebski -Date: Feb 21 2019 12:42:18 +0000 -Subject: Allow generating separate src repo for build repos - - -Fixes #1266 - ---- - -diff --git a/builder/kojid b/builder/kojid -index 27fe523..0fffb89 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -4990,13 +4990,15 @@ class NewRepoTask(BaseTaskHandler): - Methods = ['newRepo'] - _taskWeight = 0.1 - -- def handler(self, tag, event=None, src=False, debuginfo=False): -+ def handler(self, tag, event=None, src=False, debuginfo=False, separate_src=False): - tinfo = self.session.getTag(tag, strict=True, event=event) - kwargs = {} - if event is not None: - kwargs['event'] = event - if src: - kwargs['with_src'] = True -+ if separate_src: -+ kwargs['with_separate_src'] = True - if debuginfo: - kwargs['with_debuginfo'] = True - repo_id, event_id = self.session.host.repoInit(tinfo['id'], **kwargs) -diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py -index a2b2b2b..1a2ace6 100644 ---- a/cli/koji_cli/commands.py -+++ b/cli/koji_cli/commands.py -@@ -7011,7 +7011,8 @@ def handle_regen_repo(options, session, args): - parser.add_option("--target", action="store_true", help=_("Interpret the argument as a build target name")) - parser.add_option("--nowait", action="store_true", help=_("Don't wait on for regen to finish")) - parser.add_option("--debuginfo", action="store_true", help=_("Include debuginfo rpms in repo")) -- parser.add_option("--source", "--src", action="store_true", help=_("Include source rpms in the repo")) -+ parser.add_option("--source", "--src", action="store_true", help=_("Include source rpms in each of repos")) -+ parser.add_option("--separate-source", "--separate-src", action="store_true", help=_("Include source rpms in separate src repo")) - (suboptions, args) = parser.parse_args(args) - if len(args) == 0: - parser.error(_("A tag name must be specified")) -@@ -7047,6 +7048,8 @@ def handle_regen_repo(options, session, args): - repo_opts['debuginfo'] = True - if suboptions.source: - repo_opts['src'] = True -+ if suboptions.separate_source: -+ repo_opts['separate_src'] = True - task_id = session.newRepo(tag, **repo_opts) - print("Regenerating repo for tag: %s" % tag) - print("Created task: %d" % task_id) -diff --git a/hub/kojihub.py b/hub/kojihub.py -index 46b8f3e..9844861 100644 ---- a/hub/kojihub.py -+++ b/hub/kojihub.py -@@ -2345,7 +2345,7 @@ def maven_tag_archives(tag_id, event_id=None, inherit=True): - yield archive - return _iter_archives() - --def repo_init(tag, with_src=False, with_debuginfo=False, event=None): -+def repo_init(tag, with_src=False, with_debuginfo=False, event=None, with_separate_src=False): - """Create a new repo entry in the INIT state, return full repo data - - Returns a dictionary containing -@@ -2355,9 +2355,11 @@ def repo_init(tag, with_src=False, with_debuginfo=False, event=None): - state = koji.REPO_INIT - tinfo = get_tag(tag, strict=True, event=event) - koji.plugin.run_callbacks('preRepoInit', tag=tinfo, with_src=with_src, with_debuginfo=with_debuginfo, -- event=event, repo_id=None) -+ event=event, repo_id=None, with_separate_src=with_separate_src) - tag_id = tinfo['id'] - repo_arches = {} -+ if with_separate_src: -+ repo_arches['src'] = 1 - if tinfo['arches']: - for arch in tinfo['arches'].split(): - arch = koji.canonArch(arch) -@@ -2420,6 +2422,8 @@ def repo_init(tag, with_src=False, with_debuginfo=False, event=None): - if with_src: - for repoarch in repo_arches: - pkglist[repoarch].write(relpath) -+ if with_separate_src: -+ pkglist[arch].write(relpath) - elif arch == 'noarch': - for repoarch in repo_arches: - pkglist[repoarch].write(relpath) -@@ -2474,7 +2478,7 @@ def repo_init(tag, with_src=False, with_debuginfo=False, event=None): - _write_maven_repo_metadata(artifact_dir, artifacts) - - koji.plugin.run_callbacks('postRepoInit', tag=tinfo, with_src=with_src, with_debuginfo=with_debuginfo, -- event=event, repo_id=repo_id) -+ event=event, repo_id=repo_id, with_separate_src=with_separate_src) - return [repo_id, event_id] - - def _write_maven_repo_metadata(destdir, artifacts): -@@ -2519,7 +2523,8 @@ def dist_repo_init(tag, keys, task_opts): - # note: we need to match args from the other preRepoInit callback - koji.plugin.run_callbacks('preRepoInit', tag=tinfo, with_src=False, - with_debuginfo=False, event=event, repo_id=None, -- dist=True, keys=keys, arches=arches, task_opts=task_opts) -+ dist=True, keys=keys, arches=arches, task_opts=task_opts, -+ with_separate_src=False) - if not event: - event = get_event() - repo_id = nextval('repo_id_seq') -@@ -2540,7 +2545,7 @@ def dist_repo_init(tag, keys, task_opts): - koji.plugin.run_callbacks('postRepoInit', tag=tinfo, with_src=False, - with_debuginfo=False, event=event, repo_id=repo_id, - dist=True, keys=keys, arches=arches, task_opts=task_opts, -- repodir=repodir) -+ repodir=repodir, with_reparate_src=False) - return repo_id, event - - -@@ -10521,7 +10526,7 @@ class RootExports(object): - task_opts['event'] = event_id - return make_task('distRepo', [tag, repo_id, keys, task_opts], priority=15, channel='createrepo') - -- def newRepo(self, tag, event=None, src=False, debuginfo=False): -+ def newRepo(self, tag, event=None, src=False, debuginfo=False, separate_src=False): - """Create a newRepo task. returns task id""" - if context.session.hasPerm('regen-repo'): - pass -@@ -10532,6 +10537,8 @@ class RootExports(object): - opts['event'] = event - if src: - opts['src'] = True -+ if separate_src: -+ opts['separate_src'] = True - if debuginfo: - opts['debuginfo'] = True - args = koji.encode_args(tag, **opts) -@@ -12699,11 +12706,11 @@ class HostExports(object): - - return br.updateArchiveList(archives, project) - -- def repoInit(self, tag, with_src=False, with_debuginfo=False, event=None): -+ def repoInit(self, tag, with_src=False, with_debuginfo=False, event=None, with_separate_src=False): - """Initialize a new repo for tag""" - host = Host() - host.verify() -- return repo_init(tag, with_src=with_src, with_debuginfo=with_debuginfo, event=event) -+ return repo_init(tag, with_src=with_src, with_debuginfo=with_debuginfo, event=event, with_separate_src=with_separate_src) - - def repoAddRPM(self, repo_id, path): - """Add an uploaded rpm to a repo""" -diff --git a/koji/tasks.py b/koji/tasks.py -index ba4cd31..90656b8 100644 ---- a/koji/tasks.py -+++ b/koji/tasks.py -@@ -200,7 +200,7 @@ LEGACY_SIGNATURES = { - [['builds', 'target', 'opts'], None, None, (None,)], - ], - 'newRepo' : [ -- [['tag', 'event', 'src', 'debuginfo'], None, None, (None, False, False)], -+ [['tag', 'event', 'src', 'debuginfo', 'separate_src'], None, None, (None, False, False, False)], - ], - 'createImage' : [ - [['name', 'version', 'release', 'arch', 'target_info', 'build_tag', 'repo_info', 'inst_tree', 'opts'], None, None, (None,)], -diff --git a/tests/test_cli/test_regen_repo.py b/tests/test_cli/test_regen_repo.py -index 43eff0b..90f16b1 100644 ---- a/tests/test_cli/test_regen_repo.py -+++ b/tests/test_cli/test_regen_repo.py -@@ -168,11 +168,13 @@ class TestRegenRepo(utils.CliTestCase): - (Specify the --help global option for a list of other help options) - - Options: -- -h, --help show this help message and exit -- --target Interpret the argument as a build target name -- --nowait Don't wait on for regen to finish -- --debuginfo Include debuginfo rpms in repo -- --source, --src Include source rpms in the repo -+ -h, --help show this help message and exit -+ --target Interpret the argument as a build target name -+ --nowait Don't wait on for regen to finish -+ --debuginfo Include debuginfo rpms in repo -+ --source, --src Include source rpms in each of repos -+ --separate-source, --separate-src -+ Include source rpms in separate src repo - """ % self.progname) - - -diff --git a/util/kojira b/util/kojira -index 8e68cfd..a93d966 100755 ---- a/util/kojira -+++ b/util/kojira -@@ -671,6 +671,7 @@ class RepoManager(object): - - debuginfo_pat = self.options.debuginfo_tags.split() - src_pat = self.options.source_tags.split() -+ separate_src_pat = self.options.separate_source_tags.split() - order = sorted(self.needed_tags.values(), key=lambda t: t['score']) - for tag in order: - if running_tasks >= self.options.max_repo_tasks: -@@ -699,6 +700,8 @@ class RepoManager(object): - taskopts['debuginfo'] = True - if koji.util.multi_fnmatch(tagname, src_pat): - taskopts['src'] = True -+ if koji.util.multi_fnmatch(tagname, separate_src_pat): -+ taskopts['separate_src'] = True - maven = tag['taginfo']['maven_support'] - if maven: - if running_tasks_maven >= self.options.max_repo_tasks_maven: -@@ -836,6 +839,7 @@ def get_options(): - defaults = {'with_src': False, - 'debuginfo_tags': '', - 'source_tags': '', -+ 'separate_source_tags': '', - 'ignore_tags': '', - 'verbose': False, - 'debug': False, -@@ -876,7 +880,7 @@ def get_options(): - 'recent_tasks_lifetime') - str_opts = ('topdir', 'server', 'user', 'password', 'logfile', 'principal', 'keytab', 'krbservice', - 'cert', 'ca', 'serverca', 'debuginfo_tags', -- 'source_tags', 'ignore_tags') # FIXME: remove ca here -+ 'source_tags', 'separate_source_tags', 'ignore_tags') # FIXME: remove ca here - bool_opts = ('with_src','verbose','debug','ignore_stray_repos', 'offline_retry', - 'krb_rdns', 'krb_canon_host', 'no_ssl_verify') - for name in config.options(section): - diff --git a/1398.patch b/1398.patch deleted file mode 100644 index 6fbcbaa..0000000 --- a/1398.patch +++ /dev/null @@ -1,30 +0,0 @@ -From a66b4ddfb4399cdc03ccc6f66acd634c692ee88f Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: Apr 17 2019 05:38:03 +0000 -Subject: kojid: Download only 'repomd.xml' - - -We have pretty slow connection from s390x koji which helped to uncover -this part. Kojid downloads all files from repomd.xml (incl. filelists) -which is really big. What we really want is just find location of -'origin' (used later in the code). - -Signed-off-by: Igor Gnatenko - ---- - -diff --git a/builder/kojid b/builder/kojid -index 75f8a7d..5110d04 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -739,6 +739,9 @@ class BuildRoot(object): - h.setopt(librepo.LRO_REPOTYPE, librepo.LR_YUMREPO) - h.setopt(librepo.LRO_URLS, [repo_url]) - h.setopt(librepo.LRO_DESTDIR, tmpdir) -+ # We are using this just to find out location of 'origin', -+ # we don't even need to download it since we use openRemoteFile -+ h.setopt(librepo.LRO_YUMDLIST, []) - h.perform(r) - pkgorigins = r.getinfo(librepo.LRR_YUM_REPOMD)['origin']['location_href'] - koji.util.rmtree(tmpdir) - diff --git a/1411.patch b/1411.patch deleted file mode 100644 index 2957c4e..0000000 --- a/1411.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 3c5ddb8dab9a5736f03b6d60593adc9170304af3 Mon Sep 17 00:00:00 2001 -From: Mike McLean -Date: May 03 2019 14:57:43 +0000 -Subject: [PATCH 1/2] handle bare merge mode - - -Fixes https://pagure.io/koji/issue/1404 - ---- - -diff --git a/builder/kojid b/builder/kojid -index 5110d04..e176266 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -5186,6 +5186,10 @@ class CreaterepoTask(BaseTaskHandler): - cmd = ['/usr/libexec/kojid/mergerepos', - '--mode', 'simple', - '--tempdir', self.workdir] -+ elif merge_mode == 'bare': -+ # "bare" merge mode for repos with modular metadata -+ # forces use of mergerepo_c -+ cmd = ['/usr/bin/mergerepo_c', '--pkgorigins'] - elif self.options.use_createrepo_c: - cmd = ['/usr/bin/mergerepo_c', '--koji'] - else: -diff --git a/koji/__init__.py b/koji/__init__.py -index 6e667ce..9c7101c 100644 ---- a/koji/__init__.py -+++ b/koji/__init__.py -@@ -236,7 +236,7 @@ REPO_EXPIRED = REPO_STATES['EXPIRED'] - REPO_DELETED = REPO_STATES['DELETED'] - REPO_PROBLEM = REPO_STATES['PROBLEM'] - --REPO_MERGE_MODES = set(['koji', 'simple']) -+REPO_MERGE_MODES = set(['koji', 'simple', 'dumb']) - - # buildroot states - BR_STATES = Enum(( - -From 0da20019456c386aa44589c3f0529926fb426541 Mon Sep 17 00:00:00 2001 -From: Mike McLean -Date: May 03 2019 16:54:54 +0000 -Subject: [PATCH 2/2] fix mode name - - ---- - -diff --git a/koji/__init__.py b/koji/__init__.py -index 9c7101c..0b9b5bc 100644 ---- a/koji/__init__.py -+++ b/koji/__init__.py -@@ -236,7 +236,7 @@ REPO_EXPIRED = REPO_STATES['EXPIRED'] - REPO_DELETED = REPO_STATES['DELETED'] - REPO_PROBLEM = REPO_STATES['PROBLEM'] - --REPO_MERGE_MODES = set(['koji', 'simple', 'dumb']) -+REPO_MERGE_MODES = set(['koji', 'simple', 'bare']) - - # buildroot states - BR_STATES = Enum(( - diff --git a/1468.patch b/1468.patch deleted file mode 100644 index 74c1f7a..0000000 --- a/1468.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 403f0f8a44c8ee0fd44326ae4d11bafe79e1809a Mon Sep 17 00:00:00 2001 -From: Patrick Uiterwijk -Date: May 29 2019 15:31:52 +0000 -Subject: Allow builder to attempt krb if gssapi is available - - -Signed-off-by: Patrick Uiterwijk - ---- - -diff --git a/builder/kojid b/builder/kojid -index be1cb26..91d4d69 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -69,6 +69,11 @@ except ImportError: # pragma: no cover - krbV = None - - try: -+ import requests_kerberos -+except ImportError: # pragma: no cover -+ requests_kerberos = None -+ -+try: - import librepo - import io - except ImportError: -@@ -6137,7 +6142,7 @@ if __name__ == "__main__": - quit("Error: Unable to log in. Bad credentials?") - except six.moves.xmlrpc_client.ProtocolError: - quit("Error: Unable to connect to server %s" % (options.server)) -- elif krbV: -+ elif krbV or requests_kerberos: - krb_principal = options.krb_principal - if krb_principal is None: - krb_principal = options.host_principal_format % socket.getfqdn() - diff --git a/1576.patch b/1576.patch new file mode 100644 index 0000000..7439d01 --- /dev/null +++ b/1576.patch @@ -0,0 +1,34 @@ +From ad0da60a380499e7b1ed8ca84ce606b183f79e39 Mon Sep 17 00:00:00 2001 +From: Kevin Fenzi +Date: Jul 19 2019 23:27:30 +0000 +Subject: builder/kojid: revert using only 2 processors for xz compression and lower preset to 6 + + +In c360c791ec24b567a16553dca38b24645dd80a36 we changed xz to use only +2 cpus for compression. That commit notes that xz threads are really +memory hungry. However, preset -9 is many times as memory hungry as +preset -6. If we switch to preset 6, xz compressed artifacts will be +a little bit larger, but will compress (and decompress!) a lot larger. +This is obviously a trade off, but I think lowering the preset and +using more cpus will be a better tradeoff. + +This commit moves xz to preset 6 and using all cpus the builder has. + +Signed-off-by: Kevin Fenzi + +--- + +diff --git a/builder/kojid b/builder/kojid +index 3f84887..09a48a9 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -3989,7 +3989,7 @@ class BaseImageTask(OzImageTask): + 'xz-cp-%s-%s.log' % (format, self.arch)) + log_output(self.session, cmd[0], cmd, conlog, self.getUploadDir(), + logerror=1) +- cmd = ['/usr/bin/xz', '-z9T2', rawimg] ++ cmd = ['/usr/bin/xz', '-z6T0', rawimg] + conlog = os.path.join(self.workdir, + 'xz-%s-%s.log' % (format, self.arch)) + log_output(self.session, cmd[0], cmd, conlog, self.getUploadDir(), + diff --git a/1613.patch b/1613.patch new file mode 100644 index 0000000..29eecef --- /dev/null +++ b/1613.patch @@ -0,0 +1,76 @@ +From 88e92b61a4a4eacf5ccd14566ecfa473d6719a8f Mon Sep 17 00:00:00 2001 +From: Patrick Uiterwijk +Date: Aug 13 2019 11:35:14 +0000 +Subject: [PATCH 1/2] Allow builder to attempt krb if gssapi is available + + +Signed-off-by: Patrick Uiterwijk + +--- + +diff --git a/builder/kojid b/builder/kojid +index 142a440..86af4e5 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -69,6 +69,11 @@ except ImportError: # pragma: no cover + krbV = None + + try: ++ import requests_kerberos ++except ImportError: # pragma: no cover ++ requests_kerberos = None ++ ++try: + import librepo + import io + except ImportError: +@@ -6264,7 +6269,7 @@ if __name__ == "__main__": + quit("Error: Unable to log in. Bad credentials?") + except six.moves.xmlrpc_client.ProtocolError: + quit("Error: Unable to connect to server %s" % (options.server)) +- elif krbV: ++ elif krbV or requests_kerberos: + krb_principal = options.krb_principal + if krb_principal is None: + krb_principal = options.host_principal_format % socket.getfqdn() + +From 8b76e0d1af3b4e6d1faf04cbc9142c277c2cd613 Mon Sep 17 00:00:00 2001 +From: Tomas Kopecek +Date: Aug 13 2019 11:53:16 +0000 +Subject: [PATCH 2/2] fix krbV error handling + + +Fixes: https://pagure.io/koji/issue/1575 + +--- + +diff --git a/builder/kojid b/builder/kojid +index 86af4e5..73c2bf7 100755 +--- a/builder/kojid ++++ b/builder/kojid +@@ -65,11 +65,13 @@ from koji.util import parseStatus, isSuccess, dslice, dslice_ex, to_list + + try: + import krbV ++ Krb5Error = krbV.Krb5Error + except ImportError: # pragma: no cover + krbV = None + + try: + import requests_kerberos ++ Krb5Error = requests_kerberos.exceptions.RequestException + except ImportError: # pragma: no cover + requests_kerberos = None + +@@ -6277,8 +6279,8 @@ if __name__ == "__main__": + session.krb_login(principal=krb_principal, + keytab=options.keytab, + ccache=options.ccache) +- except krbV.Krb5Error as e: +- quit("Kerberos authentication failed: '%s' (%s)" % (e.args[1], e.args[0])) ++ except Krb5Error as e: ++ quit("Kerberos authentication failed: %s" % e.args) + except socket.error as e: + quit("Could not connect to Kerberos authentication service: '%s'" % e.args[1]) + else: + diff --git a/9828bc3dd8ed0679159aceb902409600b21f803c.patch b/9828bc3dd8ed0679159aceb902409600b21f803c.patch deleted file mode 100644 index 8c0afe6..0000000 --- a/9828bc3dd8ed0679159aceb902409600b21f803c.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 9828bc3dd8ed0679159aceb902409600b21f803c Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: May 30 2019 18:45:46 +0000 -Subject: Expose 'dynamic_buildrequires' mock setting - - -We need it in order to enable this feature in rawhide and any module -builds which depend on rpm:4.15 (by request in modulemd). - -Signed-off-by: Igor Gnatenko - ---- - -diff --git a/0001-Expose-dynamic_buildrequires-mock-setting.patch b/0001-Expose-dynamic_buildrequires-mock-setting.patch -new file mode 100644 -index 0000000..914b5a4 ---- /dev/null -+++ b/0001-Expose-dynamic_buildrequires-mock-setting.patch -@@ -0,0 +1,77 @@ -+From cdecc416ec4cc5a5f29d0ff16318f68b562fcfd0 Mon Sep 17 00:00:00 2001 -+From: Igor Gnatenko -+Date: Wed, 29 May 2019 08:13:01 +0200 -+Subject: [PATCH] Expose 'dynamic_buildrequires' mock setting -+ -+Signed-off-by: Igor Gnatenko -+--- -+ builder/kojid | 2 ++ -+ docs/source/using_the_koji_build_system.rst | 2 ++ -+ koji/__init__.py | 2 ++ -+ tests/test_cli/test_add_tag.py | 4 +++- -+ 4 files changed, 9 insertions(+), 1 deletion(-) -+ -+diff --git a/builder/kojid b/builder/kojid -+index d6714258..5fc64638 100755 -+--- a/builder/kojid -++++ b/builder/kojid -+@@ -272,6 +272,8 @@ class BuildRoot(object): -+ opts['target_arch'] = self.target_arch -+ if 'mock.package_manager' in self.config['extra']: -+ opts['package_manager'] = self.config['extra']['mock.package_manager'] -++ if 'mock.dynamic_buildrequires' in self.config['extra']: -++ opts['dynamic_buildrequires'] = self.config['extra']['mock.dynamic_buildrequires'] -+ if self.internal_dev_setup is not None: -+ opts['internal_dev_setup'] = bool(self.internal_dev_setup) -+ output = koji.genMockConfig(self.name, self.br_arch, managed=True, **opts) -+diff --git a/docs/source/using_the_koji_build_system.rst b/docs/source/using_the_koji_build_system.rst -+index c3d5981b..d4664527 100644 -+--- a/docs/source/using_the_koji_build_system.rst -++++ b/docs/source/using_the_koji_build_system.rst -+@@ -456,6 +456,8 @@ environment follows: -+ * `mock.new_chroot` - 0/1 value. If it is set, `--new-chroot` or -+ `--old-chroot` option is appended to any mock call. If it is not set, -+ mock's default behavior is used. -++* `mock.dynamic_buildrequires` - 0/1 value. If this is set, it will override -++ mock's default setting of `dynamic_buildrequires`. -+ -+ Using Koji to control tasks -+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -+diff --git a/koji/__init__.py b/koji/__init__.py -+index 64ab90d6..e105f7ee 100644 -+--- a/koji/__init__.py -++++ b/koji/__init__.py -+@@ -1458,6 +1458,8 @@ def genMockConfig(name, arch, managed=False, repoid=None, tag_name=None, **opts) -+ } -+ if opts.get('package_manager'): -+ config_opts['package_manager'] = opts['package_manager'] -++ if 'dynamic_buildrequires' in opts: -++ config_opts['dynamic_buildrequires'] = opts['dynamic_buildrequires'] -+ -+ # bind_opts are used to mount parts (or all of) /dev if needed. -+ # See kojid::LiveCDTask for a look at this option in action. -+diff --git a/tests/test_cli/test_add_tag.py b/tests/test_cli/test_add_tag.py -+index 422b9245..47112c51 100644 -+--- a/tests/test_cli/test_add_tag.py -++++ b/tests/test_cli/test_add_tag.py -+@@ -56,7 +56,8 @@ class TestAddTag(utils.CliTestCase): -+ '--maven-support', '--include-all'] -+ # extra fields, -+ arguments += ['--extra', 'mock.package_manager=dnf', -+- '--extra', 'mock.new_chroot=0'] -++ '--extra', 'mock.new_chroot=0', -++ '--extra', 'mock.dynamic_buildrequires=1'] -+ -+ opts = { -+ 'parent': 'parent', -+@@ -67,6 +68,7 @@ class TestAddTag(utils.CliTestCase): -+ { -+ 'mock.package_manager': 'dnf', -+ 'mock.new_chroot': 0, -++ 'mock.dynamic_buildrequires': 1, -+ } -+ } -+ -+-- -+2.22.0.rc1 -+ diff --git a/fedora-config.patch b/fedora-config.patch index f3efff9..775b0e3 100644 --- a/fedora-config.patch +++ b/fedora-config.patch @@ -1,65 +1,49 @@ -From e28b662b29f688954a8ebe772e21cb7025ba47b6 Mon Sep 17 00:00:00 2001 -From: Patrick Uiterwijk -Date: Thu, 7 Mar 2019 12:22:12 +0100 -Subject: [PATCH] Apply Fedora instance configuration - -Signed-off-by: Patrick Uiterwijk ---- - cli/koji.conf | 25 +++++++++++-------------- - 1 file changed, 11 insertions(+), 14 deletions(-) - -diff --git a/cli/koji.conf b/cli/koji.conf -index addd4e3..3588c19 100644 ---- a/cli/koji.conf -+++ b/cli/koji.conf -@@ -3,18 +3,23 @@ - ;configuration for koji cli tool +diff -Nur koji-1.18.0.orig/cli/koji.conf koji-1.18.0/cli/koji.conf +--- koji-1.18.0.orig/cli/koji.conf 2019-08-09 11:07:07.000000000 -0700 ++++ koji-1.18.0/cli/koji.conf 2019-08-16 08:14:51.834690613 -0700 +@@ -4,17 +4,22 @@ ;url of XMLRPC server --;server = http://hub.example.com/kojihub + ;server = http://hub.example.com/kojihub +server = https://koji.fedoraproject.org/kojihub ;url of web interface --;weburl = http://www.example.com/koji + ;weburl = http://www.example.com/koji +weburl = https://koji.fedoraproject.org/koji ;url of package download site --;pkgurl = http://www.example.com/packages -+topurl = https://kojipkgs.fedoraproject.org/ + ;pkgurl = http://www.example.com/packages ++pkgurl = https://kojipkgs.fedoraproject.org/ ;path to the koji top directory ;topdir = /mnt/koji -+; use the fast upload feature of koji by default -+use_fast_upload = yes -+ ;configuration for Kerberos authentication +authtype = kerberos +krb_rdns = false ;the service name of the principal being used by the hub ;krbservice = host -@@ -28,17 +33,9 @@ +@@ -28,7 +33,6 @@ ;enable to lookup dns canonical hostname for krb auth ;krb_canon_host = no - --;configuration for SSL authentication -- --;client certificate --;cert = ~/.koji/client.crt -- --;certificate of the CA that issued the HTTP server certificate --;serverca = ~/.koji/serverca.crt -- --;enabled plugins for CLI, runroot and save_failed_tree are available --;plugins = -+;enabled plugins for CLI, runroot is enabled by default for fedora -+;save_failed_tree is available + ;configuration for SSL authentication + + ;client certificate +@@ -45,9 +49,14 @@ + ;[not_implemented_yet] + ;enabled plugins for CLI, runroot and save_failed_tree are available + ;plugins = ++; runroot plugin is enabled by default in fedora +plugins = runroot ;timeout of XMLRPC requests by seconds, default: 60 * 60 * 12 = 43200 ;timeout = 43200 --- -2.20.1 - + + ;timeout of GSSAPI/SSL authentication by seconds, default: 60 + ;auth_timeout = 60 ++ ++; use the fast upload feature of koji by default ++use_fast_upload = yes diff --git a/koji-PR1278-use-createrepo_c-by-default.patch b/koji-PR1278-use-createrepo_c-by-default.patch deleted file mode 100644 index 8940256..0000000 --- a/koji-PR1278-use-createrepo_c-by-default.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 781a09a9750a18b77208e58eaa960b1b0d3f7dac Mon Sep 17 00:00:00 2001 -From: Tomas Kopecek -Date: Feb 25 2019 13:50:30 +0000 -Subject: createrepo_c is used by default now - - -Fixes: https://pagure.io/koji/issue/716 - ---- - -diff --git a/builder/kojid b/builder/kojid -index e7c87f9..5e97615 100755 ---- a/builder/kojid -+++ b/builder/kojid -@@ -5975,7 +5975,7 @@ def get_options(): - 'timeout': None, - 'no_ssl_verify': False, - 'use_fast_upload': True, -- 'use_createrepo_c': False, -+ 'use_createrepo_c': True, - 'createrepo_skip_stat': True, - 'createrepo_update': True, - 'pkgurl': None, -diff --git a/builder/kojid.conf b/builder/kojid.conf -index 7bc235d..b9f0851 100644 ---- a/builder/kojid.conf -+++ b/builder/kojid.conf -@@ -50,7 +50,7 @@ server=http://hub.example.com/kojihub - topurl=http://hub.example.com/kojifiles - - ; use createrepo_c rather than createrepo --; use_createrepo_c=False -+; use_createrepo_c=True - - ; A space-separated list of tuples from which kojid is allowed to checkout. - ; The format of those tuples is: - diff --git a/koji.spec b/koji.spec index 419d6eb..4db9b7b 100644 --- a/koji.spec +++ b/koji.spec @@ -78,35 +78,20 @@ %endif Name: koji -Version: 1.17.0 -Release: 8%{?dist} +Version: 1.18.0 +Release: 1%{?dist} # the included arch lib from yum's rpmUtils is GPLv2+ License: LGPLv2 and GPLv2+ Summary: Build system tools URL: https://pagure.io/koji/ Source0: https://releases.pagure.org/koji/koji-%{version}.tar.bz2 -# Patches proposed upstream -## Use createrepo_c by default now (we already do this in Fedora infra anyway) -## From: https://pagure.io/koji/pull-request/1278 -Patch10: koji-PR1278-use-createrepo_c-by-default.patch +# Patches already upstream +# Already merged patch to fix kojid kerberos auth +Patch1: https://pagure.io/koji/pull-request/1613.patch -# Download only the repomd.xml instead of all the repodata -Patch11: https://pagure.io/koji/pull-request/1398.patch - -# Allow generating seperate srpm repos in buildroot repos -Patch12: https://pagure.io/koji/pull-request/1273.patch - -# Handle 'bare' merge mode for repos -Patch13: https://pagure.io/koji/pull-request/1411.patch - -# Expose dynamic_buildrequires mock setting -# Upstream: https://pagure.io/koji/pull-request/1466.patch -# Rebased for 1.17.0 in https://src.fedoraproject.org/rpms/koji/pull-request/6 -Patch14: https://src.fedoraproject.org/rpms/koji/c/9828bc3dd8ed0679159aceb902409600b21f803c.patch - -# Patch to fix kerberos auth in kojid with python3 -Patch15: https://pagure.io/koji/pull-request/1468.patch +# Adjust xz params to favor speed +Patch15: https://pagure.io/koji/pull-request/1576.patch # Not upstreamable Patch100: fedora-config.patch @@ -712,6 +697,9 @@ fi %endif %changelog +* Fri Aug 16 2019 Kevin Fenzi - 1.18.0-1 +- Update to 1.18.0. + * Thu Jul 25 2019 Fedora Release Engineering - 1.17.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index 12d49b9..9c7e1c4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (koji-1.17.0.tar.bz2) = 6f5da6d10ca3d2c01aa9251d5fa01221a89eb80a24b6b933197f359d9bc348d8e2f8b18d66d886454bdf89e8269a6a9652c44f1858b1c75d6540e32898e76f89 +SHA512 (koji-1.18.0.tar.bz2) = 6229ddde6b0d792d3a8d71ab5cdf7cbed525d64c58b41e779ceac56ae0608ca2eac1346e86ba2e0ce5d64126cc57a50e6ab89253b2c1862ed6f5ca02e1591f6d