Skip to content

Commit 92e997a

Browse files
committed
Switch to opencontainers/cgroups
This removes libcontainer/cgroups packages and starts using those from github.com/opencontainers/cgroups repo. Mostly generated by: git rm -f libcontainer/cgroups find . -type f -name "*.go" -exec sed -i \ 's|github.com/opencontainers/runc/libcontainer/cgroups|github.com/opencontainers/cgroups|g' \ {} + make vendor gofumpt -w . Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
1 parent e0e22d3 commit 92e997a

File tree

136 files changed

+710
-6724
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+710
-6724
lines changed

events.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
"sync"
99
"time"
1010

11+
"github.com/opencontainers/cgroups"
1112
"github.com/opencontainers/runc/libcontainer"
12-
"github.com/opencontainers/runc/libcontainer/cgroups"
1313
"github.com/opencontainers/runc/libcontainer/intelrdt"
1414
"github.com/opencontainers/runc/types"
1515

go.mod

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ go 1.23.0
44

55
require (
66
github.com/checkpoint-restore/go-criu/v6 v6.3.0
7-
github.com/cilium/ebpf v0.17.3
87
github.com/containerd/console v1.0.4
98
github.com/coreos/go-systemd/v22 v22.5.0
109
github.com/cyphar/filepath-securejoin v0.4.1
@@ -15,6 +14,7 @@ require (
1514
github.com/moby/sys/user v0.3.0
1615
github.com/moby/sys/userns v0.1.0
1716
github.com/mrunalp/fileutils v0.5.1
17+
github.com/opencontainers/cgroups v0.0.0-00010101000000-000000000000
1818
github.com/opencontainers/runtime-spec v1.2.0
1919
github.com/opencontainers/selinux v1.11.1
2020
github.com/seccomp/libseccomp-golang v0.10.0
@@ -34,7 +34,10 @@ exclude (
3434
)
3535

3636
require (
37+
github.com/cilium/ebpf v0.17.3 // indirect
3738
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
3839
github.com/russross/blackfriday/v2 v2.1.0 // indirect
3940
github.com/vishvananda/netns v0.0.4 // indirect
4041
)
42+
43+
replace github.com/opencontainers/cgroups => github.com/kolyshkin/oc-cgroups v0.0.0-20250226011550-574c6e451b64

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ github.com/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtL
3131
github.com/josharian/native v1.1.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w=
3232
github.com/jsimonetti/rtnetlink/v2 v2.0.1 h1:xda7qaHDSVOsADNouv7ukSuicKZO7GgVUCXxpaIEIlM=
3333
github.com/jsimonetti/rtnetlink/v2 v2.0.1/go.mod h1:7MoNYNbb3UaDHtF8udiJo/RH6VsTKP1pqKLUTVCvToE=
34+
github.com/kolyshkin/oc-cgroups v0.0.0-20250226011550-574c6e451b64 h1:ss1jmfqdpwMPhr+aqS9AaAxid6kZ5RTWNub7wJGb/Sw=
35+
github.com/kolyshkin/oc-cgroups v0.0.0-20250226011550-574c6e451b64/go.mod h1:s8lktyhlGUqM7OSRL5P7eAW6Wb+kWPNvt4qvVfzA5vs=
3436
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
3537
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
3638
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=

libcontainer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ this package into your code:
3636

3737
```go
3838
import (
39-
_ "github.com/opencontainers/runc/libcontainer/cgroups/devices"
39+
_ "github.com/opencontainers/cgroups/devices"
4040
)
4141
```
4242

libcontainer/cgroups/cgroups_test.go

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)