SHA256
1
0
forked from pool/nfs-utils

Accepting request 116824 from Base:System

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/116824
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nfs-utils?expand=0&rev=93
This commit is contained in:
Stephan Kulow 2012-05-09 16:18:54 +00:00 committed by Git OBS Bridge
commit c0824685b6
3 changed files with 41 additions and 34 deletions

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Wed May 2 01:42:23 UTC 2012 - nfbrown@suse.com
- nfsserver.init: remove VERSION_LIST. This is
unnecessary duplication of VERSION_PARAMS
-------------------------------------------------------------------
Wed May 2 01:34:51 UTC 2012 - nfbrown@suse.com
- nfsserver.init: Don't depend on "mount" preserving
unknown options - it doesn't any more. This can
confuse nfsd_unbind_mounts (bnc#754805)
-------------------------------------------------------------------
Sun Nov 20 06:47:14 UTC 2011 - coolo@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package nfs-utils
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 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
@ -16,11 +16,19 @@
#
Name: nfs-utils
BuildRequires: e2fsprogs-devel gcc-c++ krb5-devel libgssglue-devel >= 0.3 librpcsecgss libtirpc-devel libtool nfsidmap-devel >= 0.24 pkgconfig tcpd-devel
BuildRequires: device-mapper-devel
BuildRequires: e2fsprogs-devel
BuildRequires: gcc-c++
BuildRequires: krb5-devel
BuildRequires: libgssglue-devel >= 0.3
BuildRequires: libmount-devel
BuildRequires: librpcsecgss
BuildRequires: libtirpc-devel
BuildRequires: libtool
BuildRequires: nfsidmap-devel >= 0.24
BuildRequires: pkgconfig
BuildRequires: tcpd-devel
%if 0%{?suse_version} > 1100
BuildRequires: libevent-devel
%else
@ -28,13 +36,12 @@ BuildRequires: libevent
%endif
Url: http://nfs.sourceforge.net
Summary: Support Utilities for Kernel nfsd
Version: 1.2.5
Release: 1
Group: Productivity/Networking/NFS
License: GPL-2.0+
Group: Productivity/Networking/NFS
Version: 1.2.5
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %fillup_prereq %insserv_prereq
AutoReqProv: on
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: http://downloads.sourceforge.net/project/nfs/nfs-utils/%{version}/nfs-utils-%{version}.tar.bz2
# Download does not work:
@ -70,9 +77,8 @@ Authors:
H.J. Lu <hjl@valinux.com>
%package -n nfs-client
License: GPL-2.0+
Group: Productivity/Networking/NFS
Summary: Support Utilities for NFS
Group: Productivity/Networking/NFS
Obsoletes: nfs-utils < 1.1.0
Requires: rpcbind
PreReq: %fillup_prereq %insserv_prereq
@ -91,13 +97,13 @@ Authors:
H.J. Lu <hjl@valinux.com>
%package -n nfs-kernel-server
License: GPL-2.0+
Group: Productivity/Networking/NFS
Summary: Support Utilities for Kernel nfsd
Group: Productivity/Networking/NFS
Provides: nfs-utils = %{version}
Obsoletes: nfs-utils < 1.1.0
Conflicts: nfs-server
Requires: nfs-client = %{version} rpcbind
Requires: nfs-client = %{version}
Requires: rpcbind
PreReq: %fillup_prereq %insserv_prereq
%description -n nfs-kernel-server
@ -114,9 +120,8 @@ Authors:
H.J. Lu <hjl@valinux.com>
%package -n nfs-doc
License: GPL-2.0+
Group: Productivity/Networking/NFS
Summary: Support Utilities for NFS
Group: Productivity/Networking/NFS
Obsoletes: nfs-utils < 1.1.0
Requires: latex2html-pngicons

View File

@ -57,6 +57,7 @@ NFSD_BIN=/usr/sbin/rpc.nfsd
IDMAPD_CLIENT_STATE=/var/run/nfs/nfs-rpc.idmapd
IDMAPD_SERVER_STATE=/var/run/nfs/nfsserver-rpc.idmapd
NFSD_BIND_MOUNTS=/var/run/nfs/bind.mounts
NEED_SVCGSSD=no
NEED_IDMPAPD=no
@ -93,6 +94,7 @@ check_for_nfsdfs() {
}
nfs4_bind_mounts() {
[ -d /var/run/nfs ] || mkdir /var/run/nfs
# In case of doubt, try "man sed" :-)
cat /etc/exports |
@ -101,21 +103,17 @@ nfs4_bind_mounts() {
sort |
while read export dir; do
test -d "$export" || mkdir -p "$export"
# Fortunately, mount ignores unknown
# options, so we have an easy way to
# tag our "magic" bind mounts
mount -o bind,nfsexp "$dir" "$export"
done
mount -o bind "$dir" "$export"
echo "$dir" "$export"
done > $NFSD_BIND_MOUNTS
}
nfs4_unbind_mounts() {
cat /etc/mtab |
grep '\<nfsexp\>' |
sort -r -k2 |
sort -r -k2 $NFSD_BIND_MOUNTS |
while read src mountpoint crap; do
umount -l "$mountpoint"
done
> $NFSD_BIND_MOUNTS
}
mount_rpc_pipefs() {
@ -177,21 +175,12 @@ case "$1" in
rc_status
fi
VERSION_PARAMS=
if [ "$NFS3_SERVER_SUPPORT" != "no" ]; then
VERSION_LIST="+2 +3 "
else
VERSION_LIST="-2 -3"
if [ "$NFS3_SERVER_SUPPORT" == "no" ]; then
VERSION_PARAMS="--no-nfs-version 2 --no-nfs-version 3"
fi
if [ "$NFS4_SUPPORT" = "yes" ]; then
VERSION_LIST="$VERSION_LIST +4"
else
VERSION_LIST="$VERSION_LIST -4"
if [ "$NFS4_SUPPORT" != "yes" ]; then
VERSION_PARAMS="--no-nfs-version 4"
fi
if [ " `cat /proc/fs/nfsd/threads`" = " 0" ]; then
echo $VERSION_LIST > /proc/fs/nfsd/versions
fi
if [ -n "$NFSV4LEASETIME" -a -f /proc/fs/nfsd/nfsv4leasetime ]; then
echo "$NFSV4LEASETIME" > /proc/fs/nfsd/nfsv4leasetime
fi