Perfecting Rust Packaging - The Plan

Hey folks.

I’ve gone through and done a quick summary of the status of each of the issues identified in this thread. The TL;DR is that while several of the issues have been fixed, there’s a lot of work left to do. I have not put much focused effort into these myself.

I think the most notable development is that and @alexcrichton and @wycats agree in principal to adding a new “local registry”, where the packages live on the local filesystem instead of crates.io. This was originally called a “non-goal”, and we expected distros to use path-rewriting to redirect dependencies locally. In @gus’s experience that solution was quite unpleasant, and we want to provide official support for sourcing packages locally.

Task: Compiler command line customization in the Rust makefile

Issue: https://github.com/rust-lang/rust/issues/29554

Status: Fixed. Thanks @bltaveras

Task: Bootstrapping from previous releases

Issue: https://github.com/rust-lang/rust/issues/29555

Status: No progress. @alexcrichton’s build system rewrite though removes snapshots, which is part of the solution. This should be solved sooner than a build system rewrite.

Task: Re-bootstrapping from the current release

Issue: https://github.com/rust-lang/rust/issues/29556

Status: No progress.

Task: Bootstrapping unstable code from a stable compiler

Issue: https://github.com/rust-lang/rust/issues/295577

Status: I’ve put some thought into it, solicited opinions about how to do it, and scrapped a partial patch.

Task: Dynamic LLVM

Issue: https://github.com/rust-lang/rust/issues/29558

Status: Fixed. Thanks @DiamondLovesYou

Task: Add an i586-unknown-linux-gnu target spec

Issue: TODO

Status: Still don’t know the right solution for this. Debian’s default i386 target is older than Rust’s. For now it’s a Debian problem.

Task: Teach the makefile to mix in additional ‘extra filename’ information

Issue: https://github.com/rust-lang/rust/issues/29559

Status: PR open

Task: Ensure that SxS installation of crates from multiple compilers works reliably.

Issue: https://github.com/rust-lang/rust/issues/29560

Status: No progress.

Task: Fix --libdir issues

Issue: https://github.com/rust-lang/rust/issues/29561

Status: Fixed. Thanks @wthrowe

Task: Disambiguate system-installed crates during resolution

Issue: https://github.com/rust-lang/rust/issues/16402

Status: No progress.

Task: Update Homebrew packages

Issue: https://github.com/rust-lang/rust/issues/29562

Status: No progress.

Task: Produce packaging guidelines

Issue: https://github.com/rust-lang/rust/issues/29563

Status: No progress.

Task: Publish source tarballs of Cargo releases

Issue: https://github.com/rust-lang/cargo/issues/2107

Status: No progress.

Task: Pair Cargo releases with Rust releases

Issue: https://github.com/rust-lang/cargo/issues/2108

Status: Partially fixed. The Cargo that Rust releases are paired with is tagged with a release number. Still don’t have the automation up to make Cargo release artifacts.

Task: Make binary releases of Cargo

Issue: https://github.com/rust-lang/cargo/issues/2109

Status: No progress.

Task: Validate that Cargo releases build with the corresponding Rust release

Issue: TODO

Status: No progress.

Task: Bootstrap Cargo without Cargo

Issue: https://github.com/rust-lang/cargo/issues/2110

Status: No progress. I’m having second thoughts about doing this at all though. ISTM that once a distro has a binary version of Cargo they can build future

Task: Enable Cargo to work without any network access

Issue: https://github.com/rust-lang/cargo/issues/2111

Status: No progress, though there’s a new issue about making Cargo work with local registries instead of crates.io.

Task: Compiler command line customization

Issue: https://github.com/rust-lang/cargo/issues/2112

Status: PR open.

2 Likes

@brson you've got a typo in the issue link, should be Bootstrapping unstable code from a stable compiler · Issue #29557 · rust-lang/rust · GitHub

Is i586 really still needed for Debian? A thread from September suggests not.

Unfortunately, i686 (Pentium Pro etc) is still too old for Rust’s default configuration, which wants SSE2 instructions (introduced Pentium 4). I think this was discussed upthread.

1 Like

Debian just dropped 586 support

In that case, they can either modify a single line before bootstrapping their i686 rustc and make it x87 for everyone, or, and that's what I'd probably do, make just the compiler runtime generic i686 and ship two sets of i686 crates.
Default to the newer one, instruct the user to pass a separately named --target= in case produced code doesn't run.

Or maybe detect the required version at installation time and download just the right i686 set.

Hey everyone,

I’ve been working on cleaning up and improving the rustc and cargo builds for openSUSE the last few days, and as part of that I ended up working on improving the cargo bootstrap.py script by @dhuseby. I’ve got a patchset in development here, comments / ideas are more than welcome.

Right now I think I have a rough idea of how we could package crates and rust projects for openSUSE - there’s still a lot of work left to do, but I also thought it might be valuable to share my main inspiration, which is the golang packaging macros for rpm developed for packaging golang modules for openSUSE here.

Here’s a question, though: From 1.10, each rustc version willl be bootstrappable from the previous release (so 1.10 with 1.9, 1.11 with 1.10 presumably, and so on). This is good news, but I’m wondering - are you also committing to ensure that rustc 1.10 is bootstrappable with 1.10? If that’s the case, it simplifies things even more…

@krig The self-bootstrap is #29556. I have a WIP patch for this, which I’ll try to post tonight or tomorrow.

Thanks for the link!

Hi there, anybody working on packaging Rust code for Arch Linux?

Would be nice to see Rust appearing in the More detailed guidelines section of this wki:

https://wiki.archlinux.org/index.php/Creating_packages#More_detailed_guidelines

I’m not experienced enough to write it myself, but I can help testing stuff and helping writing an how-to. Feel free to ping me.

ripgrep is in the community repo. That may be a useful template for you.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.