Skip to content

Instantly share code, notes, and snippets.

@junaruga
Created March 14, 2025 16:08
Show Gist options
  • Save junaruga/09838e4e297faaea0f2dc2fca4a992cf to your computer and use it in GitHub Desktop.
Save junaruga/09838e4e297faaea0f2dc2fca4a992cf to your computer and use it in GitHub Desktop.
$ cat c9s-x86_64_config.txt
config_opts['additional_packages'] = []
config_opts['build_log_fmt_str'] = '%(message)s'
config_opts['cache_alterations'] = False
config_opts['chroot_name'] = 'c9s'
config_opts['chroot_setup_cmd'] = 'install @build'
config_opts['chrootuid'] = 28707
config_opts['cleanup_on_failure'] = False
config_opts['cleanup_on_success'] = False
config_opts['config_file'] = '/home/jaruga/.config/mock/c9s.cfg'
config_opts['config_path'] = '/etc/mock'
config_opts['config_paths'] = ['/home/jaruga/etc/my-config/home/.config/mock.cfg.thinkpad',
'/etc/mock/site-defaults.cfg',
'/home/jaruga/etc/my-config/home/.config/mock/c9s.cfg',
'/etc/mock/chroot-aliases.cfg']
config_opts['dnf.conf'] = ('\n'
'[main]\n'
'cachedir=/var/cache/yum\n'
'debuglevel=1\n'
'logfile=/var/log/yum.log\n'
'reposdir=/dev/null\n'
'retries=20\n'
'obsoletes=1\n'
'gpgcheck=0\n'
'assumeyes=1\n'
'keepcache=1\n'
'install_weak_deps=0\n'
'strict=1\n'
'# repos\n'
'[build]\n'
'name=build\n'
'baseurl=http://kojihub.stream.rdu2.redhat.com/kojifiles/repos/c9s-build/latest/x86_64\n')
config_opts['dnf_warning'] = False
config_opts['enable_disable_repos'] = []
config_opts['macros'] = {'%_buildhost': 'jaruga-thinkpadx1carbongen11.rmtcz.csb',
'%_host': 'x86_64-koji-linux-gnu',
'%_host_cpu': 'x86_64',
'%_rpmfilename': '%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm',
'%_topdir': '/builddir/build',
'%distribution': 'el9',
'%packager': 'Koji',
'%vendor': 'Koji'}
config_opts['mock_run_uuid'] = '0928e405-b48b-48f3-ba3a-1b1927cf214e'
config_opts['no-config'] = {'epel-8': {'alternatives': {'alma+epel-8': {'description': ['Builds against '
'AlmaLinux 8 '
'repositories, '
'together with '
'the official '
'EPEL '
'repositories.',
'Project page: '
'https://almalinux.org/']},
'centos-stream+epel-8': {'description': ['Builds '
'against '
'CentOS '
'Stream '
'8 '
'repositories '
'(some '
'packages '
'may be '
'a bit '
'ahead '
'the Red '
'Hat '
'Enterprise '
'Linux '
'8) '
'together '
'with '
'the '
'official '
'EPEL 8 '
'repositories.',
'Project '
'page: '
'https://www.centos.org/centos-stream/']},
'circlelinux+epel-8': {'description': ['Builds '
'against '
'Circle '
'Linux 8 '
'repositories, '
'together '
'with the '
'official '
'EPEL '
'repositories.',
'Project '
'page: '
'https://cclinux.org/']},
'rhel+epel-8': {'description': ['Builds against '
'Red Hat '
'Enterprise Linux '
'8 repositories, '
'together with '
'the official '
'EPEL '
'repositories.',
'This mimics what '
'is done in the '
'official EPEL '
'build system, '
'but you need a '
'Red Hat '
'subscription:',
'https://rpm-software-management.github.io/mock/Feature-rhelchroots']},
'rocky+epel-8': {'description': ['Builds against '
'Rocky Linux 8 '
'repositories, '
'together with '
'the official '
'EPEL '
'repositories.',
'Project page: '
'https://rockylinux.org/']}}},
'epel-9': {'alternatives': {'alma+epel-9': {'description': ['Builds against '
'AlmaLinux 9 '
'repositories, '
'together with '
'the official '
'EPEL '
'repositories.',
'Project page: '
'https://almalinux.org/']},
'centos-stream+epel-9': {'description': ['Builds '
'against '
'CentOS '
'Stream '
'9 '
'repositories '
'(some '
'packages '
'may be '
'a bit '
'ahead '
'the Red '
'Hat '
'Enterprise '
'Linux '
'9) '
'together '
'with '
'the '
'official '
'EPEL '
'repositories.',
'Project '
'page: '
'https://www.centos.org/centos-stream/']},
'rhel+epel-9': {'description': ['Builds against '
'Red Hat '
'Enterprise Linux '
'9 repositories, '
'together with '
'the official '
'EPEL '
'repositories.',
'This mimics what '
'is done in the '
'official EPEL '
'build system, '
'but you need a '
'Red Hat '
'subscription:',
'https://rpm-software-management.github.io/mock/Feature-rhelchroots']},
'rocky+epel-9': {'description': ['Builds against '
'Rocky Linux 9 '
'repositories, '
'together with '
'the official '
'EPEL '
'repositories.',
'Project page: '
'https://rockylinux.org/']}}}}
config_opts['nosync'] = True
config_opts['nosync_force'] = True
config_opts['nspawn_args'] = ['--capability=cap_ipc_lock',
'--bind=/tmp/mock-resolv.kwhfwu0q:/etc/resolv.conf',
'--bind=/dev/btrfs-control',
'--bind=/dev/mapper/control',
'--bind=/dev/fuse',
'--bind=/dev/loop-control',
'--bind=/dev/loop0',
'--bind=/dev/loop1',
'--bind=/dev/loop2',
'--bind=/dev/loop3',
'--bind=/dev/loop4',
'--bind=/dev/loop5',
'--bind=/dev/loop6',
'--bind=/dev/loop7',
'--bind=/dev/loop8',
'--bind=/dev/loop9',
'--bind=/dev/loop10',
'--bind=/dev/loop11']
config_opts['plugin_conf'] = {'__init___enable': False,
'__init___opts': {'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64'},
'bind_mount_enable': True,
'bind_mount_opts': {'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'create_dirs': False,
'dirs': [('/home/jaruga/git', '/mnt/git')],
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64'},
'buildroot_lock_enable': False,
'buildroot_lock_opts': {'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64'},
'ccache_enable': False,
'ccache_opts': {'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'compress': None,
'debug': False,
'dir': '/var/cache/mock/c9s-candidate-x86_64/ccache/u28707/',
'hashdir': True,
'max_cache_size': '4G',
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64',
'show_stats': False},
'chroot_scan_enable': False,
'chroot_scan_opts': {'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'only_failed': True,
'regexes': ['^[^k]?core(\\.\\d+)?$', '\\.log$'],
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64',
'write_tar': False},
'compress_logs_enable': False,
'compress_logs_opts': {'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'command': 'gzip',
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64'},
'export_buildroot_image_enable': False,
'export_buildroot_image_opts': {'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64'},
'hw_info_enable': True,
'hw_info_opts': {'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64'},
'lvm_root_enable': False,
'lvm_root_opts': {'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'pool_name': 'mockbuild',
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64'},
'mount_enable': True,
'mount_opts': {'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'dirs': [],
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64'},
'overlayfs_enable': False,
'overlayfs_opts': {'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64'},
'package_state_enable': True,
'package_state_opts': {'available_pkgs': False,
'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'installed_pkgs': True,
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64'},
'pm_request_enable': False,
'pm_request_opts': {'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64'},
'procenv_enable': False,
'procenv_opts': {'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64'},
'root_cache_enable': False,
'root_cache_opts': {'age_check': True,
'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'compress_program': 'pigz',
'decompress_program': None,
'dir': '/var/cache/mock/c9s-candidate-x86_64/root_cache/',
'exclude_dirs': ['./proc',
'./sys',
'./dev',
'./tmp/ccache',
'./var/cache/yum',
'./var/cache/dnf',
'./var/log'],
'extension': '.gz',
'max_age_days': 15,
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64'},
'rpkg_preprocessor_enable': False,
'rpkg_preprocessor_opts': {'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'cmd': '/usr/bin/preproc-rpmspec %(source_spec)s '
'--output %(target_spec)s',
'requires': ['preproc-rpmspec'],
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64'},
'rpmautospec_enable': False,
'rpmautospec_opts': {'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'cmd_base': ['/usr/bin/rpmautospec', 'process-distgit'],
'requires': ['rpmautospec'],
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64'},
'selinux_enable': True,
'selinux_opts': {'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64'},
'showrc_enable': False,
'showrc_opts': {'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64'},
'sign_enable': False,
'sign_opts': {'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'cmd': 'rpmsign',
'opts': '--addsign %(rpms)s',
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64'},
'tmpfs_enable': False,
'tmpfs_opts': {'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'keep_mounted': False,
'max_fs_size': None,
'mode': '0755',
'required_ram_mb': 900,
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64'},
'yum_cache_enable': False,
'yum_cache_opts': {'basedir': '/var/lib/mock/c9s-candidate-x86_64',
'cache_topdir': '/var/cache/mock',
'cachedir': '/var/cache/mock/c9s-candidate-x86_64',
'max_age_days': 30,
'max_metadata_age_days': 30,
'online': True,
'resultdir': '/var/lib/mock/c9s-candidate-x86_64/result',
'root': 'c9s-candidate-x86_64'}}
config_opts['print_main_output'] = True
config_opts['repo_arch'] = 'x86_64'
config_opts['root'] = 'c9s-candidate-x86_64'
config_opts['root_log_fmt_str'] = '%(levelname)s %(filename)s:%(lineno)d: %(message)s'
config_opts['rpmbuild_arch'] = 'x86_64'
config_opts['rpmbuild_networking'] = True
config_opts['rpmbuild_timeout'] = 86400
config_opts['state_log_fmt_str'] = '%(asctime)s - %(message)s'
config_opts['target_arch'] = 'x86_64'
config_opts['use_bootstrap_image'] = False
config_opts['use_host_resolv'] = True
config_opts['verbose'] = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment