savannah-hackers-public
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Savannah-hackers-public] randy kobes passed away -> ftpmirror redir


From: Karl Berry
Subject: Re: [Savannah-hackers-public] randy kobes passed away -> ftpmirror redirector
Date: Mon, 28 Feb 2011 00:21:19 GMT

Hi Michael,

    Ok, this is testable now on http://gnu-ftpmirror.savannah.gnu.org

Wow, incredibly quick work, thanks.
It works fine for me too, right now.

Did you set up some method for updating it, though?  I did not see
anything new in the cron jobs, but I certainly could have missed it.
The mirror list changes all the time (e.g., today the artfiles.org url
changed from what I see in /usr/local/share/GeoIP/gnu-ftpmirror.txt).

Randy's redirector worked off the mirmon installed at
http://gnu-mirmon.basemirror.de (by other volunteers).  You can get that
mirmon status file from http://gnu-mirmon.basemirror.de/status.txt, also
to be fed into /usr/local/bin/mirmon2geoip.pl.

Then there's the matter of also getting the mirmon conf file for
mirmon2geoip.  The ultimate source is gnu.org/prep/FTP (or ftp.html).
The basemirror guys (contact info at the end of
/gd/gnuorg/web/FTP.contacts, I am hesitant to post email addresses
publicly) wrote another script to massage that into the mirmon conf
format.  We could also run that script, or (my preference, to ensure
that the mirmon data and site list are in sync) just get their resulting
file.

Unfortunately the script is written in an unreadable (to me anyway)
style, but here it is FWIW.

wget http://www.gnu.org/prep/ftp.html -O /root/mirmon-1.37/gnu-org-ftp.html
#
grep -i "<LI>" /root/mirmon-1.37/gnu-org-ftp.html | perl -lane
'm~^(\s*)<LI>(.+)~i;($sp,$l)=($1,$2);exit if(length($sp)>2);if($sp eq
q[]){$r=$l}if($r=~m~United States~i){$r.=q[ ]}else{$r=q[]}if($sp eq q[
]){$c=$l}if($l=~m~HREF="([^"]+)"~i){($l)=($1);}$l=~s~\s*<.*~~;if($sp
eq q[  ]){$rc=$r.$c;$rcm=$rc;$rcm=~s~[^a-z]+~-~gi;$rc=~s~\s{2,}~,
~;push @a,sprintf qq[%s %s\n],$rcm,$l;$h->{qq[$rcm]}=$rc;}sub
END{open(MLGF,">","/root/mirmon-1.37/mirror-list-gnu-ftp.txt");print
MLGF sort @a;open(CL,">","/root/mirmon-1.37/countries.list");foreach(sort
keys %{$h}){printf CL qq[%s %s\n],$_,$h->{qq[$_]}}}' ; cat
/root/mirmon-1.37/mirror-list-gnu-ftp.txt
#
/root/mirmon-1.37/mirmon -v -get update -c /root/mirmon-1.37/mirmon-gnu-ftp.conf

Thanks,
karl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]