]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
3 months agoMerge branch 'fix/implicit_prev_shell_command' of https://github.com/cgoesche/util...
Karel Zak [Mon, 7 Apr 2025 12:11:05 +0000 (14:11 +0200)] 
Merge branch 'fix/implicit_prev_shell_command' of https://github.com/cgoesche/util-linux-fork

* 'fix/implicit_prev_shell_command' of https://github.com/cgoesche/util-linux-fork:
  more: fix implicit previous shell_line execution #3508

3 months agoMerge branch 'treewide--use-strtopid_or_err' of https://github.com/masatake/util...
Karel Zak [Mon, 7 Apr 2025 12:09:57 +0000 (14:09 +0200)] 
Merge branch 'treewide--use-strtopid_or_err' of https://github.com/masatake/util-linux

* 'treewide--use-strtopid_or_err' of https://github.com/masatake/util-linux:
  treewide: use strtopid_or_err()

3 months agoMerge branch 'PR/coverity' of https://github.com/karelzak/util-linux-work
Karel Zak [Mon, 7 Apr 2025 12:03:07 +0000 (14:03 +0200)] 
Merge branch 'PR/coverity' of https://github.com/karelzak/util-linux-work

* 'PR/coverity' of https://github.com/karelzak/util-linux-work:
  fdisk: fix possible memory leak
  fdformat: use size_t and ssize_t
  cfdisk: fix memory leak and possible NULL dereference [gcc-analyzer]

3 months agoMerge branch 'feat/add_secure_mode' of https://github.com/cgoesche/util-linux-fork
Karel Zak [Mon, 7 Apr 2025 12:02:45 +0000 (14:02 +0200)] 
Merge branch 'feat/add_secure_mode' of https://github.com/cgoesche/util-linux-fork

* 'feat/add_secure_mode' of https://github.com/cgoesche/util-linux-fork:
  more: Add MORESECURE and PAGERSECURE environment variables #3503

3 months agomore: fix implicit previous shell_line execution #3508
cgoesche [Sat, 5 Apr 2025 05:29:35 +0000 (01:29 -0400)] 
more: fix implicit previous shell_line execution #3508

run_shell() will implicitly execute the previous ctl->shell_line
not only if the function was indirectly invoked by the '.' command
but also by a subsequent '!' command.

Addresses: #3508
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
3 months agotreewide: use strtopid_or_err()
Masatake YAMATO [Fri, 4 Apr 2025 00:27:10 +0000 (09:27 +0900)] 
treewide: use strtopid_or_err()

Addresses: https://github.com/util-linux/util-linux/pull/3486
Suggested-by: Thomas Weißschuh <thomas@t-8ch.de>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
3 months agomore: Add MORESECURE and PAGERSECURE environment variables #3503
Christian Goeschel Ndjomouo [Thu, 3 Apr 2025 04:38:29 +0000 (00:38 -0400)] 
more: Add MORESECURE and PAGERSECURE environment variables #3503

Add MORESECURE and PAGERSECURE environment variables to run 'more' in secure mode,
which will effectively disable the _!_ and _v_ commands. This helps to prevent
unprivileged users from running arbitrary shell commands or file manipulations.

Addresses: #3503
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
3 months agofdisk: fix possible memory leak
Karel Zak [Tue, 25 Mar 2025 11:44:13 +0000 (12:44 +0100)] 
fdisk: fix possible memory leak

Signed-off-by: Karel Zak <kzak@redhat.com>
3 months agofdformat: use size_t and ssize_t
Karel Zak [Tue, 25 Mar 2025 11:23:35 +0000 (12:23 +0100)] 
fdformat: use size_t and ssize_t

Signed-off-by: Karel Zak <kzak@redhat.com>
3 months agocfdisk: fix memory leak and possible NULL dereference [gcc-analyzer]
Karel Zak [Tue, 25 Mar 2025 11:14:14 +0000 (12:14 +0100)] 
cfdisk: fix memory leak and possible NULL dereference [gcc-analyzer]

Signed-off-by: Karel Zak <kzak@redhat.com>
3 months agoMerge branch 'PR/Benno-31Mar' of https://github.com/karelzak/util-linux-work
Karel Zak [Thu, 3 Apr 2025 12:07:35 +0000 (14:07 +0200)] 
Merge branch 'PR/Benno-31Mar' of https://github.com/karelzak/util-linux-work

