## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## 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.17.1 %bcond check 1 # https://github.com/securego/gosec %global goipath github.com/securego/gosec/v2 Version: 2.22.7 %gometa -L -f Name: gosec Release: %autorelease Summary: Go security checker # Generated by go-vendor-tools License: Apache-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml BuildRequires: go-vendor-tools %description Go security checker. %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %autopatch -p1 %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %global gomodulesmode GO111MODULE=on export GO_LDFLAGS="-X main.Version=v%{version} \ -X main.GitTag=v%{version} \ -X main.BuildDate=$(date -d "@${SOURCE_DATE_EPOCH}" +%Y-%m-%d)" %gobuild -o %{gobuilddir}/bin/gosec ./cmd/gosec %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %check %go_vendor_license_check -c %{S:2} %if %{with check} SAVEIFS=$IFS IFS=$(echo -en "\n") for test in "should detect command execution" \ "should detect weak crypto algorithms" \ "should detect blocklisted imports - MD4" \ "should detect blocklisted imports - RIPEMD160" \ ; do awk -i inplace '/It\("'$test'"/ { print; print "\t\t\t\tSkip(\"disabled failing test\")"; next}1' $(grep -rl $test) done IFS=$SAVEIFS %gotest ./... %endif %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc CONTRIBUTING.md README.md RULES.md USERS.md %{_bindir}/gosec %changelog ## START: Generated by rpmautospec * Fri Aug 15 2025 Maxwell G - 2.22.7-2 - Rebuild for golang-1.25.0 * Mon Jul 28 2025 Mikel Olasagasti Uranga - 2.22.7-1 - Initial package - Closes rhbz#2337048 ## END: Generated by rpmautospec