From 8e9487d8aff50d15b2070c4b599b73c247a7b9ec Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Wed, 7 Dec 2016 17:12:47 -0500 Subject: [PATCH] grep: Update from 2.26 to 2.27 --- packages/grep/build.sh | 4 ++-- packages/grep/grep.c.patch | 36 ------------------------------------ 2 files changed, 2 insertions(+), 38 deletions(-) delete mode 100644 packages/grep/grep.c.patch diff --git a/packages/grep/build.sh b/packages/grep/build.sh index b60444965..26bb0b944 100644 --- a/packages/grep/build.sh +++ b/packages/grep/build.sh @@ -1,5 +1,5 @@ -TERMUX_PKG_HOMEPAGE=http://www.gnu.org/software/grep/ +TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/grep/ TERMUX_PKG_DESCRIPTION="Command which searches one or more input files for lines containing a match to a specified pattern" TERMUX_PKG_DEPENDS="pcre" -TERMUX_PKG_VERSION=2.26 +TERMUX_PKG_VERSION=2.27 TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/grep/grep-${TERMUX_PKG_VERSION}.tar.xz diff --git a/packages/grep/grep.c.patch b/packages/grep/grep.c.patch deleted file mode 100644 index b38e55a87..000000000 --- a/packages/grep/grep.c.patch +++ /dev/null @@ -1,36 +0,0 @@ -When writing to a closed pipe, which happens with simple - - seq 99999 | grep -v xxx | head -1 - -the write() function will return an EPIPE error. The kernel also sends -SIGPIPE to the process, which by default kills it. - -As the signal delivery is not immediate, grep may see EPIPE and report -it as an error, which is annoying, especially on Android where this -timing issue is encountered a lot more. - -See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23267 where it has -been suggested to silently ignore EPIPE. That was in the context of -SIGPIPE being ignored, but this should probably also been done to -avoid timing issues. Feedback has been sent to the above issue and -is awaiting mailing list approval. - -diff -u -r ../grep-2.25/src/grep.c ./src/grep.c ---- ../grep-2.25/src/grep.c 2016-04-02 20:45:51.000000000 -0400 -+++ ./src/grep.c 2016-04-23 06:41:54.419351897 -0400 -@@ -1234,8 +1234,13 @@ - if (line_buffered) - fflush_errno (); - -- if (stdout_errno) -- error (EXIT_TROUBLE, stdout_errno, _("write error")); -+ if (stdout_errno) { -+ if (stdout_errno == EPIPE) { -+ exit (EXIT_SUCCESS); -+ } else { -+ error (EXIT_TROUBLE, stdout_errno, _("write error")); -+ } -+ } - - lastout = lim; - }