diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-12-29 09:33:28 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-12-29 09:33:28 +0000 |
commit | 564967383915a7b9c8e3bd5443f3270b625be18c (patch) | |
tree | 1b338fe4fd2b421ac200ab3fc6ae7a30c9ba41e3 /net-fs/nfs-utils | |
parent | arm/s390/sh stable (diff) | |
download | gentoo-2-564967383915a7b9c8e3bd5443f3270b625be18c.tar.gz gentoo-2-564967383915a7b9c8e3bd5443f3270b625be18c.tar.bz2 gentoo-2-564967383915a7b9c8e3bd5443f3270b625be18c.zip |
Version bump #197336 by Francisco Javier. Tweak nfs init.d needs based on exportfs #172431. Only mount nfsd fs in nfs init.d script. Mount rpc_pipefs in rpc.idmapd and rpc.gssd after making sure the dir exists #180425 by Maurice Volaski.
(Portage version: 2.1.4_rc11)
Diffstat (limited to 'net-fs/nfs-utils')
-rw-r--r-- | net-fs/nfs-utils/ChangeLog | 12 | ||||
-rw-r--r-- | net-fs/nfs-utils/files/digest-nfs-utils-1.1.1 | 9 | ||||
-rwxr-xr-x | net-fs/nfs-utils/files/nfs.initd | 9 | ||||
-rwxr-xr-x | net-fs/nfs-utils/files/rpc.gssd.initd | 21 | ||||
-rwxr-xr-x | net-fs/nfs-utils/files/rpc.idmapd.initd | 38 | ||||
-rwxr-xr-x | net-fs/nfs-utils/files/rpc.statd.initd | 22 | ||||
-rw-r--r-- | net-fs/nfs-utils/nfs-utils-1.1.1.ebuild | 113 |
7 files changed, 150 insertions, 74 deletions
diff --git a/net-fs/nfs-utils/ChangeLog b/net-fs/nfs-utils/ChangeLog index 6ba602a764b9..0a195c2579c3 100644 --- a/net-fs/nfs-utils/ChangeLog +++ b/net-fs/nfs-utils/ChangeLog @@ -1,6 +1,16 @@ # 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.110 2007/12/29 06:57:33 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/ChangeLog,v 1.111 2007/12/29 09:33:27 vapier Exp $ + +*nfs-utils-1.1.1 (29 Dec 2007) + + 29 Dec 2007; Mike Frysinger <vapier@gentoo.org> files/nfs.initd, + files/rpc.gssd.initd, files/rpc.idmapd.initd, files/rpc.statd.initd, + +nfs-utils-1.1.1.ebuild: + Version bump #197336 by Francisco Javier. Tweak nfs init.d needs based on + exportfs #172431. Only mount nfsd fs in nfs init.d script. Mount rpc_pipefs + in rpc.idmapd and rpc.gssd after making sure the dir exists #180425 by + Maurice Volaski. 29 Dec 2007; Mike Frysinger <vapier@gentoo.org> files/rpc.statd.initd: Look up the full path of rpc.statd to avoid matching the init.d script diff --git a/net-fs/nfs-utils/files/digest-nfs-utils-1.1.1 b/net-fs/nfs-utils/files/digest-nfs-utils-1.1.1 new file mode 100644 index 000000000000..432ca9909e3a --- /dev/null +++ b/net-fs/nfs-utils/files/digest-nfs-utils-1.1.1 @@ -0,0 +1,9 @@ +MD5 d1bc62def760c79f6f77925ed2937b0b nfs-utils-1.1.1-001-xlog_segfault_fix.dif 1222 +RMD160 5635abdd46e0b24a23fd54748d1c42dc32171a21 nfs-utils-1.1.1-001-xlog_segfault_fix.dif 1222 +SHA256 dc1aecf7f989ac0564e51c6b75827429a8407402f87b594ff6d413d41b318dcb nfs-utils-1.1.1-001-xlog_segfault_fix.dif 1222 +MD5 c8dc8379fb32c8044e3c1f20dd86793d nfs-utils-1.1.1-002-svcgssd_pass_down_principal_name.dif 6533 +RMD160 a37d368c230c6e680d44978b17c807ff9c2a72eb nfs-utils-1.1.1-002-svcgssd_pass_down_principal_name.dif 6533 +SHA256 41011ec373d0ca628857738b633068681d569d547b1c80f3c448730eea518af5 nfs-utils-1.1.1-002-svcgssd_pass_down_principal_name.dif 6533 +MD5 407785488241f9db67b1874e3f36370e nfs-utils-1.1.1.tar.gz 803906 +RMD160 e56bd8f06ad116a48e79cb819dcc693ae0dc7cdd nfs-utils-1.1.1.tar.gz 803906 +SHA256 3d642d5adaf91f047396b873394f50fa8bb976e7f067a027ccebd1b319194429 nfs-utils-1.1.1.tar.gz 803906 diff --git a/net-fs/nfs-utils/files/nfs.initd b/net-fs/nfs-utils/files/nfs.initd index 0c10f385415c..886119fc620c 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.6 2007/08/16 23:35:19 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfs.initd,v 1.7 2007/12/29 09:33:28 vapier Exp $ opts="reload" @@ -17,10 +17,9 @@ smnotify=/usr/sbin/sm-notify depend() { 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" + if ! awk '!/^[[:space:]]*#/ && $2 ~ /sec=/ { exit 1 }' /etc/exports ; then + myneed="${myneed} rpc.gssd" + fi need portmap rpc.statd ${myneed} use ypbind net dns rpc.rquotad rpc.idmapd rpc.gssd after quota diff --git a/net-fs/nfs-utils/files/rpc.gssd.initd b/net-fs/nfs-utils/files/rpc.gssd.initd index 955f54c7bbdd..43dae5ab16c3 100755 --- a/net-fs/nfs-utils/files/rpc.gssd.initd +++ b/net-fs/nfs-utils/files/rpc.gssd.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/rpc.gssd.initd,v 1.4 2007/05/12 11:27:06 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.gssd.initd,v 1.5 2007/12/29 09:33:28 vapier Exp $ [ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs @@ -14,17 +14,12 @@ depend() { after quota } -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 +mount_pipefs() { + if grep -qs rpc_pipefs /proc/filesystems ; then + if ! grep -qs "rpc_pipefs /var/lib/nfs/rpc_pipefs" /proc/mounts ; then + mkdir -p /var/lib/nfs/rpc_pipefs + ebegin "Mounting RPC pipefs" + mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs eend $? fi fi @@ -38,7 +33,7 @@ start_it() { ret=$((ret + $?)) } start() { - mount_nfsd + mount_pipefs local ret=0 start_it gssd ${gssd} ${OPTS_RPC_GSSD} diff --git a/net-fs/nfs-utils/files/rpc.idmapd.initd b/net-fs/nfs-utils/files/rpc.idmapd.initd index 5bb00ee95195..6f5c5da52295 100755 --- a/net-fs/nfs-utils/files/rpc.idmapd.initd +++ b/net-fs/nfs-utils/files/rpc.idmapd.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/rpc.idmapd.initd,v 1.3 2007/05/12 11:27:06 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.idmapd.initd,v 1.4 2007/12/29 09:33:28 vapier Exp $ [ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs @@ -21,6 +21,7 @@ depend() { mount_pipefs() { if grep -qs rpc_pipefs /proc/filesystems ; then if ! grep -qs "rpc_pipefs /var/lib/nfs/rpc_pipefs" /proc/mounts ; then + mkdir -p /var/lib/nfs/rpc_pipefs ebegin "Mounting RPC pipefs" mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs eend $? @@ -28,33 +29,7 @@ mount_pipefs() { fi } -umount_pipefs() { - [ "${restarting}" = "yes" -o "${RC_CMD}" = "restart" ] && return 0 - if grep -qs "rpc_pipefs /var/lib/nfs/rpc_pipefs" /proc/mounts ; then - ebegin "Unmounting RPC pipefs" - umount /var/lib/nfs/rpc_pipefs - eend $? - fi -} - -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 -} - start() { - mount_nfsd mount_pipefs ebegin "Starting idmapd" @@ -63,16 +38,9 @@ start() { } stop() { - local ret - ebegin "Stopping idmapd" start-stop-daemon --stop --quiet --exec ${rpc_bin} - ret=$? - eend ${ret} - - umount_pipefs - - return ${ret} + eend $? } restart() { diff --git a/net-fs/nfs-utils/files/rpc.statd.initd b/net-fs/nfs-utils/files/rpc.statd.initd index 00b4f426d3f7..8a5d236e50b5 100755 --- a/net-fs/nfs-utils/files/rpc.statd.initd +++ b/net-fs/nfs-utils/files/rpc.statd.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/rpc.statd.initd,v 1.4 2007/12/29 06:57:34 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.statd.initd,v 1.5 2007/12/29 09:33:28 vapier Exp $ [ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs @@ -14,22 +14,6 @@ depend() { after quota } -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 -} - is_running() { # Don't start rpc.statd if already started by someone else ... # Don't try and kill it if it's already dead ... @@ -37,11 +21,9 @@ is_running() { } start() { - mount_nfsd - is_running && return 0 ebegin "Starting NFS statd" - start-stop-daemon --start --quiet --exec ${rpc_bin} -- ${OPTS_RPC_STATD} + start-stop-daemon --start --quiet --exec ${rpc_bin} -- --no-notify ${OPTS_RPC_STATD} eend $? } diff --git a/net-fs/nfs-utils/nfs-utils-1.1.1.ebuild b/net-fs/nfs-utils/nfs-utils-1.1.1.ebuild new file mode 100644 index 000000000000..85ce10a82958 --- /dev/null +++ b/net-fs/nfs-utils/nfs-utils-1.1.1.ebuild @@ -0,0 +1,113 @@ +# 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.1.1.ebuild,v 1.1 2007/12/29 09:33:27 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 + http://www.citi.umich.edu/projects/nfsv4/linux/nfs-utils-patches/1.1.1-1/nfs-utils-1.1.1-001-xlog_segfault_fix.dif + http://www.citi.umich.edu/projects/nfsv4/linux/nfs-utils-patches/1.1.1-1/nfs-utils-1.1.1-002-svcgssd_pass_down_principal_name.dif" + +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) +RDEPEND="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 + net-libs/libgssglue + app-crypt/mit-krb5 + )" +# util-linux dep is to prevent man-page collision +DEPEND="${RDEPEND} + >=sys-apps/util-linux-2.12r-r7" + +src_unpack() { + unpack ${P}.tar.gz + cd "${S}" + epatch "${DISTDIR}"/nfs-utils-1.1.1-001-xlog_segfault_fix.dif "${DISTDIR}"/nfs-utils-1.1.1-002-svcgssd_pass_down_principal_name.dif + sed -i \ + -e 's:libgssapi >= 0\.11:libgssglue >= 0.1:' \ + -e 's:-lgssapi:-lgssglue:' \ + configure #191746 +} + +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.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 +} |