]> git.pld-linux.org Git - packages/nfs-utils.git/blobdiff - nfs-utils.spec
- rel 2
[packages/nfs-utils.git] / nfs-utils.spec
index e5c24ff8e7f8f665839b85eb4113286d96c37cf4..f492a3ba889dda475ada6ea743178b9cc5741b82 100644 (file)
@@ -3,8 +3,7 @@
 #      uninstall (or in service nfs stop)
 #
 # Conditional build:
-%bcond_without nfs4            # without NFSv4 support
-%bcond_without mount           # don't build mount.nfs program
+%bcond_with    heimdal         # build with Heimdal Kerberos instead of MIT
 #
 Summary:       Kernel NFS server
 Summary(pl.UTF-8):     Działający na poziomie jądra serwer NFS
@@ -12,12 +11,12 @@ Summary(pt_BR.UTF-8):       Os utilitários para o cliente e servidor NFS do Linux
 Summary(ru.UTF-8):     Утилиты для NFS и демоны поддержки для NFS-сервера ядра
 Summary(uk.UTF-8):     Утиліти для NFS та демони підтримки для NFS-сервера ядра
 Name:          nfs-utils
-Version:       1.1.3
-Release:       3
+Version:       1.2.0
+Release:       2
 License:       GPL v2
 Group:         Networking/Daemons
-Source0:       ftp://ftp.kernel.org/pub/linux/utils/nfs/%{name}-%{version}.tar.gz
-# Source0-md5: 167d231850b00c7c63300747aeb94c38
+Source0:       http://www.kernel.org/pub/linux/utils/nfs/%{name}-%{version}.tar.bz2
+# Source0-md5: 779cf81044e92cb51ad590960e7b3671
 #Source1:      ftp://ftp.linuxnfs.sourceforge.org/pub/nfs/nfs.doc.tar.gz
 Source1:       nfs.doc.tar.gz
 # Source1-md5: ae7db9c61c5ad04f83bb99e5caed73da
@@ -30,25 +29,30 @@ Source7:    rpcsvcgssd.init
 Source8:       nfs.sysconfig
 Source9:       nfslock.sysconfig
 Source10:      nfsfs.sysconfig
-Patch0:                %{name}-eepro-support.patch
-Patch1:                %{name}-install.patch
-Patch2:                %{name}-statdpath.patch
-Patch3:                %{name}-mountd.patch
-Patch4:                %{name}-idmapd.conf.patch
-Patch5:                %{name}-keytab-path.patch
-Patch6:                %{name}-subsys.patch
+Patch0:                %{name}-install.patch
+Patch1:                %{name}-statdpath.patch
+Patch2:                %{name}-keytab-path.patch
+Patch3:                %{name}-subsys.patch
+Patch4:                %{name}-union-mount.patch
+Patch5:                %{name}-kerberos-ac.patch
+Patch6:                %{name}-no_libgssapi.patch
+Patch7:                %{name}-pkgconfig_ac.patch
+Patch8:                %{name}-heimdal_functions.patch
 URL:           http://nfs.sourceforge.net/
 BuildRequires: autoconf >= 2.59
 BuildRequires: automake
 BuildRequires: cpp
-BuildRequires: e2fsprogs-devel >= 1.39-5
-%if %{with nfs4}
+%if %{with heimdal}
+BuildRequires: heimdal-devel >= 1.0
+%else
 BuildRequires: krb5-devel >= 1.6
-BuildRequires: libevent-devel >= 1.2
 BuildRequires: libgssglue-devel >= 0.1
-BuildRequires: libnfsidmap-devel
-BuildRequires: librpcsecgss-devel >= 0.16
 %endif
+BuildRequires: libblkid-devel
+BuildRequires: libevent-devel >= 1.2
+BuildRequires: libnfsidmap-devel >= 0.21-3
+BuildRequires: librpcsecgss-devel >= 0.16
+BuildRequires: libtirpc-devel >= 1:0.1.10-4
 BuildRequires: libtool
 BuildRequires: libwrap-devel
 BuildRequires: pkgconfig
@@ -59,7 +63,7 @@ Requires(post):       fileutils
 Requires(post):        sed >= 4.0
 Requires(post,preun):  /sbin/chkconfig
 Requires:      %{name}-common = %{version}-%{release}
-Requires:      portmap >= 4.0
+Requires:      rpcbind >= 0.1.7
 Requires:      rc-scripts >= 0.4.1.5
 Requires:      setup >= 2.4.6-7
 Provides:      nfsdaemon
@@ -128,7 +132,7 @@ Summary:    Programs for NFS file locking
 Summary(pl.UTF-8):     Programy do obsługi blokowania plików poprzez NFS (lock)
 Group:         Networking
 Requires(post,preun):  /sbin/chkconfig
-Requires:      portmap >= 4.0
+Requires:      rpcbind >= 0.1.7
 Requires:      rc-scripts
 Provides:      group(rpcstatd)
 Provides:      user(rpcstatd)
