summaryrefslogtreecommitdiff
path: root/app-shells/bash
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-06-21 00:11:18 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-06-21 00:11:18 +0100
commitbed3b604e16fc6075e29f1af8d47507a07035bd3 (patch)
tree1f5d57fd86e90db37f62afb463f4b4c08a2b6eda /app-shells/bash
parentd6ca4e4f90cb75c323b5988eefa96a04c0d36908 (diff)
gentoo auto-resync : 21:06:2024 - 00:11:18
Diffstat (limited to 'app-shells/bash')
-rw-r--r--app-shells/bash/Manifest11
-rw-r--r--app-shells/bash/bash-5.1_p16-r12.ebuild (renamed from app-shells/bash/bash-5.1_p16-r11.ebuild)5
-rw-r--r--app-shells/bash/bash-5.2_p26-r5.ebuild (renamed from app-shells/bash/bash-5.2_p26-r4.ebuild)5
-rw-r--r--app-shells/bash/bash-5.3_alpha-r4.ebuild (renamed from app-shells/bash/bash-5.3_alpha-r3.ebuild)3
-rw-r--r--app-shells/bash/files/bashrc-r117
-rw-r--r--app-shells/bash/files/bashrc.d/10-gentoo-color.bash3
-rw-r--r--app-shells/bash/files/bashrc.d/15-gentoo-bashrc-check.bash24
7 files changed, 50 insertions, 18 deletions
diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest
index 09e084124843..70f303e6e9db 100644
--- a/app-shells/bash/Manifest
+++ b/app-shells/bash/Manifest
@@ -7,9 +7,10 @@ AUX bash-5.2_p21-wpointer-to-int.patch 512 BLAKE2B 0c7f5eb5b697abf15c1d17888a973
AUX bash-5.2_p26-memory-leaks.patch 4357 BLAKE2B 1b9f08054b28fa0e73b7b3d4da2674efd75b3ce11392a078d5072ba8e466f4a9c504892f9a1f2f62e4dc39b22050e68d42bcbae8ebe537df699d0c884c89a0b9 SHA512 ad30a74b7f4ecf5f7446867baf9b177fb1036e384b61a2ed73b121b17b7f686f9bdf9295c5c251b11d165f80e6110a2768257a2460c7e93abe78a5f763b972e8
AUX bash_logout 205 BLAKE2B b8c0266c3d1e31a714304a2b3b33389f042ae5bd497379f9b15ce31d47d1e3da73ba6536023953b00efe27b687e2ff45d94e3f01a13acc824dc12e31552c5b94 SHA512 7234250c03fc920996a381f9daef9e2d8ab1e1a29acdebed6669d8e0fe1c872a7fa343adf7d9ddc81225b0cd9eb223ba7ad1ff42448aff057fc6d6baa8f04a7d
AUX bashrc 3494 BLAKE2B e9379c18fca85666cd347d1d8cf5c9859c5865ad7a3ded1ac5724bad6117924231e89dcc21f1a80931591e9a39c1acc3f7be8b2afe38986ea34b3b8fc12f5814 SHA512 a8fa416ab9265055e778fad3e4190ab5f57da0823c12d60a915bb77ba701fe93df8d16e041dd5747ed9db899a2516451b803db648aed0f85f0abb6d98c9414b8
-AUX bashrc-r1 862 BLAKE2B 93be0cc75a376562f8d2b03660cf30474be54dee8b201a0a679cf5c204f6a913a020236fab47e94ddf25a4eedfce35ec699f22d4ceb526a2a81ecf10c73d5f66 SHA512 bdaf735379affb1969dd7189d24686fa60f22a101493bde5598b2c57e4007db4f88ad08232731133754a21882ded64bb33b295388cdeb9d5b43b0a66de711c13
-AUX bashrc.d/10-gentoo-color.bash 2110 BLAKE2B 7cdfed47d00ffd0d1ba721689019e0abf17714e1d42fa6d5c4fd3f794fd40537872bf0710a11aed097c80ac042d10c9b1cff87faa00dc1e1a6c890696311ab46 SHA512 08b07fa87eb16f8a15a5d9c5ec719a63646a83d631a7a39fcb85a251be93e2459e5da62cd04728fcf58a4d4bef432a87d2396e5842199ba9054947bd4993b047
+AUX bashrc-r1 894 BLAKE2B ffaebc59c403b815df246342564e7d871f0c5eda437f7d63cef42ed2041912bd61722cab3034342fcb0336b48d9a14ada74052e52f02774695fc3e968c6feaae SHA512 82972cd0feede88c679fe8690da4884e8efa3decfc3bb72404fbd1129364f0092d2edfb1c6cc1f5adf783a6deca64a82c670a8b034ac0c3f85742a67306aa36b
+AUX bashrc.d/10-gentoo-color.bash 2209 BLAKE2B 8f01349bcb9814fc371debdda7bc6158a51b285938426fef5f6427ed40df0ae480c3d5318df30f72bf854c07e0da619d3e2cdb46927cbfdc58d3eb8cb3a305ba SHA512 697cb742378f8fbe6073e8457cc92d83b21606fe45b2779436bc6a874847cef80168d84c413d8c04b0062840e8720967d94877839599ea819d7547afc891934c
AUX bashrc.d/10-gentoo-title.bash 2341 BLAKE2B 58eda9077cfd754f7a900add7c0ffe9a938f4e9b61ba1527f81acfe65f2e1b2ece4b89c9792ca00f82b0b156a8c8d901103f3d4bd94380122552014d17046cee SHA512 2a75e1ffe9c558d451f9bf0ead186fd5d1e13a8189dad308bebca46e6d2789a2140d4e8567d27ee95d5994b690afb1dbe3968ac701159e9efa548483286e98b7
+AUX bashrc.d/15-gentoo-bashrc-check.bash 1002 BLAKE2B b104e871329de47ac82941ca7ff9b03e2e66779603145dcae103052344b207306438cd3023d36255aca2b5fe53a7dc48d42e06e7e1d764ab0ad420b29c2e1650 SHA512 9134a27e234fe2ec0c27f99c83a9a8ac2b3209c766cb7ffbee47dac4c378178844c2c66851b8b114f43e1b4d9790e21121c33ba48cac1bc0a8f2ca06fe841d80
AUX dot-bash_logout 127 BLAKE2B 8290778aea3426f4c56e5a9e7328faa76f99001fc7ce3eeb3ec26624edcd918d7e946da9a63ffcd0cf0f739b528ccb9e764d448276fe4344b69ef2036fdd9921 SHA512 e0248b5087656a4dd3a4790ed8e6101866b922ccab36b510b3bf408dc0c583e70f323fbad0392e4ea6ca5dcbe73568733e0c0aa9c8ce6b00ff5f72bf3e9fd8fd
AUX dot-bash_profile 204 BLAKE2B cdb5ece2bea3b47651e2c9ca8d48ef3b0c4b7e2d660632d79edf3cdcea8f5f5a061019739b977538b25f2ace9dcb46e25b30e2d566ea71f6c1ac05388e59c957 SHA512 97ad83696b7eb8b084a53530d1a3e7648722ae4199c91737ceb02b8238e7637b0770731f5140ffb552142311f79b140a041d7e1e5366ba60399b0019f164fce9
AUX dot-bashrc 551 BLAKE2B e245955936f0e036073e7fe153bd01181ae7206a73b45b0411e8d1a6eb0b7131dce260755eed00d2639848eebaefacf7c13087d4315b17f85fbafa6eba4c9fd8 SHA512 518b62aa2fa30e7d1692847929a6ce8dae4eac93e8b16d223d1ae86f4d5b076bcbe1852c9034f321c013e17502db9f771979957c67f8e8a71ca4eea7bfe9cc1b
@@ -452,9 +453,9 @@ EBUILD bash-4.2_p53.ebuild 5157 BLAKE2B 1a58f67c384b6ae781e48ddc2fb131086a23b449
EBUILD bash-4.3_p48-r2.ebuild 6358 BLAKE2B 532802911ced386ccff0594e5eee739d0d5ebba7e0bf89c431e2769ca7b2dc48f77787f12bcb327f9d394d3bd80680889968c3708ff9f7e64615347fcfd521f5 SHA512 62ed893e23d65d17d0f83d812e616511b4ff2d69a52e6bffb3ed421bb339d18a213a2f1da0239b108e3e81cf0b2f61b4e0cf535964f40dc4577d0cff226fd9bd
EBUILD bash-4.4_p23-r2.ebuild 6356 BLAKE2B 7501ac7628fcd2f35d9ca6c2153190d2524545f38a9eb793cd8b9d30ed5cb4ae11078cd7bc940fe3cda3f62797ed53de5ab82f726219c054cdc8779a011a8ea9 SHA512 9b9d12e1408944d18c698b0be9940618c059599138f10b20ed55dc69131aac900e3cae0e0b79a55e77d075f6a03c2970b6d22250afe5c7912c652800fe9a30ef
EBUILD bash-5.0_p18-r2.ebuild 7680 BLAKE2B 6a615f5ef093b32e85bfe8a0fd270d9c636c5d178ba518a8382e1ad5f0a2e128ad85fec1c8441c416c836bdf83ad5ad0e154f79792a908fd6a97ef23750b1800 SHA512 43a8e61a3b754c5ff25a4c7c6c62c07be626c0e9c1515fcfa8a15e25a3b0aff9fa4d00275c2d64bcb506417a7babb6ee120cde118fd7c9255fade7245adeaaae
-EBUILD bash-5.1_p16-r11.ebuild 9928 BLAKE2B 83eca9771c858fe746d61db2ff320bcfd9f1e829ad96fe08b01a58daa813e1101563489c08f6ec9167d5c94478525d9ac0d96bb1a4df28690715245a133c031b SHA512 ec70f4bb2b9a43fc0e606cdc637f4ad0c14eba249650f5c35f9c70b95b16f1c14f45b5de3a21a6aa120e5ce78615b62f2385f8dcb38d43eb61c4e703517a5b49
+EBUILD bash-5.1_p16-r12.ebuild 10018 BLAKE2B 79618a397c0af05487391a499224fb86b8328bcc89f8529908ecbb69cb07423a4cf5b0e180d94d9cd99bff75fdaac9b97a6adbd8f2c47f77dc7bb1460c6396a7 SHA512 8acf7151c3da8087436b8a9dd222e562100325260e46dbf20db1fa41a23a62ef78edaa1606b90b3fd9f550d30c3090c900b01436109a5c210f762916f2e59f90
EBUILD bash-5.1_p16-r6.ebuild 8999 BLAKE2B e9208661767c61fbd9b06a61111db58908897bdb2d722b7ccbe5d79cd6d2e2543b6c1c89688e62f51ecdb36f107e74727dc6985396a20d8db8682c9036a6db7d SHA512 3fa9c420bbbc154569eb2a9ebb96681b4f10bb6cdbec43608d171f1d9c46a169d7f6cf8b3f419ff395ebe5dee852fa8c46ccd74c10ee9f0f10a6a281da679f5d
-EBUILD bash-5.2_p26-r4.ebuild 11328 BLAKE2B e2a936fac4e2e9e8fab2e242269e8b1646e248cd9ed9aab4f1760c93e6763a841957c9cff9a5b833a3923af3533fc0d93b073ce008498af228ea0241ef4004ae SHA512 7565a3c82c06597cce4b5d1f349246a25e9f98fc2772de64991b10cf4202474489d4b2e5ae24fd3ea528cb4048b2420325fba9d8f8bf55369734421e0d30a908
-EBUILD bash-5.3_alpha-r3.ebuild 11194 BLAKE2B a1f59e955a684540cde5b8b0369312d364bcd94ecc9a33edb708e5e9d20f9bdbc3acf54d8df2cea6da81ae7b4ecf85e8a0ced717cc436b894e7a580deaddcee4 SHA512 94aa8315cd1e7e99fbcf4e89e0df5e66128259f76b05b12ec14caa384dfa92e84e9f5ff043c4cb85add21036045661684cc1f0c4a69c7f9110eaab4553d4d4f0
+EBUILD bash-5.2_p26-r5.ebuild 11414 BLAKE2B a0e58e010793b88860ec4e792cd6c2202559eb0cc5f17a130e91da475b809442450b4c0830b456420809a631c750a0e06040867c70a5b7dffea2bbab1906e1d8 SHA512 d9846d3b08681ea2bf35fae88e6ed5ec63c43a07b6b75e3a8539b682309770715368d33e15253aa9033a0f0a9ded9c36066bbf603f9b92669c5db03da1fa2a1c
+EBUILD bash-5.3_alpha-r4.ebuild 11286 BLAKE2B b8b8fa80219b8799585f4154703dec6403416e70fa988ede46381231055545e93edcca0ccb277a21a753f4d155a45ddea9be807180e6dbbcd8f8bc82d63f0792 SHA512 5e804e90744b06821be9e2d19bac5d18f090bf3651dc7bd110a08300f8a9f6f1a249aba6f1d5f251eb3c184fdd3a8b4d279ccff0bc082dbb96e4cfafc14666bb
EBUILD bash-9999.ebuild 11144 BLAKE2B 03af226452f1f1a1527e00e53d5f5a8db9397d952a1d937d953825aa75e9d204d5e39772ebe1fcce48e82152a568d56a960479a8e3e5a30f3afb3eea17defde6 SHA512 1fd2714511a0600c793901725cefd59a764fe256dcbac8dee9004aa7415d6d7df6631165dafecff3d487430baeefd645c1416935a8282da94f8c14c37a3e66ae
MISC metadata.xml 1009 BLAKE2B f71587b0a6d05b907f82b26be93b071290d91dc8f612f7b008a05eaa94d45be2ef8c1d992b7ac886648a9dcf964c30e8d9a7aff90d44835beb452e0d635b9533 SHA512 8aa1cb4c3206a76d10181394a91c315967fd9d3b359194f430f075fdd5a0b4b32149eec36b85412ef7e84b55e7b01955c75486b2df82b392a5acb3df8229a88d
diff --git a/app-shells/bash/bash-5.1_p16-r11.ebuild b/app-shells/bash/bash-5.1_p16-r12.ebuild
index 863a03b120bd..cc9ce6983938 100644
--- a/app-shells/bash/bash-5.1_p16-r11.ebuild
+++ b/app-shells/bash/bash-5.1_p16-r12.ebuild
@@ -65,7 +65,7 @@ S=${WORKDIR}/${MY_P}
LICENSE="GPL-3+"
SLOT="0"
if (( PLEVEL >= 0 )); then
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline"
@@ -268,6 +268,9 @@ src_install() {
insinto /etc/bash/bashrc.d
my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color.bash | newins - 10-gentoo-color.bash
doins "${FILESDIR}"/bashrc.d/10-gentoo-title.bash
+ if [[ ! ${EPREFIX} ]]; then
+ doins "${FILESDIR}"/bashrc.d/15-gentoo-bashrc-check.bash
+ fi
insinto /etc/skel
for f in bash{_logout,_profile,rc}; do
diff --git a/app-shells/bash/bash-5.2_p26-r4.ebuild b/app-shells/bash/bash-5.2_p26-r5.ebuild
index 980ea4fdba51..1170ddb10c9b 100644
--- a/app-shells/bash/bash-5.2_p26-r4.ebuild
+++ b/app-shells/bash/bash-5.2_p26-r5.ebuild
@@ -65,7 +65,7 @@ S=${WORKDIR}/${MY_P}
LICENSE="GPL-3+"
SLOT="0"
if (( PLEVEL >= 0 )); then
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline"
@@ -312,6 +312,9 @@ src_install() {
insinto /etc/bash/bashrc.d
my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color.bash | newins - 10-gentoo-color.bash
doins "${FILESDIR}"/bashrc.d/10-gentoo-title.bash
+ if [[ ! ${EPREFIX} ]]; then
+ doins "${FILESDIR}"/bashrc.d/15-gentoo-bashrc-check.bash
+ fi
insinto /etc/skel
for f in bash{_logout,_profile,rc}; do
diff --git a/app-shells/bash/bash-5.3_alpha-r3.ebuild b/app-shells/bash/bash-5.3_alpha-r4.ebuild
index 248f30b7b4e1..9699a659026a 100644
--- a/app-shells/bash/bash-5.3_alpha-r3.ebuild
+++ b/app-shells/bash/bash-5.3_alpha-r4.ebuild
@@ -311,6 +311,9 @@ src_install() {
insinto /etc/bash/bashrc.d
my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color.bash | newins - 10-gentoo-color.bash
doins "${FILESDIR}"/bashrc.d/10-gentoo-title.bash
+ if [[ ! ${EPREFIX} ]]; then
+ doins "${FILESDIR}"/bashrc.d/15-gentoo-bashrc-check.bash
+ fi
insinto /etc/skel
for f in bash{_logout,_profile,rc}; do
diff --git a/app-shells/bash/files/bashrc-r1 b/app-shells/bash/files/bashrc-r1
index 6f4631568119..deb0ce97d4a7 100644
--- a/app-shells/bash/files/bashrc-r1
+++ b/app-shells/bash/files/bashrc-r1
@@ -5,16 +5,15 @@ if [[ $- != *i* ]]; then
return
fi
-# A convenient function to determine whether bash has readline support.
-genfun_has_readline() [[ $(shopt -p direxpand 2>/dev/null) ]]
+# Disable errexit in case the user enabled it then chose to re-source this file.
+shopt -u -o errexit
-# The following two shell options require for bash to have readline support.
-genfun_has_readline &&
+# Disable completion when the input buffer is empty. Mute STDERR because this
+# option is only present in the case that bash was built with readline support.
+shopt -s no_empty_cmd_completion 2>/dev/null &&
-# Disable completion when the input buffer is empty.
-shopt -s no_empty_cmd_completion &&
-
-# Append to HISTFILE rather than overwrite upon exiting, per bug #139609.
+# Append to HISTFILE rather than overwrite upon exiting, per bug #139609. This
+# option also requires for bash to have been built with readline support.
shopt -s histappend
# Initialise PROMPT_COMMAND as an array, which is permitted as of bash 5.1.
@@ -28,5 +27,3 @@ for _ in /etc/bash/bashrc.d/*; do
source "$_"
fi
done
-
-unset -f genfun_has_readline
diff --git a/app-shells/bash/files/bashrc.d/10-gentoo-color.bash b/app-shells/bash/files/bashrc.d/10-gentoo-color.bash
index 6192bfaf4394..f0c5983b66e1 100644
--- a/app-shells/bash/files/bashrc.d/10-gentoo-color.bash
+++ b/app-shells/bash/files/bashrc.d/10-gentoo-color.bash
@@ -34,7 +34,8 @@ elif (( gentoo_color == 16777216 )); then
export COLORTERM=truecolor
fi
-if (( gentoo_color <= 0 )) || ! genfun_has_readline; then
+# For direxpand to be missing indicates that bash is lacking readline support.
+if (( gentoo_color <= 0 )) || [[ ! $(shopt -p direxpand 2>/dev/null) ]]; then
# Define a prompt without color.
PS1='\u@\h \w \$ '
elif (( EUID == 0 )); then
diff --git a/app-shells/bash/files/bashrc.d/15-gentoo-bashrc-check.bash b/app-shells/bash/files/bashrc.d/15-gentoo-bashrc-check.bash
new file mode 100644
index 000000000000..8f2b0405c6b9
--- /dev/null
+++ b/app-shells/bash/files/bashrc.d/15-gentoo-bashrc-check.bash
@@ -0,0 +1,24 @@
+# /etc/bash/bashrc.d/15-gentoo-bashrc-check.bash
+
+# Some users have ~/.bashrc as a copy of ${FILESDIR}/bashrc which either matches
+# exactly or is only trivially modified. Such is an improper state of affairs
+# and results in the bashrc.d drop-ins being sourced twice. Warn them that they
+# should use the skeleton file instead. This drop-in should be removed no sooner
+# than one year from the date of its introduction.
+
+if [[ -e ${TMPDIR:-/tmp}/.gentoo-bashrc-check-${EUID} || ! -f ~/.bashrc ]]; then
+ return
+fi
+
+{
+ if grep -qxF 'for sh in /etc/bash/bashrc.d/* ; do' -- ~/.bashrc; then
+ cat >&3 <<'EOF'
+WARNING! Your ~/.bashrc file is based on an old copy of /etc/bash/bashrc, which
+is not intended for use within a home directory. Please either delete ~/.bashrc
+or replace it with a copy of /etc/skel/.bashrc before optionally customizing it
+further. Neglecting to do so may result in bash behaving unexpectedly.
+
+EOF
+ fi
+ touch -- "${TMPDIR:-/tmp}/.gentoo-bashrc-check-${EUID}"
+} 3>&2 2>/dev/null