From 55de03e081e89ac35c4b9743435ca202457c4a92 Mon Sep 17 00:00:00 2001 From: Aron Parsons Date: Jan 24 2020 04:15:40 +0000 Subject: builder: add bootstrap-chroot support for mock fixes https://pagure.io/koji/issue/1017 --- diff --git a/builder/kojid b/builder/kojid index 0c6a256..254346e 100755 --- a/builder/kojid +++ b/builder/kojid @@ -534,7 +534,13 @@ class BuildRoot(object): return koji.pathinfo.taskrelpath(self.task_id) def init(self): - rv = self.mock(['--init']) + args = ['--init'] + + if 'mock.bootstrap_chroot' in self.config['extra']: + if self.config['extra']['mock.bootstrap_chroot']: + args.append('--bootstrap-chroot') + + rv = self.mock(args) if rv: self.expire() diff --git a/docs/source/using_the_koji_build_system.rst b/docs/source/using_the_koji_build_system.rst index 7517307..fa9d40e 100644 --- a/docs/source/using_the_koji_build_system.rst +++ b/docs/source/using_the_koji_build_system.rst @@ -455,6 +455,9 @@ 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.bootstrap_chroot` - 0/1 value. If it is set, `--bootstrap-chroot` + is appended to the mock init call. This tells mock to build in two stages, + using chroot rpm for creating the build chroot Using Koji to control tasks ^^^^^^^^^^^^^^^^^^^^^^^^^^^