be1e909e1d
Story: 2004404 Task: 28046 since there is no src patch, move the meta patch setting to config package. And replace srpm with rpm. The 4 service files(rpc-statd/rpc-statd-notify) from nfs-utils are kept to avoid rpm audit complain. Just disable them by default. The service/conf files in files folder are not used, so just remove them. Test: Pass build and multi node deploy test. Confirmed The 4 services are disabled. Other services are the same as before. Change-Id: I42d2ef3d61c1f62fe8aaea5467c810fc6e39dc13 Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
63 lines
1.9 KiB
RPMSpec
63 lines
1.9 KiB
RPMSpec
Summary: nfs-utils-config
|
|
Name: nfs-utils-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: nfs-utils
|
|
Summary: package customized configuration and service files of nfs-utils to system folder.
|
|
|
|
%description
|
|
package customized configuration and service files of nfs-utils to system folder.
|
|
|
|
%prep
|
|
%setup
|
|
|
|
%build
|
|
|
|
%install
|
|
install -d %{buildroot}%{_sysconfdir}/init.d
|
|
install -d %{buildroot}%{_unitdir}
|
|
install -d %{buildroot}%{_datadir}/starlingx
|
|
install -m 755 -p -D nfscommon %{buildroot}%{_sysconfdir}/init.d
|
|
install -m 644 -p -D nfscommon.service %{buildroot}%{_unitdir}
|
|
install -m 755 -p -D nfsserver %{buildroot}%{_sysconfdir}/init.d
|
|
install -m 644 -p -D nfsserver.service %{buildroot}%{_unitdir}
|
|
install -m 644 -p -D nfsmount.conf %{buildroot}%{_datadir}/starlingx/stx.nfsmount.conf
|
|
|
|
%post
|
|
if [ $1 -eq 1 ] ; then
|
|
# Initial installation
|
|
cp -f %{_datadir}/starlingx/stx.nfsmount.conf %{_sysconfdir}/nfsmount.conf
|
|
chmod 644 %{_sysconfdir}/nfsmount.conf
|
|
fi
|
|
# STX - disable these service files as rpc-statd is started by nfscommon
|
|
%{_bindir}/systemctl disable rpc-statd.service
|
|
%{_bindir}/systemctl disable rpc-statd-notify.service
|
|
%{_bindir}/systemctl disable nfs-lock.service
|
|
%{_bindir}/systemctl disable nfslock.service
|
|
|
|
%{_bindir}/systemctl enable nfscommon.service >/dev/null 2>&1 || :
|
|
%{_bindir}/systemctl enable nfsserver.service >/dev/null 2>&1 || :
|
|
|
|
%preun
|
|
if [ $1 -eq 0 ]; then
|
|
# pre uninstall
|
|
%{_bindir}/systemctl disable nfscommon.service >/dev/null 2>&1 || :
|
|
%{_bindir}/systemctl disable nfsserver.service >/dev/null 2>&1 || :
|
|
fi
|
|
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%{_sysconfdir}/init.d/nfscommon
|
|
%{_unitdir}/nfscommon.service
|
|
%{_sysconfdir}/init.d/nfsserver
|
|
%{_unitdir}/nfsserver.service
|
|
%{_datadir}/starlingx/stx.nfsmount.conf
|