From 69de5f5ede6878cbacf67c46f07fae723b3a11f0 Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Sun, 23 May 2021 22:35:17 +0200 Subject: app-admin/ananicy: initial import Signed-off-by: Alessandro Barbieri Closes: https://bugs.gentoo.org/726318 Closes: https://github.com/gentoo/gentoo/pull/20960 Signed-off-by: Sam James --- app-admin/ananicy/Manifest | 1 + app-admin/ananicy/ananicy-2.2.1-r1.ebuild | 37 ++++++++++++++++++++++ .../ananicy/files/ananicy-fix-sysctl-path.patch | 14 ++++++++ app-admin/ananicy/files/ananicy.initd | 18 +++++++++++ app-admin/ananicy/metadata.xml | 16 ++++++++++ 5 files changed, 86 insertions(+) create mode 100644 app-admin/ananicy/Manifest create mode 100644 app-admin/ananicy/ananicy-2.2.1-r1.ebuild create mode 100644 app-admin/ananicy/files/ananicy-fix-sysctl-path.patch create mode 100644 app-admin/ananicy/files/ananicy.initd create mode 100644 app-admin/ananicy/metadata.xml (limited to 'app-admin/ananicy') diff --git a/app-admin/ananicy/Manifest b/app-admin/ananicy/Manifest new file mode 100644 index 000000000000..f0c5c784bbde --- /dev/null +++ b/app-admin/ananicy/Manifest @@ -0,0 +1 @@ +DIST ananicy-2.2.1.tar.gz 43197 BLAKE2B 5fc1fb201c50d7b93b62d089bf341c105b2e931349966e97b2becd0744f24ebd8900ea54e113bc3fc7a2648f4e088a2215b669861a311f2c92f30a8583ad95ad SHA512 858bbfbf196a2b8f512e4f09d8a0f176ef33fbbf610c8de437dc7889830a6f8a302c4d864faa8e28c71d4c1229c112e56b7fd84918d85786153228217aaec7ef diff --git a/app-admin/ananicy/ananicy-2.2.1-r1.ebuild b/app-admin/ananicy/ananicy-2.2.1-r1.ebuild new file mode 100644 index 000000000000..7f383bf36891 --- /dev/null +++ b/app-admin/ananicy/ananicy-2.2.1-r1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_{8..10} pypy3 ) + +inherit python-single-r1 + +DESCRIPTION="ANother Auto NICe daemon" +HOMEPAGE="https://github.com/Nefelim4ag/Ananicy" +SRC_URI="https://github.com/Nefelim4ag/Ananicy/archive/${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${P^}" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +BDEPEND="${PYTHON_DEPS}" +RDEPEND=" + ${BDEPEND} + sys-process/schedtool +" +DOCS=( README.md ) +PATCHES=( "${FILESDIR}/${PN}-fix-sysctl-path.patch" ) + +src_compile() { + return +} + +src_install() { + emake PREFIX="${D}" install + python_fix_shebang "${ED}/usr/bin/ananicy" + doinitd "${FILESDIR}/ananicy.initd" + einstalldocs +} diff --git a/app-admin/ananicy/files/ananicy-fix-sysctl-path.patch b/app-admin/ananicy/files/ananicy-fix-sysctl-path.patch new file mode 100644 index 000000000000..1c44fe8c402e --- /dev/null +++ b/app-admin/ananicy/files/ananicy-fix-sysctl-path.patch @@ -0,0 +1,14 @@ +--- a/ananicy.service ++++ b/ananicy.service +@@ -4,9 +4,9 @@ + + [Service] + Type=notify +-ExecStartPre=/sbin/sysctl -e kernel.sched_autogroup_enabled=0 ++ExecStartPre=/usr/sbin/sysctl -e kernel.sched_autogroup_enabled=0 + ExecStart=/usr/bin/ananicy start +-ExecStopPost=/sbin/sysctl -e kernel.sched_autogroup_enabled=1 ++ExecStopPost=/usr/sbin/sysctl -e kernel.sched_autogroup_enabled=1 + Nice=19 + SuccessExitStatus=143 + OOMScoreAdjust=-999 diff --git a/app-admin/ananicy/files/ananicy.initd b/app-admin/ananicy/files/ananicy.initd new file mode 100644 index 000000000000..e2c31dfb10b7 --- /dev/null +++ b/app-admin/ananicy/files/ananicy.initd @@ -0,0 +1,18 @@ +#!/usr/bin/openrc-run + +pidfile="/run/ananicy.pid" +command="/usr/bin/ananicy" +command_args="start" +command_background=true + +start_pre() { + /usr/sbin/sysctl -e kernel.sched_autogroup_enabled=0 +} + +stop_post() { + /usr/sbin/sysctl -e kernel.sched_autogroup_enabled=1 +} + +stop() { + start-stop-daemon --stop --pidfile "$pidfile" +} diff --git a/app-admin/ananicy/metadata.xml b/app-admin/ananicy/metadata.xml new file mode 100644 index 000000000000..1385d9ae3f88 --- /dev/null +++ b/app-admin/ananicy/metadata.xml @@ -0,0 +1,16 @@ + + + + + lssndrbarbieri@gmail.com + Alessandro Barbieri + + + proxy-maint@gentoo.org + Proxy Maintainers + + + https://github.com/Nefelim4ag/Ananicy/issues + Nefelim4ag/Ananicy + + -- cgit v1.2.3-65-gdbad