summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--el8xr.cfg2
-rw-r--r--fc31xr.cfg2
-rw-r--r--site-defaults.cfg38
3 files changed, 41 insertions, 1 deletions
diff --git a/el8xr.cfg b/el8xr.cfg
index 40d5ac6..1b5d47e 100644
--- a/el8xr.cfg
+++ b/el8xr.cfg
@@ -3,6 +3,8 @@ include('el8x.tpl')
config_opts['root'] = 'el8x'
config_opts['resultdir'] = "/var/lib/mock/el8x"
+config_opts['macros']['%_with_rpmfusion']="1"
+
config_opts['yum.conf'] += """
[rpmfusion-free-updates]
diff --git a/fc31xr.cfg b/fc31xr.cfg
index 10d60c2..6aaad16 100644
--- a/fc31xr.cfg
+++ b/fc31xr.cfg
@@ -1,5 +1,7 @@
include('fc31x.tpl')
+config_opts['macros']['%_with_rpmfusion']="1"
+
config_opts['yum.conf'] += """
[rpmfusion-free]
name=rpmfusion-free
diff --git a/site-defaults.cfg b/site-defaults.cfg
index 23dcde4..2037655 100644
--- a/site-defaults.cfg
+++ b/site-defaults.cfg
@@ -73,7 +73,7 @@ config_opts['rpmbuild_networking'] = True
# config_opts['use_container_host_hostname'] = True
# The default package manager is Yum
-# config_opts['package_manager'] = 'yum'
+config_opts['package_manager'] = 'dnf'
# If you want to use DNF, set it to 'dnf'. To use DNf you need to have dnf and
# dnf-plugins-core installed
@@ -89,6 +89,42 @@ config_opts['rpmbuild_networking'] = True
# By default a Yum/DNF update is performed before each rebuild
# config_opts['update_before_build'] = True
+# Sometimes the rpm/yum/dnf ecosystem on the host machine isn't really
+# compatible with the rpm/yum/dnf ecosystem in mock chroot (the system we
+# build for). Typically when host is yum-based and target system is dnf-based.
+# Such scenario may cause an error when preparing the target mock buildroot, or
+# even worse an unexpected install transaction that is hard to detect.
+# Therefore, with `use_bootstrap=True` default, we first install a minimal
+# "bootstrap" chroot that only contains rpm/yum/dnf stack, and from that
+# "bootstrap" chroot we initialize the target chroot.
+#config_opts['use_bootstrap'] = True
+config_opts['use_bootstrap'] = False
+
+# When 'use_bootstrap' is enabled, these commands are used to install the
+# desired package manager into the "bootstrap" chroot.
+#config_opts['yum_install_command'] = 'install yum yum-utils'
+#config_opts['dnf_install_command'] = 'install dnf dnf-plugins-core'
+#config_opts['system_yum_command'] = '/usr/bin/yum'
+#config_opts['system_dnf_command'] = '/usr/bin/dnf'
+
+# The bootstrap chroot is normally installed using a package manager from host,
+# but in some cases even this isn't possible (e.g. installing rather new ZSTD
+# compressed dnf.rpm package by 'dnf_install_command' on epel-7 host). In such
+# case, you may need to have "bootstrap" chroot pre-populated from a container
+# image first (where the package manager stack is already pre-installed, so
+# mock doesn't have to).
+#config_opts['use_bootstrap_image'] = False
+#config_opts['bootstrap_image'] = 'fedora:latest'
+
+# anything you specify with 'bootstrap_*' will be copied to bootstrap config
+# e.g. config_opts['bootstrap_system_yum_command'] = '/usr/bin/yum-deprecated' will become
+# config_opts['system_yum_command'] = '/usr/bin/yum-deprecated' for bootstrap config
+# These three are overrided in bootstrap by default as we usually do not want additional packages
+# and modules in bootstrap chroot.
+#config_opts['bootstrap_chroot_additional_packages'] = []
+#config_opts['bootstrap_module_enable'] = []
+#config_opts['bootstrap_module_install'] = []
+
# if you want mock to automatically run createrepo on the rpms in your
# resultdir.
# config_opts['createrepo_on_rpms'] = False