%define major 0 %define libname %mklibname nfsidmap %{major} %define devname %mklibname nfsidmap -d Name: nfs-utils Epoch: 1 # group all 32bit related archs %global all_32bit_archs i386 i486 i586 i686 athlon ppc sparcv9 Version: 2.6.3 Release: %mkrel 1 Summary: The utilities for Linux NFS server Group: Networking/Other License: MIT and GPLv2 and GPLv2+ and BSD URL: https://linux-nfs.org/ Source0: https://www.kernel.org/pub/linux/utils/nfs-utils/%{version}/%{name}-%{version}.tar.xz Source1: id_resolver.conf Source2: lockd.conf Source3: 24-nfs-server.conf Source4: 10-nfsv4.conf Patch100: nfs-utils-1.2.1-statdpath-man.patch Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch Patch102: nfs-utils-1.2.5-idmap-errmsg.patch Patch103: nfs-utils-2.3.1-systemd-gssproxy-restart.patch Patch104: nfs-utils-2.3.3-man-tcpwrappers.patch Patch105: nfs-utils-2.3.3-nfsconf-usegssproxy.patch Patch106: nfs-utils-2.4.2-systemd-svcgssd.patch Requires(pre): rpm-helper Requires(post): rpm-helper Requires(preun): rpm-helper Requires(postun): rpm-helper Requires: rpcbind Requires: keyutils Requires: gssproxy Recommends: quota-rpc BuildRequires: pkgconfig(libevent) BuildRequires: pkgconfig(libcap) BuildRequires: pkgconfig(uuid) BuildRequires: pkgconfig(libtirpc) BuildRequires: pkgconfig(blkid) BuildRequires: keyutils-devel BuildRequires: pkgconfig(krb5) >= 1.3 BuildRequires: pkgconfig(librpcsecgss) >= 0.12 BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(devmapper) BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(mount) BuildRequires: pkgconfig(python3) BuildRequires: rpcgen Obsoletes: nfs-utils-clients Provides: nfs-utils-clients %description This package provides various programs needed for NFS support on server. %package -n %{libname} Summary: NFSv4 User and Group ID Mapping Library License: BSD BuildRequires: openldap-devel Requires: openldap %description -n %{libname} Library that handles mapping between names and ids for NFSv4. %package -n %{devname} Summary: Development files for the libnfsidmap library Requires: %{libname} = %{epoch}:%{version}-%{release} %description -n %{devname} This package includes header files and libraries necessary for developing programs which use the libnfsidmap library. %prep %autosetup -p1 # Remove .orig files find . -name "*.orig" | xargs rm -f # Change shebangs find -name \*.py -exec sed -r -i '1s|^#!\s*/usr/bin.*python.*|#!%{__python3}|' {} \; %build %serverbuild sh -x autogen.sh %global _statdpath /var/lib/nfs/statd %configure \ CFLAGS="%{build_cflags} -D_FILE_OFFSET_BITS=64" \ LDFLAGS="%{build_ldflags}" \ --enable-mountconfig \ --enable-ipv6 \ --with-statdpath=%{_statdpath} \ --enable-libmount-mount \ --with-systemd \ --without-tcp-wrappers \ --with-pluginpath=%{_libdir}/libnfsidmap \ --enable-junction %make_build all %install %global _pkgdir %{_prefix}/lib/systemd install -d %{buildroot}%{_sbindir} install -d %{buildroot}%{_libexecdir}/nfs-utils/ install -d %{buildroot}%{_pkgdir}/system install -d %{buildroot}%{_pkgdir}/system-generators install -d %{buildroot}%{_mandir}/man8 install -d %{buildroot}%{_sysconfdir}/request-key.d install -d %{buildroot}%{_sysconfdir}/modprobe.d install -d %{buildroot}%{_sysconfdir}/gssproxy %make_install install -s -m 755 tools/rpcdebug/rpcdebug %{buildroot}%{_sbindir} install -m 644 utils/mount/nfsmount.conf %{buildroot}%{_sysconfdir} install -m 644 nfs.conf %{buildroot}%{_sysconfdir} install -m 644 support/nfsidmap/idmapd.conf %{buildroot}%{_sysconfdir} install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/request-key.d install -d %{buildroot}/run/sysconfig install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/modprobe.d/lockd.conf install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/gssproxy rm -rf %{buildroot}%{_libdir}/*.{a,la} rm -rf %{buildroot}%{_libdir}/libnfsidmap/*.{a,la} install -d %{buildroot}%{_sharedstatedir}/nfs/rpc_pipefs touch %{buildroot}%{_sharedstatedir}/nfs/rmtab mv %{buildroot}%{_sbindir}/rpc.statd %{buildroot}/sbin install -d %{buildroot}%{_sharedstatedir}/nfs/statd/sm install -d %{buildroot}%{_sharedstatedir}/nfs/statd/sm.bak install -d %{buildroot}%{_sharedstatedir}/nfs/v4recovery install -d %{buildroot}%{_sysconfdir}/exports.d install -d %{buildroot}%{_sysconfdir}/nfsmount.conf.d install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/nfsmount.conf.d install -d %{buildroot}%{_udevrulesdir} %pre %_pre_useradd rpcuser %{_localstatedir}/lib/nfs /bin/false %post %_post_unit nfs-client.target %preun %_preun_unit nfs-client.target nfs-server.service nfs-blkmap.service nfs-secure.service nfs-secure-server.service %postun %_postun_userdel rpcuser %files %doc README NEWS COPYING %dir %{_localstatedir}/lib/nfs %dir %{_localstatedir}/lib/nfs/v4recovery %dir %{_localstatedir}/lib/nfs/rpc_pipefs %dir %{_libexecdir}/nfs-utils %dir %attr(700,rpcuser,rpcuser) %{_localstatedir}/lib/nfs/statd %dir %attr(700,rpcuser,rpcuser) %{_localstatedir}/lib/nfs/statd/sm %dir %attr(700,rpcuser,rpcuser) %{_localstatedir}/lib/nfs/statd/sm.bak %ghost %attr(644,rpcuser,rpcuser) %{_localstatedir}/lib/nfs/statd/state %dir %{_sysconfdir}/exports.d %dir %{_sysconfdir}/nfsmount.conf.d %config(noreplace) %{_localstatedir}/lib/nfs/etab %config(noreplace) %{_localstatedir}/lib/nfs/rmtab %config(noreplace) %{_sysconfdir}/request-key.d/id_resolver.conf %config(noreplace) %{_sysconfdir}/modprobe.d/lockd.conf %config(noreplace) %{_sysconfdir}/nfsmount.conf %config(noreplace) %{_sysconfdir}/nfs.conf %config(noreplace) %{_sysconfdir}/gssproxy/24-nfs-server.conf %config(noreplace) /usr/lib/udev/rules.d/60-nfs.rules %config(noreplace) %{_sysconfdir}/nfsmount.conf.d/10-nfsv4.conf %{_unitdir}/* %{_prefix}/lib/systemd/system-generators/* %{_sbindir}/exportfs %{_sbindir}/nfsstat %{_sbindir}/rpcdebug %{_sbindir}/rpcctl %{_sbindir}/rpc.mountd %{_sbindir}/rpc.nfsd %{_sbindir}/showmount %{_sbindir}/rpc.idmapd %{_sbindir}/rpc.gssd %{_sbindir}/sm-notify %{_sbindir}/start-statd %{_sbindir}/mountstats %{_sbindir}/nfsiostat %{_sbindir}/nfsidmap %{_sbindir}/blkmapd %{_sbindir}/nfsconf %{_sbindir}/nfsref %{_sbindir}/nfsdcld %{_sbindir}/nfsdclddb %{_sbindir}/nfsdclnts %{_sbindir}/fsidd %{_libexecdir}/nfsrahead %{_udevrulesdir}/99-nfs.rules %attr(4755,root,root) /sbin/mount.nfs /sbin/rpc.statd /sbin/nfsdcltrack /sbin/mount.nfs4 /sbin/umount.nfs /sbin/umount.nfs4 %{_mandir}/man5/exports.5* %{_mandir}/man5/nfs.5* %{_mandir}/man5/nfs.conf.5* %{_mandir}/man5/nfsrahead.5.* %{_mandir}/man5/nfsmount.conf.5* %{_mandir}/man7/nfsd.7* %{_mandir}/man7/nfs.systemd.7* %{_mandir}/man8/exportfs.8* %{_mandir}/man8/mountd.8* %{_mandir}/man8/nfsd.8* %{_mandir}/man8/rpc.mountd.8* %{_mandir}/man8/rpc.nfsd.8* %{_mandir}/man8/mount.nfs.8* %{_mandir}/man8/nfsconf.8* %{_mandir}/man8/nfsref.8* %{_mandir}/man8/rpc.sm-notify.8* %{_mandir}/man8/sm-notify.8* %{_mandir}/man8/umount.nfs.8* %{_mandir}/man8/rpc.statd.8* %{_mandir}/man8/statd.8* %{_mandir}/man8/showmount.8* %{_mandir}/man8/nfsstat.8* %{_mandir}/man8/rpcdebug.8* %{_mandir}/man8/mountstats.8* %{_mandir}/man8/nfsiostat.8* %{_mandir}/man8/nfsidmap.8* %{_mandir}/man8/blkmapd.8* %{_mandir}/man8/rpc.gssd.8* %{_mandir}/man8/rpc.idmapd.8* %{_mandir}/man8/gssd.8* %{_mandir}/man8/idmapd.8* %{_mandir}/man8/nfsdcltrack.8* %{_mandir}/man8/nfsdcld.8* %{_mandir}/man8/nfsdclddb.8* %{_mandir}/man8/nfsdclnts.8* %{_mandir}/man8/rpcctl.8* %files -n %{libname} %doc support/nfsidmap/AUTHORS support/nfsidmap/README support/nfsidmap/COPYING %config(noreplace) %{_sysconfdir}/idmapd.conf %{_libdir}/libnfsidmap.so.* %{_libdir}/libnfsidmap/*.so %{_mandir}/man3/nfs4_uid_to_name.* %{_mandir}/man5/idmapd.conf.* %files -n %{devname} %{_libdir}/pkgconfig/libnfsidmap.pc %{_includedir}/nfsidmap.h %{_includedir}/nfsidmap_plugin.h %{_libdir}/libnfsidmap.so