# Generated by go2rpm 1.17.1.post0 %bcond check 1 # https://github.com/opencontainers/runc %global goipath github.com/opencontainers/runc Version: 1.4.0~rc.1 %global tag v%{gsub %{version} ~ -} %gometa -L -f Name: runc Release: %autorelease Summary: CLI tool for spawning and running containers according to the OCI specification # Generated by go-vendor-tools License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml BuildRequires: go-vendor-tools BuildRequires: go-md2man BuildRequires: pkgconfig(libseccomp) Provides: oci-runtime Recommends: container-selinux >= 2:2.85-1 %ifnarch s390x Recommends: criu %endif %description CLI tool for spawning and running containers according to the OCI specification. %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %autopatch -p1 # correct completions path sed -i '/\#\!\/bin\/bash/d' contrib/completions/bash/%{name} %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %global gomodulesmode GO111MODULE=on export GO_BUILDTAGS="seccomp urfave_cli_no_docs" %gobuild -o %{gobuilddir}/bin/runc %{goipath} # generate man files man/md2man-all.sh %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ # install man pages install -d -p %{buildroot}%{_mandir}/man8 install -m 0644 -vp man/man8/*.8 %{buildroot}%{_mandir}/man8/. # install bash completion install -m 0755 -vd %{buildroot}/%{bash_completions_dir} install -m 0644 -vp contrib/completions/bash/%{name} %{buildroot}/%{bash_completions_dir} %check %go_vendor_license_check -c %{S:2} %if %{with check} # libcontainer/integration and libcontainer/nsenter integration tests # need network access not supported in rpm generation %gocheck -t libcontainer/integration -t libcontainer/nsenter %endif %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc docs CHANGELOG.md CONTRIBUTING.md EMERITUS.md MAINTAINERS_GUIDE.md %doc PRINCIPLES.md README.md RELEASES.md SECURITY.md %{_mandir}/man8/%{name}* %{bash_completions_dir}/%{name} %{_bindir}/runc %changelog %autochangelog