chantra / rpms / tpm2-tss

Forked from rpms/tpm2-tss 2 years ago
Clone

Blame SPECS/tpm2-tss.spec

7ed022
Name:           tpm2-tss
979ff2
Version:        2.3.2
2b9cfb
Release:        4%{?dist}
7ed022
Summary:        TPM2.0 Software Stack
7ed022
7ed022
# The entire source code is under BSD except implementation.h and tpmb.h which
7ed022
# is under TCGL(Trusted Computing Group License).
7ed022
License:        BSD
7ed022
URL:            https://github.com/tpm2-software/tpm2-tss
7ed022
Source0:        https://github.com/tpm2-software/tpm2-tss/releases/download/%{version}/%{name}-%{version}.tar.gz
979ff2
# patch submitted upstream https://github.com/tpm2-software/tpm2-tss/pull/1707
979ff2
Patch0:         0001-man-Clean-up-libmandoc-parser-warnings.patch
28cd4a
# Upstream patches
28cd4a
Patch1:         0001-esys-Check-object-handle-node-before-calling-compute.patch
28cd4a
Patch2:         0001-build-update-exported-symbols-map-for-libtss2-mu.patch
28cd4a
Patch3:         0001-esys-fix-Esys_StartAuthSession-called-with-optional-.patch
28cd4a
Patch4:         0001-esys-fixup-compute_encrypted_salt-err-handling-in-Es.patch
28cd4a
Patch5:         0001-esys-zero-out-ctx-salt-after-on-startAuthSession_fin.patch
28cd4a
Patch6:         0001-mu-Remove-use-of-VLAs-for-Marshalling-TPML-types.patch
28cd4a
Patch7:         0001-esys_iutil-use-memcmp-in-byte-array-comparison.patch
28cd4a
Patch8:         0001-tcti-device-getPollHandles-should-allow-num_handles-.patch
28cd4a
Patch9:         0001-tctildr-fix-segmentation-fault-if-name_conf-is-too-b.patch
28cd4a
Patch10:        0001-esys-fix-keysize-of-ECC-curve-TPM2_ECC_NISTP224.patch
28cd4a
Patch11:        0001-Esys_CreateLoaded-fix-resource-name-calculation.patch
28cd4a
Patch12:        0001-sys-match-counter-variable-type-for-cmdAuthsArray-co.patch
28cd4a
Patch13:        0001-Return-proper-error-code-on-memory-allocation-failur.patch
2b9cfb
Patch14:        0001-esys-fix-hmac-calculation-for-tpm2_clear-command.patch
2b9cfb
Patch15:        0001-tctildr-remove-the-private-implementation-of-strndup.patch
7ed022
7ed022
%global udevrules_prefix 60-
7ed022
7ed022
BuildRequires:  gcc
7ed022
BuildRequires:  gcc-c++
979ff2
BuildRequires:  doxygen
7ed022
BuildRequires:  autoconf-archive
7ed022
BuildRequires:  libtool
7ed022
BuildRequires:  pkgconfig
7ed022
BuildRequires:  systemd
7ed022
BuildRequires:  libgcrypt-devel
979ff2
BuildRequires:  openssl-devel
2b9cfb
Requires(pre):  shadow-utils
7ed022
7ed022
%description
7ed022
tpm2-tss is a software stack supporting Trusted Platform Module(TPM) 2.0 system
7ed022
APIs. It sits between TPM driver and applications, providing TPM2.0 specified
7ed022
APIs for applications to access TPM module through kernel TPM drivers.
7ed022
7ed022
%prep
979ff2
%autosetup -p1 -n %{name}-%{version}
7ed022
7ed022
%build
7ed022
# Use built-in tpm-udev.rules, with specified installation path and prefix.
7ed022
%configure --disable-static --disable-silent-rules --with-udevrulesdir=%{_udevrulesdir} --with-udevrulesprefix=%{udevrules_prefix}
7ed022
7ed022
# This is to fix Rpath errors. Taken from https://fedoraproject.org/wiki/Packaging:Guidelines#Removing_Rpath
7ed022
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
7ed022
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
7ed022
7ed022
%make_build
7ed022
7ed022
%install
7ed022
%make_install
7ed022
find %{buildroot}%{_libdir} -type f -name \*.la -delete
7ed022
28cd4a
%pre
28cd4a
getent group tss >/dev/null || groupadd -f -g 59 -r tss
28cd4a
if ! getent passwd tss >/dev/null ; then
28cd4a
    if ! getent passwd 59 >/dev/null ; then
