[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 <g@vtr.net> 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.
Aaron Griffin wrote:
On 3/26/07, Gustavo Chain <g@vtr.net> 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 <andrew@neptune-one.net> branch nick: bug_log_pipe timestamp: Sun 2007-03-25 16:39:45 +0100 message: * Fix bug where 'makepkg -L' doesn't stop on build failure. To test... PKGBUILD>> pkgname=test-package pkgver=1 pkgrel=1 arch=(i686) build() { false; } run makepkg -L build() will fail and makepkg carries on trying to create the package. === modified file 'scripts/makepkg' --- old/scripts/makepkg 2007-03-24 03:49:27 +0000 +++ new/scripts/makepkg 2007-03-25 15:39:45 +0000 @@ -899,10 +899,10 @@ #use 'errexit' to bail on syntax error [ $set_e -eq 1 ] && set -e - build 2>&1 | tee "$BUILDLOG" + build 2>&1 | tee "$BUILDLOG"; ret=${PIPESTATUS[0]} [ $set_e -eq 1 ] && set +e - if [ ${PIPESTATUS[0]} -gt 0 ]; then + if [ $ret -gt 0 ]; then error "Build Failed. Aborting..." removedeps exit 2
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 <g@vtr.net> 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 <andrew@neptune-one.net> wrote:
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 <g@vtr.net> 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 <andrew@neptune-one.net> wrote:
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