dnf-plugins-core icon indicating copy to clipboard operation
dnf-plugins-core copied to clipboard

copr plugin: _guess_chroot does not handle centos stream properly

Open jakub-vavra-cz opened this issue 1 year ago • 2 comments

I am trying to enable repo on centos stream 9 "dnf -y copr enable --hub copr.fedorainfracloud.org @sssd/pr7193" It is incorrectly defaulting to epel-9-x86_64 instead of centos-stream-9-x86_64:

2024-03-01T11:35:55 Repository 'epel-9-x86_64' does not exist in project '@sssd/pr7193'. 2024-03-01T11:35:55 Available repositories: 'fedora-38-x86_64', 'fedora-40-x86_64', 'centos-stream-9-x86_64', 'fedora-rawhide-x86_64', 'fedora-39-x86_64'

I do not want to put there repo explicitly as I want to reuse same code on centos, fedora and rhel.

jakub-vavra-cz avatar Mar 01 '24 12:03 jakub-vavra-cz

Back in version 4.0.23 and earlier of the plugin, CentOS Stream would match EPEL chroots because epel-%s-x86_64 was the default if the system didn't identify as Fedora, Mageia, or openSUSE. In version 4.0.24, this was "fixed" to special case CentOS Stream to match centos-stream-{0}-{1} chroots. This caused lots of complaints from users and maintainers, for several reasons.

  • EPEL itself targets compatibility with CentOS Stream, so EPEL copr chroots not being picked surprises users.
  • Many copr projects enable EPEL chroots, but very few enable CentOS Stream chroots.
  • A copr project that enables CentOS Stream chroots will not have access to other EPEL packages which may be build requirements during its builds, leading to failed builds.

Due to these problems, that "fix" was reverted in version 4.3.0. Reverting the revert will be a mistake and bring back all of these same problems. This issue and the accompanying pull request (#525) should be closed.

carlwgeorge avatar Apr 27 '24 02:04 carlwgeorge