summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/util-linux
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-07-30 13:45:01 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-02 15:44:10 +0100
commit0b46f264a4c2e8cb75958a81a25a87830db726aa (patch)
tree24e58daf402194304e97efb515061d05500c6f07 /meta/recipes-core/util-linux
parent5322c500c242f0accfb0352dd1429a1599aaa528 (diff)
downloadpoky-0b46f264a4c2e8cb75958a81a25a87830db726aa.tar.gz
util-linux: update 2.37 -> 2.37.1
Drop backports. (From OE-Core rev: d50e8b73c81af52bacc2125c8fe4828ad2da2ef3) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/util-linux')
-rw-r--r--meta/recipes-core/util-linux/util-linux-libuuid_2.37.1.bb (renamed from meta/recipes-core/util-linux/util-linux-libuuid_2.37.bb)0
-rw-r--r--meta/recipes-core/util-linux/util-linux.inc9
-rw-r--r--meta/recipes-core/util-linux/util-linux/0001-login-fix-close_range-use.patch62
-rw-r--r--meta/recipes-core/util-linux/util-linux/8a3a74160b96498d672e3652827aa7e6d7f3a120.patch29
-rw-r--r--meta/recipes-core/util-linux/util-linux/tests-blkdiscard.patch31
-rw-r--r--meta/recipes-core/util-linux/util-linux/tests-eject.patch56
-rw-r--r--meta/recipes-core/util-linux/util-linux/tests-kill.patch88
-rw-r--r--meta/recipes-core/util-linux/util-linux/tests-lscpu.patch42
-rw-r--r--meta/recipes-core/util-linux/util-linux/tests-ul.patch35
-rw-r--r--meta/recipes-core/util-linux/util-linux_2.37.1.bb (renamed from meta/recipes-core/util-linux/util-linux_2.37.bb)0
10 files changed, 1 insertions, 351 deletions
diff --git a/meta/recipes-core/util-linux/util-linux-libuuid_2.37.bb b/meta/recipes-core/util-linux/util-linux-libuuid_2.37.1.bb
index 5d759aed94..5d759aed94 100644
--- a/meta/recipes-core/util-linux/util-linux-libuuid_2.37.bb
+++ b/meta/recipes-core/util-linux/util-linux-libuuid_2.37.1.bb
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index d07f648041..a76fb9e500 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -35,13 +35,6 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-lin
35 file://run-ptest \ 35 file://run-ptest \
36 file://display_testname_for_subtest.patch \ 36 file://display_testname_for_subtest.patch \
37 file://avoid_parallel_tests.patch \ 37 file://avoid_parallel_tests.patch \
38 file://8a3a74160b96498d672e3652827aa7e6d7f3a120.patch \
39 file://tests-kill.patch \
40 file://tests-blkdiscard.patch \
41 file://tests-ul.patch \
42 file://tests-eject.patch \
43 file://tests-lscpu.patch \
44 file://0001-login-fix-close_range-use.patch \
45 " 38 "
46 39
47SRC_URI[sha256sum] = "bd07b7e98839e0359842110525a3032fdb8eaf3a90bedde3dd1652d32d15cce5" 40SRC_URI[sha256sum] = "8e4bd42053b726cf86eb4d13a73bc1d9225a2c2e1a2e0d2a891f1020f83e6b76"
diff --git a/meta/recipes-core/util-linux/util-linux/0001-login-fix-close_range-use.patch b/meta/recipes-core/util-linux/util-linux/0001-login-fix-close_range-use.patch
deleted file mode 100644
index 7a47597bd6..0000000000
--- a/meta/recipes-core/util-linux/util-linux/0001-login-fix-close_range-use.patch
+++ /dev/null
@@ -1,62 +0,0 @@
1From 76ae0badd3fd7c8653fa4d3c78d2dcfcec51d23d Mon Sep 17 00:00:00 2001
2From: Karel Zak <kzak@redhat.com>
3Date: Wed, 14 Jul 2021 17:25:57 +0200
4Subject: [PATCH] login: fix close_range() use
5
6This new syscall comes with three arguments (see kernel commit
7278a5fbaed89dacd04e9d052f4594ffd0e0585de). Not sure why util-linux
8assume only two.
9
10Upstream-Status: Backport [https://github.com/karelzak/util-linux/commit/b8d99a618baffb4fc03cda4c40e29778b6d77ad4]
11Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1981729
12Signed-off-by: Karel Zak <kzak@redhat.com>
13---
14 include/fileutils.h | 4 ++--
15 lib/fileutils.c | 2 +-
16 login-utils/login.c | 2 +-
17 3 files changed, 4 insertions(+), 4 deletions(-)
18
19diff --git a/include/fileutils.h b/include/fileutils.h
20index ad54b95..f86426b 100644
21--- a/include/fileutils.h
22+++ b/include/fileutils.h
23@@ -82,9 +82,9 @@ static inline struct dirent *xreaddir(DIR *dp)
24 # if defined(SYS_close_range)
25 # include <sys/types.h>
26 # ifndef HAVE_CLOSE_RANGE
27-static inline int close_range(unsigned int first, unsigned int last)
28+static inline int close_range(unsigned int first, unsigned int last, int flags)
29 {
30- return syscall(SYS_close_range, first, last);
31+ return syscall(SYS_close_range, first, last, flags);
32 }
33 # endif
34 # define HAVE_CLOSE_RANGE 1
35diff --git a/lib/fileutils.c b/lib/fileutils.c
36index 846b718..a979b03 100644
37--- a/lib/fileutils.c
38+++ b/lib/fileutils.c
39@@ -189,7 +189,7 @@ int main(int argc, char *argv[])
40 ignore_result( dup(STDIN_FILENO) );
41
42 # ifdef HAVE_CLOSE_RANGE
43- close_range(STDERR_FILENO + 1, ~0U);
44+ close_range(STDERR_FILENO + 1, ~0U, 0);
45 # else
46 ul_close_all_fds(STDERR_FILENO + 1, ~0U);
47 # endif
48diff --git a/login-utils/login.c b/login-utils/login.c
49index 7fefd05..94a042d 100644
50--- a/login-utils/login.c
51+++ b/login-utils/login.c
52@@ -1358,7 +1358,7 @@ static void initialize(int argc, char **argv, struct login_context *cxt)
53 #endif
54 }
55 #ifdef HAVE_CLOSE_RANGE
56- close_range(STDERR_FILENO + 1, ~0U);
57+ close_range(STDERR_FILENO + 1, ~0U, 0);
58 #else
59 ul_close_all_fds(STDERR_FILENO + 1, ~0U);
60 #endif
61--
622.32.0
diff --git a/meta/recipes-core/util-linux/util-linux/8a3a74160b96498d672e3652827aa7e6d7f3a120.patch b/meta/recipes-core/util-linux/util-linux/8a3a74160b96498d672e3652827aa7e6d7f3a120.patch
deleted file mode 100644
index a5bb00ab65..0000000000
--- a/meta/recipes-core/util-linux/util-linux/8a3a74160b96498d672e3652827aa7e6d7f3a120.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From 8a3a74160b96498d672e3652827aa7e6d7f3a120 Mon Sep 17 00:00:00 2001
2From: Karel Zak <kzak@redhat.com>
3Date: Tue, 15 Jun 2021 12:04:43 +0200
4Subject: [PATCH] mkswap: fix holes detection (infinite loop and/or
5 stack-buffer-underflow)
6
7Reported-by: Brian Lane <bcl@redhat.com>
8Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1971877
9Fix: https://github.com/karelzak/util-linux/issues/1348
10Signed-off-by: Karel Zak <kzak@redhat.com>
11Upstream-Status: Backport
12Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
13---
14 disk-utils/mkswap.c | 2 ++
15 1 file changed, 2 insertions(+)
16
17diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c
18index 27374fd72..c45a3a317 100644
19--- a/disk-utils/mkswap.c
20+++ b/disk-utils/mkswap.c
21@@ -267,6 +267,8 @@ static void check_extents(struct mkswap_control *ctl)
22 return;
23
24 n = fiemap->fm_mapped_extents;
25+ if (n == 0)
26+ break;
27
28 for (i = 0; i < n; i++) {
29 struct fiemap_extent *e = &fiemap->fm_extents[i];
diff --git a/meta/recipes-core/util-linux/util-linux/tests-blkdiscard.patch b/meta/recipes-core/util-linux/util-linux/tests-blkdiscard.patch
deleted file mode 100644
index 34b07a4b2d..0000000000
--- a/meta/recipes-core/util-linux/util-linux/tests-blkdiscard.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1Upstream-Status: Backport
2Signed-off-by: Ross Burton <ross.burton@arm.com>
3
4From 45fe65d934df2c938701f1c3cd3e0a6f3bdf25e6 Mon Sep 17 00:00:00 2001
5From: Ross Burton <ross.burton@arm.com>
6Date: Tue, 29 Jun 2021 18:10:40 +0100
7Subject: [PATCH] tests/blkdiscard: check correct log file for errors
8
9When checking if the discard ioctl is supported, look in stderr not stdout.
10
11Signed-off-by: Ross Burton <ross.burton@arm.com>
12---
13 tests/ts/blkdiscard/offsets | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/tests/ts/blkdiscard/offsets b/tests/ts/blkdiscard/offsets
17index 9dddc35e2..5e724d51b 100755
18--- a/tests/ts/blkdiscard/offsets
19+++ b/tests/ts/blkdiscard/offsets
20@@ -48,7 +48,7 @@ ts_log "testing offsets with full block size"
21 run_tscmd $TS_CMD_BLKDISCARD -v $DEVICE
22 if [ "$?" != "0" ]; then
23 # Skip the rest? For example loop backing files on NFS seem unsupported.
24- grep -q "BLKDISCARD ioctl failed: Operation not supported" "$TS_OUTPUT" \
25+ grep -q "BLKDISCARD ioctl failed: Operation not supported" "$TS_ERRLOG" \
26 && ts_skip "BLKDISCARD not supported"
27 fi
28 run_tscmd $TS_CMD_BLKDISCARD -v -o 1 $DEVICE
29--
302.25.1
31
diff --git a/meta/recipes-core/util-linux/util-linux/tests-eject.patch b/meta/recipes-core/util-linux/util-linux/tests-eject.patch
deleted file mode 100644
index 51e914d566..0000000000
--- a/meta/recipes-core/util-linux/util-linux/tests-eject.patch
+++ /dev/null
@@ -1,56 +0,0 @@
1Upstream-Status: Submitted [https://github.com/karelzak/util-linux/pull/1375]
2Signed-off-by: Ross Burton <ross.burton@arm.com>
3
4From dd956268ba89fc1caf83c45c3c495f34d261e0e2 Mon Sep 17 00:00:00 2001
5From: Ross Burton <ross.burton@arm.com>
6Date: Thu, 1 Jul 2021 20:44:31 +0100
7Subject: [PATCH] test/eject: guard asan LD_PRELOAD with use-system-commands
8 check
9
10This test tries to add asan to LD_PRELOAD because the just-built eject
11will call the host /bin/umount, and apparently asan doesn't like this.
12
13However, if ldd isn't present, this fails as the path to asan is the
14error message saying that ldd isn't present.
15
16As the asan workaround is only needed when executing the binaries that
17have just been built and not the system binaries, only use it if the
18test is on the built binaries.
19
20Closes #1373.
21
22Signed-off-by: Ross Burton <ross.burton@arm.com>
23---
24 tests/ts/eject/umount | 16 +++++++++-------
25 1 file changed, 9 insertions(+), 7 deletions(-)
26
27diff --git a/tests/ts/eject/umount b/tests/ts/eject/umount
28index a829d46c0..2be281ee3 100755
29--- a/tests/ts/eject/umount
30+++ b/tests/ts/eject/umount
31@@ -60,13 +60,15 @@ function deinit_device {
32 ts_scsi_debug_rmmod
33 }
34
35-# As the eject binary execl()s an uninstrumented /bin/umount binary, we need
36-# to explicitly $LD_PRELOAD the ASan's runtime DSO, otherwise ASan will complain.
37-# Since all three utilities used by this test (eject, fdisk, mount) are just
38-# libtool wrappers, let's check the kill binary instead, which should have
39-# the needed DSO information.
40-ASAN_RT_PATH="$(ts_get_asan_rt_path "$TS_CMD_KILL")"
41-[ -n "$ASAN_RT_PATH" ] && export LD_PRELOAD="$ASAN_RT_PATH:$LD_PRELOAD"
42+if [ "$TS_USE_SYSTEM_COMMANDS" != "yes" ]; then
43+ # As the eject binary execl()s an uninstrumented /bin/umount binary, we need
44+ # to explicitly $LD_PRELOAD the ASan's runtime DSO, otherwise ASan will complain.
45+ # Since all three utilities used by this test (eject, fdisk, mount) are just
46+ # libtool wrappers, let's check the kill binary instead, which should have
47+ # the needed DSO information.
48+ ASAN_RT_PATH="$(ts_get_asan_rt_path "$TS_CMD_KILL")"
49+ [ -n "$ASAN_RT_PATH" ] && export LD_PRELOAD="$ASAN_RT_PATH:$LD_PRELOAD"
50+fi
51
52 ts_init_subtest "by-disk"
53 init_device
54--
552.25.1
56
diff --git a/meta/recipes-core/util-linux/util-linux/tests-kill.patch b/meta/recipes-core/util-linux/util-linux/tests-kill.patch
deleted file mode 100644
index fa49fd4142..0000000000
--- a/meta/recipes-core/util-linux/util-linux/tests-kill.patch
+++ /dev/null
@@ -1,88 +0,0 @@
1Don't hardcode the use of /bin/kill, as this could be kill.procps. Instead ask
2the shell what kill binary to use, which will be the symlink in
3/usr/lib/util-linux/ptest/bin/.
4
5Upstream-Status: Backport [https://github.com/karelzak/util-linux/pull/1367]
6Signed-off-by: Ross Burton <ross.burton@arm.com>
7
8From e3f8a88cf688dffacb5f6033a8d24e2db40f75f6 Mon Sep 17 00:00:00 2001
9From: Ross Burton <ross.burton@arm.com>
10Date: Tue, 29 Jun 2021 16:34:20 +0100
11Subject: [PATCH] Don't hardcode /bin
12
13---
14 tests/ts/kill/all_processes | 2 +-
15 tests/ts/kill/name_to_number | 2 +-
16 tests/ts/kill/options | 2 +-
17 tests/ts/kill/print_pid | 2 +-
18 tests/ts/kill/queue | 2 +-
19 5 files changed, 5 insertions(+), 5 deletions(-)
20
21diff --git a/tests/ts/kill/all_processes b/tests/ts/kill/all_processes
22index 0b137574d..b2280777f 100755
23--- a/tests/ts/kill/all_processes
24+++ b/tests/ts/kill/all_processes
25@@ -22,7 +22,7 @@ ts_skip_nonroot
26
27 # make sure we do not use shell built-in command
28 if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then
29- TS_CMD_KILL="/bin/kill"
30+ TS_CMD_KILL="$(which kill)"
31 fi
32
33 ts_check_test_command "$TS_CMD_KILL"
34diff --git a/tests/ts/kill/name_to_number b/tests/ts/kill/name_to_number
35index 9f4881cb7..8a7f4bef0 100755
36--- a/tests/ts/kill/name_to_number
37+++ b/tests/ts/kill/name_to_number
38@@ -20,7 +20,7 @@ ts_init "$*"
39
40 # make sure we do not use shell built-in command
41 if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then
42- TS_CMD_KILL="/bin/kill"
43+ TS_CMD_KILL="$(which kill)"
44 fi
45
46 ts_check_test_command "$TS_CMD_KILL"
47diff --git a/tests/ts/kill/options b/tests/ts/kill/options
48index 2788c70a2..10653a543 100755
49--- a/tests/ts/kill/options
50+++ b/tests/ts/kill/options
51@@ -20,7 +20,7 @@ ts_init "$*"
52
53 # make sure we do not use shell built-in command
54 if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then
55- TS_CMD_KILL="/bin/kill"
56+ TS_CMD_KILL="$(which kill)"
57 fi
58
59 ts_check_test_command "$TS_CMD_KILL"
60diff --git a/tests/ts/kill/print_pid b/tests/ts/kill/print_pid
61index 6926a3714..6e2db3711 100755
62--- a/tests/ts/kill/print_pid
63+++ b/tests/ts/kill/print_pid
64@@ -20,7 +20,7 @@ ts_init "$*"
65
66 # make sure we do not use shell built-in command
67 if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then
68- TS_CMD_KILL="/bin/kill"
69+ TS_CMD_KILL="$(which kill)"
70 fi
71
72 ts_check_test_command "$TS_CMD_KILL"
73diff --git a/tests/ts/kill/queue b/tests/ts/kill/queue
74index 18f10e8c2..6c9e9efc9 100755
75--- a/tests/ts/kill/queue
76+++ b/tests/ts/kill/queue
77@@ -20,7 +20,7 @@ ts_init "$*"
78
79 # make sure we do not use shell built-in command
80 if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then
81- TS_CMD_KILL="/bin/kill"
82+ TS_CMD_KILL="$(which kill)"
83 fi
84
85 ts_check_test_command "$TS_CMD_KILL"
86--
872.25.1
88
diff --git a/meta/recipes-core/util-linux/util-linux/tests-lscpu.patch b/meta/recipes-core/util-linux/util-linux/tests-lscpu.patch
deleted file mode 100644
index 36a19bd5a5..0000000000
--- a/meta/recipes-core/util-linux/util-linux/tests-lscpu.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1Upstream-Status: Backport
2Signed-off-by: Ross Burton <ross.burton@arm.com>
3
4From c2ca2837a27a3f1344904037ea691bfdbb288f02 Mon Sep 17 00:00:00 2001
5From: Karel Zak <kzak@redhat.com>
6Date: Fri, 2 Jul 2021 13:12:13 +0200
7Subject: [PATCH] lscpu: don't use DMI if executed with --sysroot
8
9Signed-off-by: Karel Zak <kzak@redhat.com>
10---
11 sys-utils/lscpu-arm.c | 8 +++++---
12 1 file changed, 5 insertions(+), 3 deletions(-)
13
14diff --git a/sys-utils/lscpu-arm.c b/sys-utils/lscpu-arm.c
15index d52765f9d..c7128094c 100644
16--- a/sys-utils/lscpu-arm.c
17+++ b/sys-utils/lscpu-arm.c
18@@ -322,7 +322,8 @@ static void arm_decode(struct lscpu_cxt *cxt, struct lscpu_cputype *ct)
19
20 arm_ids_decode(ct);
21 arm_rXpY_decode(ct);
22- if (cxt->is_cluster)
23+
24+ if (!cxt->noalive && cxt->is_cluster)
25 ct->nr_socket_on_cluster = get_number_of_physical_sockets_from_dmi();
26 }
27
28@@ -330,8 +331,9 @@ static int is_cluster_arm(struct lscpu_cxt *cxt)
29 {
30 struct stat st;
31
32- if (!(strcmp(cxt->arch->name, "aarch64")) &&
33- (stat(_PATH_ACPI_PPTT, &st) < 0) && (cxt->ncputypes == 1))
34+ if (!cxt->noalive
35+ && strcmp(cxt->arch->name, "aarch64") == 0
36+ && stat(_PATH_ACPI_PPTT, &st) < 0 && cxt->ncputypes == 1)
37 return 1;
38 else
39 return 0;
40--
412.25.1
42
diff --git a/meta/recipes-core/util-linux/util-linux/tests-ul.patch b/meta/recipes-core/util-linux/util-linux/tests-ul.patch
deleted file mode 100644
index 6896393105..0000000000
--- a/meta/recipes-core/util-linux/util-linux/tests-ul.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1Upstream-Status: Backport
2Signed-off-by: Ross Burton <ross.burton@arm.com>
3
4From b1c71f19ea404e74d36ca5b8fbb0484043cdaef3 Mon Sep 17 00:00:00 2001
5From: Ross Burton <ross.burton@arm.com>
6Date: Wed, 30 Jun 2021 11:25:01 +0100
7Subject: [PATCH] tests: mark ul/ul as a known failure
8
9As with ul/basic, this test produces different output when ran under
10different terminals, which isn't very useful.
11
12Set TS_KNOWN_FAIL so that these problems don't cause the test to fail.
13
14Signed-off-by: Ross Burton <ross.burton@arm.com>
15---
16 tests/ts/ul/ul | 3 +++
17 1 file changed, 3 insertions(+)
18
19diff --git a/tests/ts/ul/ul b/tests/ts/ul/ul
20index b856e33db..c707658ac 100755
21--- a/tests/ts/ul/ul
22+++ b/tests/ts/ul/ul
23@@ -20,6 +20,9 @@ ts_init "$*"
24
25 ts_check_test_command "$TS_CMD_UL"
26
27+# This test provides different result on some terminals and virtual machines
28+TS_KNOWN_FAIL="yes"
29+
30 printf "a\x08ab\x5F\x08c\\n\\ttab\\f\\b\\r" |
31 $TS_CMD_UL -t xterm >> $TS_OUTPUT 2>> $TS_ERRLOG
32
33--
342.25.1
35
diff --git a/meta/recipes-core/util-linux/util-linux_2.37.bb b/meta/recipes-core/util-linux/util-linux_2.37.1.bb
index b67c3dcb53..b67c3dcb53 100644
--- a/meta/recipes-core/util-linux/util-linux_2.37.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.37.1.bb