From de53a1a48a1c8854735b58f00ddfe8771c315c6e Mon Sep 17 00:00:00 2001 From: Alfredo Moralejo Date: Mar 08 2021 10:34:52 +0000 Subject: Add support for CentOS Stream 8 repos This patch makes that CentOS Stream 8 systems use repositories under 8-stream in cloudsig instead of 8 ones. It also moves to use centos-release-advanced-virtualization rpm to configure Advanced Virtualization repo. Finally, it does some cleanup on excludes for centos8 which were from CentOS 7 but are not longer required. --- diff --git a/SOURCES/CentOS-OpenStack.repo b/SOURCES/CentOS-OpenStack.repo index 3fce86d..ce46478 100644 --- a/SOURCES/CentOS-OpenStack.repo +++ b/SOURCES/CentOS-OpenStack.repo @@ -5,20 +5,18 @@ [centos-openstack-OPENSTACK_VERSION] name=CentOS-$releasever - OpenStack OPENSTACK_VERSION -#baseurl=http://mirror.centos.org/$contentdir/$releasever/cloud/$basearch/openstack-OPENSTACK_VERSION/ -mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=cloud-openstack-OPENSTACK_VERSION +#baseurl=http://mirror.centos.org/$contentdir/$cloudsigdist/cloud/$basearch/openstack-OPENSTACK_VERSION/ +mirrorlist=http://mirrorlist.centos.org/?release=$cloudsigdist&arch=$basearch&repo=cloud-openstack-OPENSTACK_VERSION gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud -exclude=sip,PyQt4 module_hotfixes=1 [centos-openstack-OPENSTACK_VERSION-test] name=CentOS-$releasever - OpenStack OPENSTACK_VERSION Testing -baseurl=https://buildlogs.centos.org/centos/$releasever/cloud/$basearch/openstack-OPENSTACK_VERSION/ +baseurl=https://buildlogs.centos.org/centos/$cloudsigdist/cloud/$basearch/openstack-OPENSTACK_VERSION/ gpgcheck=0 enabled=0 -exclude=sip,PyQt4 module_hotfixes=1 [centos-openstack-OPENSTACK_VERSION-debuginfo] @@ -27,16 +25,14 @@ baseurl=http://debuginfo.centos.org/centos/$releasever/cloud/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud -exclude=sip,PyQt4 module_hotfixes=1 [centos-openstack-OPENSTACK_VERSION-source] name=CentOS-$releasever - OpenStack OPENSTACK_VERSION - Source -baseurl=http://vault.centos.org/centos/$releasever/cloud/Source/openstack-OPENSTACK_VERSION/ +baseurl=http://vault.centos.org/centos/$cloudsigdist/cloud/Source/openstack-OPENSTACK_VERSION/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud -exclude=sip,PyQt4 module_hotfixes=1 [rdo-trunk-OPENSTACK_VERSION-tested-component-baremetal] diff --git a/SOURCES/RPM-GPG-KEY-CentOS-SIG-Virtualization-RDO b/SOURCES/RPM-GPG-KEY-CentOS-SIG-Virtualization-RDO deleted file mode 100644 index 00006eb..0000000 --- a/SOURCES/RPM-GPG-KEY-CentOS-SIG-Virtualization-RDO +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.22 (GNU/Linux) - -mQENBFWB31YBCAC4dFmTzBDOcq4R1RbvQXLkyYfF+yXcsMA5kwZy7kjxnFqBoNPv -aAjFm3e5huTw2BMZW0viLGJrHZGnsXsE5iNmzom2UgCtrvcG2f65OFGlC1HZ3ajA -8ZIfdgNQkPpor61xqBCLzIsp55A7YuPNDvatk/+MqGdNv8Ug7iVmhQvI0p1bbaZR -0GuavmC5EZ/+mDlZ2kHIQOUoInHqLJaX7iw46iLRUnvJ1vATOzTnKidoFapjhzIt -i4ZSIRaalyJ4sT+oX4CoRzerNnUtIe2k9Hw6cEu4YKGCO7nnuXjMKz7Nz5GgP2Ou -zIA/fcOmQkSGcn7FoXybWJ8DqBExvkJuDljPABEBAAG0bENlbnRPUyBWaXJ0dWFs -aXphdGlvbiBTSUcgKGh0dHA6Ly93aWtpLmNlbnRvcy5vcmcvU3BlY2lhbEludGVy -ZXN0R3JvdXAvVmlydHVhbGl6YXRpb24pIDxzZWN1cml0eUBjZW50b3Mub3JnPokB -OQQTAQIAIwUCVYHfVgIbAwcLCQgHAwIBBhUIAgkKCwQWAgMBAh4BAheAAAoJEHrr -voJh6IBsRd0H/A62i5CqfftuySOCE95xMxZRw8+voWO84QS9zYvDEnzcEQpNnHyo -FNZTpKOghIDtETWxzpY2ThLixcZOTubT+6hUL1n+cuLDVMu4OVXBPoUkRy56defc -qkWR+UVwQitmlq1ngzwmqVZaB8Hf/mFZiB3B3Jr4dvVgWXRv58jcXFOPb8DdUoAc -S3u/FLvri92lCaXu08p8YSpFOfT5T55kFICeneqETNYS2E3iKLipHFOLh7EWGM5b -Wsr7o0r+KltI4Ehy/TjvNX16fa/t9p5pUs8rKyG8SZndxJCsk0MW55G9HFvQ0FmP -A6vX9WQmbP+ml7jsUxtEJ6MOGJ39jmaUvPc= -=ZzP+ ------END PGP PUBLIC KEY BLOCK----- diff --git a/SOURCES/advanced-virtualization.repo b/SOURCES/advanced-virtualization.repo deleted file mode 100644 index 6f0b53f..0000000 --- a/SOURCES/advanced-virtualization.repo +++ /dev/null @@ -1,9 +0,0 @@ -[advanced-virtualization] -name=CentOS-8 - Advanced Virtualization -#baseurl=http://mirror.centos.org/centos/$releasever/virt/$basearch/advanced-virtualization -mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=virt-advanced-virtualization -gpgcheck=1 -enabled=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Virtualization-RDO -module_hotfixes=1 - diff --git a/SPECS/centos-release-openstack.spec b/SPECS/centos-release-openstack.spec index 10f1c58..c71581d 100644 --- a/SPECS/centos-release-openstack.spec +++ b/SPECS/centos-release-openstack.spec @@ -2,20 +2,20 @@ Summary: OpenStack from the CentOS Cloud SIG repo configs Name: centos-release-openstack-%{OpenStackVersion} Version: 1 -Release: 4%{?dist} +Release: 5%{?dist} License: GPL URL: http://wiki.centos.org/SpecialInterestGroup/Cloud Source0: CentOS-OpenStack.repo Source1: RPM-GPG-KEY-CentOS-SIG-Cloud -Source2: RPM-GPG-KEY-CentOS-SIG-Virtualization-RDO -Source3: advanced-virtualization.repo BuildArch: noarch Requires: centos-release +Requires: centos-release-advanced-virtualization Requires: centos-release-rabbitmq-38 Requires: centos-release-ceph-nautilus Requires: centos-release-nfv-openvswitch +Requires: /etc/os-release Conflicts: centos-release-openstack %description @@ -29,8 +29,20 @@ sed -i -e "s/OPENSTACK_VERSION/%{OpenStackVersion}/g" %{buildroot}%{_sysconfdir} install -p -d %{buildroot}%{_sysconfdir}/pki/rpm-gpg install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pki/rpm-gpg -install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pki/rpm-gpg -install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/yum.repos.d +%post +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/cloudsigdist +else + echo "8" > /etc/dnf/vars/cloudsigdist +fi + +%postun +if [ $1 -eq 0 ] ; then + rm -f /etc/dnf/vars/cloudsigdist +fi %files %defattr(-,root,root) @@ -38,6 +50,10 @@ install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/yum.repos.d %{_sysconfdir}/pki/rpm-gpg %changelog +* Mon Mar 08 2021 Alfredo Moralejo - %{OpenStackVersion}-1-5 +- Add support for CentOS Stream 8 repos +- Use centos-release-advanced-virtualization for Advanced Virtulazation repo + * Thu Nov 05 2020 Yatin Karel - %{OpenStackVersion}-1-4 - Add dependency on centos-release-nfv-openvswitch @@ -49,10 +65,3 @@ install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/yum.repos.d * Mon May 18 2020 Yatin Karel - %{OpenStackVersion}-1-1 - Ussuri release - -* Wed Apr 22 2020 Alfredo Moralejo - %{OpenStackVersion}-2-1 -- Add support for CentOS 8 - -* Tue Oct 15 2019 Yatin Karel - %{OpenStackVersion}-1-1 -- Train release -