commit fdac58d3a11b7049b163d5c33c82c1ce64dcf6d6 Author: CentOS Sources Date: Tue May 7 03:16:13 2019 -0400 import tpm2-abrmd-selinux-2.0.0-2.el8 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..540596e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/tpm2-abrmd-2.0.0.tar.gz diff --git a/.tpm2-abrmd-selinux.metadata b/.tpm2-abrmd-selinux.metadata new file mode 100644 index 0000000..e2abd7f --- /dev/null +++ b/.tpm2-abrmd-selinux.metadata @@ -0,0 +1 @@ +da4ee09c282617b771195e8058817a702417618a SOURCES/tpm2-abrmd-2.0.0.tar.gz diff --git a/SPECS/tpm2-abrmd-selinux.spec b/SPECS/tpm2-abrmd-selinux.spec new file mode 100644 index 0000000..29afc18 --- /dev/null +++ b/SPECS/tpm2-abrmd-selinux.spec @@ -0,0 +1,75 @@ +# defining macros needed by SELinux +%global selinuxtype targeted +%global selinux_policyver 0.0.1 +%global moduletype contrib +%global modulename tabrmd + +Name: tpm2-abrmd-selinux +Version: 2.0.0 +Release: 2%{?dist} +Summary: SELinux policies for tpm2-abrmd + +License: BSD +URL: https://github.com/tpm2-software/tpm2-abrmd +Source0: https://github.com/tpm2-software/tpm2-abrmd/archive/%{version}/tpm2-abrmd-%{version}.tar.gz + +BuildArch: noarch +Requires: selinux-policy >= %{selinux_policyver} +BuildRequires: git +BuildRequires: pkgconfig(systemd) +BuildRequires: selinux-policy +BuildRequires: selinux-policy-devel +Requires(post): selinux-policy-base >= %{selinux_policyver} +Requires(post): libselinux-utils +Requires(post): policycoreutils +Requires(post): policycoreutils-python-utils + +%description +SELinux policy modules for tpm2-abrmd. + +%prep +%setup -q -n tpm2-abrmd-%{version} + +%build +pushd selinux +make %{?_smp_mflags} TARGET="tabrmd" SHARE="%{_datadir}" +popd + +%pre +%selinux_relabel_pre -s %{selinuxtype} + +%install +# install policy modules +pushd selinux +install -d %{buildroot}%{_datadir}/selinux/packages +install -d -p %{buildroot}%{_datadir}/selinux/devel/include/%{moduletype} +install -p -m 644 %{modulename}.if %{buildroot}%{_datadir}/selinux/devel/include/%{moduletype} +install -m 0644 %{modulename}.pp.bz2 %{buildroot}%{_datadir}/selinux/packages +popd + +%check + +%post +%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{modulename}.pp.bz2 + +%postun +if [ $1 -eq 0 ]; then + %selinux_modules_uninstall -s %{selinuxtype} %{modulename} +fi + +%posttrans +%selinux_relabel_post -s %{selinuxtype} + +%files +%license LICENSE +%{_datadir}/selinux/* +%{_datadir}/selinux/packages/%{modulename}.pp.bz2 +%{_datadir}/selinux/devel/include/%{moduletype}/%{modulename}.if + +%changelog +* Tue Sep 11 2018 Jerry Snitselaar - 2.0.0-2 +- Fix dependency +resolves: rhbz#1628771 + +* Wed Jul 04 2018 Javier Martinez Canillas - 2.0.0-1 +- Initial import (rhbz#1550595)