[Bug 2100266] Re: Versioned cargo wrapper script points to default cargo
Max Gilmour
2100266 at bugs.launchpad.net
Wed Apr 8 21:56:01 UTC 2026
Thanks for making replication easy for me! I fixed any calls to the default
cargo in the cargo wrapper script and I was able to get past the point of
failure in the build process (but the build failed after for a different
reason).
When you get the chance, could you please try building the full authd using
The rustc-1.91 version in http://ppa.launchpadcontent.net/maxgmr/lp2100266-2/ubuntu
and checking if that fixes the problem for you?
I created a passing autopkgtest that *should* run through all the ways the
cargo wrapper script can be called during the package build process, but I
want to be 100% sure this new upload will fix your problem. Thanks!
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to rustc-1.76 in Ubuntu.
Matching subscriptions: rustc-1.93
https://bugs.launchpad.net/bugs/2100266
Title:
Versioned cargo wrapper script points to default cargo
Status in rustc-1.76 package in Ubuntu:
Invalid
Status in rustc-1.77 package in Ubuntu:
Invalid
Status in rustc-1.78 package in Ubuntu:
Invalid
Status in rustc-1.79 package in Ubuntu:
Invalid
Status in rustc-1.80 package in Ubuntu:
Invalid
Status in rustc-1.81 package in Ubuntu:
In Progress
Status in rustc-1.82 package in Ubuntu:
In Progress
Status in rustc-1.83 package in Ubuntu:
In Progress
Status in rustc-1.84 package in Ubuntu:
In Progress
Status in rustc-1.85 package in Ubuntu:
In Progress
Status in rustc-1.88 package in Ubuntu:
In Progress
Status in rustc-1.91 package in Ubuntu:
New
Status in rustc-1.92 package in Ubuntu:
New
Status in rustc-1.93 package in Ubuntu:
New
Status in rustc-1.76 source package in Focal:
New
Status in rustc-1.77 source package in Focal:
New
Status in rustc-1.78 source package in Focal:
New
Status in rustc-1.79 source package in Focal:
New
Status in rustc-1.80 source package in Focal:
New
Status in rustc-1.76 source package in Jammy:
New
Status in rustc-1.77 source package in Jammy:
New
Status in rustc-1.78 source package in Jammy:
New
Status in rustc-1.79 source package in Jammy:
New
Status in rustc-1.80 source package in Jammy:
New
Status in rustc-1.76 source package in Noble:
New
Status in rustc-1.77 source package in Noble:
New
Status in rustc-1.78 source package in Noble:
New
Status in rustc-1.79 source package in Noble:
New
Status in rustc-1.80 source package in Noble:
New
Status in rustc-1.81 source package in Noble:
New
Status in rustc-1.82 source package in Noble:
New
Status in rustc-1.83 source package in Noble:
New
Status in rustc-1.84 source package in Noble:
New
Status in rustc-1.85 source package in Noble:
In Progress
Status in rustc-1.80 source package in Oracular:
Won't Fix
Status in rustc-1.81 source package in Oracular:
Won't Fix
Status in rustc-1.81 source package in Plucky:
Won't Fix
Status in rustc-1.82 source package in Plucky:
Won't Fix
Status in rustc-1.83 source package in Plucky:
Won't Fix
Status in rustc-1.84 source package in Plucky:
Won't Fix
Status in rustc-1.85 source package in Questing:
In Progress
Status in rustc-1.88 source package in Questing:
New
Status in rustc-1.88 source package in Resolute:
In Progress
Bug description:
[ Impact ]
* If you use the Cargo wrapper script provided by a versioned
cargo package, e.g. /usr/lib/rust-1.85/share/cargo/bin/cargo,
it will invoke /usr/bin/cargo rather than
/usr/lib/rust-1.85/bin/cargo.
* This means that users expecting a particular Cargo version are
actually invoking the rust-defaults Cargo version behind the
scenes.
* Additionally, if the rust-defaults Cargo version isn't
installed, the versioned Cargo wrapper script doesn't work at
all (because it's trying to invoke the nonexistent default).
* As stated in the comments of this bug report, this is blocking
the update of authd's Rust dependencies.
* This upload fixes the bug by making the Cargo wrapper script
invoke the versioned Cargo instead.
* In addition, it adds a new "versioned-cargo-wrapper" autopkgtest
which verifies that the Cargo version invoked by the wrapper
script matches the version of the package itself.
[ Test Plan ]
* To reproduce on Noble, do the following:
- # apt install -y cargo-1.85
- $ /usr/lib/rust-1.85/share/cargo/bin/cargo --version
- This should produce a FileNotFoundError.
- # apt install -y cargo
- $ /usr/lib/rust-1.85/share/cargo/bin/cargo --version
- This should (incorrectly) show cargo 1.75.0.
* To test the fix on Noble, do the following:
- # add-apt-repository -y ppa:maxgmr/rustc-lp2100266
- # apt update && apt upgrade -y
- # apt remove -y cargo
- $ /usr/lib/rust-1.85/share/cargo/bin/cargo --version
- This should now show cargo 1.85.1 (instead of FileNotFound)
- # apt install -y cargo
- $ /usr/lib/rust-1.85/share/cargo/bin/cargo --version
- This should also show cargo 1.85.1 (instead of 1.75.0)
* Additionally, the new "versioned-cargo-wrapper" autopkgtest
should pass.
[ Where problems could occur ]
* This upload changes the toolchain version which is invoked by the
versioned Cargo wrapper. As a result, applying this SRU means that
packages will be built with a different Rust version.
* This means that, for example, on Noble, packages built with
cargo-1.85 were being built with 1.75 the whole time. When the
SRU is applied, all these packages will be (correctly) built with
1.85 as intended, but this could potentially cause builds to fail.
* This change does not affect the vast majority of Rust packages, as
they are all built with the default Rust version.
[ Other Info ]
* In d/rules, my exclusion of 'librustc_driver' from the dh_dwz step
is not related to this bug, but the build failed otherwise, so I
needed to include this fix as well.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rustc-1.76/+bug/2100266/+subscriptions
More information about the foundations-bugs
mailing list