From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id yP2lDAbLyl7nYgAA0tVLHw (envelope-from ) for ; Sun, 24 May 2020 19:29:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 8KqnCAbLyl7/TgAAB5/wlQ (envelope-from ) for ; Sun, 24 May 2020 19:29:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9E56794030A for ; Sun, 24 May 2020 19:29:09 +0000 (UTC) Received: from localhost ([::1]:53420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcwJ2-0000le-17 for larch@yhetil.org; Sun, 24 May 2020 15:29:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcwIw-0000lL-C4 for guix-patches@gnu.org; Sun, 24 May 2020 15:29:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55491) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jcwIw-0008II-39 for guix-patches@gnu.org; Sun, 24 May 2020 15:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jcwIv-0000Pk-Vy for guix-patches@gnu.org; Sun, 24 May 2020 15:29:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41515] [PATCH] services: nfs: Expose configuration options for TCP and UDP. Resent-From: maxim.cournoyer@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 24 May 2020 19:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41515 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41515@debbugs.gnu.org X-Debbugs-Original-To: guix-patches Received: via spool by submit@debbugs.gnu.org id=B.15903485381581 (code B ref -1); Sun, 24 May 2020 19:29:01 +0000 Received: (at submit) by debbugs.gnu.org; 24 May 2020 19:28:58 +0000 Received: from localhost ([127.0.0.1]:38804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcwIs-0000PR-3P for submit@debbugs.gnu.org; Sun, 24 May 2020 15:28:58 -0400 Received: from lists.gnu.org ([209.51.188.17]:55734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcwIr-0000PK-0H for submit@debbugs.gnu.org; Sun, 24 May 2020 15:28:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37770) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcwIq-0000l4-QY for guix-patches@gnu.org; Sun, 24 May 2020 15:28:56 -0400 Received: from mail-qv1-xf2b.google.com ([2607:f8b0:4864:20::f2b]:36586) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jcwIp-0008FB-Rk for guix-patches@gnu.org; Sun, 24 May 2020 15:28:56 -0400 Received: by mail-qv1-xf2b.google.com with SMTP id f89so7233031qva.3 for ; Sun, 24 May 2020 12:28:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=n4WwJ4m2w4IOvn/4c1zQYcL7HvV6hdUJsKhe6TALE8k=; b=L/JX0FLLCHyLhwazyZbGA0mfnSW8LCG+wHZYuUXXqLkj9gsi1NDUJB1HGVGHeOdkq2 /mpontzZCPpxqsBNz/uq864bsvfR1tdcJBs5uKfzz+FBUQfOQ5H+y/zmHsJEX0itU51T Mhe+A3oyREenoOZpbJyE3dX8fcMS2LzQlOyBtzDjThaKBUEtfo3V/5MVnv4GtaRhOWJs 16jO+dL8dj9+4kdv4BQZXk5Br6epneYJ2los73U4aXeWO+ZngYH/dJVsVgURjBpdE573 QSIbFTHzW8+di9tlavP6dmypOjpwBoe6qtB6l5AMyRHddCK/rRppgCWHRaeVte58OP3J zjMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=n4WwJ4m2w4IOvn/4c1zQYcL7HvV6hdUJsKhe6TALE8k=; b=MRcLNtNxMq+ZdGFBE/QJtIJKtDyNRwUgDxHgKQNAI6xJoLYXpYCt3TL7bZce0qhwnj Y6nKTJ6qzO4o8ID9ZYq5B6+5ZWOdvSy4CV53Nu9Q285j6Jq+nt2R1GH4hjwZ0gw3mJMO ykxtdyyy3c7+jz3ECr/i13dvZeoY2xzNTeQTBCVk6a1Iu82YyIK+bIhfsuzg3nAR6kCY n0igwy05YCs9CrBXxlul1l7vvDEHtRQ6MA1VkQZPRW+hJy/lNfz6RE+LlYmU8woiXMYi 38cS2EJGg+65JAAnZRFjDlRZJ/ec6tjsWnk/p15QPJBC7Xjp0oJZr3fXUmMBU7cw41kl Z2Hg== X-Gm-Message-State: AOAM531ZNtk4RYPrY0nOC8kohIeF6sqDG3dCnT4Ut4E22ufSaJ9PZ4+X QuAC2Sa+ySj6FZGSYrLKEKDmm/H4pGE= X-Google-Smtp-Source: ABdhPJygprwca8H79XzkKaZv+2AETeZCHXfOkCDlWw2j9mhMGVEzivBCfzI11E1HF4n74sfvumD6Yw== X-Received: by 2002:a0c:a284:: with SMTP id g4mr12605015qva.243.1590348534378; Sun, 24 May 2020 12:28:54 -0700 (PDT) Received: from hurd (dsl-154-103.b2b2c.ca. [66.158.154.103]) by smtp.gmail.com with ESMTPSA id m126sm1936036qke.99.2020.05.24.12.28.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 May 2020 12:28:53 -0700 (PDT) From: maxim.cournoyer@gmail.com X-Google-Original-From: maxim@hurd.i-did-not-set--mail-host-address--so-tickle-me Date: Sun, 24 May 2020 15:28:51 -0400 Message-ID: <874ks56sjw.fsf@hurd.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2607:f8b0:4864:20::f2b; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qv1-xf2b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=L/JX0FLL; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -2.01 X-TUID: MoRopQEsmZkl --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hello! While attempting to NFS boot an embedded board, it discovered that U-Boot expects the server to listen to UDP, which it doesn't by default. This patch adds a switch to make it possible to configure to what kind of sockets (TCP/UDP or both) the NFS server listens to. Maxim --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-services-nfs-Expose-configuration-options-for-TCP-an.patch Content-Transfer-Encoding: quoted-printable From=200fffe89255c313ff3b7993f95627377046312a27 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 24 May 2020 15:04:45 -0400 Subject: [PATCH] services: nfs: Expose configuration options for TCP and UD= P. * gnu/services/nfs.scm ()[nfsd-tcp?, nfsd-udp?]: New fields. (nfs-shepherd-services)[rpc.nfsd]: Populate the --{no-,}tcp and --{no-,}udp command line options based on the values of the nfsd-tcp? and nfsd-upd? fields. * doc/guix.texi (Network File System): Add doc. =2D-- doc/guix.texi | 6 ++++++ gnu/services/nfs.scm | 14 +++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 216422fe31..fb18fa5831 100644 =2D-- a/doc/guix.texi +++ b/doc/guix.texi @@ -22791,6 +22791,12 @@ The network port that the @command{nfsd} daemon sh= ould use. @item @code{nfsd-threads} (default: @code{8}) The number of threads used by the @command{nfsd} daemon. =20 +@item @code{nfsd-tcp?} (default: @code{#t}) +Whether the @command{nfsd} daemon should listen on a TCP socket. + +@item @code{nfsd-udp?} (default: @code{#f}) +Whether the @command{nfsd} daemon should listen on a UDP socket. + @item @code{pipefs-directory} (default: @code{"/var/lib/nfs/rpc_pipefs"}) The directory where the pipefs file system is mounted. =20 diff --git a/gnu/services/nfs.scm b/gnu/services/nfs.scm index 4e358197e2..859097e788 100644 =2D-- a/gnu/services/nfs.scm +++ b/gnu/services/nfs.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2016 John Darrington ;;; Copyright =C2=A9 2018, 2019, 2020 Ricardo Wurmus +;;; Copyright =C2=A9 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -261,6 +262,10 @@ (default 2049)) (nfsd-threads nfs-configuration-nfsd-threads (default 8)) + (nfsd-tcp? nfs-configuration-nfsd-tcp? + (default #t)) + (nfsd-udp? nfs-configuration-nfsd-udp? + (default #f)) (pipefs-directory nfs-configuration-pipefs-directory (default default-pipefs-directory)) ;; List of modules to debug; any of nfsd, nfs, rpc, idmap, statd, or mou= ntd. @@ -272,6 +277,7 @@ (match-record config (nfs-utils nfs-versions exports rpcmountd-port rpcstatd-port nfsd-port nfsd-threads + nfsd-tcp? nfsd-udp? pipefs-directory debug) (list (shepherd-service (documentation "Mount the nfsd pseudo file system.") @@ -332,7 +338,13 @@ #$@(map (lambda (version) (string-append "--nfs-version=3D"= version)) nfs-versions) =2D #$(number->string nfsd-threads)))))) + #$(number->string nfsd-threads) + #$(if nfsd-tcp? + "--tcp" + "--no-tcp") + #$(if nfsd-udp? + "--udp" + "--no-udp")))))) (stop #~(lambda _ (zero? =2D-=20 2.26.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEJ9WGpPiQCFQyn/CfEmDkZILmNWIFAl7KyvQACgkQEmDkZILm NWKdoA/9FKPMhUaWIT1p5azLbJ1Aea9vvSYnB5L5xxYf8VDgJTV1C27ASO9zYWVA 5UvA7bA2sCSXiRhe09BYIhJzP61LWYNeqpBoVKL7oU96GHmWnY79DklDBkqTuV3q Tm3ngmiGEy0YRqHCj0SVZgePZe7aCYidGVj7glptgfR9kkkyfIqZkUott3ube4Ml JfdPOalfRF27bIG8QUPQXYgXPRh/C02BY5OQadxwsaMtGh7fal5UuPZquWsgq5n5 KmByOpOhqrEndbLZ3EejO32/UyqYunR3sFhKEvZSckjDJHjKcF1WPfxbujGeR4DK tUPxilW4udHo1csLmcfQ6Ew3xEKRUGDWIDkduwHIgb+Qcg09Ld3miB42qAx1nI58 09P04QXf02gx8H1+g3zt/egTwiP+uo1abD3F8byeIZzVHBIYAC8zTUv8VriOK8C8 e+w0h1bk3FizYQ5yUN7tOO3TNS8LPWqGUhT29vP4U+VqvyK7KJfiLl6nnfhcC/Tn ZQnf0z43fj6TmwP5rHyIvPK6k3e6mcvXBk6zV3S+imtWe/brJfrwB97wYuenXraW +ukuP7BchbLNg5vNFBPHAOdGkW9xAhnVU4NeT4JMWnCLSoyKtw1J+rxrfotp3uKW g2yiGX0ll7JlbOI6MutiB8ACV+zXLNiLllrdDTK1NSbDTO/5yQE= =jGmJ -----END PGP SIGNATURE----- --==-=-=--