[Pkg-rust-maintainers] Bug#953907: dh-cargo: installs various non-rust files to /usr/share/cargo

Sean Whitton spwhitton at spwhitton.name
Thu Mar 27 08:26:49 GMT 2025


Hello,

On Wed 26 Mar 2025 at 12:26pm GMT, Blair Noctis wrote:

> This one's over five years,
> and you have probably already known the reason,
> but I'll try to provide a reason to close this bug.
>
> Due to the static linking nature of Rust,
> (dynamic linking exists, in the form of "dylib" and "cdylib", but is rare)
> Rust libraries are currently just copies of source files,
> to be used by compilation of dependent packages.
> That explains those "non-Rust" files:
> they are part of the upstream source.
> (distributed on crates.io, specifically)
>
> They are in a way not installed to /usr/share/cargo,
> as files belonging to the cargo package,
> but to /usr/share/cargo/registry,
> which is a de facto [cargo source] for those Debian packaged libraries.
> I don't know if there is a better place.
> It's not like Rust sources are allowed in /usr/lib or /usr/include.
>
> [cargo source]: https://doc.rust-lang.org/cargo/reference/source-replacement.html

ISTM the particular files identified should never be installed in the
binary package, regardless.

-- 
Sean Whitton
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 869 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-rust-maintainers/attachments/20250327/8b130745/attachment.sig>


More information about the Pkg-rust-maintainers mailing list