Blame SPECS/tpm2-pkcs11.spec

4dee9c
%ifarch s390x
4dee9c
# https://bugzilla.redhat.com/show_bug.cgi?id=1861276 -> Disable LTO for now
4dee9c
%define _lto_cflags %{nil}
4dee9c
%endif
4dee9c
4dee9c
#global candidate RC0
4dee9c
4dee9c
Name:		tpm2-pkcs11
4dee9c
Version:	1.5.0
4dee9c
Release:	9%{?candidate:.%{candidate}}%{?dist}
4dee9c
Summary:	PKCS#11 interface for TPM 2.0 hardware
4dee9c
4dee9c
License:	BSD
4dee9c
URL:		https://github.com/tpm2-software/tpm2-pkcs11
4dee9c
Source0:	https://github.com/tpm2-software/%{name}/releases/download/%{version}%{?candidate:-%{candidate}}/%{name}-%{version}%{?candidate:-%{candidate}}.tar.gz
4dee9c
Source1:	https://github.com/tpm2-software/%{name}/releases/download/%{version}%{?candidate:-%{candidate}}/%{name}-%{version}%{?candidate:-%{candidate}}.tar.gz.asc
4dee9c
# William Roberts (Bill Roberts) key from pgp.mit.edu
4dee9c
Source2:	gpgkey-8E1F50C1.gpg
4dee9c
Patch0:         tpm2-pkcs11-gcc11.patch
4dee9c
# https://github.com/tpm2-software/tpm2-pkcs11/commit/78f4e2b47d02cb8215f252e77c68a81dfe4afa30
4dee9c
Patch1:         tpm2-pkcs11-s390x.patch
4dee9c
Patch2:         tpm2-pkcs11-1.5.0-openssl3.patch
4dee9c
4dee9c
BuildRequires:	gcc
4dee9c
BuildRequires:	make
4dee9c
BuildRequires:	python3
4dee9c
BuildRequires:	libgcrypt-devel
4dee9c
BuildRequires:	libyaml-devel
4dee9c
BuildRequires:	openssl-devel
4dee9c
BuildRequires:	p11-kit-devel
4dee9c
BuildRequires:	sqlite-devel
4dee9c
BuildRequires:	tpm2-tools
4dee9c
BuildRequires:	tpm2-tss-devel
4dee9c
# for tests
4dee9c
BuildRequires:	libcmocka-devel
4dee9c
BuildRequires:	dbus-daemon
4dee9c
# for tools
4dee9c
BuildRequires:	python3-devel
4dee9c
BuildRequires:	python3-setuptools
4dee9c
BuildRequires:	python3-pyasn1-modules
4dee9c
BuildRequires:	python3-pyyaml
4dee9c
BuildRequires:	python3-cryptography
4dee9c
# for tarball signature verification
4dee9c
BuildRequires:	gnupg2
4dee9c
4dee9c
%description
4dee9c
PKCS #11 is a Public-Key Cryptography Standard that defines a standard method
4dee9c
to access cryptographic services from tokens/ devices such as hardware security
4dee9c
modules (HSM), smart cards, etc. In this project we intend to use a TPM2 device
4dee9c
as the cryptographic token.
4dee9c
4dee9c
%package tools
4dee9c
Summary: The tools required to setup and configure TPM2 for PKCS#11
4dee9c
# Automatic generator does not work for me even though the requires.txt is in place
4dee9c
Requires:	python3-cryptography
4dee9c
Requires:	python3-pyyaml
4dee9c
Requires:	python3-pyasn1-modules
4dee9c
4dee9c
%description tools
4dee9c
The tools required to setup and configure TPM2 for PKCS#11.
4dee9c
4dee9c
%prep
4dee9c
gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
4dee9c
%autosetup -p1 -n %{name}-%{version}%{?candidate:-%{candidate}}
4dee9c
4dee9c
4dee9c
%build
4dee9c
%configure --enable-unit CFLAGS="%{optflags} -Wno-error=deprecated-declarations"
4dee9c
%{make_build}
4dee9c
cd tools
4dee9c
%py3_build
4dee9c
4dee9c
4dee9c
%install
4dee9c
%make_install
4dee9c
rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/tpm2-pkcs11.pc
4dee9c
[ -f $RPM_BUILD_ROOT%{_libdir}/pkcs11/libtpm2_pkcs11.la ] && \
4dee9c
  rm $RPM_BUILD_ROOT%{_libdir}/pkcs11/libtpm2_pkcs11.la
4dee9c
[ -f $RPM_BUILD_ROOT%{_libdir}/pkcs11/libtpm2_pkcs11.a ] && \
4dee9c
  rm $RPM_BUILD_ROOT%{_libdir}/pkcs11/libtpm2_pkcs11.a
4dee9c
cd tools
4dee9c
%py3_install
4dee9c
install -Dpm 755 tpm2_ptool $RPM_BUILD_ROOT%{_bindir}/tpm2_ptool
4dee9c
4dee9c
4dee9c
%check
4dee9c
make check
4dee9c
cd tools
4dee9c
%{__python3} setup.py test
4dee9c
4dee9c
4dee9c
%files
4dee9c
%license LICENSE
4dee9c
%{_datadir}/p11-kit/modules/tpm2_pkcs11.module
4dee9c
%%dir %{_libdir}/pkcs11
4dee9c
%{_libdir}/pkcs11/libtpm2_pkcs11.so
4dee9c
%{_libdir}/pkcs11/libtpm2_pkcs11.so.0*
4dee9c
4dee9c
%files tools
4dee9c
%{_bindir}/tpm2_ptool
4dee9c
%{python3_sitelib}/tpm2_pkcs11/*
4dee9c
%{python3_sitelib}/tpm2_pkcs11_tools-*/*
4dee9c
4dee9c
4dee9c
%changelog
4dee9c
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.5.0-9
4dee9c
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
4dee9c
  Related: rhbz#1991688
