diff options
| -rw-r--r-- | meta/recipes-core/coreutils/coreutils/0001-cksum-port-to-32-bit-uint_fast32_t.patch | 47 | ||||
| -rw-r--r-- | meta/recipes-core/coreutils/coreutils/0001-ls-fix-crash-with-context.patch | 101 | ||||
| -rw-r--r-- | meta/recipes-core/coreutils/coreutils/intermittent-testfailure.patch | 30 | ||||
| -rw-r--r-- | meta/recipes-core/coreutils/coreutils_9.7.bb (renamed from meta/recipes-core/coreutils/coreutils_9.6.bb) | 5 |
4 files changed, 1 insertions, 182 deletions
diff --git a/meta/recipes-core/coreutils/coreutils/0001-cksum-port-to-32-bit-uint_fast32_t.patch b/meta/recipes-core/coreutils/coreutils/0001-cksum-port-to-32-bit-uint_fast32_t.patch deleted file mode 100644 index 95d7aca809..0000000000 --- a/meta/recipes-core/coreutils/coreutils/0001-cksum-port-to-32-bit-uint_fast32_t.patch +++ /dev/null | |||
| @@ -1,47 +0,0 @@ | |||
| 1 | From 7eada35b4fbb48e7fe430d1b18dae7d191f84f8e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Paul Eggert <eggert@cs.ucla.edu> | ||
| 3 | Date: Mon, 17 Feb 2025 02:27:09 -0800 | ||
| 4 | Subject: [PATCH 2/2] cksum: port to 32-bit uint_fast32_t | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | * src/cksum_vmull.c (cksum_vmull): Don’t assume | ||
| 10 | uint_fast32_t can hold 64 bits. | ||
| 11 | Problem reported by Alyssa Ross (Bug#76360). | ||
| 12 | |||
| 13 | Upstream-Status: Backport [7eada35b4fbb48e7fe430d1b18dae7d191f84f8e] | ||
| 14 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
| 15 | --- | ||
| 16 | NEWS | 3 +++ | ||
| 17 | src/cksum_vmull.c | 7 +++++-- | ||
| 18 | 2 files changed, 8 insertions(+), 2 deletions(-) | ||
| 19 | |||
| 20 | diff --git a/src/cksum_vmull.c b/src/cksum_vmull.c | ||
| 21 | index 7611c4244..0ff81e225 100644 | ||
| 22 | --- a/src/cksum_vmull.c | ||
| 23 | +++ b/src/cksum_vmull.c | ||
| 24 | @@ -92,7 +92,9 @@ cksum_vmull (FILE *fp, uint_fast32_t *crc_out, uintmax_t *length_out) | ||
| 25 | data = bswap_neon (data); | ||
| 26 | /* XOR in initial CRC value (for us 0 so no effect), or CRC value | ||
| 27 | calculated for previous BUFLEN buffer from fread */ | ||
| 28 | - xor_crc = vcombine_u64 (vcreate_u64 (0), vcreate_u64 (crc << 32)); | ||
| 29 | + | ||
| 30 | + uint64_t wcrc = crc; | ||
| 31 | + xor_crc = vcombine_u64 (vcreate_u64 (0), vcreate_u64 (wcrc << 32)); | ||
| 32 | crc = 0; | ||
| 33 | data = veorq_u64 (data, xor_crc); | ||
| 34 | data3 = vld1q_u64 ((uint64_t *) (datap + 1)); | ||
| 35 | @@ -193,7 +195,8 @@ cksum_vmull (FILE *fp, uint_fast32_t *crc_out, uintmax_t *length_out) | ||
| 36 | { | ||
| 37 | data = vld1q_u64 ((uint64_t *) (datap)); | ||
| 38 | data = bswap_neon (data); | ||
| 39 | - xor_crc = vcombine_u64 (vcreate_u64 (0), vcreate_u64 (crc << 32)); | ||
| 40 | + uint64_t wcrc = crc; | ||
| 41 | + xor_crc = vcombine_u64 (vcreate_u64 (0), vcreate_u64 (wcrc << 32)); | ||
| 42 | crc = 0; | ||
| 43 | data = veorq_u64 (data, xor_crc); | ||
| 44 | while (bytes_read >= 32) | ||
| 45 | -- | ||
| 46 | 2.45.2 | ||
| 47 | |||
diff --git a/meta/recipes-core/coreutils/coreutils/0001-ls-fix-crash-with-context.patch b/meta/recipes-core/coreutils/coreutils/0001-ls-fix-crash-with-context.patch deleted file mode 100644 index b1a92875a6..0000000000 --- a/meta/recipes-core/coreutils/coreutils/0001-ls-fix-crash-with-context.patch +++ /dev/null | |||
| @@ -1,101 +0,0 @@ | |||
| 1 | From 43a63408630e5064317823702518099f0ea652dd Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com> | ||
| 3 | Date: Fri, 17 Jan 2025 17:29:34 +0000 | ||
| 4 | Subject: [PATCH] ls: fix crash with --context | ||
| 5 | |||
| 6 | * src/ls.c (main): Flag that we need to stat() | ||
| 7 | if we're going to get security context (call file_has_aclinfo_cache). | ||
| 8 | (file_has_aclinfo_cache): Be defensive and only lookup the device | ||
| 9 | for the file if the stat has been performed. | ||
| 10 | (has_capability_cache): Likewise. | ||
| 11 | * tests/ls/selinux-segfault.sh: Add a test case. | ||
| 12 | * NEWS: Mention the bug fix. | ||
| 13 | Reported by Bruno Haible. | ||
| 14 | |||
| 15 | Upstream-Status: Backport | ||
| 16 | [https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=915004f403cb25fadb207ddfdbe6a2f43bd44fac] | ||
| 17 | |||
| 18 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
| 19 | --- | ||
| 20 | NEWS | 3 +++ | ||
| 21 | src/ls.c | 10 +++++----- | ||
| 22 | tests/ls/selinux-segfault.sh | 3 +++ | ||
| 23 | 3 files changed, 11 insertions(+), 5 deletions(-) | ||
| 24 | |||
| 25 | diff --git a/NEWS b/NEWS | ||
| 26 | index 3799f75..65867f9 100644 | ||
| 27 | --- a/NEWS | ||
| 28 | +++ b/NEWS | ||
| 29 | @@ -4,6 +4,9 @@ GNU coreutils NEWS -*- outline -*- | ||
| 30 | |||
| 31 | ** Bug fixes | ||
| 32 | |||
| 33 | + `ls -Z dir` would crash. | ||
| 34 | + [bug introduced in coreutils-9.6] | ||
| 35 | + | ||
| 36 | cp fixes support for --update=none-fail, which would have been | ||
| 37 | rejected as an invalid option. | ||
| 38 | [bug introduced in coreutils-9.5] | ||
| 39 | diff --git a/src/ls.c b/src/ls.c | ||
| 40 | index 3215360..f67167f 100644 | ||
| 41 | --- a/src/ls.c | ||
| 42 | +++ b/src/ls.c | ||
| 43 | @@ -1768,7 +1768,7 @@ main (int argc, char **argv) | ||
| 44 | |||
| 45 | format_needs_stat = ((sort_type == sort_time) | (sort_type == sort_size) | ||
| 46 | | (format == long_format) | ||
| 47 | - | print_block_size | print_hyperlink); | ||
| 48 | + | print_block_size | print_hyperlink | print_scontext); | ||
| 49 | format_needs_type = ((! format_needs_stat) | ||
| 50 | & (recursive | print_with_color | print_scontext | ||
| 51 | | directories_first | ||
| 52 | @@ -3309,7 +3309,7 @@ file_has_aclinfo_cache (char const *file, struct fileinfo *f, | ||
| 53 | static int unsupported_scontext_err; | ||
| 54 | static dev_t unsupported_device; | ||
| 55 | |||
| 56 | - if (f->stat.st_dev == unsupported_device) | ||
| 57 | + if (f->stat_ok && f->stat.st_dev == unsupported_device) | ||
| 58 | { | ||
| 59 | ai->buf = ai->u.__gl_acl_ch; | ||
| 60 | ai->size = 0; | ||
| 61 | @@ -3322,7 +3322,7 @@ file_has_aclinfo_cache (char const *file, struct fileinfo *f, | ||
| 62 | errno = 0; | ||
| 63 | int n = file_has_aclinfo (file, ai, flags); | ||
| 64 | int err = errno; | ||
| 65 | - if (n <= 0 && !acl_errno_valid (err)) | ||
| 66 | + if (f->stat_ok && n <= 0 && !acl_errno_valid (err)) | ||
| 67 | { | ||
| 68 | unsupported_return = n; | ||
| 69 | unsupported_scontext = ai->scontext; | ||
| 70 | @@ -3342,14 +3342,14 @@ has_capability_cache (char const *file, struct fileinfo *f) | ||
| 71 | found that has_capability fails indicating lack of support. */ | ||
| 72 | static dev_t unsupported_device; | ||
| 73 | |||
| 74 | - if (f->stat.st_dev == unsupported_device) | ||
| 75 | + if (f->stat_ok && f->stat.st_dev == unsupported_device) | ||
| 76 | { | ||
| 77 | errno = ENOTSUP; | ||
| 78 | return 0; | ||
| 79 | } | ||
| 80 | |||
| 81 | bool b = has_capability (file); | ||
| 82 | - if ( !b && !acl_errno_valid (errno)) | ||
| 83 | + if (f->stat_ok && !b && !acl_errno_valid (errno)) | ||
| 84 | unsupported_device = f->stat.st_dev; | ||
| 85 | return b; | ||
| 86 | } | ||
| 87 | diff --git a/tests/ls/selinux-segfault.sh b/tests/ls/selinux-segfault.sh | ||
| 88 | index 11623ac..1cac2b5 100755 | ||
| 89 | --- a/tests/ls/selinux-segfault.sh | ||
| 90 | +++ b/tests/ls/selinux-segfault.sh | ||
| 91 | @@ -30,4 +30,7 @@ mkdir sedir || framework_failure_ | ||
| 92 | ln -sf missing sedir/broken || framework_failure_ | ||
| 93 | returns_ 1 ls -L -R -Z -m sedir > out || fail=1 | ||
| 94 | |||
| 95 | +# ls 9.6 would segfault with the following | ||
| 96 | +ls -Z . > out || fail=1 | ||
| 97 | + | ||
| 98 | Exit $fail | ||
| 99 | -- | ||
| 100 | 2.34.1 | ||
| 101 | |||
diff --git a/meta/recipes-core/coreutils/coreutils/intermittent-testfailure.patch b/meta/recipes-core/coreutils/coreutils/intermittent-testfailure.patch deleted file mode 100644 index 0794532bdf..0000000000 --- a/meta/recipes-core/coreutils/coreutils/intermittent-testfailure.patch +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | tests/df: Fix intermittent test failure | ||
| 2 | |||
| 3 | The test writes to the disk and means the space used changes. If this | ||
| 4 | crosses a number boundary, the heading spacing can change: | ||
| 5 | |||
| 6 | -Filesystem 1024-blocks Used Available Capacity Mounted on | ||
| 7 | +Filesystem 1024-blocks Used Available Capacity Mounted on | ||
| 8 | |||
| 9 | The test is to make sure the 1024 blocks element remains the same and | ||
| 10 | the spacing doesn't matter. Therefore strip any duplicate spaces using tr. | ||
| 11 | |||
| 12 | Submitted: https://github.com/coreutils/coreutils/pull/88 | ||
| 13 | Upstream-Status: Backport [https://github.com/coreutils/coreutils/commit/c5725c8c4bb21903490a48035286d0f94463642e] | ||
| 14 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
| 15 | |||
| 16 | Index: coreutils-9.5/tests/df/df-P.sh | ||
| 17 | =================================================================== | ||
| 18 | --- coreutils-9.5.orig/tests/df/df-P.sh | ||
| 19 | +++ coreutils-9.5/tests/df/df-P.sh | ||
| 20 | @@ -20,8 +20,8 @@ | ||
| 21 | print_ver_ df | ||
| 22 | |||
| 23 | |||
| 24 | - df -P . > t1 || fail=1 | ||
| 25 | -BLOCK_SIZE=1M df -P . > t2 || fail=1 | ||
| 26 | + df -P . | tr -s ' ' > t1 || fail=1 | ||
| 27 | +BLOCK_SIZE=1M df -P . | tr -s ' ' > t2 || fail=1 | ||
| 28 | |||
| 29 | # Since file system utilization may be changing, compare only df's header line. | ||
| 30 | # That records the block size. E.g., for "1M", it would be: | ||
diff --git a/meta/recipes-core/coreutils/coreutils_9.6.bb b/meta/recipes-core/coreutils/coreutils_9.7.bb index a966c4b448..091e1ea2c5 100644 --- a/meta/recipes-core/coreutils/coreutils_9.6.bb +++ b/meta/recipes-core/coreutils/coreutils_9.7.bb | |||
| @@ -15,12 +15,9 @@ inherit autotools gettext texinfo | |||
| 15 | 15 | ||
| 16 | SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \ | 16 | SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \ |
| 17 | file://remove-usr-local-lib-from-m4.patch \ | 17 | file://remove-usr-local-lib-from-m4.patch \ |
| 18 | file://intermittent-testfailure.patch \ | ||
| 19 | file://0001-ls-fix-crash-with-context.patch \ | ||
| 20 | file://0001-cksum-port-to-32-bit-uint_fast32_t.patch \ | ||
| 21 | file://run-ptest \ | 18 | file://run-ptest \ |
| 22 | " | 19 | " |
| 23 | SRC_URI[sha256sum] = "7a0124327b398fd9eb1a6abde583389821422c744ffa10734b24f557610d3283" | 20 | SRC_URI[sha256sum] = "e8bb26ad0293f9b5a1fc43fb42ba970e312c66ce92c1b0b16713d7500db251bf" |
| 24 | 21 | ||
| 25 | # http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=v8.27-101-gf5d7c0842 | 22 | # http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=v8.27-101-gf5d7c0842 |
| 26 | # | 23 | # |
