diff --git a/pkg/vtpm/Dockerfile b/pkg/vtpm/Dockerfile index 9118eaa82a..0e817da103 100644 --- a/pkg/vtpm/Dockerfile +++ b/pkg/vtpm/Dockerfile @@ -43,8 +43,11 @@ RUN strip --strip-unneeded /out/usr/lib/libtss2*.so* # build tpm2-tools, it is needed by ptpm WORKDIR /tpm2-tools ADD --keep-git-dir=true https://github.com/tpm2-software/tpm2-tools.git#5.5 /tpm2-tools -COPY patch/patch-tpm2-tools.diff . -RUN patch -p1 < patch-tpm2-tools.diff +COPY patches/ /patches/ +RUN for patch in /patches/*.patch; do \ + echo "Applying $patch"; \ + patch -d /tpm2-tools -p1 < "$patch" || exit 1 ; \ + done RUN ./bootstrap && \ ./configure && \ make -j$(nproc) diff --git a/pkg/vtpm/patch/patch-tpm2-tools.diff b/pkg/vtpm/patches/0-tpm2-tools-libcommon-as-shared-lib.patch similarity index 100% rename from pkg/vtpm/patch/patch-tpm2-tools.diff rename to pkg/vtpm/patches/0-tpm2-tools-libcommon-as-shared-lib.patch