@@ -148,6 +152,8 @@ plików (file locking) poprzez NFS.
 Summary:       Common programs for NFS
 Summary(pl.UTF-8):     Wspólne programy do obsługi NFS
 Group:         Networking
+Requires:      libnfsidmap >= 0.21-3
+Conflicts:     mount < 2.13-0.pre7.1
 
 %description common
 Common programs for NFS.
@@ -159,11 +165,15 @@ Wspólne programy do obsługi NFS.
 %setup -q -a1
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
+%{!?with_heimdal:%patch2 -p1}
 %patch3 -p1
 %patch4 -p1
+%if %{with heimdal}
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
+%patch8 -p0
+%endif
 
 # conflict with GNU stdio extension
 sed -i -e 's/dprintf/dbgprintf/' support/include/ha-callout.h utils/statd/*.[ch]
@@ -175,27 +185,28 @@ sed -i -e 's/dprintf/dbgprintf/' support/include/ha-callout.h utils/statd/*.[ch]
 %{__autoheader}
 %{__automake}
 %configure \
-%if %{with nfs4}
-       --enable-gss \
-       --with-krb5=%{_prefix} \
+       --enable-nfsv3 \
        --enable-nfsv4 \
+       --enable-gss \
+       --enable-mount \
+       --enable-tirpc \
+       --enable-ipv6 \
+       --with-statedir=/var/lib/nfs \
+       --with-statduser=rpcstatd \
+       --with-start-statd=%{_sbindir}/start-statd \
+       --with-tcp-wrappers \
+%if %{with heimdal}
+       --with-krb5-config=%{_bindir}/krb5-config
 %else
-       --disable-gss \
-       --disable-nfsv4 \
+       --with-krb5=%{_prefix}
 %endif
-       %{?with_mount:--enable-mount} \
-       --enable-nfsv3 \
-       --enable-secure-statd \
-       --with-statedir=/var/lib/nfs \
-       --with-tcp-wrappers
 
 %{__make} all
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},%{_mandir}/man{5,8}} \
-       $RPM_BUILD_ROOT%{_sysconfdir}/{rc.d/init.d,sysconfig} \
-       $RPM_BUILD_ROOT%{_var}/lib/nfs/{rpc_pipefs,v4recovery,statd}
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/{rc.d/init.d,sysconfig} \
+       $RPM_BUILD_ROOT%{_var}/lib/nfs/{rpc_pipefs,v4recovery}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
@@ -211,7 +222,6 @@ EOF
 sed -e "s|#!/bin/bash|#!/bin/sh|" utils/gssd/gss_destroy_creds > $RPM_BUILD_ROOT%{_sbindir}/gss_destroy_creds
 
 mv $RPM_BUILD_ROOT%{_sbindir}/rpcdebug $RPM_BUILD_ROOT/sbin
-install utils/idmapd/idmapd.conf $RPM_BUILD_ROOT%{_sysconfdir}/
 
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/nfs
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/nfslock
@@ -227,16 +237,14 @@ install %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/nfsfs
 > $RPM_BUILD_ROOT%{_sysconfdir}/exports
 
 rm $RPM_BUILD_ROOT%{_mandir}/man8/rpc.{mountd,nfsd,statd,sm-notify}.8
+rm $RPM_BUILD_ROOT%{_mandir}/man8/rpc.{svcgssd,gssd,idmapd}.8
 echo ".so mountd.8"  >         $RPM_BUILD_ROOT%{_mandir}/man8/rpc.mountd.8
 echo ".so nfsd.8"    > $RPM_BUILD_ROOT%{_mandir}/man8/rpc.nfsd.8
 echo ".so statd.8"   > $RPM_BUILD_ROOT%{_mandir}/man8/rpc.statd.8
 echo ".so sm-notify.8" > $RPM_BUILD_ROOT%{_mandir}/man8/rpc.sm-notify.8
-%if %{with nfs4}
-rm $RPM_BUILD_ROOT%{_mandir}/man8/rpc.{svcgssd,gssd,idmapd}.8
 echo ".so gssd.8"    > $RPM_BUILD_ROOT%{_mandir}/man8/rpc.gssd.8
 echo ".so idmapd.8"  > $RPM_BUILD_ROOT%{_mandir}/man8/rpc.idmapd.8
 echo ".so svcgssd.8" > $RPM_BUILD_ROOT%{_mandir}/man8/rpc.svcgssd.8
-%endif
 
 touch $RPM_BUILD_ROOT/var/lib/nfs/xtab
 
@@ -250,37 +258,29 @@ rm -rf $RPM_BUILD_ROOT
 %post
 /sbin/chkconfig --add nfs
 %service nfs restart "NFS daemon"
-%if %{with nfs4}
 /sbin/chkconfig --add svcgssd
 %service svcgssd restart "RPC svcgssd"
-%endif
 
 %preun
 if [ "$1" = "0" ]; then
        %service nfs stop
        /sbin/chkconfig --del nfs
-%if %{with nfs4}
        %service svcgssd stop
        /sbin/chkconfig --del svcgssd
-%endif
 fi
 
 %post clients
 /sbin/chkconfig --add nfsfs
 %service nfsfs restart
-%if %{with nfs4}
 /sbin/chkconfig --add gssd
 %service gssd restart "RPC gssd"
-%endif
 
 %preun clients
 if [ "$1" = "0" ]; then
        %service nfsfs stop
        /sbin/chkconfig --del nfsfs
-%if %{with nfs4}
        %service gssd stop
        /sbin/chkconfig --del gssd
-%endif
 fi
 
 %pre lock
@@ -303,7 +303,6 @@ if [ "$1" = "0" ]; then
        %groupremove rpcstatd
 fi
 
-%if %{with nfs4}
 %post common
 /sbin/chkconfig --add idmapd
 %service idmapd restart "RPC idmapd"
@@ -313,13 +312,10 @@ if [ "$1" = "0" ]; then
        %service idmapd stop
        /sbin/chkconfig --del idmapd
 fi
-%endif
 
 %triggerpostun -- %{name} < 1.1.0-0.rc1.1
 /sbin/chkconfig nfs reset
-%if %{with nfs4}
 /sbin/chkconfig svcgssd reset
-%endif
 
 %triggerpostun lock -- %{name}-lock < 1.1.0-0.rc1.1
 /sbin/chkconfig nfslock reset
@@ -330,14 +326,10 @@ if [ -f /etc/sysconfig/nfsclient.rpmsave ]; then
        mv -f /etc/sysconfig/nfsclient.rpmsave /etc/sysconfig/nfsfs
 fi
 /sbin/chkconfig nfsfs reset
-%if %{with nfs4}
 /sbin/chkconfig gssd reset
-%endif
 
-%if %{with nfs4}
 %triggerpostun common -- %{name}-common < 1.1.0-0.rc1.1
 /sbin/chkconfig idmapd reset
-%endif
 
 %files
 %defattr(644,root,root,755)
@@ -366,15 +358,16 @@ fi
 %{_mandir}/man8/rpc.mountd.8*
 %{_mandir}/man8/rpc.nfsd.8*
 %{_mandir}/man8/rpcdebug.8*
-%if %{with nfs4}
 %attr(754,root,root) /etc/rc.d/init.d/svcgssd
 %attr(755,root,root) %{_sbindir}/rpc.svcgssd
 %{_mandir}/man8/*svcgss*
-%endif
 
 %files lock
 %defattr(644,root,root,755)
 %attr(700,rpcstatd,rpcstatd) %dir %{_var}/lib/nfs/statd
+%attr(700,rpcstatd,rpcstatd) %dir %{_var}/lib/nfs/statd/sm
+%attr(700,rpcstatd,rpcstatd) %dir %{_var}/lib/nfs/statd/sm.bak
+%attr(600,rpcstatd,rpcstatd) %config(noreplace) %verify(not md5 mtime size) %{_var}/lib/nfs/statd/state
 %attr(755,root,root) %{_sbindir}/rpc.statd
 %attr(755,root,root) %{_sbindir}/sm-notify
 %attr(755,root,root) %{_sbindir}/start-statd
@@ -382,7 +375,6 @@ fi
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/nfslock
 %{_mandir}/man8/*statd.8*
 %{_mandir}/man8/*sm-notify.8*
-%config(noreplace) %verify(not md5 mtime size) %{_var}/lib/nfs/state
 
 %files clients
 %defattr(644,root,root,755)
@@ -390,19 +382,15 @@ fi
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/nfsfs
 %attr(755,root,root) %{_sbindir}/showmount
 %{_mandir}/man8/showmount.8*
-%if %{with mount}
 %attr(4755,root,root) /sbin/mount.nfs
-%attr(4755,root,root) /sbin/mount.nfs4
 %attr(4755,root,root) /sbin/umount.nfs
+%attr(4755,root,root) /sbin/mount.nfs4
 %attr(4755,root,root) /sbin/umount.nfs4
 %{_mandir}/man8/*mount.nfs.8*
-%endif
-%if %{with nfs4}
 %attr(754,root,root) /etc/rc.d/init.d/gssd
 %attr(755,root,root) %{_sbindir}/rpc.gssd
 %{_mandir}/man8/rpc.gssd*
 %{_mandir}/man8/gssd*
-%endif
 
 %files common
 %defattr(644,root,root,755)
@@ -410,10 +398,7 @@ fi
 %attr(755,root,root) %dir %{_var}/lib/nfs/rpc_pipefs
 %attr(755,root,root) %dir %{_var}/lib/nfs/v4recovery
 %{_mandir}/man5/nfs*
-%if %{with nfs4}
 %attr(754,root,root) /etc/rc.d/init.d/idmapd
 %attr(755,root,root) %{_sbindir}/gss_*
 %attr(755,root,root) %{_sbindir}/rpc.idmapd
-%attr(660,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/idmapd.conf
 %{_mandir}/man[58]/*idmap*
-%endif
This page took 0.673013 seconds and 4 git commands to generate.