Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a new mirror with historical stable releases? #134

Open
9numbernine9 opened this issue Jul 8, 2024 · 4 comments
Open

Creating a new mirror with historical stable releases? #134

9numbernine9 opened this issue Jul 8, 2024 · 4 comments

Comments

@9numbernine9
Copy link

Hello!

I'm trying to set up a new Panamax mirror and I want to include the last several stable Rust toolchains as part of the mirroring process; at the time of this writing 1.79.0 is the most recent Rust stable release, but I'd also like my mirror to have the stable releases going back to 1.77.0 (i.e. 1.79.0, 1.78.0, 1.77.2, 1.77.1, 1.77.0). In my mirror.toml file I've set the following:

keep_latest_stables = 5

... But it seems like this does quite what I'm expecting. Under the dist/ directory I see that a channel-rust-stable.toml file was created that correctly points to the current stable release, but there's no other .toml files that point to any of the older stable releases (e.g. channel-rust-1.78.toml). Looking through the code I don't see very many references to the rustup.keep_latest_stables symbol so I'm not quite sure how this feature is supposed to work. What I was expecting to see is a .toml file for each stable release being kept by Panamax, and each of those files would contain the necessary URLs to download those versions.

Is it possible to bootstrap a new Panamax mirror in this way?

@k3d3
Copy link
Member

k3d3 commented Jul 8, 2024

Unfortunately not at the moment, but funny enough I've run into this same thing as well, wanting to "backfill" old stable releases.

I'd like to officially support this at some point, where keep_latest_stables = 5 will actually download the 5 latest releases.

In the meantime, there's also functionality to "pin" old versions. Try pinning those old versions (1.77.0, 1.78.0, 1.79.0, etc) in the mirror.toml file, and then remove the pins. There's a chance those versions will stay there, but I'm not completely certain.

@9numbernine9
Copy link
Author

In the meantime, there's also functionality to "pin" old versions. Try pinning those old versions (1.77.0, 1.78.0, 1.79.0, etc) in the mirror.toml file, and then remove the pins. There's a chance those versions will stay there, but I'm not completely certain.

I tried this out and it does seem to work as a workaround! It is a bit of a pain for the person maintaining the mirror (i.e. edit the pins whenever a new Rust version is released), but it does indeed work. 😄

@k3d3
Copy link
Member

k3d3 commented Jul 9, 2024

Great, glad to know that works! Now, if you remove that version from the pins, (while having keep_latest_stables set properly), do the files stay or do they get deleted?

If they get deleted, I believe that's technically an edge case bug.

@9numbernine9
Copy link
Author

Great, glad to know that works! Now, if you remove that version from the pins, (while having keep_latest_stables set properly), do the files stay or do they get deleted?

After pinning a couple versions and syncing, then commenting out the pinned_rust_versions while leaving keep_latest_stables = 5 and syncing again, the version specific files (e..g channel-rust-1.79.toml) still remain. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants