downgrade to 1.2.8 waiting for 1.2.9 heimdal patch

Package-Manager: portage-2.2.0_alpha188
RepoMan-Options: --force
This commit is contained in:
Mario Fetka 2013-11-21 11:34:53 +01:00
parent 8cb101258a
commit 4c96162e6e
6 changed files with 224 additions and 149 deletions

View File

@ -2,6 +2,15 @@
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 # 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 $ # $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.8-r2 (21 Nov 2013)
21 Nov 2013; Mario Fetka <mario.fetka@gmail.com>
+files/0001-mountd-Fix-is_subdirectory-again.patch,
+files/0001-statd-exit-if-a-statd-is-already-running.patch,
+nfs-utils-1.2.8-r2.ebuild, -nfs-utils-1.2.8-r1.ebuild,
-nfs-utils-1.2.9.ebuild:
downgrade to 1.2.8 waiting for 1.2.9 heimdal patch
21 Nov 2013; Mario Fetka <mario.fetka@gmail.com> 21 Nov 2013; Mario Fetka <mario.fetka@gmail.com>
+files/nfs-utils-1.2.7-heimdal.patch, +files/nfs-utils-1.2.9-heimdal-1.patch, +files/nfs-utils-1.2.7-heimdal.patch, +files/nfs-utils-1.2.9-heimdal-1.patch,
nfs-utils-1.2.9.ebuild: nfs-utils-1.2.9.ebuild:

View File

@ -1,3 +1,5 @@
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 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.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 AUX nfs-utils-1.2.7-heimdal.patch 6643 SHA256 f8845cb5471313516ebd389a1fb692b984f5f9f663923488a539d8adec8de247 SHA512 dea96554579dcb1b2404724ddcf68a27034cef7f5a0c3d4b6838e46abfcd9a05af3cd56c28f0878f1ec777ea0a2c43fb7c795adf74aa2080c8feb26e7e83d938 WHIRLPOOL cd783ee2b91332753abbf8de8125f6cebd36dd4852ce804d8822fd5cfc28d6d4f608634fcd00b4a30be5aeba9be97c2c122e3beb1d2961182f1bfce8c652e7d2
@ -17,8 +19,6 @@ AUX rpc.pipefs.initd 822 SHA256 6503951b3c200ccf3f46396f7b9274f0a565807f7f6e561c
AUX rpc.statd.initd 818 SHA256 0c7bd35a14da6c0c2577f09ae82a41ddb693a88157eeaf80684616f79be6c304 SHA512 e7c85a5437f65c82bcab6818fa3aa27fdf746ce745b41987d0e59d620b59529b7a8613aad59e831a5b46fee1fe4410d6982a3e76e7834c79675c4c271b0db3b0 WHIRLPOOL b3c6c4147634f3db39f0a50307a7433e0d28f8cf2d89452d90f9db1b56d55c41add68336640a442508ebfc75270dd627154af787b00f603659a5c730ab724340 AUX rpc.statd.initd 818 SHA256 0c7bd35a14da6c0c2577f09ae82a41ddb693a88157eeaf80684616f79be6c304 SHA512 e7c85a5437f65c82bcab6818fa3aa27fdf746ce745b41987d0e59d620b59529b7a8613aad59e831a5b46fee1fe4410d6982a3e76e7834c79675c4c271b0db3b0 WHIRLPOOL b3c6c4147634f3db39f0a50307a7433e0d28f8cf2d89452d90f9db1b56d55c41add68336640a442508ebfc75270dd627154af787b00f603659a5c730ab724340
AUX rpc.svcgssd.initd 584 SHA256 f1c460d8b0e91e54a551397d755135d05a3728d81de596535bf8bda074455677 SHA512 844e8d41a6a8b632d98585724aca2e9ae596f72c67e17e4e8fb9eb81e6c58eed9e10cf8b2a96896dba8fd1efaa95d846954e712bdf3402a847ae17742dae2157 WHIRLPOOL f1e4a38168c112ce07e40432527a77e17aa80b4a37aeccb8b01a9e655f0437e67e4c12998d62ea7c162319cca956c18edd3cb3c64cfd8e17370782ea30fef677 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.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-r2.ebuild 4137 SHA256 fd8740c74deeef1661b12c83e43c2e40fbf436721ef2379ca4ba68c68e4b409b SHA512 4138a30b34d117dbcc805cac4d36d615d02e0b613ce4ba31d2ebb0adc8a23a91be29364877a28e93956396b6c57b315703849d0cdf360dab4e0ccc3890e55575 WHIRLPOOL 4d76db8d12e890b18f09942fcdb5bba69e5fae2f0914b9407d44e95209690cffd70fd34ab3880998f16cd9c26d1f8184a49a4928c213b2b64f66764f93329b23
EBUILD nfs-utils-1.2.8-r1.ebuild 4073 SHA256 66b43a9e7ab5dd415eb5df366545a19c2ac13f4ca49ef1f59badab648a6184a7 SHA512 aaf943197b92f139bdbcbc9aae9add93a35a7e90d3fb91f8e1c34310eb587fbad834e69e2d112bdbaf396275f8331e07e29bb92069dfb75b032a78e0c3fb607a WHIRLPOOL 216592fa93e973c876955b82620a899563bff5207d61f2a5bdbf30e8c48fc3e7e15b2a70505b9c5cf2e09ec10e57882133c05f08b7a33288d7f70752bdab0a1d MISC ChangeLog 35501 SHA256 416587f0fc8440c9c65f6765ee58d3cc44ccdc15df947dab6b0f7a9c274c8043 SHA512 a68a7ed3a9b7e3881ab160f10212113d8f5b6289efb8ff62b07a675d8b298b74d2686a13f3dfc18a2e49af7fe6bc56eaf516be6a5d5f94012c4450904d360b77 WHIRLPOOL 669020f49da99dfbc16df104282ababc8d170de25450d1d5bf2e21860ef747533927a3400c94327280557755cce437bcad764127bfe3ba62f8cda1c4e91e4d0a
EBUILD nfs-utils-1.2.9.ebuild 4083 SHA256 e38883a93aea4a3b6b043dc31637f02382100d8a00839f9b41ed6b80b82528bb SHA512 bcdfcb498e97330273dd863abc70404cbe78083a9265175b7fa58c0129ae4cd4a21a0b3298cb6f100798e0d7624737eed57c9b7f51ec142a11435fd3d90503b0 WHIRLPOOL 573f147040e7ed89bf00c8a6f28b7e1279df33cc27e71287ae31e4cce62a03e704a37d680299b84347ba0897c83685adc52cab45fc691aa0d00c0e82374224c9
MISC ChangeLog 35160 SHA256 fc010e4bdb8b34d31b08829b0991c35d3ce0f4396ed7c89ce8ceac5b46c6af0f SHA512 b5d395c100bb9adca7c0d95ac53b8fe9eb22e9d9c29891b8ba2d31e2b4f4ffdd54e4ab9be2e379264c7d08bba93d7888091574f5875e95c03ab02dab8ed5fa12 WHIRLPOOL 07f730889f956cb73964af03895e28f175ab0c71e5bb128b263f5f564fdaf31a80b72a7a88edb5b95c5bad770a71f996d975c800f38ac2d90c68b2b6dbdbb061
MISC metadata.xml 668 SHA256 d9ecc29c31ebf779ec222513db190cc0e9d0737f806aea26913d097b09bbfa47 SHA512 2b269153829d1d8df6e97871814479af8fbe18a48cf0b6a33947212264875a4002feda4163b465b4a67e253e5f27e47badc53d414ebb9f3281253f813fa1dacd WHIRLPOOL a53c14f8e6f7cce4f75a7fda60d8b9f96a57eb3a877470906fa1c40befcd9791411934e7ab610ce612f6d42d4d953e0a2a78ffc9e21e9b98328a395c4de7daa8 MISC metadata.xml 668 SHA256 d9ecc29c31ebf779ec222513db190cc0e9d0737f806aea26913d097b09bbfa47 SHA512 2b269153829d1d8df6e97871814479af8fbe18a48cf0b6a33947212264875a4002feda4163b465b4a67e253e5f27e47badc53d414ebb9f3281253f813fa1dacd WHIRLPOOL a53c14f8e6f7cce4f75a7fda60d8b9f96a57eb3a877470906fa1c40befcd9791411934e7ab610ce612f6d42d4d953e0a2a78ffc9e21e9b98328a395c4de7daa8

