Bug 31212 - Missing dependency for tpm2-tools
Summary: Missing dependency for tpm2-tools
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA8-64-OK
Keywords: UPSTREAM, advisory, validated_update
Depends on:
Blocks:
 
Reported: 2022-12-02 09:01 CET by Jybz
Modified: 2022-12-13 23:10 CET (History)
5 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments

Description Jybz 2022-12-02 09:01:27 CET
Installing tpm2-tools; and having a TPM2 chip.

Calling `tpm2_pcrread` fails.

Installing lib64tss2-tcti-device0

Calling `tpm2_pcrread` works.

I believe, a required is missing.

urpmq --provides lib64tss2-tcti-device0
lib64tss2-tcti-device0[== 3.0.3-1.mga8]
lib64tss2-tcti-device0(x86-64)[== 3.0.3-1.mga8]
libtss2-tcti-device.so.0()(64bit)
Comment 1 David GEIGER 2022-12-02 16:43:30 CET
Hi,

Can you report this issue at https://github.com/tpm2-software/tpm2-tools, please? to see why tpm2-tools binary don't link automatically against "libtss2-tcti-device.so.0" while it is needed.

For now it is automatically linked against:

libtss2-esys.so.0()(64bit)
libtss2-fapi.so.1()(64bit)
libtss2-mu.so.0()(64bit)
libtss2-rc.so.0()(64bit)
libtss2-sys.so.1()(64bit)
libtss2-tctildr.so.0()(64bit)

CC: (none) => geiger.david68210

Comment 2 Lewis Smith 2022-12-02 20:30:45 CET
Can I leave this with you, David? No point in Bugsquad sitting on it.

I looked at this on M9, and find no requires on lib64tss2-tcti-device0 from tpm2-tools; and lib64tss2-tcti-device0 is not required by tpm2-tools, even though that fixed Jybz's problem. It all looks complicated (previous comment).

Assignee: bugsquad => geiger.david68210
Keywords: (none) => UPSTREAM

