mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 18:20:34 +00:00
kokoro: Install libtpm2
Required for CL:1387624 which uses libtpm2 as a TPM simulator. BUG=chromium:911799 TEST=build kokoro image, test master as well as TPM CL in it Change-Id: I636be593a245ecd7ac10bc71319dee48e6511e97 Reviewed-on: https://chromium-review.googlesource.com/1419397 Commit-Ready: David Tolnay <dtolnay@chromium.org> Tested-by: David Tolnay <dtolnay@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Stephen Barber <smbarber@chromium.org>
This commit is contained in:
parent
2200604d9c
commit
68d0e7237e
2 changed files with 19 additions and 1 deletions
|
@ -20,6 +20,7 @@ RUN apt-get update && apt-get install -y \
|
|||
libgl1-mesa-dev \
|
||||
libgles1-mesa-dev \
|
||||
libgles2-mesa-dev \
|
||||
libssl1.0-dev \
|
||||
libtool \
|
||||
libusb-1.0-0-dev \
|
||||
libwayland-dev \
|
||||
|
@ -33,7 +34,8 @@ RUN apt-get update && apt-get install -y \
|
|||
ENV RUSTUP_HOME=/usr/local/rustup \
|
||||
CARGO_HOME=/usr/local/cargo \
|
||||
PATH=/usr/local/cargo/bin:$PATH \
|
||||
RUST_VERSION=1.31.0
|
||||
RUST_VERSION=1.31.0 \
|
||||
RUSTFLAGS='--cfg hermetic'
|
||||
|
||||
# Debian usually has an old rust version in the repository. Instead of using that, we use rustup to
|
||||
# pull in a toolchain versions of our choosing.
|
||||
|
@ -90,6 +92,17 @@ RUN git clone https://gitlab.freedesktop.org/virgl/virglrenderer.git \
|
|||
&& ./autogen.sh \
|
||||
&& make install -j24
|
||||
|
||||
# Install libtpm2 so that tpm2-sys/build.rs does not try to build it in place in
|
||||
# the read-only source directory.
|
||||
RUN git clone https://chromium.googlesource.com/chromiumos/third_party/tpm2 \
|
||||
&& cd tpm2 \
|
||||
&& git checkout 15260c8cd98eb10b4976d2161cd5cb9bc0c3adac \
|
||||
&& make -j24 \
|
||||
&& cp build/libtpm2.a /lib
|
||||
|
||||
# Inform pkg-config where libraries we install are placed.
|
||||
COPY pkgconfig/* /usr/lib/pkgconfig
|
||||
|
||||
# Reduces image size and prevents accidentally using /scratch files
|
||||
RUN rm -r /scratch /usr/bin/meson
|
||||
|
||||
|
|
5
kokoro/pkgconfig/libtpm2.pc
Normal file
5
kokoro/pkgconfig/libtpm2.pc
Normal file
|
@ -0,0 +1,5 @@
|
|||
Name: tpm2
|
||||
Description: TPM simulator extracted from the TCG TPM 2.0 library specification
|
||||
Version: 2.0.0
|
||||
Requires.private: libcrypto
|
||||
Libs: -L/lib -ltpm2
|
Loading…
Reference in a new issue