View File

@ -0,0 +1,81 @@
From 23d3980b6cfea4e9056d9b7b81e48b4fefc645e0 Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb@suse.de>
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 <bfields@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
---
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

View File

@ -0,0 +1,126 @@
From 342446a4a624d4ee8254af859bb7f1de6d268679 Mon Sep 17 00:00:00 2001
From: Weston Andros Adamson <dros@netapp.com>
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 <chuck.lever@oracle.com>
Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
---
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

View File

@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation # Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/nfs-utils-1.2.8-r1.ebuild,v 1.2 2013/08/07 13:54:00 xarthisius Exp $ # $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/nfs-utils-1.2.8-r2.ebuild,v 1.1 2013/08/27 07:00:20 radhermit Exp $
EAPI="4" EAPI="4"
@ -57,7 +57,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-1.2.8-cross-build.patch epatch "${FILESDIR}"/${PN}-1.2.8-cross-build.patch
epatch "${FILESDIR}"/0001-statd-exit-if-a-statd-is-already-running.patch epatch "${FILESDIR}"/0001-statd-exit-if-a-statd-is-already-running.patch
epatch "${FILESDIR}"/0001-mountd-Fix-is_subdirectory-again.patch epatch "${FILESDIR}"/0001-mountd-Fix-is_subdirectory-again.patch
epatch "${FILESDIR}"/nfs-utils-1.2.8-heimdal.patch epatch "${FILESDIR}"/${PN}-1.2.8-heimdal.patch
eautoreconf eautoreconf
} }
@ -74,7 +74,8 @@ src_configure() {
$(use_enable ipv6) \ $(use_enable ipv6) \
$(use_enable caps) \ $(use_enable caps) \
$(use_enable uuid) \ $(use_enable uuid) \
$(usex nfsv4 "$(use_enable kerberos gss)" "--disable-gss") $(usex nfsv4 "$(use_enable kerberos gss)" "--disable-gss") \
$(usex nfsv4 "$(use_with kerberos gssglue)" "--without-gssglue")
} }
src_compile(){ src_compile(){

View File

@ -1,142 +0,0 @@
# 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.9-heimdal-1.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
}