fix spec file for -rc2

This commit is contained in:
Karel Zak 2023-04-04 19:34:43 +02:00
parent 3bf1f5a44f
commit 5fa93ec5e0
3 changed files with 2 additions and 92 deletions

View File

@ -1,51 +0,0 @@
From 7d08453551ccc5477f76f3e986c8351e8c5ab599 Mon Sep 17 00:00:00 2001
From: Ian Kent <raven@themaw.net>
Date: Mon, 13 Mar 2023 09:42:56 +0800
Subject: [PATCH] libmount: dont ignore autofs mounts by default
Making libmount ingore autofs mounts by default can be a problem for
systemd, I remember now what the problem was.
autofs multi-mounts can be nested (and often are, think of a tree of
NFS exports) where there are autofs file system mounts within NFS
mounts and together with autofs mount triggers.
In this case systemd needs to see all the mounts at shutdown when it
is umounting the tree of mounts. We don't want to have to rely on
modifications having been made to systemd for this to work properly
so we can't make this the default behaviour in libmount.
Fixes: 22147e08c987 (libmount: use autofs mount hint to ignore autofs mount entries)
Signed-off-by: Ian Kent <raven@themaw.net>
Cc: John Westerdale <jwesterd@redhat.com>
Cc: Frank Hertz <fhirtz@redhat.com>
Cc: Frank Sorenson <fsorenso@redhat.com>
---
libmount/src/context.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libmount/src/context.c b/libmount/src/context.c
index 8db6b6950..2df4716a7 100644
--- a/libmount/src/context.c
+++ b/libmount/src/context.c
@@ -75,7 +75,7 @@ struct libmnt_context *mnt_new_context(void)
/* if we're really root and aren't running setuid */
cxt->restricted = (uid_t) 0 == ruid && ruid == euid ? 0 : 1;
- cxt->noautofs = 1;
+ cxt->noautofs = 0;
DBG(CXT, ul_debugobj(cxt, "----> allocate %s",
cxt->restricted ? "[RESTRICTED]" : ""));
@@ -164,7 +164,7 @@ int mnt_reset_context(struct libmnt_context *cxt)
cxt->helper = NULL;
cxt->mountdata = NULL;
cxt->flags = MNT_FL_DEFAULT;
- cxt->noautofs = 1;
+ cxt->noautofs = 0;
cxt->has_selinux_opt = 0;
cxt->map_linux = mnt_get_builtin_optmap(MNT_LINUX_MAP);
--
2.39.2

View File

@ -1,35 +0,0 @@
From 9004e76b4ba716022a7c851ffa7fbd9e9e4bf073 Mon Sep 17 00:00:00 2001
From: Ian Kent <raven@themaw.net>
Date: Mon, 13 Mar 2023 09:43:02 +0800
Subject: [PATCH] mount: ignore autofs entries in mount listing
Since we can't enable use of ignoring autofs mounts that have the
"ignore" option present by default (systemd could get confused) it's
necessary to enable it for individual applications.
The mount utility is one applcation we need it for so enable it.
Signed-off-by: Ian Kent <raven@themaw.net>
Cc: John Westerdale <jwesterd@redhat.com>
Cc: Frank Hertz <fhirtz@redhat.com>
Cc: Frank Sorenson <fsorenso@redhat.com>
---
sys-utils/mount.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys-utils/mount.c b/sys-utils/mount.c
index 6590272c7..dba6fcae9 100644
--- a/sys-utils/mount.c
+++ b/sys-utils/mount.c
@@ -124,6 +124,8 @@ static void print_all(struct libmnt_context *cxt, char *pattern, int show_label)
struct libmnt_fs *fs;
struct libmnt_cache *cache = NULL;
+ mnt_context_enable_noautofs(cxt, 1);
+
if (mnt_context_get_mtab(cxt, &tb))
err(MNT_EX_SYSERR, _("failed to read mtab"));
--
2.39.2

View File

@ -2,12 +2,12 @@
Summary: Collection of basic system utilities Summary: Collection of basic system utilities
Name: util-linux Name: util-linux
Version: 2.39 Version: 2.39
Release: 0.2%{?dist} Release: 0.3%{?dist}
License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain
URL: https://en.wikipedia.org/wiki/Util-linux URL: https://en.wikipedia.org/wiki/Util-linux
### Macros ### Macros
%global upstream_version %{version}-rc1 %global upstream_version %{version}-rc2
%global upstream_major %(eval echo %{version} | sed -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/') %global upstream_major %(eval echo %{version} | sed -e 's/\([[:digit:]]*\)\.\([[:digit:]]*\)\.[[:digit:]]*$/\1.\2/')
%global compldir %{_datadir}/bash-completion/completions/ %global compldir %{_datadir}/bash-completion/completions/
@ -93,10 +93,6 @@ Patch0: login-lastlog-create.patch
# Add `/run/motd.d` to the hardcoded MOTD_FILE # Add `/run/motd.d` to the hardcoded MOTD_FILE
# https://github.com/coreos/console-login-helper-messages/issues/60 # https://github.com/coreos/console-login-helper-messages/issues/60
Patch1: login-default-motd-file.patch Patch1: login-default-motd-file.patch
# upstream, already in >= v2.39-rc2
Patch2: libmount-dont-ignore-autofs-mounts-by-default.patch
Patch3: mount-ignore-autofs-entries-in-mount-listing.patch
%description %description
The util-linux package contains a large variety of low-level system The util-linux package contains a large variety of low-level system