[meta-security] tpm2-tools: libtss added to RDEPENDS

Message ID 20220427094804.965389-1-michal.kotyla@3mdeb.com
State New
Headers show
Series [meta-security] tpm2-tools: libtss added to RDEPENDS | expand

Commit Message

Michał Kotyla April 27, 2022, 9:48 a.m. UTC
To use tpm2-tools like tpm2_pcrread on the system image should be installed
additional software. Without adding libtss packages to the RDEPENDS attempt to
run with tss2-tcti fails like:

ERROR:tcti:../tpm2-tss-3.0.3/src/tss2-tcti/tcti-swtpm.c:592:
Tss2_Tcti_Swtpm_Init() Cannot connect to swtpm TPM socket
---
 meta-tpm/recipes-tpm2/tpm2-tools/tpm2-tools_5.0.bb | 2 ++
 1 file changed, 2 insertions(+)

Comments

Michał Kotyla May 2, 2022, 6:48 a.m. UTC | #1
On 01.05.2022 19:20, Armin Kuster wrote:
>
>
> On 4/27/22 02:48, Michał Kotyla wrote:
>> To use tpm2-tools like tpm2_pcrread on the system image should be 
>> installed
>> additional software. Without adding libtss packages to the RDEPENDS 
>> attempt to
>> run with tss2-tcti fails like:
>>
>> ERROR:tcti:../tpm2-tss-3.0.3/src/tss2-tcti/tcti-swtpm.c:592:
>> Tss2_Tcti_Swtpm_Init() Cannot connect to swtpm TPM socket
>
> The current version of tpm2-tools is 5.2.  Was this meant for honister?
>
> - armin

Yes. We do not have tested this on kirkstone, so this patch is for 
honister only now.


>> ---
>>   meta-tpm/recipes-tpm2/tpm2-tools/tpm2-tools_5.0.bb | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/meta-tpm/recipes-tpm2/tpm2-tools/tpm2-tools_5.0.bb 
>> b/meta-tpm/recipes-tpm2/tpm2-tools/tpm2-tools_5.0.bb
>> index dbd324a..cb2e3d8 100644
>> --- a/meta-tpm/recipes-tpm2/tpm2-tools/tpm2-tools_5.0.bb
>> +++ b/meta-tpm/recipes-tpm2/tpm2-tools/tpm2-tools_5.0.bb
>> @@ -6,6 +6,8 @@ SECTION = "tpm"
>>     DEPENDS = "tpm2-abrmd tpm2-tss openssl curl autoconf-archive"
>>   +RDEPENDS:${PN} = "libtss2 libtss2-mu libtss2-tcti-device 
>> libtss2-tcti-mssim"
>> +
>>   SRC_URI = 
>> "https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz"
>>     SRC_URI[sha256sum] = 
>> "e1b907fe29877628052e08ad84eebc6c3f7646d29505ed4862e96162a8c91ba1"
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#56909): 
>> https://lists.yoctoproject.org/g/yocto/message/56909
>> Mute This Topic: https://lists.yoctoproject.org/mt/90727197/3616698
>> Group Owner: yocto+owner@lists.yoctoproject.org
>> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
>> [akuster808@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
>

Patch

diff --git a/meta-tpm/recipes-tpm2/tpm2-tools/tpm2-tools_5.0.bb b/meta-tpm/recipes-tpm2/tpm2-tools/tpm2-tools_5.0.bb
index dbd324a..cb2e3d8 100644
--- a/meta-tpm/recipes-tpm2/tpm2-tools/tpm2-tools_5.0.bb
+++ b/meta-tpm/recipes-tpm2/tpm2-tools/tpm2-tools_5.0.bb
@@ -6,6 +6,8 @@  SECTION = "tpm"
 
 DEPENDS = "tpm2-abrmd tpm2-tss openssl curl autoconf-archive"
 
+RDEPENDS:${PN} = "libtss2 libtss2-mu libtss2-tcti-device libtss2-tcti-mssim"
+
 SRC_URI = "https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz"
 
 SRC_URI[sha256sum] = "e1b907fe29877628052e08ad84eebc6c3f7646d29505ed4862e96162a8c91ba1"