Accepting request 454101 from home:jengelh:branches:Base:System

- Check for existence of "statd" user before creating it,
  and do not suppress errors about it.
- Ensure units passed to %service_* are full filenames.
- Pass all units (non-templated) to %service_*.

OBS-URL: https://build.opensuse.org/request/show/454101
OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=175
This commit is contained in:
Neil Brown 2017-02-03 05:52:51 +00:00 committed by Git OBS Bridge
parent e3d5b9e382
commit 00060a4988
2 changed files with 21 additions and 11 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Jan 19 10:17:03 UTC 2017 - jengelh@inai.de
- Check for existence of "statd" user before creating it,
and do not suppress errors about it.
- Ensure units passed to %service_* are full filenames.
- Pass all units (non-templated) to %service_*.
-------------------------------------------------------------------
Mon Nov 14 14:51:30 UTC 2016 - dimstar@opensuse.org

View File

@ -1,7 +1,7 @@
#
# spec file for package nfs-utils
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -73,6 +73,7 @@ Requires: netcfg
Requires: rpcbind
Requires(post): %fillup_prereq
Requires(pre): permissions
Requires(pre): shadow
Obsoletes: nfs-utils < 1.1.0
%description -n nfs-client
@ -173,9 +174,10 @@ install -m 644 utils/mount/nfsmount.conf %{buildroot}%{_sysconfdir}/nfsmount.con
chmod 644 %{buildroot}%{_sbindir}/{mountstats,nfsiostat}
%pre -n nfs-client
useradd -r -c 'NFS statd daemon' \
-s /sbin/nologin -d %{_localstatedir}/lib/nfs -g nogroup statd > /dev/null 2>&1 || :
%service_add_pre nfs
/usr/bin/getent passwd statd >/dev/null || \
/usr/sbin/useradd -r -c 'NFS statd daemon' \
-s /sbin/nologin -d %{_localstatedir}/lib/nfs -g nogroup statd
%service_add_pre nfs.service auth-rpcgss-module.service nfs-idmapd.service nfs-blkmap.service rpc-statd-notify.service rpc-gssd.service rpc-statd.service nfs-config.service
%post -n nfs-client
chown statd:nogroup %{_localstatedir}/lib/nfs > /dev/null 2>&1 || :
@ -194,22 +196,22 @@ fi
%{fillup_only -n nfs nfs}
#
%set_permissions /sbin/mount.nfs
%service_add_post nfs
%service_add_post nfs.service auth-rpcgss-module.service nfs-idmapd.service nfs-blkmap.service rpc-statd-notify.service rpc-gssd.service rpc-statd.service nfs-config.service
%preun -n nfs-client
%service_del_preun nfs
%service_del_preun nfs.service auth-rpcgss-module.service nfs-idmapd.service nfs-blkmap.service rpc-statd-notify.service rpc-gssd.service rpc-statd.service nfs-config.service
%postun -n nfs-client
%service_del_postun nfs
%service_del_postun nfs.service auth-rpcgss-module.service nfs-idmapd.service nfs-blkmap.service rpc-statd-notify.service rpc-gssd.service rpc-statd.service nfs-config.service
%verifyscript -n nfs-client
%verify_permissions -e /sbin/mount.nfs
%pre -n nfs-kernel-server
%service_add_pre nfsserver
%service_add_pre nfsserver.service nfs-svcgssd.service nfs-mountd.service nfs-server.service
%preun -n nfs-kernel-server
%service_del_preun nfsserver
%service_del_preun nfsserver.service nfs-svcgssd.service nfs-mountd.service nfs-server.service
%post -n nfs-kernel-server
### migrate from /var/lock/subsys
@ -221,10 +223,10 @@ if [ -f %{_localstatedir}/lock/subsys/nfsserver-rpc.idmapd ]; then
mv %{_localstatedir}/lock/subsys/nfsserver-rpc.idmapd /run/nfs
fi
###
%service_add_post nfsserver
%service_add_post nfsserver.service rpc-svcgssd.service nfs-mountd.service nfs-server.service
%postun -n nfs-kernel-server
%service_del_postun nfsserver
%service_del_postun nfsserver.service rpc-svcgssd.service nfs-mountd.service nfs-server.service
%files -n nfs-client
%defattr(-,root,root)