Skip to contentSkip to conversation

package/util-linux: bump version to 2.42.2

PATCH In review Bernd Kuhls 2 participants 3 messages Jun 25 – Jun 30

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 package/util-linux: bump version to 2.42.2

https://www.kernel.org/pub/linux/utils/util-linux/v2.42/v2.42.2-ReleaseNotes
https://www.kernel.org/pub/linux/utils/util-linux/v2.42/v2.42.1-ReleaseNotes
https://www.kernel.org/pub/linux/utils/util-linux/v2.42/v2.42-ReleaseNotes

Removed patches which were applied upstream, also remove autoreconf.

Patch 0001 was applied as
https://github.com/util-linux/util-linux/commit/57dab03caf941bf01544cc4548e36cc0c3357d2c
after the rename of the original header with commit
https://github.com/util-linux/util-linux/commit/f419d67de67610180fb04e64d21323ce8927d31d

Added Config.in options for new commands copyfilerange & getino.

copyfilerange is broken according to the Gitlab pipelines only with the br-arm-full-static defconfig:

configure: WARNING: Unable to detect syscall copy_file_range.
configure: error: copyfilerange selected but copy_file_range syscall
not found

because this defconfig uses kernel headers version 4.4. copy_file_range() was added to Linux in version 4.5 with commit
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=29732938a6289a15e907da234d6692a2ead71855
so we require kernel headers >= 4.5 for copyfilerange.

getino builds when current uClibc is built from source but fails on the Gitlab pipelines with all uClibc-based toolchains:

configure: error: getino selected, but required statx function not
available

so we disable getino for uClibc for now.

This bump adds fanotify support in libmount:
https://github.com/util-linux/util-linux/commit/e3e54259e780138d0c7941bbdcb0723bb279516c
which will cause build errors with uClibc < 1.0.58 as detected by the Gitlab pipelines:

libmount/src/monitor_fanotify.c:33:43: error: field ‘hdr’ has
incomplete type
33 | struct fanotify_event_info_header hdr;

because fanotify_event_info_header was added to uClibc 1.0.58:
https://github.com/wbx-github/uclibc-ng/commit/c08beaadc9100f7062d9cfbfec7cc9ba2b0b38fe

so we disable this code for uClibc for now.

---
v3: rebased
Gitlab pipeline passed:
https://gitlab.com/bkuhls/buildroot/-/commits/6cb6e02e5bb1ab7494ba951f5ed81cd19c10f189
v2: Switched copy_file_range from !uclibc to header version limit
added fanotify fix

v2 of this patch was build-tested:
https://gitlab.com/bkuhls/buildroot/-/commits/47bc11472faba3f39946e65b83e6b486fd8f5ad1

To test each suboption individually these patches are needed to fix build errors unrelated to this bump:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

To create the Gitlab pipelines this script was used:

#!/bin/sh

  git commit --amend --date now --no-edit
  git push -f origin util-linux-2.42.2

for config_option in grep ^config package/util-linux/Config.in | grep -v BR2_PACKAGE_UTIL_LINUX_LIBS$ | sort | sed "s/config //" do

    package=`echo $config_option | sed "s/BR2_PACKAGE_UTIL_LINUX_//" | tr '[:upper:]' '[:lower:]'`

    git commit --allow-empty -m "package/util-linux: empty commit for $package test-pkg config

test-pkg config:
BR2_PACKAGE_UTIL_LINUX=y
$config_option=y
"

git push origin util-linux-2.42.2

sleep 30

done

 ...api-utils.h-fix-LSMT_ROOT-definition.patch | 44 --------------
 ...optionally-add-libpthread-to-uuid.pc.patch | 42 -------------
 ...at2-RESOLVE_NO_SYMLINKS-for-backing-.patch | 59 -------------------
 package/util-linux/Config.in                  | 25 ++++++++
 ...api-utils.h-fix-LSMT_ROOT-definition.patch | 44 --------------
 ...optionally-add-libpthread-to-uuid.pc.patch | 42 -------------
 .../util-linux-libs/util-linux-libs.mk        |  3 -
 package/util-linux/util-linux.hash            |  4 +-
 package/util-linux/util-linux.mk              | 17 +++---
 9 files changed, 36 insertions(+), 244 deletions(-)
 delete mode 100644 package/util-linux/0001-include-mount-api-utils.h-fix-LSMT_ROOT-definition.patch
 delete mode 100644 package/util-linux/0002-autotools-optionally-add-libpthread-to-uuid.pc.patch
 delete mode 100644 package/util-linux/0003-loopdev-use-openat2-RESOLVE_NO_SYMLINKS-for-backing-.patch
 delete mode 100644 package/util-linux/util-linux-libs/0001-include-mount-api-utils.h-fix-LSMT_ROOT-definition.patch
 delete mode 100644 package/util-linux/util-linux-libs/0002-autotools-optionally-add-libpthread-to-uuid.pc.patch
