## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by go2rpm 1.10.0 %bcond_without check # https://github.com/aquasecurity/trivy %global goipath github.com/aquasecurity/trivy Version: 0.50.0 %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 AND (Apache-2.0 OR GPL-2.0-or-later) URL: %{gourl} Source0 %{gosource} Source1: trivy-%{version}-vendor.tar.xz Source2: go-vendor-tools.toml BuildRequires: go-vendor-tools %description %{common_description} %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %autopatch -p1 %build export GO_LDFLAGS="-X=github.com/aquasecurity/trivy/pkg/version.ver=%{version}" # This package does not build without go modules enabled %global gomodulesmode GO111MODULE=on %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/fanal/artifact/repo/git_test.go \ pkg/module/module_test.go # Terraform tests attempt to connect to the terraform registry find pkg/iac/scanners/terraform* -name '*_test.go' -print -delete %gotest ./... %endif %files -f %{go_vendor_license_filelist} %doc CONTRIBUTING.md README.md SECURITY.md %{_bindir}/trivy %changelog ## START: Generated by rpmautospec * Sat Mar 23 2024 CoprDistGit - 0.50.0-2 - automatic import of trivy * Sat Mar 23 2024 CoprDistGit - 0.50.0-1 - automatic import of trivy * Sat Mar 23 2024 CoprDistGit - 0.49.1-4 - automatic import of trivy * Sat Mar 23 2024 CoprDistGit - 0.49.1-3 - automatic import of trivy * Sat Mar 23 2024 CoprDistGit - 0.49.1-2 - automatic import of trivy * Wed Mar 13 2024 CoprDistGit - 0.49.1-1 - automatic import of trivy ## END: Generated by rpmautospec