[packages/earlyoom] (almost) raw from fc/unfinished

arekm arekm at pld-linux.org
Wed Nov 22 20:33:33 CET 2023


commit bb83ca853ecc54abf5b1a81665189c88fa6808fa
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Nov 22 20:16:27 2023 +0100

    (almost) raw from fc/unfinished

 earlyoom.conf |  6 ++++++
 earlyoom.spec | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+)
---
diff --git a/earlyoom.spec b/earlyoom.spec
new file mode 100644
index 0000000..9b12998
--- /dev/null
+++ b/earlyoom.spec
@@ -0,0 +1,56 @@
+Summary:	Early OOM Daemon for Linux
+Name:		earlyoom
+Version:	1.7
+Release:	0.1
+License:	MIT
+URL:		https://github.com/rfjakob/earlyoom
+Source0:	https://github.com/rfjakob/earlyoom/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	9c567930c60b2ccdc536951b005d413d
+Source1:	%{name}.conf
+
+%description
+User-space OOM killer daemon that can avoid the system going into the
+unresponsive state. It checks the amount of available memory and free
+swap up to 10 times a second (less often if there is a lot of free
+memory) and kills the largest processes with the highest oom_score.
+
+Percentages are configured through the configuration file.
+
+%prep
+%setup -q
+cp -f %{SOURCE1} %{name}.default
+sed -e '/systemctl/d' -i Makefile
+
+%build
+%{__make} \
+	VERSION=%{version} \
+	PREFIX=%{_prefix} \
+	SYSCONFDIR=%{_sysconfdir} \
+	SYSTEMDUNITDIR=%{systemdunitdir}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+%systemd_post %{name}.service
+
+%preun
+%systemd_preun %{name}.service
+
+%postun
+%systemd_postun_with_restart %{name}.service
+
+%files
+%defattr(644,root,root,755)
+%doc README.md
+%attr(755,root,root) %{_bindir}/%{name}
+%{systemdunitdir}/%{name}.service
+%{_mandir}/man1/%{name}.*
+%config(noreplace) %{_sysconfdir}/default/%{name}
+
diff --git a/earlyoom.conf b/earlyoom.conf
new file mode 100644
index 0000000..1f7eb86
--- /dev/null
+++ b/earlyoom.conf
@@ -0,0 +1,6 @@
+# These default settings were approved by the Fedora Workstation SIG:
+# https://pagure.io/fedora-workstation/issue/119
+
+EARLYOOM_ARGS="-r 0 -m 4 -M 409600 --prefer '^(Web Content|Isolated Web Co)$' --avoid '^(dnf|packagekitd|gnome-shell|gnome-session-c|gnome-session-b|lightdm|sddm|sddm-helper|gdm|gdm-wayland-ses|gdm-session-wor|gdm-x-session|Xorg|Xwayland|systemd|systemd-logind|dbus-daemon|dbus-broker|cinnamon|cinnamon-sessio|kwin_x11|kwin_wayland|plasmashell|ksmserver|plasma_session|startplasma-way|xfce4-session|mate-session|marco|lxqt-session|openbox|cryptsetup)$'"
+
+# More documentation at `man earlyoom` or `earlyoom -h`.
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/earlyoom.git/commitdiff/bb83ca853ecc54abf5b1a81665189c88fa6808fa



More information about the pld-cvs-commit mailing list