commit: 5b2d7c955a8b3c0c422780d25bc2b1355f37df25 Author: Matt Whitlock <gentoo <AT> mattwhitlock <DOT> name> AuthorDate: Wed May 11 00:32:58 2016 +0000 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> CommitDate: Mon Sep 2 07:08:13 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b2d7c95
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 <AT> gentoo.org> net-fs/nfs-utils/nfs-utils-2.4.1.ebuild | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 c579954763a..aff15752fd0 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
