Changes between v2.42-rc1 and v2.42-rc2 -------------------------------------------- commit 5c846029aa65b3c8f9f7fbd9fd1db06517505166 Author: Karel Zak Date: Tue Mar 24 12:12:39 2026 +0100 build-sys: update release dates Signed-off-by: Karel Zak NEWS | 2 +- configure.ac | 2 +- meson.build | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit abc52a6df8aa2f26f9eb71cece58310375107e2d Author: Karel Zak Date: Tue Mar 24 12:12:12 2026 +0100 docs: update v2.42-ReleaseNotes Documentation/releases/v2.42-ReleaseNotes | 126 ++++++++++++++++++++++++++++-- 1 file changed, 121 insertions(+), 5 deletions(-) commit 6d9b6be41daae104cd48fd248fd695e5230b6669 Author: Karel Zak Date: Tue Mar 24 11:53:17 2026 +0100 po: merge changes po/ar.po | 1303 ++++++++++++++++++++++++------------------------ po/ca.po | 1296 ++++++++++++++++++++++++------------------------ po/cs.po | 1313 +++++++++++++++++++++++++------------------------ po/da.po | 1305 ++++++++++++++++++++++++------------------------ po/de.po | 1303 ++++++++++++++++++++++++------------------------ po/es.po | 1303 ++++++++++++++++++++++++------------------------ po/et.po | 1346 +++++++++++++++++++++++++------------------------- po/eu.po | 1346 +++++++++++++++++++++++++------------------------- po/fi.po | 1406 ++++++++++++++++++++++++++-------------------------- po/fr.po | 1311 +++++++++++++++++++++++++------------------------ po/gl.po | 1339 +++++++++++++++++++++++++------------------------- po/hr.po | 1303 ++++++++++++++++++++++++------------------------ po/hu.po | 1352 +++++++++++++++++++++++++------------------------- po/id.po | 1416 +++++++++++++++++++++++++++-------------------------- po/it.po | 1404 ++++++++++++++++++++++++++-------------------------- po/ja.po | 1313 +++++++++++++++++++++++++------------------------ po/ka.po | 1315 +++++++++++++++++++++++++------------------------ po/ko.po | 1310 +++++++++++++++++++++++++------------------------ po/nl.po | 1303 ++++++++++++++++++++++++------------------------ po/pl.po | 1303 ++++++++++++++++++++++++------------------------ po/pt.po | 1310 +++++++++++++++++++++++++------------------------ po/pt_BR.po | 1310 +++++++++++++++++++++++++------------------------ po/ro.po | 1318 +++++++++++++++++++++++++------------------------ po/ru.po | 1306 ++++++++++++++++++++++++------------------------ po/sk.po | 1319 +++++++++++++++++++++++++------------------------ po/sl.po | 1416 +++++++++++++++++++++++++++-------------------------- po/sr.po | 1331 +++++++++++++++++++++++++------------------------ po/sv.po | 1313 +++++++++++++++++++++++++------------------------ po/tr.po | 1309 +++++++++++++++++++++++++------------------------ po/uk.po | 1310 +++++++++++++++++++++++++------------------------ po/util-linux.pot | 1281 ++++++++++++++++++++++++------------------------ po/vi.po | 1306 ++++++++++++++++++++++++------------------------ po/zh_CN.po | 1316 +++++++++++++++++++++++++------------------------ po/zh_TW.po | 1416 +++++++++++++++++++++++++++-------------------------- 34 files changed, 23013 insertions(+), 22138 deletions(-) commit da98f5d1748279da3cb0cde886b89d4b890d53f6 Author: Karel Zak Date: Tue Mar 24 11:53:06 2026 +0100 po-man: merge changes po-man/cs.po | 4488 ++++++++++++++++++++++--------------------- po-man/de.po | 4584 +++++++++++++++++++++++--------------------- po-man/es.po | 4537 ++++++++++++++++++++++---------------------- po-man/fr.po | 4558 +++++++++++++++++++++++--------------------- po-man/ko.po | 4552 ++++++++++++++++++++++---------------------- po-man/pl.po | 4601 +++++++++++++++++++++++--------------------- po-man/pt_BR.po | 4613 +++++++++++++++++++++++---------------------- po-man/ro.po | 4583 +++++++++++++++++++++++--------------------- po-man/sr.po | 4596 +++++++++++++++++++++++--------------------- po-man/uk.po | 4601 +++++++++++++++++++++++--------------------- po-man/util-linux-man.pot | 4509 ++++++++++++++++++++++---------------------- 11 files changed, 26046 insertions(+), 24176 deletions(-) commit 4abae1c946738cb9b924502dc81a9628ae1a2882 Author: Karel Zak Date: Tue Mar 24 11:28:40 2026 +0100 tools: git-version-next fix -devel tag and rename variables Fix UL_LAST_FINAL_RELEASE to not match -devel tags by using a positive match for final release formats (vX.Y or vX.Y.Z) instead of only excluding -rc suffixes. Rename variables to use consistent UL_RELEASE_ prefix: - UL_LAST_RELEASE -> UL_RELEASE_LAST - UL_LAST_FINAL_RELEASE -> UL_RELEASE_LAST_STABLE - UL_LAST_XY_RELEASE -> UL_RELEASE_LAST_XY - UL_NEXT_RELEASE -> UL_RELEASE_NEXT - UL_NEXT_FINAL_RELEASE -> UL_RELEASE_NEXT_STABLE Add UL_RELEASE_NEXT_XY (vX.Y of the next release) for use in download URLs and announcements. tools/git-version-next | 47 +++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 22 deletions(-) commit 8213095043592f08268f5a12a530f85880f96ae8 Author: Karel Zak Date: Tue Mar 24 10:23:01 2026 +0100 libblkid: fix stale comment in version.c Signed-off-by: Karel Zak (cherry picked from commit b18fb00751c4719470ac9cf1d89e2bad60ed451b) libblkid/src/version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe00f35fa48a4297fde9c8f5118f5d4f4bb0eebb Author: Karel Zak Date: Thu Mar 19 21:06:30 2026 +0100 meson: remove unused HAVE_LIBFDISK and HAVE_LIBSMARTCOLS defines These config.h defines are never used in source code or anywhere else in the project. Signed-off-by: Karel Zak (cherry picked from commit 2c2ba7ffe39c697b8c3097ad4da0f794edf55840) meson.build | 2 -- 1 file changed, 2 deletions(-) commit ec1bf0faa3b19aa6f3b25e0e4e0bebb449934b58 Author: Karel Zak Date: Thu Mar 19 20:53:41 2026 +0100 liblastlog2: generate lastlog2.h from template Convert lastlog2.h to lastlog2.h.in and add LIBLASTLOG2_VERSION, LIBLASTLOG2_MAJOR_VERSION, LIBLASTLOG2_MINOR_VERSION, and LIBLASTLOG2_PATCH_VERSION defines to follow the same pattern as libmount, libfdisk, libsmartcols, and libblkid. Update both autotools (configure.ac, Makemodule.am) and meson (liblastlog2/meson.build) to generate the header. Signed-off-by: Karel Zak (cherry picked from commit 98a935e7d97d033869423e7edb2c8bf381d8ade9) Makefile.am | 2 +- configure.ac | 4 ++++ liblastlog2/meson.build | 20 ++++++++++++++++---- liblastlog2/src/.gitignore | 1 + liblastlog2/src/Makemodule.am | 4 ++-- liblastlog2/src/{lastlog2.h => lastlog2.h.in} | 5 +++++ 6 files changed, 29 insertions(+), 7 deletions(-) commit 3a194a237bab52b6dbc6f5c196fd3b24f238901b Author: Karel Zak Date: Thu Mar 19 14:20:40 2026 +0100 libblkid: add LIBBLKID_VERSION to blkid.h, remove redundant config.h versions Add LIBBLKID_VERSION, LIBBLKID_MAJOR_VERSION, LIBBLKID_MINOR_VERSION, and LIBBLKID_PATCH_VERSION to blkid.h.in to follow the same pattern as libmount, libfdisk, and libsmartcols. Keep BLKID_VERSION and BLKID_DATE as backward-compatible aliases. Remove redundant AC_DEFINE for library version strings from configure.ac (LIBMOUNT_VERSION, LIBSMARTCOLS_VERSION, LIBFDISK_VERSION, LIBLASTLOG2_VERSION). These were duplicated in config.h when the library public headers already define them via .h.in templates. Remove LIBBLKID_VERSION and LIBBLKID_DATE from meson config.h for the same reason. Signed-off-by: Karel Zak (cherry picked from commit 6468f1f50168b93e33f645a31023f0e59825317e) configure.ac | 9 +++------ libblkid/meson.build | 3 +++ libblkid/src/blkid.h.in | 11 +++++++++-- meson.build | 3 --- 4 files changed, 15 insertions(+), 11 deletions(-) commit 8eaffcdf6ab1a2a1a06590de7df1a42b3f57a24c Author: Karel Zak Date: Thu Mar 19 13:30:22 2026 +0100 meson: remove unused HAVE_NCURSES config define No source code uses HAVE_NCURSES (without _W or _H suffix). In autotools it only exists as an AM_CONDITIONAL for Makefile logic, not as a config.h define. Signed-off-by: Karel Zak (cherry picked from commit 2b0baa966988d74917ab30758a6e906da520318b) meson.build | 1 - 1 file changed, 1 deletion(-) commit 940e9bbdffb3550d326d7208d240f99e0a02ebd3 Author: Karel Zak Date: Thu Mar 19 13:44:16 2026 +0100 meson: add hwclock-gplv3 option Add the missing hwclock-gplv3 option (default: true) to match autotools --disable-hwclock-gplv3. Without the USE_HWCLOCK_GPLv3_DATETIME define, meson builds used the minimalistic GPLv2 date parser even though the GPLv3 parse-date.y was always compiled and linked. Signed-off-by: Karel Zak (cherry picked from commit 7a5ab62b82a92e540399dd3f6be3f85c241d2921) meson.build | 3 +++ meson_options.txt | 3 +++ 2 files changed, 6 insertions(+) commit 00a393c6180cc431d4a683c584d7dc0d24b818c9 Author: Karel Zak Date: Thu Mar 19 13:41:56 2026 +0100 meson: add login-stat-mail option Add the missing login-stat-mail option (default: false) to match autotools --enable-login-stat-mail. When enabled, login will stat() the mailbox to check for new mail. Signed-off-by: Karel Zak (cherry picked from commit afc4062f39cff730cc133ec1ff8450ec25886e2e) meson.build | 4 ++++ meson_options.txt | 3 +++ 2 files changed, 7 insertions(+) commit 351352ba60a091f69caf633bb72f03b1604ebf28 Author: Karel Zak Date: Thu Mar 19 13:39:52 2026 +0100 meson: add check for security_get_initial_context() The mount command uses HAVE_SECURITY_GET_INITIAL_CONTEXT to enable SELinux context warnings. This check was missing in meson, leaving that code path dead in meson builds. Autotools checks for this function in configure.ac since it may be missing in old libselinux 1.xx versions. Signed-off-by: Karel Zak (cherry picked from commit fadcbe54ba67ffe3530aa27f476578d6e9212894) meson.build | 5 +++++ 1 file changed, 5 insertions(+) commit 2d9283cfb58c966f9742963655630f70c302a91a Author: Karel Zak Date: Thu Mar 19 13:21:31 2026 +0100 meson: fix plymouth support macro name The source code (agetty.c, sulogin.c) checks for USE_PLYMOUTH_SUPPORT, but meson defined ENABLE_PLYMOUTH_SUPPORT, silently disabling plymouth support in meson builds. Rename to USE_PLYMOUTH_SUPPORT to match autotools and source code. Signed-off-by: Karel Zak (cherry picked from commit efe5560e0a1b06c5ba6425367bc283516a3bcfbb) meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba8c796fe7d0cca2aed847f82344907fe29b66bc Author: Karel Zak Date: Thu Mar 19 13:21:01 2026 +0100 meson: use explicit values for curses/slang config defines Use 'found() ? 1 : false' instead of bare 'found()' to generate '#define HAVE_xxx 1' rather than '#define HAVE_xxx', consistent with autotools. Signed-off-by: Karel Zak (cherry picked from commit 925c23a6bc9061d7b6af3a6085c52ec89f9a58b7) meson.build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 90168ec92b90d847f12986ed930be9b17c866ff7 Author: Tobias Stoeckmann Date: Tue Mar 24 09:11:45 2026 +0100 login: Clean up PAM resources in correct order Close the session first, then remove the credentials. This keeps the proper order since credentials are set up first, then the session is opened. Also, this brings login's cleanup into the same order as su. Signed-off-by: Tobias Stoeckmann (cherry picked from commit 28fcbb65b75fa99d2b93a58d7937f933de769eea) login-utils/login.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 230bb02381fd7323f08ad234d873cea71cebf064 Author: Karel Zak Date: Mon Mar 23 12:13:11 2026 +0100 pwdutils: extend ul_getuserpw_str() and ul_getgrp_str() to return ID Add an optional result parameter to ul_getuserpw_str() and ul_getgrp_str() to return the parsed UID/GID even when getpwuid() or getgrgid() returns NULL (i.e., the numeric ID has no entry in the passwd/group database). This avoids the need for callers to re-parse the string when they only need the numeric ID. Also zero errno before calling getpwnam()/getgrnam() to prevent stale errno from the preceding ul_strtou64() call from leaking to callers. This fixes unshare --map-user/--map-group regression introduced in commit 0a7fb8061 where a valid numeric UID/GID without a passwd/group entry would cause a failure instead of being used directly. Addresses: https://github.com/util-linux/util-linux/pull/4134 Signed-off-by: Karel Zak (cherry picked from commit 25105842c427f08434339bd59e4e521e4c7b0601) include/pwdutils.h | 4 ++-- lib/pwdutils.c | 56 ++++++++++++++++++++++++++++++++++++------------- login-utils/chfn.c | 2 +- login-utils/login.c | 4 ++-- login-utils/su-common.c | 4 ++-- sys-utils/unshare.c | 14 ++++++------- 6 files changed, 55 insertions(+), 29 deletions(-) commit 89c920a270ac866c66973210c2798c962963f9ce Author: Tobias Stoeckmann Date: Sun Mar 22 16:47:46 2026 +0100 meson: Fix build warnings Remove unused variables, which fixes analyzer warnings. Signed-off-by: Tobias Stoeckmann (cherry picked from commit d6e62072d83d40f7f03f69c6c271028310a6e6b3) meson.build | 1 - pam_lastlog2/meson.build | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) commit 3c48261964ed0f0b078a71f00ccd6fe7c0736efe Author: Tobias Stoeckmann Date: Sun Mar 22 16:45:00 2026 +0100 meson: Install missing manual pages The manual pages for copyfilerange, mkfs.cramfs, and mkfs.minix are not installed with meson, but with autotools. Add them to meson files as well. Signed-off-by: Tobias Stoeckmann (cherry picked from commit cbbc8700c98879a73f4a0bbcdbf45f610de7fd19) disk-utils/meson.build | 1 + meson.build | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit dcfffbce5df063787b118c26df06cbc163d6943e Author: Tobias Stoeckmann Date: Sun Mar 22 16:43:07 2026 +0100 liblastlog2: Install missing manual pages The manual pages ll2_new_context.3 and ll2_unref_context.3 were never installed. Add them to autools and meson files. Signed-off-by: Tobias Stoeckmann (cherry picked from commit 81d6ee96fd01ab4e71cca8a8a599cc5b78cb890f) liblastlog2/man/Makemodule.am | 4 ++++ liblastlog2/man/meson.build | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) commit e6ef5928a3f29710b6e506088928905693676b9c Author: David Timber Date: Fri Mar 20 11:30:52 2026 +0900 fallocate: give up when SEEK_HOLE/DATA misbehaves There's a bug in Linux kernel that renders fallocate in an infinite loop. drivers/char/mem.c: static loff_t null_lseek(struct file *file, loff_t offset, int orig) { return file->f_pos = 0; } This is caused by lseek() of /dev/null and /dev/zero always returning 0 regardless of whence. If fallocate is run on /dev/zero or /dev/null with the option -d or -z, the length to skip in the main loop logic in dig_holes() is always calculated as zero. A conforming VFS never behaves like this so it's safe to assume that the SEEK_DATA and SEEK_HOLE behaviour is broken. Signed-off-by: David Timber (cherry picked from commit fcd142c3a72a357c73222f59816135844a97478e) sys-utils/fallocate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a39a05dcd47238bcd6b684a064219ae30604b87d Author: Karel Zak Date: Wed Mar 18 14:10:53 2026 +0100 gitignore: replace CLAUDE.md with .claude/ directory Signed-off-by: Karel Zak (cherry picked from commit 75cedd36965a59e85077bf42618b85167d8ae754) .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13b6113d8d7efc532cf01348fbf6c973f65f4716 Author: Karel Zak Date: Thu Mar 12 13:26:47 2026 +0100 dmesg: rename is_time_fmt_set() to is_time_fmt() Shorten the function name for consistency with the other time format helpers (include_time_fmt, exclude_time_fmt, replace_time_fmt). No functional change. Signed-off-by: Karel Zak (cherry picked from commit 5d02d91509a50649e31a505da5b11b9e2bfffb01) sys-utils/dmesg.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 33972e5ce3eb6a15b9d6e2f281a1d118719e2742 Author: Karel Zak Date: Thu Mar 12 13:22:55 2026 +0100 dmesg: warn on boot time failure instead of suppressing timestamps When dmesg_get_boot_time() fails, warn the user instead of silently adding DMESG_TIMEFTM_NONE to suppress all timestamp output. The user asked for a specific format and should get it, with a warning that wall-clock timestamps may be inaccurate. Also move the boot time check after the time format post-processing so it operates on the final resolved format list, and add DMESG_TIMEFTM_CTIME_DELTA to the condition since it also requires boot time. Signed-off-by: Karel Zak (cherry picked from commit 7b35816ab92e2ea01fb334199165bb6b7b9d09a2) sys-utils/dmesg.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit 32b020bb915f301b4f05ad96f63cec7d7224b4c9 Author: Karel Zak Date: Thu Mar 12 13:04:35 2026 +0100 dmesg: add replace_time_fmt() and replace_delta_fmt() helpers Introduce replace_time_fmt() to replace one time format with another in the format list, and replace_delta_fmt() which combines exclude_time_fmt() + replace_time_fmt() into a single call. This deduplicates the for-loop pattern repeated in the delta merging post-processing. Signed-off-by: Karel Zak (cherry picked from commit a2a8c7ad667aff5e70871ccbdd1cd0502f3fd49e) sys-utils/dmesg.c | 56 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 26 deletions(-) commit 3aee2cd3e49a7216fff8805df17f302fd84cd2f1 Author: Karel Zak Date: Thu Mar 12 12:56:27 2026 +0100 tests: add dmesg -d -t and -t -d timestamp format tests Add two sub-tests to verify that -d -t (delta-notime) and -t -d (notime-delta) both produce delta-only output regardless of option order. Addresses: https://github.com/util-linux/util-linux/issues/4110 Signed-off-by: Karel Zak (cherry picked from commit 588d2be090127355021dad23bf2a635c340e68d7) tests/expected/dmesg/timestamp-format-delta-notime | 106 +++++++++++++++++++++ tests/expected/dmesg/timestamp-format-notime-delta | 106 +++++++++++++++++++++ tests/ts/dmesg/timestamp-format | 8 ++ 3 files changed, 220 insertions(+) commit e0f047c8ba4d123efcf4df34654000df384247ef Author: Karel Zak Date: Thu Mar 12 12:56:14 2026 +0100 dmesg: fix -d -t (--show-delta --notime) output regression When -d and -t are used together, only the time delta should be printed without the timestamp prefix. This was broken because DMESG_TIMEFTM_NONE in the format list caused the print_record() loop to break early before processing the delta format. Resolve the conflict after option parsing: when NONE coexists with a delta format (TIME_DELTA or DELTA), replace all formats with just DELTA. When NONE is used without delta, it suppresses all timestamps as before. Fixes: https://github.com/util-linux/util-linux/issues/4110 Signed-off-by: Karel Zak (cherry picked from commit e795adc5bbbac961e70bb402c9fce2397b059bf6) sys-utils/dmesg.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 5ee2294253102eca698cd0521cfcad70543d4b89 Author: Karel Zak Date: Thu Mar 12 12:52:33 2026 +0100 dmesg: remove delta variable, use time format list consistently Replace the separate 'delta' flag variable with direct use of the time format list for all timestamp-related options: -d (--show-delta) now calls include_time_fmt(DMESG_TIMEFTM_TIME_DELTA) -t (--notime) now calls include_time_fmt(DMESG_TIMEFTM_NONE) without reset_time_fmts(), same as --time-format notime This makes -d and -t behave the same way as their --time-format equivalents, storing all requested formats in the format list for post-getopt resolution. The delta merging logic is split into two blocks: - TIME_DELTA + CTIME → CTIME_DELTA (for -d -T) - DELTA + TIME/CTIME → TIME_DELTA/CTIME_DELTA (for --time-format delta) Addresses: https://github.com/util-linux/util-linux/issues/4110 Signed-off-by: Karel Zak (cherry picked from commit ff93403809d31ee4152c8bed3272a65f683276a1) sys-utils/dmesg.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit da112241a7bc63b59684ecf6e079064c82b712ba Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun Mar 1 18:12:51 2026 +0000 build(deps): bump actions/upload-artifact from 6 to 7 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] (cherry picked from commit bc8e0536846732be9e4fdea13875dd59d4c01914) .github/workflows/cifuzz.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef86da937f40b366e195ba538df478fafeb75061 Author: Karel Zak Date: Thu Mar 19 11:06:20 2026 +0100 bash-completion: (unshare) remove embedded tabs from option strings Line continuations in the option string assignments preserved the leading tab (code indentation) from continuation lines, embedding literal tab characters into the variable values. This broke regex matching in the offset-detection loop for --mount-proc (OPTARGOPTS), --map-groups (REQARGOPTS), and --map-subids (NOARGOPTS). Addresses: https://github.com/util-linux/util-linux/pull/4084 Signed-off-by: Karel Zak (cherry picked from commit fa912c28d6659b85fb7afd249c3be41644b87667) bash-completion/unshare | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 5396344805a723f760315756dda54002362dd6c5 Author: Christian Goeschel Ndjomouo Date: Fri Feb 27 18:29:27 2026 -0500 bash-completion: add improvements to unshare(1) completions This change adds the ability to complete the command of the executable that the unshare command is going to execute. Additionally, it includes support for completions of long options that have optional arguments and are thus specified with a suffixed '=' sign, which delimits the option name from the actual option argument. Lastly, it also adds file/directory completions for options that require file or directory paths as arguments. Addresses: #4073 Signed-off-by: Christian Goeschel Ndjomouo (cherry picked from commit 79917c42728860186c729a0ab94a00ab135929b5) bash-completion/unshare | 162 +++++++++++++++++++++++++++++++----------------- 1 file changed, 104 insertions(+), 58 deletions(-) commit 85241e93c4de76b4397e17371472dbaf15a8d906 Author: Tobias Stoeckmann Date: Fri Mar 13 18:25:25 2026 +0100 lib/debug: Move debug functions into c file Having the debug functions as static inline functions throughout the code base leads to code bloat, since they always serve the same purpose without custom modifications. Keep defines and everything specific to an including file in a header, but move function bodies into their own c file. Reduces size of util-linux installation by up to 80 KB on x86_64. Signed-off-by: Tobias Stoeckmann (cherry picked from commit 3362f7e774d48a67ddd6322ab99e1d88b625d8d8) include/debug.h | 76 +++++------------------------------------------------ lib/Makemodule.am | 9 ++++--- lib/debug.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ lib/meson.build | 1 + 4 files changed, 90 insertions(+), 74 deletions(-) commit 7962cd534955ef4b7bd07841174f874a33f29ad4 Author: Karel Zak Date: Wed Mar 18 13:04:08 2026 +0100 tests: add SCS escape sequence test for column Convert the ansiescape test to use subtests and add a test for SCS (Select Character Set) escape sequences to verify they are properly skipped in width calculation. Addresses: https://github.com/util-linux/util-linux/issues/4121 Signed-off-by: Karel Zak (cherry picked from commit 39aa78843476c61c2609ea544456cd10e7df92d0) tests/expected/column/ansiescape-scs | 3 +++ tests/expected/column/{ansiescape => ansiescape-sgr} | 0 tests/ts/column/ansiescape | 9 ++++++++- 3 files changed, 11 insertions(+), 1 deletion(-) commit d60ce8833c8b3d236ea99eb696d9242437c8fa36 Author: Karel Zak Date: Wed Mar 18 12:48:54 2026 +0100 mbsalign: cleanup escape sequences handling Use '\033' (portable) instead of '\e' (GNU extension), simplify the control character handling by checking for ESC directly, and fix the SCS boundary check to only match complete sequences. Signed-off-by: Karel Zak (cherry picked from commit 32f305b22f0cd88c91096294566b9d55cc4b0f41) lib/mbsalign.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit ad404a66d3cdc0470e632469b039a7da847f050c Author: WanBingjiang Date: Tue Mar 17 10:17:15 2026 +0800 mbsalign: add support for SCS escape sequences Add handling for SCS (Select Character Set) escape sequences: \e(X, \e)X, \e*X, \e+X. These sequences are now properly skipped when calculating string width. Addresses: https://github.com/util-linux/util-linux/issues/4121 Signed-off-by: WanBingjiang (cherry picked from commit 920e308a9f97deb566d63baf10334976c0568614) lib/mbsalign.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 5758c7ae78dc1fac56c0e8d3580be464a5fea703 Author: Karel Zak Date: Thu Mar 12 14:13:59 2026 +0100 autotools: Remove the need for --disable-liblastlog2 We typically build all in-tree libraries, but liblastlog2 requires an external dependency on sqlite3. It doesn't make sense to force all users to use --disable-liblastlog2 to explicitly disable it. Let's check for sqlite3, and if it's not installed, disable the library. Addresses: https://github.com/util-linux/util-linux/issues/4112#issuecomment-4042305081 Signed-off-by: Karel Zak (cherry picked from commit 74b775e3b962653893925ded80cf9c351d7904f8) configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 930d6980404a6c341ee39fd7388bc5c4764c0902 Author: WanBingjiang Date: Sat Feb 28 11:56:32 2026 +0800 man: add ENVIRONMENT section for smartcols support in various man pages This update introduces an ENVIRONMENT section to the man pages of several utilities. The section includes references to the common environment variable for smart column output, ensuring consistent documentation across tools that support the --json output format. (cherry picked from commit 379640c31281174c9a59c44e6e260fc5f83a17c7) login-utils/lslogins.1.adoc | 5 +++++ lsfd-cmd/lsfd.1.adoc | 5 +++++ misc-utils/fincore.1.adoc | 5 +++++ misc-utils/lsclocks.1.adoc | 5 ++++- misc-utils/lslocks.8.adoc | 5 +++++ misc-utils/uuidparse.1.adoc | 5 +++++ misc-utils/wipefs.8.adoc | 3 +++ sys-utils/irqtop.1.adoc | 5 +++++ sys-utils/losetup.8.adoc | 3 +++ sys-utils/lscpu.1.adoc | 3 +++ sys-utils/lsipc.1.adoc | 5 +++++ sys-utils/lsirq.1.adoc | 5 +++++ sys-utils/lsmem.1.adoc | 3 +++ sys-utils/lsns.8.adoc | 3 +++ sys-utils/rfkill.8.adoc | 5 +++++ text-utils/column.1.adoc | 1 - 16 files changed, 64 insertions(+), 2 deletions(-) commit 3c9dc9d78526adc1f9587017f5455f898ec8fa5b Author: Karel Zak Date: Thu Mar 12 10:46:57 2026 +0100 tests: update to reflect libsmartcols changes The library now reduces the width of columns even when a width hint is specified. This affects some test outputs, particularly those where small numbers appear in columns with a width hint wider than the column header (e.g., SIZE with hint=5). Signed-off-by: Karel Zak (cherry picked from commit 8af80e9770675a054449d7679d67347485ffaf50) tests/expected/fadvise/drop | 20 +- tests/expected/fdisk/bsd_0_64.BE | 14 +- tests/expected/fdisk/bsd_0_64.LE | 14 +- tests/expected/fdisk/bsd_0_64_alpha.LE | 14 +- tests/expected/fdisk/bsd_1_0.BE | 14 +- tests/expected/fdisk/bsd_1_0.LE | 14 +- .../expected/fdisk/sunlabel-create-first-partition | 4 +- .../fdisk/sunlabel-create-second-partition | 6 +- .../fdisk/sunlabel-set-first-par-mountable | 4 +- .../expected/fdisk/sunlabel-set-first-par-readonly | 4 +- tests/expected/fdisk/sunlabel-set-partition-sysid | 4 +- tests/expected/lsfd/mkfds-pidfd | 2 +- tests/expected/lsfd/mkfds-ro-block-device | 2 +- tests/expected/lsfd/mkfds-ro-regular-file | 2 +- tests/expected/lsfd/mkfds-rw-character-device | 2 +- tests/expected/lsmem/lsmem-s390-zvm-6g | 156 +++---- tests/expected/lsmem/lsmem-x86_64-16g | 506 ++++++++++----------- 17 files changed, 391 insertions(+), 391 deletions(-) commit 76ed339f75340210c6b4166eae1e8a48657c235c Author: Karel Zak Date: Thu Mar 12 10:40:45 2026 +0100 libsmartcols: enlarge columns with absolute width hint The width hint is strictly followed only if SCOLS_FL_STRICTWIDTH is specified. The previous patch ensures minimal space usage for all other columns. This patch enlarges columns with an absolute hint (> 1.0) until the hints are satisfied and there is free space on screen. Signed-off-by: Karel Zak (cherry picked from commit bbc305bb1ad39c7dc998491a700d4f8c3907b85f) libsmartcols/src/calculate.c | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) commit ba070b1ce3a46920aeb4c38985ba2d30f7b9c38c Author: Karel Zak Date: Wed Mar 11 12:07:09 2026 +0100 column: Add notes about the role of the column header Addresses: https://github.com/util-linux/util-linux/issues/4104 Signed-off-by: Karel Zak (cherry picked from commit 4bc159be19ed4cf2f90ef4250e9d1c2a1a4168c7) text-utils/column.1.adoc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 75a7b0cc9aa8b07a239f601cc580378291eac631 Author: Karel Zak Date: Wed Mar 11 11:41:36 2026 +0100 libsmartcols: improve truncation of column width The worst case is to aggressively truncate the largest column. The default is to reduce it by three characters, but if the needed space is smaller than three characters, it's better to be less aggressive. Signed-off-by: Karel Zak (cherry picked from commit f839f639c2636100bf1bcfb0655800188bb67551) libsmartcols/src/calculate.c | 2 +- tests/expected/column/table-trunc-wanted | 3 +++ tests/ts/column/table | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) commit be5a517057bdfd307104095bd388570345090f6c Author: Karel Zak Date: Wed Mar 11 11:32:48 2026 +0100 tests: add column strictwidth test Signed-off-by: Karel Zak (cherry picked from commit f8a7aa92c0bbada0222f9fec72546b7d2ee305a4) tests/expected/column/table-strictwidth | 3 +++ tests/ts/column/table | 4 ++++ 2 files changed, 7 insertions(+) commit bb085ad3cc5206ab281f9bb2bf12c17e03f8f35e Author: Karel Zak Date: Mon Mar 9 11:03:54 2026 +0100 lib/meson: move caputils.c from lib_common to per-binary sources caputils.c is GPL-licensed, and libcommon should only contain LGPL or public domain code (as stated in lib/Makemodule.am). Move it out of lib_common_sources and add it directly to the sources of binaries that use it (unshare, nsenter, setpriv), matching autotools. Addresses: https://github.com/util-linux/util-linux/issues/4085 Signed-off-by: Karel Zak (cherry picked from commit 163b874561eccb5aa9d4bb11d1126cb32c6c3adf) lib/meson.build | 3 ++- sys-utils/meson.build | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 05678cb5e3ad115237d4ebfeb3f57ff7dac95f42 Author: Karel Zak Date: Mon Mar 9 10:31:25 2026 +0100 lib/meson: remove unconditional procfs.c from lib_common_sources procfs.c was listed in the base lib_common_sources and also added conditionally under HAVE_OPENAT/HAVE_DIRFD (line 88). In autotools, procfs.c is only added conditionally. Remove it from the base list to match autotools and avoid duplication. Addresses: https://github.com/util-linux/util-linux/issues/4085 Signed-off-by: Karel Zak (cherry picked from commit ce716116bddc5a9a6229631f3dc524e853007eb6) lib/meson.build | 1 - 1 file changed, 1 deletion(-) commit 8bb39439e5b4565477627e005feb075533862ed8 Author: Karel Zak Date: Mon Mar 9 10:30:57 2026 +0100 lib/meson: remove duplicated source files from lib_common_sources The files idcache.c, randutils.c, md5.c, sha1.c, strutils.c, and strv.c were listed both in the base lib_common_sources string list and then appended again via files() objects. Remove them from the base list since the files() append is needed for the named variables used by other meson.build files. Addresses: https://github.com/util-linux/util-linux/issues/4085 Signed-off-by: Karel Zak (cherry picked from commit efdc69f4ea6e7c6d7db739e04c036adb49e07d33) lib/meson.build | 6 ------ 1 file changed, 6 deletions(-) commit fe763cabf0dd9472f6f5378a3966bfa36438cb44 Author: WanBingjiang Date: Fri Feb 27 16:34:27 2026 +0800 man: hide LIBSMARTCOLS_JSON in man pages that do not support --json PR #4070 consolidated libsmartcols env vars into man-common/env-smartcols.adoc and had all tools (including fdisk and cfdisk) include it. That documented LIBSMARTCOLS_JSON in fdisk/cfdisk man pages although those tools do not support --json output, which is misleading. Use ifdef::smartcols-json[] in env-smartcols.adoc so the JSON env var section is only rendered for man pages that set :smartcols-json: (column, lsblk, findmnt, sfdisk). fdisk and cfdisk include the same file but do not set the attribute, so they only show the debug-related variables. Addresses: util-linux#4070 (cherry picked from commit 2ed21d80d218d55c01fee1528f51d31da92a9376) disk-utils/sfdisk.8.adoc | 1 + man-common/env-smartcols.adoc | 2 ++ misc-utils/findmnt.8.adoc | 1 + misc-utils/lsblk.8.adoc | 1 + text-utils/column.1.adoc | 1 + 5 files changed, 6 insertions(+) commit d18ef6bf99f4ac1852327cbd4fc52bc1191e3dea Author: Karel Zak Date: Mon Mar 16 11:43:19 2026 +0100 libblkid: add debug message for private DM device skip Add a DBG() trace and set errno = EINVAL when blkid_new_probe_from_filename() skips a private device-mapper device, to aid troubleshooting and distinguish from I/O errors. Addresses: https://github.com/util-linux/util-linux/pull/4120 Signed-off-by: Karel Zak (cherry picked from commit b85d46a2edf3f871504ca86080102cde93e3725c) libblkid/src/probe.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 3fdc91737342a199ee79c55088dc61dfc0d10a69 Author: WanBingjiang Date: Mon Mar 16 11:59:56 2026 +0800 getopt: document whitespace as separator in --longoptions The --longoptions option accepts not only commas but also whitespace (spaces, tabs, or newlines) as separators between option names. Update the man page to reflect this behavior. Addresses: https://github.com/util-linux/util-linux/issues/4119 (cherry picked from commit d2b4458119a1c88cf38e1c10598b6b46b51bd667) misc-utils/getopt.1.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 575cf612f0cc1d91a80e5a21aba3d1dd1008792f Author: Karel Zak Date: Wed Mar 18 11:29:42 2026 +0100 tests: (copyfilerange) update expected output for changed wording Signed-off-by: Karel Zak (cherry picked from commit 443d261966d6215549f73d46214c10f275457f2b) tests/expected/copyfilerange/copyfilerange-copy-from-beyond-file-size | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdd66a0fe77b9bba075b1cf748525f27d77c54d5 Author: Benno Schulenberg Date: Thu Mar 12 16:55:32 2026 +0100 copyfilerange: (man) correct the markup and improve the wordings CC: Dick Marinus Signed-off-by: Benno Schulenberg (cherry picked from commit a6723da0ad785c65800e8922c201cf6e75c1cad8) misc-utils/copyfilerange.1.adoc | 61 +++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 36 deletions(-) commit ece05798cc4b6b7b183af09902d40a7b1b4f7426 Author: Benno Schulenberg Date: Sat Mar 7 12:43:08 2026 +0100 lsmem: (man) correct the markup of column names, and improve some grammar The column names should be marked in bold and not in italics, as they are literal values, not placeholders. Also, indent the list of column names, to make it clearer where the list ends. And add the missing markup for "RANGE" and the missing name "REMOVABLE". Furthermore, drop the small table, as it held nearly no information and was confusing: the explicit numbers in the BLOCK column gave the impression that block 0 can only be online, block 1 only offline but configured, and block 2 only offline and deconfigured. The content of the MEMMAP-ON-MEMORY column being always "yes/no" was useless. Leaving out those columns left only STATE and CONFIGURED, where the values implied that memory can only be online when it is configured. This information can be conveyed in a single sentence. (The table was added in commit 6f1e4ff054 from five months ago.) CC: Sumanth Korikkar Signed-off-by: Benno Schulenberg (cherry picked from commit 0795989405d635d40da42c5088b45e81f06d0e80) sys-utils/lsmem.1.adoc | 65 ++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 36 deletions(-) commit d4ff6a9128793113208f00b0898fecc392fb4118 Author: Benno Schulenberg Date: Mon Mar 9 12:15:44 2026 +0100 waitpid: consistently write the abbreviation "PID" in all-uppercase Also, use %d instead of %u, as all other comparable messages use %d. CC: Christian Goeschel Ndjomouo Signed-off-by: Benno Schulenberg (cherry picked from commit 9a9ce4074b2e3a9afe73f06e49ae12e593bf397d) misc-utils/waitpid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4acdb821eb7e60de0c9bea658a2302dec8028849 Author: Benno Schulenberg Date: Sun Mar 8 12:20:04 2026 +0100 nsenter: (man) correct the markup and improve the formatting Remove the mistaken angle brackets that were introduced last month by commit f2a5997869, add the missing equals sign, and put both it and the subsequent colon in bold as they are literal characters. Also, indent the list of paths to make it clearer where it ends, and so that the subsequent paragraph gets indented correctly. CC: Xiao Liang CC: Christian Goeschel Ndjomouo Signed-off-by: Benno Schulenberg (cherry picked from commit 7d642094caf4f7000c3c001165600fde2cd67f73) sys-utils/nsenter.1.adoc | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) commit 4aa324fe6712d7ae64220c30d9fd532f4c6c1ca4 Author: Benno Schulenberg Date: Sun Mar 8 12:20:03 2026 +0100 nsenter: (usage) improve the alignment of the option descriptions Perfect alignment is not possible, otherwise too little space remains for the descriptions. Also, slightly reword one description to fit within 80 columns again, and align also a description that was missed by commit 986188d1da two monts ago. Signed-off-by: Benno Schulenberg (cherry picked from commit dc6bf407134410cc5c04b078280c1d9367bd9fb4) sys-utils/nsenter.c | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) commit 32d12e9d409651be98970206c5adb139210f2188 Author: Benno Schulenberg Date: Mon Mar 16 12:09:38 2026 +0100 copyfilerange: simply report "too few arguments", not misleading messages Running ./copyfilerange without any arguments would report: copyfilerange: source file is required giving the impression that only a source file is required. But running ./copyfilerange with one argument would report: copyfilerange: destination file is required giving the impression that specifying two files would be enough. But running ./copyfilerange with two arguments would report: copyfilerange: nothing to do, no ranges supplied Instead of these custom messages, let's report what other tools report when given too few arguments: "too few arguments". This change also prevents `copyfilerange` from creating an empty destination file when given just two arguments, when it reported that there was nothing to do. Furthermore, correct a parameter of a call of err(), from `argv[2]` to `range.out_filename`. CC: Dick Marinus Signed-off-by: Benno Schulenberg (cherry picked from commit 3c22e47fb11f5796a6204c61d27eee28d0298f91) misc-utils/copyfilerange.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 7bc6bfd08046b16c01c11241f67a2de6138018bf Author: Benno Schulenberg Date: Mon Mar 16 12:09:37 2026 +0100 copyfilerange: wrap some overlong lines (in a tabsize-independent way) Most tools in util-linux seem to assume a tabsize of 8, judging from the alignments of several continuation lines. But `copyfilerange.c` appears to have assumed a tabsize of 2, because with a tabsize of 8 the text on line 147 started in column 209! But even with a tabsize of 2, three lines were much wider than the reasonable 100 columns. So, wrap those, and in the bargain improve the wording of the affected messages, and add a space before %m. CC: Dick Marinus Signed-off-by: Benno Schulenberg (cherry picked from commit 085ed2f3dfcdf888c786b0885b09c821073ec256) misc-utils/copyfilerange.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit a78073405cae3c309c146ef220989a6caa2037e8 Author: Zdenek Kabelac Date: Sat Mar 14 14:39:41 2026 +0100 libblkid: check for private DM device before open blkid_new_probe_from_filename() opens the device before calling blkid_probe_set_device(), which checks sysfs_devno_is_dm_private() and sets BLKID_FL_NOSCAN_DEV. But the open() itself bumps the kernel open count, so a concurrent DM_DEVICE_REMOVE ioctl sees EBUSY even though blkid never actually probes the device. Move the private-device check before open() in blkid_new_probe_from_filename(). The sysfs UUID is readable without opening the block device, so this closes the race window between udev-worker's blkid builtin and device-mapper remove. Note: blkid_verify() in verify.c already does the check before open() -- this patch makes the probe path consistent. Signed-off-by: Zdenek Kabelac (cherry picked from commit d05a84b22e549527cbcbcc7d5efc6bad06668170) libblkid/src/probe.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit e6e7c6371b4f33bb1337c3fdaefa4cfda251f4b0 Author: WanBingjiang Date: Tue Mar 17 10:19:08 2026 +0800 mbsalign: validate ESC character before processing escape sequences Only process escape sequences when the control character is ESC. This prevents \n[ or \n( from being misidentified as escape sequences. Signed-off-by: WanBingjiang (cherry picked from commit 4d28a8c89772dd1668eec8511c823aed16331f74) lib/mbsalign.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2801ae91afcaa6fb48a99da4ca8775260992aaaf Author: Karel Zak Date: Mon Mar 9 13:56:37 2026 +0100 chmem: check ul_path_read_buffer() return value Reported-by: Coverity Scan Signed-off-by: Karel Zak (cherry picked from commit 1371614c704fb1103336d8e6bb0f215fa60e4ee0) sys-utils/chmem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a0cda7aae2ab229cb893beb78e6339e870a1dd97 Author: Tobias Stoeckmann Date: Tue Mar 10 18:11:02 2026 +0100 mkfs.cramfs: Properly check mmap results The POSIX manual page states that the error return value is MAP_FAILED. Sync with all other mmap checks throughout util-linux. Also, test an mmap call which previously was not tested. Signed-off-by: Tobias Stoeckmann (cherry picked from commit 71a4b1e94405be6b5cf9971b7376e2c042ffb651) disk-utils/mkfs.cramfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c40d10335a87bd7b3615f54a75b063c4b5a64527 Author: Benno Schulenberg Date: Thu Mar 12 16:55:31 2026 +0100 copyfilerange: (usage) correct the markup and improve the wording The , , and arguments are required, so do not mark them as optional (with the square brackets). Also, trim the redundant lines about the source and destination files, improve the explanation for the argument and put it after the options, and keep the text within 80 columns. Furthermore, list the short options first (as is custom), and match the indentaion of the -h and -V options to the others. CC: Dick Marinus Signed-off-by: Benno Schulenberg (cherry picked from commit 923de58c326ea21502a4d114fcd0a77dd6076ab4) misc-utils/copyfilerange.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 9596bc6ad6d0e7fd3693fba0e2532d2e85bf4747 Author: Benno Schulenberg Date: Sun Mar 8 12:20:02 2026 +0100 nsenter: (usage) correct the formatting of eight option arguments Angle brackets should wrap each placeholder separately: and . Angle brackets should not enclose metacharacters (|) nor literal ones (= and :). (The mistaken formatting was introduced by commit f2a5997869.) CC: Xiao Liang Signed-off-by: Benno Schulenberg (cherry picked from commit 245483840185110fb9df7771a948d9511f2c0eda) sys-utils/nsenter.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 4fb9deff3476a25297ab88c831a71bd3be742cb5 Author: Benno Schulenberg Date: Sat Mar 7 12:43:07 2026 +0100 lsmem: correct the grammar of an error message That is: make the message identical to its twin nine lines back. (The spello was introduced by commit 92d018a105 from five months ago.) CC: Sumanth Korikkar Signed-off-by: Benno Schulenberg (cherry picked from commit 4df4ae47fad0cf79071fd75c9d39759d7152bff6) sys-utils/lsmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56253bdea54c2184d100f7d705de0d6838bf0b81 Author: Karel Zak Date: Mon Mar 16 14:02:55 2026 +0100 chmem: fix segfault when parameter is just a dash When running "chmem --disable -", ul_strv_split("-", "-") returns an empty array (length 0) because the input string contains only the separator. The code only checked for length > 2, so length 0 fell through to parse_range_param() with NULL pointers, causing a segfault in strlen(). Fix by rejecting parameters that produce fewer than 1 token, and add NULL checks in parse_range_param() for additional robustness. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2447899 Signed-off-by: Karel Zak (cherry picked from commit 7deea2d017b7a1a1b57ae901323f2e4db28fb7c5) sys-utils/chmem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0511b8e997d1c6b8b6cd77bd5e6fb2edde48b0f9 Author: Karel Zak Date: Wed Mar 18 12:01:11 2026 +0100 findmnt: fix SIGSEGV when parsing empty file Set mnt_table_set_userdata() right after mnt_new_table() in all functions that create a libmount table, so that parser_errcb() can always safely access the findmnt userdata. Previously, userdata was set only in main() after parse_tabfiles() returned, meaning the error callback would dereference a NULL pointer when encountering parse errors (e.g., an empty file passed via -F). Also add a NULL guard in parser_errcb() as a safety net, and a test for the empty file case. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2448233 Signed-off-by: Karel Zak (cherry picked from commit ee5f5935e1e51c63e98f7cc06dcf6b3740150957) misc-utils/findmnt.c | 22 ++++++++++++++-------- tests/expected/findmnt/outputs-empty-file | 1 + tests/ts/findmnt/outputs | 6 ++++++ 3 files changed, 21 insertions(+), 8 deletions(-) commit bbe44e51a214e12c4f3471ae9d9e25cba170e7f7 Author: Karel Zak Date: Wed Mar 11 10:55:11 2026 +0100 libsmartcols: fix column width calculation echo -e "a b c\na b c" | ./column --table --table-column "name=X,width=5" -C "name=YY,width=5" -C "name=Z" --output-separator '|' X |YY|Z a |b |c a |b |c The only difference between the X and YY columns is the column name. The column header width affects the use of the width property. This occurs when the minimum and maximum column widths are the same ("YY"). Fixed version: echo -e "a b c\na b c" | ./column --table --table-column "name=X,width=5" -C "name=YY,width=5" -C "name=Z" --output-separator '|' X|YY|Z a|b |c a|b |c Note that width= is just a hint and should not be used when the 'strictwidth' property is not specified. Signed-off-by: Karel Zak (cherry picked from commit a9ac4744fa31fe84a4e43c88290ae7af7a41a8d0) libsmartcols/src/calculate.c | 2 +- tests/expected/column/table-min-width | 3 +++ tests/ts/column/table | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) commit 0be5497497678434250211be12b86170fb977754 Author: Karel Zak Date: Wed Mar 11 11:24:01 2026 +0100 libsmartcols: fix width= property parsing The code uses 'errno' to detect errors, but the variable is not set to zero before parsing the number. As a result, any previous error can affect the width number parsing. Signed-off-by: Karel Zak (cherry picked from commit 351eae3efe92901aae7066c12f64ea680670a464) libsmartcols/src/column.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 42dbcdeb20ac26e56a0dc88a1ef70d02c4b9c649 Author: Tobias Stoeckmann Date: Sat Mar 7 21:08:33 2026 +0100 fsck: Fix stack overflow with many options If fsck is given too many options, a stack overflow can occur because these options are temporarily stored in a fixed sized array on stack. As with arguments, check if too many options are supplied and call errx if this is the case. Signed-off-by: Tobias Stoeckmann (cherry picked from commit cf2cd23b6f55735bb75944ec7c90bef0c1b87b76) disk-utils/fsck.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 29b3c88a1d5703983f45f235c66936e5690ff063 Author: Tobias Stoeckmann Date: Fri Mar 6 21:50:09 2026 +0100 eject: Fix OOB access with empty argument The the supplied argument is an empty string, eject triggers an out of boundary access due to strlen() - 1 calculation. Verify that the string is not empty before checking its last character. Signed-off-by: Tobias Stoeckmann (cherry picked from commit 8035013da4a1cadc5cd2531d61a6d66af53a00f5) sys-utils/eject.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c5305511c3466048c9795e0200b17ced9f02cf6a Author: Karel Zak Date: Thu Mar 19 11:52:24 2026 +0100 tools: add git-compare-backport script Compare commit subject lines between master and a stable/* branch to identify commits missing from the stable branch (backport candidates). Merge commits are ignored, cherry-picked commits are detected by matching subject lines. Signed-off-by: Karel Zak (cherry picked from commit 4bd753b2dc434ed9170522ab1132224dd0dce513) tools/git-compare-backport | 71 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit 66c6bcc25c07231b62d579fecf4406ef728e9e4a Author: Ben Song Date: Mon Mar 2 21:48:25 2026 +0800 docs: getopt: improve arg example in getopt-example The option `wow!*\?` in original example is not the argument of `--c-long`. Only `=` separated in optional option is allowed. [karelzak@redhat.com: - fix tcsh quote style to use backtick-quote matching actual script output, remove orphaned comment about exclamation mark escaping] Based-on-patch-by: Ben Song Addresses: https://github.com/util-linux/util-linux/pull/4088 Signed-off-by: Karel Zak (cherry picked from commit 49d6946ff2bccc1a1a0f282463e279287441f5d1) misc-utils/getopt-example.bash | 22 ++++++++++++++++------ misc-utils/getopt-example.tcsh | 27 ++++++++++++++++----------- 2 files changed, 32 insertions(+), 17 deletions(-) commit 5bd8370f874a8576932640f2e87f7cdd175e1fbe Author: Tobias Stoeckmann Date: Sat Mar 7 21:13:21 2026 +0100 pg: Reset SIGCHLD to default When pg runs a child process, i.e. evaluating an "!" command, it calls wait to receive status for the child. If SIGCHLD is ignored, this results in an endless loop. Fix this by resetting SIGCHLD to default before the any fork() call is performed. Signed-off-by: Tobias Stoeckmann (cherry picked from commit f334c2abde8ef9824724f9a33e3c16e405285470) text-utils/pg.c | 4 ++++ 1 file changed, 4 insertions(+) commit 57d026e9e91ef39f92cd534306b0c2080ced525d Author: Leefancy Date: Wed Mar 4 17:30:12 2026 +0800 The incorrect order of fcntl() parameters resulted in the inability to clear O_NONBLOCK Signed-off-by: Leefancy (cherry picked from commit 3734e047579fe0b8c254e579a4eaa8de9a026e13) term-utils/ttymsg.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit db23a55c2fdd3aa2715b9b7d016e9f38fef8bbd7 Author: Tobias Stoeckmann Date: Fri Mar 6 21:58:46 2026 +0100 eject: Reset SIGCHLD to default for wait If SIGCHLD is ignored, the wait call which waits for the umount command to finish could fail with -1 and ECHILD. Since its return value is not checked, the uninitialized status variable would be read, leading to undefined behavior. While at it, removed the additionally printed newline from errx message. Signed-off-by: Tobias Stoeckmann (cherry picked from commit c12d45e4b93f2d87d68fe4095110b00b506ded5d) sys-utils/eject.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit edc50e3c59422524d2622f9a2bf4623561065136 Author: Weixie Cui Date: Fri Mar 6 20:40:08 2026 +0800 fincore: should add break here (cherry picked from commit 720a2874f5ef37278857b2b3b9b556d15b205a3e) misc-utils/fincore.c | 1 + 1 file changed, 1 insertion(+) commit 443f6ab0a9b1bd5a0ff42684c2264b19d64d600c Author: Tobias Stoeckmann Date: Thu Mar 5 17:08:58 2026 +0100 lib/pager: Translate error message Since the error message is not printed by a signal handler anymore, it can be translated. Requested-by: Karel Zak Signed-off-by: Tobias Stoeckmann (cherry picked from commit 0032d535464a6835783de702b35cce9ec4f06a4f) lib/pager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aba4ff68bd339e76f9902b696d761589290569ad Author: Tobias Stoeckmann Date: Tue Mar 3 18:07:27 2026 +0100 lib/pager: Always reset signals before exit Just in case another exit handler relies on these signal handlers being set to default, or to allow users to press ^C and let the program exit as expected. Signed-off-by: Tobias Stoeckmann (cherry picked from commit bac9fc19d4bbb62599e509513cd614370a07d7b3) lib/pager.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 5d6cb408f9e85bd957a5c8eac3ff4c86f66d2adb Author: Tobias Stoeckmann Date: Tue Mar 3 18:05:20 2026 +0100 lib/pager: Properly handle fork error return value Most of the code checks for pager_process.pid != 0 to see if a pager is running. If fork fails and returns -1, pager_process.pid is not 0, too. This in turn leads to an issue if waitpid is eventually called with -1 as pid, which would wait for all children. Since there are no children, the wait_for_pager function calls err with an EXIT_FAILURE value. Properly handle a potential fork error. Signed-off-by: Tobias Stoeckmann (cherry picked from commit 51c4a282f49cc30e00fc9e582d0b3967384d07cb) lib/pager.c | 1 + 1 file changed, 1 insertion(+) commit efb4d2483d4eb502e3ed74bcce0b296655b0463a Author: Mario Blättermann Date: Thu Mar 5 20:53:18 2026 +0100 Put file types in namei.1.adoc in a table structure (cherry picked from commit a8616d1a767892262a11309609a7654185cede7b) misc-utils/namei.1.adoc | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) commit 1c495aaa4af734556fb37b5ac0cdc23d714da2a7 Author: Mario Blättermann Date: Wed Mar 4 19:24:04 2026 +0100 Convert code blocks into tables (cherry picked from commit f5d2c3e4b00bbdf636dd3308f38f98b5d1528108) lib/terminal-colors.d.5.adoc | 171 ++++++++++++++++++++++++++++++------------- 1 file changed, 122 insertions(+), 49 deletions(-) commit 84d6e7b45f28ebbea66b6c39f16f494c9a299825 Author: Mario Blättermann Date: Mon Mar 2 21:27:56 2026 +0100 Remove backticks from table in terminal-colors.d.5.adoc (cherry picked from commit eccd883fc387b13b2aaa5cbfd434a03bf727243c) lib/terminal-colors.d.5.adoc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit f9cccb1ad016a5c139a7f108bbfd0bc99071d290 Author: Benno Schulenberg Date: Sun Mar 1 17:45:05 2026 +0100 terminal-colors.d: (man) do not show 'type' as an optional part That is: remove the square brackets from around 'type' in the synopsis. Also, do not give the impression that a leading dot by itself is fine before the 'type'. That is: a dot is required only when 'name' and/or '@term' is present. Also, do not colorize the square brackets as if they were part of the placeholders. (And use ++double plus++ passthroughs for the opening square brackets, to prevent asciidoctor from misinterpreting them.) Indent the list of file types, for clarity. And correct or improve some wordings, and remove an inconvenient blank line in an example. Signed-off-by: Benno Schulenberg (cherry picked from commit 3252142521c6302e7a30c2a5a61838f19062b364) lib/terminal-colors.d.5.adoc | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 8fde01b57aaca95b38abbe62d968dc5198c4f7cf Author: Benno Schulenberg Date: Sat Feb 28 12:52:45 2026 +0100 findfs: (man) improve the markup, the layout, and the wording Mark NAME as a placeholder instead of a literal, and rename it to TAGNAME to make it clearer what "tag" in the description refers to. Indent the list of possible tags, to make it clearer where the description continues. Drop the angle brackets around placeholders -- those are used in --help output, but in man pages it is just italics. Also add a missing section header. Signed-off-by: Benno Schulenberg (cherry picked from commit b9461aa1cb1aae9d4ee3056fabefe269b6f94018) misc-utils/findfs.8.adoc | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) commit e7f56f6c78543b1dc2c9f1e2745c13f785fa6f51 Author: Karel Zak Date: Mon Mar 9 12:04:44 2026 +0100 lslogins: fix broken GROUP column output The condition on COL_GROUP incorrectly checked `!grp->gr_name` instead of `!user->group`. This caused the GROUP column to always be empty because when gr_name is non-NULL (normal case) the assignment was skipped, and when gr_name is NULL, xstrdup() would crash. Fixes: https://github.com/util-linux/util-linux/issues/4097 Fixes: 52a6e45bfe5ddee1fed20f2f4f7542cac6bf13c9 Signed-off-by: Karel Zak (cherry picked from commit a0ba7a713587fc3f6a3f8a59dd871a45e4225acd) login-utils/lslogins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 369b96ee61437f2bd58429250df0fd7f424b1079 Author: Karel Zak Date: Mon Mar 9 11:25:58 2026 +0100 pam_lastlog2: add -lpam to Makemodule.am If we don't add this, we don't actually link with PAM; compare the before and after of pam_lastlog2.so -- without -lpam it does not list libpam.so.0 as a NEEDED dependency. Signed-off-by: Morgan Jones Signed-off-by: Karel Zak (cherry picked from commit 515b08cecc57019d96ee652c616fa821a857b236) pam_lastlog2/src/Makemodule.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e52eaa20ef5e32ff5085c0f71c1a22a27d09fe88 Author: Tobias Stoeckmann Date: Tue Mar 3 18:04:08 2026 +0100 mkfs.minix: Simplify SIGALRM handler Calling printf is not signal safe and in general there are too many branches in alarm_intr for what it's used for. Check the signal flag outside of the handler and print messages when needed. Also, disable the alarm and reset the signal handling when it's not needed anymore. While at it, use correct formatter in printf. Signed-off-by: Tobias Stoeckmann (cherry picked from commit 7e1a93e8f5e58d6adf7bf79024b617c944724fd8) disk-utils/mkfs.minix.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 2a574240362abcc4345ae0d0efff75e7c971df55 Author: Karel Zak Date: Tue Mar 3 10:56:38 2026 +0100 lsmem: apply --sysroot prefix to all sysfs paths Tests fail on architectures where /sys/module/memory_hotplug/parameters/ memmap_on_memory does not exist (e.g., loong64), because lsmem reads from the real /sys instead of the --sysroot directory. - Route memmap_on_memory read through ul_path API with a local handler in print_summary(), so --sysroot prefix is respected. - Apply --sysroot prefix to sysmemconfig (/sys/firmware/memory) before the memory0 existence check. - Fix sysmemconfig memory leak (missing ul_unref_path). - Update expected test output (remove "Memmap on memory parameter" lines, not available in test dumps). Reported-by: Chris Hofstaedtler Signed-off-by: Karel Zak Tested-by: Sumanth Korikkar (cherry picked from commit e4e624530fd1b2939f0bee194f5e9e71c9da691b) sys-utils/lsmem.c | 49 +++++++++++++++++++++------------- tests/expected/lsmem/lsmem-s390-zvm-6g | 7 ----- tests/expected/lsmem/lsmem-x86_64-16g | 7 ----- 3 files changed, 31 insertions(+), 32 deletions(-) commit 4a3c91cfb191504abe31f34389da90f179bc40c6 Author: Karel Zak Date: Tue Mar 3 12:52:11 2026 +0100 tools/git-grouped-log: add co-author support Parse Co-authored-by and Co-Author trailers from commit bodies and display co-author names alongside the primary author. Signed-off-by: Karel Zak (cherry picked from commit b1baf61cc032d72020cf03b930d350d9ee56cafd) tools/git-grouped-log | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) commit 7c9d1e426c28868398d1ae5275d18b121487dc29 Author: Karel Zak Date: Tue Mar 3 12:00:43 2026 +0100 agetty: guard netlink-related code with AGETTY_RELOAD The struct issue nl field and related helper functions use types and headers (netaddrq.h, linux/netlink.h) that are only available when AGETTY_RELOAD is defined. Guard the .nl.fd initializations in main() and show_issue(), and wrap the netlink helper functions (print_iface_best, print_addrq_bestofall, dump_iface_good, dump_iface_all) with #ifdef AGETTY_RELOAD. This fixes compilation on systems without inotify/netlink support (e.g., GNU/Hurd). Co-authored-by: Samuel Thibault Signed-off-by: Karel Zak (cherry picked from commit b82c580054712607a20285130cfbf9d249256e01) term-utils/agetty.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 83ee5eeeee9e72ef8f1b347201dce75ed4acfd3d Author: Karel Zak Date: Tue Mar 3 11:42:55 2026 +0100 libblkid: guard loop device code with __linux__ in cache The is_loopdev() and loopdev_has_backing_file() functions from loopdev.h are Linux-specific. Guard the loop device cache cleanup in blkid_gc_cache() with __linux__ to allow compilation on non-Linux systems like GNU/Hurd. Co-authored-by: Samuel Thibault Signed-off-by: Karel Zak (cherry picked from commit 427df295a1fe9d99514c5e197f3f3e0a78c56adb) libblkid/src/cache.c | 3 +++ 1 file changed, 3 insertions(+) commit 7cb8d2d8f722110ff06268413d978bbc72ca1681 Author: Karel Zak Date: Tue Mar 3 11:41:50 2026 +0100 build-sys: move shells.c to common (non-Linux) sources shells.c uses POSIX setusershell()/getusershell()/endusershell() which are available on non-Linux systems (e.g., GNU/Hurd). Move it from the Linux-only section to common libcommon sources. The meson build already had shells.c in common sources, so only the autotools build needed fixing. Co-authored-by: Samuel Thibault Signed-off-by: Karel Zak (cherry picked from commit 1a7e3e2bb3a3041d1a453ca1f52a47ec7baef104) lib/Makemodule.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74b136627748565ed0e444648a13752a0ad720b1 Author: Karel Zak Date: Tue Mar 3 11:39:14 2026 +0100 build-sys: move netlink sources from libcommon to agetty The netlink and netaddrq sources use Linux-specific headers (linux/netlink.h, linux/rtnetlink.h) and cannot be compiled on non-Linux systems like GNU/Hurd. Move them out of libcommon and link directly into agetty (the only user), following the same pattern as plymouth-ctrl.c. Also move the corresponding test programs to the Linux-only section. Co-authored-by: Samuel Thibault Signed-off-by: Karel Zak (cherry picked from commit f6e4d10ea627705c9c68c372d47b1cb68425cbe7) lib/Makemodule.am | 20 +++++++++----------- lib/meson.build | 4 ++-- term-utils/Makemodule.am | 3 +++ term-utils/meson.build | 3 +++ 4 files changed, 17 insertions(+), 13 deletions(-) commit 2ef8d6fa603dca393639d2310c5faeb9dc6cd53f Author: Thomas Weißschuh Date: Sun Mar 1 12:10:39 2026 +0100 libblkid: (probe) Account for IO bias when retrieving buffer from parent The 'off' variable gets aligned to 'pr->io_size'. However when delegating to the parent prober, the value for 'off' from the original function parameter needs to be used. Undo the bias before calling into the parent prober. Fixes: 8a534253bc52 ("libblkid: (probe) read data in chunks") Closes: https://github.com/util-linux/util-linux/issues/4078 Signed-off-by: Thomas Weißschuh (cherry picked from commit dc47ed2f5f6a7736d7b5332d6fe7af6652cf0bd0) libblkid/src/probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e488a5c60cf6775770c23dd8a6116b6093ce4b9 Author: Tobias Stoeckmann Date: Thu Feb 26 22:11:28 2026 +0100 lib/pager: Drop less workaround This was fixed in less back in 2007. Let's follow git and drop the workaround. Taken from https://github.com/git/git/commit/e8320f350f523c3219ff8ec639663193941af57d Signed-off-by: Tobias Stoeckmann (cherry picked from commit 9edd83d120b82168442f1599f6917a04ed4dc1c0) lib/pager.c | 12 ------------ 1 file changed, 12 deletions(-) commit 7bf62a1c0f30f2e215f523ddf7ad43e5bf6ac35f Author: Tobias Stoeckmann Date: Thu Feb 26 22:10:40 2026 +0100 lib/pager: Add LV support Set LV environment variable to "-c" for lv support. Taken from https://github.com/git/git/commit/e54c1f2d2533c5406abeb8e3e0cf78c68ca9c21e Signed-off-by: Tobias Stoeckmann (cherry picked from commit ab613312dcb566a15b79c5accd74746c37f571ee) lib/pager.c | 2 ++ 1 file changed, 2 insertions(+) commit 27c89afb54e435bfeb79d03eef9b461996046887 Author: Tobias Stoeckmann Date: Thu Feb 26 22:08:57 2026 +0100 lib/pager: Do not overwrite LESS environment var If LESS is already set, do not overwrite it. Taken from https://github.com/git/git/commit/25fc1786ab147daa9ffa43ebcbaf5c1cc6e50d4f Signed-off-by: Tobias Stoeckmann (cherry picked from commit 45541fc392974f851c57c3a053b21e9788359552) lib/pager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39189ac3136056fd8535d0eed039612016febf6c Author: Tobias Stoeckmann Date: Tue Feb 24 21:43:16 2026 +0100 lib/fileeq: Check arithmetic in ul_fileeq_set_size Make sure that arithmetics do not overflow data types. Such overflows could occur with large hardlink options or on 32 bit systems with large files (due to size_t usage). If possible, reduce sizes so operations can continue successfully. Signed-off-by: Tobias Stoeckmann (cherry picked from commit 0e6b542b41e9681f70f7b90b2a96bce7beacd978) include/fileeq.h | 4 ++-- lib/fileeq.c | 32 +++++++++++++++++++++++--------- misc-utils/hardlink.c | 8 ++++++-- 3 files changed, 31 insertions(+), 13 deletions(-) commit 22f0c430b2f2c62fb5c3a6522f563cadfb9bf7d2 Author: Thomas Weißschuh Date: Thu Feb 26 17:55:58 2026 +0100 tests/lsfd: skip executable mode tests when not running as root This test does not necessarily work without root. Reported-by: Christian Hesse Signed-off-by: Thomas Weißschuh (cherry picked from commit 97cc11b16027a0694fcf25ae46a3116a658bec0d) tests/ts/lsfd/column-xmode | 4 ++++ 1 file changed, 4 insertions(+) commit 08a6f5e345561f971c5ba78cb8c0f5dd0b89d4f7 Author: Thomas Weißschuh Date: Thu Feb 26 17:52:44 2026 +0100 meson: define _GNU_SOURCE when testing for 'struct statx' glibc (at least with 2.43) requires _GNU_SOURCE to be defined to expose 'struct statx' from 'sys/stat.h'. Define _GNU_SOURCE in the feature test, so 'struct statx' is correctly detected. The code is being build with _GNU_SOURCE anyways. With autotools this happens automatically. Reported-by: Christian Hesse Signed-off-by: Thomas Weißschuh (cherry picked from commit 1f3644e5f1b08ba5374f8f50210ba3363c45e166) meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)