[packages/util-linux] add upstream fix for mount reggression affecting kubernetes; rel 2

atler atler at pld-linux.org
Mon May 19 19:14:14 CEST 2025


commit c729bf43baf05cce9432a538a096cbc38596331a
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon May 19 14:25:50 2025 +0200

    add upstream fix for mount reggression affecting kubernetes; rel 2
    
    see https://github.com/util-linux/util-linux/issues/3474

 mount-no-canonicalize.patch | 39 +++++++++++++++++++++++++++++++++++++++
 util-linux.spec             |  4 +++-
 2 files changed, 42 insertions(+), 1 deletion(-)
---
diff --git a/util-linux.spec b/util-linux.spec
index ea80a18..198e845 100644
--- a/util-linux.spec
+++ b/util-linux.spec
@@ -32,7 +32,7 @@ Summary(tr.UTF-8):	Temel sistem araçları
 Summary(uk.UTF-8):	Набір базових системних утиліт для Linux
 Name:		util-linux
 Version:	2.41
-Release:	1
+Release:	2
 License:	GPL v2+, GPL v3 (hwclock)
 Group:		Applications/System
 # https://github.com/karelzak/util-linux (GitHub backup)
@@ -55,6 +55,7 @@ Patch2:		%{name}-login-lastlog.patch
 Patch4:		su-paths.patch
 Patch6:		%{name}-diet.patch
 Patch7:		%{name}-man-asciidoctor.patch
+Patch8:		mount-no-canonicalize.patch
 URL:		https://github.com/karelzak/util-linux
 BuildRequires:	audit-libs-devel >= 1.0.6
 BuildRequires:	autoconf >= 2.64
@@ -897,6 +898,7 @@ Bashowe dopełnianie parametrów dla poleceń z pakietu util-linux.
 %patch -P2 -p1
 %patch -P4 -p1
 %patch -P7 -p1
+%patch -P8 -p1
 %{?with_initrd:%patch -P6 -p1}
 
 # obsolete programs, remove non-english man pages
diff --git a/mount-no-canonicalize.patch b/mount-no-canonicalize.patch
new file mode 100644
index 0000000..973ba74
--- /dev/null
+++ b/mount-no-canonicalize.patch
@@ -0,0 +1,39 @@
+From 7dbfe31a83f45d5aef2b508697e9511c569ffbc8 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak at redhat.com>
+Date: Mon, 24 Mar 2025 14:31:05 +0100
+Subject: [PATCH] libmount: fix --no-canonicalize regression
+
+Fixes: https://github.com/util-linux/util-linux/issues/3474
+Signed-off-by: Karel Zak <kzak at redhat.com>
+---
+ libmount/src/context.c | 3 ---
+ sys-utils/mount.8.adoc | 2 +-
+ 2 files changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/libmount/src/context.c b/libmount/src/context.c
+index 0323cb23d34..15a8ad3bbd0 100644
+--- a/libmount/src/context.c
++++ b/libmount/src/context.c
+@@ -530,9 +530,6 @@ int mnt_context_is_xnocanonicalize(
+ 	assert(cxt);
+ 	assert(type);
+ 
+-	if (mnt_context_is_nocanonicalize(cxt))
+-		return 1;
+-
+ 	ol = mnt_context_get_optlist(cxt);
+ 	if (!ol)
+ 		return 0;
+diff --git a/sys-utils/mount.8.adoc b/sys-utils/mount.8.adoc
+index 4f23f8d1f0e..5103b91c578 100644
+--- a/sys-utils/mount.8.adoc
++++ b/sys-utils/mount.8.adoc
+@@ -756,7 +756,7 @@ Allow to make a target directory (mountpoint) if it does not exist yet. The opti
+ *X-mount.nocanonicalize*[**=**_type_]::
+ Allows disabling of canonicalization for mount source and target paths. By default, the `mount` command resolves all paths to their absolute paths without symlinks. However, this behavior may not be desired in certain situations, such as when binding a mount over a symlink, or a symlink over a directory or another symlink. The optional argument _type_ can be either "source" or "target" (mountpoint). If no _type_ is specified, then canonicalization is disabled for both types. This mount option does not affect the conversion of source tags (e.g. LABEL= or UUID=) and fstab processing.
+ +
+-The command line option *--no-canonicalize* overrides this mount option and affects all path and tag conversions in all situations, but it does not modify flags for open_tree syscalls.
++The command-line option *--no-canonicalize* overrides this mount option and affects all path and tag conversions in all situations, but for backward compatibility, it does not modify open_tree syscall flags and does not allow the bind-mount over a symlink use case.
+ +
+ Note that *mount*(8) still sanitizes and canonicalizes the source and target paths specified on the command line by non-root users, regardless of the X-mount.nocanonicalize setting.
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/util-linux.git/commitdiff/c729bf43baf05cce9432a538a096cbc38596331a



More information about the pld-cvs-commit mailing list