Backport patch: copr: Guess EPEL chroots for CentOS Stream

Resolves: rhbz#2058471
This commit is contained in:
Lukáš Hrázký 2022-07-19 11:18:14 +02:00
parent 2d4f65114c
commit e455d90ecc
2 changed files with 42 additions and 1 deletions

View File

@ -0,0 +1,37 @@
From 579ef1bb577807090a114378219a812ec26b724a Mon Sep 17 00:00:00 2001
From: Carl George <carl@george.computer>
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

View File

@ -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 <lhrazky@redhat.com> - 4.1.0-2
- [copr] Guess EPEL chroots for CentOS Stream
* Thu Apr 28 2022 Pavla Kratochvilova <pkratoch@redhat.com> - 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