[arch-general] Fwd: AIF through proxy
sorry, forgot the list again... wont happen again! ---------- Forwarded message ---------- From: Andre "Osku" Schmidt <andre.osku.schmidt@googlemail.com> Date: Sat, May 22, 2010 at 12:50 PM Subject: Re: [arch-general] AIF through proxy To: Xavier Chantry <chantry.xavier@gmail.com> On Sat, May 22, 2010 at 12:22 PM, Xavier Chantry <chantry.xavier@gmail.com> wrote:
On Sat, May 22, 2010 at 11:38 AM, Dieter Plaetinck <dieter@plaetinck.be> wrote:
On Sat, 22 May 2010 02:04:41 +0200 "Andre \"Osku\" Schmidt" <andre.osku.schmidt@googlemail.com> wrote:
On Fri, May 21, 2010 at 10:56 PM, Dieter Plaetinck <dieter@plaetinck.be> wrote:
On Fri, 21 May 2010 22:41:12 +0200 "Andre \"Osku\" Schmidt" <andre.osku.schmidt@googlemail.com> wrote:
> just gives me the usage info, without any > errors... and also the "Invalid URL scheme" errors that i see in > tty7 are nowhere to find in /var/log/*
what i would do in a case like this is just monitor the output of 'pstree' to see which processes is running (ie wget, pacman, ..), then you can debug the networking issue from there.
oooh! you learn new things every day :) super tip. thanks! i got something, maybe
pstree shows (when it hangs in url scheme error) aif /sbin/aif -p automatic -c /root/pacinst.aif -d -l |--pacman --root /mnt --config /tmp/pacman.conf -Sy
and as according to some forum post (and it seems to work only with this) i had to uncomment: XferCommand = /usr/bin/wget ... in /etc/pacman.conf to get pacman to work on the installer image console. and now looking at the /tmp/pacman.conf, this option is missing.
but as i assumed (and test showed) the /tmp/pacman.conf gets newly generated on every aif run. so i cant edit that.
what file could i edit to get that xfercommand in /tmp/pacman.conf
(this looks even closer, OMG! /me is crossing fingers... :)
another tip: just grep in the aif source code and you'll see.
if you grep for '/tmp/pacman.conf' you'll see there is a function target_write_pacman_conf in lib-pacman.sh, like any other function you can override this with your own.
awesome tip! many thanks, again!
at line 72 in /usr/lib/aif/core/libs/lib-pacman.sh i added: XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
and aif gets packets though squid! and whats even better, pacproxy.py works too, YAY!
going to bed tired and happy :) .andre
actually i meant you can redefine the target_write_pacman_conf in your profile (pacinst.aif)
btw i checked pacman.conf and it seems pacman by default uses a built-in http thingie, which does not support proxies. I think for aif, it's probably better to use the wget Xfercommand so that proxies work, especially for the target system. i'll check this on the pacman-dev mailing list.
(btw you forgot reply to all)
Dieter
libfetch does support many proxy just fine, but it might be less flexible than others. Andre, can you show us *exactly* how you set http_proxy variable ? In particular make sure you specified a protocol for the the URL.
*DOH* (homer style) yes! i forgot to add http:// and ftp:// to the variables >.<* this works wonderfully with squid: http://paste.pocoo.org/show/216945/ now i only wonder what would be the best way and place to save these variables in the installed system ? in worker_configure_system() in the users aif profile ? but where should i write them on the installed system ? and can i restrict it only to pacman ? (for general proxy like squid. pacproxy.py would be only used by pacman, hence my main interest on it) 1000x thanks for the tips!
On Sat, 22 May 2010 12:51:39 +0200 "Andre \"Osku\" Schmidt" <andre.osku.schmidt@googlemail.com> wrote:
now i only wonder what would be the best way and place to save these variables in the installed system ?
are you saying the target system should always use the proxies, for all users? maybe write the variables into /etc/profile then. don't know if there is a better way.
in worker_configure_system() in the users aif profile ?
yes...
and can i restrict it only to pacman ? (for general proxy like squid. pacproxy.py would be only used by pacman, hence my main interest on it)
I don't know... my attempt would be setting this into the pacman.conf: XferCommand = http_proxy=.. ftp_proxy= .. /usr/bin/wget --passive-ftp -c -O %o %u but i don't think that will work. maybe a pacman dev knows. a bit more dirtier, but should definitely work: XferCommand = /bin/sh -c 'http_proxy=.. ftp_proxy= .. /usr/bin/wget --passive-ftp -c -O %o %u' or write this to /etc/profile: alias pacman='http_proxy=.. ftp_proxy=.. pacman' Dieter
On Sat, May 22, 2010 at 7:19 PM, Dieter Plaetinck <dieter@plaetinck.be> wrote:
or write this to /etc/profile: alias pacman='http_proxy=.. ftp_proxy=.. pacman'
I would suggest that last way, either an alias or shell function or shell wrapper.
thanks for the tips, ill do more testing. i just posted my first findings as a quick howto on the forums http://bbs.archlinux.org/viewtopic.php?pid=762793 if anyone wants start playing with it too.
i now tested this many times on VM (vbox) http://wiki.archlinux.org/index.php/Package_Proxy_Cache everything seems to work ok. but i found some other issues with custom AIF profiles (in automatic mode) # aif -d ... gives me the aif usage info # aif ... -d runs aif but doesn't do any /var/log/aif/debug.log but whats more annoying, the base packages get downloaded in 5 seconds, but adding like xorg to TARGET_GROUPS or TARGET_PACKAGES, those packages take like 15 minutes to download, even when all come from the proxy cache... (would be nice to know if this is like that on other systems, or is it just so in my setup) and i also wonder whats the difference between TARGET_GROUPS and TARGET_PACKAGES ? but other than that, i'm really happy to got this far :) cheers .andre ps. please do video record this ;) http://www.archlinux.ca/archcon2010/?p=67
participants (3)
-
Andre "Osku" Schmidt
-
Dieter Plaetinck
-
Xavier Chantry