diff --git a/net-fs/nfs-utils/ChangeLog b/net-fs/nfs-utils/ChangeLog index 67ee3185..fe8be919 100644 --- a/net-fs/nfs-utils/ChangeLog +++ b/net-fs/nfs-utils/ChangeLog @@ -2,6 +2,13 @@ # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 # $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/ChangeLog,v 1.215 2013/04/13 20:02:02 vapier Exp $ +*nfs-utils-1.2.9 (21 Nov 2013) + + 21 Nov 2013; Mario Fetka +nfs-utils-1.2.9.ebuild, + -files/0001-mountd-Fix-is_subdirectory-again.patch, + -files/0001-statd-exit-if-a-statd-is-already-running.patch: + update with heimdal fix + *nfs-utils-1.2.8-r1 (16 Aug 2013) 16 Aug 2013; Mario Fetka diff --git a/net-fs/nfs-utils/Manifest b/net-fs/nfs-utils/Manifest index 1e83471d..916bb6af 100644 --- a/net-fs/nfs-utils/Manifest +++ b/net-fs/nfs-utils/Manifest @@ -1,5 +1,3 @@ -AUX 0001-mountd-Fix-is_subdirectory-again.patch 2704 SHA256 1c1204dc5fc62debb8cc66ca299a741a3d8e515f480ff7aecb4ad72819658de7 SHA512 59a29c72096357fc35e805f0a1e443c7a6ee9b07c96ed85481b1101a6090311937b39f45aefa60325f968a5c7d2bc5550c2a43f2f54bd8522b615b84bdf71c86 WHIRLPOOL fc0c806c3c68f6d215f24a418b92b94188e23cc9249a8e0cea6ec22a1139747ab05cccab253bddff6787a15301225792658dadc8d6d1c4c6aba5543ea893d600 -AUX 0001-statd-exit-if-a-statd-is-already-running.patch 3593 SHA256 d3e402c73b204d4b5e161563005269318dad6e992792c902da76ff8368b872cb SHA512 e04d451618d6f6197dc0692844cc115fec93575525cd0569d582f9278007e2dbec692ef46065c675de13d608e034161f39a60d46766873933d05d18b94633f6c WHIRLPOOL fdf6de89a5ae3f26c1091f8b314684ba0cac3aab68731d3d56e5a909a2211b8f84b8212fbf0f7179427f98bdb102b9bb3d1c3828e66e283bc70abddc9ef3964d AUX exports 66 SHA256 5d6356df546682e2f1a87131d1bb67de9b1f9a34d3a5742343dc64e890cf71d5 SHA512 fd8052dc8e17eccb0bb1443f341c97ec7c9dac5824294cadf486d91475bc728d4bb69300034b528a690707520590f6675ee371f92e9838afc8ed88092ee0f220 WHIRLPOOL 7cc6b59c1f7013a0ad98518623b03d1cba784ecaf6d6a085b85282192c6f41ac1c649a39dc6e1b42ff38a571c00a85aed6e04ea57d6339a072cc4f2c41d5d74e AUX nfs-utils-1.1.4-mtab-sym.patch 1020 SHA256 0232799d085151649a1eb1f31644105de7e5cfba888794354005499a0db277c3 SHA512 1cd916028a8515772f05ef63832d73a09e9720055aedc9e2e4ce3a08ce1820948700a4f00ca9c4ee684880f18e67aca888dd857fc7931d923021ba50964be998 WHIRLPOOL c16ecee3228ad4522cf4ede1d05ca50cece3910955314c96eb88a61cfe07b7f6a95c42bb15a7f7f9fd211fa62cdcbb02925e68702d5066338b4543baf56fb2df AUX nfs-utils-1.2.7-heimdal.patch 6643 SHA256 f8845cb5471313516ebd389a1fb692b984f5f9f663923488a539d8adec8de247 SHA512 dea96554579dcb1b2404724ddcf68a27034cef7f5a0c3d4b6838e46abfcd9a05af3cd56c28f0878f1ec777ea0a2c43fb7c795adf74aa2080c8feb26e7e83d938 WHIRLPOOL cd783ee2b91332753abbf8de8125f6cebd36dd4852ce804d8822fd5cfc28d6d4f608634fcd00b4a30be5aeba9be97c2c122e3beb1d2961182f1bfce8c652e7d2 @@ -17,6 +15,8 @@ AUX rpc.pipefs.initd 822 SHA256 6503951b3c200ccf3f46396f7b9274f0a565807f7f6e561c AUX rpc.statd.initd 818 SHA256 0c7bd35a14da6c0c2577f09ae82a41ddb693a88157eeaf80684616f79be6c304 SHA512 e7c85a5437f65c82bcab6818fa3aa27fdf746ce745b41987d0e59d620b59529b7a8613aad59e831a5b46fee1fe4410d6982a3e76e7834c79675c4c271b0db3b0 WHIRLPOOL b3c6c4147634f3db39f0a50307a7433e0d28f8cf2d89452d90f9db1b56d55c41add68336640a442508ebfc75270dd627154af787b00f603659a5c730ab724340 AUX rpc.svcgssd.initd 584 SHA256 f1c460d8b0e91e54a551397d755135d05a3728d81de596535bf8bda074455677 SHA512 844e8d41a6a8b632d98585724aca2e9ae596f72c67e17e4e8fb9eb81e6c58eed9e10cf8b2a96896dba8fd1efaa95d846954e712bdf3402a847ae17742dae2157 WHIRLPOOL f1e4a38168c112ce07e40432527a77e17aa80b4a37aeccb8b01a9e655f0437e67e4c12998d62ea7c162319cca956c18edd3cb3c64cfd8e17370782ea30fef677 DIST nfs-utils-1.2.8.tar.bz2 2747577 SHA256 1cc8f02a633eddbf0a1d93421f331479c4cdab4c5ab33b8bf8c7c369f9156ac6 SHA512 abe13f37dccb40258ac2f654143e540b9ac8c41ca10fe88f104ebb558334d41c0e31220dbae0122836e43236cac763fbcfc1d5bd708aca3b282152ac3ac7213b WHIRLPOOL 95bc97e572aebae4b99d20b67845e081d75f4126fc74e9f081a6bc1a913796f5370befb5a21c7626668bd430b8671c4732ddfbf319e6a2ef8df8e15f4ef213a1 +DIST nfs-utils-1.2.9.tar.bz2 774112 SHA256 90b76d5692a520b74273e607a4fd69df4cc35f65e242e22e2bc61b58759722f3 SHA512 c71f986a7e8f38492f8411540b32fef904f689b45b831e0e3c193628085d09742c6352dc42d6d374b8ded12e2b54f8fb3c8de66695a36cf038fc4afa5c29879e WHIRLPOOL 22e86859e9bf7a9a298c91f73a8afea63aa1e39753062ff664a17601d311d62f8f0efed8a0c5271751b53bb46cfc91bf721ca852dc1e744e4bb51f321a34c119 EBUILD nfs-utils-1.2.8-r1.ebuild 4073 SHA256 d9ae4b31ed2f31425242bac2328d7a8cfad06a36ab22196992abf321e4f38461 SHA512 14a9574d6ef7818c355ee26217170d25cdbc954400beca795b6296f056d318888500c7e3c578cc20714015d39bde0c9346ad177cd78aeed13089a202be7213b0 WHIRLPOOL 99a2fb0b205cbada83c2fa3885c48a2797fff907f58cc2ac75a3e46a111c48f8a382834b8c88dd3d147fca6e975e34c18e415494da42f37f46db4222ab720a3c -MISC ChangeLog 34518 SHA256 0d7eab61ac8b2d7554d965dae2e2a58aff183a076fecca92762030e04aead869 SHA512 9507c212bdf53c71a5ad8160252a21f75255c7a776aa4ef314795819d861e2beb9864e3b7ea297f4980e68fd8ce22c413c37f7c3a52c5509bb4027fafc872e81 WHIRLPOOL 7da356270d943590034bade800eb09928d12731c3318eecd1283976eb4895e579107bca170fc88acf847331b4739d84e0a4b20a64a44d7b4932643c4ff08fb12 +EBUILD nfs-utils-1.2.9.ebuild 4081 SHA256 7448469ae272a5fb3b95890c84da99932508a39d77c7a92ff8cc69248cf0bc73 SHA512 6b2bb4f998baa30bbe9fa7685273a88359f170e0f8274612e6fa64c31cfa72f31b0f880f97c6533fdab52f0b9e418d966754e189cd6f43e95fe1f0ec4fb95e0e WHIRLPOOL bcbf179803f737e0ea64375fadaa9395a666902fa173abacff68a40bb1a654cc4ca8f38d426dcb4f0efe69223b41fcf153ab753123679d25743b7af51ac97f30 +MISC ChangeLog 34769 SHA256 bcf310f6c19621d28281cff1b56b40083db0a0910b0746cb4cedc156d4fa235f SHA512 d9e25f6ad3a93d50e844b2f3c6d80b3a2a9b0133b9434ed996422953129dd3e2bd40123ccca39ca9b7af8e32dd6cb0e7da73067f0c9f275ffbaf5faeb3f81ffc WHIRLPOOL 96de1152714628daf5d29739c50ece8f727e89bdf939f462b303638c4c885039588e3559c7c62cff966413d27b8384a9ad2f28d21d4362be70a4f6cebe504303 MISC metadata.xml 668 SHA256 d9ecc29c31ebf779ec222513db190cc0e9d0737f806aea26913d097b09bbfa47 SHA512 2b269153829d1d8df6e97871814479af8fbe18a48cf0b6a33947212264875a4002feda4163b465b4a67e253e5f27e47badc53d414ebb9f3281253f813fa1dacd WHIRLPOOL a53c14f8e6f7cce4f75a7fda60d8b9f96a57eb3a877470906fa1c40befcd9791411934e7ab610ce612f6d42d4d953e0a2a78ffc9e21e9b98328a395c4de7daa8 diff --git a/net-fs/nfs-utils/files/0001-mountd-Fix-is_subdirectory-again.patch b/net-fs/nfs-utils/files/0001-mountd-Fix-is_subdirectory-again.patch deleted file mode 100644 index e6f372b7..00000000 --- a/net-fs/nfs-utils/files/0001-mountd-Fix-is_subdirectory-again.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 23d3980b6cfea4e9056d9b7b81e48b4fefc645e0 Mon Sep 17 00:00:00 2001 -From: NeilBrown -Date: Tue, 7 May 2013 11:46:18 -0400 -Subject: [PATCH] mountd: Fix is_subdirectory again - -The problem was that is_subdirectory() would also succeed if the two -directories were the same. This is needed for path_matches() which -needs to see if the child is same-or-descendant. - -So this patch rearranges path_matches() to do the "are they the same" -test itself and only bother with is_subdirectory() if it they are not -the same. - -So now is_subdirectory() can be strict, and so can be usable for -subexport(), which needs a strong 'in subdirectory - not the same' test. - -Acked-by: J. Bruce Fields -Signed-off-by: NeilBrown -Signed-off-by: Steve Dickson ---- - utils/mountd/cache.c | 24 ++++++++++++++---------- - 1 file changed, 14 insertions(+), 10 deletions(-) - -diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c -index 737927c..517aa62 100644 ---- a/utils/mountd/cache.c -+++ b/utils/mountd/cache.c -@@ -347,20 +347,26 @@ static char *next_mnt(void **v, char *p) - - static int is_subdirectory(char *child, char *parent) - { -+ /* Check is child is strictly a subdirectory of -+ * parent or a more distant descendant. -+ */ - size_t l = strlen(parent); - -- if (strcmp(parent, "/") == 0) -+ if (strcmp(parent, "/") == 0 && child[1] != 0) - return 1; - -- return strcmp(child, parent) == 0 -- || (strncmp(child, parent, l) == 0 && child[l] == '/'); -+ return (strncmp(child, parent, l) == 0 && child[l] == '/'); - } - - static int path_matches(nfs_export *exp, char *path) - { -- if (exp->m_export.e_flags & NFSEXP_CROSSMOUNT) -- return is_subdirectory(path, exp->m_export.e_path); -- return strcmp(path, exp->m_export.e_path) == 0; -+ /* Does the path match the export? I.e. is it an -+ * exact match, or does the export have CROSSMOUNT, and path -+ * is a descendant? -+ */ -+ return strcmp(path, exp->m_export.e_path) == 0 -+ || ((exp->m_export.e_flags & NFSEXP_CROSSMOUNT) -+ && is_subdirectory(path, exp->m_export.e_path)); - } - - static int -@@ -369,15 +375,13 @@ export_matches(nfs_export *exp, char *dom, char *path, struct addrinfo *ai) - return path_matches(exp, path) && client_matches(exp, dom, ai); - } - --/* True iff e1 is a child of e2 and e2 has crossmnt set: */ -+/* True iff e1 is a child of e2 (or descendant) and e2 has crossmnt set: */ - static bool subexport(struct exportent *e1, struct exportent *e2) - { - char *p1 = e1->e_path, *p2 = e2->e_path; -- size_t l2 = strlen(p2); - - return e2->e_flags & NFSEXP_CROSSMOUNT -- && strncmp(p1, p2, l2) == 0 -- && p1[l2] == '/'; -+ && is_subdirectory(p1, p2); - } - - struct parsed_fsid { --- -1.8.3.2 - diff --git a/net-fs/nfs-utils/files/0001-statd-exit-if-a-statd-is-already-running.patch b/net-fs/nfs-utils/files/0001-statd-exit-if-a-statd-is-already-running.patch deleted file mode 100644 index 4e8be2fd..00000000 --- a/net-fs/nfs-utils/files/0001-statd-exit-if-a-statd-is-already-running.patch +++ /dev/null @@ -1,126 +0,0 @@ -From 342446a4a624d4ee8254af859bb7f1de6d268679 Mon Sep 17 00:00:00 2001 -From: Weston Andros Adamson -Date: Tue, 7 May 2013 11:25:29 -0400 -Subject: [PATCH] statd: exit if a statd is already running - -Moves nfs_probe_statd from mount to nfs support lib to share with statd. - -Acked-by: Chuck Lever -Signed-off-by: Weston Andros Adamson -Signed-off-by: Steve Dickson ---- - support/include/nfsrpc.h | 5 +++++ - support/nfs/getport.c | 22 ++++++++++++++++++++++ - utils/mount/network.c | 17 ----------------- - utils/statd/statd.c | 7 +++++++ - 4 files changed, 34 insertions(+), 17 deletions(-) - -diff --git a/support/include/nfsrpc.h b/support/include/nfsrpc.h -index a0b80e1..1bfae7a 100644 ---- a/support/include/nfsrpc.h -+++ b/support/include/nfsrpc.h -@@ -156,6 +156,11 @@ extern unsigned long nfs_pmap_getport(const struct sockaddr_in *, - const struct timeval *); - - /* -+ * Use nfs_pmap_getport to see if statd is running locally -+ */ -+extern int nfs_probe_statd(void); -+ -+/* - * Contact a remote RPC service to discover whether it is responding - * to requests. - */ -diff --git a/support/nfs/getport.c b/support/nfs/getport.c -index 3331ad4..081594c 100644 ---- a/support/nfs/getport.c -+++ b/support/nfs/getport.c -@@ -1102,3 +1102,25 @@ unsigned long nfs_pmap_getport(const struct sockaddr_in *sin, - - return port; - } -+ -+static const char *nfs_ns_pgmtbl[] = { -+ "status", -+ NULL, -+}; -+ -+/* -+ * nfs_probe_statd - use nfs_pmap_getport to see if statd is running locally -+ * -+ * Returns non-zero if statd is running locally. -+ */ -+int nfs_probe_statd(void) -+{ -+ struct sockaddr_in addr = { -+ .sin_family = AF_INET, -+ .sin_addr.s_addr = htonl(INADDR_LOOPBACK), -+ }; -+ rpcprog_t program = nfs_getrpcbyname(NSMPROG, nfs_ns_pgmtbl); -+ -+ return nfs_getport_ping((struct sockaddr *)(char *)&addr, sizeof(addr), -+ program, (rpcvers_t)1, IPPROTO_UDP); -+} -diff --git a/utils/mount/network.c b/utils/mount/network.c -index 4be48cd..e2cdcaf 100644 ---- a/utils/mount/network.c -+++ b/utils/mount/network.c -@@ -65,11 +65,6 @@ extern int nfs_mount_data_version; - extern char *progname; - extern int verbose; - --static const char *nfs_ns_pgmtbl[] = { -- "status", -- NULL, --}; -- - static const char *nfs_mnt_pgmtbl[] = { - "mount", - "mountd", -@@ -761,18 +756,6 @@ int probe_bothports(clnt_addr_t *mnt_server, clnt_addr_t *nfs_server) - &nfs_server->pmap); - } - --static int nfs_probe_statd(void) --{ -- struct sockaddr_in addr = { -- .sin_family = AF_INET, -- .sin_addr.s_addr = htonl(INADDR_LOOPBACK), -- }; -- rpcprog_t program = nfs_getrpcbyname(NSMPROG, nfs_ns_pgmtbl); -- -- return nfs_getport_ping(SAFE_SOCKADDR(&addr), sizeof(addr), -- program, (rpcvers_t)1, IPPROTO_UDP); --} -- - /** - * start_statd - attempt to start rpc.statd - * -diff --git a/utils/statd/statd.c b/utils/statd/statd.c -index 652546c..8c51bcc 100644 ---- a/utils/statd/statd.c -+++ b/utils/statd/statd.c -@@ -28,6 +28,7 @@ - - #include "statd.h" - #include "nfslib.h" -+#include "nfsrpc.h" - #include "nsm.h" - - /* Socket operations */ -@@ -237,6 +238,12 @@ int main (int argc, char **argv) - /* Set hostname */ - MY_NAME = NULL; - -+ /* Refuse to start if another statd is running */ -+ if (nfs_probe_statd()) { -+ fprintf(stderr, "Statd service already running!\n"); -+ exit(1); -+ } -+ - /* Process command line switches */ - while ((arg = getopt_long(argc, argv, "h?vVFNH:dn:p:o:P:L", longopts, NULL)) != EOF) { - switch (arg) { --- -1.8.3.2 - diff --git a/net-fs/nfs-utils/nfs-utils-1.2.9.ebuild b/net-fs/nfs-utils/nfs-utils-1.2.9.ebuild new file mode 100644 index 00000000..e506ced3 --- /dev/null +++ b/net-fs/nfs-utils/nfs-utils-1.2.9.ebuild @@ -0,0 +1,142 @@ +# Copyright 1999-2013 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.9.ebuild,v 1.1 2013/11/07 07:50:22 radhermit Exp $ + +EAPI="4" + +inherit eutils flag-o-matic multilib autotools systemd + +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 +libmount nfsdcld +nfsidmap +nfsv4 nfsv41 selinux tcpd +uuid" +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-0.2.0-r1 + net-libs/libtirpc + libmount? ( sys-apps/util-linux ) + nfsdcld? ( >=dev-db/sqlite-3.3 ) + nfsv4? ( + >=dev-libs/libevent-1.0b + >=net-libs/libnfsidmap-0.21-r1 + kerberos? ( + net-libs/librpcsecgss + >=net-libs/libgssglue-0.3 + net-libs/libtirpc[kerberos] + virtual/krb5 + ) + nfsidmap? ( + >=net-libs/libnfsidmap-0.24 + sys-apps/keyutils + ) + ) + nfsv41? ( + sys-fs/lvm2 + ) + selinux? ( + sec-policy/selinux-rpc + sec-policy/selinux-rpcbind + ) + uuid? ( sys-apps/util-linux )" +RDEPEND="${DEPEND_COMMON} !net-nds/portmap" +DEPEND="${DEPEND_COMMON} + virtual/pkgconfig" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-1.1.4-mtab-sym.patch + epatch "${FILESDIR}"/${PN}-1.2.8-cross-build.patch + epatch "${FILESDIR}"/${PN}-1.2.7-heimdal.patch + eautoreconf +} + +src_configure() { + export libsqlite3_cv_is_recent=yes # Our DEPEND forces this. + export ac_cv_header_keyutils_h=$(usex nfsidmap) + econf \ + --with-statedir=/var/lib/nfs \ + --enable-tirpc \ + $(use_enable libmount libmount-mount) \ + $(use_with tcpd tcp-wrappers) \ + $(use_enable nfsdcld nfsdcltrack) \ + $(use_enable nfsv4) \ + $(use_enable nfsv41) \ + $(use_enable ipv6) \ + $(use_enable caps) \ + $(use_enable uuid) \ + $(usex nfsv4 "$(use_enable kerberos gss)" "--disable-gss") \ + $(usex nfsv4 "$(use_with kerberos gssglue)" "--without-gssglue") +} + +src_compile(){ + # remove compiled files bundled in the tarball + emake clean + default +} + +src_install() { + default + rm linux-nfs/Makefile* || die + dodoc -r linux-nfs README + + # 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 "${ED}"/var/lib "${ED}"/usr/$(get_libdir) || die + + # Install some client-side binaries in /sbin + dodir /sbin + mv "${ED}"/usr/sbin/rpc.statd "${ED}"/sbin/ || die + + if use nfsv4 && use nfsidmap ; then + # Install a config file for idmappers in newer kernels. #415625 + insinto /etc/request-key.d + echo 'create id_resolver * * /usr/sbin/nfsidmap -t 600 %k %d' > id_resolver.conf + doins id_resolver.conf + fi + + insinto /etc + doins "${FILESDIR}"/exports + + local f list=() opt_need="" + if use nfsv4 ; then + opt_need="rpc.idmapd" + list+=( rpc.idmapd rpc.pipefs ) + use kerberos && list+=( rpc.gssd rpc.svcgssd ) + fi + for f in nfs nfsmount rpc.statd "${list[@]}" ; do + newinitd "${FILESDIR}"/${f}.initd ${f} + done + for f in nfs nfsmount ; do + newconfd "${FILESDIR}"/${f}.confd ${f} + done + sed -i \ + -e "/^NFS_NEEDED_SERVICES=/s:=.*:=\"${opt_need}\":" \ + "${ED}"/etc/conf.d/nfs || die #234132 + systemd_dounit "${FILESDIR}"/nfsd.service + systemd_dounit "${FILESDIR}"/rpc-statd.service + systemd_dounit "${FILESDIR}"/rpc-mountd.service +} + +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 +}