diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-20 17:16:36 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-20 17:16:36 -0400 |
commit | d17d1d82349f7f4cb60574f7d9c2f786eec3cc93 (patch) | |
tree | e3d53602f5c6b607123f48d416d9c616eabecd07 /src/chroot-tools | |
parent | 089c60a05e95bee1ab3c506069f8e0e75eb43657 (diff) |
Fix issue #487; obey proxy settings when creating a chroot.
https://labs.parabola.nu/issues/487
Diffstat (limited to 'src/chroot-tools')
-rw-r--r-- | src/chroot-tools/Makefile | 5 | ||||
-rw-r--r-- | src/chroot-tools/mkarchroot.patch | 23 |
2 files changed, 23 insertions, 5 deletions
diff --git a/src/chroot-tools/Makefile b/src/chroot-tools/Makefile index c49c4ac..e44ad5f 100644 --- a/src/chroot-tools/Makefile +++ b/src/chroot-tools/Makefile @@ -15,9 +15,4 @@ include ../../common.mk makechrootpkg.sh.in: %.sh.in: $(devtoolsdir)/%.in cp $< $@ -mkarchroot: mkarchroot.in Makefile - @echo '< $< M4_EDIT | SED > $@' - @<'$<' $(edit) | sed -e 's|arch-nspawn|$$(librelib chroot/&)|' -e 's/pacstrap/env -i &/' >'$@' - @echo 'CHMOD $<'; chmod 755 "$@" - distcc-tool.pot: xgettext-keywords-sh+=--keyword=errusage 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"} \ |