From e248e2535a84e1ad4590c2b73f8bc582967126fbaa9245ff561cc2075a52c41a Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 8 Feb 2017 13:48:45 +0000 Subject: [PATCH 1/8] - Updated to 1.0 - Added - Travis-CI integration with GitHub - Unit tests for primitive (un)?marshal functions. - Example systemd unit for resourcemgr. - Allow for unit tests to be enabled selectively. - added pkg-config files for libraries - Changed - move simulator initialization code to socket TCTI init function. - socket TCTI finalize no longer frees context - rename libtss2 to libsapi - rename libtcti_device to libtcti-device - rename libtcti_socket to libtcti-socket - move $(includedir)/tss to $(includedir)/sapi - Move default compiler flags to config.site file. - Fixed - Fix run away resourcemgr threads by closing client sockets when resourcemgr recv() call returns 0. - Set MSG_NOSIGNAL for client connections to avoid SIGPIPE killing resourcemgr. - Fixes to handling of persistent objects by resourcemgr. - Removed - Semicolon from TPMA_* macros definitions. - Windows build files. - SAPI_CLIENT macro tests. - Security - Fix buffer overflow in resourcemgr. - use sample resourcemanager.service OBS-URL: https://build.opensuse.org/package/show/security/tpm2-0-tss?expand=0&rev=25 --- 1.0.tar.gz | 3 +++ resourcemgr.service | 9 --------- tpm2-0-tss-0.98.tar.gz | 3 --- tpm2-0-tss.changes | 30 ++++++++++++++++++++++++++++++ tpm2-0-tss.spec | 12 ++++++------ 5 files changed, 39 insertions(+), 18 deletions(-) create mode 100644 1.0.tar.gz delete mode 100644 resourcemgr.service delete mode 100644 tpm2-0-tss-0.98.tar.gz diff --git a/1.0.tar.gz b/1.0.tar.gz new file mode 100644 index 0000000..76d40ce --- /dev/null +++ b/1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5697cfe7f4fd44d6ae1ec03cddb6b44d5cf5cd13e134c7238049551d1615488 +size 3790493 diff --git a/resourcemgr.service b/resourcemgr.service deleted file mode 100644 index 9dcf41a..0000000 --- a/resourcemgr.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=TPM 2.0 Core Services Daemon - -[Service] -Type=forking -ExecStart=/usr/sbin/resourcemgr - -[Install] -WantedBy=multi-user.target diff --git a/tpm2-0-tss-0.98.tar.gz b/tpm2-0-tss-0.98.tar.gz deleted file mode 100644 index 9452184..0000000 --- a/tpm2-0-tss-0.98.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7be3f9f2473506ab06a3f06ebd8ea0920c317e7e14c5ca7ce54e58e8b48b9232 -size 3742841 diff --git a/tpm2-0-tss.changes b/tpm2-0-tss.changes index b409797..4a40c8e 100644 --- a/tpm2-0-tss.changes +++ b/tpm2-0-tss.changes @@ -1,3 +1,33 @@ +------------------------------------------------------------------- +Wed Feb 8 13:43:55 UTC 2017 - meissner@suse.com + +- Updated to 1.0 + - Added + - Travis-CI integration with GitHub + - Unit tests for primitive (un)?marshal functions. + - Example systemd unit for resourcemgr. + - Allow for unit tests to be enabled selectively. + - added pkg-config files for libraries + - Changed + - move simulator initialization code to socket TCTI init function. + - socket TCTI finalize no longer frees context + - rename libtss2 to libsapi + - rename libtcti_device to libtcti-device + - rename libtcti_socket to libtcti-socket + - move $(includedir)/tss to $(includedir)/sapi + - Move default compiler flags to config.site file. + - Fixed + - Fix run away resourcemgr threads by closing client sockets when resourcemgr recv() call returns 0. + - Set MSG_NOSIGNAL for client connections to avoid SIGPIPE killing resourcemgr. + - Fixes to handling of persistent objects by resourcemgr. + - Removed + - Semicolon from TPMA_* macros definitions. + - Windows build files. + - SAPI_CLIENT macro tests. + - Security + - Fix buffer overflow in resourcemgr. +- use sample resourcemanager.service + ------------------------------------------------------------------- Sat Aug 6 19:28:27 UTC 2016 - meissner@suse.com diff --git a/tpm2-0-tss.spec b/tpm2-0-tss.spec index 3c1dca0..3ec924c 100644 --- a/tpm2-0-tss.spec +++ b/tpm2-0-tss.spec @@ -1,7 +1,7 @@ # # spec file for package tpm2-0-tss # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,14 +17,13 @@ Name: tpm2-0-tss -Version: 0.98 +Version: 1.0 Release: 0 Summary: TSS (TCG Software Stack) access library for TPM 2.0 chips License: BSD-2-Clause Group: Productivity/Security Url: https://github.com/01org/TPM2.0-TSS -Source0: %{name}-%{version}.tar.gz -Source1: resourcemgr.service +Source0: https://github.com/01org/TPM2.0-TSS/archive/%{version}.tar.gz Source2: baselibs.conf BuildRequires: automake BuildRequires: gcc-c++ @@ -60,7 +59,7 @@ This package provides the library to access the TSS (TCG Software Stack) for accessing TPM 2.0 chips. %prep -%setup -q +%setup -q -n TPM2.0-TSS-%{version} %build bash bootstrap @@ -70,7 +69,8 @@ make %{?_smp_mflags} PTHREAD_LDFLAGS=-pthread %install %make_install find %{buildroot} -type f -name "*.la" -delete -print -install -D -m 0644 %{SOURCE1} %{buildroot}/%{_unitdir}/resourcemgr.service +install -D -m 0644 contrib/resourcemgr.service %{buildroot}/%{_unitdir}/resourcemgr.service +sed -e 's#usr/local/sbin/#usr/sbin#;' -i %{buildroot}/%{_unitdir}/resourcemgr.service ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rcresourcemgr %post -n libtss2-0 -p /sbin/ldconfig From 731c3dc9aae98f31bc93dfeccb0146c43d7603d7f1d6a39d93026e8b865e34d5 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 8 Feb 2017 13:49:03 +0000 Subject: [PATCH 2/8] - Updated to 1.0 (FATE#321508) OBS-URL: https://build.opensuse.org/package/show/security/tpm2-0-tss?expand=0&rev=26 --- tpm2-0-tss.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tpm2-0-tss.changes b/tpm2-0-tss.changes index 4a40c8e..fead81d 100644 --- a/tpm2-0-tss.changes +++ b/tpm2-0-tss.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Wed Feb 8 13:43:55 UTC 2017 - meissner@suse.com -- Updated to 1.0 +- Updated to 1.0 (FATE#321508) - Added - Travis-CI integration with GitHub - Unit tests for primitive (un)?marshal functions. From ec118cd26cc898a894176e7b3f0140366f6be1a574c618a4f5708c7908568d74 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 8 Feb 2017 15:27:23 +0000 Subject: [PATCH 3/8] OBS-URL: https://build.opensuse.org/package/show/security/tpm2-0-tss?expand=0&rev=27 --- tpm2-0-tss-configure.patch | 13 +++++++++++++ tpm2-0-tss.spec | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 tpm2-0-tss-configure.patch diff --git a/tpm2-0-tss-configure.patch b/tpm2-0-tss-configure.patch new file mode 100644 index 0000000..04b8fb5 --- /dev/null +++ b/tpm2-0-tss-configure.patch @@ -0,0 +1,13 @@ +Index: TPM2.0-TSS-1.0/configure.ac +=================================================================== +--- TPM2.0-TSS-1.0.orig/configure.ac ++++ TPM2.0-TSS-1.0/configure.ac +@@ -7,7 +7,7 @@ AC_CONFIG_MACRO_DIR([m4]) + AC_PROG_CC + AC_PROG_CXX + LT_INIT() +-AX_PTHREAD([], [AC_MSG_ERROR([requires pthread])]) ++AX_PTHREAD([], []) + AM_INIT_AUTOMAKE([foreign + subdir-objects]) + AC_CONFIG_FILES([Makefile]) diff --git a/tpm2-0-tss.spec b/tpm2-0-tss.spec index 3ec924c..de83ad6 100644 --- a/tpm2-0-tss.spec +++ b/tpm2-0-tss.spec @@ -25,6 +25,7 @@ Group: Productivity/Security Url: https://github.com/01org/TPM2.0-TSS Source0: https://github.com/01org/TPM2.0-TSS/archive/%{version}.tar.gz Source2: baselibs.conf +Patch0: tpm2-0-tss-configure.patch BuildRequires: automake BuildRequires: gcc-c++ BuildRequires: libtool @@ -60,6 +61,7 @@ accessing TPM 2.0 chips. %prep %setup -q -n TPM2.0-TSS-%{version} +%patch0 -p1 %build bash bootstrap From 22fefd935fc0d95ad052738307be07c0e20fa9d328fca9634b98be17f102b664 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 8 Feb 2017 16:30:51 +0000 Subject: [PATCH 4/8] OBS-URL: https://build.opensuse.org/package/show/security/tpm2-0-tss?expand=0&rev=28 --- tpm2-0-tss.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/tpm2-0-tss.spec b/tpm2-0-tss.spec index de83ad6..f41b76f 100644 --- a/tpm2-0-tss.spec +++ b/tpm2-0-tss.spec @@ -26,6 +26,7 @@ Url: https://github.com/01org/TPM2.0-TSS Source0: https://github.com/01org/TPM2.0-TSS/archive/%{version}.tar.gz Source2: baselibs.conf Patch0: tpm2-0-tss-configure.patch +BuildRequires: autoconf-archive BuildRequires: automake BuildRequires: gcc-c++ BuildRequires: libtool From c2b8afcaef8dccd5c4025c45489ea4f1fbc1f6c833390751c83a9eab152ff49d Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 15 Feb 2017 17:15:45 +0000 Subject: [PATCH 5/8] - tpm2-0-tss-configure.patch: fix weird error. OBS-URL: https://build.opensuse.org/package/show/security/tpm2-0-tss?expand=0&rev=29 --- tpm2-0-tss.changes | 1 + 1 file changed, 1 insertion(+) diff --git a/tpm2-0-tss.changes b/tpm2-0-tss.changes index fead81d..20fd773 100644 --- a/tpm2-0-tss.changes +++ b/tpm2-0-tss.changes @@ -27,6 +27,7 @@ Wed Feb 8 13:43:55 UTC 2017 - meissner@suse.com - Security - Fix buffer overflow in resourcemgr. - use sample resourcemanager.service +- tpm2-0-tss-configure.patch: fix weird error. ------------------------------------------------------------------- Sat Aug 6 19:28:27 UTC 2016 - meissner@suse.com From 84a46c674baa850da249c908422c977bdf870e170df812c8c0175d5535a780e7 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 15 Feb 2017 17:17:08 +0000 Subject: [PATCH 6/8] OBS-URL: https://build.opensuse.org/package/show/security/tpm2-0-tss?expand=0&rev=30 --- tpm2-0-tss.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tpm2-0-tss.spec b/tpm2-0-tss.spec index f41b76f..46911aa 100644 --- a/tpm2-0-tss.spec +++ b/tpm2-0-tss.spec @@ -93,7 +93,7 @@ ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rcresourcemgr %files %defattr(-,root,root) -%doc *.md ChangeLog LICENSE *.png +%doc *.md LICENSE *.png %{_sbindir}/resourcemgr /%{_unitdir}/resourcemgr.service %{_sbindir}/rcresourcemgr From c220cfe8e2b5f2fa836edbc96d09b29e0d96a31b3893cfd267b93ff8ac736983 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 15 Feb 2017 18:15:01 +0000 Subject: [PATCH 7/8] OBS-URL: https://build.opensuse.org/package/show/security/tpm2-0-tss?expand=0&rev=31 --- baselibs.conf | 2 +- tpm2-0-tss.spec | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/baselibs.conf b/baselibs.conf index 530badb..f0e1bda 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1 +1 @@ -libtss2-0 +libsapi0 diff --git a/tpm2-0-tss.spec b/tpm2-0-tss.spec index 46911aa..c012676 100644 --- a/tpm2-0-tss.spec +++ b/tpm2-0-tss.spec @@ -42,13 +42,13 @@ The tpm2-0-tss package provides a TPM 2.0 TSS implementation. Summary: Development headers for the TSS (TCG Software Stack) access library for TPM 2.0 chips Group: Development/Libraries/C and C++ Requires: glibc-devel -Requires: libtss2-0 = %{version} +Requires: libtsapi0 = %{version} %description devel -This package provides the development files for the libtss2 library +This package provides the development files for the libsapi library for accessing TPM 2.0 chips. -%package -n libtss2-0 +%package -n libsapi0 Summary: TSS (TCG Software Stack) access library for TPM 2.0 chip Group: System/Libraries Requires: trousers @@ -56,7 +56,7 @@ Requires: trousers Obsoletes: libtss2 < %version-%release Provides: libtss2 = %version-%release -%description -n libtss2-0 +%description -n libsapi0 This package provides the library to access the TSS (TCG Software Stack) for accessing TPM 2.0 chips. @@ -76,8 +76,8 @@ install -D -m 0644 contrib/resourcemgr.service %{buildroot}/%{_unitdir}/resource sed -e 's#usr/local/sbin/#usr/sbin#;' -i %{buildroot}/%{_unitdir}/resourcemgr.service ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rcresourcemgr -%post -n libtss2-0 -p /sbin/ldconfig -%postun -n libtss2-0 -p /sbin/ldconfig +%post -n libsapi0 -p /sbin/ldconfig +%postun -n libsapi0 -p /sbin/ldconfig %pre %service_add_pre resourcemgr.service @@ -93,7 +93,7 @@ ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rcresourcemgr %files %defattr(-,root,root) -%doc *.md LICENSE *.png +%doc *.md LICENSE %{_sbindir}/resourcemgr /%{_unitdir}/resourcemgr.service %{_sbindir}/rcresourcemgr @@ -101,15 +101,16 @@ ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rcresourcemgr %files devel %defattr(-,root,root) %{_includedir}/tcti -%{_includedir}/tss2 +%{_includedir}/sapi %{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc ##only available in static form #%{_libdir}/libtddl.a -%files -n libtss2-0 +%files -n libsapi0 %defattr(-,root,root) -/%{_libdir}/libtss2.so.* -/%{_libdir}/libtctidevice.so.* -/%{_libdir}/libtctisocket.so.* +/%{_libdir}/libsapi.so.* +/%{_libdir}/libtcti-device.so.* +/%{_libdir}/libtcti-socket.so.* %changelog From 68951397a52a0e5d881c86e29d71fbea660ece86e0849dd006bb1e9473edfe6e Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 18 Feb 2017 11:42:59 +0000 Subject: [PATCH 8/8] Accepting request 458493 from home:jengelh:branches:security - Remove --with-pic which is only for static libs. - Fix an improper Requires line. - Split libtcti* from libsapi0; these are independentlty developable units. OBS-URL: https://build.opensuse.org/request/show/458493 OBS-URL: https://build.opensuse.org/package/show/security/tpm2-0-tss?expand=0&rev=32 --- tpm2-0-tss.changes | 8 ++++++++ tpm2-0-tss.spec | 44 ++++++++++++++++++++++++++++++++++++-------- 2 files changed, 44 insertions(+), 8 deletions(-) diff --git a/tpm2-0-tss.changes b/tpm2-0-tss.changes index 20fd773..61b6241 100644 --- a/tpm2-0-tss.changes +++ b/tpm2-0-tss.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Feb 16 13:35:44 UTC 2017 - jengelh@inai.de + +- Remove --with-pic which is only for static libs. +- Fix an improper Requires line. +- Split libtcti* from libsapi0; these are independentlty + developable units. + ------------------------------------------------------------------- Wed Feb 8 13:43:55 UTC 2017 - meissner@suse.com diff --git a/tpm2-0-tss.spec b/tpm2-0-tss.spec index c012676..0cd39d9 100644 --- a/tpm2-0-tss.spec +++ b/tpm2-0-tss.spec @@ -19,7 +19,7 @@ Name: tpm2-0-tss Version: 1.0 Release: 0 -Summary: TSS (TCG Software Stack) access library for TPM 2.0 chips +Summary: Intel's TCG Software Stack access library for TPM 2.0 chips License: BSD-2-Clause Group: Productivity/Security Url: https://github.com/01org/TPM2.0-TSS @@ -39,17 +39,19 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build The tpm2-0-tss package provides a TPM 2.0 TSS implementation. %package devel -Summary: Development headers for the TSS (TCG Software Stack) access library for TPM 2.0 chips +Summary: Development headers for the Intel TSS library for TPM 2.0 chips Group: Development/Libraries/C and C++ Requires: glibc-devel -Requires: libtsapi0 = %{version} +Requires: libsapi0 = %{version} +Requires: libtcti-device0 = %{version} +Requires: libtcti-socket0 = %{version} %description devel This package provides the development files for the libsapi library for accessing TPM 2.0 chips. %package -n libsapi0 -Summary: TSS (TCG Software Stack) access library for TPM 2.0 chip +Summary: TPM2 System API library Group: System/Libraries Requires: trousers # Non-SLPP package name from earlier @@ -60,13 +62,29 @@ Provides: libtss2 = %version-%release This package provides the library to access the TSS (TCG Software Stack) for accessing TPM 2.0 chips. +%package -n libtcti-device0 +Summary: TCTI library for communicating with a TPM device node +Group: System/Libraries + +%description -n libtcti-device0 +TPM Command Transmission Interface library for communicating with a +TPM device node. + +%package -n libtcti-socket0 +Summary: TCTI library for communicating with a TPM over a socket +Group: System/Libraries + +%description -n libtcti-socket0 +TPM Command Transmission Interface library for communicating with a +TPM over a socket. + %prep %setup -q -n TPM2.0-TSS-%{version} %patch0 -p1 %build bash bootstrap -%configure --disable-static --with-pic +%configure --disable-static make %{?_smp_mflags} PTHREAD_LDFLAGS=-pthread %install @@ -78,6 +96,10 @@ ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rcresourcemgr %post -n libsapi0 -p /sbin/ldconfig %postun -n libsapi0 -p /sbin/ldconfig +%post -n libtcti-device0 -p /sbin/ldconfig +%postun -n libtcti-device0 -p /sbin/ldconfig +%post -n libtcti-socket0 -p /sbin/ldconfig +%postun -n libtcti-socket0 -p /sbin/ldconfig %pre %service_add_pre resourcemgr.service @@ -109,8 +131,14 @@ ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rcresourcemgr %files -n libsapi0 %defattr(-,root,root) -/%{_libdir}/libsapi.so.* -/%{_libdir}/libtcti-device.so.* -/%{_libdir}/libtcti-socket.so.* +%{_libdir}/libsapi.so.* + +%files -n libtcti-device0 +%defattr(-,root,root) +%{_libdir}/libtcti-device.so.* + +%files -n libtcti-socket0 +%defattr(-,root,root) +%{_libdir}/libtcti-socket.so.* %changelog