From mboxrd@z Thu Jan 1 00:00:00 1970 From: maxim.cournoyer@gmail.com Subject: bug#39670: Cannot mount NFS share as user or root Date: Thu, 20 Feb 2020 11:25:37 -0500 Message-ID: <87v9o18bum.fsf@raisin.i-did-not-set--mail-host-address--so-tickle-me> References: <87o8tvwpfk.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:57029) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4oeJ-0006Oq-Ej for bug-guix@gnu.org; Thu, 20 Feb 2020 11:26:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j4oeI-0001t8-4g for bug-guix@gnu.org; Thu, 20 Feb 2020 11:26:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39735) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j4oeI-0001ss-0t for bug-guix@gnu.org; Thu, 20 Feb 2020 11:26:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j4oeH-0004PD-Pq for bug-guix@gnu.org; Thu, 20 Feb 2020 11:26:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87o8tvwpfk.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 18 Feb 2020 16:33:51 -0500") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: Maxim Cournoyer Cc: Nathan Dehnel , 39670@debbugs.gnu.org Hello, Maxim Cournoyer writes: > > I encountered this too. Perhaps we should patch some references to > mount.nfs (from nfs-utils) in the util-linux package which provides > 'mount'. > > In the meantime, you should use "mount.nfs" directly. I've looked into patching util-linux to reference explicitly the mount.nfs helper, and I think this should do it: --8<---------------cut here---------------start------------->8--- modified libmount/src/context.c @@ -1939,8 +1939,13 @@ int mnt_context_prepare_helper(struct libmnt_context *cxt, const char *name, struct stat st; int rc; - rc = snprintf(helper, sizeof(helper), "%s/%s.%s", - path, name, type); + if (startswith(type, "nfs")) { + rc = snprintf(helper, sizeof(helper), "/gnu/store/c7kpr1jh5z3mrkz0yw9am86851y57cq7-nfs-utils-2.4.2/sbin/mount.nfs"); + } else { + rc = snprintf(helper, sizeof(helper), "%s/%s.%s", + path, name, type); + } + path = strtok_r(NULL, ":", &p); if (rc < 0 || (size_t) rc >= sizeof(helper)) --8<---------------cut here---------------end--------------->8--- But, adding nfs-utils to util-linux creates a dependency cycle which is bothersome to resolve (nfs-utils requires eudev through lvm2, as well as util-linux itself). I've also realised that when I was using 'sudo mount.nfs ...' it wouldn't work because it'd look up the root user's PATH for the helper. 'sudo -E mount.nfs ...' should work. We should document that the 'nfs-utils' package needs to be added to the operating system declaration packages field when NFS file systems are used. Maxim