Hi Rutherther,

Rutherther <[email protected]> writes:

> Hi,
>
> I have a proposal for a new way handling of %mirrors from (guix
> download) and possibly other things.
> Few months ago there was a misbehaving mirror in the %mirrors that
> didn't send 404 for missing pages. It meant users got html pages instead
> of source.
>
> This issue was fixed by removing the mirror from %mirrors, but it
> fixes it only if you are using newer Guix that has it removed. Still if you go
> back in time, you can face an issue as long as you don't use substitutes.
>
> Because of possibility of such issues I have a proposal, to still have
> %mirrors in Guix code, but only as a default. And to try to load system
> or user module where the users or system administrators can configure
> new mirrors.
>
> Specifically I am imagining something like /etc/guix/config.scm and
> ~/.config/guix/config.scm. This module could export %mirrors, but if it
> didn't, the deafult would be used.
>
> Then on Guix System this could exist by default in the system and by
> default have what is in the Guix source that built the system. This way
> if users on Guix System go back in time through time machine and face
> misbehaving mirrors (but of course only those with handling of this new
> config), they are safe even with time-machine going back.
>
> Misbehaving mirrors is the initial motivation, but I think it doesn't
> have to be the only reason for this change. Users could also choose
> mirrors closer to them.
>
> If this change has been agreed upon, %disarchive-mirrors should probably
> have the same handling, and I presume %swh-base-url (though that one is
> at least parameterizable, but still, you cannot really change it if you
> use the regular guix scripts) could also be useful. Or in general pretty
> much every url that the user cannot really change without rebuilding
> guix? For example with packages, you can still inherit them, use
> transformations etc., but with overriding mirrors, you are out of luck.
> While we might not see this as necessary at this current moment, we
> cannot know what the future will bring and if we need to change the
> urls, time-machine's behavior will become inferior when coming back in
> time as the users will start facing issues that led to the change of the
> given url in the first place. This sort of future-proofs Guix.
>
> What do you think?
> Rutherther

It sounds like a good idea! A patch implementing this would be welcome.

-- 
Thanks,
Maxim

Reply via email to