Bug in poudriere: can't download via proxy

elof2 at sentor.se elof2 at sentor.se
Mon Jun 23 15:51:37 UTC 2014


I run 'poudriere ports -c' to download and create a new ports tree.
Instead of using my specified HTTP_PROXY, poudriere (via portsnap via 
fetch) tries to access the internet directly. This is prohibited by my 
firewall, a web proxy must be used.

After some debugging I see that when the script 
/usr/local/share/poudriere/ports.sh executes the 
command '/usr/sbin/portsnap -d ${PTMNT}/.snap -p ${PTMNT} fetch extract' 
(on line 165), this command is executed with the following environment:

PATH=/usr/local/share/poudriere/../../libexec/poudriere:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin:/sbin:/usr/sbin
PWD=/root
POUDRIERE_VERSION=3.0.16

Nothing more! The environment consist only of these three 
variables. Therefore portsnap will try to download the portstree without 
using any proxy.



I think poudriere should pass along the exported HTTP_PROXY variable or 
set it according to poudriere.conf, if unset.

Right now neither the exported variable nor the one I set in 
poudriere.conf make it to the execution of portsnap. ...and neither 
portsnap nor fetch can be configured to use a proxy, so the environment 
variable seem to be the only way.


By modifying line 165 to 'HTTP_PROXY="http://10.10.10.10:3128" 
/usr/sbin/portsnap -d ${PTMNT}/.snap -p ${PTMNT} fetch extract', the ports 
tree will download just fine.

System:
FreeBSD 9.1 -p15 amd64

/Elof


More information about the freebsd-ports-bugs mailing list