2.39-0.5: upgrade to 2.39-rc3
This commit is contained in:
parent
09904cbd56
commit
c87ed81c2c
1
.gitignore
vendored
1
.gitignore
vendored
@ -89,3 +89,4 @@
|
|||||||
/util-linux-2.38.1.tar.xz
|
/util-linux-2.38.1.tar.xz
|
||||||
/util-linux-2.39-rc1.tar.xz
|
/util-linux-2.39-rc1.tar.xz
|
||||||
/util-linux-2.39-rc2.tar.xz
|
/util-linux-2.39-rc2.tar.xz
|
||||||
|
/util-linux-2.39-rc3.tar.xz
|
||||||
|
@ -1,110 +0,0 @@
|
|||||||
From c7ffe0cf6b7bdf62db70bd7700d6ed40d9106ba9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Wed, 5 Apr 2023 21:44:55 +0200
|
|
||||||
Subject: [PATCH] libmount: fix superblock rw/ro reconfiguration
|
|
||||||
|
|
||||||
The classic mount(2) defaults to 'rw', but the new API does not reset
|
|
||||||
superblock to 'rw' if the flag is not explicitly used for
|
|
||||||
FSCONFIG_CMD_RECONFIGURE.
|
|
||||||
|
|
||||||
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2180593
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
libmount/src/hook_mount.c | 47 +++++++++++++++++++++++++++------------
|
|
||||||
1 file changed, 33 insertions(+), 14 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libmount/src/hook_mount.c b/libmount/src/hook_mount.c
|
|
||||||
index 071dad783..117150dec 100644
|
|
||||||
--- a/libmount/src/hook_mount.c
|
|
||||||
+++ b/libmount/src/hook_mount.c
|
|
||||||
@@ -111,14 +111,33 @@ static int hookset_deinit(struct libmnt_context *cxt, const struct libmnt_hookse
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
+static inline int fsconfig_set_value(
|
|
||||||
+ struct libmnt_context *cxt,
|
|
||||||
+ const struct libmnt_hookset *hs,
|
|
||||||
+ int fd,
|
|
||||||
+ const char *name, const char *value)
|
|
||||||
+{
|
|
||||||
+ int rc;
|
|
||||||
+
|
|
||||||
+ DBG(HOOK, ul_debugobj(hs, " fsconfig(name=%s,value=%s)", name,
|
|
||||||
+ value ? : ""));
|
|
||||||
+ if (value)
|
|
||||||
+ rc = fsconfig(fd, FSCONFIG_SET_STRING, name, value, 0);
|
|
||||||
+ else
|
|
||||||
+ rc = fsconfig(fd, FSCONFIG_SET_FLAG, name, NULL, 0);
|
|
||||||
+
|
|
||||||
+ set_syscall_status(cxt, "fsconfig", rc == 0);
|
|
||||||
+ return rc;
|
|
||||||
+}
|
|
||||||
|
|
||||||
static int configure_superblock(struct libmnt_context *cxt,
|
|
||||||
- const struct libmnt_hookset *hs, int fd)
|
|
||||||
+ const struct libmnt_hookset *hs,
|
|
||||||
+ int fd, int force_rwro)
|
|
||||||
{
|
|
||||||
struct libmnt_optlist *ol;
|
|
||||||
struct libmnt_iter itr;
|
|
||||||
struct libmnt_opt *opt;
|
|
||||||
- int rc;
|
|
||||||
+ int rc = 0, has_rwro = 0;
|
|
||||||
|
|
||||||
DBG(HOOK, ul_debugobj(hs, " config FS"));
|
|
||||||
|
|
||||||
@@ -136,22 +155,21 @@ static int configure_superblock(struct libmnt_context *cxt,
|
|
||||||
if (ent && mnt_opt_get_map(opt) == cxt->map_linux &&
|
|
||||||
ent->id == MS_RDONLY) {
|
|
||||||
value = NULL;
|
|
||||||
+ has_rwro = 1;
|
|
||||||
} else if (!name || mnt_opt_get_map(opt) || mnt_opt_is_external(opt))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
- DBG(HOOK, ul_debugobj(hs, " fsconfig(name=%s,value=%s)", name, value));
|
|
||||||
- if (value)
|
|
||||||
- rc = fsconfig(fd, FSCONFIG_SET_STRING, name, value, 0);
|
|
||||||
- else
|
|
||||||
- rc = fsconfig(fd, FSCONFIG_SET_FLAG, name, NULL, 0);
|
|
||||||
-
|
|
||||||
- set_syscall_status(cxt, "fsconfig", rc == 0);
|
|
||||||
+ rc = fsconfig_set_value(cxt, hs, fd, name, value);
|
|
||||||
if (rc != 0)
|
|
||||||
- return -errno;
|
|
||||||
+ goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
- DBG(HOOK, ul_debugobj(hs, " config done [rc=0]"));
|
|
||||||
- return 0;
|
|
||||||
+ if (force_rwro && !has_rwro)
|
|
||||||
+ rc = fsconfig_set_value(cxt, hs, fd, "rw", NULL);
|
|
||||||
+
|
|
||||||
+done:
|
|
||||||
+ DBG(HOOK, ul_debugobj(hs, " config done [rc=%d]", rc));
|
|
||||||
+ return rc != 0 && errno ? -errno : rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int open_fs_configuration_context(struct libmnt_context *cxt,
|
|
||||||
@@ -244,7 +262,7 @@ static int hook_create_mount(struct libmnt_context *cxt,
|
|
||||||
set_syscall_status(cxt, "fsconfig", rc == 0);
|
|
||||||
|
|
||||||
if (!rc)
|
|
||||||
- rc = configure_superblock(cxt, hs, api->fd_fs);
|
|
||||||
+ rc = configure_superblock(cxt, hs, api->fd_fs, 0);
|
|
||||||
if (!rc) {
|
|
||||||
DBG(HOOK, ul_debugobj(hs, "create FS"));
|
|
||||||
rc = fsconfig(api->fd_fs, FSCONFIG_CMD_CREATE, NULL, NULL, 0);
|
|
||||||
@@ -301,8 +319,9 @@ static int hook_reconfigure_mount(struct libmnt_context *cxt,
|
|
||||||
return -errno;
|
|
||||||
}
|
|
||||||
|
|
||||||
- rc = configure_superblock(cxt, hs, api->fd_fs);
|
|
||||||
+ rc = configure_superblock(cxt, hs, api->fd_fs, 1);
|
|
||||||
if (!rc) {
|
|
||||||
+ DBG(HOOK, ul_debugobj(hs, "re-configurate FS"));
|
|
||||||
rc = fsconfig(api->fd_fs, FSCONFIG_CMD_RECONFIGURE, NULL, NULL, 0);
|
|
||||||
set_syscall_status(cxt, "fsconfig", rc == 0);
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.39.2
|
|
||||||
|
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (util-linux-2.39-rc2.tar.xz) = 11f5b8ed1eb90a4e7161369eafcf0157b205aeded221cd435f95a79d01901bdef289660486849778b3d3c15500db593cad24e0a7f87f52968c9c292ea68040c0
|
SHA512 (util-linux-2.39-rc3.tar.xz) = 8a93d32a5ceb38d50a4b2c8bfa48bcab7ec9b758c89b5a1a4f7fd74558dce37385bd7ea203345148d4389de4ea60ec42058f9d7889a8075d3e616773d085427e
|
||||||
|
@ -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.4%{?dist}
|
Release: 0.5%{?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}-rc2
|
%global upstream_version %{version}-rc3
|
||||||
%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/
|
||||||
@ -94,9 +94,6 @@ Patch0: login-lastlog-create.patch
|
|||||||
# 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 (#2180593)
|
|
||||||
Patch2: libmount-fix-superblock-rw-ro-reconfiguration.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
|
||||||
utilities that are necessary for a Linux system to function. Among
|
utilities that are necessary for a Linux system to function. Among
|
||||||
@ -921,6 +918,9 @@ fi
|
|||||||
%{_libdir}/python*/site-packages/libmount/
|
%{_libdir}/python*/site-packages/libmount/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Apr 19 2023 Karel Zak <kzak@redhat.com> - 2.39-0.5
|
||||||
|
- upgrade to v2.39-rc3 (fixes XFS and rw/ro issues)
|
||||||
|
|
||||||
* Wed Apr 5 2023 Karel Zak <kzak@redhat.com> - 2.39-0.4
|
* Wed Apr 5 2023 Karel Zak <kzak@redhat.com> - 2.39-0.4
|
||||||
- fix #2180593 (superblock reconfiguration libmount issue)
|
- fix #2180593 (superblock reconfiguration libmount issue)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user