From 81358f5edddc98b90000373565f3ea1c49089177 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 1 Apr 2026 14:47:29 +0200 Subject: [PATCH 1/3] upgrade to upstream release v2.41.4 --- .gitignore | 1 + ...nore-Wunused-but-set-variable-for-bi.patch | 63 ------------------- ...const-from-blkid_partitions_get_name.patch | 44 ------------- sources | 2 +- util-linux.spec | 7 +-- 5 files changed, 3 insertions(+), 114 deletions(-) delete mode 100644 0003-build-sys-gcc-ignore-Wunused-but-set-variable-for-bi.patch delete mode 100644 0004-blkid-Drop-const-from-blkid_partitions_get_name.patch diff --git a/.gitignore b/.gitignore index 9c2726a..bb0efc1 100644 --- a/.gitignore +++ b/.gitignore @@ -103,3 +103,4 @@ /util-linux-2.41.1.tar.xz /util-linux-2.41.2.tar.xz /util-linux-2.41.3.tar.xz +/util-linux-2.41.4.tar.xz diff --git a/0003-build-sys-gcc-ignore-Wunused-but-set-variable-for-bi.patch b/0003-build-sys-gcc-ignore-Wunused-but-set-variable-for-bi.patch deleted file mode 100644 index 2b48c5a..0000000 --- a/0003-build-sys-gcc-ignore-Wunused-but-set-variable-for-bi.patch +++ /dev/null @@ -1,63 +0,0 @@ -From b3e1a72d0272c8dc26db8c11c61cd4fed6a6b95f Mon Sep 17 00:00:00 2001 -From: Christian Goeschel Ndjomouo -Date: Tue, 6 Jan 2026 10:43:45 -0500 -Subject: build-sys: (gcc) ignore -Wunused-but-set-variable for bison - -[kzak@redhat.com: - merge two Christian's patches to make it more portable] - -Signed-off-by: Christian Goeschel Ndjomouo -Signed-off-by: Karel Zak -(cherry picked from commit db9047892a45c06bceb5768e7bb8c887289b9859) -(cherry picked from commit 718e4a76dd1262ce97f83dbc0c0fe9f97564ecbb) ---- - libsmartcols/src/filter-parser.y | 11 +++++++---- - sys-utils/hwclock-parse-date.y | 11 +++++++---- - 2 files changed, 14 insertions(+), 8 deletions(-) - -diff --git a/libsmartcols/src/filter-parser.y b/libsmartcols/src/filter-parser.y -index a7d41408e..23b05df33 100644 ---- a/libsmartcols/src/filter-parser.y -+++ b/libsmartcols/src/filter-parser.y -@@ -1,9 +1,12 @@ - %{ --#ifdef __clang__ --/* clang detects yynerrs as unused. -- * Will be fixed in future versions of bison. -+/* -+ * Compilers detect yynerrs as unused. Let's hope it will be fixed in future -+ * versions of Bison. - */ --#pragma clang diagnostic ignored "-Wunused-but-set-variable" -+#if defined(__GNUC__) && !defined(__clang__) -+# pragma GCC diagnostic ignored "-Wunused-but-set-variable" -+#elif defined(__clang__) -+# pragma clang diagnostic ignored "-Wunused-but-set-variable" - #endif - - #include -diff --git a/sys-utils/hwclock-parse-date.y b/sys-utils/hwclock-parse-date.y -index 0d996cc87..7d6c38268 100644 ---- a/sys-utils/hwclock-parse-date.y -+++ b/sys-utils/hwclock-parse-date.y -@@ -34,11 +34,14 @@ - * TZ strings in dates. - */ - --#ifdef __clang__ --/* clang 15 detects yynerrs as unused. -- * Will be fixed in future versions of bison. -+/* -+ * Compilers detect yynerrs as unused. Let's hope it will be fixed in future -+ * versions of Bison. - */ --#pragma clang diagnostic ignored "-Wunused-but-set-variable" -+#if defined(__GNUC__) && !defined(__clang__) -+# pragma GCC diagnostic ignored "-Wunused-but-set-variable" -+#elif defined(__clang__) -+# pragma clang diagnostic ignored "-Wunused-but-set-variable" - #endif - - /** --- -2.52.0 - diff --git a/0004-blkid-Drop-const-from-blkid_partitions_get_name.patch b/0004-blkid-Drop-const-from-blkid_partitions_get_name.patch deleted file mode 100644 index 749b7f9..0000000 --- a/0004-blkid-Drop-const-from-blkid_partitions_get_name.patch +++ /dev/null @@ -1,44 +0,0 @@ -From b994886e18307ef3002a63679fba4a6177f476cf Mon Sep 17 00:00:00 2001 -From: Daan De Meyer -Date: Wed, 26 Nov 2025 15:08:25 +0100 -Subject: blkid: Drop const from blkid_partitions_get_name() - -const for idx is useless as the value is copied anyway, so drop the -const. AFAIK this doesn't change ABI. - -(cherry picked from commit b243de928aab8565e264f4af1d776cc860689f64) -(cherry picked from commit 479133958af89a2afda442e158107b465301dfbb) ---- - libblkid/src/blkid.h.in | 2 +- - libblkid/src/partitions/partitions.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libblkid/src/blkid.h.in b/libblkid/src/blkid.h.in -index 91fc3b0be..031650dbc 100644 ---- a/libblkid/src/blkid.h.in -+++ b/libblkid/src/blkid.h.in -@@ -340,7 +340,7 @@ extern uint64_t blkid_topology_get_diskseq(blkid_topology tp) - * partitions probing - */ - extern int blkid_known_pttype(const char *pttype); --extern int blkid_partitions_get_name(const size_t idx, const char **name); -+extern int blkid_partitions_get_name(size_t idx, const char **name); - - extern int blkid_probe_enable_partitions(blkid_probe pr, int enable) - __ul_attribute__((nonnull)); -diff --git a/libblkid/src/partitions/partitions.c b/libblkid/src/partitions/partitions.c -index 9df813c92..e838b3db1 100644 ---- a/libblkid/src/partitions/partitions.c -+++ b/libblkid/src/partitions/partitions.c -@@ -907,7 +907,7 @@ int blkid_known_pttype(const char *pttype) - * - * Returns: -1 if @idx is out of range, or 0 on success. - */ --int blkid_partitions_get_name(const size_t idx, const char **name) -+int blkid_partitions_get_name(size_t idx, const char **name) - { - if (idx < ARRAY_SIZE(idinfos)) { - *name = idinfos[idx]->name; --- -2.52.0 - diff --git a/sources b/sources index 96ed8d3..0e6509d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.41.3.tar.xz) = 3d299f0e05a4c982a04dbcbaaeff1222152feedf51c56c5dbdeb75999c68269d652a994f5cdf4c1ee42bb7b28475dd0792192c299fd9bc3b45198c5b153dad00 +SHA512 (util-linux-2.41.4.tar.xz) = c21ad77b787ab5892169c80cbec1ba46ed6bba36c1db278f2d1cd8712ae237f5cd25bfd20f2dc638334d1c47c5ff6102703147147d42f71c995bd397e735691a diff --git a/util-linux.spec b/util-linux.spec index f1f58a4..4fb9276 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,7 +1,7 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.41.3 +Version: 2.41.4 # -p -e rc1 Release: %autorelease -b7 License: GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain @@ -110,11 +110,6 @@ Patch1: 0001-login-add-run-motd.d-to-the-hardcoded-MOTD_FILE.patch ### Temporary dracut workaround Patch2: 0002-libmount-disable-EROFS-backing-file-support.patch -# Upstream backports -Patch3: 0003-build-sys-gcc-ignore-Wunused-but-set-variable-for-bi.patch -Patch4: 0004-blkid-Drop-const-from-blkid_partitions_get_name.patch - - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among From 83269f896e0d78b8d2d3e15e7d1eb94eb20085f8 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 20 May 2026 10:47:01 +0200 Subject: [PATCH 2/3] backport lastlog2 fixes from upstream - fix pam_lastlog2 libpam linking (rhbz#2453457) - wait on busy SQLite connections (rhbz#2419509) --- ...ix-libpam-linking-in-autotools-build.patch | 35 +++++++++ ...log2-wait-on-busy-SQLite-connections.patch | 74 +++++++++++++++++++ util-linux.spec | 4 + 3 files changed, 113 insertions(+) create mode 100644 0003-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch create mode 100644 0004-liblastlog2-wait-on-busy-SQLite-connections.patch diff --git a/0003-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch b/0003-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch new file mode 100644 index 0000000..27cdc74 --- /dev/null +++ b/0003-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch @@ -0,0 +1,35 @@ +From c8d0af0421f6491ab1cb2301d2e197315289d34c Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 19 May 2026 10:54:57 +0200 +Subject: [PATCH] pam_lastlog2: fix libpam linking in autotools build + +Add -lpam to LIBADD. Without it pam_lastlog2.so is missing libpam.so +in its ELF NEEDED entries and fails to load with dlopen() if the +calling process does not itself link against libpam (e.g., systemd +in Fedora 44+): + + PAM unable to dlopen(pam_lastlog2.so): undefined symbol: pam_syslog + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2453457 +Signed-off-by: Karel Zak +(cherry picked from commit 5683ed6320e00205146cbb3d0c76462733530eca) +--- + Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 1234567..abcdefg 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -7439,7 +7439,7 @@ + @BUILD_PAM_LASTLOG2_TRUE@ $(SOLIB_CFLAGS) \ + @BUILD_PAM_LASTLOG2_TRUE@ -I$(ul_liblastlog2_incdir) + +-@BUILD_PAM_LASTLOG2_TRUE@pam_lastlog2_la_LIBADD = liblastlog2.la ++@BUILD_PAM_LASTLOG2_TRUE@pam_lastlog2_la_LIBADD = liblastlog2.la -lpam + @BUILD_PAM_LASTLOG2_TRUE@pam_lastlog2_la_LDFLAGS = $(SOLIB_LDFLAGS) \ + @BUILD_PAM_LASTLOG2_TRUE@ -module -avoid-version -shared \ + @BUILD_PAM_LASTLOG2_TRUE@ $(am__append_608) +-- +2.52.0 + diff --git a/0004-liblastlog2-wait-on-busy-SQLite-connections.patch b/0004-liblastlog2-wait-on-busy-SQLite-connections.patch new file mode 100644 index 0000000..eff2b10 --- /dev/null +++ b/0004-liblastlog2-wait-on-busy-SQLite-connections.patch @@ -0,0 +1,74 @@ +From 1e4b0ec69d4a017436278a204b27224a8e07fd9e Mon Sep 17 00:00:00 2001 +From: WanBingjiang +Date: Mon, 30 Mar 2026 16:28:24 +0800 +Subject: [PATCH] liblastlog2: wait on busy SQLite connections + +Avoiding 'SQL error: database is locked' when lastlog2 writes lastlog2 +databese. + +Addresses: https://github.com/util-linux/util-linux/issues/4157 +Signed-off-by: WanBingjiang +(cherry picked from commit fff8c59c75355d365a69f86719e7bd7818c1daf4) +--- + liblastlog2/src/lastlog2.c | 31 +++++++++++++++++++++++++++++++ + 1 file changed, 31 insertions(+) + +diff --git a/liblastlog2/src/lastlog2.c b/liblastlog2/src/lastlog2.c +index f285dddb4..ce1c6c68a 100644 +--- a/liblastlog2/src/lastlog2.c ++++ b/liblastlog2/src/lastlog2.c +@@ -39,6 +39,23 @@ + #include "lastlog2P.h" + #include "strutils.h" + ++#define LASTLOG2_BUSY_TIMEOUT 3000 ++ ++static int ++set_busy_timeout(sqlite3 *db, const char *path, char **error) ++{ ++ int ret = 0; ++ ++ if (sqlite3_busy_timeout(db, LASTLOG2_BUSY_TIMEOUT) != SQLITE_OK) { ++ ret = -1; ++ if (error && asprintf(error, "Cannot set busy timeout (%s): %s", ++ path, sqlite3_errmsg(db)) < 0) ++ ret = -ENOMEM; ++ } ++ ++ return ret; ++} ++ + /* Sets the ll2 context/environment. */ + /* Returns the context or NULL if an error has happened. */ + extern struct ll2_context * ll2_new_context(const char *db_path) +@@ -87,6 +104,13 @@ open_database_ro(struct ll2_context *context, sqlite3 **db, char **error) + ret = -ENOMEM; + + sqlite3_close(*db); ++ return ret; ++ } ++ ++ ret = set_busy_timeout(*db, path, error); ++ if (ret != 0) { ++ sqlite3_close(*db); ++ return ret; + } + + return ret; +@@ -110,6 +134,13 @@ open_database_rw(struct ll2_context *context, sqlite3 **db, char **error) + ret = -ENOMEM; + + sqlite3_close(*db); ++ return ret; ++ } ++ ++ ret = set_busy_timeout(*db, path, error); ++ if (ret != 0) { ++ sqlite3_close(*db); ++ return ret; + } + + return ret; +-- +2.52.0 + diff --git a/util-linux.spec b/util-linux.spec index 4fb9276..51ee390 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -110,6 +110,10 @@ Patch1: 0001-login-add-run-motd.d-to-the-hardcoded-MOTD_FILE.patch ### Temporary dracut workaround Patch2: 0002-libmount-disable-EROFS-backing-file-support.patch +### Backported fixes +Patch3: 0003-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch +Patch4: 0004-liblastlog2-wait-on-busy-SQLite-connections.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among From 4689efd541f651ca293fb6b59b0883b34d351779 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 16 Jun 2026 15:08:47 +0200 Subject: [PATCH 3/3] upgrade to upstream release v2.41.5 --- .gitignore | 1 + ...ix-libpam-linking-in-autotools-build.patch | 35 --------- ...log2-wait-on-busy-SQLite-connections.patch | 74 ------------------- sources | 2 +- util-linux.spec | 7 +- 5 files changed, 4 insertions(+), 115 deletions(-) delete mode 100644 0003-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch delete mode 100644 0004-liblastlog2-wait-on-busy-SQLite-connections.patch diff --git a/.gitignore b/.gitignore index bb0efc1..df1391b 100644 --- a/.gitignore +++ b/.gitignore @@ -104,3 +104,4 @@ /util-linux-2.41.2.tar.xz /util-linux-2.41.3.tar.xz /util-linux-2.41.4.tar.xz +/util-linux-2.41.5.tar.xz diff --git a/0003-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch b/0003-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch deleted file mode 100644 index 27cdc74..0000000 --- a/0003-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch +++ /dev/null @@ -1,35 +0,0 @@ -From c8d0af0421f6491ab1cb2301d2e197315289d34c Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 19 May 2026 10:54:57 +0200 -Subject: [PATCH] pam_lastlog2: fix libpam linking in autotools build - -Add -lpam to LIBADD. Without it pam_lastlog2.so is missing libpam.so -in its ELF NEEDED entries and fails to load with dlopen() if the -calling process does not itself link against libpam (e.g., systemd -in Fedora 44+): - - PAM unable to dlopen(pam_lastlog2.so): undefined symbol: pam_syslog - -Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2453457 -Signed-off-by: Karel Zak -(cherry picked from commit 5683ed6320e00205146cbb3d0c76462733530eca) ---- - Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile.in b/Makefile.in -index 1234567..abcdefg 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -7439,7 +7439,7 @@ - @BUILD_PAM_LASTLOG2_TRUE@ $(SOLIB_CFLAGS) \ - @BUILD_PAM_LASTLOG2_TRUE@ -I$(ul_liblastlog2_incdir) - --@BUILD_PAM_LASTLOG2_TRUE@pam_lastlog2_la_LIBADD = liblastlog2.la -+@BUILD_PAM_LASTLOG2_TRUE@pam_lastlog2_la_LIBADD = liblastlog2.la -lpam - @BUILD_PAM_LASTLOG2_TRUE@pam_lastlog2_la_LDFLAGS = $(SOLIB_LDFLAGS) \ - @BUILD_PAM_LASTLOG2_TRUE@ -module -avoid-version -shared \ - @BUILD_PAM_LASTLOG2_TRUE@ $(am__append_608) --- -2.52.0 - diff --git a/0004-liblastlog2-wait-on-busy-SQLite-connections.patch b/0004-liblastlog2-wait-on-busy-SQLite-connections.patch deleted file mode 100644 index eff2b10..0000000 --- a/0004-liblastlog2-wait-on-busy-SQLite-connections.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 1e4b0ec69d4a017436278a204b27224a8e07fd9e Mon Sep 17 00:00:00 2001 -From: WanBingjiang -Date: Mon, 30 Mar 2026 16:28:24 +0800 -Subject: [PATCH] liblastlog2: wait on busy SQLite connections - -Avoiding 'SQL error: database is locked' when lastlog2 writes lastlog2 -databese. - -Addresses: https://github.com/util-linux/util-linux/issues/4157 -Signed-off-by: WanBingjiang -(cherry picked from commit fff8c59c75355d365a69f86719e7bd7818c1daf4) ---- - liblastlog2/src/lastlog2.c | 31 +++++++++++++++++++++++++++++++ - 1 file changed, 31 insertions(+) - -diff --git a/liblastlog2/src/lastlog2.c b/liblastlog2/src/lastlog2.c -index f285dddb4..ce1c6c68a 100644 ---- a/liblastlog2/src/lastlog2.c -+++ b/liblastlog2/src/lastlog2.c -@@ -39,6 +39,23 @@ - #include "lastlog2P.h" - #include "strutils.h" - -+#define LASTLOG2_BUSY_TIMEOUT 3000 -+ -+static int -+set_busy_timeout(sqlite3 *db, const char *path, char **error) -+{ -+ int ret = 0; -+ -+ if (sqlite3_busy_timeout(db, LASTLOG2_BUSY_TIMEOUT) != SQLITE_OK) { -+ ret = -1; -+ if (error && asprintf(error, "Cannot set busy timeout (%s): %s", -+ path, sqlite3_errmsg(db)) < 0) -+ ret = -ENOMEM; -+ } -+ -+ return ret; -+} -+ - /* Sets the ll2 context/environment. */ - /* Returns the context or NULL if an error has happened. */ - extern struct ll2_context * ll2_new_context(const char *db_path) -@@ -87,6 +104,13 @@ open_database_ro(struct ll2_context *context, sqlite3 **db, char **error) - ret = -ENOMEM; - - sqlite3_close(*db); -+ return ret; -+ } -+ -+ ret = set_busy_timeout(*db, path, error); -+ if (ret != 0) { -+ sqlite3_close(*db); -+ return ret; - } - - return ret; -@@ -110,6 +134,13 @@ open_database_rw(struct ll2_context *context, sqlite3 **db, char **error) - ret = -ENOMEM; - - sqlite3_close(*db); -+ return ret; -+ } -+ -+ ret = set_busy_timeout(*db, path, error); -+ if (ret != 0) { -+ sqlite3_close(*db); -+ return ret; - } - - return ret; --- -2.52.0 - diff --git a/sources b/sources index 0e6509d..bfafc86 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.41.4.tar.xz) = c21ad77b787ab5892169c80cbec1ba46ed6bba36c1db278f2d1cd8712ae237f5cd25bfd20f2dc638334d1c47c5ff6102703147147d42f71c995bd397e735691a +SHA512 (util-linux-2.41.5.tar.xz) = 25e7e79e0f0a4711a15c16db05357755536cf4dc9c0ee28447d95f9bfc135f23075d434e107269a65148a8c16b37755e913aacbaec03a3bdce171a9e0a46bfe8 diff --git a/util-linux.spec b/util-linux.spec index 51ee390..2a7bb7f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,9 +1,9 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.41.4 +Version: 2.41.5 # -p -e rc1 -Release: %autorelease -b7 +Release: %autorelease License: GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -110,9 +110,6 @@ Patch1: 0001-login-add-run-motd.d-to-the-hardcoded-MOTD_FILE.patch ### Temporary dracut workaround Patch2: 0002-libmount-disable-EROFS-backing-file-support.patch -### Backported fixes -Patch3: 0003-pam_lastlog2-fix-libpam-linking-in-autotools-build.patch -Patch4: 0004-liblastlog2-wait-on-busy-SQLite-connections.patch %description The util-linux package contains a large variety of low-level system