From 102644010455dc09adf6411d48b6d2cc117e7824 Mon Sep 17 00:00:00 2001 From: Dor Askayo Date: Thu, 13 Jul 2023 19:05:22 +0300 Subject: [PATCH 1/4] Avoid exporting the DISK variable It's not expected to be used by child processes. --- sysb/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysb/run.sh b/sysb/run.sh index 8606519..653a66e 100755 --- a/sysb/run.sh +++ b/sysb/run.sh @@ -75,7 +75,7 @@ if [ $(($(ls -l "/dev/${DISK}" | sed "s/.*, *//" | sed "s/ .*//") % 8)) -eq 0 ]; mkfs.ext4 "/dev/${DISK}1" DISK="${DISK}1" fi -echo "export DISK=${DISK}" >> /usr/src/bootstrap.cfg +echo "DISK=${DISK}" >> /usr/src/bootstrap.cfg SYSC=/sysc From 6276da59cdd82b58d9d6984e19ed8d8d7ec7e9f8 Mon Sep 17 00:00:00 2001 From: Dor Askayo Date: Thu, 13 Jul 2023 18:53:05 +0300 Subject: [PATCH 2/4] Avoid exporting base_dir in linux-headers-5.10.41 It's not expected to be used by child processes. --- sysa/linux-headers-5.10.41/linux-headers-5.10.41.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysa/linux-headers-5.10.41/linux-headers-5.10.41.sh b/sysa/linux-headers-5.10.41/linux-headers-5.10.41.sh index c189420..e1c2d8e 100755 --- a/sysa/linux-headers-5.10.41/linux-headers-5.10.41.sh +++ b/sysa/linux-headers-5.10.41/linux-headers-5.10.41.sh @@ -23,7 +23,7 @@ src_compile() { } src_install() { - export base_dir="${PWD}" + base_dir="${PWD}" # We "compile" the headers here because it is easier for d in include/uapi arch/x86/include/uapi; do cd "${d}" From 5b058a2b81a9f7dc31bdb7981aba4d94faff5b13 Mon Sep 17 00:00:00 2001 From: Dor Askayo Date: Thu, 13 Jul 2023 18:58:15 +0300 Subject: [PATCH 3/4] Use "declare -x" to export variables in autogen-5.18.16 Using the "declare -x" build-in instead of "export" allows variables to be exported only to child processes that are executed in the scope of the function in which the variables are declared, including nested function calls. This avoid polluting the environment of every package build that follows. --- sysc/autogen-5.18.16/autogen-5.18.16.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sysc/autogen-5.18.16/autogen-5.18.16.sh b/sysc/autogen-5.18.16/autogen-5.18.16.sh index 99e9479..f53a1b6 100755 --- a/sysc/autogen-5.18.16/autogen-5.18.16.sh +++ b/sysc/autogen-5.18.16/autogen-5.18.16.sh @@ -15,13 +15,13 @@ src_prepare() { src_compile() { ( set -e - export PKG_CONFIG_PATH="${LIBDIR}/pkgconfig" + declare -x PKG_CONFIG_PATH="${LIBDIR}/pkgconfig" sed -i "s/make install/make install DESTDIR=\${DESTDIR}/" bootstrap_tarball.sh sed -i "/make check/d" bootstrap_tarball.sh - export FINALPREFIX="${PREFIX}" - export GUILE_STATIC="--static" - export GNULIBDIR="${PWD}"/../gnulib-8f4538a5 - export MAN_PAGE_DATE=1970-01-01 + declare -x FINALPREFIX="${PREFIX}" + declare -x GUILE_STATIC="--static" + declare -x GNULIBDIR="${PWD}"/../gnulib-8f4538a5 + declare -x MAN_PAGE_DATE=1970-01-01 SKIP_MAIN=1 . ./bootstrap_tarball.sh prepare_tarball From 7123b48876719be5bd5114357610e7a2a06a840f Mon Sep 17 00:00:00 2001 From: Dor Askayo Date: Thu, 13 Jul 2023 19:02:12 +0300 Subject: [PATCH 4/4] Use "declare -x" to export variables in openssl-1.1.1l.sh This avoid polluting the environment of every package build that follows. --- sysc/openssl-1.1.1l/openssl-1.1.1l.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysc/openssl-1.1.1l/openssl-1.1.1l.sh b/sysc/openssl-1.1.1l/openssl-1.1.1l.sh index 3d846a6..56ddcc5 100755 --- a/sysc/openssl-1.1.1l/openssl-1.1.1l.sh +++ b/sysc/openssl-1.1.1l/openssl-1.1.1l.sh @@ -23,7 +23,7 @@ src_configure() { } src_compile() { - export SOURCE_DATE_EPOCH=1638831119 + declare -x SOURCE_DATE_EPOCH=1638831119 default }