chantra / rpms / tpm2-tss

Forked from rpms/tpm2-tss 2 years ago
Clone

Blame SPECS/tpm2-tss.spec

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