Compare commits
No commits in common. "rawhide" and "f31" have entirely different histories.
@ -1,39 +0,0 @@
|
||||
From 076af42b270388f38055fdf60dccbb3001de723a Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Xu <dlxu@fb.com>
|
||||
Date: Wed, 23 Jun 2021 16:13:56 -0700
|
||||
Subject: [PATCH] Check return value for mkstemp()
|
||||
|
||||
Summary: Fix build warning. Note we don't use EXPECT()/ASSERT() family of macros b/c they can't be used in setup functions
|
||||
|
||||
Reviewed By: htejun, lnyng
|
||||
|
||||
Differential Revision: D29340980
|
||||
|
||||
fbshipit-source-id: b20ce5ceb057307af9fdc2d9720c56b57418970a
|
||||
---
|
||||
src/oomd/StatsTest.cpp | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/oomd/StatsTest.cpp b/src/oomd/StatsTest.cpp
|
||||
index a3ff931..29f7566 100644
|
||||
--- a/src/oomd/StatsTest.cpp
|
||||
+++ b/src/oomd/StatsTest.cpp
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <json/reader.h>
|
||||
#include <json/value.h>
|
||||
#include <sys/socket.h>
|
||||
+#include <exception>
|
||||
#include <iostream>
|
||||
#include <optional>
|
||||
#include "oomd/StatsClient.h"
|
||||
@@ -53,7 +54,9 @@ class StatsTest : public ::testing::Test {
|
||||
protected:
|
||||
std::unique_ptr<Stats> get_instance() {
|
||||
socket_path = "/tmp/oomd-XXXXXX.socket";
|
||||
- ::mkstemps(socket_path.data(), 7);
|
||||
+ if (::mkstemps(socket_path.data(), 7) == -1) {
|
||||
+ throw std::runtime_error("Failed to create temp socket");
|
||||
+ }
|
||||
return Stats::get_for_unittest(socket_path);
|
||||
}
|
||||
};
|
@ -1,44 +0,0 @@
|
||||
From 3989e169fc0da9c29da8dd692427d4f4c1ace413 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Xu <dlxu@fb.com>
|
||||
Date: Wed, 23 Jun 2021 18:17:26 -0700
|
||||
Subject: [PATCH] Fix ODR violation in tests
|
||||
|
||||
Summary: ContinuePlugin was defined twice. Namespace the test one to avoid ODR issues.
|
||||
|
||||
Reviewed By: davide125
|
||||
|
||||
Differential Revision: D29346385
|
||||
|
||||
fbshipit-source-id: 58fdde38a64c8bd22d14d55d0ba04ae865d2fabf
|
||||
---
|
||||
src/oomd/config/ConfigCompilerTest.cpp | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/oomd/config/ConfigCompilerTest.cpp b/src/oomd/config/ConfigCompilerTest.cpp
|
||||
index ecf2b92..abe5d10 100644
|
||||
--- a/src/oomd/config/ConfigCompilerTest.cpp
|
||||
+++ b/src/oomd/config/ConfigCompilerTest.cpp
|
||||
@@ -36,6 +36,7 @@ using namespace Oomd::Config2;
|
||||
using namespace Oomd::Engine;
|
||||
|
||||
namespace {
|
||||
+
|
||||
int prerun_count;
|
||||
int prerun_stored_count;
|
||||
int count;
|
||||
@@ -57,6 +58,7 @@ void reset_counters() {
|
||||
static constexpr auto kRandomCgroupFs = "oomd/fixtures/cgroup";
|
||||
|
||||
namespace Oomd {
|
||||
+namespace test {
|
||||
|
||||
class ContinuePlugin : public BasePlugin {
|
||||
public:
|
||||
@@ -308,6 +310,7 @@ REGISTER_PLUGIN(NoInit, NoInitPlugin::create);
|
||||
REGISTER_PREKILL_HOOK(NoOpPrekillHook, NoOpPrekillHook::create);
|
||||
REGISTER_PLUGIN(Kill, KillPlugin::create);
|
||||
|
||||
+} // namespace test
|
||||
} // namespace Oomd
|
||||
|
||||
class CompilerTest : public ::testing::Test {
|
@ -1,41 +0,0 @@
|
||||
From 83a6742f08349fbc93f459228dcc3d1f56eac411 Mon Sep 17 00:00:00 2001
|
||||
From: ycitgez <yuhanun.citgez@flatexdegiro.com>
|
||||
Date: Tue, 12 Jul 2022 13:20:32 -0700
|
||||
Subject: [PATCH] Resolved a compiler error due to lacking include (#162)
|
||||
|
||||
Summary:
|
||||
Fixed an issue where a missing include causing compiler errors
|
||||
|
||||
Also applied clang-format.sh
|
||||
|
||||
Issue occured with following compiler and linker:
|
||||
```
|
||||
C++ compiler for the host machine: ccache c++ (gcc 12.1.1 "c++ (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1)")
|
||||
C++ linker for the host machine: c++ ld.bfd 2.37-27
|
||||
```
|
||||
|
||||
Pull Request resolved: https://github.com/facebookincubator/oomd/pull/162
|
||||
|
||||
Reviewed By: brianc118
|
||||
|
||||
Differential Revision: D37790605
|
||||
|
||||
Pulled By: lnyng
|
||||
|
||||
fbshipit-source-id: d42776978b4bc8f7e2f584fde109e6cc3f5bc7d6
|
||||
---
|
||||
src/oomd/Log.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/oomd/Log.h b/src/oomd/Log.h
|
||||
index 3d2d6ea..0ed5f73 100644
|
||||
--- a/src/oomd/Log.h
|
||||
+++ b/src/oomd/Log.h
|
||||
@@ -18,6 +18,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
+#include <array>
|
||||
#include <condition_variable>
|
||||
#include <iostream>
|
||||
#include <mutex>
|
63
oomd.spec
63
oomd.spec
@ -1,19 +1,10 @@
|
||||
%bcond_without tests
|
||||
|
||||
Name: oomd
|
||||
Summary: Userspace Out-Of-Memory (OOM) killer
|
||||
Version: 0.5.0
|
||||
Release: 7%{dist}
|
||||
Version: 0.4.0
|
||||
Release: 1%{dist}
|
||||
License: GPLv2
|
||||
URL: https://github.com/facebookincubator/oomd/
|
||||
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
# Check return value for mkstemp()
|
||||
Patch0: %{url}/commit/076af42b270388f38055fdf60dccbb3001de723a.patch
|
||||
# Fix ODR violation in tests
|
||||
Patch1: %{url}/commit/3989e169fc0da9c29da8dd692427d4f4c1ace413.patch
|
||||
# Resolved a compiler error due to lacking include
|
||||
Patch2: %{url}/commit/83a6742f08349fbc93f459228dcc3d1f56eac411.patch
|
||||
|
||||
|
||||
ExcludeArch: i686 armv7hl
|
||||
|
||||
@ -21,10 +12,8 @@ BuildRequires: gcc-c++
|
||||
BuildRequires: meson >= 0.45
|
||||
BuildRequires: pkgconfig(jsoncpp)
|
||||
BuildRequires: pkgconfig(libsystemd)
|
||||
%if %{with tests}
|
||||
BuildRequires: gmock-devel
|
||||
BuildRequires: gtest-devel
|
||||
%endif
|
||||
BuildRequires: pkgconfig(gtest_main)
|
||||
BuildRequires: pkgconfig(gmock)
|
||||
BuildRequires: systemd-rpm-macros
|
||||
%{?systemd_requires}
|
||||
|
||||
@ -47,16 +36,14 @@ of flexibility where each workload can have custom protection rules.
|
||||
Furthermore, time spent livedlocked in kernelspace is minimized.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
%autosetup
|
||||
|
||||
%build
|
||||
%meson
|
||||
%meson_build
|
||||
|
||||
%if %{with tests}
|
||||
%check
|
||||
%meson_test
|
||||
%endif
|
||||
|
||||
%install
|
||||
%meson_install
|
||||
@ -79,46 +66,6 @@ Furthermore, time spent livedlocked in kernelspace is minimized.
|
||||
%systemd_postun_with_restart oomd.service
|
||||
|
||||
%changelog
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Tue Aug 09 2022 Davide Cavalca <dcavalca@fedoraproject.org> - 0.5.0-6
|
||||
- Backport upstream commit to add a missing include
|
||||
Fixes: RHBZ#2113559
|
||||
|
||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Wed Nov 03 2021 Björn Esser <besser82@fedoraproject.org> - 0.5.0-3
|
||||
- Rebuild (jsoncpp)
|
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Wed Jun 23 2021 Davide Cavalca <dcavalca@fedoraproject.org> - 0.5.0-1
|
||||
- Update to 0.5.0
|
||||
|
||||
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.4.0-6
|
||||
- Rebuilt for updated systemd-rpm-macros
|
||||
See https://pagure.io/fesco/issue/2583.
|
||||
|
||||
* Wed Feb 17 2021 Davide Cavalca <dcavalca@fedoraproject.org> - 0.4.0-5
|
||||
- Build for EPEL 8
|
||||
- Make tests conditional
|
||||
- Replace gcc-11 patch with upstream commits
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Fri Oct 30 2020 Jeff Law <law@redhat.com> - 0.4.0-3
|
||||
- Fix missing #includes for gcc-11
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Thu Jun 4 2020 Filipe Brandenburger <filbranden@gmail.com> - 0.4.0-1
|
||||
- Upgrade to v0.4.0
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (oomd-0.5.0.tar.gz) = 1841245c56c9de359b8b9d5e03325430e5b1300b6210f94d810ba3857506658ba9162460baf5ae683a797b534215baa30cefca6daa207d257e30b7c5bd1ac33d
|
||||
SHA512 (oomd-0.4.0.tar.gz) = 6bf5668eedd093666abf290ec8a864e4028deb29605a35da31d8ba9eb4ae18322ec0bb214e683d5c5a8c2e1fdf17d3f81645ca0ff9a07316a172e2a7765de046
|
||||
|
Loading…
Reference in New Issue
Block a user