Name: prelockd Version: 0.6 Release: 1%{?dist} Summary: Lock binaries and libraries in memory to improve system responsiveness BuildArch: noarch License: MIT URL: https://github.com/hakavlad/prelockd Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz # Makefile: drop 'useradd chcon daemon-reload' from install Patch0: %{name}-makefile-drop-non-rpm-stuff.patch BuildRequires: systemd-rpm-macros Requires: python3 >= 3.3 %{?systemd_requires} %description prelockd is a daemon that locks memory mapped binaries and libraries in memory to improve system responsiveness under low-memory conditions. %prep %autosetup -p1 sed -i 's|/env python3|/python3|' %{name} %install %make_install \ DOCDIR=%{_pkgdocdir} \ PREFIX=%{_prefix} \ SYSCONFDIR=%{_sysconfdir} \ SYSTEMDUNITDIR=%{_unitdir} %pre # Create prelockd user getent passwd %{name} >/dev/null || \ useradd -r -s /sbin/nologin \ -c "Lock binaries and libraries in memory to improve system responsiveness" %{name} exit 0 %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %files %license LICENSE %{_pkgdocdir}/ %{_sbindir}/%{name} %{_sharedstatedir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}.conf %{_unitdir}/%{name}.service %changelog * Sun Oct 4 12:15:45 EEST 2020 Artem Polishchuk - 0.6-1 - Initial package