[Pkg-rust-maintainers] Bug#1073915: "cargo prepare-debian" should not be invoked by default with --link-from-system

Ximin Luo infinity0 at debian.org
Fri Jun 28 20:40:06 BST 2024


Package: dh-cargo
Version: 31
Followup-For: Bug #1073915

--link-from-system was made default because "it was like that before" in the first version that josh triplett wrote in perl.

The commits where I added --link-from-system, I replace some other more complex code with it. If you track the code I replaced, you eventually get to this:

| commit ba18e42c9e1988a9d4d505bb15668ace5b98daf8
| Author: Josh Triplett <josh at joshtriplett.org>
| Date:   Wed Nov 23 00:46:58 2016 -0800
| 
|     Rewrite to avoid invoking cargo directly on .crate contents
|     
|     According to Cargo upstream, crates don't necessarily support running
|     cargo on them directly; a .crate file only includes enough to build as a
|     dependency or with "cargo install $crate", not as the top-level crate.
|     For instance, when building as the top-level crate, cargo expects
|     other crates referenced by workspaces to exist; otherwise, cargo ignores
|     workspaces.

I'm not sure if today we are/support packaging crates from non-top-level of a workspace. If we are or want to support them in general, then --link-from-system would be required.

If not, then --link-from-system may not be required as the default. For these types of changes it's prudent to run the debcargo integration tests against a locally-installed dh-cargo with the proposed changes.

X

-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'stable-security'), (300, 'unstable'), (100, 'experimental'), (1, 'experimental-debug')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.7.12-amd64 (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dh-cargo depends on:
ii  cargo      1.75.0+dfsg1-4
ii  debhelper  13.15.3
ii  perl       5.38.2-5
ii  python3    3.11.8-1

dh-cargo recommends no packages.

dh-cargo suggests no packages.

-- no debconf information



More information about the Pkg-rust-maintainers mailing list