Blob Blame History Raw
Summary: CentOS Hyperscale SIG main repo configs
Name: centos-release-hyperscale
Version: 4
Release: 4%{?dist}
License: GPLv2
URL: http://wiki.centos.org/SpecialInterestGroup/Hyperscale
Source0: RPM-GPG-KEY-CentOS-SIG-HyperScale
Source1: CentOS-Stream-Hyperscale.repo
Source2: CentOS-Stream-Hyperscale-Experimental.repo
Source3: CentOS-Stream-Hyperscale-Hotfixes.repo
Source4: CentOS-Stream-Hyperscale-Spin.repo

BuildArch: noarch

Requires: centos-stream-release

%description
Configs for the CentOS Hyperscale SIG main package repository.

%package experimental
Summary: CentOS Hyperscale SIG experimental repo configs

%description experimental
Configs for the CentOS Hyperscale SIG experimental package repository.

%package hotfixes
Summary:  CentOS Hyperscale SIG module hotfixes repo configs
Requires: epel-release = %{rhel}
Requires: centos-release-hyperscale = %{version}-%{release}

%description hotfixes
Configs for the CentOS Hyperscale SIG module hotfixes repository.

%package spin
Summary:  CentOS Hyperscale SIG spin repo configs
Requires: centos-release-hyperscale = %{version}-%{release}

%description spin
Configs for the CentOS Hyperscale SIG spin repository.

%prep

%install
install -d %{buildroot}%{_sysconfdir}/pki/rpm-gpg
install -p -m 644 %{SOURCE0} %{buildroot}%{_sysconfdir}/pki/rpm-gpg
install -d %{buildroot}%{_sysconfdir}/yum.repos.d
install -p -m 644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} \
  %{buildroot}%{_sysconfdir}/yum.repos.d

%posttrans hotfixes
POWERTOOLS_REPO=/etc/yum.repos.d/CentOS-Stream-PowerTools.repo
if [ -f "${POWERTOOLS_REPO}" ] \
  && [ $(grep -c '^enabled=.$' "${POWERTOOLS_REPO}") -eq 1 ] \
  && [ $(grep -c '^enabled=0$' "${POWERTOOLS_REPO}") -eq 1 ];
then
  sed -i 's/^enabled=0$/enabled=1/g' "${POWERTOOLS_REPO}"
fi

%files
%defattr(-,root,root)
%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-HyperScale
%config(noreplace) %{_sysconfdir}/yum.repos.d/CentOS-Stream-Hyperscale.repo

%files experimental
%defattr(-,root,root)
%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-HyperScale
%config(noreplace) %{_sysconfdir}/yum.repos.d/CentOS-Stream-Hyperscale-Experimental.repo

%files hotfixes
%config(noreplace) %{_sysconfdir}/yum.repos.d/CentOS-Stream-Hyperscale-Hotfixes.repo

%files spin
%config(noreplace) %{_sysconfdir}/yum.repos.d/CentOS-Stream-Hyperscale-Spin.repo

%changelog
* Mon Apr 18 2022 Justin Vreeland <jvreeland@centosproject.org> - 4-3
- Update release for aarch64

* Wed May 19 2021 Michel Alexandre Salim <salimma@centosproject.org> - 4-3
- Switch to %%posttrans for enabling powertools;
  this way, we don't enable a repo mid-transaction
- Limit it to the hotfixes subpackage as that requires EPEL

* Wed May 19 2021 Michel Alexandre Salim <salimma@centosproject.org> - 4-2
- Trigger enabling powertools repo on package installations and upgrades
- Fix license declaration; match centos-stream-repos

* Mon May 17 2021 Davide Cavalca <dcavalca@centosproject.org> - 4-1
- Add subpackages for hotfixes and spin repo configs
- Require epel-release for hotfixes
- Preserve timestamps on installs

* Fri Apr 09 2021 Davide Cavalca <dcavalca@fb.com> - 3-2
- Drop obsoletes for centos-hyperscale-keys as it was never actually built

* Fri Apr 09 2021 Davide Cavalca <dcavalca@fb.com> - 3-1
- Bring the keys back in and obsolete centos-hyperscale-keys
- Bring centos-release-hyperscale-experimental in as a subpackage

* Thu Apr 08 2021 Davide Cavalca <dcavalca@fb.com> - 2-1
- Factor out keys in centos-hyperscale-keys and require it

* Wed Feb 10 2021 Davide Cavalca <dcavalca@fb.com> - 1-2
- Require centos-stream-release instead of centos-release

* Wed Feb 10 2021 Davide Cavalca <dcavalca@fb.com> - 1-1
- Initial release