* 'PR/Benno-31Mar' of https://github.com/karelzak/util-linux-work:
  tests: update coresched tests
  coresched: reduce excessive whitespace and verbosity in usage text
  lsblk: (man) remove the incorrect spaces between the arguments of --ct
  hardlink: fix typoed semicolon to colon in error message
  findmnt: (man) remove duplicated option, and correct a description
  irqtop: improve several more option descriptions, and align them all
  irqtop: improve the description of --batch, and align it with others
  last: don't use a tab character in the --help usage text
  uclampset: simplify the synopsis in the --help usage text
  enosys: add the missing arguments of -s and -i to the usage text

3 months agosetarch: use strtopid_or_err()
Karel Zak [Thu, 3 Apr 2025 12:05:09 +0000 (14:05 +0200)] 
setarch: use strtopid_or_err()

Addresses: https://github.com/util-linux/util-linux/pull/3486
Signed-off-by: Karel Zak <kzak@redhat.com>
3 months agoMerge branch 'PR/fix-strcasecmp' of https://github.com/karelzak/util-linux-work
Karel Zak [Thu, 3 Apr 2025 08:00:16 +0000 (10:00 +0200)] 
Merge branch 'PR/fix-strcasecmp' of https://github.com/karelzak/util-linux-work

* 'PR/fix-strcasecmp' of https://github.com/karelzak/util-linux-work:
  treewide: avoid strcasecmp() for ASCII-only strings
  fdisk,partx: avoid strcasecmp() for ASCII-only strings
  libmount: avoid strcasecmp() for ASCII-only strings
  lsblk: avoid strcasecmp() for ASCII-only strings
  libfdisk: avoid strcasecmp() for ASCII-only strings
  libblkid: avoid strcasecmp() for ASCII-only strings
  include/cctype: fix string comparison

3 months agotests: update coresched tests
Karel Zak [Wed, 2 Apr 2025 11:17:07 +0000 (13:17 +0200)] 
tests: update coresched tests

References: fe62e0a1109e2a108d9a8868211875811b1935b3
Signed-off-by: Karel Zak <kzak@redhat.com>
3 months agocoresched: reduce excessive whitespace and verbosity in usage text
Benno Schulenberg [Mon, 31 Mar 2025 09:44:42 +0000 (11:44 +0200)] 
coresched: reduce excessive whitespace and verbosity in usage text

Also, use semicolons instead of periods in option descriptions.

And consistently use an uppercased "PID" in feedback messages.

CC: Phil Auld <pauld@redhat.com>
CC: Thijs Raymakers <thijs@raymakers.nl>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
3 months agolsblk: (man) remove the incorrect spaces between the arguments of --ct
Benno Schulenberg [Mon, 31 Mar 2025 09:44:41 +0000 (11:44 +0200)] 
lsblk: (man) remove the incorrect spaces between the arguments of --ct

Also, unabbreviate some needless abbreviations,
and improve some wordings and markup.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
3 months agohardlink: fix typoed semicolon to colon in error message
Benno Schulenberg [Mon, 31 Mar 2025 09:44:40 +0000 (11:44 +0200)] 
hardlink: fix typoed semicolon to colon in error message

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
3 months agofindmnt: (man) remove duplicated option, and correct a description
Benno Schulenberg [Mon, 31 Mar 2025 09:44:39 +0000 (11:44 +0200)] 
findmnt: (man) remove duplicated option, and correct a description

The page listed both '--shadowed' and '--shadow', while the description
of '--hyperlink' duplicated the possible values of the _mode_ argument
and mistakenly spoke of _when_.

Also, sort the options alphabetically and fix two bits of markup.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
3 months agoirqtop: improve several more option descriptions, and align them all
Benno Schulenberg [Mon, 31 Mar 2025 09:44:38 +0000 (11:44 +0200)] 
irqtop: improve several more option descriptions, and align them all

Keep at least two spaces between option+argument and its description,
while making sure not to go above 80 columns per line.

Also, improve the docstring (there is no need to mention that irqtop
is a utility) and remove the ugly Q from the list of interactive keys.

CC: Joe Jin <joe.jin@oracle.com>
CC: Zhenwei Pi <pizhenwei@bytedance.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
3 months agoirqtop: improve the description of --batch, and align it with others
Benno Schulenberg [Mon, 31 Mar 2025 09:44:37 +0000 (11:44 +0200)] 
irqtop: improve the description of --batch, and align it with others

Also improve the description of --delay and tweak the one of --json,
and align both descriptions with the preceding ones.

CC: Joe Jin <joe.jin@oracle.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
3 months agolast: don't use a tab character in the --help usage text
Benno Schulenberg [Mon, 31 Mar 2025 09:44:36 +0000 (11:44 +0200)] 
last: don't use a tab character in the --help usage text

