diff --git a/nfs-utils.changes b/nfs-utils.changes index f2a1692..113461b 100644 --- a/nfs-utils.changes +++ b/nfs-utils.changes @@ -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 diff --git a/nfs-utils.spec b/nfs-utils.spec index 0e7e512..fe3ccf8 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -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)