Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Runge <dvzrv@archlinux.org>2021-06-04 17:37:22 +0200
committerDavid Runge <dvzrv@archlinux.org>2021-06-04 17:37:22 +0200
commita9a4dc4f70cf9527ffab493f55be01b1d171b385 (patch)
treeebbd84cb040614a489fafcc280ac832fb55ddf5a
parent0bc62940c88ceefab6293931cdb85faff51aef24 (diff)
parent3d6651abf74ee4eb91212bd9a7d3478c95126cfb (diff)
Merge remote-tracking branch 'nl6720/env-i'
* nl6720/env-i: archiso/mkarchiso: clear environment variables when chrooting
-rwxr-xr-xarchiso/mkarchiso7
1 files changed, 3 insertions, 4 deletions
diff --git a/archiso/mkarchiso b/archiso/mkarchiso
index bcc095f..10daa6e 100755
--- a/archiso/mkarchiso
+++ b/archiso/mkarchiso
@@ -324,13 +324,12 @@ _make_packages() {
if [[ -n "${gpg_key}" ]]; then
exec {ARCHISO_GNUPG_FD}<>"${work_dir}/pubkey.gpg"
- export ARCHISO_GNUPG_FD
fi
if [[ "${quiet}" = "y" ]]; then
- pacstrap -C "${work_dir}/${buildmode}.pacman.conf" -c -G -M -- "${pacstrap_dir}" "${buildmode_pkg_list[@]}" &> /dev/null
+ env -i "ARCHISO_GNUPG_FD=${ARCHISO_GNUPG_FD}" pacstrap -C "${work_dir}/${buildmode}.pacman.conf" -c -G -M -- "${pacstrap_dir}" "${buildmode_pkg_list[@]}" &> /dev/null
else
- pacstrap -C "${work_dir}/${buildmode}.pacman.conf" -c -G -M -- "${pacstrap_dir}" "${buildmode_pkg_list[@]}"
+ env -i "ARCHISO_GNUPG_FD=${ARCHISO_GNUPG_FD}" pacstrap -C "${work_dir}/${buildmode}.pacman.conf" -c -G -M -- "${pacstrap_dir}" "${buildmode_pkg_list[@]}"
fi
if [[ -n "${gpg_key}" ]]; then
@@ -372,7 +371,7 @@ _make_customize_airootfs() {
_msg_info "Running customize_airootfs.sh in '${pacstrap_dir}' chroot..."
_msg_warning "customize_airootfs.sh is deprecated! Support for it will be removed in a future archiso version."
chmod -f -- +x "${pacstrap_dir}/root/customize_airootfs.sh"
- eval -- arch-chroot "${pacstrap_dir}" "/root/customize_airootfs.sh"
+ eval -- env -i arch-chroot "${pacstrap_dir}" "/root/customize_airootfs.sh"
rm -- "${pacstrap_dir}/root/customize_airootfs.sh"
_msg_info "Done! customize_airootfs.sh run successfully."
fi