From dfc1c0e9e3f3f0e0baa4bab6be17e3959dd044d8 Mon Sep 17 00:00:00 2001 From: Jan Pazdziora Date: Jan 21 2020 12:07:09 +0000 Subject: Add SWID tag for the CentOS Linux distribution. --- diff --git a/SOURCES/CentOS-Linux-8-minor-arch.swidtag b/SOURCES/CentOS-Linux-8-minor-arch.swidtag new file mode 100644 index 0000000..6460203 --- /dev/null +++ b/SOURCES/CentOS-Linux-8-minor-arch.swidtag @@ -0,0 +1,25 @@ + + + + + + diff --git a/SOURCES/CentOS-Linux-8.swidtag b/SOURCES/CentOS-Linux-8.swidtag new file mode 100644 index 0000000..315f9a9 --- /dev/null +++ b/SOURCES/CentOS-Linux-8.swidtag @@ -0,0 +1,26 @@ + + + + + + diff --git a/SPECS/centos-release.spec b/SPECS/centos-release.spec index def7227..be13604 100644 --- a/SPECS/centos-release.spec +++ b/SPECS/centos-release.spec @@ -21,13 +21,14 @@ %define centos_rel 1.1911 #define beta Beta %define dist .el%{dist_release_version} +%{!?_swidtagdir: %define _swidtagdir %{_prefix}/lib/swidtag/centos.org} # The anaconda scripts in %%{_libexecdir} can create false requirements %global __requires_exclude_from %{_libexecdir} Name: centos-release Version: %{upstream_rel} -Release: %{centos_rel}.0.8%{?dist} +Release: %{centos_rel}.0.9%{?dist} Summary: %{product_family} release file Group: System Environment/Base License: GPLv2 @@ -78,6 +79,9 @@ Source309: CentOS-PowerTools.repo Source310: CentOS-centosplus.repo Source311: CentOS-HA.repo +Source400: CentOS-Linux-%{base_release_version}.swidtag +Source401: CentOS-Linux-%{base_release_version}-minor-arch.swidtag + %ifarch %{arm} %description -n %{pkg_name} %{product_family} release files @@ -216,6 +220,14 @@ install -m 0755 %{SOURCE99} %{buildroot}%{_bindir}/ install -m 0755 %{SOURCE100} %{buildroot}%{_bindir}/ %endif +# install distro-level SWID tag file +install -d %{buildroot}%{_swidtagdir} +install -m 644 %{SOURCE400} %{buildroot}%{_swidtagdir}/org.centos.CentOS-Linux-%{base_release_version}.swidtag +# create supplemental SWID tag for minor release +sed -e 's#\$revision#%{base_release_version}.%{centos_rel}#g' -e 's#\$arch#%{_arch}#g' %{SOURCE401} > %{buildroot}%{_swidtagdir}/org.centos.CentOS-Linux-%{base_release_version}.%{centos_rel}-%{_arch}.swidtag +# enable SWID tag lookup +install -d %{buildroot}%{_sysconfdir}/swid/swidtags.d +ln -s %{_swidtagdir} %{buildroot}%{_sysconfdir}/swid/swidtags.d/centos.org %clean rm -rf %{buildroot} @@ -240,6 +252,8 @@ rm -rf %{buildroot} %attr(0755,root,root) %{_bindir}/update-boot %attr(0755,root,root) %{_bindir}/rootfs-expand %endif +%{_sysconfdir}/swid +%{_swidtagdir} %files -n centos-repos %config(noreplace) /etc/yum.repos.d/* @@ -249,6 +263,9 @@ rm -rf %{buildroot} /etc/pki/rpm-gpg/ %changelog +* Tue Jan 21 2020 Jan Pazdziora - 8-1.0.9 +- Add SWID tag for the CentOS Linux distribution. + * Thu Jan 02 2020 Brian Stinson - 8-1.0.8 - Add base module platform Provides so DNF can auto-discover modular platform (ngompa)pr#6 - Switched CR repo to mirrorlist to spread the load (arrfab)pr#5