]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
4 weeks agolibblkid: use snprintf() instead of sprintf() stable/v2.41
Karel Zak [Mon, 6 Oct 2025 13:04:24 +0000 (15:04 +0200)] 
libblkid: use snprintf() instead of sprintf()

Replace sprintf() calls with snprintf() to ensure proper bounds
checking when formatting strings.

In encode.c, the check now validates snprintf() return value instead
of pre-checking buffer size, providing more robust error handling.

In probe.c, snprintf() is used with proper size calculation based on
remaining buffer space.

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 041380f4ca7244df624bf7efdb5e27fdd3144175)

5 weeks agobash-completion: add bits to dist tarball
Karel Zak [Thu, 2 Oct 2025 11:38:13 +0000 (13:38 +0200)] 
bash-completion: add bits to dist tarball

The bits command was added in commit 6e1301d59 (text-utils: add bits
command) but the bash-completion file was not added to the autotools
Makemodule.am, causing it to be missing from release tarballs.

This resulted in meson build failures when using the tarball with
bash-completion installed, as meson.build references the file but
it doesn't exist in the tarball.

Fixes: https://github.com/util-linux/util-linux/issues/3766
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit eb0e08a76e3ebd4571b957e727847060304c32bb)

6 weeks agoFix meson "does not support the `+` operator" error.
Satadru Pramanik, DO, MPH, MEng [Tue, 23 Sep 2025 20:48:19 +0000 (16:48 -0400)] 
Fix meson "does not support the `+` operator" error.

Fixes #3761

6 weeks agobuild-sys: update release dates v2.41.2
Karel Zak [Mon, 22 Sep 2025 10:56:34 +0000 (12:56 +0200)] 
build-sys: update release dates

Signed-off-by: Karel Zak <kzak@redhat.com>
6 weeks agoupdate v2.41.2-ReleaseNotes
Karel Zak [Mon, 22 Sep 2025 10:56:03 +0000 (12:56 +0200)] 
update v2.41.2-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
6 weeks agopo: update uk.po (from translationproject.org)
Yuri Chornoivan [Mon, 22 Sep 2025 10:43:59 +0000 (12:43 +0200)] 
po: update uk.po (from translationproject.org)

6 weeks agopo: update ro.po (from translationproject.org)
Remus-Gabriel Chelu [Mon, 22 Sep 2025 10:43:59 +0000 (12:43 +0200)] 
po: update ro.po (from translationproject.org)

6 weeks agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Mon, 22 Sep 2025 10:43:59 +0000 (12:43 +0200)] 
po: update pl.po (from translationproject.org)

6 weeks agopo: update nl.po (from translationproject.org)
Benno Schulenberg [Mon, 22 Sep 2025 10:43:59 +0000 (12:43 +0200)] 
po: update nl.po (from translationproject.org)

6 weeks agopo: update ko.po (from translationproject.org)
Seong-ho Cho [Mon, 22 Sep 2025 10:43:58 +0000 (12:43 +0200)] 
po: update ko.po (from translationproject.org)

6 weeks agopo: update ja.po (from translationproject.org)
YOSHIDA Hideki [Mon, 22 Sep 2025 10:43:58 +0000 (12:43 +0200)] 
po: update ja.po (from translationproject.org)

6 weeks agopo: update hr.po (from translationproject.org)
Božidar Putanec [Mon, 22 Sep 2025 10:43:58 +0000 (12:43 +0200)] 
po: update hr.po (from translationproject.org)

6 weeks agopo: update fr.po (from translationproject.org)
Frédéric Marchal [Mon, 22 Sep 2025 10:43:58 +0000 (12:43 +0200)] 
po: update fr.po (from translationproject.org)

6 weeks agopo: update es.po (from translationproject.org)
Antonio Ceballos Roa [Mon, 22 Sep 2025 10:43:58 +0000 (12:43 +0200)] 
po: update es.po (from translationproject.org)

6 weeks agopo: update de.po (from translationproject.org)
Mario Blättermann [Mon, 22 Sep 2025 10:43:58 +0000 (12:43 +0200)] 
po: update de.po (from translationproject.org)

6 weeks agopo: update cs.po (from translationproject.org)
Petr Písař [Mon, 22 Sep 2025 10:43:58 +0000 (12:43 +0200)] 
po: update cs.po (from translationproject.org)

6 weeks agopo-man: merge changes
Karel Zak [Mon, 22 Sep 2025 10:43:57 +0000 (12:43 +0200)] 
po-man: merge changes

6 weeks agopo-man: update uk.po (from translationproject.org)
Yuri Chornoivan [Mon, 22 Sep 2025 10:43:51 +0000 (12:43 +0200)] 
po-man: update uk.po (from translationproject.org)

6 weeks agopo-man: update ro.po (from translationproject.org)
Remus-Gabriel Chelu [Mon, 22 Sep 2025 10:43:51 +0000 (12:43 +0200)] 
po-man: update ro.po (from translationproject.org)