package/util-linux/0001-include-mount-api-utils.h-fix-LSMT_ROOT-definition.patch deleted +0 -44
deleted file mode 100644
index d98c225500..0000000000
@@ -1,44 +0,0 @@
-From 72ff3b8998a675900fcb7c18c0e03f1552b13a8b Mon Sep 17 00:00:00 2001
-From: Shubham Chakraborty <[email protected]>
-Date: Tue, 14 Apr 2026 11:04:08 +0530
-Subject: [PATCH] include/mount-api-utils.h: fix LSMT_ROOT definition
-
-Commit
-ded434a63f3eee7fd7805b18d6c9bb912016c3c8 ("include/mount-api-utils:
-add statmount and listmount") introduce a fallback definition for the
-LSMT_ROOT defined, but a small typo makes this fallback definition
-ineffective:
-
- #ifdef LSMT_ROOT
- # define LSMT_ROOT ...
- #endif
-
-Should obviously have been:
-
- #ifndef LSMT_ROOT
- # define LSMT_ROOT ...
- #endif
-
-Signed-off-by: Shubham Chakraborty <[email protected]>
-Upstream: https://lore.kernel.org/util-linux/[email protected]/T/#u
-Signed-off-by: Thomas Petazzoni <[email protected]>
----
- include/mount-api-utils.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/mount-api-utils.h b/include/mount-api-utils.h
-index a916f99..87e173e 100644
---- a/include/mount-api-utils.h
-+++ b/include/mount-api-utils.h
-@@ -339,7 +339,7 @@ struct ul_statmount {
- /*
-  * Special @mnt_id values that can be passed to listmount
-  */
--#ifdef LSMT_ROOT
-+#ifndef LSMT_ROOT
- # define LSMT_ROOT              0xffffffffffffffff    /* root mount */
- #endif
- 
--- 
-2.53.0
-
package/util-linux/0002-autotools-optionally-add-libpthread-to-uuid.pc.patch deleted +0 -42

42 lines not on this page · raw message

package/util-linux/0003-loopdev-use-openat2-RESOLVE_NO_SYMLINKS-for-backing-.patch deleted +0 -59

59 lines not on this page · raw message

package/util-linux/Config.in +25 -0
index e6ee4c3ced..e705aa1b10 100644
@@ -106,6 +106,17 @@ config BR2_PACKAGE_UTIL_LINUX_CHMEM
 	help
 	  Sets a particular size or range of memory online or offline
 
+config BR2_PACKAGE_UTIL_LINUX_COPYFILERANGE
+	bool "copyfilerange"
+	depends on BR2_USE_MMU # fork()
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 # copy_file_range
+	help
+	  Copy file ranges using the copy_file_range() syscall
+
+comment "copyfilerange needs a toolchain w/ headers >= 4.5"
+	depends on BR2_USE_MMU
+	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
+
 config BR2_PACKAGE_UTIL_LINUX_CRAMFS
 	bool "cramfs utilities"
 	depends on BR2_USE_MMU # fork()
@@ -144,6 +155,20 @@ config BR2_PACKAGE_UTIL_LINUX_FSCK
 	help
 	  Check and repair a linux filesystem
 
+config BR2_PACKAGE_UTIL_LINUX_GETINO
+	bool "getino"
+	depends on BR2_USE_MMU # fork()
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3 # pidfd_open
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC # statx
+	help
+	  Print the unique inode number associated with a process
+	  file descriptor or namespace for a given PID.
+
+comment "getino needs a musl or glibc toolchain w/ headers >= 5.3"
+	depends on BR2_USE_MMU
+	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3 \
+		|| BR2_TOOLCHAIN_USES_UCLIBC
+
 config BR2_PACKAGE_UTIL_LINUX_HARDLINK
 	bool "hardlink"
 	depends on BR2_USE_MMU # fork()
package/util-linux/util-linux-libs/0001-include-mount-api-utils.h-fix-LSMT_ROOT-definition.patch deleted +0 -44

44 lines not on this page · raw message

package/util-linux/util-linux-libs/0002-autotools-optionally-add-libpthread-to-uuid.pc.patch deleted +0 -42

42 lines not on this page · raw message

package/util-linux/util-linux-libs/util-linux-libs.mk +0 -3
index 6716a656d2..9340d5ae4f 100644
@@ -21,9 +21,6 @@ UTIL_LINUX_LIBS_LICENSE_FILES = README.licensing \
 	Documentation/licenses/COPYING.BSD-3-Clause \
 	Documentation/licenses/COPYING.LGPL-2.1-or-later
 
-# 0002-autotools-optionally-add-libpthread-to-uuid.pc.patch
-UTIL_LINUX_LIBS_AUTORECONF = YES
-
 UTIL_LINUX_LIBS_INSTALL_STAGING = YES
 UTIL_LINUX_LIBS_DEPENDENCIES = \
 	host-pkgconf \
package/util-linux/util-linux.hash +2 -2
index b6393d6ec0..b65527408b 100644
@@ -1,5 +1,5 @@
-# From https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.41/sha256sums.asc
-sha256  f586e35d320ff537aab3ffeca37e9ecd482ccbe013590db4429a414d8aa6a728  util-linux-2.41.5.tar.xz
+# From https://www.kernel.org/pub/linux/utils/util-linux/v2.42/sha256sums.asc
+sha256  03a05d3adf9602ef128f2da05b84b3205ce60c351e5737c0370f74000679ce8a  util-linux-2.42.2.tar.xz
 # License files, locally calculated
 sha256  4c2db318192bda62f3f8fcf71488bb5e602ae4385eba281d711b46cc13a40bb3  README.licensing
 sha256  527f738966ca396cd5a68c1509390de2a780c6b614d9ee57f7544a6161938ed1  Documentation/licenses/COPYING.BSD-2-Clause
package/util-linux/util-linux.mk +9 -8
index 83517e88c0..cae2a494e6 100644
@@ -7,8 +7,8 @@
 # When making changes to this file, please check if
 # util-linux-libs/util-linux-libs.mk needs to be updated accordingly as well.
 
-UTIL_LINUX_VERSION_MAJOR = 2.41
-UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).5
+UTIL_LINUX_VERSION_MAJOR = 2.42
+UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).2
 UTIL_LINUX_SOURCE = util-linux-$(UTIL_LINUX_VERSION).tar.xz
 UTIL_LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/util-linux/v$(UTIL_LINUX_VERSION_MAJOR)
 
@@ -37,12 +37,6 @@ UTIL_LINUX_LICENSE_FILES = README.licensing \
 
 UTIL_LINUX_CPE_ID_VENDOR = kernel
 
-# package/util-linux/0003-loopdev-use-openat2-RESOLVE_NO_SYMLINKS-for-backing-.patch
-UTIL_LINUX_IGNORE_CVES += CVE-2026-27456
-
-# 0002-autotools-optionally-add-libpthread-to-uuid.pc.patch
-UTIL_LINUX_AUTORECONF = YES
-
 UTIL_LINUX_INSTALL_STAGING = YES
 UTIL_LINUX_DEPENDENCIES = \
 	host-pkgconf \
@@ -129,6 +123,11 @@ endif
 # workaround for static_assert on uclibc-ng < 1.0.42
 UTIL_LINUX_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -Dstatic_assert=_Static_assert"
 
+# fanotify_event_info_header is missing on uclibc-ng < 1.0.58
+ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
+UTIL_LINUX_CONF_ENV += ac_cv_type_struct_fanotify_event_info_header=no
+endif
+
 # Unfortunately, the util-linux does LIBS="" at the end of its
 # configure script. So we have to pass the proper LIBS value when
 # calling the configure script to make configure tests pass properly,
@@ -174,11 +173,13 @@ UTIL_LINUX_CONF_OPTS += \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_CAL),--enable-cal,--disable-cal) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_CHFN_CHSH),--enable-chfn-chsh,--disable-chfn-chsh) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_CHMEM),--enable-chmem,--disable-chmem) \
+	$(if $(BR2_PACKAGE_UTIL_LINUX_COPYFILERANGE),--enable-copyfilerange,--disable-copyfilerange) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_CRAMFS),--enable-cramfs,--disable-cramfs) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_EJECT),--enable-eject,--disable-eject) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_FALLOCATE),--enable-fallocate,--disable-fallocate) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_FDFORMAT),--enable-fdformat,--disable-fdformat) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_FSCK),--enable-fsck,--disable-fsck) \
+	$(if $(BR2_PACKAGE_UTIL_LINUX_GETINO),--enable-getino,--disable-getino) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_HARDLINK),--enable-hardlink,--disable-hardlink) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_HWCLOCK),--enable-hwclock --disable-hwclock-gplv3,--disable-hwclock) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_IPCMK),--enable-ipcmk,--disable-ipcmk) \
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Bernd, All,

Le 25/06/2026 à 22:17, Bernd Kuhls a écrit :

Quoted 25 lines

https://www.kernel.org/pub/linux/utils/util-linux/v2.42/v2.42.2-ReleaseNotes
https://www.kernel.org/pub/linux/utils/util-linux/v2.42/v2.42.1-ReleaseNotes
https://www.kernel.org/pub/linux/utils/util-linux/v2.42/v2.42-ReleaseNotes

Removed patches which were applied upstream, also remove autoreconf.

Patch 0001 was applied as
https://github.com/util-linux/util-linux/commit/57dab03caf941bf01544cc4548e36cc0c3357d2c
after the rename of the original header with commit
https://github.com/util-linux/util-linux/commit/f419d67de67610180fb04e64d21323ce8927d31d

Added Config.in options for new commands copyfilerange & getino.

copyfilerange is broken according to the Gitlab pipelines only with the br-arm-full-static defconfig:

configure: WARNING: Unable to detect syscall copy_file_range.
configure: error: copyfilerange selected but copy_file_range syscall
not found

because this defconfig uses kernel headers version 4.4. copy_file_range() was added to Linux in version 4.5 with commit
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=29732938a6289a15e907da234d6692a2ead71855
so we require kernel headers >= 4.5 for copyfilerange.

Quoted 7 lines

getino builds when current uClibc is built from source but fails on the Gitlab pipelines with all uClibc-based toolchains:

configure: error: getino selected, but required statx function not
available

so we disable getino for uClibc for now.

While the option is "BR2_TOOLCHAIN_USES_UCLIBC", we should use "uClibc-ng" in the commit log.

We probably need the latest (v1.0.57) version of uClibc-ng as well:
https://github.com/wbx-github/uclibc-ng/commit/d3a819aff25af436e22abd5ba01ff2cfc0631b32

Quoted 6 lines

This bump adds fanotify support in libmount:
https://github.com/util-linux/util-linux/commit/e3e54259e780138d0c7941bbdcb0723bb279516c
which will cause build errors with uClibc < 1.0.58 as detected by the Gitlab pipelines:

Quoted 8 lines

libmount/src/monitor_fanotify.c:33:43: error: field ‘hdr’ has
incomplete type
33 | struct fanotify_event_info_header hdr;

because fanotify_event_info_header was added to uClibc 1.0.58:
https://github.com/wbx-github/uclibc-ng/commit/c08beaadc9100f7062d9cfbfec7cc9ba2b0b38fe

so we disable this code for uClibc for now.

It's annoying to disable things that are supported with latest uClibc-ng releases. We will probably forget to re-enable them when uClibc-ng based toolchains will be updated (But we still use some really old toolchains in toolchain-configs.csv).

Quoted 417 lines

---
v3: rebased
Gitlab pipeline passed:
https://gitlab.com/bkuhls/buildroot/-/commits/6cb6e02e5bb1ab7494ba951f5ed81cd19c10f189
v2: Switched copy_file_range from !uclibc to header version limit
added fanotify fix

v2 of this patch was build-tested:
https://gitlab.com/bkuhls/buildroot/-/commits/47bc11472faba3f39946e65b83e6b486fd8f5ad1

To test each suboption individually these patches are needed to fix build errors unrelated to this bump:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

To create the Gitlab pipelines this script was used:

#!/bin/sh

  git commit --amend --date now --no-edit
  git push -f origin util-linux-2.42.2

for config_option in grep ^config package/util-linux/Config.in | grep -v BR2_PACKAGE_UTIL_LINUX_LIBS$ | sort | sed "s/config //" do

    package=`echo $config_option | sed "s/BR2_PACKAGE_UTIL_LINUX_//" | tr '[:upper:]' '[:lower:]'`

    git commit --allow-empty -m "package/util-linux: empty commit for $package test-pkg config

test-pkg config:
BR2_PACKAGE_UTIL_LINUX=y
$config_option=y
"

git push origin util-linux-2.42.2

sleep 30

done

 ...api-utils.h-fix-LSMT_ROOT-definition.patch | 44 --------------
 ...optionally-add-libpthread-to-uuid.pc.patch | 42 -------------
 ...at2-RESOLVE_NO_SYMLINKS-for-backing-.patch | 59 -------------------
 package/util-linux/Config.in                  | 25 ++++++++
 ...api-utils.h-fix-LSMT_ROOT-definition.patch | 44 --------------
 ...optionally-add-libpthread-to-uuid.pc.patch | 42 -------------
 .../util-linux-libs/util-linux-libs.mk        |  3 -
 package/util-linux/util-linux.hash            |  4 +-
 package/util-linux/util-linux.mk              | 17 +++---
 9 files changed, 36 insertions(+), 244 deletions(-)
 delete mode 100644 package/util-linux/0001-include-mount-api-utils.h-fix-LSMT_ROOT-definition.patch
 delete mode 100644 package/util-linux/0002-autotools-optionally-add-libpthread-to-uuid.pc.patch
 delete mode 100644 package/util-linux/0003-loopdev-use-openat2-RESOLVE_NO_SYMLINKS-for-backing-.patch
 delete mode 100644 package/util-linux/util-linux-libs/0001-include-mount-api-utils.h-fix-LSMT_ROOT-definition.patch
 delete mode 100644 package/util-linux/util-linux-libs/0002-autotools-optionally-add-libpthread-to-uuid.pc.patch