Also, sort options -p and --time-format alphabetically,
like in the man page.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
3 months agouclampset: simplify the synopsis in the --help usage text
Benno Schulenberg [Mon, 31 Mar 2025 09:44:35 +0000 (11:44 +0200)] 
uclampset: simplify the synopsis in the --help usage text

The synopsis cannot express all possible forms of the command and still
stay readable, so do not even try.  Giving one, single synopsis is far
clearer.  Also, unabbreviate two words in the option descriptions.

Also, improve the markup and the wording in the man page.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
3 months agoenosys: add the missing arguments of -s and -i to the usage text
Benno Schulenberg [Mon, 31 Mar 2025 09:44:34 +0000 (11:44 +0200)] 
enosys: add the missing arguments of -s and -i to the usage text

Also, add a docstring, drop the redundant double dash from the synopsis,
add the missing -m option, and add a missing word to an error message.

CC: Thomas Weißschuh <thomas@t-8ch.de>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
4 months agotreewide: avoid strcasecmp() for ASCII-only strings
Karel Zak [Tue, 1 Apr 2025 15:45:01 +0000 (17:45 +0200)] 
treewide: avoid strcasecmp() for ASCII-only strings

Use cctype.h for locale-independent string comparison and to avoid
tricky string conversions like in tr_TR locales.

Fixes: https://github.com/util-linux/util-linux/issues/3490
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agofdisk,partx: avoid strcasecmp() for ASCII-only strings
Karel Zak [Tue, 1 Apr 2025 15:45:01 +0000 (17:45 +0200)] 
fdisk,partx: avoid strcasecmp() for ASCII-only strings

Use cctype.h for locale-independent string comparison and to avoid
tricky string conversions like in tr_TR locales.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agolibmount: avoid strcasecmp() for ASCII-only strings
Karel Zak [Tue, 1 Apr 2025 15:45:01 +0000 (17:45 +0200)] 
libmount: avoid strcasecmp() for ASCII-only strings

Use cctype.h for locale-independent string comparison and to avoid
tricky string conversions like in tr_TR locales.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agolsblk: avoid strcasecmp() for ASCII-only strings
Karel Zak [Tue, 1 Apr 2025 15:45:01 +0000 (17:45 +0200)] 
lsblk: avoid strcasecmp() for ASCII-only strings

Use cctype.h for locale-independent string comparison and to avoid
tricky string conversions like in tr_TR locales.

Fixes: https://github.com/util-linux/util-linux/issues/3490
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agolibfdisk: avoid strcasecmp() for ASCII-only strings
Karel Zak [Tue, 1 Apr 2025 15:45:01 +0000 (17:45 +0200)] 
libfdisk: avoid strcasecmp() for ASCII-only strings

Use cctype.h for locale-independent string comparison and to avoid
tricky string conversions like in tr_TR locales.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agolibblkid: avoid strcasecmp() for ASCII-only strings
Karel Zak [Tue, 1 Apr 2025 15:45:01 +0000 (17:45 +0200)] 
libblkid: avoid strcasecmp() for ASCII-only strings

Use cctype.h for locale-independent string comparison and to avoid
tricky string conversions like in tr_TR locales.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agoinclude/cctype: fix string comparison
Karel Zak [Wed, 2 Apr 2025 09:00:47 +0000 (11:00 +0200)] 
include/cctype: fix string comparison

Reimplement c_strcasecmp() and c_strncasecmp() to be libc compatible
and fix c_strncasecmp() to avoid \0 misinterpretation. The original
implementation was pretty stupid (sorry).

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agomkfs.bfs: fix memory leaks and weak code
Karel Zak [Tue, 1 Apr 2025 13:54:07 +0000 (15:54 +0200)] 
mkfs.bfs: fix memory leaks and weak code

- use size_t to store strlen() result
- init superblock with the default volume and fsname
- don't use strdup(), it's unnecessary as getopt_long() does not
  modify arguments
- don't use memcpy() as we need to check string sizes
- restrict verbose output 6 bytes

Addresses: https://github.com/util-linux/util-linux/pull/3488
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agotests: mark lsns/filer as TS_KNOWN_FAIL
Karel Zak [Tue, 18 Feb 2025 16:55:36 +0000 (17:55 +0100)] 
tests: mark lsns/filer as TS_KNOWN_FAIL

Let's make the test more robust for stable/ branch.

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

4 months agoMerge branch 'setarch--show-pid' of https://github.com/masatake/util-linux
Karel Zak [Tue, 1 Apr 2025 13:06:54 +0000 (15:06 +0200)] 
Merge branch 'setarch--show-pid' of https://github.com/masatake/util-linux

