Re: TSS aligned with TPM2 engine

Fredrik Ternerot
 

On Sat, Dec 22, 2018 at 7:21 PM James Bottomley
<James.Bottomley@...> wrote:

On Fri, 2018-12-21 at 15:22 +0000, Doug Fraser wrote:
[...]
On to openssl-tpm2-engine:

I had to make one small change to openssl-tpm2-engine before running
bootstrap/configure prior to the build.
Right after pulling the git tree, at the top of the tree I do:

#$ sed -i 's/ create_tpm2_key.1//' Makefile.am

This removes a documentation dependency on help2man.
This is required because I am cross-compiling, and I cannot execute
`create_tpm2_key --help` on the build host to extract the document.

It would be helpful if there were a configure option to block
documentation generation completely.
Well, as I said, I've never actually done a cross compile. However,
leafing through the somewhat confusing automake documentation on cross
compiles, I think this is the fix.
I can confirm that this solves the problem with help2man for me.

The changes in configure.ac are present in the latest commit (b43aa97
Version: 2.1.1). Would you mind to add the changes in Makefile.am as
well?

Thanks,
Fredrik


James

---

diff --git a/Makefile.am b/Makefile.am
index 8c24dbe..7d3b645 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,8 +1,11 @@
-EXTRA_DIST = README openssl.cnf.sample create_tpm2_key.1
+EXTRA_DIST = README openssl.cnf.sample

+if NATIVE_BUILD
+EXTRA_DIST += create_tpm2_key.1
man1_MANS = create_tpm2_key.1

CLEANFILES = $(man1_MANS)
+endif

openssl_engine_LTLIBRARIES=libtpm2.la
bin_PROGRAMS=create_tpm2_key
diff --git a/configure.ac b/configure.ac
index ea544ea..a96206c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,6 +4,8 @@

AC_INIT(openssl-tpm2-engine, 2.1.0, <James.Bottomley@...>)
AM_INIT_AUTOMAKE(1.6.3)
+AC_CANONICAL_HOST
+AM_CONDITIONAL(NATIVE_BUILD, test "x$cross_compiling" = "xno")

AM_MISSING_PROG(HELP2MAN, help2man)



Join openssl-tpm2-engine@groups.io to automatically receive all group messages.