Hi Rust SIG,
I'm trying to package rustup so that users won't have to curl | bash. Here are the dependency issues, and my attempts to solve them:
- (crate(effective-limits/default) >= 0.5.3 with crate(effective-limits/default) < 0.6.0~) On COPR: https://copr.fedorainfracloud.org/coprs/cbeuw/rustup-deps/package/rust-effec...
- (crate(enum-map/default) >= 2.0.3 with crate(enum-map/default) < 3.0.0~) Package exists but on version 1.1.0: https://src.fedoraproject.org/rpms/rust-enum-map
- (crate(git-testament/default) >= 0.2.0 with crate(git-testament/default) < 0.3.0~) Missing subdependencies: - (crate(no-std-compat/alloc) >= 0.4.0 with crate(no-std-compat/alloc) < 0.5.0~) On COPR https://copr.fedorainfracloud.org/coprs/cbeuw/rustup-deps/package/rust-no-st... - (crate(no-std-compat/default) >= 0.4.0 with crate(no-std-compat/default) < 0.5.0~) On COPR https://copr.fedorainfracloud.org/coprs/cbeuw/rustup-deps/package/rust-no-st...
- (crate(rs_tracing/default) >= 1.0.1 with crate(rs_tracing/default) < 2.0.0~) On COPR https://copr.fedorainfracloud.org/coprs/cbeuw/rustup-deps/package/rust-rs_tr... - (crate(rs_tracing/rs_tracing) >= 1.0.1 with crate(rs_tracing/rs_tracing) < 2.0.0~) On COPR https://copr.fedorainfracloud.org/coprs/cbeuw/rustup-deps/package/rust-rs_tr...
- (crate(sequoia-openpgp/crypto-rust) >= 1.5.0 with crate(sequoia-openpgp/crypto-rust) < 2.0.0~) Package exists but missing crypto-rust feature, PR filed https://src.fedoraproject.org/rpms/rust-sequoia-openpgp/pull-request/1
- (crate(zstd/default) >= 0.11.0 with crate(zstd/default) < 0.12.0~) Package exists but on version 0.10.0 https://src.fedoraproject.org/rpms/rust-zstd
I have several questions: 1. How can I tell fedpkg to use my COPR project so that git-testament can be built? Or can it only be packaged after its dependency no-std-compat is in the official repo? 2. What should we do with enum-map, which requires a backwards-incompatible major version update. I can't find policy documents on this 3. I've never submitted a Fedora package before, so would anyone in Rust SIG be willing to sponsor me when I create my Review Request?
Many Thanks! Andy
Hi!
There will be two talks[1] at Flock on rust packaging: mine on Thursday and a two hour tutorial on Friday. Registration is free, and you can expect that several of your questions will be answered in detail. This is probably the best way to get your answers. Attendance is wholly virtual, so this might work for you.
Brief answers to your questions: 1. The dependencies have to be Fedora packages. 2. This will be covered in the tutorial for sure; I think the phrase is "legacy packages". 3. I have the power to sponsor you, but not the experience necessary. Maybe you can find a sponsor at the talk if you are able to attend.
Hope this helps a bit,
- mulhern
[1] https://fedoraproject.org/wiki/Nest_with_Fedora_2022_Schedule#
On Tue, Aug 2, 2022 at 7:36 PM Andy Wang cbeuw.andy@gmail.com wrote:
Hi Rust SIG,
I'm trying to package rustup so that users won't have to curl | bash. Here are the dependency issues, and my attempts to solve them:
- (crate(effective-limits/default) >= 0.5.3 with crate(effective-limits/default) < 0.6.0~)
On COPR: https://copr.fedorainfracloud.org/coprs/cbeuw/rustup-deps/package/rust-effec...
- (crate(enum-map/default) >= 2.0.3 with crate(enum-map/default) < 3.0.0~)
Package exists but on version 1.1.0: https://src.fedoraproject.org/rpms/rust-enum-map
- (crate(git-testament/default) >= 0.2.0 with crate(git-testament/default) < 0.3.0~)
Missing subdependencies:
(crate(no-std-compat/alloc) >= 0.4.0 with crate(no-std-compat/alloc) < 0.5.0~)
On COPR https://copr.fedorainfracloud.org/coprs/cbeuw/rustup-deps/package/rust-no-st...
(crate(no-std-compat/default) >= 0.4.0 with crate(no-std-compat/default) < 0.5.0~)
On COPR https://copr.fedorainfracloud.org/coprs/cbeuw/rustup-deps/package/rust-no-st...
- (crate(rs_tracing/default) >= 1.0.1 with crate(rs_tracing/default) < 2.0.0~)
On COPR https://copr.fedorainfracloud.org/coprs/cbeuw/rustup-deps/package/rust-rs_tr...
- (crate(rs_tracing/rs_tracing) >= 1.0.1 with crate(rs_tracing/rs_tracing) < 2.0.0~)
On COPR https://copr.fedorainfracloud.org/coprs/cbeuw/rustup-deps/package/rust-rs_tr...
- (crate(sequoia-openpgp/crypto-rust) >= 1.5.0 with crate(sequoia-openpgp/crypto-rust) < 2.0.0~)
Package exists but missing crypto-rust feature, PR filed https://src.fedoraproject.org/rpms/rust-sequoia-openpgp/pull-request/1
- (crate(zstd/default) >= 0.11.0 with crate(zstd/default) < 0.12.0~)
Package exists but on version 0.10.0 https://src.fedoraproject.org/rpms/rust-zstd
I have several questions:
- How can I tell fedpkg to use my COPR project so that git-testament can be built? Or can it only be packaged after its dependency no-std-compat is in the official repo?
- What should we do with enum-map, which requires a backwards-incompatible major version update. I can't find policy documents on this
- I've never submitted a Fedora package before, so would anyone in Rust SIG be willing to sponsor me when I create my Review Request?
Many Thanks! Andy _______________________________________________ Rust mailing list -- rust@lists.fedoraproject.org To unsubscribe send an email to rust-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/rust@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
On Wed, Aug 3, 2022 at 1:36 AM Andy Wang cbeuw.andy@gmail.com wrote:
Hi Rust SIG,
Welcome!
I'm trying to package rustup so that users won't have to curl | bash. Here are the dependency issues, and my attempts to solve them:
I'm wondering what's your target audience here? 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. 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?
- (crate(effective-limits/default) >= 0.5.3 with crate(effective-limits/default) < 0.6.0~)
On COPR: https://copr.fedorainfracloud.org/coprs/cbeuw/rustup-deps/package/rust-effec...
- (crate(enum-map/default) >= 2.0.3 with crate(enum-map/default) < 3.0.0~)
Package exists but on version 1.1.0: https://src.fedoraproject.org/rpms/rust-enum-map
- (crate(git-testament/default) >= 0.2.0 with crate(git-testament/default) < 0.3.0~)
Missing subdependencies:
(crate(no-std-compat/alloc) >= 0.4.0 with crate(no-std-compat/alloc) < 0.5.0~)
On COPR https://copr.fedorainfracloud.org/coprs/cbeuw/rustup-deps/package/rust-no-st...
(crate(no-std-compat/default) >= 0.4.0 with crate(no-std-compat/default) < 0.5.0~)
On COPR https://copr.fedorainfracloud.org/coprs/cbeuw/rustup-deps/package/rust-no-st...
- (crate(rs_tracing/default) >= 1.0.1 with crate(rs_tracing/default) < 2.0.0~)
On COPR https://copr.fedorainfracloud.org/coprs/cbeuw/rustup-deps/package/rust-rs_tr...
- (crate(rs_tracing/rs_tracing) >= 1.0.1 with crate(rs_tracing/rs_tracing) < 2.0.0~)
On COPR https://copr.fedorainfracloud.org/coprs/cbeuw/rustup-deps/package/rust-rs_tr...
- (crate(sequoia-openpgp/crypto-rust) >= 1.5.0 with crate(sequoia-openpgp/crypto-rust) < 2.0.0~)
Package exists but missing crypto-rust feature, PR filed https://src.fedoraproject.org/rpms/rust-sequoia-openpgp/pull-request/1
- (crate(zstd/default) >= 0.11.0 with crate(zstd/default) < 0.12.0~)
Package exists but on version 0.10.0 https://src.fedoraproject.org/rpms/rust-zstd
I can help with updating the dependencies that are already packaged, but not at the correct version. Please mention that the pending update is blocking rustup in the respective bugs, like this one for enum-map: https://bugzilla.redhat.com/show_bug.cgi?id=2009715
That will put them at the top of my TODO list.
I have several questions:
- How can I tell fedpkg to use my COPR project so that git-testament can be built? Or can it only be packaged after its dependency no-std-compat is in the official repo?
You can't. fedpkg is the wrong tool for this stage of package development. You can, however, use the "correct" tools and tell them to use packages built in your COPR:
- generate a mock cfg with "copr-cli mock-cfg name-of-your-copr name-of-the-chroot > rustup.cfg" - tell mock to use this configuration when building packages with "mock -r rustup.cfg ./path-to-rustup.src.rpm"
- What should we do with enum-map, which requires a backwards-incompatible major version update. I can't find policy documents on this
This is not a special case for Rust packages, which is why it's not documented in the Rust packaging guidelines. If there's an update to an incompatible version (like 1 -> 2 in this case), then there's two choices:
- port all users of version 1 to version 2, update to version 2 - package both version 1 and version 2 in parallel
Which path you take depends on the number of packages that are not yet compatible with version 2, and how difficult porting to the new version would be.
- I've never submitted a Fedora package before, so would anyone in Rust SIG be willing to sponsor me when I create my Review Request?
I too have the powers to sponsor new packagers, though I currently don't have the time to guide you through this process. As mentioned by mulhern, I'll be talking about Rust packaging at the Rust Packaging Workshop on Friday, at Nest. If you cannot attend, the talks and workshops are all recorded and uploaded to YouTube.
Fabio
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.
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...
Please mention that the pending update is blocking rustup in the respective bugs, like this one for enum-map:
Will do.
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.
Andy
On 03/08/2022 08:51, Fabio Valentini wrote:
On Wed, Aug 3, 2022 at 1:36 AM Andy Wang cbeuw.andy@gmail.com wrote:
Hi Rust SIG,
Welcome!
I'm trying to package rustup so that users won't have to curl | bash. Here are the dependency issues, and my attempts to solve them:
I'm wondering what's your target audience here? 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. 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?
- (crate(effective-limits/default) >= 0.5.3 with crate(effective-limits/default) < 0.6.0~)
On COPR: https://copr.fedorainfracloud.org/coprs/cbeuw/rustup-deps/package/rust-effec...
- (crate(enum-map/default) >= 2.0.3 with crate(enum-map/default) < 3.0.0~)
Package exists but on version 1.1.0: https://src.fedoraproject.org/rpms/rust-enum-map
- (crate(git-testament/default) >= 0.2.0 with crate(git-testament/default) < 0.3.0~)
Missing subdependencies:
(crate(no-std-compat/alloc) >= 0.4.0 with crate(no-std-compat/alloc) < 0.5.0~)
On COPR https://copr.fedorainfracloud.org/coprs/cbeuw/rustup-deps/package/rust-no-st...
(crate(no-std-compat/default) >= 0.4.0 with crate(no-std-compat/default) < 0.5.0~)
On COPR https://copr.fedorainfracloud.org/coprs/cbeuw/rustup-deps/package/rust-no-st...
- (crate(rs_tracing/default) >= 1.0.1 with crate(rs_tracing/default) < 2.0.0~)
On COPR https://copr.fedorainfracloud.org/coprs/cbeuw/rustup-deps/package/rust-rs_tr...
- (crate(rs_tracing/rs_tracing) >= 1.0.1 with crate(rs_tracing/rs_tracing) < 2.0.0~)
On COPR https://copr.fedorainfracloud.org/coprs/cbeuw/rustup-deps/package/rust-rs_tr...
- (crate(sequoia-openpgp/crypto-rust) >= 1.5.0 with crate(sequoia-openpgp/crypto-rust) < 2.0.0~)
Package exists but missing crypto-rust feature, PR filed https://src.fedoraproject.org/rpms/rust-sequoia-openpgp/pull-request/1
- (crate(zstd/default) >= 0.11.0 with crate(zstd/default) < 0.12.0~)
Package exists but on version 0.10.0 https://src.fedoraproject.org/rpms/rust-zstd
I can help with updating the dependencies that are already packaged, but not at the correct version. Please mention that the pending update is blocking rustup in the respective bugs, like this one for enum-map: https://bugzilla.redhat.com/show_bug.cgi?id=2009715
That will put them at the top of my TODO list.
I have several questions:
- How can I tell fedpkg to use my COPR project so that git-testament can be built? Or can it only be packaged after its dependency no-std-compat is in the official repo?
You can't. fedpkg is the wrong tool for this stage of package development. You can, however, use the "correct" tools and tell them to use packages built in your COPR:
- generate a mock cfg with "copr-cli mock-cfg name-of-your-copr
name-of-the-chroot > rustup.cfg"
- tell mock to use this configuration when building packages with
"mock -r rustup.cfg ./path-to-rustup.src.rpm"
- What should we do with enum-map, which requires a backwards-incompatible major version update. I can't find policy documents on this
This is not a special case for Rust packages, which is why it's not documented in the Rust packaging guidelines. If there's an update to an incompatible version (like 1 -> 2 in this case), then there's two choices:
- port all users of version 1 to version 2, update to version 2
- package both version 1 and version 2 in parallel
Which path you take depends on the number of packages that are not yet compatible with version 2, and how difficult porting to the new version would be.
- I've never submitted a Fedora package before, so would anyone in Rust SIG be willing to sponsor me when I create my Review Request?
I too have the powers to sponsor new packagers, though I currently don't have the time to guide you through this process. As mentioned by mulhern, I'll be talking about Rust packaging at the Rust Packaging Workshop on Friday, at Nest. If you cannot attend, the talks and workshops are all recorded and uploaded to YouTube.
Fabio
On Wed, Aug 3, 2022 at 9:03 PM Andy Wang cbeuw.andy@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
On Wed, Aug 3, 2022 at 12:03 PM Andy Wang cbeuw.andy@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.
You can also get the toolchain itself from Fedora though, which we keep up-to-date with every stable upstream release on all active Fedora releases. There's only a small delay due to the bodhi update process, about a week. (Or less if people give karma!)
Maybe you still want rustup for beta/nightly toolchains, or for trying code with even older toolchains. I just want to make sure that for the *stable* Rust toolchain, we're setting the expectation that Fedora's own toolchain packages should work well.
Thanks, Josh
every stable upstream release on all active Fedora releases
That's good to know. I was under the impression that the Rust toolchain can't get a feature update within a stable Fedora release, happy to be wrong on this.
And yes rustup does have value on its own for juggling multiple toolchains, which I do very frequently - though I'm a very biased sample as I do a lot of stuff on Rust tooling instead of application/library code.
Thanks Andy
On 04/08/2022 00:37, Josh Stone wrote:
On Wed, Aug 3, 2022 at 12:03 PM Andy Wang cbeuw.andy@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.
You can also get the toolchain itself from Fedora though, which we keep up-to-date with every stable upstream release on all active Fedora releases. There's only a small delay due to the bodhi update process, about a week. (Or less if people give karma!)
Maybe you still want rustup for beta/nightly toolchains, or for trying code with even older toolchains. I just want to make sure that for the *stable* Rust toolchain, we're setting the expectation that Fedora's own toolchain packages should work well.
Thanks, Josh _______________________________________________ Rust mailing list -- rust@lists.fedoraproject.org To unsubscribe send an email to rust-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/rust@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue