Changes between v2.39.1 and v2.39.2 -------------------------------------------- commit 4d3079ad4644920cd27ad026f70b7bb2ddf80e10 Author: Karel Zak Date: Thu Aug 17 11:05:49 2023 +0200 build-sys: release++ (v2.39.2) Signed-off-by: Karel Zak NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 9dc7d9808a08484d5a6ef2d272a21216a30aa836 Author: Karel Zak Date: Thu Aug 17 11:04:21 2023 +0200 docs: update v2.39.2-ReleaseNotes Signed-off-by: Karel Zak Documentation/releases/v2.39.2-ReleaseNotes | 56 +++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit 4ffb7ac7ced44319d2ceae2713d7ce9386934968 Author: Karel Zak Date: Thu Aug 17 11:00:54 2023 +0200 docs: update AUTHORS file Signed-off-by: Karel Zak AUTHORS | 2 ++ 1 file changed, 2 insertions(+) commit 20781132f0e1d0e11a5b8371dc278af3f90a9336 Author: Karel Zak Date: Thu Aug 17 10:57:14 2023 +0200 po-man: merge changes Signed-off-by: Karel Zak po-man/cs.po | 1685 +-- po-man/de.po | 1731 +-- po-man/es.po | 1729 +-- po-man/fr.po | 1714 +-- po-man/pt_BR.po | 1685 +-- po-man/sr.po | 29273 ++++++++++++++++++++++++++++++++++---------- po-man/uk.po | 1715 +-- po-man/util-linux-man.pot | 1686 +-- 8 files changed, 28860 insertions(+), 12358 deletions(-) commit 76228ce1ceca268cf1343decb45410c19db91f23 Author: Karel Zak Date: Thu Aug 17 10:57:06 2023 +0200 po: merge changes Signed-off-by: Karel Zak po/ca.po | 302 ++++++++++---------- po/cs.po | 302 ++++++++++---------- po/da.po | 302 ++++++++++---------- po/de.po | 302 ++++++++++---------- po/es.po | 817 ++++++++++++++++++++++++++++-------------------------- po/et.po | 300 ++++++++++---------- po/eu.po | 300 ++++++++++---------- po/fi.po | 300 ++++++++++---------- po/fr.po | 302 ++++++++++---------- po/gl.po | 300 ++++++++++---------- po/hr.po | 817 ++++++++++++++++++++++++++++-------------------------- po/hu.po | 300 ++++++++++---------- po/id.po | 300 ++++++++++---------- po/it.po | 300 ++++++++++---------- po/ja.po | 815 +++++++++++++++++++++++++++-------------------------- po/ko.po | 302 ++++++++++---------- po/nl.po | 301 ++++++++++---------- po/pl.po | 302 ++++++++++---------- po/pt.po | 302 ++++++++++---------- po/pt_BR.po | 302 ++++++++++---------- po/ru.po | 300 ++++++++++---------- po/sk.po | 297 ++++++++++---------- po/sl.po | 300 ++++++++++---------- po/sr.po | 817 ++++++++++++++++++++++++++++-------------------------- po/sv.po | 302 ++++++++++---------- po/tr.po | 302 ++++++++++---------- po/uk.po | 302 ++++++++++---------- po/util-linux.pot | 297 ++++++++++---------- po/vi.po | 301 ++++++++++---------- po/zh_CN.po | 302 ++++++++++---------- po/zh_TW.po | 300 ++++++++++---------- 31 files changed, 5937 insertions(+), 5451 deletions(-) commit 86c851c27d19993ca47cc49eed82cf8b7bdb69d4 Author: Мирослав Николић Date: Thu Aug 17 10:45:20 2023 +0200 po-man: update sr.po (from translationproject.org) po-man/sr.po | 30283 +++++++++++++-------------------------------------------- 1 file changed, 7023 insertions(+), 23260 deletions(-) commit c695dce976e388ae8771767fbf2c5f3db010c2bd Author: Мирослав Николић Date: Thu Aug 17 10:44:54 2023 +0200 po: update sr.po (from translationproject.org) po/sr.po | 2926 ++++++++++++++++++++++---------------------------------------- 1 file changed, 1043 insertions(+), 1883 deletions(-) commit b168eef36b1694dcc4104f9323b4ad9d7437315d Author: Takeshi Hamasaki Date: Thu Aug 17 10:44:54 2023 +0200 po: update ja.po (from translationproject.org) po/ja.po | 715 ++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 339 insertions(+), 376 deletions(-) commit 83557da346ae88bf1ac0a8f9913d9c93c2cb23b2 Author: Božidar Putanec Date: Thu Aug 17 10:44:54 2023 +0200 po: update hr.po (from translationproject.org) po/hr.po | 649 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 322 insertions(+), 327 deletions(-) commit 5495eeb64e13d6e2601c735cffd36a5022e6652b Author: Antonio Ceballos Roa Date: Thu Aug 17 10:44:53 2023 +0200 po: update es.po (from translationproject.org) po/es.po | 917 +++++++++++++++++++++++++++------------------------------------ 1 file changed, 397 insertions(+), 520 deletions(-) commit 7de55c1ea7296d57d2676aa64de5081ed61164be Author: Karel Zak Date: Tue Aug 15 11:33:31 2023 +0200 setarch: add PER_LINUX_FDPIC fallback Fixes: https://github.com/util-linux/util-linux/issues/2436 Signed-off-by: Karel Zak sys-utils/setarch.c | 5 +++++ 1 file changed, 5 insertions(+) commit b101de3d0ab1f557f01e457cef2b046371f36d00 Author: Karel Zak Date: Mon Aug 14 12:31:48 2023 +0200 libblkid: fix topology chain types mismatch Reported-by: https://github.com/util-linux/util-linux/pull/2430 References: https://github.com/util-linux/util-linux/commit/3ab9e699a8d90f55e0447516b7e05a8686180467 Signed-off-by: Karel Zak libblkid/src/topology/topology.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit 131098cc8da1cea998e685ec8b730be4d291b2d2 Author: Karel Zak Date: Wed Aug 9 12:56:42 2023 +0200 uuidd: improve man page for -cont-clock Signed-off-by: Karel Zak misc-utils/uuidd.8.adoc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 112d2245ea1c9e9027bc1c6176860903c4980ed7 Author: Karel Zak Date: Wed Aug 9 11:26:28 2023 +0200 zramctl: add hint about supported algorithms It seems the current list of the algorithms is confusing for end-users, because it's inaccurate in many cases. Let's explain why the list cannot be "perfect". Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2203324 Signed-off-by: Karel Zak sys-utils/zramctl.8.adoc | 2 ++ sys-utils/zramctl.c | 1 + 2 files changed, 3 insertions(+) commit f5b01cd958b60a1d30fd913a72468a270a58355e Author: Karel Zak Date: Thu Aug 3 13:39:32 2023 +0200 meson: check for HAVE_STRUCT_STATX_STX_MNT_ID References: c0136ac0c98b18208508fbcfac31a843e0bb8a37 Signed-off-by: Karel Zak meson.build | 4 ++++ 1 file changed, 4 insertions(+) commit a1f8033404492a99aa921a8f50e86d33287caed9 Author: Markus Mayer Date: Tue Aug 1 13:08:24 2023 -0700 include: define pidfd syscalls if needed If the kernel headers are too old to provide the pidfd syscall numbers, let's define them ourselves. This can be helpful while cross-compiling. The runtime environment may provide a kernel that is new enough to handle the calls, even if the toolchain doesn't. Signed-off-by: Markus Mayer include/pidfd-utils.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 032c502d5a1cbbbfaa7426b03076598d5f67641e Author: Mike Gilbert Date: Sat Jul 29 17:32:57 2023 -0400 wall: do not error for ttys that do not exist Some wayland display managers (GDM) put strings like "seat0" in the ut_line field of utmp entries. These are not valid tty devices. Avoid writing a confusing error message for ttys that do not exist. Bug: https://bugs.gentoo.org/911336 Signed-off-by: Mike Gilbert term-utils/ttymsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 140404e1fd22705c3a6972378b17af5e5ea87432 Author: Karel Zak Date: Wed Aug 2 12:57:37 2023 +0200 column: fix -l The original implementation is complicated and broken. It's possible to calculate the rest of the string (for the last column) from the current position rather than calculate it continuously. Use the last wcstok() result also means that it will work as expected independently on "greedy" mode (skips repeating separators. # printf 'a b c d\n1 2 3 4\n' | ./column -t -o '|' -l3 a|b|c d 1|2|3 4 (see space between 'a' and 'b' on input) References: 8ac75e31de0ece74515e98e0b22e54cc0a9808bd Fixes: https://github.com/util-linux/util-linux/issues/1763 Signed-off-by: Karel Zak text-utils/column.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) commit 1632bd6d484400a1d7a578d30251689b93fcd34e Author: Jeremy Linton Date: Wed Jul 26 15:54:20 2023 -0500 lscpu: Even more Arm part numbers (early 2023) There have been further MIDR/part numbers published on https://developer.arm.com, they include: Cortex-X4, Cortex-A520, Cortex-A720, Cortex-M85, Cortex-M55 and Cortex-R52+. Signed-off-by: Jeremy Linton sys-utils/lscpu-arm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit fc0a64480f7549e390d20506908c8d3223005702 Author: Karel Zak Date: Mon Jul 31 12:41:39 2023 +0200 chrt: (man) add note about --sched-period lower limit References: https://github.com/util-linux/util-linux/pull/2393 Signed-off-by: Karel Zak schedutils/chrt.1.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 073d0294151e4854aede63a55c24cf9caf00920a Author: Thomas Weißschuh Date: Thu Aug 3 12:22:29 2023 +0200 meson: add check for struct statx meson variant of commit 1fc3471dfb8b ("libmount: check for struct statx"). Signed-off-by: Thomas Weißschuh meson.build | 3 +++ 1 file changed, 3 insertions(+) commit 9d54f7c9912278187415487816fb7479e431c85d Author: Thomas Weißschuh Date: Thu Aug 3 12:18:41 2023 +0200 meson: add check for linux/mount.h meson variant of commit 5502e73d8f82 ("libmount: check for linux/mount.h"). Signed-off-by: Thomas Weißschuh meson.build | 1 + 1 file changed, 1 insertion(+) commit d14d39cbdd41eeb17401e9e64e240d7cb54e0516 Author: Karel Zak Date: Thu Aug 3 13:06:30 2023 +0200 libmount: improve EPERM interpretation In some cases mount(2)/open_tree(2) returns EPERM for root user. In this case libmount reports it as "mount point is not a directory". It does not makes sense for bind mount where target could be a regular file. This patch is not ideal, the error handler is generic, but semantic for new mount API and mount(2) is different. For example now it checks for regular file, but the new API supports bind over symlinks, so proper fix will require lstat() and S_ISLNK(), etc. We need to move error messages to hook_mount.c and mount_mount_legacy.c to make it more specific. Fixes: https://github.com/util-linux/util-linux/issues/2413 Signed-off-by: Karel Zak libmount/src/context_mount.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit ce266c9e168d4f88ae04fea3f9984deb9d9a5dfd Author: Karel Zak Date: Thu Aug 3 12:39:19 2023 +0200 libmount: ifdef statx() call In this case the statx() is use to get mount ID. It's optional and not required. Let's #ifdef the statx() call and also check for stx_mnt_id struct member. Fixes: https://github.com/util-linux/util-linux/issues/2415 Signed-off-by: Karel Zak configure.ac | 5 ++++- libmount/src/hook_mount.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) commit a64cec15a9e050f0cec57081ec621507a8d8008d Author: Markus Mayer Date: Tue Aug 1 12:59:27 2023 -0700 libmount: check for struct statx Let's ensure struct statx exists before we try to use it. Checking for the existence of linux/stat.h is not sufficient. This is because [uapi/]linux/stat.h has existed since Linux 3.7, however struct statx was only introduced with Linux 4.11. The problem arises if one happens ot be using kernel headers from within the aforementioned range, such as Linux 4.9. CC libmount/src/la-utils.lo In file included from libmount/src/utils.c:31: ./include/fileutils.h:100:33: warning: declaration of 'struct statx' will not be visible outside of this function [-Wvisibility] unsigned int mask, struct statx *stx) ^ libmount/src/utils.c:117:16: error: variable has incomplete type 'struct statx' struct statx stx = { 0 }; ^ libmount/src/utils.c:117:10: note: forward declaration of 'struct statx' struct statx stx = { 0 }; ^ libmount/src/utils.c:125:5: error: use of undeclared identifier 'STATX_TYPE' STATX_TYPE ^ libmount/src/utils.c:126:8: error: use of undeclared identifier 'STATX_MODE' | STATX_MODE ^ libmount/src/utils.c:127:8: error: use of undeclared identifier 'STATX_INO' | STATX_INO, ^ 1 warning and 4 errors generated. make[4]: *** [Makefile:11269: libmount/src/la-utils.lo] Error 1 Checking for the presence of struct statx explicitly avoids this problem. Signed-off-by: Markus Mayer configure.ac | 1 + include/fileutils.h | 2 +- libmount/src/utils.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) commit 396798d6b08ba762958aabd3edb84b5c76c2b8a5 Author: Markus Mayer Date: Tue Aug 1 12:59:26 2023 -0700 libmount: check for linux/mount.h Check that linux/mount.h is present before using features that rely on it. It is necessary to check for the presence of linux/mount.h explicitly. Simply relying on the presence of several syscalls (e.g. SYS_move_mount, SYS_open_tree) does not work reliably, at least not in a cross-compiling environment. The syscall definitions are provided by the C library. Meanwhile, linux/mount.h is provided by the kernel. This opens the possibility for discrepancies. A problem arises if the C library (e.g. musl-1.2.3) defines all "mount fd API" syscalls (and HAVE_MOUNTFD_API becomes true), but the kernel headers are old enough to not provide linux/mount.h. The resulting error looks as follows. This example is using an LLVM-13 cross-compiler from x86_64 to aarch64 with musl-1.2.3 as the C library. CC libmount/src/la-hooks.lo In file included from libmount/src/hooks.c:30: ./include/mount-api-utils.h:11:10: fatal error: 'linux/mount.h' file not found ^~~~~~~~~~~~~~~ 1 error generated. make[4]: *** [Makefile:11185: libmount/src/la-hooks.lo] Error 1 To prevent this condition, we add a check to configure that will test for the presence of linux/mount.h in addition to testing for the mount fd API. Only if both conditions are met can we actually use the mount fd API. Signed-off-by: Markus Mayer configure.ac | 8 ++++++++ include/mount-api-utils.h | 4 ++-- libmount/src/hook_idmap.c | 4 ++-- libmount/src/hooks.c | 2 +- libmount/src/version.c | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) commit 03435a7c65538f02e249ff099c3c55ca4d791301 Author: Thomas Weißschuh Date: Thu Aug 3 07:13:28 2023 +0200 libmount: (utils) fix statx fallback If the systemcall is not available ENOSYS is returned. Under glibc the statx implementation also has its own fallback logic. As AT_STATX_DONT_SYNC can't be implemented correctly in that fallback logic the wrapper will return EINVAL in case the emulation is needed and AT_STATX_DONT_SYNC is set. So also use our own fallback in that case. Fixes: #2409 Signed-off-by: Thomas Weißschuh libmount/src/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 99358137968bca95962be0513bd8e7a656514991 Author: Karel Zak Date: Tue Aug 1 14:49:48 2023 +0200 libmount: cleanup --fake mode It was originally designed to play nasty games with /etc/mtab (mount when /etc is read-only and update later when it's write-able). The --fake is completely useless with the new API due to complexity where we cannot skip any step, because the next stuff depends on it. So, it makes more sense skip all functionality where libmount does anything significant. This commit add --fake check to hooks logic to skip all hooks as the hooks are place where libmount implements mount related invasive operations (create mountpoint, namespaces, create superblock, move, mount, etc.). Frankly, --fake without mtab is useless. Fixes: https://github.com/util-linux/util-linux/issues/2395 Signed-off-by: Karel Zak libmount/src/context_mount.c | 5 +++++ libmount/src/hook_mount.c | 7 ------- libmount/src/hook_mount_legacy.c | 18 ------------------ libmount/src/hooks.c | 12 ++++++++++-- sys-utils/mount.8.adoc | 6 +++++- 5 files changed, 20 insertions(+), 28 deletions(-) commit 501227232a6a0b29e9d6dbb2e957fcb2818ec6e3 Author: Thomas Weißschuh Date: Sun Jul 9 10:18:15 2023 +0200 libmount: (python): work around python 3.12 bug Python 3.12 introduced a -Wredundant-decls warning. Work around it by not breaking the build. See https://github.com/python/cpython/issues/106560 Closes: #2366 Signed-off-by: Thomas Weißschuh configure.ac | 10 ++++++++-- libmount/python/meson.build | 8 +++++++- 2 files changed, 15 insertions(+), 3 deletions(-) commit 8950e98528f547750691cfa82e2f521ad4c84271 Author: Thomas Weißschuh Date: Mon Jul 10 13:23:22 2023 +0200 build-sys: add AX_COMPARE_VERSION It will be used to check the found python version. Signed-off-by: Thomas Weißschuh m4/ax_compare_version.m4 | 177 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) commit 1e05167dfcbdb559641058995c31e12135f355cf Author: Debarshi Ray Date: Thu Jun 29 13:04:41 2023 +0200 libmount: update documentation for MNT_ERR_APPLYFLAGS The implementation using the new FD based mount kernel API (ie., fsconfig/fsopen) uses MNT_ERR_APPLYFLAGS for failed mount_setattr(2) calls, which involves more mount attributes (eg., MOUNT_ATTR_RDONLY, MOUNT_ATTR_NOSUID, etc.) in addition to the MS_PROPAGATION flags (eg., MS_SHARED, MS_UNBINDABLE, etc.). Note that mount_setattr(2) is part of the new FD based mount kernel API, and is not used by the classic mount(2) based version. Fallout from 987d844cdbc0f91ca81de3c1e5d0628a60eb458f Signed-off-by: Debarshi Ray libmount/src/libmount.h.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e7c34902f0bca9ec10143c97b2ffc97a83226335 Author: Debarshi Ray Date: Thu Jun 29 12:21:07 2023 +0200 libmount: fix typo Similar to e80f8e46127e45907db25b4ffd58c699fdf4c35f and fallout from 6753e6f6912658e836966a6316df956e1af5fcae Signed-off-by: Debarshi Ray libmount/src/hook_mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5858dbb6b3bc85d0b4f1f38b8016c67940b21b0 Author: Karel Zak Date: Thu Jul 20 12:34:14 2023 +0200 libmount: use some MS_* flags as superblock flags The old mount(2) API usually utilizes MS_* flags to set up the VFS node. However, there are some exceptions like "sync" (MS_SYNCHRONOUS), where the flag is used (by kernel) for the superblock instead. The new API addresses this issue, ensuring that these options are used for fsconfig(). This commit introduces MNT_SUPERBLOCK to identify these options in the libmount options Linux map, and it enforces the new mount code to utilize these options for fsconfig(FSCONFIG_SET_FLAG). Reported-by: Abbink Esger Signed-off-by: Karel Zak (cherry picked from commit 54e4a6b145fd6ef943d93e16de748283e687855d) Fixes: #2439 libmount/src/hook_mount.c | 11 +++++++++-- libmount/src/libmount.h.in | 1 + libmount/src/optmap.c | 14 +++++++------- 3 files changed, 17 insertions(+), 9 deletions(-) commit f1875239b00c35d35e69edd4854349014f5d52b7 Author: Karel Zak Date: Mon Jun 5 12:59:41 2023 +0200 libmount: use mount(2) for remount on Linux < 5.14 It seems mount_setattr() is supported on Linux < 5.14, but it's without MOUNT_ATTR_NOSYMFOLLOW. That's problem for remount where we reset all VFS flags. The most simple (but not elegant) is to check for kernel version and fallback to mount(2) on remount. Addresses: https://github.com/util-linux/util-linux/issues/2283 Signed-off-by: Karel Zak libmount/src/hook_mount.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 58cb00c63facc572ffb93aa756773c149ec11041 Author: Karel Zak Date: Wed Aug 16 09:03:59 2023 +0200 github: check apt-cache in more robust way References: 3119a8060102ed7dd04d4a782932494c386f72a6 Signed-off-by: Karel Zak .github/workflows/cibuild-setup-ubuntu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a9bf6166017c9623e001ece6945edb3e3bd6837 Author: Debarshi Ray Date: Thu Jul 13 11:07:27 2023 +0200 libmount: handle failure to apply flags as part of a mount operation If a mount operation with extra flags runs into an EPERM when applying the flags, then mnt_context_get_mount_excode() returns 'Unknown error 5005' and MNT_EX_FAIL. Here's an example: Create a mount point on the host with 'nodev,nosuid,noexec': $ dd if=/dev/zero of=/var/tmp/loopfile bs=40960 count=1024 $ sudo losetup --find /var/tmp/loopfile $ sudo mkfs.ext4 /dev/loop0 $ sudo mkdir /mnt/a $ sudo mount -o nosuid,nodev,noexec /dev/loop0 /mnt/a Check the mount options to be sure: $ findmnt --output OPTIONS,PROPAGATION /mnt/a OPTIONS PROPAGATION rw,nosuid,nodev,noexec,relatime,seclabel shared Enter a mount and user namespace: $ podman run \ --interactive \ --privileged \ --rm \ --tty \ --volume /:/run/host:rslave \ registry.fedoraproject.org/fedora:38 \ /bin/bash Try to bind mount the mount point from the host inside the namespace with some extra flags: # mkdir ~/b # mount --bind -o ro /run/host/mnt/a ~/b mount: /root/b: filesystem was mounted, but any subsequent operation failed: Unknown error 5005. # echo $? 32 It will be better to show something more human-readable than 'Unknown error 5005'. Secondly, an exit code of 32 means 'mount failure', which isn't quite correct here. The mount operation is split into two mount(2) calls, where the first one uses MS_BIND to create the bind mount, and the second uses MS_REMOUNT | MS_BIND | MS_RDONLY to apply the 'ro' flag. Here, the first mount(2) does succeed: # findmnt --output OPTIONS,PROPAGATION ~/b OPTIONS PROPAGATION rw,nosuid,nodev,noexec,relatime,seclabel private,slave It's only the application of the 'ro' flag with the second mount(2) that fails with an EPERM. Hence, an exit code of 1 that means 'incorrect invocation or permissions' seems more appropriate. Signed-off-by: Debarshi Ray libmount/src/context_mount.c | 6 ++++++ 1 file changed, 6 insertions(+)