From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 795B715808B for ; Wed, 13 Apr 2022 08:09:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8D092E0909; Wed, 13 Apr 2022 08:08:59 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A99B4E0909 for ; Wed, 13 Apr 2022 08:08:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B8721341A2C for ; Wed, 13 Apr 2022 08:08:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F3249342 for ; Wed, 13 Apr 2022 08:08:55 +0000 (UTC) From: "Lars Wendler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" Message-ID: <1649837328.35dd4906505f729d68ead73d64c42f764ba858dc.polynomial-c@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/zsh/files/, app-shells/zsh/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-shells/zsh/files/zsh-5.8.1-non_interactive_shell_regression_fix.patch app-shells/zsh/zsh-5.8.1-r1.ebuild app-shells/zsh/zsh-5.8.1.ebuild X-VCS-Directories: app-shells/zsh/ app-shells/zsh/files/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: 35dd4906505f729d68ead73d64c42f764ba858dc X-VCS-Branch: master Date: Wed, 13 Apr 2022 08:08:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 84de73ba-4b57-46dc-a2f5-451f0b3e73cc X-Archives-Hash: fb7709b54c89e9dad38a57fca4c6eda6 commit: 35dd4906505f729d68ead73d64c42f764ba858dc Author: Lars Wendler gentoo org> AuthorDate: Wed Apr 13 08:06:51 2022 +0000 Commit: Lars Wendler gentoo org> CommitDate: Wed Apr 13 08:08:48 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35dd4906 app-shells/zsh: Revbump to fix non-interactive shell regression Signed-off-by: Lars Wendler gentoo.org> ....8.1-non_interactive_shell_regression_fix.patch | 76 ++++++++++++++++++++++ .../zsh/{zsh-5.8.1.ebuild => zsh-5.8.1-r1.ebuild} | 4 ++ 2 files changed, 80 insertions(+) diff --git a/app-shells/zsh/files/zsh-5.8.1-non_interactive_shell_regression_fix.patch b/app-shells/zsh/files/zsh-5.8.1-non_interactive_shell_regression_fix.patch new file mode 100644 index 000000000000..6e202fa2fb24 --- /dev/null +++ b/app-shells/zsh/files/zsh-5.8.1-non_interactive_shell_regression_fix.patch @@ -0,0 +1,76 @@ +From da8be06c2062ea02795bcba25172369ec68848cf Mon Sep 17 00:00:00 2001 +From: Peter Stephenson +Date: Thu, 3 Mar 2022 19:19:35 +0000 +Subject: [PATCH] 49792: Non-interative shell input is line buffered. + +--- + ChangeLog | 5 +++++ + Src/input.c | 21 ++++++++++++++------- + Test/A01grammar.ztst | 9 +++++++++ + 3 files changed, 28 insertions(+), 7 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 8a5ad4941..cae2fc4e3 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,8 @@ ++2022-03-03 Peter Stephenson ++ ++ * 49792: Src/input.c, Test/A01grammar.ztst: Use line buffering ++ for non-interactive input. ++ + 2022-02-12 dana + + * unposted: Config/version.mk, Etc/FAQ.yo, README: Update +diff --git a/Src/input.c b/Src/input.c +index 18228b37d..caa8e23b0 100644 +--- a/Src/input.c ++++ b/Src/input.c +@@ -223,13 +223,20 @@ shingetchar(void) + return STOUC(*shinbufptr++); + + shinbufreset(); +- do { +- errno = 0; +- nread = read(SHIN, shinbuffer, SHINBUFSIZE); +- } while (nread < 0 && errno == EINTR); +- if (nread <= 0) +- return -1; +- shinbufendptr = shinbuffer + nread; ++ for (;;) { ++ errno = 0; ++ nread = read(SHIN, shinbufendptr, 1); ++ if (nread > 0) { ++ /* Use line buffering (POSIX requirement) */ ++ if (*shinbufendptr++ == '\n') ++ break; ++ if (shinbufendptr == shinbuffer + SHINBUFSIZE) ++ break; ++ } else if (nread == 0 || errno != EINTR) ++ break; ++ } ++ if (shinbufendptr == shinbuffer) ++ return -1; + return STOUC(*shinbufptr++); + } + +diff --git a/Test/A01grammar.ztst b/Test/A01grammar.ztst +index 1e0e9a04e..adbf5f1d9 100644 +--- a/Test/A01grammar.ztst ++++ b/Test/A01grammar.ztst +@@ -932,3 +932,12 @@ F:Note that the behaviour of 'exit' inside try-list inside a function is unspeci + $ZTST_testdir/../Src/zsh -fc '{ ( ) } always { echo foo }' + -f:exec last command optimization inhibited for try/always + >foo ++ ++ ( ++ export VALUE=first ++ print -l 'echo Value is $VALUE' 'VALUE=second sh' 'echo Value is $VALUE' | ++ $ZTST_testdir/../Src/zsh -f ++ ) ++0:Non-interactive shell command input is line buffered ++>Value is first ++>Value is second +-- +2.36.0.rc2 + diff --git a/app-shells/zsh/zsh-5.8.1.ebuild b/app-shells/zsh/zsh-5.8.1-r1.ebuild similarity index 98% rename from app-shells/zsh/zsh-5.8.1.ebuild rename to app-shells/zsh/zsh-5.8.1-r1.ebuild index e44079087473..6cbf8622fe20 100644 --- a/app-shells/zsh/zsh-5.8.1.ebuild +++ b/app-shells/zsh/zsh-5.8.1-r1.ebuild @@ -51,6 +51,10 @@ if [[ ${PV} == *9999 ]] ; then )" fi +PATCHES=( + "${FILESDIR}/${P}-non_interactive_shell_regression_fix.patch" +) + src_prepare() { if [[ ${PV} != *9999 ]]; then # fix zshall problem with soelim