Accepting request 835149 from home:dancermak:branches:Base:System
enable testsuite on x86 and arm & adjust system defaults OBS-URL: https://build.opensuse.org/request/show/835149 OBS-URL: https://build.opensuse.org/package/show/Base:System/earlyoom?expand=0&rev=29
This commit is contained in:
parent
9843f77cfd
commit
d0ed1c9f75
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 17 08:19:35 UTC 2020 - Dan Čermák <dcermak@suse.com>
|
||||
|
||||
- Enable tests on x86_64 & ARM
|
||||
- change reporting interval to never
|
||||
- remove calls to systemctl in make install
|
||||
- change LDFLAGS handling via env variables
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 3 08:48:01 UTC 2020 - Franck Bui <fbui@suse.com>
|
||||
|
||||
|
@ -16,6 +16,14 @@
|
||||
#
|
||||
|
||||
|
||||
# the tests fail on i586 and ppc, see:
|
||||
# https://github.com/rfjakob/earlyoom/issues/221
|
||||
%ifarch x86_64 %arm aarch64
|
||||
%bcond_without tests
|
||||
%else
|
||||
%bcond_with tests
|
||||
%endif
|
||||
|
||||
%if ! 0%{?_fillupdir:1}
|
||||
%global _fillupdir %{_localstatedir}/adm/fillup-templates
|
||||
%endif
|
||||
@ -26,12 +34,15 @@ Summary: Early OOM Daemon for Linux
|
||||
License: MIT
|
||||
Group: System/Daemons
|
||||
URL: https://github.com/rfjakob/%{name}
|
||||
Source0: https://github.com/rfjakob/earlyoom/archive/v%{version}.tar.gz
|
||||
Source0: %{URL}/earlyoom/archive/v%{version}.tar.gz
|
||||
Source11: %{name}.sysconfig
|
||||
# pandoc only for `pandoc MANPAGE.md -s -t man > earlyoom.1`
|
||||
BuildRequires: pandoc
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
%if %{with tests}
|
||||
BuildRequires: go
|
||||
%endif
|
||||
Recommends: libnotify%{?suse_version:-tools}
|
||||
Conflicts: oomd
|
||||
|
||||
@ -45,14 +56,23 @@ below critical level, it will kill the largest process (highest oom_score).
|
||||
# Fix defaults file location
|
||||
sed -i 's|/default/|/sysconfig/|' earlyoom.service.in
|
||||
|
||||
# Fix LDFLAGS handling
|
||||
sed -ri '/LDFLAGS/ s|$| -lrt|' Makefile
|
||||
# remove calls to systemctl in install
|
||||
sed -e '/systemctl/d' -i Makefile
|
||||
|
||||
# fix version test
|
||||
sed -i 's|stderrContains: "earlyoom v",|stderrContains: "earlyoom %{version}",|' testsuite_cli_test.go
|
||||
|
||||
%build
|
||||
CFLAGS='%{?build_cflags}%{!?build_cflags:%optflags} -DVERSION=\"%{version}\" -std=gnu99'
|
||||
CPPFLAGS='%{?build_cxxflags}%{!?build_cxxflags:%optflags}'
|
||||
LDFLAGS="-lrt ${RPM_LD_FLAGS}"
|
||||
%make_build CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" PREFIX=%{_prefix}
|
||||
|
||||
%check
|
||||
%if %{with tests}
|
||||
%make_build test
|
||||
%endif
|
||||
|
||||
%install
|
||||
%make_install PREFIX=%{_prefix} SYSTEMDUNITDIR=%{_unitdir}
|
||||
install -D -m644 %{SOURCE11} %{buildroot}%{_fillupdir}/sysconfig.%{name}
|
||||
|
@ -9,4 +9,4 @@
|
||||
#
|
||||
# see man(1) earlyoom
|
||||
#
|
||||
EARLYOOM_ARGS="-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|firefox|chromium|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|Web\ Content|firefox|chromium|chrome|opera|falkon|ffmpeg|vlc|mpv|akregator|thumbnail.so)$'"
|
||||
|
Loading…
x
Reference in New Issue
Block a user