From ea6afd68f7502404efce6e3c4743c028cfb451c7 Mon Sep 17 00:00:00 2001 From: Olivier Valentin Date: Tue, 20 Jan 2026 16:07:01 +0100 Subject: [PATCH 1/5] Generate third-party deps license files. --- about.toml | 31 ++++++++++++++++++++++ about_html.hbs | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 about.toml create mode 100644 about_html.hbs diff --git a/about.toml b/about.toml new file mode 100644 index 00000000..0d8f113e --- /dev/null +++ b/about.toml @@ -0,0 +1,31 @@ +accepted = [ + "MIT", + "Apache-2.0", + "BSD-2-Clause", + "BSD-3-Clause", + "ISC", + "Unicode-3.0", + "Unlicense", + "0BSD", + "Zlib", + "CC0-1.0", + + # Copyleft licenses + "GPL-2.0", + "GPL-2.0-only", + "GPL-2.0-or-later", + "GPL-3.0", + "GPL-3.0-only", + "GPL-3.0-or-later", + "LGPL-2.1", + "LGPL-2.1-only", + "LGPL-2.1-or-later", + "LGPL-3.0", + "LGPL-3.0-only", + "LGPL-3.0-or-later", + "AGPL-3.0", + "AGPL-3.0-only", + "AGPL-3.0-or-later", + "MPL-2.0", +] + diff --git a/about_html.hbs b/about_html.hbs new file mode 100644 index 00000000..b24f8e0e --- /dev/null +++ b/about_html.hbs @@ -0,0 +1,70 @@ + + + + + + + +
+
+

Third Party Licenses

+

This page lists the licenses of the projects used in cargo-about.

+
+ +

Overview of licenses:

+ + +

All license text:

+ +
+ + + From d2bbeab752bc2d02d8fa8f985c5ec4b6f317cdf7 Mon Sep 17 00:00:00 2001 From: Olivier Valentin Date: Wed, 21 Jan 2026 17:52:07 +0100 Subject: [PATCH 2/5] Add 'licenses' Makefile target --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1fe10ddc..464320e8 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,12 @@ image: -t $(FACT_IMAGE_NAME) \ $(CURDIR) +licenses:THIRD_PARTY_LICENSES.html + +THIRD_PARTY_LICENSES.html:Cargo.lock + cargo install cargo-about + cargo about generate --format handlebars -o THIRD_PARTY_LICENSES.html about_html.hbs + integration-tests: make -C tests @@ -37,4 +43,4 @@ format: cargo fmt make -C fact-ebpf format -.PHONY: tag mock-server integration-tests image image-name clean +.PHONY: tag mock-server integration-tests image image-name licenses clean From 092bda44e1ab09f7dd63a3d3b622a3d8f4402a97 Mon Sep 17 00:00:00 2001 From: Olivier Valentin Date: Wed, 21 Jan 2026 17:54:56 +0100 Subject: [PATCH 3/5] Restrict licenses to the ones currently used. --- about.toml | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/about.toml b/about.toml index 0d8f113e..26d24936 100644 --- a/about.toml +++ b/about.toml @@ -1,31 +1,9 @@ accepted = [ "MIT", "Apache-2.0", - "BSD-2-Clause", "BSD-3-Clause", + "Zlib", "ISC", "Unicode-3.0", - "Unlicense", - "0BSD", - "Zlib", - "CC0-1.0", - - # Copyleft licenses - "GPL-2.0", - "GPL-2.0-only", - "GPL-2.0-or-later", - "GPL-3.0", - "GPL-3.0-only", - "GPL-3.0-or-later", - "LGPL-2.1", - "LGPL-2.1-only", - "LGPL-2.1-or-later", - "LGPL-3.0", - "LGPL-3.0-only", - "LGPL-3.0-or-later", - "AGPL-3.0", - "AGPL-3.0-only", - "AGPL-3.0-or-later", - "MPL-2.0", ] From 951162bd5154fa1f82bb1f75bf9b571d19a0ac04 Mon Sep 17 00:00:00 2001 From: Olivier Valentin Date: Wed, 21 Jan 2026 18:27:51 +0100 Subject: [PATCH 4/5] New workflow to check licenses --- .github/workflows/license-checks.yml | 61 ++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/license-checks.yml diff --git a/.github/workflows/license-checks.yml b/.github/workflows/license-checks.yml new file mode 100644 index 00000000..5f292ff7 --- /dev/null +++ b/.github/workflows/license-checks.yml @@ -0,0 +1,61 @@ +name: License checks + +on: + push: + branches: + - main + - release-* + - konflux/** + pull_request: + +jobs: + licenses-need-reevaluation: + name: 'Should licenses be evaluated ?' + runs-on: 'ubuntu-24.04' + outputs: + need-reevaluation: ${{ steps.changed.outputs.lockfile }} + + steps: + - uses: actions/checkout@v4 + + - uses: dorny/paths-filter@v3 + id: changed + with: + filters: | + lockfile: + - Cargo.lock + + check: + name: Check licenses + needs: + - licenses-need-reevaluation + if: needs.licenses-need-reevaluation.outputs.need-reevaluation == 'true' + runs-on: 'ubuntu-24.04' + + steps: + - uses: actions/checkout@v4 + + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + ~/.cargo/.crates.toml + ~/.cargo/.crates2.json + key: check-license-${{ runner.os }} + + - name: Install cargo-about + run: cargo install cargo-about + + - name: Generate licenses + run: make licenses + + - name: Store licenses + if: always() + uses: actions/upload-artifact@v4 + with: + name: third-party-licenses + path: | + ${{ github.workspace }}/THIRD_PARTY_LICENSES.html From c48d19bae5fda769d33e47bd37ef1ab7943aebeb Mon Sep 17 00:00:00 2001 From: Olivier Valentin Date: Wed, 4 Feb 2026 11:57:29 +0100 Subject: [PATCH 5/5] Don't build on bot branches PRs are sufficient now that we use those for auto-updates. Co-authored-by: Mauro Ezequiel Moltrasio --- .github/workflows/license-checks.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/license-checks.yml b/.github/workflows/license-checks.yml index 5f292ff7..08f93726 100644 --- a/.github/workflows/license-checks.yml +++ b/.github/workflows/license-checks.yml @@ -5,7 +5,6 @@ on: branches: - main - release-* - - konflux/** pull_request: jobs: