From: Joseph Kogut <joseph.kogut@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/earlyoom: new package
Date: Thu, 28 May 2020 18:54:02 -0700 [thread overview]
Message-ID: <20200529015402.2646343-1-joseph.kogut@gmail.com> (raw)
EarlyOOM daemon for triggering Linux OOM killer before running out of
memory, avoiding situations where the machine becomes unresponsive from
out of control swapping.
Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
---
DEVELOPERS | 1 +
package/Config.in | 1 +
package/earlyoom/Config.in | 9 +++++++++
package/earlyoom/earlyoom.hash | 4 ++++
package/earlyoom/earlyoom.mk | 37 ++++++++++++++++++++++++++++++++++
5 files changed, 52 insertions(+)
create mode 100644 package/earlyoom/Config.in
create mode 100644 package/earlyoom/earlyoom.hash
create mode 100644 package/earlyoom/earlyoom.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 0f1574c930..3e749e764b 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1388,6 +1388,7 @@ N: Joseph Kogut <joseph.kogut@gmail.com>
F: package/at-spi2-atk/
F: package/at-spi2-core/
F: package/clang/
+F: package/earlyoom/
F: package/gconf/
F: package/libnss/
F: package/lld/
diff --git a/package/Config.in b/package/Config.in
index c245abbc42..0f1da74e0f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2338,6 +2338,7 @@ menu "System tools"
source "package/docker-containerd/Config.in"
source "package/docker-engine/Config.in"
source "package/docker-proxy/Config.in"
+ source "package/earlyoom/Config.in"
source "package/efibootmgr/Config.in"
source "package/efivar/Config.in"
source "package/emlog/Config.in"
diff --git a/package/earlyoom/Config.in b/package/earlyoom/Config.in
new file mode 100644
index 0000000000..abb720437c
--- /dev/null
+++ b/package/earlyoom/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_EARLYOOM
+ bool "earlyoom"
+ help
+ Early OOM daemon for Linux.
+
+ User space daemon for triggering Linux OOM killer
+ before running out of memory, avoiding situations
+ where the machine becomes unresponsive from out of
+ control swapping.
diff --git a/package/earlyoom/earlyoom.hash b/package/earlyoom/earlyoom.hash
new file mode 100644
index 0000000000..4cafe50bc3
--- /dev/null
+++ b/package/earlyoom/earlyoom.hash
@@ -0,0 +1,4 @@
+# locally calculated
+sha256 b81804fc4470f996014d52252a87a1cf3b43d3d8754140035b10dcee349302b8 earlyoom-1.6.tar.gz
+# License files, locally calculated
+sha256 e730b3ec729de46d987ae73f30ed337e4cbe832f09205330acfa71848c6e0087 LICENSE
diff --git a/package/earlyoom/earlyoom.mk b/package/earlyoom/earlyoom.mk
new file mode 100644
index 0000000000..bea59bd416
--- /dev/null
+++ b/package/earlyoom/earlyoom.mk
@@ -0,0 +1,37 @@
+################################################################################
+#
+# earlyoom
+#
+################################################################################
+
+EARLYOOM_VERSION = 1.6
+EARLYOOM_SITE = $(call github,rfjakob,earlyoom,v$(EARLYOOM_VERSION))
+EARLYOOM_LICENSE = MIT
+EARLYOOM_LICENSE_FILES = LICENSE
+
+EARLYOOM_MAKE_OPTS = \
+ CC=$(TARGET_CC) \
+ DESTDIR=$(TARGET_DIR) \
+ VERSION=$(EARLYOOM_VERSION) \
+ PREFIX=/usr \
+ SYSTEMDUNITDIR=/usr/lib/systemd/system
+
+define EARLYOOM_CONFIGURE_CMDS
+ $(SED) "/systemctl/d" $(EARLYOOM_DIR)/Makefile
+ $(SED) "/chcon/d" $(EARLYOOM_DIR)/Makefile
+ $(SED) "/update-rc.d/d" $(EARLYOOM_DIR)/Makefile
+endef
+
+define EARLYOOM_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) earlyoom $(EARLYOOM_MAKE_OPTS)
+endef
+
+define EARLYOOM_INSTALL_INIT_SYSV
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install-initscript $(EARLYOOM_MAKE_OPTS)
+endef
+
+define EARLYOOM_INSTALL_INIT_SYSTEMD
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install $(EARLYOOM_MAKE_OPTS)
+endef
+
+$(eval $(generic-package))
--
2.26.2
next reply other threads:[~2020-05-29 1:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-29 1:54 Joseph Kogut [this message]
2020-05-29 12:09 ` [Buildroot] [PATCH 1/1] package/earlyoom: new package Matthew Weber
2020-06-08 17:19 ` Joseph Kogut
2020-06-08 17:58 ` [Buildroot] [PATCH v2 " Joseph Kogut
2020-06-10 21:20 ` Thomas Petazzoni
2020-06-10 21:31 ` Joseph Kogut
2020-06-10 23:25 ` Joseph Kogut
2020-06-12 17:40 ` [Buildroot] [PATCH v3 " Joseph Kogut
2020-06-14 15:42 ` Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200529015402.2646343-1-joseph.kogut@gmail.com \
--to=joseph.kogut@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox