From c6a167f252b354a8f0b47a55d9481c6697dddc5d98c86e39bf8a88aa79cb22a1 Mon Sep 17 00:00:00 2001 From: Goldwyn Rodrigues Date: Mon, 12 Jun 2023 19:48:44 +0000 Subject: [PATCH 1/4] Accepting request 1092594 from home:ateixeira:branches:Base:System - Upgrade to version 2.39: * blkpr: New command to run persistent reservations ioctls on a device. * pipesz: New command to set or examine pipe and FIFO buffer sizes. * waitpid: New command to wait for arbitrary processes. * mount, libmount: Supports new file descriptors based mount kernel API. * mount, libmount: New mount options X-mount.idmap=, X-mount.auto-fstypes, X-mount.{owner,group,mode}=, rootcontext=@target. * renice: Supports posix-compliant -n (via POSIXLY_CORRECT) and add a new option --relative. * dmesg: Supports subsecond granularity for --since and --until. * dmesg: Option --level accepts '+' prefix or postfix for a level name to specify all higher or all lower levels. * blkid, libblkid: Supports bcachefs. * fstrim: New option --types to filter out by filesystem types. * lsblk: --nvme and --virtio are new options to filter out devices. * lsblk: Improves detection of hotplug and removable status. * nsenter: New option --env for allowing environment variables inheritance. * namei: New option -Z to report SELinux contexts. * Many other new features and fixes. For complete list see https://kernel.org/pub/linux/utils/util-linux/v2.39/v2.39-ReleaseNotes - Dropped upstreamed patches: * fix-lib-internal-cache-size.patch * util-linux-fix-tests-when-at-symbol-in-path.patch * util-linux-honor-noclear-when-reprint-issue.patch - Add upstream patch util-linux-fix-tests-with-64k-pagesize.patch * Fixes fadvise tests for ppc64 OBS-URL: https://build.opensuse.org/request/show/1092594 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=513 --- fix-lib-internal-cache-size.patch | 83 ------ util-linux-2.38.1.tar.sign | 16 - util-linux-2.38.1.tar.xz | 3 - util-linux-2.39.tar.sign | 16 + util-linux-2.39.tar.xz | 3 + ...nux-fix-tests-when-at-symbol-in-path.patch | 47 --- util-linux-fix-tests-with-64k-pagesize.patch | 276 ++++++++++++++++++ ...nux-honor-noclear-when-reprint-issue.patch | 24 -- util-linux.changes | 30 ++ util-linux.spec | 25 +- 10 files changed, 341 insertions(+), 182 deletions(-) delete mode 100644 fix-lib-internal-cache-size.patch delete mode 100644 util-linux-2.38.1.tar.sign delete mode 100644 util-linux-2.38.1.tar.xz create mode 100644 util-linux-2.39.tar.sign create mode 100644 util-linux-2.39.tar.xz delete mode 100644 util-linux-fix-tests-when-at-symbol-in-path.patch create mode 100644 util-linux-fix-tests-with-64k-pagesize.patch delete mode 100644 util-linux-honor-noclear-when-reprint-issue.patch diff --git a/fix-lib-internal-cache-size.patch b/fix-lib-internal-cache-size.patch deleted file mode 100644 index a00bafb..0000000 --- a/fix-lib-internal-cache-size.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 2fa4168c8bc9d5438bc1dfadda293c7c21b6fa59 Mon Sep 17 00:00:00 2001 -From: Michael Trapp -Date: Mon, 6 Mar 2023 10:40:20 +0000 -Subject: [PATCH] libuuid: fix lib internal cache size - -The lib internal cache improves throughput in high load -scenarios but for applications with a low request rate, -the cache size must be adapted to this situation. -Therefore the cache size should be changed to the current -requirements of the application during runtime. ---- - libuuid/src/gen_uuid.c | 30 ++++++++++++++++++++++-------- - 1 file changed, 22 insertions(+), 8 deletions(-) - -Index: util-linux-2.38.1/libuuid/src/gen_uuid.c -=================================================================== ---- util-linux-2.38.1.orig/libuuid/src/gen_uuid.c -+++ util-linux-2.38.1/libuuid/src/gen_uuid.c -@@ -442,25 +442,35 @@ int __uuid_generate_time(uuid_t out, int - */ - static int uuid_generate_time_generic(uuid_t out) { - #ifdef HAVE_TLS -+ /* thread local cache for uuidd based requests */ -+ const int cs_min = (1<<6); -+ const int cs_max = (1<<18); -+ const int cs_factor = 2; - THREAD_LOCAL int num = 0; -- THREAD_LOCAL int cache_size = 1; -+ THREAD_LOCAL int cache_size = cs_min; -+ THREAD_LOCAL int last_used = 0; - THREAD_LOCAL struct uuid uu; - THREAD_LOCAL time_t last_time = 0; - time_t now; - -- if (num > 0) { -+ if (num > 0) { /* expire cache */ - now = time(NULL); -- if (now > last_time+1) -+ if (now > last_time+1) { -+ last_used = cache_size - num; - num = 0; -+ } - } -- if (num <= 0) { -+ if (num <= 0) { /* fill cache */ - /* - * num + OP_BULK provides a local cache in each application. - * Start with a small cache size to cover short running applications -- * and increment the cache size over the runntime. -+ * and adjust the cache size over the runntime. - */ -- if (cache_size < 1000000) -- cache_size *= 10; -+ if ((last_used == cache_size) && (cache_size < cs_max)) -+ cache_size *= cs_factor; -+ else if ((last_used < (cache_size / cs_factor)) && (cache_size > cs_min)) -+ cache_size /= cs_factor; -+ - num = cache_size; - - if (get_uuid_via_daemon(UUIDD_OP_BULK_TIME_UUID, -@@ -470,9 +480,11 @@ static int uuid_generate_time_generic(uu - num--; - return 0; - } -+ /* request to daemon failed, reset cache */ - num = 0; -+ cache_size = cs_min; - } -- if (num > 0) { -+ if (num > 0) { /* serve uuid from cache */ - uu.time_low++; - if (uu.time_low == 0) { - uu.time_mid++; -@@ -481,6 +493,8 @@ static int uuid_generate_time_generic(uu - } - num--; - uuid_pack(&uu, out); -+ if (num == 0) -+ last_used = cache_size; - return 0; - } - #else diff --git a/util-linux-2.38.1.tar.sign b/util-linux-2.38.1.tar.sign deleted file mode 100644 index cee39bb..0000000 --- a/util-linux-2.38.1.tar.sign +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCAAdFiEEsMZNFDAcxu+u32Dk5LcdXuw5woQFAmLrjp8ACgkQ5LcdXuw5 -woTQgxAAgQWiFmOhNikEeRb2LoTlitzPCc7pFL1cEIIkkdQM6pihLU5hw5cPT+lW -HSQlmZNer4JkvytXuG6Wif54viTzujs6Jy9g29AtuItKF9Nb0li2hUi4sMqwEGj8 -TzlvTZEIHYW71S3ttg6lrZTlufyw8gP8IFXG9gjkrNVPBllAjlr1O4EOwCSF/Gpl -7a+bsDqFPua7zD0QAGs8M4KxTCnTSM76I2xPrV/tNVXRLeL3MLMA8o8TWIfwkPfc -RGrVTPVsUsguu6Vh8dePgIN6llrm9kuVL90p4HzwTuAL2y6xsaI0VDhQX1Zzdg1p -FuI+sjkdhpaQtsqwiK8IaGaJMzzSolhQ7u3Ki7P9/86U1CK5l486QN431d6+Xmoo -Gv0DpTlDMtwAgto59Jfz7S2qhCnx0hLBA0t0EmYL7J4sFGS7TSHjgCnKAs3q7QjH -kYblZZVTPBzIpw1g2iGNWm4zTFo6Ua6v2miLSDxmZs7hEw73moVobQnzlqwUtquo -JmX/bDRPXCpF4P4Z1GMyh8H03gL5u8XuzvSJyW9mAZv9FxB8Fy1SA6GHG0cVSluJ -WpNDHSJSFBR4yiGB0/YC9LLt6jhEsgjsI4bs3PTOgbthUF2ruWa2zc95KIaZa2Jt -J9WFmGPpbHi9aGQA4o/KW9L5M3QDL79lPYLmrpiinKxkRpDcrs4= -=jkzH ------END PGP SIGNATURE----- diff --git a/util-linux-2.38.1.tar.xz b/util-linux-2.38.1.tar.xz deleted file mode 100644 index c985e7a..0000000 --- a/util-linux-2.38.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:60492a19b44e6cf9a3ddff68325b333b8b52b6c59ce3ebd6a0ecaa4c5117e84f -size 7495904 diff --git a/util-linux-2.39.tar.sign b/util-linux-2.39.tar.sign new file mode 100644 index 0000000..a5f1fda --- /dev/null +++ b/util-linux-2.39.tar.sign @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEsMZNFDAcxu+u32Dk5LcdXuw5woQFAmRktYcACgkQ5LcdXuw5 +woSHyQ/9HIJaa48NCjD318dsoBmxPvoiPncrSmgFhLvNXk+nOWHT83c3oYuz69bH +9r/ySeMuJj69H5+yLZ3aGaP9jm1Qf7Y/c1HXRPt3iZp2/vDKC07V7PQ/ShiISZla +CXsqgPBqbW8WOgdeWRkaH4KI79aT8zrcnXc6kwB0SbYMqVlwksQC/PqS9tqzTf5H +zKdTuQGUOk9jSv3dCYnX0ZAcycFJsvot5GMbwd/vcJklI2abw7E4scGN+ek9W/QN +uXhTnR1oF7ICd9DBc+ocddmRGUHSosSHo9hBor5D7I3GJeoJw05ecQ/SLRrehXoB +lhPSJ9kwLMr+tZiDSwMzb/8hT3xEjII0RXJ2jLV8Z0hfCVGH/C16vIW+KXL0W13+ +x/ZRJZf7tFrU68yYhHjGjUSWZns8KCSx3cy2yWM1snJoBYwvempK/mn3oZ6HJOzg +Vb08SuuG0xRpEB5gG2qHvK2+ExUdI3nd9cJgRNg47KoHo0W+z3Al9IzmS5Nqwocd +AYtKA8VjRxmXnm6OFFt2WI/3lwCE7DCmph278JGuouoprF2HoGN6f0FGvi7MR1yc +UGxTtUEvn1okr5Odx4izJs9FORS+jml0oCtmLl2FK9pT7zee3uNHL3+Nz8igNPGL +zwMbWgd6fiFwAXI5huOxhIOVM1xAfcGjwdUAzoioUJSdLNNJ+1Q= +=Epvd +-----END PGP SIGNATURE----- diff --git a/util-linux-2.39.tar.xz b/util-linux-2.39.tar.xz new file mode 100644 index 0000000..783456f --- /dev/null +++ b/util-linux-2.39.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:32b30a336cda903182ed61feb3e9b908b762a5e66fe14e43efb88d37162075cb +size 8103428 diff --git a/util-linux-fix-tests-when-at-symbol-in-path.patch b/util-linux-fix-tests-when-at-symbol-in-path.patch deleted file mode 100644 index 1a32532..0000000 --- a/util-linux-fix-tests-when-at-symbol-in-path.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 057579455a40d0cc7612938aa3d11a02b279e89c Mon Sep 17 00:00:00 2001 -From: David Anes -Date: Fri, 9 Dec 2022 18:09:31 +0100 -Subject: [PATCH] tests: allow paths in tests to contain '@' char - -Tests fail when the build directory contains -'@' in its path, as its sent to 'sed' unescaped. - -This patch allows to build in such environments, -which typically happen on automated systems (for -example, when building concurrently with Jenkins). ---- - tests/functions.sh | 4 +++- - tests/ts/minix/fsck | 5 ++++- - 2 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/tests/functions.sh b/tests/functions.sh -index 22bfc24c93..6975930e33 100644 ---- a/tests/functions.sh -+++ b/tests/functions.sh -@@ -853,7 +853,9 @@ function ts_fdisk_clean { - - # remove non comparable parts of fdisk output - if [ -n "${DEVNAME}" ]; then -- sed -i -e "s@${DEVNAME}@@;" $TS_OUTPUT $TS_ERRLOG -+ # escape "@" with "\@" in $img. This way sed correctly -+ # replaces paths containing "@" characters -+ sed -i -e "s@${DEVNAME//\@/\\\@}@@;" $TS_OUTPUT $TS_ERRLOG - fi - - sed -i \ -diff --git a/tests/ts/minix/fsck b/tests/ts/minix/fsck -index 335f180dcc..f246a87a76 100755 ---- a/tests/ts/minix/fsck -+++ b/tests/ts/minix/fsck -@@ -50,7 +50,10 @@ done - - rm -f $img - --sed -i "s@$img@image@g" $TS_OUTPUT -+# escape "@" with "\@" in $img. This way sed correctly -+# replaces paths containing "@" characters -+sed -i "s@${img//\@/\\\@}@image@g" $TS_OUTPUT -+ - - ts_finalize - diff --git a/util-linux-fix-tests-with-64k-pagesize.patch b/util-linux-fix-tests-with-64k-pagesize.patch new file mode 100644 index 0000000..3996bae --- /dev/null +++ b/util-linux-fix-tests-with-64k-pagesize.patch @@ -0,0 +1,276 @@ +From 8b36444f447949c3ab477f2c43b45a94c30ee7bf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= +Date: Sun, 21 May 2023 21:42:14 +0200 +Subject: [PATCH 1/4] fadvise: (test) dynamically calculate expected test + values +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Thomas Weißschuh +--- + tests/ts/fadvise/drop | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop +index 7c7eee5dc..86c0d5b0a 100755 +--- a/tests/ts/fadvise/drop ++++ b/tests/ts/fadvise/drop +@@ -16,7 +16,7 @@ ts_check_prog "sleep" + ts_cd "$TS_OUTDIR" + + FILE="ddtest" +-BS=4k ++BS=4096 + COUNT=8 + + FILE_FS="$("$TS_CMD_FINDMNT" -nr -o FSTYPE -T "$PWD")" +@@ -41,22 +41,22 @@ create_file() { + echo + + create_file +- echo "offset: 8192" +- "$TS_CMD_FADVISE" -o 8192 "$FILE" ++ echo "offset: $(( 2 * $BS ))" ++ "$TS_CMD_FADVISE" -o $(( 2 * $BS )) "$FILE" + echo status: $? + "$TS_CMD_FINCORE" "$FILE" + echo + + create_file +- echo "length: 16384" +- "$TS_CMD_FADVISE" -l 16384 "$FILE" ++ echo "length: $(( 4 * $BS ))" ++ "$TS_CMD_FADVISE" -l $(( 4 * $BS )) "$FILE" + echo status: $? + "$TS_CMD_FINCORE" "$FILE" + echo + + create_file +- echo "offset: 8192, length: 16384 fd: 42" +- "$TS_CMD_FADVISE" -o 8192 -l 16384 --fd 42 42<"$FILE" ++ echo "offset: $(( 2 * $BS )), length: $(( 4 * $BS )) fd: 42" ++ "$TS_CMD_FADVISE" -o $(( 2 * $BS )) -l $(( 4 * $BS )) --fd 42 42<"$FILE" + echo status: $? + "$TS_CMD_FINCORE" "$FILE" + echo +-- +2.40.0 + + +From e5009e773fc801eca887dd43b721cd1b1aa327be Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= +Date: Sun, 21 May 2023 21:43:38 +0200 +Subject: [PATCH 2/4] fadvise: (tests) factor out calls to "fincore" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This will make it easier to pass argument later. + +Signed-off-by: Thomas Weißschuh +--- + tests/ts/fadvise/drop | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop +index 86c0d5b0a..8869b7da4 100755 +--- a/tests/ts/fadvise/drop ++++ b/tests/ts/fadvise/drop +@@ -28,37 +28,41 @@ create_file() { + dd if=/dev/zero of="$FILE" bs=$BS count=$COUNT conv=fsync >& /dev/null + } + ++do_fincore() { ++ "$TS_CMD_FINCORE" "$FILE" ++} ++ + { + create_file +- "$TS_CMD_FINCORE" "$FILE" ++ do_fincore + echo + + create_file + echo "whole file" + "$TS_CMD_FADVISE" "$FILE" + echo status: $? +- "$TS_CMD_FINCORE" "$FILE" ++ do_fincore + echo + + create_file + echo "offset: $(( 2 * $BS ))" + "$TS_CMD_FADVISE" -o $(( 2 * $BS )) "$FILE" + echo status: $? +- "$TS_CMD_FINCORE" "$FILE" ++ do_fincore + echo + + create_file + echo "length: $(( 4 * $BS ))" + "$TS_CMD_FADVISE" -l $(( 4 * $BS )) "$FILE" + echo status: $? +- "$TS_CMD_FINCORE" "$FILE" ++ do_fincore + echo + + create_file + echo "offset: $(( 2 * $BS )), length: $(( 4 * $BS )) fd: 42" + "$TS_CMD_FADVISE" -o $(( 2 * $BS )) -l $(( 4 * $BS )) --fd 42 42<"$FILE" + echo status: $? +- "$TS_CMD_FINCORE" "$FILE" ++ do_fincore + echo + + rm "$FILE" +-- +2.40.0 + + +From 33980996d0b429fc59c40f8352633c0a21a0f96a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= +Date: Sun, 21 May 2023 21:44:20 +0200 +Subject: [PATCH 3/4] fadvise: (test) don't compare fincore page counts +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +These depend on the machines pagesize and are therefore not a good +comparision. + +Signed-off-by: Thomas Weißschuh +--- + tests/expected/fadvise/drop | 20 ++++++++++---------- + tests/ts/fadvise/drop | 2 +- + 2 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/tests/expected/fadvise/drop b/tests/expected/fadvise/drop +index f2360b56f..25f23e050 100644 +--- a/tests/expected/fadvise/drop ++++ b/tests/expected/fadvise/drop +@@ -1,23 +1,23 @@ +- RES PAGES SIZE FILE +- 32K 8 32K ddtest ++ RES SIZE FILE ++ 32K 32K ddtest + + whole file + status: 0 +-RES PAGES SIZE FILE +- 0B 0 32K ddtest ++RES SIZE FILE ++ 0B 32K ddtest + + offset: 8192 + status: 0 +-RES PAGES SIZE FILE +- 8K 2 32K ddtest ++RES SIZE FILE ++ 8K 32K ddtest + + length: 16384 + status: 0 +- RES PAGES SIZE FILE +- 16K 4 32K ddtest ++ RES SIZE FILE ++ 16K 32K ddtest + + offset: 8192, length: 16384 fd: 42 + status: 0 +- RES PAGES SIZE FILE +- 16K 4 32K ddtest ++ RES SIZE FILE ++ 16K 32K ddtest + +diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop +index 8869b7da4..6c4298e87 100755 +--- a/tests/ts/fadvise/drop ++++ b/tests/ts/fadvise/drop +@@ -29,7 +29,7 @@ create_file() { + } + + do_fincore() { +- "$TS_CMD_FINCORE" "$FILE" ++ "$TS_CMD_FINCORE" -o RES,SIZE,FILE "$FILE" + } + + { +-- +2.40.0 + + +From c0f31b79f5d1c665cdc057fb32f4d161d28aa5b2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= +Date: Sun, 21 May 2023 21:45:10 +0200 +Subject: [PATCH 4/4] fadvise: (test) test with 64k blocks +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This will allow the tests to also pass on systems with 64k pagesizes. + +Closes #2249 +Signed-off-by: Thomas Weißschuh +--- + tests/expected/fadvise/drop | 26 +++++++++++++------------- + tests/ts/fadvise/drop | 2 +- + 2 files changed, 14 insertions(+), 14 deletions(-) + +diff --git a/tests/expected/fadvise/drop b/tests/expected/fadvise/drop +index 25f23e050..e7bb26b6e 100644 +--- a/tests/expected/fadvise/drop ++++ b/tests/expected/fadvise/drop +@@ -1,23 +1,23 @@ +- RES SIZE FILE +- 32K 32K ddtest ++ RES SIZE FILE ++ 512K 512K ddtest + + whole file + status: 0 +-RES SIZE FILE +- 0B 32K ddtest ++RES SIZE FILE ++ 0B 512K ddtest + +-offset: 8192 ++offset: 131072 + status: 0 +-RES SIZE FILE +- 8K 32K ddtest ++ RES SIZE FILE ++ 128K 512K ddtest + +-length: 16384 ++length: 262144 + status: 0 +- RES SIZE FILE +- 16K 32K ddtest ++ RES SIZE FILE ++ 256K 512K ddtest + +-offset: 8192, length: 16384 fd: 42 ++offset: 131072, length: 262144 fd: 42 + status: 0 +- RES SIZE FILE +- 16K 32K ddtest ++ RES SIZE FILE ++ 256K 512K ddtest + +diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop +index 6c4298e87..45dcb9110 100755 +--- a/tests/ts/fadvise/drop ++++ b/tests/ts/fadvise/drop +@@ -16,7 +16,7 @@ ts_check_prog "sleep" + ts_cd "$TS_OUTDIR" + + FILE="ddtest" +-BS=4096 ++BS=65536 + COUNT=8 + + FILE_FS="$("$TS_CMD_FINDMNT" -nr -o FSTYPE -T "$PWD")" +-- +2.40.0 + diff --git a/util-linux-honor-noclear-when-reprint-issue.patch b/util-linux-honor-noclear-when-reprint-issue.patch deleted file mode 100644 index eb08d4f..0000000 --- a/util-linux-honor-noclear-when-reprint-issue.patch +++ /dev/null @@ -1,24 +0,0 @@ -Index: util-linux-2.38.1/term-utils/agetty.c -=================================================================== ---- util-linux-2.38.1.orig/term-utils/agetty.c -+++ util-linux-2.38.1/term-utils/agetty.c -@@ -2066,7 +2066,8 @@ again: - if (!wait_for_term_input(STDIN_FILENO)) { - eval_issue_file(ie, op, tp); - if (issue_is_changed(ie)) { -- if (op->flags & F_VCONSOLE) -+ if ((op->flags & F_VCONSOLE) -+ && (op->flags & F_NOCLEAR) == 0) - termio_clear(STDOUT_FILENO); - goto again; - } -@@ -2207,7 +2208,8 @@ static char *get_logname(struct issue *i - if (!issue_is_changed(ie)) - goto no_reload; - tcflush(STDIN_FILENO, TCIFLUSH); -- if (op->flags & F_VCONSOLE) -+ if ((op->flags & F_VCONSOLE) -+ && (op->flags & F_NOCLEAR) == 0) - termio_clear(STDOUT_FILENO); - bp = logname; - *bp = '\0'; diff --git a/util-linux.changes b/util-linux.changes index 51ad497..7994059 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,33 @@ +------------------------------------------------------------------- +Fri Jun 9 13:35:33 UTC 2023 - Antonio Teixeira + +- Upgrade to version 2.39: + * blkpr: New command to run persistent reservations ioctls on a device. + * pipesz: New command to set or examine pipe and FIFO buffer sizes. + * waitpid: New command to wait for arbitrary processes. + * mount, libmount: Supports new file descriptors based mount kernel API. + * mount, libmount: New mount options X-mount.idmap=, X-mount.auto-fstypes, + X-mount.{owner,group,mode}=, rootcontext=@target. + * renice: Supports posix-compliant -n (via POSIXLY_CORRECT) and add a new + option --relative. + * dmesg: Supports subsecond granularity for --since and --until. + * dmesg: Option --level accepts '+' prefix or postfix for a level name to specify + all higher or all lower levels. + * blkid, libblkid: Supports bcachefs. + * fstrim: New option --types to filter out by filesystem types. + * lsblk: --nvme and --virtio are new options to filter out devices. + * lsblk: Improves detection of hotplug and removable status. + * nsenter: New option --env for allowing environment variables inheritance. + * namei: New option -Z to report SELinux contexts. + * Many other new features and fixes. For complete list see + https://kernel.org/pub/linux/utils/util-linux/v2.39/v2.39-ReleaseNotes +- Dropped upstreamed patches: + * fix-lib-internal-cache-size.patch + * util-linux-fix-tests-when-at-symbol-in-path.patch + * util-linux-honor-noclear-when-reprint-issue.patch +- Add upstream patch util-linux-fix-tests-with-64k-pagesize.patch + * Fixes fadvise tests for ppc64 + ------------------------------------------------------------------- Tue May 9 19:46:41 UTC 2023 - Antonio Teixeira diff --git a/util-linux.spec b/util-linux.spec index 98fd428..cb9357b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -85,11 +85,11 @@ Group: Development/Languages/Python %endif # ulbuild == python -Version: 2.38.1 +Version: 2.39 Release: 0 License: GPL-2.0-or-later URL: https://www.kernel.org/pub/linux/utils/util-linux/ -Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.38/util-linux-%{version}.tar.xz +Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.39/util-linux-%{version}.tar.xz Source2: util-linux-login_defs-check.sh Source3: util-linux-rpmlintrc Source6: etc_filesystems @@ -98,7 +98,7 @@ Source8: login.pamd Source9: remote.pamd Source10: su.pamd Source11: su.default -Source12: https://www.kernel.org/pub/linux/utils/util-linux/v2.38/util-linux-%{version}.tar.sign +Source12: https://www.kernel.org/pub/linux/utils/util-linux/v2.39/util-linux-%{version}.tar.sign Source13: %{_name}.keyring Source14: runuser.pamd Source15: runuser-l.pamd @@ -110,12 +110,8 @@ Patch1: libmount-print-a-blacklist-hint-for-unknown-filesyst.patch Patch2: Add-documentation-on-blacklisted-modules-to-mount-8-.patch # PATCH-FIX-SUSE util-linux-bash-completion-su-chsh-l.patch bsc1172427 -- Fix "su -s" bash completion. Patch4: util-linux-bash-completion-su-chsh-l.patch -# PATCH-FIX-SUSE util-linux-fix-tests-when-@-in-path.patch bsc#1194038 -- rpmbuild %checks fail when @ in the directory path -Patch5: util-linux-fix-tests-when-at-symbol-in-path.patch -# https://github.com/util-linux/util-linux/commit/0c0fb46dcef6c63c74094486e499e376fdb33a04.diff -Patch6: util-linux-honor-noclear-when-reprint-issue.patch -# Patch-FIX_UPSTREAM: fix-lib-internal-cache-size.patch bsc#1210164 -- gh#util-linux/util-linux@2fa4168c8bc9 -Patch7: fix-lib-internal-cache-size.patch +# PATCH-FIX-UPSTREAM util-linux-fix-tests-with-64k-pagesize.patch -- fadvise: fix tests with 64k pagesize +Patch5: util-linux-fix-tests-with-64k-pagesize.patch BuildRequires: audit-devel BuildRequires: bc BuildRequires: binutils-devel @@ -938,6 +934,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %core %{_bindir}/colrm %core %{_bindir}/column %core %{_bindir}/dmesg +%core %{_bindir}/fadvise %core %{_bindir}/fallocate %core %{_bindir}/fincore @@ -973,6 +970,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %core %verify(not mode) %attr(%ul_suid,root,root) %{_bindir}/mount %core %{_bindir}/namei %core %{_bindir}/nsenter +%core %{_bindir}/pipesz %core %{_bindir}/prlimit %core %{_bindir}/rename %core %{_bindir}/renice @@ -993,11 +991,13 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %core %{_bindir}/uuidgen %core %{_bindir}/uuidparse %core %{_bindir}/uname26 +%core %{_bindir}/waitpid %core %{_bindir}/wdctl %core %{_sbindir}/addpart %core %{_sbindir}/agetty %core %{_sbindir}/blkid %core %{_sbindir}/blkdiscard +%core %{_sbindir}/blkpr # blkzone depends on linux/blkzoned.h %if 0%{?suse_version} >= 1330 @@ -1128,6 +1128,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %core %{_mandir}/man1/column.1.gz %core %{_mandir}/man1/dmesg.1.gz %core %{_mandir}/man1/eject.1.gz +%core %{_mandir}/man1/fadvise.1.gz %core %{_mandir}/man1/fallocate.1.gz %core %{_mandir}/man1/fincore.1.gz %core %{_mandir}/man1/flock.1.gz @@ -1152,6 +1153,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %core %{_mandir}/man1/nsenter.1.gz %core %{_mandir}/man1/ionice.1.gz %core %{_mandir}/man1/irqtop.1.gz +%core %{_mandir}/man1/pipesz.1.gz %core %{_mandir}/man1/prlimit.1.gz %core %{_mandir}/man1/rename.1.gz %core %{_mandir}/man1/rev.1.gz @@ -1173,6 +1175,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %core %{_mandir}/man1/utmpdump.1.gz %core %{_mandir}/man1/uuidgen.1.gz %core %{_mandir}/man1/uuidparse.1.gz +%core %{_mandir}/man1/waitpid.1.gz %core %{_mandir}/man5/adjtime_config.5.gz %core %{_mandir}/man5/fstab.5.gz %core %{_mandir}/man5/terminal-colors.d.5.gz @@ -1185,6 +1188,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : # suse_version >= 1330 %core %{_mandir}/man8/blockdev.8.gz +%core %{_mandir}/man8/blkpr.8.gz %core %{_mandir}/man8/chmem.8.gz %core %{_mandir}/man8/ctrlaltdel.8.gz %core %{_mandir}/man8/delpart.8.gz @@ -1305,6 +1309,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %exclude %{_datadir}/bash-completion/completions/dmesg %exclude %{_datadir}/bash-completion/completions/eject %exclude %{_datadir}/bash-completion/completions/fallocate +%exclude %{_datadir}/bash-completion/completions/fadvise %exclude %{_datadir}/bash-completion/completions/fdformat %exclude %{_datadir}/bash-completion/completions/fdisk %exclude %{_datadir}/bash-completion/completions/fincore @@ -1348,6 +1353,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %exclude %{_datadir}/bash-completion/completions/namei %exclude %{_datadir}/bash-completion/completions/nsenter %exclude %{_datadir}/bash-completion/completions/partx +%exclude %{_datadir}/bash-completion/completions/pipesz %exclude %{_datadir}/bash-completion/completions/pivot_root %exclude %{_datadir}/bash-completion/completions/prlimit %exclude %{_datadir}/bash-completion/completions/readprofile @@ -1379,6 +1385,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %exclude %{_datadir}/bash-completion/completions/utmpdump %exclude %{_datadir}/bash-completion/completions/uuidgen %exclude %{_datadir}/bash-completion/completions/uuidparse +%exclude %{_datadir}/bash-completion/completions/waitpid %exclude %{_datadir}/bash-completion/completions/wdctl %exclude %{_datadir}/bash-completion/completions/whereis %exclude %{_datadir}/bash-completion/completions/wipefs From 682c2c092ce64b4cda004cb81b8ee316d1f93d6266d7c0456e6ea8b6bb5025f6 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 14 Jun 2023 00:59:17 +0000 Subject: [PATCH 2/4] Accepting request 1092872 from home:kukuk:cleanup Sometimes util-linux failed for me, because the SYSTEMD_DEP grep matches auto*.cache* und similar files. I don't understand why sometimes and sometimes not, but the new expression is much more robust. With util-linux 2.40 and systemd v254 the tty tools will depend on libsystemd, so build tty-tools as subpackage of systemd already now. Has no impact today, but allows already to test the current pre-versions. OBS-URL: https://build.opensuse.org/request/show/1092872 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=514 --- util-linux.changes | 7 ++++++ util-linux.spec | 54 +++++++++++++++++++++++++--------------------- 2 files changed, 36 insertions(+), 25 deletions(-) diff --git a/util-linux.changes b/util-linux.changes index 7994059..a2901cc 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jun 13 11:48:38 UTC 2023 - Thorsten Kukuk + +- UTIL_LINUX_FOUND_SYSTEMD_DEPS: make grep more robust +- util-linux-tty-tools: build together with systemd in preparation + of util-linux 2.40 together with systemd v254 + ------------------------------------------------------------------- Fri Jun 9 13:35:33 UTC 2023 - Antonio Teixeira diff --git a/util-linux.spec b/util-linux.spec index cb9357b..ddc3446 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -359,6 +359,14 @@ Requires: libuuid-devel = %{version} Files to develop applications using the library to generate universally unique IDs (UUIDs). +%lang_package +%endif +# ulsubset == core + +#################### +# Systemd packages # +#################### +%if "%ulsubset" == "systemd" %package -n util-linux-tty-tools Summary: Tools for writing to TTYs License: BSD-3-Clause @@ -372,14 +380,6 @@ Provides: util-linux:%{_bindir}/write %description -n util-linux-tty-tools Tools that write to TTYs that the current user does not own. -%lang_package -%endif -# ulsubset == core - -#################### -# Systemd packages # -#################### -%if "%ulsubset" == "systemd" %package -n uuidd Summary: Helper daemon to guarantee uniqueness of time-based UUIDs License: GPL-2.0-or-later @@ -524,7 +524,7 @@ bash ./util-linux-login_defs-check.sh # # WARNING: Never edit following line without doing all suggested in the echo below! UTIL_LINUX_KNOWN_SYSTEMD_DEPS='./login-utils/lslogins.c ./misc-utils/findmnt.c ./misc-utils/logger.c ./misc-utils/lsblk-properties.c ./misc-utils/uuidd.c ' -UTIL_LINUX_FOUND_SYSTEMD_DEPS=$(grep -rl 'HAVE_LIB\(SYSTEMD\|UDEV\)' . | grep -F '.c' | LC_ALL=C sort | tr '\n' ' ') +UTIL_LINUX_FOUND_SYSTEMD_DEPS=$(grep -rl 'HAVE_LIB\(SYSTEMD\|UDEV\)' . | grep '\.c$' | LC_ALL=C sort | tr '\n' ' ') if test "$UTIL_LINUX_KNOWN_SYSTEMD_DEPS" != "$UTIL_LINUX_FOUND_SYSTEMD_DEPS" ; then echo "List of utilities depending on systemd have changed. Please check the new util-linux-systemd file list, file removal and update of Conflicts for safe update! @@ -714,11 +714,14 @@ exit "$result" %verifyscript %verify_permissions -e %{_bindir}/mount -e %{_bindir}/umount %verify_permissions -e %{_bindir}/su +%endif +%dnl # ulsubset == core, ulbuild == base +%if "%ulsubset" == "systemd" %verifyscript -n util-linux-tty-tools %verify_permissions -e %{_bindir}/wall -e %{_bindir}/write %endif -%dnl # ulsubset == core, ulbuild == base +%dnl # ulsubset == systemd, ulbuild == base %endif %dnl # ulbuild == base @@ -793,9 +796,6 @@ done %postun -n libfdisk1 -p /sbin/ldconfig -%post -n util-linux-tty-tools -%set_permissions %{_bindir}/wall %{_bindir}/write - %endif %dnl # ulsubset == core, pre & post %dnl @@ -841,6 +841,9 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %postun -n uuidd %{service_del_postun uuidd.socket uuidd.service} +%post -n util-linux-tty-tools +%set_permissions %{_bindir}/wall %{_bindir}/write + %endif %dnl # ulsubset == systemd, pre & post %dnl @@ -1485,18 +1488,6 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %{_libdir}/libuuid.so.1 %{_libdir}/libuuid.so.1.* -%files -n util-linux-tty-tools -%{_bindir}/mesg -%verify(not mode) %attr(0755,root,tty) %{_bindir}/wall -%verify(not mode) %attr(0755,root,tty) %{_bindir}/write -%{_mandir}/man1/mesg.1.gz -%{_mandir}/man1/wall.1.gz -%{_mandir}/man1/write.1.gz - -%{_datadir}/bash-completion/completions/wall -%{_datadir}/bash-completion/completions/write -%{_datadir}/bash-completion/completions/mesg - # devel, lang and uuidd files are not packaged in staging mode # and packaged separately in full mode # FIXME: Is it needed? @@ -1567,6 +1558,19 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %{_sbindir}/rcuuidd %{_unitdir}/uuidd.service %{_unitdir}/uuidd.socket + +%files -n util-linux-tty-tools +%{_bindir}/mesg +%verify(not mode) %attr(0755,root,tty) %{_bindir}/wall +%verify(not mode) %attr(0755,root,tty) %{_bindir}/write +%{_mandir}/man1/mesg.1.gz +%{_mandir}/man1/wall.1.gz +%{_mandir}/man1/write.1.gz + +%{_datadir}/bash-completion/completions/wall +%{_datadir}/bash-completion/completions/write +%{_datadir}/bash-completion/completions/mesg + %endif # ulsubset == systemd From 08b585224a74cb5da8caa01d5ec6461a0eff9d2de7acb8f58f8073f5b678098b Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 14 Jun 2023 02:33:38 +0000 Subject: [PATCH 3/4] use an even better matching strategy OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=515 --- util-linux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux.spec b/util-linux.spec index ddc3446..b8d30df 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -524,7 +524,7 @@ bash ./util-linux-login_defs-check.sh # # WARNING: Never edit following line without doing all suggested in the echo below! UTIL_LINUX_KNOWN_SYSTEMD_DEPS='./login-utils/lslogins.c ./misc-utils/findmnt.c ./misc-utils/logger.c ./misc-utils/lsblk-properties.c ./misc-utils/uuidd.c ' -UTIL_LINUX_FOUND_SYSTEMD_DEPS=$(grep -rl 'HAVE_LIB\(SYSTEMD\|UDEV\)' . | grep '\.c$' | LC_ALL=C sort | tr '\n' ' ') +UTIL_LINUX_FOUND_SYSTEMD_DEPS=$(find . -type f -name "*.c" -exec grep -l '#.*if.*HAVE_LIB\(SYSTEMD\|\UDEV\)' '{}' '+' | LC_ALL=C sort | tr '\n' ' ') if test "$UTIL_LINUX_KNOWN_SYSTEMD_DEPS" != "$UTIL_LINUX_FOUND_SYSTEMD_DEPS" ; then echo "List of utilities depending on systemd have changed. Please check the new util-linux-systemd file list, file removal and update of Conflicts for safe update! From ae5a1c3844e2e934b2f3075b7a4db0ca82c57d8b6ebf9181d9e8339d2192e1d3 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 23 Jun 2023 09:44:19 +0000 Subject: [PATCH 4/4] Accepting request 1094801 from home:favogt:branches:Base:System - Add patch to fix regression with mount options handling (gh#util-linux/util-linux#2326): * 0001-libmount-fix-sync-options-between-context-and-fs-str.patch - Set --disable-libmount-mountfd-support, it's very broken and needs both util-linux and kernel fixes (gh#util-linux/util-linux#2287) OBS-URL: https://build.opensuse.org/request/show/1094801 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=516 --- ...c-options-between-context-and-fs-str.patch | 213 ++++++++++++++++++ util-linux.changes | 12 + util-linux.spec | 3 + 3 files changed, 228 insertions(+) create mode 100644 0001-libmount-fix-sync-options-between-context-and-fs-str.patch diff --git a/0001-libmount-fix-sync-options-between-context-and-fs-str.patch b/0001-libmount-fix-sync-options-between-context-and-fs-str.patch new file mode 100644 index 0000000..84eb10c --- /dev/null +++ b/0001-libmount-fix-sync-options-between-context-and-fs-str.patch @@ -0,0 +1,213 @@ +From 7b37d5b5667103beac16f7ae3cca5feaf00a21b0 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 22 Jun 2023 13:11:57 +0200 +Subject: [PATCH] libmount: fix sync options between context and fs structs + +Since v2.39 libmount prefers "struct libmnt_optlist" to keep mount options +rather than the original "struct libmnt_fs". This is problem if the +"fs" struct is defined and maintained outside the context. + +The library has already a way how to sync "fs" and "optlist", but this +needs to be improved and used more widely. Changes: + +* force "fs" from context to always read options from "optlist" + +* copy options from "fs" to "optlist" in mnt_context_set_fs() + +* internally redirect mnt_fs_* API for options to "optlist" if optlist + defined + +* add simple test to make sure options from different sources are + always merged together + +Addresses: https://github.com/util-linux/util-linux/issues/2326 +Signed-off-by: Karel Zak +--- + libmount/src/context.c | 82 ++++++++++++++++++++++++++++++++++++++++-- + libmount/src/fs.c | 23 +++++++++--- + 2 files changed, 97 insertions(+), 8 deletions(-) + +diff --git a/libmount/src/context.c b/libmount/src/context.c +index 4c5e65659..0cd320190 100644 +--- a/libmount/src/context.c ++++ b/libmount/src/context.c +@@ -911,9 +911,29 @@ int mnt_context_set_fs(struct libmnt_context *cxt, struct libmnt_fs *fs) + if (!cxt) + return -EINVAL; + ++ if (cxt->fs == fs) ++ return 0; ++ + DBG(CXT, ul_debugobj(cxt, "setting new FS")); +- mnt_ref_fs(fs); /* new */ +- mnt_unref_fs(cxt->fs); /* old */ ++ ++ /* new */ ++ if (fs) { ++ struct libmnt_optlist *ol = mnt_context_get_optlist(cxt); ++ ++ if (!ol) ++ return -ENOMEM; ++ ++ mnt_ref_fs(fs); ++ ++ mnt_optlist_set_optstr(ol, mnt_fs_get_options(fs), NULL); ++ mnt_fs_follow_optlist(fs, ol); ++ } ++ ++ /* old */ ++ if (cxt->fs) ++ mnt_fs_follow_optlist(cxt->fs, NULL); ++ mnt_unref_fs(cxt->fs); ++ + cxt->fs = fs; + return 0; + } +@@ -932,8 +952,17 @@ struct libmnt_fs *mnt_context_get_fs(struct libmnt_context *cxt) + { + if (!cxt) + return NULL; +- if (!cxt->fs) ++ if (!cxt->fs) { ++ struct libmnt_optlist *ol = mnt_context_get_optlist(cxt); ++ ++ if (!ol) ++ return NULL; + cxt->fs = mnt_new_fs(); ++ if (!cxt->fs) ++ return NULL; ++ ++ mnt_fs_follow_optlist(cxt->fs, ol); ++ } + return cxt->fs; + } + +@@ -3314,6 +3343,50 @@ static int test_flags(struct libmnt_test *ts, int argc, char *argv[]) + return rc; + } + ++static int test_cxtsync(struct libmnt_test *ts, int argc, char *argv[]) ++{ ++ struct libmnt_context *cxt; ++ struct libmnt_fs *fs; ++ unsigned long flags = 0; ++ int rc; ++ ++ if (argc != 4) ++ return -EINVAL; ++ ++ fs = mnt_new_fs(); ++ if (!fs) ++ return -ENOMEM; ++ ++ rc = mnt_fs_set_options(fs, argv[1]); ++ if (rc) ++ return rc; ++ ++ cxt = mnt_new_context(); ++ if (!cxt) ++ return -ENOMEM; ++ ++ rc = mnt_context_set_fs(cxt, fs); ++ if (rc) ++ return rc; ++ ++ rc = mnt_context_append_options(cxt, argv[2]); ++ if (rc) ++ return rc; ++ ++ rc = mnt_fs_append_options(fs, argv[3]); ++ if (rc) ++ return rc; ++ ++ mnt_context_get_mflags(cxt, &flags); ++ ++ printf(" fs options: %s\n", mnt_fs_get_options(fs)); ++ printf("context options: %s\n", mnt_context_get_options(cxt)); ++ printf(" context mflags: %08lx\n", flags); ++ ++ mnt_free_context(cxt); ++ return 0; ++} ++ + static int test_mountall(struct libmnt_test *ts, int argc, char *argv[]) + { + struct libmnt_context *cxt; +@@ -3361,6 +3434,8 @@ static int test_mountall(struct libmnt_test *ts, int argc, char *argv[]) + return 0; + } + ++ ++ + int main(int argc, char *argv[]) + { + struct libmnt_test tss[] = { +@@ -3368,6 +3443,7 @@ int main(int argc, char *argv[]) + { "--umount", test_umount, "[-t ] [-f][-l][-r] |" }, + { "--mount-all", test_mountall, "[-O ] [-t ] " }, ++ { "--cxtsync", test_cxtsync, " " }, + { "--search-helper", test_search_helper, "" }, + { NULL }}; + +diff --git a/libmount/src/fs.c b/libmount/src/fs.c +index 655f07171..79e32a170 100644 +--- a/libmount/src/fs.c ++++ b/libmount/src/fs.c +@@ -228,10 +228,14 @@ int mnt_fs_follow_optlist(struct libmnt_fs *fs, struct libmnt_optlist *ol) + + if (fs->optlist == ol) + return 0; ++ if (fs->optlist) ++ mnt_unref_optlist(fs->optlist); + + fs->opts_age = 0; + fs->optlist = ol; +- mnt_ref_optlist(ol); ++ ++ if (ol) ++ mnt_ref_optlist(ol); + return 0; + } + +@@ -919,7 +923,11 @@ int mnt_fs_set_options(struct libmnt_fs *fs, const char *optstr) + + if (!fs) + return -EINVAL; +- fs->opts_age = 0; ++ ++ if (fs->optlist) { ++ fs->opts_age = 0; ++ return mnt_optlist_set_optstr(fs->optlist, optstr, NULL); ++ } + + if (optstr) { + int rc = mnt_split_optstr(optstr, &u, &v, &f, 0, 0); +@@ -968,8 +976,10 @@ int mnt_fs_append_options(struct libmnt_fs *fs, const char *optstr) + return -EINVAL; + if (!optstr) + return 0; +- +- fs->opts_age = 0; ++ if (fs->optlist) { ++ fs->opts_age = 0; ++ return mnt_optlist_append_optstr(fs->optlist, optstr, NULL); ++ } + + rc = mnt_split_optstr(optstr, &u, &v, &f, 0, 0); + if (rc) +@@ -1013,7 +1023,10 @@ int mnt_fs_prepend_options(struct libmnt_fs *fs, const char *optstr) + if (!optstr) + return 0; + +- fs->opts_age = 0; ++ if (fs->optlist) { ++ fs->opts_age = 0; ++ return mnt_optlist_prepend_optstr(fs->optlist, optstr, NULL); ++ } + + rc = mnt_split_optstr(optstr, &u, &v, &f, 0, 0); + if (rc) +-- +2.41.0 + diff --git a/util-linux.changes b/util-linux.changes index a2901cc..8a09d66 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Fri Jun 23 07:35:02 UTC 2023 - Fabian Vogt + +- Add patch to fix regression with mount options handling (gh#util-linux/util-linux#2326): + * 0001-libmount-fix-sync-options-between-context-and-fs-str.patch + +------------------------------------------------------------------- +Wed Jun 14 13:33:48 UTC 2023 - Fabian Vogt + +- Set --disable-libmount-mountfd-support, it's very broken and needs + both util-linux and kernel fixes (gh#util-linux/util-linux#2287) + ------------------------------------------------------------------- Tue Jun 13 11:48:38 UTC 2023 - Thorsten Kukuk diff --git a/util-linux.spec b/util-linux.spec index b8d30df..50780aa 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -112,6 +112,8 @@ Patch2: Add-documentation-on-blacklisted-modules-to-mount-8-.patch Patch4: util-linux-bash-completion-su-chsh-l.patch # PATCH-FIX-UPSTREAM util-linux-fix-tests-with-64k-pagesize.patch -- fadvise: fix tests with 64k pagesize Patch5: util-linux-fix-tests-with-64k-pagesize.patch +# https://github.com/util-linux/util-linux/pull/2331 +Patch6: 0001-libmount-fix-sync-options-between-context-and-fs-str.patch BuildRequires: audit-devel BuildRequires: bc BuildRequires: binutils-devel @@ -491,6 +493,7 @@ configure_options+="--with-systemd " --enable-fs-paths-default="/sbin:/usr/sbin"\ --enable-static\ --with-vendordir=%{_distconfdir} \ + --disable-libmount-mountfd-support \ $configure_options make %{?_smp_mflags} }