diff --git a/.gitignore b/.gitignore index 4e16b07..b7f4682 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /tpm2-tss-1.4.0.tar.gz +/tpm2-tss-2.0.0.tar.gz diff --git a/60-tpm-udev.rules b/60-tpm-udev.rules deleted file mode 100644 index bdcd38a..0000000 --- a/60-tpm-udev.rules +++ /dev/null @@ -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" diff --git a/sources b/sources index 6c4f684..e9d48de 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (tpm2-tss-1.4.0.tar.gz) = 6d9984f6bf295a29ba027be5e6ce54e2dae7673c52bd609999178455fb0522403120e5f35a786b5096e85f3d285e862e97e38f10a4eac4f10fa94bef8bffabbd +SHA512 (tpm2-tss-2.0.0.tar.gz) = df4ebe3c008dd7347acc4a4284e8bfd42ddb88b05aaf1d4d546a12b04e0040eeee92c3c9b6fbae39a15d736e4c031d78825a1398fc7d11798de2e4a171143d6b diff --git a/tpm2-tss.spec b/tpm2-tss.spec index d643e49..81de367 100644 --- a/tpm2-tss.spec +++ b/tpm2-tss.spec @@ -1,5 +1,5 @@ Name: tpm2-tss -Version: 1.4.0 +Version: 2.0.0 Release: 1%{?dist} Summary: TPM2.0 Software Stack @@ -9,7 +9,7 @@ License: BSD and TCGL URL: https://github.com/tpm2-software/tpm2-tss 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-c++ @@ -27,22 +27,29 @@ APIs for applications to access TPM module through kernel TPM drivers. %autosetup -n %{name}-%{version} %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 %install %make_install find %{buildroot}%{_libdir} -type f -name \*.la -delete -install -m 0644 -D -t %{buildroot}/%{_udevrulesdir}/ %{SOURCE1} - %files %doc README.md CHANGELOG.md %license LICENSE -%{_libdir}/libsapi.so.* -%{_libdir}/libtcti-device.so.* -%{_libdir}/libtcti-socket.so.* -%{_udevrulesdir}/60-tpm-udev.rules +%{_libdir}/libtss2-mu.so.* +%{_libdir}/libtss2-sys.so.* +%{_libdir}/libtss2-tcti-device.so.* +%{_libdir}/libtss2-tcti-mssim.so.* +%{_udevrulesdir}/%{udevrules_prefix}tpm-udev.rules %package devel @@ -54,22 +61,30 @@ This package contains headers and libraries required to build applications that use tpm2-tss. %files devel -%{_includedir}/sapi/ -%{_includedir}/tcti/ -%{_libdir}/libsapi.so -%{_libdir}/libtcti-device.so -%{_libdir}/libtcti-socket.so -%{_libdir}/pkgconfig/sapi.pc -%{_libdir}/pkgconfig/tcti-device.pc -%{_libdir}/pkgconfig/tcti-socket.pc -%{_mandir}/man3/Init*Tcti.3.gz -%{_mandir}/man7/tcti-*.7.gz +%{_includedir}/tss2/ +%{_libdir}/libtss2-mu.so +%{_libdir}/libtss2-sys.so +%{_libdir}/libtss2-tcti-device.so +%{_libdir}/libtss2-tcti-mssim.so +%{_libdir}/pkgconfig/tss2-mu.pc +%{_libdir}/pkgconfig/tss2-sys.pc +%{_libdir}/pkgconfig/tss2-tcti-device.pc +%{_libdir}/pkgconfig/tss2-tcti-mssim.pc +%{_mandir}/man3/Tss2*.3.gz +%{_mandir}/man7/tss2*.7.gz %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %changelog +* Mon Jul 2 2018 Yunying Sun - 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 - 1.4.0-1 - Update URLs to point to the new project location - Add README.md CHANGELOG.md to %%files directive