diff --git a/nfs-utils.spec b/nfs-utils.spec index 78f649e..6ab4760 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -69,6 +69,10 @@ Requires: libtirpc libblkid libcap libmount Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units +Conflicts: systemd < 38 +Conflicts: filesystem < 3 +Provides: /sbin/mount.nfs +Provides: /sbin/mount.nfs4 %description The nfs-utils package provides a daemon for the kernel NFS server and @@ -120,7 +124,7 @@ make %{?_smp_mflags} all %install rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT{/sbin,/usr/sbin,/lib/systemd/system} +mkdir -p $RPM_BUILD_ROOT{/sbin,/usr/sbin,%{_unitdir}} mkdir -p $RPM_BUILD_ROOT/usr/lib/%{name}/scripts mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig @@ -130,25 +134,27 @@ install -m 644 utils/mount/nfsmount.conf $RPM_BUILD_ROOT/etc install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/nfs for service in %{nfs_services} ; do - install -m 644 $service $RPM_BUILD_ROOT/lib/systemd/system + install -m 644 $service $RPM_BUILD_ROOT%{_unitdir} done for service in %{nfs_automounts} ; do - install -m 644 $service $RPM_BUILD_ROOT/lib/systemd/system + install -m 644 $service $RPM_BUILD_ROOT%{_unitdir} done for config in %{nfs_configs} ; do - install -m 755 $config $RPM_BUILD_ROOT/usr/lib/%{name}/scripts + install -m 755 $config $RPM_BUILD_ROOT%{_prefix}/lib/%{name}/scripts done mkdir -p $RPM_BUILD_ROOT/var/lib/nfs/rpc_pipefs touch $RPM_BUILD_ROOT/var/lib/nfs/rmtab -mv $RPM_BUILD_ROOT/usr/sbin/rpc.statd $RPM_BUILD_ROOT/sbin mkdir -p $RPM_BUILD_ROOT/var/lib/nfs/statd/sm mkdir -p $RPM_BUILD_ROOT/var/lib/nfs/statd/sm.bak mkdir -p $RPM_BUILD_ROOT/var/lib/nfs/v4recovery mkdir -p $RPM_BUILD_ROOT/etc/exports.d +# move stuff from /sbin to /usr/sbin, it is hardcoded in the Makefile +mv -f $RPM_BUILD_ROOT/sbin/{,u}mount* %{buildroot}%{_sbindir} || : + %clean rm -rf $RPM_BUILD_ROOT @@ -246,32 +252,32 @@ fi %config(noreplace) /var/lib/nfs/rmtab %doc linux-nfs/ChangeLog linux-nfs/KNOWNBUGS linux-nfs/NEW linux-nfs/README %doc linux-nfs/THANKS linux-nfs/TODO -/sbin/rpc.statd -/usr/sbin/exportfs -/usr/sbin/nfsstat -/usr/sbin/rpcdebug -/usr/sbin/rpc.mountd -/usr/sbin/rpc.nfsd -/usr/sbin/showmount -/usr/sbin/rpc.idmapd -/usr/sbin/rpc.gssd -/usr/sbin/rpc.svcgssd -/usr/sbin/gss_clnt_send_err -/usr/sbin/gss_destroy_creds -/usr/sbin/sm-notify -/usr/sbin/start-statd -/usr/sbin/mountstats -/usr/sbin/nfsiostat -/usr/sbin/nfsidmap -/usr/sbin/blkmapd +%{_sbindir}/rpc.statd +%{_sbindir}/exportfs +%{_sbindir}/nfsstat +%{_sbindir}/rpcdebug +%{_sbindir}/rpc.mountd +%{_sbindir}/rpc.nfsd +%{_sbindir}/showmount +%{_sbindir}/rpc.idmapd +%{_sbindir}/rpc.gssd +%{_sbindir}/rpc.svcgssd +%{_sbindir}/gss_clnt_send_err +%{_sbindir}/gss_destroy_creds +%{_sbindir}/sm-notify +%{_sbindir}/start-statd +%{_sbindir}/mountstats +%{_sbindir}/nfsiostat +%{_sbindir}/nfsidmap +%{_sbindir}/blkmapd %{_mandir}/*/* -/lib/systemd/system/* -/usr/lib/%{name}/scripts/* +%{_unitdir}/* +%{_prefix}/lib/%{name}/scripts/* -%attr(0755,root,root) /sbin/mount.nfs -%attr(0755,root,root) /sbin/mount.nfs4 -%attr(0755,root,root) /sbin/umount.nfs -%attr(0755,root,root) /sbin/umount.nfs4 +%attr(0755,root,root) %{_sbindir}/mount.nfs +%attr(0755,root,root) %{_sbindir}/mount.nfs4 +%attr(0755,root,root) %{_sbindir}/umount.nfs +%attr(0755,root,root) %{_sbindir}/umount.nfs4 %changelog * Mon Nov 14 2011 Steve Dickson 1.2.5-5