• Bug#953907: dh-cargo: installs various non-rust files to /usr/share/car

    From Sean Whitton@21:1/5 to Blair Noctis on Thu Mar 27 09:40:02 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

    --=-=-Content-Type: application/pgp-signature; name="signature.asc"

    -----BEGIN PGP SIGNATURE-----

    iQJNBAEBCgA3FiEEm5FwB64DDjbk/CSLaVt65L8GYkAFAmflC8kZHHNwd2hpdHRv bkBzcHdoaXR0b24ubmFtZQAKCRBpW3rkvwZiQLd9D/4kc50jntyViyrMrL3kvOc5 /ZIZnv0aIXj+xS4jKaeBkUkBoER+7KIFNrL8zBHPkp3vHXINMv7iWvAel/lKd7AZ RoTneiRgPn/la78nXtRqnCO3ku/Lml91DTCJ1tSuNstzD01us8gI+sXAwJAFfLLn B0EkHKu7gdtclhwOkMLAmFIp9/2+E69idkn1U1gq+b9cO9ZRw/mALlYe60GbmVOJ jD2sYOqe92b8udzUXU+PywZaPghBDJgJgodMkIO7RyrSIoLxyhCP35I2HjsaAblN JEBtUBootYAKFDNfhfmWnsAW/N0nZ7BiDOrEkBl33702f2voEdNngjm+DFxN8h1W wxL0iV5Dz7NEiJPkZEkpvVJP5y7wDGZp7uqCCi9L7POZKdKTEdQ2Os8z3RRUShH0 8SJza7aIMa3aa3w2jCu4hqPe5SJxnmG2ZFilqySJlyr+hRUilYM0Bd90bh2wPNCm meeRQn5iV5UZtqTf9yM1Aa1I0i/CFupaWbKzWgeHTM5w2y23MPgwtXgG4QNGVcu0 0RId6/EiN23zWW6+clu4x8xNIHHUpJDWm/OUc6j+GyBIX0Vc15KNMMJbfuE3vNqn uAyFaKOtDj1XOE0gCEE6iELrpvE6QBZoAIYXmdby9cVGD5UKaxlyM1Xwee26vuxJ Rv5Jelqhh1rfJnb4QzxnZQ==+R0z
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Us