From ab61a8bfa84d5801f2a67b1dad7ef16ed759f8c1 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Mar 05 2020 14:57:33 +0000 Subject: make xz options configurable Fixes: https://pagure.io/koji/issue/1901 --- diff --git a/builder/kojid b/builder/kojid index a9c8cf1..f95cf5f 100755 --- a/builder/kojid +++ b/builder/kojid @@ -4093,7 +4093,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', self.options.xz_options, rawimg] conlog = os.path.join(self.workdir, 'xz-%s-%s.log' % (format, self.arch)) log_output(self.session, cmd[0], cmd, conlog, self.getUploadDir(), @@ -6371,6 +6371,7 @@ def get_options(): 'failed_buildroot_lifetime': 3600 * 4, 'rpmbuild_timeout': 3600 * 24, 'oz_install_timeout': 0, + 'xz_options': '-z6T0', 'task_avail_delay': 300, 'cert': None, 'ca': '', # FIXME: Unused, remove in next major release diff --git a/builder/kojid.conf b/builder/kojid.conf index 394d328..892c50a 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 +;image build with raw-xz type will use following xz options +;xz_options=-z6T0 + ;if set to True additional logs with timestamps will get created and uploaded ;to hub. It could be useful for debugging purposes, but creates twice as many ;log files diff --git a/docs/source/kojid_conf.rst b/docs/source/kojid_conf.rst index fd5aa6f..2f61507 100644 --- a/docs/source/kojid_conf.rst +++ b/docs/source/kojid_conf.rst @@ -170,6 +170,11 @@ Building This value is used for waiting on all xmlrpc calls to hub. By default there is no timeout set. + xz_options=-z6T0 + Image builds with ``raw-xz`` type will use this setting when compressing + the image. Default value is compromise between speed and resource usage. + Only one option (not space-separated) is allowed here for now. + RPM Builds ^^^^^^^^^^ .. glossary::