diff options
author | David Tolnay <dtolnay@chromium.org> | 2019-01-17 14:17:01 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-01-18 00:45:57 -0800 |
commit | 68d0e7237e8ffac07239032c8d2ef0ccf3f1d312 (patch) | |
tree | 12f5035fa59b0016db3cf37c93d61d8b1476b7c3 /kokoro | |
parent | 2200604d9c101888df658f9483290a13952c6b1c (diff) | |
download | crosvm-68d0e7237e8ffac07239032c8d2ef0ccf3f1d312.tar crosvm-68d0e7237e8ffac07239032c8d2ef0ccf3f1d312.tar.gz crosvm-68d0e7237e8ffac07239032c8d2ef0ccf3f1d312.tar.bz2 crosvm-68d0e7237e8ffac07239032c8d2ef0ccf3f1d312.tar.lz crosvm-68d0e7237e8ffac07239032c8d2ef0ccf3f1d312.tar.xz crosvm-68d0e7237e8ffac07239032c8d2ef0ccf3f1d312.tar.zst crosvm-68d0e7237e8ffac07239032c8d2ef0ccf3f1d312.zip |
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>
Diffstat (limited to 'kokoro')
-rw-r--r-- | kokoro/Dockerfile | 15 | ||||
-rw-r--r-- | kokoro/pkgconfig/libtpm2.pc | 5 |
2 files changed, 19 insertions, 1 deletions
diff --git a/kokoro/Dockerfile b/kokoro/Dockerfile index 848e94e..44c63aa 100644 --- a/kokoro/Dockerfile +++ b/kokoro/Dockerfile @@ -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 diff --git a/kokoro/pkgconfig/libtpm2.pc b/kokoro/pkgconfig/libtpm2.pc new file mode 100644 index 0000000..c9ff8f0 --- /dev/null +++ b/kokoro/pkgconfig/libtpm2.pc @@ -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 |