diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-09-01 15:19:35 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-09-01 15:19:35 +0000 |
commit | 1585cbca51d1cee5a79d3c12088ee547670d419e (patch) | |
tree | 0ab15a763717a8caac719f66cc8c60e01630fea4 /net-fs | |
parent | Drop --oknodo usage #377765 by Michael Mair-Keimberger. (diff) | |
download | gentoo-2-1585cbca51d1cee5a79d3c12088ee547670d419e.tar.gz gentoo-2-1585cbca51d1cee5a79d3c12088ee547670d419e.tar.bz2 gentoo-2-1585cbca51d1cee5a79d3c12088ee547670d419e.zip |
Version bump #373651 by teidakankan.
(Portage version: 2.2.0_alpha51/cvs/Linux x86_64)
Diffstat (limited to 'net-fs')
-rw-r--r-- | net-fs/nfs-utils/ChangeLog | 9 | ||||
-rw-r--r-- | net-fs/nfs-utils/files/nfs-utils-1.2.4-exportfs-skip-dir.patch | 36 | ||||
-rw-r--r-- | net-fs/nfs-utils/files/nfs-utils-1.2.4-exportfs-xlog.patch | 56 | ||||
-rw-r--r-- | net-fs/nfs-utils/nfs-utils-1.2.4.ebuild | 109 |
4 files changed, 209 insertions, 1 deletions
diff --git a/net-fs/nfs-utils/ChangeLog b/net-fs/nfs-utils/ChangeLog index c03fc138e95f..59a8e3210aa6 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-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/ChangeLog,v 1.184 2011/09/01 15:18:01 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/ChangeLog,v 1.185 2011/09/01 15:19:35 vapier Exp $ + +*nfs-utils-1.2.4 (01 Sep 2011) + + 01 Sep 2011; Mike Frysinger <vapier@gentoo.org> +nfs-utils-1.2.4.ebuild, + +files/nfs-utils-1.2.4-exportfs-skip-dir.patch, + +files/nfs-utils-1.2.4-exportfs-xlog.patch: + Version bump #373651 by teidakankan. 01 Sep 2011; Mike Frysinger <vapier@gentoo.org> files/nfs.initd: Drop --oknodo usage #377765 by Michael Mair-Keimberger. diff --git a/net-fs/nfs-utils/files/nfs-utils-1.2.4-exportfs-skip-dir.patch b/net-fs/nfs-utils/files/nfs-utils-1.2.4-exportfs-skip-dir.patch new file mode 100644 index 000000000000..af14ab66aafb --- /dev/null +++ b/net-fs/nfs-utils/files/nfs-utils-1.2.4-exportfs-skip-dir.patch @@ -0,0 +1,36 @@ +From 5dc4c89b6935fcfe327b77681362319e6fd407e0 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Thu, 1 Sep 2011 11:08:04 -0400 +Subject: [PATCH] exportfs: do not warn if /etc/exports.d/ does not exist + +It isn't uncommon for /etc/exports.d/ to not exist, and imo, it's not +that big of a deal as often times, a simple /etc/exports is sufficient. +So silently skip the case where the dir is missing. + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + utils/exportfs/exportfs.c | 7 +++++-- + 1 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c +index 986a272..7432a65 100644 +--- a/utils/exportfs/exportfs.c ++++ b/utils/exportfs/exportfs.c +@@ -529,9 +529,12 @@ export_d_read(const char *dname) + + + n = scandir(dname, &namelist, NULL, versionsort); +- if (n < 0) ++ if (n < 0) { ++ if (errno == ENOENT) ++ /* Silently return */ ++ return; + xlog(L_NOTICE, "scandir %s: %s", dname, strerror(errno)); +- else if (n == 0) ++ } else if (n == 0) + return; + + for (i = 0; i < n; i++) { +-- +1.7.6 + diff --git a/net-fs/nfs-utils/files/nfs-utils-1.2.4-exportfs-xlog.patch b/net-fs/nfs-utils/files/nfs-utils-1.2.4-exportfs-xlog.patch new file mode 100644 index 000000000000..0e17e9538b08 --- /dev/null +++ b/net-fs/nfs-utils/files/nfs-utils-1.2.4-exportfs-xlog.patch @@ -0,0 +1,56 @@ +From aacec6914549f5bf4f5fb2aed0925a8a7e57b50c Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Thu, 1 Sep 2011 11:00:39 -0400 +Subject: [PATCH] exportfs: drop extra newline in xlog + +Since xlog() itself appends a newline, we don't want to add our own +otherwise we get extra in the output. + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + utils/exportfs/exportfs.c | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c +index 12e8bf1..986a272 100644 +--- a/utils/exportfs/exportfs.c ++++ b/utils/exportfs/exportfs.c +@@ -401,7 +401,7 @@ validate_export(nfs_export *exp) + int fs_has_fsid = 0; + + if (stat(path, &stb) < 0) { +- xlog(L_ERROR, "Failed to stat %s: %m \n", path); ++ xlog(L_ERROR, "Failed to stat %s: %m", path); + return; + } + if (!S_ISDIR(stb.st_mode) && !S_ISREG(stb.st_mode)) { +@@ -530,7 +530,7 @@ export_d_read(const char *dname) + + n = scandir(dname, &namelist, NULL, versionsort); + if (n < 0) +- xlog(L_NOTICE, "scandir %s: %s\n", dname, strerror(errno)); ++ xlog(L_NOTICE, "scandir %s: %s", dname, strerror(errno)); + else if (n == 0) + return; + +@@ -558,7 +558,7 @@ export_d_read(const char *dname) + + fname_len = snprintf(fname, PATH_MAX +1, "%s/%s", dname, d->d_name); + if (fname_len > PATH_MAX) { +- xlog(L_WARNING, "Too long file name: %s in %s\n", d->d_name, dname); ++ xlog(L_WARNING, "Too long file name: %s in %s", d->d_name, dname); + continue; + } + +@@ -672,7 +672,7 @@ dump(int verbose) + static void + error(nfs_export *exp, int err) + { +- xlog(L_ERROR, "%s:%s: %s\n", exp->m_client->m_hostname, ++ xlog(L_ERROR, "%s:%s: %s", exp->m_client->m_hostname, + exp->m_export.e_path, strerror(err)); + } + +-- +1.7.6 + diff --git a/net-fs/nfs-utils/nfs-utils-1.2.4.ebuild b/net-fs/nfs-utils/nfs-utils-1.2.4.ebuild new file mode 100644 index 000000000000..7ba8bbf98550 --- /dev/null +++ b/net-fs/nfs-utils/nfs-utils-1.2.4.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2011 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.2.4.ebuild,v 1.1 2011/09/01 15:19:35 vapier Exp $ + +EAPI="2" + +inherit eutils flag-o-matic multilib + +DESCRIPTION="NFS client and server daemons" +HOMEPAGE="http://linux-nfs.org/" +SRC_URI="mirror://sourceforge/nfs/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="caps ipv6 kerberos +nfsv3 +nfsv4 tcpd elibc_glibc" +RESTRICT="test" #315573 + +# 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_COMMON="tcpd? ( sys-apps/tcp-wrappers ) + caps? ( sys-libs/libcap ) + sys-libs/e2fsprogs-libs + net-nds/rpcbind + net-libs/libtirpc + nfsv4? ( + >=dev-libs/libevent-1.0b + >=net-libs/libnfsidmap-0.21-r1 + kerberos? ( + net-libs/librpcsecgss + net-libs/libgssglue + net-libs/libtirpc[kerberos] + app-crypt/mit-krb5 + ) + )" +RDEPEND="${DEPEND_COMMON} !net-nds/portmap" +# util-linux dep is to prevent man-page collision +DEPEND="${DEPEND_COMMON} + >=sys-apps/util-linux-2.12r-r7" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-1.1.4-mtab-sym.patch + epatch "${FILESDIR}"/${PN}-1.2.4-exportfs-xlog.patch + epatch "${FILESDIR}"/${PN}-1.2.4-exportfs-skip-dir.patch +} + +src_configure() { + econf \ + --with-statedir=/var/lib/nfs \ + --enable-tirpc \ + $(use_with tcpd tcp-wrappers) \ + $(use_enable nfsv3) \ + $(use_enable nfsv4) \ + $(use_enable ipv6) \ + $(use_enable caps) \ + $(use nfsv4 && use_enable kerberos gss || echo "--disable-gss") +} + +src_install() { + emake DESTDIR="${D}" install || die + + # Don't overwrite existing xtab/etab, install the original + # versions somewhere safe... more info in pkg_postinst + keepdir /var/lib/nfs/{,sm,sm.bak} + mv "${D}"/var/lib "${D}"/usr/$(get_libdir) || die + + # 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="" opt_need="" + if use nfsv4 ; then + opt_need="rpc.idmapd" + list="${list} rpc.idmapd rpc.pipefs" + use kerberos && list="${list} rpc.gssd rpc.svcgssd" + fi + for f in nfs nfsmount rpc.statd ${list} ; do + newinitd "${FILESDIR}"/${f}.initd ${f} || die "doinitd ${f}" + done + newconfd "${FILESDIR}"/nfs.confd nfs + dosed "/^NFS_NEEDED_SERVICES=/s:=.*:=\"${opt_need}\":" /etc/conf.d/nfs #234132 + + # 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_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. #30486 + local f + mkdir -p "${ROOT}"/var/lib/nfs #368505 + 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 +} |