Fix version number shown for 'trivy -v' #23

Closed
cwh wants to merge 43 commits from (deleted):main into factory
8 changed files with 1008 additions and 18 deletions

View File

@@ -1,4 +0,0 @@
mtime: 1717679875
commit: 579ede4865fcf5783c98eab0446e1c095dd85e84
url: https://src.opensuse.org/dirkmueller/trivy.git
revision: 579ede4865fcf5783c98eab0446e1c095dd85e84

View File

@@ -2,7 +2,7 @@
<service name="tar_scm" mode="manual">
<param name="url">https://github.com/aquasecurity/trivy</param>
<param name="scm">git</param>
<param name="revision">v0.52.0</param>
<param name="revision">v0.66.0</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">v(.*)</param>
<param name="changesgenerate">enable</param>

View File

@@ -1,4 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/aquasecurity/trivy</param>
<param name="changesrevision">c24dfbab68056a42aff9589b024c6f2d067f9f52</param></service></servicedata>
<param name="changesrevision">7bcb181268893fdd69ef4582588c040bb1036c33</param></service></servicedata>

Binary file not shown.

BIN
trivy-0.66.0.tar.zst LFS Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
#
# spec file for package trivy
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: trivy
Version: 0.52.0
Version: 0.66.0
Release: 0
Summary: A Simple and Comprehensive Vulnerability Scanner for Containers
License: Apache-2.0
@@ -25,12 +25,11 @@ Group: System/Management
URL: https://github.com/aquasecurity/trivy
Source: %{name}-%{version}.tar.zst
Source1: vendor.tar.zst
BuildRequires: golang(API) = 1.22
BuildRequires: golang-packaging
BuildRequires: zstd
BuildRequires: golang(API) = 1.24
Requires: ca-certificates
Requires: git-core
Requires: rpm
%description
Trivy (`tri` pronounced like trigger, `vy` pronounced like envy) is a simple and
@@ -43,11 +42,11 @@ scan. All you need to do for scanning is to specify a target such as an image
name of the container.
%prep
%autosetup -p1 -a1
%setup -a1
%build
export CGO_ENABLED=1
go build -o trivy -mod=vendor -buildmode=pie -trimpath -ldflags "-s -w -X=main.version=%{version}" cmd/trivy/main.go
go build -o trivy -mod=vendor -buildmode=pie -trimpath -ldflags "-s -w -X github.com/aquasecurity/trivy/pkg/version/app.ver=%{version}" cmd/trivy/main.go
%install
install -D -m 755 trivy %{buildroot}/%{_bindir}/%{name}

BIN
vendor.tar.zst LFS

Binary file not shown.