From ecabf91897fa6be7b4163803ae93e6600e0c5d1d Mon Sep 17 00:00:00 2001 From: sharpenedblade Date: Fri, 29 Sep 2023 23:31:30 -0700 Subject: [PATCH] Move mock config to file --- fedora-dev/Containerfile | 20 ++++++++++++++++---- fedora-dev/mock-config.cfg | 6 ++++++ 2 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 fedora-dev/mock-config.cfg diff --git a/fedora-dev/Containerfile b/fedora-dev/Containerfile index 7380fcd..89d2a4c 100644 --- a/fedora-dev/Containerfile +++ b/fedora-dev/Containerfile @@ -1,6 +1,18 @@ FROM fedora:38 -SHELL ["/usr/bin/env", "bash", "-c"] -RUN dnf install -y koji git rpmdevtools rpm-sign mock ccache zstd createrepo rpmlint ShellCheck && \ - dnf clean all && \ - echo -e "config_opts['plugin_conf']['package_state_enable'] = False\nconfig_opts['macros']['_smp_mflags'] = '-j8'\nconfig_opts['plugin_conf']['ccache_opts']['compress'] = True\nconfig_opts['plugin_conf']['root_cache_opts']['compress_program'] = 'zstd'\nconfig_opts['plugin_conf']['root_cache_opts']['extension'] = '.zst'\nconfig_opts['plugin_conf']['hw_info_enable'] = False\n" > /etc/mock/site-defaults.cfg +SHELL ["/usr/bin/bash", "-c"] + +RUN dnf install -y \ + koji \ + git \ + rpmdevtools \ + rpm-sign \ + mock \ + ccache \ + zstd createrepo \ + rpmlint \ + ShellCheck \ +&& dnf clean all \ + +COPY mock-defaults.cfg /etc/mock/site-defaults.cfg + WORKDIR /repo diff --git a/fedora-dev/mock-config.cfg b/fedora-dev/mock-config.cfg new file mode 100644 index 0000000..16e3374 --- /dev/null +++ b/fedora-dev/mock-config.cfg @@ -0,0 +1,6 @@ +config_opts['plugin_conf']['package_state_enable'] = False +config_opts['macros']['_smp_mflags'] = '-j8' +config_opts['plugin_conf']['ccache_opts']['compress'] = True +config_opts['plugin_conf']['root_cache_opts']['compress_program'] = 'zstd' +config_opts['plugin_conf']['root_cache_opts']['extension'] = '.zst' +config_opts['plugin_conf']['hw_info_enable'] = False