From bed10814eb2ecf3df2bdbd2344a3c88bfdca7e25 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Tue, 28 Apr 2020 16:07:13 +0200 Subject: [PATCH] use global option to enable bootstrap-image --- builder/kojid | 6 +++++- builder/kojid.conf | 3 +++ docs/source/using_the_koji_build_system.rst | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/builder/kojid b/builder/kojid index d7a4c885..9ca275b4 100755 --- a/builder/kojid +++ b/builder/kojid @@ -302,7 +302,10 @@ class BuildRoot(object): opts['tag_envvars'][key[8:]] = self.config['extra'][key] if 'mock.bootstrap_chroot' in self.config['extra']: opts['bootstrap_chroot'] = bool(self.config['extra']['mock.bootstrap_chroot']) - opts['bootstrap_image'] = self.config['extra'].get('mock.bootstrap_image') + + # it must be allowed in kojid.conf *and* in tag's extra info + opts['bootstrap_image'] = self.options.mock_boostrap_image and \ + self.config['extra'].get('mock.bootstrap_image') output = koji.genMockConfig(self.name, self.br_arch, managed=True, **opts) @@ -6400,6 +6403,7 @@ def get_options(): 'use_createrepo_c': True, 'createrepo_skip_stat': True, 'createrepo_update': True, + 'mock_boostrap_image': False, 'pkgurl': None, 'allowed_scms': '', 'scm_credentials_dir': None, diff --git a/builder/kojid.conf b/builder/kojid.conf index 892c50a4..5f5ec285 100644 --- a/builder/kojid.conf +++ b/builder/kojid.conf @@ -116,6 +116,9 @@ from_addr=Koji Build System ;if set to True, failing subtask will not automatically cancel other siblings ;build_arch_can_fail = False +;if set to True, tag extra 'mock.bootstrap_image' can be used +;mock_boostrap_image = False + ;image build with raw-xz type will use following xz options ;xz_options=-z6T0 diff --git a/docs/source/using_the_koji_build_system.rst b/docs/source/using_the_koji_build_system.rst index 52dd1b1b..279e9cb2 100644 --- a/docs/source/using_the_koji_build_system.rst +++ b/docs/source/using_the_koji_build_system.rst @@ -407,6 +407,9 @@ environment follows: before using this. You could need it, but do it with following recommendations: + - you need to explicitly allow builders to do that (``mock_boostrap_image = + True`` in ``kojid.conf``). + - you need to have builders with `podman `_ installed and working.