> Can we get this fixed in rustc-1.85 in Noble?

Hi Adrian,

Thank you for your patience on this issue. I've finished the Noble
rustc-1.85 fix and I'll get it uploaded ASAP.

** Description changed:

- If you use the cargo wrapper script provided by a versioned cargo
- package, e.g. /usr/lib/rust-1.80/share/cargo/bin/cargo, it will invoke
- /usr/bin/cargo rather than /usr/lib/rust-1.80/bin/cargo.
+ [ 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.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2100266

Title:
  Versioned cargo wrapper script points to default cargo

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rustc-1.76/+bug/2100266/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to