#1353 Rust: clarifications and docs for %cargo_install_{bin,lib} macros
Merged by james. Opened by decathorpe.
Unknown source master

Download 1353.patch

I tried to clarify a few things that people found confusing in the current package naming / package source guidelines for Rust crates.

One notable change is that this sentence is relaxed a bit:

Rust crates that are published on https://crates.io[crates.io]
*MUST* be packaged with `rust-$crate` as the name of the source package
(where `$crate` is the name of the project on https://crates.io[crates.io]).

The new version should match the original intent we had more closely (and is not as strict).
It should also better match what people actually need to do in some cases.


I also added a few more sentences about Rust packages that use vendored dependencies:

  • that they are not allowed to ship -devel packages with Rust library sources, because they would be broken (the dependencies of those -devel packages would often only be satisfiable by the vendored dependencies, but those are not shipped)
  • since they can't ship -devel packages with Rust library sources, they may follow different guidelines for package naming / package sources

Last part is that I added some documentation for the %cargo_install_lib and %cargo_install_bin macros that are new in rust-packaging v26. They are now the officially sanctioned way to control the behaviour of the %cargo_install macro (instead of messing with the implementation details of the macro by overriding %__cargo_is_lib and / or %__cargo_is_bin).

rebased onto e06e40c35af9e15aa15d2074da824a2e84d1866e

rebased onto f5037c5ae6f4a1ac36f30e4a50c1a5f953b75736

:thumbsup:

Pull-Request has been merged by james

Thanks!

Metadata