Package trivy: Specfile

%global import_path
%global _unpackaged_files_terminate_build 1

Name: trivy
Version: 0.36.1
Release: alt2
Summary: A Fast Vulnerability Scanner for Containers

Group: Monitoring
License: Apache-2.0
Url: https://%import_path
Source: %name-%version.tar

ExclusiveArch:  %go_arches
BuildRequires(pre): rpm-build-golang wire
BuildRequires: /proc

Trivy (pronunciation) is a comprehensive and versatile security scanner.
Trivy has scanners that look for security issues, and targets where it can
find those issues.

Targets (what Trivy can scan):
* Container Image
* Filesystem
* Git Repository (remote)
* Virtual Machine Image
* Kubernetes

Scanners (what Trivy can find there):
* OS packages and software dependencies in use (SBOM)
* Known vulnerabilities (CVEs)
* IaC issues and misconfigurations
* Sensitive information and secrets
* Software licenses

%setup -q

export BUILDDIR="$PWD/.gopath"
export IMPORT_PATH="%import_path"
export GOPATH="$BUILDDIR:%go_path"
export GOFLAGS="-mod=vendor"
export LDFLAGS="-s -w -X=main.version=%version"

wire gen pkg/commands/... pkg/rpc/...
%golang_build cmd/trivy

export BUILDDIR="$PWD/.gopath"
rm -rf -- %buildroot%_datadir
rm -rf -- %buildroot%go_root


* Wed Jan 25 2023 Alexey Shabalin <> 0.36.1-alt2
- Added basic ALT support.

* Tue Jan 17 2023 Alexey Shabalin <> 0.36.1-alt1
- Initial build for ALT.