1 |
commit: 5b2d7c955a8b3c0c422780d25bc2b1355f37df25 |
2 |
Author: Matt Whitlock <gentoo <AT> mattwhitlock <DOT> name> |
3 |
AuthorDate: Wed May 11 00:32:58 2016 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 2 07:08:13 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b2d7c95 |
7 |
|
8 |
net-fs/nfs-utils: warn if client tracking will be broken |
9 |
|
10 |
NFSDv4 supports client tracking across server restarts using two |
11 |
methods. The legacy method is in-kernel and requires CONFIG_CRYPTO_MD5, |
12 |
which is not automatically selected by CONFIG_NFSD_V4 (see |
13 |
https://bugzilla.kernel.org/show_bug.cgi?id=52271). The newer method |
14 |
involves a usermode helper upcall program (nfsdcltrack), which is built |
15 |
and installed only when USE="nfsdcld". If neither method is available, |
16 |
then the NFS server does not support tracking clients across restarts, |
17 |
and it emits a warning to the kernel log: |
18 |
|
19 |
NFSD: unable to generate recoverydir name (-2). |
20 |
NFSD: disabling legacy clientid tracking. Reboot recovery will not function correctly! |
21 |
|
22 |
This commit introduces an ewarn in pkg_setup to warn the user if their |
23 |
configuration will not support client tracking due to neither of these |
24 |
options being enabled. |
25 |
|
26 |
Closes: https://github.com/gentoo/gentoo/pull/1448 |
27 |
Closes: https://bugs.gentoo.org/582714 |
28 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
29 |
|
30 |
net-fs/nfs-utils/nfs-utils-2.4.1.ebuild | 12 +++++++++++- |
31 |
1 file changed, 11 insertions(+), 1 deletion(-) |
32 |
|
33 |
diff --git a/net-fs/nfs-utils/nfs-utils-2.4.1.ebuild b/net-fs/nfs-utils/nfs-utils-2.4.1.ebuild |
34 |
index c579954763a..aff15752fd0 100644 |
35 |
--- a/net-fs/nfs-utils/nfs-utils-2.4.1.ebuild |
36 |
+++ b/net-fs/nfs-utils/nfs-utils-2.4.1.ebuild |
37 |
@@ -3,7 +3,7 @@ |
38 |
|
39 |
EAPI=7 |
40 |
|
41 |
-inherit autotools flag-o-matic multilib systemd |
42 |
+inherit autotools flag-o-matic linux-info multilib systemd |
43 |
|
44 |
DESCRIPTION="NFS client and server daemons" |
45 |
HOMEPAGE="http://linux-nfs.org/" |
46 |
@@ -70,6 +70,16 @@ PATCHES=( |
47 |
"${FILESDIR}"/${P}-gssd-Look-in-lib32-for-gss-libs-aswell.patch |
48 |
) |
49 |
|
50 |
+pkg_setup() { |
51 |
+ linux-info_pkg_setup |
52 |
+ if use nfsv4 && ! use nfsdcld && linux_config_exists && ! linux_chkconfig_present CRYPTO_MD5 ; then |
53 |
+ ewarn "Your NFS server will be unable to track clients across server restarts!" |
54 |
+ ewarn "Please enable the \"${HILITE}nfsdcld${NORMAL}\" USE flag to install the nfsdcltrack usermode" |
55 |
+ ewarn "helper upcall program, or enable ${HILITE}CONFIG_CRYPTO_MD5${NORMAL} in your kernel to" |
56 |
+ ewarn "support the legacy, in-kernel client tracker." |
57 |
+ fi |
58 |
+} |
59 |
+ |
60 |
src_prepare() { |
61 |
default |