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

Include license information in release tarballs #945

Merged
merged 4 commits into from
Dec 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Include license information in release binary tarballs.
([#945](https://github.com/anoma/namada/pull/945))
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ jobs:
~/.cargo/git
key: ${{ runner.os }}-namada-release-${{ matrix.namada_cache_version }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-namada-release-${{ matrix.namada_cache_version }}
- name: Install cargo-about
run: |
cargo install --version 0.5.2 cargo-about
- name: Start sccache server
run: sccache --start-server
- name: ${{ matrix.make.name }}
Expand Down
22 changes: 22 additions & 0 deletions about.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Third Party Licenses

Overview of licenses:

{{#each overview}}
{{{name}}} ({{count}})
{{/each}}

All license text:

{{#each licenses}}
{{{name}}}

Used by:

{{#each used_by}}
{{crate.name}} {{crate.version}}
<{{#if crate.repository}}{{crate.repository}}{{else}}https://crates.io/crates/{{crate.name}}{{/if}}>
{{/each}}

{{{text}}}
{{/each}}
17 changes: 17 additions & 0 deletions about.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
accepted = [
"MIT",
"0BSD",
"ISC",
"Unlicense",
"BSD-2-Clause",
"BSD-3-Clause",
"CC0-1.0",
"MPL-2.0",
"GPL-3.0",
"OSL-3.0",
"OpenSSL",
"Unicode-DFS-2016",
"Apache-2.0 WITH LLVM-exception",
"Apache-2.0",
"NOASSERTION",
]
3 changes: 3 additions & 0 deletions scripts/make-package.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

# Make a release archive from built Namada binaries and dylib(s)
# depends on cargo-about 0.5.2

set -e

Expand All @@ -14,5 +15,7 @@ cd target/release && \
MM_TOKEN_EXCH=$(find . -maxdepth 1 -name 'libmm_token_exch.so' -or -name 'libmm_token_exch.dll' -or -name 'libmm_token_exch.dylib') && \
ln ${BIN} ${MM_TOKEN_EXCH} ../../${PACKAGE_NAME} && \
cd ../.. && \
ln LICENSE ${PACKAGE_NAME} && \
cargo about generate about.hbs > ${PACKAGE_NAME}/LICENSE.thirdparty && \
tar -c -z -f ${PACKAGE_NAME}.tar.gz ${PACKAGE_NAME} && \
rm -rf ${PACKAGE_NAME}