public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2015-12-02 18:59 Mike Frysinger
  0 siblings, 0 replies; 30+ messages in thread
From: Mike Frysinger @ 2015-12-02 18:59 UTC (permalink / raw
  To: gentoo-commits

commit:     ab2ee2276aaca117ac4250923102b1ca6311ab42
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Wed Dec  2 18:57:52 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Dec  2 18:58:52 2015 +0000
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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2016-01-26  7:23 Mike Frysinger
  0 siblings, 0 replies; 30+ messages in thread
From: Mike Frysinger @ 2016-01-26  7:23 UTC (permalink / raw
  To: gentoo-commits

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

app-shells/bashrc: Do window title setup through PS1 #223641 by michael <AT> 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
 


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2016-01-26  7:23 Mike Frysinger
  0 siblings, 0 replies; 30+ messages in thread
From: Mike Frysinger @ 2016-01-26  7:23 UTC (permalink / raw
  To: gentoo-commits

commit:     f569c423ec20ef8f6de960ee97c4c7e9757b1826
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  9 20:41:31 2014 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Jan 26 07:12:10 2016 +0000
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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2016-01-26  7:23 Mike Frysinger
  0 siblings, 0 replies; 30+ messages in thread
From: Mike Frysinger @ 2016-01-26  7:23 UTC (permalink / raw
  To: gentoo-commits

commit:     55f05e6f12d8fa2d102a66a2f8d93c53f9b01faf
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu May 21 04:06:10 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Jan 26 07:12:10 2016 +0000
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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2016-02-03 18:52 Mike Frysinger
  0 siblings, 0 replies; 30+ messages in thread
From: Mike Frysinger @ 2016-02-03 18:52 UTC (permalink / raw
  To: gentoo-commits

commit:     03ec1b8d7a9ab445352c05cbc5817b80cd3a1640
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  2 20:24:44 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Feb  3 18:51:41 2016 +0000
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
 


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2016-02-03 18:52 Mike Frysinger
  0 siblings, 0 replies; 30+ messages in thread
From: Mike Frysinger @ 2016-02-03 18:52 UTC (permalink / raw
  To: gentoo-commits

commit:     0e1f0029e88b91f89b997301d4e58c3a6c4c414a
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  2 20:21:30 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Feb  3 18:51:41 2016 +0000
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.


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2016-02-03 18:52 Mike Frysinger
  0 siblings, 0 replies; 30+ messages in thread
From: Mike Frysinger @ 2016-02-03 18:52 UTC (permalink / raw
  To: gentoo-commits

commit:     747857408315deb4b6a0ddd2a34484ca8e5ec2ff
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  2 22:08:19 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Feb  3 18:51:41 2016 +0000
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 <Bernd.Feige <AT> 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}$(</etc/DIR_COLORS)"
-[[ -z ${match_lhs}    ]] \
-	&& type -P dircolors >/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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2016-02-03 18:52 Mike Frysinger
  0 siblings, 0 replies; 30+ messages in thread
From: Mike Frysinger @ 2016-02-03 18:52 UTC (permalink / raw
  To: gentoo-commits

commit:     a70b06857fc83ef6f85a6c06b3478c0c25ec8fda
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  2 22:11:11 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Feb  3 18:51:41 2016 +0000
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.


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2016-02-03 18:52 Mike Frysinger
  0 siblings, 0 replies; 30+ messages in thread
From: Mike Frysinger @ 2016-02-03 18:52 UTC (permalink / raw
  To: gentoo-commits

commit:     485b78806bf288e68eae9988e2e9342df8d74959
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  2 21:32:36 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Feb  3 18:51:41 2016 +0000
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 <AT> 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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2016-02-03 18:52 Mike Frysinger
  0 siblings, 0 replies; 30+ messages in thread
From: Mike Frysinger @ 2016-02-03 18:52 UTC (permalink / raw
  To: gentoo-commits

commit:     43785a6ff3210efdb6807a42fb02ed74b440019c
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  2 20:23:37 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Feb  3 18:51:41 2016 +0000
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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2016-06-23  5:31 Mike Frysinger
  0 siblings, 0 replies; 30+ messages in thread
From: Mike Frysinger @ 2016-06-23  5:31 UTC (permalink / raw
  To: gentoo-commits

commit:     becfc11732db43397071f873487813165c0bdd85
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 23 05:29:58 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Jun 23 05:31:13 2016 +0000
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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2016-06-23  6:03 Mike Frysinger
  0 siblings, 0 replies; 30+ messages in thread
From: Mike Frysinger @ 2016-06-23  6:03 UTC (permalink / raw
  To: gentoo-commits

commit:     e034ed6fa7205737661467cc148fadba79d7fec8
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 23 06:01:29 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Jun 23 06:01:32 2016 +0000
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.


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2016-07-16  9:54 Patrice Clement
  0 siblings, 0 replies; 30+ messages in thread
From: Patrice Clement @ 2016-07-16  9:54 UTC (permalink / raw
  To: gentoo-commits

commit:     5b6826127b45599034c1cd6b0934f01f843273d4
Author:     Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Thu Jul 14 17:38:10 2016 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Sat Jul 16 09:52:10 2016 +0000
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 <monsieurp <AT> 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..0000000
--- 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, CWRU    chet@po.cwru.edu    http://tiswww.tis.cwru.edu/~chet/


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2017-06-10  3:06 Jason Donenfeld
  0 siblings, 0 replies; 30+ messages in thread
From: Jason Donenfeld @ 2017-06-10  3:06 UTC (permalink / raw
  To: gentoo-commits

commit:     1db68b96bcedd3ace96a31729cbdc17c71afdb86
Author:     Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 10 02:06:07 2017 +0000
Commit:     Jason Donenfeld <zx2c4 <AT> gentoo <DOT> org>
CommitDate: Sat Jun 10 03:06:42 2017 +0000
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 <zx2c4 <AT> 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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2017-06-10  3:07 Jason Donenfeld
  0 siblings, 0 replies; 30+ messages in thread
From: Jason Donenfeld @ 2017-06-10  3:07 UTC (permalink / raw
  To: gentoo-commits

commit:     f3b3ce20de34a3e4c7a4f7ab014c3f6627ac74e6
Author:     Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 10 03:07:18 2017 +0000
Commit:     Jason Donenfeld <zx2c4 <AT> gentoo <DOT> org>
CommitDate: Sat Jun 10 03:07:18 2017 +0000
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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2017-06-10 12:02 Jason Donenfeld
  0 siblings, 0 replies; 30+ messages in thread
From: Jason Donenfeld @ 2017-06-10 12:02 UTC (permalink / raw
  To: gentoo-commits

commit:     15336782891de2bbbd0dca704d028208d5ac7a6d
Author:     Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 10 02:06:07 2017 +0000
Commit:     Jason Donenfeld <zx2c4 <AT> gentoo <DOT> org>
CommitDate: Sat Jun 10 12:02:30 2017 +0000
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 <zx2c4 <AT> gentoo.org>
Acked-by: Robin H. Johnson <robbat2 <AT> 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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2017-10-20  7:45 Patrice Clement
  0 siblings, 0 replies; 30+ messages in thread
From: Patrice Clement @ 2017-10-20  7:45 UTC (permalink / raw
  To: gentoo-commits

commit:     40314bb465f6ec08c01228ba7fb01c0c73450d44
Author:     Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Tue Oct 10 13:10:09 2017 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Fri Oct 20 07:45:01 2017 +0000
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..00000000000
--- 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.000000000 +0100
-+++ bash-3.0/redir.c	2005-04-20 09:16:58.000000000 +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..00000000000
--- 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.c	Mon 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, CWRU    chet@po.cwru.edu    http://tiswww.tis.cwru.edu/~chet/
-
-
-_______________________________________________
-Bug-bash mailing list
-Bug-bash@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..00000000000
--- 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/msg00008.html
-
-From: Enrique Perez-Terron <enrio@online.no>
-To: bug-bash@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 HISTTIMEFORMAT=_A_format_string_
-	$ history 3
-	  997  _A_format_string_echo $BASH_VERSION
-	  998  _A_format_string_export HISTTIMEFORMAT=_A_format_string_
-	  999  _A_format_string_history 3
-
-Fix:
---- ./builtins/history.def.orig	2003-12-20 00:02:09.000000000 +0100
-+++ ./builtins/history.def	2004-08-01 18:18:02.652720102 +0200
-@@ -287,9 +287,10 @@
- 	  QUIT;
- 
- 	  timestr = (histtimefmt && *histtimefmt) ? histtime (hlist[i], histtimefmt) : (char *)NULL;
--	  printf ("%5d%c %s%s\n", i + history_base,
-+	  printf ("%5d%c %s%s%s\n", i + history_base,
- 		  histdata(i) ? '*' : ' ',
- 		  ((timestr && *timestr) ? timestr : ""),
-+		  ((timestr && *timestr) ? " " : ""),
- 		  histline(i));
- 	  i++;
- 	}

diff --git a/app-shells/bash/files/bash-3.0-jobs.patch b/app-shells/bash/files/bash-3.0-jobs.patch
deleted file mode 100644
index 72c149c71cf..00000000000
--- a/app-shells/bash/files/bash-3.0-jobs.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-Ripped from Fedora
-
-* Wed Sep  8 2004 Tim Waugh <twaugh@redhat.com> 3.0-13
-- Check for EINVAL from waitpid() and avoid WCONTINUED in that case.
-- Fixed jobs4 test.
-
-From: 	Tim Waugh
-Subject: 	[patch] bash-3.0: avoid WCONTINUED if invalid
-Date: 	Wed, 8 Sep 2004 16:52:38 +0100
-User-agent: 	Mutt/1.4.1i
-
-Hi,
-
-GNU libc defines WCONTINUED, but (at least on Linux 2.4.x kernels)
-waitpid() returns -1 with errno set to EINVAL if WCONTINUED is
-supplied in options.
-
-Here is a patch to retry without WCONTINUED set in that case.
-
-Tim.
-
---- bash-3.0/tests/jobs4.sub
-+++ bash-3.0/tests/jobs4.sub
-@@ -18,5 +18,5 @@
- 
- wait
- 
--cat &
-+sleep 100 &
- kill -1 %% && echo i killed it || echo could not kill it
---- bash-3.0/jobs.c
-+++ bash-3.0/jobs.c
-@@ -2475,6 +2475,7 @@
-   PROCESS *child;
-   pid_t pid;
-   int call_set_current, last_stopped_job, job, children_exited, waitpid_flags;
-+  static int wcontinued_not_supported = 0;
- 
-   call_set_current = children_exited = 0;
-   last_stopped_job = NO_JOB;
-@@ -2488,7 +2489,15 @@
- 			: 0;
-       if (sigchld || block == 0)
- 	waitpid_flags |= WNOHANG;
-+    retry:
-+      if (wcontinued_not_supported)
-+	waitpid_flags &= ~WCONTINUED;
-       pid = WAITPID (-1, &status, waitpid_flags);
-+      if (pid == -1 && errno == EINVAL)
-+	{
-+	  wcontinued_not_supported = 1;
-+	  goto retry;
-+	}
- 
-       /* The check for WNOHANG is to make sure we decrement sigchld only
- 	 if it was non-zero before we called waitpid. */

diff --git a/app-shells/bash/files/bash-3.0-locale.patch b/app-shells/bash/files/bash-3.0-locale.patch
deleted file mode 100644
index ea1ef3deae3..00000000000
--- a/app-shells/bash/files/bash-3.0-locale.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-Ripped from SuSe
-
-http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00005.html
-
-From: schwab@suse.de
-To: bug-bash@gnu.org
-Subject: HISTTIMEFORMAT doesn't track locale changes
-Date: Sun,  1 Aug 2004 11:14:00 +0200 (CEST)
-
-Configuration Information [Automatically generated, do not change]:
-Machine: ia64
-OS: linux-gnu
-Compiler: gcc
-Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='ia64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='ia64-unknown-linux-gnu' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H  -I.  -I../bash-3.0 -I../bash-3.0/include -I../bash-3.0/lib   -O2 -g
-uname output: Linux sykes 2.6.5-22-default #1 SMP Fri Jul 2 13:43:23 UTC 2004 ia64 ia64 ia64 GNU/Linux
-Machine Type: ia64-unknown-linux-gnu
-
-Bash Version: 3.0
-Patch Level: 0
-Release Status: release
-
-Description:
-Bash doesn't use the current locale when formatting HISTTIMEFORMAT.
-
-Repeat-By:
-sykes:/tmp/bash/Build/:[0]$ locale
-LANG=de_DE.UTF-8
-LC_CTYPE="de_DE.UTF-8"
-LC_NUMERIC=POSIX
-LC_TIME=POSIX
-LC_COLLATE=POSIX
-LC_MONETARY="de_DE.UTF-8"
-LC_MESSAGES=en_US.UTF-8
-LC_PAPER="de_DE.UTF-8"
-LC_NAME="de_DE.UTF-8"
-LC_ADDRESS="de_DE.UTF-8"
-LC_TELEPHONE="de_DE.UTF-8"
-LC_MEASUREMENT="de_DE.UTF-8"
-LC_IDENTIFICATION="de_DE.UTF-8"
-LC_ALL=
-sykes:/tmp/bash/Build/:[0]$ history 1
- 1502  history 1
-sykes:/tmp/bash/Build/:[0]$ HISTTIMEFORMAT=%c
-sykes:/tmp/bash/Build/:[0]$ history 1
- 1504  Sun Aug  1 10:56:59 2004history 1
-sykes:/tmp/bash/Build/:[0]$ export LC_TIME=$LANG
-sykes:/tmp/bash/Build/:[0]$ history 1
- 1506  Sun Aug  1 10:57:24 2004history 1
-
---- bash-3.0/locale.c
-+++ bash-3.0/locale.c
-@@ -71,9 +71,10 @@ set_default_locale ()
-   textdomain (PACKAGE);
- }
- 
--/* Set default values for LC_CTYPE, LC_COLLATE, LC_MESSAGES and LC_NUMERIC
--   if they are not specified in the environment, but LC_ALL is.  This
--   should be called from main() after parsing the environment. */
-+/* Set default values for LC_CTYPE, LC_COLLATE, LC_MESSAGES, LC_NUMERIC
-+   and LC_TIME if they are not specified in the environment, but LC_ALL
-+   is.  This should be called from main() after parsing the
-+   environment. */
- void
- set_default_locale_vars ()
- {
-@@ -109,6 +110,12 @@ set_default_locale_vars ()
-     setlocale (LC_NUMERIC, lc_all);
- #  endif /* LC_NUMERIC */
- 
-+#  if defined (LC_TIME)
-+  val = get_string_value ("LC_TIME");
-+  if (val == 0 && lc_all && *lc_all)
-+    setlocale (LC_TIME, lc_all);
-+#  endif /* LC_TIME */
-+
- #endif /* HAVE_SETLOCALE */
- 
-   val = get_string_value ("TEXTDOMAIN");
-@@ -213,6 +220,13 @@ set_locale_var (var, value)
- 	return (setlocale (LC_NUMERIC, get_locale_var ("LC_NUMERIC")) != 0);
- #  endif /* LC_NUMERIC */
-     }
-+  else if (var[3] == 'T' && var[4] == 'I')	/* LC_TIME */
-+    {
-+#  if defined (LC_TIME)
-+      if (lc_all == 0 || *lc_all == '\0')
-+	return (setlocale (LC_TIME, get_locale_var ("LC_TIME")) != 0);
-+#  endif /* LC_TIME */
-+    }
- #endif /* HAVE_SETLOCALE */
- 
-   return (0);
-@@ -285,6 +299,9 @@ reset_locale_vars ()
- #  if defined (LC_NUMERIC)
-   setlocale (LC_NUMERIC, get_locale_var ("LC_NUMERIC"));
- #  endif
-+#  if defined (LC_TIME)
-+  setlocale (LC_TIME, get_locale_var ("LC_TIME"));
-+#  endif
- 
-   locale_setblanks ();  
- 
---- bash-3.0/variables.c
-+++ bash-3.0/variables.c
-@@ -3646,6 +3646,7 @@ static struct name_and_function special_
-   { "LC_CTYPE", sv_locale },
-   { "LC_MESSAGES", sv_locale },
-   { "LC_NUMERIC", sv_locale },
-+  { "LC_TIME", sv_locale },
- 
-   { "MAIL", sv_mail },
-   { "MAILCHECK", sv_mail },

diff --git a/app-shells/bash/files/bash-3.0-manpage.patch b/app-shells/bash/files/bash-3.0-manpage.patch
deleted file mode 100644
index 08e3143e542..00000000000
--- a/app-shells/bash/files/bash-3.0-manpage.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Ripped from Fedora
-
-fix obvious display bug
-
---- bash-3.0/doc/bash.1
-+++ bash-3.0/doc/bash.1
-@@ -3929,7 +3929,7 @@
- .B SIGHUP
- to all jobs when an interactive login shell exits.
- .PP
--If \Bbash\fP is waiting for a command to complete and receives a signal
-+If \fBbash\fP is waiting for a command to complete and receives a signal
- for which a trap has been set, the trap will not be executed until
- the command completes. 
- When \fBbash\fP is waiting for an asynchronous command via the \fBwait\fP

diff --git a/app-shells/bash/files/bash-3.0-multibyteifs.patch b/app-shells/bash/files/bash-3.0-multibyteifs.patch
deleted file mode 100644
index 1e74832b638..00000000000
--- a/app-shells/bash/files/bash-3.0-multibyteifs.patch
+++ /dev/null
@@ -1,281 +0,0 @@
-From: Tim Waugh <twaugh@redhat.com>
-To: bug-bash@gnu.org
-Subject: [patch] multibyte IFS values
-Date: Tue, 24 Aug 2004 13:34:59 +0100
-
-Hi,
-
-Here is a patch to address these problems:
-
-http://lists.gnu.org/archive/html/bug-bash/2004-07/msg00294.html
-http://lists.gnu.org/archive/html/bug-bash/2004-07/msg00296.html
-
-It works well for me at least.
-
-Tim.
-
---- bash-3.0/subst.c.multibyteifs	2004-08-20 15:22:48.366497771 +0100
-+++ bash-3.0/subst.c	2004-08-20 18:13:30.833624616 +0100
-@@ -124,7 +124,12 @@
- SHELL_VAR *ifs_var;
- char *ifs_value;
- unsigned char ifs_cmap[UCHAR_MAX + 1];
-+#if defined (HANDLE_MULTIBYTE)
-+unsigned char ifs_firstc[MB_LEN_MAX];
-+size_t ifs_firstc_len;
-+#else
- unsigned char ifs_firstc;
-+#endif
- 
- /* Extern functions and variables from different files. */
- extern int last_command_exit_value, last_command_exit_signal;
-@@ -862,8 +867,14 @@
-      char *charlist;
- {
-   register int i = *sindex;
-+  size_t slen;
-+#if defined (HANDLE_MULTIBYTE)
-+  size_t clen;
-+  wchar_t *wcharlist = NULL;
-+#endif
-   int c;
-   char *temp;
-+  DECLARE_MBSTATE;
- 
-   if (charlist[0] == '\'' && charlist[1] == '\0')
-     {
-@@ -872,18 +883,65 @@
-       return temp;
-     }
- 
--  for (i = *sindex; c = string[i]; i++)
-+  slen = strlen (string + *sindex) + *sindex;
-+  i = *sindex;
-+#if defined (HANDLE_MULTIBYTE)
-+  clen = strlen (charlist);
-+#endif
-+  while ((c = string[i]))
-     {
-+#if defined (HANDLE_MULTIBYTE)
-+      size_t mblength;
-+#endif
-+
-       if (c == CTLESC)
- 	{
--	  i++;
-+	  i += 2;
- 	  continue;
- 	}
- 
-+#if defined (HANDLE_MULTIBYTE)
-+      mblength = mblen (string + i, slen - i);
-+      if (mblength > 1)
-+	{
-+	  wchar_t wc;
-+	  size_t mblength = mbtowc (&wc, string + i, slen - i);
-+	  if (MB_INVALIDCH (mblength))
-+	    {
-+	      if (MEMBER (c, charlist))
-+		break;
-+	    }
-+	  else
-+	    {
-+	      if (!wcharlist)
-+		{
-+		  size_t len = mbstowcs (wcharlist, charlist, 0);
-+		  if (len == -1)
-+		    len = 0;
-+		  wcharlist = xmalloc (sizeof (wchar_t) * (len + 1));
-+		  mbstowcs (wcharlist, charlist, 1 + len);
-+		}
-+
-+	      if (wcschr (wcharlist, wc))
-+		{
-+		  break;
-+		}
-+	    }
-+	}
-+      else
-+#endif
-+
-       if (MEMBER (c, charlist))
- 	break;
-+
-+      ADVANCE_CHAR (string, slen, i);
-     }
- 
-+#if defined (HANDLE_MULTIBYTE)
-+  if (wcharlist)
-+    free (wcharlist);
-+#endif
-+
-   temp = substring (string, *sindex, i);
-   *sindex = i;
- 
-@@ -1456,11 +1514,36 @@
-   d2 = 0;
-   if (delims)
-     {
--      d2 = (char *)xmalloc (strlen (delims) + 1);
--      for (i = ts = 0; delims[i]; i++)
-+      size_t slength = strlen (delims);
-+#if defined (HANDLE_MULTIBYTE)
-+      size_t mblength = 1;
-+      DECLARE_MBSTATE;
-+#endif
-+
-+      d2 = (char *)xmalloc (slength + 1);
-+      i = ts = 0;
-+      while (delims[i])
- 	{
-+#if defined (HANDLE_MULTIBYTE)
-+	  mbstate_t state_bak = state;
-+	  mblength = mbrlen (delims + i, slength, &state);
-+
-+	  if (MB_INVALIDCH (mblength))
-+	    state = state_bak;
-+	  else if (mblength != 1)
-+	    {
-+	      memcpy (d2 + ts, delims + i, mblength);
-+	      ts += mblength;
-+	      i += mblength;
-+	      slength -= mblength;
-+	      continue;
-+	    }
-+#endif
-+
- 	  if (whitespace(delims[i]) == 0)
- 	    d2[ts++] = delims[i];
-+	  i++;
-+	  slength--;
- 	}
-       d2[ts] = '\0';
-     }
-@@ -1654,10 +1737,19 @@
- string_list_dollar_star (list)
-      WORD_LIST *list;
- {
-+#if defined (HANDLE_MULTIBYTE)
-+  char sep[MB_CUR_MAX + 1];
-+#else
-   char sep[2];
-+#endif
- 
-+#if defined (HANDLE_MULTIBYTE)
-+  memcpy (sep, ifs_firstc, ifs_firstc_len);
-+  sep[ifs_firstc_len] = '\0';
-+#else
-   sep[0] = ifs_firstc;
-   sep[1] = '\0';
-+#endif
- 
-   return (string_list_internal (list, sep));
- }
-@@ -1676,14 +1768,41 @@
-      WORD_LIST *list;
-      int quoted;
- {
--  char *ifs, sep[2];
-+  char *ifs;
-+#if defined (HANDLE_MULTIBYTE)
-+  char sep[MB_CUR_MAX + 1];
-+#else
-+  char sep[2];
-+#endif
-   WORD_LIST *tlist;
- 
-   /* XXX this could just be ifs = ifs_value; */
-   ifs = ifs_var ? value_cell (ifs_var) : (char *)0;
- 
-+#if defined (HANDLE_MULTIBYTE)
-+  if (ifs && *ifs)
-+    {
-+      size_t mblength = mblen (ifs, strnlen (ifs, MB_CUR_MAX));
-+      if (MB_INVALIDCH (mblength))
-+	{
-+	  sep[0] = *ifs;
-+	  sep[1] = '\0';
-+	}
-+      else
-+	{
-+	  memcpy (sep, ifs, mblength);
-+	  sep[mblength] = '\0';
-+	}
-+    }
-+  else
-+    {
-+      sep[0] = ' ';
-+      sep[1] = '\0';
-+    }
-+#else
-   sep[0] = (ifs == 0 || *ifs == 0) ? ' ' : *ifs;
-   sep[1] = '\0';
-+#endif
- 
-   tlist = ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || (ifs && *ifs == 0))
- 		? quote_list (list)
-@@ -1732,6 +1851,7 @@
-   WORD_DESC *t;
-   char *current_word, *s;
-   int sindex, sh_style_split, whitesep;
-+  size_t slen = 0;
- 
-   if (!string || !*string)
-     return ((WORD_LIST *)NULL);
-@@ -1805,7 +1925,12 @@
- 
-       /* Move past the current separator character. */
-       if (string[sindex])
--	sindex++;
-+	{
-+	  DECLARE_MBSTATE;
-+	  if (!slen)
-+	    slen = strlen (string);
-+	  ADVANCE_CHAR (string, slen, sindex);
-+	}
- 
-       /* Now skip sequences of space, tab, or newline characters if they are
- 	 in the list of separators. */
-@@ -6796,7 +6921,27 @@
-       ifs_cmap[uc] = 1;
-     }
- 
-+#if defined (HANDLE_MULTIBYTE)
-+  if (!ifs_value)
-+    {
-+      ifs_firstc[0] = '\0';
-+      ifs_firstc_len = 1;
-+    }
-+  else
-+    {
-+      size_t ifs_len = strnlen (ifs_value, MB_CUR_MAX);
-+      ifs_firstc_len = mblen (ifs_value, ifs_len);
-+      if (MB_INVALIDCH (ifs_firstc_len))
-+        {
-+          ifs_firstc[0] = '\0';
-+          ifs_firstc_len = 1;
-+        }
-+      else
-+        memcpy (ifs_firstc, ifs_value, ifs_firstc_len);
-+    }
-+#else
-   ifs_firstc = ifs_value ? *ifs_value : 0;
-+#endif
- }
- 
- char *
---- bash-3.0/subst.h.multibyteifs	2004-08-20 15:51:08.301074583 +0100
-+++ bash-3.0/subst.h	2004-08-20 15:51:39.070206473 +0100
-@@ -231,7 +231,12 @@
- extern SHELL_VAR *ifs_var;
- extern char *ifs_value;
- extern unsigned char ifs_cmap[];
-+#if defined (HANDLE_MULTIBYTE)
-+extern unsigned char ifs_firstc[];
-+extern size_t ifs_firstc_len;
-+#else
- extern unsigned char ifs_firstc;
-+#endif
- 
- /* Evaluates to 1 if C is a character in $IFS. */
- #define isifs(c)	(ifs_cmap[(unsigned char)(c)] != 0)

diff --git a/app-shells/bash/files/bash-3.0-pwd.patch b/app-shells/bash/files/bash-3.0-pwd.patch
deleted file mode 100644
index 77f0918fb4d..00000000000
--- a/app-shells/bash/files/bash-3.0-pwd.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Ripped from Fedora
-
-* Tue Mar 15 2005 Tim Waugh <twaugh@redhat.com> 3.0-30
-- Fix PS1 expansion crash when PWD is unset (bg #151116).
-
---- bash-3.0/parse.y.pwd	2005-03-15 14:22:36.000000000 +0000
-+++ bash-3.0/parse.y	2005-03-15 14:22:37.000000000 +0000
-@@ -4103,7 +4103,7 @@
- #define ROOT_PATH(x)	((x)[0] == '/' && (x)[1] == 0)
- #define DOUBLE_SLASH_ROOT(x)	((x)[0] == '/' && (x)[1] == '/' && (x)[2] == 0)
- 		/* Abbreviate \W as ~ if $PWD == $HOME */
--		if (c == 'W' && (((t = get_string_value ("HOME")) == 0) || STREQ (t, temp) == 0))
-+		if (c == 'W' && (((t = get_string_value ("HOME")) == 0) || STREQ (t, t_string) == 0))
- 		  {
- 		    if (ROOT_PATH (t_string) == 0 && DOUBLE_SLASH_ROOT (t_string) == 0)
- 		      {

diff --git a/app-shells/bash/files/bash-3.0-subshell.patch b/app-shells/bash/files/bash-3.0-subshell.patch
deleted file mode 100644
index a1d7dfe7d34..00000000000
--- a/app-shells/bash/files/bash-3.0-subshell.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Ripped from Fedora which took this from upstream
-
-* Tue Nov 22 2005 Tim Waugh <twaugh@redhat.com>  3.0-37
-- Applied patch from upstream to fix parsing problem (bug #146638).
-
-http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=146638
-
---- bash-3.0/parse.y.subshell	2005-11-22 13:19:11.000000000 +0000
-+++ bash-3.0/parse.y	2005-11-22 13:19:24.000000000 +0000
-@@ -2055,14 +2055,6 @@
-   if (uc)
-     shell_input_line_index++;
- 
--  if MBTEST(uc == '\\' && remove_quoted_newline && shell_input_line[shell_input_line_index] == '\n')
--    {
--	if (SHOULD_PROMPT ())
--	  prompt_again ();
--	line_number++;
--	goto restart_read;
--    }
--
- #if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
-   /* If UC is NULL, we have reached the end of the current input string.  If
-      pushed_string_list is non-empty, it's time to pop to the previous string
-@@ -2078,6 +2070,14 @@
-     }
- #endif /* ALIAS || DPAREN_ARITHMETIC */
- 
-+  if MBTEST(uc == '\\' && remove_quoted_newline && shell_input_line[shell_input_line_index] == '\n')
-+    {
-+	if (SHOULD_PROMPT ())
-+	  prompt_again ();
-+	line_number++;
-+	goto restart_read;
-+    }
-+
-   if (!uc && shell_input_line_terminator == EOF)
-     return ((shell_input_line_index != 0) ? '\n' : EOF);
- 

diff --git a/app-shells/bash/files/bash-3.0-ulimit.patch b/app-shells/bash/files/bash-3.0-ulimit.patch
deleted file mode 100644
index 8202b95d276..00000000000
--- a/app-shells/bash/files/bash-3.0-ulimit.patch
+++ /dev/null
@@ -1,186 +0,0 @@
-Ripped from Fedora
-
---- bash-3.0/builtins/ulimit.def
-+++ bash-3.0/builtins/ulimit.def
-@@ -34,15 +34,20 @@
-     -a	all current limits are reported
-     -c	the maximum size of core files created
-     -d	the maximum size of a process's data segment
-+    -e	the maximum scheduling priority (`nice')
-     -f	the maximum size of files created by the shell
-+    -i	the maximum number of pending signals
-     -l	the maximum size a process may lock into memory
-     -m	the maximum resident set size
-     -n	the maximum number of open file descriptors
-     -p	the pipe buffer size
-+    -q	the maximum number of bytes in POSIX message queues
-+    -r	the maximum rt priority
-     -s	the maximum stack size
-     -t	the maximum amount of cpu time in seconds
-     -u	the maximum number of user processes
-     -v	the size of virtual memory 
-+    -x	the maximum number of file locks
- 
- If LIMIT is given, it is the new value of the specified resource;
- the special LIMIT values `soft', `hard', and `unlimited' stand for
-@@ -199,7 +204,13 @@
- #ifdef RLIMIT_DATA
-   { 'd',	RLIMIT_DATA,  1024,	"data seg size",	"kbytes" },
- #endif
-+#ifdef RLIMIT_NICE
-+  { 'e',	RLIMIT_NICE, 1,		"max nice",		(char *)NULL},
-+#endif /* RLIMIT_NICE */
-   { 'f',	RLIMIT_FILESIZE, 1024,	"file size",		"blocks" },
-+#ifdef RLIMIT_SIGPENDING
-+  { 'i',	RLIMIT_SIGPENDING, 1,	"pending signals",	(char *)NULL},
-+#endif
- #ifdef RLIMIT_MEMLOCK
-   { 'l',	RLIMIT_MEMLOCK, 1024,	"max locked memory",	"kbytes" },
- #endif
-@@ -208,6 +219,12 @@
- #endif /* RLIMIT_RSS */
-   { 'n',	RLIMIT_OPENFILES, 1,	"open files",		(char *)NULL},
-   { 'p',	RLIMIT_PIPESIZE, 512,	"pipe size", 		"512 bytes" },
-+#ifdef RLIMIT_MSGQUEUE
-+  { 'q',	RLIMIT_MSGQUEUE, 1,	"POSIX message queues",	"bytes" },
-+#endif
-+#ifdef RLIMIT_RTPRIO
-+  { 'r',	RLIMIT_RTPRIO, 1,	"max rt priority",	(char *)NULL},
-+#endif /* RLIMIT_RTPRIO */
- #ifdef RLIMIT_STACK
-   { 's',	RLIMIT_STACK, 1024,	"stack size",		"kbytes" },
- #endif
-@@ -221,6 +238,9 @@
- #ifdef RLIMIT_SWAP
-   { 'w',	RLIMIT_SWAP,	1024,	"swap size",		"kbytes" },
- #endif
-+#ifdef RLIMIT_LOCKS
-+  { 'x',	RLIMIT_LOCKS, 1,	"file locks",		(char *)NULL},
-+#endif
-   { -1, -1, -1, (char *)NULL, (char *)NULL }
- };
- #define NCMDS	(sizeof(limits) / sizeof(limits[0]))
-@@ -647,11 +667,11 @@
- 
-   for (i = 0; limits[i].option > 0; i++)
-     {
--      if (get_limit (i, &softlim, &hardlim) < 0)
-+      if (get_limit (i, &softlim, &hardlim) == 0)
-+	printone (i, (mode & LIMIT_SOFT) ? softlim : hardlim, 1);
-+      else if (errno != EINVAL)
- 	builtin_error ("%s: cannot get limit: %s", limits[i].description,
- 						   strerror (errno));
--      else
--	printone (i, (mode & LIMIT_SOFT) ? softlim : hardlim, 1);
-     }
- }
- 
-@@ -670,7 +690,7 @@
-       else
-         sprintf (unitstr, "(-%c) ", limits[limind].option);
- 
--      printf ("%-18s %16s", limits[limind].description, unitstr);
-+      printf ("%-20s %16s", limits[limind].description, unitstr);
-     }
-   if (curlim == RLIM_INFINITY)
-     puts ("unlimited");
---- bash-3.0/doc/bashref.texi
-+++ bash-3.0/doc/bashref.texi
-@@ -3793,7 +3793,7 @@
- @item ulimit
- @btindex ulimit
- @example
--ulimit [-acdflmnpstuvSH] [@var{limit}]
-+ulimit [-acdeflmnpqrstuvxSH] [@var{limit}]
- @end example
- @code{ulimit} provides control over the resources available to processes
- started by the shell, on systems that allow such control.  If an
-@@ -3814,9 +3814,15 @@
- @item -d
- The maximum size of a process's data segment.
- 
-+@item -e
-+The maximum scheduling priority.
-+
- @item -f
- The maximum size of files created by the shell.
- 
-+@item -i
-+The maximum number of pending signals.
-+
- @item -l
- The maximum size that may be locked into memory.
- 
-@@ -3829,6 +3835,12 @@
- @item -p
- The pipe buffer size.
- 
-+@item -q
-+The maximum number of bytes in POSIX message queues.
-+
-+@item -r
-+The maximum RT priority.
-+
- @item -s
- The maximum stack size.
- 
-@@ -3841,6 +3853,9 @@
- @item -v
- The maximum amount of virtual memory available to the process.
- 
-+@item -x
-+The maximum amount of file locks.
-+
- @end table
- 
- If @var{limit} is given, it is the new value of the specified resource;
---- bash-3.0/doc/bash.1
-+++ bash-3.0/doc/bash.1
-@@ -8362,7 +8362,7 @@
- returns true if any of the arguments are found, false if
- none are found.
- .TP
--\fBulimit\fP [\fB\-SHacdflmnpstuv\fP [\fIlimit\fP]]
-+\fBulimit\fP [\fB\-SHacdefilmnpqrstuvx\fP [\fIlimit\fP]]
- Provides control over the resources available to the shell and to
- processes started by it, on systems that allow such control.
- The \fB\-H\fP and \fB\-S\fP options specify that the hard or soft limit is
-@@ -8398,9 +8398,15 @@
- .B \-d
- The maximum size of a process's data segment
- .TP
-+.B \-e
-+The maximum scheduling priority (`nice')
-+.TP
- .B \-f
- The maximum size of files created by the shell
- .TP
-+.B \-i
-+The maximum number of pending signals
-+.TP
- .B \-l
- The maximum size that may be locked into memory
- .TP
-@@ -8414,6 +8420,12 @@
- .B \-p
- The pipe size in 512-byte blocks (this may not be set)
- .TP
-+.B \-q
-+The maximum number of bytes in POSIX message queues
-+.TP
-+.B \-r
-+The maximum rt priority
-+.TP
- .B \-s
- The maximum stack size
- .TP
-@@ -8425,6 +8437,9 @@
- .TP
- .B \-v
- The maximum amount of virtual memory available to the shell
-+.TP
-+.B \-x
-+The maximum number of file locks
- .PD
- .PP
- If

diff --git a/app-shells/bash/files/bash-3.0-volatile-command.patch b/app-shells/bash/files/bash-3.0-volatile-command.patch
deleted file mode 100644
index 8b89b35914b..00000000000
--- a/app-shells/bash/files/bash-3.0-volatile-command.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Ripped from Debian
-
-# DP: current_command must be declared volatile to prevent assignments from
-#     being optimized away as dead code.  In reality, the use of setjmp/longjmp
-#     makes it not dead code at all.
-
---- eval.old	2003-12-18 23:44:15.000000000 -0500
-+++ eval.c	2005-10-03 01:59:31.000000000 -0400
-@@ -63,7 +63,7 @@
- reader_loop ()
- {
-   int our_indirection_level;
--  COMMAND *current_command = (COMMAND *)NULL;
-+  COMMAND * volatile current_command = (COMMAND *)NULL;
- 
-   USE_VAR(current_command);


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2018-01-04 23:48 Sven Wegener
  0 siblings, 0 replies; 30+ messages in thread
From: Sven Wegener @ 2018-01-04 23:48 UTC (permalink / raw
  To: gentoo-commits

commit:     f0ad1ef0c4826494a4c8bd00fefd4d55931359fc
Author:     Sven Wegener <swegener <AT> gentoo <DOT> org>
AuthorDate: Thu Jan  4 23:47:58 2018 +0000
Commit:     Sven Wegener <swegener <AT> gentoo <DOT> org>
CommitDate: Thu Jan  4 23:48:15 2018 +0000
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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2018-06-26 15:05 Mike Gilbert
  0 siblings, 0 replies; 30+ messages in thread
From: Mike Gilbert @ 2018-06-26 15:05 UTC (permalink / raw
  To: gentoo-commits

commit:     13671a66527e977a4c31979ec6df34ee09c65e25
Author:     Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Wed Jun 13 18:08:16 2018 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Jun 26 15:04:55 2018 +0000
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..00000000000
--- 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.000000000 -0400
---- execute_cmd.c	2014-08-11 16:55:57.000000000 -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..00000000000
--- 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", &shopt_compat32, set_compatibility_level },
-   { "compat40", &shopt_compat40, set_compatibility_level },
-   { "compat41", &shopt_compat41, set_compatibility_level },
--  { "compat42", &shopt_compat41, set_compatibility_level },
-+  { "compat42", &shopt_compat42, set_compatibility_level },
- #if defined (READLINE)
-   { "complete_fullquote", &complete_fullquote, (shopt_set_func_t *)NULL},
-   { "direxpand", &dircomplete_expand, shopt_set_complete_direxpand },


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2019-09-15  7:53 Mike Frysinger
  0 siblings, 0 replies; 30+ messages in thread
From: Mike Frysinger @ 2019-09-15  7:53 UTC (permalink / raw
  To: gentoo-commits

commit:     efb92a51c30ded73401e564c714c951772619485
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 14 18:14:41 2019 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Sep 15 07:50:58 2019 +0000
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 <vapier <AT> 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 00000000000..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.000000000 +0100
++++ bash-3.0/redir.c	2005-04-20 09:16:58.000000000 +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 00000000000..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.c	Mon 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, CWRU    chet@po.cwru.edu    http://tiswww.tis.cwru.edu/~chet/
+
+
+_______________________________________________
+Bug-bash mailing list
+Bug-bash@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 00000000000..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/msg00008.html
+
+From: Enrique Perez-Terron <enrio@online.no>
+To: bug-bash@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 HISTTIMEFORMAT=_A_format_string_
+	$ history 3
+	  997  _A_format_string_echo $BASH_VERSION
+	  998  _A_format_string_export HISTTIMEFORMAT=_A_format_string_
+	  999  _A_format_string_history 3
+
+Fix:
+--- ./builtins/history.def.orig	2003-12-20 00:02:09.000000000 +0100
++++ ./builtins/history.def	2004-08-01 18:18:02.652720102 +0200
+@@ -287,9 +287,10 @@
+ 	  QUIT;
+ 
+ 	  timestr = (histtimefmt && *histtimefmt) ? histtime (hlist[i], histtimefmt) : (char *)NULL;
+-	  printf ("%5d%c %s%s\n", i + history_base,
++	  printf ("%5d%c %s%s%s\n", i + history_base,
+ 		  histdata(i) ? '*' : ' ',
+ 		  ((timestr && *timestr) ? timestr : ""),
++		  ((timestr && *timestr) ? " " : ""),
+ 		  histline(i));
+ 	  i++;
+ 	}

diff --git a/app-shells/bash/files/bash-3.0-jobs.patch b/app-shells/bash/files/bash-3.0-jobs.patch
new file mode 100644
index 00000000000..72c149c71cf
--- /dev/null
+++ b/app-shells/bash/files/bash-3.0-jobs.patch
@@ -0,0 +1,56 @@
+Ripped from Fedora
+
+* Wed Sep  8 2004 Tim Waugh <twaugh@redhat.com> 3.0-13
+- Check for EINVAL from waitpid() and avoid WCONTINUED in that case.
+- Fixed jobs4 test.
+
+From: 	Tim Waugh
+Subject: 	[patch] bash-3.0: avoid WCONTINUED if invalid
+Date: 	Wed, 8 Sep 2004 16:52:38 +0100
+User-agent: 	Mutt/1.4.1i
+
+Hi,
+
+GNU libc defines WCONTINUED, but (at least on Linux 2.4.x kernels)
+waitpid() returns -1 with errno set to EINVAL if WCONTINUED is
+supplied in options.
+
+Here is a patch to retry without WCONTINUED set in that case.
+
+Tim.
+
+--- bash-3.0/tests/jobs4.sub
++++ bash-3.0/tests/jobs4.sub
+@@ -18,5 +18,5 @@
+ 
+ wait
+ 
+-cat &
++sleep 100 &
+ kill -1 %% && echo i killed it || echo could not kill it
+--- bash-3.0/jobs.c
++++ bash-3.0/jobs.c
+@@ -2475,6 +2475,7 @@
+   PROCESS *child;
+   pid_t pid;
+   int call_set_current, last_stopped_job, job, children_exited, waitpid_flags;
++  static int wcontinued_not_supported = 0;
+ 
+   call_set_current = children_exited = 0;
+   last_stopped_job = NO_JOB;
+@@ -2488,7 +2489,15 @@
+ 			: 0;
+       if (sigchld || block == 0)
+ 	waitpid_flags |= WNOHANG;
++    retry:
++      if (wcontinued_not_supported)
++	waitpid_flags &= ~WCONTINUED;
+       pid = WAITPID (-1, &status, waitpid_flags);
++      if (pid == -1 && errno == EINVAL)
++	{
++	  wcontinued_not_supported = 1;
++	  goto retry;
++	}
+ 
+       /* The check for WNOHANG is to make sure we decrement sigchld only
+ 	 if it was non-zero before we called waitpid. */

diff --git a/app-shells/bash/files/bash-3.0-locale.patch b/app-shells/bash/files/bash-3.0-locale.patch
new file mode 100644
index 00000000000..ea1ef3deae3
--- /dev/null
+++ b/app-shells/bash/files/bash-3.0-locale.patch
@@ -0,0 +1,112 @@
+Ripped from SuSe
+
+http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00005.html
+
+From: schwab@suse.de
+To: bug-bash@gnu.org
+Subject: HISTTIMEFORMAT doesn't track locale changes
+Date: Sun,  1 Aug 2004 11:14:00 +0200 (CEST)
+
+Configuration Information [Automatically generated, do not change]:
+Machine: ia64
+OS: linux-gnu
+Compiler: gcc
+Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='ia64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='ia64-unknown-linux-gnu' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H  -I.  -I../bash-3.0 -I../bash-3.0/include -I../bash-3.0/lib   -O2 -g
+uname output: Linux sykes 2.6.5-22-default #1 SMP Fri Jul 2 13:43:23 UTC 2004 ia64 ia64 ia64 GNU/Linux
+Machine Type: ia64-unknown-linux-gnu
+
+Bash Version: 3.0
+Patch Level: 0
+Release Status: release
+
+Description:
+Bash doesn't use the current locale when formatting HISTTIMEFORMAT.
+
+Repeat-By:
+sykes:/tmp/bash/Build/:[0]$ locale
+LANG=de_DE.UTF-8
+LC_CTYPE="de_DE.UTF-8"
+LC_NUMERIC=POSIX
+LC_TIME=POSIX
+LC_COLLATE=POSIX
+LC_MONETARY="de_DE.UTF-8"
+LC_MESSAGES=en_US.UTF-8
+LC_PAPER="de_DE.UTF-8"
+LC_NAME="de_DE.UTF-8"
+LC_ADDRESS="de_DE.UTF-8"
+LC_TELEPHONE="de_DE.UTF-8"
+LC_MEASUREMENT="de_DE.UTF-8"
+LC_IDENTIFICATION="de_DE.UTF-8"
+LC_ALL=
+sykes:/tmp/bash/Build/:[0]$ history 1
+ 1502  history 1
+sykes:/tmp/bash/Build/:[0]$ HISTTIMEFORMAT=%c
+sykes:/tmp/bash/Build/:[0]$ history 1
+ 1504  Sun Aug  1 10:56:59 2004history 1
+sykes:/tmp/bash/Build/:[0]$ export LC_TIME=$LANG
+sykes:/tmp/bash/Build/:[0]$ history 1
+ 1506  Sun Aug  1 10:57:24 2004history 1
+
+--- bash-3.0/locale.c
++++ bash-3.0/locale.c
+@@ -71,9 +71,10 @@ set_default_locale ()
+   textdomain (PACKAGE);
+ }
+ 
+-/* Set default values for LC_CTYPE, LC_COLLATE, LC_MESSAGES and LC_NUMERIC
+-   if they are not specified in the environment, but LC_ALL is.  This
+-   should be called from main() after parsing the environment. */
++/* Set default values for LC_CTYPE, LC_COLLATE, LC_MESSAGES, LC_NUMERIC
++   and LC_TIME if they are not specified in the environment, but LC_ALL
++   is.  This should be called from main() after parsing the
++   environment. */
+ void
+ set_default_locale_vars ()
+ {
+@@ -109,6 +110,12 @@ set_default_locale_vars ()
+     setlocale (LC_NUMERIC, lc_all);
+ #  endif /* LC_NUMERIC */
+ 
++#  if defined (LC_TIME)
++  val = get_string_value ("LC_TIME");
++  if (val == 0 && lc_all && *lc_all)
++    setlocale (LC_TIME, lc_all);
++#  endif /* LC_TIME */
++
+ #endif /* HAVE_SETLOCALE */
+ 
+   val = get_string_value ("TEXTDOMAIN");
+@@ -213,6 +220,13 @@ set_locale_var (var, value)
+ 	return (setlocale (LC_NUMERIC, get_locale_var ("LC_NUMERIC")) != 0);
+ #  endif /* LC_NUMERIC */
+     }
++  else if (var[3] == 'T' && var[4] == 'I')	/* LC_TIME */
++    {
++#  if defined (LC_TIME)
++      if (lc_all == 0 || *lc_all == '\0')
++	return (setlocale (LC_TIME, get_locale_var ("LC_TIME")) != 0);
++#  endif /* LC_TIME */
++    }
+ #endif /* HAVE_SETLOCALE */
+ 
+   return (0);
+@@ -285,6 +299,9 @@ reset_locale_vars ()
+ #  if defined (LC_NUMERIC)
+   setlocale (LC_NUMERIC, get_locale_var ("LC_NUMERIC"));
+ #  endif
++#  if defined (LC_TIME)
++  setlocale (LC_TIME, get_locale_var ("LC_TIME"));
++#  endif
+ 
+   locale_setblanks ();  
+ 
+--- bash-3.0/variables.c
++++ bash-3.0/variables.c
+@@ -3646,6 +3646,7 @@ static struct name_and_function special_
+   { "LC_CTYPE", sv_locale },
+   { "LC_MESSAGES", sv_locale },
+   { "LC_NUMERIC", sv_locale },
++  { "LC_TIME", sv_locale },
+ 
+   { "MAIL", sv_mail },
+   { "MAILCHECK", sv_mail },

diff --git a/app-shells/bash/files/bash-3.0-manpage.patch b/app-shells/bash/files/bash-3.0-manpage.patch
new file mode 100644
index 00000000000..08e3143e542
--- /dev/null
+++ b/app-shells/bash/files/bash-3.0-manpage.patch
@@ -0,0 +1,15 @@
+Ripped from Fedora
+
+fix obvious display bug
+
+--- bash-3.0/doc/bash.1
++++ bash-3.0/doc/bash.1
+@@ -3929,7 +3929,7 @@
+ .B SIGHUP
+ to all jobs when an interactive login shell exits.
+ .PP
+-If \Bbash\fP is waiting for a command to complete and receives a signal
++If \fBbash\fP is waiting for a command to complete and receives a signal
+ for which a trap has been set, the trap will not be executed until
+ the command completes. 
+ When \fBbash\fP is waiting for an asynchronous command via the \fBwait\fP

diff --git a/app-shells/bash/files/bash-3.0-multibyteifs.patch b/app-shells/bash/files/bash-3.0-multibyteifs.patch
new file mode 100644
index 00000000000..1e74832b638
--- /dev/null
+++ b/app-shells/bash/files/bash-3.0-multibyteifs.patch
@@ -0,0 +1,281 @@
+From: Tim Waugh <twaugh@redhat.com>
+To: bug-bash@gnu.org
+Subject: [patch] multibyte IFS values
+Date: Tue, 24 Aug 2004 13:34:59 +0100
+
+Hi,
+
+Here is a patch to address these problems:
+
+http://lists.gnu.org/archive/html/bug-bash/2004-07/msg00294.html
+http://lists.gnu.org/archive/html/bug-bash/2004-07/msg00296.html
+
+It works well for me at least.
+
+Tim.
+
+--- bash-3.0/subst.c.multibyteifs	2004-08-20 15:22:48.366497771 +0100
++++ bash-3.0/subst.c	2004-08-20 18:13:30.833624616 +0100
+@@ -124,7 +124,12 @@
+ SHELL_VAR *ifs_var;
+ char *ifs_value;
+ unsigned char ifs_cmap[UCHAR_MAX + 1];
++#if defined (HANDLE_MULTIBYTE)
++unsigned char ifs_firstc[MB_LEN_MAX];
++size_t ifs_firstc_len;
++#else
+ unsigned char ifs_firstc;
++#endif
+ 
+ /* Extern functions and variables from different files. */
+ extern int last_command_exit_value, last_command_exit_signal;
+@@ -862,8 +867,14 @@
+      char *charlist;
+ {
+   register int i = *sindex;
++  size_t slen;
++#if defined (HANDLE_MULTIBYTE)
++  size_t clen;
++  wchar_t *wcharlist = NULL;
++#endif
+   int c;
+   char *temp;
++  DECLARE_MBSTATE;
+ 
+   if (charlist[0] == '\'' && charlist[1] == '\0')
+     {
+@@ -872,18 +883,65 @@
+       return temp;
+     }
+ 
+-  for (i = *sindex; c = string[i]; i++)
++  slen = strlen (string + *sindex) + *sindex;
++  i = *sindex;
++#if defined (HANDLE_MULTIBYTE)
++  clen = strlen (charlist);
++#endif
++  while ((c = string[i]))
+     {
++#if defined (HANDLE_MULTIBYTE)
++      size_t mblength;
++#endif
++
+       if (c == CTLESC)
+ 	{
+-	  i++;
++	  i += 2;
+ 	  continue;
+ 	}
+ 
++#if defined (HANDLE_MULTIBYTE)
++      mblength = mblen (string + i, slen - i);
++      if (mblength > 1)
++	{
++	  wchar_t wc;
++	  size_t mblength = mbtowc (&wc, string + i, slen - i);
++	  if (MB_INVALIDCH (mblength))
++	    {
++	      if (MEMBER (c, charlist))
++		break;
++	    }
++	  else
++	    {
++	      if (!wcharlist)
++		{
++		  size_t len = mbstowcs (wcharlist, charlist, 0);
++		  if (len == -1)
++		    len = 0;
++		  wcharlist = xmalloc (sizeof (wchar_t) * (len + 1));
++		  mbstowcs (wcharlist, charlist, 1 + len);
++		}
++
++	      if (wcschr (wcharlist, wc))
++		{
++		  break;
++		}
++	    }
++	}
++      else
++#endif
++
+       if (MEMBER (c, charlist))
+ 	break;
++
++      ADVANCE_CHAR (string, slen, i);
+     }
+ 
++#if defined (HANDLE_MULTIBYTE)
++  if (wcharlist)
++    free (wcharlist);
++#endif
++
+   temp = substring (string, *sindex, i);
+   *sindex = i;
+ 
+@@ -1456,11 +1514,36 @@
+   d2 = 0;
+   if (delims)
+     {
+-      d2 = (char *)xmalloc (strlen (delims) + 1);
+-      for (i = ts = 0; delims[i]; i++)
++      size_t slength = strlen (delims);
++#if defined (HANDLE_MULTIBYTE)
++      size_t mblength = 1;
++      DECLARE_MBSTATE;
++#endif
++
++      d2 = (char *)xmalloc (slength + 1);
++      i = ts = 0;
++      while (delims[i])
+ 	{
++#if defined (HANDLE_MULTIBYTE)
++	  mbstate_t state_bak = state;
++	  mblength = mbrlen (delims + i, slength, &state);
++
++	  if (MB_INVALIDCH (mblength))
++	    state = state_bak;
++	  else if (mblength != 1)
++	    {
++	      memcpy (d2 + ts, delims + i, mblength);
++	      ts += mblength;
++	      i += mblength;
++	      slength -= mblength;
++	      continue;
++	    }
++#endif
++
+ 	  if (whitespace(delims[i]) == 0)
+ 	    d2[ts++] = delims[i];
++	  i++;
++	  slength--;
+ 	}
+       d2[ts] = '\0';
+     }
+@@ -1654,10 +1737,19 @@
+ string_list_dollar_star (list)
+      WORD_LIST *list;
+ {
++#if defined (HANDLE_MULTIBYTE)
++  char sep[MB_CUR_MAX + 1];
++#else
+   char sep[2];
++#endif
+ 
++#if defined (HANDLE_MULTIBYTE)
++  memcpy (sep, ifs_firstc, ifs_firstc_len);
++  sep[ifs_firstc_len] = '\0';
++#else
+   sep[0] = ifs_firstc;
+   sep[1] = '\0';
++#endif
+ 
+   return (string_list_internal (list, sep));
+ }
+@@ -1676,14 +1768,41 @@
+      WORD_LIST *list;
+      int quoted;
+ {
+-  char *ifs, sep[2];
++  char *ifs;
++#if defined (HANDLE_MULTIBYTE)
++  char sep[MB_CUR_MAX + 1];
++#else
++  char sep[2];
++#endif
+   WORD_LIST *tlist;
+ 
+   /* XXX this could just be ifs = ifs_value; */
+   ifs = ifs_var ? value_cell (ifs_var) : (char *)0;
+ 
++#if defined (HANDLE_MULTIBYTE)
++  if (ifs && *ifs)
++    {
++      size_t mblength = mblen (ifs, strnlen (ifs, MB_CUR_MAX));
++      if (MB_INVALIDCH (mblength))
++	{
++	  sep[0] = *ifs;
++	  sep[1] = '\0';
++	}
++      else
++	{
++	  memcpy (sep, ifs, mblength);
++	  sep[mblength] = '\0';
++	}
++    }
++  else
++    {
++      sep[0] = ' ';
++      sep[1] = '\0';
++    }
++#else
+   sep[0] = (ifs == 0 || *ifs == 0) ? ' ' : *ifs;
+   sep[1] = '\0';
++#endif
+ 
+   tlist = ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || (ifs && *ifs == 0))
+ 		? quote_list (list)
+@@ -1732,6 +1851,7 @@
+   WORD_DESC *t;
+   char *current_word, *s;
+   int sindex, sh_style_split, whitesep;
++  size_t slen = 0;
+ 
+   if (!string || !*string)
+     return ((WORD_LIST *)NULL);
+@@ -1805,7 +1925,12 @@
+ 
+       /* Move past the current separator character. */
+       if (string[sindex])
+-	sindex++;
++	{
++	  DECLARE_MBSTATE;
++	  if (!slen)
++	    slen = strlen (string);
++	  ADVANCE_CHAR (string, slen, sindex);
++	}
+ 
+       /* Now skip sequences of space, tab, or newline characters if they are
+ 	 in the list of separators. */
+@@ -6796,7 +6921,27 @@
+       ifs_cmap[uc] = 1;
+     }
+ 
++#if defined (HANDLE_MULTIBYTE)
++  if (!ifs_value)
++    {
++      ifs_firstc[0] = '\0';
++      ifs_firstc_len = 1;
++    }
++  else
++    {
++      size_t ifs_len = strnlen (ifs_value, MB_CUR_MAX);
++      ifs_firstc_len = mblen (ifs_value, ifs_len);
++      if (MB_INVALIDCH (ifs_firstc_len))
++        {
++          ifs_firstc[0] = '\0';
++          ifs_firstc_len = 1;
++        }
++      else
++        memcpy (ifs_firstc, ifs_value, ifs_firstc_len);
++    }
++#else
+   ifs_firstc = ifs_value ? *ifs_value : 0;
++#endif
+ }
+ 
+ char *
+--- bash-3.0/subst.h.multibyteifs	2004-08-20 15:51:08.301074583 +0100
++++ bash-3.0/subst.h	2004-08-20 15:51:39.070206473 +0100
+@@ -231,7 +231,12 @@
+ extern SHELL_VAR *ifs_var;
+ extern char *ifs_value;
+ extern unsigned char ifs_cmap[];
++#if defined (HANDLE_MULTIBYTE)
++extern unsigned char ifs_firstc[];
++extern size_t ifs_firstc_len;
++#else
+ extern unsigned char ifs_firstc;
++#endif
+ 
+ /* Evaluates to 1 if C is a character in $IFS. */
+ #define isifs(c)	(ifs_cmap[(unsigned char)(c)] != 0)

diff --git a/app-shells/bash/files/bash-3.0-pwd.patch b/app-shells/bash/files/bash-3.0-pwd.patch
new file mode 100644
index 00000000000..77f0918fb4d
--- /dev/null
+++ b/app-shells/bash/files/bash-3.0-pwd.patch
@@ -0,0 +1,16 @@
+Ripped from Fedora
+
+* Tue Mar 15 2005 Tim Waugh <twaugh@redhat.com> 3.0-30
+- Fix PS1 expansion crash when PWD is unset (bg #151116).
+
+--- bash-3.0/parse.y.pwd	2005-03-15 14:22:36.000000000 +0000
++++ bash-3.0/parse.y	2005-03-15 14:22:37.000000000 +0000
+@@ -4103,7 +4103,7 @@
+ #define ROOT_PATH(x)	((x)[0] == '/' && (x)[1] == 0)
+ #define DOUBLE_SLASH_ROOT(x)	((x)[0] == '/' && (x)[1] == '/' && (x)[2] == 0)
+ 		/* Abbreviate \W as ~ if $PWD == $HOME */
+-		if (c == 'W' && (((t = get_string_value ("HOME")) == 0) || STREQ (t, temp) == 0))
++		if (c == 'W' && (((t = get_string_value ("HOME")) == 0) || STREQ (t, t_string) == 0))
+ 		  {
+ 		    if (ROOT_PATH (t_string) == 0 && DOUBLE_SLASH_ROOT (t_string) == 0)
+ 		      {

diff --git a/app-shells/bash/files/bash-3.0-subshell.patch b/app-shells/bash/files/bash-3.0-subshell.patch
new file mode 100644
index 00000000000..a1d7dfe7d34
--- /dev/null
+++ b/app-shells/bash/files/bash-3.0-subshell.patch
@@ -0,0 +1,39 @@
+Ripped from Fedora which took this from upstream
+
+* Tue Nov 22 2005 Tim Waugh <twaugh@redhat.com>  3.0-37
+- Applied patch from upstream to fix parsing problem (bug #146638).
+
+http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=146638
+
+--- bash-3.0/parse.y.subshell	2005-11-22 13:19:11.000000000 +0000
++++ bash-3.0/parse.y	2005-11-22 13:19:24.000000000 +0000
+@@ -2055,14 +2055,6 @@
+   if (uc)
+     shell_input_line_index++;
+ 
+-  if MBTEST(uc == '\\' && remove_quoted_newline && shell_input_line[shell_input_line_index] == '\n')
+-    {
+-	if (SHOULD_PROMPT ())
+-	  prompt_again ();
+-	line_number++;
+-	goto restart_read;
+-    }
+-
+ #if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
+   /* If UC is NULL, we have reached the end of the current input string.  If
+      pushed_string_list is non-empty, it's time to pop to the previous string
+@@ -2078,6 +2070,14 @@
+     }
+ #endif /* ALIAS || DPAREN_ARITHMETIC */
+ 
++  if MBTEST(uc == '\\' && remove_quoted_newline && shell_input_line[shell_input_line_index] == '\n')
++    {
++	if (SHOULD_PROMPT ())
++	  prompt_again ();
++	line_number++;
++	goto restart_read;
++    }
++
+   if (!uc && shell_input_line_terminator == EOF)
+     return ((shell_input_line_index != 0) ? '\n' : EOF);
+ 

diff --git a/app-shells/bash/files/bash-3.0-ulimit.patch b/app-shells/bash/files/bash-3.0-ulimit.patch
new file mode 100644
index 00000000000..8202b95d276
--- /dev/null
+++ b/app-shells/bash/files/bash-3.0-ulimit.patch
@@ -0,0 +1,186 @@
+Ripped from Fedora
+
+--- bash-3.0/builtins/ulimit.def
++++ bash-3.0/builtins/ulimit.def
+@@ -34,15 +34,20 @@
+     -a	all current limits are reported
+     -c	the maximum size of core files created
+     -d	the maximum size of a process's data segment
++    -e	the maximum scheduling priority (`nice')
+     -f	the maximum size of files created by the shell
++    -i	the maximum number of pending signals
+     -l	the maximum size a process may lock into memory
+     -m	the maximum resident set size
+     -n	the maximum number of open file descriptors
+     -p	the pipe buffer size
++    -q	the maximum number of bytes in POSIX message queues
++    -r	the maximum rt priority
+     -s	the maximum stack size
+     -t	the maximum amount of cpu time in seconds
+     -u	the maximum number of user processes
+     -v	the size of virtual memory 
++    -x	the maximum number of file locks
+ 
+ If LIMIT is given, it is the new value of the specified resource;
+ the special LIMIT values `soft', `hard', and `unlimited' stand for
+@@ -199,7 +204,13 @@
+ #ifdef RLIMIT_DATA
+   { 'd',	RLIMIT_DATA,  1024,	"data seg size",	"kbytes" },
+ #endif
++#ifdef RLIMIT_NICE
++  { 'e',	RLIMIT_NICE, 1,		"max nice",		(char *)NULL},
++#endif /* RLIMIT_NICE */
+   { 'f',	RLIMIT_FILESIZE, 1024,	"file size",		"blocks" },
++#ifdef RLIMIT_SIGPENDING
++  { 'i',	RLIMIT_SIGPENDING, 1,	"pending signals",	(char *)NULL},
++#endif
+ #ifdef RLIMIT_MEMLOCK
+   { 'l',	RLIMIT_MEMLOCK, 1024,	"max locked memory",	"kbytes" },
+ #endif
+@@ -208,6 +219,12 @@
+ #endif /* RLIMIT_RSS */
+   { 'n',	RLIMIT_OPENFILES, 1,	"open files",		(char *)NULL},
+   { 'p',	RLIMIT_PIPESIZE, 512,	"pipe size", 		"512 bytes" },
++#ifdef RLIMIT_MSGQUEUE
++  { 'q',	RLIMIT_MSGQUEUE, 1,	"POSIX message queues",	"bytes" },
++#endif
++#ifdef RLIMIT_RTPRIO
++  { 'r',	RLIMIT_RTPRIO, 1,	"max rt priority",	(char *)NULL},
++#endif /* RLIMIT_RTPRIO */
+ #ifdef RLIMIT_STACK
+   { 's',	RLIMIT_STACK, 1024,	"stack size",		"kbytes" },
+ #endif
+@@ -221,6 +238,9 @@
+ #ifdef RLIMIT_SWAP
+   { 'w',	RLIMIT_SWAP,	1024,	"swap size",		"kbytes" },
+ #endif
++#ifdef RLIMIT_LOCKS
++  { 'x',	RLIMIT_LOCKS, 1,	"file locks",		(char *)NULL},
++#endif
+   { -1, -1, -1, (char *)NULL, (char *)NULL }
+ };
+ #define NCMDS	(sizeof(limits) / sizeof(limits[0]))
+@@ -647,11 +667,11 @@
+ 
+   for (i = 0; limits[i].option > 0; i++)
+     {
+-      if (get_limit (i, &softlim, &hardlim) < 0)
++      if (get_limit (i, &softlim, &hardlim) == 0)
++	printone (i, (mode & LIMIT_SOFT) ? softlim : hardlim, 1);
++      else if (errno != EINVAL)
+ 	builtin_error ("%s: cannot get limit: %s", limits[i].description,
+ 						   strerror (errno));
+-      else
+-	printone (i, (mode & LIMIT_SOFT) ? softlim : hardlim, 1);
+     }
+ }
+ 
+@@ -670,7 +690,7 @@
+       else
+         sprintf (unitstr, "(-%c) ", limits[limind].option);
+ 
+-      printf ("%-18s %16s", limits[limind].description, unitstr);
++      printf ("%-20s %16s", limits[limind].description, unitstr);
+     }
+   if (curlim == RLIM_INFINITY)
+     puts ("unlimited");
+--- bash-3.0/doc/bashref.texi
++++ bash-3.0/doc/bashref.texi
+@@ -3793,7 +3793,7 @@
+ @item ulimit
+ @btindex ulimit
+ @example
+-ulimit [-acdflmnpstuvSH] [@var{limit}]
++ulimit [-acdeflmnpqrstuvxSH] [@var{limit}]
+ @end example
+ @code{ulimit} provides control over the resources available to processes
+ started by the shell, on systems that allow such control.  If an
+@@ -3814,9 +3814,15 @@
+ @item -d
+ The maximum size of a process's data segment.
+ 
++@item -e
++The maximum scheduling priority.
++
+ @item -f
+ The maximum size of files created by the shell.
+ 
++@item -i
++The maximum number of pending signals.
++
+ @item -l
+ The maximum size that may be locked into memory.
+ 
+@@ -3829,6 +3835,12 @@
+ @item -p
+ The pipe buffer size.
+ 
++@item -q
++The maximum number of bytes in POSIX message queues.
++
++@item -r
++The maximum RT priority.
++
+ @item -s
+ The maximum stack size.
+ 
+@@ -3841,6 +3853,9 @@
+ @item -v
+ The maximum amount of virtual memory available to the process.
+ 
++@item -x
++The maximum amount of file locks.
++
+ @end table
+ 
+ If @var{limit} is given, it is the new value of the specified resource;
+--- bash-3.0/doc/bash.1
++++ bash-3.0/doc/bash.1
+@@ -8362,7 +8362,7 @@
+ returns true if any of the arguments are found, false if
+ none are found.
+ .TP
+-\fBulimit\fP [\fB\-SHacdflmnpstuv\fP [\fIlimit\fP]]
++\fBulimit\fP [\fB\-SHacdefilmnpqrstuvx\fP [\fIlimit\fP]]
+ Provides control over the resources available to the shell and to
+ processes started by it, on systems that allow such control.
+ The \fB\-H\fP and \fB\-S\fP options specify that the hard or soft limit is
+@@ -8398,9 +8398,15 @@
+ .B \-d
+ The maximum size of a process's data segment
+ .TP
++.B \-e
++The maximum scheduling priority (`nice')
++.TP
+ .B \-f
+ The maximum size of files created by the shell
+ .TP
++.B \-i
++The maximum number of pending signals
++.TP
+ .B \-l
+ The maximum size that may be locked into memory
+ .TP
+@@ -8414,6 +8420,12 @@
+ .B \-p
+ The pipe size in 512-byte blocks (this may not be set)
+ .TP
++.B \-q
++The maximum number of bytes in POSIX message queues
++.TP
++.B \-r
++The maximum rt priority
++.TP
+ .B \-s
+ The maximum stack size
+ .TP
+@@ -8425,6 +8437,9 @@
+ .TP
+ .B \-v
+ The maximum amount of virtual memory available to the shell
++.TP
++.B \-x
++The maximum number of file locks
+ .PD
+ .PP
+ If

diff --git a/app-shells/bash/files/bash-3.0-volatile-command.patch b/app-shells/bash/files/bash-3.0-volatile-command.patch
new file mode 100644
index 00000000000..8b89b35914b
--- /dev/null
+++ b/app-shells/bash/files/bash-3.0-volatile-command.patch
@@ -0,0 +1,16 @@
+Ripped from Debian
+
+# DP: current_command must be declared volatile to prevent assignments from
+#     being optimized away as dead code.  In reality, the use of setjmp/longjmp
+#     makes it not dead code at all.
+
+--- eval.old	2003-12-18 23:44:15.000000000 -0500
++++ eval.c	2005-10-03 01:59:31.000000000 -0400
+@@ -63,7 +63,7 @@
+ reader_loop ()
+ {
+   int our_indirection_level;
+-  COMMAND *current_command = (COMMAND *)NULL;
++  COMMAND * volatile current_command = (COMMAND *)NULL;
+ 
+   USE_VAR(current_command);


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2020-06-13 16:24 Mike Gilbert
  0 siblings, 0 replies; 30+ messages in thread
From: Mike Gilbert @ 2020-06-13 16:24 UTC (permalink / raw
  To: gentoo-commits

commit:     99b50bea47e7db27ad2bef976ed1e649becc705b
Author:     Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Sat Jun 13 08:07:12 2020 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Jun 13 16:24:45 2020 +0000
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 <m.mairkeimberger <AT> gmail.com>
Signed-off-by: Mike Gilbert <floppym <AT> 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..00000000000
--- a/app-shells/bash/files/bash-5.0-assignment-preceding-builtin.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-*** ../bash-5.0-patched/variables.c	2018-12-18 11:07:21.000000000 -0500
---- variables.c	2019-03-20 10:30:56.000000000 -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;
-  
-


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2020-12-01 13:16 Lars Wendler
  0 siblings, 0 replies; 30+ messages in thread
From: Lars Wendler @ 2020-12-01 13:16 UTC (permalink / raw
  To: gentoo-commits

commit:     ca824f512dac614cc67d618e726582e8a4ff0f7b
Author:     Marios Titas <redneb <AT> gmx <DOT> com>
AuthorDate: Mon Nov 30 05:39:16 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Dec  1 13:15:57 2020 +0000
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 <redneb <AT> gmx.com>
Closes: https://github.com/gentoo/gentoo/pull/18453
Signed-off-by: Lars Wendler <polynomial-c <AT> 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
 


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2021-05-29 18:51 Lars Wendler
  0 siblings, 0 replies; 30+ messages in thread
From: Lars Wendler @ 2021-05-29 18:51 UTC (permalink / raw
  To: gentoo-commits

commit:     b998b780c790cb25d8a2323af4d0fe82b9b1d2b5
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sat May 29 18:34:20 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sat May 29 18:51:05 2021 +0000
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 <polynomial-c <AT> 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 \$ '


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2021-07-10 21:16 Conrad Kostecki
  0 siblings, 0 replies; 30+ messages in thread
From: Conrad Kostecki @ 2021-07-10 21:16 UTC (permalink / raw
  To: gentoo-commits

commit:     cdf75470811178fd2712bf0780d4d6dd8b3f02f4
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Fri May  7 18:09:30 2021 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sat Jul 10 21:04:42 2021 +0000
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 <mmk <AT> levelnine.at>
Signed-off-by: Conrad Kostecki <conikost <AT> 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..00000000000
--- 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.000000000 -0700
-+++ config.h.in	2019-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.000000000 -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.000000000 -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.000000000 -0700
-+++ shell.c	2019-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..00000000000
--- 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 "	  ***********************************************************"


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2022-09-11 23:13 Mike Gilbert
  0 siblings, 0 replies; 30+ messages in thread
From: Mike Gilbert @ 2022-09-11 23:13 UTC (permalink / raw
  To: gentoo-commits

commit:     04add5d9bfe8a7b790ad8564e11f7c5bd7846139
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 11 23:10:25 2022 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Sep 11 23:10:25 2022 +0000
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 <floppym <AT> 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 \$ '


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2022-11-16 18:36 Conrad Kostecki
  0 siblings, 0 replies; 30+ messages in thread
From: Conrad Kostecki @ 2022-11-16 18:36 UTC (permalink / raw
  To: gentoo-commits

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

app-shells/bash: remove unused patches

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/28299
Signed-off-by: Conrad Kostecki <conikost <AT> 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..000000000000
--- 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&id=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..000000000000
--- 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/msg00001.html
-https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=22f21b760ed90eb77c3756e6ccf39b73c84f532a
-
---- MANIFEST
-+++ MANIFEST
-@@ -1131,6 +1131,7 @@ tests/extglob4.sub	f
- tests/extglob5.sub	f
- tests/extglob6.sub	f
- tests/extglob7.sub	f
-+tests/extglob8.sub	f
- 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", &debugging_mode, shopt_set_debug_mode },
- #endif
- #if defined (EXTENDED_GLOB)
--  { "extglob", &extended_glob, (shopt_set_func_t *)NULL },
-+  { "extglob", &extglob_flag, shopt_set_extglob },
- #endif
-   { "extquote", &extended_quote, (shopt_set_func_t *)NULL },
-   { "failglob", &fail_glob_expansion, (shopt_set_func_t *)NULL },
-@@ -374,7 +379,7 @@ reset_shopt_options ()
- #endif
- 
- #if defined (EXTENDED_GLOB)
--  extended_glob = EXTGLOB_DEFAULT;
-+  extended_glob = extglob_flag = EXTGLOB_DEFAULT;
- #endif
- 
- #if defined (ARRAY_VARS)
-@@ -631,11 +636,24 @@ shopt_set_debug_mode (option_name, mode)
-   return (0);
- }
- 
-+#if defined (EXTENDED_GLOB)
-+static int
-+shopt_set_extglob (option_name, mode)
-+     char *option_name;
-+     int mode;
-+{
-+  extended_glob = extglob_flag;
-+  return 0;
-+}
-+#endif
-+
- #if defined (READLINE)
- static int
- shopt_enable_hostname_completion (option_name, mode)
-      char *option_name;
-      int mode;
-+
-+
- {
-   return (enable_hostname_completion (mode));
- }
---- execute_cmd.c
-+++ execute_cmd.c
-@@ -3990,13 +3990,11 @@ execute_cond_node (cond)
-       else
- #endif /* COND_REGEXP */
- 	{
--	  int oe;
--	  oe = extended_glob;
- 	  extended_glob = 1;
- 	  result = binary_test (cond->op->word, arg1, arg2, TEST_PATMATCH|TEST_ARITHEXP|TEST_LOCALE)
- 				  ? EXECUTION_SUCCESS
- 				  : EXECUTION_FAILURE;
--	  extended_glob = oe;
-+	  extended_glob = extglob_flag;
- 	}
-       if (arg1 != nullstr)
- 	free (arg1);
---- parse.y
-+++ parse.y
-@@ -125,7 +125,7 @@ do { \
- } while (0)
- 
- #if defined (EXTENDED_GLOB)
--extern int extended_glob;
-+extern int extended_glob, extglob_flag;
- #endif
- 
- #if defined (TRANSLATABLE_STRINGS)
-@@ -312,8 +312,6 @@ static int token_before_that;
- /* The token read prior to token_before_that. */
- static int two_tokens_ago;
- 
--static int global_extglob;
--
- /* The line number in a script where the word in a `case WORD', `select WORD'
-    or `for WORD' begins.  This is a nested command maximum, since the array
-    index is decremented after a case, select, or for command is parsed. */
-@@ -3304,7 +3302,7 @@ reset_parser ()
- #if defined (EXTENDED_GLOB)
-   /* Reset to global value of extended glob */
-   if (parser_state & (PST_EXTPAT|PST_CMDSUBST))
--    extended_glob = global_extglob;
-+    extended_glob = extglob_flag;
- #endif
- 
-   parser_state = 0;
-@@ -4118,10 +4116,10 @@ parse_comsub (qc, open, close, lenp, flags)
-     expand_aliases = posixly_correct != 0;
- #if defined (EXTENDED_GLOB)
-   /* If (parser_state & PST_EXTPAT), we're parsing an extended pattern for a
--     conditional command and have already set global_extglob appropriately. */
-+     conditional command and have already set extended_glob appropriately. */
-   if (shell_compatibility_level <= 51 && was_extpat == 0)
-     {
--      local_extglob = global_extglob = extended_glob;
-+      local_extglob = extended_glob;
-       extended_glob = 1;
-     }
- #endif
-@@ -4229,7 +4227,7 @@ xparse_dolparen (base, string, indp, flags)
- {
-   sh_parser_state_t ps;
-   sh_input_line_state_t ls;
--  int orig_ind, nc, sflags, start_lineno;
-+  int orig_ind, nc, sflags, start_lineno, local_extglob;
-   char *ret, *ep, *ostring;
- 
- /*debug_parser(1);*/
-@@ -4272,7 +4270,7 @@ xparse_dolparen (base, string, indp, flags)
-      old value will be restored by restore_parser_state(). */
-   expand_aliases = 0;
- #if defined (EXTENDED_GLOB)
--  global_extglob = extended_glob;		/* for reset_parser() */
-+  local_extglob = extended_glob;
- #endif
- 
-   token_to_read = DOLPAREN;			/* let's trick the parser */
-@@ -4290,6 +4288,9 @@ xparse_dolparen (base, string, indp, flags)
-   restore_input_line_state (&ls);
-   restore_parser_state (&ps);
- 
-+#if defined (EXTENDED_GLOB)
-+  extended_glob = local_extglob;
-+#endif
-   token_to_read = 0;
- 
-   /* If parse_string returns < 0, we need to jump to top level with the
-@@ -4724,12 +4725,16 @@ cond_term ()
- 	}
- 
-       /* rhs */
-+#if defined (EXTENDED_GLOB)
-       local_extglob = extended_glob;
-       if (parser_state & PST_EXTPAT)
- 	extended_glob = 1;
-+#endif
-       tok = read_token (READ);
-+#if defined (EXTENDED_GLOB)
-       if (parser_state & PST_EXTPAT)
- 	extended_glob = local_extglob;
-+#endif
-       parser_state &= ~(PST_REGEXP|PST_EXTPAT);
- 
-       if (tok == WORD)
-@@ -4776,7 +4781,6 @@ parse_cond_command ()
- {
-   COND_COM *cexp;
- 
--  global_extglob = extended_glob;
-   cexp = cond_expr ();
-   return (make_cond_command (cexp));
- }
---- patchlevel.h
-+++ patchlevel.h
-@@ -1,6 +1,6 @@
- /* patchlevel.h -- current bash patch level */
- 
--/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
-+/* Copyright (C) 2001-2022 Free Software Foundation, Inc.
- 
-    This file is part of GNU Bash, the Bourne Again SHell.
- 
---- tests/extglob.right
-+++ tests/extglob.right
-@@ -182,3 +182,10 @@ no dotglob: .a .foo bar
- ? . .. .a .foo
- *
- bar
-+extglob        	off
-+x
-+extglob        	off
-+extglob        	off
-+extglob        	off
-+extglob        	off
-+extglob        	off
---- tests/extglob.tests
-+++ tests/extglob.tests
-@@ -386,5 +386,6 @@ ${THIS_SH} ./extglob4.sub
- ${THIS_SH} ./extglob5.sub
- ${THIS_SH} ./extglob6.sub
- ${THIS_SH} ./extglob7.sub
-+${THIS_SH} ./extglob8.sub
- 
- exit 0
---- /dev/null
-+++ tests/extglob8.sub
-@@ -0,0 +1,33 @@
-+#   This program is free software: you can redistribute it and/or modify
-+#   it under the terms of the GNU General Public License as published by
-+#   the Free Software Foundation, either version 3 of the License, or
-+#   (at your option) any later version.
-+#
-+#   This program is distributed in the hope that it will be useful,
-+#   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+#   GNU General Public License for more details.
-+#
-+#   You should have received a copy of the GNU General Public License
-+#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+#
-+# extglob option interaction with other parts of the shell that force
-+# extended_glob on; only an issue in compatibility mode
-+
-+shopt -u extglob
-+
-+BASH_COMPAT=50
-+shopt extglob
-+
-+echo $(echo $(echo $(echo $(echo $(echo x) ) ) ) )
-+shopt extglob
-+
-+shopt -u extglob
-+
-+[[ '' = $(shopt extglob >&2) ]]
-+shopt extglob
-+
-+shopt -u extglob
-+
-+[[ foo = $(: $(shopt extglob >&2)) ]]
-+shopt extglob
---- tests/run-extglob
-+++ tests/run-extglob
-@@ -1,4 +1,4 @@
- PATH=$PATH:`pwd`
- export PATH
--${THIS_SH} ./extglob.tests | grep -v '^expect' > ${BASH_TSTOUT}
-+${THIS_SH} ./extglob.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
- diff ${BASH_TSTOUT} extglob.right && rm -f ${BASH_TSTOUT}
-


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2023-03-04 19:29 Sven Wegener
  0 siblings, 0 replies; 30+ messages in thread
From: Sven Wegener @ 2023-03-04 19:29 UTC (permalink / raw
  To: gentoo-commits

commit:     fad333363f29e7ae83a71fb6714576c5a8a9d006
Author:     Sven Wegener <swegener <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  4 18:57:26 2023 +0000
Commit:     Sven Wegener <swegener <AT> gentoo <DOT> org>
CommitDate: Sat Mar  4 19:29:06 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fad33336

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 <swegener <AT> 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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2023-04-25 21:30 Sam James
  0 siblings, 0 replies; 30+ messages in thread
From: Sam James @ 2023-04-25 21:30 UTC (permalink / raw
  To: gentoo-commits

commit:     52d91f662e2022070db84e036c9373373fa12624
Author:     Diego Viola <diego.viola <AT> gmail <DOT> com>
AuthorDate: Tue Apr 25 19:49:09 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 25 21:26:58 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52d91f66

app-shells/bash: fix whitespace

Signed-off-by: Diego Viola <diego.viola <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/30756
Signed-off-by: Sam James <sam <AT> 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


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2023-04-26 21:08 Mike Gilbert
  0 siblings, 0 replies; 30+ messages in thread
From: Mike Gilbert @ 2023-04-26 21:08 UTC (permalink / raw
  To: gentoo-commits

commit:     06ae7be862ffb82a0cabb211ae274cde39587d9a
Author:     Diego Viola <diego.viola <AT> gmail <DOT> com>
AuthorDate: Wed Apr 26 06:31:10 2023 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed Apr 26 21:07:24 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06ae7be8

app-shells/bash: remove empty line in bashrc

Signed-off-by: Diego Viola <diego.viola <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/30765
Signed-off-by: Mike Gilbert <floppym <AT> 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.


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/
@ 2023-12-31  2:38 Conrad Kostecki
  0 siblings, 0 replies; 30+ messages in thread
From: Conrad Kostecki @ 2023-12-31  2:38 UTC (permalink / raw
  To: gentoo-commits

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

app-shells/bash: remove unused patch

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/34539
Signed-off-by: Conrad Kostecki <conikost <AT> 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..000000000000
--- 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 (&matched_pair_error);
-     }
-   else if (r != 0)


^ permalink raw reply related	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2023-12-31  2:38 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-03 18:52 [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/files/ Mike Frysinger
  -- strict thread matches above, loose matches on Subject: below --
2023-12-31  2:38 Conrad Kostecki
2023-04-26 21:08 Mike Gilbert
2023-04-25 21:30 Sam James
2023-03-04 19:29 Sven Wegener
2022-11-16 18:36 Conrad Kostecki
2022-09-11 23:13 Mike Gilbert
2021-07-10 21:16 Conrad Kostecki
2021-05-29 18:51 Lars Wendler
2020-12-01 13:16 Lars Wendler
2020-06-13 16:24 Mike Gilbert
2019-09-15  7:53 Mike Frysinger
2018-06-26 15:05 Mike Gilbert
2018-01-04 23:48 Sven Wegener
2017-10-20  7:45 Patrice Clement
2017-06-10 12:02 Jason Donenfeld
2017-06-10  3:07 Jason Donenfeld
2017-06-10  3:06 Jason Donenfeld
2016-07-16  9:54 Patrice Clement
2016-06-23  6:03 Mike Frysinger
2016-06-23  5:31 Mike Frysinger
2016-02-03 18:52 Mike Frysinger
2016-02-03 18:52 Mike Frysinger
2016-02-03 18:52 Mike Frysinger
2016-02-03 18:52 Mike Frysinger
2016-02-03 18:52 Mike Frysinger
2016-01-26  7:23 Mike Frysinger
2016-01-26  7:23 Mike Frysinger
2016-01-26  7:23 Mike Frysinger
2015-12-02 18:59 Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox