Blame SPECS/tpm2-pkcs11.spec

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