Blame SPECS/tpm2-tss.spec

a56c8e
Name:          tpm2-tss
a56c8e
Version:       3.0.3
6a14f3
Release:       8%{?dist}
a56c8e
Summary:       TPM2.0 Software Stack
a56c8e
a56c8e
# The entire source code is under BSD except implementation.h and tpmb.h which
a56c8e
# is under TCGL(Trusted Computing Group License).
a56c8e
License:       BSD and TCGL
a56c8e
URL:           https://github.com/tpm2-software/tpm2-tss
a56c8e
Source0:       https://github.com/tpm2-software/tpm2-tss/releases/download/%{version}/%{name}-%{version}.tar.gz
a56c8e
# doxygen crash
a56c8e
Patch0:        tpm2-tss-3.0.0-doxygen.patch
a56c8e
# OpenSSL 3 support
a56c8e
Patch1:        0001-FAPI-Fix-reading-of-the-root-certificate-for-provisi.patch
a56c8e
Patch2:        0002-FAPI-use-FAPI_TEST_EK_CERT_LESS-with-disable-self-ge.patch
a56c8e
Patch3:        0003-Makefile.am-Use-LIBCRYPTO_CFLAGS-when-building-FAPI.patch
a56c8e
Patch4:        0004-Test-Remove-duplicate-openssl-req-new.patch
a56c8e
Patch5:        0005-FAPI-Test-Call-EVP_DigestSignInit-in-the-correct-ord.patch
a56c8e
Patch6:        0006-FAPI-Test-Use-EVP_PKEY_base_id-to-detect-key-type.patch
a56c8e
Patch7:        0007-FAPI-Test-Change-RSA_sign-to-EVP_PKEY_sign.patch
a56c8e
Patch8:        0008-Require-OpenSSL-1.1.0.patch
a56c8e
Patch9:        0009-FAPI-Change-SHA256_Update-to-EVP_DigestUpdate.patch
a56c8e
Patch10:       0010-Test-Use-EVP_MAC_xxx-with-OpenSSL-3.0.patch
a56c8e
Patch11:       0011-Drop-support-for-OpenSSL-1.1.0.patch
a56c8e
Patch12:       0012-Implement-EVP_PKEY-export-import-for-OpenSSL-3.0.patch
6a14f3
Patch13:       0001-esys_crypto_ossl-remove-non-needed-_ex-OSSL-funcs.patch
6a14f3
Patch14:       0002-FAPI-Remove-useless-code-get_engine.patch
6a14f3
Patch15:       0003-FAPI-Remove-fauly-free-of-an-unused-field.patch
6a14f3
Patch16:       0004-Remove-deprecated-OpenSSL_add_all_algorithms.patch
6a14f3
Patch17:       0005-Use-default-OpenSSL-context-for-internal-crypto-oper.patch
6a14f3
Patch18:       0006-FAPI-Add-policy-computation-for-create-primary.patch
6a14f3
Patch19:       0007-FAPI-Fix-loading-of-primary-keys.patch
6a14f3
Patch20:       0008-Fix-file-descriptor-leak-when-tcti-initialization-fa.patch
6a14f3
Patch21:       0009-FAPI-Fix-leak-in-fapi-crypto-with-ossl3.patch
6a14f3
Patch22:       0010-FAPI-Fix-memory-leak-after-ifapi_init_primary_finish.patch
6a14f3
Patch23:       0011-esys-Return-an-error-if-ESYS_TR_NONE-is-passed-to-Es.patch
6a14f3
Patch24:       0012-FAPI-Fixed-memory-leak-when-ifapi_get_certificates-f.patch
6a14f3
Patch25:       0013-FAPI-Free-object-when-keystore_search_obj-failed.patch
6a14f3
Patch26:       0014-FAPI-Fixed-the-memory-leak-of-command-data-when-Fapi.patch
6a14f3
Patch27:       0015-ESYS-Fixed-annotation-error-of-Esys_TR_Deserialize.patch
6a14f3
Patch28:       0016-FAPI-Clean-up-memory-when-Fapi_Delete_Async-failed.patch
6a14f3
Patch29:       0017-FAPI-Clean-up-memory-when-Fapi_GetEsysBlob_Async-fai.patch
6a14f3
Patch30:       0018-FAPI-Initialize-object-used-for-keystore-search.patch
6a14f3
Patch31:       0019-MU-Fix-buffer-upcast-leading-to-misalignment.patch
6a14f3
Patch32:       0020-esys_iutil-fix-possible-NPD.patch
6a14f3
Patch33:       0021-sapi-scope-command-handles.patch
6a14f3
Patch34:       0022-fapi-use-correct-userdata-for-cbauthnv.patch
6a14f3
Patch35:       0023-SAPI-fix-number-of-handles-for-FlushContext.patch
a56c8e
a56c8e
a56c8e
%global udevrules_prefix 60-
a56c8e
a56c8e
BuildRequires: make
a56c8e
BuildRequires: autoconf-archive
a56c8e
BuildRequires: doxygen
a56c8e
BuildRequires: gcc
a56c8e
BuildRequires: gcc-c++
a56c8e
BuildRequires: json-c-devel
a56c8e
BuildRequires: libcurl-devel
a56c8e
BuildRequires: libgcrypt-devel
a56c8e
BuildRequires: libtool
a56c8e
BuildRequires: openssl-devel
a56c8e
BuildRequires: pkgconfig
a56c8e
BuildRequires: systemd
a56c8e
Requires(pre): shadow-utils
a56c8e
a56c8e
%description
a56c8e
tpm2-tss is a software stack supporting Trusted Platform Module(TPM) 2.0 system
a56c8e
APIs. It sits between TPM driver and applications, providing TPM2.0 specified
a56c8e
APIs for applications to access TPM module through kernel TPM drivers.
a56c8e
a56c8e
%prep
a56c8e
%autosetup -p1 -n %{name}-%{version}
a56c8e
a56c8e
%build
a56c8e
autoreconf -i
a56c8e
# Use built-in tpm-udev.rules, with specified installation path and prefix.
a56c8e
%configure --disable-static --disable-silent-rules \
a56c8e
           --with-udevrulesdir=%{_udevrulesdir} --with-udevrulesprefix=%{udevrules_prefix} \
