[gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/, app-shells/bash/, app-shells/bash/files/bashrc.d/

2024-04-20 Thread Sam James
commit: 268b2e7c07d97bd9e833d239d786a0314c3b09ec
Author: Kerin Millar  plushkava  net>
AuthorDate: Thu Apr 18 04:17:37 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Apr 20 07:29:29 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=268b2e7c

app-shells/bash: restructure the system-wide bashrc for 5.1 and 5.2

This commit simplifies /etc/bash/bashrc by separating out the
functionality that is relatively complicated - perhaps even opinionated
on the part of Gentoo - into files that are installed to the
/etc/bash/bashrc.d directory. The intention is to preserve the overall
Gentoo flavour, while making it easier for users to customise their
operating environment than was the case before, and to be able to easily
suppress functionality that they may not wish for. The exact changes are
described herewith.

No longer will a superfluous error message be printed in the case that
bash was not compiled with readline support.

Files within /etc/bash/bashrc.d must now have a suffix of either ".sh"
or ".bash" in order to be sourced. This better reflects the way in which
/etc/profile works and should be a little safer.

Two new files are introduced:

- /etc/bash/bashrc.d/10-gentoo-color.bash
- /etc/bash/bashrc.d/10-gentoo-title.bash

Users may suppress these with INSTALL_MASK, should they wish to do so.

The NO_COLOR variable is now respected, provided that is is defined
prior to the sourcing of 10-gentoo-color.bash. It should be noted that
ssh users have the option of transmitting this variable by configuring
both ssh(1) and sshd(8) accordingly.

The way in which terminals are evaluated for colour support has been
greatly improved. There are now three heuristics involved. The first
method is to determine whether COLORTERM is already set as an
environment variable. This is an effective method because modern
terminal emulators commonly set the variable so as to advertise 24-bit
colour support. Further, Gentoo already whitelists the COLORTERM
variable in both ssh(1) and sshd(8). The second method is to use the
ncurses implementation of tput(1) to determine whether colour is
supported. The third method is to fall back to a traditional whitelist
of TERM patterns. However, I have overhauled this list based on an
arduous survey of terminal emulators during which I collected empirical
evidence as to which of them actually belong on the list. As such, the
coverage of this method of last resort is broader.

The COLORTERM variable will now be set for terminal emulators that are
found to support 24-bit colour but which do not set the variable by
themselves.

Colour-supporting aliases will now be defined for all of the following
utilities: diff, dir, egrep, fgrep, grep, ls and vdir.

Out of an abundance of caution, the -- operand is now used to signify
end-of-options in the case that dircolors(1) is being passed a pathname
incorporating the user's home directory.

PROMPT_COMMAND will now be defined as an array, as is supported for bash
5.1 or greater. It is more convenient because additional commands can
simply be appended to the array.

No longer will the "Title Definition String" and/or "Set Text Parameter"
sequences be injected into the value of PS1. This keeps the value of PS1
clean and results in fewer side effects in the event that the user
wishes to customise the prompt.

PROMPT_COMMAND will now be used to contain commands that print the
"Title Definition String" and/or "Text Parameter Sequences", depending
on the characteristics of the operating environment. The precise
behaviour is conveyed from hereon.

If the value of TERM is found to be that of the screen or tmux terminal
multiplexers, PROMPT_COMMAND will be set so as to invoke a function that
prints the Title Definition String sequence. The effect of the sequence
is to define the window title for screen, and the pane title for tmux.
The title will incoporate the hostname in short form.

If, on the other hand, the value of TERM is not found to be that of a
terminal multiplexer, a test is performed to see whether the tty is that
of sshd(8). If it is, then no further processing will occur. The reason
for this is it that there is no way for Gentoo to know the
characteristics of the operating environment where ssh(1) happens to be
running at the time. Sadly, there are many cases in which the window
title would simply not be restored after ssh(1) exists, which amounts to
a poor user experience.

Assuming that processing has not ceased at this point, the value of TERM
will be matched against a whitelist of modern terminals that are known
to support the Set Text Parameters Sequence, and to support UTF-8
correctly. If a match is made then PROMPT_COMMAND will be amended so as
to invoke a function that prints the aforementioned sequence. The effect
of the sequence is to define the hardstatus for screen, the window name
for tmux and the window title for graphical terminal emulators. The
title will incorporate the username, the hostn

[gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/, app-shells/bash/

2023-12-01 Thread Sam James
commit: 9c51528023c4f13a5c407e8bbf2fc6d2e0cc56a1
Author: Sam James  gentoo  org>
AuthorDate: Sat Dec  2 04:13:49 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Dec  2 04:13:49 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c515280

app-shells/bash: fix another configure check for modern c

Signed-off-by: Sam James  gentoo.org>

 app-shells/bash/bash-5.2_p21-r1.ebuild | 374 +
 .../files/bash-5.2_p21-configure-strtold.patch |  32 ++
 2 files changed, 406 insertions(+)

diff --git a/app-shells/bash/bash-5.2_p21-r1.ebuild 
b/app-shells/bash/bash-5.2_p21-r1.ebuild
new file mode 100644
index ..48634f88f47d
--- /dev/null
+++ b/app-shells/bash/bash-5.2_p21-r1.ebuild
@@ -0,0 +1,374 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc
+inherit flag-o-matic toolchain-funcs prefix verify-sig
+
+# Uncomment if we have a patchset
+#GENTOO_PATCH_DEV="sam"
+#GENTOO_PATCH_VER="${PV}"
+
+# Official patchlevel
+# See ftp://ftp.cwru.edu/pub/bash/bash-5.1-patches/
+PLEVEL="${PV##*_p}"
+MY_PV="${PV/_p*}"
+MY_PV="${MY_PV/_/-}"
+MY_P="${PN}-${MY_PV}"
+MY_PATCHES=()
+
+is_release() {
+   case ${PV} in
+   |*_alpha*|*_beta*|*_rc*)
+   return 1
+   ;;
+   *)
+   return 0
+   ;;
+   esac
+}
+
+[[ ${PV} != *_p* ]] && PLEVEL=0
+
+# The version of readline this bash normally ships with.
+# Note: right now, we don't use the system copy of readline for bash for 
non-releases.
+READLINE_VER="8.2_p1"
+
+DESCRIPTION="The standard GNU Bourne again shell"
+HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html 
https://git.savannah.gnu.org/cgit/bash.git";
+
+if [[ ${PV} ==  ]] ; then
+   EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git";
+   EGIT_BRANCH=devel
+   inherit git-r3
+elif is_release ; then
+   SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz"
+   SRC_URI+=" verify-sig? ( mirror://gnu/bash/${MY_P}.tar.gz.sig )"
+
+   if [[ ${PLEVEL} -gt 0 ]] ; then
+   # bash-5.1 -> bash51
+   my_p=${PN}$(ver_rs 1-2 '' $(ver_cut 1-2))
+
+   patch_url=
+   my_patch_index=
+
+   upstream_url_base="mirror://gnu/bash"
+   mirror_url_base="ftp://ftp.cwru.edu/pub/bash";
+
+   for ((my_patch_index=1; my_patch_index <= ${PLEVEL} ; 
my_patch_index++)) ; do
+   printf -v mangled_patch_ver ${my_p}-%03d 
${my_patch_index}
+   
patch_url="${upstream_url_base}/${MY_P}-patches/${mangled_patch_ver}"
+
+   SRC_URI+=" ${patch_url}"
+   SRC_URI+=" verify-sig? ( ${patch_url}.sig )"
+
+   # Add in the mirror URL too.
+   SRC_URI+=" 
${patch_url/${upstream_url_base}/${mirror_url_base}}"
+   SRC_URI+=" verify-sig? ( 
${patch_url/${upstream_url_base}/${mirror_url_base}} )"
+
+   MY_PATCHES+=( "${DISTDIR}"/${mangled_patch_ver} )
+   done
+
+   unset my_p patch_url my_patch_index upstream_url_base 
mirror_url_base
+   fi
+else
+   SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz 
ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz";
+   SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig 
ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz.sig )"
+fi
+
+if [[ -n ${GENTOO_PATCH_VER} ]] ; then
+   SRC_URI+=" 
https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER}-patches.tar.xz";
+fi
+
+LICENSE="GPL-3+"
+SLOT="0"
+if is_release ; then
+   KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc 
~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos 
~x64-macos ~x64-solaris"
+fi
+IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline"
+
+DEPEND="
+   >=sys-libs/ncurses-5.2-r2:=
+   nls? ( virtual/libintl )
+"
+if is_release ; then
+   DEPEND+=" readline? ( >=sys-libs/readline-${READLINE_VER}:= )"
+fi
+RDEPEND="
+   ${DEPEND}
+"
+# We only need bison (yacc) when the .y files get patched (bash42-005, 
bash51-011)
+BDEPEND="
+   pgo? ( dev-util/gperf )
+   verify-sig? ( sec-keys/openpgp-keys-chetramey )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+# EAPI 8 tries to append it but it doesn't exist here
+QA_CONFIGURE_OPTIONS="--disable-static"
+
+PATCHES=(
+   #"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}/
+
+   # Patches from Chet sent to bash-bug ml
+   "${FILESDIR}"/${PN}-5.0-syslog-history-extern.patch
+   "${FILESDIR}"/${PN}-5.2_p15-random-ub.patch
+   "${FILESDIR}"/${PN}-5.2_p15-configure-clang16.patch
+   "${FILESDIR}"/${PN}-5.2_p21-wpointer-to-int.patch
+   "${FILESDIR}"/${PN}-5.2_p21-configu

[gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/, app-shells/bash/

2023-11-10 Thread Sam James
commit: 9edfdc3c8998055e798eee56fa4ffd052c847b2e
Author: Sam James  gentoo  org>
AuthorDate: Sat Nov 11 00:20:24 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Nov 11 00:20:32 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9edfdc3c

app-shells/bash: add 5.2_p21

Signed-off-by: Sam James  gentoo.org>

 app-shells/bash/Manifest   |  12 +
 app-shells/bash/bash-5.2_p21.ebuild| 373 +
 .../bash/files/bash-5.2_p21-wpointer-to-int.patch  |  13 +
 3 files changed, 398 insertions(+)

diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest
index 45a63cd6c251..c4530d8443f3 100644
--- a/app-shells/bash/Manifest
+++ b/app-shells/bash/Manifest
@@ -403,3 +403,15 @@ DIST bash52-014 3245 BLAKE2B 
990e6566c446ce030d1333a05de9027a994054e983bf414e9aa
 DIST bash52-014.sig 95 BLAKE2B 
2206483fd1b356099bab6fb7793d21dbd5b2adcbe2b108c69c5d7ccd6a13f934c69adcecd5f3fb1783b380c91c362609a175c4b95f25ac9996bbfad0147f250d
 SHA512 
e7404ca3ff8bac3cb0dc7edd0bfc7907734474c8d99a4dfffae87645653f05a26911e5f1e4670d80472423c84b42f86c84835ca310c083bcf16cdf860dd2
 DIST bash52-015 8088 BLAKE2B 
038f03bc543297a3f2e7612afdee7b27eb5d65d7f81c22976936211f4a80acd9f0faf1ba6c56e20fc653b877a448ab7872b5488da3684952682d80c752227ab2
 SHA512 
eb1bd6b3bf8811d765f222cd48360eb7f3f0aaa4f29f1b6c1f17635b819e5e4734ec4e7fcfde551fd7a6299a7d67869ea0bc5cc86cc523bc4a64d30e433df493
 DIST bash52-015.sig 95 BLAKE2B 
b32afb78e24554ccc73f95883e1c78cdee222e589634ecca947b00ce163596373de6179f7c6e6bccbb9ab846c9ff3c8ee04723f23b1a641c908f535c01cbea2c
 SHA512 
047d84c9e1bc996acfb735667409a7285d025fc8c63b9c7da86ace9e6be133d58bd66bf8bf918b81d27aaebc5795419604418d2ddb0ee11b675f283b634f441f
+DIST bash52-016 1225 BLAKE2B 
675b70e1df1083021fb6336e50d10012dc02e1a80865a64579256319ca98c8282af20e7210ef9d993f97718c7bfed2315f23edac04e6f3af65a1e08cd5f7ef2e
 SHA512 
11c3197870570050767887a7497b52549caf2bf74e69c5a4eb95ff316942177da0a1150819f7051eb690841796b98d9a81f784204d18ad176cd2c29473e466d4
+DIST bash52-016.sig 95 BLAKE2B 
6b61d9293f0f804c12d3c0a0afa802d91fbdbb55e3f69daaad8b1fcb23718ebcca56c9a9fc6b35eaefe05f146b5a502291aead23c523f966e32e3f0585b0fc08
 SHA512 
59bae9616765a10b3f12f5ca6f6ef6c2d2179c50d94e5698b1c6bfc5cb0819328ee8537bab86ab6efb936f262bdfe14f7fc9d5ba0b88e5c4ebd2cf1aae22990a
+DIST bash52-017 1396 BLAKE2B 
461f2f6543501306faa5decd98211699f0ce84eea5a1225145dc401ec0ca893c9d8021359c04af4dec265e7d247f2fbb70cfe8d5382e3c38fd2774e017de4aed
 SHA512 
1844d1f4fbce0ae1dd8f2b9c152decc7cc645b7c0c66e84ed129072251e990f2da2220917957e98dd8b1299d2d10fb2dd23e184e40457063c1d554bb132ef1e5
+DIST bash52-017.sig 95 BLAKE2B 
cf83b861273b9f7e7611367f7551be7af678839fd1c0570eaf1f8ec54ab8e858b78086f2c20ff5d1899aa8544cc27dd2dc2b6d518f6ff4e1d35bc6f4eb5c752e
 SHA512 
8978eeb9180d2cf699247a1cff537708be9882916cba02ed991b0403aaf0b9d7bbff54b601f4251466114dc0ce5100685ef655504ce1f2d08bb5f5a2b73dadd8
+DIST bash52-018 151467 BLAKE2B 
89f95c096f8e487e2a1a00541087d157321b125ae93dc656af0cf6ead9158401a028f5c838c4b81aeb95e7c4951a3b4dfb1a88e08297a03236c0ad36eb6710d2
 SHA512 
b454ba8a311b0943f9669425891499fe8d4b5f1a90899bf6c4d0969699e21f8f8e08d0b0e23a7cf5c97aa6b21384ae907ed710254053e7edd43328aa6003780c
+DIST bash52-018.sig 95 BLAKE2B 
4b371fda53d2bd01b4527688209b49677b5b9f60de6c393fb2b810ba1342c98af0b1e50f35a0a6ef85116686451fad1e103da74611645ed99e04f438dd6245c7
 SHA512 
0930923972e94dab24f33ef68be03dde13b9b13424078102f5f7d5a7c8080f64989b283417efe2c72c89d2e2c2def9a27470b3e125cc233f5c95122c78b9b540
+DIST bash52-019 2548 BLAKE2B 
bcf683825da1e56692d7024748501cc582e623168fc1a8713ef3b4eb284222f6bf9144871d6357464a1c8c031f105ca6cac6cc591b5463d8b72eb139fcf044f0
 SHA512 
d009b0a571a3e23ab723c6c6fd4b28c48db1a927d690b4c42d7ed2fa51052aaf662026a2de9e4ee3676087eac844f8b57adae567556228c4fd8fb4ed3c8a1b94
+DIST bash52-019.sig 95 BLAKE2B 
f42700d5a25003d9f3e722c6230bb8795e2d01fe4b4b49411956757346f8df42bdfcc5af3a87469df7f560fb9857a05e45258f6057fd26090f0d3e17f9303fc5
 SHA512 
56de5fe1b98ff89ea5483f9ccef68ea8a7563e7cfa933daa223cd98f9b2d882e6692ae34859281906a228e9c510f1506c3c808eaaad6eeab762df00da2fbf55b
+DIST bash52-020 1459 BLAKE2B 
de3e38dbb2395c765767aed516ae3d143e3187a44964f90c587f41f93447c43515481e3c9bd562175d750d0dfb9e4e3eacb25c31f8bf54168fa544c938955eae
 SHA512 
a5a927e90ac3daead54e90f8ff99dbda0fd652c3df83b7bcde0adb136fc4ba8498810e5bfa1d7f0c143422bf1f4622a4669c96e505bccad7c9a271d7e0668187
+DIST bash52-020.sig 95 BLAKE2B 
8fd778b381cc14d17de8f2b7e215fa0d35c569a90d46fac77c0a94bea525bd62428663f0a908e64ff773bd4caf0aab7f92c2dda1f4158aacbd53f053be91d16d
 SHA512 
0ae6d9189329e560a89af9f42f0f98126faeb15d29bd327e6bd7694870a9bcfae3d3d545e42baf4223dcc732a50d46e4c22477c41b98be85736bb05a359c
+DIST bash52-021 1890 BLAKE2B 
cc2d886da8c51eb7bdbed694423eae29dc05dc2c7bd0cd41b9ee3acbc56ef135043bb48275c4162d33d2d4051a0a8b27f3aec097335b9d15e38fd841a6793f71
 SHA512 
c3a61e975819919d7ba120f322fc5e9a420b21f03d7bf989a5e7b6a99bfe35372744277040e883

[gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/, app-shells/bash/

2023-06-22 Thread Sam James
commit: dde3a81f420e745fe884b6535796129192f02561
Author: Kerin Millar  plushkava  net>
AuthorDate: Sat Jun 17 04:46:45 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Jun 23 02:31:32 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dde3a81f

app-shells/bash: backport shell parser reset fix to 5.2

Note that Ramey's claim that only interactive shells are affected is
false, as is demonstrated below.

$ bash -c '[[ ]]; echo fin'; echo $?
0

Signed-off-by: Kerin Millar  plushkava.net>
Bug: https://savannah.gnu.org/support/?110745
Bug: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00103.html
Signed-off-by: Sam James  gentoo.org>

 app-shells/bash/bash-5.2_p15-r4.ebuild | 366 +
 .../bash-5.2_p15-shell-parser-reset-issue.patch|  33 ++
 2 files changed, 399 insertions(+)

diff --git a/app-shells/bash/bash-5.2_p15-r4.ebuild 
b/app-shells/bash/bash-5.2_p15-r4.ebuild
new file mode 100644
index ..04710a4c180f
--- /dev/null
+++ b/app-shells/bash/bash-5.2_p15-r4.ebuild
@@ -0,0 +1,366 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/chetramey.asc
+inherit flag-o-matic toolchain-funcs prefix verify-sig
+
+# Uncomment if we have a patchset
+#GENTOO_PATCH_DEV="sam"
+#GENTOO_PATCH_VER="${PV}"
+
+# Official patchlevel
+# See ftp://ftp.cwru.edu/pub/bash/bash-5.1-patches/
+PLEVEL="${PV##*_p}"
+MY_PV="${PV/_p*}"
+MY_PV="${MY_PV/_/-}"
+MY_P="${PN}-${MY_PV}"
+MY_PATCHES=()
+
+is_release() {
+   case ${PV} in
+   |*_alpha*|*_beta*|*_rc*)
+   return 1
+   ;;
+   *)
+   return 0
+   ;;
+   esac
+}
+
+[[ ${PV} != *_p* ]] && PLEVEL=0
+
+# The version of readline this bash normally ships with.
+# Note: right now, we don't use the system copy of readline for bash for 
non-releases.
+READLINE_VER="8.2_p1"
+
+DESCRIPTION="The standard GNU Bourne again shell"
+HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html 
https://git.savannah.gnu.org/cgit/bash.git";
+
+if [[ ${PV} ==  ]] ; then
+   EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git";
+   EGIT_BRANCH=devel
+   inherit git-r3
+elif is_release ; then
+   SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz"
+   SRC_URI+=" verify-sig? ( mirror://gnu/bash/${MY_P}.tar.gz.sig )"
+
+   if [[ ${PLEVEL} -gt 0 ]] ; then
+   # bash-5.1 -> bash51
+   my_p=${PN}$(ver_rs 1-2 '' $(ver_cut 1-2))
+
+   patch_url=
+   my_patch_index=
+
+   upstream_url_base="mirror://gnu/bash"
+   mirror_url_base="ftp://ftp.cwru.edu/pub/bash";
+
+   for ((my_patch_index=1; my_patch_index <= ${PLEVEL} ; 
my_patch_index++)) ; do
+   printf -v mangled_patch_ver ${my_p}-%03d 
${my_patch_index}
+   
patch_url="${upstream_url_base}/${MY_P}-patches/${mangled_patch_ver}"
+
+   SRC_URI+=" ${patch_url}"
+   SRC_URI+=" verify-sig? ( ${patch_url}.sig )"
+
+   # Add in the mirror URL too.
+   SRC_URI+=" 
${patch_url/${upstream_url_base}/${mirror_url_base}}"
+   SRC_URI+=" verify-sig? ( 
${patch_url/${upstream_url_base}/${mirror_url_base}} )"
+
+   MY_PATCHES+=( "${DISTDIR}"/${mangled_patch_ver} )
+   done
+
+   unset my_p patch_url my_patch_index upstream_url_base 
mirror_url_base
+   fi
+else
+   SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz 
ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz";
+   SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig 
ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz.sig )"
+fi
+
+if [[ -n ${GENTOO_PATCH_VER} ]] ; then
+   SRC_URI+=" 
https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER}-patches.tar.xz";
+fi
+
+LICENSE="GPL-3+"
+SLOT="0"
+if is_release ; then
+   KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc 
~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos 
~x64-macos ~x64-solaris"
+fi
+IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline"
+
+DEPEND="
+   >=sys-libs/ncurses-5.2-r2:=
+   nls? ( virtual/libintl )
+"
+if is_release ; then
+   DEPEND+=" readline? ( >=sys-libs/readline-${READLINE_VER}:= )"
+fi
+RDEPEND="
+   ${DEPEND}
+"
+# We only need yacc when the .y files get patched (bash42-005, bash51-011)
+BDEPEND="
+   app-alternatives/yacc
+   pgo? ( dev-util/gperf )
+   verify-sig? ( sec-keys/openpgp-keys-chetramey )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+# EAPI 8 tries to append it but it doesn't exist here
+QA_CONFIGURE_OPTIONS="--disable-static"
+
+PATCHES=(
+   #"${WORKDIR}"/${PN}-${GEN

[gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/, app-shells/bash/

2023-02-08 Thread Sam James
commit: a65512af125ca7433402246d1b6c6b62eb7d0936
Author: Sam James  gentoo  org>
AuthorDate: Thu Feb  9 04:08:13 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Feb  9 04:08:13 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a65512af

app-shells/bash: fix configure w/ clang 16

Signed-off-by: Sam James  gentoo.org>

 ...sh-5.2_p15-r1.ebuild => bash-5.2_p15-r2.ebuild} |  1 +
 .../files/bash-5.2_p15-configure-clang16.patch | 37 ++
 2 files changed, 38 insertions(+)

diff --git a/app-shells/bash/bash-5.2_p15-r1.ebuild 
b/app-shells/bash/bash-5.2_p15-r2.ebuild
similarity index 99%
rename from app-shells/bash/bash-5.2_p15-r1.ebuild
rename to app-shells/bash/bash-5.2_p15-r2.ebuild
index b0db51f7f0ce..8c7792de30c2 100644
--- a/app-shells/bash/bash-5.2_p15-r1.ebuild
+++ b/app-shells/bash/bash-5.2_p15-r2.ebuild
@@ -109,6 +109,7 @@ PATCHES=(
# Patches from Chet sent to bash-bug ml
"${FILESDIR}"/${PN}-5.0-syslog-history-extern.patch
"${FILESDIR}"/${PN}-5.2_p15-random-ub.patch
+   "${FILESDIR}"/${PN}-5.2_p15-configure-clang16.patch
 )
 
 pkg_setup() {

diff --git a/app-shells/bash/files/bash-5.2_p15-configure-clang16.patch 
b/app-shells/bash/files/bash-5.2_p15-configure-clang16.patch
new file mode 100644
index ..6005d39df59c
--- /dev/null
+++ b/app-shells/bash/files/bash-5.2_p15-configure-clang16.patch
@@ -0,0 +1,37 @@
+https://lists.gnu.org/archive/html/bug-bash/2023-02/msg0.html)
+
+From 2cdf8b42885189b3cf7c47096b01f104e520546a Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Thu, 2 Feb 2023 05:43:37 +
+Subject: [PATCH] aclocal.m4: fix -Wimplicit-function-declaration in dup2 check
+
+dup2 requires a  include. Fixes the following when diffing config.log
+ when testing with a stricter compiler:
+```
+-warning: call to undeclared function 'dup2'; ISO C99 and later do not support 
implicit function declarations [-Wimplicit-function-declaration]
++error: call to undeclared function 'dup2'; ISO C99 and later do not support 
implicit function declarations [-Wimplicit-function-declaration]
+```
+--- aclocal.m4
 aclocal.m4
+@@ -238,6 +238,9 @@ AC_CACHE_VAL(bash_cv_dup2_broken,
+ #include 
+ #include 
+ #include 
++#ifdef HAVE_UNISTD_H
++#include 
++#endif
+ int
+ main()
+ {
+--- configure
 configure
+@@ -18121,6 +18121,9 @@ else $as_nop
+ #include 
+ #include 
+ #include 
++#ifdef HAVE_UNISTD_H
++#include 
++#endif
+ int
+ main()
+ {



[gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/, app-shells/bash/

2022-10-08 Thread Sam James
commit: 47950445cddff736a1e6c0c1346a20ab6b326cc1
Author: Sam James  gentoo  org>
AuthorDate: Sat Oct  8 13:24:32 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Oct  8 13:25:11 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47950445

app-shells/bash: backport fixes for extglob in compat mode for 5.2

Bug: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00029.html
Closes: https://bugs.gentoo.org/873931
Thanks-to: Kerin Millar  plushkava.net>
Signed-off-by: Sam James  gentoo.org>

 app-shells/bash/bash-5.2_p2-r1.ebuild  | 345 +
 ...h-5.2_p2-fixes-for-extglob-in-compat-mode.patch | 320 +++
 2 files changed, 665 insertions(+)

diff --git a/app-shells/bash/bash-5.2_p2-r1.ebuild 
b/app-shells/bash/bash-5.2_p2-r1.ebuild
new file mode 100644
index ..e40e4b39547a
--- /dev/null
+++ b/app-shells/bash/bash-5.2_p2-r1.ebuild
@@ -0,0 +1,345 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/chetramey.asc
+inherit flag-o-matic toolchain-funcs prefix verify-sig
+
+# Uncomment if we have a patchset
+#GENTOO_PATCH_DEV="sam"
+#GENTOO_PATCH_VER="${PV}"
+
+# Official patchlevel
+# See ftp://ftp.cwru.edu/pub/bash/bash-5.1-patches/
+PLEVEL="${PV##*_p}"
+MY_PV="${PV/_p*}"
+MY_PV="${MY_PV/_/-}"
+MY_P="${PN}-${MY_PV}"
+MY_PATCHES=()
+
+is_release() {
+   case ${PV} in
+   |*_alpha*|*_beta*|*_rc*)
+   return 1
+   ;;
+   *)
+   return 0
+   ;;
+   esac
+}
+
+[[ ${PV} != *_p* ]] && PLEVEL=0
+
+# The version of readline this bash normally ships with.
+# Note: right now, we don't use the system copy of readline for bash for 
non-releases.
+READLINE_VER="8.2"
+
+DESCRIPTION="The standard GNU Bourne again shell"
+HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html 
https://git.savannah.gnu.org/cgit/bash.git";
+
+if [[ ${PV} ==  ]] ; then
+   EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git";
+   EGIT_BRANCH=devel
+   inherit git-r3
+elif is_release ; then
+   SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz"
+   SRC_URI+=" verify-sig? ( mirror://gnu/bash/${MY_P}.tar.gz.sig )"
+
+   if [[ ${PLEVEL} -gt 0 ]] ; then
+   # bash-5.1 -> bash51
+   my_p=${PN}$(ver_rs 1-2 '' $(ver_cut 1-2))
+
+   patch_url=
+   my_patch_index=
+
+   for ((my_patch_index=1; my_patch_index <= ${PLEVEL} ; 
my_patch_index++)) ; do
+   for url in mirror://gnu/${pn} 
ftp://ftp.cwru.edu/pub/bash ; do
+   patch_url=$(printf "${url}/${PN}-$(ver_cut 
1-2)-patches/${my_p}-%03d" ${my_patch_index})
+   SRC_URI+=" ${patch_url}"
+   SRC_URI+=" verify-sig? ( ${patch_url}.sig )"
+   done
+
+   MY_PATCHES+=( "${DISTDIR}"/$(printf ${my_p}-%03d 
${my_patch_index}) )
+   done
+
+   unset my_pn patch_url my_patch_index
+   fi
+else
+   SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz 
ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz";
+   SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig 
ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz.sig )"
+fi
+
+if [[ -n ${GENTOO_PATCH_VER} ]] ; then
+   SRC_URI+=" 
https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER}-patches.tar.xz";
+fi
+
+LICENSE="GPL-3+"
+SLOT="0"
+if is_release ; then
+   KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc 
~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos 
~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline"
+
+DEPEND="
+   >=sys-libs/ncurses-5.2-r2:=
+   nls? ( virtual/libintl )
+"
+if is_release ; then
+   DEPEND+=" readline? ( >=sys-libs/readline-${READLINE_VER}:= )"
+fi
+RDEPEND="
+   ${DEPEND}
+"
+# We only need yacc when the .y files get patched (bash42-005, bash51-011)
+BDEPEND="
+   virtual/yacc
+   pgo? ( dev-util/gperf )
+   verify-sig? ( sec-keys/openpgp-keys-chetramey )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+# EAPI 8 tries to append it but it doesn't exist here
+QA_CONFIGURE_OPTIONS="--disable-static"
+
+PATCHES=(
+   #"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}/
+
+   # Patches from Chet sent to bash-bug ml
+   "${FILESDIR}"/${PN}-5.0-syslog-history-extern.patch
+   "${FILESDIR}"/${PN}-5.2_p2-fixes-for-extglob-in-compat-mode.patch
+)
+
+pkg_setup() {
+   # bug #7332
+   if is-flag -malign-double ; then
+   eerror "Detected bad CFLAGS '-malign-double'.  Do not use this"
+   eerror "as it breaks LFS (struct st

[gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/, app-shells/bash/

2022-06-13 Thread Sam James
commit: 39a5d033d59067ce95cf212358e2ed7a03a2a94b
Author: Sam James  gentoo  org>
AuthorDate: Tue Jun  7 11:02:21 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Jun 13 19:38:10 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39a5d033

app-shells/bash: switch to patch tarballs

Was taking up 129K in files/ before.

Signed-off-by: Sam James  gentoo.org>

 app-shells/bash/Manifest   |  11 +
 app-shells/bash/bash-2.05b_p13.ebuild  |  30 ++-
 app-shells/bash/bash-3.0_p22.ebuild|  34 ++-
 app-shells/bash/bash-3.1_p23.ebuild|  30 ++-
 app-shells/bash/bash-3.2_p57.ebuild|  34 ++-
 app-shells/bash/bash-4.0_p44.ebuild|  28 +-
 app-shells/bash/bash-4.1_p17.ebuild|  18 +-
 app-shells/bash/bash-4.2_p53.ebuild|  22 +-
 app-shells/bash/bash-4.3_p48-r2.ebuild |  20 +-
 app-shells/bash/bash-4.4_p23-r2.ebuild |  16 +-
 app-shells/bash/bash-5.0_p18.ebuild|  16 +-
 app-shells/bash/bash-5.1_p16.ebuild|  24 +-
 app-shells/bash/bash-5.2_beta.ebuild   |  19 +-
 app-shells/bash/bash-.ebuild   |  19 +-
 app-shells/bash/files/autoconf-mktime-2.53.patch   | 199 ---
 app-shells/bash/files/autoconf-mktime-2.59.patch   | 197 ---
 app-shells/bash/files/bash-2.05b-destdir.patch |  28 --
 .../bash/files/bash-2.05b-empty-herestring.patch   |  25 --
 .../bash/files/bash-2.05b-fix-job-warning.patch|  14 -
 app-shells/bash/files/bash-2.05b-jobs.patch|  28 --
 .../bash/files/bash-2.05b-parallel-build.patch |  15 --
 app-shells/bash/files/bash-2.05b-protos.patch  |  25 --
 app-shells/bash/files/bash-2.05b-rbash.patch   |  27 --
 app-shells/bash/files/bash-3.0-afs.patch   |  20 --
 app-shells/bash/files/bash-3.0-crash.patch |  46 
 app-shells/bash/files/bash-3.0-darwin-conn.patch   |  20 --
 .../bash/files/bash-3.0-histtimeformat.patch   |  56 
 app-shells/bash/files/bash-3.0-jobs.patch  |  56 
 app-shells/bash/files/bash-3.0-locale.patch| 112 
 app-shells/bash/files/bash-3.0-manpage.patch   |  15 --
 app-shells/bash/files/bash-3.0-multibyteifs.patch  | 281 -
 app-shells/bash/files/bash-3.0-pgrp-pipe-fix.patch |  20 --
 app-shells/bash/files/bash-3.0-protos.patch|  68 -
 app-shells/bash/files/bash-3.0-pwd.patch   |  16 --
 app-shells/bash/files/bash-3.0-rbash.patch |  18 --
 .../bash/files/bash-3.0-read-builtin-pipe.patch|  20 --
 app-shells/bash/files/bash-3.0-read-memleak.patch  |  15 --
 app-shells/bash/files/bash-3.0-strnlen.patch   | 175 -
 app-shells/bash/files/bash-3.0-subshell.patch  |  39 ---
 .../bash/files/bash-3.0-trap-fg-signals.patch  |  23 --
 app-shells/bash/files/bash-3.0-ulimit.patch| 186 --
 .../bash/files/bash-3.0-volatile-command.patch |  16 --
 .../files/bash-3.1-dev-fd-buffer-overflow.patch|  16 --
 .../bash/files/bash-3.1-dev-fd-test-as-user.patch  |  14 -
 .../bash/files/bash-3.1-fix-dash-login-shell.patch |  52 
 app-shells/bash/files/bash-3.1-protos.patch|  67 -
 app-shells/bash/files/bash-3.1-ulimit.patch| 122 -
 .../bash/files/bash-3.2-dev-fd-test-as-user.patch  |  26 --
 .../bash/files/bash-3.2-ldflags-for-build.patch|  37 ---
 app-shells/bash/files/bash-3.2-loadables.patch | 239 --
 app-shells/bash/files/bash-3.2-process-subst.patch |  12 -
 app-shells/bash/files/bash-3.2-protos.patch|  57 -
 .../bash/files/bash-3.2-session-leader.patch   |  65 -
 app-shells/bash/files/bash-3.2-ulimit.patch|  13 -
 app-shells/bash/files/bash-4.0-configure.patch |  25 --
 .../bash/files/bash-4.0-ldflags-for-build.patch|  15 --
 .../bash/files/bash-4.0-negative-return.patch  |  33 ---
 .../bash/files/bash-4.0-parallel-build.patch   |  65 -
 app-shells/bash/files/bash-4.1-fbsd-eaccess.patch  |  29 ---
 .../bash/files/bash-4.1-parallel-build.patch   |  23 --
 .../files/bash-4.2-dev-fd-buffer-overflow.patch|  46 
 .../bash/files/bash-4.2-execute-job-control.patch  |  24 --
 app-shells/bash/files/bash-4.2-no-readline.patch   |  19 --
 .../bash/files/bash-4.2-parallel-build.patch   | 106 
 app-shells/bash/files/bash-4.2-read-retry.patch|  41 ---
 .../bash/files/bash-4.2-speed-up-read-N.patch  | 112 
 app-shells/bash/files/bash-4.3-arrayfunc.patch |  15 --
 3-mapfile-improper-array-name-validation.patch |  13 -
 app-shells/bash/files/bash-4.3-protos.patch|  10 -
 app-shells/bash/files/bash-4.4-jobs_overflow.patch |  14 -
 .../bash/files/bash-4.4-popd-offset-overflow.patch |  30 ---
 .../bash/files/bash-4.4-set-SHOBJ_STATUS.patch |  14 -
 .../bash/files/bash-4.x-deferred-heredocs.patch|  47 
 ..

[gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/, app-shells/bash/

2021-01-06 Thread Lars Wendler
commit: ba53be405112d10b85e88cc2637156804b88bd91
Author: Hank Leininger  korelogic  com>
AuthorDate: Wed Dec 11 22:06:45 2019 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Thu Jan  7 00:48:45 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba53be40

app-shells/bash: fix CVE-2019-18276 (priv-dropping bug)

Cherry-picked the relevant parts of
https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=951bdaad7a18cc0dc1036bba86b18b90874d39ff
and modified the patches to apply.

Note that the existing bash-5.0*patch files are applied with -p0, which
is not the norm for eapply, etc.  I simply followed what was required
to work with the rest of the existing patches.

Signed-off-by: Hank Leininger  korelogic.com>
Bug: https://bugs.gentoo.org/702488
Package-Manager: Portage-2.3.81, Repoman-2.3.18
Closes: https://github.com/gentoo/gentoo/pull/13941
Signed-off-by: Lars Wendler  gentoo.org>

 app-shells/bash/bash-5.0_p11-r1.ebuild | 266 +
 .../files/bash-5.0_p11-disable_priv_mode.patch |  85 +++
 2 files changed, 351 insertions(+)

diff --git a/app-shells/bash/bash-5.0_p11-r1.ebuild 
b/app-shells/bash/bash-5.0_p11-r1.ebuild
new file mode 100644
index 000..a6cf9c086ce
--- /dev/null
+++ b/app-shells/bash/bash-5.0_p11-r1.ebuild
@@ -0,0 +1,266 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs multilib prefix
+
+# Official patchlevel
+# See ftp://ftp.cwru.edu/pub/bash/bash-5.0-patches/
+PLEVEL=${PV##*_p}
+MY_PV=${PV/_p*}
+MY_PV=${MY_PV/_/-}
+MY_P=${PN}-${MY_PV}
+is_release() {
+   case ${PV} in
+   *_alpha*|*_beta*|*_rc*) return 1 ;;
+   *) return 0 ;;
+   esac
+}
+[[ ${PV} != *_p* ]] && PLEVEL=0
+patches() {
+   local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
+   [[ ${plevel} -eq 0 ]] && return 1
+   eval set -- {1..${plevel}}
+   set -- $(printf "${pn}${pv/\.}-%03d " "$@")
+   if [[ ${opt} == -s ]] ; then
+   echo "${@/#/${DISTDIR}/}"
+   else
+   local u
+   for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
+   printf "${u}/${pn}-${pv}-patches/%s " "$@"
+   done
+   fi
+}
+
+# The version of readline this bash normally ships with.
+READLINE_VER="8.0"
+
+DESCRIPTION="The standard GNU Bourne again shell"
+HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html";
+if is_release ; then
+   SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
+else
+   SRC_URI="ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz";
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv 
~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos 
~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris 
~x86-solaris"
+IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline"
+
+DEPEND="
+   >=sys-libs/ncurses-5.2-r2:0=
+   nls? ( virtual/libintl )
+   readline? ( >=sys-libs/readline-${READLINE_VER}:0= )
+"
+RDEPEND="
+   ${DEPEND}
+   !>confdefs.h <<_ACEOF
++#define HAVE_DECL_ $ac_have_decl
++_ACEOF
++(setresuid, setresgid)
+ ac_fn_c_check_decl "$LINENO" "strcpy" "ac_cv_have_decl_strcpy" 
"$ac_includes_default"
+ if test "x$ac_cv_have_decl_strcpy" = xyes; then :
+   ac_have_decl=1
+diff -urP ../bash-5.0.orig/configure.ac configure.ac
+--- ../bash-5.0.orig/configure.ac  2019-01-02 07:39:11.0 -0700
 configure.ac   2019-12-10 11:34:42.168926317 -0700
+@@ -810,6 +810,7 @@
+ AC_CHECK_DECLS([printf])
+ AC_CHECK_DECLS([sbrk])
+ AC_CHECK_DECLS([setregid])
++AC_CHECK_DECLS[(setresuid, setresgid])
+ AC_CHECK_DECLS([strcpy])
+ AC_CHECK_DECLS([strsignal])
+ 
+diff -urP ../bash-5.0.orig/shell.c shell.c
+--- ../bash-5.0.orig/shell.c   2018-12-06 09:28:21.0 -0700
 shell.c2019-12-10 11:34:42.170926317 -0700
+@@ -1293,7 +1293,11 @@
+ {
+   int e;
+ 
++#if HAVE_DECL_SETRESUID
++  if (setresuid (current_user.uid, current_user.uid, current_user.uid) < 0)
++#else
+   if (setuid (current_user.uid) < 0)
++#endif
+ {
+   e = errno;
+   sys_error (_("cannot set uid to %d: effective uid %d"), 
current_user.uid, current_user.euid);
+@@ -1302,7 +1306,11 @@
+   exit (e);
+ #endif
+ }
++#if HAVE_DECL_SETRESGID
++  if (setresgid (current_user.gid, current_user.gid, current_user.gid) < 0)
++#else
+   if (setgid (current_user.gid) < 0)
++#endif
+ sys_error (_("cannot set gid to %d: effective gid %d"), current_user.gid, 
current_user.egid);
+ 
+   current_user.euid = current_user.uid;



[gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/, app-shells/bash/

2020-12-07 Thread Lars Wendler
commit: 4c2ebbf4b8bc660beb98cc2d845c73375d6e4f50
Author: Lars Wendler  gentoo  org>
AuthorDate: Mon Dec  7 12:49:21 2020 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Mon Dec  7 13:18:41 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c2ebbf4

app-shells/bash: Fixed parallel make issue

Package-Manager: Portage-3.0.11, Repoman-3.0.2
Signed-off-by: Lars Wendler  gentoo.org>

 app-shells/bash/bash-5.1.ebuild|  1 +
 app-shells/bash/files/bash-5.1-parallel_make.patch | 15 +++
 2 files changed, 16 insertions(+)

diff --git a/app-shells/bash/bash-5.1.ebuild b/app-shells/bash/bash-5.1.ebuild
index b99647b1aed..5d6585b3abe 100644
--- a/app-shells/bash/bash-5.1.ebuild
+++ b/app-shells/bash/bash-5.1.ebuild
@@ -103,6 +103,7 @@ src_prepare() {
touch -r . doc/* || die
 
eapply -p0 "${PATCHES[@]}"
+   eapply "${FILESDIR}/${PN}-5.1-parallel_make.patch"
eapply_user
 }
 

diff --git a/app-shells/bash/files/bash-5.1-parallel_make.patch 
b/app-shells/bash/files/bash-5.1-parallel_make.patch
new file mode 100644
index 000..b341a8a06e2
--- /dev/null
+++ b/app-shells/bash/files/bash-5.1-parallel_make.patch
@@ -0,0 +1,15 @@
+bashline.c:65:10: fatal error: builtins/builtext.h: No such file or directory
+   65 | #include "builtins/builtext.h"  /* for read_builtin */
+  |  ^
+
+--- bash-5.1/Makefile.in
 bash-5.1/Makefile.in
+@@ -584,6 +584,8 @@
+   ls -l $(Program)
+   -$(SIZE) $(Program)
+ 
++$(CSOURCES): $(DEFDIR)/builtext.h
++
+ .build:   $(SOURCES) config.h Makefile version.h $(VERSPROG)
+   @echo
+   @echo "   ***"



[gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/, app-shells/bash/

2019-08-15 Thread Lars Wendler
commit: 62510d83798fcfa637ea4ca80fc9627005920e1f
Author: Lars Wendler  gentoo  org>
AuthorDate: Thu Aug 15 10:50:00 2019 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Thu Aug 15 10:50:00 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62510d83

app-shells/bash: Removed old.

Package-Manager: Portage-2.3.71, Repoman-2.3.17
Signed-off-by: Lars Wendler  gentoo.org>

 app-shells/bash/bash-5.0_p3-r1.ebuild  | 267 -
 .../files/bash-5.0-optimize-connection-fork.patch  |  79 --
 2 files changed, 346 deletions(-)

diff --git a/app-shells/bash/bash-5.0_p3-r1.ebuild 
b/app-shells/bash/bash-5.0_p3-r1.ebuild
deleted file mode 100644
index a13f1c8965c..000
--- a/app-shells/bash/bash-5.0_p3-r1.ebuild
+++ /dev/null
@@ -1,267 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit flag-o-matic toolchain-funcs multilib prefix
-
-# Official patchlevel
-# See ftp://ftp.cwru.edu/pub/bash/bash-5.0-patches/
-PLEVEL=${PV##*_p}
-MY_PV=${PV/_p*}
-MY_PV=${MY_PV/_/-}
-MY_P=${PN}-${MY_PV}
-is_release() {
-   case ${PV} in
-   *_alpha*|*_beta*|*_rc*) return 1 ;;
-   *) return 0 ;;
-   esac
-}
-[[ ${PV} != *_p* ]] && PLEVEL=0
-patches() {
-   local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
-   [[ ${plevel} -eq 0 ]] && return 1
-   eval set -- {1..${plevel}}
-   set -- $(printf "${pn}${pv/\.}-%03d " "$@")
-   if [[ ${opt} == -s ]] ; then
-   echo "${@/#/${DISTDIR}/}"
-   else
-   local u
-   for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
-   printf "${u}/${pn}-${pv}-patches/%s " "$@"
-   done
-   fi
-}
-
-# The version of readline this bash normally ships with.
-READLINE_VER="8.0"
-
-DESCRIPTION="The standard GNU Bourne again shell"
-HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html";
-if is_release ; then
-   SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
-else
-   SRC_URI="ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz";
-fi
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv 
~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux 
~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris 
~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline"
-
-DEPEND="
-   >=sys-libs/ncurses-5.2-r2:0=
-   readline? ( >=sys-libs/readline-${READLINE_VER}:0= )
-   nls? ( virtual/libintl )
-"
-RDEPEND="
-   ${DEPEND}
-   !value.Connection->connector == AND_AND || 
command->value.Connection->connector == OR_OR || 
command->value.Connection->connector == ';') &&
-+command->value.Connection->second->type == cm_simple);
-+ }
-+ 
-  void
-  optimize_fork (command)
-***
-*** 106,110 
-  {
-if (command->type == cm_connection &&
-!   (command->value.Connection->connector == AND_AND || 
command->value.Connection->connector == OR_OR) &&
-should_suppress_fork (command->value.Connection->second))
-  {
 115,120 
-  {
-if (command->type == cm_connection &&
-!   (command->value.Connection->connector == AND_AND || 
command->value.Connection->connector == OR_OR || 
command->value.Connection->connector == ';') &&
-!   (command->value.Connection->second->flags & CMD_TRY_OPTIMIZING) &&
-should_suppress_fork (command->value.Connection->second))
-  {
-***
-*** 413,418 
- command->value.Simple->flags |= CMD_NO_FORK;
-   }
-!else if (command->type == cm_connection)
-!  optimize_fork (command);
-  #endif /* ONESHOT */
-  
 423,438 
- command->value.Simple->flags |= CMD_NO_FORK;
-   }
-! 
-!/* Can't optimize forks out here execept for simple commands.
-!   This knows that the parser sets up commands as left-side heavy
-!   (&& and || are left-associative) and after the single parse,
-!   if we are at the end of the command string, the last in a
-!   series of connection commands is
-!   command->value.Connection->second. */
-!else if (command->type == cm_connection && 
can_optimize_connection (command))
-!  {
-!command->value.Connection->second->flags |= 
CMD_TRY_OPTIMIZING;
-!command->value.Connection->second->value.Simple->flags |= 
CMD_TRY_OPTIMIZING;
-!  }
-  #endif /* ONESHOT */
-  
-*** ../bash-5.0-patched/execute_cmd.c  2018-12-05 09:05:14.0 -0500
 execute_cmd.c  2019-01-25 15:59:00.0 -0500
-***
-*** 2768,2771 
 2768,2773 
-  (exec_result != EXECUTION_SUCCESS)))
-   {
-+optimize_fork (comma

[gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/, app-shells/bash/

2019-04-21 Thread Lars Wendler
commit: 31ea80d39218e125993ab64694fb0261871843ae
Author: Lars Wendler  gentoo  org>
AuthorDate: Sun Apr 21 09:10:31 2019 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Sun Apr 21 09:16:26 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31ea80d3

app-shells/bash: Removed old.

Package-Manager: Portage-2.3.64, Repoman-2.3.12
Signed-off-by: Lars Wendler  gentoo.org>

 app-shells/bash/bash-5.0_p2-r2.ebuild  | 267 -
 app-shells/bash/bash-5.0_p3.ebuild | 266 
 .../bash/files/bash-5.0-globpat-backslashes.patch  | 206 
 3 files changed, 739 deletions(-)

diff --git a/app-shells/bash/bash-5.0_p2-r2.ebuild 
b/app-shells/bash/bash-5.0_p2-r2.ebuild
deleted file mode 100644
index 7383e634420..000
--- a/app-shells/bash/bash-5.0_p2-r2.ebuild
+++ /dev/null
@@ -1,267 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit flag-o-matic toolchain-funcs multilib prefix
-
-# Official patchlevel
-# See ftp://ftp.cwru.edu/pub/bash/bash-5.0-patches/
-PLEVEL=${PV##*_p}
-MY_PV=${PV/_p*}
-MY_PV=${MY_PV/_/-}
-MY_P=${PN}-${MY_PV}
-is_release() {
-   case ${PV} in
-   *_alpha*|*_beta*|*_rc*) return 1 ;;
-   *) return 0 ;;
-   esac
-}
-[[ ${PV} != *_p* ]] && PLEVEL=0
-patches() {
-   local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
-   [[ ${plevel} -eq 0 ]] && return 1
-   eval set -- {1..${plevel}}
-   set -- $(printf "${pn}${pv/\.}-%03d " "$@")
-   if [[ ${opt} == -s ]] ; then
-   echo "${@/#/${DISTDIR}/}"
-   else
-   local u
-   for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
-   printf "${u}/${pn}-${pv}-patches/%s " "$@"
-   done
-   fi
-}
-
-# The version of readline this bash normally ships with.
-READLINE_VER="8.0"
-
-DESCRIPTION="The standard GNU Bourne again shell"
-HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html";
-if is_release ; then
-   SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
-else
-   SRC_URI="ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz";
-fi
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux 
~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris 
~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline"
-
-DEPEND="
-   >=sys-libs/ncurses-5.2-r2:0=
-   readline? ( >=sys-libs/readline-${READLINE_VER}:0= )
-   nls? ( virtual/libintl )
-"
-RDEPEND="
-   ${DEPEND}
-   !ftp://ftp.cwru.edu/pub/bash/bash-5.0-patches/
-PLEVEL=${PV##*_p}
-MY_PV=${PV/_p*}
-MY_PV=${MY_PV/_/-}
-MY_P=${PN}-${MY_PV}
-is_release() {
-   case ${PV} in
-   *_alpha*|*_beta*|*_rc*) return 1 ;;
-   *) return 0 ;;
-   esac
-}
-[[ ${PV} != *_p* ]] && PLEVEL=0
-patches() {
-   local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
-   [[ ${plevel} -eq 0 ]] && return 1
-   eval set -- {1..${plevel}}
-   set -- $(printf "${pn}${pv/\.}-%03d " "$@")
-   if [[ ${opt} == -s ]] ; then
-   echo "${@/#/${DISTDIR}/}"
-   else
-   local u
-   for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
-   printf "${u}/${pn}-${pv}-patches/%s " "$@"
-   done
-   fi
-}
-
-# The version of readline this bash normally ships with.
-READLINE_VER="8.0"
-
-DESCRIPTION="The standard GNU Bourne again shell"
-HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html";
-if is_release ; then
-   SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
-else
-   SRC_URI="ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz";
-fi
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux 
~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris 
~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline"
-
-DEPEND="
-   >=sys-libs/ncurses-5.2-r2:0=
-   readline? ( >=sys-libs/readline-${READLINE_VER}:0= )
-   nls? ( virtual/libintl )
-"
-RDEPEND="
-   ${DEPEND}
-   ! 0 && glob_pattern_p (directory_name))
-  {
-char **directories, *d, *p;
 1127,1136 
-  }
-  
-+   hasglob = 0;
-/* If directory_name contains globbing characters, then we
-!  have to expand the previous levels.  Just recurse.
-!  If glob_pattern_p returns != [0,1] we have a pattern that has backslash
-!  quotes but no unquoted glob pattern characters. We dequote it below. */
-!   if (directory_len > 0 && (hasglob = glob_pattern_p (directory_name)) == 

[gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/, app-shells/bash/

2019-03-08 Thread Lars Wendler
commit: 899e32aaae797bc4febb51b70bd2d370d6332585
Author: Lars Wendler  gentoo  org>
AuthorDate: Fri Mar  8 20:55:42 2019 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Fri Mar  8 20:56:07 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=899e32aa

app-shells/bash: Bump to version 5.0_p2-r2. Removed old.

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Lars Wendler  gentoo.org>

 ...bash-5.0_p2-r1.ebuild => bash-5.0_p2-r2.ebuild} |  2 +-
 .../bash/files/bash-5.0-globpat-backslashes.patch  | 38 --
 2 files changed, 36 insertions(+), 4 deletions(-)

diff --git a/app-shells/bash/bash-5.0_p2-r1.ebuild 
b/app-shells/bash/bash-5.0_p2-r2.ebuild
similarity index 100%
rename from app-shells/bash/bash-5.0_p2-r1.ebuild
rename to app-shells/bash/bash-5.0_p2-r2.ebuild
index 9410c85e0ce..7383e634420 100644
--- a/app-shells/bash/bash-5.0_p2-r1.ebuild
+++ b/app-shells/bash/bash-5.0_p2-r2.ebuild
@@ -68,8 +68,8 @@ PATCHES=(
"${FILESDIR}"/${PN}-5.0-history-zero-length.patch
"${FILESDIR}"/${PN}-5.0-history-append.patch
"${FILESDIR}"/${PN}-5.0-optimize-connection-fork.patch
-   "${FILESDIR}"/${PN}-5.0-globpat-backslashes.patch
"${FILESDIR}"/${PN}-5.0-syslog-history-extern.patch
+   "${FILESDIR}"/${PN}-5.0-globpat-backslashes.patch
 )
 
 pkg_setup() {

diff --git a/app-shells/bash/files/bash-5.0-globpat-backslashes.patch 
b/app-shells/bash/files/bash-5.0-globpat-backslashes.patch
index b3f6d680ea4..21acaf7e7ff 100644
--- a/app-shells/bash/files/bash-5.0-globpat-backslashes.patch
+++ b/app-shells/bash/files/bash-5.0-globpat-backslashes.patch
@@ -53,8 +53,18 @@
 !   return bsquote ? 2 : 0;
   }
   
+*** ../bash-5.0-patched/lib/glob/glob.h2013-10-28 14:46:12.0 
-0400
+--- lib/glob/glob.h2019-03-07 11:06:47.0 -0500
+***
+*** 31,34 
+--- 31,35 
+  #define GX_ADDCURDIR 0x200   /* internal -- add passed directory name */
+  #define GX_GLOBSTAR  0x400   /* turn on special handling of ** */
++ #define GX_RECURSE   0x800   /* internal -- glob_filename called recursively 
*/
+  
+  extern int glob_pattern_p __P((const char *));
 *** ../bash-5.0-patched/lib/glob/glob.c2018-09-20 10:53:23.0 
-0400
 lib/glob/glob.c2019-01-31 19:14:13.0 -0500
+--- lib/glob/glob.c2019-03-07 14:23:43.0 -0500
 ***
 *** 1062,1066 
 unsigned int directory_len;
@@ -89,15 +99,37 @@
   {
 char **directories, *d, *p;
 ***
+*** 1176,1180 
+   d[directory_len - 1] = '\0';
+  
+!   directories = glob_filename (d, dflags);
+  
+if (free_dirname)
+--- 1195,1199 
+   d[directory_len - 1] = '\0';
+  
+!   directories = glob_filename (d, dflags|GX_RECURSE);
+  
+if (free_dirname)
+***
 *** 1333,1336 
 1352,1360 
+--- 1352,1369 
  return (NULL);
}
-+   if (directory_len > 0 && hasglob == 2) /* need to dequote */
++   /* If we have a directory name with quoted characters, and we are
++   being called recursively to glob the directory portion of a pathname,
++   we need to dequote the directory name before returning it so the
++   caller can read the directory */
++   if (directory_len > 0 && hasglob == 2 && (flags & GX_RECURSE) != 0)
 +  {
 +dequote_pathname (directory_name);
 +directory_len = strlen (directory_name);
 +  }
++ 
++   /* We could check whether or not the dequoted directory_name is a
++   directory and return it here, returning the original directory_name
++   if not, but we don't do that yet. I'm not sure it matters. */
++ 
 /* Handle GX_MARKDIRS here. */
 result[0] = (char *) malloc (directory_len + 1);
 *** ../bash-5.0-patched/pathexp.c  2018-04-29 17:44:48.0 -0400



[gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/, app-shells/bash/

2019-01-14 Thread Thomas Deutschmann
commit: d1906c39529bc3af416fcc4e7b1edc4901981b71
Author: Thomas Deutschmann  gentoo  org>
AuthorDate: Tue Jan 15 01:02:46 2019 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Tue Jan 15 01:05:22 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1906c39

app-shells/bash: define SHOBJ_STATUS; fix static build

Link: http://lists.gnu.org/archive/html/bug-bash/2016-10/msg4.html
Bug: https://bugs.gentoo.org/675414
Package-Manager: Portage-2.3.55, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann  gentoo.org>

 app-shells/bash/bash-4.4_p23-r1.ebuild | 260 +
 .../bash/files/bash-4.4-set-SHOBJ_STATUS.patch |  14 ++
 2 files changed, 274 insertions(+)

diff --git a/app-shells/bash/bash-4.4_p23-r1.ebuild 
b/app-shells/bash/bash-4.4_p23-r1.ebuild
new file mode 100644
index 000..506c772dc1b
--- /dev/null
+++ b/app-shells/bash/bash-4.4_p23-r1.ebuild
@@ -0,0 +1,260 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs multilib prefix
+
+# Official patchlevel
+# See ftp://ftp.cwru.edu/pub/bash/bash-4.4-patches/
+PLEVEL=${PV##*_p}
+MY_PV=${PV/_p*}
+MY_PV=${MY_PV/_/-}
+MY_P=${PN}-${MY_PV}
+is_release() {
+   case ${PV} in
+   *_alpha*|*_beta*|*_rc*) return 1 ;;
+   *) return 0 ;;
+   esac
+}
+[[ ${PV} != *_p* ]] && PLEVEL=0
+patches() {
+   local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
+   [[ ${plevel} -eq 0 ]] && return 1
+   eval set -- {1..${plevel}}
+   set -- $(printf "${pn}${pv/\.}-%03d " "$@")
+   if [[ ${opt} == -s ]] ; then
+   echo "${@/#/${DISTDIR}/}"
+   else
+   local u
+   for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
+   printf "${u}/${pn}-${pv}-patches/%s " "$@"
+   done
+   fi
+}
+
+# The version of readline this bash normally ships with.
+READLINE_VER="7.0"
+
+DESCRIPTION="The standard GNU Bourne again shell"
+HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html";
+if is_release ; then
+   SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
+else
+   SRC_URI="ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz";
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux 
~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris 
~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline"
+
+DEPEND="
+   >=sys-libs/ncurses-5.2-r2:0=
+   readline? ( >=sys-libs/readline-${READLINE_VER}:0= )
+   nls? ( virtual/libintl )
+"
+RDEPEND="
+   ${DEPEND}
+   !http://lists.gnu.org/archive/html/bug-bash/2016-10/msg4.html
+
+--- a/configure
 b/configure
+@@ -16124,6 +16124,9 @@ $as_echo_n "checking shared object configuration for 
loadable builtins... " >&6;
+ 
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHOBJ_STATUS" >&5
+ $as_echo "$SHOBJ_STATUS" >&6; }
++else
++  SHOBJ_STATUS=unsupported
++
+ fi
+ 
+ # try to create a directory tree if the source is elsewhere



[gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/, app-shells/bash/

2019-01-09 Thread Lars Wendler
commit: 8dd00bb17128098d6ac2f4c43ccd797519340e9f
Author: Lars Wendler  gentoo  org>
AuthorDate: Wed Jan  9 17:50:01 2019 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Wed Jan  9 17:50:24 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8dd00bb1

app-shells/bash: Fixed weird insert of backslashes

Package-Manager: Portage-2.3.54, Repoman-2.3.12
Signed-off-by: Lars Wendler  gentoo.org>

 app-shells/bash/bash-5.0.ebuild|   2 +
 .../files/bash-5.0-glob-pattern-backslash.patch| 133 +
 2 files changed, 135 insertions(+)

diff --git a/app-shells/bash/bash-5.0.ebuild b/app-shells/bash/bash-5.0.ebuild
index dcfccc608f9..9dd564847ad 100644
--- a/app-shells/bash/bash-5.0.ebuild
+++ b/app-shells/bash/bash-5.0.ebuild
@@ -97,6 +97,8 @@ src_prepare() {
sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die
touch -r . doc/*
 
+   eapply -p0 "${FILESDIR}"/${P}-glob-pattern-backslash.patch
+
eapply_user
 }
 

diff --git a/app-shells/bash/files/bash-5.0-glob-pattern-backslash.patch 
b/app-shells/bash/files/bash-5.0-glob-pattern-backslash.patch
new file mode 100644
index 000..40379b3d4cc
--- /dev/null
+++ b/app-shells/bash/files/bash-5.0-glob-pattern-backslash.patch
@@ -0,0 +1,133 @@
+*** ../bash-5.0/bashline.c 2018-11-27 13:20:16.0 -0500
+--- bashline.c 2019-01-09 09:44:26.0 -0500
+***
+*** 232,235 
+--- 232,236 
+  static int bash_possible_command_completions __P((int, int));
+  
++ static int completion_glob_pattern __P((const char *));
+  static char *glob_complete_word __P((const char *, int));
+  static int bash_glob_completion_internal __P((int));
+***
+*** 1742,1746 
+/* This could be a globbing pattern, so try to expand it using pathname
+   expansion. */
+!   if (!matches && glob_pattern_p (text))
+  {
+matches = rl_completion_matches (text, glob_complete_word);
+--- 1743,1747 
+/* This could be a globbing pattern, so try to expand it using pathname
+   expansion. */
+!   if (!matches && completion_glob_pattern (text))
+  {
+matches = rl_completion_matches (text, glob_complete_word);
+***
+*** 1851,1855 
+   }
+  
+!   globpat = glob_pattern_p (hint_text);
+  
+/* If this is an absolute program name, do not check it against
+--- 1852,1856 
+   }
+  
+!   globpat = completion_glob_pattern (hint_text);
+  
+/* If this is an absolute program name, do not check it against
+***
+*** 3714,3717 
+--- 3715,3773 
+  }
+  
++ static int
++ completion_glob_pattern (string)
++  const char *string;
++ {
++   register int c;
++   char *send;
++   int open;
++ 
++   DECLARE_MBSTATE;
++ 
++   open = 0;
++   send = string + strlen (string);
++ 
++   while (c = *string++)
++ {
++   switch (c)
++  {
++  case '?':
++  case '*':
++return (1);
++ 
++  case '[':
++open++;
++continue;
++ 
++  case ']':
++if (open)
++  return (1);
++continue;
++ 
++  case '+':
++  case '@':
++  case '!':
++if (*string == '(')   /*)*/
++  return (1);
++continue;
++ 
++  case '\\':
++if (*string == 0)
++  return (0);   
++  }
++ 
++   /* Advance one fewer byte than an entire multibyte character to
++   account for the auto-increment in the loop above. */
++ #ifdef HANDLE_MULTIBYTE
++   string--;
++   ADVANCE_CHAR_P (string, send - string);
++   string++;
++ #else
++   ADVANCE_CHAR_P (string, send - string);
++ #endif
++ }
++   return (0);
++ }
++ 
+  static char *globtext;
+  static char *globorig;
+***
+*** 3878,3882 
+  }  
+  
+!   if (t && glob_pattern_p (t) == 0)
+  rl_explicit_arg = 1; /* XXX - force glob_complete_word to append `*' 
*/
+FREE (t);
+--- 3934,3938 
+  }  
+  
+!   if (t && completion_glob_pattern (t) == 0)
+  rl_explicit_arg = 1; /* XXX - force glob_complete_word to append `*' 
*/
+FREE (t);
+*** ../bash-5.0/lib/glob/glob_loop.c   2018-12-31 13:35:15.0 -0500
+--- lib/glob/glob_loop.c   2019-01-09 09:44:36.0 -0500
+***
+*** 55,59 
+  
+case L('\\'):
+- #if 0
+   /* Don't let the pattern end in a backslash (GMATCH returns no match
+  if the pattern ends in a backslash anyway), but otherwise return 1,
+--- 55,58 
+***
+*** 61,69 
+  and it can be removed. */
+   return (*p != L('\0'));
+- #else
+-  /* The pattern may not end with a backslash. */
+-  if (*p++ == L('\0'))
+-return 0;
+- #endif
+}
+  
+--- 60,63 



[gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/, app-shells/bash/

2016-11-26 Thread Mike Frysinger
commit: 1bf1ceeb04a2f57e1e5e1636a8c288c4d0db6682
Author: Mike Frysinger  gentoo  org>
AuthorDate: Sun Nov 27 01:44:27 2016 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Sun Nov 27 01:44:27 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bf1ceeb

app-shells/bash: upstream fix for crash on invalid popd #600174

 app-shells/bash/bash-4.4-r1.ebuild | 248 -
 .../{bash-4.4_p5.ebuild => bash-4.4_p5-r1.ebuild}  |   1 +
 .../bash/files/bash-4.4-popd-offset-overflow.patch |  30 +++
 3 files changed, 31 insertions(+), 248 deletions(-)

diff --git a/app-shells/bash/bash-4.4-r1.ebuild 
b/app-shells/bash/bash-4.4-r1.ebuild
deleted file mode 100644
index 37e7af7..
--- a/app-shells/bash/bash-4.4-r1.ebuild
+++ /dev/null
@@ -1,248 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-inherit eutils flag-o-matic toolchain-funcs multilib prefix
-
-# Official patchlevel
-# See ftp://ftp.cwru.edu/pub/bash/bash-4.3-patches/
-PLEVEL=${PV##*_p}
-MY_PV=${PV/_p*}
-MY_PV=${MY_PV/_/-}
-MY_P=${PN}-${MY_PV}
-[[ ${PV} != *_p* ]] && PLEVEL=0
-patches() {
-   local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
-   [[ ${plevel} -eq 0 ]] && return 1
-   eval set -- {1..${plevel}}
-   set -- $(printf "${pn}${pv/\.}-%03d " "$@")
-   if [[ ${opt} == -s ]] ; then
-   echo "${@/#/${DISTDIR}/}"
-   else
-   local u
-   for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
-   printf "${u}/${pn}-${pv}-patches/%s " "$@"
-   done
-   fi
-}
-
-# The version of readline this bash normally ships with.
-READLINE_VER="7.0"
-
-DESCRIPTION="The standard GNU Bourne again shell"
-HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html";
-case ${PV} in
-*_alpha*|*_beta*|*_rc*) SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"; 
;;
-*) SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)" ;;
-esac
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
-IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline"
-
-DEPEND=">=sys-libs/ncurses-5.2-r2:0=
-   readline? ( >=sys-libs/readline-${READLINE_VER}:0= )
-   nls? ( virtual/libintl )"
-RDEPEND="${DEPEND}
-   !https://bugs.gentoo.org/600174
+https://lists.gnu.org/archive/html/bug-bash/2016-11/msg00099.html
+
+*** ../bash-4.4-patched/builtins/pushd.def 2016-01-25 13:31:49.0 
-0500
+--- builtins/pushd.def 2016-10-28 10:46:49.0 -0400
+***
+*** 366,370 
+  }
+  
+!   if (which > directory_list_offset || (directory_list_offset == 0 && which 
== 0))
+  {
+pushd_error (directory_list_offset, which_word ? which_word : "");
+--- 366,370 
+  }
+  
+!   if (which > directory_list_offset || (which < -directory_list_offset) || 
(directory_list_offset == 0 && which == 0))
+  {
+pushd_error (directory_list_offset, which_word ? which_word : "");
+***
+*** 388,391 
+--- 388,396 
+of the list into place. */
+i = (direction == '+') ? directory_list_offset - which : which;
++   if (i < 0 || i > directory_list_offset)
++  {
++pushd_error (directory_list_offset, which_word ? which_word : "");
++return (EXECUTION_FAILURE);
++  }
+free (pushd_directory_list[i]);
+directory_list_offset--;



[gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/, app-shells/bash/

2016-11-09 Thread Mike Frysinger
commit: 6a6d6915dfc68f4a67a7e8c03265d9e02ed39425
Author: Mike Frysinger  gentoo  org>
AuthorDate: Thu Nov 10 06:01:33 2016 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Thu Nov 10 06:01:33 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a6d6915

app-shells/bash: drop unused memory patch #597006

The patch applies against the readline source which we delete in the
bash ebuild, so it doesn't do anything useful here.

 app-shells/bash/bash-4.4-r1.ebuild |  3 ---
 .../bash/files/bash-4.4-history-alloclist.patch| 26 --
 2 files changed, 29 deletions(-)

diff --git a/app-shells/bash/bash-4.4-r1.ebuild 
b/app-shells/bash/bash-4.4-r1.ebuild
index caed46f..41a6506 100644
--- a/app-shells/bash/bash-4.4-r1.ebuild
+++ b/app-shells/bash/bash-4.4-r1.ebuild
@@ -74,9 +74,6 @@ src_prepare() {
# Include official patches
[[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
 
-   # bug 597006: large HISTFILESIZE value may result in upfront memory 
exhaustion
-   epatch "${FILESDIR}"/${PN}-4.4-history-alloclist.patch
-
# Clean out local libs so we know we use system ones w/releases.
if [[ ${PV} != *_rc* ]] ; then
rm -rf lib/{readline,termcap}/*

diff --git a/app-shells/bash/files/bash-4.4-history-alloclist.patch 
b/app-shells/bash/files/bash-4.4-history-alloclist.patch
deleted file mode 100644
index 8072bde..
--- a/app-shells/bash/files/bash-4.4-history-alloclist.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-*** ../bash-4.4/lib/readline/history.c 2015-12-28 13:50:31.0 -0500
 lib/readline/history.c 2016-09-30 14:28:40.0 -0400
-***
-*** 58,61 
 58,63 
-  #define DEFAULT_HISTORY_INITIAL_SIZE 502
-  
-+ #define MAX_HISTORY_INITIAL_SIZE 8192
-+ 
-  /* The number of slots to increase the_history by. */
-  #define DEFAULT_HISTORY_GROW_SIZE 50
-***
-*** 308,312 
-   {
- if (history_stifled && history_max_entries > 0)
-!  history_size = history_max_entries + 2;
- else
-   history_size = DEFAULT_HISTORY_INITIAL_SIZE;
 310,316 
-   {
- if (history_stifled && history_max_entries > 0)
-!  history_size = (history_max_entries > MAX_HISTORY_INITIAL_SIZE)
-!  ? MAX_HISTORY_INITIAL_SIZE
-!  : history_max_entries + 2;
- else
-   history_size = DEFAULT_HISTORY_INITIAL_SIZE;



[gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/, app-shells/bash/

2016-09-20 Thread Lars Wendler
commit: 7722e02ff41d7e30b1e2226d0cabd4458cd6567c
Author: Lars Wendler  gentoo  org>
AuthorDate: Tue Sep 20 14:59:44 2016 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Tue Sep 20 14:59:44 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7722e02f

app-shells/bash: Revbump to fix CVE-2016-0634 (bug #594496).

Package-Manager: portage-2.3.1
Signed-off-by: Lars Wendler  gentoo.org>

 app-shells/bash/bash-4.3_p46-r1.ebuild | 254 +
 .../bash/files/bash-4.3-prompt-string-comsub.patch | 118 ++
 2 files changed, 372 insertions(+)

diff --git a/app-shells/bash/bash-4.3_p46-r1.ebuild 
b/app-shells/bash/bash-4.3_p46-r1.ebuild
new file mode 100644
index ..85d4eda
--- /dev/null
+++ b/app-shells/bash/bash-4.3_p46-r1.ebuild
@@ -0,0 +1,254 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils flag-o-matic toolchain-funcs multilib
+
+# Official patchlevel
+# See ftp://ftp.cwru.edu/pub/bash/bash-4.3-patches/
+PLEVEL=${PV##*_p}
+MY_PV=${PV/_p*}
+MY_PV=${MY_PV/_/-}
+MY_P=${PN}-${MY_PV}
+[[ ${PV} != *_p* ]] && PLEVEL=0
+patches() {
+   local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
+   [[ ${plevel} -eq 0 ]] && return 1
+   eval set -- {1..${plevel}}
+   set -- $(printf "${pn}${pv/\.}-%03d " "$@")
+   if [[ ${opt} == -s ]] ; then
+   echo "${@/#/${DISTDIR}/}"
+   else
+   local u
+   for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
+   printf "${u}/${pn}-${pv}-patches/%s " "$@"
+   done
+   fi
+}
+
+# The version of readline this bash normally ships with.
+READLINE_VER="6.3"
+
+DESCRIPTION="The standard GNU Bourne again shell"
+HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html";
+SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
+[[ ${PV} == *_rc* ]] && SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz";
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline vanilla"
+
+DEPEND=">=sys-libs/ncurses-5.2-r2:0=
+   readline? ( >=sys-libs/readline-${READLINE_VER}:0= )
+   nls? ( virtual/libintl )"
+RDEPEND="${DEPEND}
+   !http://seclists.org/oss-sec/2016/q3/538
+https://bugs.gentoo.org/594496
+
+*** ../bash-4.3-patched/parse.y2015-08-13 15:11:54.0 -0400
+--- parse.y2016-03-07 15:44:14.0 -0500
+***
+*** 5259,5263 
+int result_size, result_index;
+int c, n, i;
+!   char *temp, octal_string[4];
+struct tm *tm;  
+time_t the_time;
+--- 5259,5263 
+int result_size, result_index;
+int c, n, i;
+!   char *temp, *t_host, octal_string[4];
+struct tm *tm;  
+time_t the_time;
+***
+*** 5407,5411 
+   case 's':
+ temp = base_pathname (shell_name);
+!temp = savestring (temp);
+ goto add_string;
+  
+--- 5407,5415 
+   case 's':
+ temp = base_pathname (shell_name);
+!/* Try to quote anything the user can set in the file system */
+!if (promptvars || posixly_correct)
+!  temp = sh_backslash_quote_for_double_quotes (temp);
+!else
+!  temp = savestring (temp);
+ goto add_string;
+  
+***
+*** 5497,5503 
+   case 'h':
+   case 'H':
+!temp = savestring (current_host_name);
+!if (c == 'h' && (t = (char *)strchr (temp, '.')))
+   *t = '\0';
+ goto add_string;
+  
+--- 5501,5515 
+   case 'h':
+   case 'H':
+!t_host = savestring (current_host_name);
+!if (c == 'h' && (t = (char *)strchr (t_host, '.')))
+   *t = '\0';
++if (promptvars || posixly_correct)
++  /* Make sure that expand_prompt_string is called with a
++ second argument of Q_DOUBLE_QUOTES if we use this
++ function here. */
++  temp = sh_backslash_quote_for_double_quotes (t_host);
++else
++  temp = savestring (t_host);
++free (t_host);
+ goto add_string;
+  
+*** ../bash-4.3-patched/y.tab.c2015-08-13 15:11:54.0 -0400
+--- y.tab.c2016-03-07 15:44:14.0 -0500
+***
+*** 7571,7575 
+int result_size, result_index;
+int c, n, i;
+!   char *temp, octal_string[4];
+struct tm *tm;  
+time_t the_time;
+--- 7571,7575 
+int result_size, result_index;
+int c, n, i;
+!   char *temp, *t_host, octal_string[4];
+struct tm *tm;  
+time_t the_time;
+***
+*** 7719,7723 
+   case 's':
+ temp = base_pathname (s

[gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/, app-shells/bash/

2016-01-25 Thread Mike Frysinger
commit: e3bf9d25cca2464b602a4aaafad784bbefbf322c
Author: Mike Frysinger  gentoo  org>
AuthorDate: Mon Jan 25 00:59:49 2016 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Tue Jan 26 07:12:10 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3bf9d25

app-shells/bash: merge bashrc-r# files back to bashrc

This makes the history easier to track.

 app-shells/bash/bash-4.3_p39_pre0.ebuild |   2 +-
 app-shells/bash/bash-4.3_p42-r1.ebuild   |   2 +-
 app-shells/bash/bash-4.4_beta.ebuild |   2 +-
 app-shells/bash/files/bashrc-r1  |  92 --
 app-shells/bash/files/bashrc-r2  | 108 ---
 5 files changed, 3 insertions(+), 203 deletions(-)

diff --git a/app-shells/bash/bash-4.3_p39_pre0.ebuild 
b/app-shells/bash/bash-4.3_p39_pre0.ebuild
index 2c852ee..4bc8ea9 100644
--- a/app-shells/bash/bash-4.3_p39_pre0.ebuild
+++ b/app-shells/bash/bash-4.3_p39_pre0.ebuild
@@ -118,7 +118,7 @@ src_install() {
 
insinto /etc/bash
doins "${FILESDIR}"/bash_logout
-   newins "${FILESDIR}"/bashrc-r2 bashrc
+   doins "${FILESDIR}"/bashrc
keepdir /etc/bash/bashrc.d
insinto /etc/skel
for f in bash{_logout,_profile,rc} ; do

diff --git a/app-shells/bash/bash-4.3_p42-r1.ebuild 
b/app-shells/bash/bash-4.3_p42-r1.ebuild
index 2ffc014..8e9fbc2 100644
--- a/app-shells/bash/bash-4.3_p42-r1.ebuild
+++ b/app-shells/bash/bash-4.3_p42-r1.ebuild
@@ -176,7 +176,7 @@ src_install() {
 
insinto /etc/bash
doins "${FILESDIR}"/bash_logout
-   newins "${FILESDIR}"/bashrc-r2 bashrc
+   doins "${FILESDIR}"/bashrc
keepdir /etc/bash/bashrc.d
insinto /etc/skel
for f in bash{_logout,_profile,rc} ; do

diff --git a/app-shells/bash/bash-4.4_beta.ebuild 
b/app-shells/bash/bash-4.4_beta.ebuild
index fb37c20..4028694 100644
--- a/app-shells/bash/bash-4.4_beta.ebuild
+++ b/app-shells/bash/bash-4.4_beta.ebuild
@@ -173,7 +173,7 @@ src_install() {
 
insinto /etc/bash
doins "${FILESDIR}"/bash_logout
-   newins "${FILESDIR}"/bashrc-r2 bashrc
+   doins "${FILESDIR}"/bashrc
keepdir /etc/bash/bashrc.d
insinto /etc/skel
for f in bash{_logout,_profile,rc} ; do

diff --git a/app-shells/bash/files/bashrc-r1 b/app-shells/bash/files/bashrc-r1
deleted file mode 100644
index 3000709..000
--- a/app-shells/bash/files/bashrc-r1
+++ /dev/null
@@ -1,92 +0,0 @@
-# /etc/bash/bashrc
-#
-# This file is sourced by all *interactive* bash shells on startup,
-# including some apparently interactive shells such as scp and rcp
-# that can't tolerate any output.  So make sure this doesn't display
-# anything or bad things will happen !
-
-
-# Test for an interactive shell.  There is no need to set anything
-# past this point for scp and rcp, and it's important to refrain from
-# outputting anything in those cases.
-if [[ $- != *i* ]] ; then
-   # Shell is non-interactive.  Be done now!
-   return
-fi
-
-# Bash won't get SIGWINCH if another process is in the foreground.
-# Enable checkwinsize so that bash will check the terminal size when
-# it regains control.  #65623
-# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)
-shopt -s checkwinsize
-
-# Enable history appending instead of overwriting.  #139609
-shopt -s histappend
-
-# Change the window title of X terminals 
-case ${TERM} in
-   xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*)
-   PROMPT_COMMAND='echo -ne 
"\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"'
-   ;;
-   screen*)
-   PROMPT_COMMAND='echo -ne 
"\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\033\\"'
-   ;;
-esac
-
-use_color=false
-#BSD#@# BSD doesn't typically come with dircolors so we need
-#BSD#@# to hardcode some terminals in here.
-#BSD#@case ${TERM} in
-#BSD#@ xterm*|rxvt*|Eterm|aterm|kterm|gnome*|screen|cons25) use_color=true;;
-#BSD#@esac
-
-# Set colorful PS1 only on colorful terminals.
-# dircolors --print-database uses its own built-in database
-# instead of using /etc/DIR_COLORS.  Try to use the external file
-# first to take advantage of user additions.  Use internal bash
-# globbing instead of external grep binary.
-safe_term=${TERM//[^[:alnum:]]/?}   # sanitize TERM
-match_lhs=""
-[[ -f ~/.dir_colors   ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
-[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(/dev/null \
-   && match_lhs=$(dircolors --print-database)
-[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true
-
-if ${use_color} ; then
-   # Enable colors for ls, etc.  Prefer ~/.dir_colors #64489
-   if type -P dircolors >/dev/null ; then
-   if [[ -f ~/.dir_colors ]] ; then
-   eval $(dircolors -b ~/.dir_colors)
-   elif [[ -f /etc/DIR_COLORS ]] ; then
-   eval $(dircolors -b /etc/DIR_COLORS)
-   fi
-   fi
-
-   if [[ ${EU

[gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/, app-shells/bash/

2015-10-20 Thread Mike Frysinger
commit: d3b9fc42cadf308da7fab21c338cca55aa778ae7
Author: Mike Frysinger  gentoo  org>
AuthorDate: Tue Oct 20 20:34:01 2015 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Tue Oct 20 20:34:46 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3b9fc42

app-shells/bash: backport /dev/fd fix to older versions #431850

 app-shells/bash/bash-2.05b_p13.ebuild  |  1 +
 app-shells/bash/bash-3.0_p22.ebuild|  1 +
 app-shells/bash/bash-3.1_p23.ebuild|  1 +
 app-shells/bash/bash-3.2_p57.ebuild|  1 +
 app-shells/bash/bash-4.0_p44.ebuild|  1 +
 app-shells/bash/bash-4.1_p17.ebuild|  1 +
 .../files/bash-3.1-dev-fd-buffer-overflow.patch| 16 
 .../files/bash-4.2-dev-fd-buffer-overflow.patch| 46 ++
 8 files changed, 68 insertions(+)

diff --git a/app-shells/bash/bash-2.05b_p13.ebuild 
b/app-shells/bash/bash-2.05b_p13.ebuild
index 7e69f0f..56d5bcd 100644
--- a/app-shells/bash/bash-2.05b_p13.ebuild
+++ b/app-shells/bash/bash-2.05b_p13.ebuild
@@ -73,6 +73,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-2.05b-parallel-build.patch #41002
epatch "${FILESDIR}"/${PN}-2.05b-jobs.patch
epatch "${FILESDIR}"/${PN}-2.05b-fix-job-warning.patch
+   epatch "${FILESDIR}"/${PN}-3.1-dev-fd-buffer-overflow.patch #431850
 
epatch_user
 }

diff --git a/app-shells/bash/bash-3.0_p22.ebuild 
b/app-shells/bash/bash-3.0_p22.ebuild
index b8d8fe7..33a50c8 100644
--- a/app-shells/bash/bash-3.0_p22.ebuild
+++ b/app-shells/bash/bash-3.0_p22.ebuild
@@ -81,6 +81,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-3.0-trap-fg-signals.patch
epatch "${FILESDIR}"/${PN}-3.0-pgrp-pipe-fix.patch #92349
epatch "${FILESDIR}"/${PN}-3.0-strnlen.patch
+   epatch "${FILESDIR}"/${PN}-3.1-dev-fd-buffer-overflow.patch #431850
 
epatch_user
 }

diff --git a/app-shells/bash/bash-3.1_p23.ebuild 
b/app-shells/bash/bash-3.1_p23.ebuild
index 95ef23b..d984d0d 100644
--- a/app-shells/bash/bash-3.1_p23.ebuild
+++ b/app-shells/bash/bash-3.1_p23.ebuild
@@ -73,6 +73,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-3.0-trap-fg-signals.patch
epatch "${FILESDIR}"/${PN}-3.1-fix-dash-login-shell.patch #118257
epatch "${FILESDIR}"/${PN}-3.1-dev-fd-test-as-user.patch #131875
+   epatch "${FILESDIR}"/${PN}-3.1-dev-fd-buffer-overflow.patch #431850
 
epatch_user
 }

diff --git a/app-shells/bash/bash-3.2_p57.ebuild 
b/app-shells/bash/bash-3.2_p57.ebuild
index 1d373c7..511e7b2 100644
--- a/app-shells/bash/bash-3.2_p57.ebuild
+++ b/app-shells/bash/bash-3.2_p57.ebuild
@@ -75,6 +75,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-3.2-ulimit.patch
epatch "${FILESDIR}"/${PN}-3.0-trap-fg-signals.patch
epatch "${FILESDIR}"/${PN}-3.2-dev-fd-test-as-user.patch #131875
+   epatch "${FILESDIR}"/${PN}-4.2-dev-fd-buffer-overflow.patch #431850
 
epatch_user
 }

diff --git a/app-shells/bash/bash-4.0_p44.ebuild 
b/app-shells/bash/bash-4.0_p44.ebuild
index 543ea45..2d8a80e 100644
--- a/app-shells/bash/bash-4.0_p44.ebuild
+++ b/app-shells/bash/bash-4.0_p44.ebuild
@@ -72,6 +72,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-4.0-ldflags-for-build.patch #211947
epatch "${FILESDIR}"/${PN}-4.0-negative-return.patch
epatch "${FILESDIR}"/${PN}-4.0-parallel-build.patch #267613
+   epatch "${FILESDIR}"/${PN}-4.2-dev-fd-buffer-overflow.patch #431850
sed -i '/\.o: .*shell\.h/s:$: pathnames.h:' Makefile.in #267613
 
epatch_user

diff --git a/app-shells/bash/bash-4.1_p17.ebuild 
b/app-shells/bash/bash-4.1_p17.ebuild
index 3bc12cb..ad19cf3 100644
--- a/app-shells/bash/bash-4.1_p17.ebuild
+++ b/app-shells/bash/bash-4.1_p17.ebuild
@@ -68,6 +68,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-4.1-fbsd-eaccess.patch #303411
sed -i '1i#define NEED_FPURGE_DECL' execute_cmd.c # needs fpurge() decl
epatch "${FILESDIR}"/${PN}-4.1-parallel-build.patch
+   epatch "${FILESDIR}"/${PN}-4.2-dev-fd-buffer-overflow.patch #431850
 
epatch_user
 }

diff --git a/app-shells/bash/files/bash-3.1-dev-fd-buffer-overflow.patch 
b/app-shells/bash/files/bash-3.1-dev-fd-buffer-overflow.patch
new file mode 100644
index 000..9d08856
--- /dev/null
+++ b/app-shells/bash/files/bash-3.1-dev-fd-buffer-overflow.patch
@@ -0,0 +1,16 @@
+https://bugs.gentoo.org/431850
+
+this is a backport of the upstream bash42-033 patch for bash 3.1/3.0/2.05
+
+--- a/test.c
 b/test.c
+@@ -194,7 +194,8 @@
+  trailing slash.  Make sure /dev/fd/xx really uses DEV_FD_PREFIX/xx.
+  On most systems, with the notable exception of linux, this is
+  effectively a no-op. */
+-  char pbuf[32];
++  static char *pbuf = 0;
++  pbuf = xrealloc (pbuf, sizeof (DEV_FD_PREFIX) + strlen (path + 8));
+   strcpy (pbuf, DEV_FD_PREFIX);
+   strcat (pbuf, path + 8);
+   return (stat