summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-02-23 05:52:00 +0000
committerMike Frysinger <vapier@gentoo.org>2009-02-23 05:52:00 +0000
commit87bcd057760d66ed7ed4c28a350a51161770bfb4 (patch)
tree68dc7922d6fc8d40d75f227c06edc83990b8a3a8 /app-shells
parentadd ~amd64, bug 259603 (diff)
downloadgentoo-2-87bcd057760d66ed7ed4c28a350a51161770bfb4.tar.gz
gentoo-2-87bcd057760d66ed7ed4c28a350a51161770bfb4.tar.bz2
gentoo-2-87bcd057760d66ed7ed4c28a350a51161770bfb4.zip
Add fix from upstream for escaped semicolons in $(...) subshells.
(Portage version: 2.2_rc23/cvs/Linux x86_64)
Diffstat (limited to 'app-shells')
-rw-r--r--app-shells/bash/ChangeLog6
-rw-r--r--app-shells/bash/bash-4.0.ebuild42
-rw-r--r--app-shells/bash/files/bash-4.0-comsub-backslash-metacharacters.patch17
3 files changed, 42 insertions, 23 deletions
diff --git a/app-shells/bash/ChangeLog b/app-shells/bash/ChangeLog
index 39795a23ca84..8d6cc8057795 100644
--- a/app-shells/bash/ChangeLog
+++ b/app-shells/bash/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-shells/bash
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.197 2009/02/23 01:25:56 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.198 2009/02/23 05:52:00 vapier Exp $
+
+ 23 Feb 2009; Mike Frysinger <vapier@gentoo.org>
+ +files/bash-4.0-comsub-backslash-metacharacters.patch, bash-4.0.ebuild:
+ Add fix from upstream for escaped semicolons in $(...) subshells.
23 Feb 2009; Mike Frysinger <vapier@gentoo.org>
-files/bash-4.0-protos.patch, bash-4.0.ebuild:
diff --git a/app-shells/bash/bash-4.0.ebuild b/app-shells/bash/bash-4.0.ebuild
index e6265da78902..ac70404422da 100644
--- a/app-shells/bash/bash-4.0.ebuild
+++ b/app-shells/bash/bash-4.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-4.0.ebuild,v 1.2 2009/02/23 01:25:56 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-4.0.ebuild,v 1.3 2009/02/23 05:52:00 vapier Exp $
EAPI="1"
@@ -14,23 +14,25 @@ MY_P=${PN}-${MY_PV}
[[ ${PV} != *_p* ]] && PLEVEL=0
READLINE_VER=6.0
READLINE_PLEVEL=0 # both readline patches are also released as bash patches
+patches() {
+ local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
+ [[ ${plevel} -eq 0 ]] && return 1
+ eval set -- {1..${plevel}}
+ set -- $(printf "${pn}${pv/\.}-%03d " "$@")
+ if [[ ${opt} == -s ]] ; then
+ echo "${@/#/${DISTDIR}\/}"
+ else
+ local u
+ for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
+ printf "${u}/${pn}-${pv}-patches/%s " "$@"
+ done
+ fi
+}
DESCRIPTION="The standard GNU Bourne again shell"
HOMEPAGE="http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html"
-SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz
- ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz
- $(for ((i=1; i<=PLEVEL; i++)); do
- printf 'ftp://ftp.cwru.edu/pub/bash/bash-%s-patches/bash%s-%03d\n' \
- ${MY_PV} ${MY_PV/\.} ${i}
- printf 'mirror://gnu/bash/bash-%s-patches/bash%s-%03d\n' \
- ${MY_PV} ${MY_PV/\.} ${i}
- done)
- $(for ((i=1; i<=READLINE_PLEVEL; i++)); do
- printf 'ftp://ftp.cwru.edu/pub/bash/readline-%s-patches/readline%s-%03d\n' \
- ${READLINE_VER} ${READLINE_VER/\.} ${i}
- printf 'mirror://gnu/bash/readline-%s-patches/readline%s-%03d\n' \
- ${READLINE_VER} ${READLINE_VER/\.} ${i}
- done)"
+SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)
+ $(patches ${READLINE_PLEVEL} readline ${READLINE_VER})"
LICENSE="GPL-2"
SLOT="0"
@@ -57,20 +59,16 @@ src_unpack() {
cd "${S}"
# Include official patches
- local i
- for ((i=1; i<=PLEVEL; i++)); do
- epatch "${DISTDIR}"/${PN}${MY_PV/\.}-$(printf '%03d' ${i})
- done
+ [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
cd lib/readline
- for ((i=1; i<=READLINE_PLEVEL; i++)); do
- epatch "${DISTDIR}"/readline${READLINE_VER/\.}-$(printf '%03d' ${i})
- done
+ [[ ${READLINE_PLEVEL} -gt 0 ]] && epatch $(patches -s ${READLINE_PLEVEL} readline ${READLINE_VER})
cd ../..
if ! use vanilla ; then
epatch "${FILESDIR}"/${PN}-3.2-parallel-build.patch #189671
epatch "${FILESDIR}"/${PN}-4.0-ldflags-for-build.patch #211947
epatch "${FILESDIR}"/${PN}-3.2-process-subst.patch
+ epatch "${FILESDIR}"/${PN}-4.0-comsub-backslash-metacharacters.patch
# Log bash commands to syslog #91327
if use bashlogger ; then
ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
diff --git a/app-shells/bash/files/bash-4.0-comsub-backslash-metacharacters.patch b/app-shells/bash/files/bash-4.0-comsub-backslash-metacharacters.patch
new file mode 100644
index 000000000000..e47a14369d8c
--- /dev/null
+++ b/app-shells/bash/files/bash-4.0-comsub-backslash-metacharacters.patch
@@ -0,0 +1,17 @@
+http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00147.html
+
+*** ../bash-4.0/parse.y 2009-01-08 08:29:12.000000000 -0500
+--- parse.y 2009-02-22 16:08:54.000000000 -0500
+***************
+*** 3307,3311 ****
+
+ /* Meta-characters that can introduce a reserved word. Not perfect yet. */
+! if MBTEST((tflags & LEX_RESWDOK) == 0 && (tflags & LEX_CKCASE) && (tflags & LEX_INCOMMENT) == 0 && shellmeta(ch))
+ {
+ /* Add this character. */
+--- 3307,3311 ----
+
+ /* Meta-characters that can introduce a reserved word. Not perfect yet. */
+! if MBTEST((tflags & LEX_PASSNEXT) == 0 && (tflags & LEX_RESWDOK) == 0 && (tflags & LEX_CKCASE) && (tflags & LEX_INCOMMENT) == 0 && shellmeta(ch))
+ {
+ /* Add this character. */