public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/, sys-apps/util-linux/files/
Date: Tue, 23 May 2023 03:14:03 +0000 (UTC)	[thread overview]
Message-ID: <1684811600.5ef0405e6d22915b93da87d5eb77ff132ca6da14.sam@gentoo> (raw)

commit:     5ef0405e6d22915b93da87d5eb77ff132ca6da14
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue May 23 03:13:09 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May 23 03:13:20 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ef0405e

sys-apps/util-linux: backport another mount regression fix (user option parsing)

Closes: https://bugs.gentoo.org/906859
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../util-linux-2.39-mount-parse-options-user.patch | 46 ++++++++++++++++++++++
 sys-apps/util-linux/util-linux-2.39-r2.ebuild      |  1 +
 2 files changed, 47 insertions(+)

diff --git a/sys-apps/util-linux/files/util-linux-2.39-mount-parse-options-user.patch b/sys-apps/util-linux/files/util-linux-2.39-mount-parse-options-user.patch
new file mode 100644
index 000000000000..e02d02c7f503
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.39-mount-parse-options-user.patch
@@ -0,0 +1,46 @@
+https://bugs.gentoo.org/906797#c4
+https://bugs.gentoo.org/906859
+https://github.com/util-linux/util-linux/issues/2238
+https://github.com/util-linux/util-linux/commit/c0267687fd7b41b00d523d1985182d7eb574effd
+
+From c0267687fd7b41b00d523d1985182d7eb574effd Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak@redhat.com>
+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 <kzak@redhat.com>
+--- 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);
+

diff --git a/sys-apps/util-linux/util-linux-2.39-r2.ebuild b/sys-apps/util-linux/util-linux-2.39-r2.ebuild
index 43dd41681342..edd0dd68e804 100644
--- a/sys-apps/util-linux/util-linux-2.39-r2.ebuild
+++ b/sys-apps/util-linux/util-linux-2.39-r2.ebuild
@@ -97,6 +97,7 @@ RESTRICT="!test? ( test )"
 PATCHES=(
 	"${FILESDIR}/${PN}-2.39-check-for-mount_setattr.patch"
 	"${FILESDIR}/${PN}-2.39-tests-for-mount_setattr.patch"
+	"${FILESDIR}/${PN}-2.39-mount-parse-options-user.patch"
 )
 
 pkg_pretend() {


             reply	other threads:[~2023-05-23  3:14 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-23  3:14 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-08  6:59 [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/, sys-apps/util-linux/files/ Sam James
2024-05-20 15:06 Mike Gilbert
2024-05-11 17:19 Mike Gilbert
2024-04-04  1:17 Sam James
2024-03-28  4:55 Sam James
2024-03-22  0:12 Matt Turner
2023-12-28  2:57 Sam James
2023-05-26  7:24 Sam James
2023-05-23  4:20 Sam James
2023-03-19  6:07 Sam James
2023-02-09  3:54 Sam James
2022-01-24 16:02 Sam James
2021-10-03 11:28 David Seifert
2021-08-16 14:02 Lars Wendler
2021-08-11 12:30 Lars Wendler
2021-07-30 12:21 Marek Szuba
2021-07-10 21:31 Lars Wendler
2021-06-02 21:14 Georgy Yakovlev
2021-05-23 12:14 David Seifert
2020-12-22 14:43 Andreas K. Hüttel
2020-11-16 17:36 Lars Wendler
2020-03-25 14:14 Thomas Deutschmann
2019-05-31  0:58 Lars Wendler
2018-12-29 17:45 Mikle Kolyada
2018-07-13 16:41 Patrick McLean
2018-04-10 19:29 Thomas Deutschmann
2017-12-17 15:48 Lars Wendler
2017-06-09  1:19 Lars Wendler
2017-01-21  0:36 Lars Wendler
2015-09-07 20:02 Lars Wendler
2015-09-07 18:30 Michał Górny
2015-09-07 14:37 Lars Wendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1684811600.5ef0405e6d22915b93da87d5eb77ff132ca6da14.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox