From a60ad8036105bd976eeec574497e72168a44759b Mon Sep 17 00:00:00 2001 From: Morten Linderud Date: Sun, 20 Oct 2024 20:40:09 +0200 Subject: [PATCH] pacstrap: disable DownloadUser in pacman.conf Fixes: https://gitlab.archlinux.org/archlinux/arch-install-scripts/-/issues/68 Signed-off-by: Morten Linderud --- pacstrap.in | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pacstrap.in b/pacstrap.in index 674ed98..434bcf7 100644 --- a/pacstrap.in +++ b/pacstrap.in @@ -139,6 +139,11 @@ shift [[ -d $newroot ]] || die "%s is not a directory" "$newroot" +tmpfile="$(mktemp -t pacman.conf.XXXX)" +cp "$pacman_config" "$tmpfile" +sed -i 's/^DownloadUser/#&/' "$tmpfile" +pacman_config="$tmpfile" + pacman_args+=("$pacmode" "${@:-base}" --config="$pacman_config" --disable-sandbox) if (( ! hostcache )); then @@ -156,3 +161,7 @@ else setup=chroot_setup pacstrap fi + +# TODO: There is a trap check on exit. Need to rework the trap handling with +# hook-ins/callbacks to remove aux files +rm "$tmpfile"