|
|
32281e |
%ifarch s390x
|
|
|
32281e |
# https://bugzilla.redhat.com/show_bug.cgi?id=1861276 -> Disable LTO for now
|
|
|
32281e |
%define _lto_cflags %{nil}
|
|
|
32281e |
%endif
|
|
|
32281e |
|
|
|
32281e |
#global candidate RC0
|
|
|
32281e |
|
|
|
32281e |
Name: tpm2-pkcs11
|
|
|
32281e |
Version: 1.6.0
|
|
|
32281e |
Release: 1%{?candidate:.%{candidate}}%{?dist}
|
|
|
32281e |
Summary: PKCS#11 interface for TPM 2.0 hardware
|
|
|
32281e |
|
|
|
32281e |
License: BSD
|
|
|
32281e |
URL: https://github.com/tpm2-software/tpm2-pkcs11
|
|
|
32281e |
Source0: https://github.com/tpm2-software/%{name}/releases/download/%{version}%{?candidate:-%{candidate}}/%{name}-%{version}%{?candidate:-%{candidate}}.tar.gz
|
|
|
32281e |
Source1: https://github.com/tpm2-software/%{name}/releases/download/%{version}%{?candidate:-%{candidate}}/%{name}-%{version}%{?candidate:-%{candidate}}.tar.gz.asc
|
|
|
32281e |
# William Roberts (Bill Roberts) key from pgp.mit.edu
|
|
|
32281e |
Source2: gpgkey-8E1F50C1.gpg
|
|
|
32281e |
# Revert of ea5f1c078aff7fb09fb5fc78403d4f8c868c4ea6 to build on EPEL 8
|
|
|
32281e |
Patch0: revert-require-py37.patch
|
|
|
32281e |
Patch1: 0001-Backup-with-sqlite3-special-command.patch
|
|
|
32281e |
Patch2: 0002-utils-fix-stringop-overread-in-str_padded_copy.patch
|
|
|
32281e |
Patch3: 0003-utils-remove-debug-log-message-from-str_padded_copy.patch
|
|
|
32281e |
Patch4: 0004-tpm2_ptool-do-not-re-encode-the-signed-data-when-imp.patch
|
|
|
32281e |
Patch5: 0005-db-fix-upgrade-backup.patch
|
|
|
32281e |
Patch6: 0006-db-fix-upgrade-to-version-4.patch
|
|
|
32281e |
|
|
|
32281e |
|
|
|
32281e |
BuildRequires: autoconf-archive
|
|
|
32281e |
BuildRequires: automake
|
|
|
32281e |
BuildRequires: libtool
|
|
|
32281e |
BuildRequires: gcc
|
|
|
32281e |
BuildRequires: make
|
|
|
32281e |
BuildRequires: python3
|
|
|
32281e |
BuildRequires: libgcrypt-devel
|
|
|
32281e |
BuildRequires: libyaml-devel
|
|
|
32281e |
BuildRequires: openssl-devel
|
|
|
32281e |
BuildRequires: p11-kit-devel
|
|
|
32281e |
BuildRequires: sqlite-devel
|
|
|
32281e |
BuildRequires: tpm2-tools
|
|
|
32281e |
BuildRequires: tpm2-tss-devel
|
|
|
32281e |
# for tests
|
|
|
32281e |
BuildRequires: libcmocka-devel
|
|
|
32281e |
BuildRequires: dbus-daemon
|
|
|
32281e |
# for tools
|
|
|
32281e |
BuildRequires: python3-devel
|
|
|
32281e |
BuildRequires: python3-setuptools
|
|
|
32281e |
BuildRequires: python3-pyasn1-modules
|
|
|
32281e |
BuildRequires: python3-pyyaml
|
|
|
32281e |
BuildRequires: python3-cryptography
|
|
|
32281e |
# for tarball signature verification
|
|
|
32281e |
BuildRequires: gnupg2
|
|
|
32281e |
|
|
|
32281e |
%description
|
|
|
32281e |
PKCS #11 is a Public-Key Cryptography Standard that defines a standard method
|
|
|
32281e |
to access cryptographic services from tokens/ devices such as hardware security
|
|
|
32281e |
modules (HSM), smart cards, etc. In this project we intend to use a TPM2 device
|
|
|
32281e |
as the cryptographic token.
|
|
|
32281e |
|
|
|
32281e |
%package tools
|
|
|
32281e |
Summary: The tools required to setup and configure TPM2 for PKCS#11
|
|
|
32281e |
# Automatic generator does not work for me even though the requires.txt is in place
|
|
|
32281e |
Requires: tpm2-tools
|
|
|
32281e |
Requires: python3-cryptography
|
|
|
32281e |
Requires: python3-pyyaml
|
|
|
32281e |
Requires: python3-pyasn1-modules
|
|
|
32281e |
Requires: sqlite
|
|
|
32281e |
|
|
|
32281e |
%description tools
|
|
|
32281e |
The tools required to setup and configure TPM2 for PKCS#11.
|
|
|
32281e |
|
|
|
32281e |
%prep
|
|
|
32281e |
gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
|
|
|
32281e |
%autosetup -p1 -n %{name}-%{version}%{?candidate:-%{candidate}}
|
|
|
32281e |
|
|
|
32281e |
|
|
|
32281e |
%build
|
|
|
32281e |
%configure --enable-unit
|
|
|
32281e |
%{make_build}
|
|
|
32281e |
cd tools
|
|
|
32281e |
%py3_build
|
|
|
32281e |
|
|
|
32281e |
|
|
|
32281e |
%install
|
|
|
32281e |
%make_install
|
|
|
32281e |
rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/tpm2-pkcs11.pc
|
|
|
32281e |
[ -f $RPM_BUILD_ROOT%{_libdir}/pkcs11/libtpm2_pkcs11.la ] && \
|
|
|
32281e |
rm $RPM_BUILD_ROOT%{_libdir}/pkcs11/libtpm2_pkcs11.la
|
|
|
32281e |
[ -f $RPM_BUILD_ROOT%{_libdir}/pkcs11/libtpm2_pkcs11.a ] && \
|
|
|
32281e |
rm $RPM_BUILD_ROOT%{_libdir}/pkcs11/libtpm2_pkcs11.a
|
|
|
32281e |
cd tools
|
|
|
32281e |
%py3_install
|
|
|
32281e |
install -Dpm 755 tpm2_ptool $RPM_BUILD_ROOT%{_bindir}/tpm2_ptool
|
|
|
32281e |
|
|
|
32281e |
|
|
|
32281e |
%check
|
|
|
32281e |
make check
|
|
|
32281e |
cd tools
|
|
|
32281e |
%{__python3} setup.py test
|
|
|
32281e |
|
|
|
32281e |
|
|
|
32281e |
%files
|
|
|
32281e |
%license LICENSE
|
|
|
32281e |
%{_datadir}/p11-kit/modules/tpm2_pkcs11.module
|
|
|
32281e |
%%dir %{_libdir}/pkcs11
|
|
|
32281e |
%{_libdir}/pkcs11/libtpm2_pkcs11.so
|
|
|
32281e |
%{_libdir}/pkcs11/libtpm2_pkcs11.so.0*
|
|
|
32281e |
|
|
|
32281e |
%files tools
|
|
|
32281e |
%{_bindir}/tpm2_ptool
|
|
|
32281e |
%{python3_sitelib}/tpm2_pkcs11/*
|
|
|
32281e |
%{python3_sitelib}/tpm2_pkcs11_tools-*/*
|
|
|
32281e |
|
|
|
32281e |
|
|
|
32281e |
%changelog
|
|
|
32281e |
* Wed Nov 16 2022 Štěpán Horáček <shoracek@redhat.com> - 1.6.0-1
|
|
|
32281e |
- Update to 1.6.0 for RHEL 8
|
|
|
32281e |
Resolves: rhbz#1896871
|
|
|
32281e |
|
|
|
32281e |
* Tue Mar 23 2021 Davide Cavalca <dcavalca@fedoraproject.org> - 1.3.2-2
|
|
|
32281e |
- Revert python 3.7 requirement commit to allow building on EPEL 8
|
|
|
32281e |
|
|
|
32281e |
* Mon Aug 10 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.3.2-1
|
|
|
32281e |
- Update to 1.3.2
|
|
|
32281e |
|
|
|
32281e |
* Mon Jul 27 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.3.1-1
|
|
|
32281e |
- Update to 1.3.1
|
|
|
32281e |
|
|
|
32281e |
* Tue Jul 07 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.3.0-1
|
|
|
32281e |
- Update to 1.3.0
|
|
|
32281e |
|
|
|
32281e |
* Thu Jul 02 2020 Jakub Jelen <jjelen@redhat.com> - 1.3.0-0.1-RC0
|
|
|
32281e |
- Update to 1.3.0-RC0
|
|
|
32281e |
|
|
|
32281e |
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.2.0-2
|
|
|
32281e |
- Rebuilt for Python 3.9
|
|
|
32281e |
|
|
|
32281e |
* Mon Mar 30 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.2.0-1
|
|
|
32281e |
- Update to 1.2.0
|
|
|
32281e |
|
|
|
32281e |
* Mon Mar 09 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.1.0-1
|
|
|
32281e |
- Update to 1.1.0
|
|
|
32281e |
|
|
|
32281e |
* Mon Mar 2 2020 Peter Robinson <pbrobinson@fedoraproject.org> 1.1.0-0.1-RC1
|
|
|
32281e |
- Update to 1.1.0 RC1 candidate
|
|
|
32281e |
|
|
|
32281e |
* Mon Feb 10 2020 Jakub Jelen <jjelen@redhat.com> - 1.0.1-3
|
|
|
32281e |
- Unbreak build with gcc10 (#1796383)
|
|
|
32281e |
|
|
|
32281e |
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-2
|
|
|
32281e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
32281e |
|
|
|
32281e |
* Tue Jan 07 2020 Jakub Jelen <jjelen@redhat.com> - 1.0.1-1
|
|
|
32281e |
- New upstream release (#1784580)
|
|
|
32281e |
|
|
|
32281e |
* Tue Dec 31 2019 Peter Robinson <pbrobinson@fedoraproject.org> 1.0-1
|
|
|
32281e |
- Update to 1.0 stable release
|
|
|
32281e |
|
|
|
32281e |
* Thu Dec 26 2019 Peter Robinson <pbrobinson@fedoraproject.org> 1.0-0.1-RC1
|
|
|
32281e |
- Update to 1.0 RC1 candidate
|
|
|
32281e |
|
|
|
32281e |
* Fri Oct 11 2019 Jakub Jelen <jjelen@redhat.com> - 0-0.3.20191011git0b7ceff
|
|
|
32281e |
- Update to current git version
|
|
|
32281e |
- Fix missing requires (#1757179)
|
|
|
32281e |
|
|
|
32281e |
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0-0.7.20190813git2f3058c
|
|
|
32281e |
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
|
|
32281e |
|
|
|
32281e |
* Wed Aug 21 2019 Miro Hrončok <mhroncok@redhat.com> - 0-0.6.20190813git2f3058c
|
|
|
32281e |
- Rebuilt for Python 3.8
|
|
|
32281e |
|
|
|
32281e |
* Tue Aug 20 2019 Peter Robinson <pbrobinson@fedoraproject.org> 0-0.5.20190813git2f3058c
|
|
|
32281e |
- Update to new git snapshot for better use of tss2-tools 4.0 features
|
|
|
32281e |
|
|
|
32281e |
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0-0.4.20190219git1e84553
|
|
|
32281e |
- Rebuilt for Python 3.8
|
|
|
32281e |
|
|
|
32281e |
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.3.20190219git1e84553
|
|
|
32281e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
32281e |
|
|
|
32281e |
* Tue Apr 23 2019 Jakub Jelen <jjelen@redhat.com> - 0-0.2.20190219git1e84553
|
|
|
32281e |
- Package missing python tool for TPM2 initialization
|
|
|
32281e |
- Update to current version from github
|
|
|
32281e |
|
|
|
32281e |
* Tue Feb 19 2019 Jakub Jelen <jjelen@redhat.com> - 0-0.1.20190219git836d715
|
|
|
32281e |
- Initial release for Fedora
|