diff --git a/base/centos-release-config/centos/build_srpm.data b/base/centos-release-config/centos/build_srpm.data new file mode 100644 index 000000000..2c3b2cb8b --- /dev/null +++ b/base/centos-release-config/centos/build_srpm.data @@ -0,0 +1,2 @@ +SRC_DIR="files" +TIS_PATCH_VER=1 diff --git a/base/centos-release-config/centos/centos-release-config.spec b/base/centos-release-config/centos/centos-release-config.spec new file mode 100644 index 000000000..54b9d58f7 --- /dev/null +++ b/base/centos-release-config/centos/centos-release-config.spec @@ -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 diff --git a/base/centos-release/files/issue b/base/centos-release-config/files/issue similarity index 97% rename from base/centos-release/files/issue rename to base/centos-release-config/files/issue index 59f55b8af..c40d99762 100644 --- a/base/centos-release/files/issue +++ b/base/centos-release-config/files/issue @@ -1,5 +1,5 @@  -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 *** ------------------------------------------------------------------------ diff --git a/base/centos-release/files/issue.net b/base/centos-release-config/files/issue.net similarity index 97% rename from base/centos-release/files/issue.net rename to base/centos-release-config/files/issue.net index 1bce12ff5..5bff9a4b4 100644 --- a/base/centos-release/files/issue.net +++ b/base/centos-release-config/files/issue.net @@ -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 *** ------------------------------------------------------------------------ diff --git a/base/centos-release/centos/build_srpm.data b/base/centos-release/centos/build_srpm.data deleted file mode 100644 index 112ca54f4..000000000 --- a/base/centos-release/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -COPY_LIST="files/*" -TIS_PATCH_VER=2 diff --git a/base/centos-release/centos/meta_patches/0001-centos-release-include-TiS-changes.patch b/base/centos-release/centos/meta_patches/0001-centos-release-include-TiS-changes.patch deleted file mode 100644 index 6026f5ba8..000000000 --- a/base/centos-release/centos/meta_patches/0001-centos-release-include-TiS-changes.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 9c4f92869a737451e5827686ce916169d485d3be Mon Sep 17 00:00:00 2001 -From: Scott Little -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 - diff --git a/base/centos-release/centos/meta_patches/0002-Update-package-versioning-for-TIS-format.patch b/base/centos-release/centos/meta_patches/0002-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index bf4fc4ba2..000000000 --- a/base/centos-release/centos/meta_patches/0002-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 328f19996b93b5be5cd856e600111d0dc87c8616 Mon Sep 17 00:00:00 2001 -From: Scott Little -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 - diff --git a/base/centos-release/centos/meta_patches/PATCH_ORDER b/base/centos-release/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index cdbe20845..000000000 --- a/base/centos-release/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,2 +0,0 @@ -0001-centos-release-include-TiS-changes.patch -0002-Update-package-versioning-for-TIS-format.patch diff --git a/base/centos-release/centos/srpm_path b/base/centos-release/centos/srpm_path deleted file mode 100644 index 199b5f4be..000000000 --- a/base/centos-release/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/centos-release-7-5.1804.1.el7.centos.src.rpm diff --git a/centos_iso_image.inc b/centos_iso_image.inc index 3bc9a0ca5..768f73c9a 100644 --- a/centos_iso_image.inc +++ b/centos_iso_image.inc @@ -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 diff --git a/centos_pkg_dirs b/centos_pkg_dirs index 105282e19..c6ba846d7 100644 --- a/centos_pkg_dirs +++ b/centos_pkg_dirs @@ -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