diff options
author | Roy Marples <uberlord@gentoo.org> | 2007-04-02 12:28:30 +0000 |
---|---|---|
committer | Roy Marples <uberlord@gentoo.org> | 2007-04-02 12:28:30 +0000 |
commit | b73431d3d1b56d71832b5b933533895e3d70f794 (patch) | |
tree | dedf0132211c3702518067316d44288886007ac2 /net-fs | |
parent | pull in libselinux for USE=selinux now (diff) | |
download | gentoo-2-b73431d3d1b56d71832b5b933533895e3d70f794.tar.gz gentoo-2-b73431d3d1b56d71832b5b933533895e3d70f794.tar.bz2 gentoo-2-b73431d3d1b56d71832b5b933533895e3d70f794.zip |
Remove some bashisms and support baselayout-2 restart option.
(Portage version: 2.1.2.3)
Diffstat (limited to 'net-fs')
-rw-r--r-- | net-fs/nfs-utils/ChangeLog | 9 | ||||
-rw-r--r-- | net-fs/nfs-utils/files/digest-nfs-utils-1.0.12-r3 | 3 | ||||
-rwxr-xr-x | net-fs/nfs-utils/files/nfs.initd | 12 | ||||
-rwxr-xr-x | net-fs/nfs-utils/files/rpc.gssd.initd | 8 | ||||
-rwxr-xr-x | net-fs/nfs-utils/files/rpc.idmapd.initd | 6 | ||||
-rwxr-xr-x | net-fs/nfs-utils/files/rpc.statd.initd | 4 | ||||
-rw-r--r-- | net-fs/nfs-utils/nfs-utils-1.0.12-r3.ebuild | 109 |
7 files changed, 135 insertions, 16 deletions
diff --git a/net-fs/nfs-utils/ChangeLog b/net-fs/nfs-utils/ChangeLog index 5ed83e9bf0b2..2edab00533e3 100644 --- a/net-fs/nfs-utils/ChangeLog +++ b/net-fs/nfs-utils/ChangeLog @@ -1,6 +1,13 @@ # 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.98 2007/03/27 18:42:11 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/ChangeLog,v 1.99 2007/04/02 12:28:30 uberlord Exp $ + +*nfs-utils-1.0.12-r3 (02 Apr 2007) + + 02 Apr 2007; Roy Marples <uberlord@gentoo.org> files/nfs.initd, + files/rpc.gssd.initd, files/rpc.idmapd.initd, files/rpc.statd.initd, + +nfs-utils-1.0.12-r3.ebuild: + Remove some bashisms and support baselayout-2 restart option. 27 Mar 2007; Chris Gianelloni <wolf31o2@gentoo.org> nfs-utils-1.0.12.ebuild: diff --git a/net-fs/nfs-utils/files/digest-nfs-utils-1.0.12-r3 b/net-fs/nfs-utils/files/digest-nfs-utils-1.0.12-r3 new file mode 100644 index 000000000000..bdb8c3cf47a5 --- /dev/null +++ b/net-fs/nfs-utils/files/digest-nfs-utils-1.0.12-r3 @@ -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 bb9ea0650440..50fc505d3b9f 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.1 2007/03/25 12:30:52 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfs.initd,v 1.2 2007/04/02 12:28:30 uberlord Exp $ #--------------------------------------------------------------------------- # This script starts/stops the following @@ -44,7 +44,7 @@ mkdir_nfsdirs() { waitfor_exportfs() { local pid=$1 - ( sleep ${EXPORTFS_TIMEOUT:-30}; kill -9 $pid &>/dev/null ) & + ( sleep ${EXPORTFS_TIMEOUT:-30}; kill -9 $pid 2>/dev/null ) & wait $1 } @@ -53,7 +53,7 @@ start_it() { shift "$@" eend $? - ((ret+=$?)) + ret=$((${ret} + $?)) } start() { # Make sure nfs support is loaded in the kernel #64709 @@ -97,13 +97,13 @@ stop() { ebegin "Stopping NFS mountd" start-stop-daemon --stop --quiet --oknodo --exec ${mountd} eend $? - ((ret+=$?)) + ret=$((${ret} + $?)) # nfsd sets its process name to [nfsd] so don't look for $nfsd ebegin "Stopping NFS daemon" start-stop-daemon --stop --quiet --oknodo --name nfsd --user root --signal 2 eend $? - ((ret+=$?)) + ret=$((${ret} + $?)) # When restarting the NFS server, running "exportfs -ua" probably # isn't what the user wants. Running it causes all entries listed @@ -118,7 +118,7 @@ stop() { # then "exportfs -r" will reread the xtab, and all the current # clients will be able to resume NFS activity, *without* needing # to umount/(re)mount the filesystem. - if [ "${restarting}" = no ] ; then + if [ "${restarting}" = no -o "${RC_CMD}" = "restart" ] ; then ebegin "Unexporting NFS directories" # Exportfs likes to hang if networking isn't working. # If that's the case, then try to kill it so the diff --git a/net-fs/nfs-utils/files/rpc.gssd.initd b/net-fs/nfs-utils/files/rpc.gssd.initd index bafe1bc773c3..c9cfa5219b36 100755 --- a/net-fs/nfs-utils/files/rpc.gssd.initd +++ b/net-fs/nfs-utils/files/rpc.gssd.initd @@ -1,9 +1,9 @@ #!/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.1 2007/03/25 12:30:52 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.gssd.initd,v 1.2 2007/04/02 12:28:30 uberlord Exp $ -[ -e /etc/conf.d/nfs ] && source /etc/conf.d/nfs +[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs gssd=/usr/sbin/rpc.gssd svcgssd=/usr/sbin/rpc.svcgssd @@ -19,7 +19,7 @@ start_it() { shift "$@" eend $? - ((ret+=$?)) + ret=$((${ret} + $?)) } start() { local ret=0 @@ -32,7 +32,7 @@ stop_it() { ebegin "Stopping $1" start-stop-daemon --stop --quiet --exec $2 eend $? - ((ret+=$?)) + ret=$((${ret} + $?)) } stop() { local ret=0 diff --git a/net-fs/nfs-utils/files/rpc.idmapd.initd b/net-fs/nfs-utils/files/rpc.idmapd.initd index 2f8a92bf32b1..49a323aa981e 100755 --- a/net-fs/nfs-utils/files/rpc.idmapd.initd +++ b/net-fs/nfs-utils/files/rpc.idmapd.initd @@ -1,9 +1,9 @@ #!/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.1 2007/03/25 12:30:52 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.idmapd.initd,v 1.2 2007/04/02 12:28:30 uberlord Exp $ -[ -e /etc/conf.d/nfs ] && source /etc/conf.d/nfs +[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs rpc_bin=/usr/sbin/rpc.idmapd @@ -29,7 +29,7 @@ mount_pipefs() { } umount_pipefs() { - [ "${restarting}" = "yes" ] && return 0 + [ "${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 diff --git a/net-fs/nfs-utils/files/rpc.statd.initd b/net-fs/nfs-utils/files/rpc.statd.initd index 0dac37b80478..59ba10055958 100755 --- a/net-fs/nfs-utils/files/rpc.statd.initd +++ b/net-fs/nfs-utils/files/rpc.statd.initd @@ -1,9 +1,9 @@ #!/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.1 2007/03/25 12:30:52 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.statd.initd,v 1.2 2007/04/02 12:28:30 uberlord Exp $ -[ -e /etc/conf.d/nfs ] && source /etc/conf.d/nfs +[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs rpc_bin=/sbin/rpc.statd rpc_pid=/var/run/rpc.statd.pid diff --git a/net-fs/nfs-utils/nfs-utils-1.0.12-r3.ebuild b/net-fs/nfs-utils/nfs-utils-1.0.12-r3.ebuild new file mode 100644 index 000000000000..35063b08a683 --- /dev/null +++ b/net-fs/nfs-utils/nfs-utils-1.0.12-r3.ebuild @@ -0,0 +1,109 @@ +# 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-r3.ebuild,v 1.1 2007/04/02 12:28:30 uberlord 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) +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 + app-crypt/mit-krb5 + )" +DEPEND="${RDEPEND}" + +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 + for f in nfs nfsmount rpc.{gssd,idmapd,statd} ; do + newinitd "${FILESDIR}"/${f}.initd ${f} || die "doinitd ${f}" + done + newconfd "${FILESDIR}"/nfs.confd nfs + + if use !nonfsv4 ; then + doins utils/idmapd/idmapd.conf + for f in rpc.gssd rpc.idmapd ; do + newinitd "${FILESDIR}"/${f}.initd ${f} || die "doinitd ${f}" + done + fi + + # 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 +} |