28cd4a
      useradd -r -u 59 -g tss -d /dev/null -s /sbin/nologin -c "Account used for TPM access" tss
28cd4a
    else
28cd4a
      useradd -r -g tss -d /dev/null -s /sbin/nologin -c "Account used for TPM access" tss
28cd4a
    fi
28cd4a
fi
28cd4a
exit 0
28cd4a
7ed022
%files
7ed022
%doc README.md CHANGELOG.md
7ed022
%license LICENSE
7ed022
%{_libdir}/libtss2-mu.so.*
7ed022
%{_libdir}/libtss2-sys.so.*
7ed022
%{_libdir}/libtss2-esys.so.*
979ff2
%{_libdir}/libtss2-rc.so.*
979ff2
%{_libdir}/libtss2-tctildr.so.*
7ed022
%{_libdir}/libtss2-tcti-device.so.*
7ed022
%{_libdir}/libtss2-tcti-mssim.so.*
7ed022
%{_udevrulesdir}/%{udevrules_prefix}tpm-udev.rules
7ed022
7ed022
7ed022
%package        devel
7ed022
Summary:        Headers and libraries for building apps that use tpm2-tss 
7ed022
Requires:       %{name}%{_isa} = %{version}-%{release}
7ed022
7ed022
%description    devel
7ed022
This package contains headers and libraries required to build applications that
7ed022
use tpm2-tss.
7ed022
7ed022
%files devel
7ed022
%{_includedir}/tss2/
7ed022
%{_libdir}/libtss2-mu.so
7ed022
%{_libdir}/libtss2-sys.so
7ed022
%{_libdir}/libtss2-esys.so
979ff2
%{_libdir}/libtss2-rc.so
979ff2
%{_libdir}/libtss2-tctildr.so
979ff2
%{_libdir}/libtss2-tcti-default.so
7ed022
%{_libdir}/libtss2-tcti-device.so
7ed022
%{_libdir}/libtss2-tcti-mssim.so
7ed022
%{_libdir}/pkgconfig/tss2-mu.pc
7ed022
%{_libdir}/pkgconfig/tss2-sys.pc
7ed022
%{_libdir}/pkgconfig/tss2-esys.pc
979ff2
%{_libdir}/pkgconfig/tss2-rc.pc
979ff2
%{_libdir}/pkgconfig/tss2-tctildr.pc
7ed022
%{_libdir}/pkgconfig/tss2-tcti-device.pc
7ed022
%{_libdir}/pkgconfig/tss2-tcti-mssim.pc
979ff2
%{_mandir}/man3/*.3.gz
7ed022
%{_mandir}/man7/tss2*.7.gz
7ed022
7ed022
%post -p /sbin/ldconfig
7ed022
7ed022
%postun -p /sbin/ldconfig
7ed022
7ed022
%changelog
2b9cfb
* Tue Apr 20 2021 Jerry Snitselaar <jsnitsel@redhat.com> - 2.3.2-4
2b9cfb
- Fix hmac calculation for tpm2_clear command.
2b9cfb
- Remove private implementation of strndup.
2b9cfb
resolves: rhbz#1920825 rhbz#1940861
2b9cfb
28cd4a
* Mon Nov 16 2020 Jerry Snitselaar <jsnitsel@redhat.com> - 2.3.2-3
28cd4a
- Add tss user if doesn't exist.
28cd4a
- Update exported symbols map for libtss2-mu
28cd4a
- esys: Check object handle node before calling compute_session_value
28cd4a
- esys: fix resource name calculation
28cd4a
- esys: fix Esys_StartAuthSession called with optional params
28cd4a
- esys: fix keysize of ECC curve TPM2_ECC_NISTP224
28cd4a
- esys: fixup compute_encrypted_salt error handling
28cd4a
- esys: use memcmp in byte array comparison
28cd4a
- esys: zero out ctx->salt after startAuthSession_finish
28cd4a
- mu: Remove use of VLAs for Marshalling TPML types
28cd4a
- return proper error code on memory allocation failure
28cd4a
- sys: match counter variable type for cmdAuthsArray->count
28cd4a
- tcti-device: getPollHandles should allow num_handles query
28cd4a
- tctildr: fix segmentation fault if name_conf is too big
28cd4a
resolves: rhbz#1879071 rhbz#1855180
28cd4a
979ff2
* Mon Apr 27 2020 Jerry Snitselaar <jsnitsel@redhat.com> - 2.3.2-2
979ff2
- Clean up libmandoc parser errors.
979ff2
resolves: rhbz#1789684
979ff2
979ff2
* Thu Feb 20 2020 Jerry Snitselaar <jsnitsel@redhat.com> - 2.3.2-1
979ff2
- Update to 2.3.2 release
979ff2
resolves: rhbz#1789684
979ff2
979ff2
* Tue May 28 2019 Jerry Snitselaar <jsnitsel@redhat.com> - 2.0.0-5
979ff2
- Add CI gating support
979ff2
resolves: rhbz#1682418
979ff2
7ed022
* Mon Jul 23 2018 Jerry Snitselaar <jsnitsel@redhat.com> - 2.0.0-4
7ed022
- Remove TCGL from spec license list.
7ed022
7ed022
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-3
7ed022
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
7ed022
7ed022
* Wed Jul 4 2018 Yunying Sun <yunying.sun@intel.com> - 2.0.0-2
7ed022
- Re-enable ESAPI since gcrypt dependency is not an issue for Fedora
7ed022
- Bump release version to 2.0.0-2
7ed022
7ed022
* Mon Jul 2 2018 Yunying Sun <yunying.sun@intel.com> - 2.0.0-1
7ed022
- Update to 2.0.0 release (RHBZ#1508870)
7ed022
- Remove patch file 60-tpm-udev.rules, use upstream tpm-udev.rules instead
7ed022
- Disable ESAPI to fix build errors caused by dependency to libgcrypt 1.6.0
7ed022
- Add scriptlet to fix Rpath errors
7ed022
- Update file installation paths and names accordingly 
7ed022
7ed022
* Sun Mar 04 2018 Javier Martinez Canillas <javierm@redhat.com> - 1.4.0-1
7ed022
- Update URLs to point to the new project location
7ed022
- Add README.md CHANGELOG.md to %%files directive
7ed022
- Update to 1.4.0 release (RHBZ#1508870)
7ed022
7ed022
* Fri Feb 23 2018 Javier Martinez Canillas <javierm@redhat.com> - 1.3.0-4
7ed022
- Install udev rule for TPM character devices
7ed022
7ed022
* Wed Feb 21 2018 Javier Martinez Canillas <javierm@redhat.com> - 1.3.0-3
7ed022
- Remove ExclusiveArch: %%{ix86} x86_64 directive
7ed022
7ed022
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.0-2
7ed022
- Escape macros in %%changelog
7ed022
7ed022
* Fri Dec 08 2017 Javier Martinez Canillas <javierm@redhat.com> - 1.3.0-1
7ed022
- Update to 1.3.0 release
7ed022
7ed022
* Wed Nov 29 2017 Javier Martinez Canillas <javierm@redhat.com> - 1.3.0-0.1.rc2
7ed022
- Update to 1.3.0 release candidate 2 (RHBZ#1508870)
7ed022
- Remove global pkg_prefix since now the upstream repo and package names match
7ed022
- Update URLs to point to the new project location
7ed022
- Remove -Wno-int-in-bool-context compiler flag since now upstream takes care
7ed022
- Remove %%doc directive since README.md and CHANGELOG.md are not in the tarball
7ed022
- Add patch to include a LICENSE since the generated tarball does not have it
7ed022
7ed022
* Mon Aug 28 2017 Javier Martinez Canillas <javierm@redhat.com> - 1.2.0-1
7ed022
- Update to 1.2.0 release
7ed022
- Use tpm2-tss instead of TPM2.0-TSS as prefix since project name changed
7ed022
- Fix SPEC file access mode
7ed022
- Include new man pages in %%files directive
7ed022
7ed022
* Fri Aug 18 2017 Javier Martinez Canillas <javierm@redhat.com> - 1.1.0-3
7ed022
- Remove unneeded source tarballs (RHBZ#1482828)
7ed022
7ed022
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-2
7ed022
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
7ed022
7ed022
* Wed Jul 26 2017 Sun Yunying <yunying.sun@intel.com> - 1.1.0-1
7ed022
- Update to 1.1.0 release
7ed022
7ed022
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-3
7ed022
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
7ed022
7ed022
* Mon Dec 12 2016 Sun Yunying <yunying.sun@intel.com> - 1.0-2
7ed022
- Remove global macro pkg_version to avoid duplicate of version
7ed022
- Use ExclusiveArch instead of ExcludeArch
7ed022
- Use less wildcard in %%files section to be more specific
7ed022
- Add trailing slash at end of added directory in %%file section
7ed022
- Remove autoconf/automake/pkgconfig(cmocka) from BuildRequires
7ed022
- Increase release version to 2
7ed022
7ed022
* Fri Dec 2 2016 Sun Yunying <yunying.sun@intel.com> - 1.0-1
7ed022
- Initial version of the package