From 0c100b7dd2b30e75b799d806df4ef899fd98e1ea Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 16 Apr 2022 13:07:24 +0100 Subject: gentoo resync : 16.04.2022 --- app-shells/zsh/Manifest | 3 +- ....8.1-non_interactive_shell_regression_fix.patch | 76 +++++++ app-shells/zsh/zsh-5.8.1-r1.ebuild | 221 +++++++++++++++++++++ app-shells/zsh/zsh-5.8.1.ebuild | 217 -------------------- 4 files changed, 299 insertions(+), 218 deletions(-) create mode 100644 app-shells/zsh/files/zsh-5.8.1-non_interactive_shell_regression_fix.patch create mode 100644 app-shells/zsh/zsh-5.8.1-r1.ebuild delete mode 100644 app-shells/zsh/zsh-5.8.1.ebuild (limited to 'app-shells/zsh') diff --git a/app-shells/zsh/Manifest b/app-shells/zsh/Manifest index 11dad7c3e597..e6c34bbd462d 100644 --- a/app-shells/zsh/Manifest +++ b/app-shells/zsh/Manifest @@ -1,8 +1,9 @@ AUX prompt_gentoo_setup-1 820 BLAKE2B 26fc3348f16459462dddfd3f6864a3ae58bbcbbce0e85c04d653bed9c1f1c28a07621fffd22819d62050cf019f3d6d4c127088055bc69a0cc0cb990e8435f2be SHA512 262ad91d7536c11c3b1db176217e9a9bf21df5d25d72ddfc7dece6eafceb74a252212939c8cbe5bee1ccc0e25fc4e6e906660877747f5224e862d4d22d1200a0 AUX zprofile-4 1314 BLAKE2B 8373d9f68613d5d44121c46a02dd7a5c988f4a3d948aa6bf96a9b0c5f67967f4b787b7ab346e7fabcdd8805321a89b63e6919d5abef082d24e4c46157c68e4db SHA512 5f87b4f0e59bb338f9aa8ec811424d37042ab5ad889aa00f6f912003b7aaaf8b3ea59746590c639a45facace0743deab89779ae5cee8ff6a39beda99864c9cf7 AUX zsh-5.3-init.d-gentoo.diff 1048 BLAKE2B 295e391679ef876a7bdaeaf6dc4b1b3a342c40f092f8cbeba137ee5ea6d26e16f988fc92f105bfcec739bc2aeca62195839b80dee337de8bfdfb5ff00a34fa22 SHA512 9f059cf4b99b7006955ab0ac43d4a4b4d762d193da9a738f771c562f2c3af3a9125694da59c584a3ff829598443e5429c873319ecd8fae2feba7096b597798dd +AUX zsh-5.8.1-non_interactive_shell_regression_fix.patch 2277 BLAKE2B a670417a23ef05b616e32903f9ee26c746d98b5b927afad28b70b0c19a8f3841550d1a4476259cfffb848a4e2898bb8dcb6e5f00308dc2741f01ebb18d24cc7c SHA512 bb0f210d2759a9fef6971e654e44e813fcac69f4d430966295ad1da481d2d33584784c955a1a030407d23889c9ef2a33d7cc571beb0b6a8046832681bb43edb2 DIST zsh-5.8.1-doc.tar.xz 3088728 BLAKE2B c7f62f50a8fce483d2946ac550fa0996e5749a9040cf9424a61d591024292a2f1eb0fc2401824104c6ef0fff2a4b38e07269a0069cde1b0bff6e8a7b09daf160 SHA512 0d8ca4c54c10e8a471ba7d53f1371ee057f7df4b710fc01194833f29a61b5465133432b891b0b891b6cc5235a928a783bf99f39c67314e29e3d161ca5abf3219 DIST zsh-5.8.1.tar.xz 3200540 BLAKE2B 19981d0cc208fb590af8e034bde66bda36a4a20abe76ff71ba9222d7150b7d53573e1f5b81ddb2cdd29f6aa0611071a35d8b48250e6bd4b196f0428b776c4af8 SHA512 f54a5a47ed15d134902613f6169c985680afc45a67538505e11b66b348fcb367145e9b8ae2d9eac185e07ef5f97254b85df01ba97294002a8c036fd02ed5e76d -EBUILD zsh-5.8.1.ebuild 5960 BLAKE2B 483c7a38c38c5e2664774f29407a81c502b1916b6238ab0eb26accea3e00da8f6f35363c40b82bc0dd409d04810f589a9d52fdb0e006d81932e613c15304768a SHA512 a87a1d52204bd2d3ea4276e55eea3c0bd475a47757c604e4efa042488dd65591f445d0e38a055b025e5d3ecccd5af0764faed1cd2b6fcd86d033c22af73fdd84 +EBUILD zsh-5.8.1-r1.ebuild 6036 BLAKE2B 5e283a9b43f0191228090c777b9b47e4a528f82e01015e4969d61c192226e13521b7bf652f313650adb68119bd57bfc3c2d6183ac264b08a296d725c9df66aa8 SHA512 f500f267f408cce8c7f2503bf8e3d0402884caab46a135c648c3b24a4db2c120c69d017a70fa92c4db72094fc7e642ff5cb23932aeaf67d432d5a5bb9a4469c2 EBUILD zsh-9999.ebuild 5967 BLAKE2B bcbabf0168e0b2893a06ca41f56ad85fc6719995cf153ecd9922a24db0576eaa0d4dc0b826e026253d1cbc92ec474ac36e5da3a7f0f9ec7667d08e66c42cdb14 SHA512 04f76d62147882ccf81a0a876e53177825b73bf41ad8ac829e534ebdb98def903234819e0ddfda30042b5d78041c2ae9f74661316ec64328eebb8a66959c22d8 MISC metadata.xml 515 BLAKE2B d5fee9e19a273c932a4d1c8b8b58a816126eb22ae18d7cfdeacd49fcf8e2a5ffaf6dca653761c3389e69e476c65afbc9c90352066e50d129a4eaedc87b6834e9 SHA512 0966e2915ce21c9c34bbc75fa0cd9981227c8e7f78ed2f0d01dcbccacd1038859008a12611b5a2037ad8b1137a6c0f08fdf35e100a6162df3a0f8bbb9c0da353 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-r1.ebuild b/app-shells/zsh/zsh-5.8.1-r1.ebuild new file mode 100644 index 000000000000..6cbf8622fe20 --- /dev/null +++ b/app-shells/zsh/zsh-5.8.1-r1.ebuild @@ -0,0 +1,221 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic prefix + +if [[ ${PV} == 9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://git.code.sf.net/p/zsh/code" +else + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + SRC_URI="https://www.zsh.org/pub/${P}.tar.xz + https://www.zsh.org/pub/old/${P}.tar.xz + mirror://sourceforge/${PN}/${P}.tar.xz + doc? ( + https://www.zsh.org/pub/${P}-doc.tar.xz + mirror://sourceforge/${PN}/${P}-doc.tar.xz + )" +fi + +DESCRIPTION="UNIX Shell similar to the Korn shell" +HOMEPAGE="https://www.zsh.org/" + +LICENSE="ZSH gdbm? ( GPL-2 )" +SLOT="0" +IUSE="caps debug doc examples gdbm maildir pcre static unicode" + +RDEPEND=" + >=sys-libs/ncurses-5.1:0= + static? ( >=sys-libs/ncurses-5.7-r4:0=[static-libs] ) + caps? ( sys-libs/libcap ) + pcre? ( + >=dev-libs/libpcre-3.9 + static? ( >=dev-libs/libpcre-3.9[static-libs] ) + ) + gdbm? ( sys-libs/gdbm:= ) + ! Doc/zshall.1 || die + fi + + # add openrc specific options for init.d completion + eapply "${FILESDIR}"/${PN}-5.3-init.d-gentoo.diff + + default + + hprefixify configure.ac + if [[ ${PV} == *9999 ]] ; then + sed -i "/^VERSION=/s@=.*@=${PV}@" Config/version.mk || die + fi + eautoreconf +} + +src_configure() { + local myconf=( + --bindir="${EPREFIX}"/bin + --libdir="${EPREFIX}"/usr/$(get_libdir) + --enable-etcdir="${EPREFIX}"/etc/zsh + --enable-runhelpdir="${EPREFIX}"/usr/share/zsh/${PV%_*}/help + --enable-fndir="${EPREFIX}"/usr/share/zsh/${PV%_*}/functions + --enable-site-fndir="${EPREFIX}"/usr/share/zsh/site-functions + --enable-function-subdirs + --with-tcsetpgrp + --with-term-lib="$(usex unicode 'tinfow ncursesw' 'tinfo ncurses')" + $(use_enable maildir maildir-support) + $(use_enable pcre) + $(use_enable caps cap) + $(use_enable unicode multibyte) + $(use_enable gdbm) + ) + + if use static ; then + myconf+=( --disable-dynamic ) + append-ldflags -static + fi + if use debug ; then + myconf+=( + --enable-zsh-debug + --enable-zsh-mem-debug + --enable-zsh-mem-warning + --enable-zsh-secure-free + --enable-zsh-hash-debug + ) + fi + + if [[ ${CHOST} == *-darwin* ]]; then + myconf+=( --enable-libs=-liconv ) + append-ldflags -Wl,-x + fi + + econf "${myconf[@]}" + + if use static ; then + # compile all modules statically, see Bug #27392 + # removed cap and curses because linking failes + sed -e "s,link=no,link=static,g" \ + -e "/^name=zsh\/cap/s,link=static,link=no," \ + -e "/^name=zsh\/curses/s,link=static,link=no," \ + -i "${S}"/config.modules || die + if ! use gdbm ; then + sed -i '/^name=zsh\/db\/gdbm/s,link=static,link=no,' \ + "${S}"/config.modules || die + fi + fi +} + +src_compile() { + default + + if [[ ${PV} == *9999 ]] && use doc ; then + emake -C Doc everything + fi +} + +src_test() { + addpredict /dev/ptmx + local i + for i in C02cond.ztst V08zpty.ztst X02zlevi.ztst Y01completion.ztst Y02compmatch.ztst Y03arguments.ztst ; do + rm "${S}"/Test/${i} || die + done + emake check +} + +src_install() { + emake DESTDIR="${D}" install $(usex doc "install.info" "") + + insinto /etc/zsh + export PREFIX_QUOTE_CHAR='"' PREFIX_EXTRA_REGEX="/EUID/s,0,${EUID}," + newins "$(prefixify_ro "${FILESDIR}"/zprofile-4)" zprofile + + keepdir /usr/share/zsh/site-functions + insinto /usr/share/zsh/${PV%_*}/functions/Prompts + newins "${FILESDIR}"/prompt_gentoo_setup-1 prompt_gentoo_setup + + local i + + # install miscellaneous scripts (bug #54520) + sed -e "s:/usr/local/bin/perl:${EPREFIX}/usr/bin/perl:g" \ + -e "s:/usr/local/bin/zsh:${EPREFIX}/bin/zsh:g" \ + -i {Util,Misc}/* || die + for i in Util Misc ; do + insinto /usr/share/zsh/${PV%_*}/${i} + doins ${i}/* + done + + # install header files (bug #538684) + insinto /usr/include/zsh + doins config.h Src/*.epro + for i in Src/{zsh.mdh,*.h} ; do + sed -e 's@\.\./config\.h@config.h@' \ + -e 's@#\(\s*\)include "\([^"]\+\)"@#\1include @' \ + -i "${i}" + doins "${i}" + done + + dodoc ChangeLog* META-FAQ NEWS README config.modules + + if use doc ; then + pushd "${WORKDIR}/${PN}-${PV%_*}" >/dev/null + dodoc Doc/zsh.{dvi,pdf} + docinto html + dodoc Doc/*.html + popd >/dev/null + fi + + docinto StartupFiles + dodoc StartupFiles/z* +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] ; then + echo + elog "If you want to enable Portage completions and Gentoo prompt," + elog "emerge app-shells/gentoo-zsh-completions and add" + elog " autoload -U compinit promptinit" + elog " compinit" + elog " promptinit; prompt gentoo" + elog "to your ~/.zshrc" + echo + elog "Also, if you want to enable cache for the completions, add" + elog " zstyle ':completion::complete:*' use-cache 1" + elog "to your ~/.zshrc" + echo + elog "Note that a system zprofile startup file is installed. This will override" + elog "PATH and possibly other variables that a user may set in ~/.zshenv." + elog "Custom PATH settings and similar overridden variables can be moved to ~/.zprofile" + elog "or other user startup files that are sourced after the system zprofile." + echo + elog "If PATH must be set in ~/.zshenv to affect things like non-login ssh shells," + elog "one method is to use a separate path-setting file that is conditionally sourced" + elog "in ~/.zshenv and also sourced from ~/.zprofile. For more information, see the" + elog "zshenv example in ${EROOT}/usr/share/doc/${PF}/StartupFiles/." + echo + elog "See https://wiki.gentoo.org/wiki/Zsh/HOWTO for more introduction documentation." + echo + fi +} diff --git a/app-shells/zsh/zsh-5.8.1.ebuild b/app-shells/zsh/zsh-5.8.1.ebuild deleted file mode 100644 index e44079087473..000000000000 --- a/app-shells/zsh/zsh-5.8.1.ebuild +++ /dev/null @@ -1,217 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit autotools flag-o-matic prefix - -if [[ ${PV} == 9999* ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://git.code.sf.net/p/zsh/code" -else - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - SRC_URI="https://www.zsh.org/pub/${P}.tar.xz - https://www.zsh.org/pub/old/${P}.tar.xz - mirror://sourceforge/${PN}/${P}.tar.xz - doc? ( - https://www.zsh.org/pub/${P}-doc.tar.xz - mirror://sourceforge/${PN}/${P}-doc.tar.xz - )" -fi - -DESCRIPTION="UNIX Shell similar to the Korn shell" -HOMEPAGE="https://www.zsh.org/" - -LICENSE="ZSH gdbm? ( GPL-2 )" -SLOT="0" -IUSE="caps debug doc examples gdbm maildir pcre static unicode" - -RDEPEND=" - >=sys-libs/ncurses-5.1:0= - static? ( >=sys-libs/ncurses-5.7-r4:0=[static-libs] ) - caps? ( sys-libs/libcap ) - pcre? ( - >=dev-libs/libpcre-3.9 - static? ( >=dev-libs/libpcre-3.9[static-libs] ) - ) - gdbm? ( sys-libs/gdbm:= ) - ! Doc/zshall.1 || die - fi - - # add openrc specific options for init.d completion - eapply "${FILESDIR}"/${PN}-5.3-init.d-gentoo.diff - - default - - hprefixify configure.ac - if [[ ${PV} == *9999 ]] ; then - sed -i "/^VERSION=/s@=.*@=${PV}@" Config/version.mk || die - fi - eautoreconf -} - -src_configure() { - local myconf=( - --bindir="${EPREFIX}"/bin - --libdir="${EPREFIX}"/usr/$(get_libdir) - --enable-etcdir="${EPREFIX}"/etc/zsh - --enable-runhelpdir="${EPREFIX}"/usr/share/zsh/${PV%_*}/help - --enable-fndir="${EPREFIX}"/usr/share/zsh/${PV%_*}/functions - --enable-site-fndir="${EPREFIX}"/usr/share/zsh/site-functions - --enable-function-subdirs - --with-tcsetpgrp - --with-term-lib="$(usex unicode 'tinfow ncursesw' 'tinfo ncurses')" - $(use_enable maildir maildir-support) - $(use_enable pcre) - $(use_enable caps cap) - $(use_enable unicode multibyte) - $(use_enable gdbm) - ) - - if use static ; then - myconf+=( --disable-dynamic ) - append-ldflags -static - fi - if use debug ; then - myconf+=( - --enable-zsh-debug - --enable-zsh-mem-debug - --enable-zsh-mem-warning - --enable-zsh-secure-free - --enable-zsh-hash-debug - ) - fi - - if [[ ${CHOST} == *-darwin* ]]; then - myconf+=( --enable-libs=-liconv ) - append-ldflags -Wl,-x - fi - - econf "${myconf[@]}" - - if use static ; then - # compile all modules statically, see Bug #27392 - # removed cap and curses because linking failes - sed -e "s,link=no,link=static,g" \ - -e "/^name=zsh\/cap/s,link=static,link=no," \ - -e "/^name=zsh\/curses/s,link=static,link=no," \ - -i "${S}"/config.modules || die - if ! use gdbm ; then - sed -i '/^name=zsh\/db\/gdbm/s,link=static,link=no,' \ - "${S}"/config.modules || die - fi - fi -} - -src_compile() { - default - - if [[ ${PV} == *9999 ]] && use doc ; then - emake -C Doc everything - fi -} - -src_test() { - addpredict /dev/ptmx - local i - for i in C02cond.ztst V08zpty.ztst X02zlevi.ztst Y01completion.ztst Y02compmatch.ztst Y03arguments.ztst ; do - rm "${S}"/Test/${i} || die - done - emake check -} - -src_install() { - emake DESTDIR="${D}" install $(usex doc "install.info" "") - - insinto /etc/zsh - export PREFIX_QUOTE_CHAR='"' PREFIX_EXTRA_REGEX="/EUID/s,0,${EUID}," - newins "$(prefixify_ro "${FILESDIR}"/zprofile-4)" zprofile - - keepdir /usr/share/zsh/site-functions - insinto /usr/share/zsh/${PV%_*}/functions/Prompts - newins "${FILESDIR}"/prompt_gentoo_setup-1 prompt_gentoo_setup - - local i - - # install miscellaneous scripts (bug #54520) - sed -e "s:/usr/local/bin/perl:${EPREFIX}/usr/bin/perl:g" \ - -e "s:/usr/local/bin/zsh:${EPREFIX}/bin/zsh:g" \ - -i {Util,Misc}/* || die - for i in Util Misc ; do - insinto /usr/share/zsh/${PV%_*}/${i} - doins ${i}/* - done - - # install header files (bug #538684) - insinto /usr/include/zsh - doins config.h Src/*.epro - for i in Src/{zsh.mdh,*.h} ; do - sed -e 's@\.\./config\.h@config.h@' \ - -e 's@#\(\s*\)include "\([^"]\+\)"@#\1include @' \ - -i "${i}" - doins "${i}" - done - - dodoc ChangeLog* META-FAQ NEWS README config.modules - - if use doc ; then - pushd "${WORKDIR}/${PN}-${PV%_*}" >/dev/null - dodoc Doc/zsh.{dvi,pdf} - docinto html - dodoc Doc/*.html - popd >/dev/null - fi - - docinto StartupFiles - dodoc StartupFiles/z* -} - -pkg_postinst() { - if [[ -z ${REPLACING_VERSIONS} ]] ; then - echo - elog "If you want to enable Portage completions and Gentoo prompt," - elog "emerge app-shells/gentoo-zsh-completions and add" - elog " autoload -U compinit promptinit" - elog " compinit" - elog " promptinit; prompt gentoo" - elog "to your ~/.zshrc" - echo - elog "Also, if you want to enable cache for the completions, add" - elog " zstyle ':completion::complete:*' use-cache 1" - elog "to your ~/.zshrc" - echo - elog "Note that a system zprofile startup file is installed. This will override" - elog "PATH and possibly other variables that a user may set in ~/.zshenv." - elog "Custom PATH settings and similar overridden variables can be moved to ~/.zprofile" - elog "or other user startup files that are sourced after the system zprofile." - echo - elog "If PATH must be set in ~/.zshenv to affect things like non-login ssh shells," - elog "one method is to use a separate path-setting file that is conditionally sourced" - elog "in ~/.zshenv and also sourced from ~/.zprofile. For more information, see the" - elog "zshenv example in ${EROOT}/usr/share/doc/${PF}/StartupFiles/." - echo - elog "See https://wiki.gentoo.org/wiki/Zsh/HOWTO for more introduction documentation." - echo - fi -} -- cgit v1.2.3