On Mon, May 29, 2023 at 9:32 AM Vitaly Zaitsev via devel
<devel(a)lists.fedoraproject.org> wrote:
On 28/05/2023 17:41, Fabio Valentini wrote:
> At least for Rust packages, we do have some amount of automation now
> to help with this chore.
I think %autolicense should be added to the rpmautospec project. It will
automatically extract license tags from all BRs "-static" or
"crate()"
and concatenate them with AND.
Example:
# main project - MIT
License: MIT AND %autolicense
In future it will be able to use some license validators and replace the
entire License tag:
License: %autolicense
I don't think values of tags like License can be filled based on
information that's only available during %build ...
It might be possible with the shiny new build-time spec fragment
generation, but I'm not even sure about that.
What we have for Rust packages now is basically the "next best thing"
(the %cargo_license_summary macro prints to the build log, from where
you can paste the information into the spec file after a successful
build). It shouldn't be too hard to implement something similar for
statically linked C/C++ / header-only C/C++ libraries / Go packages /
insert other use case of statically linked binaries here.
Fabio