https://pkgmaster.devuan.org/devuan_mirror_walkthrough.txt might be of
interest, it includes our suggested rewrite rules for mirrors.
On 2025-09-24 09:21:36, Ralph Ronnquist via Dng wrote:
> On Tue, Sep 23, 2025 at 10:28:39PM +0200, aitor wrote:
> > Hi Ralph,
> >
> > On 23/9/25 1:04, Ralph Ronnquist via Dng wrote:
> >
> > > You would notices that all the filenames of Devuan's *Packages files
> > > have the DEVUAN or DEBIAN directory component.
> >
> > Yes. In the case of gnuinos, they have GNUINOS, DEVUAN or DEBIAN.
> >
> >
> > > This is done to support web server re-write rules (in the package mirrors) to map the
> > > filenames to either of the Devuan pool URLs or the Debian pool URLs.
> >
> > I understand. If you're using apache, I suppose that you'll have some .htaccess file
> > containing something like this:
> >
> > |RewriteEngine on Redirect 302 /merged/pool/DEVUAN
> > http://deb.devuan.org/devuan/pool||Redirect 302 /merged/pool/DEBIAN
> > http://deb.debian.org/debian/pool or, if you're using nginx, ||some config
> > file, e.g. |//etc/nginx/sites-available/default/|||: ||location / {
> > autoindex on; rewrite /packages/merged/pool/DEVUAN/(.*)
> > http://deb.devuan.org/devuan/pool/$1;||rewrite
> > /packages/merged/pool/DEBIAN/(.*) http://deb.debian.org/debian/pool/$1;||} |
> >
> > Here you are my .htaccess:
> >
> > RewriteEngine on
> > Redirect 302 /merged/pool/DEVUAN http://deb.devuan.org/devuan/pool
> > Redirect 302 /merged/pool/main http://deb.debian.org/debian/pool/main
> > Redirect 302 /merged/pool/DEBIAN/main http://deb.debian.org/debian/pool/main
> > Redirect 302 /merged/pool/GNUINOS http://packages.gnuinos.org/gnuinos/pool
> > Redirect 302 /merged/pool/DEBIAN-SECURITY/updates/main http://security-cdn.debian.org/debian-security/pool/updates/main
> >
> >
> > However, currently the first re-write rule is configured as follows:
> >
> > Redirect 302 /merged/pool/DEVUAN http://deb.devuan.org/packages/devuan/pool
>
> Hmm. I don't know apache2 but I see no reason in re-directing URLs of form
> http://deb.devuan.org/merged/pool/DEVUAN/something.deb
> to become
> http://deb.devuan.org/packages/devuan/pool/something.deb
> if that is what it's doing.
>
> Firstly, the Filename attribute in the Packages file offers relative
> names like:
> Filename: pool/DEVUAN/something.deb
>
> That means that the apt request URL will have the initial form
> http://deb.devuan.org/pool/DEVUAN/something.deb
> (it will have DEBIAN rather than DEVUAN for Debian packages)
>
> The server is supposed to have a re-write rule for that URL form into
> a local access url to offer the something.deb package from the local
> service. It is supposed to only pass it back to the client for another
> access if the request is for a DEBIAN package.
>
> However, if it responds for another request for the client, then that
> request URL should have the form
> http://deb.devuan.org/devuan/pool/something.deb
> which is the documented form for Devian mirrors.
>
> Note that the client (apt) might in theory resolve "deb.devuan.org"
> differently for every of those accesses. It probably doesn't, but it
> might. When you add "packages/" into it (due to the fitting your
> service) then you may lead a client astray if they pick a different
> mirror for that last URL access. In other words, that URL might work
> on your service but it is not required to work on Devuan mirrors.
>
> In short, that redirection (that includes "packages/") is wrong,
> unless your apache2 for sure will process the re-written URL without
> involving the client and your service services it under that
> re-written access form. It's a wrong access URL to pass to a client
> (apt) to use for a subsequent request to the mirror collective.
>
> Ralph.
>
> >
> > I suppose that, with this change, packages.gnuinos.org is working for the rest of the users as well. But this is a guess.
> >
> >
> > It's worth to clarify that this is done in the server side to support the package mirrors re-write rules, as you have pointed out above.
> > But when I run the amprolla scripts to merge the repo (in local, because I haven't a dedicated server), then I tend to point to
> > pkgmaster.devuan.org because is troubling me less than deb.devuan.org when it comes to download all the stuff.
> >
> > > You should also keep in mind that deb.devuan.org resolves to a number
> > > of different servers for URL rewriting and it does happen that on
> > > occasion some server might feature misconfiguration.
> >
> > Indeed, it rarely happens :)
Which is what apt-panopticon is for, helps me spot the package mirror
servers that might need some work.
> >
> > Cheers,
> >
> > Aitor.
> >
>
> > _______________________________________________
> > Dng mailing list
> > Dng@???
> > Manage your subscription: https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
> > Archive: https://lists.dyne.org/lurker/list/dng.en.html
>
> _______________________________________________
> Dng mailing list
> Dng@???
> Manage your subscription: https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
> Archive: https://lists.dyne.org/lurker/list/dng.en.html
--
A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.