Allow overriding the dist server - #124
Conversation
Panamax only mirrors the xz url by default, and the xz URLs are much better compressed.
|
Bump? |
|
Bump? Is this project dead? |
eureka-cpu
left a comment
There was a problem hiding this comment.
Nice one @roblabla. This looks great, and doesn't change the default behavior. Would you mind updating the README with this use case as well?
|
Also please target |
|
I added a quick documentation line for the new root parameter in the README. I can provide a full-blown usage example for the use-case if necessary - adding it under the # Examples heading? |
Thanks, that would be great 🙂 |
db7bdc0 to
c97c392
Compare
|
@roblabla is this ready? if not just request my review again when you are 🙂 |
|
CI is failing, need to look into it. I think it's broken because the hardcoded toolchain URLs in I'll need to either
|
811a1dd to
2a36bd1
Compare
|
Nice one. Probably we will want to test it in CI with something small, so we aren't trying to build an entirely separate toolchain which isn't cached with the substituter. I think this way we can also be sure if it's actually using the xz_url. |
The goal of this PR is to make it possible to use a mirror of rustup, such as one created using Panamax, with fenix.
To do so, it fixes three issues:
When setting a custom dist server, if the manifest contains links to the default dist server, rustup will automatically replace it with an URL pointing to the custom dist server. This allows making very naive mirrors of the rustup dist server without having to modify the channel manifests.
Currently, fenix allows setting a custom dist server through
toolchainOf, but it does not replicate this behavior of overriding the URL in the manifests. This PR adds this behavior.Furthermore, it adds a
rootargument tofromToolchainFile, allowing the simultaneous use of a toolchain file and a custom dist server.Finally, it replaces the archive it gets from the
gzones toxzones. Rust started providingxzarchives in may 2017, and rustup switched to grabbing thexzarchives not long after. Panamax, the most popular tool to mirrorrustup, defaults to only grabbing thexzarchives.