Blob Blame History Raw
%global OpenStackVersion ussuri
Summary: OpenStack from the CentOS Cloud SIG repo configs
Name: centos-release-openstack-%{OpenStackVersion}
Version: 1
Release: 5%{?dist}
License: GPL
URL: http://wiki.centos.org/SpecialInterestGroup/Cloud
Source0: CentOS-OpenStack.repo
Source1: RPM-GPG-KEY-CentOS-SIG-Cloud

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
yum Configs and basic docs for OpenStack as delivered via the CentOS Cloud SIG.

%prep

%install
install -D -m 644 %{SOURCE0} %{buildroot}%{_sysconfdir}/yum.repos.d/CentOS-OpenStack-%{OpenStackVersion}.repo
sed -i -e "s/OPENSTACK_VERSION/%{OpenStackVersion}/g" %{buildroot}%{_sysconfdir}/yum.repos.d/CentOS-OpenStack-%{OpenStackVersion}.repo
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 <amoralej@redhat.com> - %{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 <ykarel@redhat.com> - %{OpenStackVersion}-1-4
- Add dependency on centos-release-nfv-openvswitch

* Tue Jul 07 2020 - Alfredo Moralejo amoralej@redhat.com> - %{OpenStackVersion}-1-3
- Replace rdo-trunk-ussuri-tested by component based promoted repos

* Thu Jun 04 2020  - %{OpenStackVersion}-1-2
- Rely on ceph nautilus release rpm instead of ceph repo

* Mon May 18 2020 Yatin Karel <ykarel@redhat.com> - %{OpenStackVersion}-1-1
- Ussuri release