Page MenuHomeFreeBSD

TPM2-Tools
ClosedPublic

Authored by tadeusz.struk_intel.com on Sep 13 2019, 10:00 PM.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

lwhsu added a subscriber: lwhsu.Sep 13 2019, 11:35 PM
lwhsu added inline comments.Sep 14 2019, 12:00 AM
security/tpm2-tools/Makefile
17 ↗(On Diff #62072)

portlint(1): You have defined USE_LDCONFIG, but this port does not install any shared objects.

27 ↗(On Diff #62072)

This section should be put between .include <bsd.port.pre.mk> and .include <bsd.port.post.mk>

29 ↗(On Diff #62072)

Then we don't need this.

Test failed in 12.0-R amd64 jail in poudriere. The last lines of the log:

checking for CRYPTO... no
configure: error: Package requirements (libcrypto >= 1.0.2g) were not met:

Package 'libcrypto', required by 'virtual:world', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables CRYPTO_CFLAGS
and CRYPTO_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
===>  Script "configure" failed unexpectedly.
tadeusz.struk_intel.com marked 3 inline comments as done.

Reworked according to feedback

lwhsu requested changes to this revision.Sep 14 2019, 8:11 AM

This port doesn't build. Please check the log available at https://reviews.freebsd.org/D21650#471935

This revision now requires changes to proceed.Sep 14 2019, 8:11 AM

This port doesn't build. Please check the log available at https://reviews.freebsd.org/D21650#471935

Is it failing on 12.0-R? It is building fine for me on 13.0-CURRENT and poudriere v3.3.2_1

lwhsu added a comment.Sep 14 2019, 1:52 PM

This port doesn't build. Please check the log available at https://reviews.freebsd.org/D21650#471935

Is it failing on 12.0-R? It is building fine for me on 13.0-CURRENT and poudriere v3.3.2_1

Yes. Is this port only supposed to work on 13-CURRENT?

lwhsu@bsdmizer-1:~/freebsd-ports/security/tpm2-tools > uname -a
FreeBSD bsdmizer-1 12.0-RELEASE-p10 FreeBSD 12.0-RELEASE-p10 GENERIC  amd64
lwhsu@bsdmizer-1:~/freebsd-ports/security/tpm2-tools > make -V OSVERSION
1200086

This port doesn't build. Please check the log available at https://reviews.freebsd.org/D21650#471935

Is it failing on 12.0-R? It is building fine for me on 13.0-CURRENT and poudriere v3.3.2_1

Yes. Is this port only supposed to work on 13-CURRENT?

I'm not sure how this usually works. I can try and install 12.0-RELEASE to see what's wrong.

Mark tools as broken on FreeBSD 12.0 and openSSL < 1.1.0

Still not sure if that's the best solution, but following examples from other ports I marked tools as broken when OSVERSION <= 1200086 and OpenSSL < 1.1.0

lwhsu added a comment.Sep 16 2019, 9:25 PM

Still not sure if that's the best solution, but following examples from other ports I marked tools as broken when OSVERSION <= 1200086 and OpenSSL < 1.1.0

This is weird, on 12.0-R system:

lwhsu@bsdmizer-1:~/freebsd-ports/security/tpm2-tools > make -V SSL_DEFAULT
base
lwhsu@bsdmizer-1:~/freebsd-ports/security/tpm2-tools > which openssl
/usr/bin/openssl
lwhsu@bsdmizer-1:~/freebsd-ports/security/tpm2-tools > openssl version
OpenSSL 1.1.1a-freebsd  20 Nov 2018

12.0-R should have OpenSSL 1.1.1 after 1200086: https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/versions-12.html

security/tpm2-tools/Makefile
27 ↗(On Diff #62174)

requires OpenSSL 1.1.0 or 1.1.1?

security/tpm2-tools/Makefile
27 ↗(On Diff #62174)

It should work with anything >= 1.1.0, but according to the link 1.1.1 should be in 1200086 or grater.
I'm not sure if it is still possible to install 1.0.2 or earlier on 12.0?

lwhsu added inline comments.Sep 16 2019, 11:10 PM
security/tpm2-tools/Makefile
27 ↗(On Diff #62174)

It's possible to install 1.0.x on 12.0, but there is no much meaning. The system I test only has base OpenSSL, which is 1.1.1a, as shown in https://reviews.freebsd.org/D21650#472826

I suspect this is some path/flag problem, from the message in https://reviews.freebsd.org/D21650#471935

Update to use CRYPTO_FLAGS instead of LIBCRYPTO_CLAGS

Yes it was a flag problem. Now it works on 12.0-Release and 13.0-Current for me. Thanks for reviewing this.

lwhsu accepted this revision.Sep 16 2019, 11:57 PM

Thanks for fixing!

This revision is now accepted and ready to land.Sep 16 2019, 11:57 PM
This revision was automatically updated to reflect the committed changes.