* 'setarch--show-pid' of https://github.com/masatake/util-linux:
  setarch: add -p/--pid option showing the personality of specified process
  procfs: add a helper function to access /proc/$pid/personality
  bash-completion: (setarch) show some options as the 1st arg

4 months agoMerge branch 'lsfd--bugfix-af-packet' of https://github.com/masatake/util-linux
Karel Zak [Tue, 1 Apr 2025 12:59:24 +0000 (14:59 +0200)] 
Merge branch 'lsfd--bugfix-af-packet' of https://github.com/masatake/util-linux

* 'lsfd--bugfix-af-packet' of https://github.com/masatake/util-linux:
  lsfd: (bug fix) scan the protocol field of /proc/net/packet as a hex number
  tests: (test_mkfds::mapped-packet-socket) add a new parameter, protocol
  lsfd: fix the description for PACKET.PROTOCOL column

4 months agoMerge branch 'master' of https://github.com/pls-no-hack/util-linux
Karel Zak [Tue, 1 Apr 2025 12:43:05 +0000 (14:43 +0200)] 
Merge branch 'master' of https://github.com/pls-no-hack/util-linux

* 'master' of https://github.com/pls-no-hack/util-linux:
  Fix typo in blkdiscard docs

4 months agoMerge branch 'remove-list-head-macro' of https://github.com/masatake/util-linux
Karel Zak [Tue, 1 Apr 2025 12:40:23 +0000 (14:40 +0200)] 
Merge branch 'remove-list-head-macro' of https://github.com/masatake/util-linux

* 'remove-list-head-macro' of https://github.com/masatake/util-linux:
  include/list,lsfd: remove LIST_HEAD macro again

4 months agolsns: enhance compilation without USE_NS_GET_API
Karel Zak [Tue, 1 Apr 2025 12:36:36 +0000 (14:36 +0200)] 
lsns: enhance compilation without USE_NS_GET_API

- Move add_namespace_for_nsfd() declaration to the #ifdef block
- Replace get_netnsid_for_fd() with inline code as it's used only once

References: 2ced43400f35f7bd45b29364e04166a63a06e16a
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agoMerge branch 'bugfix/undefined-reference-add_namespace_for_nsfd' of https://github...
Karel Zak [Tue, 1 Apr 2025 12:26:44 +0000 (14:26 +0200)] 
Merge branch 'bugfix/undefined-reference-add_namespace_for_nsfd' of https://github.com/ThomasDevoogdt/util-linux

* 'bugfix/undefined-reference-add_namespace_for_nsfd' of https://github.com/ThomasDevoogdt/util-linux:
  lsns: fix undefined reference to add_namespace_for_nsfd #3483

4 months agolsfd: (bug fix) scan the protocol field of /proc/net/packet as a hex number
Masatake YAMATO [Sun, 5 Jan 2025 18:30:25 +0000 (03:30 +0900)] 
lsfd: (bug fix) scan the protocol field of /proc/net/packet as a hex number

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
4 months agotests: (test_mkfds::mapped-packet-socket) add a new parameter, protocol
Masatake YAMATO [Sun, 5 Jan 2025 18:49:46 +0000 (03:49 +0900)] 
tests: (test_mkfds::mapped-packet-socket) add a new parameter, protocol

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
4 months agolsfd: fix the description for PACKET.PROTOCOL column
Masatake YAMATO [Sun, 5 Jan 2025 17:55:19 +0000 (02:55 +0900)] 
lsfd: fix the description for PACKET.PROTOCOL column

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
4 months agoFix typo in blkdiscard docs
pls-no-hack [Fri, 28 Mar 2025 13:52:49 +0000 (13:52 +0000)] 
Fix typo in blkdiscard docs

4 months agosetarch: add -p/--pid option showing the personality of specified process
Masatake YAMATO [Tue, 25 Mar 2025 19:49:02 +0000 (04:49 +0900)] 
setarch: add -p/--pid option showing the personality of specified process

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
4 months agoprocfs: add a helper function to access /proc/$pid/personality
Masatake YAMATO [Tue, 25 Mar 2025 19:44:14 +0000 (04:44 +0900)] 
procfs: add a helper function to access /proc/$pid/personality

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
4 months agobash-completion: (setarch) show some options as the 1st arg
Masatake YAMATO [Thu, 27 Mar 2025 20:41:47 +0000 (05:41 +0900)] 
bash-completion: (setarch) show some options as the 1st arg

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
4 months agomore: improve help readability
Karel Zak [Thu, 27 Mar 2025 09:58:24 +0000 (10:58 +0100)] 
more: improve help readability

The internal help can be printed within the current content. In this
case, it's hard to see where the help starts. Add a separator to make
it easier to read.

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agoipcs: align the first group of options with later ones in the usage text
Benno Schulenberg [Tue, 25 Mar 2025 10:43:05 +0000 (11:43 +0100)] 
ipcs: align the first group of options with later ones in the usage text

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
4 months agomkfs.cramfs: (man) mark arguments of -N and -l in bold, not italics
Benno Schulenberg [Tue, 25 Mar 2025 10:43:04 +0000 (11:43 +0100)] 
mkfs.cramfs: (man) mark arguments of -N and -l in bold, not italics

Those possible arguments are literal values, not placeholder words.

Also, improve the description of option -l.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
4 months agomkfs.cramfs: vertically align the option descriptions of the usage text
Benno Schulenberg [Tue, 25 Mar 2025 10:43:03 +0000 (11:43 +0100)] 
mkfs.cramfs: vertically align the option descriptions of the usage text

And trim unneeded whitespace.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
4 months agomkfs.cramfs: reduce the synopsis to the standard, succinct form
Benno Schulenberg [Tue, 25 Mar 2025 10:43:02 +0000 (11:43 +0100)] 
mkfs.cramfs: reduce the synopsis to the standard, succinct form

The old synopsis was 1) incomplete (mentioning -h and -v, but not
-V and -E and -z, for example), and 2) overlong, being wider than
80 columns.  So, change the synposis to what most other utilities
nowadays use: "<name> [options] <arguments>..." -- this makes it
much clearer what the two required arguments are.

Also, reshuffle the descriptions of the two arguments, to not hide
them among the options.

And remove the description of option -s, as listing an option that
does nothing is not helpful.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
4 months agoswapon: improve a translator hint, and remove a pointless one
Benno Schulenberg [Tue, 25 Mar 2025 10:43:01 +0000 (11:43 +0100)] 
swapon: improve a translator hint, and remove a pointless one

The reference to "each entry below" made no sense, as that second
translator hint is not before a gettextized message and therefore
did not make it into the POT file.  Gettextizing that message is
not useful as 1) there is nothing to translate, and 2) allowing
the translators to fiddle with the tabs is too complicated, and
3) the --summary output is deprecated anyway.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
4 months agofstrim: mark only the mountpoint as placeholder, not options -A and -a
Benno Schulenberg [Tue, 25 Mar 2025 10:43:00 +0000 (11:43 +0100)] 
fstrim: mark only the mountpoint as placeholder, not options -A and -a

Also, write "mountpoint" as one word here, because it's clearer.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
4 months agochmem: (man) add missing end-of-bold marker, and add missing OR bar
Benno Schulenberg [Tue, 25 Mar 2025 10:42:59 +0000 (11:42 +0100)] 
chmem: (man) add missing end-of-bold marker, and add missing OR bar

Also, use "EXAMPLES", in the plural, as there are four examples.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
4 months agochmem: print warnings about failures always (not only with --verbose)
Benno Schulenberg [Tue, 25 Mar 2025 10:42:58 +0000 (11:42 +0100)] 
chmem: print warnings about failures always (not only with --verbose)

This makes the handling of errors the same as some 90 lines down.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
4 months agoipcutils, lsipc: unabbreviate two words in some error messages
Benno Schulenberg [Tue, 25 Mar 2025 10:42:57 +0000 (11:42 +0100)] 
ipcutils, lsipc: unabbreviate two words in some error messages

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
4 months agoipcrm: in usage text, use two lines when option+arguments is very long
Benno Schulenberg [Tue, 25 Mar 2025 10:42:56 +0000 (11:42 +0100)] 
ipcrm: in usage text, use two lines when option+arguments is very long

Also, do not use tabs in the usage text, and keep it within 80 columns.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
4 months agoipcrm: move a constant argument in order to gettextize the message
Benno Schulenberg [Tue, 25 Mar 2025 10:42:55 +0000 (11:42 +0100)] 
ipcrm: move a constant argument in order to gettextize the message

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
4 months agoinclude/list,lsfd: remove LIST_HEAD macro again
Masatake YAMATO [Tue, 25 Mar 2025 18:36:50 +0000 (03:36 +0900)] 
include/list,lsfd: remove LIST_HEAD macro again

This reverts commit cafae2d19742ad56a05a51bb23b798dbbd5c62a8.
See 5d74cf0092b132bf224024548e46566033c84937 about the reason.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
4 months agolsns: fix undefined reference to add_namespace_for_nsfd #3483
Thomas Devoogdt [Tue, 25 Mar 2025 10:58:18 +0000 (11:58 +0100)] 
lsns: fix undefined reference to add_namespace_for_nsfd #3483

