126 lines
4.4 KiB
RPMSpec
126 lines
4.4 KiB
RPMSpec
Summary: Application Whitelisting Daemon
|
|
Name: fapolicyd
|
|
Version: 0.8.8
|
|
Release: 2%{?dist}
|
|
License: GPLv3+
|
|
URL: http://people.redhat.com/sgrubb/fapolicyd
|
|
Source0: https://people.redhat.com/sgrubb/fapolicyd/%{name}-%{version}.tar.gz
|
|
BuildRequires: kernel-headers
|
|
BuildRequires: autoconf automake make gcc libtool
|
|
BuildRequires: systemd-devel libgcrypt-devel rpm-devel file-devel
|
|
BuildRequires: libcap-ng-devel libseccomp-devel lmdb-devel
|
|
BuildRequires: python3-devel
|
|
Requires(pre): shadow-utils
|
|
Requires(post): systemd-units
|
|
Requires(preun): systemd-units
|
|
Requires(postun): systemd-units
|
|
|
|
Patch1: 0001-Fix-the-spec-file-to-use-run-instead-of-var-run.patch
|
|
Patch2: 0002-Fix-service-file-to-use-run-instead-of-var-run.patch
|
|
Patch3: 0003-Install-a-usr-lib-tmpfiles.d-fapolicyd.conf-for-run-.patch
|
|
Patch4: 0004-remove-fifo-on-all-exit-paths-for-update-thread.patch
|
|
Patch5: 0005-Move-some-debug-messages-under-ifdef-DEBUG-24.patch
|
|
Patch6: 0006-Get-rid-of-trailing-whitespaces-25.patch
|
|
Patch7: 0007-Add-some-documentation-about-how-ELF-startup-works.patch
|
|
Patch8: 0008-Change-fifo-mode-to-0660-26.patch
|
|
Patch9: 0009-Let-lmdb-create-writable-db-27.patch
|
|
Patch10: 0010-Add-a-note-to-rules-file-how-to-handle-systems-with-.patch
|
|
Patch11: 0011-In-order-to-create-the-correct-permissions-on-the-fi.patch
|
|
|
|
%description
|
|
Fapolicyd (File Access Policy Daemon) implements application whitelisting
|
|
to decide file access rights. Applications that are known via a reputation
|
|
source are allowed access while unknown applications are not. The daemon
|
|
makes use of the kernel's fanotify interface to determine file access rights.
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
%patch3 -p1
|
|
%patch4 -p1
|
|
%patch5 -p1
|
|
%patch6 -p1
|
|
%patch7 -p1
|
|
%patch8 -p1
|
|
%patch9 -p1
|
|
%patch10 -p1
|
|
%patch11 -p1
|
|
|
|
%build
|
|
./autogen.sh
|
|
%configure --with-audit
|
|
make CFLAGS="%{optflags}" %{?_smp_mflags}
|
|
|
|
%install
|
|
make DESTDIR="%{buildroot}" INSTALL='install -p' install
|
|
mkdir -p %{buildroot}/%{python3_sitelib}/dnf-plugins/
|
|
install -p -m 644 dnf/%{name}-dnf-plugin.py %{buildroot}/%{python3_sitelib}/dnf-plugins/
|
|
install -p -m 644 -D init/%{name}-tmpfiles.conf %{buildroot}/%{_tmpfilesdir}/%{name}.conf
|
|
mkdir -p %{buildroot}/%{_localstatedir}/lib/%{name}
|
|
mkdir -p %{buildroot}/run/%{name}
|
|
|
|
%pre
|
|
getent passwd %{name} >/dev/null || useradd -r -M -d %{_localstatedir}/lib/%{name} -s /sbin/nologin -c "Application Whitelisting Daemon" %{name}
|
|
|
|
%post
|
|
%systemd_post %{name}.service
|
|
|
|
%preun
|
|
%systemd_preun %{name}.service
|
|
|
|
%postun
|
|
%systemd_postun_with_restart %{name}.service
|
|
|
|
%files
|
|
%doc README.md
|
|
%{!?_licensedir:%global license %%doc}
|
|
%license COPYING
|
|
%attr(750,root,%{name}) %dir %{_sysconfdir}/%{name}
|
|
%config(noreplace) %attr(644,root,%{name}) %{_sysconfdir}/%{name}/%{name}.rules
|
|
%config(noreplace) %attr(644,root,%{name}) %{_sysconfdir}/%{name}/%{name}.mounts
|
|
%config(noreplace) %attr(644,root,%{name}) %{_sysconfdir}/%{name}/%{name}.conf
|
|
%attr(644,root,root) %{_unitdir}/%{name}.service
|
|
%attr(644,root,root) %{_tmpfilesdir}/%{name}.conf
|
|
%attr(755,root,root) %{_sbindir}/%{name}
|
|
%attr(755,root,root) %{_sbindir}/%{name}-cli
|
|
%attr(644,root,root) %{_mandir}/man8/*
|
|
%attr(644,root,root) %{_mandir}/man5/*
|
|
%ghost %{_localstatedir}/log/%{name}-access.log
|
|
%attr(770,root,%{name}) %dir %{_localstatedir}/lib/%{name}
|
|
%attr(770,root,%{name}) %dir /run/%{name}
|
|
%ghost %{_localstatedir}/run/%{name}/%{name}.fifo
|
|
%ghost %{_localstatedir}/lib/%{name}/data.mdb
|
|
%ghost %{_localstatedir}/lib/%{name}/lock.mdb
|
|
%{python3_sitelib}/dnf-plugins/%{name}-dnf-plugin.py
|
|
%{python3_sitelib}/dnf-plugins/__pycache__/%{name}-dnf-plugin.*.pyc
|
|
|
|
%changelog
|
|
* Wed Mar 13 2019 Radovan Sroka <rsroka@redhat.com> - 0.8.8-2
|
|
- backport some patches to resolve dac_override for fapolicyd
|
|
|
|
* Mon Mar 11 2019 Radovan Sroka <rsroka@redhat.com> - 0.8.8-1
|
|
- New upstream release
|
|
- Added new DNF plugin that can update the trust database when rpms are installed
|
|
- Added support for FAN_OPEN_EXEC_PERM
|
|
|
|
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.7-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
|
* Wed Oct 03 2018 Steve Grubb <sgrubb@redhat.com> 0.8.7-1
|
|
- New upstream bugfix release
|
|
|
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.6-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
* Thu Jun 07 2018 Steve Grubb <sgrubb@redhat.com> 0.8.6-1
|
|
- New upstream feature release
|
|
|
|
* Fri May 18 2018 Steve Grubb <sgrubb@redhat.com> 0.8.5-2
|
|
- Add dist tag (#1579362)
|
|
|
|
* Fri Feb 16 2018 Steve Grubb <sgrubb@redhat.com> 0.8.5-1
|
|
- New release
|