Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do I install behind a firewall/proxy? [solved]
View unanswered posts
View posts from last 24 hours

 
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Gentoo for Mac OS X (Portage for Mac OS X)
View previous topic :: View next topic  
Author Message
publius
n00b
n00b


Joined: 21 Oct 2004
Posts: 13

PostPosted: Wed Oct 27, 2004 7:00 pm    Post subject: How do I install behind a firewall/proxy? [solved] Reply with quote

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
View user's profile Send private message
amiatrome
Apprentice
Apprentice


Joined: 28 Jun 2004
Posts: 180
Location: Campus | Arena Country Club | Home

PostPosted: Wed Oct 27, 2004 7:05 pm    Post subject: Reply with quote

Try this.

Code:
export http_proxy="your_proxy:port"

_________________
blog | homepage | alias | prompts
Back to top
View user's profile Send private message
publius
n00b
n00b


Joined: 21 Oct 2004
Posts: 13

PostPosted: Wed Oct 27, 2004 7:16 pm    Post subject: Reply with quote

That doesn't help. If I am not mistaken emerge --sync uses rsync not http.
Back to top
View user's profile Send private message
Robu
n00b
n00b


Joined: 19 Nov 2003
Posts: 24
Location: Italy

PostPosted: Fri Oct 29, 2004 7:26 am    Post subject: Reply with quote

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.
Code:
 man curl

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
View user's profile Send private message
publius
n00b
n00b


Joined: 21 Oct 2004
Posts: 13

PostPosted: Fri Oct 29, 2004 7:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
servobf
Apprentice
Apprentice


Joined: 03 Jun 2004
Posts: 160

PostPosted: Sat Oct 30, 2004 9:15 pm    Post subject: Reply with quote

This site has a program SimpleWget that's a cocoa wrapper for wget. If you poke arround inside the program (just the .app folder) you'll find a copy of the actuall wget. If you copy that file to somewhere in your path, you can use it on the command line.


[url]
http://www.cosmos.ne.jp/~kaz6120/downloads/jam_stuff/index.pl?id=simplewget_e[/url]

Michael
Back to top
View user's profile Send private message
publius
n00b
n00b


Joined: 21 Oct 2004
Posts: 13

PostPosted: Mon Nov 01, 2004 9:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
Robu
n00b
n00b


Joined: 19 Nov 2003
Posts: 24
Location: Italy

PostPosted: Wed Nov 03, 2004 8:32 am    Post subject: Reply with quote

@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
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Gentoo for Mac OS X (Portage for Mac OS X) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum