diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index 5a73c8f7f..bb18fe39e 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -16,7 +16,7 @@ jobs: outputs: any_modified: ${{ steps.filter.outputs.any_modified }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: tj-actions/changed-files@v41 id: filter with: @@ -40,7 +40,7 @@ jobs: arch: [ "x86_64", "aarch64" ] libc: [ "gnu", "musl" ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Rust toolchain and cache uses: actions-rust-lang/setup-rust-toolchain@v1 with: @@ -70,7 +70,7 @@ jobs: arch: [ "x86_64" ] libc: [ "gnu", "musl" ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Rust toolchain and cache uses: actions-rust-lang/setup-rust-toolchain@v1 - name: Install just @@ -86,31 +86,34 @@ jobs: - name: Run feature tests run: just test-features - coverage: - needs: [changes] - if: needs.changes.outputs.any_modified == 'true' - runs-on: ubuntu-22.04 - timeout-minutes: 20 - name: Run test coverage - steps: - - uses: actions/checkout@v3 - - name: Setup Rust toolchain and cache - uses: actions-rust-lang/setup-rust-toolchain@v1.3.7 - - name: Install llvm-tools-preview - run: rustup component add llvm-tools-preview - - name: install cargo-llvm-cov - uses: taiki-e/install-action@v1 - with: - tool: cargo-llvm-cov@0.4.0 - - uses: taiki-e/install-action@just - - name: Install requirements - run: sudo env PATH=$PATH just ci-prepare - - name: Run Test Coverage for youki - run: | - cargo llvm-cov clean --workspace - cargo llvm-cov --no-report -- --test-threads=1 - cargo llvm-cov --no-run --lcov --output-path ./coverage.lcov - - name: Upload Youki Code Coverage Results - uses: codecov/codecov-action@v3 - with: - file: ./coverage.lcov + # We do not yet enforce some minimum coverage, and there were come codecov issues + # so commenting this out for now. When we are ready to enforce coverage, uncomment + # and check this works or not. + # coverage: + # needs: [changes] + # if: needs.changes.outputs.any_modified == 'true' + # runs-on: ubuntu-22.04 + # timeout-minutes: 20 + # name: Run test coverage + # steps: + # - uses: actions/checkout@v4 + # - name: Setup Rust toolchain and cache + # uses: actions-rust-lang/setup-rust-toolchain@v1.3.7 + # - name: Install llvm-tools-preview + # run: rustup component add llvm-tools-preview + # - name: install cargo-llvm-cov + # uses: taiki-e/install-action@v2 + # with: + # tool: cargo-llvm-cov@0.4.0 + # - uses: taiki-e/install-action@just + # - name: Install requirements + # run: sudo env PATH=$PATH just ci-prepare + # - name: Run Test Coverage for youki + # run: | + # cargo llvm-cov clean --workspace + # cargo llvm-cov --no-report -- --test-threads=1 + # cargo llvm-cov --no-run --lcov --output-path ./coverage.lcov + # - name: Upload Youki Code Coverage Results + # uses: codecov/codecov-action@v4 + # with: + # file: ./coverage.lcov diff --git a/.github/workflows/benchmark_execution_time.yml b/.github/workflows/benchmark_execution_time.yml index 585b655b5..ebeadd728 100644 --- a/.github/workflows/benchmark_execution_time.yml +++ b/.github/workflows/benchmark_execution_time.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Checkout to PR branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install requirements run: sudo ./.github/scripts/dependency.sh @@ -27,7 +27,7 @@ jobs: run: just youki-release - name: Uploading PR build to artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: pr-youki path: ./youki @@ -39,7 +39,7 @@ jobs: steps: - name: Checkout to main branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: main @@ -55,7 +55,7 @@ jobs: run: just youki-release - name: Uploading main build to artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: main-youki path: ./youki @@ -75,16 +75,16 @@ jobs: sudo apt install jq podman - name: Checkout to PR branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Downloading PR build from artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: pr-youki path: ./pr_youki - name: Downloading main build from artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: main-youki path: ./main_youki diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 3bcff1808..ae812e0c1 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -12,7 +12,7 @@ jobs: outputs: dirs: ${{ steps.filter.outputs.changes }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dorny/paths-filter@v2 id: filter with: @@ -26,7 +26,7 @@ jobs: concurrency: group: ${{ github.workflow }}-${{ github.ref }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup mdBook uses: peaceiris/actions-mdbook@v1 with: diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index fb2f3f628..713ab9b6d 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -17,7 +17,7 @@ jobs: arch: [ "x86_64", "aarch64" ] libc: [ "gnu", "musl" ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Rust toolchain and cache uses: actions-rust-lang/setup-rust-toolchain@v1.3.7 env: @@ -34,7 +34,7 @@ jobs: run: just youki-release - name: Upload youki binary if: ${{ matrix.arch == 'x86_64' }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: youki-${{ matrix.arch }}-${{ matrix.libc }} path: youki @@ -48,11 +48,11 @@ jobs: arch: [ "x86_64" ] libc: [ "gnu", "musl" ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: repository: containerd/containerd ref: v1.7.11 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: '1.20.12' cache: true @@ -66,7 +66,7 @@ jobs: ./script/setup/install-cni ./script/setup/install-critools - name: Download youki binary - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: youki-${{ matrix.arch }}-${{ matrix.libc }} - name: Replace runc to youki @@ -87,9 +87,9 @@ jobs: arch: [ "x86_64" ] libc: [ "gnu", "musl" ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download youki binary - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: youki-${{ matrix.arch }}-${{ matrix.libc }} - name: Add the permission to run @@ -108,20 +108,20 @@ jobs: arch: [ "x86_64" ] libc: [ "gnu", "musl" ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Setup Rust toolchain and cache uses: actions-rust-lang/setup-rust-toolchain@v1 - name: Install just uses: taiki-e/install-action@just - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: '1.20' cache: true cache-dependency-path: tests/oci-runtime-tests/src/github.com/opencontainers/runtime-tools/go.sum - name: Download youki binary - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: youki-${{ matrix.arch }}-${{ matrix.libc }} - name: Add the permission to run @@ -138,7 +138,7 @@ jobs: arch: [ "x86_64" ] libc: [ "gnu", "musl" ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Setup Rust toolchain and cache @@ -148,7 +148,7 @@ jobs: - name: Install requirements run: sudo env PATH=$PATH just ci-prepare - name: Download youki binary - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: youki-${{ matrix.arch }}-${{ matrix.libc }} - name: Add the permission to run @@ -165,7 +165,7 @@ jobs: arch: [ "x86_64" ] libc: [ "gnu", "musl" ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Setup Rust toolchain and cache @@ -175,7 +175,7 @@ jobs: - name: Install requirements run: sudo env PATH=$PATH just ci-prepare - name: Download youki binary - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: youki-${{ matrix.arch }}-${{ matrix.libc }} - name: Add the permission to run @@ -193,11 +193,11 @@ jobs: # ubuntu 22.04 has cgroups-v2 os: [ "ubuntu-22.04", "ubuntu-20.04" ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install just uses: taiki-e/install-action@just - name: Download youki binary - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: youki-x86_64-musl - name: Add the permission to run diff --git a/.github/workflows/integration_tests_validation.yaml b/.github/workflows/integration_tests_validation.yaml index 88ba697d7..d4d789282 100644 --- a/.github/workflows/integration_tests_validation.yaml +++ b/.github/workflows/integration_tests_validation.yaml @@ -16,7 +16,7 @@ jobs: outputs: any_modified: ${{ steps.filter.outputs.any_modified }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: tj-actions/changed-files@v41 id: filter with: @@ -36,7 +36,7 @@ jobs: runs-on: ubuntu-20.04 timeout-minutes: 30 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Rust toolchain and cache uses: actions-rust-lang/setup-rust-toolchain@v1.3.7 - name: Install just diff --git a/.github/workflows/podman_tests.yaml b/.github/workflows/podman_tests.yaml index 6c13f2661..edded9a86 100644 --- a/.github/workflows/podman_tests.yaml +++ b/.github/workflows/podman_tests.yaml @@ -48,7 +48,7 @@ jobs: # build podman - name: Clone podman repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: containers/podman - name: Build podman diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 384650263..1865cb694 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,7 +26,7 @@ jobs: arch: [ "x86_64", "aarch64" ] libc: [ "gnu", "musl" ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Setup Rust toolchain and cache @@ -53,7 +53,7 @@ jobs: - name: Create artifact run: tar -zcvf youki-${{ needs.parse.outputs.version }}-${{ matrix.arch }}-${{ matrix.libc }}.tar.gz youki README.md LICENSE - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: youki-${{ matrix.arch }}-${{ matrix.libc }} path: youki-${{ needs.parse.outputs.version }}-${{ matrix.arch }}-${{ matrix.libc }}.tar.gz @@ -69,11 +69,11 @@ jobs: - parse - build steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Create artifacts directory run: mkdir -p artifacts - name: Download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: artifacts - name: Show artifacts @@ -98,7 +98,7 @@ jobs: env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Rust toolchain and cache uses: actions-rust-lang/setup-rust-toolchain@v1 - name: Publish libcgroups diff --git a/.github/workflows/tagpr.yaml b/.github/workflows/tagpr.yaml index 58ae64df0..6d4278297 100644 --- a/.github/workflows/tagpr.yaml +++ b/.github/workflows/tagpr.yaml @@ -7,7 +7,7 @@ jobs: tagpr: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: token: ${{ secrets.GITHUB_TOKEN }} - name: Install just @@ -26,4 +26,4 @@ jobs: repo: context.repo.repo, workflow_id: 'release.yaml', ref: "refs/tags/${{ steps.tagpr.outputs.tag }}", - }) \ No newline at end of file + }) diff --git a/.github/workflows/update_version_config.yaml b/.github/workflows/update_version_config.yaml index 6ddb689ae..5a0ce04ce 100644 --- a/.github/workflows/update_version_config.yaml +++ b/.github/workflows/update_version_config.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Update tagpr config diff --git a/Cargo.lock b/Cargo.lock index 75c19de4a..d0aeed770 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -141,9 +141,9 @@ checksum = "70033777eb8b5124a81a1889416543dddef2de240019b674c81285a2635a7e1e" [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "arbitrary" @@ -157,12 +157,6 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" -[[package]] -name = "ascii" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ae7d751998c189c1d4468cf0a39bb2eae052a9c58d50ebb3b9591ee3813ad50" - [[package]] name = "async-trait" version = "0.1.79" @@ -530,12 +524,12 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "combine" -version = "2.5.2" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1645a65a99c7c8d345761f4b75a6ffe5be3b3b27a93ee731fccc5050ba6be97c" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" dependencies = [ - "ascii", - "byteorder", + "bytes", + "memchr", ] [[package]] @@ -1036,11 +1030,11 @@ dependencies = [ [[package]] name = "derive_builder" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0350b5cb0331628a5916d6c5c0b72e97393b8b6b03b47a9284f4e7f5a405ffd7" +checksum = "cd33f37ee6a119146a1781d3356a7c26028f83d779b2e04ecd45fdc75c76877b" dependencies = [ - "derive_builder_macro 0.20.0", + "derive_builder_macro 0.20.1", ] [[package]] @@ -1057,9 +1051,9 @@ dependencies = [ [[package]] name = "derive_builder_core" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48cda787f839151732d396ac69e3473923d54312c070ee21e9effcaa8ca0b1d" +checksum = "7431fa049613920234f22c47fdc33e6cf3ee83067091ea4277a3f8c4587aae38" dependencies = [ "darling 0.20.8", "proc-macro2", @@ -1079,11 +1073,11 @@ dependencies = [ [[package]] name = "derive_builder_macro" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" +checksum = "4abae7035bf79b9877b779505d8cf3749285b80c43941eda66604841889451dc" dependencies = [ - "derive_builder_core 0.20.0", + "derive_builder_core 0.20.1", "syn 2.0.58", ] @@ -2441,7 +2435,7 @@ version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f5a3fe998d50101ae009351fec56d88a69f4ed182e11000e711068c2f5abf72" dependencies = [ - "derive_builder 0.20.0", + "derive_builder 0.20.1", "getset", "once_cell", "quickcheck", @@ -2985,13 +2979,14 @@ dependencies = [ [[package]] name = "rbpf" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b536dc5c7e3a730d06c578a41df1fbcccd66240a7a9bd5f150a0826291f01c66" +checksum = "463d0b79f93dd962cc115e33f11971bf025c85943d726322c812d98c9f8ecb5b" dependencies = [ "byteorder", "combine", "libc", + "log", "time 0.2.27", ] @@ -3430,9 +3425,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] @@ -3460,9 +3455,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", @@ -3471,9 +3466,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.127" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", "memchr", @@ -3953,18 +3948,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", @@ -4397,12 +4392,12 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "vergen" -version = "9.0.0" +version = "9.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c32e7318e93a9ac53693b6caccfb05ff22e04a44c7cf8a279051f24c09da286f" +checksum = "349ed9e45296a581f455bc18039878f409992999bc1d5da12a6800eb18c8752f" dependencies = [ "anyhow", - "derive_builder 0.20.0", + "derive_builder 0.20.1", "rustversion", "time 0.3.36", "vergen-lib", @@ -4410,12 +4405,12 @@ dependencies = [ [[package]] name = "vergen-gitcl" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bbdc9746577cb4767f218d320ee0b623d415e8130332f8f562b910b61cc2c4e" +checksum = "2a3a7f91caabecefc3c249fd864b11d4abe315c166fbdb568964421bccfd2b7a" dependencies = [ "anyhow", - "derive_builder 0.20.0", + "derive_builder 0.20.1", "rustversion", "time 0.3.36", "vergen", @@ -4424,13 +4419,12 @@ dependencies = [ [[package]] name = "vergen-lib" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e06bee42361e43b60f363bad49d63798d0f42fb1768091812270eca00c784720" +checksum = "229eaddb0050920816cf051e619affaf18caa3dd512de8de5839ccbc8e53abb0" dependencies = [ "anyhow", - "derive_builder 0.20.0", - "getset", + "derive_builder 0.20.1", "rustversion", ] diff --git a/crates/libcgroups/Cargo.toml b/crates/libcgroups/Cargo.toml index 1e21ad108..05b22a284 100644 --- a/crates/libcgroups/Cargo.toml +++ b/crates/libcgroups/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libcgroups" -version = "0.4.0" # MARK: Version +version = "0.4.1" # MARK: Version description = "Library for cgroup" license-file = "../../LICENSE" repository = "https://github.com/containers/youki" @@ -25,11 +25,11 @@ procfs = "0.16.0" oci-spec = { version = "~0.6.8", features = ["runtime"] } fixedbitset = "0.5.7" serde = { version = "1.0", features = ["derive"] } -rbpf = { version = "0.2.0", optional = true } +rbpf = { version = "0.3.0", optional = true } libbpf-sys = { version = "1.4.5", optional = true } errno = { version = "0.3.9", optional = true } libc = { version = "0.2.158", optional = true } -thiserror = "1.0.63" +thiserror = "1.0.64" tracing = { version = "0.1.40", features = ["attributes"] } [dev-dependencies] diff --git a/crates/libcontainer/Cargo.toml b/crates/libcontainer/Cargo.toml index 1d36175b9..8f71d0531 100644 --- a/crates/libcontainer/Cargo.toml +++ b/crates/libcontainer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libcontainer" -version = "0.4.0" # MARK: Version +version = "0.4.1" # MARK: Version description = "Library for container control" license-file = "../../LICENSE" repository = "https://github.com/containers/youki" @@ -43,14 +43,14 @@ oci-spec = { version = "0.6.8", features = ["runtime"] } once_cell = "1.19.0" procfs = "0.16.0" prctl = "1.0.0" -libcgroups = { path = "../libcgroups", default-features = false, version = "0.4.0" } # MARK: Version +libcgroups = { path = "../libcgroups", default-features = false, version = "0.4.1" } # MARK: Version libseccomp = { version = "0.3.0", optional = true } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" rust-criu = "0.4.0" protobuf = "= 3.2.0" # https://github.com/checkpoint-restore/rust-criu/issues/19 regex = { version = "1.10.6", default-features = false, features = ["std", "unicode-perl"] } -thiserror = "1.0.63" +thiserror = "1.0.64" tracing = { version = "0.1.40", features = ["attributes"] } safe-path = "0.1.0" nc = "0.9.3" diff --git a/crates/liboci-cli/Cargo.toml b/crates/liboci-cli/Cargo.toml index abe5448c9..85aa72163 100644 --- a/crates/liboci-cli/Cargo.toml +++ b/crates/liboci-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "liboci-cli" -version = "0.4.0" # MARK: Version +version = "0.4.1" # MARK: Version description = "Parse command line arguments for OCI container runtimes" license-file = "../../LICENSE" repository = "https://github.com/containers/youki" diff --git a/crates/youki/Cargo.toml b/crates/youki/Cargo.toml index 1290b2c8d..62cb4b129 100644 --- a/crates/youki/Cargo.toml +++ b/crates/youki/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "youki" -version = "0.4.0" # MARK: Version +version = "0.4.1" # MARK: Version description = "A container runtime written in Rust" license-file = "../../LICENSE" repository = "https://github.com/containers/youki" @@ -27,11 +27,11 @@ default-features = false features = ["std", "suggestions", "derive", "cargo", "help", "usage", "error-context"] [dependencies] -anyhow = "1.0.86" +anyhow = "1.0.89" chrono = { version = "0.4", default-features = false, features = ["clock", "serde"] } -libcgroups = { path = "../libcgroups", default-features = false, version = "0.4.0" } # MARK: Version -libcontainer = { path = "../libcontainer", default-features = false, version = "0.4.0" } # MARK: Version -liboci-cli = { path = "../liboci-cli", version = "0.4.0" } # MARK: Version +libcgroups = { path = "../libcgroups", default-features = false, version = "0.4.1" } # MARK: Version +libcontainer = { path = "../libcontainer", default-features = false, version = "0.4.1" } # MARK: Version +liboci-cli = { path = "../liboci-cli", version = "0.4.1" } # MARK: Version nix = "0.28.0" once_cell = "1.19.0" pentacle = "1.0.0" @@ -56,5 +56,5 @@ tempfile = "3" scopeguard = "1.2.0" [build-dependencies] -anyhow = "1.0.86" -vergen-gitcl = { version = "1.0.0", features = ["build"] } +anyhow = "1.0.89" +vergen-gitcl = { version = "1.0.1", features = ["build"] } diff --git a/docs/src/user/basic_setup.md b/docs/src/user/basic_setup.md index e400cd52d..96359345b 100644 --- a/docs/src/user/basic_setup.md +++ b/docs/src/user/basic_setup.md @@ -83,7 +83,7 @@ Install from the GitHub release as root: ```console -# curl -sSfL https://github.com/containers/youki/releases/download/v0.4.0/youki-0.4.0-$(uname -m)-musl.tar.gz | tar -xzvC /usr/bin/ youki +# curl -sSfL https://github.com/containers/youki/releases/download/v0.4.1/youki-0.4.1-$(uname -m)-musl.tar.gz | tar -xzvC /usr/bin/ youki ``` diff --git a/experiment/selinux/README.md b/experiment/selinux/README.md index a47794427..7b089d782 100644 --- a/experiment/selinux/README.md +++ b/experiment/selinux/README.md @@ -10,3 +10,9 @@ Please import and use this project. ```console $ cargo run ``` + +You can create an selinux environment via the Vagrantfile. + +```console +$ vagrant up +``` diff --git a/experiment/selinux/Vagrantfile b/experiment/selinux/Vagrantfile new file mode 100644 index 000000000..0b0630798 --- /dev/null +++ b/experiment/selinux/Vagrantfile @@ -0,0 +1,19 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + config.vm.box = "generic/centos8" + config.vm.synced_folder '.', '/vagrant/youki', disabled: false + + config.vm.provider "virtualbox" do |v| + v.memory = 4096 + v.cpus = 4 + end + + config.vm.provision "shell", privileged: false, inline: <<-SHELL + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + . "$HOME/.cargo/env" + sudo sed -i -e 's|^mirrorlist|#mirrorlist|g' -e 's|^#baseurl=http://mirror|baseurl=http://vault|g' /etc/yum.repos.d/CentOS-*repo + sudo yum -y install gcc curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-ExtUtils-MakeMaker autoconf wget make + SHELL +end diff --git a/experiment/selinux/src/main.rs b/experiment/selinux/src/main.rs index 35d5a4e16..a3a27f8f1 100644 --- a/experiment/selinux/src/main.rs +++ b/experiment/selinux/src/main.rs @@ -34,7 +34,7 @@ fn main() -> Result<()> { let file_path = Path::new("./test_file.txt"); let _file = File::create(file_path)?; let selinux_label = - SELinuxLabel::try_from("unconfined_u:object_r:public_content_t:s1".to_string())?; + SELinuxLabel::try_from("system_u:object_r:public_content_t:s0".to_string())?; SELinux::set_file_label(file_path, selinux_label)?; let current_label = SELinux::file_label(file_path)?; println!("file label is {}", current_label); diff --git a/experiment/selinux/src/tools/xattr.rs b/experiment/selinux/src/tools/xattr.rs index 2e44ce006..9d39fbe44 100644 --- a/experiment/selinux/src/tools/xattr.rs +++ b/experiment/selinux/src/tools/xattr.rs @@ -34,7 +34,7 @@ where // set_xattr sets extended attributes on a file specified by its path. fn set_xattr(&self, attr: &str, data: &[u8]) -> Result<(), XattrError> { let path = self.as_ref(); - match rfs::setxattr(path, attr, data, rfs::XattrFlags::CREATE) { + match rfs::setxattr(path, attr, data, rfs::XattrFlags::REPLACE) { Ok(_) => Ok(()), Err(e) => { let errno = e.raw_os_error(); @@ -50,7 +50,7 @@ where // lset_xattr sets extended attributes on a symbolic link. fn lset_xattr(&self, attr: &str, data: &[u8]) -> Result<(), XattrError> { let path = self.as_ref(); - match rfs::lsetxattr(path, attr, data, rfs::XattrFlags::CREATE) { + match rfs::lsetxattr(path, attr, data, rfs::XattrFlags::REPLACE) { Ok(_) => Ok(()), Err(e) => { let errno = e.raw_os_error(); diff --git a/tests/contest/test_framework/Cargo.toml b/tests/contest/test_framework/Cargo.toml index f5edd9829..de033fbbf 100644 --- a/tests/contest/test_framework/Cargo.toml +++ b/tests/contest/test_framework/Cargo.toml @@ -6,5 +6,5 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -anyhow = "1.0.86" +anyhow = "1.0.89" crossbeam = "0.8.4"