golang-github-distribution-3/golang-github-distribution-3.spec
David Abdurachmanov 59bede4986
Increase timeout 10m -> 30m for riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-09-23 09:12:03 +03:00

83 lines
2.1 KiB
RPMSpec

# Generated by go2rpm 1.8.2
%bcond_without check
# https://github.com/distribution/distribution
%global goipath github.com/distribution/distribution/v3
Version: 3.0.0
%global commit 0122d7ddaec0be0f16a788ed7b4130b444c21df1
%gometa
%global common_description %{expand:
The Docker toolset to pack, ship, store, and deliver content.
This repository's main product is the Docker Registry 2.0 implementation for
storing and distributing Docker images. It supersedes the docker/docker-registry
project with a new API design, focused around security and performance.}
%global golicenses LICENSE
%global godocs docs BUILDING.md CONTRIBUTING.md README.md ROADMAP.md
Name: %{goname}
Release: %autorelease -p -e pre1.0.riscv64
Summary: Docker toolkit to pack, ship, store, and deliver container content
License: Apache-2.0
URL: %{gourl}
Source: %{gosource}
%description %{common_description}
%gopkg
%prep
%goprep
%generate_buildrequires
%go_generate_buildrequires
%build
for cmd in cmd/* ; do
%gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
done
%install
%gopkginstall
install -m 0755 -vd %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
%if %{with check}
%check
%ifarch riscv64
%global gotestflags %{gotestflags} -timeout 30m
%endif
for test in "TestHTTPChecker" \
"TestFileReaderSeek" \
"TestListObjectsV2" \
"TestGracefulShutdown" \
; do
awk -i inplace '/^func.*'"$test"'\(/ { print; print "\tt.Skip(\"disabled failing test\")"; next}1' $(grep -rl $test)
done
%if 0%{?__isa_bits} == 32
%gocheck -d registry/storage/driver/inmemory \
-d registry/handlers \
-d registry/storage/driver/swift \
-d registry/storage/driver/filesystem
%else
%gocheck -d registry/storage/driver/inmemory \
-d registry/handlers
%endif
%endif
%files
%license LICENSE
%doc docs BUILDING.md CONTRIBUTING.md README.md ROADMAP.md
%{_bindir}/digest
%{_bindir}/registry-api-descriptor-template
%{_bindir}/registry
%gopkgfiles
%changelog
%autochangelog