Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tpm: Remove need for libssl build dependency #458

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AdamCDunlap
Copy link
Contributor

Coconut-SVSM vendors its own copy of openssl (via git submodule), but previously it didn't pass in the right variables to libmstpm's configure script to tell it to use it. This meant that libssl-dev must be installed on the build system in order to build Coconut.

This can be bypassed by passing LIBCRYPTO_LIBS and LIBCRYPTO_CFLAGS to configure. Coconut-SVSM was previously passing in LIBCRYPTO_LIBS only, but it would double-expanding the variables meaning that it was actually passing LIBCRYPTO_LIBS="", which was not enough for configure. Fix this, and also pass LIBCRYPTO_CFLAGS so that configure realizes the libcrypto dependency is satisfied without needing it installed on the build system.

Tested by building in a docker container based on debian12 without libssl-dev.

This commit also modifies the documentation and github workers to remove this dependency, but I have no way of directly testing these.

@deeglaze
Copy link
Contributor

Hurray!

@stefano-garzarella
Copy link
Contributor

@AdamCDunlap cool, thanks for that!

Can we also remove libopenssl-devel from scripts/container/opensuse-rust.docker ?

Coconut-SVSM vendors its own copy of openssl (via git submodule), but
previously it didn't pass in the right variables to libmstpm's configure
script to tell it to use it. This meant that libssl-dev must be
installed on the build system in order to build Coconut.

This can be bypassed by passing LIBCRYPTO_LIBS and LIBCRYPTO_CFLAGS to
configure. Coconut-SVSM was previously passing in LIBCRYPTO_LIBS only,
but it would double-expanding the variables meaning that it was actually
passing LIBCRYPTO_LIBS="", which was not enough for configure. Fix this,
and also pass LIBCRYPTO_CFLAGS so that configure realizes the libcrypto
dependency is satisfied without needing it installed on the build
system.

Tested by building in a docker container based on debian12 without
libssl-dev.

This commit also modifies the documentation and github workers to remove
this dependency, but I have no way of directly testing these.

Change-Id: I1584f52894d50a9fb8b289102a45e3cfa9f8d141
Signed-off-by: Adam Dunlap <acdunlap@google.com>
@AdamCDunlap
Copy link
Contributor Author

@AdamCDunlap cool, thanks for that!

Can we also remove libopenssl-devel from scripts/container/opensuscrpits/conse-rust.docker ?

Pushed a new version with that change. Thanks for taking a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants