diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-11-29 04:16:40 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-11-29 04:16:40 +0000 |
commit | f6e4073d92a9ee7cd0d1bad49c9e1527ab85a039 (patch) | |
tree | 9a0bf93d4ce1e46e9f31ceadbc24be5faeff498d /app-shells/bash | |
parent | add some comments (diff) | |
download | gentoo-2-f6e4073d92a9ee7cd0d1bad49c9e1527ab85a039.tar.gz gentoo-2-f6e4073d92a9ee7cd0d1bad49c9e1527ab85a039.tar.bz2 gentoo-2-f6e4073d92a9ee7cd0d1bad49c9e1527ab85a039.zip |
Grab a fix from Fedora (upstream), a fix from Debian, and try and fix signal generation when cross-compiling.
(Portage version: 2.0.53_rc7)
Diffstat (limited to 'app-shells/bash')
-rw-r--r-- | app-shells/bash/ChangeLog | 10 | ||||
-rw-r--r-- | app-shells/bash/bash-3.0-r14.ebuild | 156 | ||||
-rw-r--r-- | app-shells/bash/files/bash-3.0-cross-signals.patch | 91 | ||||
-rw-r--r-- | app-shells/bash/files/bash-3.0-subshell.patch | 39 | ||||
-rw-r--r-- | app-shells/bash/files/bash-3.0-volatile-command.patch | 16 | ||||
-rw-r--r-- | app-shells/bash/files/digest-bash-3.0-r14 | 17 |
6 files changed, 328 insertions, 1 deletions
diff --git a/app-shells/bash/ChangeLog b/app-shells/bash/ChangeLog index eda41b262efa..69a1cfa1b930 100644 --- a/app-shells/bash/ChangeLog +++ b/app-shells/bash/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-shells/bash # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.78 2005/10/20 16:51:39 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.79 2005/11/29 04:16:40 vapier Exp $ + +*bash-3.0-r14 (29 Nov 2005) + + 29 Nov 2005; Mike Frysinger <vapier@gentoo.org> + +files/bash-3.0-cross-signals.patch, +files/bash-3.0-subshell.patch, + +files/bash-3.0-volatile-command.patch, +bash-3.0-r14.ebuild: + Grab a fix from Fedora (upstream), a fix from Debian, and try and fix signal + generation when cross-compiling. 20 Oct 2005; Diego Pettenò <flameeyes@gentoo.org> +files/bash-3.0-strnlen.patch, bash-3.0-r13.ebuild: diff --git a/app-shells/bash/bash-3.0-r14.ebuild b/app-shells/bash/bash-3.0-r14.ebuild new file mode 100644 index 000000000000..be9f6cb0c692 --- /dev/null +++ b/app-shells/bash/bash-3.0-r14.ebuild @@ -0,0 +1,156 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-3.0-r14.ebuild,v 1.1 2005/11/29 04:16:40 vapier Exp $ + +inherit eutils flag-o-matic toolchain-funcs + +# Official patchlevel +# See ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/ +PLEVEL=16 + +DESCRIPTION="The standard GNU Bourne again shell" +HOMEPAGE="http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html" +# Hit the GNU mirrors before hitting Chet's site +SRC_URI="mirror://gnu/bash/${P}.tar.gz + ftp://ftp.cwru.edu/pub/bash/${P}.tar.gz + $(for ((i=1; i<=PLEVEL; i++)); do + printf 'ftp://ftp.cwru.edu/pub/bash/bash-%s-patches/bash%s-%03d\n' \ + ${PV} ${PV/\.} ${i} + printf 'mirror://gnu/bash/bash-%s-patches/bash%s-%03d\n' \ + ${PV} ${PV/\.} ${i} + done)" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc-macos ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="afs nls build bashlogger unicode" + +DEPEND=">=sys-libs/ncurses-5.2-r2" + +src_unpack() { + unpack ${P}.tar.gz + cd "${S}" + epatch "${FILESDIR}"/${P}-gentoo.patch + + # Remove autoconf dependency + sed -i -e "/&& autoconf/d" Makefile.in + + # Include official patches + local i + for ((i=1; i<=PLEVEL; i++)); do + epatch "${DISTDIR}"/${PN}${PV/\.}-$(printf '%03d' ${i}) + done + + # Fall back to /etc/inputrc + epatch "${FILESDIR}"/${P}-etc-inputrc.patch + # Fix network tests on Darwin #79124 + epatch "${FILESDIR}"/${P}-darwin-conn.patch + # read patch headers for more info ... many ripped from Fedora/Debian[17]/SuSe/upstream + for i in afs crash jobs manpage pwd read-e-segfault ulimit histtimeformat \ + locale multibyteifs rl-display rl-self-insert subshell \ + volatile-command + do + epatch "${FILESDIR}"/${P}-${i}.patch + done + # Hacks for bugs in unicode support #69407 #108936 + if use unicode ; then + epatch "${FILESDIR}"/${P}-prompt.patch + epatch "${FILESDIR}"/${P}-utf8.patch + fi + # Fix read-builtin and the -u pipe option #87093 + epatch "${FILESDIR}"/${P}-read-builtin-pipe.patch + # Don't barf on handled signals in scripts + epatch "${FILESDIR}"/${P}-trap-fg-signals.patch + # Fix a problem when using pipes and PGRP_PIPE #92349 + epatch "${FILESDIR}"/${P}-pgrp-pipe-fix.patch + # Make sure static linking always works #100138 + epatch "${FILESDIR}"/${P}-force-static-linking.patch + # Fix parallel builds #87247 + epatch "${FILESDIR}"/${P}-parallel.patch + # Fix generation of signals list when cross-compiling + epatch "${FILESDIR}"/${P}-cross-signals.patch + # Log bash commands to syslog #91327 + if use bashlogger ; then + echo + 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." + ebeep + epause + epatch "${FILESDIR}"/${P}-bash-logger.patch + fi + + epatch "${FILESDIR}"/${P}-configs.patch + + # Add strnlen function for non-glibc systems, as one of Fedora's patches + # requires it. + epatch "${FILESDIR}"/${P}-strnlen.patch + + sed -i 's:-lcurses:-lncurses:' configure || die "sed configure" +} + +src_compile() { + filter-flags -malign-double + + local myconf= + + # 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 use 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 + export bash_cv_termcap_lib=libcurses + myconf="${myconf} --with-ncurses" + + econf \ + $(use_with afs) \ + --disable-profiling \ + --without-gnu-malloc \ + ${myconf} || die + emake -j1 || die "make failed" # see bug 102426 +} + +src_install() { + einstall || die + + dodir /bin + mv "${D}"/usr/bin/bash "${D}"/bin/ + [[ ${USERLAND} != "BSD" ]] && dosym bash /bin/sh + 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 + + if use build ; then + rm -rf "${D}"/usr + else + doman doc/*.1 + dodoc README NEWS AUTHORS CHANGES COMPAT Y2K doc/FAQ doc/INTRO + dosym bash.info.gz /usr/share/info/bashref.info.gz + fi +} + +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 + + # our bash_logout is just a place holder so dont + # force users to go through etc-update all the time + if [[ -e ${ROOT}/etc/bash/bash_logout ]] ; then + rm -f "${D}"/etc/bash/bash_logout + fi +} diff --git a/app-shells/bash/files/bash-3.0-cross-signals.patch b/app-shells/bash/files/bash-3.0-cross-signals.patch new file mode 100644 index 000000000000..ca0850b225c3 --- /dev/null +++ b/app-shells/bash/files/bash-3.0-cross-signals.patch @@ -0,0 +1,91 @@ +--- bash-3.0/Makefile.in ++++ bash-3.0/Makefile.in +@@ -607,7 +607,11 @@ + + ${LIBINTL_H}: ${INTL_LIBRARY} + +-mksignames$(EXEEXT): $(SUPPORT_SRC)mksignames.c ++$(SUPPORT_SRC)mksignames.h: $(SUPPORT_SRC)mksignames.sh ++ CPP="$(CPP)" CPPFLAGS="$(CPPFLAGS)" /bin/sh $(SUPPORT_SRC)mksignames.sh ++ mv mksignames.h $(SUPPORT_SRC)mksignames.h ++ ++mksignames$(EXEEXT): $(SUPPORT_SRC)mksignames.c $(SUPPORT_SRC)mksignames.h + $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)mksignames.c + + mksyntax$(EXEEXT): ${srcdir}/mksyntax.c config.h syntax.h ${BASHINCDIR}/chartypes.h +--- bash-3.0/support/mksignames.c ++++ bash-3.0/support/mksignames.c +@@ -30,9 +30,7 @@ + # include "ansi_stdlib.h" + #endif /* HAVE_STDLIB_H */ + +-#if !defined (NSIG) +-# define NSIG 64 +-#endif ++#include "mksignames.h" + + /* + * Special traps: +--- bash-3.0/support/mksignames.sh ++++ bash-3.0/support/mksignames.sh +@@ -0,0 +1,60 @@ ++#!/bin/sh ++ ++input_header=mksignames.input.h ++output_header=mksignames.h ++ ++rm -f $input_header $output_header ++ ++cat >> $input_header << _ACEOF ++#include <config.h> ++#include <stdio.h> ++#include <sys/types.h> ++#include <signal.h> ++#if defined (HAVE_STDLIB_H) ++# include <stdlib.h> ++#else ++# include "ansi_stdlib.h" ++#endif /* HAVE_STDLIB_H */ ++ ++#if !defined (NSIG) ++# define NSIG 64 ++#endif ++ ++_ACEOF ++ ++deflist="NSIG SIGRTMAX SIGRTMIN SIGLOST SIGMSG SIGDANGER SIGMIGRATE SIGPRE ++SIGVIRT SIGALRM1 SIGWAITING SIGGRANT SIGKAP SIGRETRACT SIGSOUND SIGSAK SIGLWP ++SIGFREEZE SIGTHAW SIGCANCEL SIGDIL SIGCLD SIGPWR SIGPOLL SIGWINDOW SIGHUP ++SIGINT SIGQUIT SIGILL SIGTRAP SIGIOT SIGABRT SIGEMT SIGFPE SIGKILL SIGBUS ++SIGSEGV SIGSYS SIGPIPE SIGALRM SIGTERM SIGURG SIGSTOP SIGTSTP SIGCONT SIGCHLD ++SIGTTIN SIGTTOU SIGIO SIGXCPU SIGXFSZ SIGVTALRM SIGPROF SIGWINCH SIGINFO ++SIGUSR1 SIGUSR2 SIGKILLTHR" ++ ++for def in $deflist ; do ++ echo "#undef $def" >> $output_header ++ cat >> $input_header << _ACEOF ++#if defined($def) ++MKSIGNAMES_$def $def ++#endif ++_ACEOF ++done ++ ++if test "x${CPPFLAGS+set}" != "xset" ; then ++ if test -f "./mksignames.c" ; then ++ CPPFLAGS="-I.. -I../include" ++ else ++ CPPFLAGS="-I. -Iinclude" ++ fi ++fi ++if test "x${CPP+set}" != "xset" ; then ++ CPP="gcc -E" ++fi ++if test "x${EGREP+set}" != "xset" ; then ++ EGREP="grep" ++fi ++$CPP $CPPFLAGS $input_header \ ++ | $EGREP '^MKSIGNAMES_' \ ++ | sed 's/MKSIGNAMES_/#define /' \ ++ >> $output_header ++echo "/* $CPP $CPPFLAGS */" >> $output_header ++rm -f $input_header 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 000000000000..a1d7dfe7d342 --- /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-volatile-command.patch b/app-shells/bash/files/bash-3.0-volatile-command.patch new file mode 100644 index 000000000000..8b89b35914b1 --- /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); diff --git a/app-shells/bash/files/digest-bash-3.0-r14 b/app-shells/bash/files/digest-bash-3.0-r14 new file mode 100644 index 000000000000..5d6eed53b1be --- /dev/null +++ b/app-shells/bash/files/digest-bash-3.0-r14 @@ -0,0 +1,17 @@ +MD5 26c4d642e29b3533d8d754995bc277b3 bash-3.0.tar.gz 2418293 +MD5 24a83f78a44a6029024371f02da174dd bash30-001 4999 +MD5 6f4cf2aa975a1fcc0cb43a406bd47ca5 bash30-002 2119 +MD5 c8bf41e78cda16d391b9099eeba01386 bash30-003 4669 +MD5 c069dffbb3f442aac3660b883ddd97f5 bash30-004 3372 +MD5 ad06309c623ff8e1b9f039d3b7eb97c2 bash30-005 1776 +MD5 f162bf93a76759bab37b29509a4a6e20 bash30-006 4258 +MD5 89903d92ca620921aecb3f1f30c05ebe bash30-007 1808 +MD5 9a295c02f46bc867fc096862c7380a88 bash30-008 1220 +MD5 786c7e2af1dca5104af92bbdc60f7474 bash30-009 2828 +MD5 f2d90d06ed445a285c8406016e9d9c13 bash30-010 3193 +MD5 9506c56968c58332489986633319a186 bash30-011 2635 +MD5 2753d4de0b57fc8890488463c5e86d3f bash30-012 1395 +MD5 5de5be8289764c11a3206b06351d81a6 bash30-013 1963 +MD5 d4b531e02b6a0287cffdbf527134ca29 bash30-014 1165 +MD5 adc1ab952b42ed0c0f53d1c308a32101 bash30-015 1480 +MD5 a3bb09a185e4c6a813227f3e84e4f6e5 bash30-016 2453 |