diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-08-16 23:35:19 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-08-16 23:35:19 +0000 |
commit | 85df456eeafeca199b7119f63b509856dc581da0 (patch) | |
tree | e9591000fa997af9593109506d12a1b8ec7bf25f /net-fs/nfs-utils | |
parent | Bug #188707 - update deps for package move kworldwatch -> kworldclock. (diff) | |
download | gentoo-2-85df456eeafeca199b7119f63b509856dc581da0.tar.gz gentoo-2-85df456eeafeca199b7119f63b509856dc581da0.tar.bz2 gentoo-2-85df456eeafeca199b7119f63b509856dc581da0.zip |
Only force kerb init.d scripts when the NFSv4 mount needs it #180428 by Maurice Volaski. Load the nfs module in the nfsmount client script, not nfsd.
(Portage version: 2.1.3.6)
Diffstat (limited to 'net-fs/nfs-utils')
-rw-r--r-- | net-fs/nfs-utils/ChangeLog | 10 | ||||
-rw-r--r-- | net-fs/nfs-utils/files/digest-nfs-utils-1.0.12-r4 | 3 | ||||
-rwxr-xr-x | net-fs/nfs-utils/files/nfs.initd | 18 | ||||
-rwxr-xr-x | net-fs/nfs-utils/files/nfsmount.initd | 39 | ||||
-rw-r--r-- | net-fs/nfs-utils/nfs-utils-1.0.12-r4.ebuild | 104 |
5 files changed, 136 insertions, 38 deletions
diff --git a/net-fs/nfs-utils/ChangeLog b/net-fs/nfs-utils/ChangeLog index bc6e4e86c338..804693607fd7 100644 --- a/net-fs/nfs-utils/ChangeLog +++ b/net-fs/nfs-utils/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-fs/nfs-utils # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/ChangeLog,v 1.104 2007/05/13 21:08:32 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/ChangeLog,v 1.105 2007/08/16 23:35:19 vapier Exp $ + +*nfs-utils-1.0.12-r4 (16 Aug 2007) + + 16 Aug 2007; Mike Frysinger <vapier@gentoo.org> files/nfs.initd, + files/nfsmount.initd, +nfs-utils-1.0.12-r4.ebuild: + Only force kerb init.d scripts when the NFSv4 mount needs it #180428 by + Maurice Volaski. Load the nfs module in the nfsmount client script, not + nfsd. 13 May 2007; Mike Frysinger <vapier@gentoo.org> nfs-utils-1.1.0.ebuild: Make sure we pull in >=app-crypt/libgssapi-0.11 #178217 by Markus Ullmann. diff --git a/net-fs/nfs-utils/files/digest-nfs-utils-1.0.12-r4 b/net-fs/nfs-utils/files/digest-nfs-utils-1.0.12-r4 new file mode 100644 index 000000000000..bdb8c3cf47a5 --- /dev/null +++ b/net-fs/nfs-utils/files/digest-nfs-utils-1.0.12-r4 @@ -0,0 +1,3 @@ +MD5 acf3656cec3872deb597aa7ac13f3c3a nfs-utils-1.0.12.tar.gz 778576 +RMD160 a00dbdae386acf3f969714a1571749182c5a19a8 nfs-utils-1.0.12.tar.gz 778576 +SHA256 67d81a53d84777c733ff8a5cf5f3eed9ecda17fb9f949bc65727c1a3427af8ac nfs-utils-1.0.12.tar.gz 778576 diff --git a/net-fs/nfs-utils/files/nfs.initd b/net-fs/nfs-utils/files/nfs.initd index 558222b565fb..0c10f385415c 100755 --- a/net-fs/nfs-utils/files/nfs.initd +++ b/net-fs/nfs-utils/files/nfs.initd @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfs.initd,v 1.5 2007/05/12 11:27:06 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfs.initd,v 1.6 2007/08/16 23:35:19 vapier Exp $ opts="reload" @@ -16,15 +16,13 @@ exportfs=/usr/sbin/exportfs smnotify=/usr/sbin/sm-notify depend() { - local myneed="" myuse="" - local nfs_mounts=$(awk '!/^[[:space:]]*#/ && $3=="nfs4" { print $0 }' /etc/fstab) - if [ -n "${nfs_mounts}" ] ; then - myneed="rpc.idmapd rpc.gssd" - else - myuse="rpc.idmapd rpc.gssd" - fi - use ypbind net dns rpc.rquotad ${myuse} + local myneed="" + awk '!/^[[:space:]]*#/ && $3 == "nfs4" { exit ($4 ~ /sec=krb/ ? 1 : 2) }' /etc/fstab + local ret=$? + [ ${ret} -ne 0 ] && myneed="${myneed} rpc.idmapd" + [ ${ret} -eq 1 ] && myneed="${myneed} rpc.gssd" need portmap rpc.statd ${myneed} + use ypbind net dns rpc.rquotad rpc.idmapd rpc.gssd after quota } @@ -44,7 +42,7 @@ waitfor_exportfs() { mount_nfsd() { # Make sure nfs support is loaded in the kernel #64709 if [ -e /proc/modules ] && ! grep -qs nfsd /proc/filesystems ; then - modprobe nfsd &> /dev/null + modprobe -q nfsd fi # This is the new "kernel 2.6 way" to handle the exports file diff --git a/net-fs/nfs-utils/files/nfsmount.initd b/net-fs/nfs-utils/files/nfsmount.initd index 7386f8c81ee6..d6a7191f5133 100755 --- a/net-fs/nfs-utils/files/nfsmount.initd +++ b/net-fs/nfs-utils/files/nfsmount.initd @@ -1,47 +1,32 @@ #!/sbin/runscript # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfsmount.initd,v 1.3 2007/05/12 11:27:06 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfsmount.initd,v 1.4 2007/08/16 23:35:19 vapier Exp $ [ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs depend() { - local myneed="" myuse="" - local nfs_mounts=$(awk '!/^[[:space:]]*#/ && $3=="nfs4" { print $0 }' /etc/fstab) - if [ -n "${nfs_mounts}" ] ; then - myneed="rpc.idmapd rpc.gssd" - else - myuse="rpc.idmapd rpc.gssd" - fi + local myneed="" + awk '!/^[[:space:]]*#/ && $3 == "nfs4" { exit ($4 ~ /sec=krb/ ? 1 : 2) }' /etc/fstab + local ret=$? + [ ${ret} -ne 0 ] && myneed="${myneed} rpc.idmapd" + [ ${ret} -eq 1 ] && myneed="${myneed} rpc.gssd" need net portmap rpc.statd ${myneed} - use ypbind dns ${myuse} -} - -mount_nfsd() { - # Make sure nfs support is loaded in the kernel #64709 - if [ -e /proc/modules ] && ! grep -qs nfsd /proc/filesystems ; then - modprobe nfsd &> /dev/null - fi - - # This is the new "kernel 2.6 way" to handle the exports file - if grep -qs nfsd /proc/filesystems ; then - if ! grep -qs "nfsd /proc/fs/nfs" /proc/mounts ; then - ebegin "Mounting nfsd filesystem in /proc" - mount -t nfsd -o nodev,noexec,nosuid nfsd /proc/fs/nfs - eend $? - fi - fi + use ypbind dns rpc.idmapd rpc.gssd } start() { - mount_nfsd - if [ -x /usr/sbin/sm-notify ] ; then ebegin "Starting NFS sm-notify" /usr/sbin/sm-notify ${OPTS_SMNOTIFY} eend $? fi + # Make sure nfs support is loaded in the kernel #64709 + if [ -e /proc/modules ] && ! grep -qs nfsd /proc/filesystems ; then + modprobe -q nfs + fi + ebegin "Mounting NFS filesystems" mount -a -t nfs,nfs4 eend $? diff --git a/net-fs/nfs-utils/nfs-utils-1.0.12-r4.ebuild b/net-fs/nfs-utils/nfs-utils-1.0.12-r4.ebuild new file mode 100644 index 000000000000..64c64e2a5685 --- /dev/null +++ b/net-fs/nfs-utils/nfs-utils-1.0.12-r4.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/nfs-utils-1.0.12-r4.ebuild,v 1.1 2007/08/16 23:35:19 vapier Exp $ + +inherit eutils flag-o-matic multilib + +DESCRIPTION="NFS client and server daemons" +HOMEPAGE="http://nfs.sourceforge.net/" +SRC_URI="mirror://sourceforge/nfs/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="nonfsv4 tcpd kerberos" + +# kth-krb doesn't provide the right include +# files, and nfs-utils doesn't build against heimdal either, +# so don't depend on virtual/krb. +# (04 Feb 2005 agriffis) +DEPEND="tcpd? ( sys-apps/tcp-wrappers ) + >=net-nds/portmap-5b-r6 + !nonfsv4? ( + >=dev-libs/libevent-1.0b + >=net-libs/libnfsidmap-0.16 + ) + kerberos? ( + net-libs/librpcsecgss + app-crypt/mit-krb5 + )" + +src_unpack() { + unpack ${P}.tar.gz + cd "${S}" + epatch "${FILESDIR}"/${P}-mountd-memleak.patch #172014 + #epatch "${DISTDIR}"/nfs-utils-${PV}-CITI_NFS4_ALL-1.dif +} + +src_compile() { + econf \ + --mandir=/usr/share/man \ + --with-statedir=/var/lib/nfs \ + --disable-rquotad \ + --enable-nfsv3 \ + --enable-secure-statd \ + $(use_with tcpd tcp-wrappers) \ + $(use_enable !nonfsv4 nfsv4) \ + $(use_enable kerberos gss) \ + || die "Configure failed" + + emake || die "Failed to compile" +} + +src_install() { + emake DESTDIR="${D}" install || die + + # Don't overwrite existing xtab/etab, install the original + # versions somewhere safe... more info in pkg_postinst + dodir /usr/lib/nfs + keepdir /var/lib/nfs/{sm,sm.bak} + mv "${D}"/var/lib/nfs/* "${D}"/usr/lib/nfs + keepdir /var/lib/nfs + + # Install some client-side binaries in /sbin + dodir /sbin + mv "${D}"/usr/sbin/rpc.{lockd,statd} "${D}"/sbin/ || die + + dodoc ChangeLog README + docinto linux-nfs ; dodoc linux-nfs/* + + insinto /etc + doins "${FILESDIR}"/exports + + local f list="" + use !nonfsv4 && list="${list} rpc.idmapd" + use kerberos && list="${list} rpc.gssd" + for f in nfs nfsmount rpc.statd ${list} ; do + newinitd "${FILESDIR}"/${f}.initd ${f} || die "doinitd ${f}" + done + newconfd "${FILESDIR}"/nfs.confd nfs + use !nonfsv4 && doins utils/idmapd/idmapd.conf + + # uClibc doesn't provide rpcgen like glibc, so lets steal it from nfs-utils + if ! use elibc_glibc ; then + dobin tools/rpcgen/rpcgen || die "rpcgen" + newdoc tools/rpcgen/README README.rpcgen + fi +} + +pkg_preinst() { + [[ -s ${ROOT}/etc/exports ]] && rm -f "${D}"/etc/exports +} + +pkg_postinst() { + # Install default xtab and friends if there's none existing. + # In src_install we put them in /usr/lib/nfs for safe-keeping, but + # the daemons actually use the files in /var/lib/nfs. This fixes + # bug 30486 + local f + for f in "${ROOT}"/usr/$(get_libdir)/nfs/*; do + [[ -e ${ROOT}/var/lib/nfs/${f##*/} ]] && continue + einfo "Copying default ${f##*/} from /usr/$(get_libdir)/nfs to /var/lib/nfs" + cp -pPR "${f}" "${ROOT}"/var/lib/nfs/ + done +} |