[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [help-GIFT] GIFT installation (new to GIFT)
From: |
David Squire |
Subject: |
Re: [help-GIFT] GIFT installation (new to GIFT) |
Date: |
Tue, 03 Feb 2004 19:31:48 +1100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 |
On Tuesday 03 February 2004 00:55, you wrote:
====
Downloading the current Charmer version
GET http://www.mrml.net/download/packages/
====
However due to the proxy settings in the department, I will need
to enter my login and password in order to get access to the out side
world. Therefore the GIFT configuration just halt at this stage. And I
cannot proceed to the next stage of installation (make & make install) by
terminating this process (Ctrl-C)
I am just wondering is there any way I can modify the script so
that the login info can be entered?
The gift-install-prerequisites.pl script uses LWP::UserAgent and
HTTP::Request. These packages do support proxies. After the user agent
is created in the subroutine getAndUntar (line 49 in my version
(gift-0.1.9)), the user agent can be told about proxies:
my $ua = LWP::UserAgent->new; # current line 49
# prompt user for proxy details, or hardcode them in a hack :)
my $ProxyIP = 'proxy.mydomain.edu'; # whatever the name of the proxy machine is.
# I think you can include a port number suffix
# if necessary (e.g. ':8080')
my $ProxyUsername = ...
my $ProxyPassword = ...
my $ProxyURI = "http://$ProxyUsername:address@hidden";
# set the proxy server
$ua->proxy(['http', 'ftp'] => $ProxyURI);
Now, I have not been able to test this, but it should work , according
to http://www.perldoc.com/perl5.8.0/lib/lwpcook.html#PROXIES. I have
successfully used this for a proxy that does not require a username and
password.
Note that the user agent is currently created every time the subroutine
is called, so this would be repeated. It would be more efficient if
there were one global to the package.
Cheers,
David
--
Dr. David McG. Squire, Postgraduate Research Coordinator (Caulfield),
Computer Science and Software Engineering, Monash University, Australia
Monash Provider No. 00008C http://www.csse.monash.edu.au/~davids/