package/util-linux/0001-include-mount-api-utils.h-fix-LSMT_ROOT-definition.patch deleted +0 -44
deleted file mode 100644
index d98c225500..0000000000
@@ -1,44 +0,0 @@
-From 72ff3b8998a675900fcb7c18c0e03f1552b13a8b Mon Sep 17 00:00:00 2001
-From: Shubham Chakraborty <[email protected]>
-Date: Tue, 14 Apr 2026 11:04:08 +0530
-Subject: [PATCH] include/mount-api-utils.h: fix LSMT_ROOT definition
-
-Commit
-ded434a63f3eee7fd7805b18d6c9bb912016c3c8 ("include/mount-api-utils:
-add statmount and listmount") introduce a fallback definition for the
-LSMT_ROOT defined, but a small typo makes this fallback definition
-ineffective:
-
- #ifdef LSMT_ROOT
- # define LSMT_ROOT ...
- #endif
-
-Should obviously have been:
-
- #ifndef LSMT_ROOT
- # define LSMT_ROOT ...
- #endif
-
-Signed-off-by: Shubham Chakraborty <[email protected]>
-Upstream: https://lore.kernel.org/util-linux/[email protected]/T/#u
-Signed-off-by: Thomas Petazzoni <[email protected]>
----
- include/mount-api-utils.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/mount-api-utils.h b/include/mount-api-utils.h
-index a916f99..87e173e 100644
---- a/include/mount-api-utils.h
-+++ b/include/mount-api-utils.h
-@@ -339,7 +339,7 @@ struct ul_statmount {
- /*
-  * Special @mnt_id values that can be passed to listmount
-  */
--#ifdef LSMT_ROOT
-+#ifndef LSMT_ROOT
- # define LSMT_ROOT              0xffffffffffffffff    /* root mount */
- #endif
- 
--- 
-2.53.0
-
package/util-linux/0002-autotools-optionally-add-libpthread-to-uuid.pc.patch deleted +0 -42
deleted file mode 100644
index ef59e458e1..0000000000
@@ -1,42 +0,0 @@
-From a06adacd1009174b7ca35f529a2db165f6c1f3aa Mon Sep 17 00:00:00 2001
-From: Bernd Kuhls <[email protected]>
-Date: Fri, 16 Jan 2026 23:33:34 +0100
-Subject: [PATCH] autotools: optionally add libpthread to uuid.pc
-
-Fixes https://github.com/util-linux/util-linux/issues/3210#issuecomment-3477915953
-
-Upstream: https://github.com/util-linux/util-linux/commit/d88a62e4cd385e07b3cb8fb309bbb03981ea2970
-
-[Bernd: backported to 2.41.3]
-Signed-off-by: Bernd Kuhls <[email protected]>
----
- Makefile.am        | 1 +
- libuuid/uuid.pc.in | 2 +-
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 01e99701d..cd1d157ce 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -189,6 +189,7 @@ edit_cmd = sed \
- 	 -e 's|@usrbin_execdir[@]|$(usrbin_execdir)|g' \
- 	 -e 's|@usrsbin_execdir[@]|$(usrsbin_execdir)|g' \
- 	 -e 's|@SOCKET_LIBS[@]|$(SOCKET_LIBS)|g' \
-+	 -e 's|@PTHREAD_LIBS[@]|$(PTHREAD_LIBS)|g' \
- 	 -e 's|@VERSION[@]|$(VERSION)|g' \
- 	 -e 's|@ADJTIME_PATH[@]|$(ADJTIME_PATH)|g' \
- 	 -e 's|@LIBUUID_VERSION[@]|$(LIBUUID_VERSION)|g' \
-diff --git a/libuuid/uuid.pc.in b/libuuid/uuid.pc.in
-index 51929fe80..a40dc6644 100644
---- a/libuuid/uuid.pc.in
-+++ b/libuuid/uuid.pc.in
-@@ -7,5 +7,5 @@ Name: uuid
- Description: Universally unique id library
- Version: @LIBUUID_VERSION@
- Cflags: -I${includedir}/uuid
--Libs.private: @SOCKET_LIBS@ -lpthread
-+Libs.private: @SOCKET_LIBS@ @PTHREAD_LIBS@
- Libs: -L${libdir} -luuid
--- 
-2.47.3
-
package/util-linux/0003-loopdev-use-openat2-RESOLVE_NO_SYMLINKS-for-backing-.patch deleted +0 -59
deleted file mode 100644
index 7195c223ac..0000000000
@@ -1,59 +0,0 @@
-From 2dacaf3eea391e3bbf48e7d3ecce02cafe045b6d Mon Sep 17 00:00:00 2001
-From: Karel Zak <[email protected]>
-Date: Wed, 27 May 2026 15:15:22 +0200
-Subject: [PATCH] loopdev: use openat2(RESOLVE_NO_SYMLINKS) for backing file
-
-Use ul_open_no_symlinks() instead of open(O_NOFOLLOW) when
-LOOPDEV_FL_NOFOLLOW is set.  O_NOFOLLOW only rejects symlinks at the
-last path component, but TOCTOU attacks swap intermediate components.
-openat2(RESOLVE_NO_SYMLINKS) rejects symlinks at any component.
-
-Upstream: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?h=stable/v2.41&id=2dacaf3eea391e3bbf48e7d3ecce02cafe045b6d
-CVE: CVE-2026-27456
-Signed-off-by: Karel Zak <[email protected]>
-(cherry picked from commit 119d23f1e3f55cf10e3c66dab80fc308c9f26456)
-Signed-off-by: Giulio Benetti <[email protected]>
-[Fiona: add CVE trailer]
-Signed-off-by: Fiona Klute <[email protected]>
----
- lib/loopdev.c | 23 ++++++++++++++---------
- 1 file changed, 14 insertions(+), 9 deletions(-)
-
-diff --git a/lib/loopdev.c b/lib/loopdev.c
-index 76685be70..31377fc9a 100644
---- a/lib/loopdev.c
-+++ b/lib/loopdev.c
-@@ -1412,16 +1412,21 @@ int loopcxt_setup_device(struct loopdev_cxt *lc)
- 	if (lc->config.info.lo_flags & LO_FLAGS_DIRECT_IO)
- 		flags |= O_DIRECT;
- 	if (lc->flags & LOOPDEV_FL_NOFOLLOW)
--		flags |= O_NOFOLLOW;
--
--	if ((file_fd = open(lc->filename, mode | flags)) < 0) {
--		if (mode != O_RDONLY && (errno == EROFS || errno == EACCES))
--			file_fd = open(lc->filename, (mode = O_RDONLY) | flags);
-+		file_fd = ul_open_no_symlinks(lc->filename, mode | flags, 0);
-+	else
-+		file_fd = open(lc->filename, mode | flags);
- 
--		if (file_fd < 0) {
--			DBG(SETUP, ul_debugobj(lc, "open backing file failed: %m"));
--			return -errno;
--		}
-+	if (file_fd < 0 && mode != O_RDONLY
-+	    && (errno == EROFS || errno == EACCES)) {
-+		mode = O_RDONLY;
-+		if (lc->flags & LOOPDEV_FL_NOFOLLOW)
-+			file_fd = ul_open_no_symlinks(lc->filename, mode | flags, 0);
-+		else
-+			file_fd = open(lc->filename, mode | flags);
-+	}
-+	if (file_fd < 0) {
-+		DBG(SETUP, ul_debugobj(lc, "open backing file failed: %m"));
-+		return -errno;
- 	}
- 	DBG(SETUP, ul_debugobj(lc, "backing file open: OK"));
- 
--- 
-2.47.3
-
package/util-linux/Config.in +25 -0
index e6ee4c3ced..e705aa1b10 100644
@@ -106,6 +106,17 @@ config BR2_PACKAGE_UTIL_LINUX_CHMEM
 	help
 	  Sets a particular size or range of memory online or offline
 
+config BR2_PACKAGE_UTIL_LINUX_COPYFILERANGE
+	bool "copyfilerange"
+	depends on BR2_USE_MMU # fork()
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 # copy_file_range
+	help
+	  Copy file ranges using the copy_file_range() syscall
+
+comment "copyfilerange needs a toolchain w/ headers >= 4.5"
+	depends on BR2_USE_MMU
+	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
+
 config BR2_PACKAGE_UTIL_LINUX_CRAMFS
 	bool "cramfs utilities"
 	depends on BR2_USE_MMU # fork()
@@ -144,6 +155,20 @@ config BR2_PACKAGE_UTIL_LINUX_FSCK
 	help
 	  Check and repair a linux filesystem
 
+config BR2_PACKAGE_UTIL_LINUX_GETINO
+	bool "getino"
+	depends on BR2_USE_MMU # fork()
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3 # pidfd_open
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC # statx
+	help
+	  Print the unique inode number associated with a process
+	  file descriptor or namespace for a given PID.
+
+comment "getino needs a musl or glibc toolchain w/ headers >= 5.3"
+	depends on BR2_USE_MMU
+	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3 \
+		|| BR2_TOOLCHAIN_USES_UCLIBC
+
 config BR2_PACKAGE_UTIL_LINUX_HARDLINK
 	bool "hardlink"
 	depends on BR2_USE_MMU # fork()
package/util-linux/util-linux-libs/0001-include-mount-api-utils.h-fix-LSMT_ROOT-definition.patch deleted +0 -44
deleted file mode 100644
index d98c225500..0000000000
@@ -1,44 +0,0 @@
-From 72ff3b8998a675900fcb7c18c0e03f1552b13a8b Mon Sep 17 00:00:00 2001
-From: Shubham Chakraborty <[email protected]>
-Date: Tue, 14 Apr 2026 11:04:08 +0530
-Subject: [PATCH] include/mount-api-utils.h: fix LSMT_ROOT definition
-
-Commit
-ded434a63f3eee7fd7805b18d6c9bb912016c3c8 ("include/mount-api-utils:
-add statmount and listmount") introduce a fallback definition for the
-LSMT_ROOT defined, but a small typo makes this fallback definition
-ineffective:
-
- #ifdef LSMT_ROOT
- # define LSMT_ROOT ...
- #endif
-
-Should obviously have been:
-
- #ifndef LSMT_ROOT
- # define LSMT_ROOT ...
- #endif
-
-Signed-off-by: Shubham Chakraborty <[email protected]>
-Upstream: https://lore.kernel.org/util-linux/[email protected]/T/#u
-Signed-off-by: Thomas Petazzoni <[email protected]>
----
- include/mount-api-utils.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/mount-api-utils.h b/include/mount-api-utils.h
-index a916f99..87e173e 100644
---- a/include/mount-api-utils.h
-+++ b/include/mount-api-utils.h
-@@ -339,7 +339,7 @@ struct ul_statmount {
- /*
-  * Special @mnt_id values that can be passed to listmount
-  */
--#ifdef LSMT_ROOT
-+#ifndef LSMT_ROOT
- # define LSMT_ROOT              0xffffffffffffffff    /* root mount */
- #endif
- 
--- 
-2.53.0
-
package/util-linux/util-linux-libs/0002-autotools-optionally-add-libpthread-to-uuid.pc.patch deleted +0 -42
deleted file mode 100644
index ef59e458e1..0000000000
@@ -1,42 +0,0 @@
-From a06adacd1009174b7ca35f529a2db165f6c1f3aa Mon Sep 17 00:00:00 2001
-From: Bernd Kuhls <[email protected]>
-Date: Fri, 16 Jan 2026 23:33:34 +0100
-Subject: [PATCH] autotools: optionally add libpthread to uuid.pc
-
-Fixes https://github.com/util-linux/util-linux/issues/3210#issuecomment-3477915953
-
-Upstream: https://github.com/util-linux/util-linux/commit/d88a62e4cd385e07b3cb8fb309bbb03981ea2970
-
-[Bernd: backported to 2.41.3]
-Signed-off-by: Bernd Kuhls <[email protected]>
----
- Makefile.am        | 1 +
- libuuid/uuid.pc.in | 2 +-
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 01e99701d..cd1d157ce 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -189,6 +189,7 @@ edit_cmd = sed \
- 	 -e 's|@usrbin_execdir[@]|$(usrbin_execdir)|g' \
- 	 -e 's|@usrsbin_execdir[@]|$(usrsbin_execdir)|g' \
- 	 -e 's|@SOCKET_LIBS[@]|$(SOCKET_LIBS)|g' \
-+	 -e 's|@PTHREAD_LIBS[@]|$(PTHREAD_LIBS)|g' \
- 	 -e 's|@VERSION[@]|$(VERSION)|g' \
- 	 -e 's|@ADJTIME_PATH[@]|$(ADJTIME_PATH)|g' \
- 	 -e 's|@LIBUUID_VERSION[@]|$(LIBUUID_VERSION)|g' \
-diff --git a/libuuid/uuid.pc.in b/libuuid/uuid.pc.in
-index 51929fe80..a40dc6644 100644
---- a/libuuid/uuid.pc.in
-+++ b/libuuid/uuid.pc.in
-@@ -7,5 +7,5 @@ Name: uuid
- Description: Universally unique id library
- Version: @LIBUUID_VERSION@
- Cflags: -I${includedir}/uuid
--Libs.private: @SOCKET_LIBS@ -lpthread
-+Libs.private: @SOCKET_LIBS@ @PTHREAD_LIBS@
- Libs: -L${libdir} -luuid
--- 
-2.47.3
-
package/util-linux/util-linux-libs/util-linux-libs.mk +0 -3
index 6716a656d2..9340d5ae4f 100644
@@ -21,9 +21,6 @@ UTIL_LINUX_LIBS_LICENSE_FILES = README.licensing \
 	Documentation/licenses/COPYING.BSD-3-Clause \
 	Documentation/licenses/COPYING.LGPL-2.1-or-later
 
-# 0002-autotools-optionally-add-libpthread-to-uuid.pc.patch
-UTIL_LINUX_LIBS_AUTORECONF = YES
-
 UTIL_LINUX_LIBS_INSTALL_STAGING = YES
 UTIL_LINUX_LIBS_DEPENDENCIES = \
 	host-pkgconf \
package/util-linux/util-linux.hash +2 -2
index b6393d6ec0..b65527408b 100644
@@ -1,5 +1,5 @@
-# From https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.41/sha256sums.asc
-sha256  f586e35d320ff537aab3ffeca37e9ecd482ccbe013590db4429a414d8aa6a728  util-linux-2.41.5.tar.xz
+# From https://www.kernel.org/pub/linux/utils/util-linux/v2.42/sha256sums.asc
+sha256  03a05d3adf9602ef128f2da05b84b3205ce60c351e5737c0370f74000679ce8a  util-linux-2.42.2.tar.xz
 # License files, locally calculated
 sha256  4c2db318192bda62f3f8fcf71488bb5e602ae4385eba281d711b46cc13a40bb3  README.licensing
 sha256  527f738966ca396cd5a68c1509390de2a780c6b614d9ee57f7544a6161938ed1  Documentation/licenses/COPYING.BSD-2-Clause
package/util-linux/util-linux.mk +2 -8
index 83517e88c0..cae2a494e6 100644
@@ -7,8 +7,8 @@
 # When making changes to this file, please check if
 # util-linux-libs/util-linux-libs.mk needs to be updated accordingly as well.
 
-UTIL_LINUX_VERSION_MAJOR = 2.41
-UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).5
+UTIL_LINUX_VERSION_MAJOR = 2.42
+UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).2
 UTIL_LINUX_SOURCE = util-linux-$(UTIL_LINUX_VERSION).tar.xz
 UTIL_LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/util-linux/v$(UTIL_LINUX_VERSION_MAJOR)
 
@@ -37,12 +37,6 @@ UTIL_LINUX_LICENSE_FILES = README.licensing \
 
 UTIL_LINUX_CPE_ID_VENDOR = kernel
 
-# package/util-linux/0003-loopdev-use-openat2-RESOLVE_NO_SYMLINKS-for-backing-.patch
-UTIL_LINUX_IGNORE_CVES += CVE-2026-27456
-
-# 0002-autotools-optionally-add-libpthread-to-uuid.pc.patch
-UTIL_LINUX_AUTORECONF = YES
-
 UTIL_LINUX_INSTALL_STAGING = YES
 UTIL_LINUX_DEPENDENCIES = \
 	host-pkgconf \

package/util-linux/util-linux.mk endif · line 127

Quoted 5 lines
package/util-linux/util-linux.mk +2 -0
@@ -129,6 +123,11 @@ endif
 # workaround for static_assert on uclibc-ng < 1.0.42
 UTIL_LINUX_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -Dstatic_assert=_Static_assert"
 
+# fanotify_event_info_header is missing on uclibc-ng < 1.0.58
+ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)

It could have been enabled using the internal toolchain backend that is using uclibc-ng 1.0.58 already. Maybe use BR2_TOOLCHAIN_EXTERNAL_UCLIBC here (still not a perfect solution either)?

Best regards,
Romain

Quoted 10 lines
package/util-linux/util-linux.mk +3 -0
+UTIL_LINUX_CONF_ENV += ac_cv_type_struct_fanotify_event_info_header=no
+endif
+
 # Unfortunately, the util-linux does LIBS="" at the end of its
 # configure script. So we have to pass the proper LIBS value when
 # calling the configure script to make configure tests pass properly,
@@ -174,11 +173,13 @@ UTIL_LINUX_CONF_OPTS += \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_CAL),--enable-cal,--disable-cal) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_CHFN_CHSH),--enable-chfn-chsh,--disable-chfn-chsh) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_CHMEM),--enable-chmem,--disable-chmem) \

