TANAKA Atushi
Thu, 04 Feb 2010 07:25:18 -0800
Hi I'm sending a reply to a mail about using cvs for fink behind a firewall using a http proxy. I found this mail in the web archive. http://sourceforge.net/mailarchive/forum.php?thread_name=49B5DDF0.4030109%40gmail.com&forum_name=fink-users
From: Alexander Hansen <alexanderk.han...@gm...> - 2009-03-10 03:27
> As best as I can tell, our cvs-proxy package doesn't work on Leopard
> (possibly not even on Tiger); and I've discontinued providing cvs there
> in any case, since Xcode provides the latest version. I'm trying to
> find a more reliable solution for people with http proxies. I don't
> have one, myself, and I don't really have enough time to try setting one up.
>
> According to the info page for cvs on Leopard, people should be able to
> try the following syntax there:
>
> cvs d-:pserver;proxy=www.myproxy.net;proxyport=8000:\
> anonym...@fi...:/cvsroot/fink login
>
> cvs d-:pserver;proxy=www.myproxy.net;proxyport=8000:\
> anonym...@fi...:/cvsroot/fink co fink
>
> where you need to replace 'www.myproxy.net' by your proxy address, and '8000'
> by your actual proxy port.
I confirmed that the way above actually works in our macs with
Snow Leopard and Leopard, if we put several quotations("), e.g.,
cvs -d":pserver;proxy=proxy.example.com;proxyport=8080:anonymous@(soory I
forgot the strings here)/cvsroot/fink" login
To realize it, I hardcoded this at perlmod/Fink/SelfUpdate/CVS.pm
in fink-0.29.10:
--- CVS.pm.orig 2010-02-03 11:57:14.000000000 +0900
+++ CVS.pm 2010-02-03 12:40:37.000000000 +0900
@@ -202,7 +202,7 @@
$cmd = "cvs ${verbosity} -z3 -d$cvsrepository";
}
else {
- $cmd = "cvs -d:pserver:anonymo...@$cvsrepository login";
+ $cmd = "cvs
-d\":pserver;proxy=proxy.example.com;proxyport=8080:anonymo...@$cvsrepository\"
login";
if ($username ne "root") {
$cmd = "/usr/bin/su $username -c '$cmd'";
}
@@ -210,7 +210,7 @@
die "Logging into the CVS server for
anonymous read-only access failed.\n";
}
else {
- $cmd = "cvs ${verbosity} -z3
-d:pserver:anonymo...@$cvsrepository";
+ $cmd = "cvs ${verbosity} -z3
-d\":pserver;proxy=proxy.example.com;proxyport=8080:anonymo...@$cvsrepository\"";
}
}
} else {
I know hardcoding the proxy configulation is stupid, but
it works for me.
By the way, the specification of proxy in cvs command line has a side
effect that the postinst of fink-mirror fails. This must be resolved
by the following patch:
--- /sw/lib/fink/mirror/postinstall.pl.orig 2010-02-03 13:06:10.000000000
+0900
+++ /sw/lib/fink/mirror/postinstall.pl 2010-02-03 13:19:19.000000000
+0900
@@ -53,14 +53,14 @@
open(IN,'<',"$sentinel_cvs/Root") or die "can't open $sentinel_cvs/Root:
$!";
while (defined($_=<IN>)) {
chomp;
- if (/^(:\w+:\w+)@(.+)$/) {
+ if (/^(:\S+:\S+)@(.+)$/) {
$method_user = $1;
$repo = $2;
}
}
close(IN);
die "couldn't parse $sentinel_cvs/Root\n" unless ((defined $method_user)
and (defined $repo));
- if (defined $method_user and $method_user eq ":pserver:anonymous") {
+ if (defined $method_user and $method_user =~ /^:pserver(.*):anonymous$/)
{
$repo_file = "/sw/lib/fink/URL/anonymous-cvs";
} else {
$repo_file = "/sw/lib/fink/URL/developer-cvs";
Sincerely,
Atushi Tanaka
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Fink-users mailing list
Fink-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-users