From 983479748f791841ff085199818f7ed5a2ad6d19 Mon Sep 17 00:00:00 2001 From: ChengyuZhu6 Date: Wed, 22 Nov 2023 21:23:59 +0800 Subject: [PATCH 1/2] .github: fix error when making checks for CoCo guest pull Fix error when making checks: ``` error: failed to run custom build command for `image-rs v0.1.0 (https://github.com/confidential-containers/guest-components?tag=v0.8.0#e849dc89)` Caused by: process didn't exit successfully: `/home/runner/work/kata-containers/kata-containers/src/ agent/target/release/build/image-rs-fd932206d09362b7/build-script-build` (exit status: 101) --- stdout cargo:rerun-if-changed=./protos/getresource.proto cargo:rerun-if-changed=./protos --- stderr thread 'main' panicked at 'Could not find `protoc` installation and this build crate cannot proceed without this knowledge. If `protoc` is installed and this crate had trouble finding it, you can set the `PROTOC` environment variable with the specific path to your installed `protoc` binary.If you're on debian, try `apt-get install protobuf-compiler` or download it from https://github.com/protocolbuffers/protobuf/releases ``` Fixes #8673 Signed-off-by: ChengyuZhu6 --- .github/workflows/static-checks.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/static-checks.yaml b/.github/workflows/static-checks.yaml index 2af6bdada5..4303f9581f 100644 --- a/.github/workflows/static-checks.yaml +++ b/.github/workflows/static-checks.yaml @@ -107,6 +107,9 @@ jobs: echo "Set environment variables for the libseccomp crate to link the libseccomp library statically" echo "LIBSECCOMP_LINK_TYPE=static" >> $GITHUB_ENV echo "LIBSECCOMP_LIB_PATH=${libseccomp_install_dir}/lib" >> $GITHUB_ENV + - name: Install protobuf-compiler + if: ${{ matrix.command == 'make check' && matrix.component == 'agent' }} + run: sudo apt-get -y install protobuf-compiler - name: Setup XDG_RUNTIME_DIR for the `runtime` tests if: ${{ matrix.command != 'make vendor' && matrix.command != 'make check' && matrix.component == 'runtime' }} run: | From dfad0e6622a4ada6f44bbafd2bbfa6bccb976d2f Mon Sep 17 00:00:00 2001 From: ChengyuZhu6 Date: Fri, 17 Nov 2023 14:12:25 +0800 Subject: [PATCH 2/2] .github: fix the failure without devicemapper for host sharing fix error when running checks and tests: error: failed to run custom build command for `devicemapper-sys v0.1.5` fatal error: 'libdevmapper.h' file not found thread 'main' panicked at 'Could not generate dm.h bindings: ClangDiagnostic("dm.h:2:10: fatal error: 'libdevmapper.h' file not found\n")', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/devicemapper-sys-0.1.5/build.rs:24:10 stack backtrace: 0: rust_begin_unwind at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:593:5 1: core::panicking::panic_fmt at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/panicking.rs:67:14 2: core::result::unwrap_failed at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/result.rs:1651:5 3: core::result::Result::expect 4: build_script_build::main 5: core::ops::function::FnOnce::call_once note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. warning: build failed, waiting for other jobs to finish... make: *** [../../utils.mk:177: standard_rust_check] Error 101 Signed-off-by: ChengyuZhu6 --- .github/workflows/static-checks.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/static-checks.yaml b/.github/workflows/static-checks.yaml index 4303f9581f..e278a2dfc7 100644 --- a/.github/workflows/static-checks.yaml +++ b/.github/workflows/static-checks.yaml @@ -98,6 +98,9 @@ jobs: - name: Install musl-tools if: ${{ matrix.component != 'runtime' }} run: sudo apt-get -y install musl-tools + - name: Install devicemapper + if: ${{ matrix.command == 'make check' && matrix.component == 'agent' }} + run: sudo apt-get -y install libdevmapper-dev - name: Install libseccomp if: ${{ matrix.command != 'make vendor' && matrix.command != 'make check' && matrix.install-libseccomp == 'yes' }} run: |