Skip to content
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

attribution: upload dependency attributions as part of GitHub releases #382

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

cbgbt
Copy link
Contributor

@cbgbt cbgbt commented Sep 27, 2024

Description of changes:
This change:

  • Uses the license-scan tool in the Bottlerocket SDK to generate attributions for 3rd party dependencies.
  • Modifies the release workflow to upload these attributions during the release process.

Testing done:

  • Ran the GH actions in my account here
  • Here's the created release, with the attributions tarball attached.

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

echo "Clarifying cargo-cross & dependency licenses..."
git clone https://github.com/cross-rs/cross/ /tmp/cargo-cross
pushd /tmp/cargo-cross
git reset --hard 7b79041
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do these two Git commit hashes come from? Can we pass them in as variables or in a config file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These commit hashes are what we lock to in the GitHub Actions workflow for performing a release. Per your other comment, I noted that we aren't distributing these tools with Twoliter and have just removed them from the attributions script!

Comment on lines 43 to 48
# =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^=
echo "Clarifying cargo-dist & dependency licenses..."
git clone https://github.com/webern/cargo-dist/ /tmp/cargo-dist
pushd /tmp/cargo-dist
git reset --hard 3dcbe823
popd
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do cargo-cross and cargo-dist end up in the release artifacts in some way?

@cbgbt
Copy link
Contributor Author

cbgbt commented Sep 27, 2024

^ Removes cargo-dist and cross, which are not being distributed with twoliter.

Makefile Outdated
docker build \
--build-arg BOTTLEROCKET_SDK_IMAGE=$(BOTTLEROCKET_SDK_IMAGE) \
--build-arg UID=$(shell id -u) \
--build-arg GID=$(shell id -u) \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--build-arg GID=$(shell id -u) \
--build-arg GID=$(shell id -g) \

@cbgbt cbgbt force-pushed the attribution-docs branch from 3981565 to c1edcd9 Compare October 1, 2024 19:14
@cbgbt
Copy link
Contributor Author

cbgbt commented Oct 1, 2024

^ fixes bug found by @sam-berning

@cbgbt cbgbt merged commit 3a625a4 into bottlerocket-os:develop Oct 1, 2024
1 check passed
@cbgbt cbgbt deleted the attribution-docs branch October 1, 2024 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants