From e455d90eccb297195fe82096102c0aa514d84b29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hr=C3=A1zk=C3=BD?= Date: Tue, 19 Jul 2022 11:18:14 +0200 Subject: [PATCH] Backport patch: copr: Guess EPEL chroots for CentOS Stream Resolves: rhbz#2058471 --- ...chroots-for-CentOS-Stream-RhBug-2058.patch | 37 +++++++++++++++++++ dnf-plugins-core.spec | 6 ++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0001-copr-Guess-EPEL-chroots-for-CentOS-Stream-RhBug-2058.patch diff --git a/0001-copr-Guess-EPEL-chroots-for-CentOS-Stream-RhBug-2058.patch b/0001-copr-Guess-EPEL-chroots-for-CentOS-Stream-RhBug-2058.patch new file mode 100644 index 0000000..751d9d2 --- /dev/null +++ b/0001-copr-Guess-EPEL-chroots-for-CentOS-Stream-RhBug-2058.patch @@ -0,0 +1,37 @@ +From 579ef1bb577807090a114378219a812ec26b724a Mon Sep 17 00:00:00 2001 +From: Carl George +Date: Mon, 27 Jun 2022 23:12:05 -0500 +Subject: [PATCH] copr: Guess EPEL chroots for CentOS Stream (RhBug:2058471) + +Packages built in epel-9 chroots are almost always compatible with +CentOS Stream 9. Not having the copr plugin guess this chroot is +causing user friction. Users are creating epel-9 chroots expecting them +to work for both CentOS Stream 9 and RHEL 9. When they get reports +about `dnf copr enable` not working, they try to add a centos-stream-9 +chroot, only to discover the dependencies they need from EPEL are not +available. + +Instead of making the majority of CentOS Stream users include an +explicit chroot argument, let's reserve that workaround only for the +people that don't want their CentOS Stream systems picking the EPEL +chroot. +--- + plugins/copr.py | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/plugins/copr.py b/plugins/copr.py +index 297210b..16946b7 100644 +--- a/plugins/copr.py ++++ b/plugins/copr.py +@@ -469,8 +469,6 @@ Bugzilla. In case of problems, contact the owner of this repository. + chroot = ("opensuse-tumbleweed-{}".format(distarch)) + else: + chroot = ("opensuse-leap-{0}-{1}".format(dist[1], distarch)) +- elif "CentOS Stream" in dist: +- chroot = ("centos-stream-{0}-{1}".format(dist[1], distarch)) + else: + chroot = ("epel-%s-x86_64" % dist[1].split(".", 1)[0]) + return chroot +-- +2.36.1 + diff --git a/dnf-plugins-core.spec b/dnf-plugins-core.spec index 1191c84..4d8d54e 100644 --- a/dnf-plugins-core.spec +++ b/dnf-plugins-core.spec @@ -34,11 +34,12 @@ Name: dnf-plugins-core Version: 4.1.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Core Plugins for DNF License: GPLv2+ URL: https://github.com/rpm-software-management/dnf-plugins-core Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +Patch1: 0001-copr-Guess-EPEL-chroots-for-CentOS-Stream-RhBug-2058.patch BuildArch: noarch BuildRequires: cmake @@ -784,6 +785,9 @@ ln -sf %{_mandir}/man1/%{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/ %endif %changelog +* Tue Jul 19 2022 Lukas Hrazky - 4.1.0-2 +- [copr] Guess EPEL chroots for CentOS Stream + * Thu Apr 28 2022 Pavla Kratochvilova - 4.1.0-1 - Add a new subpackage with modulesync command. The command downloads packages from modules and/or creates a repository with modular data. (RhBug:1868047) - [repoclosure] Print counts of missing dependencies