diff options
| author | Sebastian Heinlein <sebi@sebi-laptop> | 2006-11-26 22:03:49 +0100 |
|---|---|---|
| committer | Sebastian Heinlein <sebi@sebi-laptop> | 2006-11-26 22:03:49 +0100 |
| commit | a0b20edc60045084773853daa5fabf3ff9260403 (patch) | |
| tree | c48cc9874976b3eb5632a4618ae5a40e6a5543bf | |
| parent | 5dec3378abc96ac9a92d072c4d97633be054a02d (diff) | |
| parent | 4d027f3bde2f083f87b6e645e518607f731caa12 (diff) | |
| download | python-apt-a0b20edc60045084773853daa5fabf3ff9260403.tar.gz | |
* merge
| -rw-r--r-- | AptSources/DistInfo.py | 4 | ||||
| -rw-r--r-- | AptSources/__init__.py | 1 | ||||
| -rw-r--r-- | AptSources/aptsources.py | 13 | ||||
| -rw-r--r-- | data/templates/Debian.info | 57 | ||||
| -rw-r--r-- | data/templates/Makefile | 14 | ||||
| -rw-r--r-- | data/templates/Makefile.am | 11 | ||||
| -rw-r--r-- | data/templates/README.templates (renamed from data/templates/README.channels) | 0 | ||||
| -rw-r--r-- | data/templates/Ubuntu.info | 228 | ||||
| -rw-r--r-- | data/templates/Ubuntu.info.in | 59 | ||||
| -rw-r--r-- | data/templates/Ubuntu.mirrors | 376 | ||||
| -rw-r--r-- | debian/control | 2 | ||||
| -rwxr-xr-x | setup.py | 5 | ||||
| -rwxr-xr-x | utils/get_ubuntu_mirrors.py | 61 |
13 files changed, 512 insertions, 319 deletions
diff --git a/AptSources/DistInfo.py b/AptSources/DistInfo.py index 57621f52..2dbd9a1b 100644 --- a/AptSources/DistInfo.py +++ b/AptSources/DistInfo.py @@ -52,7 +52,7 @@ class Component: class DistInfo: def __init__(self, dist = None, - base_dir = "/usr/share/update-manager/channels"): + base_dir = "/usr/share/python-aptsources/templates"): self.metarelease_uri = '' self.suites = [] @@ -148,7 +148,7 @@ class DistInfo: if __name__ == "__main__": - d = DistInfo ("Ubuntu", "../../data/channels") + d = DistInfo ("Ubuntu", "../../data/templates") print d.changelogs_uri for suite in d.suites: print "\nSuite: %s" % suite.name diff --git a/AptSources/__init__.py b/AptSources/__init__.py new file mode 100644 index 00000000..8d1c8b69 --- /dev/null +++ b/AptSources/__init__.py @@ -0,0 +1 @@ + diff --git a/AptSources/aptsources.py b/AptSources/aptsources.py index 34b5b967..713b0ff8 100644 --- a/AptSources/aptsources.py +++ b/AptSources/aptsources.py @@ -219,7 +219,7 @@ class SourcesList: """ represents the full sources.list + sources.list.d file """ def __init__(self, withMatcher=True, - matcherPath="/usr/share/update-manager/channels/"): + matcherPath="/usr/share/python-aptsources/templates/"): self.list = [] # the actual SourceEntries Type if withMatcher: self.matcher = SourceEntryMatcher(matcherPath) @@ -673,6 +673,17 @@ class Distribution: if len(source.comps) < 1: sourceslist.remove(source) + def change_server(self, uri): + ''' Change the server of all distro specific sources to + a given host ''' + sources = [] + sources.extend(self.main_sources) + sources.extend(self.child_sources) + sources.extend(self.source_code_sources) + for source in sources: + # FIXME: ugly + if not "security.ubuntu.com" in source.uri: + source.uri = uri # some simple tests if __name__ == "__main__": diff --git a/data/templates/Debian.info b/data/templates/Debian.info deleted file mode 100644 index 3958607a..00000000 --- a/data/templates/Debian.info +++ /dev/null @@ -1,57 +0,0 @@ -ChangelogURI: http://packages.debian.org/changelogs/pool/%s/%s/%s/%s_%s/changelog - -Suite: sarge -RepositoryType: deb -BaseURI: http://http.us.debian.org/debian/ -Description: Debian 3.1 "Sarge" -Component: main -Enabled: 1 -CompDescription: Officially supported -Component: contrib -Enabled: 0 -CompDescription: DFSG-compatible Software with Non-Free Dependencies -Component: non-free -Enabled: 0 -CompDescription: Non-DFSG-compatible Software - -Suite: sarge/updates -RepositoryType: deb -BaseURI: http://security.debian.org/ -Description: Debian 3.1 "Sarge" Security Updates -Component: main -Enabled: 1 -CompDescription: Officially supported -Component: contrib -Enabled: 0 -CompDescription: DFSG-compatible Software with Non-Free Dependencies -Component: non-free -Enabled: 0 -CompDescription: Non-DFSG-compatible Software - -Suite: etch -RepositoryType: deb -BaseURI: http://http.us.debian.org/debian/ -Description: Debian "Etch" (testing) -Component: main -Enabled: 1 -CompDescription: Officially supported -Component: contrib -Enabled: 0 -CompDescription: DFSG-compatible Software with Non-Free Dependencies -Component: non-free -Enabled: 0 -CompDescription: Non-DFSG-compatible Software - -Suite: sid -RepositoryType: deb -BaseURI: http://http.us.debian.org/debian/ -Description: Debian "Sid" (unstable) -Component: main -Enabled: 1 -CompDescription: Officially supported -Component: contrib -Enabled: 0 -CompDescription: DFSG-compatible Software with Non-Free Dependencies -Component: non-free -Enabled: 0 -CompDescription: Non-DFSG-compatible Software diff --git a/data/templates/Makefile b/data/templates/Makefile deleted file mode 100644 index 49cc13e1..00000000 --- a/data/templates/Makefile +++ /dev/null @@ -1,14 +0,0 @@ - -DOMAIN=update-manager -INFO_IN_FILES := $(wildcard *.info.in) -INFO_FILES := $(patsubst %.info.in,%.info,$(wildcard *.info.in)) - -all: $(INFO_FILES) - -%.info: %.info.in - sed 's/^_//g' < $< > $@ - intltool-extract --type=gettext/rfc822deb $< - #intltool-merge -d ../po $< $@ - -clean: - rm -f $(wildcard *.h) diff --git a/data/templates/Makefile.am b/data/templates/Makefile.am deleted file mode 100644 index c9d63742..00000000 --- a/data/templates/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -%.info: %.info.in - sed 's/^_//g' < $< > $@ - $(INTLTOOL_EXTRACT) --type=gettext/rfc822deb $< - -datadir=$(prefix)/share/update-manager -dinfodir = $(datadir)/dists -dinfo_DATA = Debian.info Ubuntu.info - -EXTRA_DIST= $(dinfo_DATA) - -CLEANFILES = $(dinfo_DATA) $(dinfo_DATA:.info=.info.in.h) diff --git a/data/templates/README.channels b/data/templates/README.templates index 414148ed..414148ed 100644 --- a/data/templates/README.channels +++ b/data/templates/README.templates diff --git a/data/templates/Ubuntu.info b/data/templates/Ubuntu.info deleted file mode 100644 index 2908e85b..00000000 --- a/data/templates/Ubuntu.info +++ /dev/null @@ -1,228 +0,0 @@ -ChangelogURI: http://changelogs.ubuntu.com/changelogs/pool/%s/%s/%s/%s_%s/changelog - -Suite: edgy -RepositoryType: deb -BaseURI: http://archive.ubuntu.com/ubuntu/ -MatchURI: archive.ubuntu.com/ubuntu -MirrorsFile: /usr/share/update-manager/mirrors.cfg -Description: Ubuntu 6.10 'Edgy Eft' -Component: main -CompDescription: Officially supported -CompDescriptionLong: Canonical supported Open Source software -Component: universe -CompDescription: Community maintained -CompDescriptionLong: Community maintained Open Source software -Component: restricted -CompDescription: Non-free drivers -CompDescriptionLong: Proprietary drivers for devices -Component: multiverse -CompDescription: Restricted software -CompDescriptionLong: Software restricted by copyright or legal issues - -Suite: edgy -MatchName: .* -BaseURI: cdrom:\[Ubuntu.*6.10 -Description: Cdrom with Ubuntu 6.10 'Edgy Eft' -Available: False -Component: main -CompDescription: Officially supported -Component: restricted -CompDescription: Restricted copyright - -Suite: edgy-security -ParentSuite: edgy -RepositoryType: deb -BaseURI: http://security.ubuntu.com/ubuntu/ -MatchURI: archive.ubuntu.com/ubuntu|security.ubuntu.com -Description: Important security updates - -Suite: edgy-updates -ParentSuite: edgy -RepositoryType: deb -Description: Recommended updates - -Suite: edgy-proposed -ParentSuite: edgy -RepositoryType: deb -Description: Proposed updates - -Suite: edgy-backports -ParentSuite: edgy -RepositoryType: deb -Description: Backported updates - -Suite: dapper -RepositoryType: deb -BaseURI: http://archive.ubuntu.com/ubuntu/ -MatchURI: archive.ubuntu.com/ubuntu -MirrorsFile: /usr/share/update-manager/mirrors.cfg -Description: Ubuntu 6.06 LTS 'Dapper Drake' -Component: main -CompDescription: Officially supported -CompDescriptionLong: Canonical supported Open Source software -Component: universe -CompDescription: Community maintained (universe) -CompDescriptionLong: Community maintained Open Source software -Component: restricted -CompDescription: Non-free drivers -CompDescriptionLong: Proprietary drivers for devices -Component: multiverse -CompDescription: Restricted software (Multiverse) -CompDescriptionLong: Software restricted by copyright or legal issues - -Suite: dapper -MatchName: .* -BaseURI: cdrom:\[Ubuntu.*6.06 -Description: Cdrom with Ubuntu 6.06 LTS 'Dapper Drake' -Available: False -Component: main -CompDescription: Officially supported -Component: restricted -CompDescription: Restricted copyright - -Suite: dapper-security -ParentSuite: dapper -RepositoryType: deb -BaseURI: http://security.ubuntu.com/ubuntu/ -MatchURI: archive.ubuntu.com/ubuntu|security.ubuntu.com -Description: Important security updates - -Suite: dapper-updates -ParentSuite: dapper -RepositoryType: deb -Description: Recommended updates - -Suite: dapper-proposed -ParentSuite: dapper -RepositoryType: deb -Description: Proposed updates - -Suite: dapper-backports -ParentSuite: dapper -RepositoryType: deb -Description: Backported updates - -Suite: breezy -RepositoryType: deb -BaseURI: http://archive.ubuntu.com/ubuntu/ -MatchURI: archive.ubuntu.com/ubuntu -MirrorsFile: /usr/share/update-manager/mirrors.cfg -Description: Ubuntu 5.10 'Breezy Badger' -Component: main -CompDescription: Officially supported -Component: restricted -CompDescription: Restricted copyright -Component: universe -CompDescription: Community maintained (Universe) -Component: multiverse -CompDescription: Non-free (Multiverse) - -Suite: breezy -MatchName: .* -BaseURI: cdrom:\[Ubuntu.*5.10 -Description: Cdrom with Ubuntu 5.10 'Breezy Badger' -Available: False -Component: main -CompDescription: Officially supported -Component: restricted -CompDescription: Restricted copyright - -Suite: breezy-security -ParentSuite: breezy -RepositoryType: deb -BaseURI: http://security.ubuntu.com/ubuntu/ -MatchURI: archive.ubuntu.com/ubuntu|security.ubuntu.com -Description: Ubuntu 5.10 Security Updates - -Suite: breezy-updates -ParentSuite: breezy -RepositoryType: deb -Description: Ubuntu 5.10 Updates - -Suite: breezy-backports -ParentSuite: breezy -RepositoryType: deb -Description: Ubuntu 5.10 Backports - -Suite: hoary -RepositoryType: deb -BaseURI: http://archive.ubuntu.com/ubuntu/ -MatchURI: archive.ubuntu.com/ubuntu -MirrorsFile: /usr/share/update-manager/mirrors.cfg -Description: Ubuntu 5.04 'Hoary Hedgehog' -Component: main -CompDescription: Officially supported -Component: restricted -CompDescription: Restricted copyright -Component: universe -CompDescription: Community maintained (Universe) -Component: multiverse -CompDescription: Non-free (Multiverse) - -Suite: hoary -MatchName: .* -BaseURI: cdrom:\[Ubuntu.*5.04 -Description: Cdrom with Ubuntu 5.04 'Hoary Hedgehog' -Available: False -Component: main -CompDescription: Officially supported -Component: restricted -CompDescription: Restricted copyright - -Suite: hoary-security -ParentSuite: hoary -RepositoryType: deb -BaseURI: http://security.ubuntu.com/ubuntu/ -MatchURI: archive.ubuntu.com/ubuntu|security.ubuntu.com -Description: Ubuntu 5.04 Security Updates - -Suite: hoary-updates -ParentSuite: hoary -RepositoryType: deb -Description: Ubuntu 5.04 Updates - -Suite: hoary-backports -ParentSuite: hoary -RepositoryType: deb -Description: Ubuntu 5.04 Backports - -Suite: warty -RepositoryType: deb -BaseURI: http://archive.ubuntu.com/ubuntu/ -MatchURI: archive.ubuntu.com/ubuntu -Description: Ubuntu 4.10 'Warty Warthog' -Component: main -CompDescription: No longer officially supported -Component: restricted -CompDescription: Restricted copyright -Component: universe -CompDescription: Community maintained (Universe) -Component: multiverse -CompDescription: Non-free (Multiverse) - -Suite: warty -MatchName: .* -BaseURI: cdrom:\[Ubuntu.*4.10 -Description: Cdrom with Ubuntu 4.10 'Warty Warthog' -Available: False -Component: main -CompDescription: No longer officially supported -Component: restricted -CompDescription: Restricted copyright - -Suite: warty-security -ParentSuite: warty -RepositoryType: deb -BaseURI: http://security.ubuntu.com/ubuntu/ -MatchURI: archive.ubuntu.com/ubuntu|security.ubuntu.com -Description: Ubuntu 4.10 Security Updates - -Suite: warty-updates -ParentSuite: warty -RepositoryType: deb -Description: Ubuntu 4.10 Updates - -Suite: warty-backports -ParentSuite: warty -RepositoryType: deb -Description: Ubuntu 4.10 Backports diff --git a/data/templates/Ubuntu.info.in b/data/templates/Ubuntu.info.in index f3cce4f7..47607f53 100644 --- a/data/templates/Ubuntu.info.in +++ b/data/templates/Ubuntu.info.in @@ -1,10 +1,61 @@ _ChangelogURI: http://changelogs.ubuntu.com/changelogs/pool/%s/%s/%s/%s_%s/changelog +Suite: feisty +RepositoryType: deb +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu +MirrorsFile: /usr/share/python-aptsources/templates/Ubuntu.mirrors +_Description: Ubuntu 7.04 'Feisty Fawn' +Component: main +_CompDescription: Officially supported +_CompDescriptionLong: Canonical supported Open Source software +Component: universe +_CompDescription: Community maintained +_CompDescriptionLong: Community maintained Open Source software +Component: restricted +_CompDescription: Non-free drivers +_CompDescriptionLong: Proprietary drivers for devices +Component: multiverse +_CompDescription: Restricted software +_CompDescriptionLong: Software restricted by copyright or legal issues + +Suite: feisty +MatchName: .* +BaseURI: cdrom:\[Ubuntu.*7.04 +_Description: Cdrom with Ubuntu 7.04 'Feisty Fawn' +Available: False +Component: main +_CompDescription: Officially supported +Component: restricted +_CompDescription: Restricted copyright + +Suite: feisty-security +ParentSuite: feisty +RepositoryType: deb +BaseURI: http://security.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu|security.ubuntu.com +_Description: Important security updates + +Suite: feisty-updates +ParentSuite: feisty +RepositoryType: deb +_Description: Recommended updates + +Suite: feisty-proposed +ParentSuite: feisty +RepositoryType: deb +_Description: Proposed updates + +Suite: feisty-backports +ParentSuite: feisty +RepositoryType: deb +_Description: Backported updates + Suite: edgy RepositoryType: deb BaseURI: http://archive.ubuntu.com/ubuntu/ MatchURI: archive.ubuntu.com/ubuntu -MirrorsFile: /usr/share/update-manager/mirrors.cfg +MirrorsFile: /usr/share/python-aptsources/templates/Ubuntu.mirrors _Description: Ubuntu 6.10 'Edgy Eft' Component: main _CompDescription: Officially supported @@ -55,7 +106,7 @@ Suite: dapper RepositoryType: deb BaseURI: http://archive.ubuntu.com/ubuntu/ MatchURI: archive.ubuntu.com/ubuntu -MirrorsFile: /usr/share/update-manager/mirrors.cfg +MirrorsFile: /usr/share/python-aptsources/templates/Ubuntu.mirrors _Description: Ubuntu 6.06 LTS 'Dapper Drake' Component: main _CompDescription: Officially supported @@ -106,7 +157,7 @@ Suite: breezy RepositoryType: deb BaseURI: http://archive.ubuntu.com/ubuntu/ MatchURI: archive.ubuntu.com/ubuntu -MirrorsFile: /usr/share/update-manager/mirrors.cfg +MirrorsFile: /usr/share/python-aptsources/templates/Ubuntu.mirrors _Description: Ubuntu 5.10 'Breezy Badger' Component: main _CompDescription: Officially supported @@ -148,7 +199,7 @@ Suite: hoary RepositoryType: deb BaseURI: http://archive.ubuntu.com/ubuntu/ MatchURI: archive.ubuntu.com/ubuntu -MirrorsFile: /usr/share/update-manager/mirrors.cfg +MirrorsFile: /usr/share/python-aptsources/templates/Ubuntu.mirrors _Description: Ubuntu 5.04 'Hoary Hedgehog' Component: main _CompDescription: Officially supported diff --git a/data/templates/Ubuntu.mirrors b/data/templates/Ubuntu.mirrors new file mode 100644 index 00000000..4c8ec21a --- /dev/null +++ b/data/templates/Ubuntu.mirrors @@ -0,0 +1,376 @@ +http://ftp.iinet.net.au/pub/ubuntu/ +http://mirror.optus.net/ubuntu/ +http://mirror.isp.net.au/ftp/pub/ubuntu/ +http://www.planetmirror.com/pub/ubuntu/ +http://ftp.filearena.net/pub/ubuntu/ +http://mirror.pacific.net.au/linux/ubuntu/ +ftp://mirror.isp.net.au/pub/ubuntu/ +ftp://ftp.planetmirror.com/pub/ubuntu/ +ftp://ftp.filearena.net/pub/ubuntu/ +ftp://mirror.internode.on.net/pub/ubuntu/ubuntu +ftp://ftp.iinet.net.au/pub/ubuntu/ +ftp://mirror.pacific.net.au/linux/ubuntu/ +http://ubuntu.inode.at/ubuntu/ +http://ubuntu.uni-klu.ac.at/ubuntu/ +http://gd.tuwien.ac.at/opsys/linux/ubuntu/archive/ +ftp://ubuntu.inode.at/ubuntu/ +ftp://ftp.uni-klu.ac.at/linux/ubuntu/ +ftp://gd.tuwien.ac.at/opsys/linux/ubuntu/archive/ +http://ftp.belnet.be/pub/mirror/ubuntu.com/ +http://ubuntu.mirrors.skynet.be/pub/ubuntu.com/ +ftp://ftp.belnet.be/pub/mirror/ubuntu.com/ +ftp://ubuntu.mirrors.skynet.be/pub/ubuntu.com/ +http://espelhos.edugraf.ufsc.br/ubuntu/ +http://ubuntu.c3sl.ufpr.br/ubuntu/ +http://ubuntu.ipacct.com/ubuntu/ +ftp://ftp.cs.mun.ca/pub/mirror/ubuntu/ +http://mirror.cpsc.ucalgary.ca/mirror/ubuntu.com/ +ftp://mirror.cpsc.ucalgary.ca/mirror/ubuntu.com/ +http://mirror.arcticnetwork.ca/pub/ubuntu/packages/ +ftp://mirror.arcticnetwork.ca/pub/ubuntu/packages/ +http://gulus.USherbrooke.ca/pub/distro/ubuntu/ +ftp://gulus.USherbrooke.ca/ubuntu/ +http://ubuntu.mirror.rafal.ca/ubuntu/ +ftp://ubuntu.mirror.rafal.ca/ubuntu/ +http://cl.archive.ubuntu.com/ubuntu/ +ftp://cl.archive.ubuntu.com/ubuntu/ +http://archive.ubuntu.org.cn/ubuntu/ +http://debian.cn99.com/ubuntu/ +http://mirror.lupaworld.com/ubuntu/ +http://ftp.ucr.ac.cr/ubuntu/ +ftp://ftp.ucr.ac.cr/pub/ubuntu/ +http://ubuntu-hr.org/ubuntu/ +ftp://ubuntu-hr.org/ubuntu +http://archive.ubuntu.cz/ubuntu/ +ftp://archive.ubuntu.cz/MIRRORS/archive.ubuntu.com/mirror/ubuntu/ +http://ubuntu.supp.name/ubuntu/ +http://mirrors.dk.telia.net/ubuntu/ +http://mirrors.dotsrc.org/ubuntu/ +http://klid.dk/homeftp/ubuntu/ +ftp://mirrors.dk.telia.net/ubuntu/ +ftp://mirrors.dotsrc.org/ubuntu/ +ftp://klid.dk/ubuntu/ +http://ftp.estpak.ee/pub/ubuntu/ +ftp://ftp.estpak.ee/pub/ubuntu/ +http://www.nic.funet.fi/pub/mirrors/archive.ubuntu.com/ +ftp://ftp.funet.fi/pub/mirrors/archive.ubuntu.com/ +http://mir1.ovh.net/ubuntu/ +http://fr.archive.ubuntu.com/ubuntu/ +http://ftp.u-picardie.fr/pub/ubuntu/ubuntu/ +http://ftp.oleane.net/pub/ubuntu/ +ftp://mir1.ovh.net/ubuntu/ +ftp://fr.archive.ubuntu.com/ubuntu/ +ftp://ftp.u-picardie.fr/pub/ubuntu/ubuntu/ +ftp://ftp.proxad.net/mirrors/ftp.ubuntu.com/ubuntu/ +ftp://ftp.oleane.net/pub/ubuntu/ +http://ge.archive.ubuntu.com/ubuntu/ +ftp://ge.archive.ubuntu.com/ubuntu/ +http://debian.charite.de/ubuntu/ +http://ftp.inf.tu-dresden.de/os/linux/dists/ubuntu +http://www.artfiles.org/ubuntu.com +http://ftp.rz.tu-bs.de/pub/mirror/ubuntu-packages/ +http://ftp.join.uni-muenster.de/pub/mirrors/ftp.ubuntu.com/ubuntu/ +http://www.ftp.uni-erlangen.de/pub/mirrors/ubuntu/ +http://debian.tu-bs.de/ubuntu +http://ubuntu.intergenia.de/ubuntu/ +ftp://debian.charite.de/ubuntu/ +ftp://ftp.cw.net/ubuntu +ftp://ftp.fu-berlin.de/linux/ubuntu/ +ftp://ftp.rz.tu-bs.de/pub/mirror/ubuntu-packages/ +ftp://ftp.join.uni-muenster.de/pub/mirrors/ftp.ubuntu.com/ubuntu/ +ftp://ftp.uni-erlangen.de/pub/mirrors/ubuntu/ +ftp://debian.tu-bs.de/ubuntu +http://ftp.ntua.gr/pub/linux/ubuntu/ +ftp://ftp.ntua.gr/pub/linux/ubuntu/ +http://ftp.duth.gr/pub/ubuntu/ +ftp://ftp.duth.gr/pub/ubuntu/ +http://ftp.kfki.hu/linux/ubuntu/ +ftp://ftp.kfki.hu/pub/linux/ubuntu/ +ftp://ftp.fsn.hu/pub/linux/distributions/ubuntu/ +http://komo.vlsm.org/ubuntu/ +http://kambing.vlsm.org/ubuntu/ +http://ubuntu.odg.cc/ +http://ubuntu.lhi.is/ +http://ftp.esat.net/mirrors/archive.ubuntu.com/ +http://ftp.heanet.ie/pub/ubuntu/ +ftp://ftp.esat.net/mirrors/archive.ubuntu.com/ +ftp://ftp.heanet.ie/pub/ubuntu/ +http://ftp.linux.it/ubuntu/ +http://na.mirror.garr.it/mirrors/ubuntu-archive/ +ftp://ftp.linux.it/ubuntu/ +ftp://na.mirror.garr.it/mirrors/ubuntu-archive/ +http://ubuntu.mithril-linux.org/archives/ +http://mirror.letsopen.com/os/ubuntu/ +ftp://mirror.letsopen.com/os/ubuntu/ +http://ftp.kaist.ac.kr/pub/ubuntu/ +ftp://ftp.kaist.ac.kr/pub/ubuntu/ +http://mirrors.linux.edu.lv/ftp.ubuntu.com/ +http://ftp.litnet.lt/pub/ubuntu/ +ftp://ftp.litnet.lt/pub/ubuntu/ +ftp://ftp.polytechnic.edu.na/pub/ubuntulinux/ +http://nl.archive.ubuntu.com/ubuntu/ +http://ubuntu.synssans.nl +ftp://nl.archive.ubuntu.com/ubuntu/ +ftp://ftp.citylink.co.nz/ubuntu/ +http://www.computacion.uni.edu.ni/iso/ubuntu/ +http://no.archive.ubuntu.com/ubuntu/ +ftp://no.archive.ubuntu.com/ubuntu/ +ftp://ftp.uninett.no/linux/ubuntu +http://ubuntulinux.mainseek.com/ubuntu/ +http://ubuntu.task.gda.pl/ubuntu/ +ftp://ubuntu.task.gda.pl/ubuntu/ +ftp://ftp.rnl.ist.utl.pt/ubuntu/ +http://darkstar.ist.utl.pt/ubuntu/archive/ +http://ubuntu.dcc.fc.up.pt/ +http://ftp.iasi.roedu.net/mirrors/ubuntulinux.org/ubuntu/ +ftp://ftp.iasi.roedu.net/mirrors/ubuntulinux.org/ubuntu/ +http://ftp.lug.ro/ubuntu/ +ftp://ftp.lug.ro/ubuntu/ +http://debian.nsu.ru/ubuntu/ +ftp://debian.nsu.ru/ubuntu/ +http://yu.archive.ubuntu.com/ubuntu/ +ftp://yu.archive.ubuntu.com/ubuntu/ +ftp://ftp.is.co.za/ubuntu/ +http://za.archive.ubuntu.com/ubuntu/ +ftp://ubuntu.mirror.ac.za/ +ftp://ftp.leg.uct.ac.za/pub/linux/ubuntu/ +ftp://ftp.sun.ac.za/ftp/ubuntu/ +http://ftp.gui.uva.es/sites/ubuntu.com/ubuntu/ +ftp://ftp.gui.uva.es/sites/ubuntu.com/ubuntu/ +ftp://ftp.um.es/mirror/ubuntu/ +ftp://ftp.ubuntu-es.org/ubuntu/ +http://ftp.acc.umu.se/mirror/ubuntu/ +ftp://ftp.se.linux.org/pub/Linux/distributions/ubuntu/ +http://mirror.switch.ch/ftp/mirror/ubuntu/ +ftp://mirror.switch.ch/mirror/ubuntu/ +http://apt.ubuntu.org.tw/ubuntu/ +ftp://apt.ubuntu.org.tw/ubuntu/ +http://apt.nc.hcc.edu.tw/pub/ubuntu/ +http://ubuntu.csie.ntu.edu.tw/ubuntu/ +ftp://apt.nc.hcc.edu.tw/pub/ubuntu/ +ftp://os.nchc.org.tw/ubuntu/ +ftp://ftp.ee.ncku.edu.tw/pub/ubuntu/ +http://ftp.cse.yzu.edu.tw/ftp/Linux/Ubuntu/ubuntu/ +ftp://ftp.cse.yzu.edu.tw/Linux/Ubuntu/ubuntu/ +http://mirror.in.th/ubuntu/ +ftp://mirror.in.th/ubuntu/ +http://godel.cs.bilgi.edu.tr/mirror/ubuntu/ +ftp://godel.cs.bilgi.edu.tr/ubuntu/ +ftp://ftp.linux.org.tr/pub/ubuntu/ +ftp://ftp.ulak.net.tr/linux/ubuntu +http://www.mirrorservice.org/sites/archive.ubuntu.com/ubuntu/ +ftp://ftp.mirrorservice.org/sites/archive.ubuntu.com/ubuntu/ +http://www.mirror.ac.uk/mirror/archive.ubuntu.com/ubuntu/ +ftp://ftp.mirror.ac.uk/mirror/archive.ubuntu.com/ubuntu/ +http://ubuntu.blueyonder.co.uk/archive/ +ftp://ftp.blueyonder.co.uk/sites/ubuntu/archive/ +http://mirrors.kernel.org/ubuntu/ +http://mirror.cs.umn.edu/ubuntu/ +http://lug.mtu.edu/ubuntu/ +http://mirror.clarkson.edu/pub/distributions/ubuntu/ +http://ubuntu.mirrors.tds.net/ubuntu/ +http://www.opensourcemirrors.org/ubuntu/ +http://ftp.ale.org/pub/mirrors/ubuntu/ +http://ubuntu.secs.oakland.edu/ +http://mirror.mcs.anl.gov/pub/ubuntu/ +http://mirrors.cat.pdx.edu/ubuntu/ +http://ubuntu.cs.utah.edu/ubuntu/ +http://ftp.ussg.iu.edu/linux/ubuntu/ +http://mirrors.xmission.com/ubuntu/ +http://ftp.osuosl.org/pub/ubuntu/ +http://mirrors.cs.wmich.edu/ubuntu/ +http://mirrors.ccs.neu.edu/archive.ubuntu.com/ +http://mirrors.easynews.com/linux/ubuntu/ +http://cudlug.cudenver.edu/ubuntu/ +ftp://mirrors.kernel.org/ubuntu/ +ftp://ftp.osuosl.org/pub/ubuntu/ +ftp://mirrors.xmission.com/ubuntu/ +ftp://ftp.ussg.iu.edu/linux/ubuntu/ +ftp://mirror.clarkson.edu/pub/distributions/ubuntu/ +ftp://ubuntu.mirrors.tds.net/ubuntu/ +ftp://mirror.mcs.anl.gov/pub/ubuntu/ +ftp://mirrors.cat.pdx.edu/ubuntu/ +ftp://ubuntu.cs.utah.edu/pub/ubuntu/ubuntu/ +ftp://mirrors.easynews.com/linux/ubuntu/ +ftp://cudlug.cudenver.edu/ubuntu/ +http://ubuntu.snet.uz/ubuntu/ +http://releases.ubuntu.com/ +http://cdimage.ubuntu.com/daily/current/ +http://ftp.iinet.net.au/pub/ubuntu-releases/ +http://mirror.isp.net.au/ftp/pub/ubuntu-releases/ +http://www.planetmirror.com/pub/ubuntu/releases/ +http://ubuntu-releases.optus.net/ +http://mirror.pacific.net.au/linux/ubuntu-releases/ +ftp://ftp.iinet.net.au/pub/ubuntu-releases/ +ftp://mirror.isp.net.au/pub/ubuntu-releases/ +ftp://ftp.planetmirror.com/pub/ubuntu/releases/ +ftp://ftp.filearena.net/pub/ubuntu-releases/ +ftp://mirror.pacific.net.au/linux/ubuntu-releases/ +http://ubuntu.inode.at/cdimage/ +http://ubuntu.uni-klu.ac.at/ubuntu-cdimage/ +http://gd.tuwien.ac.at/opsys/linux/ubuntu/cdimage/ +ftp://gd.tuwien.ac.at/opsys/linux/ubuntu/cdimage/ +ftp://ubuntu.inode.at/cdimage/ +ftp://ftp.uni-klu.ac.at/linux/ubuntu-cdimage/ +http://mirror.freax.be/ubuntu/ +http://ftp.interlegis.gov.br/pub/ubuntu/releases/ +http://ubuntu.c3sl.ufpr.br/releases/ +http://espelhos.edugraf.ufsc.br/ubuntu-releases/ +http://ubuntu.ipacct.com/releases/ +http://gulus.USherbrooke.ca/pub/distro/ubuntu/iso/ +ftp://gulus.USherbrooke.ca/ubuntu/iso/ +ftp://cs.ubishops.ca/pub/iso/ubuntu/ +http://mirror.arcticnetwork.ca/pub/ubuntu/releases/ +ftp://mirror.arcticnetwork.ca/pub/ubuntu/releases/ +http://mirror.vmmatrix.net/ubuntu-cd/ +http://mirror.lupaworld.com/ubuntu/ +http://ftp.ucr.ac.cr/ubuntu-cd/ +ftp://ftp.ucr.ac.cr/pub/ubuntu-cd/ +http://debian.carnet.hr/ubuntu-releases/ +ftp://debian.carnet.hr/ubuntu-releases/ +http://archive.ubuntu.cz/cdimage/ +http://releases.ubuntu.cz/warty/ +ftp://archive.ubuntu.cz/cdimage/ +http://ubuntu.supp.name/releases/ +http://mirrors.dk.telia.net/pub/mirrors/releases.ubuntu.com/ +http://mirrors.dotsrc.org/ubuntu-cd/ +ftp://mirrors.dk.telia.net/pub/mirrors/releases.ubuntu.com/ +ftp://mirrors.dotsrc.org/ubuntu-cd/ +http://ftp.estpak.ee/pub/ubuntu-releases/ +ftp://ftp.estpak.ee/pub/ubuntu-releases/ +http://www.nic.funet.fi/pub/mirrors/releases.ubuntu.com/releases/ +ftp://ftp.funet.fi/pub/mirrors/releases.ubuntu.com/releases/ +http://mir1.ovh.net/ubuntu/releases/ +http://ftp.univ-pau.fr/linux/iso/ubuntu/ +http://fr.releases.ubuntu.com/ +ftp://www.paulla.asso.fr/pub/Ubuntu/ +ftp://mir1.ovh.net/ubuntu/releases/ +ftp://ftp.univ-pau.fr/pub/linux/iso/ubuntu/ +ftp://fr.archive.ubuntu.com/ubuntu-cd/ +http://ubuntu.eriders.ge/releases/ +http://debian.charite.de/releases/ +http://releases.ubuntu.mirror.at.stealer.net/ +http://source.rfc822.org/pub/mirror/releases.ubuntu.com/ +http://ftp2.kgt.org/pub/ubuntu.com/releases/ +http://ftp.rz.tu-bs.de/pub/mirror/ubuntu-cd-releases/ +http://ftp.join.uni-muenster.de/pub/mirrors/ftp.ubuntu.com/releases/ +http://www.shade.sh/public_gui/ +http://www.shade.sh/public_gui/ +http://ubuntu.intergenia.de/releases/ +ftp://debian.charite.de/releases/ +ftp://ftp.cw.net/releases +ftp://ftp.fu-berlin.de/linux/ubuntu/releases/ +ftp://source.rfc822.org/pub/mirror/releases.ubuntu.com/ +http://www.sixxs.net/faq/ipv6/ +ftp://ftp2.kgt.org/pub/ubuntu.com/releases/ +ftp://ftp.bay13.net/pub/ubuntu/ +ftp://ftp.rz.tu-bs.de/pub/mirror/ubuntu-cd-releases/ +ftp://ftp.join.uni-muenster.de/pub/mirrors/ftp.ubuntu.com/releases/ +http://ftp.ntua.gr/pub/linux/ubuntu-releases/ +ftp://ftp.ntua.gr/pub/linux/ubuntu-releases/ +http://ftp.duth.gr/pub/ubuntu-releases/ +ftp://ftp.duth.gr/pub/ubuntu-releases/ +http://ftp.kfki.hu/linux/cdimages/ubuntu/ +ftp://ftp.kfki.hu/pub/linux/cdimages/ubuntu/ +ftp://ftp.fsn.hu/pub/CDROM-Images/ubuntu/releases/ +http://ubuntu.elasztik.hu/ +http://ftp.esat.net/mirrors/releases.ubuntu.com/ +http://ftp.heanet.ie/pub/ubuntu-releases/ +ftp://ftp.heanet.ie/pub/ubuntu-releases/ +ftp://ftp.esat.net/mirrors/releases.ubuntu.com/ +http://ftp.linux.it/ubuntu/releases/ +http://na.mirror.garr.it/mirrors/ubuntu-releases/ +ftp://ftp.linux.it/ubuntu/releases/ +ftp://na.mirror.garr.it/mirrors/ubuntu-releases/ +http://ubuntu.mithril-linux.org/releases/ +http://ftp.yz.yamagata-u.ac.jp/pub/linux/ubuntu/releases/ +ftp://ftp.yz.yamagata-u.ac.jp/pub/linux/ubuntu/releases/ +http://mirror.letsopen.com/os/ubuntu-ISO/ +ftp://mirror.letsopen.com/os/ubuntu-ISO/ +http://ftp.kaist.ac.kr/pub/ubuntu-cd/ +ftp://ftp.linux.edu.lv/mirrors/ftp.ubuntu.com +http://ftp.litnet.lt/pub/ubuntu-cd/ +ftp://ftp.litnet.lt/pub/ubuntu-cd/ +ftp://ftp.polytechnic.edu.na/pub/ubuntulinux-releases +http://nl.releases.ubuntu.com/ +http://sommerville.uvt.nl/ubuntu/ +ftp://ilsb.il.fontys.nl/pub/linux/distr/ubuntu/ +http://mirror.trivini.no/ubuntu-iso/ +ftp://ftp.uninett.no/linux/ubuntu-iso/ +http://mirror.jodal.no/ubuntu-iso/ +http://ubuntulinux.mainseek.com/releases/ +http://ubuntu.task.gda.pl/ubuntu-releases/ +ftp://ubuntu.task.gda.pl/ubuntu-releases/ +http://darkstar.ist.utl.pt/ubuntu/5.04/ +http://glua.ua.pt/mirror/dists/ubuntu/releases/ +http://neacm.fe.up.pt/pub/ubuntu/ +ftp://ftp.rnl.ist.utl.pt/ubuntu-releases/ +ftp://neacm.fe.up.pt/pub/ubuntu/ +http://ftp.lug.ro/ubuntu-releases/ +http://ftp.iasi.roedu.net/mirrors/ubuntulinux.org/releases/ +ftp://ftp.iasi.roedu.net/mirrors/ubuntulinux.org/releases/ +ftp://ftp.lug.ro/ubuntu-releases/ +http://debian.nsu.ru/ubuntu-releases/ +ftp://debian.nsu.ru/ubuntu-releases/ +http://yu.releases.ubuntu.com/releases/ +ftp://yu.releases.ubuntu.com/releases/ +ftp://ftp.leg.uct.ac.za/pub/linux/ubuntu-releases/ +http://ftp.gui.uva.es/sites/ubuntu.com/releases/ +ftp://ftp.gui.uva.es/sites/ubuntu.com/releases/ +http://isolinux.xtec.net/ubuntu/ +ftp://ftp.um.es/mirror/ubuntu-cds/ +ftp://ftp.ubuntu-es.org/ubuntu-cdimage/ +http://sunsite.rediris.es/mirror/ubuntu-releases/ +ftp://sunsite.rediris.es/mirror/ubuntu-releases +ftp://ftp.se.linux.org/pub/Linux/distributions/ubuntu/releases/ +http://mirror.switch.ch/ftp/mirror/ubuntu-cdimage/ +ftp://mirror.switch.ch/mirror/ubuntu-cdimage/ +http://ftp.cse.yzu.edu.tw/ftp/Linux/Ubuntu/ubuntu-cd/ +ftp://ftp.cse.yzu.edu.tw/Linux/Ubuntu/ubuntu-cd/ +http://apt.ubuntu.org.tw/releases/ +ftp://apt.ubuntu.org.tw/releases/ +http://apt.nc.hcc.edu.tw/pub/ubuntu-cd/ +ftp://apt.nc.hcc.edu.tw/pub/ubuntu-cd/ +ftp://ftp.ee.ncku.edu.tw/pub/ubuntu-cd/ +http://godel.cs.bilgi.edu.tr/godel-ubuntu-iso/ +http://unstable.nl/ubuntu-iso +http://stuwww.uvt.nl/ubuntu/ +ftp://ftp.linux.kiev.ua/pub/Linux/Ubuntu/ +http://www.mirrorservice.org/sites/cdimage.ubuntu.com/cdimage/ +http://ubuntu.blueyonder.co.uk/releases/ +ftp://ftp.mirrorservice.org/sites/cdimage.ubuntu.com/cdimage/ +ftp://ftp.blueyonder.co.uk/sites/ubuntu/releases/ +http://www.aproductofsociety.org/mirror/ubuntu +http://mirror.hamishlobb.com/ubuntu/ +http://ftp.osuosl.org/pub/ubuntu-releases/ +http://ftp.ussg.iu.edu/linux/ubuntu-releases/ +http://mirrors.unrealradio.org/Ubuntu/ +http://mirror.yousendit.com/ubuntu/ +http://mirror.lunarpages.com/ubuntu/ +http://mirror.cs.umn.edu/ubuntu-releases/ +http://linus.smenet.org/ubuntu/ +http://ubuntu.mirrors.tds.net/releases/ +http://www.opensourcemirrors.org/ubuntu-cd/ +http://mirrors.jtlnet.com/ubuntu/ +http://ubuntu.mirrormax.net/ +http://www.nullnet.org/mirrors/ubuntu/ +http://mirror.mcs.anl.gov/pub/ubuntu-iso/ +http://mirrors.cat.pdx.edu/ubuntu-iso/ +http://ubuntu.cs.utah.edu/releases/ +http://mirror.cc.vt.edu/pub/projects/ubuntu/ +http://san.csc.calpoly.edu/ubuntu/releases/ +http://ftp.wayne.edu/linux_distributions/ubuntu/ +http://mirrors.tummy.com/pub/ftp.ubuntulinux.org/ubuntu/ +http://mirrors.ccs.neu.edu/releases.ubuntu.com/ +http://cudlug.cudenver.edu/ubuntu-cd/ +ftp://ftp.osuosl.org/pub/ubuntu-releases/ +ftp://ftp.ussg.iu.edu/linux/ubuntu-releases/ +ftp://mirror.dudcore.net/pub/ubuntu/ +ftp://ubuntu.mirrors.tds.net/releases/ +ftp://mirrors.jtlnet.com/ubuntu/ +ftp://mirror.mcs.anl.gov/pub/ubuntu-iso/ +ftp://mirrors.cat.pdx.edu/ubuntu-iso/ +ftp://ubuntu.cs.utah.edu/pub/ubuntu/releases/ +ftp://ftp.wayne.edu/linux_distributions/ubuntu/ +ftp://mirrors.tummy.com/pub/ftp.ubuntulinux.org/ubuntu/ +ftp://cudlug.cudenver.edu/ubuntu-cd/ diff --git a/debian/control b/debian/control index 5eda3ff5..1ede02b3 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ Standards-Version: 3.7.2 Package: python-aptsources Architecture: all XB-Python-Version: ${python:Versions} -Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, lsb-release, python-apt Description: abstraction of the sources.list for use in python applications This package provides python modules that help to administrate the sources.list by providing an abstraction of it. @@ -3,6 +3,7 @@ from distutils.core import setup import glob, os, commands, sys from DistUtilsExtra.distutils_extra import build_extra, build_l10n +# Replace the leading _ that is used in the templates for translation templates = [] if not os.path.exists("build/data/templates/"): os.makedirs("build/data/templates") @@ -21,7 +22,9 @@ setup( description = 'Abstratcion of the sources.list', packages = ['AptSources'], data_files = [('share/python-aptsources/templates', - glob.glob('build/data/templates/*.info'))], + glob.glob('build/data/templates/*.info')), + ('share/python-aptsources/templates', + glob.glob('data/templates/*.mirrors'))], license = 'GNU GPL', platforms = 'posix', cmdclass = { "build" : build_extra, diff --git a/utils/get_ubuntu_mirrors.py b/utils/get_ubuntu_mirrors.py new file mode 100755 index 00000000..62b18ba6 --- /dev/null +++ b/utils/get_ubuntu_mirrors.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python +# +# get_ubuntu_mirrors.py +# +# Download the latest list with available mirrors from the Ubuntu +# wiki and extract the hosts from the raw page +# +# Copyright (c) 2006 Free Software Foundation Europe +# +# Author: Sebastian Heinlein <glatzor@ubuntu.com> +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA + +import urllib2 +import re +import os +import commands +import sys + +# the list of official Ubuntu servers +mirrors = [] +# path to the local mirror list +list_path = "../data/templates/Ubuntu.mirrors" + +req = urllib2.Request("https://wiki.ubuntu.com/Archive?action=raw") + +try: + print "Downloading mirrors list from the Ubuntu wiki..." + uri=urllib2.urlopen(req) + p = re.compile('^.*((http|ftp):\/\/[A-Za-z0-9-.:\/_]+).*\n*$') + for line in uri.readlines(): + if r"[[Anchor(dvd-images)]]" in line: + break + if "http://" in line or "ftp://" in line: + mirrors.append(p.sub(r"\1", line)) + uri.close() +except: + print "Failed to download or extract the mirrors list!" + sys.exit(1) + +print "Writing local mirrors list: %s" % list_path +list = open(list_path, "w") +for mirror in mirrors: + list.write("%s\n" % mirror) +list.close() +print "Done." + + |
