Name: faketpm Version: 0.0.1 Release: 1.20240525005558130159.main.5.g1f46a03%{?dist} Summary: Fake TPM for systems that lack a real one License: BSD-3-Clause URL: https://github.com/davide125/faketpm Source: faketpm-0.0.1.tar.gz BuildRequires: bzip2 BuildRequires: make BuildRequires: selinux-policy-devel BuildRequires: systemd-rpm-macros Requires: kmod Requires: swtpm Requires: (%{name}-selinux = %{version}-%{release} if selinux-policy) BuildArch: noarch %description This project provides a fake Trusted Platform Module (TPM) for systems that lack a real one. To do so it leverages SWTPM, a software TPM emulator. %package selinux Summary: SELinux module for %{name} Requires(pre): libselinux-utils Requires(post): libselinux-utils Requires(post): policycoreutils Requires(post): selinux-policy-base Requires(post): swtpm-selinux %description selinux This package provides the SELinux policy module to ensure %{name} runs properly under an environment with SELinux enabled. %prep %autosetup -p1 -n faketpm-0.0.1 %build %make_build %install %make_install DATADIR="%{_datadir}" UNITDIR="%{_unitdir}" mkdir -p %{buildroot}%{_localstatedir}/lib/%{name} %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %pre selinux %selinux_relabel_pre %post selinux %selinux_modules_install %{_datadir}/selinux/packages/%{name}.pp.bz2 %selinux_relabel_post %posttrans selinux %selinux_relabel_post %postun selinux %selinux_modules_uninstall %{name} if [ $1 -eq 0 ]; then %selinux_relabel_post fi %files %license LICENSE %doc README.md %attr(-, tss,root) %dir %{_localstatedir}/lib/%{name}/ %{_unitdir}/%{name}.service %files selinux %license LICENSE %{_datadir}/selinux/devel/include/contrib/%{name}.if %{_datadir}/selinux/packages/%{name}.pp.bz2 %changelog * Sat May 25 2024 Packit - 0.0.1-1.20240525005558130159.main.5.g1f46a03 - Also build for all arches (Davide Cavalca) - Build for all Fedora releases (Davide Cavalca) - Also clean Packit artifacts (Davide Cavalca) - Expand the README a bit (Davide Cavalca) - Add Packit config (Davide Cavalca)