Fixes:

sys-utils/lsns-lsns.o: In function `read_process':
lsns.c:(.text+0x9e8): undefined reference to `add_namespace_for_nsfd'
collect2: error: ld returned 1 exit status

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
4 months agoMerge branch 'PR/meson-fix-manadocs' of https://github.com/karelzak/util-linux-work
Karel Zak [Tue, 25 Mar 2025 12:40:36 +0000 (13:40 +0100)] 
Merge branch 'PR/meson-fix-manadocs' of https://github.com/karelzak/util-linux-work

* 'PR/meson-fix-manadocs' of https://github.com/karelzak/util-linux-work:
  meson: fix manadocs for libsmartcols and libblkid

4 months agoMerge branch 'PR/libmount-fix-nocanonicalize' of https://github.com/karelzak/util...
Karel Zak [Tue, 25 Mar 2025 10:15:13 +0000 (11:15 +0100)] 
Merge branch 'PR/libmount-fix-nocanonicalize' of https://github.com/karelzak/util-linux-work

* 'PR/libmount-fix-nocanonicalize' of https://github.com/karelzak/util-linux-work:
  libmount: fix --no-canonicalize regression

4 months agomeson: fix manadocs for libsmartcols and libblkid
Karel Zak [Mon, 24 Mar 2025 14:18:24 +0000 (15:18 +0100)] 
meson: fix manadocs for libsmartcols and libblkid

Fixes: https://github.com/util-linux/util-linux/issues/3475
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agoMerge branch 'rtc-default' of https://github.com/Villemoes/util-linux
Karel Zak [Mon, 24 Mar 2025 14:05:42 +0000 (15:05 +0100)] 
Merge branch 'rtc-default' of https://github.com/Villemoes/util-linux

* 'rtc-default' of https://github.com/Villemoes/util-linux:
  Revert "hwclock-rtc.c: try the 'new' rtc class first"

4 months agoMerge branch 'PR/meson-poman-install' of https://github.com/karelzak/util-linux-work
Karel Zak [Mon, 24 Mar 2025 13:45:34 +0000 (14:45 +0100)] 
Merge branch 'PR/meson-poman-install' of https://github.com/karelzak/util-linux-work

* 'PR/meson-poman-install' of https://github.com/karelzak/util-linux-work:
  meson: fix po-man installation

4 months agoMerge branch 'PR/fix-non-widechar' of https://github.com/karelzak/util-linux-work
Karel Zak [Mon, 24 Mar 2025 13:44:46 +0000 (14:44 +0100)] 
Merge branch 'PR/fix-non-widechar' of https://github.com/karelzak/util-linux-work

* 'PR/fix-non-widechar' of https://github.com/karelzak/util-linux-work:
  misc: never include wchar.h
  autotools: don't use wide-character ncurses if --disable-widechar
  column: fix compiler warning for non-widechar compilation

4 months agoMerge branch 'fix-2nd-typo' of https://github.com/standby24x7/util-linux
Karel Zak [Mon, 24 Mar 2025 13:43:59 +0000 (14:43 +0100)] 
Merge branch 'fix-2nd-typo' of https://github.com/standby24x7/util-linux

* 'fix-2nd-typo' of https://github.com/standby24x7/util-linux:
  sys-utils/flock.c Fix a typo in flock.c

4 months agolibmount: fix --no-canonicalize regression
Karel Zak [Mon, 24 Mar 2025 13:31:05 +0000 (14:31 +0100)] 
libmount: fix --no-canonicalize regression

Fixes: https://github.com/util-linux/util-linux/issues/3474
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agosys-utils/flock.c Fix a typo in flock.c
Masanari Iida [Mon, 24 Mar 2025 09:21:48 +0000 (18:21 +0900)] 
sys-utils/flock.c Fix a typo in flock.c

This patch fixes a spelling typo in a message.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
4 months agolib/fileeq.c Fix a typo in message.
Masanari Iida [Mon, 24 Mar 2025 07:21:44 +0000 (16:21 +0900)] 
lib/fileeq.c Fix a typo in message.

This patch fixes a spelling typo in a command message.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
4 months agoirqtop: use output string in a more robust way
Karel Zak [Thu, 20 Mar 2025 13:28:17 +0000 (14:28 +0100)] 
irqtop: use output string in a more robust way