package/util-linux/util-linux.mk UTIL_LINUX_CONF_OPTS += \ · line 185

Quoted 10 lines
package/util-linux/util-linux.mk +2 -0
+	$(if $(BR2_PACKAGE_UTIL_LINUX_COPYFILERANGE),--enable-copyfilerange,--disable-copyfilerange) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_CRAMFS),--enable-cramfs,--disable-cramfs) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_EJECT),--enable-eject,--disable-eject) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_FALLOCATE),--enable-fallocate,--disable-fallocate) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_FDFORMAT),--enable-fdformat,--disable-fdformat) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_FSCK),--enable-fsck,--disable-fsck) \
+	$(if $(BR2_PACKAGE_UTIL_LINUX_GETINO),--enable-getino,--disable-getino) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_HARDLINK),--enable-hardlink,--disable-hardlink) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_HWCLOCK),--enable-hwclock --disable-hwclock-gplv3,--disable-hwclock) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_IPCMK),--enable-ipcmk,--disable-ipcmk) \

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw

Hi Romain, Bernd, all!

Am 29.06.26 um 23:20 schrieb Romain Naour via buildroot:

Quoted 482 lines

Hello Bernd, All,

Le 25/06/2026 à 22:17, Bernd Kuhls a écrit :

Quoted 25 lines

https://www.kernel.org/pub/linux/utils/util-linux/v2.42/v2.42.2-ReleaseNotes
https://www.kernel.org/pub/linux/utils/util-linux/v2.42/v2.42.1-ReleaseNotes
https://www.kernel.org/pub/linux/utils/util-linux/v2.42/v2.42-ReleaseNotes

Removed patches which were applied upstream, also remove autoreconf.

Patch 0001 was applied as
https://github.com/util-linux/util-linux/commit/57dab03caf941bf01544cc4548e36cc0c3357d2c
after the rename of the original header with commit
https://github.com/util-linux/util-linux/commit/f419d67de67610180fb04e64d21323ce8927d31d

Added Config.in options for new commands copyfilerange & getino.

copyfilerange is broken according to the Gitlab pipelines only with the br-arm-full-static defconfig:

configure: WARNING: Unable to detect syscall copy_file_range.
configure: error: copyfilerange selected but copy_file_range syscall
not found

because this defconfig uses kernel headers version 4.4. copy_file_range() was added to Linux in version 4.5 with commit
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=29732938a6289a15e907da234d6692a2ead71855
so we require kernel headers >= 4.5 for copyfilerange.

Quoted 7 lines

getino builds when current uClibc is built from source but fails on the Gitlab pipelines with all uClibc-based toolchains:

configure: error: getino selected, but required statx function not
available

so we disable getino for uClibc for now.

While the option is "BR2_TOOLCHAIN_USES_UCLIBC", we should use "uClibc-ng" in the commit log.

