[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 

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

2023-12-30 Thread Conrad Kostecki
commit: 2f5452633816fc3d81e9e31224589fb7467ec1eb
Author: Michael Mair-Keimberger  levelnine  at>
AuthorDate: Fri Dec 29 14:02:50 2023 +
Commit: Conrad Kostecki  gentoo  org>
CommitDate: Sun Dec 31 02:37:07 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f545263

app-shells/bash: remove unused patch

Signed-off-by: Michael Mair-Keimberger  levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/34539
Signed-off-by: Conrad Kostecki  gentoo.org>

 .../bash-5.2_p15-shell-parser-reset-issue.patch| 33 --
 1 file changed, 33 deletions(-)

diff --git a/app-shells/bash/files/bash-5.2_p15-shell-parser-reset-issue.patch 
b/app-shells/bash/files/bash-5.2_p15-shell-parser-reset-issue.patch
deleted file mode 100644
index bef5586d0efc..
--- a/app-shells/bash/files/bash-5.2_p15-shell-parser-reset-issue.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-https://savannah.gnu.org/support/?110745
-https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00103.html
-
-Note that both documents make the claim that only interactive shells are
-affected. This is false, as is demonstrated below.
-
-$ bash -c '[[ ]]; echo fin'; echo $?
-0
-
-diff --git a/parse.y b/parse.y
-index 11b71d4..02b2af1 100644
 parse.y
-+++ parse.y
-@@ -2899,7 +2899,7 @@ yylex ()
- #if defined (YYERRCODE) && !defined (YYUNDEF)
- current_token = YYERRCODE;
- #else
--current_token = YYerror;
-+current_token = YYUNDEF;
- #endif
- 
-   return (current_token);
-@@ -4156,7 +4156,9 @@ parse_comsub (qc, open, close, lenp, flags)
-   shell_eof_token = ps.eof_token;
-   expand_aliases = ps.expand_aliases;
- 
--  /* yyparse() has already called yyerror() and reset_parser() */
-+  /* yyparse() has already called yyerror() and reset_parser(), so we set
-+   PST_NOERROR to avoid a redundant error message. */
-+  parser_state |= PST_NOERROR;
-   return (_pair_error);
- }
-   else if (r != 0)



