summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-04-29 22:54:34 +0000
committerMike Frysinger <vapier@gentoo.org>2011-04-29 22:54:34 +0000
commit655619ba181aa07edd4051f2d0d6bcf771694177 (patch)
tree3d16a36213af5e5e26d4e82faf6b0a86b9410d1e /app-shells
parentold (diff)
downloadhistorical-655619ba181aa07edd4051f2d0d6bcf771694177.tar.gz
historical-655619ba181aa07edd4051f2d0d6bcf771694177.tar.bz2
historical-655619ba181aa07edd4051f2d0d6bcf771694177.zip
Add fix from upstream for heredocs printing #363371 by Andrey Hippo.
Package-Manager: portage-2.2.0_alpha28/cvs/Linux x86_64
Diffstat (limited to 'app-shells')
-rw-r--r--app-shells/bash/ChangeLog8
-rw-r--r--app-shells/bash/Manifest11
-rw-r--r--app-shells/bash/bash-4.2_p8-r1.ebuild180
-rw-r--r--app-shells/bash/files/bash-4.2-print-heredoc.patch30
4 files changed, 223 insertions, 6 deletions
diff --git a/app-shells/bash/ChangeLog b/app-shells/bash/ChangeLog
index 5a2dede84eb2..def5ca6cfb9f 100644
--- a/app-shells/bash/ChangeLog
+++ b/app-shells/bash/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-shells/bash
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.286 2011/03/15 19:41:24 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.287 2011/04/29 22:54:34 vapier Exp $
+
+*bash-4.2_p8-r1 (29 Apr 2011)
+
+ 29 Apr 2011; Mike Frysinger <vapier@gentoo.org> +bash-4.2_p8-r1.ebuild,
+ +files/bash-4.2-print-heredoc.patch:
+ Add fix from upstream for heredocs printing #363371 by Andrey Hippo.
*bash-4.2_p8 (15 Mar 2011)
diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest
index 91850167da3a..a5ad22cf72f9 100644
--- a/app-shells/bash/Manifest
+++ b/app-shells/bash/Manifest
@@ -25,6 +25,7 @@ AUX bash-4.0-negative-return.patch 748 RMD160 ba602c6fb3caa055a09a72122c45e160ea
AUX bash-4.0-parallel-build.patch 2237 RMD160 82aa28d48f12978cbaea7ebed987d13f5368c2c8 SHA1 c82d0c9ca049fe3c53418f4a3b399a840bbcdc90 SHA256 65db03b0c0b8e2fd917f049e9e84f7b2b234b3e9e37f395d4d8984194b392a56
AUX bash-4.1-fbsd-eaccess.patch 843 RMD160 50e06a8ec83fa756a9749ab5011696e737731afe SHA1 9468675bdb345c01f6a285d76526e851de63a895 SHA256 42a4ee58b0d2fd529e25fcc3ca10d17bbac2c91fd8bcb191d70c788f0b55fb95
AUX bash-4.1-parallel-build.patch 829 RMD160 371bd2d62a0b70c4305697975780165e02f2b38d SHA1 9978a6ed4668509660491799bbbc5b7d6ad2cbd9 SHA256 0da60b91e4fb2326137a4dde6d8937592b6efea45de51194ca1770127637e652
+AUX bash-4.2-print-heredoc.patch 854 RMD160 5d3fc358a9f9500baf3a83378ca8c935ee0b34df SHA1 70ffe49e867222cc5877edcacaee9842080d6375 SHA256 a686e71f9ab788015fa80eb448252eeedc2d8f8e97b0fc0c66c0d3f3088e87b4
AUX bash-4.x-deferred-heredocs.patch 1255 RMD160 69e3554d225e5a85be3f874b0bb0139c0e24c9b9 SHA1 b8d492af021ae59c9799dfbb169842c23ed9f826 SHA256 845ffcd7035eef5dc029747f211a737e0260b53b16086a37fb3c8ab3609a7d36
AUX bash_logout 205 RMD160 fa6064b67bd02cf66dc490759442a0127770d420 SHA1 a6983665cc842bde96fbc8811be89cf8fda71a45 SHA256 15aaded954389c05d7de5d36c4887db61975ad52c87ad78baf1062ec8997289d
AUX bashrc 2798 RMD160 c63f6e79fe3e5c12a42f65379aa2de1d2a6437cf SHA1 d1fb11d9b32cd6a448ce969d72949677caea436b SHA256 537fb02f97da09b91f9e3c1b7624e43dbf650536d6a6b3a18e9003a57f610c32
@@ -167,13 +168,13 @@ EBUILD bash-4.0_p38.ebuild 5561 RMD160 965176e3361d1d0cac9b013152ec2eb6db274a44
EBUILD bash-4.1_p10.ebuild 5599 RMD160 6a5c4eeb85c6bc2b6ccac227ff5f6d30a88e470b SHA1 61adef2a439365d91baea4a52c79460ffb319f03 SHA256 ebac02b1d21ceaa65556c7eda49c31933d46e3c34d6bed792d10ec4602440826
EBUILD bash-4.1_p7.ebuild 5588 RMD160 b51148bc278822a53866104fe4c104100c6c7e95 SHA1 ed195b310adabc1a8e7d04d513c058e5dbdfe5fe SHA256 792f06f27d7d8b3186b4368ac1f54d145724120e7f369dfe92f7df1754b83faa
EBUILD bash-4.1_p9.ebuild 5586 RMD160 f0d3d2a6f73d5ebe6979ff82e55edb1ccbb8fca2 SHA1 08f3b13848d1c00d92c5c8deb8c00885448211eb SHA256 717c934a98b0b5f564f4f06988828831de3b5b3247f49b07ed6325d476342ac3
-EBUILD bash-4.2_p8.ebuild 5333 RMD160 d6b3a2659bab496242d94d47d8ede286ff24f0be SHA1 44d738d5e2e3ced5e39549415c6e3c20bc526467 SHA256 b6a2021a065206f03dd8d2940ee6d379d91c29079f9bf0f74e895080b3e342f0
-MISC ChangeLog 44211 RMD160 6e84340d5f993dffc4231e1e57c9c64c335c22df SHA1 45fd67a84a0b3f860e329f639a775164af880cc0 SHA256 0786d5d80fbae98c232507a4b8362f16cab034fdff75f6c597a3da7d4b65fe66
+EBUILD bash-4.2_p8-r1.ebuild 5396 RMD160 e5957c4147bd170d5fc42a4db2f45bb90825c29d SHA1 4ba8406fe1b658fd59694d2ae2b98817584c95ed SHA256 45d9f86285e37907a914adcf71d4dd7ebbe9c0ba522a5e1b7d1a4dc02310442d
+MISC ChangeLog 44427 RMD160 81b657dcab038bf5c34f5de09a640114c3c62730 SHA1 74d08f8f3ad1573d4ab9ee93d6f09c4013ca6394 SHA256 bd214d142acb991ddcee1268b2133cf4d6198afd8cb369465d7d4de083815e39
MISC metadata.xml 568 RMD160 c778ff1669af3c368238bcf481b344b741f0d6e1 SHA1 8d74d1c518351ad8085c9c26a5f2554d8c768b20 SHA256 48d380acb97dda0a7f4bd918b208d11367a8367d289b0a2d78ef08ef9a4e2562
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iF4EAREIAAYFAk1/wOoACgkQaC/OocHi7JbUEAD+LIWCix8cAnn0+48qnDht70aa
-22gUMu9jjmOxDs2z4n4A/2dFN+Jek1DMHMoPfXIqHd08v9jZlkGes0BWbLp6SfTM
-=QNN5
+iF4EAREIAAYFAk27QXgACgkQaC/OocHi7JbIJwEAmomXTiUie0NqTVC4c2vPeO6s
+HJnZwaHVEA8nOVjqUU0A/1MwgOlcmgCvEeI2iBzrjEUSFJBD+p5x2vYoJn4/G3EK
+=QAhE
-----END PGP SIGNATURE-----
diff --git a/app-shells/bash/bash-4.2_p8-r1.ebuild b/app-shells/bash/bash-4.2_p8-r1.ebuild
new file mode 100644
index 000000000000..eec2374e6d7b
--- /dev/null
+++ b/app-shells/bash/bash-4.2_p8-r1.ebuild
@@ -0,0 +1,180 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-4.2_p8-r1.ebuild,v 1.1 2011/04/29 22:54:34 vapier Exp $
+
+EAPI="1"
+
+inherit eutils flag-o-matic toolchain-funcs multilib
+
+# Official patchlevel
+# See ftp://ftp.cwru.edu/pub/bash/bash-4.2-patches/
+PLEVEL=${PV##*_p}
+MY_PV=${PV/_p*}
+MY_PV=${MY_PV/_/-}
+MY_P=${PN}-${MY_PV}
+[[ ${PV} != *_p* ]] && PLEVEL=0
+READLINE_VER=6.1
+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://tiswww.case.edu/php/chet/bash/bashtop.html"
+SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)
+ $(patches ${READLINE_PLEVEL} readline ${READLINE_VER})"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="afs bashlogger examples mem-scramble +net nls plugins vanilla"
+
+DEPEND=">=sys-libs/ncurses-5.2-r2
+ nls? ( virtual/libintl )"
+RDEPEND="${DEPEND}
+ !<sys-apps/portage-2.1.7.16
+ !<sys-apps/paludis-0.26.0_alpha5"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ if is-flag -malign-double ; then #7332
+ eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
+ eerror "as it breaks LFS (struct stat64) on x86."
+ die "remove -malign-double from your CFLAGS mr ricer"
+ fi
+ if use bashlogger ; then
+ ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
+ ewarn "This will log ALL output you enter into the shell, you have been warned."
+ fi
+}
+
+src_unpack() {
+ unpack ${MY_P}.tar.gz
+ cd "${S}"
+
+ # Include official patches
+ [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
+ epatch "${FILESDIR}"/${PN}-4.2-print-heredoc.patch #363371
+ cd lib/readline
+ [[ ${READLINE_PLEVEL} -gt 0 ]] && epatch $(patches -s ${READLINE_PLEVEL} readline ${READLINE_VER})
+ cd ../..
+}
+
+src_compile() {
+ local myconf=
+
+ # For descriptions of these, see config-top.h
+ # bashrc/#26952 bash_logout/#90488 ssh/#24762
+ append-cppflags \
+ -DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\' \
+ -DSTANDARD_UTILS_PATH=\'\"/bin:/usr/bin:/sbin:/usr/sbin\"\' \
+ -DSYS_BASHRC=\'\"/etc/bash/bashrc\"\' \
+ -DSYS_BASH_LOGOUT=\'\"/etc/bash/bash_logout\"\' \
+ -DNON_INTERACTIVE_LOGIN_SHELLS \
+ -DSSH_SOURCE_BASHRC \
+ $(use bashlogger && echo -DSYSLOG_HISTORY)
+
+ # Always use the buildin readline, else if we update readline
+ # bash gets borked as readline is usually not binary compadible
+ # between minor versions.
+ #myconf="${myconf} $(use_with !readline installed-readline)"
+ myconf="${myconf} --without-installed-readline"
+
+ # Don't even think about building this statically without
+ # reading Bug 7714 first. If you still build it statically,
+ # don't come crying to us with bugs ;).
+ #use static && export LDFLAGS="${LDFLAGS} -static"
+ use nls || myconf="${myconf} --disable-nls"
+
+ # Force linking with system curses ... the bundled termcap lib
+ # sucks bad compared to ncurses
+ myconf="${myconf} --with-curses"
+
+ use plugins && append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash
+ econf \
+ $(use_with afs) \
+ $(use_enable net net-redirections) \
+ --disable-profiling \
+ $(use_enable mem-scramble) \
+ $(use_with mem-scramble bash-malloc) \
+ ${myconf} || die
+ emake || die "make failed"
+
+ if use plugins ; then
+ emake -C examples/loadables all others || die
+ fi
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+
+ dodir /bin
+ mv "${D}"/usr/bin/bash "${D}"/bin/ || die
+ dosym bash /bin/rbash
+
+ insinto /etc/bash
+ doins "${FILESDIR}"/{bashrc,bash_logout}
+ insinto /etc/skel
+ for f in bash{_logout,_profile,rc} ; do
+ newins "${FILESDIR}"/dot-${f} .${f}
+ done
+
+ sed -i -e "s:#${USERLAND}#@::" "${D}"/etc/skel/.bashrc "${D}"/etc/bash/bashrc
+ sed -i -e '/#@/d' "${D}"/etc/skel/.bashrc "${D}"/etc/bash/bashrc
+
+ if use plugins ; then
+ exeinto /usr/$(get_libdir)/bash
+ doexe $(echo examples/loadables/*.o | sed 's:\.o::g') || die
+ fi
+
+ if use examples ; then
+ for d in examples/{functions,misc,scripts,scripts.noah,scripts.v2} ; do
+ exeinto /usr/share/doc/${PF}/${d}
+ insinto /usr/share/doc/${PF}/${d}
+ for f in ${d}/* ; do
+ if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then
+ doexe ${f}
+ else
+ doins ${f}
+ fi
+ done
+ done
+ fi
+
+ doman doc/*.1
+ dodoc README NEWS AUTHORS CHANGES COMPAT Y2K doc/FAQ doc/INTRO
+ dosym bash.info /usr/share/info/bashref.info
+}
+
+pkg_preinst() {
+ if [[ -e ${ROOT}/etc/bashrc ]] && [[ ! -d ${ROOT}/etc/bash ]] ; then
+ mkdir -p "${ROOT}"/etc/bash
+ mv -f "${ROOT}"/etc/bashrc "${ROOT}"/etc/bash/
+ fi
+
+ if [[ -L ${ROOT}/bin/sh ]]; then
+ # rewrite the symlink to ensure that its mtime changes. having /bin/sh
+ # missing even temporarily causes a fatal error with paludis.
+ local target=$(readlink "${ROOT}"/bin/sh)
+ ln -sf "${target}" "${ROOT}"/bin/sh
+ fi
+}
+
+pkg_postinst() {
+ # If /bin/sh does not exist, provide it
+ if [[ ! -e ${ROOT}/bin/sh ]]; then
+ ln -sf bash "${ROOT}"/bin/sh
+ fi
+}
diff --git a/app-shells/bash/files/bash-4.2-print-heredoc.patch b/app-shells/bash/files/bash-4.2-print-heredoc.patch
new file mode 100644
index 000000000000..cd2f5bbdd337
--- /dev/null
+++ b/app-shells/bash/files/bash-4.2-print-heredoc.patch
@@ -0,0 +1,30 @@
+http://lists.gnu.org/archive/html/bug-bash/2011-04/msg00058.html
+http://bugs.gentoo.org/363371
+
+*** ../bash-4.2-patched/print_cmd.c 2010-05-30 18:34:08.000000000 -0400
+--- print_cmd.c 2011-04-14 10:43:18.000000000 -0400
+***************
+*** 316,319 ****
+--- 317,321 ----
+ skip_this_indent++;
+ make_command_string_internal (command->value.Subshell->command);
++ PRINT_DEFERRED_HEREDOCS ("");
+ cprintf (" )");
+ break;
+***************
+*** 593,596 ****
+--- 606,610 ----
+ indentation += indentation_amount;
+ make_command_string_internal (arith_for_command->action);
++ PRINT_DEFERRED_HEREDOCS ("");
+ semicolon ();
+ indentation -= indentation_amount;
+***************
+*** 654,657 ****
+--- 668,672 ----
+
+ make_command_string_internal (group_command->command);
++ PRINT_DEFERRED_HEREDOCS ("");
+
+ if (inside_function_def)
+