Ticket #645: dp-mirrorlists.diff

File dp-mirrorlists.diff, 16.1 KB (added by wb@…, 21 years ago)

Patchfile

  • base/src/port1.0

    diff -u -d -b -w -r -N -X CVS base/src/port1.0.orig/CVS/Entries base/src/port1.0/CVS/Entries
    old new  
    1616/portrpmpackage.tcl/1.2/Thu Jun 12 01:25:49 2003//
    1717/portuninstall.tcl/1.28/Wed May  7 06:42:44 2003//
    1818/portutil.tcl/1.134/Thu Jun  5 01:01:31 2003//
    19 D/resources////
     19D
  • CVS/Entries.Log

    diff -u -d -b -w -r -N -X CVS base/src/port1.0.orig/CVS/Entries.Log base/src/port1.0/CVS/Entries.Log
    old new  
     1A D/resources////
  • base/src/port1.0

    diff -u -d -b -w -r -N -X CVS base/src/port1.0.orig/portfetch.tcl base/src/port1.0/portfetch.tcl
    old new  
    3939target_prerun ${com.apple.fetch} fetch_start
    4040
    4141# define options: distname master_sites
    42 options master_sites patch_sites extract.sufx distfiles patchfiles use_zip use_bzip2 dist_subdir fetch.type cvs.module cvs.root cvs.password cvs.tag master_sites.subdir master_sites.listfile master_sites.listpath
     42options master_sites patch_sites extract.sufx distfiles patchfiles use_zip use_bzip2 dist_subdir fetch.type cvs.module cvs.root cvs.password cvs.tag mirror_sites.listfile mirror_sites.listpath master_sites.mirror_subdir patch_sites.mirror_subdir
    4343# XXX we use the command framework to buy us some useful features,
    4444# but this is not a user-modifiable command
    4545commands cvs
     
    6262default fetch.pre_args ""
    6363default fetch.post_args {"${site}${distfile}"}
    6464
    65 default master_sites.listfile {"master_sites.tcl"}
    66 default master_sites.listpath {"${portresourcepath}/sitelists/"}
     65default mirror_sites.listfile {"mirror_sites.tcl"}
     66default mirror_sites.listpath {"${portresourcepath}/fetch/"}
    6767
    6868# Set distfiles
    6969default distfiles {[suffix $distname]}
     
    137137
    138138# Expand all variable references in each site variable, passing back a new
    139139# expanded list
    140 proc expand-site-vars {sites} {
     140proc expand-site-vars {mirrors subdir tag} {
    141141    set x [list]
    142     foreach element $sites {
     142    foreach element $mirrors {
     143        eval append element "${subdir}/${tag}"
    143144        eval lappend x $element
    144145    }
    145146    return $x
    146147}
    147148
    148 # For a given master site type, e.g. "gnu" or "x11", check to see if there's a
     149# For a given mirror site type, e.g. "gnu" or "x11", check to see if there's a
    149150# pre-registered set of sites, and if so, return them.
    150 proc master-sites-for {arg} {
    151     global UI_PREFIX portresourcepath master_sites.listfile master_sites.listpath
    152     include ${master_sites.listpath}${master_sites.listfile}
    153     if ![info exists _master_sites($arg)] {
    154         ui_msg "$UI_PREFIX [format [msgcat::mc "No master sites on file for class %s"] $arg]"
     151proc mirror-sites-for {mirrors subdir tag} {
     152    global UI_PREFIX portresourcepath mirror_sites.listfile mirror_sites.listpath
     153    include ${mirror_sites.listpath}${mirror_sites.listfile}
     154    if ![info exists _mirror_sites($mirrors)] {
     155        ui_msg "$UI_PREFIX [format [msgcat::mc "No mirror sites on file for class %s"] $mirrors]"
    155156        return {}
    156157    }
    157     return [expand-site-vars $_master_sites($arg)]
     158    return [expand-site-vars $_mirror_sites($mirrors) $subdir $tag]
    158159}
    159160
    160161# Checks all files and their tags to assemble url lists for later fetching
     
    164165# sites
    165166proc checkfiles {args} {
    166167    global distdir distfiles patchfiles all_dist_files patch_sites fetch_urls \
    167             master_sites master_sites.subdir filespath
     168            master_sites filespath master_sites.mirror_subdir \
     169        patch_sites.mirror_subdir
    168170
    169171    foreach list {master_sites patch_sites} {
    170172        upvar #0 $list uplist
     
    172174            continue
    173175        }
    174176       
    175         # There should be a better way to get rid of the extra list created by
    176         # master-sites-for (the extra {}'s, one element in $uplist)
    177177        set site_list [list]
    178178        foreach site $uplist {
     179            if {[regexp {([a-zA-Z]+://.+)} $site match site] == 1} {
    179180            set site_list [concat $site_list $site]
     181            } else {
     182                if {[regexp {([a-zA-Z]+)[:]?([a-zA-Z/]+)?(:([a-zA-Z]+))?} $site match mirrors subdir tag] == 1} {
     183                    if [info exists $list.mirror_subdir] {
     184                        append subdir "/[set ${list}.mirror_subdir]"
     185                    }
     186                    set site_list [concat $site_list [mirror-sites-for $mirrors $subdir $tag]]
     187                } else {
     188                    ui_error [format [msgcat::mc "Unable to process mirror sites for: %s, ignoring."] $site]
     189                }
     190            }
    180191        }
    181192       
    182193        foreach site $site_list {
    183             if [info exists master_sites.subdir] {
    184                 eval append site ${master_sites.subdir}
    185             }
    186             if {[regexp {([a-zA-Z]+://.+/):([a-zA-z]+)} $site match site tag] == 1} {
     194            if {[regexp {([a-zA-Z]+://.+/):([a-zA-Z]+)} $site match site tag] == 1} {
    187195                lappend portfetch::$tag $site
    188196            } else {
    189197                lappend portfetch::$list $site
  • resources/CVS/Entries

    diff -u -d -b -w -r -N -X CVS base/src/port1.0.orig/resources/CVS/Entries base/src/port1.0/resources/CVS/Entries
    old new  
    11/Makefile/1.11/Mon Jun 16 21:50:38 2003//
    2 D/package////
    3 D/sitelists////
     2D
  • resources/CVS/Entries.Log

    diff -u -d -b -w -r -N -X CVS base/src/port1.0.orig/resources/CVS/Entries.Log base/src/port1.0/resources/CVS/Entries.Log
    old new  
     1A D/package////
     2A D/sitelists////
  • resources/Makefile

    diff -u -d -b -w -r -N -X CVS base/src/port1.0.orig/resources/Makefile base/src/port1.0/resources/Makefile
    old new  
    1 SUBDIR=         package sitelists
     1SUBDIR=         package fetch
    22INSTALLDIR=     ${DESTDIR}${datadir}/darwinports/resources/port1.0/
    33RSRCS=
    44
  • resources/fetch/Makefile

    diff -u -d -b -w -r -N -X CVS base/src/port1.0.orig/resources/fetch/Makefile base/src/port1.0/resources/fetch/Makefile
    old new  
     1INSTALLDIR=     ${DESTDIR}${prefix}/share/darwinports/resources/port1.0/fetch
     2
     3RSRCS=          mirror_sites.tcl
     4
     5include ../../../../Mk/dports.autoconf.mk
     6
     7all:
     8
     9clean:
     10
     11distclean: clean
     12
     13install:
     14        $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} ${INSTALLDIR}
     15        $(SILENT)set -x; for file in ${RSRCS}; do \
     16                $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}; \
     17        done
  • resources/fetch/mirror_sites.tcl

    diff -u -d -b -w -r -N -X CVS base/src/port1.0.orig/resources/fetch/mirror_sites.tcl base/src/port1.0/resources/fetch/mirror_sites.tcl
    old new  
     1# $Id: $
     2# mirror_sites.tcl
     3#
     4# List of master site classes for use in Portfiles
     5# Most of these are taken shamelessly from FreeBSD.
     6#
     7# Please keep this list sorted.
     8
     9set _mirror_sites(apache) {
     10    http://www.apache.org/dist/
     11    ftp://ftp.planetmirror.com/pub/apache/dist/
     12    ftp://apache.mirrored.ca/
     13    ftp://ftp.is.co.za/Apache/dist/
     14    http://apache.planetmirror.com.au/dist/
     15    ftp://ftp.leo.org/pub/comp/general/infosys/www/daemons/apache/dist/
     16    ftp://ftp.infoscience.co.jp/pub/net/apache/dist/
     17}
     18
     19set _mirror_sites(gnome) {
     20    http://archive.progeny.com/GNOME/
     21    http://ftp.rpmfind.net/linux/gnome.org/
     22    ftp://ftp.mirror.ac.uk/sites/ftp.gnome.org/pub/GNOME/
     23    http://fr.rpmfind.net/linux/gnome.org/
     24    http://ftp.linux.org.uk/mirrors/ftp.gnome.org/
     25    http://planetmirror.com/pub/GNOME/
     26    ftp://ftp.dit.upm.es/linux/gnome/
     27    ftp://ftp.dataplus.se/pub/linux/gnome/
     28    ftp://ftp.chg.ru/pub/X11/gnome/
     29    ftp://ftp.kddlabs.co.jp/pub/GNOME/
     30    ftp://ftp.dti.ad.jp/pub/X/gnome/
     31    http://mirror.aarnet.edu.au/pub/GNOME/
     32    ftp://ftp.cse.buffalo.edu/pub/Gnome/
     33}
     34
     35set _mirror_sites(gnu) {
     36    ftp://ftp.gnu.org/gnu/
     37    ftp://gatekeeper.dec.com/pub/GNU/
     38    ftp://ftp.uu.net/archive/systems/gnu/
     39    ftp://ftp.de.uu.net/pub/gnu/
     40    ftp://ftp.funet.fi/pub/gnu/prep/
     41    ftp://ftp.leo.org/pub/comp/os/unix/gnu/
     42    ftp://ftp.digex.net/pub/gnu/
     43    ftp://ftp.wustl.edu/mirrors/gnu/
     44    ftp://ftp.kddlabs.co.jp/pub/gnu/
     45    ftp://ftp.dti.ad.jp/pub/GNU/
     46    ftp://ftp.mirror.ac.uk/sites/ftp.gnu.org/gnu/
     47    ftp://sunsite.org.uk/Mirrors/ftp.gnu.org/pub/gnu/
     48    ftp://ftp.informatik.hu-berlin.de/pub/gnu/
     49    ftp://ftp.rediris.es/mirror/gnu/
     50    ftp://ftp.lip6.fr/pub/gnu/
     51    ftp://ftp.chg.ru/pub/gnu/
     52}
     53
     54set _mirror_sites(isc) {
     55    ftp://ftp.isc.org/isc/
     56    ftp://gd.tuwien.ac.at/infosys/servers/isc/
     57    ftp://ftp.ciril.fr/pub/isc/
     58    ftp://ftp.grolier.fr/pub/isc/
     59    ftp://ftp.funet.fi/pub/mirrors/ftp.isc.org/isc/
     60    ftp://ftp.freenet.de/pub/ftp.isc.org/isc/
     61    ftp://ftp.fsn.hu/pub/isc/
     62    ftp://ftp.kyushu-u.ac.jp/pub/Net/isc/
     63    ftp://ftp.iij.ad.jp/pub/network/isc/
     64    ftp://ftp.dti.ad.jp/pub/net/isc/
     65    ftp://ftp.u-aizu.ac.jp/pub/net/isc/
     66    ftp://ftp.linux.lv/pub/software/isc/
     67    ftp://ftp.task.gda.pl/mirror/ftp.isc.org/isc/
     68    ftp://ftp.cdu.elektra.ru/pub/unix/isc/
     69    ftp://ftp.si.uniovi.es/mirror/isc/
     70    ftp://ftp.sunet.se/pub/network/isc/
     71    ftp://ftp.chl.chalmers.se/pub/unix/network/isc/
     72    ftp://unix.hensa.ac.uk/mirrors/ftp.isc.org/isc/
     73    ftp://ftp.epix.net/pub/isc/
     74    ftp://ftp.nominum.com/pub/isc/
     75    ftp://ftp.nerdc.ufl.edu/pub/mirrors/ftp.isc.org/isc/
     76    ftp://ftp.ripe.net/mirrors/sites/ftp.isc.org/isc/
     77    ftp://ftp.nl.uu.net/pub/mirrors/ftp.isc.org/
     78    ftp://ftp.pop-mg.com.br/pub/isc/
     79    ftp://ftp.ntua.gr/pub/net/isc/isc/
     80    ftp://ftp.ulak.net.tr/pub/networking/isc/
     81    ftp://ftp.metu.edu.tr/pub/mirrors/ftp.isc.org/
     82}
     83
     84set _mirror_sites(kde) {
     85    ftp://ftp.us.kde.org/pub/kde/
     86    ftp://ftp.kde.org/pub/kde/
     87    http://linux.dsi.internet2.edu/X11/kde/
     88    ftp://ftp.tuniv.szczecin.pl/pub/kde/
     89    ftp://ftp.kddlabs.co.jp/X11/kde/
     90    ftp://ftp.mirror.ac.uk/sites/ftp.kde.org/pub/kde/
     91    ftp://ftp.dataplus.se/pub/linux/kde/
     92    ftp://ftp.informatik.hu-berlin.de/pub/Mirrors/ftp.kde.org/
     93    ftp://ftp.chg.ru/pub/X11/kde/
     94}
     95
     96set _mirror_sites(perl_cpan) {
     97    http://www.cpan.dk/CPAN/modules/by-module/
     98    ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module/
     99    ftp://ftp.cpan.org/pub/CPAN/modules/by-module/
     100    ftp://uiarchive.uiuc.edu/pub/ftp/cpan.cse.msu.edu/modules/by-module/
     101    ftp://ftp.kddlabs.co.jp/lang/perl/CPAN/modules/by-module/
     102    ftp://ftp.dti.ad.jp/pub/lang/CPAN/modules/by-module/
     103    ftp://ftp.sunet.se/pub/lang/perl/CPAN/modules/by-module/
     104    ftp://mirror.hiwaay.net/CPAN/modules/by-module/
     105    ftp://ftp.bora.net/pub/CPAN/modules/by-module/
     106    ftp://ftp.mirror.ac.uk/sites/ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module/
     107    ftp://bioinfo.weizmann.ac.il/pub/software/perl/CPAN/modules/by-module/
     108    ftp://csociety-ftp.ecn.purdue.edu/pub/CPAN/modules/by-module/
     109    ftp://ftp.auckland.ac.nz/pub/perl/CPAN/modules/by-module/
     110    ftp://ftp.isu.net.sa/pub/CPAN/modules/by-module/
     111    ftp://ftp.ucr.ac.cr/pub/Unix/CPAN/modules/by-module/
     112    ftp://ftp.cs.colorado.edu/pub/perl/CPAN/modules/by-module/
     113    ftp://cpan.pop-mg.com.br/pub/CPAN/modules/by-module/
     114    ftp://ftp.is.co.za/programming/perl/CPAN/modules/by-module/
     115    http://cpan.shellhung.org/modules/by-module/
     116    ftp://sunsite.org.uk/packages/perl/CPAN/modules/by-module/
     117    ftp://ftp.chg.ru/pub/lang/perl/CPAN/modules/by-module/
     118}
     119
     120set _mirror_sites(ruby) {
     121    ftp://xyz.lcs.mit.edu/pub/ruby/
     122    http://www.ibiblio.org/pub/languages/ruby/
     123    ftp://ftp.iij.ad.jp/pub/lang/ruby/
     124    ftp://ftp.ruby-lang.org/pub/ruby/
     125    ftp://ftp.fu-berlin.de/unix/languages/ruby/
     126    ftp://ftp.easynet.be/ruby/ruby/
     127    ftp://ftp.ntua.gr/pub/lang/ruby/
     128    ftp://ftp.chg.ru/pub/lang/ruby/
     129    ftp://ftp.kr.FreeBSD.org/pub/ruby/
     130    http://mirrors.sunsite.dk/ruby/
     131    ftp://ftp.iDaemons.org/pub/mirror/ftp.ruby-lang.org/ruby/
     132}
     133
     134set _mirror_sites(sourceforge) {
     135    http://us.dl.sourceforge.net/
     136    http://eu.dl.sourceforge.net/
     137    ftp://us.dl.sourceforge.net/pub/sourceforge/
     138    ftp://ftp.kddlabs.co.jp/sourceforge/
     139    ftp://ftp.chg.ru/pub/sourceforge/
     140}
     141
     142set _mirror_sites(sunsite) {
     143    http://www.ibiblio.org/pub/Linux/
     144    http://linux.dsi.internet2.edu/
     145    ftp://ftp.unicamp.br/pub/systems/Linux/
     146    ftp://ftp.tuwien.ac.at/pub/linux/ibiblio/
     147    ftp://sunsite.cnlab-switch.ch/mirror/linux/sunsite/
     148    ftp://ftp.cs.tu-berlin.de/pub/linux/Mirrors/sunsite.unc.edu/
     149    ftp://ftp.fu-berlin.de/unix/linux/mirrors/sunsite.unc.edu/
     150    ftp://ftp.uni-jena.de/pub/linux/MIRROR.sunsite/
     151    ftp://ftp.rz.uni-karlsruhe.de/pub/mirror/ftp.uni-tuebingen.de/pub/linux/mirrors/ftp.metalab.unc.edu/pub/Linux/
     152    ftp://ftp.uni-magdeburg.de/pub/mirror/linux/ftp.metalab.unc.edu/
     153    ftp://ftp.uni-stuttgart.de/pub/mirror/sunsite.unc.edu/pub/Linux/
     154    ftp://ftp.informatik.rwth-aachen.de/pub/comp/Linux/sunsite.unc.edu/
     155    ftp://ftp.lip6.fr/pub/linux/sunsite/
     156    ftp://ftp.uvsq.fr/pub5/linux/sunsite/
     157    ftp://ftp.leidenuniv.nl/pub/linux/sunsite/
     158    ftp://ftp.nvg.ntnu.no/pub/mirrors/metalab.unc.edu/
     159    ftp://ftp.icm.edu.pl/vol/rzm1/linux-sunsite/
     160    ftp://ftp.pku.edu.cn/pub/linux/
     161    ftp://ftp.cse.cuhk.edu.hk/pub4/Linux/
     162    ftp://ftp.kobe-u.ac.jp/pub/Linux/metalab.unc.edu/
     163    ftp://ftp.kddlabs.co.jp/Linux/metalab.unc.edu/
     164    ftp://ftp.dacom.co.kr/pub/mirrors/metalab.unc.edu/Linux/
     165    ftp://ftp.funet.fi/pub/Linux/mirrors/metalab/
     166    ftp://sunsite.doc.ic.ac.uk/packages/linux/sunsite.unc-mirror/
     167    ftp://ftp.is.co.za/linux/sunsite/
     168    ftp://ftp.chg.ru/pub/Linux/sunsite/
     169}
     170
     171set _mirror_sites(tcltk) {
     172    ftp://ftp.scriptics.com/pub/tcl/
     173    ftp://sunsite.utk.edu/pub/tcl/
     174    ftp://ftp.funet.fi/pub/languages/tcl/tcl/
     175    ftp://ftp.kddlabs.co.jp/lang/tcl/ftp.scriptics.com/
     176    ftp://ftp.srcc.msu.su/mirror/ftp.scriptics.com/pub/tcl/
     177    ftp://ftp.mirror.ac.uk/sites/ftp.scriptics.com/pub/tcl/
     178    ftp://sunsite.org.uk/Mirrors/ftp.scriptics.com/pub/tcl/
     179}
     180
     181set _mirror_sites(xcontrib) {
     182    ftp://crl.dec.com/pub/X11/contrib/
     183    ftp://ftp.net.ohio-state.edu/disk/d/X11/contrib/
     184    ftp://uiarchive.uiuc.edu/pub/ftp/ftp.x.org/contrib/
     185    ftp://ftp.gwdg.de/pub/x11/x.org/contrib/
     186    ftp://ftp.duke.edu/pub/X11/contrib/
     187    ftp://ftp.x.org/contrib/
     188    ftp://ftp.sunet.se/pub/X11/contrib/
     189    ftp://ftp.dti.ad.jp/pub/X/XFree86/X.Org/contrib/
     190    ftp://ftp.kddlabs.co.jp/X11/contrib/
     191    ftp://mirror.xmission.com/X/contrib/
     192    ftp://ftp2.x.org/contrib/
     193    ftp://sunsite.tus.ac.jp/pub/archives/X11/contrib/
     194    ftp://ftp.is.co.za/x/contrib/
     195    ftp://ftp.sunet.se/pub/X11/contrib/
     196    ftp://ftp.mirror.ac.uk/sites/ftp.x.org/contrib/
     197    ftp://ftp.dl.ac.uk/src/X/contrib/
     198    ftp://sunsite.org.uk/Mirrors/ftp.x.org/contrib/
     199    ftp://ftp.chg.ru/pub/X11/contrib/
     200}
     201
     202set _mirror_sites(xfree) {
     203    ftp://ftp.xfree86.org/pub/XFree86/source/
     204    ftp://ftp.rge.com/pub/X/XFree86/source/
     205    ftp://archive.progeny.com/XFree86/source/
     206    ftp://ftp.mirrorcentral.com/pub/XFree86/source/
     207    ftp://ftp.dti.ad.jp/pub/X/XFree86/XFree86/source/
     208    ftp://gd.tuwien.Ac.at/hci/X11/XFree86/source/
     209    ftp://ftp.fit.vutbr.cz/pub/XFree86/source/
     210    ftp://ftp.free.fr/pub/XFree86/source/
     211    ftp://mir1.ovh.net/ftp.xfree86.org/source/
     212    ftp://ftp.lami.univ-evry.fr/XFree86/source/
     213    ftp://ftp.cs.tu-berlin.de/pub/X/XFree86/source/
     214    ftp://ftp.gwdg.de/pub/xfree86/XFree86/source/
     215    http://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.xfree86.org/XFree86/source/
     216    ftp://ftp.rediris.es/mirror/XFree86/source/
     217    ftp://ftp.esat.net/pub/X11/XFree86/source/
     218    ftp://ftp.nl.uu.net/pub/XFree86/source/
     219    ftp://sunsite.uio.no/pub/XFree86/source/
     220    ftp://ftp.task.gda.pl/pub/XFree86/source/
     221    ftp://ftp.physics.uvt.ro/pub/XFree86/source/
     222    ftp://ftp.chg.ru/pub/XFree86/source/