From 89457ca3bf36c7c29d47c5d573a819dd7ee054fe Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Jan 02 2020 13:56:59 +0000 Subject: Add base module platform Provides so DNF can auto-discover modular platform In cases where CentOS 8 chroots are being made from scratch and modular content will be used as part of the initial install, DNF fails to resolve modular dependencies because it cannot discover the modular platform. DNF does modular platform discovery in two ways: * Reading the PLATFORM_ID from os-release(5) * Reading the package providing system-release for base-module() Provides The former method works on an existing CentOS 8 environment, but when trying to produce a brand new one without an existing reference or manual setting of the value, DNF relies on the latter method. This declaration did not exist, which caused tools like appliance-creator, livecd-creator, kiwi, and others to fail to be able to resolve modular dependencies, essentially blocking the usage of modules with these tools. In addition, trivially fix the PLATFORM_ID definition in os-release(5) to be set using %base_release_version like the base-module() Provides does. Reference: https://bugs.centos.org/view.php?id=16877#c35920 Signed-off-by: Neal Gompa --- diff --git a/SPECS/centos-release.spec b/SPECS/centos-release.spec index c36cd0a..76850c0 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.7%{?dist} +Release: %{centos_rel}.0.8%{?dist} Summary: %{product_family} release file Group: System Environment/Base License: GPLv2 @@ -44,6 +44,7 @@ Provides: centos-release(upstream) = %{upstream_rel} Provides: redhat-release = %{upstream_rel_long} Provides: system-release = %{upstream_rel_long} Provides: system-release(releasever) = %{base_release_version} +Provides: base-module(platform:el%{base_release_version}) Provides: centos-release-eula Provides: redhat-release-eula @@ -130,7 +131,7 @@ VERSION="%{full_release_version} (%{release_name})" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="%{full_release_version}" -PLATFORM_ID="platform:el%{full_release_version}" +PLATFORM_ID="platform:el%{base_release_version}" PRETTY_NAME="%{product_family} %{full_release_version} (%{release_name})" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:%{base_release_version}%{?tuned_profile}" @@ -248,6 +249,10 @@ rm -rf %{buildroot} /etc/pki/rpm-gpg/ %changelog +* Thu Jan 02 2020 Neal Gompa - 8-1.0.8 +- Add base module platform Provides so DNF can auto-discover modular platform +- Fix the PLATFORM_ID definition in os-release(5) to use base_release_version macro + * Thu Dec 19 2019 bstinson@centosproject.org - 8-1.0.7 - Typo fixes - Disable the HA repo by default