On Wed, Aug 3, 2022 at 9:03 PM Andy Wang <cbeuw.andy(a)gmail.com> wrote:
> rustup is used to *download official / beta / nightly toolchains from
> the internet*, so having to download rustup itself as well isn't that
> bad, I think.
Official rust builds are signed and rustup does verify the signature:
https://github.com/rust-lang/rustup/blob/master/src/dist/download.rs#L167. Having rustup
packaged would create a chain of trust from Fedora's official repo to the downloaded
toolchain. In any case, tt's more convenient to the users if they can get it directly
from a package manager.
Fair point.
> Additionally, running curl | bash does additional setup steps,
like
> setting up $PATH for rustup to work correctly. How do you expect to
> handle that with a package?
That's a good point, though the script doesn't actually do any setup, rustup does
them by itself if it's invoked with argv[0]=="rustup-init". We could leave
the packaged binary as rustup-init (that's the target binary name in upstream), though
this might not be very intuitive to users as they could be expecting the command rustup
being available straight away; or we could patch rustup such that it always behaves like
rustup-init if placed under /usr/bin, and behaves normally elsewhere (after being copied
to user's home), but this might be too hacky...
Hum. I think shipping a symlink /usr/bin/rustup-init ->
/usr/bin/rustup would be the simplest way to solve this.
> Please mention that the pending update is blocking rustup in
the
> respective bugs, like this one for enum-map:
Will do.
Thanks!
> If there's an update to an incompatible version (like 1
-> 2 in this
> case), then there's two choices:
Yeah that's basically what I expected. Is there a way to reliably search for reverse
dependencies?
https://pkgs.org/search/?q=rust-enum-map provides a "Required By"
search button and it doesn't seem like enum-map has any dependents, but I don't
know if this is complete.
Thanks a lot for the help! I'll be there for the event.
Yes, there is a way. I wrote a shortcut bash script to handle this for
me, so I don't need to remember the correct "dnf repoquery"
incantation:
https://github.com/decathorpe/miscripts/blob/master/cratedeps
You use it like "cratedeps enum-map" and you get back all source and
binary packages that require any feature of enum-map:
$ cratedeps enum-map
rust-cursive_core-0:0.2.2-4.fc37.src
rust-cursive_core-devel-0:0.2.2-4.fc37.noarch
rust-enum-map+arbitrary-devel-0:1.1.0-4.fc37.noarch
rust-enum-map+default-devel-0:1.1.0-4.fc37.noarch
rust-enum-map+serde-devel-0:1.1.0-4.fc37.noarch
So there's just one package (the package for the cursive_core crate)
that depends on enum-map.
Looking at crates.io, the latest version of cursive_core already
depends on enum-map 2, so it might be possible to look at the
cursive_core project to see what they needed to do when they updated
their enum-map dependency from v1 to v2.
Fabio