From b703bcbbcbcff9ad6d2eff6fdb3cb284fd5d2b76 Mon Sep 17 00:00:00 2001 From: Yuming Zhu Date: Jan 11 2018 07:41:04 +0000 Subject: [PATCH 1/2] builder: make temp dir be configured --- diff --git a/builder/kojid b/builder/kojid index f1e20f3..0505e7f 100755 --- a/builder/kojid +++ b/builder/kojid @@ -733,7 +733,7 @@ class BuildRoot(object): # mock 1.4+ /tmp is tmpfs mounted on each run, different # directory is needed for persistency # 'within' is equivalent to broot.path_without_to_within(broot.tmpdir()) - base = "/builddir/tmp" + base = self.options.tmpdir if within: return base else: @@ -5579,6 +5579,7 @@ def get_options(): parser.add_option("--topdir", help="Specify topdir") parser.add_option("--topurl", help="Specify topurl") parser.add_option("--workdir", help="Specify workdir") + parser.add_option("--tmpdir", help="Specify tmpdir") parser.add_option("--pluginpath", help="Specify plugin search path") parser.add_option("--plugin", action="append", help="Load specified plugin") parser.add_option("--mockdir", help="Specify mockdir") @@ -5607,6 +5608,7 @@ def get_options(): 'topdir': '/mnt/koji', 'topurl': None, 'workdir': '/var/tmp/koji', + 'tmpdir': '/tmpdir', 'pluginpath': '/usr/lib/koji-builder-plugins', 'mockdir': '/var/lib/mock', 'mockuser': 'kojibuilder', diff --git a/builder/kojid.conf b/builder/kojid.conf index 3d2f3ce..08d071a 100644 --- a/builder/kojid.conf +++ b/builder/kojid.conf @@ -14,6 +14,9 @@ ; The directory root for temporary storage ; workdir=/tmp/koji +; The temporary directory in buildroot +; tmpdir = /tmpdir + ; The directory root for mock ; mockdir=/var/lib/mock From 932cc7a05d97787bd62b600d4a6298df7c35fe97 Mon Sep 17 00:00:00 2001 From: Yuming Zhu Date: Jan 15 2018 10:45:29 +0000 Subject: [PATCH 2/2] rename parameter/default value - tmpdir to chroot_tmpdir --- diff --git a/builder/kojid b/builder/kojid index 0505e7f..434562a 100755 --- a/builder/kojid +++ b/builder/kojid @@ -733,7 +733,7 @@ class BuildRoot(object): # mock 1.4+ /tmp is tmpfs mounted on each run, different # directory is needed for persistency # 'within' is equivalent to broot.path_without_to_within(broot.tmpdir()) - base = self.options.tmpdir + base = self.options.chroot_tmpdir if within: return base else: @@ -5579,7 +5579,7 @@ def get_options(): parser.add_option("--topdir", help="Specify topdir") parser.add_option("--topurl", help="Specify topurl") parser.add_option("--workdir", help="Specify workdir") - parser.add_option("--tmpdir", help="Specify tmpdir") + parser.add_option("--chroot-tmpdir", help="Specify tmpdir in buildroot") parser.add_option("--pluginpath", help="Specify plugin search path") parser.add_option("--plugin", action="append", help="Load specified plugin") parser.add_option("--mockdir", help="Specify mockdir") @@ -5608,7 +5608,7 @@ def get_options(): 'topdir': '/mnt/koji', 'topurl': None, 'workdir': '/var/tmp/koji', - 'tmpdir': '/tmpdir', + 'chroot_tmpdir': '/chroot_tmpdir', 'pluginpath': '/usr/lib/koji-builder-plugins', 'mockdir': '/var/lib/mock', 'mockuser': 'kojibuilder', diff --git a/builder/kojid.conf b/builder/kojid.conf index 08d071a..1a49ebe 100644 --- a/builder/kojid.conf +++ b/builder/kojid.conf @@ -15,7 +15,7 @@ ; workdir=/tmp/koji ; The temporary directory in buildroot -; tmpdir = /tmpdir +; chroot_tmpdir = /chroot_tmpdir ; The directory root for mock ; mockdir=/var/lib/mock