Name: ibmswtpm2 Version: 1661 Release: 5%{?dist} Summary: IBM's Software TPM 2.0 URL: https://sourceforge.net/projects/ibmswtpm2/ # ibmswtpm2-1661.tar.gz is ibmtpm1661.tar.gz repackaged into # a ibmswtpm2-1661 directory. Original file can be downloaded # from: # https://sourceforge.net/projects/ibmswtpm2/files/ibmtpm1661.tar.gz/download Source0: ibmswtpm2-1661.tar.gz Source1: ibmswtpm2.service Source3: tpm-server-init Source4: tpm_serverd Source5: ibmswtpm2.te Patch1: 0001-OpenSSL-3.patch License: Custom Requires: openssl-libs Requires: tpm2-tss Requires: tpm2-abrmd Requires: tpm2-tools Requires: procps-ng BuildRequires: git-core BuildRequires: make BuildRequires: gcc BuildRequires: openssl-devel BuildRequires: systemd BuildRequires: selinux-policy-devel Requires(post): policycoreutils Requires(preun): policycoreutils Requires(postun): policycoreutils %description An implementation of the TCG TPM 2.0 specification. It is based on the TPM specification Parts 3 and 4 source code donated by Microsoft, with additional files to complete the implementation. %prep %autosetup -S git # SELinux policy. cp %{SOURCE5} . %build make -f /usr/share/selinux/devel/Makefile %{name}.pp cd src %make_build %install mkdir -p %{buildroot}/%{_datadir}/selinux/packages/%{name} install -m644 %{name}.pp %{buildroot}/%{_datadir}/selinux/packages/%{name}/ cd src %make_install mkdir -p %{buildroot}/{%{_unitdir},%{_bindir}} install -m644 %{SOURCE1} %{buildroot}/%{_unitdir} install -m755 %{SOURCE3} %{buildroot}/%{_bindir} install -m755 %{SOURCE4} %{buildroot}/%{_bindir} %post if [ "$1" -le "1" ] ; then # First install. semodule -i %{_datadir}/selinux/packages/%{name}/%{name}.pp 2>/dev/null || : fi %preun if [ "$1" -lt "1" ] ; then # Final removal. semodule -r %{name} 2>/dev/null || : fi %postun if [ "$1" -ge "1" ] ; then # Upgrade. semodule -i %{_datadir}/selinux/packages/%{name}/%{name}.pp 2>/dev/null || : fi %files %{_bindir}/tpm_server %{_bindir}/tpm_serverd %{_bindir}/tpm-server-init %{_unitdir}/%{name}.service %{_datadir}/selinux/packages/%{name} %changelog * Fri Feb 11 2022 Sergio Correia - 1661-5 - Fix tpm_served script * Fri Feb 11 2022 Sergio Correia - 1661-4 - Rename unit to ibmswtpm2 and build SELinux policy in build-time * Wed Dec 15 2021 Sergio Correia - 1661-3 - Drop SELinux bits * Wed Oct 06 2021 Sergio Correia - 1661-2 - Do not touch tpm2-abrmd * Fri Sep 03 2021 Sergio Correia - 1661-1 - First release