summaryrefslogtreecommitdiff
path: root/src/chroot-tools/mkarchroot.patch
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-03-20 17:16:36 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-03-20 17:16:36 -0400
commitd17d1d82349f7f4cb60574f7d9c2f786eec3cc93 (patch)
treee3d53602f5c6b607123f48d416d9c616eabecd07 /src/chroot-tools/mkarchroot.patch
parent089c60a05e95bee1ab3c506069f8e0e75eb43657 (diff)
Fix issue #487; obey proxy settings when creating a chroot.
https://labs.parabola.nu/issues/487
Diffstat (limited to 'src/chroot-tools/mkarchroot.patch')
-rw-r--r--src/chroot-tools/mkarchroot.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/chroot-tools/mkarchroot.patch b/src/chroot-tools/mkarchroot.patch
new file mode 100644
index 0000000..a0ea0f0
--- /dev/null
+++ b/src/chroot-tools/mkarchroot.patch
@@ -0,0 +1,23 @@
+--- mkarchroot.in 2014-01-05 18:51:15.231500986 -0500
++++ mkarchroot 2014-03-20 15:05:06.885086610 -0400
+@@ -65,6 +65,11 @@
+ chmod 0755 "$working_dir"
+ fi
+
++_env=()
++while read -r varname; do
++ _env+=("$varname=${!varname}")
++done < { declare -x | sed -r 's/^declare -x ([^=]*)=.*/\1/' | grep -i '_proxy$'; }
++env -i "${_env[@]}" \
+ pacstrap -GMcd ${pac_conf:+-C "$pac_conf"} "$working_dir" \
+ "${cache_dirs[@]/#/--cachedir=}" "$@" || die 'Failed to install all packages'
+
+@@ -72,7 +77,7 @@
+ echo 'LANG=C' > "$working_dir/etc/locale.conf"
+ echo "$CHROOT_VERSION" > "$working_dir/.arch-chroot"
+
+-exec arch-nspawn \
++exec $(librelib chroot/arch-nspawn) \
+ ${pac_conf:+-C "$pac_conf"} \
+ ${makepkg_conf:+-M "$makepkg_conf"} \
+ ${cache_dir:+-c "$cache_dir"} \