4dee9c
4dee9c
* Fri Jul 02 2021 Jerry Snitselaar <jsnitsel@redhat.com> - 1.5.0-8
4dee9c
- Fix product version for gating
4dee9c
Resolves: rhbz#1972907
4dee9c
4dee9c
* Wed Jun 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.5.0-7
4dee9c
- Rebuilt for RHEL 9 BETA for openssl 3.0
4dee9c
  Related: rhbz#1971065
4dee9c
4dee9c
* Wed May 19 2021 Jerry Snitselaar <jsnitsel@redhat.com> - 1.5.0-6
4dee9c
- Work around for openssl 3.0 update. Related: rhbz#1958030
4dee9c
4dee9c
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.5.0-5
4dee9c
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
4dee9c
4dee9c
* Mon Feb 01 2021 Jakub Jelen <jjelen@redhat.com> - 1.5.0-4}
4dee9c
- Unbreak the build on s390x (#1923383)
4dee9c
4dee9c
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-3
4dee9c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
4dee9c
4dee9c
* Mon Dec 07 2020 Jeff Law <law@redhat.com> - 1.5.0-2
4dee9c
- Avoid stringop-overflow diagnostic in testsuite
4dee9c
4dee9c
* Wed Nov 18 2020 Jakub Jelen <jjelen@redhat.com> - 1.5.0-1
4dee9c
- New upstream release
4dee9c
4dee9c
* Tue Sep 15 2020 Jeff Law <law@redhat.com> - 1.4.0-2
4dee9c
- Fix two source over-reads detected by gcc-11
4dee9c
4dee9c
* Mon Aug 24 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.4.0-1
4dee9c
- Update to 1.4.0
4dee9c
4dee9c
* Mon Aug 10 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.3.2-1
4dee9c
- Update to 1.3.2
4dee9c
4dee9c
* Mon Jul 27 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.3.1-1
4dee9c
- Update to 1.3.1
4dee9c
4dee9c
* Tue Jul 07 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.3.0-1
4dee9c
- Update to 1.3.0
4dee9c
4dee9c
* Thu Jul 02 2020 Jakub Jelen <jjelen@redhat.com> - 1.3.0-0.1-RC0
4dee9c
- Update to 1.3.0-RC0
4dee9c
4dee9c
* Tue May 26 2020 Miro Hron훾ok <mhroncok@redhat.com> - 1.2.0-2
4dee9c
- Rebuilt for Python 3.9
4dee9c
4dee9c
* Mon Mar 30 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.2.0-1
4dee9c
- Update to 1.2.0
4dee9c
4dee9c
* Mon Mar 09 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.1.0-1
4dee9c
- Update to 1.1.0
4dee9c
4dee9c
* Mon Mar  2 2020 Peter Robinson <pbrobinson@fedoraproject.org> 1.1.0-0.1-RC1
4dee9c
- Update to 1.1.0 RC1 candidate
4dee9c
4dee9c
* Mon Feb 10 2020 Jakub Jelen <jjelen@redhat.com> - 1.0.1-3
4dee9c
- Unbreak build with gcc10 (#1796383)
4dee9c
4dee9c
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-2
4dee9c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
4dee9c
4dee9c
* Tue Jan 07 2020 Jakub Jelen <jjelen@redhat.com> - 1.0.1-1
4dee9c
- New upstream release (#1784580)
4dee9c
4dee9c
* Tue Dec 31 2019 Peter Robinson <pbrobinson@fedoraproject.org> 1.0-1
4dee9c
- Update to 1.0 stable release
4dee9c
4dee9c
* Thu Dec 26 2019 Peter Robinson <pbrobinson@fedoraproject.org> 1.0-0.1-RC1
4dee9c
- Update to 1.0 RC1 candidate
4dee9c
4dee9c
* Fri Oct 11 2019 Jakub Jelen <jjelen@redhat.com> - 0-0.3.20191011git0b7ceff
4dee9c
- Update to current git version
4dee9c
- Fix missing requires (#1757179)
4dee9c
4dee9c
* Thu Oct 03 2019 Miro Hron훾ok <mhroncok@redhat.com> - 0-0.7.20190813git2f3058c
4dee9c
- Rebuilt for Python 3.8.0rc1 (#1748018)
4dee9c
4dee9c
* Wed Aug 21 2019 Miro Hron훾ok <mhroncok@redhat.com> - 0-0.6.20190813git2f3058c
4dee9c
- Rebuilt for Python 3.8
4dee9c
4dee9c
* Tue Aug 20 2019 Peter Robinson <pbrobinson@fedoraproject.org> 0-0.5.20190813git2f3058c
4dee9c
- Update to new git snapshot for better use of tss2-tools 4.0 features
4dee9c
4dee9c
* Mon Aug 19 2019 Miro Hron훾ok <mhroncok@redhat.com> - 0-0.4.20190219git1e84553
4dee9c
- Rebuilt for Python 3.8
4dee9c
4dee9c
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.3.20190219git1e84553
4dee9c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
4dee9c
4dee9c
* Tue Apr 23 2019 Jakub Jelen <jjelen@redhat.com> - 0-0.2.20190219git1e84553
4dee9c
- Package missing python tool for TPM2 initialization
4dee9c
- Update to current version from github
4dee9c
4dee9c
* Tue Feb 19 2019 Jakub Jelen <jjelen@redhat.com> - 0-0.1.20190219git836d715
4dee9c
- Initial release for Fedora
4dee9c
4dee9c