new file mode 100644
@@ -0,0 +1,35 @@
+From 1b8f420ec8852355580dd925c0316798d4fa7449 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 3 Jul 2025 19:32:12 -0700
+Subject: [PATCH] configure.ac: Add knob to define base sbindir
+
+This helps when distros use converged directories with usrmerge
+set --with-base-sbindir=DIR accordingly so it respects the
+distro policy
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9a2f5ff..ce2c853 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -186,7 +186,14 @@ AC_SYS_LARGEFILE
+ AC_PREFIX_DEFAULT([/usr])
+ test "x$prefix" = "xNONE" && prefix="/usr"
+ test "x$exec_prefix" = "xNONE" && exec_prefix="${prefix}"
+-AC_SUBST([root_sbindir], [/sbin])
++
++AC_ARG_WITH([base-sbindir],
++ [AS_HELP_STRING([--with-base-sbindir=DIR],
++ [specify root system binary directory @<:@default=/sbin@:>@])],
++ [root_sbindir="$withval"],
++ [root_sbindir="/sbin"])
++
++AC_SUBST([root_sbindir])
+ AC_SUBST([sbindir], [${exec_prefix}/sbin])
+ AC_SUBST([sysconfdir], [/etc])
+ AC_SUBST([localstatedir], [/var])
@@ -3,10 +3,14 @@ HOMEPAGE = "https://nilfs.sourceforge.io/"
LICENSE = "GPL-2.0-only & LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=385034ac639a62b8415db9814582ee98"
-SRC_URI = "git://github.com/nilfs-dev/nilfs-utils.git;protocol=https;branch=v2.2.y;tag=${PV}"
+SRC_URI = "git://github.com/nilfs-dev/nilfs-utils.git;protocol=https;branch=v2.2.y;tag=${PV} \
+ file://0001-configure.ac-Add-knob-to-define-base-sbindir.patch"
SRCREV = "507064bb3604d0fd88f5e3f6422d9ade73a26120"
DEPENDS = "util-linux util-linux-libuuid"
inherit autotools
+
+# make install is trying to run ldconfig, not suitable for cross builds
+EXTRA_OECONF += "LDCONFIG=true --with-base-sbindir=${base_sbindir}"
Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Michael Estner <michaelestner@web.de> --- ...e.ac-Add-knob-to-define-base-sbindir.patch | 35 +++++++++++++++++++ .../nilfs-utils/nilfs-utils_v2.2.11.bb | 6 +++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 meta-filesystems/recipes-utils/nilfs-utils/nilfs-utils/0001-configure.ac-Add-knob-to-define-base-sbindir.patch