2020-03-02 21:55:23 +00:00
|
|
|
%global candidate RC1
|
2019-02-20 14:19:50 +00:00
|
|
|
|
|
|
|
Name: tpm2-pkcs11
|
2020-03-02 21:55:23 +00:00
|
|
|
Version: 1.1.0
|
|
|
|
Release: 0.1%{?candidate:.%{candidate}}%{?dist}
|
2019-02-20 14:19:50 +00:00
|
|
|
Summary: PKCS#11 interface for TPM 2.0 hardware
|
|
|
|
|
|
|
|
License: BSD
|
|
|
|
URL: https://github.com/tpm2-software/tpm2-pkcs11
|
2020-01-07 08:31:41 +00:00
|
|
|
Source0: https://github.com/tpm2-software/%{name}/releases/download/%{version}%{?candidate:-%{candidate}}/%{name}-%{version}%{?candidate:-%{candidate}}.tar.gz
|
|
|
|
Source1: https://github.com/tpm2-software/%{name}/releases/download/%{version}%{?candidate:-%{candidate}}/%{name}-%{version}%{?candidate:-%{candidate}}.tar.gz.asc
|
|
|
|
# William Roberts (Bill Roberts) key from pgp.mit.edu
|
|
|
|
Source2: gpgkey-8E1F50C1.gpg
|
2019-02-20 14:19:50 +00:00
|
|
|
|
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: make
|
|
|
|
BuildRequires: python3
|
|
|
|
BuildRequires: libgcrypt-devel
|
2019-12-26 02:04:19 +00:00
|
|
|
BuildRequires: libyaml-devel
|
|
|
|
BuildRequires: openssl-devel
|
2019-02-20 14:19:50 +00:00
|
|
|
BuildRequires: p11-kit-devel
|
2019-12-26 02:04:19 +00:00
|
|
|
BuildRequires: sqlite-devel
|
|
|
|
BuildRequires: tpm2-tools
|
|
|
|
BuildRequires: tpm2-tss-devel
|
2019-02-20 14:19:50 +00:00
|
|
|
# for tests
|
|
|
|
BuildRequires: libcmocka-devel
|
2019-08-20 15:12:10 +00:00
|
|
|
BuildRequires: dbus-daemon
|
2019-04-23 10:58:41 +00:00
|
|
|
# for tools
|
|
|
|
BuildRequires: python3-devel
|
2019-12-26 02:04:19 +00:00
|
|
|
BuildRequires: python3-pyasn1-modules
|
2019-04-23 12:38:22 +00:00
|
|
|
BuildRequires: python3-pyyaml
|
|
|
|
BuildRequires: python3-cryptography
|
2020-01-07 08:31:41 +00:00
|
|
|
# for tarball signature verification
|
|
|
|
BuildRequires: gnupg2
|
2019-04-23 10:58:41 +00:00
|
|
|
|
2019-02-20 14:19:50 +00:00
|
|
|
%description
|
|
|
|
PKCS #11 is a Public-Key Cryptography Standard that defines a standard method
|
|
|
|
to access cryptographic services from tokens/ devices such as hardware security
|
|
|
|
modules (HSM), smart cards, etc. In this project we intend to use a TPM2 device
|
|
|
|
as the cryptographic token.
|
|
|
|
|
2019-12-26 02:04:19 +00:00
|
|
|
%package tools
|
|
|
|
Summary: The tools required to setup and configure TPM2 for PKCS#11
|
|
|
|
# Automatic generator does not work for me even though the requires.txt is in place
|
|
|
|
Requires: python3-pyyaml
|
|
|
|
Requires: python3-cryptography
|
|
|
|
|
2019-04-23 10:58:41 +00:00
|
|
|
%description tools
|
|
|
|
The tools required to setup and configure TPM2 for PKCS#11.
|
|
|
|
|
2019-02-20 14:19:50 +00:00
|
|
|
%prep
|
2020-01-07 08:31:41 +00:00
|
|
|
gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
|
2020-03-02 21:55:23 +00:00
|
|
|
%autosetup -p1 -n %{name}-%{version}%{?candidate:-%{candidate}}
|
2019-02-20 14:19:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%configure --enable-unit
|
2019-12-26 02:04:19 +00:00
|
|
|
%{make_build}
|
2019-04-23 10:58:41 +00:00
|
|
|
cd tools
|
|
|
|
%py3_build
|
2019-02-20 14:19:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
%make_install
|
|
|
|
rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/tpm2-pkcs11.pc
|
|
|
|
[ -f $RPM_BUILD_ROOT%{_libdir}/pkcs11/libtpm2_pkcs11.la ] && \
|
|
|
|
rm $RPM_BUILD_ROOT%{_libdir}/pkcs11/libtpm2_pkcs11.la
|
2019-10-11 09:02:55 +00:00
|
|
|
[ -f $RPM_BUILD_ROOT%{_libdir}/pkcs11/libtpm2_pkcs11.a ] && \
|
|
|
|
rm $RPM_BUILD_ROOT%{_libdir}/pkcs11/libtpm2_pkcs11.a
|
2019-04-23 10:58:41 +00:00
|
|
|
cd tools
|
|
|
|
%py3_install
|
|
|
|
sed -i "s/python/python3/g" tpm2_ptool
|
|
|
|
install -Dpm 755 tpm2_ptool $RPM_BUILD_ROOT%{_bindir}/tpm2_ptool
|
2019-02-20 14:19:50 +00:00
|
|
|
|
2019-12-26 02:04:19 +00:00
|
|
|
|
|
|
|
%check
|
|
|
|
make check
|
|
|
|
cd tools
|
|
|
|
%{__python3} setup.py test
|
|
|
|
|
|
|
|
|
2019-02-20 14:19:50 +00:00
|
|
|
%files
|
|
|
|
%license LICENSE
|
|
|
|
%{_datadir}/p11-kit/modules/tpm2_pkcs11.module
|
|
|
|
%%dir %{_libdir}/pkcs11
|
|
|
|
%{_libdir}/pkcs11/libtpm2_pkcs11.so
|
|
|
|
%{_libdir}/pkcs11/libtpm2_pkcs11.so.0*
|
2019-08-20 15:12:10 +00:00
|
|
|
|
2019-04-23 10:58:41 +00:00
|
|
|
%files tools
|
|
|
|
%{_bindir}/tpm2_ptool
|
|
|
|
%{python3_sitelib}/tpm2_pkcs11/*
|
|
|
|
%{python3_sitelib}/tpm2_pkcs11_tools-*/*
|
2019-02-20 14:19:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2020-03-02 21:55:23 +00:00
|
|
|
* Mon Mar 2 2020 Peter Robinson <pbrobinson@fedoraproject.org> 1.1.0-0.1-RC1
|
|
|
|
- Update to 1.1.0 RC1 candidate
|
|
|
|
|
2020-02-10 14:43:38 +00:00
|
|
|
* Mon Feb 10 2020 Jakub Jelen <jjelen@redhat.com> - 1.0.1-3
|
|
|
|
- Unbreak build with gcc10 (#1796383)
|
|
|
|
|
2020-01-31 01:53:31 +00:00
|
|
|
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
2020-01-07 08:31:41 +00:00
|
|
|
* Tue Jan 07 2020 Jakub Jelen <jjelen@redhat.com> - 1.0.1-1
|
|
|
|
- New upstream release (#1784580)
|
|
|
|
|
2019-12-31 14:09:38 +00:00
|
|
|
* Tue Dec 31 2019 Peter Robinson <pbrobinson@fedoraproject.org> 1.0-1
|
|
|
|
- Update to 1.0 stable release
|
|
|
|
|
2019-12-26 02:04:19 +00:00
|
|
|
* Thu Dec 26 2019 Peter Robinson <pbrobinson@fedoraproject.org> 1.0-0.1-RC1
|
|
|
|
- Update to 1.0 RC1 candidate
|
|
|
|
|
2019-10-11 09:02:55 +00:00
|
|
|
* Fri Oct 11 2019 Jakub Jelen <jjelen@redhat.com> - 0-0.3.20191011git0b7ceff
|
|
|
|
- Update to current git version
|
|
|
|
- Fix missing requires (#1757179)
|
|
|
|
|
2019-10-03 12:39:38 +00:00
|
|
|
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0-0.7.20190813git2f3058c
|
|
|
|
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
|
|
|
|
2019-08-21 17:16:28 +00:00
|
|
|
* Wed Aug 21 2019 Miro Hrončok <mhroncok@redhat.com> - 0-0.6.20190813git2f3058c
|
|
|
|
- Rebuilt for Python 3.8
|
|
|
|
|
2019-08-20 15:12:10 +00:00
|
|
|
* Tue Aug 20 2019 Peter Robinson <pbrobinson@fedoraproject.org> 0-0.5.20190813git2f3058c
|
|
|
|
- Update to new git snapshot for better use of tss2-tools 4.0 features
|
|
|
|
|
2019-08-19 09:07:12 +00:00
|
|
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0-0.4.20190219git1e84553
|
|
|
|
- Rebuilt for Python 3.8
|
|
|
|
|
2019-07-27 01:44:57 +00:00
|
|
|
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.3.20190219git1e84553
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
2019-04-23 11:00:17 +00:00
|
|
|
* Tue Apr 23 2019 Jakub Jelen <jjelen@redhat.com> - 0-0.2.20190219git1e84553
|
|
|
|
- Package missing python tool for TPM2 initialization
|
|
|
|
- Update to current version from github
|
|
|
|
|
2019-02-20 14:19:50 +00:00
|
|
|
* Tue Feb 19 2019 Jakub Jelen <jjelen@redhat.com> - 0-0.1.20190219git836d715
|
|
|
|
- Initial release for Fedora
|
|
|
|
|
|
|
|
|