FS#38858 - [devtools] http_proxy doesn't propagate into chroot when using makechrootpkg
Attached to Project:
Arch Linux
Opened by Magnus Therning (magus) - Monday, 10 February 2014, 14:30 GMT
Last edited by Kristian (klausenbusk) - Saturday, 03 June 2023, 18:07 GMT
Opened by Magnus Therning (magus) - Monday, 10 February 2014, 14:30 GMT
Last edited by Kristian (klausenbusk) - Saturday, 03 June 2023, 18:07 GMT
|
Details
Description:
The environment variable http_proxy doesn't make it into the build chroot. Info: Make sure /etc/sudoers contain the line 'Defaults env_keep += "http_proxy"' to ensure http_proxy is carried over when running sudo: ~~~~ % echo $http_proxy http://my.proxy:8080 % sudo arch-chroot ../tmp/x86_64-chroot/build sh-4.2# echo $http_proxy http://my.proxy:8080 sh-4.2# exit ~~~~ Now try out the attached (silly) package with makechrootpkg: ~~~~ % sudo makechrootpkg -l build -r ../tmp/x86_64-chroot ==> Making package: http-pkg 0.1-1 (Mon Feb 10 15:23:44 CET 2014) ==> Retrieving sources... ==> Making package: http-pkg 0.1-1 (Mon Feb 10 15:23:45 CET 2014) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Retrieving sources... ==> Extracting sources... ==> Starting prepare()... No http_proxy ==> ERROR: A failure occurred in prepare(). Aborting... ==> ERROR: Build failed, check /home/magnus/arch/tmp/x86_64-chroot/build/build ~~~~ Ideally makechrootpkg should be changed so that http_proxy is propagated (maybe it should be configurable which parts of the environment is propagated?). Alternatively it should be documented how to control the environment in the chroot when building with makechrootpkg (I've search the wiki and generally on google, but found nothing on this). |
This task depends upon
Closed by Kristian (klausenbusk)
Saturday, 03 June 2023, 18:07 GMT
Reason for closing: Upstream
Additional comments about closing: Please report upstream if this is still relevant: https://gitlab.archlinux.org/archlinux/d evtools.
Saturday, 03 June 2023, 18:07 GMT
Reason for closing: Upstream
Additional comments about closing: Please report upstream if this is still relevant: https://gitlab.archlinux.org/archlinux/d evtools.
Comment by
Dave Reisner (falconindy) -
Saturday, 18 June 2016, 19:15 GMT
Comment by
Maxime Gauduin (Alucryd) -
Thursday, 30 March 2017, 08:10 GMT
For anyone interested in fixing this, systemd-nspawn eats the
environment. We'd need to plumb -E key=val arguments into it.
Adding -E is not enough, you also need to add the env_keep line in
the chroot's sudoers or else you won't be able to download depends
and makedepends.