void-linux / xbps

The X Binary Package System (XBPS)
https://voidlinux.org/xbps/
Other
821 stars 124 forks source link

repo reorg bikeshed #573

Open classabbyamp opened 1 year ago

classabbyamp commented 1 year ago

related to: https://github.com/void-linux/void-infrastructure/pull/142

@the-maldridge expressed interest in the new layout being .../<XBPS_ARCH>/..., and I think I agree that this would make the most sense.

I think the best way to implement this in xbps (and having the side benefit of preventing needing to -R other arch's repos when installing something for another XBPS_ARCH) would be to allow templating repo urls:

repository=https://repo-default.voidlinux.org/current/{{XBPS_ARCH}}/
  1. What delimiter characters should be used to template this? {{XBPS_ARCH}}, %XBPS_ARCH% were thoughts I had.
  2. should other templated values be allowed, like ARCH and LIBC?
  3. Could this also be an opportunity to change <arch> -> <arch>-glibc? <arch> would have to stick around as a legacy alias of course.

I am interested in implementing this once some of the details are hashed out

the-maldridge commented 1 year ago

Very interested in point 3. We could remove a lot of special casing from a lot of places if we could uniformly expect the same identifiers across all targets.

OpenBSD did %p for a long time iirc for their equivalent of this feature. Maybe something similar with a shorter component?

Would is also be worth in the same change getting rid of the specialness of the main repository and putting it into its own directory? I think it would be nicer that way since it means you can have more selective rsync, but it also makes it much more complicated for downstream repos to gracefully cut over. This may just be a change we have to have a flag day for.

classabbyamp commented 1 year ago

+1 to having .../<xbps_arch>/main, but that shouldn't need anything in xbps (except default config files). aside from rsync implications, it would probably make browsing the repo manually more sane (no "too many files" message or something)

0x5c commented 1 year ago

This may just be a change we have to have a flag day for.

That would certainly be a way of simplifying https://github.com/void-linux/void-infrastructure/pull/142 since the nginx replacement rules could just be dropped.

classabbyamp commented 1 year ago

I think it would still be valuable to have the redirect rules, to ensure that older installs aren't completely screwed