From 117bd160bf8afa3d54bf3e34addaf97be483a9a1 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 29 Jul 2026 05:36:05 +0000 Subject: [PATCH] nilfs-utils: upgrade v2.2.11 -> v2.3.1 Move from the v2.2.y stable branch to the v2.3.y line (tag v2.3.1, 2026-06-19). v2.3.x carries all v2.2.6..v2.2.16 backports plus the 2.3.0 rework. Security: * CVE-2026-55392: validate s_log_block_size in nilfs_sb_is_valid(). A crafted NILFS2 image with s_log_block_size > 6 caused oversized shifts / huge allocations in nilfs-tune, dumpseg and any tool reading a device. 2.3.0 highlights: * Utilities (lscp, lssu, nilfs-clean, ...) accept file/directory arguments and auto-resolve the backing device. * cleanerd: cap segments per cleaning step by free segments (avoids stalling near ENOSPC) and against 32-bit size_t overflow; clean SIGINT exit, SIGUSR1 state dump. * Library refactor with an API/ABI break: obsolete APIs and internal structs removed from public headers, new segment I/O / resize / freeze-thaw APIs, types unified to uint32_t/uint64_t/bool. * mkfs.nilfs2 sets the block-count read-only-compat flag by default. Packaging-relevant build-system changes: * Soname bump libnilfs/libnilfsgc 2 -> 3; libnilfscleaner is no longer a shared library (now an internal convenience lib), so libnilfscleaner.so.* correctly disappears from the runtime package. * New pkg-config producer files (nilfs.pc, nilfsgc.pc) land in ${libdir}/pkgconfig -> require inherit pkgconfig. * LT_INIT([disable-static]) means static libs are no longer installed. * The old --with-base-sbindir knob was replaced upstream by an --enable-usrmerge=(no|sbin|bin|auto) mechanism. Drop the local 0001-configure.ac-Add-knob-to-define-base-sbindir.patch and select the hierarchy explicitly from DISTRO_FEATURES, because the "auto" default probes the build host and is wrong when cross compiling. LDCONFIG=true is still required. Signed-off-by: Khem Raj --- ...e.ac-Add-knob-to-define-base-sbindir.patch | 35 ------------------- .../nilfs-utils/nilfs-utils_v2.2.11.bb | 16 --------- .../nilfs-utils/nilfs-utils_v2.3.1.bb | 18 ++++++++++ 3 files changed, 18 insertions(+), 51 deletions(-) delete mode 100644 meta-filesystems/recipes-utils/nilfs-utils/nilfs-utils/0001-configure.ac-Add-knob-to-define-base-sbindir.patch delete mode 100644 meta-filesystems/recipes-utils/nilfs-utils/nilfs-utils_v2.2.11.bb create mode 100644 meta-filesystems/recipes-utils/nilfs-utils/nilfs-utils_v2.3.1.bb diff --git a/meta-filesystems/recipes-utils/nilfs-utils/nilfs-utils/0001-configure.ac-Add-knob-to-define-base-sbindir.patch b/meta-filesystems/recipes-utils/nilfs-utils/nilfs-utils/0001-configure.ac-Add-knob-to-define-base-sbindir.patch deleted file mode 100644 index e53d2bdc8b..0000000000 --- a/meta-filesystems/recipes-utils/nilfs-utils/nilfs-utils/0001-configure.ac-Add-knob-to-define-base-sbindir.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 1b8f420ec8852355580dd925c0316798d4fa7449 Mon Sep 17 00:00:00 2001 -From: Khem Raj -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 ---- - 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]) diff --git a/meta-filesystems/recipes-utils/nilfs-utils/nilfs-utils_v2.2.11.bb b/meta-filesystems/recipes-utils/nilfs-utils/nilfs-utils_v2.2.11.bb deleted file mode 100644 index b68f68a02e..0000000000 --- a/meta-filesystems/recipes-utils/nilfs-utils/nilfs-utils_v2.2.11.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "nilfs-utils is a set of utilities for managing the NILFS filesystem." -HOMEPAGE = "https://nilfs.sourceforge.io/" - -LICENSE = "GPL-2.0-only AND 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} \ - 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}" diff --git a/meta-filesystems/recipes-utils/nilfs-utils/nilfs-utils_v2.3.1.bb b/meta-filesystems/recipes-utils/nilfs-utils/nilfs-utils_v2.3.1.bb new file mode 100644 index 0000000000..be9442c5e1 --- /dev/null +++ b/meta-filesystems/recipes-utils/nilfs-utils/nilfs-utils_v2.3.1.bb @@ -0,0 +1,18 @@ +SUMMARY = "nilfs-utils is a set of utilities for managing the NILFS filesystem." +HOMEPAGE = "https://nilfs.sourceforge.io/" + +LICENSE = "GPL-2.0-only AND 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.3.y;tag=${PV}" + +SRCREV = "805edb2a35178dc1d3d64a553af607fb500ab21d" + +DEPENDS = "util-linux util-linux-libuuid" + +inherit autotools pkgconfig + +# make install is trying to run ldconfig, not suitable for cross builds. +# The UsrMerge hierarchy is autodetected by probing the build host, which is +# wrong when cross compiling, so select it explicitly from DISTRO_FEATURES. +EXTRA_OECONF += "LDCONFIG=true \ + ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '--enable-usrmerge=sbin', '--enable-usrmerge=no', d)}"