In dotenv I have noticed that binary gets built only if cli feature is activated and is not default, however rust2rpm generates spec with binary and then cargo install simply fails because there is nothing to install.
dotenv
cli
cargo install
Metadata Update from @decathorpe: - Issue set to the milestone: 23
This will probably require a significant rewrite, which will not happen in time for v23.
How should this work? A "simple" solution might be to parse all [[bin]] tables for required-features, calculate the union of all required features, and pass all of them with -f foo,bar,baz to the %cargo_{generate_buildrequires,build,installl,check} macros?
[[bin]]
required-features
-f foo,bar,baz
%cargo_{generate_buildrequires,build,installl,check}
Metadata Update from @decathorpe: - Issue set to the milestone: 24 (was: 23)
This functionality is now implemented for cargo workspaces. Adding similar functionality for single crates is on my TODO list for rust2rpm v24.1.
Metadata Update from @decathorpe: - Issue set to the milestone: v24.1 (was: 24)
ref. cargo2rpm issue: https://pagure.io/fedora-rust/cargo2rpm/issue/1
Required features for "bin" and "cdylib" targets are now always added to cargo flags: https://pagure.io/fedora-rust/rust2rpm/c/a0e869199f96dc3eabf8abbe204db337fc8346fc?branch=main
Released with rust2rpm v24.1.0.
Metadata Update from @decathorpe: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
Login to comment on this ticket.