Skip to content
Snippets Groups Projects
Commit e5a81d3f authored by Ryan Gonzalez's avatar Ryan Gonzalez
Browse files

Properly resolve full license information for Rust binaries

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 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.

As the amount of information that needs to be held per package has
increased drastically, a new PackageLicenseInfo class was introduced,
encapsulating the primary copyright, external copyrights, external
sources index, and the bin2sources data.

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: default avatarRyan Gonzalez <ryan.gonzalez@collabora.com>
parent c7012de3
Branches apertis/v2022dev3
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment