Remove config patch and use RPM instead of SRPM for centos-release
Use centos-release-config package to package issue and issue.net to target folder. Then we can remove related patch of centos-release and use RPM instead of SRPM for centos-release. Story: 2003768 Task: 27581 Depends-on: https://review.openstack.org/#/c/613236/ Change-Id: If2321fa4dc55d57eb7a993bf2798092e8d2af6dd Signed-off-by: zhipengl <zhipengs.liu@intel.com>
This commit is contained in:
parent
4a248bfafd
commit
1232ac58be
2
base/centos-release-config/centos/build_srpm.data
Normal file
2
base/centos-release-config/centos/build_srpm.data
Normal file
@ -0,0 +1,2 @@
|
||||
SRC_DIR="files"
|
||||
TIS_PATCH_VER=1
|
43
base/centos-release-config/centos/centos-release-config.spec
Normal file
43
base/centos-release-config/centos/centos-release-config.spec
Normal file
@ -0,0 +1,43 @@
|
||||
Summary: centos-release-config
|
||||
Name: centos-release-config
|
||||
Version: 1.0
|
||||
Release: %{tis_patch_ver}%{?_tis_dist}
|
||||
License: Apache-2.0
|
||||
Group: base
|
||||
Packager: StarlingX
|
||||
URL: unknown
|
||||
BuildArch: noarch
|
||||
Source: %name-%version.tar.gz
|
||||
|
||||
Requires: centos-release
|
||||
Summary: package StarlingX configuration files of centos-release to system folder.
|
||||
|
||||
%description
|
||||
package StarlingX configuration files of centos-release to system folder.
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
# Overwrite default issue files with cgcs related files.
|
||||
install -d %{buildroot}%{_datadir}/starlingx
|
||||
install -m 0644 issue %{buildroot}%{_datadir}/starlingx/stx.issue
|
||||
install -m 0644 issue.net %{buildroot}%{_datadir}/starlingx/stx.issue.net
|
||||
sed -i -e "s/@PLATFORM_RELEASE@/%{platform_release}/g" \
|
||||
%{buildroot}%{_datadir}/starlingx/stx.issue \
|
||||
%{buildroot}%{_datadir}/starlingx/stx.issue.net
|
||||
|
||||
%post
|
||||
if [ $1 -eq 1 ] ; then
|
||||
# Initial installation
|
||||
cp -f %{_datadir}/starlingx/stx.issue %{_sysconfdir}/issue
|
||||
cp -f %{_datadir}/starlingx/stx.issue.net %{_sysconfdir}/issue.net
|
||||
chmod 644 %{_sysconfdir}/issue
|
||||
chmod 644 %{_sysconfdir}/issue.net
|
||||
fi
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_datadir}/starlingx/stx.issue
|
||||
%{_datadir}/starlingx/stx.issue.net
|
@ -1,5 +1,5 @@
|
||||
[H[2J
|
||||
Release xxxPLATFORM_RELEASExxx \n \l
|
||||
Release @PLATFORM_RELEASE@ \n \l
|
||||
------------------------------------------------------------------------
|
||||
W A R N I N G *** W A R N I N G *** W A R N I N G *** W A R N I N G ***
|
||||
------------------------------------------------------------------------
|
@ -1,4 +1,4 @@
|
||||
Release xxxPLATFORM_RELEASExxx
|
||||
Release @PLATFORM_RELEASE@
|
||||
------------------------------------------------------------------------
|
||||
W A R N I N G *** W A R N I N G *** W A R N I N G *** W A R N I N G ***
|
||||
------------------------------------------------------------------------
|
@ -1,2 +0,0 @@
|
||||
COPY_LIST="files/*"
|
||||
TIS_PATCH_VER=2
|
@ -1,43 +0,0 @@
|
||||
From 9c4f92869a737451e5827686ce916169d485d3be Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 14:58:59 -0400
|
||||
Subject: [PATCH] WRS: centos-release-include-TiS-changes.patch
|
||||
|
||||
---
|
||||
SPECS/centos-release.spec | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SPECS/centos-release.spec b/SPECS/centos-release.spec
|
||||
index 67f1550..02e198e 100644
|
||||
--- a/SPECS/centos-release.spec
|
||||
+++ b/SPECS/centos-release.spec
|
||||
@@ -27,6 +27,8 @@ Provides: system-release(releasever) = %{base_release_version}
|
||||
Source0: centos-release-%{base_release_version}-%{centos_rel}.tar.gz
|
||||
Source1: 85-display-manager.preset
|
||||
Source2: 90-default.preset
|
||||
+Source3: issue
|
||||
+Source4: issue.net
|
||||
|
||||
%description
|
||||
%{product_family} release files
|
||||
@@ -120,10 +122,16 @@ mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-preset/
|
||||
install -m 0644 %{SOURCE1} %{buildroot}%{_prefix}/lib/systemd/system-preset/
|
||||
install -m 0644 %{SOURCE2} %{buildroot}%{_prefix}/lib/systemd/system-preset/
|
||||
|
||||
+# Overwrite default issue files with cgcs related files.
|
||||
+install -m 0644 %{SOURCE3} %{buildroot}/etc/issue
|
||||
+install -m 0644 %{SOURCE4} %{buildroot}/etc/issue.net
|
||||
+sed -i -e "s/xxxPLATFORM_RELEASExxx/%{platform_release}/g" \
|
||||
+ %{buildroot}/etc/issue \
|
||||
+ %{buildroot}/etc/issue.net
|
||||
+
|
||||
%posttrans
|
||||
/usr/bin/uname -m | grep -q 'x86_64' && echo 'centos' >/etc/yum/vars/contentdir || echo 'altarch' > /etc/yum/vars/contentdir
|
||||
|
||||
-
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 328f19996b93b5be5cd856e600111d0dc87c8616 Mon Sep 17 00:00:00 2001
|
||||
From: Scott Little <scott.little@windriver.com>
|
||||
Date: Mon, 2 Oct 2017 14:58:59 -0400
|
||||
Subject: [PATCH 2/2] WRS: 0001-Update-package-versioning-for-TIS-format.patch
|
||||
|
||||
---
|
||||
SPECS/centos-release.spec | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/SPECS/centos-release.spec b/SPECS/centos-release.spec
|
||||
index ce64be4..8c05c28 100644
|
||||
--- a/SPECS/centos-release.spec
|
||||
+++ b/SPECS/centos-release.spec
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
Name: centos-release
|
||||
Version: %{base_release_version}
|
||||
-Release: %{centos_rel}.1%{?dist}
|
||||
+Release: %{centos_rel}.1.el7.centos%{?_tis_dist}.%{tis_patch_ver}
|
||||
Summary: %{product_family} release file
|
||||
Group: System Environment/Base
|
||||
License: GPLv2
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,2 +0,0 @@
|
||||
0001-centos-release-include-TiS-changes.patch
|
||||
0002-Update-package-versioning-for-TIS-format.patch
|
@ -1 +0,0 @@
|
||||
mirror:Source/centos-release-7-5.1804.1.el7.centos.src.rpm
|
@ -172,8 +172,8 @@ setup
|
||||
# nss-pam-ldapd
|
||||
nss-pam-ldapd
|
||||
|
||||
# centos-release
|
||||
centos-release
|
||||
# centos-release-config
|
||||
centos-release-config
|
||||
|
||||
# nfs-utils
|
||||
nfs-utils
|
||||
|
@ -4,7 +4,7 @@ base/util-linux
|
||||
base/setup
|
||||
utilities/namespace-utils
|
||||
ldap/nss-pam-ldapd
|
||||
base/centos-release
|
||||
base/centos-release-config
|
||||
filesystem/nfs-utils
|
||||
base/dhcp
|
||||
base/openssh
|
||||
|
Loading…
Reference in New Issue
Block a user