2cdca0
%global OpenStackVersion victoria
2cdca0
Summary: OpenStack from the CentOS Cloud SIG repo configs
2cdca0
Name: centos-release-openstack-%{OpenStackVersion}
2cdca0
Version: 1
e01237
Release: 2%{?dist}
2cdca0
License: GPL
2cdca0
URL: http://wiki.centos.org/SpecialInterestGroup/Cloud
2cdca0
Source0: CentOS-OpenStack.repo
2cdca0
Source1: RPM-GPG-KEY-CentOS-SIG-Cloud
2cdca0
2cdca0
BuildArch: noarch
2cdca0
2cdca0
Requires: centos-release
2cdca0
Requires: centos-release-advanced-virtualization
2cdca0
Requires: centos-release-rabbitmq-38
2cdca0
Requires: centos-release-ceph-nautilus
2cdca0
Requires: centos-release-nfv-openvswitch
e01237
Requires: /etc/os-release
2cdca0
Conflicts: centos-release-openstack
2cdca0
2cdca0
%description
2cdca0
yum Configs and basic docs for OpenStack as delivered via the CentOS Cloud SIG.
2cdca0
2cdca0
%prep
2cdca0
2cdca0
%install
2cdca0
install -D -m 644 %{SOURCE0} %{buildroot}%{_sysconfdir}/yum.repos.d/CentOS-OpenStack-%{OpenStackVersion}.repo
2cdca0
sed -i -e "s/OPENSTACK_VERSION/%{OpenStackVersion}/g" %{buildroot}%{_sysconfdir}/yum.repos.d/CentOS-OpenStack-%{OpenStackVersion}.repo
2cdca0
install -p -d %{buildroot}%{_sysconfdir}/pki/rpm-gpg
2cdca0
install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pki/rpm-gpg
2cdca0
e01237
%post
e01237
if [ -f /etc/os-release ]; then
e01237
    source /etc/os-release
e01237
fi
e01237
if [[ $ID == 'centos' && $NAME == *'Stream' ]] || [ $ID != 'centos' ]; then
e01237
    echo "8-stream" > /etc/dnf/vars/cloudsigdist
e01237
else
e01237
    echo "8" > /etc/dnf/vars/cloudsigdist
e01237
fi
e01237
e01237
%postun
e01237
if [ $1 -eq 0 ] ; then
e01237
    rm -f /etc/dnf/vars/cloudsigdist
e01237
fi
e01237
2cdca0
%files
2cdca0
%defattr(-,root,root)
2cdca0
%config(noreplace) %{_sysconfdir}/yum.repos.d/*
2cdca0
%{_sysconfdir}/pki/rpm-gpg
2cdca0
2cdca0
%changelog
e01237
* Mon Mar 08 2021 Alfredo Moralejo <amoralej@redhat.com> - %{OpenStackVersion}-1-2
e01237
- Add support for CentOS Stream 8 repos.
e01237
2cdca0
* Tue Nov 3 2020 Yatin Karel <ykarel@redhat.com> - %{OpenStackVersion}-1-1
2cdca0
- Victoria Release