summaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
authorMatt Whitlock <gentoo@mattwhitlock.name>2016-05-10 20:32:58 -0400
committerMatt Turner <mattst88@gentoo.org>2019-09-02 00:08:13 -0700
commit5b2d7c955a8b3c0c422780d25bc2b1355f37df25 (patch)
tree3c3fa942abdd9d4e8ecac386fe9fece2050db3a4 /net-fs
parentapp-arch/libarchive: Fixed build with USE="-zlib" (diff)
downloadgentoo-5b2d7c955a8b3c0c422780d25bc2b1355f37df25.tar.gz
gentoo-5b2d7c955a8b3c0c422780d25bc2b1355f37df25.tar.bz2
gentoo-5b2d7c955a8b3c0c422780d25bc2b1355f37df25.zip
net-fs/nfs-utils: warn if client tracking will be broken
NFSDv4 supports client tracking across server restarts using two methods. The legacy method is in-kernel and requires CONFIG_CRYPTO_MD5, which is not automatically selected by CONFIG_NFSD_V4 (see https://bugzilla.kernel.org/show_bug.cgi?id=52271). The newer method involves a usermode helper upcall program (nfsdcltrack), which is built and installed only when USE="nfsdcld". If neither method is available, then the NFS server does not support tracking clients across restarts, and it emits a warning to the kernel log: NFSD: unable to generate recoverydir name (-2). NFSD: disabling legacy clientid tracking. Reboot recovery will not function correctly! This commit introduces an ewarn in pkg_setup to warn the user if their configuration will not support client tracking due to neither of these options being enabled. Closes: https://github.com/gentoo/gentoo/pull/1448 Closes: https://bugs.gentoo.org/582714 Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/nfs-utils/nfs-utils-2.4.1.ebuild12
1 files changed, 11 insertions, 1 deletions
diff --git a/net-fs/nfs-utils/nfs-utils-2.4.1.ebuild b/net-fs/nfs-utils/nfs-utils-2.4.1.ebuild
index c579954763ad..aff15752fd00 100644
--- a/net-fs/nfs-utils/nfs-utils-2.4.1.ebuild
+++ b/net-fs/nfs-utils/nfs-utils-2.4.1.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit autotools flag-o-matic multilib systemd
+inherit autotools flag-o-matic linux-info multilib systemd
DESCRIPTION="NFS client and server daemons"
HOMEPAGE="http://linux-nfs.org/"
@@ -70,6 +70,16 @@ PATCHES=(
"${FILESDIR}"/${P}-gssd-Look-in-lib32-for-gss-libs-aswell.patch
)
+pkg_setup() {
+ linux-info_pkg_setup
+ if use nfsv4 && ! use nfsdcld && linux_config_exists && ! linux_chkconfig_present CRYPTO_MD5 ; then
+ ewarn "Your NFS server will be unable to track clients across server restarts!"
+ ewarn "Please enable the \"${HILITE}nfsdcld${NORMAL}\" USE flag to install the nfsdcltrack usermode"
+ ewarn "helper upcall program, or enable ${HILITE}CONFIG_CRYPTO_MD5${NORMAL} in your kernel to"
+ ewarn "support the legacy, in-kernel client tracker."
+ fi
+}
+
src_prepare() {
default