1
0
forked from pool/trivy

Accepting request 844854 from devel:kubic

- revert _service and build changes in last update to use
  the proper macros
- set VERSION parameter properly (jsc#CAPS-105)
- remove update-end-of-life-dates.patch

- Require golang >= 1.15 to fix EINTR read issues (jsc#CAPS-170)

- add update-end-of-life-dates.patch

OBS-URL: https://build.opensuse.org/request/show/844854
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/trivy?expand=0&rev=3
This commit is contained in:
Dominique Leuenberger 2020-10-29 13:52:19 +00:00 committed by Git OBS Bridge
parent 3ed020cb93
commit 584b539d07
5 changed files with 38 additions and 17 deletions

View File

@ -2,8 +2,9 @@
<service name="tar_scm" mode="disabled">
<param name="url">https://github.com/aquasecurity/trivy</param>
<param name="scm">git</param>
<param name="versionformat">0.12.0</param>
<param name="revision">v0.12.0</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">v(.*)</param>
<param name="changesgenerate">enable</param>
</service>
<service name="recompress" mode="disabled">

4
_servicedata Normal file
View File

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

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Wed Oct 28 12:47:30 UTC 2020 - Dirk Mueller <dmueller@suse.com>
- revert _service and build changes in last update to use
the proper macros
- set VERSION parameter properly (jsc#CAPS-105)
- remove update-end-of-life-dates.patch
-------------------------------------------------------------------
Thu Oct 22 14:20:24 UTC 2020 - Stefan Nica <snica@suse.com>
- Require golang >= 1.15 to fix EINTR read issues (jsc#CAPS-170)
-------------------------------------------------------------------
Thu Oct 22 13:16:40 UTC 2020 - Dirk Mueller <dmueller@suse.com>
- add update-end-of-life-dates.patch
-------------------------------------------------------------------
Tue Oct 20 13:13:39 UTC 2020 - msabate@suse.com

View File

@ -16,6 +16,8 @@
#
# nodebuginfo
%global goipath github.com/aquasecurity/trivy
Name: trivy
Version: 0.12.0
Release: 0
@ -26,12 +28,9 @@ URL: https://github.com/aquasecurity/trivy
Source: %{name}-%{version}.tar.gz
Source1: vendor.tar.gz
BuildRequires: golang-packaging
BuildRequires: golang(API) = 1.13
# As specified in their documentation. The version of these packages doesn't
# seem to matter too much.
Requires: git-core
BuildRequires: golang(API) >= 1.15
Requires: ca-certificates
Requires: git-core
Requires: rpm
%{go_nostrip}
@ -46,19 +45,18 @@ scan. All you need to do for scanning is to specify a target such as an image
name of the container.
%prep
%setup -q -a1
# Even though this is a bit ugly because it falls outside of the scope of the
# original intent of the `LDFLAGS` variable, it's useful to do it once just so
# we don't have to patch both `build` and `install`.
sed -i -e 's|LDFLAGS=|LDFLAGS=-buildmode=pie -mod vendor |g' Makefile
%setup -qa1
%autopatch -p1
%build
make build VERSION=%{version}
%goprep %{goipath}
export CGO_ENABLED=0
%gobuild -mod vendor -ldflags "-X=main.version=%{version}" cmd/trivy
%install
make install VERSION=%{version}
install -D -m 0755 ~/go/bin/%{name} "%{buildroot}/%{_bindir}/%{name}"
%goinstall
%files
%license LICENSE

BIN
vendor.tar.gz (Stored with Git LFS)

Binary file not shown.