Skip to content

Commit 3754f60

Browse files
committed
[ws -daemon] libcontainer imports: fix license
1 parent 26d3b23 commit 3754f60

File tree

8 files changed

+89
-23
lines changed

8 files changed

+89
-23
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Why this package exists
2+
3+
The only reason this package exists is because libcontainer decided to privatize some functions we depend on: https://github.com/opencontainers/runc/commit/47e09976a3159a8e2bf6160e7e0aedcfeadb5cfe. Mostly - but not exclusively - for the fuse support.
4+
5+
6+
When we upgraded, we had the option to a) drop support of the importing pieces, b) do a bigger rewrite or c) just internalize the code.
7+
8+
Source copied from: https://github.com/opencontainers/runc/blob/e0406b4ba62071d40f1eaa443945764e0ef56c41/libcontainer/cgroups/devices/devicefilter.go etc.
9+
10+
11+
So if at some point we decide to get rid of the fuse support, it's worth checking what exactly we still need out of this.

components/ws-daemon/pkg/libcontainer/devicefilter/devicefilter.go

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
// Copyright (c) 2025 Gitpod GmbH. All rights reserved.
2-
// Licensed under the GNU Affero General Public License (AGPL).
3-
// See License.AGPL.txt in the project root for license information.
1+
// Copyright The libcontainer authors
2+
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
414

5-
// Copied from https://github.com/opencontainers/runc/blob/e0406b4ba62071d40f1eaa443945764e0ef56c41/libcontainer/cgroups/devices/devicefilter.go
6-
//
715
// Implements creation of eBPF device filter program.
816
//
917
// Based on https://github.com/containers/crun/blob/0.10.2/src/libcrun/ebpf.c

components/ws-daemon/pkg/libcontainer/devicefilter/devices_emulator.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// Copied from https://github.com/opencontainers/runc/blob/47e09976a3159a8e2bf6160e7e0aedcfeadb5cfe/libcontainer/cgroups/devices/devices_emulator.go
2-
//
31
// SPDX-License-Identifier: Apache-2.0
42
/*
53
* Copyright (C) 2020 Aleksa Sarai <[email protected]>

components/ws-daemon/pkg/libcontainer/devicefilter/ebpf_linux.go

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1-
// Copyright (c) 2025 Gitpod GmbH. All rights reserved.
2-
// Licensed under the GNU Affero General Public License (AGPL).
3-
// See License.AGPL.txt in the project root for license information.
1+
// Copyright The libcontainer authors
2+
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
414

5-
// Copied from https://github.com/opencontainers/runc/blob/c0044c7aa403ecf2d9172bd9386d05433b011076/libcontainer/cgroups/devices/ebpf_linux.go
615
package devicefilter
716

817
import (

components/ws-daemon/pkg/libcontainer/devices/device.go

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1-
// Copyright (c) 2025 Gitpod GmbH. All rights reserved.
2-
// Licensed under the GNU Affero General Public License (AGPL).
3-
// See License.AGPL.txt in the project root for license information.
1+
// Copyright The libcontainer authors
2+
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
414

515
package devices
616

components/ws-daemon/pkg/libcontainer/devices/device_unix.go

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1-
// Copyright (c) 2025 Gitpod GmbH. All rights reserved.
2-
// Licensed under the GNU Affero General Public License (AGPL).
3-
// See License.AGPL.txt in the project root for license information.
1+
// Copyright The libcontainer authors
2+
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
414

515
//go:build !windows
616

components/ws-daemon/pkg/libcontainer/specconv/example.go

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1-
// Copyright (c) 2025 Gitpod GmbH. All rights reserved.
2-
// Licensed under the GNU Affero General Public License (AGPL).
3-
// See License.AGPL.txt in the project root for license information.
1+
// Copyright The libcontainer authors
2+
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
414

515
package specconv
616

components/ws-daemon/pkg/libcontainer/specconv/spec_linux.go

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1-
// Copyright (c) 2025 Gitpod GmbH. All rights reserved.
2-
// Licensed under the GNU Affero General Public License (AGPL).
3-
// See License.AGPL.txt in the project root for license information.
1+
// Copyright The libcontainer authors
2+
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
414

515
package specconv
616

0 commit comments

Comments
 (0)