X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=nfs-utils.spec;h=98b10a525a9c653589b154088f75048678ea1ba9;hb=cb5f82878834a1a51132145b52864af0dd9d7182;hp=8601a2910b7f93a79814e9af255c27c2f035c624;hpb=678e9da9d69fede3407e0d606461eaac9a3f8fec;p=packages%2Fnfs-utils.git diff --git a/nfs-utils.spec b/nfs-utils.spec index 8601a29..98b10a5 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -1,21 +1,21 @@ # # Conditional build: -%bcond_with krb5 # build with MIT Kerberos (+libgssglue) instead of Heimdal +%bcond_with krb5 # build with MIT Kerberos instead of Heimdal %bcond_without tirpc # use librpcsecgss instead of libtirpc -# + Summary: Kernel NFS server Summary(pl.UTF-8): Działający na poziomie jądra serwer NFS 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.2.5 -Release: 3.1 +Version: 1.3.4 +Release: 1 License: GPL v2 Group: Networking/Daemons -#Source0: http://www.kernel.org/pub/linux/utils/nfs/%{name}-%{version}.tar.bz2 +#Source0: https://www.kernel.org/pub/linux/utils/nfs/%{name}-%{version}.tar.bz2 Source0: http://downloads.sourceforge.net/nfs/%{name}-%{version}.tar.bz2 -# Source0-md5: 8395ac770720b83c5c469f88306d7765 +# Source0-md5: 2fabdadb8ff415a1eafcfb12ab1bf781 #Source1: ftp://ftp.linuxnfs.sourceforge.org/pub/nfs/nfs.doc.tar.gz Source1: nfs.doc.tar.gz # Source1-md5: ae7db9c61c5ad04f83bb99e5caed73da @@ -29,8 +29,8 @@ Source8: nfs.sysconfig Source9: nfslock.sysconfig Source10: nfsfs.sysconfig Source11: blkmapd.init -Source100: proc-fs-nfsd.mount -Source101: var-lib-nfs-rpc_pipefs.mount +Source12: sunrpc.conf +Source13: %{name}_env.sh Source102: nfsd.service Source103: nfs-blkmapd.service Source104: nfs-exportfs.service @@ -47,22 +47,23 @@ Patch1: %{name}-statdpath.patch Patch2: %{name}-subsys.patch Patch3: %{name}-union-mount.patch Patch4: %{name}-heimdal.patch -Patch5: %{name}-heimdal-kcm.patch +Patch5: %{name}-x32.patch URL: http://nfs.sourceforge.net/ BuildRequires: autoconf >= 2.59 BuildRequires: automake BuildRequires: cpp +BuildRequires: device-mapper-devel BuildRequires: keyutils-devel BuildRequires: libblkid-devel >= 1.40 -BuildRequires: libmount-devel BuildRequires: libcap-devel -BuildRequires: device-mapper-devel BuildRequires: libevent-devel >= 1.2 +BuildRequires: libmount-devel BuildRequires: libnfsidmap-devel >= 0.24 BuildRequires: libtool BuildRequires: libwrap-devel BuildRequires: pkgconfig BuildRequires: rpm-pythonprov +BuildRequires: sqlite3-devel >= 3.3 %if %{with tirpc} BuildRequires: libtirpc-devel >= 1:0.1.10-4 %else @@ -70,7 +71,6 @@ BuildRequires: librpcsecgss-devel >= 0.16 %endif %if %{with krb5} BuildRequires: krb5-devel >= 1.6 -BuildRequires: libgssglue-devel >= 0.3 %else BuildRequires: heimdal-devel >= 1.0 %endif @@ -80,14 +80,17 @@ BuildConflicts: gss_mech_spkm3-devel Requires(post): fileutils Requires(post): sed >= 4.0 Requires(post,preun): /sbin/chkconfig +Requires(post,preun,postun): systemd-units >= 38 Requires: %{name}-common = %{version}-%{release} Requires: libevent >= 2.0.14-2 Requires: rc-scripts >= 0.4.1.5 Requires: rpcbind >= 0.1.7 Requires: setup >= 2.4.6-7 +Requires: systemd-units >= 0.38 Provides: nfsdaemon Obsoletes: knfsd Obsoletes: nfs-server +Obsoletes: nfs-utils-systemd Obsoletes: nfsdaemon Conflicts: kernel < 2.2.5 Conflicts: krb5-common < 1.7 @@ -119,32 +122,21 @@ do Linux. супутні утиліти, які забезпечують набагато більшу продуктивність, ніж традиційні Linux NFS-сервери, які використовує більшість користувачів. -%package systemd -Summary: systemd units for NFS server services -Summary(pl.UTF-8): Jednostki systemd dla serwisów serwera NFS -Group: Daemons -Requires: %{name} = %{version}-%{release} -Requires: systemd -Requires: systemd-units - -%description systemd -Systemd units for NFS server services. - -%description systemd -l pl.UTF-8 -Jednostki systemd dla serwisów serwera NFS. - %package clients Summary: Clients for connecting to a remote NFS server Summary(pl.UTF-8): Klienci do łączenia się ze zdalnym serwerem NFS Group: Networking Requires(post,preun): /sbin/chkconfig +Requires(post,preun,postun): systemd-units >= 38 Requires: %{name}-common = %{version}-%{release} Requires: psmisc Requires: rc-scripts +Requires: systemd-units >= 0.38 Provides: nfs-server-clients Provides: nfsclient Obsoletes: knfsd-clients Obsoletes: nfs-server-clients +Obsoletes: nfs-utils-clients-systemd Obsoletes: nfsclient Conflicts: krb5-common < 1.7 @@ -162,34 +154,23 @@ hoście. Na przykład, showmount potrafi pokazać klientów, którzy są zamountowani na tym serwerze. Ten pakiet nie jest konieczny do zamountowania zasobów NFS. -%package clients-systemd -Summary: systemd units for NFS clients -Summary(pl.UTF-8): Jednostki systemd dla klientów NFS -Group: Daemons -Requires: %{name}-clients = %{version}-%{release} -Requires: systemd -Requires: systemd-units - -%description clients-systemd -Systemd units for NFS clients. - -%description clients-systemd -l pl.UTF-8 -Jednostki systemd dla klientów NFS. - %package common Summary: Common programs for NFS Summary(pl.UTF-8): Wspólne programy do obsługi NFS Group: Networking Requires(post,preun): /sbin/chkconfig -Provides: user(rpcstatd) -Provides: group(rpcstatd) -Provides: nfslockd -Provides: nfs-utils-lock +Requires(post,preun,postun): systemd-units >= 38 Requires: libnfsidmap >= 0.25-3 Requires: rc-scripts Requires: rpcbind >= 0.1.7 -Obsoletes: nfs-utils-lock +Requires: systemd-units >= 0.38 +Provides: group(rpcstatd) +Provides: nfs-utils-lock +Provides: nfslockd +Provides: user(rpcstatd) Obsoletes: knfsd-lock +Obsoletes: nfs-utils-common-systemd +Obsoletes: nfs-utils-lock Obsoletes: nfslockd Conflicts: mount < 2.13-0.pre7.1 @@ -199,20 +180,6 @@ Common programs for NFS. %description common -l pl.UTF-8 Wspólne programy do obsługi NFS. -%package common-systemd -Summary: systemd units for common NFS services -Summary(pl.UTF-8): Jednostki systemd dla wspólnych serwisów NFS -Group: Daemons -Requires: %{name}-common = %{version}-%{release} -Requires: systemd -Requires: systemd-units - -%description common-systemd -Systemd units for common NFS services. - -%description common-systemd -l pl.UTF-8 -Jednostki systemd dla wspólnych serwisów NFS. - %prep %setup -q -a1 %patch0 -p1 @@ -229,13 +196,13 @@ Jednostki systemd dla wspólnych serwisów NFS. %{__autoheader} %{__automake} %configure \ - --enable-nfsv3 \ --enable-nfsv4 \ --enable-nfsv41 \ --enable-gss \ --enable-mount \ --enable-mountconfig \ --enable-libmount-mount \ + --enable-svcgss \ %if %{with tirpc} --enable-tirpc \ --enable-ipv6 \ @@ -248,13 +215,14 @@ Jednostki systemd dla wspólnych serwisów NFS. --with-statduser=rpcstatd \ --with-start-statd=/sbin/start-statd \ --with-tcp-wrappers \ + --without-gssglue \ --with-krb5 %{__make} all %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{_sysconfdir}/{rc.d/init.d,sysconfig,exports.d} \ +install -d $RPM_BUILD_ROOT%{_sysconfdir}/{rc.d/init.d,sysconfig,exports.d,modprobe.d} \ $RPM_BUILD_ROOT%{_var}/lib/nfs/{rpc_pipefs,v4recovery} \ $RPM_BUILD_ROOT{%{systemdunitdir},%{_datadir}/nfs-utils} @@ -263,6 +231,7 @@ install -d $RPM_BUILD_ROOT%{_sysconfdir}/{rc.d/init.d,sysconfig,exports.d} \ install -p utils/mount/nfsmount.conf $RPM_BUILD_ROOT/etc +%{__rm} $RPM_BUILD_ROOT%{_sbindir}/start-statd cat >$RPM_BUILD_ROOT/sbin/start-statd <$RPM_BUILD_ROOT/sbin/start-statd < $RPM_BUILD_ROOT%{_var}/lib/nfs/rmtab > $RPM_BUILD_ROOT%{_sysconfdir}/exports @@ -321,6 +295,9 @@ ln -sf /bin/true $RPM_BUILD_ROOT/sbin/fsck.nfs cp -a nfs html +# make python dep optional +chmod a-x $RPM_BUILD_ROOT%{_sbindir}/{mountstats,nfsiostat} + %clean rm -rf $RPM_BUILD_ROOT @@ -329,6 +306,7 @@ rm -rf $RPM_BUILD_ROOT %service nfs restart "NFS daemon" /sbin/chkconfig --add svcgssd %service svcgssd restart "RPC svcgssd" +%systemd_post nfsd.service nfsd-exportfs.service nfsd-mountd.service svcgssd.service %preun if [ "$1" = "0" ]; then @@ -337,20 +315,9 @@ if [ "$1" = "0" ]; then %service svcgssd stop /sbin/chkconfig --del svcgssd fi +%systemd_preun nfsd.service nfsd-exportfs.service nfsd-mountd.service svcgssd.service -%post systemd -%systemd_post nfsd.service -%systemd_post nfs-exportfs.service -%systemd_post nfs-mountd.service -%systemd_post nfs-svcgssd.service - -%preun systemd -%systemd_preun nfsd.service -%systemd_preun nfs-exportfs.service -%systemd_preun nfs-mountd.service -%systemd_preun nfs-svcgssd.service - -%postun systemd +%postun %systemd_reload %post clients @@ -360,6 +327,7 @@ fi %service gssd restart "RPC gssd" /sbin/chkconfig --add blkmapd %service blkmapd restart "pNFS blkmapd" +%systemd_post blkmapd.service gssd.service %preun clients if [ "$1" = "0" ]; then @@ -370,16 +338,9 @@ if [ "$1" = "0" ]; then %service blkmapd stop /sbin/chkconfig --del blkmapd fi +%systemd_preun blkmapd.service gssd.service -%post clients-systemd -%systemd_post nfs-blkmapd.service -%systemd_post nfs-gssd.service - -%preun clients-systemd -%systemd_preun nfs-blkmapd.service -%systemd_preun nfs-gssd.service - -%postun clients-systemd +%postun clients %systemd_reload %pre common @@ -391,6 +352,7 @@ fi %service idmapd restart "RPC idmapd" /sbin/chkconfig --add nfslock %service nfslock restart "RPC statd" +%systemd_post idmapd.service nfslock.service %preun common if [ "$1" = "0" ]; then @@ -399,40 +361,36 @@ if [ "$1" = "0" ]; then %service nfslock stop /sbin/chkconfig --del nfslock fi +%systemd_preun idmapd.service nfslock.service %postun common if [ "$1" = "0" ]; then %userremove rpcstatd %groupremove rpcstatd fi - -%post common-systemd -%systemd_post nfs-idmapd.service -%systemd_post nfs-lock.service - -%preun common-systemd -%systemd_preun nfs-idmapd.service -%systemd_preun nfs-lock.service - -%postun common-systemd %systemd_reload -%triggerpostun -- %{name} < 1.2.5-4 +%triggerpostun -- %{name} < 1.2.5-7 if [ -f /etc/sysconfig/nfsd ]; then . /etc/sysconfig/nfsd - __RPCMOUNTOPTIONS= - [ -n "$MOUNTD_PORT" ] && __RPCMOUNTOPTIONS="-p $MOUNTD_PORT" + __RPCMOUNTDOPTIONS= + [ -n "$MOUNTD_PORT" ] && __RPCMOUNTDOPTIONS="-p $MOUNTD_PORT" for vers in 2 3 4 ; do __var=$(eval echo \$NFSv$vers) [ -n "$__var" -a "$__var" != "yes" ] && \ - __RPCMOUNTOPTIONS="$__RPCMOUNTOPTIONS --no-nfs-version $vers" + __RPCMOUNTDOPTIONS="$__RPCMOUNTDOPTIONS --no-nfs-version $vers" done - [ -z "$__RPCMOUNTOPTIONS" ] && exit 0 - cp -f /etc/sysconfig/nfsd{,.rpmsave} - echo >>/etc/sysconfig/nfsd - echo "# Added by rpm trigger" >>/etc/sysconfig/nfsd - echo "RPCMOUNTOPTIONS=$RPCMOUNTOPTIONS $__RPCMOUNTOPTIONS" >>/etc/sysconfig/nfsd + if [ -n "$__RPCMOUNTDOPTIONS" ]; then + %{__cp} -f /etc/sysconfig/nfsd{,.rpmsave} + echo >>/etc/sysconfig/nfsd + echo "# Added by rpm trigger" >>/etc/sysconfig/nfsd + echo "RPCMOUNTDOPTIONS=\"$RPCMOUNTOPTIONS $__RPCMOUNTDOPTIONS\"" >>/etc/sysconfig/nfsd + fi fi +%systemd_trigger nfsd.service nfsd-exportfs.service nfsd-mountd.service svcgssd.service + +%triggerpostun clients -- %{name}-clients < 1.2.5-7 +%systemd_trigger blkmapd.service gssd.service %triggerpostun common -- %{name}-lock < 1.2.5-3 if [ -f /etc/sysconfig/nfslock.rpmsave ]; then @@ -440,21 +398,24 @@ if [ -f /etc/sysconfig/nfslock.rpmsave ]; then mv -f /etc/sysconfig/nfslock.rpmsave /etc/sysconfig/nfslock fi -%triggerpostun common -- %{name}-common < 1.2.5-4 +%triggerpostun common -- %{name}-common < 1.2.5-7 if [ -f /etc/sysconfig/nfslock ]; then . /etc/sysconfig/nfslock [ -n "$STATD_PORT" ] && STATDOPTS="$STATDOPTS -p $STATD_PORT" [ -n "$STATD_OUTPORT" ] && STATDOPTS="$STATDOPTS -o $STATD_OUTPORT" - [ -z "$STATDOPTS" ] && exit 0 - cp -f /etc/sysconfig/nfslock{,.rpmsave} - echo >>/etc/sysconfig/nfslock - echo "# Added by rpm trigger" >>/etc/sysconfig/nfslock - echo "STATDOPTIONS=$STATDOPTS" >>/etc/sysconfig/nfslock + if [ -n "$STATDOPTS" ]; then + %{__cp} -f /etc/sysconfig/nfslock{,.rpmsave} + echo >>/etc/sysconfig/nfslock + echo "# Added by rpm trigger" >>/etc/sysconfig/nfslock + echo "STATDOPTIONS=\"$STATDOPTS\"" >>/etc/sysconfig/nfslock + fi fi +%systemd_trigger idmapd.service nfslock.service %files %defattr(644,root,root,755) -%doc ChangeLog README html +%doc README html +%attr(755,root,root) /sbin/nfsdcltrack %attr(755,root,root) /sbin/rpcdebug %attr(755,root,root) /sbin/fsck.nfs %attr(755,root,root) %{_sbindir}/exportfs @@ -479,6 +440,7 @@ fi %{_mandir}/man8/exportfs.8* %{_mandir}/man8/mountd.8* %{_mandir}/man8/nfsd.8* +%{_mandir}/man8/nfsdcltrack.8* %{_mandir}/man8/nfsstat.8* %{_mandir}/man8/rpc.mountd.8* %{_mandir}/man8/rpc.nfsd.8* @@ -486,12 +448,11 @@ fi %{_mandir}/man8/rpcdebug.8* %{_mandir}/man8/svcgssd.8* -%files systemd -%defattr(644,root,root,755) +%{systemdunitdir}/nfs.service %{systemdunitdir}/nfsd.service -%{systemdunitdir}/nfs-exportfs.service -%{systemdunitdir}/nfs-mountd.service -%{systemdunitdir}/nfs-svcgssd.service +%{systemdunitdir}/nfsd-exportfs.service +%{systemdunitdir}/nfsd-mountd.service +%{systemdunitdir}/svcgssd.service %{systemdunitdir}/proc-fs-nfsd.mount %attr(755,root,root) %{_datadir}/nfs-utils/nfsd.postconfig %attr(755,root,root) %{_datadir}/nfs-utils/nfsd.preconfig @@ -508,6 +469,7 @@ fi %attr(4755,root,root) /sbin/mount.nfs4 %attr(4755,root,root) /sbin/umount.nfs4 %attr(755,root,root) /sbin/blkmapd +%attr(755,root,root) /sbin/osd_login %attr(755,root,root) /sbin/rpc.gssd %attr(755,root,root) %{_sbindir}/mountstats %attr(755,root,root) %{_sbindir}/nfsiostat @@ -522,18 +484,16 @@ fi %{_mandir}/man8/showmount.8* %{_mandir}/man8/umount.nfs.8* -%files clients-systemd -%defattr(644,root,root,755) -%{systemdunitdir}/nfs-blkmapd.service -%{systemdunitdir}/nfs-gssd.service +%{systemdunitdir}/nfsfs.service +%{systemdunitdir}/blkmapd.service +%{systemdunitdir}/gssd.service %files common %defattr(644,root,root,755) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/nfslock %attr(754,root,root) /etc/rc.d/init.d/idmapd %attr(754,root,root) /etc/rc.d/init.d/nfslock -%attr(755,root,root) %{_sbindir}/gss_clnt_send_err -%attr(755,root,root) %{_sbindir}/gss_destroy_creds +%config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/sunrpc.conf %attr(755,root,root) %{_sbindir}/sm-notify %attr(755,root,root) /sbin/nfsidmap %attr(755,root,root) /sbin/rpc.idmapd @@ -555,10 +515,8 @@ fi %{_mandir}/man8/sm-notify.8* %{_mandir}/man8/statd.8* -%files common-systemd -%defattr(644,root,root,755) -%{systemdunitdir}/nfs-idmapd.service -%{systemdunitdir}/nfs-lock.service +%{systemdunitdir}/idmapd.service +%{systemdunitdir}/nfslock.service %{systemdunitdir}/var-lib-nfs-rpc_pipefs.mount %dir %{_datadir}/nfs-utils -%attr(755,root,root) %{_datadir}/nfs-utils/nfs-lock.preconfig +%attr(755,root,root) %{_datadir}/nfs-utils/nfslock.preconfig