Remove service config file patch for nfs-utils.

Use nfs-utils-config package to package service and config files for nfs-utils

Story: 2003768
Task: 26461

Change-Id: Id24669ea5f7b7dadff025208e7f7f07f179c1490
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
This commit is contained in:
zhipengl 2018-10-16 01:53:01 +08:00 committed by zhipeng liu
parent 15549f40fc
commit 1305fcc31a
17 changed files with 157 additions and 324 deletions

View File

@ -177,6 +177,7 @@ centos-release-config
# nfs-utils
nfs-utils
nfs-utils-config
# dhcp
dhcp

View File

@ -6,6 +6,7 @@ utilities/namespace-utils
ldap/nss-pam-ldapd
base/centos-release-config
filesystem/nfs-utils
filesystem/nfs-utils-config
base/dhcp
base/openssh
config/facter

View File

@ -0,0 +1,2 @@
SRC_DIR="files"
TIS_PATCH_VER=1

View File

@ -0,0 +1,48 @@
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
/bin/systemctl enable nfscommon.service >/dev/null 2>&1 || :
/bin/systemctl enable nfsserver.service >/dev/null 2>&1 || :
%files
%defattr(-,root,root,-)
%{_sysconfdir}/init.d/nfscommon
%{_unitdir}/nfscommon.service
%{_sysconfdir}/init.d/nfsserver
%{_unitdir}/nfsserver.service
%{_datadir}/starlingx/stx.nfsmount.conf

View File

@ -1,5 +1,5 @@
[Unit]
Description=Titanium Cloud Filesystem Common
Description=StarlingX Filesystem Common
After=network.target rpcbind.service
Before=nfsserver.service mountnfs.service

View File

@ -0,0 +1,30 @@
#
# /etc/nfsmount.conf - see nfsmount.conf(5) for details
#
[ NFSMount_Global_Options ]
# Protocol Version [2,3,4]
# This defines the default protocol version which will
# be used to start the negotiation with the server.
Defaultvers=3
# Setting this option makes it mandatory the server supports the
# given version. The mount will fail if the given version is
# not support by the server.
Nfsvers=3
# Network Protocol [udp,tcp,rdma] (Note: values are case sensitive)
# This defines the default network protocol which will
# be used to start the negotiation with the server.
Defaultproto=udp
# Setting this option makes it mandatory the server supports the
# given network protocol. The mount will fail if the given network
# protocol is not supported by the server.
Proto=udp
# Server Mountd Protocol
#mountproto=udp

View File

@ -1,5 +1,5 @@
[Unit]
Description=Titanium Cloud Filesystem Server
Description=StarlingX Filesystem Server
After=network.target nfscommon.service hwclock.service
Before=ntpd.service

View File

