diff --git a/.gitignore b/.gitignore index e69de29..ed392cd 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +/snpguest-0.8.3.tar.gz +/snpguest-0.8.3-vendor.tar.gz diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..f88aa91 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,5 @@ +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: [] diff --git a/snpguest-remove-openssl-vendored-dependency.diff b/snpguest-remove-openssl-vendored-dependency.diff new file mode 100644 index 0000000..699f534 --- /dev/null +++ b/snpguest-remove-openssl-vendored-dependency.diff @@ -0,0 +1,13 @@ +diff --git a/Cargo.toml b/Cargo.toml +index 8fef511..e597777 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -26,7 +26,7 @@ sev = { version = "5.0.0", default-features = false, features = ['openssl','snp' + nix = "^0.23" + serde = { version = "1.0", features = ["derive"] } + bincode = "^1.2.1" +-openssl = { version = "^0.10", features = ["vendored"]} ++openssl = { version = "^0.10" } + reqwest = { version="0.11.10", features = ["blocking"] } + hex = "0.4" + x509-parser = { version="0.16.0", features=["verify"] } diff --git a/snpguest.spec b/snpguest.spec new file mode 100644 index 0000000..57405dc --- /dev/null +++ b/snpguest.spec @@ -0,0 +1,66 @@ +# Generated by rust2rpm 27 +%bcond check 1 + +%global version 0.8.3 +%global crate snpguest + +Name: snpguest +Version: %{version} +Release: 1%{?dist} +Summary: A CLI tool for interacting with SEV-SNP guest environment + +URL: https://github.com/virtee/%{crate} +Source: https://github.com/virtee/%{crate}/archive/refs/tags/%{crate}-%{version}.tar.gz +Source1: https://github.com/virtee/%{crate}/releases/download/v%{version}/%{crate}-%{version}-vendor.tar.gz +Patch: snpguest-remove-openssl-vendored-dependency.diff + +# snpguest is a tool using features specific to AMD EPYC processors (x86_64). +ExclusiveArch: x86_64 + +# (MIT OR Apache-2.0) AND Unicode-DFS-2016 +# Apache-2.0 +# Apache-2.0 OR MIT +# BSD-3-Clause +# MIT +# MIT OR Apache-2.0 +# MPL-2.0 +# Unlicense OR MIT +License: Apache-2.0 AND BSD-3-Clause AND MIT AND MPL-2.0 AND Unicode-DFS-2016 AND (Apache-2.0 OR MIT) AND (Unlicense OR MIT) + +BuildRequires: rust-toolset +BuildRequires: /usr/bin/pkg-config +BuildRequires: openssl-devel + +%global _description %{expand: +Administrative utility for AMD SEV-SNP.} + +%description %{_description} + +%files +%license LICENSE +%license LICENSE.dependencies +%doc README.md +%{_bindir}/snpguest + +%prep +%autosetup -n %{crate}-%{version} -p1 -a1 +rm -rf Cargo.lock +%cargo_prep -v vendor + +%build +%cargo_build +%{cargo_license_summary} +%{cargo_license} > LICENSE.dependencies + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Wed Feb 12 2025 Tyler Fanelli - 0.8.3-1 +- Initial commit on c10s + Resolves: RHELPLAN-171498 diff --git a/sources b/sources new file mode 100644 index 0000000..974fde6 --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (snpguest-0.8.3.tar.gz) = 1c3535000d82013dec3edb338306b5aca62fda38f9d12e7e0b540a82ef5a23699bcf0b14c72f695c0ce785418c2889fe820b8f036fbbcadebecbc80beb8e2d5e +SHA512 (snpguest-0.8.3-vendor.tar.gz) = ada1cd1b4185bb2e40030834a696593fbc0b3204f84ec53333c62573ea272695b53da6b158d7d859d38766e2755a846bf0c357b12ada9437743af326854c126f