From ac062faf0c9455a4844922903a5cc3a45836d75a12f8d98ca48a0604cf62bb82 Mon Sep 17 00:00:00 2001 From: Matthias Gerstner Date: Thu, 22 Oct 2020 10:27:22 +0000 Subject: [PATCH 1/7] Accepting request 843352 from home:Guillaume_G:branches:openSUSE:Factory - Update to 3.0.1, changelog at: https://github.com/tpm2-software/tpm2-tss/blob/3.0.x/CHANGELOG.md - Update libtss2-sys0 to libtss2-sys1 - Add new libs: * libtss2-fapi1 * libtss2-tcti-cmd0 * libtss2-tcti-swtpm0 OBS-URL: https://build.opensuse.org/request/show/843352 OBS-URL: https://build.opensuse.org/package/show/security/tpm2-0-tss?expand=0&rev=97 --- tpm2-0-tss.changes | 11 +++++++ tpm2-0-tss.spec | 74 +++++++++++++++++++++++++++++++++++++------ tpm2-tss-2.3.3.tar.gz | 3 -- tpm2-tss-3.0.1.tar.gz | 3 ++ 4 files changed, 79 insertions(+), 12 deletions(-) delete mode 100644 tpm2-tss-2.3.3.tar.gz create mode 100644 tpm2-tss-3.0.1.tar.gz diff --git a/tpm2-0-tss.changes b/tpm2-0-tss.changes index 4b7a928..04c9dab 100644 --- a/tpm2-0-tss.changes +++ b/tpm2-0-tss.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Mon Oct 19 13:30:39 UTC 2020 - Guillaume GARDET + +- Update to 3.0.1, changelog at: + https://github.com/tpm2-software/tpm2-tss/blob/3.0.x/CHANGELOG.md +- Update libtss2-sys0 to libtss2-sys1 +- Add new libs: + * libtss2-fapi1 + * libtss2-tcti-cmd0 + * libtss2-tcti-swtpm0 + ------------------------------------------------------------------- Wed Feb 19 19:37:14 UTC 2020 - Martin Hauke diff --git a/tpm2-0-tss.spec b/tpm2-0-tss.spec index 433ffcc..61fe350 100644 --- a/tpm2-0-tss.spec +++ b/tpm2-0-tss.spec @@ -1,7 +1,7 @@ # # spec file for package tpm2-0-tss # -# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: tpm2-0-tss -Version: 2.3.3 +Version: 3.0.1 Release: 0 Summary: Intel's TCG Software Stack access libraries for TPM 2.0 chips License: BSD-2-Clause @@ -27,7 +27,9 @@ Source0: https://github.com/tpm2-software/tpm2-tss/releases/download/%{ve Source2: baselibs.conf BuildRequires: doxygen BuildRequires: gcc-c++ +BuildRequires: libcurl-devel BuildRequires: libgcrypt-devel +BuildRequires: libjson-c-devel BuildRequires: libopenssl-devel BuildRequires: pkg-config BuildRequires: pkgconfig(udev) @@ -60,11 +62,14 @@ Summary: Development headers for the Intel TSS library for TPM 2.0 chips Group: Development/Libraries/C and C++ Requires: glibc-devel Requires: libtss2-esys0 = %{version} +Requires: libtss2-fapi1 = %{version} Requires: libtss2-mu0 = %{version} Requires: libtss2-rc0 = %{version} -Requires: libtss2-sys0 = %{version} +Requires: libtss2-sys1 = %{version} +Requires: libtss2-tcti-cmd0 = %{version} Requires: libtss2-tcti-device0 = %{version} Requires: libtss2-tcti-mssim0 = %{version} +Requires: libtss2-tcti-swtpm0 = %{version} Requires: libtss2-tctildr0 = %{version} Requires: tpm2-0-tss = %{version} @@ -84,11 +89,11 @@ TPM object and automatic calculation of session based authorization and encryption values. Both the synchronous and asynchronous API are exposed through this library. -%package -n libtss2-sys0 +%package -n libtss2-sys1 Summary: TPM2 System API (SAPI) Group: System/Libraries -%description -n libtss2-sys0 +%description -n libtss2-sys1 System API (SAPI) as described in the system level API and TPM command transmission interface specification. This API is a 1-to-1 mapping of the TPM2 commands documented in Part 3 of the TPM2 specification. Additionally there @@ -138,11 +143,36 @@ Group: System/Libraries TPM Command Transmission Interface library for communicating using the protocol exposed by the Microsoft software TPM2 simulator. +%package -n libtss2-fapi1 +Summary: FAPI interface library +Group: System/Libraries + +%description -n libtss2-fapi1 +FAPI interface library + +%package -n libtss2-tcti-cmd0 +Summary: TCTI cmd interface library +Group: System/Libraries + +%description -n libtss2-tcti-cmd0 +TCTI cmd interface library + +%package -n libtss2-tcti-swtpm0 +Summary: TCTI swtpm interface library +Group: System/Libraries + +%description -n libtss2-tcti-swtpm0 +TCTI swtpm interface library + %prep %setup -q -n tpm2-tss-%{version} %build -%configure --disable-static --with-udevrulesdir=%{_udevrulesdir} +%configure --disable-static \ + --with-udevrulesdir=%{_udevrulesdir} \ + --with-runstatedir=%{_rundir} \ + --with-tmpfilesdir=%{_tmpfilesdir} \ + --with-sysusersdir=%{_sysusersdir} make %{?_smp_mflags} PTHREAD_LDFLAGS=-pthread %install @@ -154,11 +184,12 @@ mv %{buildroot}%{_udevrulesdir}/tpm-udev.rules %{buildroot}%{_udevrulesdir}/%{ud %post %_bindir/udevadm trigger -s tpm -s tpmrm || : +%tmpfiles_create %_tmpfilesdir/tpm2-tss-fapi.conf %post -n libtss2-esys0 -p /sbin/ldconfig %postun -n libtss2-esys0 -p /sbin/ldconfig -%post -n libtss2-sys0 -p /sbin/ldconfig -%postun -n libtss2-sys0 -p /sbin/ldconfig +%post -n libtss2-sys1 -p /sbin/ldconfig +%postun -n libtss2-sys1 -p /sbin/ldconfig %post -n libtss2-tctildr0 -p /sbin/ldconfig %postun -n libtss2-tctildr0 -p /sbin/ldconfig %post -n libtss2-tcti-device0 -p /sbin/ldconfig @@ -169,14 +200,27 @@ mv %{buildroot}%{_udevrulesdir}/tpm-udev.rules %{buildroot}%{_udevrulesdir}/%{ud %postun -n libtss2-mu0 -p /sbin/ldconfig %post -n libtss2-rc0 -p /sbin/ldconfig %postun -n libtss2-rc0 -p /sbin/ldconfig +%post -n libtss2-fapi1 -p /sbin/ldconfig +%postun -n libtss2-fapi1 -p /sbin/ldconfig +%post -n libtss2-tcti-cmd0 -p /sbin/ldconfig +%postun -n libtss2-tcti-cmd0 -p /sbin/ldconfig +%post -n libtss2-tcti-swtpm0 -p /sbin/ldconfig +%postun -n libtss2-tcti-swtpm0 -p /sbin/ldconfig %files %defattr(-,root,root) %doc *.md %license LICENSE %{_mandir}/man3/* +%{_mandir}/man5/* %{_mandir}/man7/tss2-* %{_udevrulesdir}/%{udev_rule_file} +%{_sysusersdir}/tpm2-tss.conf +%{_tmpfilesdir}/tpm2-tss-fapi.conf +%dir /etc/tpm2-tss/ +%config /etc/tpm2-tss/fapi-config.json +%dir /etc/tpm2-tss/fapi-profiles +%config /etc/tpm2-tss/fapi-profiles/*.json %files devel %defattr(-,root,root) @@ -188,7 +232,7 @@ mv %{buildroot}%{_udevrulesdir}/tpm-udev.rules %{buildroot}%{_udevrulesdir}/%{ud %defattr(-,root,root) %{_libdir}/libtss2-esys.so.* -%files -n libtss2-sys0 +%files -n libtss2-sys1 %defattr(-,root,root) %{_libdir}/libtss2-sys.so.* @@ -212,4 +256,16 @@ mv %{buildroot}%{_udevrulesdir}/tpm-udev.rules %{buildroot}%{_udevrulesdir}/%{ud %defattr(-,root,root) %{_libdir}/libtss2-tcti-mssim.so.* +%files -n libtss2-fapi1 +%defattr(-,root,root) +%{_libdir}/libtss2-fapi.so.* + +%files -n libtss2-tcti-cmd0 +%defattr(-,root,root) +%{_libdir}/libtss2-tcti-cmd.so.* + +%files -n libtss2-tcti-swtpm0 +%defattr(-,root,root) +%{_libdir}/libtss2-tcti-swtpm.so.* + %changelog diff --git a/tpm2-tss-2.3.3.tar.gz b/tpm2-tss-2.3.3.tar.gz deleted file mode 100644 index 9154135..0000000 --- a/tpm2-tss-2.3.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9d8c8866829e3ff5e1649ecd82498cb1329e0691139458e53b69e6061febe3d3 -size 1171185 diff --git a/tpm2-tss-3.0.1.tar.gz b/tpm2-tss-3.0.1.tar.gz new file mode 100644 index 0000000..1b228a7 --- /dev/null +++ b/tpm2-tss-3.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2432533a1cac0f0d15d0337d2f0a23591a50b36aad68ab72412ce694818b7e76 +size 1488285 From a083903c1f5f21dd6c355dacbb257425216296f2e54c2653d26f22897c1b9193 Mon Sep 17 00:00:00 2001 From: Matthias Gerstner Date: Thu, 22 Oct 2020 11:43:23 +0000 Subject: [PATCH 2/7] - move the tcti-fapi tmpfiles.d config file into the libtss2-fapi1 sub-package. - improve the descriptions of new libraries (fapi1, cmd0, swtpm0) OBS-URL: https://build.opensuse.org/package/show/security/tpm2-0-tss?expand=0&rev=98 --- baselibs.conf | 5 ++++- tpm2-0-tss.changes | 7 +++++++ tpm2-0-tss.spec | 19 +++++++++++++------ 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/baselibs.conf b/baselibs.conf index f93983c..130922f 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,5 +1,8 @@ -libtss2-sys0 libtss2-esys0 +libtss2-fapi1 libtss2-mu0 +libtss2-sys1 +libtss2-tcti-cmd0 libtss2-tcti-device0 libtss2-tcti-mssim0 +libtss2-tcti-swtpm0 diff --git a/tpm2-0-tss.changes b/tpm2-0-tss.changes index 04c9dab..3304429 100644 --- a/tpm2-0-tss.changes +++ b/tpm2-0-tss.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Oct 22 11:38:52 UTC 2020 - Matthias Gerstner + +- move the tcti-fapi tmpfiles.d config file into the libtss2-fapi1 sub-package. +- improve the descriptions of new libraries (fapi1, cmd0, swtpm0) +- adjust baselibs.conf to match new library versions and added libraries + ------------------------------------------------------------------- Mon Oct 19 13:30:39 UTC 2020 - Guillaume GARDET diff --git a/tpm2-0-tss.spec b/tpm2-0-tss.spec index 61fe350..0ba4466 100644 --- a/tpm2-0-tss.spec +++ b/tpm2-0-tss.spec @@ -148,21 +148,27 @@ Summary: FAPI interface library Group: System/Libraries %description -n libtss2-fapi1 -FAPI interface library +This is the tpm2 Feature API (FAPI) library. This API is designed to be very +high-level API, intended to make programming with the TPM as simple as +possible. %package -n libtss2-tcti-cmd0 Summary: TCTI cmd interface library Group: System/Libraries %description -n libtss2-tcti-cmd0 -TCTI cmd interface library +A TCTI for interaction with a subprocess. It abstracts the details of direct +communication with the interface and protocol exposed by a subprocess that can +receive and transmit raw TPM2 command and response buffers. %package -n libtss2-tcti-swtpm0 Summary: TCTI swtpm interface library Group: System/Libraries %description -n libtss2-tcti-swtpm0 -TCTI swtpm interface library +A TCTI for interaction with the TPM2 software simulator. It abstracts the +details of direct communication with the interface and protocol exposed by the +daemon hosting the TPM2 reference implementation. %prep %setup -q -n tpm2-tss-%{version} @@ -184,7 +190,6 @@ mv %{buildroot}%{_udevrulesdir}/tpm-udev.rules %{buildroot}%{_udevrulesdir}/%{ud %post %_bindir/udevadm trigger -s tpm -s tpmrm || : -%tmpfiles_create %_tmpfilesdir/tpm2-tss-fapi.conf %post -n libtss2-esys0 -p /sbin/ldconfig %postun -n libtss2-esys0 -p /sbin/ldconfig @@ -200,7 +205,9 @@ mv %{buildroot}%{_udevrulesdir}/tpm-udev.rules %{buildroot}%{_udevrulesdir}/%{ud %postun -n libtss2-mu0 -p /sbin/ldconfig %post -n libtss2-rc0 -p /sbin/ldconfig %postun -n libtss2-rc0 -p /sbin/ldconfig -%post -n libtss2-fapi1 -p /sbin/ldconfig +%post -n libtss2-fapi1 +/sbin/ldconfig +%tmpfiles_create %_tmpfilesdir/tpm2-tss-fapi.conf %postun -n libtss2-fapi1 -p /sbin/ldconfig %post -n libtss2-tcti-cmd0 -p /sbin/ldconfig %postun -n libtss2-tcti-cmd0 -p /sbin/ldconfig @@ -216,7 +223,6 @@ mv %{buildroot}%{_udevrulesdir}/tpm-udev.rules %{buildroot}%{_udevrulesdir}/%{ud %{_mandir}/man7/tss2-* %{_udevrulesdir}/%{udev_rule_file} %{_sysusersdir}/tpm2-tss.conf -%{_tmpfilesdir}/tpm2-tss-fapi.conf %dir /etc/tpm2-tss/ %config /etc/tpm2-tss/fapi-config.json %dir /etc/tpm2-tss/fapi-profiles @@ -259,6 +265,7 @@ mv %{buildroot}%{_udevrulesdir}/tpm-udev.rules %{buildroot}%{_udevrulesdir}/%{ud %files -n libtss2-fapi1 %defattr(-,root,root) %{_libdir}/libtss2-fapi.so.* +%{_tmpfilesdir}/tpm2-tss-fapi.conf %files -n libtss2-tcti-cmd0 %defattr(-,root,root) From a1c55ce29ab0e15262a09dca752d5236af3a52af12f734c8cc080d474d023d4e Mon Sep 17 00:00:00 2001 From: Matthias Gerstner Date: Thu, 22 Oct 2020 14:02:30 +0000 Subject: [PATCH 3/7] OBS-URL: https://build.opensuse.org/package/show/security/tpm2-0-tss?expand=0&rev=99 --- tpm2-0-tss.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tpm2-0-tss.spec b/tpm2-0-tss.spec index 0ba4466..d307301 100644 --- a/tpm2-0-tss.spec +++ b/tpm2-0-tss.spec @@ -266,6 +266,8 @@ mv %{buildroot}%{_udevrulesdir}/tpm-udev.rules %{buildroot}%{_udevrulesdir}/%{ud %defattr(-,root,root) %{_libdir}/libtss2-fapi.so.* %{_tmpfilesdir}/tpm2-tss-fapi.conf +%ghost %{_rundir}/%{name}/eventlog +%ghost %{_sharedstatedir}/%{name}/system/keystore %files -n libtss2-tcti-cmd0 %defattr(-,root,root) From b111eaabb301ffd6848cbca40559e7950344830b7c9c12dbfbfe8a58b8545395 Mon Sep 17 00:00:00 2001 From: Matthias Gerstner Date: Fri, 23 Oct 2020 07:37:41 +0000 Subject: [PATCH 4/7] OBS-URL: https://build.opensuse.org/package/show/security/tpm2-0-tss?expand=0&rev=100 --- tpm2-0-tss.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tpm2-0-tss.spec b/tpm2-0-tss.spec index d307301..584e8d9 100644 --- a/tpm2-0-tss.spec +++ b/tpm2-0-tss.spec @@ -266,7 +266,10 @@ mv %{buildroot}%{_udevrulesdir}/tpm-udev.rules %{buildroot}%{_udevrulesdir}/%{ud %defattr(-,root,root) %{_libdir}/libtss2-fapi.so.* %{_tmpfilesdir}/tpm2-tss-fapi.conf +%ghost %{_rundir}/%{name} %ghost %{_rundir}/%{name}/eventlog +%ghost %{_sharedstatedir}/%{name} +%ghost %{_sharedstatedir}/%{name}/system %ghost %{_sharedstatedir}/%{name}/system/keystore %files -n libtss2-tcti-cmd0 From 6054f8f0f85888b0c3b23209c901c0010f69d26b0daf4a95cec17cf5c2fac139 Mon Sep 17 00:00:00 2001 From: Matthias Gerstner Date: Fri, 23 Oct 2020 10:56:19 +0000 Subject: [PATCH 5/7] OBS-URL: https://build.opensuse.org/package/show/security/tpm2-0-tss?expand=0&rev=101 --- tpm2-0-tss.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tpm2-0-tss.spec b/tpm2-0-tss.spec index 584e8d9..e7c0b02 100644 --- a/tpm2-0-tss.spec +++ b/tpm2-0-tss.spec @@ -266,11 +266,14 @@ mv %{buildroot}%{_udevrulesdir}/tpm-udev.rules %{buildroot}%{_udevrulesdir}/%{ud %defattr(-,root,root) %{_libdir}/libtss2-fapi.so.* %{_tmpfilesdir}/tpm2-tss-fapi.conf -%ghost %{_rundir}/%{name} -%ghost %{_rundir}/%{name}/eventlog -%ghost %{_sharedstatedir}/%{name} -%ghost %{_sharedstatedir}/%{name}/system -%ghost %{_sharedstatedir}/%{name}/system/keystore +# this would fix "tmpfile-not-in-filelist" warnings but when adding these +# entries then it complains about "directories not owned by a package:" for +# /run/tpm2-0-tss & friends. When adding them as %ghost, too, then Leap15.1 +# complains about "found conflict of libtss2-fapi1-3.0.1-lp152.103.1.x86_64 +# with libtss2-fapi1-3.0.1-lp152.103.1.x86_64". Thus leave it be for the +# moment, some insane circle of errors is involved here. +#%%ghost %{_sharedstatedir}/%{name}/system/keystore +#%%ghost %{_rundir}/%{name}/eventlog %files -n libtss2-tcti-cmd0 %defattr(-,root,root) From f5f7e05c1ad7ef1f4fbc374b84f57cd1232c79686d672a25e40d099b5d1167d5 Mon Sep 17 00:00:00 2001 From: Matthias Gerstner Date: Mon, 26 Oct 2020 08:23:05 +0000 Subject: [PATCH 6/7] OBS-URL: https://build.opensuse.org/package/show/security/tpm2-0-tss?expand=0&rev=102 --- baselibs.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/baselibs.conf b/baselibs.conf index 130922f..c3bc5d6 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -6,3 +6,4 @@ libtss2-tcti-cmd0 libtss2-tcti-device0 libtss2-tcti-mssim0 libtss2-tcti-swtpm0 +libtss2-tctildr0 From ec6907c8f9db1359eb7c5710d7fcd5d7074c700f234135dd058f30780bfc9e15 Mon Sep 17 00:00:00 2001 From: Matthias Gerstner Date: Mon, 26 Oct 2020 08:24:22 +0000 Subject: [PATCH 7/7] OBS-URL: https://build.opensuse.org/package/show/security/tpm2-0-tss?expand=0&rev=103 --- baselibs.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/baselibs.conf b/baselibs.conf index c3bc5d6..2eb088f 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,9 +1,10 @@ libtss2-esys0 libtss2-fapi1 libtss2-mu0 +libtss2-rc0 libtss2-sys1 libtss2-tcti-cmd0 libtss2-tcti-device0 +libtss2-tctildr0 libtss2-tcti-mssim0 libtss2-tcti-swtpm0 -libtss2-tctildr0