[Dev] [announcement] mirror redirector available for testing

fauno fauno at endefensadelsl.org
Sun Feb 14 15:25:56 GMT 2016

hi! as we talked previously[^1], i was working on an nginx config for
creating a mirror redirector.  tl;dr was:

* serve repo databases locally

* serve [libre] and [pcr] packages locally

* redirect anything else to archlinux mirrors at random to spread the load

* save and recycle resources!

so i got it working on http://redirector.parabola.nu [^2], would you
help me testing it?

you just need to put it on the top of your mirrorlist and use it
normally for a while.  then please tell me of any error or event :)

things that shouldn't happen:

* trying to download packages from [libre] or [pcr] from arch mirrors

* getting too many 404s.  i think this means we don't sync as often as
  arch mirrors do (or the mirrors we're redirecting to are outdated),
  but if this redirector proves useful we could sync and free package
  databases more often.

* unfree package appearing suddendly (you should be protected by
your-freedom though)

* others


# technical details

nginx config is at /etc/nginx/sites/server-redirector.parabola.nu.conf,
the only change to the poc version i posted previously is a check to
prevent redirecting databases to arch mirrors

    location ~* \.db(\.tag\.[gx]z)?$ {
      try_files $uri $uri/;

i created /srv/http/redirector.parabola.nu like this:

    mkdir -p /srv/http/redirector.parabola.nu/{core,extra,community,multilib}/os/{i686,x86_64}
    cd /srv/http/redirector.parabola.nu
    for i in {core,extra,community,multilib}/os/{i686,x86_64}; do
      ln -sv /srv/http/repo.parabola.nu/pkg/parabola_gnu+linux/$i/${i%%/*}.db.tar.gz ${i}/
      ln -sv /srv/http/repo.parabola.nu/pkg/parabola_gnu+linux/$i/${i%%/*}.db.tar.gz ${i}/${i%%/*}.db
    for i in /srv/http/repo.parabola.nu/pkg/parabola_gnu+linux/{libre,pcr} ; do
      ln -sv $i .
    chown -R repo.http .

this means [libre] and [pcr] are symlinks to were the packages are
hosted, and [core], [extra], [community] and [multilib] just provide the
cleaned up databases.

when pacman tries to fetch a package from one of those repos, nginx will
try to find it locally, but since they aren't there, it returns a
redirection to an arch mirror.

current structure:

/srv/http/redirector.parabola.nu () find

[^1]: https://lists.parabola.nu/pipermail/dev/2015-December/003638.html
[^2]: lukeshu: could you issue a certificate for it?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 584 bytes
Desc: not available
URL: <https://lists.parabola.nu/pipermail/dev/attachments/20160214/328ab8c9/attachment.sig>

More information about the Dev mailing list