Product SiteDocumentation Site

4.8.6. List of Mirrors and Metalink

The mirrorlist and metalink configuration options are linked in Fedora yum and this section will provide an overview of their operations in each case and their relationship.
The repository configuration of a Fedora box contains the following mirrorlist directive:
...
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&
arch=$basearch
...
Using the replacement of corresponding variables, $releasever=f13 and $basearch=x86_64, for example, and using a web browser to download, you can get the following xml document.
<?xml version="1.0" encoding="utf-8"?>
<metalink version="3.0" xmlns="http://www.metalinker.org/" type="dynamic" pubdate="Sat, 21 Aug 2010 14:10:47 GMT" generator="mirrormanager" xmlns:mm0="http://fedorahosted.org/mirrormanager">
  <files>
    <file name="repomd.xml">
      <mm0:timestamp>1274247846</mm0:timestamp>
      <size>4400</size>
      <verification>
        <hash type="md5">fa0f764c57ba5b15be4e188efe9d8494</hash>
        <hash type="sha1">c83b44fb1ccf030b7b81ae9bf34572d714ab4e1a</hash>
        <hash type="sha256">7b00cc2cf43ff34baedcc16c389a015f2aad5e35f725708b5afef56bdb1e13f6</hash>
        <hash type="sha512">2d1f5bcde26213d9ead4b5847501f9315d9391b73eabdd56dd1b45e6307ccd46b4d218c2bcf750364449fba25f0f0bb6305b61716c134bfdcabd0db4e4ba1c45</hash>
      </verification>
      <resources maxconnections="1">
        <url protocol="http" type="http" location="BR" preference="100" >http://fedora.c3sl.ufpr.br/linux/releases/13/Everything/x86_64/os/repodata/repomd.xml</url>
        <url protocol="ftp" type="ftp" location="BR" preference="100" >ftp://fedora.c3sl.ufpr.br/fedora-enchilada/linux/releases/13/Everything/x86_64/os/repodata/repomd.xml</url>
        <url protocol="rsync" type="rsync" location="BR" preference="100" >rsync://fedora.c3sl.ufpr.br/fedora/linux/releases/13/Everything/x86_64/os/repodata/repomd.xml</url>
        <url protocol="http" type="http" location="BR" preference="99" >http://mirror.ispbrasil.com.br/fedora/releases/13/Everything/x86_64/os/repodata/repomd.xml</url>
        <url protocol="http" type="http" location="BR" preference="98" >http://fedora.pop.com.br/linux/releases/13/Everything/x86_64/os/repodata/repomd.xml</url>
        <url protocol="http" type="http" location="CR" preference="97" >http://mirrors.ucr.ac.cr/fedora/releases/13/Everything/x86_64/os/repodata/repomd.xml</url>
      </resources>
    </file>
  </files>
</metalink>
You may see here that it is not simple list of baseurls. The definitions of both settings are explained below.
mirrorlist
Specifies a URL to a file containing a baseurls list. It may be used as a replacement o as complementing the baseurl option. Variables are allowed with this option.
metalink
Specifies a URL to a metalink file that point to a repomd.xml file, it generates a list of mirrors for the repository converting the mirrors in the repomd.xml file to a baseurl. The metalink file also contains the timestamp of the data in the repomd.xml file, its length and checksum. Data are checked versus the repomd.xml file file and all information downloaded from metalink file must match. metalink can be used as a substitute or complement to baseurl. Variables can be used with this directive. This option disables the mirrorlist option.
But also in both sections of the documentation a special hack is mention and says to use the word "metalink" in mirrorlist option, and then the value of mirrorlist is copied to metalink (if metalink is not defined). Fedora uses this hack by default, and this is their relationship.
In general, the out of the box configuration of Fedora should offer the best nearby available family of repositories to the user's installation, note that above all the list provided by Brazil and the user is from Venezuela, and in Venezuela there isn't a Fedora mirror. In Fedora's mirrormanager, geographical information is used to list appropriate mirrors.
Nevertheless, for example, Brazil is not as well connected to Venezuela as Venezuela is connected to the US. As such, the Venezuelans generally prefer to use US mirrors to improve their download speed. If the plugin yum-fastest-mirror is used, it will only use the list of calculated baseurls to choose the repository, which will never contain more than just the Brazilian repositories. Solution: hack and reconfigure mirrorlist and/or metalink.
One option is to simply put a list specifying multiple baseurl, but what are they?. Is there a way to automate? Of course it is also important that repositories are synchronized with the sources.
mirrorlist_expire
Specifies the time in seconds after which the local list of mirrored cache expires. If the local list is older than this time, yum will download a new list.