From e012377c94324b1a9faf94a1c349feabf1be08ef Mon Sep 17 00:00:00 2001 From: Alfredo Moralejo Date: Mar 08 2021 10:09:57 +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. Also 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/SPECS/centos-release-openstack.spec b/SPECS/centos-release-openstack.spec index 58753b8..1ce00ee 100644 --- a/SPECS/centos-release-openstack.spec +++ b/SPECS/centos-release-openstack.spec @@ -2,7 +2,7 @@ Summary: OpenStack from the CentOS Cloud SIG repo configs Name: centos-release-openstack-%{OpenStackVersion} Version: 1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL URL: http://wiki.centos.org/SpecialInterestGroup/Cloud Source0: CentOS-OpenStack.repo @@ -15,6 +15,7 @@ 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 @@ -28,11 +29,29 @@ 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 +%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) %config(noreplace) %{_sysconfdir}/yum.repos.d/* %{_sysconfdir}/pki/rpm-gpg %changelog +* Mon Mar 08 2021 Alfredo Moralejo - %{OpenStackVersion}-1-2 +- Add support for CentOS Stream 8 repos. + * Tue Nov 3 2020 Yatin Karel - %{OpenStackVersion}-1-1 - Victoria Release