@ -1,96 +0,0 @@
From 535d4790b40ae2eaf9435ece40cf420165874877 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:19:43 -0400
Subject: [PATCH] WRS: 0001-TiS-nfs-utils-spec-add-scripts.patch
Conflicts:
SPECS/nfs-utils.spec
---
SPECS/nfs-utils.spec | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/SPECS/nfs-utils.spec b/SPECS/nfs-utils.spec
index 6dfddc0..282511e 100644
--- a/SPECS/nfs-utils.spec
+++ b/SPECS/nfs-utils.spec
@@ -15,6 +15,10 @@ Source2: nfs.sysconfig
Source3: nfs-utils_env.sh
Source4: lockd.conf
Source5: 24-nfs-server.conf
+Source10: nfscommon
+Source11: nfsserver
+Source12: nfscommon.service
+Source13: nfsserver.service
#
# RHEL7.1
@@ -145,6 +149,10 @@ Patch1001: nfs-utils-1.2.1-exp-subtree-warn-off.patch
Patch1002: nfs-utils-1.2.3-sm-notify-res_init.patch
Patch1003: nfs-utils-1.2.5-idmap-errmsg.patch
+# Titanium Cloud Patches
+Patch2000: nfs-utils-support-mountprog-and-nfsprog-options.patch
+Patch2001: nfs-utils-do-not-pass-CFLAGS-to-native.patch
+
Group: System Environment/Daemons
Provides: exportfs = %{epoch}:%{version}-%{release}
Provides: nfsstat = %{epoch}:%{version}-%{release}
@@ -418,6 +426,11 @@ This package also contains the mount.nfs and umount.nfs program.
%patch1002 -p1
%patch1003 -p1
+%patch2000 -p1
+# Titanium Cloud support mountprog and nfsprog options
+%patch2001 -p1
+# Titanium Cloud do not pass CFLAGS to native
+
# Remove .orig files
find . -name "*.orig" | xargs rm -f
@@ -479,6 +492,13 @@ install -m 755 %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/systemd/scripts/nfs-utils_env.
install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/lockd.conf
install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/gssproxy
+mkdir -p $RPM_BUILD_ROOT/etc/init.d
+install -m 755 %{SOURCE10} $RPM_BUILD_ROOT/etc/init.d/nfscommon
+install -m 755 %{SOURCE11} $RPM_BUILD_ROOT/etc/init.d/nfsserver
+
+install -m 644 %{SOURCE12} $RPM_BUILD_ROOT/%{_unitdir}/nfscommon.service
+install -m 644 %{SOURCE13} $RPM_BUILD_ROOT/%{_unitdir}/nfsserver.service
+
#
# For backwards compatablity
#
@@ -557,6 +577,9 @@ if [ $1 -eq 1 ] ; then
# Initial installation
/bin/systemctl enable nfs-client.target >/dev/null 2>&1 || :
/bin/systemctl restart nfs-config >/dev/null 2>&1 || :
+
+ /bin/systemctl enable nfscommon.service >/dev/null 2>&1 || :
+ /bin/systemctl enable nfsserver.service >/dev/null 2>&1 || :
fi
%systemd_post nfs-config
%systemd_post nfs-server
@@ -568,6 +591,9 @@ chown -R rpcuser:rpcuser /var/lib/nfs/statd
if [ $1 -eq 0 ]; then
%systemd_preun nfs-client.target
%systemd_preun nfs-server.server
+
+ /bin/systemctl disable nfscommon.service >/dev/null 2>&1 || :
+ /bin/systemctl disable nfsserver.service >/dev/null 2>&1 || :
/usr/sbin/userdel rpcuser 2>/dev/null || :
/usr/sbin/groupdel rpcuser 2>/dev/null || :
@@ -654,6 +680,9 @@ fi
%{_sbindir}/nfsdcltrack
%{_mandir}/*/*
%{_unitdir}/*
+%attr(755,root,root) /etc/init.d/nfscommon
+%attr(755,root,root) /etc/init.d/nfsserver
+
%attr(755,root,root) /usr/lib/systemd/scripts/nfs-utils_env.sh
%{_prefix}/lib/systemd/system-generators/nfs-server-generator
%{_prefix}/lib/systemd/system-generators/rpc-pipefs-generator
--
2.7.4

View File

@ -1,16 +1,14 @@
From c6c1fee74830348a437cf0b467d299e1f4c42391 Mon Sep 17 00:00:00 2001
From 182dd62962039d383c96d7a50779aefb62cac9a0 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:19:43 -0400
Date: Mon, 15 Oct 2018 23:17:14 +0800
Subject: [PATCH] WRS: 0001-Update-package-versioning-for-TIS-format.patch
Conflicts:
SPECS/nfs-utils.spec
---
SPECS/nfs-utils.spec | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/SPECS/nfs-utils.spec b/SPECS/nfs-utils.spec
index a947119..2602031 100644
index d10c87c..b866788 100644
--- a/SPECS/nfs-utils.spec
+++ b/SPECS/nfs-utils.spec
@@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser
@ -22,7 +20,7 @@ index a947119..2602031 100644
Epoch: 1
# group all 32bit related archs
@@ -164,6 +164,7 @@ Provides: rpc.mountd = %{epoch}:%{version}-%{release}
@@ -160,6 +160,7 @@ Provides: rpc.mountd = %{epoch}:%{version}-%{release}
Provides: rpc.nfsd = %{epoch}:%{version}-%{release}
Provides: rpc.statd = %{epoch}:%{version}-%{release}
Provides: rpc.gssd = %{epoch}:%{version}-%{release}

View File

@ -1,6 +1,6 @@
From bbd7bc3626b3af6543b66d23a965276bd29038b5 Mon Sep 17 00:00:00 2001
From feb40bdf71992f9374e82aeb081431d2b91f1224 Mon Sep 17 00:00:00 2001
From: slin14 <shuicheng.lin@intel.com>
Date: Thu, 16 Aug 2018 21:07:20 +0800
Date: Mon, 15 Oct 2018 23:21:15 +0800
Subject: [PATCH] add-rpm-4.14-compatibility
Signed-off-by: slin14 <shuicheng.lin@intel.com>
@ -9,10 +9,10 @@ Signed-off-by: slin14 <shuicheng.lin@intel.com>
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/SPECS/nfs-utils.spec b/SPECS/nfs-utils.spec
index 2602031..75212eb 100644
index b866788..96fce13 100644
--- a/SPECS/nfs-utils.spec
+++ b/SPECS/nfs-utils.spec
@@ -635,14 +635,7 @@ if [ -h /etc/systemd/system/multi-user.target.wants/nfs.target ]; then
@@ -621,14 +621,7 @@ if [ -h /etc/systemd/system/multi-user.target.wants/nfs.target ]; then
fi
fi

View File

@ -1,33 +0,0 @@
From 545e646a80fed3dd353ac31d83b2c04f202f1bf5 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:19:43 -0400
Subject: [PATCH] WRS:
0002-Add-nfs-utils-update-nfsmount.conf-with-required-con.patch
---
SPECS/nfs-utils.spec | 2 ++
1 file changed, 2 insertions(+)
diff --git a/SPECS/nfs-utils.spec b/SPECS/nfs-utils.spec
index 282511e..7793ee1 100644
--- a/SPECS/nfs-utils.spec
+++ b/SPECS/nfs-utils.spec
@@ -152,6 +152,7 @@ Patch1003: nfs-utils-1.2.5-idmap-errmsg.patch
# Titanium Cloud Patches
Patch2000: nfs-utils-support-mountprog-and-nfsprog-options.patch
Patch2001: nfs-utils-do-not-pass-CFLAGS-to-native.patch
+Patch2002: nfs-utils-update-nfsmount.conf-with-required-config.patch
Group: System Environment/Daemons
Provides: exportfs = %{epoch}:%{version}-%{release}
@@ -430,6 +431,7 @@ This package also contains the mount.nfs and umount.nfs program.
# Titanium Cloud support mountprog and nfsprog options
%patch2001 -p1
# Titanium Cloud do not pass CFLAGS to native
+%patch2002 -p1
# Remove .orig files
find . -name "*.orig" | xargs rm -f
--
2.7.4

View File

@ -1,5 +1,4 @@
0001-TiS-nfs-utils-spec-add-scripts.patch
0002-Add-nfs-utils-update-nfsmount.conf-with-required-con.patch
spec-include-TiS-changes.patch
nfs-utils-spec-file-disable-statd-service.patch
0001-Update-package-versioning-for-TIS-format.patch
0001-add-rpm-4.14-compatibility.patch

View File

@ -1,19 +1,17 @@
From e4e3c372324522e93de793ee62e9509123a144a8 Mon Sep 17 00:00:00 2001
From 81d1abb89facf77ad3b1fade4384ccf3b0482eb3 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:19:43 -0400
Date: Mon, 15 Oct 2018 23:14:20 +0800
Subject: WRS: nfs-utils-spec-file-disable-statd-service.patch
Conflicts:
SPECS/nfs-utils.spec
---
SPECS/nfs-utils.spec | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/SPECS/nfs-utils.spec b/SPECS/nfs-utils.spec
index 7793ee1..a947119 100644
index 0a5e9fb..d10c87c 100644
--- a/SPECS/nfs-utils.spec
+++ b/SPECS/nfs-utils.spec
@@ -487,6 +487,10 @@ rm $RPM_BUILD_ROOT%{_sbindir}/rpc.svcgssd
@@ -483,6 +483,10 @@ rm $RPM_BUILD_ROOT%{_sbindir}/rpc.svcgssd
rm $RPM_BUILD_ROOT%{_mandir}/man8/rpc.svcgssd.8
rm $RPM_BUILD_ROOT%{_mandir}/man8/svcgssd.8
@ -24,7 +22,7 @@ index 7793ee1..a947119 100644
mkdir -p $RPM_BUILD_ROOT/run/sysconfig
mkdir -p $RPM_BUILD_ROOT/usr/lib/systemd/scripts
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gssproxy
@@ -510,9 +514,6 @@ ln -s rpc-gssd.service nfs-secure.service
@@ -499,9 +503,6 @@ ln -s rpc-gssd.service nfs-secure.service
ln -s rpc-gssd.service rpcgssd.service
ln -s nfs-idmapd.service nfs-idmap.service
ln -s nfs-idmapd.service rpcidmapd.service
@ -34,7 +32,7 @@ index 7793ee1..a947119 100644
mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/nfs/rpc_pipefs
@@ -577,6 +578,12 @@ fi
@@ -566,6 +567,12 @@ fi
%post
if [ $1 -eq 1 ] ; then
# Initial installation
@ -46,7 +44,7 @@ index 7793ee1..a947119 100644
+ fi
/bin/systemctl enable nfs-client.target >/dev/null 2>&1 || :
/bin/systemctl restart nfs-config >/dev/null 2>&1 || :
fi
--
2.7.4

View File

@ -0,0 +1,51 @@
From 68ed40412a6a5caa0474715363a06914819b50bf Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 15 Oct 2018 22:50:46 +0800
Subject: [PATCH] WRS: spec-include-TiS-changes.patch
---
SPECS/nfs-utils.spec | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/SPECS/nfs-utils.spec b/SPECS/nfs-utils.spec
index 6dfddc0..0a5e9fb 100644
--- a/SPECS/nfs-utils.spec
+++ b/SPECS/nfs-utils.spec
@@ -145,6 +145,11 @@ Patch1001: nfs-utils-1.2.1-exp-subtree-warn-off.patch
Patch1002: nfs-utils-1.2.3-sm-notify-res_init.patch
Patch1003: nfs-utils-1.2.5-idmap-errmsg.patch
+# Titanium Cloud Patches
+Patch2000: nfs-utils-support-mountprog-and-nfsprog-options.patch
+Patch2001: nfs-utils-do-not-pass-CFLAGS-to-native.patch
+
+
Group: System Environment/Daemons
Provides: exportfs = %{epoch}:%{version}-%{release}
Provides: nfsstat = %{epoch}:%{version}-%{release}
@@ -418,6 +423,12 @@ This package also contains the mount.nfs and umount.nfs program.
%patch1002 -p1
%patch1003 -p1
+%patch2000 -p1
+# Titanium Cloud support mountprog and nfsprog options
+%patch2001 -p1
+# Titanium Cloud do not pass CFLAGS to native
+
+
# Remove .orig files
find . -name "*.orig" | xargs rm -f
@@ -569,6 +580,9 @@ if [ $1 -eq 0 ]; then
%systemd_preun nfs-client.target
%systemd_preun nfs-server.server
+ /bin/systemctl disable nfscommon.service >/dev/null 2>&1 || :
+ /bin/systemctl disable nfsserver.service >/dev/null 2>&1 || :
+
/usr/sbin/userdel rpcuser 2>/dev/null || :
/usr/sbin/groupdel rpcuser 2>/dev/null || :
/usr/sbin/userdel nfsnobody 2>/dev/null || :
--
2.7.4

View File

@ -1,166 +0,0 @@
From 80e40444247ddfb39efc9a9fa9b6168bd2b5623f Mon Sep 17 00:00:00 2001
From: Don Penney <don.penney@windriver.com>
Date: Fri, 13 May 2016 16:34:47 -0400
Subject: [PATCH 1/1] Update nfsmount.conf with required config
---
utils/mount/nfsmount.conf | 134 +++++-----------------------------------------
1 file changed, 14 insertions(+), 120 deletions(-)
diff --git a/utils/mount/nfsmount.conf b/utils/mount/nfsmount.conf
index 9b8ff4a..5f92d89 100644
--- a/utils/mount/nfsmount.conf
+++ b/utils/mount/nfsmount.conf
@@ -1,135 +1,29 @@
#
# /etc/nfsmount.conf - see nfsmount.conf(5) for details
#
-# This is an NFS mount configuration file. This file can be broken
-# up into three different sections: Mount, Server and Global
-#
-# [ MountPoint "Mount_point" ]
-# This section defines all the mount options that
-# should be used on a particular mount point. The '<Mount_Point>'
-# string need to be an exact match of the path in the mount
-# command. Example:
-# [ MountPoint "/export/home" ]
-# background=True
-# Would cause all mount to /export/home would be done in
-# the background
-#
-# [ Server "Server_Name" ]
-# This section defines all the mount options that
-# should be used on mounts to a particular NFS server.
-# Example:
-# [ Server "nfsserver.foo.com" ]
-# rsize=32k
-# wsize=32k
-# All reads and writes to the 'nfsserver.foo.com' server
-# will be done with 32k (32768 bytes) block sizes.
-#
+
[ NFSMount_Global_Options ]
-# This statically named section defines global mount
-# options that can be applied on all NFS mount.
-#
+
# Protocol Version [2,3,4]
# This defines the default protocol version which will
# be used to start the negotiation with the server.
-# Defaultvers=4
-#
+Defaultvers=3
+
# Setting this option makes it mandatory the server supports the
-# given version. The mount will fail if the given version is
-# not support by the server.
-# Nfsvers=4
-#
+# given version. The mount will fail if the given version is
+# not support by the server.
+Nfsvers=3
+
# Network Protocol [udp,tcp,rdma] (Note: values are case sensitive)
# This defines the default network protocol which will
# be used to start the negotiation with the server.
-# Defaultproto=tcp
-#
+Defaultproto=udp
+
# Setting this option makes it mandatory the server supports the
# given network protocol. The mount will fail if the given network
# protocol is not supported by the server.
-# Proto=tcp
-#
-# The number of times a request will be retired before
-# generating a timeout
-# Retrans=2
-#
-# The number of minutes that will retry mount
-# Retry=2
-#
-# The minimum time (in seconds) file attributes are cached
-# acregmin=30
-#
-# The Maximum time (in seconds) file attributes are cached
-# acregmin=60
-#
-# The minimum time (in seconds) directory attributes are cached
-# acregmin=30
-#
-# The Maximum time (in seconds) directory attributes are cached
-# acregmin=60
-#
-# Enable Access Control Lists
-# Acl=False
-#
-# Enable Attribute Caching
-# Ac=True
-#
-# Do mounts in background (i.e. asynchronously)
-# Background=False
-#
-# Close-To-Open cache coherence
-# Cto=True
-#
-# Do mounts in foreground (i.e. synchronously)
-# Foreground=True
-#
-# How to handle times out from servers (Hard is STRONGLY suggested)
-# Hard=True
-# Soft=False
-#
-# Enable File Locking
-# Lock=True
-#
-# Enable READDIRPLUS on NFS version 3 mounts
-# Rdirplus=True
-#
-# Maximum Read Size (in Bytes)
-# Rsize=8k
-#
-# Maximum Write Size (in Bytes)
-# Wsize=8k
-#
-# Maximum Server Block Size (in Bytes)
-# Bsize=8k
-#
-# Ignore unknown mount options
-# Sloppy=False
-#
-# Share Data and Attribute Caches
-# Sharecache=True
-#
-# The amount of time, in tenths of a seconds, the client
-# will wait for a response from the server before retransmitting
-# the request.
-# Timeo=600
-#
-# Sets all attributes times to the same time (in seconds)
-# actimeo=30
-#
-# Server Mountd port mountport
-# mountport=4001
-#
+Proto=udp
+
# Server Mountd Protocol
-# mountproto=tcp
-#
-# Server Mountd Version
-# mounvers=3
-#
-# Server Mountd Host
-# mounthost=hostname
-#
-# Server Port
-# Port=2049
-#
-# RPCGSS security flavors
-# [none, sys, krb5, krb5i, krb5p ]
-# Sec=sys
+# mountproto=udp
+
--
1.9.1