From 8862a175abfca263cc74e833aed6bba55520e1f8 Mon Sep 17 00:00:00 2001 From: Karanbir Singh Date: Jun 17 2014 16:53:12 +0000 Subject: ensure we get the right cpe info --- diff --git a/SPECS/centos-release.spec b/SPECS/centos-release.spec index f35ef2d..871db1f 100644 --- a/SPECS/centos-release.spec +++ b/SPECS/centos-release.spec @@ -1,5 +1,5 @@ %define debug_package %{nil} -%define product_family CentOs Linux +%define product_family CentOS Linux %define variant_titlecase Server %define variant_lowercase server %define release_name Broken @@ -11,7 +11,7 @@ Name: centos-release Version: %{base_release_version} -Release: 0%{?dist}.0.140617.2 +Release: 0%{?dist}.0.140617.3 Summary: %{product_family} release file Group: System Environment/Base License: GPLv2 @@ -42,30 +42,27 @@ rm -rf %{buildroot} mkdir -p %{buildroot}/etc # create /etc/system-release and /etc/redhat-release -echo "%{product_family}%{?variant_titlecase: %{variant_titlecase}} release %{full_release_version}%{?beta: %{beta}} (%{release_name})" > %{buildroot}/etc/centos-release +echo "%{product_family} release %{full_release_version} (%{release_name})" > %{buildroot}/etc/centos-release ln -s centos-release %{buildroot}/etc/system-release ln -s centos-release %{buildroot}/etc/redhat-release # create /etc/os-release cat << EOF >>%{buildroot}/etc/os-release -NAME="%{product_family}%{?variant_titlecase: %{variant_titlecase}}" +NAME="%{product_family}" VERSION="%{full_release_version} (%{release_name})" -ID="rhel" +ID="centos" +ID_LIKE="rhel" ID_LIKE="fedora" VERSION_ID="%{full_release_version}" -PRETTY_NAME="%{product_family}%{?variant_titlecase: %{variant_titlecase}} %{full_release_version} (%{release_name})" +PRETTY_NAME="%{product_family} %{full_release_version} (%{release_name})" ANSI_COLOR="0;31" -CPE_NAME="cpe:/o:redhat:enterprise_linux:%{full_release_version}:%{?beta:beta}%{!?beta:GA}%{?variant_lowercase::%{variant_lowercase}}" -HOME_URL="https://www.redhat.com/" -BUG_REPORT_URL="https://bugzilla.redhat.com/" - -REDHAT_BUGZILLA_PRODUCT="%{product_family} %{base_release_version}" -REDHAT_BUGZILLA_PRODUCT_VERSION=%{full_release_version} -REDHAT_SUPPORT_PRODUCT="%{product_family}" -REDHAT_SUPPORT_PRODUCT_VERSION=%{full_release_version} +CPE_NAME="cpe:/o:centos:centos:7" +HOME_URL="https://www.centos.org/" +BUG_REPORT_URL="https://bugs.centos.org/" + EOF # write cpe to /etc/system/release-cpe -echo "cpe:/o:redhat:enterprise_linux:%{full_release_version}:%{?beta:beta}%{!?beta:GA}%{?variant_lowercase::%{variant_lowercase}}" | tr [A-Z] [a-z] > %{buildroot}/etc/system-release-cpe +echo "cpe:/o:centos:centos:7" > %{buildroot}/etc/system-release-cpe # create /etc/issue and /etc/issue.net echo '\S' > %{buildroot}/etc/issue @@ -92,10 +89,12 @@ EOF # use unbranded datadir mkdir -p -m 755 %{buildroot}/%{_datadir}/redhat-release +ln -s redhat-release %{buildroot}/%{_datadir}/centos-release install -m 644 EULA %{buildroot}/%{_datadir}/redhat-release # use unbranded docdir mkdir -p -m 755 %{buildroot}/%{_docdir}/redhat-release +ln -s redhat-release %{buildroot}/%{_docdir}/centos-release install -m 644 GPL %{buildroot}/%{_docdir}/redhat-release # copy systemd presets @@ -119,12 +118,16 @@ rm -rf %{buildroot} /etc/pki/rpm-gpg/ /etc/rpm/macros.dist %{_docdir}/redhat-release/* +%{_docdir}/centos-release %{_datadir}/redhat-release/* +%{_datadir}/centos-release %{_prefix}/lib/systemd/system-preset/* %changelog * Tue Jun 17 2014 Karanbir Singh 7.0.el7.0.140617.3 - rebuild for 2014-06-17 pub qa release +- ensure we get the right cpe info +- ensure centos-release is trackable * Sat Jun 14 2014 Karanbir Singh 7.0.el7.0.140614.2 - prep for public QA release tag as broken