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:
2
centos-release-config/centos/build_srpm.data
Normal file
2
centos-release-config/centos/build_srpm.data
Normal file
@@ -0,0 +1,2 @@
|
||||
SRC_DIR="files"
|
||||
TIS_PATCH_VER=1
|
43
centos-release-config/centos/centos-release-config.spec
Normal file
43
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
|
22
centos-release-config/files/issue
Normal file
22
centos-release-config/files/issue
Normal file
@@ -0,0 +1,22 @@
|
||||
[H[2J
|
||||
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 ***
|
||||
------------------------------------------------------------------------
|
||||
THIS IS A PRIVATE COMPUTER SYSTEM.
|
||||
This computer system including all related equipment, network devices
|
||||
(specifically including Internet access), are provided only for authorized use.
|
||||
All computer systems may be monitored for all lawful purposes, including to
|
||||
ensure that their use is authorized, for management of the system, to
|
||||
facilitate protection against unauthorized access, and to verify security
|
||||
procedures, survivability and operational security. Monitoring includes active
|
||||
attacks by authorized personnel and their entities to test or verify the
|
||||
security of the system. During monitoring, information may be examined,
|
||||
recorded, copied and used for authorized purposes. All information including
|
||||
personal information, placed on or sent over this system may be monitored. Uses
|
||||
of this system, authorized or unauthorized, constitutes consent to monitoring
|
||||
of this system. Unauthorized use may subject you to criminal prosecution.
|
||||
Evidence of any such unauthorized use collected during monitoring may be used
|
||||
for administrative, criminal or other adverse action. Use of this system
|
||||
constitutes consent to monitoring for these purposes.
|
||||
|
21
centos-release-config/files/issue.net
Normal file
21
centos-release-config/files/issue.net
Normal file
@@ -0,0 +1,21 @@
|
||||
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 ***
|
||||
------------------------------------------------------------------------
|
||||
THIS IS A PRIVATE COMPUTER SYSTEM.
|
||||
This computer system including all related equipment, network devices
|
||||
(specifically including Internet access), are provided only for authorized use.
|
||||
All computer systems may be monitored for all lawful purposes, including to
|
||||
ensure that their use is authorized, for management of the system, to
|
||||
facilitate protection against unauthorized access, and to verify security
|
||||
procedures, survivability and operational security. Monitoring includes active
|
||||
attacks by authorized personnel and their entities to test or verify the
|
||||
security of the system. During monitoring, information may be examined,
|
||||
recorded, copied and used for authorized purposes. All information including
|
||||
personal information, placed on or sent over this system may be monitored. Uses
|
||||
of this system, authorized or unauthorized, constitutes consent to monitoring
|
||||
of this system. Unauthorized use may subject you to criminal prosecution.
|
||||
Evidence of any such unauthorized use collected during monitoring may be used
|
||||
for administrative, criminal or other adverse action. Use of this system
|
||||
constitutes consent to monitoring for these purposes.
|
||||
|
Reference in New Issue
Block a user