6 weeks agopo-man: update pl.po (from translationproject.org)
Michał Kułach [Mon, 22 Sep 2025 10:43:51 +0000 (12:43 +0200)] 
po-man: update pl.po (from translationproject.org)

6 weeks agopo-man: update de.po (from translationproject.org)
Mario Blättermann [Mon, 22 Sep 2025 10:43:51 +0000 (12:43 +0200)] 
po-man: update de.po (from translationproject.org)

6 weeks agotools: add git-version-next script release versioning
Karel Zak [Mon, 22 Sep 2025 09:59:49 +0000 (11:59 +0200)] 
tools: add git-version-next script release versioning

- Only works on stable/* branches (releases are generated from stable branches)
- Supports util-linux versioning: vX.Y (major), vX.Y.Z (maintenance)
- Command-line options: --rc, --release-master, --release-update
- Safety check prevents --release-master on branches with existing releases
- Testing support via --last-release and --last-xy-release overrides

Version Schema:
  Major releases:      vX.Y-rc1, vX.Y-rc2, [vX.Y-rc3], vX.Y
  Maintenance releases: vX.Y.Z-rc1, vX.Y.Z

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 7c831bbad288cec55a49c09c3b9bc24370d04828)

7 weeks agolibblkid: Fix probe_ioctl_tp assigning BLKGETDISKSEQ as physical sector size
Sam Fink [Wed, 17 Sep 2025 14:04:51 +0000 (10:04 -0400)] 
libblkid: Fix probe_ioctl_tp assigning BLKGETDISKSEQ as physical sector size

Fix issue introduced by PR#2908 in probe_ioctl_tp where the BLKGETDISKSEQ ioctl
result is incorrectly assigned to the topology with
blkid_topology_set_physical_sector_size instead of blkid_topology_set_diskseq.

This issue was observed while using a Debian 13 container on a RHEL 9.4 host
attempting to format a volume. The physical sector size was incorrectly
reported as 3. This issue also presents with the fdisk command,
which also uses this library to resolve physical sector size of devices.

Example fdisk output:
root@r94p121-PA:~ # fdisk --list /dev/sdb
Disk /dev/sdb: 90 GiB, 96636764160 bytes, 188743680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 3 bytes
I/O size (minimum/optimal): 512 bytes / 3 bytes

Strace of relevant ioctls:
ioctl(3, BLKALIGNOFF, [0])              = 0
ioctl(3, BLKIOMIN, [512])               = 0
ioctl(3, BLKIOOPT, [0])                 = 0
ioctl(3, BLKPBSZGET, [512])             = 0
ioctl(3, BLKGETDISKSEQ, [3])            = 0
ioctl(3, BLKSSZGET, [512])              = 0

(cherry picked from commit 6fbde1c7db838e22b109e2e58eaa51b086758bc6)

7 weeks agoblkid: correct an erroneous error message
Benno Schulenberg [Tue, 16 Sep 2025 13:44:41 +0000 (15:44 +0200)] 
blkid: correct an erroneous error message

Running `blkid -p -n no /dev/sda2` would report:

  blkid: error: -u <list> argument is empty

(Mentioning -u instead of -n, and falsely claiming emptiness.)

Now the above command will report:

  blkid: invalid argument: no

(I don't think option -n needs to be mentioned, as it will be obvious
when inspecting the command line.  Not mentioning the option allows
reusing an existing error message, avoiding needless ballooning and
allowing the patch to be applied to the stable branch.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
(cherry picked from commit 6bbf884525cad2702b1e69a0ac022db3ef92154d)

7 weeks agofindmnt: (usage) add a needed equals sign before an optional argument
Benno Schulenberg [Thu, 11 Sep 2025 13:48:07 +0000 (15:48 +0200)] 
findmnt: (usage) add a needed equals sign before an optional argument

The argument of --kernel is optional, so an '=' is required when an
argument is specified.

Also tweak the wording, and add a semicolon between two phrases.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
(cherry picked from commit 41c1dc60903803c2a4d7f286012f8e96ff06990f)

8 weeks agobuild-sys: update release dates v2.41.2-rc1
Karel Zak [Thu, 11 Sep 2025 09:06:44 +0000 (11:06 +0200)] 
build-sys: update release dates

Signed-off-by: Karel Zak <kzak@redhat.com>
8 weeks agodocs: add v2.41.2-ReleaseNotes
Karel Zak [Thu, 11 Sep 2025 09:04:00 +0000 (11:04 +0200)] 
docs: add v2.41.2-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
8 weeks agopo-man: merge changes
Karel Zak [Thu, 11 Sep 2025 08:55:40 +0000 (10:55 +0200)] 
po-man: merge changes

8 weeks agopo-man: update es.po (from translationproject.org)
Antonio Ceballos Roa [Thu, 11 Sep 2025 08:55:31 +0000 (10:55 +0200)] 
po-man: update es.po (from translationproject.org)

8 weeks agolibmount: don't report fsconfig errors with "nofail"
Karel Zak [Thu, 11 Sep 2025 07:35:58 +0000 (09:35 +0200)] 
libmount: don't report fsconfig errors with "nofail"

The new kernel API returns EINVAL on FSCONFIG_CMD_CREATE if the mount
source is inaccessible. We do not want to report this as an error when
the "nofail" mount option is specified.

Note that EINVAL may also be returned by other fsconfig() settings, so
we need to check whether a source is specified and whether it is really
inaccessible. This is just a heuristic (as with the old mount(2)).

Fixes: https://github.com/util-linux/util-linux/issues/3741
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 8a7bc1ab00d91e8a17ca8cb2907ca3c2a73381dd)

8 weeks agolscpu: New Arm C1 parts
Jeremy Linton [Wed, 10 Sep 2025 14:51:21 +0000 (09:51 -0500)] 
lscpu: New Arm C1 parts

Arm has announced the C1-Nano with a TRM here:
https://developer.arm.com/documentation/107753/latest

The C1-Pro with a TRM here:
https://developer.arm.com/documentation/107771/latest

The C1-Ultra with a TRM here:
https://developer.arm.com/documentation/108014/latest

The C1-Premium with a TRM here:
https://developer.arm.com/documentation/109416/latest

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
(cherry picked from commit 50caf83d43fbee58ecb5a11e57857a027dea5148)

8 weeks agologger: fix buffer overflow when read stdin
Karel Zak [Wed, 10 Sep 2025 08:31:23 +0000 (10:31 +0200)] 
logger: fix buffer overflow when read stdin

$ perl -e 'print "<" . "0"x10240' | logger --prio-prefix
Segmentation fault (core dumped)

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit f9cdc91be0442b887e4a636fbb75f027f0267a84)

8 weeks agorev: add --zero option to --help output
Christian Goeschel Ndjomouo [Mon, 8 Sep 2025 19:48:01 +0000 (15:48 -0400)] 
rev: add --zero option to --help output

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
(cherry picked from commit d77118f46070f71eaafa3be1c7d24226ddcc2846)

8 weeks agolscpu: Add NVIDIA Olympus arm64 core
Matthew R. Ochs [Tue, 2 Sep 2025 20:28:36 +0000 (13:28 -0700)] 
lscpu: Add NVIDIA Olympus arm64 core

Add an entry for NVIDIA Olympus arm64 core.

Signed-off-by: Matthew R. Ochs <mochs@nvidia.com>
(cherry picked from commit 908777470d403ec30c525472ba0d3701c9c5a223)

8 weeks agohardlink: (man) add note note about ULFILEEQ_DEBUG=
Karel Zak [Wed, 3 Sep 2025 09:57:06 +0000 (11:57 +0200)] 
hardlink: (man) add note note about ULFILEEQ_DEBUG=

Addresses: https://github.com/util-linux/util-linux/discussions/3323
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit d073aab9d34eea205545c77222947691f4abf5aa)

8 weeks agolibfdisk: (script) improve separator usage in named-fields dump
Karel Zak [Wed, 3 Sep 2025 09:30:57 +0000 (11:30 +0200)] 
libfdisk: (script) improve separator usage in named-fields dump

Ensure that name=value pairs are separated by commas.

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit c5e6712f29c18659f8bd9a567dc7f849a2a3cf3b)

8 weeks agolibfdisk: (script) fix device name separator parsing
Karel Zak [Wed, 3 Sep 2025 08:54:06 +0000 (10:54 +0200)] 
libfdisk: (script) fix device name separator parsing

In the named-fields script format, the colon is used as the separator
between the device name and other values. The device name may also
contain colons. This commit ensures it is treated as a separator only
when there is a space before or after the colon.

Note that the device name is optional and may be omitted. There is no
escaping for problematic characters in the name. Use " : " as the
separator.

Fixes: https://github.com/util-linux/util-linux/issues/3723
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 4eab9175dfd62c1d1a0bbc43a49ca8a85e9adac7)

8 weeks agozramctl: ignore ENOENT when setting max_comp_streams
Jiang XueQian [Sat, 30 Aug 2025 09:02:59 +0000 (17:02 +0800)] 
zramctl: ignore ENOENT when setting max_comp_streams

The `max_comp_streams` attribute of zram devices has been deprecated and
all writes were silently ignored by the kernel since 2016. It was
finally removed in 6.15, causing zramctl to fail on ENOENT, when it
should just ignore the error.

Signed-off-by: Jiang XueQian <jiangxueqian@gmail.com>
(cherry picked from commit e4514111ebb6df5f22a0769a9dfb2338b9c6c81a)

8 weeks agofindmnt: add missing newline in --raw, --pair and --list output formats
Christian Goeschel Ndjomouo [Sat, 30 Aug 2025 02:41:04 +0000 (22:41 -0400)] 
findmnt: add missing newline in --raw, --pair and --list output formats

Addresses: #3711
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
(cherry picked from commit 5dfb06873eb07389cc2aa9276adb7791bb5f40ab)

8 weeks agoman: Fixed incorrect ipcrm options
Prasanna Paithankar [Fri, 29 Aug 2025 12:43:17 +0000 (18:13 +0530)] 
man: Fixed incorrect ipcrm options

Signed-off-by: Prasanna Paithankar <paithankarprasanna@gmail.com>
(cherry picked from commit 40d088c63ce7742180e7d7e813dcababd4c478f5)

8 weeks agosfdisk: reject spurious arguments for --reorder/--backup-pt-sectors
Thomas Weißschuh [Sun, 24 Aug 2025 09:45:45 +0000 (11:45 +0200)] 
sfdisk: reject spurious arguments for --reorder/--backup-pt-sectors

These commands only accept a single device argument.
Reject any additional unexpected arguments.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
(cherry picked from commit 3c98bdcc1f9b13de8a9d54d034efea789978c1f9)

8 weeks agogetopt: document special symbols that should not be used as option characters
cgoesche [Fri, 22 Aug 2025 21:31:24 +0000 (17:31 -0400)] 
getopt: document special symbols that should not be used as option characters

getopt(3) routines return `?` or `:` when an unknown option character is encountered
or an option is missing its required argument, respectively. It also disallows
`;` as an option character. Documenting this makes users aware that they may not use
these reserved symbols as option characters, e.g. `-?` which is used in some older programs.

Addresses: #2995
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
(cherry picked from commit 9b4f1ca3342bdff7e1c3d8eaf3735cf821f407bc)

8 weeks agozramctl: fix MEM-USED column description
Jérôme Poulin [Fri, 22 Aug 2025 03:54:17 +0000 (23:54 -0400)] 
zramctl: fix MEM-USED column description

The MEM-USED column was incorrectly documented as showing current
memory consumption. This is due to confusing naming in the kernel's
zram implementation:

- Kernel field "mem_used_total" (3rd in mm_stat) = current memory usage
- Kernel field "mem_used_max" (5th in mm_stat) = peak memory usage

zramctl maps these as:
- TOTAL column <= mem_used_total (current usage)
- MEM-USED column <= mem_used_max (peak usage)

The misleading "MEM-USED" name suggests current usage, but it actually
shows the peak memory usage (high water mark) since device creation
or last reset. This is tracked by the kernel's max_used_pages which
only increases when current usage exceeds the stored maximum.

Fixed description from:
"memory zram have been consumed to store compressed data" to
"peak memory usage to store compressed data".

Mise à jour de la traduction française.

(cherry picked from commit 616c88fb9565017c1a08c8869d2559b8d218c443)

8 weeks agoinclude/mount-api-utils: avoid using sys/mount.h
Karel Zak [Thu, 21 Aug 2025 07:59:10 +0000 (09:59 +0200)] 
include/mount-api-utils: avoid using sys/mount.h

The file is unnecessary and introduces duplicate #define of MS_* macros.

Fixes: https://github.com/util-linux/util-linux/issues/3674
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 2a9b48d20d74f65ac708b3bcee6a7e2a61aadf88)

8 weeks agoliblastlog2: markup fixes for man pages
Mario Blättermann [Thu, 21 Aug 2025 07:35:47 +0000 (09:35 +0200)] 
liblastlog2: markup fixes for man pages

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit d6c72456dc5e88fe124e0299840352d12ee8aa05)

8 weeks agologger: fix incorrect warning message when both --file and a message are specified
Alexander Kappner [Wed, 13 Aug 2025 11:10:28 +0000 (04:10 -0700)] 
logger: fix incorrect warning message when both --file and a message are specified

Logger warns that when both --file and a message are given, the message is ignored.
It does the opposite. Fix the warning message to conform to the observed behavior.

Example:
echo "You will not see this file in the log" > file.txt
logger -f file.txt "You will see this message in the log"

Signed-off-by: Alexander Kappner <agk@godking.net>
(cherry picked from commit 2a31355b11c3714cac2b6b60565b639aa32388f1)

8 weeks agomkfs.cramfs: avoid uninitialized value [coverity scan]
Karel Zak [Tue, 29 Jul 2025 09:40:16 +0000 (11:40 +0200)] 
mkfs.cramfs: avoid uninitialized value [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit c24654e0d5976fac7f785b8bf4f8217cc1df2772)

8 weeks agotests/helpers/test_sigstate.c: explicitly reset SIGINT to default action after trapping
Hongxu Jia [Mon, 28 Jul 2025 12:35:13 +0000 (20:35 +0800)] 
tests/helpers/test_sigstate.c: explicitly reset SIGINT to default action after trapping

After upgrading bash to 5.3 to contain commit [1], if SIGINT was trapped in
asynchronous subshell, bash called set_signal_async_ignored to make sure
processes that are created by this asynchronous subshell to ignore SIGINT.

And it caused test case `kill/decode' failed, the signal INT was existed in
both of Blocked and Ignored

$ ./tests/run.sh --use-system-commands --parsable --show-diff   kill/decode
...
diff-{{{
|--- /usr/lib/util-linux/ptest/tests/expected/kill/decode        2011-04-05 23:00:00.000000000 +0000
|+++ /usr/lib/util-linux/ptest/tests/output/kill/decode  2025-07-28 12:09:46.279000000 +0000
@@ -16,5 +16,5 @@
 Pending (thread): INT ILL
 Pending (process): USR1
 Blocked: INT ILL ABRT FPE USR1 SEGV TERM
-Ignored: HUP QUIT TRAP PIPE ALRM
+Ignored: HUP INT QUIT TRAP PIPE ALRM
 Caught: ILL USR1
}}}-diff
...

Explicitly reset SIGINT to default action after trapping, then the
test case `kill/decode' works on both of old (<5.3) and new (>=5.3) bash

[1] https://cgit.git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=a5d2617c7a7e602ace1f4149987cdfd075c4e762

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
(cherry picked from commit 6d46bbc0896b963486546d5d1b3d9241a2d5d0f8)

8 weeks agolibblkid: (ext) reduce false positive
胡玮文 [Mon, 28 Jul 2025 06:32:13 +0000 (14:32 +0800)] 
libblkid: (ext) reduce false positive

Signed-off-by: 胡玮文 <huweiwen.hww@alibaba-inc.com>
(cherry picked from commit 0c5d55e52d27be933e9e61b82bd386943bd9e05c)

8 weeks agosetpriv: Improve getgroups() Portability
Karel Zak [Mon, 21 Jul 2025 06:16:25 +0000 (08:16 +0200)] 
setpriv: Improve getgroups() Portability

setpriv(1) is Linux-only, and on Linux, getgroups() returns at least one group.
However, it's better to use more portable and generic code patterns and assume
that getgroups() can return zero.

Fixes: https://github.com/util-linux/util-linux/issues/3654
Reported-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 434a5633a563066357bbc3f331838ed41041ec1a)

8 weeks agolibblkid: improve UUID_SUB= description
Karel Zak [Thu, 24 Jul 2025 10:48:00 +0000 (12:48 +0200)] 
libblkid: improve UUID_SUB= description

Fixes: https://github.com/util-linux/util-linux/issues/3657
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit fc56a4c50a009ea6850f6c585cbbd53819399ed4)

8 weeks agofsck.cramfs: check buffer size for memcpy()
Karel Zak [Mon, 21 Jul 2025 07:48:06 +0000 (09:48 +0200)] 
fsck.cramfs: check buffer size for memcpy()

- reuse MAX_INPUT_NAMELEN
- check path buffer size before memcpy() to the buffer
- check for zero path before use it

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit caf79c6073bed928653ed4a8c495c5f111973afb)

8 weeks agotests: add color names test
Karel Zak [Mon, 25 Aug 2025 11:07:21 +0000 (13:07 +0200)] 
tests: add color names test

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 36a3c19e9a10afe83c9f3e6570521ad4ad252ef2)

8 weeks agolib/color-names: fix stupid bugs
Karel Zak [Mon, 25 Aug 2025 10:05:01 +0000 (12:05 +0200)] 
lib/color-names: fix stupid bugs

- sort "white" -> "yellow"
- fix typo "lightgray,"

Fixes: https://github.com/util-linux/util-linux/issues/2863
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 1b9e3ffd2e4e1e18c6056c572547e1803923487e)

8 weeks agolib/color-names: Fix color name canonicalization
Karel Zak [Tue, 15 Jul 2025 13:35:05 +0000 (15:35 +0200)] 
lib/color-names: Fix color name canonicalization

Return NULL rather than a random string if it cannot be translated to
the color sequence.

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 44ebe68c24da0bcf5aa1f48017d47d2d8995b0ed)

8 weeks agolib/path: avoid double free() for cpusets
Karel Zak [Wed, 2 Jul 2025 10:25:45 +0000 (12:25 +0200)] 
lib/path: avoid double free() for cpusets

Addresses: https://github.com/util-linux/util-linux/issues/3641
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 4581ede384f22983d6155768635ce43cb5304cb0)

8 weeks agolsblk: fix possible use-after-free
Karel Zak [Wed, 2 Jul 2025 09:48:22 +0000 (11:48 +0200)] 
lsblk: fix possible use-after-free

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 02955d9434396df4019132351d8264b74811dc3f)

8 weeks agobash-completion: fix function name of enosys completion
Koichi Murase [Tue, 1 Jul 2025 13:39:23 +0000 (22:39 +0900)] 
bash-completion: fix function name of enosys completion

The function "_enosys_module" referenced by the completion setting on
the last line of "bash-completion/enosys" is not defined in the
current master.  As reported in Ref. [1], this causes the following
error on an attempt at argument completion for the "enosys" command:

  bash: _enosys_module: command not found

[1] https://www.reddit.com/r/Fedora/comments/1llmu0w/comment/n00y98k/

Also, the function "_waitpid_module" defined in
"bash-completion/enosys" overwrites another completion function of the
same name defined in "bash-completion/waitpid".  This patch renames
the function in "bash-completion/enosys" to the correct one,
"_enosys_module".

(cherry picked from commit c83058dcd3a4dc703d64e245eff2d5db281a1b79)

8 weeks agolsblk: fix memory leak [coverity scan]
Karel Zak [Tue, 1 Jul 2025 08:00:19 +0000 (10:00 +0200)] 
lsblk: fix memory leak [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit b13f60104b646b45dc9bf43408e6fdec03382ad9)

8 weeks agoman: Replace RETURN VALUE with EXIT STATUS in section 1
Jesse Rosenstock [Mon, 30 Jun 2025 18:32:49 +0000 (20:32 +0200)] 
man: Replace RETURN VALUE with EXIT STATUS in section 1

According to man-pages(7), sections 1 and 8 should normally use
EXIT STATUS, while sections 2 and 3 should use RETURN VALUE.

https://man7.org/linux/man-pages/man7/man-pages.7.html

Signed-off-by: Jesse Rosenstock <jmr@google.com>
(cherry picked from commit 9dc97c99ae5b501a941dd31485671309a8f94573)

8 weeks agomore: temporarily ignore stdin when waiting for stderr
Karel Zak [Mon, 30 Jun 2025 10:20:13 +0000 (12:20 +0200)] 
more: temporarily ignore stdin when waiting for stderr

more waits for user commands on stderr, but at the same time, it
monitors sigalfd and stdin (for data and POLLHUP|POLLNVAL). We need to
temporarily ignore stdin if there is new data waiting for read()
(e.g., dmesg | more); otherwise, more_key_command() will end in a busy
loop.

Fixes: https://github.com/util-linux/util-linux/issues/3634
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 85cbb5f5449be75d51b064681f0d92adf31f59be)

8 weeks agolib/strutils: add ul_ prefix to strrep() and strrem() functions
Karel Zak [Mon, 30 Jun 2025 09:15:30 +0000 (11:15 +0200)] 
lib/strutils: add ul_ prefix to strrep() and strrem() functions

Addresses: https://github.com/util-linux/util-linux/issues/3626
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 7bb1151e559710f18682454384c99d7cd67f35fb)

8 weeks agolib/strutils: add ul_ prefix to split() function
Karel Zak [Mon, 30 Jun 2025 09:15:30 +0000 (11:15 +0200)] 
lib/strutils: add ul_ prefix to split() function

Addresses: https://github.com/util-linux/util-linux/issues/3626
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 6b627aa34d2977eb347b32040c1c3075daad3d1d)

8 weeks agolib/strutils: add ul_ prefix to strappend() functions
Karel Zak [Mon, 30 Jun 2025 09:15:30 +0000 (11:15 +0200)] 
lib/strutils: add ul_ prefix to strappend() functions

Addresses: https://github.com/util-linux/util-linux/issues/3626
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit d42e5e4bc355277b820d98768e2fda52e2d08e76)

8 weeks agolib/strutils: add ul_ prefix to strconcat() functions
Karel Zak [Mon, 30 Jun 2025 09:15:30 +0000 (11:15 +0200)] 
lib/strutils: add ul_ prefix to strconcat() functions

Addresses: https://github.com/util-linux/util-linux/issues/3626
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit c128ee3ea488174230065f6a35286e01e98996f8)

8 weeks agolsblk: use md as fallback TYPE when md/level empty
codefiles [Sat, 28 Jun 2025 00:53:16 +0000 (20:53 -0400)] 
lsblk: use md as fallback TYPE when md/level empty

(cherry picked from commit 6bed45b965b22c8ea5c10c43320c19cf84fd8cfa)

8 weeks agogitignore: Ignore tests/diff/ and test/output/
Jesse Rosenstock [Fri, 27 Jun 2025 08:27:25 +0000 (10:27 +0200)] 
gitignore: Ignore tests/diff/ and test/output/

These are auto-generated and clutter git status.
It's even worse with jj, which will auto-add them.

Signed-off-by: Jesse Rosenstock <jmr@google.com>
(cherry picked from commit e9c21d2977ac480cec72720515630a1b0b8038d0)

8 weeks agolib/strutils: add ul_ prefix to startswith() and endswith()
Karel Zak [Mon, 30 Jun 2025 09:15:30 +0000 (11:15 +0200)] 
lib/strutils: add ul_ prefix to startswith() and endswith()

Addresses: https://github.com/util-linux/util-linux/issues/3626
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit aa07db0ac1449627b3926669b052b07a1d3986ca)

8 weeks agolib/strv: use ul_ prefix for strv functions
Karel Zak [Thu, 26 Jun 2025 11:47:00 +0000 (13:47 +0200)] 
lib/strv: use ul_ prefix for strv functions

The functions are originally from systemd/udev, so it's possible that
during static linking, they may collide with other systemd-based
components.

Fixes: https://github.com/util-linux/util-linux/issues/3626
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit f39ffccf2b9b8dcaaf2069346cc50735c2f0f95d)

8 weeks agobash-completion: add choom and coresched
Karel Zak [Thu, 26 Jun 2025 09:14:11 +0000 (11:14 +0200)] 
bash-completion: add choom and coresched

Addresses: https://github.com/util-linux/util-linux/issues/3469
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit ba5c614edc4407d5dacea6ce29c0a41f39883f02)

8 weeks agoAdd missing ;; to -m case (#1)
Nate Drake [Wed, 25 Jun 2025 22:39:05 +0000 (18:39 -0400)] 
Add missing ;; to -m case (#1)

(cherry picked from commit 565eb6370c76721bbd0d7fa292d9315a6856f627)

4 months agoldattach: add ifndef BOTHER
Karel Zak [Tue, 24 Jun 2025 09:14:29 +0000 (11:14 +0200)] 
ldattach: add ifndef BOTHER

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 5405c3e09057db82ed397e61443effa9614dbc4a)

4 months agobuild-sys: update release dates v2.41.1
Karel Zak [Tue, 24 Jun 2025 07:55:28 +0000 (09:55 +0200)] 
build-sys: update release dates

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agodocs: add v2.41.1-ReleaseNotes
Karel Zak [Tue, 24 Jun 2025 07:54:20 +0000 (09:54 +0200)] 
docs: add v2.41.1-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agopo: update uk.po (from translationproject.org)
Yuri Chornoivan [Mon, 23 Jun 2025 11:48:07 +0000 (13:48 +0200)] 
po: update uk.po (from translationproject.org)

4 months agopo: update sr.po (from translationproject.org)
Мирослав Николић [Mon, 23 Jun 2025 11:48:07 +0000 (13:48 +0200)] 
po: update sr.po (from translationproject.org)

4 months agopo: update ro.po (from translationproject.org)
Remus-Gabriel Chelu [Mon, 23 Jun 2025 11:48:07 +0000 (13:48 +0200)] 
po: update ro.po (from translationproject.org)

4 months agopo: update pt.po (from translationproject.org)
Pedro Albuquerque [Mon, 23 Jun 2025 11:48:07 +0000 (13:48 +0200)] 
po: update pt.po (from translationproject.org)

4 months agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Mon, 23 Jun 2025 11:48:06 +0000 (13:48 +0200)] 
po: update pl.po (from translationproject.org)

4 months agopo: update nl.po (from translationproject.org)
Benno Schulenberg [Mon, 23 Jun 2025 11:48:06 +0000 (13:48 +0200)] 
po: update nl.po (from translationproject.org)

4 months agopo: update ja.po (from translationproject.org)
YOSHIDA Hideki [Mon, 23 Jun 2025 11:48:06 +0000 (13:48 +0200)] 
po: update ja.po (from translationproject.org)

4 months agopo: update hr.po (from translationproject.org)
Božidar Putanec [Mon, 23 Jun 2025 11:48:06 +0000 (13:48 +0200)] 
po: update hr.po (from translationproject.org)

4 months agopo: update fr.po (from translationproject.org)
Frédéric Marchal [Mon, 23 Jun 2025 11:48:06 +0000 (13:48 +0200)] 
po: update fr.po (from translationproject.org)

4 months agopo: update es.po (from translationproject.org)
Antonio Ceballos Roa [Mon, 23 Jun 2025 11:48:06 +0000 (13:48 +0200)] 
po: update es.po (from translationproject.org)

4 months agopo: update de.po (from translationproject.org)
Mario Blättermann [Mon, 23 Jun 2025 11:48:06 +0000 (13:48 +0200)] 
po: update de.po (from translationproject.org)

4 months agopo: update cs.po (from translationproject.org)
Petr Písař [Mon, 23 Jun 2025 11:48:06 +0000 (13:48 +0200)] 
po: update cs.po (from translationproject.org)

4 months agopo-man: merge changes
Karel Zak [Mon, 23 Jun 2025 11:48:04 +0000 (13:48 +0200)] 
po-man: merge changes

4 months agopo-man: update sr.po (from translationproject.org)
Мирослав Николић [Mon, 23 Jun 2025 11:47:54 +0000 (13:47 +0200)] 
po-man: update sr.po (from translationproject.org)

4 months agopo-man: update de.po (from translationproject.org)
Mario Blättermann [Mon, 23 Jun 2025 11:47:54 +0000 (13:47 +0200)] 
po-man: update de.po (from translationproject.org)

4 months agohardlink: define more function as inline
Karel Zak [Tue, 29 Apr 2025 10:50:48 +0000 (12:50 +0200)] 
hardlink: define more function as inline

The functions are called many times.

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 5ef57d519fed61c501f1868348dcdfb31d3e2426)

4 months agohardlink: fix performance regression (inefficient signal evaluation)
Karel Zak [Tue, 29 Apr 2025 10:29:32 +0000 (12:29 +0200)] 
hardlink: fix performance regression (inefficient signal evaluation)

During work on better verbose output, I found a regression between
v2.40 and v2.41 (and v2.42). In the new version, hardlink is 3-4 times
slower.

The problem is in the function where we verify signals. It calls the
function signal() even though no signal is delivered. It's called in
code loops where hardlink scans files, making it a performance-sensitive
area.

Another significant performance improvement is using an inline function
for handle_interrupt().

This simple patch improves hardlink performance by 10 times.

Fixes: http://github.com/util-linux/util-linux/commit/1453200e22dd4ec858be027653c167225f2fb358
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 87831fa19e241803f93556cbeaad153e6ba89b6c)

4 months agohardlink: Use macro for verbose output
Karel Zak [Tue, 29 Apr 2025 09:49:23 +0000 (11:49 +0200)] 
hardlink: Use macro for verbose output

Now that jlog() is a function, all gettext() arguments are evaluated
in all cases, including when output is unnecessary due to --quiet or
low verbose mode.

Fixes: https://github.com/util-linux/util-linux/issues/3548
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 5a2600c55f278c1252708cb3bdede92e27ccd04e)

4 months agolibblkid: Fix crash while parsing config with libeconf
Stanislav Brabec [Fri, 16 May 2025 01:10:14 +0000 (03:10 +0200)] 
libblkid: Fix crash while parsing config with libeconf

As the whole econf_file structure is freed by econf_free(file) at the end
of blkid_read_config(), econf_file structure cannot be defined as static
and initialized only once. The econf_free() is not robust enough and keeps
a pointer to the garbage after the first call of blkid_read_config(). And
if /etc/blkid.conf does not exist, it is called second time.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Cc: Stefan Schubert <schubi@suse.de>
Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1242705
(cherry picked from commit 284527cff2bd22da2924881a4a4833049dca0d2e)

4 months agoDo not call exit() on code ending in shared libraries
Cristian Rodríguez [Sat, 17 May 2025 19:07:02 +0000 (15:07 -0400)] 
Do not call exit() on code ending in shared libraries

It is not cool to call atexit() handlers of unknown
applications from shared libraries, use _exit instead.

Signed-off-by: Cristian Rodríguez <cristian@rodriguez.im>
(cherry picked from commit 765b9259fa75e7cab64de4bcfdd2f49cb63efedb)

4 months agolscpu: fix possible buffer overflow in cpuinfo parser
Karel Zak [Tue, 20 May 2025 08:10:59 +0000 (10:10 +0200)] 
lscpu: fix possible buffer overflow in cpuinfo parser

Addresses: https://github.com/util-linux/util-linux/pull/3577
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit ea04d719352add738251446315cebdada90171a9)

4 months agolsblk: use ID_PART_ENTRY_SCHEME as fallback for PTTYPE
Karel Zak [Thu, 22 May 2025 08:01:03 +0000 (10:01 +0200)] 
lsblk: use ID_PART_ENTRY_SCHEME as fallback for PTTYPE

The udev database typically inherits the ID_PART_TABLE_TYPE property
from the entire disk device to its partitions. However, in some cases,
this property may be missing. Fortunately, blkid/udev also provides
ID_PART_ENTRY_SCHEME for all partitions.

Fixes: https://github.com/util-linux/util-linux/issues/3570
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 23a7e0865ad56c46a69084974182b9979592b867)

4 months agolscpu: Fix loongarch op-mode output with recent kernel
Xi Ruoyao [Thu, 22 May 2025 05:04:48 +0000 (13:04 +0800)] 
lscpu: Fix loongarch op-mode output with recent kernel

Since Linux-6.12, the "loongarch32" item in the ISA field is separated
to "loongarch32r" and "loongarch32s," breaking our expectation.

Link: https://git.kernel.org/torvalds/c/34e3c4500cdc
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
(cherry picked from commit 5aa7ad17fc17b9458ff4381294c27d176c651d5d)

4 months agoremove two leftover license lines from colors.{c,h}
Benno Schulenberg [Mon, 2 Jun 2025 14:14:31 +0000 (16:14 +0200)] 
remove two leftover license lines from colors.{c,h}

Last March, commit 549a517857 replaced the SPDX line in three files
with a "No copyright is claimed" phrase, but forgot to remove from
two of those files the text lines that correspond to the SPDX.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
(cherry picked from commit ca7b55217d3100ee2a1a7874fd643726bb2df04f)

4 months agoremove "Copyright (C) ...." notes from files that claim no copyright
Benno Schulenberg [Mon, 2 Jun 2025 14:14:32 +0000 (16:14 +0200)] 
remove "Copyright (C) ...." notes from files that claim no copyright

Replace them with a "Written by" or "Authors:" label.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
(cherry picked from commit 44da1cb11db3db73898918969a5c33f825458278)

4 months agocorrect the full name of the GPL in various files
Benno Schulenberg [Mon, 2 Jun 2025 14:14:33 +0000 (16:14 +0200)] 
correct the full name of the GPL in various files

Last year, commit f4cb44bd11 corrected the full name of the GPL in
a dozen files, but still left the mistaken name in eight places.

(Also, in the first file, just reshuffle the license line, to be
in the same position as in other files.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
(cherry picked from commit c4b2b66bad23e605dd6392921d0750770145e4a1)