Comment 3 Jani Välimaa 2022-12-03 13:06:33 CET
(In reply to Jybz from comment #0)
> Installing tpm2-tools; and having a TPM2 chip.
> 
> Calling `tpm2_pcrread` fails.
> 
> Installing lib64tss2-tcti-device0
> 
> Calling `tpm2_pcrread` works.
> 

What's the error msg without lib64tss2-tcti-device0? Full output of the cmd helps narrowing down the cause.
Comment 4 Jybz 2022-12-03 13:29:31 CET
Sorry for being short, no time.

output after urpme lib64tss2-tcti-device0
> [root@jeeebztop ~]# tpm2_pcrread
> ERROR:tcti:src/tss2-tcti/tctildr-dl.c:254:tctildr_get_default() No standard TCTI could be loaded 
> ERROR:tcti:src/tss2-tcti/tctildr.c:416:Tss2_TctiLdr_Initialize_Ex() Failed to instantiate TCTI 
> ERROR: Could not load tcti, got: "(null)"

output after urpmi lib64tss2-tcti-device0
> [root@jeeebztop ~]# tpm2_pcrread
> sha1:
>   0 : 0x12F0480C3B55B5EA18AE6DABA398DB3FCB0F4924
> ...
Comment 5 Jani Välimaa 2022-12-03 15:55:54 CET
tpm2_pcrread(1) man page says that "When a TCTI is not specified, the default TCTI is searched for using dlopen(3) semantics." and that's why lib(64)tss2-tcti-* pkgs aren't pulled automatic.

I have changed Cauldron's tpm2-tss to use dynload instead of dlopen to pull all TCTIs automatic via lib(64)tss2-tctildr0 lib. I'll check mga8 pkg next.

CC: (none) => jani.valimaa

Comment 6 Jani Välimaa 2022-12-03 17:04:22 CET
I might revert the change in Cauldron, and for now I have added requires for all provided TCTIs to mga8 lib(64)tss2-tctildr0 lib. Please test.

SRPMS:
tpm2-tss-3.0.3-1.1.mga8

RPMS:
tpm2-tss-3.0.3-1.1.mga8
lib(64)tss2-mu0-3.0.3-1.1.mga8
lib(64)tss2-sys1-3.0.3-1.1.mga8
lib(64)tss2-esys0-3.0.3-1.1.mga8
lib(64)tss2-fapi1-3.0.3-1.1.mga8
lib(64)tss2-rc0-3.0.3-1.1.mga8
lib(64)tss2-tctildr0-3.0.3-1.1.mga8
lib(64)tss2-tcti-cmd0-3.0.3-1.1.mga8
lib(64)tss2-tcti-device0-3.0.3-1.1.mga8
lib(64)tss2-tcti-mssim0-3.0.3-1.1.mga8
lib(64)tss2-tcti-swtpm0-3.0.3-1.1.mga8
lib(64)tpm2-tss-devel-3.0.3-1.1.mga8

Assignee: geiger.david68210 => qa-bugs

Comment 7 Thomas Andrews 2022-12-06 23:09:49 CET
Let me start by saying that this is clearly developer territory, and I don't have a clue about what I am doing. Forging ahead anyway:

As I misunderstand the goal here, it is to get a have lib64tss2-tcti-device0 become a new dependency of another of these packages. So, before the update:

urpmq --whatrequires lib64tss2-tcti-device0
lib64tpm2-tss-devel
lib64tss2-tcti-device0

I installed all of the current versions of the above packages except for the devel one. The devel one wanted to pull in a long list of other devel dependencies that I didn't think were germane to this issue:

The following 11 packages are going to be installed:

- lib64tss2-esys0-3.0.3-1.mga8.x86_64
- lib64tss2-fapi1-3.0.3-1.mga8.x86_64
- lib64tss2-mu0-3.0.3-1.mga8.x86_64
- lib64tss2-rc0-3.0.3-1.mga8.x86_64
- lib64tss2-sys1-3.0.3-1.mga8.x86_64
- lib64tss2-tcti-cmd0-3.0.3-1.mga8.x86_64
- lib64tss2-tcti-device0-3.0.3-1.mga8.x86_64
- lib64tss2-tcti-mssim0-3.0.3-1.mga8.x86_64
- lib64tss2-tcti-swtpm0-3.0.3-1.mga8.x86_64
- lib64tss2-tctildr0-3.0.3-1.mga8.x86_64
- tpm2-tss-3.0.3-1.mga8.x86_64

No installation issues. Then I used qarepo to download the packages, and updated with MCC:

The following 11 packages are going to be installed:

- lib64tss2-esys0-3.0.3-1.1.mga8.x86_64
- lib64tss2-fapi1-3.0.3-1.1.mga8.x86_64
- lib64tss2-mu0-3.0.3-1.1.mga8.x86_64
- lib64tss2-rc0-3.0.3-1.1.mga8.x86_64
- lib64tss2-sys1-3.0.3-1.1.mga8.x86_64
- lib64tss2-tcti-cmd0-3.0.3-1.1.mga8.x86_64
- lib64tss2-tcti-device0-3.0.3-1.1.mga8.x86_64
- lib64tss2-tcti-mssim0-3.0.3-1.1.mga8.x86_64
- lib64tss2-tcti-swtpm0-3.0.3-1.1.mga8.x86_64
- lib64tss2-tctildr0-3.0.3-1.1.mga8.x86_64
- tpm2-tss-3.0.3-1.1.mga8.x86_64

No installation issues, and no apparent change. But now:

$ urpmq --whatrequires lib64tss2-tcti-device0
lib64tpm2-tss-devel
lib64tss2-tcti-device0
lib64tss2-tctildr0

So I believe the goal has been accomplished. If I am wrong, please let me know. However, for now I'm going to give this an OK, and validate.

Keywords: (none) => validated_update
CC: (none) => andrewsfarm, sysadmin-bugs
Whiteboard: (none) => MGA8-64-OK

Dave Hodgins 2022-12-13 02:49:03 CET

CC: (none) => davidwhodgins
Keywords: (none) => advisory

Comment 8 Mageia Robot 2022-12-13 23:10:35 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2022-0158.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.