From aeadf4324edfebac0446d0be3c5c138c897deff0 Mon Sep 17 00:00:00 2001 From: "Raymond E. Pasco" Date: Wed, 21 Dec 2022 02:45:22 -0500 Subject: [PATCH 1/4] release: add configuration for cargo-about cargo-about is a tool from Embark that walks cargo dependencies for all third party licenses. Include its configuration file and a template to generate a third party license file. --- about.hbs | 22 ++++++++++++++++++++++ about.toml | 17 +++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 about.hbs create mode 100644 about.toml diff --git a/about.hbs b/about.hbs new file mode 100644 index 0000000000..8dc9490c5d --- /dev/null +++ b/about.hbs @@ -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}} diff --git a/about.toml b/about.toml new file mode 100644 index 0000000000..d080250749 --- /dev/null +++ b/about.toml @@ -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", +] From dd16a346fa7941cab9cf5ef96075a36e6564f897 Mon Sep 17 00:00:00 2001 From: "Raymond E. Pasco" Date: Wed, 21 Dec 2022 02:46:42 -0500 Subject: [PATCH 2/4] make-package.sh: include license information in tarball Generate LICENSE.thirdparty using cargo-about, and include it and the Namada LICENSE file in release tarballs. --- scripts/make-package.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/make-package.sh b/scripts/make-package.sh index 8ae06589bb..63a68fe491 100755 --- a/scripts/make-package.sh +++ b/scripts/make-package.sh @@ -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 @@ -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} From db53d5def6d46bffe496b7483c40cd05a6c2aa4e Mon Sep 17 00:00:00 2001 From: "Raymond E. Pasco" Date: Wed, 21 Dec 2022 02:47:35 -0500 Subject: [PATCH 3/4] ci: install cargo-about on release step make package now invokes cargo-about to generate LICENSE.thirdparty. Install it in the release CI so this can run. --- .github/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 114ca0455d..9de90b80a2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }} From a6892e480ebe25ec72bee14fc7cd480d12ad6986 Mon Sep 17 00:00:00 2001 From: "Raymond E. Pasco" Date: Wed, 21 Dec 2022 02:51:36 -0500 Subject: [PATCH 4/4] changelog: add #945 --- .../unreleased/miscellaneous/945-release-include-license.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .changelog/unreleased/miscellaneous/945-release-include-license.md diff --git a/.changelog/unreleased/miscellaneous/945-release-include-license.md b/.changelog/unreleased/miscellaneous/945-release-include-license.md new file mode 100644 index 0000000000..55d0b60f60 --- /dev/null +++ b/.changelog/unreleased/miscellaneous/945-release-include-license.md @@ -0,0 +1,2 @@ +- Include license information in release binary tarballs. + ([#945](https://github.com/anoma/namada/pull/945)) \ No newline at end of file