From 26a0d73cedb9a2bfbcc38459344111fea231c577 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Aug 18 2019 11:19:37 +0000 Subject: Split repositories and GPG keys out into subpackages This makes it possible to support CentOS clients entirely from Spacewalk or Foreman controlled repository sources. The inclusion of the existing repos in the release package meant that all clients always have a way to access unfiltered repositories, which is not necessarily permitted for managed workstations. Separating the repository configuration out makes it very easy to support the mass managed case without causing hiccups and accidental breakage at scale with these kinds of platforms. In addition, this brings us in alignment with upstream Fedora in how repository definitions are shipped (precisely to support this use-case there). Signed-off-by: Neal Gompa --- diff --git a/SPECS/centos-release.spec b/SPECS/centos-release.spec index 39585b9..d5dbe95 100644 --- a/SPECS/centos-release.spec +++ b/SPECS/centos-release.spec @@ -27,7 +27,7 @@ Name: centos-release Version: %{upstream_rel} -Release: %{centos_rel}.0.9%{?dist} +Release: %{centos_rel}.0.10%{?dist} Summary: %{product_family} release file Group: System Environment/Base License: GPLv2 @@ -48,6 +48,8 @@ Provides: system-release(releasever) = %{base_release_version} Provides: centos-release-eula Provides: redhat-release-eula +Requires: centos-gpg-keys = %{version}-%{release} + Source1: 85-display-manager.preset Source2: 90-default.preset Source3: 99-default-disable.preset @@ -81,6 +83,26 @@ Source310: CentOS-centosplus.repo %description %{product_family} release files +%package -n centos-repos +Summary: %{product_family} package repositories +Group: System Environment/Base +Provides: centos-repos(%{base_release_version}) = %{upstream_rel} +Requires: system-release = %{upstream_rel} +Requires: centos-gpg-keys = %{version}-%{release} +Conflicts: %{name} < 8.0-0.1905.0.10 + +%description -n centos-repos +%{product_family} package repository files for yum and dnf + +%package -n centos-gpg-keys +Summary: %{product_family} RPM keys +Group: System Environment/Base +Conflicts: %{name} < 8.0-0.1905.0.10 +BuildArch: noarch + +%description -n centos-gpg-keys +%{product_family} RPM signature keys + %prep echo OK @@ -204,9 +226,6 @@ rm -rf %{buildroot} %config /etc/system-release-cpe %config(noreplace) /etc/issue %config(noreplace) /etc/issue.net -/etc/pki/rpm-gpg/ -%config(noreplace) /etc/yum.repos.d/* -%config(noreplace) /etc/dnf/vars/* /etc/rpm/macros.dist %{_docdir}/redhat-release %{_docdir}/centos-release/* @@ -218,7 +237,17 @@ rm -rf %{buildroot} %attr(0755,root,root) %{_bindir}/rootfs-expand %endif +%files -n centos-repos +%config(noreplace) /etc/yum.repos.d/* +%config(noreplace) /etc/dnf/vars/* + +%files -n centos-gpg-keys +/etc/pki/rpm-gpg/ + %changelog +* Wed Aug 14 2019 Neal Gompa 8-0.el8 +- Split repositories and GPG keys out into subpackages + * Tue Aug 10 2019 Fabian Arrotin 8-0.el8 - modified baseurl paths, even if disabled