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-07-03 03:26:41 +0200
committerDavid Runge <dvzrv@archlinux.org>2021-07-03 03:26:41 +0200
commit1b01d22596708a59275b7af5aa3e7ad4d1a3edb7 (patch)
tree98a9f94072933a155a7842811ad924df43ff4e2a
parent33a2ab6332f8c4db49542fc8ac70ffaf6331feb9 (diff)
parentd65682a7651bfd7daf74efa439ee1b47c3d98ead (diff)
Merge remote-tracking branch 'nl6720/env-i-PATH'
* nl6720/env-i-PATH: mkarchiso: unset TMPDIR to work around FS#70580 Revert "archiso/mkarchiso: clear environment variables when chrooting"
-rwxr-xr-xarchiso/mkarchiso11
1 files changed, 6 insertions, 5 deletions
diff --git a/archiso/mkarchiso b/archiso/mkarchiso
index 7cec3a9..7596673 100755
--- a/archiso/mkarchiso
+++ b/archiso/mkarchiso
@@ -322,18 +322,18 @@ _make_custom_airootfs() {
# Install desired packages to airootfs
_make_packages() {
- local envvars_in_chroot=("SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}")
_msg_info "Installing packages to '${pacstrap_dir}/'..."
if [[ -n "${gpg_key}" ]]; then
exec {ARCHISO_GNUPG_FD}<>"${work_dir}/pubkey.gpg"
- envvars_in_chroot+=("ARCHISO_GNUPG_FD=${ARCHISO_GNUPG_FD}")
+ export ARCHISO_GNUPG_FD
fi
+ # Unset TMPDIR to work around https://bugs.archlinux.org/task/70580
if [[ "${quiet}" = "y" ]]; then
- env -i "${envvars_in_chroot[@]}" pacstrap -C "${work_dir}/${buildmode}.pacman.conf" -c -G -M -- "${pacstrap_dir}" "${buildmode_pkg_list[@]}" &> /dev/null
+ env -u TMPDIR pacstrap -C "${work_dir}/${buildmode}.pacman.conf" -c -G -M -- "${pacstrap_dir}" "${buildmode_pkg_list[@]}" &> /dev/null
else
- env -i "${envvars_in_chroot[@]}" pacstrap -C "${work_dir}/${buildmode}.pacman.conf" -c -G -M -- "${pacstrap_dir}" "${buildmode_pkg_list[@]}"
+ env -u TMPDIR pacstrap -C "${work_dir}/${buildmode}.pacman.conf" -c -G -M -- "${pacstrap_dir}" "${buildmode_pkg_list[@]}"
fi
if [[ -n "${gpg_key}" ]]; then
@@ -375,7 +375,8 @@ _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 -- env -i "SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}" arch-chroot "${pacstrap_dir}" "/root/customize_airootfs.sh"
+ # Unset TMPDIR to work around https://bugs.archlinux.org/task/70580
+ eval -- env -u TMPDIR arch-chroot "${pacstrap_dir}" "/root/customize_airootfs.sh"
rm -- "${pacstrap_dir}/root/customize_airootfs.sh"
_msg_info "Done! customize_airootfs.sh run successfully."
fi