summaryrefslogtreecommitdiff
path: root/app-shells
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-02-28 10:03:38 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-02-28 10:03:38 +0000
commit24a48769f03b243065aec42c384c39a2d2306964 (patch)
tree6ee4e01247ea4cbdae0b2c9e6b88d86658fae0d3 /app-shells
parent87f37a073fb5c2e1f6ebc780e60cdbdd2c583860 (diff)
gentoo auto-resync : 28:02:2023 - 10:03:37
Diffstat (limited to 'app-shells')
-rw-r--r--app-shells/Manifest.gzbin8639 -> 8638 bytes
-rw-r--r--app-shells/bash/Manifest2
-rw-r--r--app-shells/bash/bash-5.1_p16-r3.ebuild315
-rw-r--r--app-shells/bash/files/bash-5.1_p16-configure-clang16.patch37
4 files changed, 354 insertions, 0 deletions
diff --git a/app-shells/Manifest.gz b/app-shells/Manifest.gz
index 6d5bcba93419..d9efc88decca 100644
--- a/app-shells/Manifest.gz
+++ b/app-shells/Manifest.gz
Binary files differ
diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest
index 77c2053ff321..5b1554e847a8 100644
--- a/app-shells/bash/Manifest
+++ b/app-shells/bash/Manifest
@@ -1,4 +1,5 @@
AUX bash-5.0-syslog-history-extern.patch 376 BLAKE2B d883d3c3adbf8f4d19ecc3c2790754a7f6972682d1679b07d5bc599bdbfc019ba8ad4d1271ec550b59447db0a02f1219c9e6057a0b1c1c6c52f7750a746a07bf SHA512 c8dd17bdd8ccbd73061a7cbcb7351195e703a2c5fc6faf288ec3721fc6e526d88dd4b2201f87078a92ca134b98214ccfa935f82f585322f72e9a41fd51842b6a
+AUX bash-5.1_p16-configure-clang16.patch 1108 BLAKE2B c3b2e0f74fdf83f8670b3f6e60246cbc20c5cf404f76a24612975a2ae18ad76a3684308af3df348904a1180f62c76465603c3cfbc48bdf9eb01396dec5e83934 SHA512 84b1c4f408582c2d8e90f1ca8d1ad73ccc0a4224b29d308d4920665d6ebe451112921ec962ee5d2ccb866498ec22cb504138b63f0149d2d5796865006ef3f9cd
AUX bash-5.2_p15-configure-clang16.patch 1116 BLAKE2B 5ef332cd2847f46e351e5db6dda79d01d9853f5eda9762deeba0450c2bd400eec549bbb85696777b687f64d0977daac4883d6ce3f1e26cec0d5f73e8ee97f000 SHA512 8cc761a50e936bb602c14fcf047e7278fa2f5394f78fc7f0f0b9ae9df4b48bdc9ca8424ccd6f6422364b7132c3317b8e688f330ce60a0c4724046144c58bd3e5
AUX bash-5.2_p15-random-ub.patch 451 BLAKE2B adab09c3f2ce3697e3659e01266120155714b80263bd125808edf556a354291af615540189553b1c32a2d462ac41e28a9df8fb9f7d963a3ca3629d297a46e62d SHA512 ac62d3bd609a5d17434cb3614c3ee229569a84087173ebf694eb144a43891fdaead7c531f034b47d72c801ba46d48b0db616e3dcaec82bd7151df518ef070400
AUX bash_logout 205 BLAKE2B b8c0266c3d1e31a714304a2b3b33389f042ae5bd497379f9b15ce31d47d1e3da73ba6536023953b00efe27b687e2ff45d94e3f01a13acc824dc12e31552c5b94 SHA512 7234250c03fc920996a381f9daef9e2d8ab1e1a29acdebed6669d8e0fe1c872a7fa343adf7d9ddc81225b0cd9eb223ba7ad1ff42448aff057fc6d6baa8f04a7d
@@ -422,6 +423,7 @@ EBUILD bash-4.3_p48-r2.ebuild 6068 BLAKE2B 39dd57b3192bea544347f3624c7ae1a4ce992
EBUILD bash-4.4_p23-r2.ebuild 6123 BLAKE2B 46619292080e156a8e3a684e611486f8658f71d38b37c734b8d7c3e2158b13e36acd615870604b0300f5d8e4ed06f7fda44059809a2e9db0549a411276a53c74 SHA512 c59fac5c737ee4b2d1d3e6a927ae4ac8f159a51cab746b74caec1a9c25fd80f8b4d08f5754feef3d541fc59eebb43cdeda18d7a879c420c0e1d1e8ac865206ab
EBUILD bash-5.0_p18.ebuild 7456 BLAKE2B 265a4db38cdb8be9f7d72b02a9b4db1afb052255ef9b1368565c6555d911842e615ffa5a3176134acb81fbf248df1af317996d81a96fdbc17cdd72024c6fe5ab SHA512 2fcfff0880542d36ba563150de89dfde30eb1d31d208647a0530c1ffc56c844e2dced5806c32f7ff5a2d920d7c89739f03ff2da95748c9cef856a8c5b1fc762e
EBUILD bash-5.1_p16-r2.ebuild 8383 BLAKE2B 7ab6835344291955d166c269fcc00850432f258c3d067cc0bdea4faef5b698891d46fc423ed7db766b58671cde754b976be34333134fa1ee426e0cbcc8659ee2 SHA512 2c82f7c7cd48445d558799b25051f281b951d157f173fe2007d95e3b39094dc28dca31d26230112cc67ea7ee531f8a322d48191907f8feb5599cdde51e826d87
+EBUILD bash-5.1_p16-r3.ebuild 8445 BLAKE2B d37c76a0e038eeca7506a90076709b7436ff79029073cbb9f0cbf2b9dbb8309e5ac715503907477382215eeaea1b82240f4b56b4df99b913f6b7322bd8676e14 SHA512 096c21b647a1d94fb6b894642185984391fa1acfaaa1e47614a121eec9d7f67cce70a7421467b525c8b7bf6a3dd39f620fd3c3edc502e4575f64c02754af3957
EBUILD bash-5.2_p15-r2.ebuild 9706 BLAKE2B 16e673b0746663978176ba660adb82c198f3e37b2f4b4fd2fe8d83c26debee6470db2ea396474d714b063f2480353a9c93fc705e8c6c4925582db3afee35ca68 SHA512 bdc10ea223e74fc2675080fa192f1bbc9e3855c0938b67cfdf108a060a1b82ba2b2e81e188a179b4f27a8a4558e3c87e2f1bd78ed8cfb6b8cfbccd1e258a911b
EBUILD bash-9999.ebuild 9614 BLAKE2B c2bf536cc8284f5c7f1e724cb878906312f17f098a413819e14d93be9624549c809d32acf3acb7daaca9c4338cb49c2134d44261a6c9aa41117e1bbb806009fd SHA512 bf1cbea52e1a7c9553a576856fe767824b88278e36c4c4219d3af536ef8aa29695e399c939b2e64ef1df073aa89326d06d9157568f7fb61fce9025aba876c954
MISC metadata.xml 1009 BLAKE2B f71587b0a6d05b907f82b26be93b071290d91dc8f612f7b008a05eaa94d45be2ef8c1d992b7ac886648a9dcf964c30e8d9a7aff90d44835beb452e0d635b9533 SHA512 8aa1cb4c3206a76d10181394a91c315967fd9d3b359194f430f075fdd5a0b4b32149eec36b85412ef7e84b55e7b01955c75486b2df82b392a5acb3df8229a88d
diff --git a/app-shells/bash/bash-5.1_p16-r3.ebuild b/app-shells/bash/bash-5.1_p16-r3.ebuild
new file mode 100644
index 000000000000..9ff113498a62
--- /dev/null
+++ b/app-shells/bash/bash-5.1_p16-r3.ebuild
@@ -0,0 +1,315 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/chetramey.asc
+inherit flag-o-matic toolchain-funcs prefix verify-sig
+
+# Uncomment if we have a patchset
+GENTOO_PATCH_DEV="sam"
+GENTOO_PATCH_VER="${PV}"
+
+# Official patchlevel
+# See ftp://ftp.cwru.edu/pub/bash/bash-5.1-patches/
+PLEVEL="${PV##*_p}"
+MY_PV="${PV/_p*}"
+MY_PV="${MY_PV/_/-}"
+MY_P="${PN}-${MY_PV}"
+MY_PATCHES=()
+
+is_release() {
+ case ${PV} in
+ *_alpha*|*_beta*|*_rc*)
+ return 1
+ ;;
+ *)
+ return 0
+ ;;
+ esac
+}
+
+[[ ${PV} != *_p* ]] && PLEVEL=0
+
+# The version of readline this bash normally ships with.
+READLINE_VER="8.1"
+
+DESCRIPTION="The standard GNU Bourne again shell"
+HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html"
+
+if is_release ; then
+ SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz"
+ SRC_URI+=" verify-sig? ( mirror://gnu/bash/${MY_P}.tar.gz.sig )"
+
+ if [[ ${PLEVEL} -gt 0 ]] ; then
+ # bash-5.1 -> bash51
+ my_p=${PN}$(ver_rs 1-2 '' $(ver_cut 1-2))
+
+ patch_url=
+ my_patch_index=
+
+ for ((my_patch_index=1; my_patch_index <= ${PLEVEL} ; my_patch_index++)) ; do
+ for url in mirror://gnu/${pn} ftp://ftp.cwru.edu/pub/bash ; do
+ patch_url=$(printf "${url}/${PN}-$(ver_cut 1-2)-patches/${my_p}-%03d" ${my_patch_index})
+ SRC_URI+=" ${patch_url}"
+ SRC_URI+=" verify-sig? ( ${patch_url}.sig )"
+
+ done
+
+ MY_PATCHES+=( "${DISTDIR}"/$(printf ${my_p}-%03d ${my_patch_index}) )
+ done
+
+ unset my_pn patch_url my_patch_index
+ fi
+else
+ SRC_URI="ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
+ SRC_URI+=" verify-sig? ( ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz.sig )"
+fi
+
+if [[ -n ${GENTOO_PATCH_VER} ]] ; then
+ SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER}-patches.tar.xz"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+[[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline"
+
+DEPEND="
+ >=sys-libs/ncurses-5.2-r2:0=
+ nls? ( virtual/libintl )
+ readline? ( >=sys-libs/readline-${READLINE_VER}:0= )
+"
+RDEPEND="
+ ${DEPEND}
+"
+# We only need yacc when the .y files get patched (bash42-005, bash51-011)
+BDEPEND="app-alternatives/yacc
+ verify-sig? ( sec-keys/openpgp-keys-chetramey )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ # Patches from Chet sent to bashbug ml
+ "${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}-patches/${PN}-5.0-syslog-history-extern.patch
+
+ "${FILESDIR}"/${PN}-5.1_p16-configure-clang16.patch
+)
+
+pkg_setup() {
+ # bug #7332
+ if is-flag -malign-double ; then
+ 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() {
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+ else
+ if use verify-sig ; then
+ verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.sig}
+
+ local patch
+ for patch in "${MY_PATCHES[@]}" ; do
+ verify-sig_verify_detached ${patch}{,.sig}
+ done
+ fi
+
+ unpack ${MY_P}.tar.gz
+
+ if [[ -n ${GENTOO_PATCH_VER} ]] ; then
+ unpack ${PN}-${GENTOO_PATCH_VER}-patches.tar.xz
+ fi
+ fi
+}
+
+src_prepare() {
+ # Include official patches
+ [[ ${PLEVEL} -gt 0 ]] && eapply -p0 "${MY_PATCHES[@]}"
+
+ # Clean out local libs so we know we use system ones w/releases.
+ if is_release ; then
+ rm -rf lib/{readline,termcap}/* || die
+ touch lib/{readline,termcap}/Makefile.in || die # 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, bug #407985
+ sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die
+ touch -r . doc/* || die
+
+ eapply -p0 "${PATCHES[@]}"
+ eapply_user
+}
+
+src_configure() {
+ local myconf=(
+ --disable-profiling
+
+ # 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 :(.
+ --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%%_*}
+
+ if is_release ; then
+ # Use system readline only with released versions.
+ myconf+=( --with-installed-readline=. )
+ fi
+
+ if use plugins ; then
+ append-ldflags -Wl,-rpath,"${EPREFIX}"/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
+
+ # bug #444070
+ tc-export AR
+
+ 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
+ # bug #432338
+ sed_args+=(
+ -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}
+ docinto ${d}
+ for f in ${d}/* ; do
+ if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then
+ doexe ${f}
+ else
+ dodoc ${f}
+ fi
+ done
+ done
+ fi
+
+ # Install bash_builtins.1 and rbash.1
+ emake -C doc DESTDIR="${D}" install_builtins
+ sed 's:bash\.1:man1/&:' doc/rbash.1 > "${T}"/rbash.1 || die
+ doman "${T}"/rbash.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
+}
+
+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-5.1_p16-configure-clang16.patch b/app-shells/bash/files/bash-5.1_p16-configure-clang16.patch
new file mode 100644
index 000000000000..8d77fbd968a7
--- /dev/null
+++ b/app-shells/bash/files/bash-5.1_p16-configure-clang16.patch
@@ -0,0 +1,37 @@
+https://lists.gnu.org/archive/html/bug-bash/2023-02/msg00000.html)
+
+From 2cdf8b42885189b3cf7c47096b01f104e520546a Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Thu, 2 Feb 2023 05:43:37 +0000
+Subject: [PATCH] aclocal.m4: fix -Wimplicit-function-declaration in dup2 check
+
+dup2 requires a <unistd.h> include. Fixes the following when diffing config.log
+ when testing with a stricter compiler:
+```
+-warning: call to undeclared function 'dup2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
++error: call to undeclared function 'dup2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+```
+--- aclocal.m4
++++ aclocal.m4
+@@ -284,6 +284,9 @@ AC_CACHE_VAL(bash_cv_dup2_broken,
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #include <stdlib.h>
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif
+ int
+ main()
+ {
+--- configure
++++ configure
+@@ -16990,6 +16990,9 @@ else
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #include <stdlib.h>
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif
+ int
+ main()
+ {