From d0c51a3918b6c22d393b4f96367a06a8be0dea82 Mon Sep 17 00:00:00 2001 From: Alfredo Moralejo Date: Apr 15 2021 10:11:13 +0000 Subject: Use different repos for CentOS Linux 8 and CentOS Stream 8 NFV SIG builds are tagged in nfv8s tags, so let's use those repos for CentOS Stream 8 systems. --- diff --git a/SOURCES/CentOS-NFV-OpenvSwitch.repo b/SOURCES/CentOS-NFV-OpenvSwitch.repo index daac567..fc4b32f 100644 --- a/SOURCES/CentOS-NFV-OpenvSwitch.repo +++ b/SOURCES/CentOS-NFV-OpenvSwitch.repo @@ -5,8 +5,8 @@ [centos-nfv-openvswitch] name=CentOS-$releasever - NFV OpenvSwitch -#baseurl=http://mirror.centos.org/centos/$releasever/nfv/$basearch/openvswitch-2/ -mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=nfv-openvswitch-2 +#baseurl=http://mirror.centos.org/centos/$nfvsigdist/nfv/$basearch/openvswitch-2/ +mirrorlist=http://mirrorlist.centos.org/?release=$nfvsigdist&arch=$basearch&repo=nfv-openvswitch-2 gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-NFV @@ -14,14 +14,14 @@ module_hotfixes=1 [centos-nfv-openvswitch-testing] name=CentOS-$releasever - NFV OpenvSwitch Testing -baseurl=http://buildlogs.centos.org/centos/$releasever/nfv/$basearch/openvswitch-2/ +baseurl=http://buildlogs.centos.org/centos/$nfvsigdist/nfv/$basearch/openvswitch-2/ gpgcheck=0 enabled=0 module_hotfixes=1 [centos-nfv-openvswitch-debuginfo] name=CentOS-$releasever - NFV OpenvSwitch - Debug -baseurl=http://debuginfo.centos.org/centos/$releasever/nfv/$basearch/ +baseurl=http://debuginfo.centos.org/centos/$nfvsigdist/nfv/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-NFV diff --git a/SOURCES/CentOS-NFV-extras.repo b/SOURCES/CentOS-NFV-extras.repo index ab7efb3..e1cb819 100644 --- a/SOURCES/CentOS-NFV-extras.repo +++ b/SOURCES/CentOS-NFV-extras.repo @@ -5,8 +5,8 @@ [centos-nfv-extras] name=CentOS-$releasever - NFV extras -#baseurl=http://mirror.centos.org/centos/$releasever/nfv/$basearch/network-extras/ -mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=nfv-network-extras +#baseurl=http://mirror.centos.org/centos/$nfvsigdist/nfv/$basearch/network-extras/ +mirrorlist=http://mirrorlist.centos.org/?release=$nfvsigdist&arch=$basearch&repo=nfv-network-extras gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-NFV @@ -14,14 +14,14 @@ module_hotfixes=1 [centos-nfv-extras-testing] name=CentOS-$releasever - NFV extras Testing -baseurl=http://buildlogs.centos.org/centos/$releasever/nfv/$basearch/network-extras/ +baseurl=http://buildlogs.centos.org/centos/$nfvsigdist/nfv/$basearch/network-extras/ gpgcheck=0 enabled=0 module_hotfixes=1 [centos-nfv-extras-debuginfo] name=CentOS-$releasever - NFV extras - Debug -baseurl=http://debuginfo.centos.org/centos/$releasever/nfv/$basearch/ +baseurl=http://debuginfo.centos.org/centos/$nfvsigdist/nfv/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-NFV diff --git a/SPECS/centos-release-nfv.spec b/SPECS/centos-release-nfv.spec index cb79e31..f0f3043 100644 --- a/SPECS/centos-release-nfv.spec +++ b/SPECS/centos-release-nfv.spec @@ -1,7 +1,7 @@ Summary: Config to enable the repository for the NFV SIG Name: centos-release-nfv Version: 1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Base URL: http://wiki.centos.org/SpecialInterestGroup/NFV @@ -18,6 +18,7 @@ yum configs for repositories as delivered by CentOS NFV SIG. Summary: Common package to contain NFV SIG Requires: centos-release +Requires: /etc/os-release %description common Common files for repositories as delivered by CentOS NFV SIG. @@ -25,7 +26,7 @@ Common files for repositories as delivered by CentOS NFV SIG. %package openvswitch Summary: Common release file to establish shared metadata for CentOS NFV SIG -Requires: %{name}-common +Requires: %{name}-common = %{version}-%{release} %description openvswitch yum configs for repositories as delivered by CentOS NFV SIG. @@ -33,7 +34,7 @@ yum configs for repositories as delivered by CentOS NFV SIG. %package extras Summary: Release file to establish repo config for NFV network extras repo -Requires: %{name}-common +Requires: %{name}-common = %{version}-%{release} %description extras yum configs for repositories as delivered by CentOS NFV SIG. @@ -49,6 +50,21 @@ install -m 644 %{SOURCE0} %{buildroot}%{_sysconfdir}/pki/rpm-gpg install -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/yum.repos.d/CentOS-NFV-OpenvSwitch.repo install -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/yum.repos.d/CentOS-NFV-extras.repo +%post common +if [ -f /etc/os-release ]; then + source /etc/os-release +fi +if [[ $ID == 'centos' && $NAME == *'Stream' ]] || [ $ID != 'centos' ]; then + echo "8-stream" > /etc/dnf/vars/nfvsigdist +else + echo "8" > /etc/dnf/vars/nfvsigdist +fi + +%postun common +if [ $1 -eq 0 ] ; then + rm -f /etc/dnf/vars/nfvsigdist +fi + %files common %defattr(-,root,root) /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-NFV @@ -62,6 +78,9 @@ install -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/yum.repos.d/CentOS-NFV-e %config(noreplace) %{_sysconfdir}/yum.repos.d/CentOS-NFV-extras.repo %changelog +* Thu Apr 15 2021 Alfredo Moralejo - 1-3 +- Use different repos for CentOS Linux 8 and CentOS Stream 8 + * Wed Sep 30 2020 Alfredo Moralejo - 1-2 - Added centos-release-nfv-extras subpackage