integ/base/initscripts-config/centos/initscripts-config.spec
zhipengl 867dddc305 Refactor patches for initscripts package
Use initscripts-config package to package script and service file for
initscripts package.
Refactor 0001-Disable-zeroconf-route.patch,
spec-add-mountnfs-init-script.patch and
spec-include-TiS-changes.patch, let initscripts-config to be
responsible for the installation of config/script/service files.
Merged some meta patches that just includes adding source code patch to
spec-include-Tis-changes.patch.
Removed base/procps since it just includes one file, sysctl.conf. And
move this file to initscripts-config folder.The monitor-tools package
in stx-integ has a %post script that is adding an entry to sysctl.conf,
so add "Requires: initscripts-config" in monitor-tools.spec, to ensure
it is installed after this package replaces the file.

Deployment test and ping test between VMs pass
Service, config and script files check pass.

Story: 2003768
Task: 27585

Change-Id: I2ea3bd05bdc5bca5658d157e6f40f7380e922500
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
2018-11-21 01:26:32 +00:00

48 lines
1.4 KiB
RPMSpec

Summary: initscripts-config
Name: initscripts-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: %{_bindir}/systemctl
Requires: initscripts
Summary: package StarlingX configuration files of initscripts to system folder.
%description
package StarlingX configuration files of initscripts to system folder.
%prep
%setup
%build
%install
%{__install} -d 644 %{buildroot}%{_datadir}/starlingx/
%{__install} -d 644 %{buildroot}%{_sysconfdir}/sysconfig
%{__install} -d 755 %{buildroot}%{_initddir}
%{__install} -d 644 %{buildroot}%{_unitdir}
%{__install} -m 644 sysctl.conf %{buildroot}%{_datadir}/starlingx/stx.sysctl.conf
%{__install} -m 644 sysconfig-network.conf %{buildroot}%{_sysconfdir}/sysconfig/network
%{__install} -m 755 mountnfs.sh %{buildroot}%{_initddir}/mountnfs
%{__install} -m 644 mountnfs.service %{buildroot}%{_unitdir}/mountnfs.service
%post
if [ $1 -eq 1 ] ; then
# Initial installation
cp -f %{_datadir}/starlingx/stx.sysctl.conf %{_sysconfdir}/sysctl.conf
chmod 644 %{_sysconfdir}/sysctl.conf
fi
%{_bindir}/systemctl enable mountnfs.service > /dev/null 2>&1 || :
%files
%{_datadir}/starlingx/stx.sysctl.conf
%{_sysconfdir}/sysconfig/network
%{_initddir}/mountnfs
%{_unitdir}/mountnfs.service