Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNF Mirror list generation #12

Open
berolinux opened this issue Jun 5, 2019 · 2 comments
Open

DNF Mirror list generation #12

berolinux opened this issue Jun 5, 2019 · 2 comments

Comments

@berolinux
Copy link

berolinux commented Jun 5, 2019

The best way to support mirrors in DNF is replacing

baseurl=http://abf-downloads.openmandriva.org/cooker/repository/x86_64/main/release/
with
mirrorlist=http://abf-downloads.openmandriva.org/mirrors?platform=cooker&arch=x86_64&repo=main&tree=release (or similar)

where that script would - based on the input parameters - put out a text file containing a list of mirrors, e.g.

http://abf-downloads.openmandriva.org/cooker/repository/x86_64/main/release/
http://distro.ibiblio.org/openmandriva/cooker/repository/x86_64/main/release/
http://www.mirrorservice.org/sites/downloads.openmandriva.org/cooker/repository/x86_64/main/release/

Would be nice to have a way to handle that in abf. (Alternatively, we can just run a script on another vhost.)

Example of functional mirrorlist bits from Mageia (obviously outside of abf):
http://svnweb.mageia.org/packages/cauldron/mageia-repos/current/SOURCES/mageia-core-repo?view=markup&pathrev=1399571
https://www.mageia.org/mirrorlist/?release=7&arch=x86_64&section=core&repo=release

@berolinux
Copy link
Author

@berolinux
Copy link
Author

For now (need to get something on that iso...), I've created a new virtual host and put a simple php script there.
http://mirrors.openmandriva.org/mirrors.php?platform=cooker&arch=znver1&repo=main&release=release

Source of the php script:

<?php
header('Content-Type: text/plain');
$mirrors = [
        "http://www.mirrorservice.org/sites/downloads.openmandriva.org",
        "http://openmandriva.c3sl.ufpr.br",
        "http://distrib-coffee.ipsl.jussieu.fr/pub/linux/openmandriva",
        "http://ftp-stud.hs-esslingen.de/pub/Mirrors/openmandriva",
        "http://ftp.tu-chemnitz.de/pub/linux/openmandriva",
        "http://ftp.nluug.nl/pub/os/Linux/distr/openmandriva",
        "http://mirror.lagoon.nc/pub/openmandriva",
        "http://mirror.rise.ph/openmandriva",
        "http://ftp.icm.edu.pl/pub/Linux/dist/openmandriva",
        "http://ftp.vectranet.pl/mirror/openmandriva.org",
        "http://ftp.pwr.wroc.pl/OpenMandriva",
        "http://mirror.yandex.ru/openmandriva",
        "http://ftp.acc.umu.se/mirror/openmandriva.org",
        "http://ftp.yzu.edu.tw/Linux/openmandriva",
        "http://distro.ibiblio.org/openmandriva",
        "http://abf-downloads.openmandriva.org",
];
foreach ($mirrors as $mirror) {
        print($mirror . '/' . $_GET["platform"] . '/repository/' . $_GET["arch"] . '/' . $_GET["repo"] . '/' . $_GET["release"] . "/\n");
}
?>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant