View previous topic :: View next topic |
Author |
Message |
publius n00b
Joined: 21 Oct 2004 Posts: 13
|
Posted: Wed Oct 27, 2004 7:00 pm Post subject: How do I install behind a firewall/proxy? [solved] |
|
|
So I 'd like to give portage for Mac OS X a whirl on my PowerMac at work. However they have an exceptionally restrictive firewall and basically all I have is http access via a proxy server.
I download and install via the dmg, but I can't do the initial emerge --sync. Nor can I do emerge-webrsync as I dont have wget.
Any ideas?
One idea I had was to ssh home (they do allow ssh via a proxy) and forward a local port to the gentoo rysnc port. Would this work? How do I tell emerge to use a different rsync host/port?
Last edited by publius on Mon Nov 01, 2004 9:19 pm; edited 1 time in total |
|
Back to top |
|
|
amiatrome Apprentice
Joined: 28 Jun 2004 Posts: 180 Location: Campus | Arena Country Club | Home
|
Posted: Wed Oct 27, 2004 7:05 pm Post subject: |
|
|
Try this.
Code: | export http_proxy="your_proxy:port" |
_________________ blog | homepage | alias | prompts |
|
Back to top |
|
|
publius n00b
Joined: 21 Oct 2004 Posts: 13
|
Posted: Wed Oct 27, 2004 7:16 pm Post subject: |
|
|
That doesn't help. If I am not mistaken emerge --sync uses rsync not http. |
|
Back to top |
|
|
Robu n00b
Joined: 19 Nov 2003 Posts: 24 Location: Italy
|
Posted: Fri Oct 29, 2004 7:26 am Post subject: |
|
|
publius: Change the /etc/make.conf file to use curl instead of wget and add in the FETCHCOMMAND line the option to use the proxy.
for any help. Then use emerge-webrsync.
In the /etc/make.conf file use: (they should be already present):
Code: |
FETCHCOMMAND="/usr/bin/curl --connect-timeout 15 -# -o \${DISTDIR}/\${FILE} \${URI}"
RESUMECOMMAND="/usr/bin/curl --connect-timeout 15 -# -C - -o \${DISTDIR}/\${FILE} \${URI}"
|
I have modified the answer, sorry for this. |
|
Back to top |
|
|
publius n00b
Joined: 21 Oct 2004 Posts: 13
|
Posted: Fri Oct 29, 2004 7:56 pm Post subject: |
|
|
Thanks for the help Robu! Alas, it still does not work...
I put '--proxy myfunkyproxy:8080' in those two lines in make.conf. Note I checked that they are not commented out and /usr/bin/curl is there. But I still get:
/usr/lib/portage/bin/emerge-webrsync: line 63: wget: command not found
a bunch of times when I emerge-webrsync. And sure enough wget is hardcoded in there on that line.
I think we are on the right track. This is the very first emerge sync (emerge-webrsync) on the machine. Has there been an update to the emerge-webrsync script since the installer was made?
Or I could try to just edit the script directly to use curl. But I'm off for the weekend, so it will have to wait till Monday. |
|
Back to top |
|
|
servobf Apprentice
Joined: 03 Jun 2004 Posts: 160
|
|
Back to top |
|
|
publius n00b
Joined: 21 Oct 2004 Posts: 13
|
Posted: Mon Nov 01, 2004 9:18 pm Post subject: |
|
|
Thanks for all the help everyone. I have a working solution now...
First, I gave up on emerge-webrsync... Even using wget, it has trouble with other commands, e.g. '-d' is an invalid option on the OSX 'date' command.
Instead, I set SYNC in make.conf to 'rsync://localhost/gentoo-portage'. Whenever I want to do a 'emerge --sync', I first ssh home and map a local port to the rsync.gentoo.org. 'ssh publius@home.com -L 873:rsync.gentoo.org:873' It actually goes through a proxy here at work and I ofcourse have to be root to map a privledged port. But then emerge --sync works like normal.
I also use the modified FETCHCOMMAND and RESUMECOMMAND with the http proxy option that Robu suggested. This allows the regular emerge package downloads to work.
It's not ideal, but it works. |
|
Back to top |
|
|
Robu n00b
Joined: 19 Nov 2003 Posts: 24 Location: Italy
|
Posted: Wed Nov 03, 2004 8:32 am Post subject: |
|
|
@publius: I am happy that you solved. I was out of work till today so sorry for not reply to you soon.
Yes you're right, I did'nt remember that version of emerge-webrsync has trouble with OSX date.
Solution: edit emerge-webrsync to use curl instead of wget, then comment the lines to calculate the most recent snapshot and insert the full name of the portage snapshot with the date of one day earlyer (the format is like the following: portage-20041028.tar.bz2 . With this you should be able to donwload the snapshot and upgrade the system and the portage. The new version of emerge-webrsync then is ok and you could use it without pbms.
Robu |
|
Back to top |
|
|
|