Skip to content

Commit

Permalink
runc: add copyright and CI scripts
Browse files Browse the repository at this point in the history
Signed-off-by: Abel Feng <[email protected]>
  • Loading branch information
abel-von committed Dec 7, 2023
1 parent b5b6b54 commit 121951d
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
checks:
strategy:
matrix:
directories: [vmm/sandbox, vmm/task, shim, quark]
directories: [vmm/sandbox, vmm/task, shim, quark, runc]
features: [--all-features]
include:
- directories: wasm
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
tests:
strategy:
matrix:
directories: [vmm/sandbox, vmm/task, shim, quark]
directories: [vmm/sandbox, vmm/task, shim, quark, runc]
features: [--all-features]
include:
- directories: wasm
Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,13 @@ bin/quark-sandboxer:
@cd quark && cargo build --release
@mkdir -p bin && cp quark/target/release/quark-sandboxer bin/quark-sandboxer

bin/runc-sandboxer:
@cd runc && cargo build --release
@mkdir -p bin && cp runc/target/release/runc-sandboxer bin/runc-sandboxer

wasm: bin/wasm-sandboxer
quark: bin/quark-sandboxer
runc: bin/runc-sandboxer

ifeq ($(HYPERVISOR), stratovirt)
vmm: bin/vmm-sandboxer bin/kuasar.initrd bin/vmlinux.bin
Expand All @@ -57,6 +62,7 @@ clean:
@cd vmm/task && cargo clean
@cd wasm && cargo clean
@cd quark && cargo clean
@cd runc && cargo clean

install-vmm:
@install -d -m 750 ${DEST_DIR}${BIN_DIR}
Expand All @@ -82,4 +88,7 @@ install-wasm:
install-quark:
@install -p -m 550 bin/quark-sandboxer ${DEST_DIR}${BIN_DIR}/quark-sandboxer

install: all install-vmm install-wasm install-quark
install-runc:
@install -p -m 550 bin/runc-sandboxer ${DEST_DIR}${BIN_DIR}/runc-sandboxer

install: all install-vmm install-wasm install-quark install-runc
20 changes: 10 additions & 10 deletions runc/src/common.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/*
Copyright The containerd Authors.
Copyright 2022 The Kuasar Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

use std::{io::IoSliceMut, ops::Deref, os::unix::io::RawFd, path::Path, sync::Arc};
Expand Down
17 changes: 17 additions & 0 deletions runc/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
Copyright 2022 The Kuasar Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/


use std::ffi::CString;
use std::os::fd::RawFd;
use std::process::exit;
Expand Down
16 changes: 16 additions & 0 deletions runc/src/sandbox.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
Copyright 2022 The Kuasar Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

use std::collections::HashMap;
use std::io::Write;
use std::os::fd::RawFd;
Expand Down
16 changes: 16 additions & 0 deletions runc/src/task.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
Copyright 2022 The Kuasar Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

use std::os::fd::{AsRawFd, RawFd};
use std::os::unix::net::UnixListener;
use std::process::exit;
Expand Down

0 comments on commit 121951d

Please sign in to comment.