Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package earlyoom for openSUSE:Factory checked in at 2022-08-05 19:51:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/earlyoom (Old) and /work/SRC/openSUSE:Factory/.earlyoom.new.1521 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "earlyoom" Fri Aug 5 19:51:02 2022 rev:15 rq:993117 version:1.7 Changes: -------- --- /work/SRC/openSUSE:Factory/earlyoom/earlyoom.changes 2021-11-21 23:52:37.518167205 +0100 +++ /work/SRC/openSUSE:Factory/.earlyoom.new.1521/earlyoom.changes 2022-08-05 19:51:59.873610116 +0200 @@ -2 +2,16 @@ -Thu Nov 18 09:31:29 UTC 2021 - ???????? ???????????? <[email protected]> +Wed May 18 16:14:43 UTC 2022 - ???????? ???????????? <[email protected]> + +- Refreshed spec-file via spec-cleaner and manual optimizated. + * Reduced to the standard github URL. + * Added -p flag to all install commands. +- Updated file earlyoom.sysconfig with actual firefox process names. +- Updated to 1.7 + * Updated file earlyoom.1 (MANPAGE.md -s -t man > earlyoom.1). + * https://github.com/rfjakob/earlyoom#changelog + * Added -N flag to run a script every time a process is killed. + * Added -g flag to kill whole process group. + * Removed -i flag, it does not work properly on Linux kernels 5.9+. + * Droped ambient capabilities on startup. + +------------------------------------------------------------------- +Thu Nov 18 09:31:29 UTC 2021 - ???????? ???????????? <[email protected]> @@ -79 +94 @@ -Wed Mar 4 17:40:07 UTC 2020 - ???????? ???????????? <[email protected]> +Wed Mar 4 17:40:07 UTC 2020 - ???????? ???????????? <[email protected]> @@ -100 +115 @@ -Fri Feb 21 06:55:10 UTC 2020 - ???????? ???????????? <[email protected]> +Fri Feb 21 06:55:10 UTC 2020 - ???????? ???????????? <[email protected]> Old: ---- v1.6.2.tar.gz New: ---- earlyoom-1.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ earlyoom.spec ++++++ --- /var/tmp/diff_new_pack.m6T3jh/_old 2022-08-05 19:52:00.377611417 +0200 +++ /var/tmp/diff_new_pack.m6T3jh/_new 2022-08-05 19:52:00.385611438 +0200 @@ -1,7 +1,7 @@ # # spec file for package earlyoom # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,16 +22,16 @@ %global _fillupdir %{_localstatedir}/adm/fillup-templates %endif Name: earlyoom -Version: 1.6.2 +Version: 1.7 Release: 0 Summary: Early OOM Daemon for Linux License: MIT Group: System/Daemons URL: https://github.com/rfjakob/%{name} -Source0: %{URL}/archive/v%{version}.tar.gz -Source11: %{name}.sysconfig +Source0: https://github.com/rfjakob/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source1: %{name}.sysconfig # Inject pre-build earlyoom.1, built on x86_64 machine, as pandoc does not exist on all archs -Source12: earlyoom.1 +Source2: earlyoom.1 BuildRequires: pkgconfig BuildRequires: pkgconfig(systemd) Conflicts: oomd @@ -44,11 +44,11 @@ below critical level, it will kill the largest process (highest oom_score). %prep -%autosetup +%autosetup -p1 # Test if our pre-build earloom.1 is newer than README.md; if not, fail # in case of fail, rebuild the earlyoom.1 out of the build system using # pandoc MANPAGE.md -s -t man > earlyoom.1 -test %{SOURCE12} -nt README.md +test %{SOURCE2} -nt README.md # Fix defaults file location sed -i 's|/default/|/sysconfig/|' earlyoom.service.in @@ -74,12 +74,11 @@ %install %make_install PREFIX=%{_prefix} SYSTEMDUNITDIR=%{_unitdir} -install -D -m644 %{SOURCE11} %{buildroot}%{_fillupdir}/sysconfig.%{name} -install -d %{buildroot}%{_mandir}/man1/ -install -m644 %{SOURCE12} %{buildroot}%{_mandir}/man1/ +install -Dpm0644 %{SOURCE1} %{buildroot}%{_fillupdir}/sysconfig.%{name} +install -Dpm0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/%{name}.1 mkdir -p %{buildroot}%{_sbindir} -ln -sf service %{buildroot}%{_sbindir}/rc%{name} +ln -s service %{buildroot}%{_sbindir}/rc%{name} %files %license LICENSE ++++++ earlyoom.1 ++++++ --- /var/tmp/diff_new_pack.m6T3jh/_old 2022-08-05 19:52:00.449611603 +0200 +++ /var/tmp/diff_new_pack.m6T3jh/_new 2022-08-05 19:52:00.453611613 +0200 @@ -1,5 +1,19 @@ -.\" Automatically generated by Pandoc 2.13 +.\" Automatically generated by Pandoc 2.17.1.1 .\" +.\" Define V font for inline verbatim, using C font in formats +.\" that render this, and otherwise B font. +.ie "\f[CB]x\f[]"x" \{\ +. ftr V B +. ftr VI BI +. ftr VB B +. ftr VBI BI +.\} +.el \{\ +. ftr V CR +. ftr VI CI +. ftr VB CB +. ftr VBI CBI +.\} .TH "earlyoom" "1" "" "" "General Commands Manual" .hy .SH NAME @@ -18,7 +32,7 @@ \f[B]earlyoom\f[R] 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). If \f[B]both\f[R] memory \f[B]and\f[R] swap are below 10%, it will kill -the largest process (highest \f[C]oom_score\f[R]). +the largest process (highest \f[V]oom_score\f[R]). The percentage value is configurable via command line arguments. .PP If there is a failure when trying to kill a process, \f[B]earlyoom\f[R] @@ -51,7 +65,7 @@ Send SIGKILL if at or below KILL_PERCENT (default PERCENT/2), otherwise SIGTERM. .PP -You can use \f[C]-s 100\f[R] to have earlyoom effectively ignore swap +You can use \f[V]-s 100\f[R] to have earlyoom effectively ignore swap usage: Processes are killed once available memory drops below the configured minimum, no matter how much swap is free. .PP @@ -60,9 +74,9 @@ .SS -M SIZE[,KILL_SIZE] .PP As an alternative to specifying a percentage of total memory, -\f[C]-M\f[R] sets the available memory minimum to SIZE KiB. +\f[V]-M\f[R] sets the available memory minimum to SIZE KiB. The value is internally converted to a percentage. -If you pass both \f[C]-M\f[R] and \f[C]-m\f[R], the lower value is used. +If you pass both \f[V]-M\f[R] and \f[V]-m\f[R], the lower value is used. Example: Reserve 10% of RAM but at most 1 GiB: .IP .nf @@ -75,10 +89,10 @@ otherwise SIGTERM. .SS -S SIZE[,KILL_SIZE] .PP -As an alternative to specifying a percentage of total swap, \f[C]-S\f[R] +As an alternative to specifying a percentage of total swap, \f[V]-S\f[R] sets the free swap minimum to SIZE KiB. The value is internally converted to a percentage. -If you pass both \f[C]-S\f[R] and \f[C]-s\f[R], the lower value is used. +If you pass both \f[V]-S\f[R] and \f[V]-s\f[R], the lower value is used. .PP Send SIGKILL if at or below KILL_SIZE (default SIZE/2), otherwise SIGTERM. @@ -87,7 +101,7 @@ removed in earlyoom v1.2, ignored for compatibility .SS -i .PP -user-space oom killer should ignore positive oom_score_adj values +removed in earlyoom v1.7, ignored for compatibility .SS -d .PP enable debugging messages @@ -118,9 +132,9 @@ oom_score_adj to -100. .PP When earlyoom is run through its default systemd service, the -\f[C]-p\f[R] switch doesn\[cq]t work. +\f[V]-p\f[R] switch doesn\[cq]t work. To achieve the same effect, enter the following three lines into -\f[C]sudo systemctl edit earlyoom\f[R]: +\f[V]sudo systemctl edit earlyoom\f[R]: .IP .nf \f[C] @@ -132,6 +146,57 @@ .SS -n .PP Enable notifications via d-bus. +.PP +To actually see the notifications in your GUI session, you need to have +systembus-notify (https://github.com/rfjakob/systembus-notify) running +as your user. +.SS -N /PATH/TO/SCRIPT +.PP +Run the given script for each process killed. +Must be an absolute path. +.PP +Within the script, information about the killed process can be obtained +via the following environment variables: +.IP +.nf +\f[C] +EARLYOOM_PID Process PID +EARLYOOM_NAME Process name truncated to 16 bytes (as reported in /proc/PID/comm) +EARLYOOM_UID UID of the user running the process +\f[R] +.fi +.PP +WARNING: \f[V]EARLYOOM_NAME\f[R] can contain spaces, newlines, special +characters and is controlled by the user, or it can be empty! +Make sure that your notification script can handle that! +.SS -g +.PP +Kill all processes that have same process group id (PGID) as the process +with excessive memory usage. +.PP +For example, with this flag turned on, the whole application will be +killed when one of its subprocess consumes too much memory (as long as +they all have the same PGID, of course). +.PP +Enable this flag when completely cleaning up the \[lq]entire +application\[rq] is more desirable, and you are sure that the +application puts all its processes in the same PGID. +.PP +Note that some desktop environments (GNOME, for example) put all desktop +application in the same process group as \f[V]gnome-shell\f[R]. +earlyoom might kill all such processes including \f[V]gnome-shell\f[R] +when this flag is turned on. +.PP +Be sure to check how your environment behaves beforehand. +Use +.IP +.nf +\f[C] +pstree -gT +\f[R] +.fi +.PP +to show all processes with the PGID in brackets. .SS --prefer REGEX .PP prefer killing processes matching REGEX (adds 300 to oom_score) @@ -175,11 +240,11 @@ 105: Could not convert number when parse the contents of /proc/meminfo .SH Why not trigger the kernel oom killer? .PP -Earlyoom does not use \f[C]echo f > /proc/sysrq-trigger\f[R] because the -Chrome people made their browser always be the first (innocent!) victim -by setting \f[C]oom_score_adj\f[R] very high. +Earlyoom does not use \f[V]echo f > /proc/sysrq-trigger\f[R] because the +Chrome people made their browser always be the first (innocent!) +victim by setting \f[V]oom_score_adj\f[R] very high. Instead, earlyoom finds out itself by reading through -\f[C]/proc/*/status\f[R] (actually \f[C]/proc/*/statm\f[R], which +\f[V]/proc/*/status\f[R] (actually \f[V]/proc/*/statm\f[R], which contains the same information but is easier to parse programmatically). .PP Additionally, in recent kernels (tested on 4.0.5), triggering the kernel @@ -193,13 +258,13 @@ slow down in low memory situations. .SH BUGS .PP -If there is zero total swap on earlyoom startup, any \f[C]-S\f[R] +If there is zero total swap on earlyoom startup, any \f[V]-S\f[R] (uppercase \[lq]S\[rq]) values are ignored, a warning is printed, and default swap percentages are used. .PP -For processes matched by \f[C]--prefer\f[R], negative -\f[C]oom_score_adj\f[R] values are not taken into account, and the -process gets an effective \f[C]oom_score\f[R] of at least 300. +For processes matched by \f[V]--prefer\f[R], negative +\f[V]oom_score_adj\f[R] values are not taken into account, and the +process gets an effective \f[V]oom_score\f[R] of at least 300. See https://github.com/rfjakob/earlyoom/issues/159 for details. .SH AUTHOR .PP ++++++ earlyoom.sysconfig ++++++ --- /var/tmp/diff_new_pack.m6T3jh/_old 2022-08-05 19:52:00.501611737 +0200 +++ /var/tmp/diff_new_pack.m6T3jh/_new 2022-08-05 19:52:00.505611748 +0200 @@ -2,12 +2,12 @@ ## Description: configuration for Early OOM Daemon ## Type: string -## Default: "-r 3 -m 6 -s 10 -n -p --avoid '(^|/)(systemd|Xorg|X|Xwayland|xdm|sddm|kdm|gdm|lightdm|plasmashell|kwin_wayland|kwin_x11|ssh|yast|yast2|y2controlcenter|zypper|rpm)$' --prefer '(^|/)(java|Web\ Content|GeckoMain|chrome|opera|ffmpeg|vlc|akregator|thumbnail.so)$'" +## Default: "-r 3 -m 6 -s 10 -n -p --avoid '(^|/)(systemd|Xorg|X|Xwayland|xdm|sddm|kdm|gdm|lightdm|plasmashell|kwin_wayland|kwin_x11|ssh|yast|yast2|y2controlcenter|zypper|rpm)$' --prefer '(^|/)(java|Isolated\ Web\ Co|Web\ Content|WebExtensions|firefox|chrome|opera|ffmpeg|vlc|akregator|thumbnail.so)$'" ## Config: earlyoom # # Command-line options to pass to earlyoom # # see man(1) earlyoom # -EARLYOOM_ARGS="-r 0 -m 6 -s 10 -n -p --avoid '(^|/)(systemd|Xorg|X|Xwayland|xdm|sddm|kdm|gdm|lightdm|plasmashell|kwin_wayland|kwin_x11|ssh|yast|yast2|y2controlcenter|zypper|rpm|dnf)$' --prefer '(^|/)(java|Web\ Content|GeckoMain|chrome|opera|falkon|ffmpeg|vlc|mpv|akregator|thumbnail.so)$'" +EARLYOOM_ARGS="-r 0 -m 6 -s 10 -n -p --avoid '(^|/)(systemd|Xorg|X|Xwayland|xdm|sddm|kdm|gdm|lightdm|plasmashell|kwin_wayland|kwin_x11|ssh|yast|yast2|y2controlcenter|zypper|rpm|dnf)$' --prefer '(^|/)(java|Isolated\ Web\ Co|Web\ Content|WebExtensions|firefox|chrome|opera|falkon|ffmpeg|vlc|mpv|akregator|thumbnail.so)$'"
