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

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

Re: [Savannah-hackers-public] Don't multiplex mirror URLs that use nonfr


From: Ineiev
Subject: Re: [Savannah-hackers-public] Don't multiplex mirror URLs that use nonfree JavaScript ?
Date: Tue, 6 Feb 2024 08:51:33 +0000

On Mon, Feb 05, 2024 at 07:15:27PM +0100, Thérèse Godefroy wrote:
> 
> If a mirror is marked, it won't be used for redirections; _why_ it is
> marked is unimportant. We want to keep /prep/FTP as simple as possible,
> so I think one marker per mirror is enough for the time being. If we
> need more in a few years, we can easily change a few lines in
> ftp_convert.pl.

I don't think it makes /prep/FTP less simple, however, it does make
the file more maintainable.

Index: wrappers-and-scripts/ftp_convert.pl
===================================================================
RCS file: /web/www/www/server/staging/prep/wrappers-and-scripts/ftp_convert.pl,v
retrieving revision 1.3
diff -U 2 -r1.3 ftp_convert.pl
--- wrappers-and-scripts/ftp_convert.pl 5 Feb 2024 18:12:55 -0000       1.3
+++ wrappers-and-scripts/ftp_convert.pl 6 Feb 2024 08:35:54 -0000
@@ -7,5 +7,5 @@
 # this page. See the Makefile.
 #
-# Original Script Written by joelh@gnu.org
+# Public domain.  Original script written by joelh@gnu.org.
 #
 # 01/02/1999 - Murali - Added support for http sites on the ftp list
@@ -13,5 +13,5 @@
 # 26/07/2010 - bjg - add rel="nofollow" to mirror links
 # 01/02/2024 - th_g - Simplify (disable support for <p>); don't convert
-#   http(s) URLs marked with '_' or '__'; add support for additional lists;
+#   http(s) URLs marked with '[m0, m1...]'; add support for additional lists.
 
 use strict;
@@ -41,4 +41,27 @@
 die "Incorrect format, start with How to get." unless /^How to get/;
 
+sub get_place_markers
+{
+  my $markers = '';
+  my @ret;
+  $markers = $1 if $_[0] =~ m/.*\[(.*)\]$/;
+  $markers =~ s/\s*//g;
+  foreach my $mark (split /,/, $markers) {
+    push @ret,
+      "<a href='#$mark'><span class='warn-$mark'>[" . uc ($mark)
+        . "]</span></a>";
+  }
+  return '' if $#ret < 0;
+  return join (' ', @ret) . ' ';
+}
+
+sub print_site
+{
+  my ($site, $place) = @_;
+  $site = get_place_markers ($place) . $site if $site =~ /^https?:/;
+  $site = display_link ($site) if $site =~ /^(https?|ftp):/;
+  print $site;
+}
+
 while (<>) {
   # Take care of headers
@@ -52,11 +75,11 @@
   }
 
-  # Country and URLs are separated by ' - ' or ' -- '
+  # Country and URLs are separated by ' - ' or ' -- '.
   # Lines with ' -- ' should be skipped by Mirmon.
-  if (/^(.+)\s+\--?\s+(\S+.*)$/) {
+  if (/^(.*\S) --? (\S+.*)$/) {
     # State (US) or country (everything else)
     $marked_place = $1;
     @ftp_sites = split /,/,$2;
-    ($place = $marked_place) =~ s/[ *\[\]]*$//;
+    ($place = $marked_place) =~ s/ \[.*\]$//;
     if ((!$last_place) or ($place ne $last_place)) {
       if ($last_place) {
@@ -80,15 +103,5 @@
       }
       # Mark problematic sites.
-      if (($ftpsite =~ /^https?:/) and ($marked_place =~ /\*$/)) {
-        $ftpsite =~ s,^,<a href="#js"><span class="warn1">[JS]</span></a> ,;
-        if  ($marked_place =~ / \*\*$/) {
-          $ftpsite =~ s,^,<a href="#cn"><span class="warn2">[CN]</span></a> ,;
-        }
-      }
-      if ($ftpsite =~ /^(https?|ftp):/) {
-        print &display_link($ftpsite);
-      } else {
-        print $ftpsite;
-      }
+      print_site ($ftpsite, $marked_place);
       print "</li>\n";
     }
Index: wrappers-and-scripts/ftp-header.html
===================================================================
RCS file: 
/web/www/www/server/staging/prep/wrappers-and-scripts/ftp-header.html,v
retrieving revision 1.2
diff -U 2 -r1.2 ftp-header.html
--- wrappers-and-scripts/ftp-header.html        5 Feb 2024 18:12:55 -0000       
1.2
+++ wrappers-and-scripts/ftp-header.html        6 Feb 2024 08:35:54 -0000
@@ -15,6 +15,6 @@
 .summary { margin-top: 1.7em; }
 #content h3 { margin-top: 1.5em; border-bottom: 2px solid #bbb; }
-.warn1 { color: #ce5c00; }
-.warn2 { color: red; }
+.warn-js { color: #ce5c00; }
+.warn-cn { color: red; }
 --></style>
 <!--#include virtual="/prep/po/ftp.translist" -->
Index: FTP
===================================================================
RCS file: /web/www/www/server/staging/prep/FTP,v
retrieving revision 1.2
diff -U 2 -r1.2 FTP
--- FTP 5 Feb 2024 18:12:54 -0000       1.2
+++ FTP 6 Feb 2024 08:35:54 -0000
@@ -8,6 +8,6 @@
 Canada - https://mirror.its.dal.ca/gnu, http://mirror.its.dal.ca/gnu, 
rsync://mirror.its.dal.ca/gnu
 Canada - https://mirror2.evolution-host.com/gnu, 
http://mirror2.evolution-host.com/gnu, rsync://mirror2.evolution-host.com/gnu
-Canada ** - https://ca.mirrors.cicku.me/gnu/, http://ca.mirrors.cicku.me/gnu/ 
(also, mirror alpha: https://ca.mirrors.cicku.me/gnu-alpha/, 
http://ca.mirrors.cicku.me/gnu-alpha/)
-US-Arizona * - https://mirrors.sarata.com/gnu/, 
rsync://mirrors.sarata.com/gnu/ (also, mirror alpha: 
https://mirrors.sarata.com/gnu-alpha/, rsync://mirrors.sarata.com/gnu-alpha/)
+Canada [cn, js] - https://ca.mirrors.cicku.me/gnu/, 
http://ca.mirrors.cicku.me/gnu/ (also, mirror alpha: 
https://ca.mirrors.cicku.me/gnu-alpha/, http://ca.mirrors.cicku.me/gnu-alpha/)
+US-Arizona [js] - https://mirrors.sarata.com/gnu/, 
rsync://mirrors.sarata.com/gnu/ (also, mirror alpha: 
https://mirrors.sarata.com/gnu-alpha/, rsync://mirrors.sarata.com/gnu-alpha/)
 US-California - https://mirror.fcix.net/gnu/, http://mirror.fcix.net/gnu/
 US-California - http://gnu.mirrors.hoobly.com
@@ -17,8 +17,8 @@
 US-California - https://mirrors.ocf.berkeley.edu/gnu/
 US-California - rsync://mirrors.ocf.berkeley.edu/gnu/
-US-California ** - https://us.mirrors.cicku.me/gnu/, 
http://us.mirrors.cicku.me/gnu/ (also, mirror alpha: 
https://us.mirrors.cicku.me/gnu-alpha/, http://us.mirrors.cicku.me/gnu-alpha/)
+US-California [cn, js] - https://us.mirrors.cicku.me/gnu/, 
http://us.mirrors.cicku.me/gnu/ (also, mirror alpha: 
https://us.mirrors.cicku.me/gnu-alpha/, http://us.mirrors.cicku.me/gnu-alpha/)
 US-Idaho - http://mirrors.syringanetworks.net/gnu/, 
ftp://mirrors.syringanetworks.net/gnu/, rsync://mirrors.syringanetworks.net/gnu/
 US-Illinois - https://mirror.team-cymru.com/gnu/, 
http://mirror.team-cymru.com/gnu/, rsync://mirror.team-cymru.com/gnu/
-US-Indiana * - https://gnu.askapache.com/, http://gnu.askapache.com/
+US-Indiana [js] - https://gnu.askapache.com/, http://gnu.askapache.com/
 US-Massachusetts - https://mirrors.tripadvisor.com/gnu/, 
http://mirrors.tripadvisor.com/gnu/, rsync://mirrors.tripadvisor.com/gnu/
 US-Michigan - https://ftp.wayne.edu/gnu/, http://ftp.wayne.edu/gnu/
@@ -26,5 +26,5 @@
 US-New Jersey - https://gnu.mirror.constant.com/, 
http://gnu.mirror.constant.com/
 US-New York - http://mirror.rit.edu/gnu/
-US-North Carolina * - https://mirrors.ibiblio.org/gnu/, 
http://mirrors.ibiblio.org/gnu/
+US-North Carolina [js] - https://mirrors.ibiblio.org/gnu/, 
http://mirrors.ibiblio.org/gnu/
 
 South America:
@@ -36,5 +36,5 @@
 
 Botswana - https://mirror.retentionrange.co.bw/gnu
-Morocco - https://mirror.marwan.ma/gnu/, http://mirror.marwan.ma/gnu/, 
rsync://mirror.marwan.ma/gnu/ (also, mirrors alpha: 
https://mirror.marwan.ma/gnualpha/, http://mirror.marwan.ma/gnualpha/, 
rsync://mirror.marwan.ma/gnualpha/) 
+Morocco - https://mirror.marwan.ma/gnu/, http://mirror.marwan.ma/gnu/, 
rsync://mirror.marwan.ma/gnu/ (also, mirrors alpha: 
https://mirror.marwan.ma/gnualpha/, http://mirror.marwan.ma/gnualpha/, 
rsync://mirror.marwan.ma/gnualpha/)
 South Africa - https://mirror.ufs.ac.za/gnu/, http://mirror.ufs.ac.za/gnu/, 
rsync://mirror.ufs.ac.za/gnu/
 
@@ -46,17 +46,17 @@
 China - https://mirrors.sjtug.sjtu.edu.cn/gnu/
 China - https://mirrors.nju.edu.cn/gnu/, http://mirrors.nju.edu.cn/gnu/ (also, 
mirror alpha: https://mirrors.nju.edu.cn/gnu-alpha/, 
http://mirrors.nju.edu.cn/gnu-alpha/)
-China * - https://mirrors.aliyun.com/gnu/, http://mirrors.aliyun.com/gnu/
+China [js] - https://mirrors.aliyun.com/gnu/, http://mirrors.aliyun.com/gnu/
 Hong Kong - https://mirror-hk.koddos.net/gnu/, 
http://mirror-hk.koddos.net/gnu/, rsync://mirror-hk.koddos.net/gnu
 India - https://mirrors.hopbox.net/gnu/, http://mirrors.hopbox.net/gnu/
 India - https://gnu.mirror.net.in/gnu/, http://gnu.mirror.net.in/gnu/, 
rsync://gnu.mirror.net.in/gnu/ (also, mirror alpha: 
https://gnu.mirror.net.in/gnu-alpha/, http://gnu.mirror.net.in/gnu-alpha/, 
rsync://gnu.mirror.net.in/gnu-alpha/)
-India ** - https://in.mirrors.cicku.me/gnu/, http://in.mirrors.cicku.me/gnu/ 
(also, mirror alpha: https://in.mirrors.cicku.me/gnu-alpha/, 
http://in.mirrors.cicku.me/gnu-alpha/)
+India [cn, js] - https://in.mirrors.cicku.me/gnu/, 
http://in.mirrors.cicku.me/gnu/ (also, mirror alpha: 
https://in.mirrors.cicku.me/gnu-alpha/, http://in.mirrors.cicku.me/gnu-alpha/)
 Japan - https://ftp.jaist.ac.jp/pub/GNU/, http://ftp.jaist.ac.jp/pub/GNU/, 
rsync://ftp.jaist.ac.jp/pub/GNU/
 Japan - http://repo.jing.rocks/gnu/, https://repo.jing.rocks/gnu/, 
rsync://repo.jing.rocks/gnu/ (also, mirror alpha: 
http://repo.jing.rocks/gnu-alpha/, https://repo.jing.rocks/gnu-alpha/, 
rsync://repo.jing.rocks/gnu-alpha/)
-Japan ** - https://jp.mirrors.cicku.me/gnu/, http://jp.mirrors.cicku.me/gnu/ 
(also, mirror alpha: https://jp.mirrors.cicku.me/gnu-alpha/, 
http://jp.mirrors.cicku.me/gnu-alpha/)
+Japan [cn, js] - https://jp.mirrors.cicku.me/gnu/, 
http://jp.mirrors.cicku.me/gnu/ (also, mirror alpha: 
https://jp.mirrors.cicku.me/gnu-alpha/, http://jp.mirrors.cicku.me/gnu-alpha/)
 Russia - https://mirror.truenetwork.ru/gnu, http://mirror.truenetwork.ru/gnu, 
rsync://mirror.truenetwork.ru/gnu
 Singapore - https://mirror.freedif.org/GNU/, http://mirror.freedif.org/GNU/, 
rsync://mirror.freedif.org/GNU/ (also, mirror alpha: 
https://mirror.freedif.org/GNU-alpha/, http://mirror.freedif.org/GNU-alpha/, 
rsync://mirror.freedif.org/GNU-alpha/)
-Singapore ** - https://sg.mirrors.cicku.me/gnu/, 
http://sg.mirrors.cicku.me/gnu/ (also, mirror alpha: 
https://sg.mirrors.cicku.me/gnu-alpha/, http://sg.mirrors.cicku.me/gnu-alpha/)
+Singapore [cn, js] - https://sg.mirrors.cicku.me/gnu/, 
http://sg.mirrors.cicku.me/gnu/ (also, mirror alpha: 
https://sg.mirrors.cicku.me/gnu-alpha/, http://sg.mirrors.cicku.me/gnu-alpha/)
 South Korea - https://ftp.kaist.ac.kr/gnu/ (also, mirror alpha: 
https://ftp.kaist.ac.kr/gnu-alpha/)
-South Korea ** - https://kr.mirrors.cicku.me/gnu/, 
http://kr.mirrors.cicku.me/gnu/ (also, mirror alpha: 
https://kr.mirrors.cicku.me/gnu-alpha/, http://kr.mirrors.cicku.me/gnu-alpha/)
+South Korea [cn, js] - https://kr.mirrors.cicku.me/gnu/, 
http://kr.mirrors.cicku.me/gnu/ (also, mirror alpha: 
https://kr.mirrors.cicku.me/gnu-alpha/, http://kr.mirrors.cicku.me/gnu-alpha/)
 Taiwan - https://mirror.ossplanet.net/gnu/, http://mirror.ossplanet.net/gnu/, 
rsync://mirror.ossplanet.net/gnu
 Taiwan - http://ftp.twaren.net/Unix/GNU/gnu/
@@ -77,5 +77,5 @@
 Germany - https://mirror.clientvps.com/gnu/, http://mirror.clientvps.com/gnu/
 Germany - https://de.freedif.org/gnu/, rsync://de.freedif.org/gnu/ (also, 
mirrors alpha: https://de.freedif.org/alpha/, rsync://de.freedif.org/alpha/)
-Germany - https://ftp.fau.de/gnu, http://ftp.fau.de/gnu, 
rsync://ftp.fau.de/gnu 
+Germany - https://ftp.fau.de/gnu, http://ftp.fau.de/gnu, rsync://ftp.fau.de/gnu
 Germany - https://www.artfiles.org/gnu.org/, http://www.artfiles.org/gnu.org/
 Germany - http://ftp-stud.hs-esslingen.de/pub/Mirrors/ftp.gnu.org/, 
https://ftp-stud.hs-esslingen.de/pub/Mirrors/ftp.gnu.org/
@@ -86,9 +86,9 @@
 Germany - https://ftp.halifax.rwth-aachen.de/gnu/, 
http://ftp.halifax.rwth-aachen.de/gnu/, rsync://ftp.halifax.rwth-aachen.de/gnu/
 Germany - http://mirror.junda.nl/gnu/
-Germany ** - https://de.mirrors.cicku.me/gnu/, http://de.mirrors.cicku.me/gnu/ 
(also, mirror alpha: https://de.mirrors.cicku.me/gnu-alpha/, 
http://de.mirrors.cicku.me/gnu-alpha/)
+Germany [cn, js] - https://de.mirrors.cicku.me/gnu/, 
http://de.mirrors.cicku.me/gnu/ (also, mirror alpha: 
https://de.mirrors.cicku.me/gnu-alpha/, http://de.mirrors.cicku.me/gnu-alpha/)
 Greece - https://ftp.cc.uoc.gr/mirrors/gnu/, 
http://ftp.cc.uoc.gr/mirrors/gnu/, ftp://ftp.cc.uoc.gr/mirrors/gnu/
 Greece - https://fosszone.csd.auth.gr/gnu/, http://fosszone.csd.auth.gr/gnu/
 Hungary - https://quantum-mirror.hu/mirrors/pub/gnu/, 
http://quantum-mirror.hu/mirrors/pub/gnu/, rsync://quantum-mirror.hu/gnu/ 
(also, mirror alpha: https://quantum-mirror.hu/mirrors/pub/gnualpha/, 
http://quantum-mirror.hu/mirrors/pub/gnualpha/, 
rsync://quantum-mirror.hu/gnualpha/)
-Republic of Moldova * - https://mirror.ihost.md/gnu/, 
http://mirror.ihost.md/gnu/, rsync://mirror.ihost.md/gnu (also, mirror alpha: 
https://mirror.ihost.md/gnu-alpha/, http://mirror.ihost.md/gnu-alpha/, 
rsync://mirror.ihost.md/gnu-alpha)
+Republic of Moldova [js] - https://mirror.ihost.md/gnu/, 
http://mirror.ihost.md/gnu/, rsync://mirror.ihost.md/gnu (also, mirror alpha: 
https://mirror.ihost.md/gnu-alpha/, http://mirror.ihost.md/gnu-alpha/, 
rsync://mirror.ihost.md/gnu-alpha)
 Netherlands - https://mirror.lyrahosting.com/gnu, 
http://mirror.lyrahosting.com/gnu, rsync://mirror.lyrahosting.com/gnu
 Netherlands - https://ftp.nluug.nl/pub/gnu/, ftp://ftp.nluug.nl/pub/gnu/
@@ -103,15 +103,15 @@
 Romania - https://mirrors.nav.ro/gnu, http://mirrors.nav.ro/gnu, 
rsync://mirrors.nav.ro/gnu
 Russia - https://mirror.tochlab.net/pub/gnu/, 
http://mirror.tochlab.net/pub/gnu/
-Spain * - https://ftp.rediris.es/mirror/GNU/, http://ftp.rediris.es/mirror/GNU/
+Spain [js] - https://ftp.rediris.es/mirror/GNU/, 
http://ftp.rediris.es/mirror/GNU/
 Sweden - http://ftp.acc.umu.se/mirror/gnu.org/gnu/, 
https://ftp.acc.umu.se/mirror/gnu.org/gnu/, 
rsync://ftp.acc.umu.se/mirror/gnu.org/gnu/ (also, mirrors alpha: 
http://ftp.acc.umu.se/mirror/gnu.org/alpha/, 
https://ftp.acc.umu.se/mirror/gnu.org/alpha/, 
rsync://ftp.acc.umu.se/mirror/gnu.org/alpha/)
 Turkey - https://mirror.rabisu.com/gnu/, http://mirror.rabisu.com/gnu/ (also, 
mirrors alpha: https://mirror.rabisu.com/gnualpha/, 
http://mirror.rabisu.com/gnualpha/)
-UK * - https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/, 
http://www.mirrorservice.org/sites/ftp.gnu.org/gnu/,  
ftp://www.mirrorservice.org/sites/ftp.gnu.org/gnu/, 
rsync://rsync.mirrorservice.org/ftp.gnu.org/gnu/ (also, mirrors alpha: 
https://www.mirrorservice.org/sites/alpha.gnu.org/gnu/, 
http://www.mirrorservice.org/sites/alpha.gnu.org/gnu/, 
ftp://ftp.mirrorservice.org/sites/alpha.gnu.org/gnu/, 
rsync://rsync.mirrorservice.org/alpha.gnu.org/gnu/)
-UK ** - https://eu.mirrors.cicku.me/gnu/, http://eu.mirrors.cicku.me/gnu/ 
(also, mirror alpha: https://eu.mirrors.cicku.me/gnu-alpha/, 
http://eu.mirrors.cicku.me/gnu-alpha/)
+UK [js] - https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/, 
http://www.mirrorservice.org/sites/ftp.gnu.org/gnu/,  
ftp://www.mirrorservice.org/sites/ftp.gnu.org/gnu/, 
rsync://rsync.mirrorservice.org/ftp.gnu.org/gnu/ (also, mirrors alpha: 
https://www.mirrorservice.org/sites/alpha.gnu.org/gnu/, 
http://www.mirrorservice.org/sites/alpha.gnu.org/gnu/, 
ftp://ftp.mirrorservice.org/sites/alpha.gnu.org/gnu/, 
rsync://rsync.mirrorservice.org/alpha.gnu.org/gnu/)
+UK [cn, js] - https://eu.mirrors.cicku.me/gnu/, 
http://eu.mirrors.cicku.me/gnu/ (also, mirror alpha: 
https://eu.mirrors.cicku.me/gnu-alpha/, http://eu.mirrors.cicku.me/gnu-alpha/)
 
 Oceania:
 
 Australia - https://mirror.endianness.com/gnu/, 
rsync://mirror.endianness.com/gnu/ (also, mirror alpha: 
https://mirror.endianness.com/gnu-alpha/, 
rsync://mirror.endianness.com/gnu-alpha/)
-Australia ** - https://au.mirrors.cicku.me/gnu/, 
http://au.mirrors.cicku.me/gnu/ (also, mirror alpha: 
https://au.mirrors.cicku.me/gnu-alpha/, http://au.mirrors.cicku.me/gnu-alpha/)
-New Caledonia * - https://mirror.lagoon.nc/gnu/, http://mirror.lagoon.nc/gnu/, 
rsync://mirror.lagoon.nc/gnu/
+Australia [cn, js] - https://au.mirrors.cicku.me/gnu/, 
http://au.mirrors.cicku.me/gnu/ (also, mirror alpha: 
https://au.mirrors.cicku.me/gnu-alpha/, http://au.mirrors.cicku.me/gnu-alpha/)
+New Caledonia [js] - https://mirror.lagoon.nc/gnu/, 
http://mirror.lagoon.nc/gnu/, rsync://mirror.lagoon.nc/gnu/
 
 * Special mirrors
@@ -119,5 +119,5 @@
 Global:
 
-Cloudflare network ** -- https://mirrors.cicku.me/gnu/, 
http://mirrors.cicku.me/gnu/ (also, mirror alpha: 
https://mirrors.cicku.me/gnu-alpha/, http://mirrors.cicku.me/gnu-alpha/)
+Cloudflare network [cn, js] -- https://mirrors.cicku.me/gnu/, 
http://mirrors.cicku.me/gnu/ (also, mirror alpha: 
https://mirrors.cicku.me/gnu-alpha/, http://mirrors.cicku.me/gnu-alpha/)
 
 Onion URL:

Attachment: signature.asc
Description: PGP signature


reply via email to

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