agent: Enable kata-cc-rustls-tls in image-rs

- Enable the kata-cc-rustls-tls feature in image-rs, so that it
can get resources from the KBS in order to retrieve the registry
credentials.
- Also bump to the latest image-rs to pick up protobuf fixes
- Add libprotobuf-dev dependency to the agent packaging
as it is needed by the new image-rs feature
- Add extra env in the agent make test as the
new version of the anyhow crate has changed the backtrace capture thus unit
tests of kata-agent that compares a raised error with an expected one
would fail. To fix this, we need only panics to have backtraces, thus
set RUST_BACKTRACE=0 for tests due to document
https://docs.rs/anyhow/latest/anyhow/

Fixes #9538

Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
This commit is contained in:
Xynnn007
2024-04-10 10:43:17 +08:00
committed by stevenhorsman
parent 3b72e9ffab
commit 1072658219
4 changed files with 2147 additions and 1354 deletions

View File

@@ -26,16 +26,17 @@ RUN mkdir ${RUSTUP_HOME} ${CARGO_HOME} && chmod -R a+rwX /opt
RUN apt-get update && \
apt-get --no-install-recommends -y install \
ca-certificates \
clang \
curl \
g++ \
gcc \
libprotobuf-dev \
libssl-dev \
make \
musl-tools \
openssl \
perl \
protobuf-compiler \
clang && \
protobuf-compiler && \
apt-get clean && rm -rf /var/lib/apt/lists/ && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${RUST_TOOLCHAIN}