a56c8e
           --with-runstatedir=%{_rundir} --with-tmpfilesdir=%{_tmpfilesdir} --with-sysusersdir=%{_sysusersdir}
a56c8e
a56c8e
# This is to fix Rpath errors. Taken from https://fedoraproject.org/wiki/Packaging:Guidelines#Removing_Rpath
a56c8e
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
a56c8e
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
a56c8e
a56c8e
%make_build
a56c8e
a56c8e
%install
a56c8e
%make_install
a56c8e
find %{buildroot}%{_libdir} -type f -name \*.la -delete
a56c8e
a56c8e
%pre
a56c8e
getent group tss >/dev/null || groupadd -f -g 59 -r tss
a56c8e
if ! getent passwd tss >/dev/null ; then
a56c8e
    if ! getent passwd 59 >/dev/null ; then
a56c8e
      useradd -r -u 59 -g tss -d /dev/null -s /sbin/nologin -c "Account used for TPM access" tss
a56c8e
    else
a56c8e
      useradd -r -g tss -d /dev/null -s /sbin/nologin -c "Account used for TPM access" tss
a56c8e
    fi
a56c8e
fi
a56c8e
exit 0
a56c8e
a56c8e
%ldconfig_scriptlets
a56c8e
a56c8e
%files
a56c8e
%doc README.md CHANGELOG.md
a56c8e
%license LICENSE
a56c8e
%{_sysconfdir}/tpm2-tss/
a56c8e
%{_libdir}/libtss2-mu.so.0*
a56c8e
%{_libdir}/libtss2-sys.so.1*
a56c8e
%{_libdir}/libtss2-esys.so.0*
a56c8e
%{_libdir}/libtss2-fapi.so.1*
a56c8e
%{_libdir}/libtss2-rc.so.0*
a56c8e
%{_libdir}/libtss2-tctildr.so.0*
a56c8e
%{_libdir}/libtss2-tcti-cmd.so.0*
a56c8e
%{_libdir}/libtss2-tcti-device.so.0*
a56c8e
%{_libdir}/libtss2-tcti-mssim.so.0*
a56c8e
%{_libdir}/libtss2-tcti-swtpm.so.0*
a56c8e
%{_sysusersdir}/tpm2-tss.conf
a56c8e
%{_tmpfilesdir}/tpm2-tss-fapi.conf
a56c8e
%{_udevrulesdir}/%{udevrules_prefix}tpm-udev.rules
a56c8e
a56c8e
%package        devel
a56c8e
Summary:        Headers and libraries for building apps that use tpm2-tss 
a56c8e
Requires:       %{name}%{_isa} = %{version}-%{release}
a56c8e
a56c8e
%description    devel
a56c8e
This package contains headers and libraries required to build applications that
a56c8e
use tpm2-tss.
a56c8e
a56c8e
%files devel
a56c8e
%{_includedir}/tss2/
a56c8e
%{_libdir}/libtss2-mu.so
a56c8e
%{_libdir}/libtss2-sys.so
a56c8e
%{_libdir}/libtss2-esys.so
a56c8e
%{_libdir}/libtss2-fapi.so
a56c8e
%{_libdir}/libtss2-rc.so
a56c8e
%{_libdir}/libtss2-tctildr.so
a56c8e
%{_libdir}/libtss2-tcti-cmd.so
a56c8e
%{_libdir}/libtss2-tcti-device.so
a56c8e
%{_libdir}/libtss2-tcti-mssim.so
a56c8e
%{_libdir}/libtss2-tcti-swtpm.so
a56c8e
%{_libdir}/pkgconfig/tss2-mu.pc
a56c8e
%{_libdir}/pkgconfig/tss2-sys.pc
a56c8e
%{_libdir}/pkgconfig/tss2-esys.pc
a56c8e
%{_libdir}/pkgconfig/tss2-fapi.pc
a56c8e
%{_libdir}/pkgconfig/tss2-rc.pc
a56c8e
%{_libdir}/pkgconfig/tss2-tctildr.pc
a56c8e
%{_libdir}/pkgconfig/tss2-tcti-cmd.pc
a56c8e
%{_libdir}/pkgconfig/tss2-tcti-device.pc
a56c8e
%{_libdir}/pkgconfig/tss2-tcti-mssim.pc
a56c8e
%{_libdir}/pkgconfig/tss2-tcti-swtpm.pc
a56c8e
%{_mandir}/man3/*.3.gz
a56c8e
%{_mandir}/man5/*.5.gz
a56c8e
%{_mandir}/man7/tss2*.7.gz
a56c8e
a56c8e
a56c8e
%changelog
6a14f3
* Wed Aug 10 2022 Štěpán Horáček <shoracek@redhat.com> - 3.0.3-8
6a14f3
- Fix memory leaks, potential crashes, upgrade to OpenSSL 3
6a14f3
  Resolves: rhbz#2041919
6a14f3
a56c8e
* Thu Feb 17 2022 Štěpán Horáček <shoracek@redhat.com> - 3.0.3-7
a56c8e
- Rebuild with latest json-c library
a56c8e
  Related: rhbz#2023328
a56c8e
a56c8e
* Wed Aug 18 2021 Štěpán Horáček <shoracek@redhat.com> - 3.0.3-6
a56c8e
- Fix failures while using OpenSSL 3
a56c8e
  Resolves: rhbz#1984634
a56c8e
a56c8e
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 3.0.3-5
a56c8e
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
a56c8e
  Related: rhbz#1991688
a56c8e
a56c8e
* Wed Jun 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.0.3-4
a56c8e
- Rebuilt for RHEL 9 BETA for openssl 3.0
a56c8e
  Related: rhbz#1971065
a56c8e
a56c8e
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.0.3-3
a56c8e
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
a56c8e
a56c8e
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-2
a56c8e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
a56c8e
a56c8e
* Thu Nov 26 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 3.0.3-1
a56c8e
- Update to 3.0.2
a56c8e
a56c8e
* Sun Nov 22 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 3.0.2-1
a56c8e
- Update to 3.0.2
a56c8e
a56c8e
* Wed Sep 23 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 3.0.1-1
a56c8e
- Update to 3.0.1
a56c8e
a56c8e
* Tue Sep 15 2020 Than Ngo <than@redhat.com> - 3.0.0-4
a56c8e
- Fix doxygen crash
a56c8e
a56c8e
* Tue Sep 15 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 3.0.0-3
a56c8e
- Create tss user, if it doesn't exist, for userspace TPM access
a56c8e
a56c8e
* Fri Aug 07 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 3.0.0-2
a56c8e
- Install sysusers config in sysusersdir (rhbz #1834519)
a56c8e
a56c8e
* Wed Aug 05 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 3.0.0-1
a56c8e
- Update to 3.0.0
a56c8e
a56c8e
* Wed Aug 05 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 2.4.2-1
a56c8e
- Update to 2.4.2
a56c8e
a56c8e
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.1-2
a56c8e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
a56c8e
a56c8e
* Thu May 14 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 2.4.1-1
a56c8e
- Update to 2.4.1
a56c8e
a56c8e
* Fri May 08 2020 Paul Wouters <pwouters@redhat.com> - 2.4.0-3
a56c8e
- Use proper rundir and tmpfiles macros so proper directories are used
a56c8e
a56c8e
* Tue Apr 21 2020 Björn Esser <besser82@fedoraproject.org> - 2.4.0-2
a56c8e
- Rebuild (json-c)
a56c8e
a56c8e
* Thu Mar 12 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 2.4.0-1
a56c8e
- Update to 2.4.0 release
a56c8e
a56c8e
* Mon Feb 24 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 2.3.3-1
a56c8e
- Update to 2.3.3 release
a56c8e
a56c8e
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.2-2
a56c8e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
a56c8e
a56c8e
* Fri Dec 13 2019 Yunying Sun <yunying.sun@intel.com> - 2.3.2-1
a56c8e
- Update to 2.3.2 release
a56c8e
a56c8e
* Fri Sep 6 2019 Yunying Sun <yunying.sun@intel.com> - 2.3.1-1
a56c8e
- Update to 2.3.1 release
a56c8e
a56c8e
* Thu Aug 15 2019 Yunying Sun <yunying.sun@intel.com> - 2.3.0-1
a56c8e
- Update to 2.3.0 release
a56c8e
a56c8e
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.3-2
a56c8e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
a56c8e
a56c8e
* Wed May 29 2019 Yunying Sun <yunying.sun@intel.com> - 2.2.3-1
a56c8e
- Update to 2.2.3 release
a56c8e
a56c8e
* Fri Mar 29 2019 Yunying Sun <yunying.sun@intel.com> - 2.2.2-1
a56c8e
- Update to 2.2.2 release
a56c8e
a56c8e
* Mon Mar  4 2019 Peter Robinson <pbrobinson@fedoraproject.org> 2.2.1-1
a56c8e
- Update to 2.2.1 release
a56c8e
a56c8e
* Wed Feb 06 2019 Javier Martinez Canillas <javierm@redhat.com> - 2.2.0-1
a56c8e
- Update to 2.2.0 release
a56c8e
a56c8e
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2
a56c8e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
a56c8e
a56c8e
* Wed Oct 10 2018 Yunying Sun <yunying.sun@intel.com> - 2.1.0-1
a56c8e
- Update to 2.1.0 release
a56c8e
a56c8e
* Thu Aug 30 2018 Yunying Sun <yunying.sun@intel.com> - 2.0.1-1
a56c8e
- Update to 2.0.1 release
a56c8e
a56c8e
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-3
a56c8e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
a56c8e
a56c8e
* Wed Jul 4 2018 Yunying Sun <yunying.sun@intel.com> - 2.0.0-2
a56c8e
- Re-enable ESAPI since gcrypt dependency is not an issue for Fedora
a56c8e
- Bump release version to 2.0.0-2
a56c8e
a56c8e
* Mon Jul 2 2018 Yunying Sun <yunying.sun@intel.com> - 2.0.0-1
a56c8e
- Update to 2.0.0 release (RHBZ#1508870)
a56c8e
- Remove patch file 60-tpm-udev.rules, use upstream tpm-udev.rules instead
a56c8e
- Disable ESAPI to fix build errors caused by dependency to libgcrypt 1.6.0
a56c8e
- Add scriptlet to fix Rpath errors
a56c8e
- Update file installation paths and names accordingly 
a56c8e
a56c8e
* Sun Mar 04 2018 Javier Martinez Canillas <javierm@redhat.com> - 1.4.0-1
a56c8e
- Update URLs to point to the new project location
a56c8e
- Add README.md CHANGELOG.md to %%files directive
a56c8e
- Update to 1.4.0 release (RHBZ#1508870)
a56c8e
a56c8e
* Fri Feb 23 2018 Javier Martinez Canillas <javierm@redhat.com> - 1.3.0-4
a56c8e
- Install udev rule for TPM character devices
a56c8e
a56c8e
* Wed Feb 21 2018 Javier Martinez Canillas <javierm@redhat.com> - 1.3.0-3
a56c8e
- Remove ExclusiveArch: %%{ix86} x86_64 directive
a56c8e
a56c8e
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.0-2
a56c8e
- Escape macros in %%changelog
a56c8e
a56c8e
* Fri Dec 08 2017 Javier Martinez Canillas <javierm@redhat.com> - 1.3.0-1
a56c8e
- Update to 1.3.0 release
a56c8e
a56c8e
* Wed Nov 29 2017 Javier Martinez Canillas <javierm@redhat.com> - 1.3.0-0.1.rc2
a56c8e
- Update to 1.3.0 release candidate 2 (RHBZ#1508870)
a56c8e
- Remove global pkg_prefix since now the upstream repo and package names match
a56c8e
- Update URLs to point to the new project location
a56c8e
- Remove -Wno-int-in-bool-context compiler flag since now upstream takes care
a56c8e
- Remove %%doc directive since README.md and CHANGELOG.md are not in the tarball
a56c8e
- Add patch to include a LICENSE since the generated tarball does not have it
a56c8e
a56c8e
* Mon Aug 28 2017 Javier Martinez Canillas <javierm@redhat.com> - 1.2.0-1
a56c8e
- Update to 1.2.0 release
a56c8e
- Use tpm2-tss instead of TPM2.0-TSS as prefix since project name changed
a56c8e
- Fix SPEC file access mode
a56c8e
- Include new man pages in %%files directive
a56c8e
a56c8e
* Fri Aug 18 2017 Javier Martinez Canillas <javierm@redhat.com> - 1.1.0-3
a56c8e
- Remove unneeded source tarballs (RHBZ#1482828)
a56c8e
a56c8e
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-2
a56c8e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
a56c8e
a56c8e
* Wed Jul 26 2017 Sun Yunying <yunying.sun@intel.com> - 1.1.0-1
a56c8e
- Update to 1.1.0 release
a56c8e
a56c8e
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-3
a56c8e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
a56c8e
a56c8e
* Mon Dec 12 2016 Sun Yunying <yunying.sun@intel.com> - 1.0-2
a56c8e
- Remove global macro pkg_version to avoid duplicate of version
a56c8e
- Use ExclusiveArch instead of ExcludeArch
a56c8e
- Use less wildcard in %%files section to be more specific
a56c8e
- Add trailing slash at end of added directory in %%file section
a56c8e
- Remove autoconf/automake/pkgconfig(cmocka) from BuildRequires
a56c8e
- Increase release version to 2
a56c8e
a56c8e
* Fri Dec 2 2016 Sun Yunying <yunying.sun@intel.com> - 1.0-1
a56c8e
- Initial version of the package