-
Notifications
You must be signed in to change notification settings - Fork 519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch packages' licenses at build time #1901
Merged
arnaldo2792
merged 1 commit into
bottlerocket-os:develop
from
arnaldo2792:fetch-licenses
Jan 14, 2022
Merged
Fetch packages' licenses at build time #1901
arnaldo2792
merged 1 commit into
bottlerocket-os:develop
from
arnaldo2792:fetch-licenses
Jan 14, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arnaldo2792
force-pushed
the
fetch-licenses
branch
from
January 12, 2022 23:23
e58feaf
to
978eca9
Compare
bcressey
reviewed
Jan 13, 2022
webern
approved these changes
Jan 13, 2022
arnaldo2792
force-pushed
the
fetch-licenses
branch
from
January 13, 2022 01:24
978eca9
to
6d03f2a
Compare
Forced push includes:
|
bcressey
reviewed
Jan 13, 2022
arnaldo2792
force-pushed
the
fetch-licenses
branch
from
January 13, 2022 19:41
6d03f2a
to
4913676
Compare
Forced push addresses feedback |
arnaldo2792
force-pushed
the
fetch-licenses
branch
from
January 14, 2022 00:03
4913676
to
8639b9d
Compare
Forced push fixes commit message |
bcressey
approved these changes
Jan 14, 2022
Add support for the `Licenses.toml` file, used to provide licensing information for some packages. When the `Licenses.toml` file and the `licenses` folder are provided, they are copied to the build directory of the package. If either path is missing, empty configurations are provided. When this happens, packages that use `Licenses.toml` will fail to build. Signed-off-by: Arnaldo Garcia Rincon <[email protected]>
arnaldo2792
force-pushed
the
fetch-licenses
branch
from
January 14, 2022 02:04
8639b9d
to
7141b29
Compare
Forced push includes the fetch-licenses on fetch-licenses [$] ❯ rm Licenses.toml
fetch-licenses on fetch-licenses [$] ❯ cargo make fetch-licenses -e BUILDSYS_UPSTREAM_LICENSE_FETCH=true -e BUILDSYS_LICENSES_CONFIG_PATH=$HOME/Licenses.toml
[cargo-make] INFO - cargo make 0.32.17
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: fetch-licenses
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: setup
[cargo-make] INFO - Running Task: setup-build
[cargo-make] INFO - Running Task: fetch-sdk
[cargo-make] INFO - Running Task: fetch-toolchain
[cargo-make] INFO - Running Task: fetch-sources
[cargo-make] INFO - Running Task: fetch-vendored
[cargo-make] INFO - Running Task: fetch-licenses
[cargo-make] INFO - Build Done in 3.50 seconds.
fetch-licenses on fetch-licenses [$] ❯ test -f Licenses.toml; and echo "Exists"
Exists
|
bcressey
approved these changes
Jan 14, 2022
webern
approved these changes
Jan 14, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue number:
N / A
Description of changes:
There are packages to which multiple licenses apply, depending on who distributes the software. For said packages, the licenses are fetched at build time when the
Licenses.toml
configuration file is present. The fetched licenses are stored in thelicenses
folder, used to retrieve the license of the special packages while they are built.When the
Licenses.toml
file and thelicenses
folder are provided, they are copied to the build directory of the package. If either path is missing, empty configurations are provided. Packages that use theLicenses.toml
file to retrieve their licensing information, will fail the build, since it is expected that the user will provide said configurations.TODO:
BUILDING.md
to documentLicenses.toml
Testing done:
Licenses.toml
:And with a spec file as follows:
Verified the built rpm used the correct configurations
Licenses.toml
are retrieved and stored inlicenses
Licenses.toml
Licenses.toml
, and this is missingTerms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.