From 38849540570516d80b159b4922b4d8684635d3a7 Mon Sep 17 00:00:00 2001 From: Sandro Bonazzola Date: May 13 2022 08:53:42 +0000 Subject: Don't enable repos on RHEL CentOS and similar distributions are defining %centos macro. Enable repos only there. Signed-off-by: Sandro Bonazzola --- diff --git a/SPECS/centos-release-ovirt45.spec b/SPECS/centos-release-ovirt45.spec index 50b2f6d..60eec37 100644 --- a/SPECS/centos-release-ovirt45.spec +++ b/SPECS/centos-release-ovirt45.spec @@ -1,7 +1,7 @@ Summary: oVirt 4.5 packages from the CentOS Virtualization SIG repository Name: centos-release-ovirt45 -Version: 9.0 -Release: 6%{?dist} +Version: 9.1 +Release: 1%{?dist} License: GPLv2 URL: http://wiki.centos.org/SpecialInterestGroup/Virtualization Source0: CentOS-oVirt-4.5.repo @@ -39,10 +39,14 @@ install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/ %post +if [ $(rpm --eval "%%centos") == 9 ] +then +# centos macro is defined on centos-like distributions # Ensuring crb repository is enabled dnf config-manager --set-enabled crb # Ensuring resilientstorage repository is enabled dnf config-manager --set-enabled resilientstorage +fi %files %config %{_sysconfdir}/yum.repos.d/CentOS-oVirt-4.5.repo @@ -50,6 +54,9 @@ dnf config-manager --set-enabled resilientstorage %license COPYING %changelog +* Thu May 12 2022 Sandro Bonazzola - 9.1-1 +- skip repo enablement on RHEL as it requires subscription manager. + * Tue May 03 2022 Sandro Bonazzola - 9.0-6 - Use fastest mirror for resources.ovirt.org.