From 99674af41e3a1a8c24ece2bdfb1f8c62c57ed472 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Wed, 27 Mar 2024 08:40:44 +0800 Subject: [PATCH] Add cargo-cyclonedx --- .github/.cspell/project-dictionary.txt | 1 + README.md | 1 + manifests/cargo-cyclonedx.json | 31 +++++++++++++++++++++++++ tools/ci/tool-list.sh | 1 + tools/codegen/base/cargo-cyclonedx.json | 17 ++++++++++++++ 5 files changed, 51 insertions(+) create mode 100644 manifests/cargo-cyclonedx.json create mode 100644 tools/codegen/base/cargo-cyclonedx.json diff --git a/.github/.cspell/project-dictionary.txt b/.github/.cspell/project-dictionary.txt index 1499f25d..952a7dda 100644 --- a/.github/.cspell/project-dictionary.txt +++ b/.github/.cspell/project-dictionary.txt @@ -2,6 +2,7 @@ almalinux bindgen binstall coreutils +cyclonedx distro doas dprint diff --git a/README.md b/README.md index 149bd4ae..72e794fb 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,7 @@ https://spdx.org/licenses | [**cargo-audit**](https://github.com/rustsec/rustsec/tree/HEAD/cargo-audit) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/rustsec/rustsec/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/rustsec/rustsec/blob/HEAD/cargo-audit/LICENSE-APACHE) OR [MIT](https://github.com/rustsec/rustsec/blob/HEAD/cargo-audit/LICENSE-MIT) | | [**cargo-binstall**][cargo-binstall] | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/cargo-bins/cargo-binstall/releases) | Linux, macOS, Windows | [GPL-3.0](https://github.com/cargo-bins/cargo-binstall/blob/HEAD/crates/bin/LICENSE) | | [**cargo-careful**](https://github.com/RalfJung/cargo-careful) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/RalfJung/cargo-careful/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/RalfJung/cargo-careful/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/RalfJung/cargo-careful/blob/HEAD/LICENSE-MIT) | +| [**cargo-cyclonedx**](https://github.com/CycloneDX/cyclonedx-rust-cargo) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/CycloneDX/cyclonedx-rust-cargo/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/CycloneDX/cyclonedx-rust-cargo/blob/HEAD/LICENSE) | | [**cargo-deny**](https://github.com/EmbarkStudios/cargo-deny) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/EmbarkStudios/cargo-deny/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/EmbarkStudios/cargo-deny/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/EmbarkStudios/cargo-deny/blob/HEAD/LICENSE-MIT) | | [**cargo-dinghy**](https://github.com/sonos/dinghy) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/sonos/dinghy/releases) | Linux, macOS | [Apache-2.0](https://github.com/sonos/dinghy/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/sonos/dinghy/blob/HEAD/LICENSE-MIT) | | [**cargo-export**](https://github.com/bazhenov/cargo-export) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/bazhenov/cargo-export/releases) | Linux, macOS, Windows | [MIT](https://github.com/bazhenov/cargo-export/blob/HEAD/LICENSE) | diff --git a/manifests/cargo-cyclonedx.json b/manifests/cargo-cyclonedx.json new file mode 100644 index 00000000..41f6da21 --- /dev/null +++ b/manifests/cargo-cyclonedx.json @@ -0,0 +1,31 @@ +{ + "rust_crate": "cargo-cyclonedx", + "template": { + "x86_64_linux_gnu": { + "url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-${version}/cargo-cyclonedx-linux-amd64.tar.gz" + }, + "x86_64_macos": { + "url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-${version}/cargo-cyclonedx-Darwin-x86_64.tar.gz" + }, + "x86_64_windows": { + "url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-${version}/cargo-cyclonedx-Win-x86_64.zip" + } + }, + "latest": { + "version": "0.5.0" + }, + "0.5": { + "version": "0.5.0" + }, + "0.5.0": { + "x86_64_linux_gnu": { + "checksum": "7daa885e9b6f59bf7674a2972bf1f37d9e21ab7461c3e2f9c59e99a966ab6026" + }, + "x86_64_macos": { + "checksum": "70b197f8095fe2473baef1d96dd4409abb1aef20aeeea00f8a0cbebc25528ddb" + }, + "x86_64_windows": { + "checksum": "11e063c29bdd85ceb061b30aa11073238a8c93302b1ff3f5ac37e91ac90b425a" + } + } +} diff --git a/tools/ci/tool-list.sh b/tools/ci/tool-list.sh index d29ce67e..bdbfe61d 100755 --- a/tools/ci/tool-list.sh +++ b/tools/ci/tool-list.sh @@ -6,6 +6,7 @@ cd "$(dirname "$0")"/../.. # They don't provide prebuilt binaries for musl or old glibc host. glibc_pre_2_34_incompat=( + cargo-cyclonedx xbuild ) glibc_pre_2_31_incompat=( diff --git a/tools/codegen/base/cargo-cyclonedx.json b/tools/codegen/base/cargo-cyclonedx.json new file mode 100644 index 00000000..3d09accc --- /dev/null +++ b/tools/codegen/base/cargo-cyclonedx.json @@ -0,0 +1,17 @@ +{ + "repository": "https://github.com/CycloneDX/cyclonedx-rust-cargo", + "tag_prefix": "cargo-cyclonedx-", + "rust_crate": "${package}", + "version_range": ">= 0.5.0", + "platform": { + "x86_64_macos": { + "asset_name": "${package}-Darwin-x86_64.tar.gz" + }, + "x86_64_windows": { + "asset_name": "${package}-Win-x86_64.zip" + }, + "x86_64_linux_gnu": { + "asset_name": "${package}-linux-amd64.tar.gz" + } + } +}