# Generated by go2rpm 1.19.0 %bcond check 1 # https://github.com/containerd/nerdctl %global goipath github.com/containerd/nerdctl/v2 Version: 2.4.2 %gometa -L -f Name: nerdctl Release: %autorelease Summary: ContaiNERD CTL - Docker-compatible CLI for containerd # Generated by go-vendor-tools License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND LicenseRef-scancode-warranty-disclaimer AND MIT AND MPL-2.0 AND (Apache-2.0 OR MIT) URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml # temporary ppc64le golang-x-sys patch Patch0: golang-x-sys-ppc64.patch BuildRequires: go-vendor-tools BuildRequires: iptables Requires: containernetworking-plugins Requires: docker-buildkit Requires: docker-compose Requires: rootlesskit %description ContaiNERD CTL - Docker-compatible CLI for containerd, with support for Compose, Rootless, eStargz, OCIcrypt, IPFS, ... %prep %goprep -A tar -xf %{S:1} # temporary ppc64le golang-x-sys patch pushd vendor/golang.org/x/sys %patch -p1 0 popd %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %global gomodulesmode GO111MODULE=on # disable default fedora version flags %global currentgoldflags %{nil} export GO_LDFLAGS=" -X %{goipath}/pkg/version.Version=%{version} -X %{goipath}/pkg/version.Revision=%{release}" %gobuild -o %{gobuilddir}/bin/nerdctl %{goipath}/cmd/nerdctl %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} # replicates test-unit target in makefile # TestGet - trys to access 8.8.8.8 # %%gotest ./pkg/... -skip 'TestGet' %global test_ignores %{shrink: %dnl trys to acces 8.8.8.8 -s "TestGet" %dnl failed expression is false %[ "%{_arch}" == "s390x" ? "-s TestParseTCP" : "" ] %[ "%{_arch}" == "s390x" ? "-s TestParseTCP6" : "" ] -s "TestGenCSRConfig" } %gocheck2 -F %{test_ignores} ./pkg/... %endif %files -f %{go_vendor_license_filelist} %doc docs examples BUILDING.md EMERITUS.md MAINTAINERS_GUIDE.md README.md %doc SECURITY.md %{_bindir}/nerdctl %changelog %autochangelog