Accepting request 974534 from home:ph03nix
* Use build-linux target on x86_64 to include git tag and version (for `gosec -version`) * Add additional build check OBS-URL: https://build.opensuse.org/request/show/974534 OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/gosec?expand=0&rev=5
This commit is contained in:
parent
66481f311e
commit
d26a470ef6
4
_service
4
_service
@ -12,5 +12,7 @@
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">gz</param>
|
||||
</service>
|
||||
<service name="go_modules" mode="disabled"/>
|
||||
<service name="go_modules" mode="disabled">
|
||||
<param name="compression">gz</param>
|
||||
</service>
|
||||
</services>
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:24b1dfc49d9c1fc24b6d7d5e49ce55e6512e8bbcb1d2391d6b7bc009f7b3ae3d
|
||||
size 138227
|
12
gosec.spec
12
gosec.spec
@ -25,22 +25,28 @@ URL: https://github.com/securego/gosec
|
||||
Source: gosec-%{version}.tar.gz
|
||||
Source1: vendor.tar.gz
|
||||
BuildRequires: golang-packaging
|
||||
BuildRequires: go >= 1.11
|
||||
BuildRequires: go >= 1.16
|
||||
%{go_nostrip}
|
||||
|
||||
%description
|
||||
Inspects source code for security problems by scanning the Go AST.
|
||||
Inspects source code for security problems by scanning the go abstract syntax tree.
|
||||
|
||||
%prep
|
||||
%autosetup -D -a 1
|
||||
|
||||
%build
|
||||
# Native linux build includes version tags but currently works only on x86_64
|
||||
%ifarch x86_64
|
||||
GOFLAGS="-buildmode=pie" make build-linux
|
||||
%else
|
||||
GOFLAGS="-buildmode=pie" make build
|
||||
%endif
|
||||
|
||||
%check
|
||||
# check if binary is working
|
||||
./gosec --version
|
||||
## this check is not yet working due to missing dependencies
|
||||
make sec
|
||||
# Not yet working because it wants to pull the latest ginkgo version from GitHub
|
||||
#make test
|
||||
|
||||
%install
|
||||
|
Loading…
x
Reference in New Issue
Block a user