Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v1] package/util-linux: bump to 2.41
@ 2025-03-25 10:16 Thomas Devoogdt
  2025-03-26 13:24 ` Waldemar Brodkorb
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Devoogdt @ 2025-03-25 10:16 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Devoogdt

From: Thomas Devoogdt <thomas.devoogdt@barco.com>

News: https://lore.kernel.org/util-linux/2cifsg7vkdiivfsmmximhbzybrsopn7zfqgwz2f6hyflh35pjr@ecyicq2cbsro/

- Dropped patches which are all upstream.
- Synced all license files.

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
---
 ...ch.c-fix-build-with-uclibc-ng-1.0.39.patch | 39 ---------
 .../0002-c.h-consolidate-THREAD_LOCAL.patch   | 65 ---------------
 ...ine-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch | 47 -----------
 .../0004-meson-add-HAVE_LIBPTHREAD.patch      | 27 ------
 ...non-cached-scenarios-when-lpthread-i.patch | 82 -------------------
 package/util-linux/util-linux.hash            | 10 ++-
 package/util-linux/util-linux.mk              |  8 +-
 7 files changed, 13 insertions(+), 265 deletions(-)
 delete mode 100644 package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
 delete mode 100644 package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
 delete mode 100644 package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
 delete mode 100644 package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
 delete mode 100644 package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch

diff --git a/package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch b/package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
deleted file mode 100644
index 12dd119ef3..0000000000
--- a/package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From beef18da4de87ca5aaadf2beb14187f35cc4f50f Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Date: Wed, 15 May 2024 18:22:11 +0200
-Subject: [PATCH] sys-utils/setarch.c: fix build with uclibc-ng < 1.0.39
-
-Fix the following build failure with uclibc-ng < 1.0.39 (i.e., without
-https://github.com/wbx-github/uclibc-ng/commit/85ac4f04d94e98389a8315e720630d0f95bfdfd6)
-raised since version 2.39 and
-https://github.com/util-linux/util-linux/commit/03a254f010b08da1175f50a8ae7882e59228f1b4:
-
-sys-utils/setarch.c:106:7: error: 'PER_LINUX32_3GB' undeclared here (not in a function); did you mean 'PER_LINUX32'?
-  106 |     X(PER_LINUX32_3GB) \
-      |       ^~~~~~~~~~~~~~~
-
-Fixes:
- - http://autobuild.buildroot.org/results/fb1feb47f2660882fa53f66bacc63e191fd52175
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Upstream: https://github.com/util-linux/util-linux/commit/4647fc6afbf7e99c49531600425df60f1243fcd2
----
- sys-utils/setarch.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
-index 227bc6b5de..4bcb5e69e6 100644
---- a/sys-utils/setarch.c
-+++ b/sys-utils/setarch.c
-@@ -89,6 +89,11 @@
- # define PER_LINUX_FDPIC	(PER_LINUX | FDPIC_FUNCPTRS)
- #endif
- 
-+/* fallback for old uclibc-headers < 1.0.39 */
-+#ifndef PER_LINUX32_3GB
-+# define PER_LINUX32_3GB	(PER_LINUX32 | ADDR_LIMIT_3GB)
-+#endif
-+
- #define ALL_PERSONALITIES \
-     X(PER_LINUX) \
-     X(PER_LINUX_32BIT) \
diff --git a/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch b/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
deleted file mode 100644
index bb1a63ecc2..0000000000
--- a/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 7b3db914fa9073c667ea482c8b6b4e07fe6202cc Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 27 Jan 2025 13:40:23 +0100
-Subject: [PATCH] c.h: consolidate THREAD_LOCAL.
-
-Let's define this macro in one place only.
-
-Upstream: https://github.com/util-linux/util-linux/pull/3383
-Signed-off-by: Karel Zak <kzak@redhat.com>
-Signed-off-by: Julien Olivain <ju.o@free.fr>
----
- include/c.h            | 9 +++++++++
- lib/randutils.c        | 5 -----
- libuuid/src/gen_uuid.c | 1 -
- 3 files changed, 9 insertions(+), 6 deletions(-)
-
-diff --git a/include/c.h b/include/c.h
-index 61b95ab2d..848c48536 100644
---- a/include/c.h
-+++ b/include/c.h
-@@ -595,4 +595,13 @@ static inline void *reallocarray(void *ptr, size_t nmemb, size_t size)
- }
- #endif
- 
-+/*
-+ * thread-local storage
-+ */
-+#ifdef HAVE_TLS
-+# define THREAD_LOCAL static __thread
-+#else
-+# define THREAD_LOCAL static
-+#endif
-+
- #endif /* UTIL_LINUX_C_H */
-diff --git a/lib/randutils.c b/lib/randutils.c
-index 15c2f7834..4c806e682 100644
---- a/lib/randutils.c
-+++ b/lib/randutils.c
-@@ -20,11 +20,6 @@
- #include "randutils.h"
- #include "nls.h"
- 
--#ifdef HAVE_TLS
--#define THREAD_LOCAL static __thread
--#else
--#define THREAD_LOCAL static
--#endif
- 
- #ifdef HAVE_GETRANDOM
- # include <sys/random.h>
-diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
-index 3b76ddc9a..69712267f 100644
---- a/libuuid/src/gen_uuid.c
-+++ b/libuuid/src/gen_uuid.c
-@@ -92,7 +92,6 @@
- #include "md5.h"
- #include "sha1.h"
- 
--#define THREAD_LOCAL static __thread
- 
- #ifdef _WIN32
- static void gettimeofday (struct timeval *tv, void *dummy)
--- 
-2.48.1
-
diff --git a/package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch b/package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
deleted file mode 100644
index 843253a56a..0000000000
--- a/package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 0735eb8bc0ed4bc9820ea7e4e600fed246457b18 Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 27 Jan 2025 14:01:38 +0100
-Subject: [PATCH] autotools: define HAVE_LIBPTHREAD and PTHREAD_LIBS
-
-Upstream: https://github.com/util-linux/util-linux/pull/3383
-Signed-off-by: Karel Zak <kzak@redhat.com>
-Signed-off-by: Julien Olivain <ju.o@free.fr>
----
- configure.ac              | 7 +++++++
- libuuid/src/Makemodule.am | 2 +-
- 2 files changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 82d0e4bf9..9a7f260c5 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -738,6 +738,13 @@ AS_IF([test x"$have_timer" = xno], [
- ])
- 
- 
-+AC_CHECK_LIB([pthread], [pthread_atfork], [
-+	PTHREAD_LIBS="-lpthread"
-+	AC_DEFINE([HAVE_LIBPTHREAD], [1], [Define if libpthred exist])
-+])
-+AC_SUBST([PTHREAD_LIBS])
-+
-+
- AC_CHECK_LIB([rtas], [rtas_get_sysparm], [
- 	RTAS_LIBS="-lrtas"
- 	AC_DEFINE([HAVE_LIBRTAS], [1], [Define if librtas exists])
-diff --git a/libuuid/src/Makemodule.am b/libuuid/src/Makemodule.am
-index 867ad7be5..58b64fe9b 100644
---- a/libuuid/src/Makemodule.am
-+++ b/libuuid/src/Makemodule.am
-@@ -31,7 +31,7 @@ libuuid_la_SOURCES = \
- EXTRA_libuuid_la_DEPENDENCIES = \
- 	libuuid/src/libuuid.sym
- 
--libuuid_la_LIBADD       = $(LDADD) $(SOCKET_LIBS) -lpthread
-+libuuid_la_LIBADD       = $(LDADD) $(SOCKET_LIBS) $(PTHREAD_LIBS)
- 
- libuuid_la_CFLAGS = \
- 	$(AM_CFLAGS) \
--- 
-2.48.1
-
diff --git a/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch b/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
deleted file mode 100644
index 19e0697769..0000000000
--- a/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From f540cc6fed7224fb9ca162cb2f33c338260ae1d2 Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 27 Jan 2025 14:11:35 +0100
-Subject: [PATCH] meson: add HAVE_LIBPTHREAD
-
-Upstream: https://github.com/util-linux/util-linux/pull/3383
-Signed-off-by: Karel Zak <kzak@redhat.com>
-Signed-off-by: Julien Olivain <ju.o@free.fr>
----
- meson.build | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/meson.build b/meson.build
-index 6d1f986af..ac5fdd799 100644
---- a/meson.build
-+++ b/meson.build
-@@ -748,6 +748,7 @@ endif
- conf.set('HAVE_CLOCK_GETTIME', have ? 1 : false)
- 
- thread_libs = dependency('threads')
-+conf.set('HAVE_LIBPTHREAD', thread_libs.found() ? 1 : false)
- 
- have = cc.has_function('timer_create')
- if not have
--- 
-2.48.1
-
diff --git a/package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch b/package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
deleted file mode 100644
index 0d90f8aec9..0000000000
--- a/package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From eecaa2c0dda817eba2d493f6ddb42c39cf789fc2 Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 27 Jan 2025 14:28:36 +0100
-Subject: [PATCH] libuuid: support non-cached scenarios (when -lpthread is
- unavailable)
-
-This patch makes the dependence on pthread optional for libuuid. In
-certain cases, such as Buildroot Linux, uClibc-ng, and very low
-resource systems, libpthread may be unavailable.
-
-If libuuid is compiled without pthread, it will not use a local cache
-and will instead request a UUID from uuidd for each call. This may
-result in less efficient performance, but the UUIDs generated will
-still be unique and reliable.
-
-On minimalistic systems, it is highly likely that uuidd will not be
-installed, making this change important for portability and robust
-code.
-
-Upstream: https://github.com/util-linux/util-linux/pull/3383
-Addresses: https://github.com/util-linux/util-linux/pull/3375
-Signed-off-by: Karel Zak <kzak@redhat.com>
-Signed-off-by: Julien Olivain <ju.o@free.fr>
----
- libuuid/src/gen_uuid.c | 18 +++++++++++++++---
- 1 file changed, 15 insertions(+), 3 deletions(-)
-
-diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
-index 69712267f..1ed82b46b 100644
---- a/libuuid/src/gen_uuid.c
-+++ b/libuuid/src/gen_uuid.c
-@@ -80,7 +80,10 @@
- #if defined(__linux__) && defined(HAVE_SYS_SYSCALL_H)
- #include <sys/syscall.h>
- #endif
--#include <pthread.h>
-+#ifdef HAVE_LIBPTHREAD
-+# include <pthread.h>
-+#endif
-+
- #include <signal.h>
- 
- #include "all-io.h"
-@@ -580,8 +583,7 @@ int __uuid_generate_time_cont(uuid_t out, int *num, uint32_t cont_offset)
-  * If neither of these is possible (e.g. because of insufficient permissions), it generates
-  * the UUID anyway, but returns -1. Otherwise, returns 0.
-  */
--
--/* thread local cache for uuidd based requests */
-+#ifdef HAVE_LIBPTHREAD
- THREAD_LOCAL struct {
- 	int		num;
- 	int		cache_size;
-@@ -597,8 +599,10 @@ static void reset_uuidd_cache(void)
- 	memset(&uuidd_cache, 0, sizeof(uuidd_cache));
- 	uuidd_cache.cache_size = CS_MIN;
- }
-+#endif /* HAVE_LIBPTHREAD */
- 
- static int uuid_generate_time_generic(uuid_t out) {
-+#ifdef HAVE_LIBPTHREAD
- 	static volatile sig_atomic_t atfork_registered;
- 	time_t	now;
- 
-@@ -651,6 +655,14 @@ static int uuid_generate_time_generic(uuid_t out) {
- 		return 0;
- 	}
- 
-+#else /* !HAVE_LIBPTHREAD */
-+	{
-+		int num = 1;
-+		if (get_uuid_via_daemon(UUIDD_OP_TIME_UUID, out, &num) == 0)
-+			return 0;
-+	}
-+#endif /* HAVE_LIBPTHREAD */
-+
- 	return __uuid_generate_time(out, NULL);
- }
- 
--- 
-2.48.1
-
diff --git a/package/util-linux/util-linux.hash b/package/util-linux/util-linux.hash
index 317efebcbf..e74aa17c94 100644
--- a/package/util-linux/util-linux.hash
+++ b/package/util-linux/util-linux.hash
@@ -1,10 +1,14 @@
-# From https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.40/sha256sums.asc
-sha256  d78b37a66f5922d70edf3bdfb01a6b33d34ed3c3cafd6628203b2a2b67c8e8b3  util-linux-2.40.2.tar.xz
+# From https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.41/sha256sums.asc
+sha256  81ee93b3cfdfeb7d7c4090cedeba1d7bbce9141fd0b501b686b3fe475ddca4c6  util-linux-2.41.tar.xz
 # License files, locally calculated
-sha256  27f25514040a401b2ceb7057eae1f46cedb1666664b519b5be7e0960d1b35164  README.licensing
+sha256  4c2db318192bda62f3f8fcf71488bb5e602ae4385eba281d711b46cc13a40bb3  README.licensing
+sha256  527f738966ca396cd5a68c1509390de2a780c6b614d9ee57f7544a6161938ed1  Documentation/licenses/COPYING.BSD-2-Clause
 sha256  9b718a9460fed5952466421235bc79eb49d4e9eacc920d7a9dd6285ab8fd6c6d  Documentation/licenses/COPYING.BSD-3-Clause
 sha256  ba7640f00d93e72e92b94b9d71f25ec53bac2f1682f5c4adcccb0018359f60f8  Documentation/licenses/COPYING.BSD-4-Clause-UC
+sha256  6fc9e709ccbfe0d77fbffa2427a983282be2eb88e47b1cdb49f21a83b4d1e665  Documentation/licenses/COPYING.EUPL-1.2
+sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  Documentation/licenses/COPYING.GPL-2.0-only
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  Documentation/licenses/COPYING.GPL-2.0-or-later
+sha256  3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986  Documentation/licenses/COPYING.GPL-3.0-or-later
 sha256  e53348ce276358e9997014071c5294b36a18c4b34f32f00ee57b9acce0aafd63  Documentation/licenses/COPYING.ISC
 sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  Documentation/licenses/COPYING.LGPL-2.1-or-later
 sha256  8555341619542abb48c102afd954e42d4478e5be16ad3d5af7b0ff71009e7348  Documentation/licenses/COPYING.MIT
diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index ed30c0b107..b097d42b7b 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -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.40
-UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).2
+UTIL_LINUX_VERSION_MAJOR = 2.41
+UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR)
 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)
 
@@ -24,9 +24,13 @@ UTIL_LINUX_LICENSE = \
 	ISC (rfkill) \
 	MIT (hardlink, flock)
 UTIL_LINUX_LICENSE_FILES = README.licensing \
+	Documentation/licenses/COPYING.BSD-2-Clause \
 	Documentation/licenses/COPYING.BSD-3-Clause \
 	Documentation/licenses/COPYING.BSD-4-Clause-UC \
+	Documentation/licenses/COPYING.EUPL-1.2 \
+	Documentation/licenses/COPYING.GPL-2.0-only \
 	Documentation/licenses/COPYING.GPL-2.0-or-later \
+	Documentation/licenses/COPYING.GPL-3.0-or-later \
 	Documentation/licenses/COPYING.ISC \
 	Documentation/licenses/COPYING.LGPL-2.1-or-later \
 	Documentation/licenses/COPYING.MIT
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [Buildroot] [PATCH v1] package/util-linux: bump to 2.41
  2025-03-25 10:16 [Buildroot] [PATCH v1] package/util-linux: bump to 2.41 Thomas Devoogdt
@ 2025-03-26 13:24 ` Waldemar Brodkorb
  2025-04-02  8:26   ` [Buildroot] [PATCH v2] " Thomas Devoogdt
  0 siblings, 1 reply; 18+ messages in thread
From: Waldemar Brodkorb @ 2025-03-26 13:24 UTC (permalink / raw)
  To: Thomas Devoogdt; +Cc: buildroot, Thomas Devoogdt

Hi Thomas,
Thomas Devoogdt wrote,

> From: Thomas Devoogdt <thomas.devoogdt@barco.com>
> 
> News: https://lore.kernel.org/util-linux/2cifsg7vkdiivfsmmximhbzybrsopn7zfqgwz2f6hyflh35pjr@ecyicq2cbsro/
> 
> - Dropped patches which are all upstream.

Shouldn't you then drop AUTORECONF?

Did you tried a uClibc-ng toolchain?
I get following error trying to compile mount:
libtool: compile:
/home/wbx/buildroot/output/host/bin/mips64-buildroot-linux-uclibc-gcc
-DHAVE_CONFIG_H -I. -include config.h -I./include
-DLOCALEDIR=\"/usr/share/locale\" -D_PATH_RUNSTATEDIR=\"/run\"
-D_PATH_LOCALSTATEDIR=\"/var\" -D_PATH_SYSCONFSTATICDIR=\"/usr/lib\"
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-fsigned-char -fno-common -Wall -Wextra -Waddress-of-packed-member
-Wdiscarded-qualifiers -Wimplicit-function-declaration
-Wmissing-declarations -Wmissing-parameter-type -Wmissing-prototypes
-Wnested-externs -Wno-missing-field-initializers
-Wold-style-definition -Wpointer-arith -Wredundant-decls
-Wsign-compare -Wstrict-prototypes -Wtype-limits -Wuninitialized
-Wunused-but-set-parameter -Wunused-but-set-variable
-Wunused-parameter -Wunused-result -Wunused-variable -Wvla -Walloca
-Werror=sequence-point -I./libblkid/src -I./libmount/src
-I./libmount/src -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 -g0 -Dstatic_assert=_Static_assert -c
libmount/src/btrfs.c  -fPIC -DPIC -o libmount/src/.libs/la-btrfs.o
In file included from
/home/wbx/buildroot/output/host/mips64-buildroot-linux-uclibc/sysroot/usr/include/linux/fs.h:19,
from
/home/wbx/buildroot/output/host/mips64-buildroot-linux-uclibc/sysroot/usr/include/linux/btrfs.h:29,
from libmount/src/btrfs.c:18:
/home/wbx/buildroot/output/host/mips64-buildroot-linux-uclibc/sysroot/usr/include/sys/mount.h:35:3:
error: expected identifier before numeric constant
     35 |   MS_RDONLY = 1, /* Mount read-only.  */

Any idea?

best regards
 Waldemar

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH v2] package/util-linux: bump to 2.41
  2025-03-26 13:24 ` Waldemar Brodkorb
