Spec URL: https://sergiomb.fedorapeople.org/golang-github-containerd-cgroups-3/golang-github-containerd-cgroups-3.spec SRPM URL: https://sergiomb.fedorapeople.org/golang-github-containerd-cgroups-3/golang-github-containerd-cgroups-3-3.0.1-1.fc39.src.rpm Description: Go package for creating, managing, inspecting, and destroying cgroups. Fedora Account System Username: sergiomb
This package built on koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=100241683
> Epoch: 1 Why epoch is needed for this new package? > Release: 3%{?dist} Why it doesn't start from 1? But also, why are you not using %autorelease? > %build > mkdir v3 > mv cmd/go.mod cmd/go.sum v3 > for cmd in cmd/* ; do > %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd > done (...) > install -m 0755 -vd %{buildroot}%{_bindir} > install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ Is the cmd useful?
(In reply to Mikel Olasagasti Uranga from comment #2) > > Epoch: 1 > > Why epoch is needed for this new package? > because golang-github-containerd-cgroups also have epoch = 1 and golang-github-containerd-cgroups-3 need be bigger than golang-github-containerd-cgroups > > Release: 3%{?dist} > > Why it doesn't start from 1? > > But also, why are you not using %autorelease? > fixed > > %build > > mkdir v3 > > mv cmd/go.mod cmd/go.sum v3 > > for cmd in cmd/* ; do > > %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd > > done > (...) > > install -m 0755 -vd %{buildroot}%{_bindir} > > install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ > > Is the cmd useful? if we can build it and provides the binary /usr/bin/cgctl , why not ? golang-github-containerd-cgroups doesn't provides it, but we need a trick to build it, we need to move cmd/go.mod cmd/go.sum away from the directory cmd [1] [1] mkdir v3 mv cmd/go.mod cmd/go.sum v3
>> Why epoch is needed for this new package? > because golang-github-containerd-cgroups also have epoch = 1 and golang-github-containerd-cgroups-3 need be bigger than golang-github-containerd-cgroups In the case of `golang-github-containerd-cgroups` it is required because a newer version was pushed and then restored the old one. For `golang-github-containerd-cgroups-3`, the package name is different (has the -3) and goipath is also different. I don't see it as required. > %global goipathsex0 github.com/containerd/cgroups/v3/cmd Why is this one required? Builds fine for me without it. > # Needs special permissions for cgroupsv2 > %bcond_with check Skip those tests failing, not all the tests. You can check how `doctl.spec` does for example to skip just some tests. > RPM build warnings: > File listed twice: /usr/share/doc/golang-github-containerd-cgroups-3/metrics.pb.txt > File listed twice: /usr/share/doc/golang-github-containerd-cgroups-3-devel/metrics.pb.txt You can check how to fix this one using `golang-github-cloudflare-circl.spec` LICENSE rename as example.
- I removed the Epoch - enabled teste and removed "TestCgroupv2CpuStats" "TestSystemdCgroupCpuController" "TestSystemdCgroupCpuController_NilWeight" "TestEventChanCleanupOnCgroupRemoval"\ "TestCgroupv2MemoryStats" "TestSystemdCgroupMemoryController" "TestCgroupv2PidsStats" "TestSystemdCgroupPidsController" "TestKill" because needs special permissions - Fixed the File listed twice like was in golang-github-cloudflare-circl.spec about goipathsex0 in golang channel me and gotmax23 talk: sergiomb: the problem of golang-github-containerd-cgroups-3 is have cmd/go.mod cmd/go.sum which aren't meant to bulld mkdir v3 mv cmd/go.mod cmd/go.sum v3 seems thats fixes the problem gotmax23G :That won't work either sergiomb: can you explain ? where it will fail gotmax23: The cmd directory needs to be outside of the v3 directory. (later) gotmax23: Hmm, it might be possible to regenerate a clean specfile with go2rpm --forge https://github.com/containerd/cgroups github.com/containerd/cgroups/v3 and then add %global goipathsex0 github.com/containerd/cgroups/v3/cmd right under %gometa. (later) sergiomb: after %gometa %global goipathsex0 github.com/containerd/cgroups/v3/cmd makes disappear cmd at all gotmax23: That's the point. Since no other package should depend on the cmd module, it might be best to just exclude it rather than install it at the wrong location. new spec and src.rpm uploaded
I have my own SPEC going on in #2229425. Anyhow - Bump to 3.0.2 - Are these files needed? For what purpose are they in docs? cgroup2-stats-metrics.pb.txt cgroup1-stats-metrics.pb.txt - What is the purpose of: mkdir v3 mv cmd/go.mod cmd/go.sum v3 Just do: %build %gobuild -o %{gobuilddir}/bin/cgctl %{goipath}/cmd/cgctl - Format this: for test in "TestCgroupv2CpuStats" \ "TestSystemdCgroupCpuController" \ "TestSystemdCgroupCpuController_NilWeight" \ "TestEventChanCleanupOnCgroupRemoval" \ "TestCgroupv2MemoryStats" \ "TestSystemdCgroupMemoryController" \ "TestCgroupv2PidsStats" \ "TestSystemdCgroupPidsController" \ "TestKill" \ "TestMoveTo" ; do awk -i inplace '/^func.*'"$test"'\(/ { print; print "\tt.Skip(\"disabled failing test\")"; next}1' $(grep -rl $test) done - Don't glob the binary directory: %files %license LICENSE %doc README.md %{_bindir}/cgctl - > sergiomb: the problem of golang-github-containerd-cgroups-3 is have cmd/go.mod cmd/go.sum which aren't meant to bulld This is really not needed, Fedora Go macros don't use Go modules. You can remove it. Please update the SPEC and we'll get back to it.
*** Bug 2229425 has been marked as a duplicate of this bug. ***
Hi, Eclipseo Sorry, this week I'm on holidays , just Monday or Tuesday I will do something > - What is the purpose of: > > mkdir v3 > mv cmd/go.mod cmd/go.sum v3 the reason of the mv is because .goipath file will conflict with golang-github-containerd-cgroups package i.e. you couldn't install golang-github-containerd-cgroups-3-devel and golang-github-containerd-cgroups-devel in buildroot at same time. Now .goipath is in v3 dir [1] IIRC About the others question I agree with the solutions , I will update the spec ASAP Thank you [1] /usr/share/gocode/src/github.com/containerd/cgroups/v3/.goipath
> the reason of the mv is because .goipath file will conflict with golang-github-containerd-cgroups package i.e. you couldn't install golang-github-containerd-cgroups-3-devel and golang-github-containerd-cgroups-devel in buildroot at same time. Now .goipath is in v3 dir [1] IIRC This is not the case. .goipath will always install at the root of the import path defined by goipath: dnf repoquery -l ./golang-github-containerd-cgroups-3-devel-3.0.1-1.fc40.noarch.rpm 0s fish Last metadata expiration check: 0:14:30 ago on dim. 20 août 2023 07:43:53. /usr/share/doc/golang-github-containerd-cgroups-3-devel /usr/share/doc/golang-github-containerd-cgroups-3-devel/README.md /usr/share/gocode/src/github.com /usr/share/gocode/src/github.com/containerd /usr/share/gocode/src/github.com/containerd/cgroups /usr/share/gocode/src/github.com/containerd/cgroups/v3 /usr/share/gocode/src/github.com/containerd/cgroups/v3/.goipath /usr/share/gocode/src/github.com/containerd/cgroups/v3/README.md /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1 /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/blkio.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/blkio_test.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/cgroup.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/cgroup_test.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/control.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/cpu.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/cpuacct.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/cpuacct_test.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/cpuset.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/devices.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/errors.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/freezer.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/hierarchy.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/hugetlb.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/memory.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/memory_test.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/mock_test.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/named.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/named_test.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/net_cls.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/net_prio.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/opts.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/paths.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/paths_test.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/perf_event.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/pids.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/pids_test.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/rdma.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/state.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/stats /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/stats/doc.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/stats/metrics.pb.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/stats/metrics.proto /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/subsystem.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/systemd.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/testutil_test.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/ticks.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/utils.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup1/v1.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2 /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/cpu.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/cpuv2_test.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/devicefilter.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/devicefilter_test.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/ebpf.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/errors.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/hugetlb.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/hugetlbv2_test.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/io.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/iov2_test.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/manager.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/manager_test.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/memory.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/memoryv2_test.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/paths.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/paths_test.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/pids.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/pidsv2_test.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/rdma.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/state.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/stats /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/stats/doc.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/stats/metrics.pb.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/stats/metrics.proto /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/testutils_test.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/utils.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/cgroup2/utils_test.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/go.mod /usr/share/gocode/src/github.com/containerd/cgroups/v3/utils.go /usr/share/gocode/src/github.com/containerd/cgroups/v3/utils_test.go /usr/share/licenses/golang-github-containerd-cgroups-3-devel /usr/share/licenses/golang-github-containerd-cgroups-3-devel/LICENSE So you don't need this. There will be no conflict.
Updated Spec URL: https://sergiomb.fedorapeople.org/golang-github-containerd-cgroups-3/golang-github-containerd-cgroups-3.spec SRPM URL: https://sergiomb.fedorapeople.org/golang-github-containerd-cgroups-3/golang-github-containerd-cgroups-3-3.0.2-1.fc40.src.rpm Description: Go package for creating, managing, inspecting, and destroying cgroups. Fedora Account System Username: sergiomb
Created attachment 1984264 [details] The .spec file difference from Copr build 5836495 to 6321210
- License ok - Latest version packaged - Builds in mock - Checks pass - No rpmlint errors - Conforms to Go Packaging Guidelines Package approved. Please: - add commit rights to go-sig after requesting the repo - add the package to Koschei in the go-sig group on all branches you are building - add the package to release-monitoring.org even if it does not release version
The Pagure repository was created at https://src.fedoraproject.org/rpms/golang-github-containerd-cgroups-3
thank you