All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
To: openembedded-core@lists.openembedded.org
Cc: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
Subject: [PATCH v2] nfs-utils: upgrade 2.9.1 -> 2.9.2
Date: Thu,  6 Aug 2026 13:40:19 +0200	[thread overview]
Message-ID: <20260806114019.25253-1-jaipaul.cheernam@est.tech> (raw)
In-Reply-To: <20260805162550.13442-1-jaipaul.cheernam@est.tech>

ChangeLog: https://www.kernel.org/pub/linux/utils/nfs-utils/2.9.2/2.9.2-Changelog

Drop 0001-fh_key_file.c-Fix-build-error-for-musl.patch (fixed upstream).

Add patches to fix build failures:
- Fix link error with --disable-nfsdctl (undefined reference to
  nfsd_nl_cmd_str)
- Fix musl build (missing stddef.h for offsetof in getport.c)

Both reported to linux-nfs@vger.kernel.org.

Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
---
Changes in v2:
- Drop 0001-fh_key_file.c patch (fixed upstream in 2.9.2)
- Add patch to fix musl build (missing stddef.h for offsetof in getport.c)

 ..._key_file.c-Fix-build-error-for-musl.patch | 31 ------------
 ...tport-fix-missing-stddef.h-inclusion.patch | 27 +++++++++++
 .../0004-Use-nogroup-for-nobody-group.patch   |  6 +--
 .../0005-find-OE-provided-Kerberos.patch      |  4 +-
 ...e-HAVE_NFSD_NETLINK-on-enable-nfsdct.patch | 47 +++++++++++++++++++
 ...{nfs-utils_2.9.1.bb => nfs-utils_2.9.2.bb} |  5 +-
 6 files changed, 82 insertions(+), 38 deletions(-)
 delete mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/0001-fh_key_file.c-Fix-build-error-for-musl.patch
 create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/0001-getport-fix-missing-stddef.h-inclusion.patch
 create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/0006-configure.ac-gate-HAVE_NFSD_NETLINK-on-enable-nfsdct.patch
 rename meta/recipes-connectivity/nfs-utils/{nfs-utils_2.9.1.bb => nfs-utils_2.9.2.bb} (96%)

diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-fh_key_file.c-Fix-build-error-for-musl.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-fh_key_file.c-Fix-build-error-for-musl.patch
deleted file mode 100644
index d6db1fe0c0..0000000000
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-fh_key_file.c-Fix-build-error-for-musl.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 98048fd9262b3e4e024248ebd07d5ff66175e4ec Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Thu, 7 May 2026 03:32:57 -0700
-Subject: [PATCH] fh_key_file.c: Fix build error with musl
-
-Fixed:
-error: implicit declaration of function 'strerror'
-
-Upstream-Status: Backport [https://lore.kernel.org/linux-nfs/b2b370b6-8576-493a-b124-776e1249c312@redhat.com/]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- support/nfs/fh_key_file.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/support/nfs/fh_key_file.c b/support/nfs/fh_key_file.c
-index 5f5eafc..89555ce 100644
---- a/support/nfs/fh_key_file.c
-+++ b/support/nfs/fh_key_file.c
-@@ -30,6 +30,8 @@
- 
- #include "nfslib.h"
- 
-+#include <string.h>
-+
- #define HASH_BLOCKSIZE  256
- int hash_fh_key_file(const char *fh_key_file, uuid_t uuid)
- {
--- 
-2.49.0
-
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-getport-fix-missing-stddef.h-inclusion.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-getport-fix-missing-stddef.h-inclusion.patch
new file mode 100644
index 0000000000..1683e9692b
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-getport-fix-missing-stddef.h-inclusion.patch
@@ -0,0 +1,27 @@
+From: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
+Date: Thu, 6 Aug 2026 10:55:00 +0000
+Subject: [PATCH] getport: fix missing stddef.h inclusion
+
+getport.c uses offsetof() but does not include <stddef.h>. On glibc
+this works because offsetof is pulled in transitively, but on musl it
+is not available without the explicit include, causing:
+
+  getport.c:459:41: error: implicit declaration of function 'offsetof'
+
+Upstream-Status: Submitted [https://lore.kernel.org/linux-nfs/20260806112023.25090-1-jaipaul.cheernam@est.tech/]
+Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
+---
+ support/nfs/getport.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/support/nfs/getport.c b/support/nfs/getport.c
+--- a/support/nfs/getport.c
++++ b/support/nfs/getport.c
+@@ -27,6 +27,7 @@
+ #include <config.h>
+ #endif
+ 
++#include <stddef.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <unistd.h>
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0004-Use-nogroup-for-nobody-group.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0004-Use-nogroup-for-nobody-group.patch
index bbf44d5977..7e63cb6282 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/0004-Use-nogroup-for-nobody-group.patch
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0004-Use-nogroup-for-nobody-group.patch
@@ -1,4 +1,4 @@
-From 001913c5eb0aad933a93ee966252905cd46d776b Mon Sep 17 00:00:00 2001
+From 5f4739475f3c01145174734ed8a3b31b3da99b77 Mon Sep 17 00:00:00 2001
 From: Daniel McGregor <daniel.mcgregor@vecima.com>
 Date: Tue, 6 Jun 2023 16:07:53 -0600
 Subject: [PATCH] Use "nogroup" for nobody group
@@ -11,7 +11,7 @@ Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com>
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/support/nfsidmap/idmapd.conf b/support/nfsidmap/idmapd.conf
-index 2a2f79a1..e6f3724f 100644
+index 2a2f79a..e6f3724 100644
 --- a/support/nfsidmap/idmapd.conf
 +++ b/support/nfsidmap/idmapd.conf
 @@ -41,7 +41,7 @@
@@ -24,7 +24,7 @@ index 2a2f79a1..e6f3724f 100644
  [Translation]
  
 diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
-index cd9a965f..3be805e9 100644
+index 5231f56..e1aa8a5 100644
 --- a/utils/idmapd/idmapd.c
 +++ b/utils/idmapd/idmapd.c
 @@ -89,7 +89,7 @@
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0005-find-OE-provided-Kerberos.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0005-find-OE-provided-Kerberos.patch
index 3241e8e859..bb152c2754 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/0005-find-OE-provided-Kerberos.patch
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0005-find-OE-provided-Kerberos.patch
@@ -1,4 +1,4 @@
-From a2af266f013722a64c5d04e0fe097cd711393a53 Mon Sep 17 00:00:00 2001
+From a1759d9079a436096be5ce44622a3a5a85ec9faa Mon Sep 17 00:00:00 2001
 From: Daniel McGregor <daniel.mcgregor@vecima.com>
 Date: Wed, 8 Nov 2023 16:24:20 -0600
 Subject: [PATCH] find OE provided Kerberos
@@ -10,7 +10,7 @@ Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com>
  1 file changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/aclocal/kerberos5.m4 b/aclocal/kerberos5.m4
-index f96f0fd4..ad85fdf2 100644
+index f96f0fd..ad85fdf 100644
 --- a/aclocal/kerberos5.m4
 +++ b/aclocal/kerberos5.m4
 @@ -22,8 +22,8 @@ AC_DEFUN([AC_KERBEROS_V5],[
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0006-configure.ac-gate-HAVE_NFSD_NETLINK-on-enable-nfsdct.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0006-configure.ac-gate-HAVE_NFSD_NETLINK-on-enable-nfsdct.patch
new file mode 100644
index 0000000000..d15ea1ac5d
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0006-configure.ac-gate-HAVE_NFSD_NETLINK-on-enable-nfsdct.patch
@@ -0,0 +1,47 @@
+From: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
+Date: Wed, 5 Aug 2026 06:55:00 +0000
+Subject: [PATCH] configure.ac: gate HAVE_NFSD_NETLINK on --enable-nfsdctl
+
+HAVE_NFSD_NETLINK is currently defined unconditionally, but the
+implementation of nfsd_nl_cmd_str() in support/nfs/nfsdnl.c is only
+compiled into libnfs when CONFIG_NFSDCTL is true (--enable-nfsdctl).
+
+This causes a link failure when building with --disable-nfsdctl:
+
+  ld: exportfs-exportfs.o: in function `unexportfs_parsed':
+  exportfs.c:491: undefined reference to `nfsd_nl_cmd_str'
+
+The callers (exportfs.c) guard their usage with #ifdef HAVE_NFSD_NETLINK,
+and nfsdnl.h provides a static inline stub returning -ENOSYS when the
+macro is not defined.  So the correct fix is to only define
+HAVE_NFSD_NETLINK when --enable-nfsdctl is in effect, keeping netlink
+support as an opt-in feature consistent with the CONFIG_NFSDCTL guard
+on nfsdnl.c.
+
+Upstream-Status: Submitted [https://lore.kernel.org/linux-nfs/9fec9f1b-1c10-4a20-8282-dfc9addb4ee8@est.tech/T/#u]
+Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -256,8 +256,6 @@
+ PKG_CHECK_MODULES(LIBNLGENL3, libnl-genl-3.0 >= 3.1)
+ 
+ AC_CHECK_HEADERS(linux/nfsd_netlink.h)
+-AC_DEFINE([HAVE_NFSD_NETLINK], 1,
+-	  [Define to 1 if nfsd generic netlink support is available])
+ 
+ # ensure the system netlink headers have the latest features
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <linux/nfsd_netlink.h>]],
+@@ -279,6 +277,8 @@
+ 	enable_nfsdctl="yes")
+ 	AM_CONDITIONAL(CONFIG_NFSDCTL, [test "$enable_nfsdctl" = "yes" ])
+ 	if test "$enable_nfsdctl" = yes; then
++		AC_DEFINE([HAVE_NFSD_NETLINK], 1,
++			  [Define to 1 if nfsd generic netlink support is available])
+ 		PKG_CHECK_MODULES(LIBREADLINE, readline)
+ 	fi
+ 
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.9.1.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.9.2.bb
similarity index 96%
rename from meta/recipes-connectivity/nfs-utils/nfs-utils_2.9.1.bb
rename to meta/recipes-connectivity/nfs-utils/nfs-utils_2.9.2.bb
index 06e4fcb6e0..e60011ff9f 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.9.1.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.9.2.bb
@@ -23,10 +23,11 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x
            file://nfscommon \
            file://0004-Use-nogroup-for-nobody-group.patch \
            file://0005-find-OE-provided-Kerberos.patch \
-           file://0001-fh_key_file.c-Fix-build-error-for-musl.patch \
+           file://0006-configure.ac-gate-HAVE_NFSD_NETLINK-on-enable-nfsdct.patch \
+           file://0001-getport-fix-missing-stddef.h-inclusion.patch \
            "
 
-SRC_URI[sha256sum] = "302846343bf509f8f884c23bdbd0fe853b7f7cbb6572060a9082279d13b21a2c"
+SRC_URI[sha256sum] = "e1dd8a9c95af15492065942cc3b52b1339ffd586baa2280ed86c9d3dc4097e8c"
 
 # Only kernel-module-nfsd is required here (but can be built-in)  - the nfsd module will
 # pull in the remainder of the dependencies.


      parent reply	other threads:[~2026-08-06 11:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-05 16:25 [PATCH] nfs-utils: upgrade 2.9.1 -> 2.9.2 Jaipaul Cheernam
2026-08-06 10:51 ` [OE-core] " Richard Purdie
2026-08-06 11:40 ` Jaipaul Cheernam [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260806114019.25253-1-jaipaul.cheernam@est.tech \
    --to=jaipaul.cheernam@est.tech \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.