Blame SPECS/fapolicyd.spec

12f79b
Summary: Application Whitelisting Daemon
12f79b
Name: fapolicyd
066af4
Version: 0.9.1
066af4
Release: 2%{?dist}
12f79b
License: GPLv3+
12f79b
URL: http://people.redhat.com/sgrubb/fapolicyd
12f79b
Source0: https://people.redhat.com/sgrubb/fapolicyd/%{name}-%{version}.tar.gz
12f79b
BuildRequires: kernel-headers
12f79b
BuildRequires: autoconf automake make gcc libtool
12f79b
BuildRequires: systemd-devel libgcrypt-devel rpm-devel file-devel
12f79b
BuildRequires: libcap-ng-devel libseccomp-devel lmdb-devel
12f79b
BuildRequires: python3-devel
12f79b
Requires(pre): shadow-utils
12f79b
Requires(post): systemd-units
12f79b
Requires(preun): systemd-units
12f79b
Requires(postun): systemd-units
12f79b
12f79b
12f79b
%description
12f79b
Fapolicyd (File Access Policy Daemon) implements application whitelisting
12f79b
to decide file access rights. Applications that are known via a reputation
12f79b
source are allowed access while unknown applications are not. The daemon
12f79b
makes use of the kernel's fanotify interface to determine file access rights.
12f79b
12f79b
%prep
12f79b
%setup -q
12f79b
066af4
# generate rules for python
066af4
sed -i "s/%python2_path%/`readlink -f %{__python2} | sed 's/\//\\\\\//g'`/g" init/%{name}.rules
066af4
sed -i "s/%python3_path%/`readlink -f %{__python3} | sed 's/\//\\\\\//g'`/g" init/%{name}.rules
066af4
sed -i "s/%ld_so_path%/`find /usr/lib64/ -type f -name 'ld-2\.*.so' | sed 's/\//\\\\\//g'`/g" init/%{name}.rules
066af4
12f79b
%build
12f79b
./autogen.sh
12f79b
%configure --with-audit
12f79b
make CFLAGS="%{optflags}" %{?_smp_mflags}
12f79b
12f79b
%install
12f79b
make DESTDIR="%{buildroot}" INSTALL='install -p' install
12f79b
mkdir -p %{buildroot}/%{python3_sitelib}/dnf-plugins/
12f79b
install -p -m 644 dnf/%{name}-dnf-plugin.py %{buildroot}/%{python3_sitelib}/dnf-plugins/
12f79b
install -p -m 644 -D init/%{name}-tmpfiles.conf %{buildroot}/%{_tmpfilesdir}/%{name}.conf
12f79b
mkdir -p %{buildroot}/%{_localstatedir}/lib/%{name}
12f79b
mkdir -p %{buildroot}/run/%{name}
12f79b
12f79b
%pre
12f79b
getent passwd %{name} >/dev/null || useradd -r -M -d %{_localstatedir}/lib/%{name} -s /sbin/nologin -c "Application Whitelisting Daemon" %{name}
12f79b
12f79b
%post
12f79b
%systemd_post %{name}.service
12f79b
12f79b
%preun
12f79b
%systemd_preun %{name}.service
12f79b
12f79b
%postun
12f79b
%systemd_postun_with_restart %{name}.service
12f79b
12f79b
%files
12f79b
%doc README.md
12f79b
%{!?_licensedir:%global license %%doc}
12f79b
%license COPYING
12f79b
%attr(750,root,%{name}) %dir %{_sysconfdir}/%{name}
12f79b
%config(noreplace) %attr(644,root,%{name}) %{_sysconfdir}/%{name}/%{name}.rules
12f79b
%config(noreplace) %attr(644,root,%{name}) %{_sysconfdir}/%{name}/%{name}.conf
12f79b
%attr(644,root,root) %{_unitdir}/%{name}.service
12f79b
%attr(644,root,root) %{_tmpfilesdir}/%{name}.conf
12f79b
%attr(755,root,root) %{_sbindir}/%{name}
12f79b
%attr(755,root,root) %{_sbindir}/%{name}-cli
12f79b
%attr(644,root,root) %{_mandir}/man8/*
12f79b
%attr(644,root,root) %{_mandir}/man5/*
066af4
%attr(644,root,root) %{_mandir}/man1/*
12f79b
%ghost %{_localstatedir}/log/%{name}-access.log
12f79b
%attr(770,root,%{name}) %dir %{_localstatedir}/lib/%{name}
12f79b
%attr(770,root,%{name}) %dir /run/%{name}
12f79b
%ghost %{_localstatedir}/run/%{name}/%{name}.fifo
12f79b
%ghost %{_localstatedir}/lib/%{name}/data.mdb
12f79b
%ghost %{_localstatedir}/lib/%{name}/lock.mdb
12f79b
%{python3_sitelib}/dnf-plugins/%{name}-dnf-plugin.py
12f79b
%{python3_sitelib}/dnf-plugins/__pycache__/%{name}-dnf-plugin.*.pyc
12f79b
12f79b
%changelog
066af4
* Wed Nov 20 2019 Radovan Sroka <rsroka@redhat.com> - 0.9.1-2
066af4
RHEL 8.2 ERRATUM
066af4
- rebase to v0.9.1
066af4
- updated default configuration with new syntax
066af4
- removed daemon mounts configuration
066af4
Resolves: rhbz#1759895
066af4
- default fapolicyd policy prevents Ansible from running
066af4
- added ansible rule to default ruleset
066af4
Resolves: rhbz#1746464
066af4
- suspicious logs on service start
066af4
Resolves: rhbz#1747494
066af4
- fapolicyd blocks dracut from generating initramfs
066af4
- added dracut rule to default configuration
066af4
Resolves: rhbz#1757736
066af4
- fapolicyd fails to identify perl interpreter
066af4
Resolves: rhbz#1765039
066af4
066af4
* Wed Jul 24 2019 Radovan Sroka <rsroka@redhat.com> - 0.8.10-3
066af4
- added missing manpage for fapolicyd-cli
066af4
Resolves: rhbz#1708015
066af4
066af4
* Mon Jul 22 2019 Radovan Sroka <rsroka@redhat.com> - 0.8.10-2
066af4
- Convert hashes to lowercase like sha256sum outputs
066af4
- Stop littering STDOUT output for dnf plugin in fapolicyd
066af4
Resolves: rhbz#1721496
066af4
066af4
* Tue Jun 18 2019 Radovan Sroka <rsroka@redhat.com> - 0.8.10-1
066af4
- new upstream release
066af4
Resolves: rhbz#1673323
066af4
12f79b
* Mon May 06 2019 Radovan Sroka <rsroka@redhat.com> - 0.8.9-1
12f79b
- New upstream release
12f79b
- imported from fedora30
12f79b
  resolves: rhbz#1673323
12f79b
12f79b
* Wed Mar 13 2019 Radovan Sroka <rsroka@redhat.com> - 0.8.8-2
12f79b
- backport some patches to resolve dac_override for fapolicyd
12f79b
12f79b
* Mon Mar 11 2019 Radovan Sroka <rsroka@redhat.com> - 0.8.8-1
12f79b
- New upstream release
12f79b
- Added new DNF plugin that can update the trust database when rpms are installed
12f79b
- Added support for FAN_OPEN_EXEC_PERM
12f79b
12f79b
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.7-3
12f79b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
12f79b
12f79b
12f79b
* Wed Oct 03 2018 Steve Grubb <sgrubb@redhat.com> 0.8.7-1
12f79b
- New upstream bugfix release
12f79b
12f79b
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.6-2
12f79b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
12f79b
12f79b
* Thu Jun 07 2018 Steve Grubb <sgrubb@redhat.com> 0.8.6-1
12f79b
- New upstream feature release
12f79b
12f79b
* Fri May 18 2018 Steve Grubb <sgrubb@redhat.com> 0.8.5-2
12f79b
- Add dist tag (#1579362)
12f79b
12f79b
* Fri Feb 16 2018 Steve Grubb <sgrubb@redhat.com> 0.8.5-1
12f79b
- New release