We probably need the latest (v1.0.57) version of uClibc-ng as well:
https://github.com/wbx-github/uclibc-ng/commit/d3a819aff25af436e22abd5ba01ff2cfc0631b32

Quoted 6 lines

This bump adds fanotify support in libmount:
https://github.com/util-linux/util-linux/commit/e3e54259e780138d0c7941bbdcb0723bb279516c
which will cause build errors with uClibc < 1.0.58 as detected by the Gitlab pipelines:

Quoted 8 lines

libmount/src/monitor_fanotify.c:33:43: error: field ‘hdr’ has

     incomplete type
    33 |         struct fanotify_event_info_header hdr;

because fanotify_event_info_header was added to uClibc 1.0.58:
https://github.com/wbx-github/uclibc-ng/commit/c08beaadc9100f7062d9cfbfec7cc9ba2b0b38fe

so we disable this code for uClibc for now.

It's annoying to disable things that are supported with latest uClibc-ng releases. We will probably forget to re-enable them when uClibc-ng based toolchains will be updated (But we still use some really old toolchains in toolchain-configs.csv).

Quoted 420 lines

---
v3: rebased
Gitlab pipeline passed:
https://gitlab.com/bkuhls/buildroot/-/commits/6cb6e02e5bb1ab7494ba951f5ed81cd19c10f189
v2: Switched copy_file_range from !uclibc to header version limit
added fanotify fix

v2 of this patch was build-tested:
https://gitlab.com/bkuhls/buildroot/-/commits/47bc11472faba3f39946e65b83e6b486fd8f5ad1

To test each suboption individually these patches are needed to fix build errors unrelated to this bump:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

To create the Gitlab pipelines this script was used:

   #!/bin/sh

   git commit --amend --date now --no-edit
   git push -f origin util-linux-2.42.2

   for config_option in `grep ^config package/util-linux/Config.in | grep -v BR2_PACKAGE_UTIL_LINUX_LIBS$ | sort | sed "s/config //"`
   do

     package=`echo $config_option | sed "s/BR2_PACKAGE_UTIL_LINUX_//" | tr '[:upper:]' '[:lower:]'`

     git commit --allow-empty -m "package/util-linux: empty commit for $package test-pkg config

   test-pkg config:
   BR2_PACKAGE_UTIL_LINUX=y
   $config_option=y
   "

     git push origin util-linux-2.42.2

     sleep 30

   done
  ...api-utils.h-fix-LSMT_ROOT-definition.patch | 44 --------------
  ...optionally-add-libpthread-to-uuid.pc.patch | 42 -------------
  ...at2-RESOLVE_NO_SYMLINKS-for-backing-.patch | 59 -------------------
  package/util-linux/Config.in                  | 25 ++++++++
  ...api-utils.h-fix-LSMT_ROOT-definition.patch | 44 --------------
  ...optionally-add-libpthread-to-uuid.pc.patch | 42 -------------
  .../util-linux-libs/util-linux-libs.mk        |  3 -
  package/util-linux/util-linux.hash            |  4 +-
  package/util-linux/util-linux.mk              | 17 +++---
  9 files changed, 36 insertions(+), 244 deletions(-)

delete mode 100644 package/util-linux/0001-include-mount-api-utils.h-fix-LSMT_ROOT-definition.patch delete mode 100644 package/util-linux/0002-autotools-optionally-add-libpthread-to-uuid.pc.patch delete mode 100644 package/util-linux/0003-loopdev-use-openat2-RESOLVE_NO_SYMLINKS-for-backing-.patch delete mode 100644 package/util-linux/util-linux-libs/0001-include-mount-api-utils.h-fix-LSMT_ROOT-definition.patch delete mode 100644 package/util-linux/util-linux-libs/0002-autotools-optionally-add-libpthread-to-uuid.pc.patch

