Update tpm2-tss to 2.0.0 release

This commit is contained in:
Yunying Sun 2018-07-02 17:56:16 +08:00
parent 70405fdf4e
commit a4c7fc0d05
4 changed files with 36 additions and 22 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/tpm2-tss-1.4.0.tar.gz /tpm2-tss-1.4.0.tar.gz
/tpm2-tss-2.0.0.tar.gz

View File

@ -1,2 +0,0 @@
# tpm2 devices can be accessed by the tss user or tss group members
KERNEL=="tpmrm[0-9]*|tpm[0-9]*", MODE="0660", OWNER="tss", GROUP="tss"

View File

@ -1 +1 @@
SHA512 (tpm2-tss-1.4.0.tar.gz) = 6d9984f6bf295a29ba027be5e6ce54e2dae7673c52bd609999178455fb0522403120e5f35a786b5096e85f3d285e862e97e38f10a4eac4f10fa94bef8bffabbd SHA512 (tpm2-tss-2.0.0.tar.gz) = df4ebe3c008dd7347acc4a4284e8bfd42ddb88b05aaf1d4d546a12b04e0040eeee92c3c9b6fbae39a15d736e4c031d78825a1398fc7d11798de2e4a171143d6b

View File

@ -1,5 +1,5 @@
Name: tpm2-tss Name: tpm2-tss
Version: 1.4.0 Version: 2.0.0
Release: 1%{?dist} Release: 1%{?dist}
Summary: TPM2.0 Software Stack Summary: TPM2.0 Software Stack
@ -9,7 +9,7 @@ License: BSD and TCGL
URL: https://github.com/tpm2-software/tpm2-tss URL: https://github.com/tpm2-software/tpm2-tss
Source0: https://github.com/tpm2-software/tpm2-tss/releases/download/%{version}/%{name}-%{version}.tar.gz Source0: https://github.com/tpm2-software/tpm2-tss/releases/download/%{version}/%{name}-%{version}.tar.gz
Source1: 60-tpm-udev.rules %global udevrules_prefix 60-
BuildRequires: gcc BuildRequires: gcc
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -27,22 +27,29 @@ APIs for applications to access TPM module through kernel TPM drivers.
%autosetup -n %{name}-%{version} %autosetup -n %{name}-%{version}
%build %build
%configure --disable-static --disable-silent-rules # ESAPI, which was added in TSS 2.0 uses gcry_mac_open() from libgcrypt 1.6.
# However latest libgcrypt available for RHEL7 is 1.5.3, which leads to TSS2.0
# build failure. So here disable esapi support to make TSS2.0 work.
%configure --disable-static --disable-silent-rules --enable-esapi=no --with-udevrulesdir=%{_udevrulesdir} --with-udevrulesprefix=%{udevrules_prefix}
# This is to fix Rpath errors. Taken from https://fedoraproject.org/wiki/Packaging:Guidelines#Removing_Rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%make_build %make_build
%install %install
%make_install %make_install
find %{buildroot}%{_libdir} -type f -name \*.la -delete find %{buildroot}%{_libdir} -type f -name \*.la -delete
install -m 0644 -D -t %{buildroot}/%{_udevrulesdir}/ %{SOURCE1}
%files %files
%doc README.md CHANGELOG.md %doc README.md CHANGELOG.md
%license LICENSE %license LICENSE
%{_libdir}/libsapi.so.* %{_libdir}/libtss2-mu.so.*
%{_libdir}/libtcti-device.so.* %{_libdir}/libtss2-sys.so.*
%{_libdir}/libtcti-socket.so.* %{_libdir}/libtss2-tcti-device.so.*
%{_udevrulesdir}/60-tpm-udev.rules %{_libdir}/libtss2-tcti-mssim.so.*
%{_udevrulesdir}/%{udevrules_prefix}tpm-udev.rules
%package devel %package devel
@ -54,22 +61,30 @@ This package contains headers and libraries required to build applications that
use tpm2-tss. use tpm2-tss.
%files devel %files devel
%{_includedir}/sapi/ %{_includedir}/tss2/
%{_includedir}/tcti/ %{_libdir}/libtss2-mu.so
%{_libdir}/libsapi.so %{_libdir}/libtss2-sys.so
%{_libdir}/libtcti-device.so %{_libdir}/libtss2-tcti-device.so
%{_libdir}/libtcti-socket.so %{_libdir}/libtss2-tcti-mssim.so
%{_libdir}/pkgconfig/sapi.pc %{_libdir}/pkgconfig/tss2-mu.pc
%{_libdir}/pkgconfig/tcti-device.pc %{_libdir}/pkgconfig/tss2-sys.pc
%{_libdir}/pkgconfig/tcti-socket.pc %{_libdir}/pkgconfig/tss2-tcti-device.pc
%{_mandir}/man3/Init*Tcti.3.gz %{_libdir}/pkgconfig/tss2-tcti-mssim.pc
%{_mandir}/man7/tcti-*.7.gz %{_mandir}/man3/Tss2*.3.gz
%{_mandir}/man7/tss2*.7.gz
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%changelog %changelog
* Mon Jul 2 2018 Yunying Sun <yunying.sun@intel.com> - 2.0.0-1
- Update to 2.0.0 release (RHBZ#1508870)
- Remove patch file 60-tpm-udev.rules, use upstream tpm-udev.rules instead
- Disable ESAPI to fix build errors caused by dependency to libgcrypt 1.6.0
- Add scriptlet to fix Rpath errors
- Update file installation paths and names accordingly
* Sun Mar 04 2018 Javier Martinez Canillas <javierm@redhat.com> - 1.4.0-1 * Sun Mar 04 2018 Javier Martinez Canillas <javierm@redhat.com> - 1.4.0-1
- Update URLs to point to the new project location - Update URLs to point to the new project location
- Add README.md CHANGELOG.md to %%files directive - Add README.md CHANGELOG.md to %%files directive