From 9dcdbdb7c0b1b2f8dddcfa4de3d509e032bd39c6 Mon Sep 17 00:00:00 2001 From: TomIO Date: Fri, 14 Nov 2025 18:13:21 +0100 Subject: [PATCH] bump(main/coreutils): 9.9 --- .../backport-914972e-tail-regression.patch | 48 ------------- packages/coreutils/build.sh | 5 +- packages/coreutils/fix-paths.patch | 68 ++++++++++++------- 3 files changed, 47 insertions(+), 74 deletions(-) delete mode 100644 packages/coreutils/backport-914972e-tail-regression.patch diff --git a/packages/coreutils/backport-914972e-tail-regression.patch b/packages/coreutils/backport-914972e-tail-regression.patch deleted file mode 100644 index 9888b38770cec5..00000000000000 --- a/packages/coreutils/backport-914972e-tail-regression.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 914972e80dbf82aac9ffe3ff1f67f1028e1a788b Mon Sep 17 00:00:00 2001 -From: Hannes Braun -Date: Wed, 24 Sep 2025 21:20:49 +0200 -Subject: [PATCH] tail: fix tailing larger number of lines in regular files - -* src/tail.c (file_lines): Seek to the previous block instead of the -beginning (or a little before) of the block that was just scanned. -Otherwise, the same block is read and scanned (at least partially) -again. This bug was introduced by commit v9.7-219-g976f8abc1. -* tests/tail/basic-seek.sh: Add a new test. -* tests/local.mk: Reference the new test. -* NEWS: mention the bug fix. ---- - NEWS | 4 ++++ - src/tail.c | 2 +- - tests/local.mk | 1 + - tests/tail/basic-seek.sh | 28 ++++++++++++++++++++++++++++ - 4 files changed, 34 insertions(+), 1 deletion(-) - create mode 100755 tests/tail/basic-seek.sh - -diff --git a/NEWS b/NEWS -index 7a1a73113e..dc1d268793 100644 ---- a/NEWS -+++ b/NEWS -@@ -7,6 +7,10 @@ GNU coreutils NEWS -*- outline -*- - `basenc --base58` would not operate correctly with input > 15561475 bytes. - [bug introduced with --base58 in coreutils-9.8] - -+ 'tail' outputs the correct number of lines again for non-small -n values. -+ Previously it may have output too few lines. -+ [bug introduced in coreutils-9.8] -+ - - * Noteworthy changes in release 9.8 (2025-09-22) [stable] - -diff --git a/src/tail.c b/src/tail.c -index b8bef1d91c..c7779c77df 100644 ---- a/src/tail.c -+++ b/src/tail.c -@@ -596,7 +596,7 @@ file_lines (char const *prettyname, int fd, struct stat const *sb, - goto free_buffer; - } - -- pos = xlseek (fd, -bufsize, SEEK_CUR, prettyname); -+ pos = xlseek (fd, -(bufsize + bytes_read), SEEK_CUR, prettyname); - bytes_read = read (fd, buffer, bufsize); - if (bytes_read < 0) - { diff --git a/packages/coreutils/build.sh b/packages/coreutils/build.sh index 873eac6fd581f9..d77b7ab20ef98e 100644 --- a/packages/coreutils/build.sh +++ b/packages/coreutils/build.sh @@ -2,10 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/coreutils/ TERMUX_PKG_DESCRIPTION="Basic file, shell and text manipulation utilities from the GNU project" TERMUX_PKG_LICENSE="GPL-3.0" TERMUX_PKG_MAINTAINER="@termux" -TERMUX_PKG_VERSION=9.8 -TERMUX_PKG_REVISION=1 +TERMUX_PKG_VERSION=9.9 TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/coreutils/coreutils-${TERMUX_PKG_VERSION}.tar.xz -TERMUX_PKG_SHA256=e6d4fd2d852c9141a1c2a18a13d146a0cd7e45195f72293a4e4c044ec6ccca15 +TERMUX_PKG_SHA256=19bcb6ca867183c57d77155eae946c5eced88183143b45ca51ad7d26c628ca75 TERMUX_PKG_DEPENDS="libandroid-selinux, libandroid-support, libgmp, libiconv, openssl (>= 1:3.5.0-1)" TERMUX_PKG_BREAKS="chroot, busybox (<< 1.30.1-4)" TERMUX_PKG_REPLACES="chroot, busybox (<< 1.30.1-4)" diff --git a/packages/coreutils/fix-paths.patch b/packages/coreutils/fix-paths.patch index 2018e29fea31bd..d20c8b7894456e 100644 --- a/packages/coreutils/fix-paths.patch +++ b/packages/coreutils/fix-paths.patch @@ -1,6 +1,7 @@ -diff -uNr coreutils-9.2/lib/tmpdir.c coreutils-9.2.mod/lib/tmpdir.c ---- coreutils-9.2/lib/tmpdir.c 2023-03-13 18:12:12.000000000 +0000 -+++ coreutils-9.2.mod/lib/tmpdir.c 2023-03-23 06:56:30.519517214 +0000 +diff --git coreutils-9.9/lib/tmpdir.c coreutils-9.9/lib/tmpdir.c +index db1f1e4..36a8541 100644 +--- coreutils-9.9/lib/tmpdir.c ++++ coreutils-9.9/lib/tmpdir.c @@ -35,7 +35,7 @@ # ifdef _P_tmpdir /* native Windows */ # define P_tmpdir _P_tmpdir @@ -10,7 +11,7 @@ diff -uNr coreutils-9.2/lib/tmpdir.c coreutils-9.2.mod/lib/tmpdir.c # endif #endif -@@ -135,8 +135,8 @@ +@@ -135,8 +135,8 @@ path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx, #endif if (direxists (P_tmpdir)) dir = P_tmpdir; @@ -21,10 +22,29 @@ diff -uNr coreutils-9.2/lib/tmpdir.c coreutils-9.2.mod/lib/tmpdir.c else { __set_errno (ENOENT); -diff -uNr coreutils-8.32/src/mktemp.c coreutils-8.32.mod/src/mktemp.c ---- coreutils-8.32/src/mktemp.c 2020-01-01 16:13:12.000000000 +0200 -+++ coreutils-8.32.mod/src/mktemp.c 2020-05-05 14:13:10.984279966 +0300 -@@ -270,7 +270,7 @@ +diff --git coreutils-9.9/src/mktemp.c coreutils-9.9/src/mktemp.c +index 706c651..4004876 100644 +--- coreutils-9.9/src/mktemp.c ++++ coreutils-9.9/src/mktemp.c +@@ -83,7 +83,7 @@ Files are created u+rw, and directories u+rwx, minus umask restrictions.\n\ + "), stdout); + fputs (_("\ + -p DIR, --tmpdir[=DIR] interpret TEMPLATE relative to DIR; if DIR is not\n\ +- specified, use $TMPDIR if set, else /tmp. With\n\ ++ specified, use $TMPDIR if set, else @TERMUX_PREFIX@/tmp. With\n\ + this option, TEMPLATE must not be an absolute name;\n\ + unlike with -t, TEMPLATE may contain slashes, but\n\ + mktemp creates only the final component\n\ +@@ -91,7 +91,7 @@ Files are created u+rw, and directories u+rwx, minus umask restrictions.\n\ + fputs (_("\ + -t interpret TEMPLATE as a single file name component,\n\ + relative to a directory: $TMPDIR, if set; else the\n\ +- directory specified via -p; else /tmp [deprecated]\n\ ++ directory specified via -p; else @TERMUX_PREFIX@/tmp [deprecated]\n\ + "), stdout); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); +@@ -273,7 +273,7 @@ main (int argc, char **argv) else if (dest_dir_arg && *dest_dir_arg) dest_dir = dest_dir_arg; else @@ -32,8 +52,8 @@ diff -uNr coreutils-8.32/src/mktemp.c coreutils-8.32.mod/src/mktemp.c + dest_dir = "@TERMUX_PREFIX@/tmp"; if (last_component (template) != template) - die (EXIT_FAILURE, 0, -@@ -284,7 +284,7 @@ + error (EXIT_FAILURE, 0, +@@ -287,7 +287,7 @@ main (int argc, char **argv) else { char *env = getenv ("TMPDIR"); @@ -41,11 +61,12 @@ diff -uNr coreutils-8.32/src/mktemp.c coreutils-8.32.mod/src/mktemp.c + dest_dir = (env && *env ? env : "@TERMUX_PREFIX@/tmp"); } if (IS_ABSOLUTE_FILE_NAME (template)) - die (EXIT_FAILURE, 0, -diff -uNr coreutils-8.32/src/sort.c coreutils-8.32.mod/src/sort.c ---- coreutils-8.32/src/sort.c 2020-01-01 16:33:34.000000000 +0200 -+++ coreutils-8.32.mod/src/sort.c 2020-05-05 14:14:09.200728018 +0300 -@@ -92,9 +92,7 @@ + error (EXIT_FAILURE, 0, +diff --git coreutils-9.9/src/sort.c coreutils-9.9/src/sort.c +index 05d00cc..dec6516 100644 +--- coreutils-9.9/src/sort.c ++++ coreutils-9.9/src/sort.c +@@ -93,9 +93,7 @@ struct rlimit { size_t rlim_cur; }; #define UCHAR_LIM (UCHAR_MAX + 1) @@ -56,15 +77,16 @@ diff -uNr coreutils-8.32/src/sort.c coreutils-8.32.mod/src/sort.c /* Maximum number of lines to merge every time a NODE is taken from the merge queue. Node is at LEVEL in the binary merge tree, -diff -uNr coreutils-9.4/src/split.c coreutils-9.4.mod/src/split.c ---- coreutils-9.4/src/split.c 2023-08-29 12:39:27.000000000 +0100 -+++ coreutils-9.4.mod/src/split.c 2023-09-12 17:50:37.186340314 +0100 -@@ -503,7 +503,7 @@ - pid_t child_pid; +diff --git coreutils-9.9/src/split.c coreutils-9.9/src/split.c +index 3d15091..eea9cbd 100644 +--- coreutils-9.9/src/split.c ++++ coreutils-9.9/src/split.c +@@ -551,7 +551,7 @@ create (char const *name) + char const *shell_prog = getenv ("SHELL"); if (shell_prog == nullptr) - shell_prog = "/bin/sh"; + shell_prog = "@TERMUX_PREFIX@/bin/sh"; - if (setenv ("FILE", name, 1) != 0) - error (EXIT_FAILURE, errno, - _("failed to set FILE environment variable")); + char const *const argv[] = { last_component (shell_prog), "-c", + filter_command, nullptr }; +