Reporte-by: Benno Schulenberg <bensberg@telfort.nl>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agolibsmartcols: report cells data size on debug
Karel Zak [Thu, 20 Mar 2025 13:19:52 +0000 (14:19 +0100)] 
libsmartcols: report cells data size on debug

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agoirqtop,lsirq: use scols debug
Karel Zak [Thu, 20 Mar 2025 13:18:14 +0000 (14:18 +0100)] 
irqtop,lsirq: use scols debug

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agomeson: fix po-man installation
Karel Zak [Thu, 20 Mar 2025 12:15:26 +0000 (13:15 +0100)] 
meson: fix po-man installation

* in po-man/meson.build use already defined mandir
* make sure $DESTDIR is used in the install script

Addresses: https://github.com/util-linux/util-linux/pull/3378
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agomisc: never include wchar.h
Karel Zak [Thu, 20 Mar 2025 10:57:06 +0000 (11:57 +0100)] 
misc: never include wchar.h

We have a portable "widechar.h" that follows --disable-widechar and
provides portability. It is a bug to directly include libc's wchar.h
or wctype.h.

Fixes: https://github.com/util-linux/util-linux/issues/3470
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agoautotools: don't use wide-character ncurses if --disable-widechar
Karel Zak [Thu, 20 Mar 2025 10:56:07 +0000 (11:56 +0100)] 
autotools: don't use wide-character ncurses if --disable-widechar

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agocolumn: fix compiler warning for non-widechar compilation
Karel Zak [Thu, 20 Mar 2025 10:53:59 +0000 (11:53 +0100)] 
column: fix compiler warning for non-widechar compilation

text-utils/column.c: In function ‘ansi_esc_width’:
text-utils/column.c:212:17: warning: case label value exceeds maximum value for type [-Wswitch-outside-range]

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agodocs: cherry-pick 2.41-ReleaseNotes
Karel Zak [Tue, 18 Mar 2025 13:52:34 +0000 (14:52 +0100)] 
docs: cherry-pick 2.41-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agobuild-sys: update release dates
Karel Zak [Tue, 18 Mar 2025 13:33:47 +0000 (14:33 +0100)] 
build-sys: update release dates

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agopo: update uk.po (from translationproject.org)
Yuri Chornoivan [Tue, 18 Mar 2025 13:33:43 +0000 (14:33 +0100)] 
po: update uk.po (from translationproject.org)

4 months agopo: update ro.po (from translationproject.org)
Remus-Gabriel Chelu [Tue, 18 Mar 2025 13:33:42 +0000 (14:33 +0100)] 
po: update ro.po (from translationproject.org)

4 months agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Tue, 18 Mar 2025 13:33:42 +0000 (14:33 +0100)] 
po: update pl.po (from translationproject.org)

4 months agopo: update nl.po (from translationproject.org)
Benno Schulenberg [Tue, 18 Mar 2025 13:33:42 +0000 (14:33 +0100)] 
po: update nl.po (from translationproject.org)

4 months agopo: update ko.po (from translationproject.org)
Seong-ho Cho [Tue, 18 Mar 2025 13:33:42 +0000 (14:33 +0100)] 
po: update ko.po (from translationproject.org)

4 months agopo: update hr.po (from translationproject.org)
Božidar Putanec [Tue, 18 Mar 2025 13:33:42 +0000 (14:33 +0100)] 
po: update hr.po (from translationproject.org)

4 months agopo: update fr.po (from translationproject.org)
Frédéric Marchal [Tue, 18 Mar 2025 13:33:42 +0000 (14:33 +0100)] 
po: update fr.po (from translationproject.org)

4 months agopo: update es.po (from translationproject.org)
Antonio Ceballos Roa [Tue, 18 Mar 2025 13:33:42 +0000 (14:33 +0100)] 
po: update es.po (from translationproject.org)

4 months agopo-man: merge changes
Karel Zak [Tue, 18 Mar 2025 13:33:40 +0000 (14:33 +0100)] 
po-man: merge changes

4 months agopo-man: add pl.po (from translationproject.org)
Michał Kułach [Tue, 18 Mar 2025 13:33:30 +0000 (14:33 +0100)] 
po-man: add pl.po (from translationproject.org)

4 months agopo-man: update uk.po (from translationproject.org)
Yuri Chornoivan [Tue, 18 Mar 2025 13:33:30 +0000 (14:33 +0100)] 
po-man: update uk.po (from translationproject.org)

4 months agopo-man: update ro.po (from translationproject.org)
Remus-Gabriel Chelu [Tue, 18 Mar 2025 13:33:30 +0000 (14:33 +0100)] 
po-man: update ro.po (from translationproject.org)

4 months agopo-man: update fr.po (from translationproject.org)
Frédéric Marchal [Tue, 18 Mar 2025 13:33:30 +0000 (14:33 +0100)] 
po-man: update fr.po (from translationproject.org)

4 months agopo-man: fix typos in configuration
Karel Zak [Tue, 18 Mar 2025 12:39:09 +0000 (13:39 +0100)] 
po-man: fix typos in configuration

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agoMerge branch 'PR/no_color' of https://github.com/karelzak/util-linux-work
Karel Zak [Tue, 18 Mar 2025 11:51:09 +0000 (12:51 +0100)] 
Merge branch 'PR/no_color' of https://github.com/karelzak/util-linux-work

* 'PR/no_color' of https://github.com/karelzak/util-linux-work:
  terminal-colors.d: support NO_COLOR

4 months agosu: (man) fix duplicate asterisk
Gaël PORTAY [Tue, 18 Mar 2025 08:58:32 +0000 (09:58 +0100)] 
su: (man) fix duplicate asterisk

Signed-off-by: Gaël PORTAY <gael.portay@rtone.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agoinclude: use public domain for colors.{c,h} and xalloc.h
Karel Zak [Mon, 17 Mar 2025 13:35:10 +0000 (14:35 +0100)] 
include: use public domain for colors.{c,h} and xalloc.h

The LGPL makes it difficult to use the code in the old BSD tools we
have in util-linux. After obtaining agreement from the major
contributors to the files, we are changing it to "Public Domain".

Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agounshare: fix typo in --map-groups=subids map name [coverity scan]
Karel Zak [Mon, 17 Mar 2025 12:55:06 +0000 (13:55 +0100)] 
unshare: fix typo in --map-groups=subids map name [coverity scan]

Addresses: https://github.com/util-linux/util-linux/pull/3121
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agoterminal-colors.d: support NO_COLOR
Karel Zak [Mon, 17 Mar 2025 12:38:20 +0000 (13:38 +0100)] 
terminal-colors.d: support NO_COLOR

We already provide the ability to easily disable output colorization,
but there is also the https://no-color.org initiative based on the
NO_COLOR environment variable. Let's support this method to disable
colors. Let's be friendly :-)

Addresses: https://github.com/util-linux/util-linux/issues/3463
Signed-off-by: Karel Zak <kzak@redhat.com>
4 months agoMerge branch 'PR/lscpu-risc' of https://github.com/karelzak/util-linux-work
Karel Zak [Mon, 17 Mar 2025 11:11:08 +0000 (12:11 +0100)] 
Merge branch 'PR/lscpu-risc' of https://github.com/karelzak/util-linux-work

* 'PR/lscpu-risc' of https://github.com/karelzak/util-linux-work:
  tests: (lscpu) update RISC-V tests to add ISA line
  lscpu: RISC-V: Print ISA information in summary

4 months agoMerge branch 'lsfd--revise-unix-endpoints' of https://github.com/masatake/util-linux
Karel Zak [Mon, 17 Mar 2025 11:10:26 +0000 (12:10 +0100)] 
Merge branch 'lsfd--revise-unix-endpoints' of https://github.com/masatake/util-linux

* 'lsfd--revise-unix-endpoints' of https://github.com/masatake/util-linux:
  lsfd: (man) fix a typo
  lsfd: add UNIX.IPEER column
  lsfd: fill ENDPOINTS column for UNIX one-way sockets
  include/list: add a macro for initializing list_head a declarative way
  lsfd: (refactor) add a helper function building ENDPOINTS strings for UNIX socket
  lsfd: add a dummy entry for UNIX socket having no peer to the IPC table
  tests: (lsfd::mkfds-unix-dgram, refactor) split the test into subtests
  tests: add ts_is_in_docker as a helper function
  lsfd: (man) fix a typo

4 months agomore: fix repeat command
Karel Zak [Mon, 17 Mar 2025 10:49:57 +0000 (11:49 +0100)] 
more: fix repeat command

The function more_key_command() may modify the current command setting.
We need to remember the original unmodified version, as specified by
the user, as the previous command; otherwise, the output will be affected
by unexpected cmd.number settings.

Simple reproducer:

 $ more -c /etc/passwd

 - Press <enter> to jump to the next line.
 - Press '.' to repeat the last command.

Old version:
 - It clears the screen and prints only one line (like the "1 <enter>" command).
Fixed version:
 - It jumps to the next line (like the "<enter>" command).

Reported-by: Benno Schulenberg <bensberg@telfort.nl>
Signed-off-by: Karel Zak <kzak@redhat.com>