summaryrefslogtreecommitdiff
path: root/app-shells/bash
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-01-16 17:34:21 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-01-16 17:34:21 +0000
commit02e2208f46f4e2c00fb9743cbc47350bdd233bfa (patch)
tree132dd60828854db4f65f30f9230f43d9602507ff /app-shells/bash
parent8be70107efbb417f839292165ee39d07a062046f (diff)
gentoo resync : 16.01.2018
Diffstat (limited to 'app-shells/bash')
-rw-r--r--app-shells/bash/Manifest2
-rw-r--r--app-shells/bash/bash-4.4_p12-r1.ebuild260
-rw-r--r--app-shells/bash/files/bash-4.4-jobs_overflow.patch14
3 files changed, 276 insertions, 0 deletions
diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest
index f3f97eaffe7b..73851e2b1d62 100644
--- a/app-shells/bash/Manifest
+++ b/app-shells/bash/Manifest
@@ -44,6 +44,7 @@ AUX bash-4.3-arrayfunc.patch 439 BLAKE2B 8fd293185d6ebed88788999a671aae6d490ecff
AUX bash-4.3-compat-lvl.patch 628 BLAKE2B 8b077871ff09cc61ab34287e57da9917170956086fb75b8fe6a49ad3d6f927a389faae15c427f593e6c1554e4f37d845b4f8bb40a0b7b557244cc2f0c7ced5d6 SHA512 c552e1c7154d69201329f26e039c06a61e1bbaf5eaf16b7eea4f89d56aef0f710ebdfb115a1c00f07bd94893e51f9cbceee12bb57e51f6009c0e2327d53d7286
AUX bash-4.3-mapfile-improper-array-name-validation.patch 407 BLAKE2B 34644cc552d50cfd1db1904164fa69c84a315a8e0b0660bd0377669db532cca6af8f02f8e32d57ea117696f3caaf7a00e765773cf19c840a9aec57b3fd72f99a SHA512 214935a751c3275593654c36b471cbb47ca4f5bb6f2a19e0a7ff73b646e5318a861538bf923ebb5f84abafa6d0d6eeece7b2f36ef77ab8c582223e098b4eb356
AUX bash-4.3-protos.patch 174 BLAKE2B 02d65bba8a12ab7d280a66d7e292e2ba6eea026fc252d302ee8a167e14bbccb9d3906a75728c9fe617b202ef63649fed13d82ff7407a71ee36baee6e1ad1c944 SHA512 4af0540467bbcf7cf041de6fe6ed080b149a2ff309e5dbe5e7b76bb30459aaeead813be678384feb01a7b64d3a649372f8a8aaf686f69ac7958baa87b25340b0
+AUX bash-4.4-jobs_overflow.patch 331 BLAKE2B 6897770ef49b5f3def669abaec3d18fd8c799fc54192c4a21a25da6a63390e0ae980cff88e0e8e74987a70c997a4205aa740bb6c7b60aad2dfbe4bcf595d958e SHA512 4b5d5c053b8bdad203a3440c084631fba2df79ccdb9cb0c0c41ece2af749382f4a8b2e9750cf0abff6558c91a5afed477cc1d49fd0911c913fe3d517da9faf42
AUX bash-4.4-popd-offset-overflow.patch 1069 BLAKE2B b23ce9f427cdf252aebdf7330828074230f9b22b5bb59b712d1b148ecbf73aea78ce4e29d353198235b25fa19c4046405c8ae6eeb7fd1cf299d05b732f7cc37b SHA512 535f61b2e0c6423031520700be423750e9177ec96055be781aee5dbdd01c720c1dbc30fffa73b88464527981193c1c6a74ec4139753ef4f40a5bb0f55c4de61c
AUX bash-4.x-deferred-heredocs.patch 1255 BLAKE2B 944c8d5feaba6a6818fe7e20300fdd44d1e162511c1aaf272bdb4d4c382e100908c16a17e4bef622134116e153f96f61fae4d7985e58cb881012058250a2e7f5 SHA512 9016203189d0b601f0441daec19f902de7387b599a2196c475d76c596dcf9a9c22765a58e7fc5a3117522ec2722475bd166bea271ff3048f31674e8bed2901a0
AUX bash_logout 205 BLAKE2B b8c0266c3d1e31a714304a2b3b33389f042ae5bd497379f9b15ce31d47d1e3da73ba6536023953b00efe27b687e2ff45d94e3f01a13acc824dc12e31552c5b94 SHA512 7234250c03fc920996a381f9daef9e2d8ab1e1a29acdebed6669d8e0fe1c872a7fa343adf7d9ddc81225b0cd9eb223ba7ad1ff42448aff057fc6d6baa8f04a7d
@@ -358,5 +359,6 @@ EBUILD bash-4.1_p17.ebuild 4154 BLAKE2B a8ff6552229406e76b6a9b49f3675630a3910b9a
EBUILD bash-4.2_p53.ebuild 4356 BLAKE2B 1043056eed9633f3eca86a89e4ebc595ad7f59f057638088a7e56929d22a4aeb48a410660ecda72ffd5ec43921c067b783bbd8dd2dac4b80b99f03604292e729 SHA512 1bf922d25ededa1ba9f809f1281c0276a220e4f5f1265caddc6a2f095ec9f62f6026b8a9df93002891eeec6252c8943437940fcd08c61543261dbccb523609d2
EBUILD bash-4.3_p39_pre0.ebuild 3581 BLAKE2B 51c88610e9a35420efa938d7bcedc09005a7c86cf5fe45a671607a89e517442f8316667f7883ef87bc5671ed1898097bbc4fd3d5e2d4baa515601cddf8abc8b3 SHA512 f41cf7c82dc1316f61e132a2b29a2e4ac5b7a20f3856b69d51d39a18723c7e4713fec3654331d8bf4425f84d8d43408834d4e63934f7369232d87ce12156d2a2
EBUILD bash-4.3_p48-r1.ebuild 7260 BLAKE2B 82316e5db3a371f6856b0a22020b34842bf6d5313a0391d21e009c98381464c901638f7247a9eb38d72452c29f996629b3c8b4b53f894cba54b0d375b5f77aed SHA512 7b15ebc166dd814164deddd0821650b4d66e77ce35ee0d3d57682c1b404be4f7ed9437af1fd6bf58696849bd5e9d23d6d92701f44bed2d09362dc3aa3a2b715a
+EBUILD bash-4.4_p12-r1.ebuild 7234 BLAKE2B a51bf6dd560d28f9a728581649b6e1e67455b70de6b35adcee1b54f8bb9323ae9e62d072b0947f9d28e375fd2e0b80ee346e37a7e2c7a137bb7150fe585c4d72 SHA512 0b1b27ab481b77bff2ae1a652b27474dba0599d8208b7c75bb0191bba8dc347fa6c082024014ed965628ff9b0bfc46b0fbb4ee3f7f9f25e8037b6a44b6243455
EBUILD bash-4.4_p12.ebuild 7178 BLAKE2B 0ac21583041940a5b2f4bab801b9a497d9830092c8f3cbd850bc6518e7fe2e4281a374a101cf6f2eabf003bca78c851735b780dde79ac5bc2db0001985440afe SHA512 ccbfa406cffa505d90ab3abb16c5106b32e80bca45f58e62c323046bbaa7d3ee6fe3dd0bb55e3161a3e33279a0d5bbfb3afcb9cdd1279bb24ed9c09fd531509d
MISC metadata.xml 734 BLAKE2B 242fda202379209b74e12c1726c4f4aa487eb09423d2249d13cae38cb9b077a285beff221a824647c826c39f7400178cd04d6082915ad9c23287ea70da9ef961 SHA512 a9301e8d2347e0cf90a97325d9a705076150c00609d28338e5d7d72c135468e4f0531b2a4077b69679ae6ccf89eee691e0e5f0748caab60689f5f017afb544f1
diff --git a/app-shells/bash/bash-4.4_p12-r1.ebuild b/app-shells/bash/bash-4.4_p12-r1.ebuild
new file mode 100644
index 000000000000..5e54bf0070ba
--- /dev/null
+++ b/app-shells/bash/bash-4.4_p12-r1.ebuild
@@ -0,0 +1,260 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs multilib prefix
+
+# Official patchlevel
+# See ftp://ftp.cwru.edu/pub/bash/bash-4.4-patches/
+PLEVEL=${PV##*_p}
+MY_PV=${PV/_p*}
+MY_PV=${MY_PV/_/-}
+MY_P=${PN}-${MY_PV}
+is_release() {
+ case ${PV} in
+ *_alpha*|*_beta*|*_rc*) return 1 ;;
+ *) return 0 ;;
+ esac
+}
+[[ ${PV} != *_p* ]] && PLEVEL=0
+patches() {
+ local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
+ [[ ${plevel} -eq 0 ]] && return 1
+ eval set -- {1..${plevel}}
+ set -- $(printf "${pn}${pv/\.}-%03d " "$@")
+ if [[ ${opt} == -s ]] ; then
+ echo "${@/#/${DISTDIR}/}"
+ else
+ local u
+ for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
+ printf "${u}/${pn}-${pv}-patches/%s " "$@"
+ done
+ fi
+}
+
+# The version of readline this bash normally ships with.
+READLINE_VER="7.0"
+
+DESCRIPTION="The standard GNU Bourne again shell"
+HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html"
+if is_release ; then
+ SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
+else
+ SRC_URI="ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline"
+
+DEPEND="
+ >=sys-libs/ncurses-5.2-r2:0=
+ readline? ( >=sys-libs/readline-${READLINE_VER}:0= )
+ nls? ( virtual/libintl )
+"
+RDEPEND="
+ ${DEPEND}
+ !<sys-apps/portage-2.1.6.7_p1
+ !<sys-apps/paludis-0.26.0_alpha5
+"
+# we only need yacc when the .y files get patched (bash42-005)
+#DEPEND+=" virtual/yacc"
+
+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
+}
+
+src_prepare() {
+ # Include official patches
+ [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s)
+
+ eapply "${FILESDIR}/${PN}-4.4-jobs_overflow.patch" #644720
+
+ # Clean out local libs so we know we use system ones w/releases.
+ if is_release ; then
+ rm -rf lib/{readline,termcap}/*
+ touch lib/{readline,termcap}/Makefile.in # for config.status
+ sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die
+ fi
+
+ # Prefixify hardcoded path names. No-op for non-prefix.
+ hprefixify pathnames.h.in
+
+ # Avoid regenerating docs after patches #407985
+ sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die
+ touch -r . doc/*
+
+ eapply_user
+}
+
+src_configure() {
+ local myconf=(
+ --disable-profiling
+ --docdir='$(datarootdir)'/doc/${PF}
+ --htmldir='$(docdir)/html'
+ --with-curses
+ $(use_enable mem-scramble)
+ $(use_enable net net-redirections)
+ $(use_enable readline)
+ $(use_enable readline bang-history)
+ $(use_enable readline history)
+ $(use_with afs)
+ $(use_with mem-scramble bash-malloc)
+ )
+
+ # For descriptions of these, see config-top.h
+ # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426
+ append-cppflags \
+ -DDEFAULT_PATH_VALUE=\'\"${EPREFIX}/usr/local/sbin:${EPREFIX}/usr/local/bin:${EPREFIX}/usr/sbin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/bin\"\' \
+ -DSTANDARD_UTILS_PATH=\'\"${EPREFIX}/bin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/usr/sbin\"\' \
+ -DSYS_BASHRC=\'\"${EPREFIX}/etc/bash/bashrc\"\' \
+ -DSYS_BASH_LOGOUT=\'\"${EPREFIX}/etc/bash/bash_logout\"\' \
+ -DNON_INTERACTIVE_LOGIN_SHELLS \
+ -DSSH_SOURCE_BASHRC \
+ $(use bashlogger && echo -DSYSLOG_HISTORY)
+
+ # 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+=( --disable-nls )
+
+ # Historically, we always used the builtin readline, but since
+ # our handling of SONAME upgrades has gotten much more stable
+ # in the PM (and the readline ebuild itself preserves the old
+ # libs during upgrades), linking against the system copy should
+ # be safe.
+ # Exact cached version here doesn't really matter as long as it
+ # is at least what's in the DEPEND up above.
+ export ac_cv_rl_version=${READLINE_VER%%_*}
+
+ # Force linking with system curses ... the bundled termcap lib
+ # sucks bad compared to ncurses. For the most part, ncurses
+ # is here because readline needs it. But bash itself calls
+ # ncurses in one or two small places :(.
+
+ if is_release ; then
+ # Use system readline only with released versions.
+ myconf+=( --with-installed-readline=. )
+ fi
+
+ if use plugins; then
+ append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash
+ else
+ # Disable the plugins logic by hand since bash doesn't
+ # provide a way of doing it.
+ export ac_cv_func_dl{close,open,sym}=no \
+ ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no
+ sed -i \
+ -e '/LOCAL_LDFLAGS=/s:-rdynamic::' \
+ configure || die
+ fi
+ tc-export AR #444070
+ econf "${myconf[@]}"
+}
+
+src_compile() {
+ emake
+
+ if use plugins ; then
+ emake -C examples/loadables all others
+ fi
+}
+
+src_install() {
+ local d f
+
+ default
+
+ dodir /bin
+ mv "${ED%/}"/usr/bin/bash "${ED%/}"/bin/ || die
+ dosym bash /bin/rbash
+
+ insinto /etc/bash
+ doins "${FILESDIR}"/bash_logout
+ doins "$(prefixify_ro "${FILESDIR}"/bashrc)"
+ keepdir /etc/bash/bashrc.d
+ insinto /etc/skel
+ for f in bash{_logout,_profile,rc} ; do
+ newins "${FILESDIR}"/dot-${f} .${f}
+ done
+
+ local sed_args=(
+ -e "s:#${USERLAND}#@::"
+ -e '/#@/d'
+ )
+ if ! use readline ; then
+ sed_args+=( #432338
+ -e '/^shopt -s histappend/s:^:#:'
+ -e 's:use_color=true:use_color=false:'
+ )
+ fi
+ sed -i \
+ "${sed_args[@]}" \
+ "${ED%/}"/etc/skel/.bashrc \
+ "${ED%/}"/etc/bash/bashrc || die
+
+ if use plugins ; then
+ exeinto /usr/$(get_libdir)/bash
+ doexe $(echo examples/loadables/*.o | sed 's:\.o::g')
+ insinto /usr/include/bash-plugins
+ doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h}
+ fi
+
+ if use examples ; then
+ for d in examples/{functions,misc,scripts,startup-files} ; 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
+ newdoc CWRU/changelog ChangeLog
+ dosym bash.info /usr/share/info/bashref.info
+}
+
+pkg_preinst() {
+ if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]] ; then
+ mkdir -p "${EROOT}"/etc/bash
+ mv -f "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/
+ fi
+
+ if [[ -L ${EROOT}/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 "${EROOT}"/bin/sh)
+ local tmp=$(emktemp "${EROOT}"/bin)
+ ln -sf "${target}" "${tmp}"
+ mv -f "${tmp}" "${EROOT}"/bin/sh
+ fi
+}
+
+pkg_postinst() {
+ # If /bin/sh does not exist, provide it
+ if [[ ! -e ${EROOT}/bin/sh ]] ; then
+ ln -sf bash "${EROOT}"/bin/sh
+ fi
+}
diff --git a/app-shells/bash/files/bash-4.4-jobs_overflow.patch b/app-shells/bash/files/bash-4.4-jobs_overflow.patch
new file mode 100644
index 000000000000..8753d62ec6c1
--- /dev/null
+++ b/app-shells/bash/files/bash-4.4-jobs_overflow.patch
@@ -0,0 +1,14 @@
+https://lists.gnu.org/archive/html/bug-bash/2017-12/msg00025.html
+https://bugs.gentoo.org/644720
+
+--- bash-4.4/jobs.c
++++ bash-4.4/jobs.c
+@@ -750,7 +750,7 @@
+ else
+ nsize = bgpids.nalloc;
+
+- while (nsize < js.c_childmax)
++ while (nsize < (ps_index_t)js.c_childmax)
+ nsize *= 2;
+
+ if (bgpids.nalloc < js.c_childmax)