Skip to content

Properly resolve full license information for Rust binaries

Ryan Gonzalez requested to merge wip/refi64/bom-rust into apertis/v2023dev2

There are two primary issues when applying the current mechanisms for tracking source file licensing information to Rust binaries:

  • They statically link in their crate dependencies, meaning that we need to manually include the licenses of those crates
  • The compilation unit paths only include the primary "entry point" into the crate, and they're a mix of absolute and relative paths

In order to resolve this:

  • pkg/debhelper!18 (merged) will gather the license information for any source files referenced that are part of other packages. We can read this in here and use it to search the copyright information for the source files part of other crates.
  • Specifically when encountering Rust crates, combine all the licenses for source files within the same source directory as the "entry point" file, which should generally ensure that all the source files needed are handled.

https://phabricator.apertis.org/T8554

This should also, specifically for Rust, resolve the spin-off issues:

https://phabricator.apertis.org/T8776 https://phabricator.apertis.org/T8777

Signed-off-by: Ryan Gonzalez ryan.gonzalez@collabora.com


Draft status because it depends on pkg/debhelper!18 (merged).

Edited by Ryan Gonzalez

Merge request reports