commit: 5b84cdd1787ba627b66f05d426a2da1c1e7fe80a
parent bbe121f382365bf2582f9a4925cb564c497ae612
Author: fosslinux <fosslinux@aussies.space>
Date: Fri, 12 Jan 2024 22:09:22 +1100
Don't touch live filesystem in bash-5.2.15
Rather, uninstall existing bash before bash is built
Diffstat:
4 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/steps/bash-2.05b/pass1.kaem b/steps/bash-2.05b/pass1.kaem
@@ -47,10 +47,7 @@ make
# Install
install bash ${PREFIX}/bin/
-mkdir /bin/
-ln -s ${PREFIX}/bin/bash /bin/bash
-ln -s ${PREFIX}/bin/bash /bin/sh
-ln -s ${PREFIX}/bin/bash ${PREFIX}/bin/sh
+install bash ${PREFIX}/bin/sh
cd ../..
diff --git a/steps/bash-5.2.15/pass1.sh b/steps/bash-5.2.15/pass1.sh
@@ -53,9 +53,5 @@ src_compile() {
src_install() {
install -D bash "${DESTDIR}${PREFIX}/bin/bash"
- # Work around weird symlink bug
install bash "${DESTDIR}${PREFIX}/bin/sh"
-
- # Needs special handling b/c is currently running - tar doesn't like this
- rm -f "${PREFIX}/bin/bash" "${PREFIX}/bin/sh"
}
diff --git a/steps/helpers.sh b/steps/helpers.sh
@@ -95,11 +95,6 @@ bin_preseed() {
if [ "${UPDATE_CHECKSUMS}" = "True" ] || src_checksum "${pkg}" $((revision)); then
echo "${pkg}: installing prebuilt package."
mv "${pkg}_${revision}"* /external/repo || return 1
- if [[ "${pkg}" == bash-* ]]; then
- # tar does not like overwriting running bash
- # shellcheck disable=SC2153
- rm -f "${PREFIX}/bin/bash" "${PREFIX}/bin/sh"
- fi
cd "/external/repo"
rm -f /tmp/filelist.txt
src_apply "${pkg}" $((revision))
@@ -471,6 +466,11 @@ src_apply() {
TAR_PREFIX="/tmp/"
fi
+ # Bash does not like to be overwritten
+ if [[ "${pkg}" == bash-* ]]; then
+ rm "${PREFIX}/bin/bash"
+ fi
+
# Overwriting files is mega busted, so do it manually
# shellcheck disable=SC2162
if [ -e /tmp/filelist.txt ]; then
diff --git a/steps/manifest b/steps/manifest
@@ -74,6 +74,7 @@ build: coreutils-6.10
build: gawk-3.0.4
build: perl-5.000
build: perl-5.003
+uninstall: perl-5.000
build: perl5.004-05
build: perl5.005-03
build: perl-5.6.2