From b2320e7499340f83741e02d67db4f4c68aa6f3f4 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 28 Jun 2023 10:53:17 +0200 Subject: [PATCH] 2.39.1-1: upgrade --- .gitignore | 1 + ...-call-hooks-after-mount.-type-helper.patch | 85 ------------------- ...x-options-prepend-insert-and-merging.patch | 49 ----------- sources | 2 +- util-linux.spec | 11 +-- 5 files changed, 8 insertions(+), 140 deletions(-) delete mode 100644 libmount-don-t-call-hooks-after-mount.-type-helper.patch delete mode 100644 libmount-fix-options-prepend-insert-and-merging.patch diff --git a/.gitignore b/.gitignore index db73f07..bef3e67 100644 --- a/.gitignore +++ b/.gitignore @@ -91,3 +91,4 @@ /util-linux-2.39-rc2.tar.xz /util-linux-2.39-rc3.tar.xz /util-linux-2.39.tar.xz +/util-linux-2.39.1.tar.xz diff --git a/libmount-don-t-call-hooks-after-mount.-type-helper.patch b/libmount-don-t-call-hooks-after-mount.-type-helper.patch deleted file mode 100644 index 3f18334..0000000 --- a/libmount-don-t-call-hooks-after-mount.-type-helper.patch +++ /dev/null @@ -1,85 +0,0 @@ -From f94a7760ed7ce81389a6059f020238981627a70d Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 25 May 2023 11:48:24 +0200 -Subject: [PATCH] libmount: don't call hooks after mount. helper - -In case more filesystems are specified (or when libmount follows -/{etc,proc}/filesystems) then the library may try to use and -initialize the new API because for some filesystems, we need -exec(/sbin/mount.) and for another fsopen(). - -The hooks that use the API have to smart and detect that the mount -operation was done in external /sbin/mount. helper. And in this -case, the new API file descriptors must be ignored. - -The exception is propagation flags, mount(8) can set the flags after -exec(/sbin/mount.), for example, "mount -t ntfs --make-private". - -Fixes: https://github.com/util-linux/util-linux/issues/2267 -Signed-off-by: Karel Zak ---- - libmount/src/context_mount.c | 2 ++ - libmount/src/hook_mount.c | 13 +++++++++++++ - 2 files changed, 15 insertions(+) - -diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c -index cbb4f1fdf..40f9ed073 100644 ---- a/libmount/src/context_mount.c -+++ b/libmount/src/context_mount.c -@@ -508,6 +508,8 @@ static int do_mount(struct libmnt_context *cxt, const char *try_type) - assert(cxt->fs); - assert((cxt->flags & MNT_FL_MOUNTFLAGS_MERGED)); - -+ mnt_context_reset_status(cxt); -+ - if (try_type) { - rc = mnt_context_prepare_helper(cxt, "mount", try_type); - if (rc) -diff --git a/libmount/src/hook_mount.c b/libmount/src/hook_mount.c -index 924c71444..91483afa6 100644 ---- a/libmount/src/hook_mount.c -+++ b/libmount/src/hook_mount.c -@@ -239,6 +239,10 @@ static int hook_create_mount(struct libmnt_context *cxt, - int rc = 0; - - assert(cxt); -+ -+ if (mnt_context_helper_executed(cxt)) -+ return 0; -+ - assert(cxt->fs); - - api = get_sysapi(cxt); -@@ -309,6 +313,9 @@ static int hook_reconfigure_mount(struct libmnt_context *cxt, - - assert(cxt); - -+ if (mnt_context_helper_executed(cxt)) -+ return 0; -+ - api = get_sysapi(cxt); - assert(api); - assert(api->fd_tree >= 0); -@@ -379,6 +386,9 @@ static int hook_set_vfsflags(struct libmnt_context *cxt, - uint64_t set = 0, clr = 0; - int rc = 0; - -+ if (mnt_context_helper_executed(cxt)) -+ return 0; -+ - DBG(HOOK, ul_debugobj(hs, "setting VFS flags")); - - ol = mnt_context_get_optlist(cxt); -@@ -471,6 +481,9 @@ static int hook_attach_target(struct libmnt_context *cxt, - const char *target; - int rc = 0; - -+ if (mnt_context_helper_executed(cxt)) -+ return 0; -+ - target = mnt_fs_get_target(cxt->fs); - if (!target) - return -EINVAL; --- -2.40.1 - diff --git a/libmount-fix-options-prepend-insert-and-merging.patch b/libmount-fix-options-prepend-insert-and-merging.patch deleted file mode 100644 index b44c435..0000000 --- a/libmount-fix-options-prepend-insert-and-merging.patch +++ /dev/null @@ -1,49 +0,0 @@ -From c0267687fd7b41b00d523d1985182d7eb574effd Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 22 May 2023 15:00:25 +0200 -Subject: [PATCH] libmount: fix options prepend/insert and merging - - * the order of the new options should not be changed - (for example prepend "a,b,c" to list with "d" has to generate "a,b,c,d", not "c,b,a,d") - - * make sure that options map is defined when merging options - -Fixes: https://github.com/util-linux/util-linux/issues/2238 -Signed-off-by: Karel Zak ---- - libmount/src/optlist.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/libmount/src/optlist.c b/libmount/src/optlist.c -index a8c1ad89a..f74e75928 100644 ---- a/libmount/src/optlist.c -+++ b/libmount/src/optlist.c -@@ -338,6 +338,7 @@ int mnt_optlist_merge_opts(struct libmnt_optlist *ls) - - /* remove inverted option */ - else if (opt->ent && x->ent -+ && opt->map == x->map - && opt->ent->id == x->ent->id - && (opt->ent->mask & MNT_INVERT - || x->ent->mask & MNT_INVERT)) -@@ -520,6 +521,8 @@ static int optlist_add_optstr(struct libmnt_optlist *ls, const char *optstr, - if (!opt) - return -ENOMEM; - opt->src = MNT_OPTSRC_STRING; -+ if (where) -+ where = &opt->opts; - } - - optlist_cleanup_cache(ls); -@@ -622,6 +625,8 @@ static int optlist_add_flags(struct libmnt_optlist *ls, unsigned long flags, - if (!opt) - return -ENOMEM; - opt->src = MNT_OPTSRC_FLAG; -+ if (where) -+ where = &opt->opts; - } - - optlist_cleanup_cache(ls); --- -2.40.1 - diff --git a/sources b/sources index c2b8500..b3b2ccf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.39.tar.xz) = 3d59a0f114c06be19ef7f86fca37ba5b9073823d011b3fc37997ddb00124b4505ea32903b78798a64dffbccf0ba645a692678ee845cc65a5b321824448a82a94 +SHA512 (util-linux-2.39.1.tar.xz) = 8fe2c9014f6161330610f7470b870855cecbd3fab9c187b75d8f22e16573c82516050479be39cfb9f7dd6d7ef1cc298d31d839b194dda5ec4daf0d1197ac71e9 diff --git a/util-linux.spec b/util-linux.spec index ac8aba1..220816e 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.39 -Release: 5%{?dist} +Version: 2.39.1 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -98,9 +98,6 @@ Patch0: login-lastlog-create.patch # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch -### Upstream patches -Patch2: libmount-fix-options-prepend-insert-and-merging.patch -Patch3: libmount-don-t-call-hooks-after-mount.-type-helper.patch %description The util-linux package contains a large variety of low-level system @@ -929,6 +926,10 @@ fi %changelog +* Wed Jun 28 2023 Karel Zak - 2.39.1-1 +- upgrade to v2.39.1 + https://kernel.org/pub/linux/utils/util-linux/v2.39/v2.39.1-ReleaseNotes + * Tue Jun 13 2023 Python Maint - 2.39-5 - Rebuilt for Python 3.12