I'm trying to do a mockbuild for epel8, but it fails with:
Error: Error downloading packages: Status code: 403 for https://infrastructure.fedoraproject.org/repo/rhel/rhel8/koji/latest/x86_64/RHEL-8-001/non_modular/basesystem-11-5.el8.noarch.rpm (IP: 38.145.60.16)
Anytime
When you say you are doing a mockbuild.. what exactly does that mean? There are multiple ways this can be done and some of them will try to use the koji configs to do so. Those will not work with EPEL builds. Instead you need to use one of the /etc/mock/*+epel-8-.cfg tags
I'm doing fedpkg --release epel8 mockbuild.
fedpkg --release epel8 mockbuild
$ fedpkg --release epel8 mock-config # Auto-generated by the Koji build system config_opts['basedir'] = '/var/lib/mock' config_opts['chroot_setup_cmd'] = 'groupinstall build' config_opts['chroothome'] = '/builddir' config_opts['dnf_warning'] = False config_opts['package_manager'] = 'dnf' config_opts['root'] = 'epel8-candidate-x86_64' config_opts['rpmbuild_networking'] = False config_opts['rpmbuild_timeout'] = 86400 config_opts['target_arch'] = 'x86_64' config_opts['use_host_resolv'] = False config_opts['yum.conf'] = '[main]\ncachedir=/var/cache/yum\ndebuglevel=1\nlogfile=/var/log/yum.log\nreposdir=/dev/null\nretries=20\nobsoletes=1\ngpgcheck=0\nassumeyes=1\nkeepcache=1\ninstall_weak_deps=0\nstrict=1\n\n# repos\n\n[build]\nname=build\nbaseurl=https://kojipkgs.fedoraproject.org/repos/epel8-build/4407864/x86_64\nmodule_hotfixes=1\n' config_opts['plugin_conf']['ccache_enable'] = False config_opts['plugin_conf']['root_cache_enable'] = False config_opts['plugin_conf']['yum_cache_enable'] = False config_opts['macros']['%_host'] = 'x86_64-koji-linux-gnu' config_opts['macros']['%_host_cpu'] = 'x86_64' config_opts['macros']['%_rpmfilename'] = '%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' config_opts['macros']['%_topdir'] = '/builddir/build' config_opts['macros']['%distribution'] = 'el8' config_opts['macros']['%packager'] = 'Koji' config_opts['macros']['%vendor'] = 'Koji'
To stop this from happening, I needed to do the following:
$ sudo -i # cd /etc/mock # ln -s alma+epel-8-x86_64.cfg epel-8-x86_64.cfg # ln -s alma+epel-8-aarch64.cfg epel-8-aarch64.cfg
You can also do the same with rocky+epel or oraclelinux+epel or if you have RHEL subscriptions /etc/mock/rhel+epel-8-. centos+epel-8 will go away on 2022-02-01
there used to be an epel-8-.cfg but with CentOS going away and different options which different people expect to be the default, the EPEL committee and mock teams worked together as this was the least worst.
fedpkg however breaks this because without an epel-8-arch.cfg package it will create an automatic one from koji.
Thank you, providing epel-8*cfg helped.
Metadata Update from @vashirov: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)