# Generated by go2rpm 1.10.0 %bcond_without check # https://github.com/aquasecurity/trivy %global goipath github.com/aquasecurity/trivy Version: 0.49.1 %gometa -L -f %global common_description %{expand: Find vulnerabilities, misconfigurations, secrets, SBOM in containers, Kubernetes, code repositories, clouds and more.} Name: trivy Release: %autorelease Summary: Vulnerability and license scanner License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSL-1.0 AND ISC AND MIT AND MPL-2.0 AND Unicode-DFS-2016 AND Unlicense URL: %{gourl} Source0 %{gosource} Source1: trivy-%{version}-vendor.tar.xz Source2: go-vendor-tools.toml BuildRequires: go-vendor-tools %description %{common_description} %prep %autosetup -p1 -a1 %{forgesetupargs} %goprep -k -e %build export GO_LDFLAGS="-X=github.com/aquasecurity/trivy/pkg/version.ver=%{version}" %gobuild -o trivy %{goipath}/cmd/trivy %install install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp trivy %{buildroot}%{_bindir}/ %go_vendor_license_install -c %{SOURCE2} -d trivy -D "trivy_path=$(pwd)/trivy" %check %go_vendor_license_check -c %{SOURCE2} -d trivy -D "trivy_path=$(pwd)/trivy" %if %{with check} # Disable tests that require WASM, generated code, or networking rm -v pkg/module/module_test.go %gocheck -d pkg/cloud/report -d pkg/fanal/artifact/repo %endif %files -f %{go_vendor_license_filelist} %doc CONTRIBUTING.md README.md SECURITY.md %{_bindir}/trivy %changelog %autochangelog