Bug 262569 - security/tpm2-tss should depend on base openssl
Summary: security/tpm2-tss should depend on base openssl
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jung-uk Kim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-15 11:58 UTC by Tomoaki AOKI
Modified: 2022-03-19 02:46 UTC (History)
3 users (show)

See Also:


Attachments
Patch to workaround that wants OpenSSL-related *.pc files. (446 bytes, patch)
2022-03-18 11:38 UTC, Tomoaki AOKI
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomoaki AOKI 2022-03-15 11:58:35 UTC
With ports git d4c9792fda7f, security/tpm2-tss depends on ports openssl.
This conflicts with lang/rust and so on.

According to build error with reverting LIB_DEPEND part, the requirement seems to be >= 1.1.0, and at least base main, stable/13, and stable/12 has 1.1.1.
So security/tpm2-tss should sanely detect base one instead of ports security/openssl.


=== Error log when reverting LIB_DEPENDS part ===

 (snip)

checking for CRYPTO... no
configure: error: OpenSSL libcrypto is missing or version requirements not met. OpenSSL version must be >= 1.1.0
===>  Script "configure" failed unexpectedly.
Please report the problem to tstruk@gmail.com [maintainer] and attach the
"/usr/ports/security/tpm2-tss/work/tpm2-tss-3.2.0/config.log" including the
output of the failure of your make command. Also, it might be a good idea to
provide an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.
make: stopped in /usr/ports/security/tpm2-tss
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2022-03-15 11:58:35 UTC
Maintainer informed via mail
Comment 2 Tomoaki AOKI 2022-03-18 11:34:45 UTC
This problem was related to Bug 257659.
As I could not find the proper file to patch for security/tpm2-tss, I tried to put libcrypto.pc, libssl.pc and openssl.pc, which I uploaded to Bug 257659, into /usr/libdata/pkgconfig/ and apply the patch I'll upload later and it fixed the issue.

As base is needed to be fixed this way, cannot close this PR until...
  All supported branches of base are fixed to have OpenSSL related *.pc files.
or
  Someone find the proper way to fix with this particular port only is modified.
Comment 3 Tomoaki AOKI 2022-03-18 11:38:13 UTC
Created attachment 232547 [details]
Patch to workaround that wants OpenSSL-related *.pc files.

Patch to workaround that wants OpenSSL-related *.pc files.
3 *.pc files to put into /usr/libdata/pkgconfig are available via Bug 257659.
Comment 4 Jung-uk Kim freebsd_committer freebsd_triage 2022-03-18 15:13:55 UTC
I'll take it.
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-03-18 15:27:13 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=aca6f9b18e874c73ac68990a2439ccec0be66ef0

commit aca6f9b18e874c73ac68990a2439ccec0be66ef0
Author:     Jung-uk Kim <jkim@FreeBSD.org>
AuthorDate: 2022-03-18 15:26:09 +0000
Commit:     Jung-uk Kim <jkim@FreeBSD.org>
CommitDate: 2022-03-18 15:26:09 +0000

    security/tpm2-tss: Fix build with base OpenSSL

    PR:             262569

 security/tpm2-tss/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Comment 6 Jung-uk Kim freebsd_committer freebsd_triage 2022-03-18 15:29:44 UTC
It should be fixed now.  Thanks!
Comment 7 Tomoaki AOKI 2022-03-19 02:46:57 UTC
(In reply to Jung-uk Kim from comment #6)

Confirmed fixed without installing 3 *.pc fimes.
Thanks!

BTW, if this was caused by a misusing of a CONFIGURE_ENV variable in original commit, and setting CONFIGURE_ENV as your fix works everywhere regardless the configured DEFAULT_VERSIONS+=ssl setting, it would be nice to be forcibly set by /usr/ports/Mk/Uses/ssl.mk.
If so, it would become enough to set USES=ssl alone.