package/util-linux/0001-include-mount-api-utils.h-fix-LSMT_ROOT-definition.patch deleted +0 -44
deleted file mode 100644
index d98c225500..0000000000
@@ -1,44 +0,0 @@
-From 72ff3b8998a675900fcb7c18c0e03f1552b13a8b Mon Sep 17 00:00:00 2001
-From: Shubham Chakraborty <[email protected]>
-Date: Tue, 14 Apr 2026 11:04:08 +0530
-Subject: [PATCH] include/mount-api-utils.h: fix LSMT_ROOT definition
-
-Commit
-ded434a63f3eee7fd7805b18d6c9bb912016c3c8 ("include/mount-api-utils:
-add statmount and listmount") introduce a fallback definition for the
-LSMT_ROOT defined, but a small typo makes this fallback definition
-ineffective:
-
- #ifdef LSMT_ROOT
- # define LSMT_ROOT ...
- #endif
-
-Should obviously have been:
-
- #ifndef LSMT_ROOT
- # define LSMT_ROOT ...
- #endif
-
-Signed-off-by: Shubham Chakraborty <[email protected]>
-Upstream: https://lore.kernel.org/util-linux/[email protected]/T/#u
-Signed-off-by: Thomas Petazzoni <[email protected]>
----
- include/mount-api-utils.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/mount-api-utils.h b/include/mount-api-utils.h
-index a916f99..87e173e 100644
---- a/include/mount-api-utils.h
-+++ b/include/mount-api-utils.h
-@@ -339,7 +339,7 @@ struct ul_statmount {
- /*
-  * Special @mnt_id values that can be passed to listmount
-  */
--#ifdef LSMT_ROOT
-+#ifndef LSMT_ROOT
- # define LSMT_ROOT              0xffffffffffffffff    /* root mount */
- #endif
-
---
-2.53.0
-
package/util-linux/0002-autotools-optionally-add-libpthread-to-uuid.pc.patch deleted +0 -42
deleted file mode 100644
index ef59e458e1..0000000000
@@ -1,42 +0,0 @@
-From a06adacd1009174b7ca35f529a2db165f6c1f3aa Mon Sep 17 00:00:00 2001
-From: Bernd Kuhls <[email protected]>
-Date: Fri, 16 Jan 2026 23:33:34 +0100
-Subject: [PATCH] autotools: optionally add libpthread to uuid.pc
-
-Fixes https://github.com/util-linux/util-linux/issues/3210#issuecomment-3477915953
-
-Upstream: https://github.com/util-linux/util-linux/commit/d88a62e4cd385e07b3cb8fb309bbb03981ea2970
-
-[Bernd: backported to 2.41.3]
-Signed-off-by: Bernd Kuhls <[email protected]>
----
- Makefile.am        | 1 +
- libuuid/uuid.pc.in | 2 +-
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 01e99701d..cd1d157ce 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -189,6 +189,7 @@ edit_cmd = sed \
- 	 -e 's|@usrbin_execdir[@]|$(usrbin_execdir)|g' \
- 	 -e 's|@usrsbin_execdir[@]|$(usrsbin_execdir)|g' \
- 	 -e 's|@SOCKET_LIBS[@]|$(SOCKET_LIBS)|g' \
-+	 -e 's|@PTHREAD_LIBS[@]|$(PTHREAD_LIBS)|g' \
- 	 -e 's|@VERSION[@]|$(VERSION)|g' \
- 	 -e 's|@ADJTIME_PATH[@]|$(ADJTIME_PATH)|g' \
- 	 -e 's|@LIBUUID_VERSION[@]|$(LIBUUID_VERSION)|g' \
-diff --git a/libuuid/uuid.pc.in b/libuuid/uuid.pc.in
-index 51929fe80..a40dc6644 100644
---- a/libuuid/uuid.pc.in
-+++ b/libuuid/uuid.pc.in
-@@ -7,5 +7,5 @@ Name: uuid
- Description: Universally unique id library
- Version: @LIBUUID_VERSION@
- Cflags: -I${includedir}/uuid
--Libs.private: @SOCKET_LIBS@ -lpthread
-+Libs.private: @SOCKET_LIBS@ @PTHREAD_LIBS@
- Libs: -L${libdir} -luuid
---
-2.47.3
-
package/util-linux/0003-loopdev-use-openat2-RESOLVE_NO_SYMLINKS-for-backing-.patch deleted +0 -59
deleted file mode 100644
index 7195c223ac..0000000000
@@ -1,59 +0,0 @@
-From 2dacaf3eea391e3bbf48e7d3ecce02cafe045b6d Mon Sep 17 00:00:00 2001
-From: Karel Zak <[email protected]>
-Date: Wed, 27 May 2026 15:15:22 +0200
-Subject: [PATCH] loopdev: use openat2(RESOLVE_NO_SYMLINKS) for backing file
-
-Use ul_open_no_symlinks() instead of open(O_NOFOLLOW) when
-LOOPDEV_FL_NOFOLLOW is set.  O_NOFOLLOW only rejects symlinks at the
-last path component, but TOCTOU attacks swap intermediate components.
-openat2(RESOLVE_NO_SYMLINKS) rejects symlinks at any component.
-
-Upstream: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?h=stable/v2.41&id=2dacaf3eea391e3bbf48e7d3ecce02cafe045b6d
-CVE: CVE-2026-27456
-Signed-off-by: Karel Zak <[email protected]>
-(cherry picked from commit 119d23f1e3f55cf10e3c66dab80fc308c9f26456)
-Signed-off-by: Giulio Benetti <[email protected]>
-[Fiona: add CVE trailer]
-Signed-off-by: Fiona Klute <[email protected]>
----
- lib/loopdev.c | 23 ++++++++++++++---------
- 1 file changed, 14 insertions(+), 9 deletions(-)
-
-diff --git a/lib/loopdev.c b/lib/loopdev.c
-index 76685be70..31377fc9a 100644
---- a/lib/loopdev.c
-+++ b/lib/loopdev.c
-@@ -1412,16 +1412,21 @@ int loopcxt_setup_device(struct loopdev_cxt *lc)
- 	if (lc->config.info.lo_flags & LO_FLAGS_DIRECT_IO)
- 		flags |= O_DIRECT;
- 	if (lc->flags & LOOPDEV_FL_NOFOLLOW)
--		flags |= O_NOFOLLOW;
--
--	if ((file_fd = open(lc->filename, mode | flags)) < 0) {
--		if (mode != O_RDONLY && (errno == EROFS || errno == EACCES))
--			file_fd = open(lc->filename, (mode = O_RDONLY) | flags);
-+		file_fd = ul_open_no_symlinks(lc->filename, mode | flags, 0);
-+	else
-+		file_fd = open(lc->filename, mode | flags);
-
--		if (file_fd < 0) {
--			DBG(SETUP, ul_debugobj(lc, "open backing file failed: %m"));
--			return -errno;
--		}
-+	if (file_fd < 0 && mode != O_RDONLY
-+	    && (errno == EROFS || errno == EACCES)) {
-+		mode = O_RDONLY;
-+		if (lc->flags & LOOPDEV_FL_NOFOLLOW)
-+			file_fd = ul_open_no_symlinks(lc->filename, mode | flags, 0);
-+		else
-+			file_fd = open(lc->filename, mode | flags);
-+	}
-+	if (file_fd < 0) {
-+		DBG(SETUP, ul_debugobj(lc, "open backing file failed: %m"));
-+		return -errno;
- 	}
- 	DBG(SETUP, ul_debugobj(lc, "backing file open: OK"));
-
---
-2.47.3
-
package/util-linux/Config.in +25 -0
index e6ee4c3ced..e705aa1b10 100644
@@ -106,6 +106,17 @@ config BR2_PACKAGE_UTIL_LINUX_CHMEM
  	help
  	  Sets a particular size or range of memory online or offline
 
+config BR2_PACKAGE_UTIL_LINUX_COPYFILERANGE
+	bool "copyfilerange"
+	depends on BR2_USE_MMU # fork()
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 # copy_file_range
+	help
+	  Copy file ranges using the copy_file_range() syscall
+
+comment "copyfilerange needs a toolchain w/ headers >= 4.5"
+	depends on BR2_USE_MMU
+	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
+
  config BR2_PACKAGE_UTIL_LINUX_CRAMFS
  	bool "cramfs utilities"
  	depends on BR2_USE_MMU # fork()
@@ -144,6 +155,20 @@ config BR2_PACKAGE_UTIL_LINUX_FSCK
  	help
  	  Check and repair a linux filesystem
 
+config BR2_PACKAGE_UTIL_LINUX_GETINO
+	bool "getino"
+	depends on BR2_USE_MMU # fork()
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3 # pidfd_open
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC # statx
+	help
+	  Print the unique inode number associated with a process
+	  file descriptor or namespace for a given PID.
+
+comment "getino needs a musl or glibc toolchain w/ headers >= 5.3"
+	depends on BR2_USE_MMU
+	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3 \
+		|| BR2_TOOLCHAIN_USES_UCLIBC
+
  config BR2_PACKAGE_UTIL_LINUX_HARDLINK
  	bool "hardlink"
  	depends on BR2_USE_MMU # fork()
package/util-linux/util-linux-libs/0001-include-mount-api-utils.h-fix-LSMT_ROOT-definition.patch deleted +0 -44
deleted file mode 100644
index d98c225500..0000000000
@@ -1,44 +0,0 @@
-From 72ff3b8998a675900fcb7c18c0e03f1552b13a8b Mon Sep 17 00:00:00 2001
-From: Shubham Chakraborty <[email protected]>
-Date: Tue, 14 Apr 2026 11:04:08 +0530
-Subject: [PATCH] include/mount-api-utils.h: fix LSMT_ROOT definition
-
-Commit
-ded434a63f3eee7fd7805b18d6c9bb912016c3c8 ("include/mount-api-utils:
-add statmount and listmount") introduce a fallback definition for the
-LSMT_ROOT defined, but a small typo makes this fallback definition
-ineffective:
-
- #ifdef LSMT_ROOT
- # define LSMT_ROOT ...
- #endif
-
-Should obviously have been:
-
- #ifndef LSMT_ROOT
- # define LSMT_ROOT ...
- #endif
-
-Signed-off-by: Shubham Chakraborty <[email protected]>
-Upstream: https://lore.kernel.org/util-linux/[email protected]/T/#u
-Signed-off-by: Thomas Petazzoni <[email protected]>
----
- include/mount-api-utils.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/mount-api-utils.h b/include/mount-api-utils.h
-index a916f99..87e173e 100644
---- a/include/mount-api-utils.h
-+++ b/include/mount-api-utils.h
-@@ -339,7 +339,7 @@ struct ul_statmount {
- /*
-  * Special @mnt_id values that can be passed to listmount
-  */
--#ifdef LSMT_ROOT
-+#ifndef LSMT_ROOT
- # define LSMT_ROOT              0xffffffffffffffff    /* root mount */
- #endif
-
---
-2.53.0
-
package/util-linux/util-linux-libs/0002-autotools-optionally-add-libpthread-to-uuid.pc.patch deleted +0 -42
deleted file mode 100644
index ef59e458e1..0000000000
@@ -1,42 +0,0 @@
-From a06adacd1009174b7ca35f529a2db165f6c1f3aa Mon Sep 17 00:00:00 2001
-From: Bernd Kuhls <[email protected]>
-Date: Fri, 16 Jan 2026 23:33:34 +0100
-Subject: [PATCH] autotools: optionally add libpthread to uuid.pc
-
-Fixes https://github.com/util-linux/util-linux/issues/3210#issuecomment-3477915953
-
-Upstream: https://github.com/util-linux/util-linux/commit/d88a62e4cd385e07b3cb8fb309bbb03981ea2970
-
-[Bernd: backported to 2.41.3]
-Signed-off-by: Bernd Kuhls <[email protected]>
----
- Makefile.am        | 1 +
- libuuid/uuid.pc.in | 2 +-
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 01e99701d..cd1d157ce 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -189,6 +189,7 @@ edit_cmd = sed \
- 	 -e 's|@usrbin_execdir[@]|$(usrbin_execdir)|g' \
- 	 -e 's|@usrsbin_execdir[@]|$(usrsbin_execdir)|g' \
- 	 -e 's|@SOCKET_LIBS[@]|$(SOCKET_LIBS)|g' \
-+	 -e 's|@PTHREAD_LIBS[@]|$(PTHREAD_LIBS)|g' \
- 	 -e 's|@VERSION[@]|$(VERSION)|g' \
- 	 -e 's|@ADJTIME_PATH[@]|$(ADJTIME_PATH)|g' \
- 	 -e 's|@LIBUUID_VERSION[@]|$(LIBUUID_VERSION)|g' \
-diff --git a/libuuid/uuid.pc.in b/libuuid/uuid.pc.in
-index 51929fe80..a40dc6644 100644
---- a/libuuid/uuid.pc.in
-+++ b/libuuid/uuid.pc.in
-@@ -7,5 +7,5 @@ Name: uuid
- Description: Universally unique id library
- Version: @LIBUUID_VERSION@
- Cflags: -I${includedir}/uuid
--Libs.private: @SOCKET_LIBS@ -lpthread
-+Libs.private: @SOCKET_LIBS@ @PTHREAD_LIBS@
- Libs: -L${libdir} -luuid
---
-2.47.3
-
package/util-linux/util-linux-libs/util-linux-libs.mk +0 -3
index 6716a656d2..9340d5ae4f 100644
@@ -21,9 +21,6 @@ UTIL_LINUX_LIBS_LICENSE_FILES = README.licensing \
  	Documentation/licenses/COPYING.BSD-3-Clause \
  	Documentation/licenses/COPYING.LGPL-2.1-or-later
 
-# 0002-autotools-optionally-add-libpthread-to-uuid.pc.patch
-UTIL_LINUX_LIBS_AUTORECONF = YES
-
  UTIL_LINUX_LIBS_INSTALL_STAGING = YES
  UTIL_LINUX_LIBS_DEPENDENCIES = \
  	host-pkgconf \
package/util-linux/util-linux.hash +2 -2
index b6393d6ec0..b65527408b 100644
@@ -1,5 +1,5 @@
-# From https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.41/sha256sums.asc
-sha256  f586e35d320ff537aab3ffeca37e9ecd482ccbe013590db4429a414d8aa6a728  util-linux-2.41.5.tar.xz
+# From https://www.kernel.org/pub/linux/utils/util-linux/v2.42/sha256sums.asc
+sha256  03a05d3adf9602ef128f2da05b84b3205ce60c351e5737c0370f74000679ce8a  util-linux-2.42.2.tar.xz
  # License files, locally calculated
  sha256  4c2db318192bda62f3f8fcf71488bb5e602ae4385eba281d711b46cc13a40bb3  README.licensing
  sha256  527f738966ca396cd5a68c1509390de2a780c6b614d9ee57f7544a6161938ed1  Documentation/licenses/COPYING.BSD-2-Clause
package/util-linux/util-linux.mk +2 -8
index 83517e88c0..cae2a494e6 100644
@@ -7,8 +7,8 @@
  # When making changes to this file, please check if
  # util-linux-libs/util-linux-libs.mk needs to be updated accordingly as well.
 
-UTIL_LINUX_VERSION_MAJOR = 2.41
-UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).5
+UTIL_LINUX_VERSION_MAJOR = 2.42
+UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).2
  UTIL_LINUX_SOURCE = util-linux-$(UTIL_LINUX_VERSION).tar.xz
  UTIL_LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/util-linux/v$(UTIL_LINUX_VERSION_MAJOR)
 
@@ -37,12 +37,6 @@ UTIL_LINUX_LICENSE_FILES = README.licensing \
 
  UTIL_LINUX_CPE_ID_VENDOR = kernel
 
-# package/util-linux/0003-loopdev-use-openat2-RESOLVE_NO_SYMLINKS-for-backing-.patch
-UTIL_LINUX_IGNORE_CVES += CVE-2026-27456
-
-# 0002-autotools-optionally-add-libpthread-to-uuid.pc.patch
-UTIL_LINUX_AUTORECONF = YES
-
  UTIL_LINUX_INSTALL_STAGING = YES
  UTIL_LINUX_DEPENDENCIES = \
  	host-pkgconf \
@@ -129,6 +123,11 @@ endif
  # workaround for static_assert on uclibc-ng < 1.0.42
  UTIL_LINUX_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -Dstatic_assert=_Static_assert"
 
Quoted 6 lines

package/util-linux/util-linux.mk endif · line 127

Quoted 2 lines
package/util-linux/util-linux.mk +2 -0
+# fanotify_event_info_header is missing on uclibc-ng < 1.0.58
+ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)

It could have been enabled using the internal toolchain backend that is using uclibc-ng 1.0.58 already. Maybe use BR2_TOOLCHAIN_EXTERNAL_UCLIBC here (still not a perfect solution either)?

It itches me to disable something that should work with the right toolchain, too. I wonder what would be a nice solution? Adding a BR2_TOOLCHAIN_UCLIBC_AT_LEAST_1_0_58 option that the internal toolchain can select (and possibly well-known external ones in the future), and that users would have to set when configuring other external toolchains?

If it's too much complexity I agree that disabling features that need a current uClibc-ng for external toolchains only is preferable to entirely.

Best regards,
Fiona

Quoted 20 lines

Best regards,
Romain

Quoted 17 lines
package/util-linux/util-linux.mk +5 -0
+UTIL_LINUX_CONF_ENV += ac_cv_type_struct_fanotify_event_info_header=no
+endif
+
  # Unfortunately, the util-linux does LIBS="" at the end of its
  # configure script. So we have to pass the proper LIBS value when
  # calling the configure script to make configure tests pass properly,
@@ -174,11 +173,13 @@ UTIL_LINUX_CONF_OPTS += \
  	$(if $(BR2_PACKAGE_UTIL_LINUX_CAL),--enable-cal,--disable-cal) \
  	$(if $(BR2_PACKAGE_UTIL_LINUX_CHFN_CHSH),--enable-chfn-chsh,--disable-chfn-chsh) \
  	$(if $(BR2_PACKAGE_UTIL_LINUX_CHMEM),--enable-chmem,--disable-chmem) \
+	$(if $(BR2_PACKAGE_UTIL_LINUX_COPYFILERANGE),--enable-copyfilerange,--disable-copyfilerange) \
  	$(if $(BR2_PACKAGE_UTIL_LINUX_CRAMFS),--enable-cramfs,--disable-cramfs) \
  	$(if $(BR2_PACKAGE_UTIL_LINUX_EJECT),--enable-eject,--disable-eject) \
  	$(if $(BR2_PACKAGE_UTIL_LINUX_FALLOCATE),--enable-fallocate,--disable-fallocate) \
  	$(if $(BR2_PACKAGE_UTIL_LINUX_FDFORMAT),--enable-fdformat,--disable-fdformat) \
  	$(if $(BR2_PACKAGE_UTIL_LINUX_FSCK),--enable-fsck,--disable-fsck) \
+	$(if $(BR2_PACKAGE_UTIL_LINUX_GETINO),--enable-getino,--disable-getino) \
Quoted 8 lines

package/util-linux/util-linux.mk UTIL_LINUX_CONF_OPTS += \ · line 185

Quoted 3 lines
package/util-linux/util-linux.mk +0 -0
  	$(if $(BR2_PACKAGE_UTIL_LINUX_HARDLINK),--enable-hardlink,--disable-hardlink) \
  	$(if $(BR2_PACKAGE_UTIL_LINUX_HWCLOCK),--enable-hwclock --disable-hwclock-gplv3,--disable-hwclock) \
  	$(if $(BR2_PACKAGE_UTIL_LINUX_IPCMK),--enable-ipcmk,--disable-ipcmk) \

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot