# # spec file for package nfs-utils # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: nfs-utils BuildRequires: e2fsprogs-devel gcc-c++ krb5-devel libgssglue-devel librpcsecgss libtirpc-devel nfsidmap-devel pkgconfig tcpd-devel %if 0%{?suse_version} > 1100 BuildRequires: libevent-devel %else BuildRequires: libevent %endif Url: http://nfs.sourceforge.net Summary: Support Utilities for Kernel nfsd Version: 1.2.3 Release: 4 Group: Productivity/Networking/NFS License: GPLv2+ BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %fillup_prereq %insserv_prereq AutoReqProv: on BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: ftp://ftp.sourceforge.net/pub/sourceforge/n/nf/nfs/nfs-utils-%{version}.tar.bz2 Source1: ftp://nfs.sourceforge.net/pub/nfs/nfs.doc.tar.bz2 Source2: nfs.init Source3: nfsserver.init Source4: sysconfig.nfs Source5: nfs-kernel-server.xml Source6: README.NFSv4 Source7: fw-client Source8: fw-server Source9: mkinitrd-setup.sh Source10: mkinitrd-boot.sh Source11: idmapd.conf Source12: start-statd Source13: nfs-utils.rpmlintrc Patch0: nfs-utils-1.0.7-bind-syntax.patch Patch1: warn-nfs-udp.patch Patch2: nfs-utils-clear-mountd-reg Patch3: nfs-utils-allow-port-number-sharing Patch4: nfs-utils-improve-v4-umount Patch5: nfs-utils-fix-remount %description This package contains the NFS utilities. You can tune the number of server threads via the sysconfig variable USE_KERNEL_NFSD_NUMBER. For quota over NFS support, install the quota package. Authors: -------- Olaf Kirch H.J. Lu %package -n nfs-client License: GPLv2+ Group: Productivity/Networking/NFS Summary: Support Utilities for NFS Obsoletes: nfs-utils < 1.1.0 Requires: rpcbind PreReq: %fillup_prereq %insserv_prereq PreReq: permissions sysvinit(portmap) sysvinit(network) Provides: aaa_base:/etc/init.d/nfs %description -n nfs-client This package contains common NFS utilities which are needed for client and kernel based server. Authors: -------- Olaf Kirch H.J. Lu %package -n nfs-kernel-server License: GPLv2+ Group: Productivity/Networking/NFS Summary: Support Utilities for Kernel nfsd Provides: nfs-utils = %{version} Obsoletes: nfs-utils < 1.1.0 Conflicts: nfs-server Requires: nfs-client = %{version} rpcbind PreReq: %fillup_prereq %insserv_prereq %description -n nfs-kernel-server This package contains support for the kernel based NFS server. You can tune the number of server threads via the sysconfig variable USE_KERNEL_NFSD_NUMBER. For quota over NFS support, install the quota package. Authors: -------- Olaf Kirch H.J. Lu %package -n nfs-doc License: GPLv2+ Group: Productivity/Networking/NFS Summary: Support Utilities for NFS Obsoletes: nfs-utils < 1.1.0 Requires: latex2html-pngicons %description -n nfs-doc This package contains additional NFS documentation. Authors: -------- Olaf Kirch H.J. Lu %prep %setup -q -n nfs-utils-%{version} -a 1 %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 cp %{S:6} . %build %{?suse_update_config:%{suse_update_config -f }} rm -f configure; autoreconf -fi CFLAGS="$RPM_OPT_FLAGS -fPIE -fno-strict-aliasing" LDFLAGS="-pie" ./configure \ --mandir=%{_mandir} \ --disable-rquotad \ --enable-nfsv4 \ --enable-gss \ --enable-ipv6 \ --enable-mount \ --enable-mountconfig \ --with-krb5=/usr/lib/mit make cd nfs for i in *.html ; do sed -i \ -e "s@/usr/lib/latex2html/icons.png/next_motif.png@/usr/share/latex2html/icons/next.png@" \ -e "s@/usr/lib/latex2html/icons.png/up_motif_gr.png@/usr/share/latex2html/icons/up.png@" \ -e "s@/usr/lib/latex2html/icons.png/previous_motif_gr.png@/usr/share/latex2html/icons/prev.png@" \ $i done %install make install-strip DESTDIR=$RPM_BUILD_ROOT rm -f linux-nfs/Makefile* # rc-script install -d $RPM_BUILD_ROOT/etc/init.d install -m 744 %{SOURCE3} $RPM_BUILD_ROOT/etc/init.d/nfsserver install -m 744 %{SOURCE2} $RPM_BUILD_ROOT/etc/init.d/nfs ln -sf ../../etc/init.d/nfsserver $RPM_BUILD_ROOT/usr/sbin/rcnfsserver ln -sf ../../etc/init.d/nfs $RPM_BUILD_ROOT/usr/sbin/rcnfs # sysconfig-data mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates install -m 644 %{SOURCE4} $RPM_BUILD_ROOT/var/adm/fillup-templates # idmapd setup install -m 644 %{S:11} $RPM_BUILD_ROOT/etc/idmapd.conf mkdir -p -m 755 $RPM_BUILD_ROOT/var/lib/nfs/rpc_pipefs mkdir -p -m 755 $RPM_BUILD_ROOT/var/lib/nfs/v4recovery mkdir -p -m 755 $RPM_BUILD_ROOT/usr/share/omc/svcinfo.d install -m 644 %{SOURCE5} $RPM_BUILD_ROOT/usr/share/omc/svcinfo.d # sm-notify state mkdir -p -m 755 $RPM_BUILD_ROOT/var/lib/nfs/sm mkdir -p -m 755 $RPM_BUILD_ROOT/var/lib/nfs/sm.bak touch $RPM_BUILD_ROOT/var/lib/nfs/state mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services install -m 0644 %{SOURCE7} ${RPM_BUILD_ROOT}/etc/sysconfig/SuSEfirewall2.d/services/nfs-client install -m 0644 %{SOURCE8} ${RPM_BUILD_ROOT}/etc/sysconfig/SuSEfirewall2.d/services/nfs-kernel-server install -d $RPM_BUILD_ROOT/lib/mkinitrd/scripts install -m 755 %{S:9} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/setup-nfs.sh install -m 755 %{S:10} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-nfs.sh install -m 755 %{S:12} $RPM_BUILD_ROOT/usr/sbin/start-statd install -m 644 utils/mount/nfsmount.conf $RPM_BUILD_ROOT/etc/nfsmount.conf %clean rm -rf $RPM_BUILD_ROOT %pre -n nfs-client useradd -r -c 'NFS statd daemon' \ -s /sbin/nologin -d /var/lib/nfs -g nogroup statd &> /dev/null || : %post -n nfs-client chown statd:nogroup /var/lib/nfs chown -R statd /var/lib/nfs/{state,sm,sm.bak} >& /dev/null || : [ -x /sbin/mkinitrd_setup ] && mkinitrd_setup %{fillup_and_insserv -n nfs nfs} %run_permissions %preun -n nfs-client %stop_on_removal nfs %postun -n nfs-client %restart_on_update nfs [ -x /sbin/mkinitrd_setup ] && mkinitrd_setup %insserv_cleanup #userdel statd &> /dev/null || : %verifyscript -n nfs-client %verify_permissions -e /sbin/mount.nfs %preun -n nfs-kernel-server %stop_on_removal nfsserver %post -n nfs-kernel-server %{fillup_and_insserv nfsserver} %postun -n nfs-kernel-server %restart_on_update nfsserver %insserv_cleanup %files -n nfs-client %defattr(-,root,root) %config /etc/init.d/nfs %config /etc/idmapd.conf %config /etc/nfsmount.conf %dir /lib/mkinitrd %dir /lib/mkinitrd/scripts /lib/mkinitrd/scripts/setup-nfs.sh /lib/mkinitrd/scripts/boot-nfs.sh %verify(not mode) %attr(0755,root,root) /sbin/mount.nfs /sbin/mount.nfs4 /sbin/umount.nfs /sbin/umount.nfs4 /usr/sbin/gss_clnt_send_err /usr/sbin/gss_destroy_creds /usr/sbin/mountstats /usr/sbin/nfsiostat /usr/sbin/nfsstat /usr/sbin/rcnfs /usr/sbin/rpc.gssd /usr/sbin/rpc.idmapd /usr/sbin/rpc.statd /usr/sbin/rpcdebug /usr/sbin/showmount /usr/sbin/sm-notify /usr/sbin/start-statd %{_mandir}/man5/nfsmount.conf.5.gz %{_mandir}/man5/nfs.5.gz %{_mandir}/man8/mount.nfs.8.gz %{_mandir}/man8/nfsstat.8.gz %{_mandir}/man8/rpc.sm-notify.8.gz %{_mandir}/man8/showmount.8.gz %{_mandir}/man8/sm-notify.8.gz %{_mandir}/man8/umount.nfs.8.gz %{_mandir}/man8/rpc.gssd.8.gz %{_mandir}/man8/rpc.idmapd.8.gz %{_mandir}/man8/gssd.8.gz %{_mandir}/man8/idmapd.8.gz %{_mandir}/man8/svcgssd.8.gz %{_mandir}/man8/rpc.statd.8.gz %{_mandir}/man8/rpcdebug.8.gz %{_mandir}/man8/statd.8.gz %{_mandir}/man8/mountstats.8.gz %{_mandir}/man8/nfsiostat.8.gz /var/adm/fillup-templates/sysconfig.nfs %attr(0700,statd,nogroup) %dir /var/lib/nfs %dir /var/lib/nfs/rpc_pipefs %dir /var/lib/nfs/v4recovery %attr(0700,statd,nogroup) %dir /var/lib/nfs/sm %attr(0700,statd,nogroup) %dir /var/lib/nfs/sm.bak %attr(0700,statd,nogroup) %ghost /var/lib/nfs/state %config %attr(0644,root,root) /etc/sysconfig/SuSEfirewall2.d/services/nfs-client %files -n nfs-kernel-server %defattr(-,root,root) %config /etc/init.d/nfsserver /usr/sbin/exportfs /usr/sbin/rcnfsserver /usr/sbin/rpc.mountd /usr/sbin/rpc.nfsd /usr/sbin/rpc.svcgssd %{_mandir}/man5/exports.5.gz %{_mandir}/man7/nfsd.7.gz %{_mandir}/man8/exportfs.8.gz %{_mandir}/man8/mountd.8.gz %{_mandir}/man8/nfsd.8.gz %{_mandir}/man8/rpc.mountd.8.gz %{_mandir}/man8/rpc.nfsd.8.gz %{_mandir}/man8/rpc.svcgssd.8.gz /usr/share/omc/svcinfo.d/nfs-kernel-server.xml %config(noreplace) /var/lib/nfs/xtab %config(noreplace) /var/lib/nfs/etab %config(noreplace) /var/lib/nfs/rmtab %config %attr(0644,root,root) /etc/sysconfig/SuSEfirewall2.d/services/nfs-kernel-server %files -n nfs-doc %defattr(-,root,root) %doc nfs/*.html nfs/*.ps linux-nfs/* README.NFSv4 %changelog