mirror of
https://github.com/clearlinux/common.git
synced 2026-09-05 21:21:41 +00:00
In Mock version 1.4.4, the chroot group was changed from "mockbuild" to "mock". This creates a problem for running Mock on Clear Linux because (a) the distro already has group "mock", and (b) Mock tries to `groupdel mock` within the chroot and fails, since the group is defined in /usr/share/defaults/etc/group and not in /etc/group. Mock treats the groupdel failure as fatal. Fortunately there is a workaround: set the "chrootgroup" config to a group not already defined in the OS. I am setting the group to "mockbuild" in the default config to restore the behavior of previous Mock versions. Thanks to Mark Horn for adding this feature upstream! It was merged for Mock 1.4.7. Also, disable the new bootstrap container feature, added in Mock version 1.4.1. It was disabled by default in version 1.4.2, but keep the explicit setting in case upstream enables it in the future. Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
48 lines
1.1 KiB
INI
48 lines
1.1 KiB
INI
config_opts['root'] = 'clear'
|
|
config_opts['target_arch'] = 'x86_64'
|
|
config_opts['legal_host_arches'] = ('x86_64',)
|
|
config_opts['chroot_setup_cmd'] = 'groupinstall build srpm-build'
|
|
config_opts['dist'] = 'clear' # only useful for --resultdir variable subst
|
|
config_opts['extra_chroot_dirs'] = [ '/run/lock', ]
|
|
config_opts['useradd'] = '/usr/sbin/useradd -m -u %(uid)s -g %(gid)s -d %(home)s %(user)s'
|
|
config_opts['plugin_conf']['ccache_enable'] = False
|
|
config_opts['releasever'] = 'clear'
|
|
config_opts['package_manager'] = 'dnf'
|
|
config_opts['chrootgroup'] = 'mockbuild'
|
|
config_opts['use_bootstrap_container'] = False
|
|
|
|
|
|
config_opts['dnf.conf'] = """
|
|
|
|
[main]
|
|
cachedir=/var/cache/dnf
|
|
keepcache=1
|
|
debuglevel=1
|
|
reposdir=/dev/null
|
|
logfile=/var/log/dnf.log
|
|
retries=20
|
|
obsoletes=1
|
|
gpgcheck=0
|
|
assumeyes=1
|
|
syslog_ident=mock
|
|
syslog_device=
|
|
|
|
# repos
|
|
|
|
|
|
[local]
|
|
name=local
|
|
baseurl=https://cdn.download.clearlinux.org/current/x86_64/os/
|
|
gpgcheck=0
|
|
cost=2000
|
|
enabled=1
|
|
|
|
|
|
[debuginfo]
|
|
name=debuginfo
|
|
baseurl=https://cdn.download.clearlinux.org/current/x86_64/debug/
|
|
gpgcheck=0
|
|
cost=2000
|
|
enabled=1
|
|
"""
|