[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
+   

[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 

[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=(
+   

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

2023-04-26 Thread Mike Gilbert
commit: 06ae7be862ffb82a0cabb211ae274cde39587d9a
Author: Diego Viola  gmail  com>
AuthorDate: Wed Apr 26 06:31:10 2023 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Wed Apr 26 21:07:24 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06ae7be8

app-shells/bash: remove empty line in bashrc

Signed-off-by: Diego Viola  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/30765
Signed-off-by: Mike Gilbert  gentoo.org>

 app-shells/bash/files/bashrc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index 6c909333754d..4a50bdebb93b 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -5,7 +5,6 @@
 # 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.



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

2023-04-25 Thread Sam James
commit: 52d91f662e2022070db84e036c9373373fa12624
Author: Diego Viola  gmail  com>
AuthorDate: Tue Apr 25 19:49:09 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Apr 25 21:26:58 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52d91f66

app-shells/bash: fix whitespace

Signed-off-by: Diego Viola  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/30756
Signed-off-by: Sam James  gentoo.org>

 app-shells/bash/files/bashrc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index 98621a7c9a80..6c909333754d 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -3,7 +3,7 @@
 # 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 !
+# anything or bad things will happen!
 
 
 # Test for an interactive shell.  There is no need to set anything



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

2023-03-04 Thread Sven Wegener
commit: fad63f29e7ae83a71fb6714576c5a8a9d006
Author: Sven Wegener  gentoo  org>
AuthorDate: Sat Mar  4 18:57:26 2023 +
Commit: Sven Wegener  gentoo  org>
CommitDate: Sat Mar  4 19:29:06 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fad6

app-shells/bash: do not update screen's internal window title

The k escape sequence changes screen's internal window title, which is
the alias given by the user to the window and which should not be
changed by an application running inside screen. screen supports the so
called hardstatus line with the _ escape sequence, which should be used
instead and which gets forwarded to the terminal as the title.

Signed-off-by: Sven Wegener  gentoo.org>

 app-shells/bash/files/bashrc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index b7202a361d31..98621a7c9a80 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -42,7 +42,7 @@ case ${TERM} in
PS1='\[\033]0;\u@\h:\w\007\]'
;;
screen*)
-   PS1='\[\033k\u@\h:\w\033\\\]'
+   PS1='\[\033_\u@\h:\w\033\\\]'
;;
*)
unset PS1



[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/

2022-11-16 Thread Conrad Kostecki
commit: b103238d77075bb3d96c07d748ed0f615c271157
Author: Michael Mair-Keimberger  levelnine  at>
AuthorDate: Wed Nov 16 18:17:21 2022 +
Commit: Conrad Kostecki  gentoo  org>
CommitDate: Wed Nov 16 18:33:39 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b103238d

app-shells/bash: remove unused patches

Signed-off-by: Michael Mair-Keimberger  levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/28299
Signed-off-by: Conrad Kostecki  gentoo.org>

 ...r-brackets-in-nested-parameter-expansions.patch |  41 ---
 ...h-5.2_p2-fixes-for-extglob-in-compat-mode.patch | 282 -
 2 files changed, 323 deletions(-)

diff --git 
a/app-shells/bash/files/bash-5.2_p2-fix-for-brackets-in-nested-parameter-expansions.patch
 
b/app-shells/bash/files/bash-5.2_p2-fix-for-brackets-in-nested-parameter-expansions.patch
deleted file mode 100644
index 9c1b03f8b2df..
--- 
a/app-shells/bash/files/bash-5.2_p2-fix-for-brackets-in-nested-parameter-expansions.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel=22f21b760ed90eb77c3756e6ccf39b73c84f532a
-
 subst.c
-+++ subst.c
-@@ -1798,6 +1798,9 @@ extract_heredoc_dolbrace_string (string, sindex, quoted, 
flags)
-   return (result);
- }
- 
-+#define PARAMEXPNEST_MAX  32  // for now
-+static int dbstate[PARAMEXPNEST_MAX];
-+
- /* Extract a parameter expansion expression within ${ and } from STRING.
-Obey the Posix.2 rules for finding the ending `}': count braces while
-skipping over enclosed quoted strings and command substitutions.
-@@ -1828,6 +1831,8 @@ extract_dollar_brace_string (string, sindex, quoted, 
flags)
-   if (quoted == Q_HERE_DOCUMENT && dolbrace_state == DOLBRACE_QUOTE && (flags 
& SX_NOALLOC) == 0)
- return (extract_heredoc_dolbrace_string (string, sindex, quoted, flags));
- 
-+  dbstate[0] = dolbrace_state;
-+
-   pass_character = 0;
-   nesting_level = 1;
-   slen = strlen (string + *sindex) + *sindex;
-@@ -1852,6 +1857,8 @@ extract_dollar_brace_string (string, sindex, quoted, 
flags)
- 
-   if (string[i] == '$' && string[i+1] == LBRACE)
-   {
-+if (nesting_level < PARAMEXPNEST_MAX)
-+  dbstate[nesting_level] = dolbrace_state;
- nesting_level++;
- i += 2;
- if (dolbrace_state == DOLBRACE_QUOTE || dolbrace_state == 
DOLBRACE_WORD)
-@@ -1864,6 +1871,7 @@ extract_dollar_brace_string (string, sindex, quoted, 
flags)
- nesting_level--;
- if (nesting_level == 0)
-   break;
-+dolbrace_state = (nesting_level < PARAMEXPNEST_MAX) ? 
dbstate[nesting_level] : dbstate[0];/* Guess using initial state */
- i++;
- continue;
-   }
-

diff --git 
a/app-shells/bash/files/bash-5.2_p2-fixes-for-extglob-in-compat-mode.patch 
b/app-shells/bash/files/bash-5.2_p2-fixes-for-extglob-in-compat-mode.patch
deleted file mode 100644
index 16393c79af8b..
--- a/app-shells/bash/files/bash-5.2_p2-fixes-for-extglob-in-compat-mode.patch
+++ /dev/null
@@ -1,282 +0,0 @@
-https://bugs.gentoo.org/873931
-https://lists.gnu.org/archive/html/bug-bash/2022-10/msg1.html
-https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel=22f21b760ed90eb77c3756e6ccf39b73c84f532a
-
 MANIFEST
-+++ MANIFEST
-@@ -1131,6 +1131,7 @@ tests/extglob4.sub   f
- tests/extglob5.subf
- tests/extglob6.subf
- tests/extglob7.subf
-+tests/extglob8.subf
- tests/func.tests  f
- tests/func.right  f
- tests/func1.sub   f
 builtins/common.h
-+++ builtins/common.h
-@@ -257,6 +257,10 @@ extern int print_shift_error;
- extern int expand_once_flag;
- #endif
- 
-+#if defined (EXTENDED_GLOB)
-+extern int extglob_flag;
-+#endif
-+
- /* variables from source.def */
- extern int source_searches_cwd;
- extern int source_uses_path;
 builtins/shopt.def
-+++ builtins/shopt.def
-@@ -1,7 +1,7 @@
- This file is shopt.def, from which is created shopt.c.
- It implements the Bash `shopt' builtin.
- 
--Copyright (C) 1994-2021 Free Software Foundation, Inc.
-+Copyright (C) 1994-2022 Free Software Foundation, Inc.
- 
- This file is part of GNU Bash, the Bourne Again SHell.
- 
-@@ -149,6 +149,11 @@ static int shopt_set_complete_direxpand PARAMS((char *, 
int));
- static int set_assoc_expand PARAMS((char *, int));
- #endif
- 
-+#if defined (EXTENDED_GLOB)
-+int extglob_flag = EXTGLOB_DEFAULT;
-+static int shopt_set_extglob PARAMS((char *, int));
-+#endif
-+
- static int shopt_set_debug_mode PARAMS((char *, int));
- 
- static int shopt_login_shell;
-@@ -203,7 +208,7 @@ static struct {
-   { "extdebug", _mode, shopt_set_debug_mode },
- #endif
- #if defined (EXTENDED_GLOB)
--  { "extglob", _glob, (shopt_set_func_t *)NULL },
-+  { "extglob", _flag, shopt_set_extglob },
- #endif
-   { "extquote", _quote, (shopt_set_func_t *)NULL },
-   { "failglob", _glob_expansion, (shopt_set_func_t *)NULL },
-@@ -374,7 +379,7 @@ reset_shopt_options ()
- #endif
- 
- #if defined 

[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 

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

2022-09-11 Thread Mike Gilbert
commit: 04add5d9bfe8a7b790ad8564e11f7c5bd7846139
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sun Sep 11 23:10:25 2022 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sun Sep 11 23:10:25 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04add5d9

app-shells/bash: remove egrep/fgrep aliases from bashrc

Upstream has declared these forms to be deprecated. Aliasing them to
'grep -E' and 'grep -F' prevents the deprecation warning from being
displayed, which could lead to confusion.

Bug: https://bugs.gentoo.org/869788
Signed-off-by: Mike Gilbert  gentoo.org>

 app-shells/bash/files/bashrc | 2 --
 1 file changed, 2 deletions(-)

diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index bce7204e3c01..b7202a361d31 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -94,8 +94,6 @@ if ${use_color} ; then
#BSD#@export CLICOLOR=1
#GNU#@alias ls='ls --color=auto'
alias grep='grep --colour=auto'
-   alias egrep='grep -E --colour=auto'
-   alias fgrep='grep -F --colour=auto'
 else
# show root@ when we don't have colors
PS1+='\u@\h \w \$ '



[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/

2021-07-10 Thread Conrad Kostecki
commit: cdf75470811178fd2712bf0780d4d6dd8b3f02f4
Author: Michael Mair-Keimberger  levelnine  at>
AuthorDate: Fri May  7 18:09:30 2021 +
Commit: Conrad Kostecki  gentoo  org>
CommitDate: Sat Jul 10 21:04:42 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cdf75470

app-shells/bash: remove unused patches

Closes: https://github.com/gentoo/gentoo/pull/20722
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Michael Mair-Keimberger  levelnine.at>
Signed-off-by: Conrad Kostecki  gentoo.org>

 .../files/bash-5.0_p11-disable_priv_mode.patch | 85 --
 app-shells/bash/files/bash-5.1-parallel_make.patch | 15 
 2 files changed, 100 deletions(-)

diff --git a/app-shells/bash/files/bash-5.0_p11-disable_priv_mode.patch 
b/app-shells/bash/files/bash-5.0_p11-disable_priv_mode.patch
deleted file mode 100644
index 9a05c8b8613..000
--- a/app-shells/bash/files/bash-5.0_p11-disable_priv_mode.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-diff -urP ../bash-5.0.orig/config.h.in config.h.in
 ../bash-5.0.orig/config.h.in   2018-12-04 09:54:17.0 -0700
-+++ config.h.in2019-12-10 11:34:42.157926317 -0700
-@@ -1,6 +1,6 @@
- /* config.h -- Configuration file for bash. */
- 
--/* Copyright (C) 1987-2009,2011-2012 Free Software Foundation, Inc.
-+/* Copyright (C) 1987-2009,2011-2012,2013-2019 Free Software Foundation, Inc.
- 
-This file is part of GNU Bash, the Bourne Again SHell.
- 
-@@ -807,6 +807,14 @@
- #undef HAVE_SETREGID
- #undef HAVE_DECL_SETREGID
- 
-+/* Define if you have the setregid function.  */
-+#undef HAVE_SETRESGID
-+#undef HAVE_DECL_SETRESGID
-+
-+/* Define if you have the setresuid function.  */
-+#undef HAVE_SETRESUID
-+#undef HAVE_DECL_SETRESUID
-+
- /* Define if you have the setvbuf function.  */
- #undef HAVE_SETVBUF
- 
-diff -urP ../bash-5.0.orig/configure configure
 ../bash-5.0.orig/configure 2019-01-02 07:43:31.0 -0700
-+++ configure  2019-12-10 11:34:42.166926317 -0700
-@@ -10281,6 +10281,17 @@
- #define HAVE_DECL_SETREGID $ac_have_decl
- _ACEOF
- 
-+ac_fn_c_check_decl "$LINENO" "" "ac_cv_have_decl_" "$ac_includes_default"
-+if test "x$ac_cv_have_decl_" = xyes; then :
-+  ac_have_decl=1
-+else
-+  ac_have_decl=0
-+fi
-+
-+cat >>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;

diff --git a/app-shells/bash/files/bash-5.1-parallel_make.patch 
b/app-shells/bash/files/bash-5.1-parallel_make.patch
deleted file mode 100644
index b341a8a06e2..000
--- a/app-shells/bash/files/bash-5.1-parallel_make.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-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/

2021-05-29 Thread Lars Wendler
commit: b998b780c790cb25d8a2323af4d0fe82b9b1d2b5
Author: Lars Wendler  gentoo  org>
AuthorDate: Sat May 29 18:34:20 2021 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Sat May 29 18:51:05 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b998b780

app-shells/bash: Replace egrep/fgrep with grep -E/-F

Signed-off-by: Lars Wendler  gentoo.org>

 app-shells/bash/files/bashrc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index 2f3dc775545..bce7204e3c0 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -94,8 +94,8 @@ if ${use_color} ; then
#BSD#@export CLICOLOR=1
#GNU#@alias ls='ls --color=auto'
alias grep='grep --colour=auto'
-   alias egrep='egrep --colour=auto'
-   alias fgrep='fgrep --colour=auto'
+   alias egrep='grep -E --colour=auto'
+   alias fgrep='grep -F --colour=auto'
 else
# show root@ when we don't have colors
PS1+='\u@\h \w \$ '



[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=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/

2020-12-01 Thread Lars Wendler
commit: ca824f512dac614cc67d618e726582e8a4ff0f7b
Author: Marios Titas  gmx  com>
AuthorDate: Mon Nov 30 05:39:16 2020 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Tue Dec  1 13:15:57 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca824f51

app-shells/bash: add support for TERM=tmux in bashrc

Closes: https://bugs.gentoo.org/757711
Signed-off-by: Marios Titas  gmx.com>
Closes: https://github.com/gentoo/gentoo/pull/18453
Signed-off-by: Lars Wendler  gentoo.org>

 app-shells/bash/files/bashrc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index 8d9c29738b6..2f3dc775545 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -38,7 +38,7 @@ shopt -s histappend
 
 # Change the window title of X terminals 
 case ${TERM} in
-   [aEkx]term*|rxvt*|gnome*|konsole*|interix)
+   [aEkx]term*|rxvt*|gnome*|konsole*|interix|tmux*)
PS1='\[\033]0;\u@\h:\w\007\]'
;;
screen*)
@@ -80,7 +80,7 @@ else
# Some systems (e.g. BSD & embedded) don't typically come with
# dircolors so we need to hardcode some terminals in here.
case ${TERM} in
-   [aEkx]term*|rxvt*|gnome*|konsole*|screen|cons25|*color) use_color=true;;
+   [aEkx]term*|rxvt*|gnome*|konsole*|screen|tmux|cons25|*color) 
use_color=true;;
esac
 fi
 



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

2020-06-13 Thread Mike Gilbert
commit: 99b50bea47e7db27ad2bef976ed1e649becc705b
Author: Michael Mair-Keimberger  gmail  com>
AuthorDate: Sat Jun 13 08:07:12 2020 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sat Jun 13 16:24:45 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99b50bea

app-shells/bash: remove unused patch

Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Michael Mair-Keimberger  gmail.com>
Signed-off-by: Mike Gilbert  gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/16212

 .../bash-5.0-assignment-preceding-builtin.patch| 83 --
 1 file changed, 83 deletions(-)

diff --git a/app-shells/bash/files/bash-5.0-assignment-preceding-builtin.patch 
b/app-shells/bash/files/bash-5.0-assignment-preceding-builtin.patch
deleted file mode 100644
index 84b7fbc8b2a..000
--- a/app-shells/bash/files/bash-5.0-assignment-preceding-builtin.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-*** ../bash-5.0-patched/variables.c2018-12-18 11:07:21.0 -0500
 variables.c2019-03-20 10:30:56.0 -0400
-***
-*** 4473,4476 
 4473,4489 
-var = (SHELL_VAR *)data;
-  
-+ #if 1 /* TAG:bash-5.1 */
-+   /* Just like do_assignment_internal(). This makes assignments preceding
-+  special builtins act like standalone assignment statements when in
-+  posix mode, satisfying the posix requirement that this affect the
-+  "current execution environment." */
-+   v = bind_variable (var->name, value_cell (var), ASS_FORCE|ASS_NOLONGJMP);
-+ 
-+   /* If this modifies an existing local variable, v->context will be 
non-zero.
-+  If it comes back with v->context == 0, we bound at the global context.
-+  Set binding_table appropriately. It doesn't matter whether it's correct
-+  if the variable is local, only that it's not global_variables->table */
-+   binding_table = v->context ? shell_variables->table : 
global_variables->table;
-+ #else
-binding_table = global_variables->table;
-if (binding_table == 0)
-***
-*** 4478,4486 
-  
-v = bind_variable_internal (var->name, value_cell (var), binding_table, 0, 
ASS_FORCE|ASS_NOLONGJMP);
-  
-/* global variables are no longer temporary and don't need propagating. */
-!   var->attributes &= ~(att_tempvar|att_propagate);
-if (v)
-! v->attributes |= var->attributes;
-  
-if (find_special_var (var->name) >= 0)
 4491,4508 
-  
-v = bind_variable_internal (var->name, value_cell (var), binding_table, 0, 
ASS_FORCE|ASS_NOLONGJMP);
-+ #endif
-  
-/* global variables are no longer temporary and don't need propagating. */
-!   if (binding_table == global_variables->table)
-! var->attributes &= ~(att_tempvar|att_propagate);
-! 
-if (v)
-! {
-!   v->attributes |= var->attributes;
-!   v->attributes &= ~att_tempvar; /* not a temp var now */
-! #if 0/* TAG:bash-5.1 code doesn't need this, disable for bash-5.1 */
-!   v->context = (binding_table == global_variables->table) ? 0 : 
shell_variables->scope;
-! #endif
-! }
-  
-if (find_special_var (var->name) >= 0)
-***
-*** 4576,4587 
-  {
-int i;
-  
-tempvar_list = strvec_create (HASH_ENTRIES (temporary_env) + 1);
-tempvar_list[tvlist_ind = 0] = 0;
-! 
-!   hash_flush (temporary_env, pushf);
-!   hash_dispose (temporary_env);
-temporary_env = (HASH_TABLE *)NULL;
-  
-tempvar_list[tvlist_ind] = 0;
-  
 4598,4612 
-  {
-int i;
-+   HASH_TABLE *disposer;
-  
-tempvar_list = strvec_create (HASH_ENTRIES (temporary_env) + 1);
-tempvar_list[tvlist_ind = 0] = 0;
-! 
-!   disposer = temporary_env;
-temporary_env = (HASH_TABLE *)NULL;
-  
-+   hash_flush (disposer, pushf);
-+   hash_dispose (disposer);
-+ 
-tempvar_list[tvlist_ind] = 0;
-  
-



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

2019-09-15 Thread Mike Frysinger
commit: efb92a51c30ded73401e564c714c951772619485
Author: Mike Frysinger  gentoo  org>
AuthorDate: Sat Sep 14 18:14:41 2019 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Sun Sep 15 07:50:58 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=efb92a51

Revert "app-shells/bash: remove unused patches."

This reverts commit 40314bb465f6ec08c01228ba7fb01c0c73450d44.

All of these patches are used.

Signed-off-by: Mike Frysinger  gentoo.org>

 app-shells/bash/files/bash-3.0-afs.patch   |  20 ++
 app-shells/bash/files/bash-3.0-crash.patch |  46 
 .../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-pwd.patch   |  16 ++
 app-shells/bash/files/bash-3.0-subshell.patch  |  39 +++
 app-shells/bash/files/bash-3.0-ulimit.patch| 186 ++
 .../bash/files/bash-3.0-volatile-command.patch |  16 ++
 11 files changed, 843 insertions(+)

diff --git a/app-shells/bash/files/bash-3.0-afs.patch 
b/app-shells/bash/files/bash-3.0-afs.patch
new file mode 100644
index 000..f07371c39eb
--- /dev/null
+++ b/app-shells/bash/files/bash-3.0-afs.patch
@@ -0,0 +1,20 @@
+Ripped from Fedora
+
+- Fixed AFS support for output redirection, so that the correct errors
+  are reported for other filesystems (bug #155373).
+
+https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=155373
+
+--- bash-3.0/redir.c.afs   2005-04-20 09:16:15.0 +0100
 bash-3.0/redir.c   2005-04-20 09:16:58.0 +0100
+@@ -596,7 +596,9 @@
+   fd = open (filename, flags, mode);
+ #if defined (AFS)
+   if ((fd < 0) && (errno == EACCES))
+-  fd = open (filename, flags & ~O_CREAT, mode);
++  if ((fd = open (filename, flags & ~O_CREAT, mode)) < 0)
++/* Restore previous errno. */
++errno = EACCES;
+ #endif /* AFS */
+ }
+ 

diff --git a/app-shells/bash/files/bash-3.0-crash.patch 
b/app-shells/bash/files/bash-3.0-crash.patch
new file mode 100644
index 000..984e85d82ed
--- /dev/null
+++ b/app-shells/bash/files/bash-3.0-crash.patch
@@ -0,0 +1,46 @@
+> Machine Type: i686-pc-linux-gnu
+> 
+> Bash Version: 3.0
+> Patch Level: 0
+> Release Status: release
+> 
+> Description:
+> GNU bash, version 3.00.0(1)-release (i686-pc-linux-gnu)
+> (and
+> GNU bash, version 2.05b.0(1)-release (i386-redhat-linux-gnu)
+> 
+> dumps a core because of a null pointer "in make_bare_word 
+> at make_cmd.c:90" (see gdb output below)
+
+Thanks for the report.  Here's a quick fix:
+
+*** arrayfunc.c~   Sat Nov  6 15:08:29 2004
+--- arrayfunc.cMon Jan 31 11:56:21 2005
+***
+*** 709,713 
+ return ((char *)NULL);
+   }
+!   else if (var == 0)
+   return ((char *)NULL);
+else if (array_p (var) == 0)
+--- 709,713 
+ return ((char *)NULL);
+   }
+!   else if (var == 0 || value_cell (var) == 0)
+   return ((char *)NULL);
+else if (array_p (var) == 0)
+
+
+Chet
+
+-- 
+``The lyf so short, the craft so long to lerne.'' - Chaucer
+( ``Discere est Dolere'' -- chet )
+   Live...Laugh...Love
+Chet Ramey, ITS, CWRUc...@po.cwru.eduhttp://tiswww.tis.cwru.edu/~chet/
+
+
+___
+Bug-bash mailing list
+bug-b...@gnu.org
+http://lists.gnu.org/mailman/listinfo/bug-bash

diff --git a/app-shells/bash/files/bash-3.0-histtimeformat.patch 
b/app-shells/bash/files/bash-3.0-histtimeformat.patch
new file mode 100644
index 000..b910600fd89
--- /dev/null
+++ b/app-shells/bash/files/bash-3.0-histtimeformat.patch
@@ -0,0 +1,56 @@
+Ripped from Debian
+
+http://lists.gnu.org/archive/html/bug-bash/2004-08/msg8.html
+
+From: Enrique Perez-Terron 
+To: bug-b...@gnu.org
+Subject: When using HISTTIMEFORMAT, the date and the command are run
+   together.
+Date: Sun, 01 Aug 2004 18:36:45 +0200
+
+Configuration Information [Automatically generated, do not change]:
+Machine: i586
+OS: linux-gnu
+Compiler: gcc
+Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i586'
+-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i586-pc-linux-gnu'
+-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/local/share/locale'
+-DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H  -I.  -I. -I./include -I./lib  
+-g -O2
+uname output: Linux arabia.home.lan 2.6.6-1.435.2.3 #1 Thu Jul 1
+09:11:28 EDT 2004 i586 i586 i386 GNU/Linux
+Machine Type: i586-pc-linux-gnu
+
+# DP: Add space separating the time and the command in the
+# DP: output from the history builtin command.
+
+Bash Version: 3.0
+Patch Level: 0
+Release Status: release
+
+Description:
+   There is no space separating the time and the 

[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 

[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)) == 1)

[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/

2018-06-26 Thread Mike Gilbert
commit: 13671a66527e977a4c31979ec6df34ee09c65e25
Author: Michael Mair-Keimberger  gmail  com>
AuthorDate: Wed Jun 13 18:08:16 2018 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Tue Jun 26 15:04:55 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13671a66

app-shells/bash: remove unused patches

 .../bash/files/bash-4.3-append-process-segfault.patch  | 18 --
 app-shells/bash/files/bash-4.3-compat-lvl.patch| 13 -
 2 files changed, 31 deletions(-)

diff --git a/app-shells/bash/files/bash-4.3-append-process-segfault.patch 
b/app-shells/bash/files/bash-4.3-append-process-segfault.patch
deleted file mode 100644
index 6c9b2e83067..000
--- a/app-shells/bash/files/bash-4.3-append-process-segfault.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-https://lists.gnu.org/archive/html/bug-bash/2014-08/msg00048.html
-
-*** ../bash-4.3-patched/execute_cmd.c  2014-07-30 10:26:52.0 -0400
 execute_cmd.c  2014-08-11 16:55:57.0 -0400
-***
-*** 2406,2410 
-  {
-  #if defined (JOB_CONTROL)
-!   append_process (savestring (the_printed_command), dollar_dollar_pid, 
exec_result, lastpipe_jid);
-  #endif
-lstdin = wait_for (lastpid);
 2433,2438 
-  {
-  #if defined (JOB_CONTROL)
-!   if (INVALID_JOB (lastpipe_jid) == 0)
-!  append_process (savestring (the_printed_command_except_trap), 
dollar_dollar_pid, exec_result, lastpipe_jid);
-  #endif
-lstdin = wait_for (lastpid);

diff --git a/app-shells/bash/files/bash-4.3-compat-lvl.patch 
b/app-shells/bash/files/bash-4.3-compat-lvl.patch
deleted file mode 100644
index 5734687ffeb..000
--- a/app-shells/bash/files/bash-4.3-compat-lvl.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-https://lists.gnu.org/archive/html/bug-bash/2014-06/msg00046.html
-
 a/builtins/shopt.def
-+++ b/builtins/shopt.def
-@@ -160,7 +160,7 @@ static struct {
-   { "compat32", _compat32, set_compatibility_level },
-   { "compat40", _compat40, set_compatibility_level },
-   { "compat41", _compat41, set_compatibility_level },
--  { "compat42", _compat41, set_compatibility_level },
-+  { "compat42", _compat42, set_compatibility_level },
- #if defined (READLINE)
-   { "complete_fullquote", _fullquote, (shopt_set_func_t *)NULL},
-   { "direxpand", _expand, shopt_set_complete_direxpand },



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

2018-01-04 Thread Sven Wegener
commit: f0ad1ef0c4826494a4c8bd00fefd4d55931359fc
Author: Sven Wegener  gentoo  org>
AuthorDate: Thu Jan  4 23:47:58 2018 +
Commit: Sven Wegener  gentoo  org>
CommitDate: Thu Jan  4 23:48:15 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f0ad1ef0

app-shells/bash: Remove redundant code in bashrc, bug #625304

Closes: https://bugs.gentoo.org/625304
Package-Manager: Portage-2.3.14, Repoman-2.3.6

 app-shells/bash/files/bashrc | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index 03694691d4a..8d9c29738b6 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -97,12 +97,8 @@ if ${use_color} ; then
alias egrep='egrep --colour=auto'
alias fgrep='fgrep --colour=auto'
 else
-   if [[ ${EUID} == 0 ]] ; then
-   # show root@ when we don't have colors
-   PS1+='\u@\h \w \$ '
-   else
-   PS1+='\u@\h \w \$ '
-   fi
+   # show root@ when we don't have colors
+   PS1+='\u@\h \w \$ '
 fi
 
 for sh in /etc/bash/bashrc.d/* ; do



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

2017-10-20 Thread Patrice Clement
commit: 40314bb465f6ec08c01228ba7fb01c0c73450d44
Author: Michael Mair-Keimberger  gmail  com>
AuthorDate: Tue Oct 10 13:10:09 2017 +
Commit: Patrice Clement  gentoo  org>
CommitDate: Fri Oct 20 07:45:01 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40314bb4

app-shells/bash: remove unused patches.

 app-shells/bash/files/bash-3.0-afs.patch   |  20 --
 app-shells/bash/files/bash-3.0-crash.patch |  46 
 .../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-pwd.patch   |  16 --
 app-shells/bash/files/bash-3.0-subshell.patch  |  39 ---
 app-shells/bash/files/bash-3.0-ulimit.patch| 186 --
 .../bash/files/bash-3.0-volatile-command.patch |  16 --
 11 files changed, 843 deletions(-)

diff --git a/app-shells/bash/files/bash-3.0-afs.patch 
b/app-shells/bash/files/bash-3.0-afs.patch
deleted file mode 100644
index f07371c39eb..000
--- a/app-shells/bash/files/bash-3.0-afs.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Ripped from Fedora
-
-- Fixed AFS support for output redirection, so that the correct errors
-  are reported for other filesystems (bug #155373).
-
-https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=155373
-
 bash-3.0/redir.c.afs   2005-04-20 09:16:15.0 +0100
-+++ bash-3.0/redir.c   2005-04-20 09:16:58.0 +0100
-@@ -596,7 +596,9 @@
-   fd = open (filename, flags, mode);
- #if defined (AFS)
-   if ((fd < 0) && (errno == EACCES))
--  fd = open (filename, flags & ~O_CREAT, mode);
-+  if ((fd = open (filename, flags & ~O_CREAT, mode)) < 0)
-+/* Restore previous errno. */
-+errno = EACCES;
- #endif /* AFS */
- }
- 

diff --git a/app-shells/bash/files/bash-3.0-crash.patch 
b/app-shells/bash/files/bash-3.0-crash.patch
deleted file mode 100644
index 984e85d82ed..000
--- a/app-shells/bash/files/bash-3.0-crash.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-> Machine Type: i686-pc-linux-gnu
-> 
-> Bash Version: 3.0
-> Patch Level: 0
-> Release Status: release
-> 
-> Description:
-> GNU bash, version 3.00.0(1)-release (i686-pc-linux-gnu)
-> (and
-> GNU bash, version 2.05b.0(1)-release (i386-redhat-linux-gnu)
-> 
-> dumps a core because of a null pointer "in make_bare_word 
-> at make_cmd.c:90" (see gdb output below)
-
-Thanks for the report.  Here's a quick fix:
-
-*** arrayfunc.c~   Sat Nov  6 15:08:29 2004
 arrayfunc.cMon Jan 31 11:56:21 2005
-***
-*** 709,713 
- return ((char *)NULL);
-   }
-!   else if (var == 0)
-   return ((char *)NULL);
-else if (array_p (var) == 0)
 709,713 
- return ((char *)NULL);
-   }
-!   else if (var == 0 || value_cell (var) == 0)
-   return ((char *)NULL);
-else if (array_p (var) == 0)
-
-
-Chet
-
--- 
-``The lyf so short, the craft so long to lerne.'' - Chaucer
-( ``Discere est Dolere'' -- chet )
-   Live...Laugh...Love
-Chet Ramey, ITS, CWRUc...@po.cwru.eduhttp://tiswww.tis.cwru.edu/~chet/
-
-
-___
-Bug-bash mailing list
-bug-b...@gnu.org
-http://lists.gnu.org/mailman/listinfo/bug-bash

diff --git a/app-shells/bash/files/bash-3.0-histtimeformat.patch 
b/app-shells/bash/files/bash-3.0-histtimeformat.patch
deleted file mode 100644
index b910600fd89..000
--- a/app-shells/bash/files/bash-3.0-histtimeformat.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-Ripped from Debian
-
-http://lists.gnu.org/archive/html/bug-bash/2004-08/msg8.html
-
-From: Enrique Perez-Terron 
-To: bug-b...@gnu.org
-Subject: When using HISTTIMEFORMAT, the date and the command are run
-   together.
-Date: Sun, 01 Aug 2004 18:36:45 +0200
-
-Configuration Information [Automatically generated, do not change]:
-Machine: i586
-OS: linux-gnu
-Compiler: gcc
-Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i586'
--DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i586-pc-linux-gnu'
--DCONF_VENDOR='pc' -DLOCALEDIR='/usr/local/share/locale'
--DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H  -I.  -I. -I./include -I./lib  
--g -O2
-uname output: Linux arabia.home.lan 2.6.6-1.435.2.3 #1 Thu Jul 1
-09:11:28 EDT 2004 i586 i586 i386 GNU/Linux
-Machine Type: i586-pc-linux-gnu
-
-# DP: Add space separating the time and the command in the
-# DP: output from the history builtin command.
-
-Bash Version: 3.0
-Patch Level: 0
-Release Status: release
-
-Description:
-   There is no space separating the time and the command in the 
-   output from the history builtin command.
-
-Repeat-By:
-   $ export 

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

2017-06-10 Thread Jason Donenfeld
commit: 15336782891de2bbbd0dca704d028208d5ac7a6d
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Sat Jun 10 02:06:07 2017 +
Commit: Jason Donenfeld  gentoo  org>
CommitDate: Sat Jun 10 12:02:30 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15336782

app-shells/bash: show full cwd for root user

Though the first declaration of PS1 in this file uses \w uniformly for
root and non-root, the two subsequent ones inconsistently do not. Thus, a
normal user is able to see clearly where he is in the file system,
whereas the root user -- who should have this sort of visibility -- does
not, since \W (upper-case) is used instead. It seems clear that this
difference is just the result of an old bug; \w for both user types is
clearly more reasonable. This patch fixes things up as such.

Signed-off-by: Jason A. Donenfeld  gentoo.org>
Acked-by: Robin H. Johnson  gentoo.org>

 app-shells/bash/files/bashrc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index 6db69668195..03694691d4a 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -86,7 +86,7 @@ fi
 
 if ${use_color} ; then
if [[ ${EUID} == 0 ]] ; then
-   PS1+='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
+   PS1+='\[\033[01;31m\]\h\[\033[01;34m\] \w \$\[\033[00m\] '
else
PS1+='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
fi
@@ -99,7 +99,7 @@ if ${use_color} ; then
 else
if [[ ${EUID} == 0 ]] ; then
# show root@ when we don't have colors
-   PS1+='\u@\h \W \$ '
+   PS1+='\u@\h \w \$ '
else
PS1+='\u@\h \w \$ '
fi



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

2017-06-09 Thread Jason Donenfeld
commit: f3b3ce20de34a3e4c7a4f7ab014c3f6627ac74e6
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Sat Jun 10 03:07:18 2017 +
Commit: Jason Donenfeld  gentoo  org>
CommitDate: Sat Jun 10 03:07:18 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3b3ce20

Revert "app-shells/bash: show full cwd for root user"

YIKES! I did not mean to actually push this, just send it to the mailing
list. Apologies.

This reverts commit 1db68b96bcedd3ace96a31729cbdc17c71afdb86.

 app-shells/bash/files/bashrc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index 03694691d4a..6db69668195 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -86,7 +86,7 @@ fi
 
 if ${use_color} ; then
if [[ ${EUID} == 0 ]] ; then
-   PS1+='\[\033[01;31m\]\h\[\033[01;34m\] \w \$\[\033[00m\] '
+   PS1+='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
else
PS1+='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
fi
@@ -99,7 +99,7 @@ if ${use_color} ; then
 else
if [[ ${EUID} == 0 ]] ; then
# show root@ when we don't have colors
-   PS1+='\u@\h \w \$ '
+   PS1+='\u@\h \W \$ '
else
PS1+='\u@\h \w \$ '
fi



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

2017-06-09 Thread Jason Donenfeld
commit: 1db68b96bcedd3ace96a31729cbdc17c71afdb86
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Sat Jun 10 02:06:07 2017 +
Commit: Jason Donenfeld  gentoo  org>
CommitDate: Sat Jun 10 03:06:42 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1db68b96

app-shells/bash: show full cwd for root user

Though the first declaration of PS1 in this file uses \w uniformly for
root and non-root, the two subsequent ones inconsistently do not. Thus, a
normal user is able to see clearly where he is in the file system,
whereas the root user -- who should have this sort of visibility -- does
not, since \W (upper-case) is used instead. It seems clear that this
difference is just the result of an old bug; \w for both user types is
clearly more reasonable. This patch fixes things up as such.

Signed-off-by: Jason A. Donenfeld  gentoo.org>

 app-shells/bash/files/bashrc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index 6db69668195..03694691d4a 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -86,7 +86,7 @@ fi
 
 if ${use_color} ; then
if [[ ${EUID} == 0 ]] ; then
-   PS1+='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
+   PS1+='\[\033[01;31m\]\h\[\033[01;34m\] \w \$\[\033[00m\] '
else
PS1+='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
fi
@@ -99,7 +99,7 @@ if ${use_color} ; then
 else
if [[ ${EUID} == 0 ]] ; then
# show root@ when we don't have colors
-   PS1+='\u@\h \W \$ '
+   PS1+='\u@\h \w \$ '
else
PS1+='\u@\h \w \$ '
fi



[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 

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

2016-07-16 Thread Patrice Clement
commit: 5b6826127b45599034c1cd6b0934f01f843273d4
Author: Michael Mair-Keimberger (asterix)  gmail 
 com>
AuthorDate: Thu Jul 14 17:38:10 2016 +
Commit: Patrice Clement  gentoo  org>
CommitDate: Sat Jul 16 09:52:10 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b682612

app-shells/bash: remove unused patch

Closes: https://github.com/gentoo/gentoo/pull/1887

Signed-off-by: Patrice Clement  gentoo.org>

 .../bash/files/bash-3.0-read-e-segfault.patch  | 26 --
 1 file changed, 26 deletions(-)

diff --git a/app-shells/bash/files/bash-3.0-read-e-segfault.patch 
b/app-shells/bash/files/bash-3.0-read-e-segfault.patch
deleted file mode 100644
index e578631..000
--- a/app-shells/bash/files/bash-3.0-read-e-segfault.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-> Hmm, a better patch for this seems to be:
-
-I installed this patch a while back:
-
-*** ../bash-3.0-patched/lib/readline/display.c Wed Sep  8 11:07:51 2004
 lib/readline/display.c Fri Nov 12 13:31:42 2004
-***
-*** 336,340 
-  
-local_prompt = local_prompt_prefix = (char *)0;
-!   prompt_last_invisible = prompt_visible_length = 0;
-  
-if (prompt == 0 || *prompt == 0)
 341,346 
-  
-local_prompt = local_prompt_prefix = (char *)0;
-!   prompt_last_invisible = prompt_invis_chars_first_line = 0;
-!   prompt_visible_length = prompt_physical_chars = 0;
-  
-if (prompt == 0 || *prompt == 0)
-
--- 
-``The lyf so short, the craft so long to lerne.'' - Chaucer
-( ``Discere est Dolere'' -- chet )
-   Live...Laugh...Love
-Chet Ramey, ITS, CWRUc...@po.cwru.eduhttp://tiswww.tis.cwru.edu/~chet/



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

2016-06-23 Thread Mike Frysinger
commit: e034ed6fa7205737661467cc148fadba79d7fec8
Author: Mike Frysinger  gentoo  org>
AuthorDate: Thu Jun 23 06:01:29 2016 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Thu Jun 23 06:01:32 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e034ed6f

app-shells/bash: bashrc: back out clearing of default LS_COLORS #583814

The behavior of ls in the default case (when LS_COLORS isn't set) isn't
documented well.  The manual leads you to believe the defaults will be
used when in reality they are not.  A scan of the source shows this.  So
back out some the attempts to optimize the env and go back to exporting
LS_COLORS all the time.  We'll just have to live with incompat warnings
when coreutils upgrades & changes behavior.

 app-shells/bash/files/bashrc | 32 +---
 1 file changed, 9 insertions(+), 23 deletions(-)

diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index f625657..6db6966 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -53,43 +53,29 @@ esac
 # 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.
+# We run dircolors directly due to its changes in file syntax and
+# terminal name patching.
 use_color=false
 if type -P dircolors >/dev/null ; then
# Enable colors for ls, etc.  Prefer ~/.dir_colors #64489
LS_COLORS=
if [[ -f ~/.dir_colors ]] ; then
-   # If you have a custom file, chances are high that it's not the 
default.
-   used_default_dircolors="no"
eval "$(dircolors -b ~/.dir_colors)"
elif [[ -f /etc/DIR_COLORS ]] ; then
-   # People might have customized the system database.
-   used_default_dircolors="maybe"
eval "$(dircolors -b /etc/DIR_COLORS)"
else
-   used_default_dircolors="yes"
eval "$(dircolors -b)"
fi
+   # Note: We always evaluate the LS_COLORS setting even when it's the
+   # default.  If it isn't set, then `ls` will only colorize by default
+   # based on file attributes and ignore extensions (even the compiled
+   # in defaults of dircolors). #583814
if [[ -n ${LS_COLORS:+set} ]] ; then
use_color=true
-
-   # The majority of systems out there do not customize these 
files, so we
-   # want to avoid always exporting the large $LS_COLORS variable. 
 This
-   # keeps the active env smaller, and it means we don't have to 
deal with
-   # running new/old (incompatible) versions of `ls` compared to 
when we
-   # last sourced this file.
-   case ${used_default_dircolors} in
-   no) ;;
-   yes) unset LS_COLORS ;;
-   *)
-   ls_colors=$(eval "$(dircolors -b)"; echo "${LS_COLORS}")
-   if [[ ${ls_colors} == "${LS_COLORS}" ]] ; then
-   unset LS_COLORS
-   fi
-   unset ls_colors
-   ;;
-   esac
+   else
+   # Delete it if it's empty as it's useless in that case.
+   unset LS_COLORS
fi
-   unset used_default_dircolors
 else
# Some systems (e.g. BSD & embedded) don't typically come with
# dircolors so we need to hardcode some terminals in here.



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

2016-06-22 Thread Mike Frysinger
commit: becfc11732db43397071f873487813165c0bdd85
Author: Mike Frysinger  gentoo  org>
AuthorDate: Thu Jun 23 05:29:58 2016 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Thu Jun 23 05:31:13 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=becfc117

app-shells/bash: bashrc: clean up ls_colors var too #572582

 app-shells/bash/files/bashrc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index 1107f43..f625657 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -85,6 +85,7 @@ if type -P dircolors >/dev/null ; then
if [[ ${ls_colors} == "${LS_COLORS}" ]] ; then
unset LS_COLORS
fi
+   unset ls_colors
;;
esac
fi



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

2016-02-03 Thread Mike Frysinger
commit: a70b06857fc83ef6f85a6c06b3478c0c25ec8fda
Author: Mike Frysinger  gentoo  org>
AuthorDate: Tue Feb  2 22:11:11 2016 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Wed Feb  3 18:51:41 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a70b0685

app-shells/bash: bashrc: avoid always exporting default LS_COLORS

We've long been exporting the LS_COLORS variable to the default env,
but in practice, there's no reason to be doing this in the majority
of cases.  The value we most often load is equivalent to the default
which means we're polluting the env and adding overhead for no gain.
Add a little more code (and one extra `dircolors` exec unfortunately)
to check to see if the LS_COLORS value we found is the default.  If
so, don't bother exporting it anymore.

 app-shells/bash/files/bashrc | 26 +-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index 414f848..1107f43 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -58,13 +58,37 @@ if type -P dircolors >/dev/null ; then
# Enable colors for ls, etc.  Prefer ~/.dir_colors #64489
LS_COLORS=
if [[ -f ~/.dir_colors ]] ; then
+   # If you have a custom file, chances are high that it's not the 
default.
+   used_default_dircolors="no"
eval "$(dircolors -b ~/.dir_colors)"
elif [[ -f /etc/DIR_COLORS ]] ; then
+   # People might have customized the system database.
+   used_default_dircolors="maybe"
eval "$(dircolors -b /etc/DIR_COLORS)"
else
+   used_default_dircolors="yes"
eval "$(dircolors -b)"
fi
-   [[ -n ${LS_COLORS:+set} ]] && use_color=true
+   if [[ -n ${LS_COLORS:+set} ]] ; then
+   use_color=true
+
+   # The majority of systems out there do not customize these 
files, so we
+   # want to avoid always exporting the large $LS_COLORS variable. 
 This
+   # keeps the active env smaller, and it means we don't have to 
deal with
+   # running new/old (incompatible) versions of `ls` compared to 
when we
+   # last sourced this file.
+   case ${used_default_dircolors} in
+   no) ;;
+   yes) unset LS_COLORS ;;
+   *)
+   ls_colors=$(eval "$(dircolors -b)"; echo "${LS_COLORS}")
+   if [[ ${ls_colors} == "${LS_COLORS}" ]] ; then
+   unset LS_COLORS
+   fi
+   ;;
+   esac
+   fi
+   unset used_default_dircolors
 else
# Some systems (e.g. BSD & embedded) don't typically come with
# dircolors so we need to hardcode some terminals in here.



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

2016-02-03 Thread Mike Frysinger
commit: 747857408315deb4b6a0ddd2a34484ca8e5ec2ff
Author: Mike Frysinger  gentoo  org>
AuthorDate: Tue Feb  2 22:08:19 2016 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Wed Feb  3 18:51:41 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74785740

app-shells/bash: bashrc: drop custom parsing of dircolors databases #572582

Starting with coreutils-8.24, the dircolors TERM entries are run through
fnmatch rather than being a plain text string.  This means our parsing
logic no longer works because we assumed fixed strings.  It isn't easy to
process a list of path globs in bash, so rework the code to always run
the dircolors tool.  We were doing this anyways in the majority of cases,
so it's not like we're adding that much overhead.  The only people who
are negatively impacted are interactive colorless terminals.

Reported-by: Bernd Feige  gmx.net>

 app-shells/bash/files/bashrc | 30 +++---
 1 file changed, 11 insertions(+), 19 deletions(-)

diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index c5b449b..414f848 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -52,27 +52,19 @@ 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.
+# first to take advantage of user additions.
 use_color=false
-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
+if type -P dircolors >/dev/null ; 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
+   LS_COLORS=
+   if [[ -f ~/.dir_colors ]] ; then
+   eval "$(dircolors -b ~/.dir_colors)"
+   elif [[ -f /etc/DIR_COLORS ]] ; then
+   eval "$(dircolors -b /etc/DIR_COLORS)"
+   else
+   eval "$(dircolors -b)"
fi
+   [[ -n ${LS_COLORS:+set} ]] && use_color=true
 else
# Some systems (e.g. BSD & embedded) don't typically come with
# dircolors so we need to hardcode some terminals in here.
@@ -107,4 +99,4 @@ for sh in /etc/bash/bashrc.d/* ; do
 done
 
 # Try to keep environment pollution down, EPA loves us.
-unset use_color safe_term match_lhs sh
+unset use_color sh



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

2016-02-03 Thread Mike Frysinger
commit: 03ec1b8d7a9ab445352c05cbc5817b80cd3a1640
Author: Mike Frysinger  gentoo  org>
AuthorDate: Tue Feb  2 20:24:44 2016 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Wed Feb  3 18:51:41 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03ec1b8d

app-shells/bash: bashrc: enable colors for all TERMS that end in "color"

A bunch of terms end in values like "-256color" and "-color" to indicate
the variant that supports color.  Match all of those in the fallback case.

 app-shells/bash/files/bashrc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index 87a5562..ed46b7d 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -77,7 +77,7 @@ else
# Some systems (e.g. BSD & embedded) don't typically come with
# dircolors so we need to hardcode some terminals in here.
case ${TERM} in
-   [aEkx]term*|rxvt*|gnome*|konsole*|screen|cons25) use_color=true;;
+   [aEkx]term*|rxvt*|gnome*|konsole*|screen|cons25|*color) use_color=true;;
esac
 fi
 



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

2016-02-03 Thread Mike Frysinger
commit: 485b78806bf288e68eae9988e2e9342df8d74959
Author: Mike Frysinger  gentoo  org>
AuthorDate: Tue Feb  2 21:32:36 2016 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Wed Feb  3 18:51:41 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=485b7880

app-shells/bash: bashrc: quote the output of dircolors #572582#8

The output of dircolors generally shouldn't be problematic even when it's
unquoted (as it tends to be a long dense string w/out whitespace), but add
quotes anyways just to be safe.

Reported-by: konsolebox  gmail.com

 app-shells/bash/files/bashrc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index ed46b7d..c5b449b 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -68,9 +68,9 @@ 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)
+   eval "$(dircolors -b ~/.dir_colors)"
elif [[ -f /etc/DIR_COLORS ]] ; then
-   eval $(dircolors -b /etc/DIR_COLORS)
+   eval "$(dircolors -b /etc/DIR_COLORS)"
fi
fi
 else



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

2016-02-03 Thread Mike Frysinger
commit: 0e1f0029e88b91f89b997301d4e58c3a6c4c414a
Author: Mike Frysinger  gentoo  org>
AuthorDate: Tue Feb  2 20:21:30 2016 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Wed Feb  3 18:51:41 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e1f0029

app-shells/bash: bashrc: simplify/unify TERM checking slightly

We've got two cases that check TERM with many common entries,
so make the leading parts look the same.

 app-shells/bash/files/bashrc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index c9bd88e..f3618fc 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -38,7 +38,7 @@ shopt -s histappend
 
 # Change the window title of X terminals 
 case ${TERM} in
-   xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*)
+   [aEkx]term*|rxvt*|gnome*|konsole*|interix)
PS1='\[\033]0;\u@\h:\w\007\]'
;;
screen*)
@@ -53,7 +53,7 @@ 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#@ [aEkx]term*|rxvt*|gnome*|konsole*|screen|cons25) use_color=true;;
 #BSD#@esac
 
 # Set colorful PS1 only on colorful terminals.



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

2016-02-03 Thread Mike Frysinger
commit: 43785a6ff3210efdb6807a42fb02ed74b440019c
Author: Mike Frysinger  gentoo  org>
AuthorDate: Tue Feb  2 20:23:37 2016 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Wed Feb  3 18:51:41 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43785a6f

app-shells/bash: bashrc: enable fallback TERM color checking for everyone

We provide rudimentary TERM checking for BSD which doesn't have dircolors,
but this logic works just as well for all systems such as embedded.  Make
this code run whenever dircolors does not exist.

 app-shells/bash/files/bashrc | 16 +---
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index f3618fc..87a5562 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -49,18 +49,12 @@ case ${TERM} in
;;
 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#@ [aEkx]term*|rxvt*|gnome*|konsole*|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.
+use_color=false
 safe_term=${TERM//[^[:alnum:]]/?}   # sanitize TERM
 match_lhs=""
 [[ -f ~/.dir_colors   ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
@@ -79,7 +73,15 @@ if ${use_color} ; then
eval $(dircolors -b /etc/DIR_COLORS)
fi
fi
+else
+   # Some systems (e.g. BSD & embedded) don't typically come with
+   # dircolors so we need to hardcode some terminals in here.
+   case ${TERM} in
+   [aEkx]term*|rxvt*|gnome*|konsole*|screen|cons25) use_color=true;;
+   esac
+fi
 
+if ${use_color} ; then
if [[ ${EUID} == 0 ]] ; then
PS1+='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
else



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

2016-01-25 Thread Mike Frysinger
commit: 55f05e6f12d8fa2d102a66a2f8d93c53f9b01faf
Author: Mike Frysinger  gentoo  org>
AuthorDate: Thu May 21 04:06:10 2015 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Tue Jan 26 07:12:10 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55f05e6f

app-shells/bash: Back out the `history -a` by default as it can be a bit 
troublesome with the constant disk load (failing drives, flaky network e.g. 
NFS, etc...). See #517342 for details.

 app-shells/bash/files/bashrc | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index 6622b84..c9bd88e 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -31,7 +31,10 @@ shopt -s histappend
 # This does mean sessions get interleaved when reading later on, but this
 # way the history is always up to date.  History is not synced across live
 # sessions though; that is what `history -n` does.
-PROMPT_COMMAND='history -a'
+# Disabled by default due to concerns related to system recovery when $HOME
+# is under duress, or lives somewhere flaky (like NFS).  Constantly syncing
+# the history will halt the shell prompt until it's finished.
+#PROMPT_COMMAND='history -a'
 
 # Change the window title of X terminals 
 case ${TERM} in



[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 [[ 

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

2016-01-25 Thread Mike Frysinger
commit: aa0fc40cbad85c69d35c94ebbd98a81be78123af
Author: Mike Frysinger  gentoo  org>
AuthorDate: Tue Feb 24 20:58:48 2015 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Tue Jan 26 07:12:10 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa0fc40c

app-shells/bashrc: Do window title setup through PS1 #223641 by michael  
smith-li.com.  Add history -a to PROMPT_COMMAND #517342 by Paweł Hajdan, Jr.. 
Add fix from upstream for variable declare weirdness.

 app-shells/bash/files/bashrc | 27 ---
 1 file changed, 20 insertions(+), 7 deletions(-)

diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index 3000709..6622b84 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -20,16 +20,29 @@ fi
 # http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)
 shopt -s checkwinsize
 
-# Enable history appending instead of overwriting.  #139609
+# Disable completion when the input buffer is empty.  i.e. Hitting tab
+# and waiting a long time for bash to expand all of $PATH.
+shopt -s no_empty_cmd_completion
+
+# Enable history appending instead of overwriting when exiting.  #139609
 shopt -s histappend
 
+# Save each command to the history file as it's executed.  #517342
+# This does mean sessions get interleaved when reading later on, but this
+# way the history is always up to date.  History is not synced across live
+# sessions though; that is what `history -n` does.
+PROMPT_COMMAND='history -a'
+
 # 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"'
+   PS1='\[\033]0;\u@\h:\w\007\]'
;;
screen*)
-   PROMPT_COMMAND='echo -ne 
"\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\033\\"'
+   PS1='\[\033k\u@\h:\w\033\\\]'
+   ;;
+   *)
+   unset PS1
;;
 esac
 
@@ -65,9 +78,9 @@ if ${use_color} ; then
fi
 
if [[ ${EUID} == 0 ]] ; then
-   PS1='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
+   PS1+='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
else
-   PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
+   PS1+='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
fi
 
#BSD#@export CLICOLOR=1
@@ -78,9 +91,9 @@ if ${use_color} ; then
 else
if [[ ${EUID} == 0 ]] ; then
# show root@ when we don't have colors
-   PS1='\u@\h \W \$ '
+   PS1+='\u@\h \W \$ '
else
-   PS1='\u@\h \w \$ '
+   PS1+='\u@\h \w \$ '
fi
 fi
 



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

2016-01-25 Thread Mike Frysinger
commit: f569c423ec20ef8f6de960ee97c4c7e9757b1826
Author: Michał Górny  gentoo  org>
AuthorDate: Sun Nov  9 20:41:31 2014 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Tue Jan 26 07:12:10 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f569c423

app-shells/bash: introduce support for bashrc.d directory that is sourced in 
bashrc by default #468094

 app-shells/bash/files/bashrc | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index a398eb1..3000709 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -84,5 +84,9 @@ else
fi
 fi
 
+for sh in /etc/bash/bashrc.d/* ; do
+   [[ -r ${sh} ]] && source "${sh}"
+done
+
 # Try to keep environment pollution down, EPA loves us.
-unset use_color safe_term match_lhs
+unset use_color safe_term match_lhs sh



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

2015-12-02 Thread Mike Frysinger
commit: ab2ee2276aaca117ac4250923102b1ca6311ab42
Author: Mike Frysinger  gentoo  org>
AuthorDate: Wed Dec  2 18:57:52 2015 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Wed Dec  2 18:58:52 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab2ee227

app-shells/bash: do not leave exit value non-zero in default profile script

If the .bashrc file does not exist, then the one line check in the profile
script leaves $? set to 1.  Use a full if statement to avoid that.

 app-shells/bash/files/dot-bash_profile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app-shells/bash/files/dot-bash_profile 
b/app-shells/bash/files/dot-bash_profile
index 94a6622..1de05a4 100644
--- a/app-shells/bash/files/dot-bash_profile
+++ b/app-shells/bash/files/dot-bash_profile
@@ -2,4 +2,6 @@
 
 # This file is sourced by bash for login shells.  The following line
 # runs your .bashrc and is recommended by the bash info pages.
-[[ -f ~/.bashrc ]] && . ~/.bashrc
+if [[ -f ~/.bashrc ]] ; then
+   . ~/.bashrc
+fi



[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