diff --git a/sys-process/nohang/Manifest b/sys-process/nohang/Manifest new file mode 100644 index 0000000000..c2fd6f4dd3 --- /dev/null +++ b/sys-process/nohang/Manifest @@ -0,0 +1 @@ +DIST nohang-0.2.0.tar.gz 58755 BLAKE2B 5a6667490fc7154b1c729adb88e1ee4d09918d03f1e3b1b0cc7f77b97ecf875e1dd11e75786fe7489b351cd543426a77e82253cf46c501a73d86a226a658b871 SHA512 03edda85f028d6c266851c8f9f9a99f6edb3eb2f32d7dd0d14ce19677b42e72800a11a24b90a639fa34f7f057be824d36360c43c7c129b76dbe9fab3efce5d77 diff --git a/sys-process/nohang/metadata.xml b/sys-process/nohang/metadata.xml new file mode 100644 index 0000000000..4b9b1e9303 --- /dev/null +++ b/sys-process/nohang/metadata.xml @@ -0,0 +1,18 @@ + + + + + norbiros@protonmail.com + Norbiros + + + hakavlad/nohang + https://github.com/hakavlad/nohang/issues + + + Nohang is a lightweight OOM prevention daemon that monitors system memory and can take action (e.g. sending SIGTERM or SIGKILL) when memory is critically low. It helps improve system responsiveness and stability under memory pressure. + + + Install systemd service file + + diff --git a/sys-process/nohang/nohang-0.2.0.ebuild b/sys-process/nohang/nohang-0.2.0.ebuild new file mode 100644 index 0000000000..97fb3297c3 --- /dev/null +++ b/sys-process/nohang/nohang-0.2.0.ebuild @@ -0,0 +1,38 @@ +# Copyright 2019-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit systemd + +DESCRIPTION="A sophisticated low memory handler for Linux" +HOMEPAGE="https://github.com/hakavlad/nohang" +LICENSE="MIT" +SLOT="0" +IUSE="systemd" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/hakavlad/nohang.git" + EGIT_BRANCH="dev" +else + SRC_URI="https://github.com/hakavlad/nohang/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DEPEND=" + dev-lang/python + systemd? ( sys-apps/systemd ) +" +RDEPEND="${DEPEND}" +BDEPEND="" + +S="${WORKDIR}/${P}" + +src_install() { + if use systemd; then + PREFIX="/usr" SYSCONFDIR="/etc" emake DESTDIR="${D}" install + else + PREFIX="/usr" SYSCONFDIR="/etc" emake DESTDIR="${D}" -B install-openrc + fi +} diff --git a/sys-process/nohang/nohang-9999.ebuild b/sys-process/nohang/nohang-9999.ebuild new file mode 100644 index 0000000000..97fb3297c3 --- /dev/null +++ b/sys-process/nohang/nohang-9999.ebuild @@ -0,0 +1,38 @@ +# Copyright 2019-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit systemd + +DESCRIPTION="A sophisticated low memory handler for Linux" +HOMEPAGE="https://github.com/hakavlad/nohang" +LICENSE="MIT" +SLOT="0" +IUSE="systemd" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/hakavlad/nohang.git" + EGIT_BRANCH="dev" +else + SRC_URI="https://github.com/hakavlad/nohang/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DEPEND=" + dev-lang/python + systemd? ( sys-apps/systemd ) +" +RDEPEND="${DEPEND}" +BDEPEND="" + +S="${WORKDIR}/${P}" + +src_install() { + if use systemd; then + PREFIX="/usr" SYSCONFDIR="/etc" emake DESTDIR="${D}" install + else + PREFIX="/usr" SYSCONFDIR="/etc" emake DESTDIR="${D}" -B install-openrc + fi +}