[pacman-dev] makepkg using Proxy
Hi all! Dont' you think that makepkg should use ProxySettings from pacman.conf. ? What dou you think about ? -- Gustavo Chaín Dumit Alumno de Ingeniería de Ejecución Informática Pontificia Universidad Católica de Valparaiso http://aleph.homeunix.com/~gchain
On 3/26/07, Gustavo Chain
Hi all!
Dont' you think that makepkg should use ProxySettings from pacman.conf. ?
What dou you think about ?
makepkg uses wget, which should (last I checked) honor the typical "http_proxy" and "ftp_proxy" environment variables.
Aaron Griffin wrote:
On 3/26/07, Gustavo Chain
wrote: Hi all!
Dont' you think that makepkg should use ProxySettings from pacman.conf. ?
What dou you think about ?
makepkg uses wget, which should (last I checked) honor the typical "http_proxy" and "ftp_proxy" environment variables.
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://www.archlinux.org/mailman/listinfo/pacman-dev
Here's a modified version of Gustavo Chain's patch, it moves the loading
of the proxy settings outside of the for loop (so it doesn't load for
every file in the source array), and a modified command to get the
ProxyServer setting.
Andrew
------------------------------------------------------------
revno: 3
committer: Andrew Fyfe
Ooops ignore the last email wrong patch, here's the correct patch. Andrew Andrew Fyfe wrote:
Aaron Griffin wrote:
On 3/26/07, Gustavo Chain
wrote: Hi all!
Dont' you think that makepkg should use ProxySettings from pacman.conf. ?
What dou you think about ?
makepkg uses wget, which should (last I checked) honor the typical "http_proxy" and "ftp_proxy" environment variables.
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://www.archlinux.org/mailman/listinfo/pacman-dev
Here's a modified version of Gustavo Chain's patch, it moves the loading of the proxy settings outside of the for loop (so it doesn't load for every file in the source array), and a modified command to get the ProxyServer setting.
Andrew
------------------------------------------------------------------------
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://www.archlinux.org/mailman/listinfo/pacman-dev
--- upstream/scripts/makepkg.old 2007-03-27 13:39:32.000000000 +0100 +++ upstream/scripts/makepkg 2007-03-27 13:48:34.000000000 +0100 @@ -663,6 +663,14 @@ msg "Retrieving Sources..." mkdir -p src cd "$startdir/src" + +PROXY_SERVER="$(grep -E '^ProxyServer *=' /etc/pacman.conf | \ + sed 's#^ProxyServer[\t ]*=[\t ]*\([A-Za-z0-9./:-]*\).*#\1#')" +if [ -n "$PROXY_SERVER" ]; then + export http_proxy="$PROXY" + export ftp_proxy="$PROXY" +fi + for netfile in ${source[@]}; do file=$(strip_url "$netfile") if [ -f "../$file" ]; then
On 3/27/07, Andrew Fyfe
Ooops ignore the last email wrong patch, here's the correct patch.
Andrew
Andrew Fyfe wrote:
Aaron Griffin wrote:
On 3/26/07, Gustavo Chain
wrote: Hi all!
Dont' you think that makepkg should use ProxySettings from pacman.conf. ?
What dou you think about ?
makepkg uses wget, which should (last I checked) honor the typical "http_proxy" and "ftp_proxy" environment variables.
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://www.archlinux.org/mailman/listinfo/pacman-dev
Here's a modified version of Gustavo Chain's patch, it moves the loading of the proxy settings outside of the for loop (so it doesn't load for every file in the source array), and a modified command to get the ProxyServer setting.
Andrew
------------------------------------------------------------------------
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://www.archlinux.org/mailman/listinfo/pacman-dev
--- upstream/scripts/makepkg.old 2007-03-27 13:39:32.000000000 +0100 +++ upstream/scripts/makepkg 2007-03-27 13:48:34.000000000 +0100 @@ -663,6 +663,14 @@ msg "Retrieving Sources..." mkdir -p src cd "$startdir/src" + +PROXY_SERVER="$(grep -E '^ProxyServer *=' /etc/pacman.conf | \ + sed 's#^ProxyServer[\t ]*=[\t ]*\([A-Za-z0-9./:-]*\).*#\1#')" +if [ -n "$PROXY_SERVER" ]; then + export http_proxy="$PROXY" + export ftp_proxy="$PROXY" +fi + for netfile in ${source[@]}; do file=$(strip_url "$netfile") if [ -f "../$file" ]; then
The only problem with these patches is that "ProxyServer" is not a valid pacman.cond setting, so there's no reason to put that setting there for makepkg. Both honor environment variables that should be set in some sort of profile.d script.
Aaron Griffin wrote:
The only problem with these patches is that "ProxyServer" is not a valid pacman.cond setting, so there's no reason to put that setting there for makepkg. Both honor environment variables that should be set in some sort of profile.d script.
ProxyServer is in pacman.conf.5, but you're right putting it into profile.d makes more sense. Andrew
On 3/27/07, Andrew Fyfe
Aaron Griffin wrote:
The only problem with these patches is that "ProxyServer" is not a valid pacman.cond setting, so there's no reason to put that setting there for makepkg. Both honor environment variables that should be set in some sort of profile.d script.
ProxyServer is in pacman.conf.5, but you're right putting it into profile.d makes more sense.
Andrew
Wow, is it really? That should get fixed. :) -Dan
participants (4)
-
Aaron Griffin
-
Andrew Fyfe
-
Dan McGee
-
Gustavo Chain