# Generated by go2rpm 1.9.0 %bcond_without check # https://github.com/containerd/cgroups %global goipath github.com/containerd/cgroups/v3 %global forgeurl https://github.com/containerd/cgroups Version: 3.0.2 %gometa %global common_description %{expand: Go package for creating, managing, inspecting, and destroying cgroups.} %global golicenses LICENSE %global godocs README.md Name: %{goname} Release: %autorelease Summary: Cgroups package for Go License: Apache-2.0 URL: %{gourl} Source: %{gosource} # Remove in F43 Provides: golang-github-containerd-cgroups-3 = %{version}-%{release} Obsoletes: golang-github-containerd-cgroups-3 < 3.0.2-2 %global godevelheader %{expand: Provides: golang-github-containerd-cgroups-3-devel = %{version}-%{release} Obsoletes: golang-github-containerd-cgroups-3-devel < 3.0.2-2} %description %{common_description} %gopkg %prep %goprep %autopatch -p1 %generate_buildrequires %go_generate_buildrequires %build %gobuild -o %{gobuilddir}/bin/cgctl %{goipath}/cmd/cgctl %install %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %if %{with check} %check # Needs special permissions for cgroupsv2 for test in "TestCgroupv2CpuStats" "TestSystemdCgroupCpuController" "TestSystemdCgroupCpuController_NilWeight" "TestEventChanCleanupOnCgroupRemoval"\ "TestCgroupv2MemoryStats" "TestSystemdCgroupMemoryController" "TestCgroupv2PidsStats" "TestSystemdCgroupPidsController" "TestKill" \ "TestMoveTo" "TestCgroupType"; do awk -i inplace '/^func.*'"$test"'\(/ { print; print "\tt.Skip(\"disabled failing test\")"; next}1' $(grep -rl $test) done %gocheck %endif %files %license LICENSE %doc README.md %{_bindir}/cgctl %gopkgfiles %changelog %autochangelog