%define build_nfsv4 0 %define build_wrap 0 # commandline overrides: # rpm -ba|--rebuild --with 'xxx' %{?_with_nfsv4: %{expand: %%define build_nfsv4 1}} %{?_with_wrap: %{expand: %%define build_wrap 1}} %if %{build_nfsv4} %define build_nfsv4 1 %endif %if %{build_wrap} %define build_wrap 1 %endif %define name nfs-utils %define version 1.0.7 %define release 4mdk Summary: The utilities for Linux NFS server Name: %{name} Version: %{version} Release: %{release} Group: Networking/Other License: GPL URL: http://sourceforge.net/projects/nfs/ Source0: http://prdownloads.sourceforge.net/nfs/%{name}-%{version}.tar.bz2 Source1: nfs.doc.tar.bz2 Source2: nfs-utils-1.0.7-mandrake.tar.bz2 Patch0: nfs-utils-0.3.3-statd-manpage.patch.bz2 Patch1: eepro-support.patch.bz2 Patch2: nfs-utils-1.0.4-no-chown.patch.bz2 Patch3: nfs-utils-1.0.7-binary-or-shlib-defines-rpath.diff.bz2 # (oe) boldly stolen from fedora Patch20: nfs-utils-1.0.6-citi-mountd_flavors.patch.bz2 Patch21: nfs-utils-1.0.6-zerostats.patch.bz2 Patch22: nfs-utils-1.0.6-mountd.patch.bz2 Patch23: nfs-utils-1.0.6-expwarn.patch.bz2 Patch24: nfs-utils-1.0.6-fd-sig-cleanup.patch.bz2 Patch25: nfs-utils-1.0.6-statd-notify-hostname.patch.bz2 # security fixes Patch200: nfs-utils-1.0.7-CAN-2004-1014.diff.bz2 Patch201: nfs-utils-1.0.7-CAN-2004-0946.diff.bz2 Requires: nfs-utils-clients Requires: portmap >= 4.0 ExcludeArch: armv4l Requires: setup >= 2.1.9-35mdk PreReq: rpm-helper Obsoletes: nfs-server knfsd nfs-server-clients Provides: nfs-server knfsd nfs-server-clients %if %{build_nfsv4} Requires: kernel >= 2.6.0 Requires: module-init-tools >= 3.0-5mdk BuildRequires: nfsidmap-devel BuildRequires: krb5-devel >= 1.3 BuildRequires: libevent-devel %else Requires: kernel >= 2.2.5 %endif %if %{build_wrap} BuildRequires: tcp_wrappers-devel Requires: tcp_wrappers %endif Epoch: 1 Buildroot: %{_tmppath}/%{name}-root %description The nfs-utils package provides a daemon for the kernel NFS server and related tools, which provides a much higher level of performance than the traditional Linux NFS server used by most users. This package also contains the showmount program. Showmount queries the mount daemon on a remote host for information about the NFS (Network File System) server on the remote host. For example, showmount can display the clients which are mounted on that host. You can also rebuild %{name} with NFS protocol v4 and tcp_wrappers support. Currently both these options are disabled per default. The following are valid build options. (ie. use with rpm --rebuild): --with nfsv4 Build with NFS protocol v4 support --with wrap Build with tcp_wrappers support %package clients Summary: The utilities for Linux NFS client Group: Networking/Other Obsoletes: knfsd-clients knfsd-lock Provides: knfsd-clients knfsd-lock Requires: kernel >= 2.2.5 Requires: portmap >= 4.0 %if %{build_nfsv4} Requires: kernel >= 2.6.0 Requires: module-init-tools >= 3.0-5mdk %else Requires: kernel >= 2.2.5 %endif PreReq: rpm-helper %description clients The nfs-utils package provides a daemon for the kernel NFS server and related tools, which provides a much higher level of performance than the traditional Linux NFS server used by most users. This package also contains the showmount program. Showmount queries the mount daemon on a remote host for information about the NFS (Network File System) server on the remote host. For example, showmount can display the clients which are mounted on that host. %prep %setup -q -a1 -a2 # fix strange perms find . -type d -perm 0700 -exec chmod 755 {} \; find . -type f -perm 0555 -exec chmod 755 {} \; find . -type f -perm 0444 -exec chmod 644 {} \; %patch0 -p1 -b .statd-manpage %patch1 -p1 -b .eepro-support %patch2 -p1 -b .no-chown %patch3 -p1 -b .binary-or-shlib-defines-rpath # (oe) boldly stolen from fedora %patch20 -p1 -b .mountd_flavors %patch21 -p1 -b .zerostats %patch22 -p1 -b .mountd %patch23 -p1 -b .expwarn %patch24 -p1 -b .cleanup %patch25 -p1 -b .notify # security fixes %patch200 -p1 -b .CAN-2004-1014 %patch201 -p0 -b .CAN-2004-0946 # lib64 fixes perl -pi -e "s|/usr/lib|%{_libdir}|g" mandrake/* perl -pi -e "s|\\$dir/lib/|\\$dir/%{_lib}/|g" configure %if ! %{build_wrap} # nuke tcp_wrappers find . -type f | xargs perl -pi -e "s|\-DHAVE_TCP_WRAPPER||g" find . -type f | xargs perl -pi -e "s|\-lwrap||g" %endif %build %configure \ --with-statedir=%{_localstatedir}/nfs \ --with-statduser=rpcuser \ --enable-nfsv3 \ %if %{build_nfsv4} --enable-nfsv4 --enable-gss --enable-secure-statd --with-krb5=%{_prefix} \ %else --disable-nfsv4 --disable-gss --disable-secure-statd --without-krb5 \ %endif --disable-rquotad make all %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} # don't fiddle with the initscript! export DONT_GPRINTIFY=1 install -d %{buildroot}{/sbin,/usr/sbin} install -d %{buildroot}%{_mandir}/{man5,man8} install -d %{buildroot}%{_initrddir} install -d %{buildroot}%{_sysconfdir}/sysconfig install -d %{buildroot}%{_localstatedir}/nfs/statd make \ install_prefix=%{buildroot} \ MANDIR=%{buildroot}%{_mandir} \ SBINDIR=%{buildroot}%{_prefix}/sbin \ install install -m0755 tools/rpcdebug/rpcdebug %{buildroot}/sbin/ ln -snf rpcdebug %{buildroot}/sbin/nfsdebug ln -snf rpcdebug %{buildroot}/sbin/nfsddebug install -m0755 mandrake/nfs.init %{buildroot}%{_initrddir}/nfs install -m0755 mandrake/nfslock.init %{buildroot}%{_initrddir}/nfslock install -m0644 mandrake/nfs.sysconfig %{buildroot}/etc/sysconfig/nfs touch %{buildroot}%{_localstatedir}/nfs/rmtab mv %{buildroot}%{_sbindir}/{rpc.lockd,rpc.statd} %{buildroot}/sbin/ %if %{build_nfsv4} install -m0755 mandrake/rpcidmapd.init %{buildroot}%{_initrddir}/rpcidmapd install -m0755 mandrake/rpcgssd.init %{buildroot}%{_initrddir}/rpcgssd install -m0755 mandrake/rpcsvcgssd.init %{buildroot}%{_initrddir}/rpcsvcgssd install -m0644 mandrake/idmapd.conf %{buildroot}%{_sysconfdir}/idmapd.conf install -m0644 mandrake/gssapi_mech.conf %{buildroot}%{_sysconfdir}/gssapi_mech.conf install -d %{buildroot}%{_localstatedir}/nfs/rpc_pipefs %endif %post %_post_service nfs %if %{build_nfsv4} %_post_service rpcidmapd %_post_service rpcgssd %_post_service rpcsvcgssd %endif %create_ghostfile %{_localstatedir}/nfs/xtab root root 644 %create_ghostfile %{_localstatedir}/nfs/etab root root 644 %create_ghostfile %{_localstatedir}/nfs/rmtab root root 644 %preun %_preun_service nfs %if %{build_nfsv4} %_preun_service rpcidmapd %_preun_service rpcgssd %_preun_service rpcsvcgssd %endif %pre clients %_pre_useradd rpcuser %{_localstatedir}/nfs /bin/false %post clients %_post_service nfslock %preun clients %_preun_service nfslock %postun clients %_postun_userdel rpcuser %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root) %doc README ChangeLog COPYING %doc nfs/*.html nfs/*.ps linux-nfs %attr(0755,root,root) %{_initrddir}/nfs %config(noreplace) %{_sysconfdir}/sysconfig/nfs %config(noreplace) %ghost %{_localstatedir}/nfs/xtab %config(noreplace) %ghost %{_localstatedir}/nfs/etab %config(noreplace) %ghost %{_localstatedir}/nfs/rmtab /sbin/rpcdebug /sbin/nfsdebug /sbin/nfsddebug %{_sbindir}/exportfs %{_sbindir}/nfsstat %{_sbindir}/nhfsgraph %{_sbindir}/nhfsnums %{_sbindir}/nhfsrun %{_sbindir}/nhfsstone %{_sbindir}/rpc.mountd %{_sbindir}/rpc.nfsd %if %{build_nfsv4} %doc mandrake/nfsv4.schema %attr(0755,root,root) %{_initrddir}/rpcidmapd %attr(0755,root,root) %{_initrddir}/rpcgssd %attr(0755,root,root) %{_initrddir}/rpcsvcgssd %config(noreplace) %{_sysconfdir}/idmapd.conf %config(noreplace) %{_sysconfdir}/gssapi_mech.conf %{_sbindir}/rpc.idmapd %{_sbindir}/rpc.gssd %{_sbindir}/rpc.svcgssd %{_mandir}/man5/idmapd.conf.5* %{_mandir}/man5/rpc.idmapd.conf.5* %{_mandir}/man8/gssd.8* %{_mandir}/man8/idmapd.8* %{_mandir}/man8/rpc.gssd.8* %{_mandir}/man8/rpc.idmapd.8* %{_mandir}/man8/rpc.svcgssd.8* %{_mandir}/man8/svcgssd.8* %dir %{_localstatedir}/nfs/rpc_pipefs %endif %{_mandir}/man5/exports.5* %{_mandir}/man7/nfsd.7* %{_mandir}/man8/exportfs.8* %{_mandir}/man8/mountd.8* %{_mandir}/man8/nfsd.8* %{_mandir}/man8/nfsstat.8* %{_mandir}/man8/nhfsgraph.8* %{_mandir}/man8/nhfsnums.8* %{_mandir}/man8/nhfsrun.8* %{_mandir}/man8/nhfsstone.8* %{_mandir}/man8/rpc.mountd.8* %{_mandir}/man8/rpc.nfsd.8* %files clients %defattr(-,root,root) %doc README %attr(0755,root,root) %{_initrddir}/nfslock /sbin/rpc.lockd /sbin/rpc.statd %{_sbindir}/showmount %{_mandir}/man8/lockd.8* %{_mandir}/man8/rpc.lockd.8* %{_mandir}/man8/rpc.statd.8* %{_mandir}/man8/statd.8* %{_mandir}/man8/showmount.8* %dir %{_localstatedir}/nfs %dir %{_localstatedir}/nfs/state %dir %attr(0700,rpcuser,rpcuser) %{_localstatedir}/nfs/statd %changelog * Sun Feb 27 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 1:1.0.7-4mdk - synced sysv scripting with fedora and added P20-P25 (nfs-utils-1.0.7-1) - misc rpmlint fixes * Wed Feb 02 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 1.0.7-3mdk - make sure portmap is running (nfs) * Tue Jan 11 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 1.0.7-2mdk - fix deps - make sure portmap is running (nfslock) * Sun Jan 09 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 1.0.7-1mdk - 1.0.7 - rediffed the CAN-2004-1014 patch (P200, parts of it was applied) - merge nfs4-utils-1.0.6-3mdk into this package but use --with build options instead - drop obsolete patches and reorder them - added P3 - added P200 (CAN-2004-0946, even though we don't build rpcquotad apply the patch anyway) - fix deps * Thu Dec 16 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.0.6-3mdk - merged with 1.0.6-2.1.101mdk * Tue Sep 21 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.0.6-2mdk - spec file cleanup * Sun Dec 21 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 1.0.6-1mdk - 1.0.6 - partly synced S10 & S11 with fedora and updated S12 - misc spec file fixes * Tue Jul 22 2003 Juan Quintela <quintela@mandrakesoft.com> 1.0.5-1mdk - included the rest of created programs & manpages. Inquiring minds need nhfsgraph, nfgsnums and nhfsrun. - brown paper bug upstream, I tested it and it worked, problem is that it just worked once :(. - 1.0.5. * Wed Jul 16 2003 Juan Quintela <quintela@mandrakesoft.com> 1.0.4-1mdk - remove patch5 (time.h) already included upstream. - remove patch2 no-chroot (not needed after removing patch0). - remove patch0 (drop privs) included better patch upstream. - 1.0.4. * Tue Jul 01 2003 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.0.3-1mdk - new release (kernel-2.5.x support) - rediff patch 0 * Wed Jun 04 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 1.0.1-2mdk - remove unpackaged files - fix E: nfs-utils-clients no-prereq-on rpm-helper - drop obsolete Prefix tag * Tue Jul 23 2002 Juan Quintela <quintela@mandrakesoft.com> 1.0.1-1mdk - then merge them with nfs-1.0.1 ones. - merged nfs.init & nfslock.init with rh ones. - merge with rh 1.0.1.pre7-1. - use %configure. - 1.0.1. * Thu Jul 11 2002 Frederic Lepied <flepied@mandrakesoft.com> 0.3.3-4mdk - add rpcuser * Tue Jan 15 2002 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.3.3-3mdk - Make some files as %ghost. * Fri Dec 7 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.3.3-2mdk - Fix some rpmlints. * Fri Sep 28 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.3.3-1mdk - 0.3.3. * Sat Sep 1 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.3.1-7mdk - Merge rh scripts. - Remove quota from here it's provided by quota. * Sun Apr 1 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.3.1-6mdk - Move dir /var/lib/nfs/statd to clients packge or rpc.statd wouldn't work. * Thu Mar 28 2001 Florin Grad <florin@mandrakesoft.com> 0.3.1-5mdk - -fno-omit-frame-pointer * Sun Mar 18 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.3.1-4mdk - Requires last setup package for rpcuser. - Make /var/lib/nfs/statd as rpcuser,rpcuser. * Thu Mar 15 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.3.1-3mdk - Fix incorrect file specifications in statd manpage. (rh). - disable tcp_wrapper support (rh). - Don't do a chroot(2) after dropping privs, in statd (rh). - #include <time.h> patch. * Fri Mar 02 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.3.1-2mdk - Fix chkconfig entry in initscripts. * Mon Feb 19 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.3.1-1mdk - Move rpc.lockd and rpc.statd to /sbin - Merge with rh changes. - 0.3.1. * Thu Dec 7 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.2.1-3mdk - Nfslock only when we have a lockd into the kernel. * Mon Oct 09 2000 Florin Grad <florin@mandrakesoft.com> 0.2.1-2mdk - chkconfig is now 345 ... instead of - 60 ... * Fri Sep 29 2000 Frederic Lepied <flepied@mandrakesoft.com> 0.2.1-1mdk - 0.2.1 bug fix release. * Thu Sep 28 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.2-5mdk - Florin or chmou sucks, pidofproc come from the /etc/init.d/functions. * Wed Sep 27 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.2-4mdk - nfslock: where pidofproc come from ? use pidof instead (florin). * Thu Sep 21 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.2-3mdk - nfslock: don't kill lockd processes that do not have an executable (i.e. kernel threads). * Thu Sep 07 2000 Florin Grad <florin@mandrakesoft.com> 0.2-2mdk - added noreplace for %{_inirddir}/(nfs|nfslock) * Thu Sep 07 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 0.2-1mdk - s/0.1.9.1/0.2/; * Wed Aug 30 2000 Florin Grad <florin@mandrakesoft.com> 0.1.9.1-4mdk - changing some macros * Wed Jul 26 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.1.9.1-3mdk - BM - more macros * Mon Jul 10 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.1.9.1-2mdk - fix build with latest rpm macros * Wed Jul 05 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.1.9.1-1mdk - new release (mainly turning gcc warnings off) - fix build as non root with tmpdir * Mon Jul 3 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.1.9-1mdk - 0.1.9. * Tue Jun 27 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.1.8-1mdk - 0.1.8. - Macrozifications. * Sun May 28 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.1.7-3mdk - Fix path call (/usr/sbin !> /sbin/). - Launch always rpc.statd. * Wed Apr 06 2000 Yoann Vandoorselaere <yoann@mandrakesoft.com> 0.1.7-2mdk - Renamed linusinit patch to mdkinit. - Do not grep for linus in /proc/version, but for mdk (Thanks to Jürgen Zimmermann) * Wed Mar 22 2000 Yoann Vandoorselaere <yoann@mandrakesoft.com> 0.1.7-1mdk - Update to 0.1.7. - Fix group. * Tue Jan 18 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.1.6-1mdk - 0.1.6. * Tue Dec 21 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - 0.1.5. - Fix init script with kernel-linus. * Mon Dec 06 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - 0.1.4. * Tue Nov 30 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - 0.1.3. * Thu Nov 25 1999 Pixel <pixel@linux-mandrake.com> - fixed %defattr - split in 2 packages: nfs-utils-clients & nfs-utils (for server) * Fri Nov 19 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - Last cvs version. * Wed Oct 27 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - 0.1.2 * Tue Oct 26 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - 0.1.1. * Tue Oct 19 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - First Spec files based on original version of H.J Lu.