@ 2025-04-02  8:26   ` Thomas Devoogdt
  2025-04-02 10:18     ` Thomas Devoogdt
  2025-04-02 11:08     ` Waldemar Brodkorb
  0 siblings, 2 replies; 18+ messages in thread
From: Thomas Devoogdt @ 2025-04-02  8:26 UTC (permalink / raw)
  To: wbx; +Cc: buildroot, thomas.devoogdt, thomas

From: Thomas Devoogdt <thomas.devoogdt@barco.com>

News: https://lore.kernel.org/util-linux/2cifsg7vkdiivfsmmximhbzybrsopn7zfqgwz2f6hyflh35pjr@ecyicq2cbsro/

Dropped patches which are all upstream.
- https://github.com/util-linux/util-linux/pull/3049
- https://github.com/util-linux/util-linux/pull/3383

Added some new patches. (which are also upstream)
- https://github.com/util-linux/util-linux/pull/3471
- https://github.com/util-linux/util-linux/pull/3484

Synced all license files.

Dropped the AUTORECONF call, since
0001-libmount-ifdef-statx-call.patch is upstream.

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
---
v2:
 - dropped AUTORECONF
 - added two compile patches
---
 .../0001-misc-never-include-wchar.h.patch     | 160 ++++++++++++++++++
 ...ch.c-fix-build-with-uclibc-ng-1.0.39.patch |  39 -----
 .../0002-c.h-consolidate-THREAD_LOCAL.patch   |  65 -------
 ...ed-reference-to-add_namespace_for_ns.patch |  59 +++++++
 ...ine-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch |  47 -----
 .../0004-meson-add-HAVE_LIBPTHREAD.patch      |  27 ---
 ...non-cached-scenarios-when-lpthread-i.patch |  82 ---------
 package/util-linux/util-linux.hash            |  10 +-
 package/util-linux/util-linux.mk              |  11 +-
 9 files changed, 232 insertions(+), 268 deletions(-)
 create mode 100644 package/util-linux/0001-misc-never-include-wchar.h.patch
 delete mode 100644 package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
 delete mode 100644 package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
 create mode 100644 package/util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
 delete mode 100644 package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
 delete mode 100644 package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
 delete mode 100644 package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch

diff --git a/package/util-linux/0001-misc-never-include-wchar.h.patch b/package/util-linux/0001-misc-never-include-wchar.h.patch
new file mode 100644
index 0000000000..3adfaa2261
--- /dev/null
+++ b/package/util-linux/0001-misc-never-include-wchar.h.patch
@@ -0,0 +1,160 @@
+From e8205294e329f50bdf465d8cdd15653fd42ec5c0 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak@redhat.com>
+Date: Thu, 20 Mar 2025 11:57:06 +0100
+Subject: [PATCH] misc: never include wchar.h
+
+We have a portable "widechar.h" that follows --disable-widechar and
+provides portability. It is a bug to directly include libc's wchar.h
+or wctype.h.
+
+Fixes: https://github.com/util-linux/util-linux/issues/3470
+Signed-off-by: Karel Zak <kzak@redhat.com>
+(cherry picked from commit 5c0888dde3cc296d06b8243dcc78248ff90526e5)
+Upstream: https://github.com/util-linux/util-linux/pull/3471
+Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
+---
+ disk-utils/cfdisk.c          | 6 +-----
+ include/carefulputc.h        | 5 +----
+ include/fgetwc_or_err.h      | 6 +-----
+ lib/idcache.c                | 2 +-
+ sys-utils/irqtop.c           | 7 ++-----
+ sys-utils/lsns.c             | 2 +-
+ tests/helpers/test_sysinfo.c | 2 +-
+ 7 files changed, 8 insertions(+), 22 deletions(-)
+
+diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c
+index 4018f4d3d..d4057eedb 100644
+--- a/disk-utils/cfdisk.c
++++ b/disk-utils/cfdisk.c
+@@ -52,14 +52,10 @@
+ # include <ncurses/ncurses.h>
+ #endif
+ 
+-#ifdef HAVE_WIDECHAR
+-# include <wctype.h>
+-# include <wchar.h>
+-#endif
+-
+ #include "c.h"
+ #include "closestream.h"
+ #include "nls.h"
++#include "widechar.h"
+ #include "strutils.h"
+ #include "xalloc.h"
+ #include "mbsalign.h"
+diff --git a/include/carefulputc.h b/include/carefulputc.h
+index 3cc6f7ff9..c6b778bba 100644
+--- a/include/carefulputc.h
++++ b/include/carefulputc.h
+@@ -4,12 +4,9 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <ctype.h>
+-#ifdef HAVE_WIDECHAR
+-#include <wctype.h>
+-#include <wchar.h>
+-#endif
+ #include <stdbool.h>
+ 
++#include "widechar.h"
+ #include "cctype.h"
+ 
+ /*
+diff --git a/include/fgetwc_or_err.h b/include/fgetwc_or_err.h
+index 3cf926283..f6ba71c6b 100644
+--- a/include/fgetwc_or_err.h
++++ b/include/fgetwc_or_err.h
+@@ -1,13 +1,9 @@
+ #ifndef UTIL_LINUX_FGETWC_OR_ERR_H
+ #define UTIL_LINUX_FGETWC_OR_ERR_H
+ 
+-#include <stdio.h>
+-#include <wchar.h>
+-#include <errno.h>
+-
+-#include "widechar.h"
+ #include "c.h"
+ #include "nls.h"
++#include "widechar.h"
+ 
+ static inline wint_t fgetwc_or_err(FILE *stream) {
+ 	wint_t ret;
+diff --git a/lib/idcache.c b/lib/idcache.c
+index fa77e7b07..7bae76823 100644
+--- a/lib/idcache.c
++++ b/lib/idcache.c
+@@ -4,12 +4,12 @@
+  *
+  * Written by Karel Zak <kzak@redhat.com>
+  */
+-#include <wchar.h>
+ #include <pwd.h>
+ #include <grp.h>
+ #include <sys/types.h>
+ 
+ #include "c.h"
++#include "widechar.h"
+ #include "idcache.h"
+ 
+ struct identry *get_id(struct idcache *ic, unsigned long int id)
+diff --git a/sys-utils/irqtop.c b/sys-utils/irqtop.c
+index ce6a2ca5b..f05bf6bef 100644
+--- a/sys-utils/irqtop.c
++++ b/sys-utils/irqtop.c
+@@ -43,13 +43,10 @@
+ # include <ncurses/ncurses.h>
+ #endif
+ 
+-#ifdef HAVE_WIDECHAR
+-# include <wctype.h>
+-# include <wchar.h>
+-#endif
+-
+ #include <libsmartcols.h>
+ 
++#include "c.h"
++#include "widechar.h"
+ #include "closestream.h"
+ #include "cpuset.h"
+ #include "monotonic.h"
+diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c
+index 6b2dcba96..2b613cf71 100644
+--- a/sys-utils/lsns.c
++++ b/sys-utils/lsns.c
+@@ -19,7 +19,6 @@
+ #include <unistd.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+-#include <wchar.h>
+ #include <libsmartcols.h>
+ #include <libmount.h>
+ # include <stdbool.h>
+@@ -43,6 +42,7 @@
+ #include "nls.h"
+ #include "xalloc.h"
+ #include "c.h"
++#include "widechar.h"
+ #include "list.h"
+ #include "closestream.h"
+ #include "optutils.h"
+diff --git a/tests/helpers/test_sysinfo.c b/tests/helpers/test_sysinfo.c
+index 1559d471f..95f50f3f6 100644
+--- a/tests/helpers/test_sysinfo.c
++++ b/tests/helpers/test_sysinfo.c
+@@ -23,12 +23,12 @@
+ #include <limits.h>
+ #include <stdint.h>
+ #include <inttypes.h>
+-#include <wchar.h>
+ #include <errno.h>
+ #include <time.h>
+ #include <sys/ioctl.h>
+ 
+ #include "c.h"
++#include "widechar.h"
+ 
+ #ifdef __linux__
+ # include <sys/mount.h>
+-- 
+2.43.0
+
diff --git a/package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch b/package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
deleted file mode 100644
index 12dd119ef3..0000000000
--- a/package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From beef18da4de87ca5aaadf2beb14187f35cc4f50f Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Date: Wed, 15 May 2024 18:22:11 +0200
-Subject: [PATCH] sys-utils/setarch.c: fix build with uclibc-ng < 1.0.39
-
-Fix the following build failure with uclibc-ng < 1.0.39 (i.e., without
-https://github.com/wbx-github/uclibc-ng/commit/85ac4f04d94e98389a8315e720630d0f95bfdfd6)
-raised since version 2.39 and
-https://github.com/util-linux/util-linux/commit/03a254f010b08da1175f50a8ae7882e59228f1b4:
-
-sys-utils/setarch.c:106:7: error: 'PER_LINUX32_3GB' undeclared here (not in a function); did you mean 'PER_LINUX32'?
-  106 |     X(PER_LINUX32_3GB) \
-      |       ^~~~~~~~~~~~~~~
-
-Fixes:
- - http://autobuild.buildroot.org/results/fb1feb47f2660882fa53f66bacc63e191fd52175
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Upstream: https://github.com/util-linux/util-linux/commit/4647fc6afbf7e99c49531600425df60f1243fcd2
----
- sys-utils/setarch.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
-index 227bc6b5de..4bcb5e69e6 100644
---- a/sys-utils/setarch.c
-+++ b/sys-utils/setarch.c
-@@ -89,6 +89,11 @@
- # define PER_LINUX_FDPIC	(PER_LINUX | FDPIC_FUNCPTRS)
- #endif
- 
-+/* fallback for old uclibc-headers < 1.0.39 */
-+#ifndef PER_LINUX32_3GB
-+# define PER_LINUX32_3GB	(PER_LINUX32 | ADDR_LIMIT_3GB)
-+#endif
-+
- #define ALL_PERSONALITIES \
-     X(PER_LINUX) \
-     X(PER_LINUX_32BIT) \
diff --git a/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch b/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
deleted file mode 100644
index bb1a63ecc2..0000000000
--- a/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 7b3db914fa9073c667ea482c8b6b4e07fe6202cc Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 27 Jan 2025 13:40:23 +0100
-Subject: [PATCH] c.h: consolidate THREAD_LOCAL.
-
-Let's define this macro in one place only.
-
-Upstream: https://github.com/util-linux/util-linux/pull/3383
-Signed-off-by: Karel Zak <kzak@redhat.com>
-Signed-off-by: Julien Olivain <ju.o@free.fr>
----
- include/c.h            | 9 +++++++++
- lib/randutils.c        | 5 -----
- libuuid/src/gen_uuid.c | 1 -
- 3 files changed, 9 insertions(+), 6 deletions(-)
-
-diff --git a/include/c.h b/include/c.h
-index 61b95ab2d..848c48536 100644
---- a/include/c.h
-+++ b/include/c.h
-@@ -595,4 +595,13 @@ static inline void *reallocarray(void *ptr, size_t nmemb, size_t size)
- }
- #endif
- 
-+/*
-+ * thread-local storage
-+ */
-+#ifdef HAVE_TLS
-+# define THREAD_LOCAL static __thread
-+#else
-+# define THREAD_LOCAL static
-+#endif
-+
- #endif /* UTIL_LINUX_C_H */
-diff --git a/lib/randutils.c b/lib/randutils.c
-index 15c2f7834..4c806e682 100644
---- a/lib/randutils.c
-+++ b/lib/randutils.c
-@@ -20,11 +20,6 @@
- #include "randutils.h"
- #include "nls.h"
- 
--#ifdef HAVE_TLS
--#define THREAD_LOCAL static __thread
--#else
--#define THREAD_LOCAL static
--#endif
- 
- #ifdef HAVE_GETRANDOM
- # include <sys/random.h>
-diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
-index 3b76ddc9a..69712267f 100644
---- a/libuuid/src/gen_uuid.c
-+++ b/libuuid/src/gen_uuid.c
-@@ -92,7 +92,6 @@
- #include "md5.h"
- #include "sha1.h"
- 
--#define THREAD_LOCAL static __thread
- 
- #ifdef _WIN32
- static void gettimeofday (struct timeval *tv, void *dummy)
--- 
-2.48.1
-
diff --git a/package/util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch b/package/util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
new file mode 100644
index 0000000000..5a53aed8ff
--- /dev/null
+++ b/package/util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
@@ -0,0 +1,59 @@
+From 300a66c30c3d0fb04c0f24cf23fde80e1e3bf5e4 Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <thomas.devoogdt@barco.com>
+Date: Tue, 25 Mar 2025 11:58:18 +0100
+Subject: [PATCH] lsns: fix undefined reference to add_namespace_for_nsfd #3483
+
+Fixes:
+
+sys-utils/lsns-lsns.o: In function `read_process':
+lsns.c:(.text+0x9e8): undefined reference to `add_namespace_for_nsfd'
+collect2: error: ld returned 1 exit status
+
+Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
+(cherry picked from commit 2ced43400f35f7bd45b29364e04166a63a06e16a)
+Upstream: https://github.com/util-linux/util-linux/pull/3484
+Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
+---
+ sys-utils/lsns.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c
+index 2b613cf71..4c49a8b2d 100644
+--- a/sys-utils/lsns.c
++++ b/sys-utils/lsns.c
+@@ -587,7 +587,10 @@ static void add_namespace_from_sock(struct lsns *ls, pid_t pid, uint64_t fd)
+ 	if (get_namespace(ls, sb.st_ino))
+ 		goto out_nsfd;
+ 
++#ifdef USE_NS_GET_API
+ 	add_namespace_for_nsfd(ls, nsfd, sb.st_ino);
++#endif
++
+ out_nsfd:
+ 	close(nsfd);
+ out_sk:
+@@ -608,6 +611,7 @@ static void add_namespace_from_sock(struct lsns *ls __attribute__((__unused__)),
+ {
+ }
+ #endif /* HAVE_LINUX_NET_NAMESPACE_H */
++
+ /* Read namespaces open(2)ed explicitly by the process specified by `pc'. */
+ static void read_opened_namespaces(struct lsns *ls, struct path_cxt *pc, pid_t pid)
+ {
+@@ -627,11 +631,13 @@ static void read_opened_namespaces(struct lsns *ls, struct path_cxt *pc, pid_t p
+ 		if (st.st_dev == ls->nsfs_dev) {
+ 			if (get_namespace(ls, st.st_ino))
+ 				continue;
++#ifdef USE_NS_GET_API
+ 			int fd = ul_path_openf(pc, O_RDONLY, "fd/%ju", (uintmax_t) num);
+ 			if (fd >= 0) {
+ 				add_namespace_for_nsfd(ls, fd, st.st_ino);
+ 				close(fd);
+ 			}
++#endif
+ 		} else if ((st.st_mode & S_IFMT) == S_IFSOCK) {
+ 			add_namespace_from_sock(ls, pid, num);
+ 		}
+-- 
+2.43.0
+
diff --git a/package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch b/package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
deleted file mode 100644
index 843253a56a..0000000000
--- a/package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 0735eb8bc0ed4bc9820ea7e4e600fed246457b18 Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 27 Jan 2025 14:01:38 +0100
-Subject: [PATCH] autotools: define HAVE_LIBPTHREAD and PTHREAD_LIBS
-
-Upstream: https://github.com/util-linux/util-linux/pull/3383
-Signed-off-by: Karel Zak <kzak@redhat.com>
-Signed-off-by: Julien Olivain <ju.o@free.fr>
----
- configure.ac              | 7 +++++++
- libuuid/src/Makemodule.am | 2 +-
- 2 files changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 82d0e4bf9..9a7f260c5 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -738,6 +738,13 @@ AS_IF([test x"$have_timer" = xno], [
- ])
- 
- 
-+AC_CHECK_LIB([pthread], [pthread_atfork], [
-+	PTHREAD_LIBS="-lpthread"
-+	AC_DEFINE([HAVE_LIBPTHREAD], [1], [Define if libpthred exist])
-+])
-+AC_SUBST([PTHREAD_LIBS])
-+
-+
- AC_CHECK_LIB([rtas], [rtas_get_sysparm], [
- 	RTAS_LIBS="-lrtas"
- 	AC_DEFINE([HAVE_LIBRTAS], [1], [Define if librtas exists])
-diff --git a/libuuid/src/Makemodule.am b/libuuid/src/Makemodule.am
-index 867ad7be5..58b64fe9b 100644
---- a/libuuid/src/Makemodule.am
-+++ b/libuuid/src/Makemodule.am
-@@ -31,7 +31,7 @@ libuuid_la_SOURCES = \
- EXTRA_libuuid_la_DEPENDENCIES = \
- 	libuuid/src/libuuid.sym
- 
--libuuid_la_LIBADD       = $(LDADD) $(SOCKET_LIBS) -lpthread
-+libuuid_la_LIBADD       = $(LDADD) $(SOCKET_LIBS) $(PTHREAD_LIBS)
- 
- libuuid_la_CFLAGS = \
- 	$(AM_CFLAGS) \
--- 
-2.48.1
-
diff --git a/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch b/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
deleted file mode 100644
index 19e0697769..0000000000
--- a/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From f540cc6fed7224fb9ca162cb2f33c338260ae1d2 Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 27 Jan 2025 14:11:35 +0100
-Subject: [PATCH] meson: add HAVE_LIBPTHREAD
-
-Upstream: https://github.com/util-linux/util-linux/pull/3383
-Signed-off-by: Karel Zak <kzak@redhat.com>
-Signed-off-by: Julien Olivain <ju.o@free.fr>
----
- meson.build | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/meson.build b/meson.build
-index 6d1f986af..ac5fdd799 100644
---- a/meson.build
-+++ b/meson.build
-@@ -748,6 +748,7 @@ endif
- conf.set('HAVE_CLOCK_GETTIME', have ? 1 : false)
- 
- thread_libs = dependency('threads')
-+conf.set('HAVE_LIBPTHREAD', thread_libs.found() ? 1 : false)
- 
- have = cc.has_function('timer_create')
- if not have
--- 
-2.48.1
-
diff --git a/package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch b/package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
deleted file mode 100644
index 0d90f8aec9..0000000000
--- a/package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From eecaa2c0dda817eba2d493f6ddb42c39cf789fc2 Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 27 Jan 2025 14:28:36 +0100
-Subject: [PATCH] libuuid: support non-cached scenarios (when -lpthread is
- unavailable)
-
-This patch makes the dependence on pthread optional for libuuid. In
-certain cases, such as Buildroot Linux, uClibc-ng, and very low
-resource systems, libpthread may be unavailable.
-
-If libuuid is compiled without pthread, it will not use a local cache
-and will instead request a UUID from uuidd for each call. This may
-result in less efficient performance, but the UUIDs generated will
-still be unique and reliable.
-
-On minimalistic systems, it is highly likely that uuidd will not be
-installed, making this change important for portability and robust
-code.
-
-Upstream: https://github.com/util-linux/util-linux/pull/3383
-Addresses: https://github.com/util-linux/util-linux/pull/3375
-Signed-off-by: Karel Zak <kzak@redhat.com>
-Signed-off-by: Julien Olivain <ju.o@free.fr>
----
- libuuid/src/gen_uuid.c | 18 +++++++++++++++---
- 1 file changed, 15 insertions(+), 3 deletions(-)
-
-diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
-index 69712267f..1ed82b46b 100644
---- a/libuuid/src/gen_uuid.c
-+++ b/libuuid/src/gen_uuid.c
-@@ -80,7 +80,10 @@
- #if defined(__linux__) && defined(HAVE_SYS_SYSCALL_H)
- #include <sys/syscall.h>
- #endif
--#include <pthread.h>
-+#ifdef HAVE_LIBPTHREAD
-+# include <pthread.h>
-+#endif
-+
- #include <signal.h>
- 
- #include "all-io.h"
-@@ -580,8 +583,7 @@ int __uuid_generate_time_cont(uuid_t out, int *num, uint32_t cont_offset)
-  * If neither of these is possible (e.g. because of insufficient permissions), it generates
-  * the UUID anyway, but returns -1. Otherwise, returns 0.
-  */
--
--/* thread local cache for uuidd based requests */
-+#ifdef HAVE_LIBPTHREAD
- THREAD_LOCAL struct {
- 	int		num;
- 	int		cache_size;
-@@ -597,8 +599,10 @@ static void reset_uuidd_cache(void)
- 	memset(&uuidd_cache, 0, sizeof(uuidd_cache));
- 	uuidd_cache.cache_size = CS_MIN;
- }
-+#endif /* HAVE_LIBPTHREAD */
- 
- static int uuid_generate_time_generic(uuid_t out) {
-+#ifdef HAVE_LIBPTHREAD
- 	static volatile sig_atomic_t atfork_registered;
- 	time_t	now;
- 
-@@ -651,6 +655,14 @@ static int uuid_generate_time_generic(uuid_t out) {
- 		return 0;
- 	}
- 
-+#else /* !HAVE_LIBPTHREAD */
-+	{
-+		int num = 1;
-+		if (get_uuid_via_daemon(UUIDD_OP_TIME_UUID, out, &num) == 0)
-+			return 0;
-+	}
-+#endif /* HAVE_LIBPTHREAD */
-+
- 	return __uuid_generate_time(out, NULL);
- }
- 
--- 
-2.48.1
-
diff --git a/package/util-linux/util-linux.hash b/package/util-linux/util-linux.hash
index 317efebcbf..e74aa17c94 100644
--- a/package/util-linux/util-linux.hash
+++ b/package/util-linux/util-linux.hash
@@ -1,10 +1,14 @@
-# From https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.40/sha256sums.asc
-sha256  d78b37a66f5922d70edf3bdfb01a6b33d34ed3c3cafd6628203b2a2b67c8e8b3  util-linux-2.40.2.tar.xz
+# From https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.41/sha256sums.asc
+sha256  81ee93b3cfdfeb7d7c4090cedeba1d7bbce9141fd0b501b686b3fe475ddca4c6  util-linux-2.41.tar.xz
 # License files, locally calculated
-sha256  27f25514040a401b2ceb7057eae1f46cedb1666664b519b5be7e0960d1b35164  README.licensing
+sha256  4c2db318192bda62f3f8fcf71488bb5e602ae4385eba281d711b46cc13a40bb3  README.licensing
+sha256  527f738966ca396cd5a68c1509390de2a780c6b614d9ee57f7544a6161938ed1  Documentation/licenses/COPYING.BSD-2-Clause
 sha256  9b718a9460fed5952466421235bc79eb49d4e9eacc920d7a9dd6285ab8fd6c6d  Documentation/licenses/COPYING.BSD-3-Clause
 sha256  ba7640f00d93e72e92b94b9d71f25ec53bac2f1682f5c4adcccb0018359f60f8  Documentation/licenses/COPYING.BSD-4-Clause-UC
+sha256  6fc9e709ccbfe0d77fbffa2427a983282be2eb88e47b1cdb49f21a83b4d1e665  Documentation/licenses/COPYING.EUPL-1.2
+sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  Documentation/licenses/COPYING.GPL-2.0-only
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  Documentation/licenses/COPYING.GPL-2.0-or-later
+sha256  3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986  Documentation/licenses/COPYING.GPL-3.0-or-later
 sha256  e53348ce276358e9997014071c5294b36a18c4b34f32f00ee57b9acce0aafd63  Documentation/licenses/COPYING.ISC
 sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  Documentation/licenses/COPYING.LGPL-2.1-or-later
 sha256  8555341619542abb48c102afd954e42d4478e5be16ad3d5af7b0ff71009e7348  Documentation/licenses/COPYING.MIT
diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index ed30c0b107..71e458ccc4 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -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.40
-UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).2
+UTIL_LINUX_VERSION_MAJOR = 2.41
+UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR)
 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)
 
@@ -24,18 +24,19 @@ UTIL_LINUX_LICENSE = \
 	ISC (rfkill) \
 	MIT (hardlink, flock)
 UTIL_LINUX_LICENSE_FILES = README.licensing \
+	Documentation/licenses/COPYING.BSD-2-Clause \
 	Documentation/licenses/COPYING.BSD-3-Clause \
 	Documentation/licenses/COPYING.BSD-4-Clause-UC \
+	Documentation/licenses/COPYING.EUPL-1.2 \
+	Documentation/licenses/COPYING.GPL-2.0-only \
 	Documentation/licenses/COPYING.GPL-2.0-or-later \
+	Documentation/licenses/COPYING.GPL-3.0-or-later \
 	Documentation/licenses/COPYING.ISC \
 	Documentation/licenses/COPYING.LGPL-2.1-or-later \
 	Documentation/licenses/COPYING.MIT
 
 UTIL_LINUX_CPE_ID_VENDOR = kernel
 
-# 0001-libmount-ifdef-statx-call.patch
-UTIL_LINUX_AUTORECONF = YES
-
 UTIL_LINUX_INSTALL_STAGING = YES
 UTIL_LINUX_DEPENDENCIES = \
 	host-pkgconf \
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [Buildroot] [PATCH v2] package/util-linux: bump to 2.41
  2025-04-02  8:26   ` [Buildroot] [PATCH v2] " Thomas Devoogdt
@ 2025-04-02 10:18     ` Thomas Devoogdt
  2025-04-02 11:08     ` Waldemar Brodkorb
  1 sibling, 0 replies; 18+ messages in thread
From: Thomas Devoogdt @ 2025-04-02 10:18 UTC (permalink / raw)
  To: Thomas Devoogdt; +Cc: thomas.devoogdt, buildroot

Hi all,

FYI:

./utils/test-pkg -p util-linux -a
                             arm-aarch64 [ 1/40]: OK
                   bootlin-aarch64-glibc [ 2/40]: OK
               bootlin-arcle-hs38-uclibc [ 3/40]: OK
                    bootlin-armv5-uclibc [ 4/40]: OK
                     bootlin-armv7-glibc [ 5/40]: OK
                   bootlin-armv7m-uclibc [ 6/40]: OK
                      bootlin-armv7-musl [ 7/40]: OK
                bootlin-m68k-5208-uclibc [ 8/40]: OK
               bootlin-m68k-68040-uclibc [ 9/40]: OK
             bootlin-microblazeel-uclibc [10/40]: OK
                bootlin-mipsel32r6-glibc [11/40]: OK
                   bootlin-mipsel-uclibc [12/40]: OK
                 bootlin-openrisc-uclibc [13/40]: OK
        bootlin-powerpc64le-power8-glibc [14/40]: OK
           bootlin-powerpc-e500mc-uclibc [15/40]: OK
                   bootlin-riscv32-glibc [16/40]: OK
                   bootlin-riscv64-glibc [17/40]: OK
                    bootlin-riscv64-musl [18/40]: OK
                 bootlin-s390x-z13-glibc [19/40]: OK
                      bootlin-sh4-uclibc [20/40]: OK
                   bootlin-sparc64-glibc [21/40]: OK
                    bootlin-sparc-uclibc [22/40]: OK
                    bootlin-x86-64-glibc [23/40]: OK
                     bootlin-x86-64-musl [24/40]: OK
                   bootlin-x86-64-uclibc [25/40]: OK
                   bootlin-x86-i686-musl [26/40]: OK
                   bootlin-xtensa-uclibc [27/40]: OK
                            br-arm-basic [28/40]: OK
                    br-arm-full-nothread [29/40]: OK
                      br-arm-full-static [30/40]: OK
                   br-i386-pentium4-full [31/40]: OK
                      br-mips64-n64-full [32/40]: OK
                 br-mips64r6-el-hf-glibc [33/40]: OK
               br-powerpc-603e-basic-cpp [34/40]: OK
               br-powerpc64-power7-glibc [35/40]: OK
                       linaro-aarch64-be [36/40]: OK
                          linaro-aarch64 [37/40]: OK
                              linaro-arm [38/40]: OK
                         sourcery-mips64 [39/40]: OK
                           sourcery-mips [40/40]: OK
40 builds, 0 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed

Kr,

Thomas Devoogdt

Op wo 2 apr 2025 om 10:26 schreef Thomas Devoogdt <thomas@devoogdt.com>:
>
> From: Thomas Devoogdt <thomas.devoogdt@barco.com>
>
> News: https://lore.kernel.org/util-linux/2cifsg7vkdiivfsmmximhbzybrsopn7zfqgwz2f6hyflh35pjr@ecyicq2cbsro/
>
> Dropped patches which are all upstream.
> - https://github.com/util-linux/util-linux/pull/3049
> - https://github.com/util-linux/util-linux/pull/3383
>
> Added some new patches. (which are also upstream)
> - https://github.com/util-linux/util-linux/pull/3471
> - https://github.com/util-linux/util-linux/pull/3484
>
> Synced all license files.
>
> Dropped the AUTORECONF call, since
> 0001-libmount-ifdef-statx-call.patch is upstream.
>
> Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> ---
> v2:
>  - dropped AUTORECONF
>  - added two compile patches
> ---
>  .../0001-misc-never-include-wchar.h.patch     | 160 ++++++++++++++++++
>  ...ch.c-fix-build-with-uclibc-ng-1.0.39.patch |  39 -----
>  .../0002-c.h-consolidate-THREAD_LOCAL.patch   |  65 -------
>  ...ed-reference-to-add_namespace_for_ns.patch |  59 +++++++
>  ...ine-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch |  47 -----
>  .../0004-meson-add-HAVE_LIBPTHREAD.patch      |  27 ---
>  ...non-cached-scenarios-when-lpthread-i.patch |  82 ---------
>  package/util-linux/util-linux.hash            |  10 +-
>  package/util-linux/util-linux.mk              |  11 +-
>  9 files changed, 232 insertions(+), 268 deletions(-)
>  create mode 100644 package/util-linux/0001-misc-never-include-wchar.h.patch
>  delete mode 100644 package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
>  delete mode 100644 package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
>  create mode 100644 package/util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
>  delete mode 100644 package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
>  delete mode 100644 package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
>  delete mode 100644 package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
>
> diff --git a/package/util-linux/0001-misc-never-include-wchar.h.patch b/package/util-linux/0001-misc-never-include-wchar.h.patch
> new file mode 100644
> index 0000000000..3adfaa2261
> --- /dev/null
> +++ b/package/util-linux/0001-misc-never-include-wchar.h.patch
> @@ -0,0 +1,160 @@
> +From e8205294e329f50bdf465d8cdd15653fd42ec5c0 Mon Sep 17 00:00:00 2001
> +From: Karel Zak <kzak@redhat.com>
> +Date: Thu, 20 Mar 2025 11:57:06 +0100
> +Subject: [PATCH] misc: never include wchar.h
> +
> +We have a portable "widechar.h" that follows --disable-widechar and
> +provides portability. It is a bug to directly include libc's wchar.h
> +or wctype.h.
> +
> +Fixes: https://github.com/util-linux/util-linux/issues/3470
> +Signed-off-by: Karel Zak <kzak@redhat.com>
> +(cherry picked from commit 5c0888dde3cc296d06b8243dcc78248ff90526e5)
> +Upstream: https://github.com/util-linux/util-linux/pull/3471
> +Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> +---
> + disk-utils/cfdisk.c          | 6 +-----
> + include/carefulputc.h        | 5 +----
> + include/fgetwc_or_err.h      | 6 +-----
> + lib/idcache.c                | 2 +-
> + sys-utils/irqtop.c           | 7 ++-----
> + sys-utils/lsns.c             | 2 +-
> + tests/helpers/test_sysinfo.c | 2 +-
> + 7 files changed, 8 insertions(+), 22 deletions(-)
> +
> +diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c
> +index 4018f4d3d..d4057eedb 100644
> +--- a/disk-utils/cfdisk.c
> ++++ b/disk-utils/cfdisk.c
> +@@ -52,14 +52,10 @@
> + # include <ncurses/ncurses.h>
> + #endif
> +
> +-#ifdef HAVE_WIDECHAR
> +-# include <wctype.h>
> +-# include <wchar.h>
> +-#endif
> +-
> + #include "c.h"
> + #include "closestream.h"
> + #include "nls.h"
> ++#include "widechar.h"
> + #include "strutils.h"
> + #include "xalloc.h"
> + #include "mbsalign.h"
> +diff --git a/include/carefulputc.h b/include/carefulputc.h
> +index 3cc6f7ff9..c6b778bba 100644
> +--- a/include/carefulputc.h
> ++++ b/include/carefulputc.h
> +@@ -4,12 +4,9 @@
> + #include <stdio.h>
> + #include <string.h>
> + #include <ctype.h>
> +-#ifdef HAVE_WIDECHAR
> +-#include <wctype.h>
> +-#include <wchar.h>
> +-#endif
> + #include <stdbool.h>
> +
> ++#include "widechar.h"
> + #include "cctype.h"
> +
> + /*
> +diff --git a/include/fgetwc_or_err.h b/include/fgetwc_or_err.h
> +index 3cf926283..f6ba71c6b 100644
> +--- a/include/fgetwc_or_err.h
> ++++ b/include/fgetwc_or_err.h
> +@@ -1,13 +1,9 @@
> + #ifndef UTIL_LINUX_FGETWC_OR_ERR_H
> + #define UTIL_LINUX_FGETWC_OR_ERR_H
> +
> +-#include <stdio.h>
> +-#include <wchar.h>
> +-#include <errno.h>
> +-
> +-#include "widechar.h"
> + #include "c.h"
> + #include "nls.h"
> ++#include "widechar.h"
> +
> + static inline wint_t fgetwc_or_err(FILE *stream) {
> +       wint_t ret;
> +diff --git a/lib/idcache.c b/lib/idcache.c
> +index fa77e7b07..7bae76823 100644
> +--- a/lib/idcache.c
> ++++ b/lib/idcache.c
> +@@ -4,12 +4,12 @@
> +  *
> +  * Written by Karel Zak <kzak@redhat.com>
> +  */
> +-#include <wchar.h>
> + #include <pwd.h>
> + #include <grp.h>
> + #include <sys/types.h>
> +
> + #include "c.h"
> ++#include "widechar.h"
> + #include "idcache.h"
> +
> + struct identry *get_id(struct idcache *ic, unsigned long int id)
> +diff --git a/sys-utils/irqtop.c b/sys-utils/irqtop.c
> +index ce6a2ca5b..f05bf6bef 100644
> +--- a/sys-utils/irqtop.c
> ++++ b/sys-utils/irqtop.c
> +@@ -43,13 +43,10 @@
> + # include <ncurses/ncurses.h>
> + #endif
> +
> +-#ifdef HAVE_WIDECHAR
> +-# include <wctype.h>
> +-# include <wchar.h>
> +-#endif
> +-
> + #include <libsmartcols.h>
> +
> ++#include "c.h"
> ++#include "widechar.h"
> + #include "closestream.h"
> + #include "cpuset.h"
> + #include "monotonic.h"
> +diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c
> +index 6b2dcba96..2b613cf71 100644
> +--- a/sys-utils/lsns.c
> ++++ b/sys-utils/lsns.c
> +@@ -19,7 +19,6 @@
> + #include <unistd.h>
> + #include <sys/stat.h>
> + #include <sys/types.h>
> +-#include <wchar.h>
> + #include <libsmartcols.h>
> + #include <libmount.h>
> + # include <stdbool.h>
> +@@ -43,6 +42,7 @@
> + #include "nls.h"
> + #include "xalloc.h"
> + #include "c.h"
> ++#include "widechar.h"
> + #include "list.h"
> + #include "closestream.h"
> + #include "optutils.h"
> +diff --git a/tests/helpers/test_sysinfo.c b/tests/helpers/test_sysinfo.c
> +index 1559d471f..95f50f3f6 100644
> +--- a/tests/helpers/test_sysinfo.c
> ++++ b/tests/helpers/test_sysinfo.c
> +@@ -23,12 +23,12 @@
> + #include <limits.h>
> + #include <stdint.h>
> + #include <inttypes.h>
> +-#include <wchar.h>
> + #include <errno.h>
> + #include <time.h>
> + #include <sys/ioctl.h>
> +
> + #include "c.h"
> ++#include "widechar.h"
> +
> + #ifdef __linux__
> + # include <sys/mount.h>
> +--
> +2.43.0
> +
> diff --git a/package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch b/package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
> deleted file mode 100644
> index 12dd119ef3..0000000000
> --- a/package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
> +++ /dev/null
> @@ -1,39 +0,0 @@
> -From beef18da4de87ca5aaadf2beb14187f35cc4f50f Mon Sep 17 00:00:00 2001
> -From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> -Date: Wed, 15 May 2024 18:22:11 +0200
> -Subject: [PATCH] sys-utils/setarch.c: fix build with uclibc-ng < 1.0.39
> -
> -Fix the following build failure with uclibc-ng < 1.0.39 (i.e., without
> -https://github.com/wbx-github/uclibc-ng/commit/85ac4f04d94e98389a8315e720630d0f95bfdfd6)
> -raised since version 2.39 and
> -https://github.com/util-linux/util-linux/commit/03a254f010b08da1175f50a8ae7882e59228f1b4:
> -
> -sys-utils/setarch.c:106:7: error: 'PER_LINUX32_3GB' undeclared here (not in a function); did you mean 'PER_LINUX32'?
> -  106 |     X(PER_LINUX32_3GB) \
> -      |       ^~~~~~~~~~~~~~~
> -
> -Fixes:
> - - http://autobuild.buildroot.org/results/fb1feb47f2660882fa53f66bacc63e191fd52175
> -
> -Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> -Upstream: https://github.com/util-linux/util-linux/commit/4647fc6afbf7e99c49531600425df60f1243fcd2
> ----
> - sys-utils/setarch.c | 5 +++++
> - 1 file changed, 5 insertions(+)
> -
> -diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
> -index 227bc6b5de..4bcb5e69e6 100644
> ---- a/sys-utils/setarch.c
> -+++ b/sys-utils/setarch.c
> -@@ -89,6 +89,11 @@
> - # define PER_LINUX_FDPIC      (PER_LINUX | FDPIC_FUNCPTRS)
> - #endif
> -
> -+/* fallback for old uclibc-headers < 1.0.39 */
> -+#ifndef PER_LINUX32_3GB
> -+# define PER_LINUX32_3GB      (PER_LINUX32 | ADDR_LIMIT_3GB)
> -+#endif
> -+
> - #define ALL_PERSONALITIES \
> -     X(PER_LINUX) \
> -     X(PER_LINUX_32BIT) \
> diff --git a/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch b/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
> deleted file mode 100644
> index bb1a63ecc2..0000000000
> --- a/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
> +++ /dev/null
> @@ -1,65 +0,0 @@
> -From 7b3db914fa9073c667ea482c8b6b4e07fe6202cc Mon Sep 17 00:00:00 2001
> -From: Karel Zak <kzak@redhat.com>
> -Date: Mon, 27 Jan 2025 13:40:23 +0100
> -Subject: [PATCH] c.h: consolidate THREAD_LOCAL.
> -
> -Let's define this macro in one place only.
> -
> -Upstream: https://github.com/util-linux/util-linux/pull/3383
> -Signed-off-by: Karel Zak <kzak@redhat.com>
> -Signed-off-by: Julien Olivain <ju.o@free.fr>
> ----
> - include/c.h            | 9 +++++++++
> - lib/randutils.c        | 5 -----
> - libuuid/src/gen_uuid.c | 1 -
> - 3 files changed, 9 insertions(+), 6 deletions(-)
> -
> -diff --git a/include/c.h b/include/c.h
> -index 61b95ab2d..848c48536 100644
> ---- a/include/c.h
> -+++ b/include/c.h
> -@@ -595,4 +595,13 @@ static inline void *reallocarray(void *ptr, size_t nmemb, size_t size)
> - }
> - #endif
> -
> -+/*
> -+ * thread-local storage
> -+ */
> -+#ifdef HAVE_TLS
> -+# define THREAD_LOCAL static __thread
> -+#else
> -+# define THREAD_LOCAL static
> -+#endif
> -+
> - #endif /* UTIL_LINUX_C_H */
> -diff --git a/lib/randutils.c b/lib/randutils.c
> -index 15c2f7834..4c806e682 100644
> ---- a/lib/randutils.c
> -+++ b/lib/randutils.c
> -@@ -20,11 +20,6 @@
> - #include "randutils.h"
> - #include "nls.h"
> -
> --#ifdef HAVE_TLS
> --#define THREAD_LOCAL static __thread
> --#else
> --#define THREAD_LOCAL static
> --#endif
> -
> - #ifdef HAVE_GETRANDOM
> - # include <sys/random.h>
> -diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
> -index 3b76ddc9a..69712267f 100644
> ---- a/libuuid/src/gen_uuid.c
> -+++ b/libuuid/src/gen_uuid.c
> -@@ -92,7 +92,6 @@
> - #include "md5.h"
> - #include "sha1.h"
> -
> --#define THREAD_LOCAL static __thread
> -
> - #ifdef _WIN32
> - static void gettimeofday (struct timeval *tv, void *dummy)
> ---
> -2.48.1
> -
> diff --git a/package/util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch b/package/util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
> new file mode 100644
> index 0000000000..5a53aed8ff
> --- /dev/null
> +++ b/package/util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
> @@ -0,0 +1,59 @@
> +From 300a66c30c3d0fb04c0f24cf23fde80e1e3bf5e4 Mon Sep 17 00:00:00 2001
> +From: Thomas Devoogdt <thomas.devoogdt@barco.com>
> +Date: Tue, 25 Mar 2025 11:58:18 +0100
> +Subject: [PATCH] lsns: fix undefined reference to add_namespace_for_nsfd #3483
> +
> +Fixes:
> +
> +sys-utils/lsns-lsns.o: In function `read_process':
> +lsns.c:(.text+0x9e8): undefined reference to `add_namespace_for_nsfd'
> +collect2: error: ld returned 1 exit status
> +
> +Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> +(cherry picked from commit 2ced43400f35f7bd45b29364e04166a63a06e16a)
> +Upstream: https://github.com/util-linux/util-linux/pull/3484
> +Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> +---
> + sys-utils/lsns.c | 6 ++++++
> + 1 file changed, 6 insertions(+)
> +
> +diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c
> +index 2b613cf71..4c49a8b2d 100644
> +--- a/sys-utils/lsns.c
> ++++ b/sys-utils/lsns.c
> +@@ -587,7 +587,10 @@ static void add_namespace_from_sock(struct lsns *ls, pid_t pid, uint64_t fd)
> +       if (get_namespace(ls, sb.st_ino))
> +               goto out_nsfd;
> +
> ++#ifdef USE_NS_GET_API
> +       add_namespace_for_nsfd(ls, nsfd, sb.st_ino);
> ++#endif
> ++
> + out_nsfd:
> +       close(nsfd);
> + out_sk:
> +@@ -608,6 +611,7 @@ static void add_namespace_from_sock(struct lsns *ls __attribute__((__unused__)),
> + {
> + }
> + #endif /* HAVE_LINUX_NET_NAMESPACE_H */
> ++
> + /* Read namespaces open(2)ed explicitly by the process specified by `pc'. */
> + static void read_opened_namespaces(struct lsns *ls, struct path_cxt *pc, pid_t pid)
> + {
> +@@ -627,11 +631,13 @@ static void read_opened_namespaces(struct lsns *ls, struct path_cxt *pc, pid_t p
> +               if (st.st_dev == ls->nsfs_dev) {
> +                       if (get_namespace(ls, st.st_ino))
> +                               continue;
> ++#ifdef USE_NS_GET_API
> +                       int fd = ul_path_openf(pc, O_RDONLY, "fd/%ju", (uintmax_t) num);
> +                       if (fd >= 0) {
> +                               add_namespace_for_nsfd(ls, fd, st.st_ino);
> +                               close(fd);
> +                       }
> ++#endif
> +               } else if ((st.st_mode & S_IFMT) == S_IFSOCK) {
> +                       add_namespace_from_sock(ls, pid, num);
> +               }
> +--
> +2.43.0
> +
> diff --git a/package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch b/package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
> deleted file mode 100644
> index 843253a56a..0000000000
> --- a/package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
> +++ /dev/null
> @@ -1,47 +0,0 @@
> -From 0735eb8bc0ed4bc9820ea7e4e600fed246457b18 Mon Sep 17 00:00:00 2001
> -From: Karel Zak <kzak@redhat.com>
> -Date: Mon, 27 Jan 2025 14:01:38 +0100
> -Subject: [PATCH] autotools: define HAVE_LIBPTHREAD and PTHREAD_LIBS
> -
> -Upstream: https://github.com/util-linux/util-linux/pull/3383
> -Signed-off-by: Karel Zak <kzak@redhat.com>
> -Signed-off-by: Julien Olivain <ju.o@free.fr>
> ----
> - configure.ac              | 7 +++++++
> - libuuid/src/Makemodule.am | 2 +-
> - 2 files changed, 8 insertions(+), 1 deletion(-)
> -
> -diff --git a/configure.ac b/configure.ac
> -index 82d0e4bf9..9a7f260c5 100644
> ---- a/configure.ac
> -+++ b/configure.ac
> -@@ -738,6 +738,13 @@ AS_IF([test x"$have_timer" = xno], [
> - ])
> -
> -
> -+AC_CHECK_LIB([pthread], [pthread_atfork], [
> -+      PTHREAD_LIBS="-lpthread"
> -+      AC_DEFINE([HAVE_LIBPTHREAD], [1], [Define if libpthred exist])
> -+])
> -+AC_SUBST([PTHREAD_LIBS])
> -+
> -+
> - AC_CHECK_LIB([rtas], [rtas_get_sysparm], [
> -       RTAS_LIBS="-lrtas"
> -       AC_DEFINE([HAVE_LIBRTAS], [1], [Define if librtas exists])
> -diff --git a/libuuid/src/Makemodule.am b/libuuid/src/Makemodule.am
> -index 867ad7be5..58b64fe9b 100644
> ---- a/libuuid/src/Makemodule.am
> -+++ b/libuuid/src/Makemodule.am
> -@@ -31,7 +31,7 @@ libuuid_la_SOURCES = \
> - EXTRA_libuuid_la_DEPENDENCIES = \
> -       libuuid/src/libuuid.sym
> -
> --libuuid_la_LIBADD       = $(LDADD) $(SOCKET_LIBS) -lpthread
> -+libuuid_la_LIBADD       = $(LDADD) $(SOCKET_LIBS) $(PTHREAD_LIBS)
> -
> - libuuid_la_CFLAGS = \
> -       $(AM_CFLAGS) \
> ---
> -2.48.1
> -
> diff --git a/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch b/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
> deleted file mode 100644
> index 19e0697769..0000000000
> --- a/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
> +++ /dev/null
> @@ -1,27 +0,0 @@
> -From f540cc6fed7224fb9ca162cb2f33c338260ae1d2 Mon Sep 17 00:00:00 2001
> -From: Karel Zak <kzak@redhat.com>
> -Date: Mon, 27 Jan 2025 14:11:35 +0100
> -Subject: [PATCH] meson: add HAVE_LIBPTHREAD
> -
> -Upstream: https://github.com/util-linux/util-linux/pull/3383
> -Signed-off-by: Karel Zak <kzak@redhat.com>
> -Signed-off-by: Julien Olivain <ju.o@free.fr>
> ----
> - meson.build | 1 +
> - 1 file changed, 1 insertion(+)
> -
> -diff --git a/meson.build b/meson.build
> -index 6d1f986af..ac5fdd799 100644
> ---- a/meson.build
> -+++ b/meson.build
> -@@ -748,6 +748,7 @@ endif
> - conf.set('HAVE_CLOCK_GETTIME', have ? 1 : false)
> -
> - thread_libs = dependency('threads')
> -+conf.set('HAVE_LIBPTHREAD', thread_libs.found() ? 1 : false)
> -
> - have = cc.has_function('timer_create')
> - if not have
> ---
> -2.48.1
> -
> diff --git a/package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch b/package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
> deleted file mode 100644
> index 0d90f8aec9..0000000000
> --- a/package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
> +++ /dev/null
> @@ -1,82 +0,0 @@
> -From eecaa2c0dda817eba2d493f6ddb42c39cf789fc2 Mon Sep 17 00:00:00 2001
> -From: Karel Zak <kzak@redhat.com>
> -Date: Mon, 27 Jan 2025 14:28:36 +0100
> -Subject: [PATCH] libuuid: support non-cached scenarios (when -lpthread is
> - unavailable)
> -
> -This patch makes the dependence on pthread optional for libuuid. In
> -certain cases, such as Buildroot Linux, uClibc-ng, and very low
> -resource systems, libpthread may be unavailable.
> -
> -If libuuid is compiled without pthread, it will not use a local cache
> -and will instead request a UUID from uuidd for each call. This may
> -result in less efficient performance, but the UUIDs generated will
> -still be unique and reliable.
> -
> -On minimalistic systems, it is highly likely that uuidd will not be
> -installed, making this change important for portability and robust
> -code.
> -
> -Upstream: https://github.com/util-linux/util-linux/pull/3383
> -Addresses: https://github.com/util-linux/util-linux/pull/3375
> -Signed-off-by: Karel Zak <kzak@redhat.com>
> -Signed-off-by: Julien Olivain <ju.o@free.fr>
> ----
> - libuuid/src/gen_uuid.c | 18 +++++++++++++++---
> - 1 file changed, 15 insertions(+), 3 deletions(-)
> -
> -diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
> -index 69712267f..1ed82b46b 100644
> ---- a/libuuid/src/gen_uuid.c
> -+++ b/libuuid/src/gen_uuid.c
> -@@ -80,7 +80,10 @@
> - #if defined(__linux__) && defined(HAVE_SYS_SYSCALL_H)
> - #include <sys/syscall.h>
> - #endif
> --#include <pthread.h>
> -+#ifdef HAVE_LIBPTHREAD
> -+# include <pthread.h>
> -+#endif
> -+
> - #include <signal.h>
> -
> - #include "all-io.h"
> -@@ -580,8 +583,7 @@ int __uuid_generate_time_cont(uuid_t out, int *num, uint32_t cont_offset)
> -  * If neither of these is possible (e.g. because of insufficient permissions), it generates
> -  * the UUID anyway, but returns -1. Otherwise, returns 0.
> -  */
> --
> --/* thread local cache for uuidd based requests */
> -+#ifdef HAVE_LIBPTHREAD
> - THREAD_LOCAL struct {
> -       int             num;
> -       int             cache_size;
> -@@ -597,8 +599,10 @@ static void reset_uuidd_cache(void)
> -       memset(&uuidd_cache, 0, sizeof(uuidd_cache));
> -       uuidd_cache.cache_size = CS_MIN;
> - }
> -+#endif /* HAVE_LIBPTHREAD */
> -
> - static int uuid_generate_time_generic(uuid_t out) {
> -+#ifdef HAVE_LIBPTHREAD
> -       static volatile sig_atomic_t atfork_registered;
> -       time_t  now;
> -
> -@@ -651,6 +655,14 @@ static int uuid_generate_time_generic(uuid_t out) {
> -               return 0;
> -       }
> -
> -+#else /* !HAVE_LIBPTHREAD */
> -+      {
> -+              int num = 1;
> -+              if (get_uuid_via_daemon(UUIDD_OP_TIME_UUID, out, &num) == 0)
> -+                      return 0;
> -+      }
> -+#endif /* HAVE_LIBPTHREAD */
> -+
> -       return __uuid_generate_time(out, NULL);
> - }
> -
> ---
> -2.48.1
> -
> diff --git a/package/util-linux/util-linux.hash b/package/util-linux/util-linux.hash
> index 317efebcbf..e74aa17c94 100644
> --- a/package/util-linux/util-linux.hash
> +++ b/package/util-linux/util-linux.hash
> @@ -1,10 +1,14 @@
> -# From https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.40/sha256sums.asc
> -sha256  d78b37a66f5922d70edf3bdfb01a6b33d34ed3c3cafd6628203b2a2b67c8e8b3  util-linux-2.40.2.tar.xz
> +# From https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.41/sha256sums.asc
> +sha256  81ee93b3cfdfeb7d7c4090cedeba1d7bbce9141fd0b501b686b3fe475ddca4c6  util-linux-2.41.tar.xz
>  # License files, locally calculated
> -sha256  27f25514040a401b2ceb7057eae1f46cedb1666664b519b5be7e0960d1b35164  README.licensing
> +sha256  4c2db318192bda62f3f8fcf71488bb5e602ae4385eba281d711b46cc13a40bb3  README.licensing
> +sha256  527f738966ca396cd5a68c1509390de2a780c6b614d9ee57f7544a6161938ed1  Documentation/licenses/COPYING.BSD-2-Clause
>  sha256  9b718a9460fed5952466421235bc79eb49d4e9eacc920d7a9dd6285ab8fd6c6d  Documentation/licenses/COPYING.BSD-3-Clause
>  sha256  ba7640f00d93e72e92b94b9d71f25ec53bac2f1682f5c4adcccb0018359f60f8  Documentation/licenses/COPYING.BSD-4-Clause-UC
> +sha256  6fc9e709ccbfe0d77fbffa2427a983282be2eb88e47b1cdb49f21a83b4d1e665  Documentation/licenses/COPYING.EUPL-1.2
> +sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  Documentation/licenses/COPYING.GPL-2.0-only
>  sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  Documentation/licenses/COPYING.GPL-2.0-or-later
> +sha256  3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986  Documentation/licenses/COPYING.GPL-3.0-or-later
>  sha256  e53348ce276358e9997014071c5294b36a18c4b34f32f00ee57b9acce0aafd63  Documentation/licenses/COPYING.ISC
>  sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  Documentation/licenses/COPYING.LGPL-2.1-or-later
>  sha256  8555341619542abb48c102afd954e42d4478e5be16ad3d5af7b0ff71009e7348  Documentation/licenses/COPYING.MIT
> diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
> index ed30c0b107..71e458ccc4 100644
> --- a/package/util-linux/util-linux.mk
> +++ b/package/util-linux/util-linux.mk
> @@ -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.40
> -UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).2
> +UTIL_LINUX_VERSION_MAJOR = 2.41
> +UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR)
>  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)
>
> @@ -24,18 +24,19 @@ UTIL_LINUX_LICENSE = \
>         ISC (rfkill) \
>         MIT (hardlink, flock)
>  UTIL_LINUX_LICENSE_FILES = README.licensing \
> +       Documentation/licenses/COPYING.BSD-2-Clause \
>         Documentation/licenses/COPYING.BSD-3-Clause \
>         Documentation/licenses/COPYING.BSD-4-Clause-UC \
> +       Documentation/licenses/COPYING.EUPL-1.2 \
> +       Documentation/licenses/COPYING.GPL-2.0-only \
>         Documentation/licenses/COPYING.GPL-2.0-or-later \
> +       Documentation/licenses/COPYING.GPL-3.0-or-later \
>         Documentation/licenses/COPYING.ISC \
>         Documentation/licenses/COPYING.LGPL-2.1-or-later \
>         Documentation/licenses/COPYING.MIT
>
>  UTIL_LINUX_CPE_ID_VENDOR = kernel
>
> -# 0001-libmount-ifdef-statx-call.patch
> -UTIL_LINUX_AUTORECONF = YES
> -
>  UTIL_LINUX_INSTALL_STAGING = YES
>  UTIL_LINUX_DEPENDENCIES = \
>         host-pkgconf \
> --
> 2.43.0
>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Buildroot] [PATCH v2] package/util-linux: bump to 2.41
  2025-04-02  8:26   ` [Buildroot] [PATCH v2] " Thomas Devoogdt
  2025-04-02 10:18     ` Thomas Devoogdt
@ 2025-04-02 11:08     ` Waldemar Brodkorb
  2025-04-02 17:08       ` Thomas Devoogdt
  1 sibling, 1 reply; 18+ messages in thread
From: Waldemar Brodkorb @ 2025-04-02 11:08 UTC (permalink / raw)
  To: Thomas Devoogdt; +Cc: thomas.devoogdt, buildroot

Hi Thomas,

my problem with mount still exist. Could you reproduce it?
I just use defconfig for mips64, change to uclibc-ng and
then add util-linux mount.

best regards
 Waldemar

Thomas Devoogdt wrote,

> From: Thomas Devoogdt <thomas.devoogdt@barco.com>
> 
> News: https://lore.kernel.org/util-linux/2cifsg7vkdiivfsmmximhbzybrsopn7zfqgwz2f6hyflh35pjr@ecyicq2cbsro/
> 
> Dropped patches which are all upstream.
> - https://github.com/util-linux/util-linux/pull/3049
> - https://github.com/util-linux/util-linux/pull/3383
> 
> Added some new patches. (which are also upstream)
> - https://github.com/util-linux/util-linux/pull/3471
> - https://github.com/util-linux/util-linux/pull/3484
> 
> Synced all license files.
> 
> Dropped the AUTORECONF call, since
> 0001-libmount-ifdef-statx-call.patch is upstream.
> 
> Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> ---
> v2:
>  - dropped AUTORECONF
>  - added two compile patches
> ---
>  .../0001-misc-never-include-wchar.h.patch     | 160 ++++++++++++++++++
>  ...ch.c-fix-build-with-uclibc-ng-1.0.39.patch |  39 -----
>  .../0002-c.h-consolidate-THREAD_LOCAL.patch   |  65 -------
>  ...ed-reference-to-add_namespace_for_ns.patch |  59 +++++++
>  ...ine-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch |  47 -----
>  .../0004-meson-add-HAVE_LIBPTHREAD.patch      |  27 ---
>  ...non-cached-scenarios-when-lpthread-i.patch |  82 ---------
>  package/util-linux/util-linux.hash            |  10 +-
>  package/util-linux/util-linux.mk              |  11 +-
>  9 files changed, 232 insertions(+), 268 deletions(-)
>  create mode 100644 package/util-linux/0001-misc-never-include-wchar.h.patch
>  delete mode 100644 package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
>  delete mode 100644 package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
>  create mode 100644 package/util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
>  delete mode 100644 package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
>  delete mode 100644 package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
>  delete mode 100644 package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
> 
> diff --git a/package/util-linux/0001-misc-never-include-wchar.h.patch b/package/util-linux/0001-misc-never-include-wchar.h.patch
> new file mode 100644
> index 0000000000..3adfaa2261
> --- /dev/null
> +++ b/package/util-linux/0001-misc-never-include-wchar.h.patch
> @@ -0,0 +1,160 @@
> +From e8205294e329f50bdf465d8cdd15653fd42ec5c0 Mon Sep 17 00:00:00 2001
> +From: Karel Zak <kzak@redhat.com>
> +Date: Thu, 20 Mar 2025 11:57:06 +0100
> +Subject: [PATCH] misc: never include wchar.h
> +
> +We have a portable "widechar.h" that follows --disable-widechar and
> +provides portability. It is a bug to directly include libc's wchar.h
> +or wctype.h.
> +
> +Fixes: https://github.com/util-linux/util-linux/issues/3470
> +Signed-off-by: Karel Zak <kzak@redhat.com>
> +(cherry picked from commit 5c0888dde3cc296d06b8243dcc78248ff90526e5)
> +Upstream: https://github.com/util-linux/util-linux/pull/3471
> +Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> +---
> + disk-utils/cfdisk.c          | 6 +-----
> + include/carefulputc.h        | 5 +----
> + include/fgetwc_or_err.h      | 6 +-----
> + lib/idcache.c                | 2 +-
> + sys-utils/irqtop.c           | 7 ++-----
> + sys-utils/lsns.c             | 2 +-
> + tests/helpers/test_sysinfo.c | 2 +-
> + 7 files changed, 8 insertions(+), 22 deletions(-)
> +
> +diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c
> +index 4018f4d3d..d4057eedb 100644
> +--- a/disk-utils/cfdisk.c
> ++++ b/disk-utils/cfdisk.c
> +@@ -52,14 +52,10 @@
> + # include <ncurses/ncurses.h>
> + #endif
> + 
> +-#ifdef HAVE_WIDECHAR
> +-# include <wctype.h>
> +-# include <wchar.h>
> +-#endif
> +-
> + #include "c.h"
> + #include "closestream.h"
> + #include "nls.h"
> ++#include "widechar.h"
> + #include "strutils.h"
> + #include "xalloc.h"
> + #include "mbsalign.h"
> +diff --git a/include/carefulputc.h b/include/carefulputc.h
> +index 3cc6f7ff9..c6b778bba 100644
> +--- a/include/carefulputc.h
> ++++ b/include/carefulputc.h
> +@@ -4,12 +4,9 @@
> + #include <stdio.h>
> + #include <string.h>
> + #include <ctype.h>
> +-#ifdef HAVE_WIDECHAR
> +-#include <wctype.h>
> +-#include <wchar.h>
> +-#endif
> + #include <stdbool.h>
> + 
> ++#include "widechar.h"
> + #include "cctype.h"
> + 
> + /*
> +diff --git a/include/fgetwc_or_err.h b/include/fgetwc_or_err.h
> +index 3cf926283..f6ba71c6b 100644
> +--- a/include/fgetwc_or_err.h
> ++++ b/include/fgetwc_or_err.h
> +@@ -1,13 +1,9 @@
> + #ifndef UTIL_LINUX_FGETWC_OR_ERR_H
> + #define UTIL_LINUX_FGETWC_OR_ERR_H
> + 
> +-#include <stdio.h>
> +-#include <wchar.h>
> +-#include <errno.h>
> +-
> +-#include "widechar.h"
> + #include "c.h"
> + #include "nls.h"
> ++#include "widechar.h"
> + 
> + static inline wint_t fgetwc_or_err(FILE *stream) {
> + 	wint_t ret;
> +diff --git a/lib/idcache.c b/lib/idcache.c
> +index fa77e7b07..7bae76823 100644
> +--- a/lib/idcache.c
> ++++ b/lib/idcache.c
> +@@ -4,12 +4,12 @@
> +  *
> +  * Written by Karel Zak <kzak@redhat.com>
> +  */
> +-#include <wchar.h>
> + #include <pwd.h>
> + #include <grp.h>
> + #include <sys/types.h>
> + 
> + #include "c.h"
> ++#include "widechar.h"
> + #include "idcache.h"
> + 
> + struct identry *get_id(struct idcache *ic, unsigned long int id)
> +diff --git a/sys-utils/irqtop.c b/sys-utils/irqtop.c
> +index ce6a2ca5b..f05bf6bef 100644
> +--- a/sys-utils/irqtop.c
> ++++ b/sys-utils/irqtop.c
> +@@ -43,13 +43,10 @@
> + # include <ncurses/ncurses.h>
> + #endif
> + 
> +-#ifdef HAVE_WIDECHAR
> +-# include <wctype.h>
> +-# include <wchar.h>
> +-#endif
> +-
> + #include <libsmartcols.h>
> + 
> ++#include "c.h"
> ++#include "widechar.h"
> + #include "closestream.h"
> + #include "cpuset.h"
> + #include "monotonic.h"
> +diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c
> +index 6b2dcba96..2b613cf71 100644
> +--- a/sys-utils/lsns.c
> ++++ b/sys-utils/lsns.c
> +@@ -19,7 +19,6 @@
> + #include <unistd.h>
> + #include <sys/stat.h>
> + #include <sys/types.h>
> +-#include <wchar.h>
> + #include <libsmartcols.h>
> + #include <libmount.h>
> + # include <stdbool.h>
> +@@ -43,6 +42,7 @@
> + #include "nls.h"
> + #include "xalloc.h"
> + #include "c.h"
> ++#include "widechar.h"
> + #include "list.h"
> + #include "closestream.h"
> + #include "optutils.h"
> +diff --git a/tests/helpers/test_sysinfo.c b/tests/helpers/test_sysinfo.c
> +index 1559d471f..95f50f3f6 100644
> +--- a/tests/helpers/test_sysinfo.c
> ++++ b/tests/helpers/test_sysinfo.c
> +@@ -23,12 +23,12 @@
> + #include <limits.h>
> + #include <stdint.h>
> + #include <inttypes.h>
> +-#include <wchar.h>
> + #include <errno.h>
> + #include <time.h>
> + #include <sys/ioctl.h>
> + 
> + #include "c.h"
> ++#include "widechar.h"
> + 
> + #ifdef __linux__
> + # include <sys/mount.h>
> +-- 
> +2.43.0
> +
> diff --git a/package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch b/package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
> deleted file mode 100644
> index 12dd119ef3..0000000000
> --- a/package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
> +++ /dev/null
> @@ -1,39 +0,0 @@
> -From beef18da4de87ca5aaadf2beb14187f35cc4f50f Mon Sep 17 00:00:00 2001
> -From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> -Date: Wed, 15 May 2024 18:22:11 +0200
> -Subject: [PATCH] sys-utils/setarch.c: fix build with uclibc-ng < 1.0.39
> -
> -Fix the following build failure with uclibc-ng < 1.0.39 (i.e., without
> -https://github.com/wbx-github/uclibc-ng/commit/85ac4f04d94e98389a8315e720630d0f95bfdfd6)
> -raised since version 2.39 and
> -https://github.com/util-linux/util-linux/commit/03a254f010b08da1175f50a8ae7882e59228f1b4:
> -
> -sys-utils/setarch.c:106:7: error: 'PER_LINUX32_3GB' undeclared here (not in a function); did you mean 'PER_LINUX32'?
> -  106 |     X(PER_LINUX32_3GB) \
> -      |       ^~~~~~~~~~~~~~~
> -
> -Fixes:
> - - http://autobuild.buildroot.org/results/fb1feb47f2660882fa53f66bacc63e191fd52175
> -
> -Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> -Upstream: https://github.com/util-linux/util-linux/commit/4647fc6afbf7e99c49531600425df60f1243fcd2
> ----
> - sys-utils/setarch.c | 5 +++++
> - 1 file changed, 5 insertions(+)
> -
> -diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
> -index 227bc6b5de..4bcb5e69e6 100644
> ---- a/sys-utils/setarch.c
> -+++ b/sys-utils/setarch.c
> -@@ -89,6 +89,11 @@
> - # define PER_LINUX_FDPIC	(PER_LINUX | FDPIC_FUNCPTRS)
> - #endif
> - 
> -+/* fallback for old uclibc-headers < 1.0.39 */
> -+#ifndef PER_LINUX32_3GB
> -+# define PER_LINUX32_3GB	(PER_LINUX32 | ADDR_LIMIT_3GB)
> -+#endif
> -+
> - #define ALL_PERSONALITIES \
> -     X(PER_LINUX) \
> -     X(PER_LINUX_32BIT) \
> diff --git a/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch b/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
> deleted file mode 100644
> index bb1a63ecc2..0000000000
> --- a/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
> +++ /dev/null
> @@ -1,65 +0,0 @@
> -From 7b3db914fa9073c667ea482c8b6b4e07fe6202cc Mon Sep 17 00:00:00 2001
> -From: Karel Zak <kzak@redhat.com>
> -Date: Mon, 27 Jan 2025 13:40:23 +0100
> -Subject: [PATCH] c.h: consolidate THREAD_LOCAL.
> -
> -Let's define this macro in one place only.
> -
> -Upstream: https://github.com/util-linux/util-linux/pull/3383
> -Signed-off-by: Karel Zak <kzak@redhat.com>
> -Signed-off-by: Julien Olivain <ju.o@free.fr>
> ----
> - include/c.h            | 9 +++++++++
> - lib/randutils.c        | 5 -----
> - libuuid/src/gen_uuid.c | 1 -
> - 3 files changed, 9 insertions(+), 6 deletions(-)
> -
> -diff --git a/include/c.h b/include/c.h
> -index 61b95ab2d..848c48536 100644
> ---- a/include/c.h
> -+++ b/include/c.h
> -@@ -595,4 +595,13 @@ static inline void *reallocarray(void *ptr, size_t nmemb, size_t size)
> - }
> - #endif
> - 
> -+/*
> -+ * thread-local storage
> -+ */
> -+#ifdef HAVE_TLS
> -+# define THREAD_LOCAL static __thread
> -+#else
> -+# define THREAD_LOCAL static
> -+#endif
> -+
> - #endif /* UTIL_LINUX_C_H */
> -diff --git a/lib/randutils.c b/lib/randutils.c
> -index 15c2f7834..4c806e682 100644
> ---- a/lib/randutils.c
> -+++ b/lib/randutils.c
> -@@ -20,11 +20,6 @@
> - #include "randutils.h"
> - #include "nls.h"
> - 
> --#ifdef HAVE_TLS
> --#define THREAD_LOCAL static __thread
> --#else
> --#define THREAD_LOCAL static
> --#endif
> - 
> - #ifdef HAVE_GETRANDOM
> - # include <sys/random.h>
> -diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
> -index 3b76ddc9a..69712267f 100644
> ---- a/libuuid/src/gen_uuid.c
> -+++ b/libuuid/src/gen_uuid.c
> -@@ -92,7 +92,6 @@
> - #include "md5.h"
> - #include "sha1.h"
> - 
> --#define THREAD_LOCAL static __thread
> - 
> - #ifdef _WIN32
> - static void gettimeofday (struct timeval *tv, void *dummy)
> --- 
> -2.48.1
> -
> diff --git a/package/util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch b/package/util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
> new file mode 100644
> index 0000000000..5a53aed8ff
> --- /dev/null
> +++ b/package/util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
> @@ -0,0 +1,59 @@
> +From 300a66c30c3d0fb04c0f24cf23fde80e1e3bf5e4 Mon Sep 17 00:00:00 2001
> +From: Thomas Devoogdt <thomas.devoogdt@barco.com>
> +Date: Tue, 25 Mar 2025 11:58:18 +0100
> +Subject: [PATCH] lsns: fix undefined reference to add_namespace_for_nsfd #3483
> +
> +Fixes:
> +
> +sys-utils/lsns-lsns.o: In function `read_process':
> +lsns.c:(.text+0x9e8): undefined reference to `add_namespace_for_nsfd'
> +collect2: error: ld returned 1 exit status
> +
> +Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> +(cherry picked from commit 2ced43400f35f7bd45b29364e04166a63a06e16a)
> +Upstream: https://github.com/util-linux/util-linux/pull/3484
> +Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> +---
> + sys-utils/lsns.c | 6 ++++++
> + 1 file changed, 6 insertions(+)
> +
> +diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c
> +index 2b613cf71..4c49a8b2d 100644
> +--- a/sys-utils/lsns.c
> ++++ b/sys-utils/lsns.c
> +@@ -587,7 +587,10 @@ static void add_namespace_from_sock(struct lsns *ls, pid_t pid, uint64_t fd)
> + 	if (get_namespace(ls, sb.st_ino))
> + 		goto out_nsfd;
> + 
> ++#ifdef USE_NS_GET_API
> + 	add_namespace_for_nsfd(ls, nsfd, sb.st_ino);
> ++#endif
> ++
> + out_nsfd:
> + 	close(nsfd);
> + out_sk:
> +@@ -608,6 +611,7 @@ static void add_namespace_from_sock(struct lsns *ls __attribute__((__unused__)),
> + {
> + }
> + #endif /* HAVE_LINUX_NET_NAMESPACE_H */
> ++
> + /* Read namespaces open(2)ed explicitly by the process specified by `pc'. */
> + static void read_opened_namespaces(struct lsns *ls, struct path_cxt *pc, pid_t pid)
> + {
> +@@ -627,11 +631,13 @@ static void read_opened_namespaces(struct lsns *ls, struct path_cxt *pc, pid_t p
> + 		if (st.st_dev == ls->nsfs_dev) {
> + 			if (get_namespace(ls, st.st_ino))
> + 				continue;
> ++#ifdef USE_NS_GET_API
> + 			int fd = ul_path_openf(pc, O_RDONLY, "fd/%ju", (uintmax_t) num);
> + 			if (fd >= 0) {
> + 				add_namespace_for_nsfd(ls, fd, st.st_ino);
> + 				close(fd);
> + 			}
> ++#endif
> + 		} else if ((st.st_mode & S_IFMT) == S_IFSOCK) {
> + 			add_namespace_from_sock(ls, pid, num);
> + 		}
> +-- 
> +2.43.0
> +
> diff --git a/package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch b/package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
> deleted file mode 100644
> index 843253a56a..0000000000
> --- a/package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
> +++ /dev/null
> @@ -1,47 +0,0 @@
> -From 0735eb8bc0ed4bc9820ea7e4e600fed246457b18 Mon Sep 17 00:00:00 2001
> -From: Karel Zak <kzak@redhat.com>
> -Date: Mon, 27 Jan 2025 14:01:38 +0100
> -Subject: [PATCH] autotools: define HAVE_LIBPTHREAD and PTHREAD_LIBS
> -
> -Upstream: https://github.com/util-linux/util-linux/pull/3383
> -Signed-off-by: Karel Zak <kzak@redhat.com>
> -Signed-off-by: Julien Olivain <ju.o@free.fr>
> ----
> - configure.ac              | 7 +++++++
> - libuuid/src/Makemodule.am | 2 +-
> - 2 files changed, 8 insertions(+), 1 deletion(-)
> -
> -diff --git a/configure.ac b/configure.ac
> -index 82d0e4bf9..9a7f260c5 100644
> ---- a/configure.ac
> -+++ b/configure.ac
> -@@ -738,6 +738,13 @@ AS_IF([test x"$have_timer" = xno], [
> - ])
> - 
> - 
> -+AC_CHECK_LIB([pthread], [pthread_atfork], [
> -+	PTHREAD_LIBS="-lpthread"
> -+	AC_DEFINE([HAVE_LIBPTHREAD], [1], [Define if libpthred exist])
> -+])
> -+AC_SUBST([PTHREAD_LIBS])
> -+
> -+
> - AC_CHECK_LIB([rtas], [rtas_get_sysparm], [
> - 	RTAS_LIBS="-lrtas"
> - 	AC_DEFINE([HAVE_LIBRTAS], [1], [Define if librtas exists])
> -diff --git a/libuuid/src/Makemodule.am b/libuuid/src/Makemodule.am
> -index 867ad7be5..58b64fe9b 100644
> ---- a/libuuid/src/Makemodule.am
> -+++ b/libuuid/src/Makemodule.am
> -@@ -31,7 +31,7 @@ libuuid_la_SOURCES = \
> - EXTRA_libuuid_la_DEPENDENCIES = \
> - 	libuuid/src/libuuid.sym
> - 
> --libuuid_la_LIBADD       = $(LDADD) $(SOCKET_LIBS) -lpthread
> -+libuuid_la_LIBADD       = $(LDADD) $(SOCKET_LIBS) $(PTHREAD_LIBS)
> - 
> - libuuid_la_CFLAGS = \
> - 	$(AM_CFLAGS) \
> --- 
> -2.48.1
> -
> diff --git a/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch b/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
> deleted file mode 100644
> index 19e0697769..0000000000
> --- a/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
> +++ /dev/null
> @@ -1,27 +0,0 @@
> -From f540cc6fed7224fb9ca162cb2f33c338260ae1d2 Mon Sep 17 00:00:00 2001
> -From: Karel Zak <kzak@redhat.com>
> -Date: Mon, 27 Jan 2025 14:11:35 +0100
> -Subject: [PATCH] meson: add HAVE_LIBPTHREAD
> -
> -Upstream: https://github.com/util-linux/util-linux/pull/3383
> -Signed-off-by: Karel Zak <kzak@redhat.com>
> -Signed-off-by: Julien Olivain <ju.o@free.fr>
> ----
> - meson.build | 1 +
> - 1 file changed, 1 insertion(+)
> -
> -diff --git a/meson.build b/meson.build
> -index 6d1f986af..ac5fdd799 100644
> ---- a/meson.build
> -+++ b/meson.build
> -@@ -748,6 +748,7 @@ endif
> - conf.set('HAVE_CLOCK_GETTIME', have ? 1 : false)
> - 
> - thread_libs = dependency('threads')
> -+conf.set('HAVE_LIBPTHREAD', thread_libs.found() ? 1 : false)
> - 
> - have = cc.has_function('timer_create')
> - if not have
> --- 
> -2.48.1
> -
> diff --git a/package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch b/package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
> deleted file mode 100644
> index 0d90f8aec9..0000000000
> --- a/package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
> +++ /dev/null
> @@ -1,82 +0,0 @@
> -From eecaa2c0dda817eba2d493f6ddb42c39cf789fc2 Mon Sep 17 00:00:00 2001
> -From: Karel Zak <kzak@redhat.com>
> -Date: Mon, 27 Jan 2025 14:28:36 +0100
> -Subject: [PATCH] libuuid: support non-cached scenarios (when -lpthread is
> - unavailable)
> -
> -This patch makes the dependence on pthread optional for libuuid. In
> -certain cases, such as Buildroot Linux, uClibc-ng, and very low
> -resource systems, libpthread may be unavailable.
> -
> -If libuuid is compiled without pthread, it will not use a local cache
> -and will instead request a UUID from uuidd for each call. This may
> -result in less efficient performance, but the UUIDs generated will
> -still be unique and reliable.
> -
> -On minimalistic systems, it is highly likely that uuidd will not be
> -installed, making this change important for portability and robust
> -code.
> -
> -Upstream: https://github.com/util-linux/util-linux/pull/3383
> -Addresses: https://github.com/util-linux/util-linux/pull/3375
> -Signed-off-by: Karel Zak <kzak@redhat.com>
> -Signed-off-by: Julien Olivain <ju.o@free.fr>
> ----
> - libuuid/src/gen_uuid.c | 18 +++++++++++++++---
> - 1 file changed, 15 insertions(+), 3 deletions(-)
> -
> -diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
> -index 69712267f..1ed82b46b 100644
> ---- a/libuuid/src/gen_uuid.c
> -+++ b/libuuid/src/gen_uuid.c
> -@@ -80,7 +80,10 @@
> - #if defined(__linux__) && defined(HAVE_SYS_SYSCALL_H)
> - #include <sys/syscall.h>
> - #endif
> --#include <pthread.h>
> -+#ifdef HAVE_LIBPTHREAD
> -+# include <pthread.h>
> -+#endif
> -+
> - #include <signal.h>
> - 
> - #include "all-io.h"
> -@@ -580,8 +583,7 @@ int __uuid_generate_time_cont(uuid_t out, int *num, uint32_t cont_offset)
> -  * If neither of these is possible (e.g. because of insufficient permissions), it generates
> -  * the UUID anyway, but returns -1. Otherwise, returns 0.
> -  */
> --
> --/* thread local cache for uuidd based requests */
> -+#ifdef HAVE_LIBPTHREAD
> - THREAD_LOCAL struct {
> - 	int		num;
> - 	int		cache_size;
> -@@ -597,8 +599,10 @@ static void reset_uuidd_cache(void)
> - 	memset(&uuidd_cache, 0, sizeof(uuidd_cache));
> - 	uuidd_cache.cache_size = CS_MIN;
> - }
> -+#endif /* HAVE_LIBPTHREAD */
> - 
> - static int uuid_generate_time_generic(uuid_t out) {
> -+#ifdef HAVE_LIBPTHREAD
> - 	static volatile sig_atomic_t atfork_registered;
> - 	time_t	now;
> - 
> -@@ -651,6 +655,14 @@ static int uuid_generate_time_generic(uuid_t out) {
> - 		return 0;
> - 	}
> - 
> -+#else /* !HAVE_LIBPTHREAD */
> -+	{
> -+		int num = 1;
> -+		if (get_uuid_via_daemon(UUIDD_OP_TIME_UUID, out, &num) == 0)
> -+			return 0;
> -+	}
> -+#endif /* HAVE_LIBPTHREAD */
> -+
> - 	return __uuid_generate_time(out, NULL);
> - }
> - 
> --- 
> -2.48.1
> -
> diff --git a/package/util-linux/util-linux.hash b/package/util-linux/util-linux.hash
> index 317efebcbf..e74aa17c94 100644
> --- a/package/util-linux/util-linux.hash
> +++ b/package/util-linux/util-linux.hash
> @@ -1,10 +1,14 @@
> -# From https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.40/sha256sums.asc
> -sha256  d78b37a66f5922d70edf3bdfb01a6b33d34ed3c3cafd6628203b2a2b67c8e8b3  util-linux-2.40.2.tar.xz
> +# From https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.41/sha256sums.asc
> +sha256  81ee93b3cfdfeb7d7c4090cedeba1d7bbce9141fd0b501b686b3fe475ddca4c6  util-linux-2.41.tar.xz
>  # License files, locally calculated
> -sha256  27f25514040a401b2ceb7057eae1f46cedb1666664b519b5be7e0960d1b35164  README.licensing
> +sha256  4c2db318192bda62f3f8fcf71488bb5e602ae4385eba281d711b46cc13a40bb3  README.licensing
> +sha256  527f738966ca396cd5a68c1509390de2a780c6b614d9ee57f7544a6161938ed1  Documentation/licenses/COPYING.BSD-2-Clause
>  sha256  9b718a9460fed5952466421235bc79eb49d4e9eacc920d7a9dd6285ab8fd6c6d  Documentation/licenses/COPYING.BSD-3-Clause
>  sha256  ba7640f00d93e72e92b94b9d71f25ec53bac2f1682f5c4adcccb0018359f60f8  Documentation/licenses/COPYING.BSD-4-Clause-UC
> +sha256  6fc9e709ccbfe0d77fbffa2427a983282be2eb88e47b1cdb49f21a83b4d1e665  Documentation/licenses/COPYING.EUPL-1.2
> +sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  Documentation/licenses/COPYING.GPL-2.0-only
>  sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  Documentation/licenses/COPYING.GPL-2.0-or-later
> +sha256  3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986  Documentation/licenses/COPYING.GPL-3.0-or-later
>  sha256  e53348ce276358e9997014071c5294b36a18c4b34f32f00ee57b9acce0aafd63  Documentation/licenses/COPYING.ISC
>  sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  Documentation/licenses/COPYING.LGPL-2.1-or-later
>  sha256  8555341619542abb48c102afd954e42d4478e5be16ad3d5af7b0ff71009e7348  Documentation/licenses/COPYING.MIT
> diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
> index ed30c0b107..71e458ccc4 100644
> --- a/package/util-linux/util-linux.mk
> +++ b/package/util-linux/util-linux.mk
> @@ -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.40
> -UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).2
> +UTIL_LINUX_VERSION_MAJOR = 2.41
> +UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR)
>  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)
>  
> @@ -24,18 +24,19 @@ UTIL_LINUX_LICENSE = \
>  	ISC (rfkill) \
>  	MIT (hardlink, flock)
>  UTIL_LINUX_LICENSE_FILES = README.licensing \
> +	Documentation/licenses/COPYING.BSD-2-Clause \
>  	Documentation/licenses/COPYING.BSD-3-Clause \
>  	Documentation/licenses/COPYING.BSD-4-Clause-UC \
> +	Documentation/licenses/COPYING.EUPL-1.2 \
> +	Documentation/licenses/COPYING.GPL-2.0-only \
>  	Documentation/licenses/COPYING.GPL-2.0-or-later \
> +	Documentation/licenses/COPYING.GPL-3.0-or-later \
>  	Documentation/licenses/COPYING.ISC \
>  	Documentation/licenses/COPYING.LGPL-2.1-or-later \
>  	Documentation/licenses/COPYING.MIT
>  
>  UTIL_LINUX_CPE_ID_VENDOR = kernel
>  
> -# 0001-libmount-ifdef-statx-call.patch
> -UTIL_LINUX_AUTORECONF = YES
> -
>  UTIL_LINUX_INSTALL_STAGING = YES
>  UTIL_LINUX_DEPENDENCIES = \
>  	host-pkgconf \
> -- 
> 2.43.0
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Buildroot] [PATCH v2] package/util-linux: bump to 2.41
  2025-04-02 11:08     ` Waldemar Brodkorb
@ 2025-04-02 17:08       ` Thomas Devoogdt
  2025-04-02 17:40         ` Waldemar Brodkorb
  2025-04-02 18:56         ` Waldemar Brodkorb
  0 siblings, 2 replies; 18+ messages in thread
From: Thomas Devoogdt @ 2025-04-02 17:08 UTC (permalink / raw)
  To: Waldemar Brodkorb
  Cc: Thomas Devoogdt, Arnout Vandecappelle via buildroot,
	Thomas Devoogdt


[-- Attachment #1.1: Type: text/plain, Size: 25202 bytes --]

Hi Waldemar,


What exact defconfig are you using?

I just ran this:
$ cat util-linux.config
BR2_PACKAGE_UTIL_LINUX=y
BR2_PACKAGE_UTIL_LINUX_MOUNT=y
BR2_PACKAGE_UTIL_LINUX_LIBMOUNT=y
BR2_PACKAGE_UTIL_LINUX_MOUNTPOINT=y
$ ./utils/test-pkg -p util-linux -c util-linux.config -a

No failing test, and multiple uclibc toolchains were tested alongside.


Kr,

Thomas Devoogdt


Op wo 2 apr 2025 om 13:08 schreef Waldemar Brodkorb <wbx@openadk.org>:

>
> Hi Thomas,
>
> my problem with mount still exist. Could you reproduce it?
> I just use defconfig for mips64, change to uclibc-ng and
> then add util-linux mount.
>
> best regards
>  Waldemar
>
> Thomas Devoogdt wrote,
>
> > From: Thomas Devoogdt <thomas.devoogdt@barco.com>
> >
> > News:
https://lore.kernel.org/util-linux/2cifsg7vkdiivfsmmximhbzybrsopn7zfqgwz2f6hyflh35pjr@ecyicq2cbsro/
> >
> > Dropped patches which are all upstream.
> > - https://github.com/util-linux/util-linux/pull/3049
> > - https://github.com/util-linux/util-linux/pull/3383
> >
> > Added some new patches. (which are also upstream)
> > - https://github.com/util-linux/util-linux/pull/3471
> > - https://github.com/util-linux/util-linux/pull/3484
> >
> > Synced all license files.
> >
> > Dropped the AUTORECONF call, since
> > 0001-libmount-ifdef-statx-call.patch is upstream.
> >
> > Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> > ---
> > v2:
> >  - dropped AUTORECONF
> >  - added two compile patches
> > ---
> >  .../0001-misc-never-include-wchar.h.patch     | 160 ++++++++++++++++++
> >  ...ch.c-fix-build-with-uclibc-ng-1.0.39.patch |  39 -----
> >  .../0002-c.h-consolidate-THREAD_LOCAL.patch   |  65 -------
> >  ...ed-reference-to-add_namespace_for_ns.patch |  59 +++++++
> >  ...ine-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch |  47 -----
> >  .../0004-meson-add-HAVE_LIBPTHREAD.patch      |  27 ---
> >  ...non-cached-scenarios-when-lpthread-i.patch |  82 ---------
> >  package/util-linux/util-linux.hash            |  10 +-
> >  package/util-linux/util-linux.mk              |  11 +-
> >  9 files changed, 232 insertions(+), 268 deletions(-)
> >  create mode 100644
package/util-linux/0001-misc-never-include-wchar.h.patch
> >  delete mode 100644
package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
> >  delete mode 100644
package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
> >  create mode 100644
package/util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
> >  delete mode 100644
package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
> >  delete mode 100644
package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
> >  delete mode 100644
package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
> >
> > diff --git a/package/util-linux/0001-misc-never-include-wchar.h.patch
b/package/util-linux/0001-misc-never-include-wchar.h.patch
> > new file mode 100644
> > index 0000000000..3adfaa2261
> > --- /dev/null
> > +++ b/package/util-linux/0001-misc-never-include-wchar.h.patch
> > @@ -0,0 +1,160 @@
> > +From e8205294e329f50bdf465d8cdd15653fd42ec5c0 Mon Sep 17 00:00:00 2001
> > +From: Karel Zak <kzak@redhat.com>
> > +Date: Thu, 20 Mar 2025 11:57:06 +0100
> > +Subject: [PATCH] misc: never include wchar.h
> > +
> > +We have a portable "widechar.h" that follows --disable-widechar and
> > +provides portability. It is a bug to directly include libc's wchar.h
> > +or wctype.h.
> > +
> > +Fixes: https://github.com/util-linux/util-linux/issues/3470
> > +Signed-off-by: Karel Zak <kzak@redhat.com>
> > +(cherry picked from commit 5c0888dde3cc296d06b8243dcc78248ff90526e5)
> > +Upstream: https://github.com/util-linux/util-linux/pull/3471
> > +Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> > +---
> > + disk-utils/cfdisk.c          | 6 +-----
> > + include/carefulputc.h        | 5 +----
> > + include/fgetwc_or_err.h      | 6 +-----
> > + lib/idcache.c                | 2 +-
> > + sys-utils/irqtop.c           | 7 ++-----
> > + sys-utils/lsns.c             | 2 +-
> > + tests/helpers/test_sysinfo.c | 2 +-
> > + 7 files changed, 8 insertions(+), 22 deletions(-)
> > +
> > +diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c
> > +index 4018f4d3d..d4057eedb 100644
> > +--- a/disk-utils/cfdisk.c
> > ++++ b/disk-utils/cfdisk.c
> > +@@ -52,14 +52,10 @@
> > + # include <ncurses/ncurses.h>
> > + #endif
> > +
> > +-#ifdef HAVE_WIDECHAR
> > +-# include <wctype.h>
> > +-# include <wchar.h>
> > +-#endif
> > +-
> > + #include "c.h"
> > + #include "closestream.h"
> > + #include "nls.h"
> > ++#include "widechar.h"
> > + #include "strutils.h"
> > + #include "xalloc.h"
> > + #include "mbsalign.h"
> > +diff --git a/include/carefulputc.h b/include/carefulputc.h
> > +index 3cc6f7ff9..c6b778bba 100644
> > +--- a/include/carefulputc.h
> > ++++ b/include/carefulputc.h
> > +@@ -4,12 +4,9 @@
> > + #include <stdio.h>
> > + #include <string.h>
> > + #include <ctype.h>
> > +-#ifdef HAVE_WIDECHAR
> > +-#include <wctype.h>
> > +-#include <wchar.h>
> > +-#endif
> > + #include <stdbool.h>
> > +
> > ++#include "widechar.h"
> > + #include "cctype.h"
> > +
> > + /*
> > +diff --git a/include/fgetwc_or_err.h b/include/fgetwc_or_err.h
> > +index 3cf926283..f6ba71c6b 100644
> > +--- a/include/fgetwc_or_err.h
> > ++++ b/include/fgetwc_or_err.h
> > +@@ -1,13 +1,9 @@
> > + #ifndef UTIL_LINUX_FGETWC_OR_ERR_H
> > + #define UTIL_LINUX_FGETWC_OR_ERR_H
> > +
> > +-#include <stdio.h>
> > +-#include <wchar.h>
> > +-#include <errno.h>
> > +-
> > +-#include "widechar.h"
> > + #include "c.h"
> > + #include "nls.h"
> > ++#include "widechar.h"
> > +
> > + static inline wint_t fgetwc_or_err(FILE *stream) {
> > +     wint_t ret;
> > +diff --git a/lib/idcache.c b/lib/idcache.c
> > +index fa77e7b07..7bae76823 100644
> > +--- a/lib/idcache.c
> > ++++ b/lib/idcache.c
> > +@@ -4,12 +4,12 @@
> > +  *
> > +  * Written by Karel Zak <kzak@redhat.com>
> > +  */
> > +-#include <wchar.h>
> > + #include <pwd.h>
> > + #include <grp.h>
> > + #include <sys/types.h>
> > +
> > + #include "c.h"
> > ++#include "widechar.h"
> > + #include "idcache.h"
> > +
> > + struct identry *get_id(struct idcache *ic, unsigned long int id)
> > +diff --git a/sys-utils/irqtop.c b/sys-utils/irqtop.c
> > +index ce6a2ca5b..f05bf6bef 100644
> > +--- a/sys-utils/irqtop.c
> > ++++ b/sys-utils/irqtop.c
> > +@@ -43,13 +43,10 @@
> > + # include <ncurses/ncurses.h>
> > + #endif
> > +
> > +-#ifdef HAVE_WIDECHAR
> > +-# include <wctype.h>
> > +-# include <wchar.h>
> > +-#endif
> > +-
> > + #include <libsmartcols.h>
> > +
> > ++#include "c.h"
> > ++#include "widechar.h"
> > + #include "closestream.h"
> > + #include "cpuset.h"
> > + #include "monotonic.h"
> > +diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c
> > +index 6b2dcba96..2b613cf71 100644
> > +--- a/sys-utils/lsns.c
> > ++++ b/sys-utils/lsns.c
> > +@@ -19,7 +19,6 @@
> > + #include <unistd.h>
> > + #include <sys/stat.h>
> > + #include <sys/types.h>
> > +-#include <wchar.h>
> > + #include <libsmartcols.h>
> > + #include <libmount.h>
> > + # include <stdbool.h>
> > +@@ -43,6 +42,7 @@
> > + #include "nls.h"
> > + #include "xalloc.h"
> > + #include "c.h"
> > ++#include "widechar.h"
> > + #include "list.h"
> > + #include "closestream.h"
> > + #include "optutils.h"
> > +diff --git a/tests/helpers/test_sysinfo.c
b/tests/helpers/test_sysinfo.c
> > +index 1559d471f..95f50f3f6 100644
> > +--- a/tests/helpers/test_sysinfo.c
> > ++++ b/tests/helpers/test_sysinfo.c
> > +@@ -23,12 +23,12 @@
> > + #include <limits.h>
> > + #include <stdint.h>
> > + #include <inttypes.h>
> > +-#include <wchar.h>
> > + #include <errno.h>
> > + #include <time.h>
> > + #include <sys/ioctl.h>
> > +
> > + #include "c.h"
> > ++#include "widechar.h"
> > +
> > + #ifdef __linux__
> > + # include <sys/mount.h>
> > +--
> > +2.43.0
> > +
> > diff --git
a/package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
b/package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
> > deleted file mode 100644
> > index 12dd119ef3..0000000000
> > ---
a/package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
> > +++ /dev/null
> > @@ -1,39 +0,0 @@
> > -From beef18da4de87ca5aaadf2beb14187f35cc4f50f Mon Sep 17 00:00:00 2001
> > -From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > -Date: Wed, 15 May 2024 18:22:11 +0200
> > -Subject: [PATCH] sys-utils/setarch.c: fix build with uclibc-ng < 1.0.39
> > -
> > -Fix the following build failure with uclibc-ng < 1.0.39 (i.e., without
> > -
https://github.com/wbx-github/uclibc-ng/commit/85ac4f04d94e98389a8315e720630d0f95bfdfd6
)
> > -raised since version 2.39 and
> > -
https://github.com/util-linux/util-linux/commit/03a254f010b08da1175f50a8ae7882e59228f1b4
:
> > -
> > -sys-utils/setarch.c:106:7: error: 'PER_LINUX32_3GB' undeclared here
(not in a function); did you mean 'PER_LINUX32'?
> > -  106 |     X(PER_LINUX32_3GB) \
> > -      |       ^~~~~~~~~~~~~~~
> > -
> > -Fixes:
> > - -
http://autobuild.buildroot.org/results/fb1feb47f2660882fa53f66bacc63e191fd52175
> > -
> > -Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > -Upstream:
https://github.com/util-linux/util-linux/commit/4647fc6afbf7e99c49531600425df60f1243fcd2
> > ----
> > - sys-utils/setarch.c | 5 +++++
> > - 1 file changed, 5 insertions(+)
> > -
> > -diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
> > -index 227bc6b5de..4bcb5e69e6 100644
> > ---- a/sys-utils/setarch.c
> > -+++ b/sys-utils/setarch.c
> > -@@ -89,6 +89,11 @@
> > - # define PER_LINUX_FDPIC    (PER_LINUX | FDPIC_FUNCPTRS)
> > - #endif
> > -
> > -+/* fallback for old uclibc-headers < 1.0.39 */
> > -+#ifndef PER_LINUX32_3GB
> > -+# define PER_LINUX32_3GB    (PER_LINUX32 | ADDR_LIMIT_3GB)
> > -+#endif
> > -+
> > - #define ALL_PERSONALITIES \
> > -     X(PER_LINUX) \
> > -     X(PER_LINUX_32BIT) \
> > diff --git a/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
b/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
> > deleted file mode 100644
> > index bb1a63ecc2..0000000000
> > --- a/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
> > +++ /dev/null
> > @@ -1,65 +0,0 @@
> > -From 7b3db914fa9073c667ea482c8b6b4e07fe6202cc Mon Sep 17 00:00:00 2001
> > -From: Karel Zak <kzak@redhat.com>
> > -Date: Mon, 27 Jan 2025 13:40:23 +0100
> > -Subject: [PATCH] c.h: consolidate THREAD_LOCAL.
> > -
> > -Let's define this macro in one place only.
> > -
> > -Upstream: https://github.com/util-linux/util-linux/pull/3383
> > -Signed-off-by: Karel Zak <kzak@redhat.com>
> > -Signed-off-by: Julien Olivain <ju.o@free.fr>
> > ----
> > - include/c.h            | 9 +++++++++
> > - lib/randutils.c        | 5 -----
> > - libuuid/src/gen_uuid.c | 1 -
> > - 3 files changed, 9 insertions(+), 6 deletions(-)
> > -
> > -diff --git a/include/c.h b/include/c.h
> > -index 61b95ab2d..848c48536 100644
> > ---- a/include/c.h
> > -+++ b/include/c.h
> > -@@ -595,4 +595,13 @@ static inline void *reallocarray(void *ptr,
size_t nmemb, size_t size)
> > - }
> > - #endif
> > -
> > -+/*
> > -+ * thread-local storage
> > -+ */
> > -+#ifdef HAVE_TLS
> > -+# define THREAD_LOCAL static __thread
> > -+#else
> > -+# define THREAD_LOCAL static
> > -+#endif
> > -+
> > - #endif /* UTIL_LINUX_C_H */
> > -diff --git a/lib/randutils.c b/lib/randutils.c
> > -index 15c2f7834..4c806e682 100644
> > ---- a/lib/randutils.c
> > -+++ b/lib/randutils.c
> > -@@ -20,11 +20,6 @@
> > - #include "randutils.h"
> > - #include "nls.h"
> > -
> > --#ifdef HAVE_TLS
> > --#define THREAD_LOCAL static __thread
> > --#else
> > --#define THREAD_LOCAL static
> > --#endif
> > -
> > - #ifdef HAVE_GETRANDOM
> > - # include <sys/random.h>
> > -diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
> > -index 3b76ddc9a..69712267f 100644
> > ---- a/libuuid/src/gen_uuid.c
> > -+++ b/libuuid/src/gen_uuid.c
> > -@@ -92,7 +92,6 @@
> > - #include "md5.h"
> > - #include "sha1.h"
> > -
> > --#define THREAD_LOCAL static __thread
> > -
> > - #ifdef _WIN32
> > - static void gettimeofday (struct timeval *tv, void *dummy)
> > ---
> > -2.48.1
> > -
> > diff --git
a/package/util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
b/package/util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
> > new file mode 100644
> > index 0000000000..5a53aed8ff
> > --- /dev/null
> > +++
b/package/util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
> > @@ -0,0 +1,59 @@
> > +From 300a66c30c3d0fb04c0f24cf23fde80e1e3bf5e4 Mon Sep 17 00:00:00 2001
> > +From: Thomas Devoogdt <thomas.devoogdt@barco.com>
> > +Date: Tue, 25 Mar 2025 11:58:18 +0100
> > +Subject: [PATCH] lsns: fix undefined reference to
add_namespace_for_nsfd #3483
> > +
> > +Fixes:
> > +
> > +sys-utils/lsns-lsns.o: In function `read_process':
> > +lsns.c:(.text+0x9e8): undefined reference to `add_namespace_for_nsfd'
> > +collect2: error: ld returned 1 exit status
> > +
> > +Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> > +(cherry picked from commit 2ced43400f35f7bd45b29364e04166a63a06e16a)
> > +Upstream: https://github.com/util-linux/util-linux/pull/3484
> > +Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> > +---
> > + sys-utils/lsns.c | 6 ++++++
> > + 1 file changed, 6 insertions(+)
> > +
> > +diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c
> > +index 2b613cf71..4c49a8b2d 100644
> > +--- a/sys-utils/lsns.c
> > ++++ b/sys-utils/lsns.c
> > +@@ -587,7 +587,10 @@ static void add_namespace_from_sock(struct lsns
*ls, pid_t pid, uint64_t fd)
> > +     if (get_namespace(ls, sb.st_ino))
> > +             goto out_nsfd;
> > +
> > ++#ifdef USE_NS_GET_API
> > +     add_namespace_for_nsfd(ls, nsfd, sb.st_ino);
> > ++#endif
> > ++
> > + out_nsfd:
> > +     close(nsfd);
> > + out_sk:
> > +@@ -608,6 +611,7 @@ static void add_namespace_from_sock(struct lsns
*ls __attribute__((__unused__)),
> > + {
> > + }
> > + #endif /* HAVE_LINUX_NET_NAMESPACE_H */
> > ++
> > + /* Read namespaces open(2)ed explicitly by the process specified by
`pc'. */
> > + static void read_opened_namespaces(struct lsns *ls, struct path_cxt
*pc, pid_t pid)
> > + {
> > +@@ -627,11 +631,13 @@ static void read_opened_namespaces(struct lsns
*ls, struct path_cxt *pc, pid_t p
> > +             if (st.st_dev == ls->nsfs_dev) {
> > +                     if (get_namespace(ls, st.st_ino))
> > +                             continue;
> > ++#ifdef USE_NS_GET_API
> > +                     int fd = ul_path_openf(pc, O_RDONLY, "fd/%ju",
(uintmax_t) num);
> > +                     if (fd >= 0) {
> > +                             add_namespace_for_nsfd(ls, fd, st.st_ino);
> > +                             close(fd);
> > +                     }
> > ++#endif
> > +             } else if ((st.st_mode & S_IFMT) == S_IFSOCK) {
> > +                     add_namespace_from_sock(ls, pid, num);
> > +             }
> > +--
> > +2.43.0
> > +
> > diff --git
a/package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
b/package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
> > deleted file mode 100644
> > index 843253a56a..0000000000
> > ---
a/package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
> > +++ /dev/null
> > @@ -1,47 +0,0 @@
> > -From 0735eb8bc0ed4bc9820ea7e4e600fed246457b18 Mon Sep 17 00:00:00 2001
> > -From: Karel Zak <kzak@redhat.com>
> > -Date: Mon, 27 Jan 2025 14:01:38 +0100
> > -Subject: [PATCH] autotools: define HAVE_LIBPTHREAD and PTHREAD_LIBS
> > -
> > -Upstream: https://github.com/util-linux/util-linux/pull/3383
> > -Signed-off-by: Karel Zak <kzak@redhat.com>
> > -Signed-off-by: Julien Olivain <ju.o@free.fr>
> > ----
> > - configure.ac              | 7 +++++++
> > - libuuid/src/Makemodule.am | 2 +-
> > - 2 files changed, 8 insertions(+), 1 deletion(-)
> > -
> > -diff --git a/configure.ac b/configure.ac
> > -index 82d0e4bf9..9a7f260c5 100644
> > ---- a/configure.ac
> > -+++ b/configure.ac
> > -@@ -738,6 +738,13 @@ AS_IF([test x"$have_timer" = xno], [
> > - ])
> > -
> > -
> > -+AC_CHECK_LIB([pthread], [pthread_atfork], [
> > -+    PTHREAD_LIBS="-lpthread"
> > -+    AC_DEFINE([HAVE_LIBPTHREAD], [1], [Define if libpthred exist])
> > -+])
> > -+AC_SUBST([PTHREAD_LIBS])
> > -+
> > -+
> > - AC_CHECK_LIB([rtas], [rtas_get_sysparm], [
> > -     RTAS_LIBS="-lrtas"
> > -     AC_DEFINE([HAVE_LIBRTAS], [1], [Define if librtas exists])
> > -diff --git a/libuuid/src/Makemodule.am b/libuuid/src/Makemodule.am
> > -index 867ad7be5..58b64fe9b 100644
> > ---- a/libuuid/src/Makemodule.am
> > -+++ b/libuuid/src/Makemodule.am
> > -@@ -31,7 +31,7 @@ libuuid_la_SOURCES = \
> > - EXTRA_libuuid_la_DEPENDENCIES = \
> > -     libuuid/src/libuuid.sym
> > -
> > --libuuid_la_LIBADD       = $(LDADD) $(SOCKET_LIBS) -lpthread
> > -+libuuid_la_LIBADD       = $(LDADD) $(SOCKET_LIBS) $(PTHREAD_LIBS)
> > -
> > - libuuid_la_CFLAGS = \
> > -     $(AM_CFLAGS) \
> > ---
> > -2.48.1
> > -
> > diff --git a/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
b/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
> > deleted file mode 100644
> > index 19e0697769..0000000000
> > --- a/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
> > +++ /dev/null
> > @@ -1,27 +0,0 @@
> > -From f540cc6fed7224fb9ca162cb2f33c338260ae1d2 Mon Sep 17 00:00:00 2001
> > -From: Karel Zak <kzak@redhat.com>
> > -Date: Mon, 27 Jan 2025 14:11:35 +0100
> > -Subject: [PATCH] meson: add HAVE_LIBPTHREAD
> > -
> > -Upstream: https://github.com/util-linux/util-linux/pull/3383
> > -Signed-off-by: Karel Zak <kzak@redhat.com>
> > -Signed-off-by: Julien Olivain <ju.o@free.fr>
> > ----
> > - meson.build | 1 +
> > - 1 file changed, 1 insertion(+)
> > -
> > -diff --git a/meson.build b/meson.build
> > -index 6d1f986af..ac5fdd799 100644
> > ---- a/meson.build
> > -+++ b/meson.build
> > -@@ -748,6 +748,7 @@ endif
> > - conf.set('HAVE_CLOCK_GETTIME', have ? 1 : false)
> > -
> > - thread_libs = dependency('threads')
> > -+conf.set('HAVE_LIBPTHREAD', thread_libs.found() ? 1 : false)
> > -
> > - have = cc.has_function('timer_create')
> > - if not have
> > ---
> > -2.48.1
> > -
> > diff --git
a/package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
b/package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
> > deleted file mode 100644
> > index 0d90f8aec9..0000000000
> > ---
a/package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
> > +++ /dev/null
> > @@ -1,82 +0,0 @@
> > -From eecaa2c0dda817eba2d493f6ddb42c39cf789fc2 Mon Sep 17 00:00:00 2001
> > -From: Karel Zak <kzak@redhat.com>
> > -Date: Mon, 27 Jan 2025 14:28:36 +0100
> > -Subject: [PATCH] libuuid: support non-cached scenarios (when -lpthread
is
> > - unavailable)
> > -
> > -This patch makes the dependence on pthread optional for libuuid. In
> > -certain cases, such as Buildroot Linux, uClibc-ng, and very low
> > -resource systems, libpthread may be unavailable.
> > -
> > -If libuuid is compiled without pthread, it will not use a local cache
> > -and will instead request a UUID from uuidd for each call. This may
> > -result in less efficient performance, but the UUIDs generated will
> > -still be unique and reliable.
> > -
> > -On minimalistic systems, it is highly likely that uuidd will not be
> > -installed, making this change important for portability and robust
> > -code.
> > -
> > -Upstream: https://github.com/util-linux/util-linux/pull/3383
> > -Addresses: https://github.com/util-linux/util-linux/pull/3375
> > -Signed-off-by: Karel Zak <kzak@redhat.com>
> > -Signed-off-by: Julien Olivain <ju.o@free.fr>
> > ----
> > - libuuid/src/gen_uuid.c | 18 +++++++++++++++---
> > - 1 file changed, 15 insertions(+), 3 deletions(-)
> > -
> > -diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
> > -index 69712267f..1ed82b46b 100644
> > ---- a/libuuid/src/gen_uuid.c
> > -+++ b/libuuid/src/gen_uuid.c
> > -@@ -80,7 +80,10 @@
> > - #if defined(__linux__) && defined(HAVE_SYS_SYSCALL_H)
> > - #include <sys/syscall.h>
> > - #endif
> > --#include <pthread.h>
> > -+#ifdef HAVE_LIBPTHREAD
> > -+# include <pthread.h>
> > -+#endif
> > -+
> > - #include <signal.h>
> > -
> > - #include "all-io.h"
> > -@@ -580,8 +583,7 @@ int __uuid_generate_time_cont(uuid_t out, int
*num, uint32_t cont_offset)
> > -  * If neither of these is possible (e.g. because of insufficient
permissions), it generates
> > -  * the UUID anyway, but returns -1. Otherwise, returns 0.
> > -  */
> > --
> > --/* thread local cache for uuidd based requests */
> > -+#ifdef HAVE_LIBPTHREAD
> > - THREAD_LOCAL struct {
> > -     int             num;
> > -     int             cache_size;
> > -@@ -597,8 +599,10 @@ static void reset_uuidd_cache(void)
> > -     memset(&uuidd_cache, 0, sizeof(uuidd_cache));
> > -     uuidd_cache.cache_size = CS_MIN;
> > - }
> > -+#endif /* HAVE_LIBPTHREAD */
> > -
> > - static int uuid_generate_time_generic(uuid_t out) {
> > -+#ifdef HAVE_LIBPTHREAD
> > -     static volatile sig_atomic_t atfork_registered;
> > -     time_t  now;
> > -
> > -@@ -651,6 +655,14 @@ static int uuid_generate_time_generic(uuid_t out)
{
> > -             return 0;
> > -     }
> > -
> > -+#else /* !HAVE_LIBPTHREAD */
> > -+    {
> > -+            int num = 1;
> > -+            if (get_uuid_via_daemon(UUIDD_OP_TIME_UUID, out, &num) ==
0)
> > -+                    return 0;
> > -+    }
> > -+#endif /* HAVE_LIBPTHREAD */
> > -+
> > -     return __uuid_generate_time(out, NULL);
> > - }
> > -
> > ---
> > -2.48.1
> > -
> > diff --git a/package/util-linux/util-linux.hash
b/package/util-linux/util-linux.hash
> > index 317efebcbf..e74aa17c94 100644
> > --- a/package/util-linux/util-linux.hash
> > +++ b/package/util-linux/util-linux.hash
> > @@ -1,10 +1,14 @@
> > -# From
https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.40/sha256sums.asc
> > -sha256
d78b37a66f5922d70edf3bdfb01a6b33d34ed3c3cafd6628203b2a2b67c8e8b3
util-linux-2.40.2.tar.xz
> > +# From
https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.41/sha256sums.asc
> > +sha256
81ee93b3cfdfeb7d7c4090cedeba1d7bbce9141fd0b501b686b3fe475ddca4c6
util-linux-2.41.tar.xz
> >  # License files, locally calculated
> > -sha256
27f25514040a401b2ceb7057eae1f46cedb1666664b519b5be7e0960d1b35164
README.licensing
> > +sha256
4c2db318192bda62f3f8fcf71488bb5e602ae4385eba281d711b46cc13a40bb3
README.licensing
> > +sha256
527f738966ca396cd5a68c1509390de2a780c6b614d9ee57f7544a6161938ed1
Documentation/licenses/COPYING.BSD-2-Clause
> >  sha256
9b718a9460fed5952466421235bc79eb49d4e9eacc920d7a9dd6285ab8fd6c6d
Documentation/licenses/COPYING.BSD-3-Clause
> >  sha256
ba7640f00d93e72e92b94b9d71f25ec53bac2f1682f5c4adcccb0018359f60f8
Documentation/licenses/COPYING.BSD-4-Clause-UC
> > +sha256
6fc9e709ccbfe0d77fbffa2427a983282be2eb88e47b1cdb49f21a83b4d1e665
Documentation/licenses/COPYING.EUPL-1.2
> > +sha256
8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643
Documentation/licenses/COPYING.GPL-2.0-only
> >  sha256
8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643
Documentation/licenses/COPYING.GPL-2.0-or-later
> > +sha256
3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986
Documentation/licenses/COPYING.GPL-3.0-or-later
> >  sha256
e53348ce276358e9997014071c5294b36a18c4b34f32f00ee57b9acce0aafd63
Documentation/licenses/COPYING.ISC
> >  sha256
dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551
Documentation/licenses/COPYING.LGPL-2.1-or-later
> >  sha256
8555341619542abb48c102afd954e42d4478e5be16ad3d5af7b0ff71009e7348
Documentation/licenses/COPYING.MIT
> > diff --git a/package/util-linux/util-linux.mk b/package/util-linux/
util-linux.mk
> > index ed30c0b107..71e458ccc4 100644
> > --- a/package/util-linux/util-linux.mk
> > +++ b/package/util-linux/util-linux.mk
> > @@ -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.40
> > -UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).2
> > +UTIL_LINUX_VERSION_MAJOR = 2.41
> > +UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR)
> >  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)
> >
> > @@ -24,18 +24,19 @@ UTIL_LINUX_LICENSE = \
> >       ISC (rfkill) \
> >       MIT (hardlink, flock)
> >  UTIL_LINUX_LICENSE_FILES = README.licensing \
> > +     Documentation/licenses/COPYING.BSD-2-Clause \
> >       Documentation/licenses/COPYING.BSD-3-Clause \
> >       Documentation/licenses/COPYING.BSD-4-Clause-UC \
> > +     Documentation/licenses/COPYING.EUPL-1.2 \
> > +     Documentation/licenses/COPYING.GPL-2.0-only \
> >       Documentation/licenses/COPYING.GPL-2.0-or-later \
> > +     Documentation/licenses/COPYING.GPL-3.0-or-later \
> >       Documentation/licenses/COPYING.ISC \
> >       Documentation/licenses/COPYING.LGPL-2.1-or-later \
> >       Documentation/licenses/COPYING.MIT
> >
> >  UTIL_LINUX_CPE_ID_VENDOR = kernel
> >
> > -# 0001-libmount-ifdef-statx-call.patch
> > -UTIL_LINUX_AUTORECONF = YES
> > -
> >  UTIL_LINUX_INSTALL_STAGING = YES
> >  UTIL_LINUX_DEPENDENCIES = \
> >       host-pkgconf \
> > --
> > 2.43.0
> >
>

[-- Attachment #1.2: Type: text/html, Size: 38714 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Buildroot] [PATCH v2] package/util-linux: bump to 2.41
  2025-04-02 17:08       ` Thomas Devoogdt
@ 2025-04-02 17:40         ` Waldemar Brodkorb
  2025-04-02 18:56         ` Waldemar Brodkorb
  1 sibling, 0 replies; 18+ messages in thread
From: Waldemar Brodkorb @ 2025-04-02 17:40 UTC (permalink / raw)
  To: Thomas Devoogdt; +Cc: Thomas Devoogdt, Arnout Vandecappelle via buildroot

Hi Thomas,
Thomas Devoogdt wrote,

> Hi Waldemar,
> 
> 
> What exact defconfig are you using?
> 
> I just ran this:
> $ cat util-linux.config
> BR2_PACKAGE_UTIL_LINUX=y
> BR2_PACKAGE_UTIL_LINUX_MOUNT=y
> BR2_PACKAGE_UTIL_LINUX_LIBMOUNT=y
> BR2_PACKAGE_UTIL_LINUX_MOUNTPOINT=y
> $ ./utils/test-pkg -p util-linux -c util-linux.config -a
> 
> No failing test, and multiple uclibc toolchains were tested alongside.

With this I get:
#
# configuration written to /home/wbx/br-test-pkg/arm-aarch64/.config
#
Value requested for BR2_PACKAGE_UTIL_LINUX not in final .config
Requested value:  BR2_PACKAGE_UTIL_LINUX=y                                                                                                     
Actual value:     BR2_PACKAGE_UTIL_LINUX=y

Value requested for BR2_PACKAGE_UTIL_LINUX_MOUNT not in final
.config
Requested value:  BR2_PACKAGE_UTIL_LINUX_MOUNT=y                                                                                               
Actual value:     BR2_PACKAGE_UTIL_LINUX_MOUNT=y

Value requested for BR2_PACKAGE_UTIL_LINUX_LIBMOUNT not in final
.config
Requested value:  BR2_PACKAGE_UTIL_LINUX_LIBMOUNT=y                                                                                            
Actual value:     BR2_PACKAGE_UTIL_LINUX_LIBMOUNT=y

Value requested for BR2_PACKAGE_UTIL_LINUX_MOUNTPOINT not in final
.config
Requested value:  BR2_PACKAGE_UTIL_LINUX_MOUNTPOINT=y
Actual value:     BR2_PACKAGE_UTIL_LINUX_MOUNTPOINT=y

Why does it work for you? For me everything is skipped.

I use configs/qemu_mips64_malta_defconfig and activate uclibc and
util-linux via make menuconfig.

best regards
 Waldemar
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Buildroot] [PATCH v2] package/util-linux: bump to 2.41
  2025-04-02 17:08       ` Thomas Devoogdt
  2025-04-02 17:40         ` Waldemar Brodkorb
@ 2025-04-02 18:56         ` Waldemar Brodkorb
  2025-04-02 20:27           ` Thomas Devoogdt
  1 sibling, 1 reply; 18+ messages in thread
From: Waldemar Brodkorb @ 2025-04-02 18:56 UTC (permalink / raw)
  To: Thomas Devoogdt; +Cc: Thomas Devoogdt, Arnout Vandecappelle via buildroot

Hi,

I had some issues with whitespaces at the end of the lines.
Now the tests are passed, but the fragment is not accepted.
Can you check your logfile? Are you sure mount is built?

best regards
 Waldemar

Thomas Devoogdt wrote,

> Hi Waldemar,
> 
> 
> What exact defconfig are you using?
> 
> I just ran this:
> $ cat util-linux.config
> BR2_PACKAGE_UTIL_LINUX=y
> BR2_PACKAGE_UTIL_LINUX_MOUNT=y
> BR2_PACKAGE_UTIL_LINUX_LIBMOUNT=y
> BR2_PACKAGE_UTIL_LINUX_MOUNTPOINT=y
> $ ./utils/test-pkg -p util-linux -c util-linux.config -a
> 
> No failing test, and multiple uclibc toolchains were tested alongside.
> 
> 
> Kr, 
> 
> Thomas Devoogdt 
> 
> 
> Op wo 2 apr 2025 om 13:08 schreef Waldemar Brodkorb <wbx@openadk.org>:
> 
> >
> > Hi Thomas,
> >
> > my problem with mount still exist. Could you reproduce it?
> > I just use defconfig for mips64, change to uclibc-ng and
> > then add util-linux mount.
> >
> > best regards
> >  Waldemar
> >
> > Thomas Devoogdt wrote,
> >
> > > From: Thomas Devoogdt <thomas.devoogdt@barco.com>
> > >
> > > News: https://lore.kernel.org/util-linux/
> 2cifsg7vkdiivfsmmximhbzybrsopn7zfqgwz2f6hyflh35pjr@ecyicq2cbsro/
> > >
> > > Dropped patches which are all upstream.
> > > - https://github.com/util-linux/util-linux/pull/3049
> > > - https://github.com/util-linux/util-linux/pull/3383
> > >
> > > Added some new patches. (which are also upstream)
> > > - https://github.com/util-linux/util-linux/pull/3471
> > > - https://github.com/util-linux/util-linux/pull/3484
> > >
> > > Synced all license files.
> > >
> > > Dropped the AUTORECONF call, since
> > > 0001-libmount-ifdef-statx-call.patch is upstream.
> > >
> > > Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> > > ---
> > > v2:
> > >  - dropped AUTORECONF
> > >  - added two compile patches
> > > ---
> > >  .../0001-misc-never-include-wchar.h.patch     | 160 ++++++++++++++++++
> > >  ...ch.c-fix-build-with-uclibc-ng-1.0.39.patch |  39 -----
> > >  .../0002-c.h-consolidate-THREAD_LOCAL.patch   |  65 -------
> > >  ...ed-reference-to-add_namespace_for_ns.patch |  59 +++++++
> > >  ...ine-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch |  47 -----
> > >  .../0004-meson-add-HAVE_LIBPTHREAD.patch      |  27 ---
> > >  ...non-cached-scenarios-when-lpthread-i.patch |  82 ---------
> > >  package/util-linux/util-linux.hash            |  10 +-
> > >  package/util-linux/util-linux.mk              |  11 +-
> > >  9 files changed, 232 insertions(+), 268 deletions(-)
> > >  create mode 100644 package/util-linux/
> 0001-misc-never-include-wchar.h.patch
> > >  delete mode 100644 package/util-linux/
> 0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
> > >  delete mode 100644 package/util-linux/
> 0002-c.h-consolidate-THREAD_LOCAL.patch
> > >  create mode 100644 package/util-linux/
> 0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
> > >  delete mode 100644 package/util-linux/
> 0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
> > >  delete mode 100644 package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
> > >  delete mode 100644 package/util-linux/
> 0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
> > >
> > > diff --git a/package/util-linux/0001-misc-never-include-wchar.h.patch b/
> package/util-linux/0001-misc-never-include-wchar.h.patch
> > > new file mode 100644
> > > index 0000000000..3adfaa2261
> > > --- /dev/null
> > > +++ b/package/util-linux/0001-misc-never-include-wchar.h.patch
> > > @@ -0,0 +1,160 @@
> > > +From e8205294e329f50bdf465d8cdd15653fd42ec5c0 Mon Sep 17 00:00:00 2001
> > > +From: Karel Zak <kzak@redhat.com>
> > > +Date: Thu, 20 Mar 2025 11:57:06 +0100
> > > +Subject: [PATCH] misc: never include wchar.h
> > > +
> > > +We have a portable "widechar.h" that follows --disable-widechar and
> > > +provides portability. It is a bug to directly include libc's wchar.h
> > > +or wctype.h.
> > > +
> > > +Fixes: https://github.com/util-linux/util-linux/issues/3470
> > > +Signed-off-by: Karel Zak <kzak@redhat.com>
> > > +(cherry picked from commit 5c0888dde3cc296d06b8243dcc78248ff90526e5)
> > > +Upstream: https://github.com/util-linux/util-linux/pull/3471
> > > +Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> > > +---
> > > + disk-utils/cfdisk.c          | 6 +-----
> > > + include/carefulputc.h        | 5 +----
> > > + include/fgetwc_or_err.h      | 6 +-----
> > > + lib/idcache.c                | 2 +-
> > > + sys-utils/irqtop.c           | 7 ++-----
> > > + sys-utils/lsns.c             | 2 +-
> > > + tests/helpers/test_sysinfo.c | 2 +-
> > > + 7 files changed, 8 insertions(+), 22 deletions(-)
> > > +
> > > +diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c
> > > +index 4018f4d3d..d4057eedb 100644
> > > +--- a/disk-utils/cfdisk.c
> > > ++++ b/disk-utils/cfdisk.c
> > > +@@ -52,14 +52,10 @@
> > > + # include <ncurses/ncurses.h>
> > > + #endif
> > > +
> > > +-#ifdef HAVE_WIDECHAR
> > > +-# include <wctype.h>
> > > +-# include <wchar.h>
> > > +-#endif
> > > +-
> > > + #include "c.h"
> > > + #include "closestream.h"
> > > + #include "nls.h"
> > > ++#include "widechar.h"
> > > + #include "strutils.h"
> > > + #include "xalloc.h"
> > > + #include "mbsalign.h"
> > > +diff --git a/include/carefulputc.h b/include/carefulputc.h
> > > +index 3cc6f7ff9..c6b778bba 100644
> > > +--- a/include/carefulputc.h
> > > ++++ b/include/carefulputc.h
> > > +@@ -4,12 +4,9 @@
> > > + #include <stdio.h>
> > > + #include <string.h>
> > > + #include <ctype.h>
> > > +-#ifdef HAVE_WIDECHAR
> > > +-#include <wctype.h>
> > > +-#include <wchar.h>
> > > +-#endif
> > > + #include <stdbool.h>
> > > +
> > > ++#include "widechar.h"
> > > + #include "cctype.h"
> > > +
> > > + /*
> > > +diff --git a/include/fgetwc_or_err.h b/include/fgetwc_or_err.h
> > > +index 3cf926283..f6ba71c6b 100644
> > > +--- a/include/fgetwc_or_err.h
> > > ++++ b/include/fgetwc_or_err.h
> > > +@@ -1,13 +1,9 @@
> > > + #ifndef UTIL_LINUX_FGETWC_OR_ERR_H
> > > + #define UTIL_LINUX_FGETWC_OR_ERR_H
> > > +
> > > +-#include <stdio.h>
> > > +-#include <wchar.h>
> > > +-#include <errno.h>
> > > +-
> > > +-#include "widechar.h"
> > > + #include "c.h"
> > > + #include "nls.h"
> > > ++#include "widechar.h"
> > > +
> > > + static inline wint_t fgetwc_or_err(FILE *stream) {
> > > +     wint_t ret;
> > > +diff --git a/lib/idcache.c b/lib/idcache.c
> > > +index fa77e7b07..7bae76823 100644
> > > +--- a/lib/idcache.c
> > > ++++ b/lib/idcache.c
> > > +@@ -4,12 +4,12 @@
> > > +  *
> > > +  * Written by Karel Zak <kzak@redhat.com>
> > > +  */
> > > +-#include <wchar.h>
> > > + #include <pwd.h>
> > > + #include <grp.h>
> > > + #include <sys/types.h>
> > > +
> > > + #include "c.h"
> > > ++#include "widechar.h"
> > > + #include "idcache.h"
> > > +
> > > + struct identry *get_id(struct idcache *ic, unsigned long int id)
> > > +diff --git a/sys-utils/irqtop.c b/sys-utils/irqtop.c
> > > +index ce6a2ca5b..f05bf6bef 100644
> > > +--- a/sys-utils/irqtop.c
> > > ++++ b/sys-utils/irqtop.c
> > > +@@ -43,13 +43,10 @@
> > > + # include <ncurses/ncurses.h>
> > > + #endif
> > > +
> > > +-#ifdef HAVE_WIDECHAR
> > > +-# include <wctype.h>
> > > +-# include <wchar.h>
> > > +-#endif
> > > +-
> > > + #include <libsmartcols.h>
> > > +
> > > ++#include "c.h"
> > > ++#include "widechar.h"
> > > + #include "closestream.h"
> > > + #include "cpuset.h"
> > > + #include "monotonic.h"
> > > +diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c
> > > +index 6b2dcba96..2b613cf71 100644
> > > +--- a/sys-utils/lsns.c
> > > ++++ b/sys-utils/lsns.c
> > > +@@ -19,7 +19,6 @@
> > > + #include <unistd.h>
> > > + #include <sys/stat.h>
> > > + #include <sys/types.h>
> > > +-#include <wchar.h>
> > > + #include <libsmartcols.h>
> > > + #include <libmount.h>
> > > + # include <stdbool.h>
> > > +@@ -43,6 +42,7 @@
> > > + #include "nls.h"
> > > + #include "xalloc.h"
> > > + #include "c.h"
> > > ++#include "widechar.h"
> > > + #include "list.h"
> > > + #include "closestream.h"
> > > + #include "optutils.h"
> > > +diff --git a/tests/helpers/test_sysinfo.c b/tests/helpers/test_sysinfo.c
> > > +index 1559d471f..95f50f3f6 100644
> > > +--- a/tests/helpers/test_sysinfo.c
> > > ++++ b/tests/helpers/test_sysinfo.c
> > > +@@ -23,12 +23,12 @@
> > > + #include <limits.h>
> > > + #include <stdint.h>
> > > + #include <inttypes.h>
> > > +-#include <wchar.h>
> > > + #include <errno.h>
> > > + #include <time.h>
> > > + #include <sys/ioctl.h>
> > > +
> > > + #include "c.h"
> > > ++#include "widechar.h"
> > > +
> > > + #ifdef __linux__
> > > + # include <sys/mount.h>
> > > +--
> > > +2.43.0
> > > +
> > > diff --git a/package/util-linux/
> 0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch b/package/
> util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
> > > deleted file mode 100644
> > > index 12dd119ef3..0000000000
> > > --- a/package/util-linux/
> 0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
> > > +++ /dev/null
> > > @@ -1,39 +0,0 @@
> > > -From beef18da4de87ca5aaadf2beb14187f35cc4f50f Mon Sep 17 00:00:00 2001
> > > -From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > > -Date: Wed, 15 May 2024 18:22:11 +0200
> > > -Subject: [PATCH] sys-utils/setarch.c: fix build with uclibc-ng < 1.0.39
> > > -
> > > -Fix the following build failure with uclibc-ng < 1.0.39 (i.e., without
> > > -https://github.com/wbx-github/uclibc-ng/commit/
> 85ac4f04d94e98389a8315e720630d0f95bfdfd6)
> > > -raised since version 2.39 and
> > > -https://github.com/util-linux/util-linux/commit/
> 03a254f010b08da1175f50a8ae7882e59228f1b4:
> > > -
> > > -sys-utils/setarch.c:106:7: error: 'PER_LINUX32_3GB' undeclared here (not
> in a function); did you mean 'PER_LINUX32'?
> > > -  106 |     X(PER_LINUX32_3GB) \
> > > -      |       ^~~~~~~~~~~~~~~
> > > -
> > > -Fixes:
> > > - - http://autobuild.buildroot.org/results/
> fb1feb47f2660882fa53f66bacc63e191fd52175
> > > -
> > > -Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > > -Upstream: https://github.com/util-linux/util-linux/commit/
> 4647fc6afbf7e99c49531600425df60f1243fcd2
> > > ----
> > > - sys-utils/setarch.c | 5 +++++
> > > - 1 file changed, 5 insertions(+)
> > > -
> > > -diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
> > > -index 227bc6b5de..4bcb5e69e6 100644
> > > ---- a/sys-utils/setarch.c
> > > -+++ b/sys-utils/setarch.c
> > > -@@ -89,6 +89,11 @@
> > > - # define PER_LINUX_FDPIC    (PER_LINUX | FDPIC_FUNCPTRS)
> > > - #endif
> > > -
> > > -+/* fallback for old uclibc-headers < 1.0.39 */
> > > -+#ifndef PER_LINUX32_3GB
> > > -+# define PER_LINUX32_3GB    (PER_LINUX32 | ADDR_LIMIT_3GB)
> > > -+#endif
> > > -+
> > > - #define ALL_PERSONALITIES \
> > > -     X(PER_LINUX) \
> > > -     X(PER_LINUX_32BIT) \
> > > diff --git a/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch b/
> package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
> > > deleted file mode 100644
> > > index bb1a63ecc2..0000000000
> > > --- a/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
> > > +++ /dev/null
> > > @@ -1,65 +0,0 @@
> > > -From 7b3db914fa9073c667ea482c8b6b4e07fe6202cc Mon Sep 17 00:00:00 2001
> > > -From: Karel Zak <kzak@redhat.com>
> > > -Date: Mon, 27 Jan 2025 13:40:23 +0100
> > > -Subject: [PATCH] c.h: consolidate THREAD_LOCAL.
> > > -
> > > -Let's define this macro in one place only.
> > > -
> > > -Upstream: https://github.com/util-linux/util-linux/pull/3383
> > > -Signed-off-by: Karel Zak <kzak@redhat.com>
> > > -Signed-off-by: Julien Olivain <ju.o@free.fr>
> > > ----
> > > - include/c.h            | 9 +++++++++
> > > - lib/randutils.c        | 5 -----
> > > - libuuid/src/gen_uuid.c | 1 -
> > > - 3 files changed, 9 insertions(+), 6 deletions(-)
> > > -
> > > -diff --git a/include/c.h b/include/c.h
> > > -index 61b95ab2d..848c48536 100644
> > > ---- a/include/c.h
> > > -+++ b/include/c.h
> > > -@@ -595,4 +595,13 @@ static inline void *reallocarray(void *ptr, size_t
> nmemb, size_t size)
> > > - }
> > > - #endif
> > > -
> > > -+/*
> > > -+ * thread-local storage
> > > -+ */
> > > -+#ifdef HAVE_TLS
> > > -+# define THREAD_LOCAL static __thread
> > > -+#else
> > > -+# define THREAD_LOCAL static
> > > -+#endif
> > > -+
> > > - #endif /* UTIL_LINUX_C_H */
> > > -diff --git a/lib/randutils.c b/lib/randutils.c
> > > -index 15c2f7834..4c806e682 100644
> > > ---- a/lib/randutils.c
> > > -+++ b/lib/randutils.c
> > > -@@ -20,11 +20,6 @@
> > > - #include "randutils.h"
> > > - #include "nls.h"
> > > -
> > > --#ifdef HAVE_TLS
> > > --#define THREAD_LOCAL static __thread
> > > --#else
> > > --#define THREAD_LOCAL static
> > > --#endif
> > > -
> > > - #ifdef HAVE_GETRANDOM
> > > - # include <sys/random.h>
> > > -diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
> > > -index 3b76ddc9a..69712267f 100644
> > > ---- a/libuuid/src/gen_uuid.c
> > > -+++ b/libuuid/src/gen_uuid.c
> > > -@@ -92,7 +92,6 @@
> > > - #include "md5.h"
> > > - #include "sha1.h"
> > > -
> > > --#define THREAD_LOCAL static __thread
> > > -
> > > - #ifdef _WIN32
> > > - static void gettimeofday (struct timeval *tv, void *dummy)
> > > ---
> > > -2.48.1
> > > -
> > > diff --git a/package/util-linux/
> 0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch b/package/
> util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
> > > new file mode 100644
> > > index 0000000000..5a53aed8ff
> > > --- /dev/null
> > > +++ b/package/util-linux/
> 0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
> > > @@ -0,0 +1,59 @@
> > > +From 300a66c30c3d0fb04c0f24cf23fde80e1e3bf5e4 Mon Sep 17 00:00:00 2001
> > > +From: Thomas Devoogdt <thomas.devoogdt@barco.com>
> > > +Date: Tue, 25 Mar 2025 11:58:18 +0100
> > > +Subject: [PATCH] lsns: fix undefined reference to add_namespace_for_nsfd #
> 3483
> > > +
> > > +Fixes:
> > > +
> > > +sys-utils/lsns-lsns.o: In function `read_process':
> > > +lsns.c:(.text+0x9e8): undefined reference to `add_namespace_for_nsfd'
> > > +collect2: error: ld returned 1 exit status
> > > +
> > > +Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> > > +(cherry picked from commit 2ced43400f35f7bd45b29364e04166a63a06e16a)
> > > +Upstream: https://github.com/util-linux/util-linux/pull/3484
> > > +Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> > > +---
> > > + sys-utils/lsns.c | 6 ++++++
> > > + 1 file changed, 6 insertions(+)
> > > +
> > > +diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c
> > > +index 2b613cf71..4c49a8b2d 100644
> > > +--- a/sys-utils/lsns.c
> > > ++++ b/sys-utils/lsns.c
> > > +@@ -587,7 +587,10 @@ static void add_namespace_from_sock(struct lsns *ls,
> pid_t pid, uint64_t fd)
> > > +     if (get_namespace(ls, sb.st_ino))
> > > +             goto out_nsfd;
> > > +
> > > ++#ifdef USE_NS_GET_API
> > > +     add_namespace_for_nsfd(ls, nsfd, sb.st_ino);
> > > ++#endif
> > > ++
> > > + out_nsfd:
> > > +     close(nsfd);
> > > + out_sk:
> > > +@@ -608,6 +611,7 @@ static void add_namespace_from_sock(struct lsns *ls
> __attribute__((__unused__)),
> > > + {
> > > + }
> > > + #endif /* HAVE_LINUX_NET_NAMESPACE_H */
> > > ++
> > > + /* Read namespaces open(2)ed explicitly by the process specified by `pc'.
> */
> > > + static void read_opened_namespaces(struct lsns *ls, struct path_cxt *pc,
> pid_t pid)
> > > + {
> > > +@@ -627,11 +631,13 @@ static void read_opened_namespaces(struct lsns *ls,
> struct path_cxt *pc, pid_t p
> > > +             if (st.st_dev == ls->nsfs_dev) {
> > > +                     if (get_namespace(ls, st.st_ino))
> > > +                             continue;
> > > ++#ifdef USE_NS_GET_API
> > > +                     int fd = ul_path_openf(pc, O_RDONLY, "fd/%ju",
> (uintmax_t) num);
> > > +                     if (fd >= 0) {
> > > +                             add_namespace_for_nsfd(ls, fd, st.st_ino);
> > > +                             close(fd);
> > > +                     }
> > > ++#endif
> > > +             } else if ((st.st_mode & S_IFMT) == S_IFSOCK) {
> > > +                     add_namespace_from_sock(ls, pid, num);
> > > +             }
> > > +--
> > > +2.43.0
> > > +
> > > diff --git a/package/util-linux/
> 0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch b/package/
> util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
> > > deleted file mode 100644
> > > index 843253a56a..0000000000
> > > --- a/package/util-linux/
> 0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
> > > +++ /dev/null
> > > @@ -1,47 +0,0 @@
> > > -From 0735eb8bc0ed4bc9820ea7e4e600fed246457b18 Mon Sep 17 00:00:00 2001
> > > -From: Karel Zak <kzak@redhat.com>
> > > -Date: Mon, 27 Jan 2025 14:01:38 +0100
> > > -Subject: [PATCH] autotools: define HAVE_LIBPTHREAD and PTHREAD_LIBS
> > > -
> > > -Upstream: https://github.com/util-linux/util-linux/pull/3383
> > > -Signed-off-by: Karel Zak <kzak@redhat.com>
> > > -Signed-off-by: Julien Olivain <ju.o@free.fr>
> > > ----
> > > - configure.ac              | 7 +++++++
> > > - libuuid/src/Makemodule.am | 2 +-
> > > - 2 files changed, 8 insertions(+), 1 deletion(-)
> > > -
> > > -diff --git a/configure.ac b/configure.ac
> > > -index 82d0e4bf9..9a7f260c5 100644
> > > ---- a/configure.ac
> > > -+++ b/configure.ac
> > > -@@ -738,6 +738,13 @@ AS_IF([test x"$have_timer" = xno], [
> > > - ])
> > > -
> > > -
> > > -+AC_CHECK_LIB([pthread], [pthread_atfork], [
> > > -+    PTHREAD_LIBS="-lpthread"
> > > -+    AC_DEFINE([HAVE_LIBPTHREAD], [1], [Define if libpthred exist])
> > > -+])
> > > -+AC_SUBST([PTHREAD_LIBS])
> > > -+
> > > -+
> > > - AC_CHECK_LIB([rtas], [rtas_get_sysparm], [
> > > -     RTAS_LIBS="-lrtas"
> > > -     AC_DEFINE([HAVE_LIBRTAS], [1], [Define if librtas exists])
> > > -diff --git a/libuuid/src/Makemodule.am b/libuuid/src/Makemodule.am
> > > -index 867ad7be5..58b64fe9b 100644
> > > ---- a/libuuid/src/Makemodule.am
> > > -+++ b/libuuid/src/Makemodule.am
> > > -@@ -31,7 +31,7 @@ libuuid_la_SOURCES = \
> > > - EXTRA_libuuid_la_DEPENDENCIES = \
> > > -     libuuid/src/libuuid.sym
> > > -
> > > --libuuid_la_LIBADD       = $(LDADD) $(SOCKET_LIBS) -lpthread
> > > -+libuuid_la_LIBADD       = $(LDADD) $(SOCKET_LIBS) $(PTHREAD_LIBS)
> > > -
> > > - libuuid_la_CFLAGS = \
> > > -     $(AM_CFLAGS) \
> > > ---
> > > -2.48.1
> > > -
> > > diff --git a/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch b/
> package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
> > > deleted file mode 100644
> > > index 19e0697769..0000000000
> > > --- a/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
> > > +++ /dev/null
> > > @@ -1,27 +0,0 @@
> > > -From f540cc6fed7224fb9ca162cb2f33c338260ae1d2 Mon Sep 17 00:00:00 2001
> > > -From: Karel Zak <kzak@redhat.com>
> > > -Date: Mon, 27 Jan 2025 14:11:35 +0100
> > > -Subject: [PATCH] meson: add HAVE_LIBPTHREAD
> > > -
> > > -Upstream: https://github.com/util-linux/util-linux/pull/3383
> > > -Signed-off-by: Karel Zak <kzak@redhat.com>
> > > -Signed-off-by: Julien Olivain <ju.o@free.fr>
> > > ----
> > > - meson.build | 1 +
> > > - 1 file changed, 1 insertion(+)
> > > -
> > > -diff --git a/meson.build b/meson.build
> > > -index 6d1f986af..ac5fdd799 100644
> > > ---- a/meson.build
> > > -+++ b/meson.build
> > > -@@ -748,6 +748,7 @@ endif
> > > - conf.set('HAVE_CLOCK_GETTIME', have ? 1 : false)
> > > -
> > > - thread_libs = dependency('threads')
> > > -+conf.set('HAVE_LIBPTHREAD', thread_libs.found() ? 1 : false)
> > > -
> > > - have = cc.has_function('timer_create')
> > > - if not have
> > > ---
> > > -2.48.1
> > > -
> > > diff --git a/package/util-linux/
> 0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch b/package/
> util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
> > > deleted file mode 100644
> > > index 0d90f8aec9..0000000000
> > > --- a/package/util-linux/
> 0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
> > > +++ /dev/null
> > > @@ -1,82 +0,0 @@
> > > -From eecaa2c0dda817eba2d493f6ddb42c39cf789fc2 Mon Sep 17 00:00:00 2001
> > > -From: Karel Zak <kzak@redhat.com>
> > > -Date: Mon, 27 Jan 2025 14:28:36 +0100
> > > -Subject: [PATCH] libuuid: support non-cached scenarios (when -lpthread is
> > > - unavailable)
> > > -
> > > -This patch makes the dependence on pthread optional for libuuid. In
> > > -certain cases, such as Buildroot Linux, uClibc-ng, and very low
> > > -resource systems, libpthread may be unavailable.
> > > -
> > > -If libuuid is compiled without pthread, it will not use a local cache
> > > -and will instead request a UUID from uuidd for each call. This may
> > > -result in less efficient performance, but the UUIDs generated will
> > > -still be unique and reliable.
> > > -
> > > -On minimalistic systems, it is highly likely that uuidd will not be
> > > -installed, making this change important for portability and robust
> > > -code.
> > > -
> > > -Upstream: https://github.com/util-linux/util-linux/pull/3383
> > > -Addresses: https://github.com/util-linux/util-linux/pull/3375
> > > -Signed-off-by: Karel Zak <kzak@redhat.com>
> > > -Signed-off-by: Julien Olivain <ju.o@free.fr>
> > > ----
> > > - libuuid/src/gen_uuid.c | 18 +++++++++++++++---
> > > - 1 file changed, 15 insertions(+), 3 deletions(-)
> > > -
> > > -diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
> > > -index 69712267f..1ed82b46b 100644
> > > ---- a/libuuid/src/gen_uuid.c
> > > -+++ b/libuuid/src/gen_uuid.c
> > > -@@ -80,7 +80,10 @@
> > > - #if defined(__linux__) && defined(HAVE_SYS_SYSCALL_H)
> > > - #include <sys/syscall.h>
> > > - #endif
> > > --#include <pthread.h>
> > > -+#ifdef HAVE_LIBPTHREAD
> > > -+# include <pthread.h>
> > > -+#endif
> > > -+
> > > - #include <signal.h>
> > > -
> > > - #include "all-io.h"
> > > -@@ -580,8 +583,7 @@ int __uuid_generate_time_cont(uuid_t out, int *num,
> uint32_t cont_offset)
> > > -  * If neither of these is possible (e.g. because of insufficient
> permissions), it generates
> > > -  * the UUID anyway, but returns -1. Otherwise, returns 0.
> > > -  */
> > > --
> > > --/* thread local cache for uuidd based requests */
> > > -+#ifdef HAVE_LIBPTHREAD
> > > - THREAD_LOCAL struct {
> > > -     int             num;
> > > -     int             cache_size;
> > > -@@ -597,8 +599,10 @@ static void reset_uuidd_cache(void)
> > > -     memset(&uuidd_cache, 0, sizeof(uuidd_cache));
> > > -     uuidd_cache.cache_size = CS_MIN;
> > > - }
> > > -+#endif /* HAVE_LIBPTHREAD */
> > > -
> > > - static int uuid_generate_time_generic(uuid_t out) {
> > > -+#ifdef HAVE_LIBPTHREAD
> > > -     static volatile sig_atomic_t atfork_registered;
> > > -     time_t  now;
> > > -
> > > -@@ -651,6 +655,14 @@ static int uuid_generate_time_generic(uuid_t out) {
> > > -             return 0;
> > > -     }
> > > -
> > > -+#else /* !HAVE_LIBPTHREAD */
> > > -+    {
> > > -+            int num = 1;
> > > -+            if (get_uuid_via_daemon(UUIDD_OP_TIME_UUID, out, &num) == 0)
> > > -+                    return 0;
> > > -+    }
> > > -+#endif /* HAVE_LIBPTHREAD */
> > > -+
> > > -     return __uuid_generate_time(out, NULL);
> > > - }
> > > -
> > > ---
> > > -2.48.1
> > > -
> > > diff --git a/package/util-linux/util-linux.hash b/package/util-linux/
> util-linux.hash
> > > index 317efebcbf..e74aa17c94 100644
> > > --- a/package/util-linux/util-linux.hash
> > > +++ b/package/util-linux/util-linux.hash
> > > @@ -1,10 +1,14 @@
> > > -# From https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.40/
> sha256sums.asc
> > > -sha256  d78b37a66f5922d70edf3bdfb01a6b33d34ed3c3cafd6628203b2a2b67c8e8b3 
> util-linux-2.40.2.tar.xz
> > > +# From https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.41/
> sha256sums.asc
> > > +sha256  81ee93b3cfdfeb7d7c4090cedeba1d7bbce9141fd0b501b686b3fe475ddca4c6 
> util-linux-2.41.tar.xz
> > >  # License files, locally calculated
> > > -sha256  27f25514040a401b2ceb7057eae1f46cedb1666664b519b5be7e0960d1b35164 
> README.licensing
> > > +sha256  4c2db318192bda62f3f8fcf71488bb5e602ae4385eba281d711b46cc13a40bb3 
> README.licensing
> > > +sha256  527f738966ca396cd5a68c1509390de2a780c6b614d9ee57f7544a6161938ed1 
> Documentation/licenses/COPYING.BSD-2-Clause
> > >  sha256  9b718a9460fed5952466421235bc79eb49d4e9eacc920d7a9dd6285ab8fd6c6d 
> Documentation/licenses/COPYING.BSD-3-Clause
> > >  sha256  ba7640f00d93e72e92b94b9d71f25ec53bac2f1682f5c4adcccb0018359f60f8 
> Documentation/licenses/COPYING.BSD-4-Clause-UC
> > > +sha256  6fc9e709ccbfe0d77fbffa2427a983282be2eb88e47b1cdb49f21a83b4d1e665 
> Documentation/licenses/COPYING.EUPL-1.2
> > > +sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 
> Documentation/licenses/COPYING.GPL-2.0-only
> > >  sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 
> Documentation/licenses/COPYING.GPL-2.0-or-later
> > > +sha256  3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986 
> Documentation/licenses/COPYING.GPL-3.0-or-later
> > >  sha256  e53348ce276358e9997014071c5294b36a18c4b34f32f00ee57b9acce0aafd63 
> Documentation/licenses/COPYING.ISC
> > >  sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 
> Documentation/licenses/COPYING.LGPL-2.1-or-later
> > >  sha256  8555341619542abb48c102afd954e42d4478e5be16ad3d5af7b0ff71009e7348 
> Documentation/licenses/COPYING.MIT
> > > diff --git a/package/util-linux/util-linux.mk b/package/util-linux/
> util-linux.mk
> > > index ed30c0b107..71e458ccc4 100644
> > > --- a/package/util-linux/util-linux.mk
> > > +++ b/package/util-linux/util-linux.mk
> > > @@ -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.40
> > > -UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).2
> > > +UTIL_LINUX_VERSION_MAJOR = 2.41
> > > +UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR)
> > >  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)
> > >
> > > @@ -24,18 +24,19 @@ UTIL_LINUX_LICENSE = \
> > >       ISC (rfkill) \
> > >       MIT (hardlink, flock)
> > >  UTIL_LINUX_LICENSE_FILES = README.licensing \
> > > +     Documentation/licenses/COPYING.BSD-2-Clause \
> > >       Documentation/licenses/COPYING.BSD-3-Clause \
> > >       Documentation/licenses/COPYING.BSD-4-Clause-UC \
> > > +     Documentation/licenses/COPYING.EUPL-1.2 \
> > > +     Documentation/licenses/COPYING.GPL-2.0-only \
> > >       Documentation/licenses/COPYING.GPL-2.0-or-later \
> > > +     Documentation/licenses/COPYING.GPL-3.0-or-later \
> > >       Documentation/licenses/COPYING.ISC \
> > >       Documentation/licenses/COPYING.LGPL-2.1-or-later \
> > >       Documentation/licenses/COPYING.MIT
> > >
> > >  UTIL_LINUX_CPE_ID_VENDOR = kernel
> > >
> > > -# 0001-libmount-ifdef-statx-call.patch
> > > -UTIL_LINUX_AUTORECONF = YES
> > > -
> > >  UTIL_LINUX_INSTALL_STAGING = YES
> > >  UTIL_LINUX_DEPENDENCIES = \
> > >       host-pkgconf \
> > > --
> > > 2.43.0
> > >
> >
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Buildroot] [PATCH v2] package/util-linux: bump to 2.41
  2025-04-02 18:56         ` Waldemar Brodkorb
@ 2025-04-02 20:27           ` Thomas Devoogdt
  2025-04-21 21:31             ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Devoogdt @ 2025-04-02 20:27 UTC (permalink / raw)
  To: Waldemar Brodkorb
  Cc: Thomas Devoogdt, Arnout Vandecappelle via buildroot,
	Thomas Devoogdt

Hi,


I could reproduce this:

```
  CC       libblkid/src/la-dev.lo
  CC       libblkid/src/la-devname.lo
  CC       libblkid/src/la-devno.lo
  CC       libblkid/src/la-encode.lo
In file included from
/home/thomas/external/buildroot2/output/host/mips64-buildroot-linux-uclibc/sysroot/usr/include/linux/fs.h:19,
                 from
/home/thomas/external/buildroot2/output/host/mips64-buildroot-linux-uclibc/sysroot/usr/include/linux/btrfs.h:29,
                 from libmount/src/btrfs.c:18:
/home/thomas/external/buildroot2/output/host/mips64-buildroot-linux-uclibc/sysroot/usr/include/sys/mount.h:35:3:
error: expected identifier before numeric constant
   35 |   MS_RDONLY = 1,                /* Mount read-only.  */
      |   ^~~~~~~~~
  CC       libblkid/src/la-evaluate.lo
make[4]: *** [Makefile:12594: libmount/src/la-btrfs.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [Makefile:17521: all-recursive] Error 1
make[2]: *** [Makefile:7553: all] Error 2
make[1]: *** [package/pkg-generic.mk:273:
/home/thomas/external/buildroot2/output/build/util-linux-2.41/.stamp_built]
Error 2
make: *** [Makefile:83: _all] Error 2
```

Along with another compile error I've seen earlier today:

```
  CC       sys-utils/lsns-lsns.o
  CC       sys-utils/lscpu-lscpu.o
  CC       sys-utils/lscpu-lscpu-cputype.o
sys-utils/lsns.c: In function ‘add_namespace_from_sock’:
sys-utils/lsns.c:580:19: error: ‘SIOCGSKNS’ undeclared (first use in
this function)
  nsfd = ioctl(sk, SIOCGSKNS);
                   ^~~~~~~~~
sys-utils/lsns.c:580:19: note: each undeclared identifier is reported
only once for each function it appears in
sys-utils/lsns.c: At top level:
sys-utils/lsns.c:425:31: warning: ‘add_namespace_for_nsfd’ declared
‘static’ but never defined [-Wunused-function]
 static struct lsns_namespace *add_namespace_for_nsfd(struct lsns *ls,
int fd, ino_t ino);
                               ^~~~~~~~~~~~~~~~~~~~~~
Makefile:14260: recipe for target 'sys-utils/lsns-lsns.o' failed
make[3]: *** [sys-utils/lsns-lsns.o] Error 1
make[3]: *** Waiting for unfinished jobs....
Makefile:17521: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
Makefile:7553: recipe for target 'all' failed
make[1]: *** [all] Error 2
```

So two things to fix.


Kind regards,

Thomas Devoogdt

Op wo 2 apr 2025 om 20:56 schreef Waldemar Brodkorb <wbx@openadk.org>:
>
> Hi,
>
> I had some issues with whitespaces at the end of the lines.
> Now the tests are passed, but the fragment is not accepted.
> Can you check your logfile? Are you sure mount is built?
>
> best regards
>  Waldemar
>
> Thomas Devoogdt wrote,
>
> > Hi Waldemar,
> >
> >
> > What exact defconfig are you using?
> >
> > I just ran this:
> > $ cat util-linux.config
> > BR2_PACKAGE_UTIL_LINUX=y
> > BR2_PACKAGE_UTIL_LINUX_MOUNT=y
> > BR2_PACKAGE_UTIL_LINUX_LIBMOUNT=y
> > BR2_PACKAGE_UTIL_LINUX_MOUNTPOINT=y
> > $ ./utils/test-pkg -p util-linux -c util-linux.config -a
> >
> > No failing test, and multiple uclibc toolchains were tested alongside.
> >
> >
> > Kr,
> >
> > Thomas Devoogdt
> >
> >
> > Op wo 2 apr 2025 om 13:08 schreef Waldemar Brodkorb <wbx@openadk.org>:
> >
> > >
> > > Hi Thomas,
> > >
> > > my problem with mount still exist. Could you reproduce it?
> > > I just use defconfig for mips64, change to uclibc-ng and
> > > then add util-linux mount.
> > >
> > > best regards
> > >  Waldemar
> > >
> > > Thomas Devoogdt wrote,
> > >
> > > > From: Thomas Devoogdt <thomas.devoogdt@barco.com>
> > > >
> > > > News: https://lore.kernel.org/util-linux/
> > 2cifsg7vkdiivfsmmximhbzybrsopn7zfqgwz2f6hyflh35pjr@ecyicq2cbsro/
> > > >
> > > > Dropped patches which are all upstream.
> > > > - https://github.com/util-linux/util-linux/pull/3049
> > > > - https://github.com/util-linux/util-linux/pull/3383
> > > >
> > > > Added some new patches. (which are also upstream)
> > > > - https://github.com/util-linux/util-linux/pull/3471
> > > > - https://github.com/util-linux/util-linux/pull/3484
> > > >
> > > > Synced all license files.
> > > >
> > > > Dropped the AUTORECONF call, since
> > > > 0001-libmount-ifdef-statx-call.patch is upstream.
> > > >
> > > > Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> > > > ---
> > > > v2:
> > > >  - dropped AUTORECONF
> > > >  - added two compile patches
> > > > ---
> > > >  .../0001-misc-never-include-wchar.h.patch     | 160 ++++++++++++++++++
> > > >  ...ch.c-fix-build-with-uclibc-ng-1.0.39.patch |  39 -----
> > > >  .../0002-c.h-consolidate-THREAD_LOCAL.patch   |  65 -------
> > > >  ...ed-reference-to-add_namespace_for_ns.patch |  59 +++++++
> > > >  ...ine-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch |  47 -----
> > > >  .../0004-meson-add-HAVE_LIBPTHREAD.patch      |  27 ---
> > > >  ...non-cached-scenarios-when-lpthread-i.patch |  82 ---------
> > > >  package/util-linux/util-linux.hash            |  10 +-
> > > >  package/util-linux/util-linux.mk              |  11 +-
> > > >  9 files changed, 232 insertions(+), 268 deletions(-)
> > > >  create mode 100644 package/util-linux/
> > 0001-misc-never-include-wchar.h.patch
> > > >  delete mode 100644 package/util-linux/
> > 0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
> > > >  delete mode 100644 package/util-linux/
> > 0002-c.h-consolidate-THREAD_LOCAL.patch
> > > >  create mode 100644 package/util-linux/
> > 0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
> > > >  delete mode 100644 package/util-linux/
> > 0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
> > > >  delete mode 100644 package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
> > > >  delete mode 100644 package/util-linux/
> > 0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
> > > >
> > > > diff --git a/package/util-linux/0001-misc-never-include-wchar.h.patch b/
> > package/util-linux/0001-misc-never-include-wchar.h.patch
> > > > new file mode 100644
> > > > index 0000000000..3adfaa2261
> > > > --- /dev/null
> > > > +++ b/package/util-linux/0001-misc-never-include-wchar.h.patch
> > > > @@ -0,0 +1,160 @@
> > > > +From e8205294e329f50bdf465d8cdd15653fd42ec5c0 Mon Sep 17 00:00:00 2001
> > > > +From: Karel Zak <kzak@redhat.com>
> > > > +Date: Thu, 20 Mar 2025 11:57:06 +0100
> > > > +Subject: [PATCH] misc: never include wchar.h
> > > > +
> > > > +We have a portable "widechar.h" that follows --disable-widechar and
> > > > +provides portability. It is a bug to directly include libc's wchar.h
> > > > +or wctype.h.
> > > > +
> > > > +Fixes: https://github.com/util-linux/util-linux/issues/3470
> > > > +Signed-off-by: Karel Zak <kzak@redhat.com>
> > > > +(cherry picked from commit 5c0888dde3cc296d06b8243dcc78248ff90526e5)
> > > > +Upstream: https://github.com/util-linux/util-linux/pull/3471
> > > > +Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> > > > +---
> > > > + disk-utils/cfdisk.c          | 6 +-----
> > > > + include/carefulputc.h        | 5 +----
> > > > + include/fgetwc_or_err.h      | 6 +-----
> > > > + lib/idcache.c                | 2 +-
> > > > + sys-utils/irqtop.c           | 7 ++-----
> > > > + sys-utils/lsns.c             | 2 +-
> > > > + tests/helpers/test_sysinfo.c | 2 +-
> > > > + 7 files changed, 8 insertions(+), 22 deletions(-)
> > > > +
> > > > +diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c
> > > > +index 4018f4d3d..d4057eedb 100644
> > > > +--- a/disk-utils/cfdisk.c
> > > > ++++ b/disk-utils/cfdisk.c
> > > > +@@ -52,14 +52,10 @@
> > > > + # include <ncurses/ncurses.h>
> > > > + #endif
> > > > +
> > > > +-#ifdef HAVE_WIDECHAR
> > > > +-# include <wctype.h>
> > > > +-# include <wchar.h>
> > > > +-#endif
> > > > +-
> > > > + #include "c.h"
> > > > + #include "closestream.h"
> > > > + #include "nls.h"
> > > > ++#include "widechar.h"
> > > > + #include "strutils.h"
> > > > + #include "xalloc.h"
> > > > + #include "mbsalign.h"
> > > > +diff --git a/include/carefulputc.h b/include/carefulputc.h
> > > > +index 3cc6f7ff9..c6b778bba 100644
> > > > +--- a/include/carefulputc.h
> > > > ++++ b/include/carefulputc.h
> > > > +@@ -4,12 +4,9 @@
> > > > + #include <stdio.h>
> > > > + #include <string.h>
> > > > + #include <ctype.h>
> > > > +-#ifdef HAVE_WIDECHAR
> > > > +-#include <wctype.h>
> > > > +-#include <wchar.h>
> > > > +-#endif
> > > > + #include <stdbool.h>
> > > > +
> > > > ++#include "widechar.h"
> > > > + #include "cctype.h"
> > > > +
> > > > + /*
> > > > +diff --git a/include/fgetwc_or_err.h b/include/fgetwc_or_err.h
> > > > +index 3cf926283..f6ba71c6b 100644
> > > > +--- a/include/fgetwc_or_err.h
> > > > ++++ b/include/fgetwc_or_err.h
> > > > +@@ -1,13 +1,9 @@
> > > > + #ifndef UTIL_LINUX_FGETWC_OR_ERR_H
> > > > + #define UTIL_LINUX_FGETWC_OR_ERR_H
> > > > +
> > > > +-#include <stdio.h>
> > > > +-#include <wchar.h>
> > > > +-#include <errno.h>
> > > > +-
> > > > +-#include "widechar.h"
> > > > + #include "c.h"
> > > > + #include "nls.h"
> > > > ++#include "widechar.h"
> > > > +
> > > > + static inline wint_t fgetwc_or_err(FILE *stream) {
> > > > +     wint_t ret;
> > > > +diff --git a/lib/idcache.c b/lib/idcache.c
> > > > +index fa77e7b07..7bae76823 100644
> > > > +--- a/lib/idcache.c
> > > > ++++ b/lib/idcache.c
> > > > +@@ -4,12 +4,12 @@
> > > > +  *
> > > > +  * Written by Karel Zak <kzak@redhat.com>
> > > > +  */
> > > > +-#include <wchar.h>
> > > > + #include <pwd.h>
> > > > + #include <grp.h>
> > > > + #include <sys/types.h>
> > > > +
> > > > + #include "c.h"
> > > > ++#include "widechar.h"
> > > > + #include "idcache.h"
> > > > +
> > > > + struct identry *get_id(struct idcache *ic, unsigned long int id)
> > > > +diff --git a/sys-utils/irqtop.c b/sys-utils/irqtop.c
> > > > +index ce6a2ca5b..f05bf6bef 100644
> > > > +--- a/sys-utils/irqtop.c
> > > > ++++ b/sys-utils/irqtop.c
> > > > +@@ -43,13 +43,10 @@
> > > > + # include <ncurses/ncurses.h>
> > > > + #endif
> > > > +
> > > > +-#ifdef HAVE_WIDECHAR
> > > > +-# include <wctype.h>
> > > > +-# include <wchar.h>
> > > > +-#endif
> > > > +-
> > > > + #include <libsmartcols.h>
> > > > +
> > > > ++#include "c.h"
> > > > ++#include "widechar.h"
> > > > + #include "closestream.h"
> > > > + #include "cpuset.h"
> > > > + #include "monotonic.h"
> > > > +diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c
> > > > +index 6b2dcba96..2b613cf71 100644
> > > > +--- a/sys-utils/lsns.c
> > > > ++++ b/sys-utils/lsns.c
> > > > +@@ -19,7 +19,6 @@
> > > > + #include <unistd.h>
> > > > + #include <sys/stat.h>
> > > > + #include <sys/types.h>
> > > > +-#include <wchar.h>
> > > > + #include <libsmartcols.h>
> > > > + #include <libmount.h>
> > > > + # include <stdbool.h>
> > > > +@@ -43,6 +42,7 @@
> > > > + #include "nls.h"
> > > > + #include "xalloc.h"
> > > > + #include "c.h"
> > > > ++#include "widechar.h"
> > > > + #include "list.h"
> > > > + #include "closestream.h"
> > > > + #include "optutils.h"
> > > > +diff --git a/tests/helpers/test_sysinfo.c b/tests/helpers/test_sysinfo.c
> > > > +index 1559d471f..95f50f3f6 100644
> > > > +--- a/tests/helpers/test_sysinfo.c
> > > > ++++ b/tests/helpers/test_sysinfo.c
> > > > +@@ -23,12 +23,12 @@
> > > > + #include <limits.h>
> > > > + #include <stdint.h>
> > > > + #include <inttypes.h>
> > > > +-#include <wchar.h>
> > > > + #include <errno.h>
> > > > + #include <time.h>
> > > > + #include <sys/ioctl.h>
> > > > +
> > > > + #include "c.h"
> > > > ++#include "widechar.h"
> > > > +
> > > > + #ifdef __linux__
> > > > + # include <sys/mount.h>
> > > > +--
> > > > +2.43.0
> > > > +
> > > > diff --git a/package/util-linux/
> > 0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch b/package/
> > util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
> > > > deleted file mode 100644
> > > > index 12dd119ef3..0000000000
> > > > --- a/package/util-linux/
> > 0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
> > > > +++ /dev/null
> > > > @@ -1,39 +0,0 @@
> > > > -From beef18da4de87ca5aaadf2beb14187f35cc4f50f Mon Sep 17 00:00:00 2001
> > > > -From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > > > -Date: Wed, 15 May 2024 18:22:11 +0200
> > > > -Subject: [PATCH] sys-utils/setarch.c: fix build with uclibc-ng < 1.0.39
> > > > -
> > > > -Fix the following build failure with uclibc-ng < 1.0.39 (i.e., without
> > > > -https://github.com/wbx-github/uclibc-ng/commit/
> > 85ac4f04d94e98389a8315e720630d0f95bfdfd6)
> > > > -raised since version 2.39 and
> > > > -https://github.com/util-linux/util-linux/commit/
> > 03a254f010b08da1175f50a8ae7882e59228f1b4:
> > > > -
> > > > -sys-utils/setarch.c:106:7: error: 'PER_LINUX32_3GB' undeclared here (not
> > in a function); did you mean 'PER_LINUX32'?
> > > > -  106 |     X(PER_LINUX32_3GB) \
> > > > -      |       ^~~~~~~~~~~~~~~
> > > > -
> > > > -Fixes:
> > > > - - http://autobuild.buildroot.org/results/
> > fb1feb47f2660882fa53f66bacc63e191fd52175
> > > > -
> > > > -Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > > > -Upstream: https://github.com/util-linux/util-linux/commit/
> > 4647fc6afbf7e99c49531600425df60f1243fcd2
> > > > ----
> > > > - sys-utils/setarch.c | 5 +++++
> > > > - 1 file changed, 5 insertions(+)
> > > > -
> > > > -diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
> > > > -index 227bc6b5de..4bcb5e69e6 100644
> > > > ---- a/sys-utils/setarch.c
> > > > -+++ b/sys-utils/setarch.c
> > > > -@@ -89,6 +89,11 @@
> > > > - # define PER_LINUX_FDPIC    (PER_LINUX | FDPIC_FUNCPTRS)
> > > > - #endif
> > > > -
> > > > -+/* fallback for old uclibc-headers < 1.0.39 */
> > > > -+#ifndef PER_LINUX32_3GB
> > > > -+# define PER_LINUX32_3GB    (PER_LINUX32 | ADDR_LIMIT_3GB)
> > > > -+#endif
> > > > -+
> > > > - #define ALL_PERSONALITIES \
> > > > -     X(PER_LINUX) \
> > > > -     X(PER_LINUX_32BIT) \
> > > > diff --git a/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch b/
> > package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
> > > > deleted file mode 100644
> > > > index bb1a63ecc2..0000000000
> > > > --- a/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
> > > > +++ /dev/null
> > > > @@ -1,65 +0,0 @@
> > > > -From 7b3db914fa9073c667ea482c8b6b4e07fe6202cc Mon Sep 17 00:00:00 2001
> > > > -From: Karel Zak <kzak@redhat.com>
> > > > -Date: Mon, 27 Jan 2025 13:40:23 +0100
> > > > -Subject: [PATCH] c.h: consolidate THREAD_LOCAL.
> > > > -
> > > > -Let's define this macro in one place only.
> > > > -
> > > > -Upstream: https://github.com/util-linux/util-linux/pull/3383
> > > > -Signed-off-by: Karel Zak <kzak@redhat.com>
> > > > -Signed-off-by: Julien Olivain <ju.o@free.fr>
> > > > ----
> > > > - include/c.h            | 9 +++++++++
> > > > - lib/randutils.c        | 5 -----
> > > > - libuuid/src/gen_uuid.c | 1 -
> > > > - 3 files changed, 9 insertions(+), 6 deletions(-)
> > > > -
> > > > -diff --git a/include/c.h b/include/c.h
> > > > -index 61b95ab2d..848c48536 100644
> > > > ---- a/include/c.h
> > > > -+++ b/include/c.h
> > > > -@@ -595,4 +595,13 @@ static inline void *reallocarray(void *ptr, size_t
> > nmemb, size_t size)
> > > > - }
> > > > - #endif
> > > > -
> > > > -+/*
> > > > -+ * thread-local storage
> > > > -+ */
> > > > -+#ifdef HAVE_TLS
> > > > -+# define THREAD_LOCAL static __thread
> > > > -+#else
> > > > -+# define THREAD_LOCAL static
> > > > -+#endif
> > > > -+
> > > > - #endif /* UTIL_LINUX_C_H */
> > > > -diff --git a/lib/randutils.c b/lib/randutils.c
> > > > -index 15c2f7834..4c806e682 100644
> > > > ---- a/lib/randutils.c
> > > > -+++ b/lib/randutils.c
> > > > -@@ -20,11 +20,6 @@
> > > > - #include "randutils.h"
> > > > - #include "nls.h"
> > > > -
> > > > --#ifdef HAVE_TLS
> > > > --#define THREAD_LOCAL static __thread
> > > > --#else
> > > > --#define THREAD_LOCAL static
> > > > --#endif
> > > > -
> > > > - #ifdef HAVE_GETRANDOM
> > > > - # include <sys/random.h>
> > > > -diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
> > > > -index 3b76ddc9a..69712267f 100644
> > > > ---- a/libuuid/src/gen_uuid.c
> > > > -+++ b/libuuid/src/gen_uuid.c
> > > > -@@ -92,7 +92,6 @@
> > > > - #include "md5.h"
> > > > - #include "sha1.h"
> > > > -
> > > > --#define THREAD_LOCAL static __thread
> > > > -
> > > > - #ifdef _WIN32
> > > > - static void gettimeofday (struct timeval *tv, void *dummy)
> > > > ---
> > > > -2.48.1
> > > > -
> > > > diff --git a/package/util-linux/
> > 0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch b/package/
> > util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
> > > > new file mode 100644
> > > > index 0000000000..5a53aed8ff
> > > > --- /dev/null
> > > > +++ b/package/util-linux/
> > 0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
> > > > @@ -0,0 +1,59 @@
> > > > +From 300a66c30c3d0fb04c0f24cf23fde80e1e3bf5e4 Mon Sep 17 00:00:00 2001
> > > > +From: Thomas Devoogdt <thomas.devoogdt@barco.com>
> > > > +Date: Tue, 25 Mar 2025 11:58:18 +0100
> > > > +Subject: [PATCH] lsns: fix undefined reference to add_namespace_for_nsfd #
> > 3483
> > > > +
> > > > +Fixes:
> > > > +
> > > > +sys-utils/lsns-lsns.o: In function `read_process':
> > > > +lsns.c:(.text+0x9e8): undefined reference to `add_namespace_for_nsfd'
> > > > +collect2: error: ld returned 1 exit status
> > > > +
> > > > +Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> > > > +(cherry picked from commit 2ced43400f35f7bd45b29364e04166a63a06e16a)
> > > > +Upstream: https://github.com/util-linux/util-linux/pull/3484
> > > > +Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> > > > +---
> > > > + sys-utils/lsns.c | 6 ++++++
> > > > + 1 file changed, 6 insertions(+)
> > > > +
> > > > +diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c
> > > > +index 2b613cf71..4c49a8b2d 100644
> > > > +--- a/sys-utils/lsns.c
> > > > ++++ b/sys-utils/lsns.c
> > > > +@@ -587,7 +587,10 @@ static void add_namespace_from_sock(struct lsns *ls,
> > pid_t pid, uint64_t fd)
> > > > +     if (get_namespace(ls, sb.st_ino))
> > > > +             goto out_nsfd;
> > > > +
> > > > ++#ifdef USE_NS_GET_API
> > > > +     add_namespace_for_nsfd(ls, nsfd, sb.st_ino);
> > > > ++#endif
> > > > ++
> > > > + out_nsfd:
> > > > +     close(nsfd);
> > > > + out_sk:
> > > > +@@ -608,6 +611,7 @@ static void add_namespace_from_sock(struct lsns *ls
> > __attribute__((__unused__)),
> > > > + {
> > > > + }
> > > > + #endif /* HAVE_LINUX_NET_NAMESPACE_H */
> > > > ++
> > > > + /* Read namespaces open(2)ed explicitly by the process specified by `pc'.
> > */
> > > > + static void read_opened_namespaces(struct lsns *ls, struct path_cxt *pc,
> > pid_t pid)
> > > > + {
> > > > +@@ -627,11 +631,13 @@ static void read_opened_namespaces(struct lsns *ls,
> > struct path_cxt *pc, pid_t p
> > > > +             if (st.st_dev == ls->nsfs_dev) {
> > > > +                     if (get_namespace(ls, st.st_ino))
> > > > +                             continue;
> > > > ++#ifdef USE_NS_GET_API
> > > > +                     int fd = ul_path_openf(pc, O_RDONLY, "fd/%ju",
> > (uintmax_t) num);
> > > > +                     if (fd >= 0) {
> > > > +                             add_namespace_for_nsfd(ls, fd, st.st_ino);
> > > > +                             close(fd);
> > > > +                     }
> > > > ++#endif
> > > > +             } else if ((st.st_mode & S_IFMT) == S_IFSOCK) {
> > > > +                     add_namespace_from_sock(ls, pid, num);
> > > > +             }
> > > > +--
> > > > +2.43.0
> > > > +
> > > > diff --git a/package/util-linux/
> > 0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch b/package/
> > util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
> > > > deleted file mode 100644
> > > > index 843253a56a..0000000000
> > > > --- a/package/util-linux/
> > 0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
> > > > +++ /dev/null
> > > > @@ -1,47 +0,0 @@
> > > > -From 0735eb8bc0ed4bc9820ea7e4e600fed246457b18 Mon Sep 17 00:00:00 2001
> > > > -From: Karel Zak <kzak@redhat.com>
> > > > -Date: Mon, 27 Jan 2025 14:01:38 +0100
> > > > -Subject: [PATCH] autotools: define HAVE_LIBPTHREAD and PTHREAD_LIBS
> > > > -
> > > > -Upstream: https://github.com/util-linux/util-linux/pull/3383
> > > > -Signed-off-by: Karel Zak <kzak@redhat.com>
> > > > -Signed-off-by: Julien Olivain <ju.o@free.fr>
> > > > ----
> > > > - configure.ac              | 7 +++++++
> > > > - libuuid/src/Makemodule.am | 2 +-
> > > > - 2 files changed, 8 insertions(+), 1 deletion(-)
> > > > -
> > > > -diff --git a/configure.ac b/configure.ac
> > > > -index 82d0e4bf9..9a7f260c5 100644
> > > > ---- a/configure.ac
> > > > -+++ b/configure.ac
> > > > -@@ -738,6 +738,13 @@ AS_IF([test x"$have_timer" = xno], [
> > > > - ])
> > > > -
> > > > -
> > > > -+AC_CHECK_LIB([pthread], [pthread_atfork], [
> > > > -+    PTHREAD_LIBS="-lpthread"
> > > > -+    AC_DEFINE([HAVE_LIBPTHREAD], [1], [Define if libpthred exist])
> > > > -+])
> > > > -+AC_SUBST([PTHREAD_LIBS])
> > > > -+
> > > > -+
> > > > - AC_CHECK_LIB([rtas], [rtas_get_sysparm], [
> > > > -     RTAS_LIBS="-lrtas"
> > > > -     AC_DEFINE([HAVE_LIBRTAS], [1], [Define if librtas exists])
> > > > -diff --git a/libuuid/src/Makemodule.am b/libuuid/src/Makemodule.am
> > > > -index 867ad7be5..58b64fe9b 100644
> > > > ---- a/libuuid/src/Makemodule.am
> > > > -+++ b/libuuid/src/Makemodule.am
> > > > -@@ -31,7 +31,7 @@ libuuid_la_SOURCES = \
> > > > - EXTRA_libuuid_la_DEPENDENCIES = \
> > > > -     libuuid/src/libuuid.sym
> > > > -
> > > > --libuuid_la_LIBADD       = $(LDADD) $(SOCKET_LIBS) -lpthread
> > > > -+libuuid_la_LIBADD       = $(LDADD) $(SOCKET_LIBS) $(PTHREAD_LIBS)
> > > > -
> > > > - libuuid_la_CFLAGS = \
> > > > -     $(AM_CFLAGS) \
> > > > ---
> > > > -2.48.1
> > > > -
> > > > diff --git a/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch b/
> > package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
> > > > deleted file mode 100644
> > > > index 19e0697769..0000000000
> > > > --- a/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
> > > > +++ /dev/null
> > > > @@ -1,27 +0,0 @@
> > > > -From f540cc6fed7224fb9ca162cb2f33c338260ae1d2 Mon Sep 17 00:00:00 2001
> > > > -From: Karel Zak <kzak@redhat.com>
> > > > -Date: Mon, 27 Jan 2025 14:11:35 +0100
> > > > -Subject: [PATCH] meson: add HAVE_LIBPTHREAD
> > > > -
> > > > -Upstream: https://github.com/util-linux/util-linux/pull/3383
> > > > -Signed-off-by: Karel Zak <kzak@redhat.com>
> > > > -Signed-off-by: Julien Olivain <ju.o@free.fr>
> > > > ----
> > > > - meson.build | 1 +
> > > > - 1 file changed, 1 insertion(+)
> > > > -
> > > > -diff --git a/meson.build b/meson.build
> > > > -index 6d1f986af..ac5fdd799 100644
> > > > ---- a/meson.build
> > > > -+++ b/meson.build
> > > > -@@ -748,6 +748,7 @@ endif
> > > > - conf.set('HAVE_CLOCK_GETTIME', have ? 1 : false)
> > > > -
> > > > - thread_libs = dependency('threads')
> > > > -+conf.set('HAVE_LIBPTHREAD', thread_libs.found() ? 1 : false)
> > > > -
> > > > - have = cc.has_function('timer_create')
> > > > - if not have
> > > > ---
> > > > -2.48.1
> > > > -
> > > > diff --git a/package/util-linux/
> > 0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch b/package/
> > util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
> > > > deleted file mode 100644
> > > > index 0d90f8aec9..0000000000
> > > > --- a/package/util-linux/
> > 0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
> > > > +++ /dev/null
> > > > @@ -1,82 +0,0 @@
> > > > -From eecaa2c0dda817eba2d493f6ddb42c39cf789fc2 Mon Sep 17 00:00:00 2001
> > > > -From: Karel Zak <kzak@redhat.com>
> > > > -Date: Mon, 27 Jan 2025 14:28:36 +0100
> > > > -Subject: [PATCH] libuuid: support non-cached scenarios (when -lpthread is
> > > > - unavailable)
> > > > -
> > > > -This patch makes the dependence on pthread optional for libuuid. In
> > > > -certain cases, such as Buildroot Linux, uClibc-ng, and very low
> > > > -resource systems, libpthread may be unavailable.
> > > > -
> > > > -If libuuid is compiled without pthread, it will not use a local cache
> > > > -and will instead request a UUID from uuidd for each call. This may
> > > > -result in less efficient performance, but the UUIDs generated will
> > > > -still be unique and reliable.
> > > > -
> > > > -On minimalistic systems, it is highly likely that uuidd will not be
> > > > -installed, making this change important for portability and robust
> > > > -code.
> > > > -
> > > > -Upstream: https://github.com/util-linux/util-linux/pull/3383
> > > > -Addresses: https://github.com/util-linux/util-linux/pull/3375
> > > > -Signed-off-by: Karel Zak <kzak@redhat.com>
> > > > -Signed-off-by: Julien Olivain <ju.o@free.fr>
> > > > ----
> > > > - libuuid/src/gen_uuid.c | 18 +++++++++++++++---
> > > > - 1 file changed, 15 insertions(+), 3 deletions(-)
> > > > -
> > > > -diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
> > > > -index 69712267f..1ed82b46b 100644
> > > > ---- a/libuuid/src/gen_uuid.c
> > > > -+++ b/libuuid/src/gen_uuid.c
> > > > -@@ -80,7 +80,10 @@
> > > > - #if defined(__linux__) && defined(HAVE_SYS_SYSCALL_H)
> > > > - #include <sys/syscall.h>
> > > > - #endif
> > > > --#include <pthread.h>
> > > > -+#ifdef HAVE_LIBPTHREAD
> > > > -+# include <pthread.h>
> > > > -+#endif
> > > > -+
> > > > - #include <signal.h>
> > > > -
> > > > - #include "all-io.h"
> > > > -@@ -580,8 +583,7 @@ int __uuid_generate_time_cont(uuid_t out, int *num,
> > uint32_t cont_offset)
> > > > -  * If neither of these is possible (e.g. because of insufficient
> > permissions), it generates
> > > > -  * the UUID anyway, but returns -1. Otherwise, returns 0.
> > > > -  */
> > > > --
> > > > --/* thread local cache for uuidd based requests */
> > > > -+#ifdef HAVE_LIBPTHREAD
> > > > - THREAD_LOCAL struct {
> > > > -     int             num;
> > > > -     int             cache_size;
> > > > -@@ -597,8 +599,10 @@ static void reset_uuidd_cache(void)
> > > > -     memset(&uuidd_cache, 0, sizeof(uuidd_cache));
> > > > -     uuidd_cache.cache_size = CS_MIN;
> > > > - }
> > > > -+#endif /* HAVE_LIBPTHREAD */
> > > > -
> > > > - static int uuid_generate_time_generic(uuid_t out) {
> > > > -+#ifdef HAVE_LIBPTHREAD
> > > > -     static volatile sig_atomic_t atfork_registered;
> > > > -     time_t  now;
> > > > -
> > > > -@@ -651,6 +655,14 @@ static int uuid_generate_time_generic(uuid_t out) {
> > > > -             return 0;
> > > > -     }
> > > > -
> > > > -+#else /* !HAVE_LIBPTHREAD */
> > > > -+    {
> > > > -+            int num = 1;
> > > > -+            if (get_uuid_via_daemon(UUIDD_OP_TIME_UUID, out, &num) == 0)
> > > > -+                    return 0;
> > > > -+    }
> > > > -+#endif /* HAVE_LIBPTHREAD */
> > > > -+
> > > > -     return __uuid_generate_time(out, NULL);
> > > > - }
> > > > -
> > > > ---
> > > > -2.48.1
> > > > -
> > > > diff --git a/package/util-linux/util-linux.hash b/package/util-linux/
> > util-linux.hash
> > > > index 317efebcbf..e74aa17c94 100644
> > > > --- a/package/util-linux/util-linux.hash
> > > > +++ b/package/util-linux/util-linux.hash
> > > > @@ -1,10 +1,14 @@
> > > > -# From https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.40/
> > sha256sums.asc
> > > > -sha256  d78b37a66f5922d70edf3bdfb01a6b33d34ed3c3cafd6628203b2a2b67c8e8b3
> > util-linux-2.40.2.tar.xz
> > > > +# From https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.41/
> > sha256sums.asc
> > > > +sha256  81ee93b3cfdfeb7d7c4090cedeba1d7bbce9141fd0b501b686b3fe475ddca4c6
> > util-linux-2.41.tar.xz
> > > >  # License files, locally calculated
> > > > -sha256  27f25514040a401b2ceb7057eae1f46cedb1666664b519b5be7e0960d1b35164
> > README.licensing
> > > > +sha256  4c2db318192bda62f3f8fcf71488bb5e602ae4385eba281d711b46cc13a40bb3
> > README.licensing
> > > > +sha256  527f738966ca396cd5a68c1509390de2a780c6b614d9ee57f7544a6161938ed1
> > Documentation/licenses/COPYING.BSD-2-Clause
> > > >  sha256  9b718a9460fed5952466421235bc79eb49d4e9eacc920d7a9dd6285ab8fd6c6d
> > Documentation/licenses/COPYING.BSD-3-Clause
> > > >  sha256  ba7640f00d93e72e92b94b9d71f25ec53bac2f1682f5c4adcccb0018359f60f8
> > Documentation/licenses/COPYING.BSD-4-Clause-UC
> > > > +sha256  6fc9e709ccbfe0d77fbffa2427a983282be2eb88e47b1cdb49f21a83b4d1e665
> > Documentation/licenses/COPYING.EUPL-1.2
> > > > +sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643
> > Documentation/licenses/COPYING.GPL-2.0-only
> > > >  sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643
> > Documentation/licenses/COPYING.GPL-2.0-or-later
> > > > +sha256  3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986
> > Documentation/licenses/COPYING.GPL-3.0-or-later
> > > >  sha256  e53348ce276358e9997014071c5294b36a18c4b34f32f00ee57b9acce0aafd63
> > Documentation/licenses/COPYING.ISC
> > > >  sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551
> > Documentation/licenses/COPYING.LGPL-2.1-or-later
> > > >  sha256  8555341619542abb48c102afd954e42d4478e5be16ad3d5af7b0ff71009e7348
> > Documentation/licenses/COPYING.MIT
> > > > diff --git a/package/util-linux/util-linux.mk b/package/util-linux/
> > util-linux.mk
> > > > index ed30c0b107..71e458ccc4 100644
> > > > --- a/package/util-linux/util-linux.mk
> > > > +++ b/package/util-linux/util-linux.mk
> > > > @@ -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.40
> > > > -UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).2
> > > > +UTIL_LINUX_VERSION_MAJOR = 2.41
> > > > +UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR)
> > > >  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)
> > > >
> > > > @@ -24,18 +24,19 @@ UTIL_LINUX_LICENSE = \
> > > >       ISC (rfkill) \
> > > >       MIT (hardlink, flock)
> > > >  UTIL_LINUX_LICENSE_FILES = README.licensing \
> > > > +     Documentation/licenses/COPYING.BSD-2-Clause \
> > > >       Documentation/licenses/COPYING.BSD-3-Clause \
> > > >       Documentation/licenses/COPYING.BSD-4-Clause-UC \
> > > > +     Documentation/licenses/COPYING.EUPL-1.2 \
> > > > +     Documentation/licenses/COPYING.GPL-2.0-only \
> > > >       Documentation/licenses/COPYING.GPL-2.0-or-later \
> > > > +     Documentation/licenses/COPYING.GPL-3.0-or-later \
> > > >       Documentation/licenses/COPYING.ISC \
> > > >       Documentation/licenses/COPYING.LGPL-2.1-or-later \
> > > >       Documentation/licenses/COPYING.MIT
> > > >
> > > >  UTIL_LINUX_CPE_ID_VENDOR = kernel
> > > >
> > > > -# 0001-libmount-ifdef-statx-call.patch
> > > > -UTIL_LINUX_AUTORECONF = YES
> > > > -
> > > >  UTIL_LINUX_INSTALL_STAGING = YES
> > > >  UTIL_LINUX_DEPENDENCIES = \
> > > >       host-pkgconf \
> > > > --
> > > > 2.43.0
> > > >
> > >
>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Buildroot] [PATCH v2] package/util-linux: bump to 2.41
  2025-04-02 20:27           ` Thomas Devoogdt
@ 2025-04-21 21:31             ` Thomas Petazzoni via buildroot
  2025-04-22  7:32               ` Thomas Devoogdt
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-04-21 21:31 UTC (permalink / raw)
  To: Thomas Devoogdt; +Cc: Thomas Devoogdt, Arnout Vandecappelle via buildroot

Hello,

On Wed, 2 Apr 2025 22:27:39 +0200
Thomas Devoogdt <thomas@devoogdt.com> wrote:

> So two things to fix.

So, I'm going to mark this patch as Changes Requested. Do you intend to
work on solving those remaining build issues?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Buildroot] [PATCH v2] package/util-linux: bump to 2.41
  2025-04-21 21:31             ` Thomas Petazzoni via buildroot
@ 2025-04-22  7:32               ` Thomas Devoogdt
  2025-04-22  7:55                 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Devoogdt @ 2025-04-22  7:32 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: Thomas Devoogdt, Thomas Devoogdt,
	Arnout Vandecappelle via buildroot

Hi Thomas,


The first issue,
(Reported here https://github.com/util-linux/util-linux/issues/3501)

error: expected identifier before numeric constant
   35 |   MS_RDONLY = 1,                /* Mount read-only.  */
      |   ^~~~~~~~~

has been fixed by in uClibc in commit
https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=96af6db3a430a22d5e8a45f6e7284362866b3980.

The second issue,
(Reported here https://github.com/util-linux/util-linux/issues/3502)

sys-utils/lsns.c:580:19: error: ‘SIOCGSKNS’ undeclared (first use in
this function)
  nsfd = ioctl(sk, SIOCGSKNS);
                   ^~~~~~~~~

has been fixed in commit
https://github.com/util-linux/util-linux/commit/10ee66ed1b08586bde42582e34355418eef33ef5.

It is only applicable for Linux < 4.10, but I will update this bump
with a patch for this.


Kr,

Thomas Devoogdt

Op ma 21 apr 2025 om 23:32 schreef Thomas Petazzoni
<thomas.petazzoni@bootlin.com>:
>
> Hello,
>
> On Wed, 2 Apr 2025 22:27:39 +0200
> Thomas Devoogdt <thomas@devoogdt.com> wrote:
>
> > So two things to fix.
>
> So, I'm going to mark this patch as Changes Requested. Do you intend to
> work on solving those remaining build issues?
>
> Thanks a lot!
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Buildroot] [PATCH v2] package/util-linux: bump to 2.41
  2025-04-22  7:32               ` Thomas Devoogdt
@ 2025-04-22  7:55                 ` Thomas Petazzoni via buildroot
  2025-04-22  7:59                   ` [Buildroot] [PATCH v3] " Thomas Devoogdt
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-04-22  7:55 UTC (permalink / raw)
  To: Thomas Devoogdt; +Cc: Thomas Devoogdt, Arnout Vandecappelle via buildroot

Hello Thomas,

On Tue, 22 Apr 2025 09:32:55 +0200
Thomas Devoogdt <thomas@devoogdt.com> wrote:

> The first issue,
> (Reported here https://github.com/util-linux/util-linux/issues/3501)
> 
> error: expected identifier before numeric constant
>    35 |   MS_RDONLY = 1,                /* Mount read-only.  */
>       |   ^~~~~~~~~
> 
> has been fixed by in uClibc in commit
> https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=96af6db3a430a22d5e8a45f6e7284362866b3980.

This one is in uClibc-ng 1.0.52, so it means it will for now continue
to cause issues with Bootlin toolchains, as the latest are based on
1.0.52. I need to have a look at building new Bootlin toolchains, but I
was hoping to do that when gcc 15.x is available.

> The second issue,
> (Reported here https://github.com/util-linux/util-linux/issues/3502)
> 
> sys-utils/lsns.c:580:19: error: ‘SIOCGSKNS’ undeclared (first use in
> this function)
>   nsfd = ioctl(sk, SIOCGSKNS);
>                    ^~~~~~~~~
> 
> has been fixed in commit
> https://github.com/util-linux/util-linux/commit/10ee66ed1b08586bde42582e34355418eef33ef5.
> 
> It is only applicable for Linux < 4.10, but I will update this bump
> with a patch for this.

Thanks, sounds good!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH v3] package/util-linux: bump to 2.41
  2025-04-22  7:55                 ` Thomas Petazzoni via buildroot
@ 2025-04-22  7:59                   ` Thomas Devoogdt
  2025-04-22  8:40                     ` Thomas Petazzoni via buildroot
                                       ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Thomas Devoogdt @ 2025-04-22  7:59 UTC (permalink / raw)
  To: buildroot; +Cc: thomas.devoogdt, thomas.petazzoni, thomas

From: Thomas Devoogdt <thomas.devoogdt@barco.com>

News: https://lore.kernel.org/util-linux/2cifsg7vkdiivfsmmximhbzybrsopn7zfqgwz2f6hyflh35pjr@ecyicq2cbsro/

Dropped patches which are all upstream.
- https://github.com/util-linux/util-linux/pull/3049
- https://github.com/util-linux/util-linux/pull/3383

Added some new patches. (which are also upstream)
- https://github.com/util-linux/util-linux/pull/3471
- https://github.com/util-linux/util-linux/pull/3484
- https://github.com/util-linux/util-linux/pull/3506

Synced all license files.

Dropped the AUTORECONF call, since
0001-libmount-ifdef-statx-call.patch is upstream.

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
---
v2:
 - dropped AUTORECONF
 - added two compile patches
   - 0001-misc-never-include-wchar.h.patch
   - 0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
v3:
 - added 0003-namespace.h-fix-compilation-on-Linux-4.10.patch
---
 .../0001-misc-never-include-wchar.h.patch     | 160 ++++++++++++++++++
 ...ch.c-fix-build-with-uclibc-ng-1.0.39.patch |  39 -----
 .../0002-c.h-consolidate-THREAD_LOCAL.patch   |  65 -------
 ...ed-reference-to-add_namespace_for_ns.patch |  59 +++++++
 ...ine-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch |  47 -----
 ...pace.h-fix-compilation-on-Linux-4.10.patch |  62 +++++++
 .../0004-meson-add-HAVE_LIBPTHREAD.patch      |  27 ---
 ...non-cached-scenarios-when-lpthread-i.patch |  82 ---------
 package/util-linux/util-linux.hash            |  10 +-
 package/util-linux/util-linux.mk              |  11 +-
 10 files changed, 294 insertions(+), 268 deletions(-)
 create mode 100644 package/util-linux/0001-misc-never-include-wchar.h.patch
 delete mode 100644 package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
 delete mode 100644 package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
 create mode 100644 package/util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
 delete mode 100644 package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
 create mode 100644 package/util-linux/0003-namespace.h-fix-compilation-on-Linux-4.10.patch
 delete mode 100644 package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
 delete mode 100644 package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch

diff --git a/package/util-linux/0001-misc-never-include-wchar.h.patch b/package/util-linux/0001-misc-never-include-wchar.h.patch
new file mode 100644
index 0000000000..4f4845bf03
--- /dev/null
+++ b/package/util-linux/0001-misc-never-include-wchar.h.patch
@@ -0,0 +1,160 @@
+From 00673b424c186857ec3b3c9f7f926b739df89a1d Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak@redhat.com>
+Date: Thu, 20 Mar 2025 11:57:06 +0100
+Subject: [PATCH] misc: never include wchar.h
+
+We have a portable "widechar.h" that follows --disable-widechar and
+provides portability. It is a bug to directly include libc's wchar.h
+or wctype.h.
+
+Fixes: https://github.com/util-linux/util-linux/issues/3470
+Signed-off-by: Karel Zak <kzak@redhat.com>
+(cherry picked from commit 5c0888dde3cc296d06b8243dcc78248ff90526e5)
+Upstream: https://github.com/util-linux/util-linux/pull/3471
+Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
+---
+ disk-utils/cfdisk.c          | 6 +-----
+ include/carefulputc.h        | 5 +----
+ include/fgetwc_or_err.h      | 6 +-----
+ lib/idcache.c                | 2 +-
+ sys-utils/irqtop.c           | 7 ++-----
+ sys-utils/lsns.c             | 2 +-
+ tests/helpers/test_sysinfo.c | 2 +-
+ 7 files changed, 8 insertions(+), 22 deletions(-)
+
+diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c
+index 4018f4d3d..d4057eedb 100644
+--- a/disk-utils/cfdisk.c
++++ b/disk-utils/cfdisk.c
+@@ -52,14 +52,10 @@
+ # include <ncurses/ncurses.h>
+ #endif
+ 
+-#ifdef HAVE_WIDECHAR
+-# include <wctype.h>
+-# include <wchar.h>
+-#endif
+-
+ #include "c.h"
+ #include "closestream.h"
+ #include "nls.h"
++#include "widechar.h"
+ #include "strutils.h"
+ #include "xalloc.h"
+ #include "mbsalign.h"
+diff --git a/include/carefulputc.h b/include/carefulputc.h
+index 3cc6f7ff9..c6b778bba 100644
+--- a/include/carefulputc.h
++++ b/include/carefulputc.h
+@@ -4,12 +4,9 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <ctype.h>
+-#ifdef HAVE_WIDECHAR
+-#include <wctype.h>
+-#include <wchar.h>
+-#endif
+ #include <stdbool.h>
+ 
++#include "widechar.h"
+ #include "cctype.h"
+ 
+ /*
+diff --git a/include/fgetwc_or_err.h b/include/fgetwc_or_err.h
+index 3cf926283..f6ba71c6b 100644
+--- a/include/fgetwc_or_err.h
++++ b/include/fgetwc_or_err.h
+@@ -1,13 +1,9 @@
+ #ifndef UTIL_LINUX_FGETWC_OR_ERR_H
+ #define UTIL_LINUX_FGETWC_OR_ERR_H
+ 
+-#include <stdio.h>
+-#include <wchar.h>
+-#include <errno.h>
+-
+-#include "widechar.h"
+ #include "c.h"
+ #include "nls.h"
++#include "widechar.h"
+ 
+ static inline wint_t fgetwc_or_err(FILE *stream) {
+ 	wint_t ret;
+diff --git a/lib/idcache.c b/lib/idcache.c
+index fa77e7b07..7bae76823 100644
+--- a/lib/idcache.c
++++ b/lib/idcache.c
+@@ -4,12 +4,12 @@
+  *
+  * Written by Karel Zak <kzak@redhat.com>
+  */
+-#include <wchar.h>
+ #include <pwd.h>
+ #include <grp.h>
+ #include <sys/types.h>
+ 
+ #include "c.h"
++#include "widechar.h"
+ #include "idcache.h"
+ 
+ struct identry *get_id(struct idcache *ic, unsigned long int id)
+diff --git a/sys-utils/irqtop.c b/sys-utils/irqtop.c
+index ce6a2ca5b..f05bf6bef 100644
+--- a/sys-utils/irqtop.c
++++ b/sys-utils/irqtop.c
+@@ -43,13 +43,10 @@
+ # include <ncurses/ncurses.h>
+ #endif
+ 
+-#ifdef HAVE_WIDECHAR
+-# include <wctype.h>
+-# include <wchar.h>
+-#endif
+-
+ #include <libsmartcols.h>
+ 
++#include "c.h"
++#include "widechar.h"
+ #include "closestream.h"
+ #include "cpuset.h"
+ #include "monotonic.h"
+diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c
+index 6b2dcba96..2b613cf71 100644
+--- a/sys-utils/lsns.c
++++ b/sys-utils/lsns.c
+@@ -19,7 +19,6 @@
+ #include <unistd.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+-#include <wchar.h>
+ #include <libsmartcols.h>
+ #include <libmount.h>
+ # include <stdbool.h>
+@@ -43,6 +42,7 @@
+ #include "nls.h"
+ #include "xalloc.h"
+ #include "c.h"
++#include "widechar.h"
+ #include "list.h"
+ #include "closestream.h"
+ #include "optutils.h"
+diff --git a/tests/helpers/test_sysinfo.c b/tests/helpers/test_sysinfo.c
+index 1559d471f..95f50f3f6 100644
+--- a/tests/helpers/test_sysinfo.c
++++ b/tests/helpers/test_sysinfo.c
+@@ -23,12 +23,12 @@
+ #include <limits.h>
+ #include <stdint.h>
+ #include <inttypes.h>
+-#include <wchar.h>
+ #include <errno.h>
+ #include <time.h>
+ #include <sys/ioctl.h>
+ 
+ #include "c.h"
++#include "widechar.h"
+ 
+ #ifdef __linux__
+ # include <sys/mount.h>
+-- 
+2.43.0
+
diff --git a/package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch b/package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
deleted file mode 100644
index 12dd119ef3..0000000000
--- a/package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From beef18da4de87ca5aaadf2beb14187f35cc4f50f Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Date: Wed, 15 May 2024 18:22:11 +0200
-Subject: [PATCH] sys-utils/setarch.c: fix build with uclibc-ng < 1.0.39
-
-Fix the following build failure with uclibc-ng < 1.0.39 (i.e., without
-https://github.com/wbx-github/uclibc-ng/commit/85ac4f04d94e98389a8315e720630d0f95bfdfd6)
-raised since version 2.39 and
-https://github.com/util-linux/util-linux/commit/03a254f010b08da1175f50a8ae7882e59228f1b4:
-
-sys-utils/setarch.c:106:7: error: 'PER_LINUX32_3GB' undeclared here (not in a function); did you mean 'PER_LINUX32'?
-  106 |     X(PER_LINUX32_3GB) \
-      |       ^~~~~~~~~~~~~~~
-
-Fixes:
- - http://autobuild.buildroot.org/results/fb1feb47f2660882fa53f66bacc63e191fd52175
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Upstream: https://github.com/util-linux/util-linux/commit/4647fc6afbf7e99c49531600425df60f1243fcd2
----
- sys-utils/setarch.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
-index 227bc6b5de..4bcb5e69e6 100644
---- a/sys-utils/setarch.c
-+++ b/sys-utils/setarch.c
-@@ -89,6 +89,11 @@
- # define PER_LINUX_FDPIC	(PER_LINUX | FDPIC_FUNCPTRS)
- #endif
- 
-+/* fallback for old uclibc-headers < 1.0.39 */
-+#ifndef PER_LINUX32_3GB
-+# define PER_LINUX32_3GB	(PER_LINUX32 | ADDR_LIMIT_3GB)
-+#endif
-+
- #define ALL_PERSONALITIES \
-     X(PER_LINUX) \
-     X(PER_LINUX_32BIT) \
diff --git a/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch b/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
deleted file mode 100644
index bb1a63ecc2..0000000000
--- a/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 7b3db914fa9073c667ea482c8b6b4e07fe6202cc Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 27 Jan 2025 13:40:23 +0100
-Subject: [PATCH] c.h: consolidate THREAD_LOCAL.
-
-Let's define this macro in one place only.
-
-Upstream: https://github.com/util-linux/util-linux/pull/3383
-Signed-off-by: Karel Zak <kzak@redhat.com>
-Signed-off-by: Julien Olivain <ju.o@free.fr>
----
- include/c.h            | 9 +++++++++
- lib/randutils.c        | 5 -----
- libuuid/src/gen_uuid.c | 1 -
- 3 files changed, 9 insertions(+), 6 deletions(-)
-
-diff --git a/include/c.h b/include/c.h
-index 61b95ab2d..848c48536 100644
---- a/include/c.h
-+++ b/include/c.h
-@@ -595,4 +595,13 @@ static inline void *reallocarray(void *ptr, size_t nmemb, size_t size)
- }
- #endif
- 
-+/*
-+ * thread-local storage
-+ */
-+#ifdef HAVE_TLS
-+# define THREAD_LOCAL static __thread
-+#else
-+# define THREAD_LOCAL static
-+#endif
-+
- #endif /* UTIL_LINUX_C_H */
-diff --git a/lib/randutils.c b/lib/randutils.c
-index 15c2f7834..4c806e682 100644
---- a/lib/randutils.c
-+++ b/lib/randutils.c
-@@ -20,11 +20,6 @@
- #include "randutils.h"
- #include "nls.h"
- 
--#ifdef HAVE_TLS
--#define THREAD_LOCAL static __thread
--#else
--#define THREAD_LOCAL static
--#endif
- 
- #ifdef HAVE_GETRANDOM
- # include <sys/random.h>
-diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
-index 3b76ddc9a..69712267f 100644
---- a/libuuid/src/gen_uuid.c
-+++ b/libuuid/src/gen_uuid.c
-@@ -92,7 +92,6 @@
- #include "md5.h"
- #include "sha1.h"
- 
--#define THREAD_LOCAL static __thread
- 
- #ifdef _WIN32
- static void gettimeofday (struct timeval *tv, void *dummy)
--- 
-2.48.1
-
diff --git a/package/util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch b/package/util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
new file mode 100644
index 0000000000..73ae068b10
--- /dev/null
+++ b/package/util-linux/0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
@@ -0,0 +1,59 @@
+From 9cff48a4b10c1c2d6062e0095096642e13af980f Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <thomas.devoogdt@barco.com>
+Date: Tue, 25 Mar 2025 11:58:18 +0100
+Subject: [PATCH] lsns: fix undefined reference to add_namespace_for_nsfd #3483
+
+Fixes:
+
+sys-utils/lsns-lsns.o: In function `read_process':
+lsns.c:(.text+0x9e8): undefined reference to `add_namespace_for_nsfd'
+collect2: error: ld returned 1 exit status
+
+Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
+(cherry picked from commit 2ced43400f35f7bd45b29364e04166a63a06e16a)
+Upstream: https://github.com/util-linux/util-linux/pull/3484
+Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
+---
+ sys-utils/lsns.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c
+index 2b613cf71..4c49a8b2d 100644
+--- a/sys-utils/lsns.c
++++ b/sys-utils/lsns.c
+@@ -587,7 +587,10 @@ static void add_namespace_from_sock(struct lsns *ls, pid_t pid, uint64_t fd)
+ 	if (get_namespace(ls, sb.st_ino))
+ 		goto out_nsfd;
+ 
++#ifdef USE_NS_GET_API
+ 	add_namespace_for_nsfd(ls, nsfd, sb.st_ino);
++#endif
++
+ out_nsfd:
+ 	close(nsfd);
+ out_sk:
+@@ -608,6 +611,7 @@ static void add_namespace_from_sock(struct lsns *ls __attribute__((__unused__)),
+ {
+ }
+ #endif /* HAVE_LINUX_NET_NAMESPACE_H */
++
+ /* Read namespaces open(2)ed explicitly by the process specified by `pc'. */
+ static void read_opened_namespaces(struct lsns *ls, struct path_cxt *pc, pid_t pid)
+ {
+@@ -627,11 +631,13 @@ static void read_opened_namespaces(struct lsns *ls, struct path_cxt *pc, pid_t p
+ 		if (st.st_dev == ls->nsfs_dev) {
+ 			if (get_namespace(ls, st.st_ino))
+ 				continue;
++#ifdef USE_NS_GET_API
+ 			int fd = ul_path_openf(pc, O_RDONLY, "fd/%ju", (uintmax_t) num);
+ 			if (fd >= 0) {
+ 				add_namespace_for_nsfd(ls, fd, st.st_ino);
+ 				close(fd);
+ 			}
++#endif
+ 		} else if ((st.st_mode & S_IFMT) == S_IFSOCK) {
+ 			add_namespace_from_sock(ls, pid, num);
+ 		}
+-- 
+2.43.0
+
diff --git a/package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch b/package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
deleted file mode 100644
index 843253a56a..0000000000
--- a/package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 0735eb8bc0ed4bc9820ea7e4e600fed246457b18 Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 27 Jan 2025 14:01:38 +0100
-Subject: [PATCH] autotools: define HAVE_LIBPTHREAD and PTHREAD_LIBS
-
-Upstream: https://github.com/util-linux/util-linux/pull/3383
-Signed-off-by: Karel Zak <kzak@redhat.com>
-Signed-off-by: Julien Olivain <ju.o@free.fr>
----
- configure.ac              | 7 +++++++
- libuuid/src/Makemodule.am | 2 +-
- 2 files changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 82d0e4bf9..9a7f260c5 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -738,6 +738,13 @@ AS_IF([test x"$have_timer" = xno], [
- ])
- 
- 
-+AC_CHECK_LIB([pthread], [pthread_atfork], [
-+	PTHREAD_LIBS="-lpthread"
-+	AC_DEFINE([HAVE_LIBPTHREAD], [1], [Define if libpthred exist])
-+])
-+AC_SUBST([PTHREAD_LIBS])
-+
-+
- AC_CHECK_LIB([rtas], [rtas_get_sysparm], [
- 	RTAS_LIBS="-lrtas"
- 	AC_DEFINE([HAVE_LIBRTAS], [1], [Define if librtas exists])
-diff --git a/libuuid/src/Makemodule.am b/libuuid/src/Makemodule.am
-index 867ad7be5..58b64fe9b 100644
---- a/libuuid/src/Makemodule.am
-+++ b/libuuid/src/Makemodule.am
-@@ -31,7 +31,7 @@ libuuid_la_SOURCES = \
- EXTRA_libuuid_la_DEPENDENCIES = \
- 	libuuid/src/libuuid.sym
- 
--libuuid_la_LIBADD       = $(LDADD) $(SOCKET_LIBS) -lpthread
-+libuuid_la_LIBADD       = $(LDADD) $(SOCKET_LIBS) $(PTHREAD_LIBS)
- 
- libuuid_la_CFLAGS = \
- 	$(AM_CFLAGS) \
--- 
-2.48.1
-
diff --git a/package/util-linux/0003-namespace.h-fix-compilation-on-Linux-4.10.patch b/package/util-linux/0003-namespace.h-fix-compilation-on-Linux-4.10.patch
new file mode 100644
index 0000000000..1b571c4df3
--- /dev/null
+++ b/package/util-linux/0003-namespace.h-fix-compilation-on-Linux-4.10.patch
@@ -0,0 +1,62 @@
+From 8d599aa63191ed327523626ab0c86c828a6d07f6 Mon Sep 17 00:00:00 2001
+From: Thomas Devoogdt <thomas@devoogdt.com>
+Date: Mon, 7 Apr 2025 14:20:12 +0200
+Subject: [PATCH] namespace.h: fix compilation on Linux < 4.10
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+sys-utils/lsns.c: In function ‘add_namespace_from_sock’:
+sys-utils/lsns.c:580:19: error: ‘SIOCGSKNS’ undeclared (first use in this function)
+  nsfd = ioctl(sk, SIOCGSKNS);
+                   ^~~~~~~~~
+
+SIOCGSKNS was added in https://github.com/torvalds/linux/commit/c62cce2caee558e18aa05c01c2fd3b40f07174f2.
+
+Fixes: https://github.com/util-linux/util-linux/issues/3502
+
+Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
+(cherry picked from commit 10ee66ed1b08586bde42582e34355418eef33ef5)
+Upstream: https://github.com/util-linux/util-linux/pull/3506
+Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
+---
+ include/namespace.h | 14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/include/namespace.h b/include/namespace.h
+index 2d0a56e02..d7a078ec1 100644
+--- a/include/namespace.h
++++ b/include/namespace.h
+@@ -3,11 +3,15 @@
+  * No copyright is claimed.  This code is in the public domain; do with
+  * it what you wish.
+  *
+- * Compat code so unshare and setns can be used with older libcs
++ * Compat code to support older libcs.
+  */
+ #ifndef UTIL_LINUX_NAMESPACE_H
+ # define UTIL_LINUX_NAMESPACE_H
+ 
++/*
++ * Compat code for sched.h (unshare and setns)
++ */
++
+ # include <sched.h>
+ 
+ # ifndef CLONE_NEWNS
+@@ -53,4 +57,12 @@ static inline int setns(int fd, int nstype)
+ }
+ # endif
+ 
++/*
++ * Compat code for sockios.h
++ */
++
++# ifndef SIOCGSKNS
++#  define SIOCGSKNS 0x894C
++# endif
++
+ #endif	/* UTIL_LINUX_NAMESPACE_H */
+-- 
+2.43.0
+
diff --git a/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch b/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
deleted file mode 100644
index 19e0697769..0000000000
--- a/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From f540cc6fed7224fb9ca162cb2f33c338260ae1d2 Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 27 Jan 2025 14:11:35 +0100
-Subject: [PATCH] meson: add HAVE_LIBPTHREAD
-
-Upstream: https://github.com/util-linux/util-linux/pull/3383
-Signed-off-by: Karel Zak <kzak@redhat.com>
-Signed-off-by: Julien Olivain <ju.o@free.fr>
----
- meson.build | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/meson.build b/meson.build
-index 6d1f986af..ac5fdd799 100644
---- a/meson.build
-+++ b/meson.build
-@@ -748,6 +748,7 @@ endif
- conf.set('HAVE_CLOCK_GETTIME', have ? 1 : false)
- 
- thread_libs = dependency('threads')
-+conf.set('HAVE_LIBPTHREAD', thread_libs.found() ? 1 : false)
- 
- have = cc.has_function('timer_create')
- if not have
--- 
-2.48.1
-
diff --git a/package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch b/package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
deleted file mode 100644
index 0d90f8aec9..0000000000
--- a/package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From eecaa2c0dda817eba2d493f6ddb42c39cf789fc2 Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 27 Jan 2025 14:28:36 +0100
-Subject: [PATCH] libuuid: support non-cached scenarios (when -lpthread is
- unavailable)
-
-This patch makes the dependence on pthread optional for libuuid. In
-certain cases, such as Buildroot Linux, uClibc-ng, and very low
-resource systems, libpthread may be unavailable.
-
-If libuuid is compiled without pthread, it will not use a local cache
-and will instead request a UUID from uuidd for each call. This may
-result in less efficient performance, but the UUIDs generated will
-still be unique and reliable.
-
-On minimalistic systems, it is highly likely that uuidd will not be
-installed, making this change important for portability and robust
-code.
-
-Upstream: https://github.com/util-linux/util-linux/pull/3383
-Addresses: https://github.com/util-linux/util-linux/pull/3375
-Signed-off-by: Karel Zak <kzak@redhat.com>
-Signed-off-by: Julien Olivain <ju.o@free.fr>
----
- libuuid/src/gen_uuid.c | 18 +++++++++++++++---
- 1 file changed, 15 insertions(+), 3 deletions(-)
-
-diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
-index 69712267f..1ed82b46b 100644
---- a/libuuid/src/gen_uuid.c
-+++ b/libuuid/src/gen_uuid.c
-@@ -80,7 +80,10 @@
- #if defined(__linux__) && defined(HAVE_SYS_SYSCALL_H)
- #include <sys/syscall.h>
- #endif
--#include <pthread.h>
-+#ifdef HAVE_LIBPTHREAD
-+# include <pthread.h>
-+#endif
-+
- #include <signal.h>
- 
- #include "all-io.h"
-@@ -580,8 +583,7 @@ int __uuid_generate_time_cont(uuid_t out, int *num, uint32_t cont_offset)
-  * If neither of these is possible (e.g. because of insufficient permissions), it generates
-  * the UUID anyway, but returns -1. Otherwise, returns 0.
-  */
--
--/* thread local cache for uuidd based requests */
-+#ifdef HAVE_LIBPTHREAD
- THREAD_LOCAL struct {
- 	int		num;
- 	int		cache_size;
-@@ -597,8 +599,10 @@ static void reset_uuidd_cache(void)
- 	memset(&uuidd_cache, 0, sizeof(uuidd_cache));
- 	uuidd_cache.cache_size = CS_MIN;
- }
-+#endif /* HAVE_LIBPTHREAD */
- 
- static int uuid_generate_time_generic(uuid_t out) {
-+#ifdef HAVE_LIBPTHREAD
- 	static volatile sig_atomic_t atfork_registered;
- 	time_t	now;
- 
-@@ -651,6 +655,14 @@ static int uuid_generate_time_generic(uuid_t out) {
- 		return 0;
- 	}
- 
-+#else /* !HAVE_LIBPTHREAD */
-+	{
-+		int num = 1;
-+		if (get_uuid_via_daemon(UUIDD_OP_TIME_UUID, out, &num) == 0)
-+			return 0;
-+	}
-+#endif /* HAVE_LIBPTHREAD */
-+
- 	return __uuid_generate_time(out, NULL);
- }
- 
--- 
-2.48.1
-
diff --git a/package/util-linux/util-linux.hash b/package/util-linux/util-linux.hash
index 317efebcbf..e74aa17c94 100644
--- a/package/util-linux/util-linux.hash
+++ b/package/util-linux/util-linux.hash
@@ -1,10 +1,14 @@
-# From https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.40/sha256sums.asc
-sha256  d78b37a66f5922d70edf3bdfb01a6b33d34ed3c3cafd6628203b2a2b67c8e8b3  util-linux-2.40.2.tar.xz
+# From https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.41/sha256sums.asc
+sha256  81ee93b3cfdfeb7d7c4090cedeba1d7bbce9141fd0b501b686b3fe475ddca4c6  util-linux-2.41.tar.xz
 # License files, locally calculated
-sha256  27f25514040a401b2ceb7057eae1f46cedb1666664b519b5be7e0960d1b35164  README.licensing
+sha256  4c2db318192bda62f3f8fcf71488bb5e602ae4385eba281d711b46cc13a40bb3  README.licensing
+sha256  527f738966ca396cd5a68c1509390de2a780c6b614d9ee57f7544a6161938ed1  Documentation/licenses/COPYING.BSD-2-Clause
 sha256  9b718a9460fed5952466421235bc79eb49d4e9eacc920d7a9dd6285ab8fd6c6d  Documentation/licenses/COPYING.BSD-3-Clause
 sha256  ba7640f00d93e72e92b94b9d71f25ec53bac2f1682f5c4adcccb0018359f60f8  Documentation/licenses/COPYING.BSD-4-Clause-UC
+sha256  6fc9e709ccbfe0d77fbffa2427a983282be2eb88e47b1cdb49f21a83b4d1e665  Documentation/licenses/COPYING.EUPL-1.2
+sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  Documentation/licenses/COPYING.GPL-2.0-only
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  Documentation/licenses/COPYING.GPL-2.0-or-later
+sha256  3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986  Documentation/licenses/COPYING.GPL-3.0-or-later
 sha256  e53348ce276358e9997014071c5294b36a18c4b34f32f00ee57b9acce0aafd63  Documentation/licenses/COPYING.ISC
 sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  Documentation/licenses/COPYING.LGPL-2.1-or-later
 sha256  8555341619542abb48c102afd954e42d4478e5be16ad3d5af7b0ff71009e7348  Documentation/licenses/COPYING.MIT
diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index ed30c0b107..71e458ccc4 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -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.40
-UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).2
+UTIL_LINUX_VERSION_MAJOR = 2.41
+UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR)
 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)
 
@@ -24,18 +24,19 @@ UTIL_LINUX_LICENSE = \
 	ISC (rfkill) \
 	MIT (hardlink, flock)
 UTIL_LINUX_LICENSE_FILES = README.licensing \
+	Documentation/licenses/COPYING.BSD-2-Clause \
 	Documentation/licenses/COPYING.BSD-3-Clause \
 	Documentation/licenses/COPYING.BSD-4-Clause-UC \
+	Documentation/licenses/COPYING.EUPL-1.2 \
+	Documentation/licenses/COPYING.GPL-2.0-only \
 	Documentation/licenses/COPYING.GPL-2.0-or-later \
+	Documentation/licenses/COPYING.GPL-3.0-or-later \
 	Documentation/licenses/COPYING.ISC \
 	Documentation/licenses/COPYING.LGPL-2.1-or-later \
 	Documentation/licenses/COPYING.MIT
 
 UTIL_LINUX_CPE_ID_VENDOR = kernel
 
-# 0001-libmount-ifdef-statx-call.patch
-UTIL_LINUX_AUTORECONF = YES
-
 UTIL_LINUX_INSTALL_STAGING = YES
 UTIL_LINUX_DEPENDENCIES = \
 	host-pkgconf \
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [Buildroot] [PATCH v3] package/util-linux: bump to 2.41
  2025-04-22  7:59                   ` [Buildroot] [PATCH v3] " Thomas Devoogdt
@ 2025-04-22  8:40                     ` Thomas Petazzoni via buildroot
  2025-06-25 14:55                     ` Marcus Hoffmann via buildroot
  2025-06-26 19:47                     ` [Buildroot] [PATCH v4] package/util-linux: bump to 2.41.1 Thomas Devoogdt
  2 siblings, 0 replies; 18+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-04-22  8:40 UTC (permalink / raw)
  To: Thomas Devoogdt; +Cc: buildroot, thomas.devoogdt

On Tue, 22 Apr 2025 07:59:23 +0000
Thomas Devoogdt <thomas@devoogdt.com> wrote:

> From: Thomas Devoogdt <thomas.devoogdt@barco.com>
> 
> News: https://lore.kernel.org/util-linux/2cifsg7vkdiivfsmmximhbzybrsopn7zfqgwz2f6hyflh35pjr@ecyicq2cbsro/
> 
> Dropped patches which are all upstream.
> - https://github.com/util-linux/util-linux/pull/3049
> - https://github.com/util-linux/util-linux/pull/3383
> 
> Added some new patches. (which are also upstream)
> - https://github.com/util-linux/util-linux/pull/3471
> - https://github.com/util-linux/util-linux/pull/3484
> - https://github.com/util-linux/util-linux/pull/3506
> 
> Synced all license files.
> 
> Dropped the AUTORECONF call, since
> 0001-libmount-ifdef-statx-call.patch is upstream.
> 
> Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> ---

Thanks for the new iteration! Perhaps worth nothing, according to our
discussions, applying this would for now cause breakage with Bootlin
toolchains, as util-linux 2.41 will fail to build with uClibc-ng
versions earlier than 1.0.52.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Buildroot] [PATCH v3] package/util-linux: bump to 2.41
  2025-04-22  7:59                   ` [Buildroot] [PATCH v3] " Thomas Devoogdt
  2025-04-22  8:40                     ` Thomas Petazzoni via buildroot
@ 2025-06-25 14:55                     ` Marcus Hoffmann via buildroot
  2025-06-26 19:49                       ` Thomas Devoogdt
  2025-06-26 19:47                     ` [Buildroot] [PATCH v4] package/util-linux: bump to 2.41.1 Thomas Devoogdt
  2 siblings, 1 reply; 18+ messages in thread
From: Marcus Hoffmann via buildroot @ 2025-06-25 14:55 UTC (permalink / raw)
  To: Thomas Devoogdt, buildroot; +Cc: thomas.devoogdt, thomas.petazzoni

Hi, Thomas, Thomas, :)

On 22.04.25 09:59, Thomas Devoogdt wrote:
> From: Thomas Devoogdt <thomas.devoogdt@barco.com>
> 
> News: https://lore.kernel.org/util-linux/2cifsg7vkdiivfsmmximhbzybrsopn7zfqgwz2f6hyflh35pjr@ecyicq2cbsro/
> 
> Dropped patches which are all upstream.
> - https://github.com/util-linux/util-linux/pull/3049
> - https://github.com/util-linux/util-linux/pull/3383
> 
> Added some new patches. (which are also upstream)
> - https://github.com/util-linux/util-linux/pull/3471
> - https://github.com/util-linux/util-linux/pull/3484
> - https://github.com/util-linux/util-linux/pull/3506
> 
> Synced all license files.
> 
> Dropped the AUTORECONF call, since
> 0001-libmount-ifdef-statx-call.patch is upstream.
> 
> Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> ---
> v2:
>   - dropped AUTORECONF
>   - added two compile patches
>     - 0001-misc-never-include-wchar.h.patch
>     - 0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
> v3:
>   - added 0003-namespace.h-fix-compilation-on-Linux-4.10.patch
> ---

I just wanted to note that 2.41.1 has been released yesterday:
https://lore.kernel.org/util-linux/wnfaquaapqknjnu2bdvddkp2xbleowfcr2g3cqiewpl54oclmi@mrseflcu5nyk/T/#u

A new iteration of this could drop all patches now. But that still 
doesn't solve the uclibc bootlin toolchain issue.

Best,
Marcus
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH v4] package/util-linux: bump to 2.41.1
  2025-04-22  7:59                   ` [Buildroot] [PATCH v3] " Thomas Devoogdt
  2025-04-22  8:40                     ` Thomas Petazzoni via buildroot
  2025-06-25 14:55                     ` Marcus Hoffmann via buildroot
@ 2025-06-26 19:47                     ` Thomas Devoogdt
  2025-07-05 17:26                       ` Julien Olivain via buildroot
  2 siblings, 1 reply; 18+ messages in thread
From: Thomas Devoogdt @ 2025-06-26 19:47 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni, Marcus Hoffmann, Thomas Devoogdt

From: Thomas Devoogdt <thomas.devoogdt@barco.com>

News:
- https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.41/v2.41-ReleaseNotes
- https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.41/v2.41.1-ReleaseNotes

Dropped patches which are all upstream.
- https://github.com/util-linux/util-linux/pull/3049
- https://github.com/util-linux/util-linux/pull/3383

Synced all license files.

Dropped the AUTORECONF call, since
0001-libmount-ifdef-statx-call.patch is upstream.

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
---
v2:
 - dropped AUTORECONF
 - added two compile patches
   - 0001-misc-never-include-wchar.h.patch
   - 0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
v3:
 - added 0003-namespace.h-fix-compilation-on-Linux-4.10.patch
v4:
 - dropped
   - 0001-misc-never-include-wchar.h.patch
     (Upstream: https://github.com/util-linux/util-linux/commit/778fbe77eff16fb33b222224275fc329e6435cc2)
   - 0002-lsns-fix-undefined-reference-to-add_namespace_for_ns.patch
     (Upstream: https://github.com/util-linux/util-linux/commit/bd36a077e16eca888d843a0c30e77379aedfe350)
   - 0003-namespace.h-fix-compilation-on-Linux-4.10.patch
     (Upstream: https://github.com/util-linux/util-linux/commit/e28ce84b2ebec03082dd9045e9be18785ec4dbd2)
 - changed release notes in comment
---
 ...ch.c-fix-build-with-uclibc-ng-1.0.39.patch | 39 ---------
 .../0002-c.h-consolidate-THREAD_LOCAL.patch   | 65 ---------------
 ...ine-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch | 47 -----------
 .../0004-meson-add-HAVE_LIBPTHREAD.patch      | 27 ------
 ...non-cached-scenarios-when-lpthread-i.patch | 82 -------------------
 package/util-linux/util-linux.hash            | 10 ++-
 package/util-linux/util-linux.mk              | 11 +--
 7 files changed, 13 insertions(+), 268 deletions(-)
 delete mode 100644 package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
 delete mode 100644 package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
 delete mode 100644 package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
 delete mode 100644 package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
 delete mode 100644 package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch

diff --git a/package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch b/package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
deleted file mode 100644
index 12dd119ef3..0000000000
--- a/package/util-linux/0001-sys-utils-setarch.c-fix-build-with-uclibc-ng-1.0.39.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From beef18da4de87ca5aaadf2beb14187f35cc4f50f Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Date: Wed, 15 May 2024 18:22:11 +0200
-Subject: [PATCH] sys-utils/setarch.c: fix build with uclibc-ng < 1.0.39
-
-Fix the following build failure with uclibc-ng < 1.0.39 (i.e., without
-https://github.com/wbx-github/uclibc-ng/commit/85ac4f04d94e98389a8315e720630d0f95bfdfd6)
-raised since version 2.39 and
-https://github.com/util-linux/util-linux/commit/03a254f010b08da1175f50a8ae7882e59228f1b4:
-
-sys-utils/setarch.c:106:7: error: 'PER_LINUX32_3GB' undeclared here (not in a function); did you mean 'PER_LINUX32'?
-  106 |     X(PER_LINUX32_3GB) \
-      |       ^~~~~~~~~~~~~~~
-
-Fixes:
- - http://autobuild.buildroot.org/results/fb1feb47f2660882fa53f66bacc63e191fd52175
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Upstream: https://github.com/util-linux/util-linux/commit/4647fc6afbf7e99c49531600425df60f1243fcd2
----
- sys-utils/setarch.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
-index 227bc6b5de..4bcb5e69e6 100644
---- a/sys-utils/setarch.c
-+++ b/sys-utils/setarch.c
-@@ -89,6 +89,11 @@
- # define PER_LINUX_FDPIC	(PER_LINUX | FDPIC_FUNCPTRS)
- #endif
- 
-+/* fallback for old uclibc-headers < 1.0.39 */
-+#ifndef PER_LINUX32_3GB
-+# define PER_LINUX32_3GB	(PER_LINUX32 | ADDR_LIMIT_3GB)
-+#endif
-+
- #define ALL_PERSONALITIES \
-     X(PER_LINUX) \
-     X(PER_LINUX_32BIT) \
diff --git a/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch b/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
deleted file mode 100644
index bb1a63ecc2..0000000000
--- a/package/util-linux/0002-c.h-consolidate-THREAD_LOCAL.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 7b3db914fa9073c667ea482c8b6b4e07fe6202cc Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 27 Jan 2025 13:40:23 +0100
-Subject: [PATCH] c.h: consolidate THREAD_LOCAL.
-
-Let's define this macro in one place only.
-
-Upstream: https://github.com/util-linux/util-linux/pull/3383
-Signed-off-by: Karel Zak <kzak@redhat.com>
-Signed-off-by: Julien Olivain <ju.o@free.fr>
----
- include/c.h            | 9 +++++++++
- lib/randutils.c        | 5 -----
- libuuid/src/gen_uuid.c | 1 -
- 3 files changed, 9 insertions(+), 6 deletions(-)
-
-diff --git a/include/c.h b/include/c.h
-index 61b95ab2d..848c48536 100644
---- a/include/c.h
-+++ b/include/c.h
-@@ -595,4 +595,13 @@ static inline void *reallocarray(void *ptr, size_t nmemb, size_t size)
- }
- #endif
- 
-+/*
-+ * thread-local storage
-+ */
-+#ifdef HAVE_TLS
-+# define THREAD_LOCAL static __thread
-+#else
-+# define THREAD_LOCAL static
-+#endif
-+
- #endif /* UTIL_LINUX_C_H */
-diff --git a/lib/randutils.c b/lib/randutils.c
-index 15c2f7834..4c806e682 100644
---- a/lib/randutils.c
-+++ b/lib/randutils.c
-@@ -20,11 +20,6 @@
- #include "randutils.h"
- #include "nls.h"
- 
--#ifdef HAVE_TLS
--#define THREAD_LOCAL static __thread
--#else
--#define THREAD_LOCAL static
--#endif
- 
- #ifdef HAVE_GETRANDOM
- # include <sys/random.h>
-diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
-index 3b76ddc9a..69712267f 100644
---- a/libuuid/src/gen_uuid.c
-+++ b/libuuid/src/gen_uuid.c
-@@ -92,7 +92,6 @@
- #include "md5.h"
- #include "sha1.h"
- 
--#define THREAD_LOCAL static __thread
- 
- #ifdef _WIN32
- static void gettimeofday (struct timeval *tv, void *dummy)
--- 
-2.48.1
-
diff --git a/package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch b/package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
deleted file mode 100644
index 843253a56a..0000000000
--- a/package/util-linux/0003-autotools-define-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 0735eb8bc0ed4bc9820ea7e4e600fed246457b18 Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 27 Jan 2025 14:01:38 +0100
-Subject: [PATCH] autotools: define HAVE_LIBPTHREAD and PTHREAD_LIBS
-
-Upstream: https://github.com/util-linux/util-linux/pull/3383
-Signed-off-by: Karel Zak <kzak@redhat.com>
-Signed-off-by: Julien Olivain <ju.o@free.fr>
----
- configure.ac              | 7 +++++++
- libuuid/src/Makemodule.am | 2 +-
- 2 files changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 82d0e4bf9..9a7f260c5 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -738,6 +738,13 @@ AS_IF([test x"$have_timer" = xno], [
- ])
- 
- 
-+AC_CHECK_LIB([pthread], [pthread_atfork], [
-+	PTHREAD_LIBS="-lpthread"
-+	AC_DEFINE([HAVE_LIBPTHREAD], [1], [Define if libpthred exist])
-+])
-+AC_SUBST([PTHREAD_LIBS])
-+
-+
- AC_CHECK_LIB([rtas], [rtas_get_sysparm], [
- 	RTAS_LIBS="-lrtas"
- 	AC_DEFINE([HAVE_LIBRTAS], [1], [Define if librtas exists])
-diff --git a/libuuid/src/Makemodule.am b/libuuid/src/Makemodule.am
-index 867ad7be5..58b64fe9b 100644
---- a/libuuid/src/Makemodule.am
-+++ b/libuuid/src/Makemodule.am
-@@ -31,7 +31,7 @@ libuuid_la_SOURCES = \
- EXTRA_libuuid_la_DEPENDENCIES = \
- 	libuuid/src/libuuid.sym
- 
--libuuid_la_LIBADD       = $(LDADD) $(SOCKET_LIBS) -lpthread
-+libuuid_la_LIBADD       = $(LDADD) $(SOCKET_LIBS) $(PTHREAD_LIBS)
- 
- libuuid_la_CFLAGS = \
- 	$(AM_CFLAGS) \
--- 
-2.48.1
-
diff --git a/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch b/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
deleted file mode 100644
index 19e0697769..0000000000
--- a/package/util-linux/0004-meson-add-HAVE_LIBPTHREAD.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From f540cc6fed7224fb9ca162cb2f33c338260ae1d2 Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 27 Jan 2025 14:11:35 +0100
-Subject: [PATCH] meson: add HAVE_LIBPTHREAD
-
-Upstream: https://github.com/util-linux/util-linux/pull/3383
-Signed-off-by: Karel Zak <kzak@redhat.com>
-Signed-off-by: Julien Olivain <ju.o@free.fr>
----
- meson.build | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/meson.build b/meson.build
-index 6d1f986af..ac5fdd799 100644
---- a/meson.build
-+++ b/meson.build
-@@ -748,6 +748,7 @@ endif
- conf.set('HAVE_CLOCK_GETTIME', have ? 1 : false)
- 
- thread_libs = dependency('threads')
-+conf.set('HAVE_LIBPTHREAD', thread_libs.found() ? 1 : false)
- 
- have = cc.has_function('timer_create')
- if not have
--- 
-2.48.1
-
diff --git a/package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch b/package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
deleted file mode 100644
index 0d90f8aec9..0000000000
--- a/package/util-linux/0005-libuuid-support-non-cached-scenarios-when-lpthread-i.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From eecaa2c0dda817eba2d493f6ddb42c39cf789fc2 Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 27 Jan 2025 14:28:36 +0100
-Subject: [PATCH] libuuid: support non-cached scenarios (when -lpthread is
- unavailable)
-
-This patch makes the dependence on pthread optional for libuuid. In
-certain cases, such as Buildroot Linux, uClibc-ng, and very low
-resource systems, libpthread may be unavailable.
-
-If libuuid is compiled without pthread, it will not use a local cache
-and will instead request a UUID from uuidd for each call. This may
-result in less efficient performance, but the UUIDs generated will
-still be unique and reliable.
-
-On minimalistic systems, it is highly likely that uuidd will not be
-installed, making this change important for portability and robust
-code.
-
-Upstream: https://github.com/util-linux/util-linux/pull/3383
-Addresses: https://github.com/util-linux/util-linux/pull/3375
-Signed-off-by: Karel Zak <kzak@redhat.com>
-Signed-off-by: Julien Olivain <ju.o@free.fr>
----
- libuuid/src/gen_uuid.c | 18 +++++++++++++++---
- 1 file changed, 15 insertions(+), 3 deletions(-)
-
-diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
-index 69712267f..1ed82b46b 100644
---- a/libuuid/src/gen_uuid.c
-+++ b/libuuid/src/gen_uuid.c
-@@ -80,7 +80,10 @@
- #if defined(__linux__) && defined(HAVE_SYS_SYSCALL_H)
- #include <sys/syscall.h>
- #endif
--#include <pthread.h>
-+#ifdef HAVE_LIBPTHREAD
-+# include <pthread.h>
-+#endif
-+
- #include <signal.h>
- 
- #include "all-io.h"
-@@ -580,8 +583,7 @@ int __uuid_generate_time_cont(uuid_t out, int *num, uint32_t cont_offset)
-  * If neither of these is possible (e.g. because of insufficient permissions), it generates
-  * the UUID anyway, but returns -1. Otherwise, returns 0.
-  */
--
--/* thread local cache for uuidd based requests */
-+#ifdef HAVE_LIBPTHREAD
- THREAD_LOCAL struct {
- 	int		num;
- 	int		cache_size;
-@@ -597,8 +599,10 @@ static void reset_uuidd_cache(void)
- 	memset(&uuidd_cache, 0, sizeof(uuidd_cache));
- 	uuidd_cache.cache_size = CS_MIN;
- }
-+#endif /* HAVE_LIBPTHREAD */
- 
- static int uuid_generate_time_generic(uuid_t out) {
-+#ifdef HAVE_LIBPTHREAD
- 	static volatile sig_atomic_t atfork_registered;
- 	time_t	now;
- 
-@@ -651,6 +655,14 @@ static int uuid_generate_time_generic(uuid_t out) {
- 		return 0;
- 	}
- 
-+#else /* !HAVE_LIBPTHREAD */
-+	{
-+		int num = 1;
-+		if (get_uuid_via_daemon(UUIDD_OP_TIME_UUID, out, &num) == 0)
-+			return 0;
-+	}
-+#endif /* HAVE_LIBPTHREAD */
-+
- 	return __uuid_generate_time(out, NULL);
- }
- 
--- 
-2.48.1
-
diff --git a/package/util-linux/util-linux.hash b/package/util-linux/util-linux.hash
index 317efebcbf..d1c2986ca6 100644
--- a/package/util-linux/util-linux.hash
+++ b/package/util-linux/util-linux.hash
@@ -1,10 +1,14 @@
-# From https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.40/sha256sums.asc
-sha256  d78b37a66f5922d70edf3bdfb01a6b33d34ed3c3cafd6628203b2a2b67c8e8b3  util-linux-2.40.2.tar.xz
+# From https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.41/sha256sums.asc
+sha256  be9ad9a276f4305ab7dd2f5225c8be1ff54352f565ff4dede9628c1aaa7dec57  util-linux-2.41.1.tar.xz
 # License files, locally calculated
-sha256  27f25514040a401b2ceb7057eae1f46cedb1666664b519b5be7e0960d1b35164  README.licensing
+sha256  4c2db318192bda62f3f8fcf71488bb5e602ae4385eba281d711b46cc13a40bb3  README.licensing
+sha256  527f738966ca396cd5a68c1509390de2a780c6b614d9ee57f7544a6161938ed1  Documentation/licenses/COPYING.BSD-2-Clause
 sha256  9b718a9460fed5952466421235bc79eb49d4e9eacc920d7a9dd6285ab8fd6c6d  Documentation/licenses/COPYING.BSD-3-Clause
 sha256  ba7640f00d93e72e92b94b9d71f25ec53bac2f1682f5c4adcccb0018359f60f8  Documentation/licenses/COPYING.BSD-4-Clause-UC
+sha256  6fc9e709ccbfe0d77fbffa2427a983282be2eb88e47b1cdb49f21a83b4d1e665  Documentation/licenses/COPYING.EUPL-1.2
+sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  Documentation/licenses/COPYING.GPL-2.0-only
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  Documentation/licenses/COPYING.GPL-2.0-or-later
+sha256  3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986  Documentation/licenses/COPYING.GPL-3.0-or-later
 sha256  e53348ce276358e9997014071c5294b36a18c4b34f32f00ee57b9acce0aafd63  Documentation/licenses/COPYING.ISC
 sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  Documentation/licenses/COPYING.LGPL-2.1-or-later
 sha256  8555341619542abb48c102afd954e42d4478e5be16ad3d5af7b0ff71009e7348  Documentation/licenses/COPYING.MIT
diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index ed30c0b107..3098a81a72 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -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.40
-UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).2
+UTIL_LINUX_VERSION_MAJOR = 2.41
+UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).1
 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)
 
@@ -24,18 +24,19 @@ UTIL_LINUX_LICENSE = \
 	ISC (rfkill) \
 	MIT (hardlink, flock)
 UTIL_LINUX_LICENSE_FILES = README.licensing \
+	Documentation/licenses/COPYING.BSD-2-Clause \
 	Documentation/licenses/COPYING.BSD-3-Clause \
 	Documentation/licenses/COPYING.BSD-4-Clause-UC \
+	Documentation/licenses/COPYING.EUPL-1.2 \
+	Documentation/licenses/COPYING.GPL-2.0-only \
 	Documentation/licenses/COPYING.GPL-2.0-or-later \
+	Documentation/licenses/COPYING.GPL-3.0-or-later \
 	Documentation/licenses/COPYING.ISC \
 	Documentation/licenses/COPYING.LGPL-2.1-or-later \
 	Documentation/licenses/COPYING.MIT
 
 UTIL_LINUX_CPE_ID_VENDOR = kernel
 
-# 0001-libmount-ifdef-statx-call.patch
-UTIL_LINUX_AUTORECONF = YES
-
 UTIL_LINUX_INSTALL_STAGING = YES
 UTIL_LINUX_DEPENDENCIES = \
 	host-pkgconf \
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [Buildroot] [PATCH v3] package/util-linux: bump to 2.41
  2025-06-25 14:55                     ` Marcus Hoffmann via buildroot
@ 2025-06-26 19:49                       ` Thomas Devoogdt
  0 siblings, 0 replies; 18+ messages in thread
From: Thomas Devoogdt @ 2025-06-26 19:49 UTC (permalink / raw)
  To: Marcus Hoffmann
  Cc: Thomas Devoogdt, buildroot, thomas.devoogdt, thomas.petazzoni

Hi Marcus,


> I just wanted to note that 2.41.1 has been released yesterday:
> https://lore.kernel.org/util-linux/wnfaquaapqknjnu2bdvddkp2xbleowfcr2g3cqiewpl54oclmi@mrseflcu5nyk/T/#u

I just pushed a new patch, see
https://patchwork.ozlabs.org/project/buildroot/patch/20250626194752.144160-1-thomas@devoogdt.com/.


Kind regards,

Thomas Devoogdt
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Buildroot] [PATCH v4] package/util-linux: bump to 2.41.1
  2025-06-26 19:47                     ` [Buildroot] [PATCH v4] package/util-linux: bump to 2.41.1 Thomas Devoogdt
@ 2025-07-05 17:26                       ` Julien Olivain via buildroot
  0 siblings, 0 replies; 18+ messages in thread
From: Julien Olivain via buildroot @ 2025-07-05 17:26 UTC (permalink / raw)
  To: Thomas Devoogdt
  Cc: buildroot, Thomas Petazzoni, Marcus Hoffmann, Thomas Devoogdt

On 26/06/2025 21:47, Thomas Devoogdt wrote:
> From: Thomas Devoogdt <thomas.devoogdt@barco.com>
> 
> News:
> - 
> https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.41/v2.41-ReleaseNotes
> - 
> https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.41/v2.41.1-ReleaseNotes
> 
> Dropped patches which are all upstream.
> - https://github.com/util-linux/util-linux/pull/3049
> - https://github.com/util-linux/util-linux/pull/3383
> 
> Synced all license files.
> 
> Dropped the AUTORECONF call, since
> 0001-libmount-ifdef-statx-call.patch is upstream.
> 
> Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>

Applied to master, thanks.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-07-05 17:26 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-25 10:16 [Buildroot] [PATCH v1] package/util-linux: bump to 2.41 Thomas Devoogdt
2025-03-26 13:24 ` Waldemar Brodkorb
2025-04-02  8:26   ` [Buildroot] [PATCH v2] " Thomas Devoogdt
2025-04-02 10:18     ` Thomas Devoogdt
2025-04-02 11:08     ` Waldemar Brodkorb
2025-04-02 17:08       ` Thomas Devoogdt
2025-04-02 17:40         ` Waldemar Brodkorb
2025-04-02 18:56         ` Waldemar Brodkorb
2025-04-02 20:27           ` Thomas Devoogdt
2025-04-21 21:31             ` Thomas Petazzoni via buildroot
2025-04-22  7:32               ` Thomas Devoogdt
2025-04-22  7:55                 ` Thomas Petazzoni via buildroot
2025-04-22  7:59                   ` [Buildroot] [PATCH v3] " Thomas Devoogdt
2025-04-22  8:40                     ` Thomas Petazzoni via buildroot
2025-06-25 14:55                     ` Marcus Hoffmann via buildroot
2025-06-26 19:49                       ` Thomas Devoogdt
2025-06-26 19:47                     ` [Buildroot] [PATCH v4] package/util-linux: bump to 2.41.1 Thomas Devoogdt
2025-07-05 17:26                       ` Julien Olivain via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox