Tools/urpmi/Development/Mirrors List
From Mandriva Community Wiki
Mirrors and repositories - lists and descriptions
This page describes mirror lists and proposes some solutions to extend them.
Contents |
[edit] Existing lists
rpmdrake and the stage1 currently use the Mirrors API.
[edit] Proposals
[edit] Description File for Repository
This file should be used:
- by urpmi.addmedia to manage urpmi conf
- by gendistrib to create hdlist/synthesis files
Here an example:
#!/usr/sbin/urpmi.addmedia # Why not this first line ? :) # are comment of course format_version=0.1 # mirror path to this, use if this file described a mirror list: # optionnal of course, not usefull on mirror, except you want put mirror list everywhere mirror_path=ftp://path/on/mirror/ mirror_path=rsync://path/on/mirror/ { # to begin a first media description # Mandatory name="Main rpms for mandrake" # Description, can be on few lines: description=The Core of Mandrake distribution description=A very good distro # relative path to hdlist from RPMS dirs # default: hdlist=hdlist.cz hdlist=../hdlist.cz # relative path to synthesis from RPMS dirs # default: built from the hdlist value path/synsthesis.hdlistname # synthesis= # relative path to rpms dir # default is dir where is this files path=../RPMS # We found same values for Source rpms: src_hdlist=../hdlist.src.cz # synthesis=../synthesis/hdlist.src.cz src_path=../SRPMS # gpgfile, one line for each keys: # relative path from this files gpgfile=key1.gpg gpgfile=key2.gpg # says the media is an update media: # a single words # updates } # End of media
[edit] Mirrors and projects description
Here's another example that would allow to centralize different projects and their mirrors for numerous archs and releases.
This file could even be used by the installation program, to let the user choose a mirror for a network installation.
This one is in XML format, because:
- many parsers are available, with bindings for many programme languages
- good internationalisation support thanks to encoding support ( for example encoding="UTF-8" )
<?xml version<tt>"1.0" encoding</tt>"UTF-8"?> <media> <projects> <project> <name>main</name> <summary>Mandrake main</summary> <homepage>http://www.mandrake.org</homepage> <description>MandrakelinuxTM is a friendly Linux Operating System which specializes in ease-of-use for both servers and the home/office. It is freely available in many languages throughout the world. This is the main component of MandrakeLinux.</description> </project> <project> <name>contrib</name> <summary>Mandrake contrib</summary> <homepage>http://www.mandrake.org</homepage> <description>MandrakelinuxTM is a friendly Linux Operating System which specializes in ease-of-use for both servers and the home/office. It is freely available in many languages throughout the world. Mandrake contrib contains packages not part of Mandrake main, these packages are maintained by benevol contributors.</description> </project> <project> <name>plf</name> <summary>Penguin Liberation Front</summary> <homepage>http://plf.zarb.org</homepage> <description>PLF is a packaging project dedicated to distributing software that can't be included in Linux distributions for different reasons: software patents,corporate interest protection laws, privacy restriction laws</description> </project> </projects> <mirrors> <mirror> <host>ftp.proxad.net></host> <location>France</location> <method protocol="ftp"> <rootpath>/mirrors/ftp.mandrake-linux.com</rootpath> </method> <method protocol="http"> <rootpath>/mirrors/ftp.mandrake-linux.com</rootpath> </method> <method protocol="rsync"> <rootpath>/ftp.mandrake-linux.com</rootpath> </method> <source project<tt>"main" arch</tt>"i586" release="9.2"> <hdlist>/Mandrake/9.2/i586/Mandrake/base/hdlist.cz</hdlist> <packages>/Mandrake/9.2/i586/Mandrake/RPMS</packages> </source> <source project<tt>"main" arch</tt>"src" release="9.2"> <hdlist>/Mandrake/9.2/i586/Mandrake/base/hdlist.src.cz</hdlist> <packages>/Mandrake/9.2/SRPMS</packages> </source> <source project<tt>"main" arch</tt>"i586" release="cooker"> <hdlist>/Mandrake-devel/cooker/i586/Mandrake/base/hdlist.cz</hdlist> <packages>/Mandrake-devel/cooker/i586/Mandrake/RPMS</packages> </source> <source project<tt>"main" arch</tt>"src" release="cooker"> <hdlist>/Mandrake-devel/cooker/i586/Mandrake/base/hdlist.src.cz</hdlist> <packages>/Mandrake-devel/cooker/SRPMS</packages> </source> <source project<tt>"contrib" arch</tt>"i586" release="9.2"> <hdlist>/Mandrake/9.2/i586/Mandrake/base/hdlist.cz</hdlist> <packages>/Mandrake/9.2/contrib/i586</packages> </source> <source project<tt>"contrib" arch</tt>"src" release="9.2"> <hdlist>/Mandrake/9.2/i586/Mandrake/base/hdlist2.src.cz</hdlist> <packages>/Mandrake/9.2/contrib/SRPMS</packages> </source> <source project<tt>"contrib" arch</tt>"i586" release="cooker"> <hdlist>/Mandrake-devel/cookerr/i586/Mandrake/base/hdlist2.cz</hdlist> <packages>/Mandrake-devel/contrib/i586</packages> </source> <source project<tt>"contrib" arch</tt>"src" release="cooker"> <hdlist>/Mandrake-devel/cooker/i586/Mandrake/base/hdlist2.src.cz</hdlist> <packages>/Mandrake-devel/contrib/SRPMS</packages> </source> </mirror> </mirrors> </media>
Another approach:
<?xml version<tt>"1.0" encoding</tt>"UTF-8"?> <distros> <distro> <version>9.2</version> <arch>i586</arch> <medias> <media> <name>main</name> <summary>Mandrake main</summary> <homepage>http://www.mandrake.org</homepage> <description>MandrakelinuxTM is a friendly Linux Operating System which specializes in ease-of-use for both servers and the home/office. It is freely available in many languages throughout the world. This is the main component of MandrakeLinux.</description> <hdlist>base/hdlist.cz</hdlist> <dir>RPMS</dir> <hdlist_src>base/hdlist.src.cz</hdlist_src> <dir_src>../SRPMS</dir_src> </media> <media> <name>contrib</name> <summary>Mandrake contrib</summary> <homepage>http://www.mandrake.org</homepage> <description>MandrakelinuxTM is a friendly Linux Operating System which specializes in ease-of-use for both servers and the home/office. It is freely available in many languages throughout the world. Mandrake contrib contains packages not part of Mandrake main, these packages are maintained by benevol contributors.</description> <hdlist>base/hdlist2.cz</hdlist> <dir>RPMS2</dir> <hdlist_src>base/hdlist2.src.cz</hdlist_src> <dir_src>../../contrib/SRPMS</dir_src> </media> <media> <name>plf</name> <summary>Penguin Liberation Front</summary> <homepage>http://plf.zarb.org</homepage> <description>PLF is a packaging project dedicated to distributing software that can't be included in Linux distributions for different reasons: software patents,corporate interest protection laws, privacy restriction laws</description> <hdlist>base/hdlist3.cz</hdlist> <dir>plf</dir> </media> </medias> <mirrors> <mirror> <host>ftp.proxad.net></host> <location>France</location> <method protocol="ftp"> <rootpath>/mirrors/ftp.mandrake-linux.com</rootpath> </method> <method protocol="http"> <rootpath>/mirrors/ftp.mandrake-linux.com</rootpath> </method> <method protocol="rsync"> <rootpath>/ftp.mandrake-linux.com</rootpath> </method> <path>/Mandrake/9.2/i586/Mandrake/base/mirror.xml</path> </mirror> </mirrors> </distro> </distros>