commit: 61d7eb1970d506a5975ac38bdef5a6e0d2a4ceab
Author: Alexander Tsoy <alexander <AT> tsoy <DOT> me>
AuthorDate: Sun May 17 14:20:03 2020 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sun May 17 16:41:50 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61d7eb19
sys-process/rtirq: Version bump to 20191121
Also move rtirq script into /usr/bin.
Signed-off-by: Alexander Tsoy <alexander <AT> tsoy.me>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
sys-process/rtirq/Manifest | 1 +
sys-process/rtirq/files/rtirq.initd | 28 ++++++++++++++++++
sys-process/rtirq/rtirq-20191121.ebuild | 52 +++++++++++++++++++++++++++++++++
3 files changed, 81 insertions(+)
diff --git a/sys-process/rtirq/Manifest b/sys-process/rtirq/Manifest
index 9f56d4da7c5..d5352d4ebc0 100644
--- a/sys-process/rtirq/Manifest
+++ b/sys-process/rtirq/Manifest
@@ -1 +1,2 @@
DIST rtirq-20180209.tar.gz 12290 BLAKE2B
432bf6c931b753d4d9a5d7c50a35b0fb9b2161d09c9f762b97a5aae88152de1f3d14a2a4ccc46d8607d7379e4a7a659d603cc09ee20017923b176359eb4b9133
SHA512
9de924e627b91d6df162b6c8c0c3421fbab11f08162abe98b0fac8742ea924a7e0a18aab23d828e19fe81dfdb70f2f6814c7195acbcbc93af9a339dc549190b2
+DIST rtirq-20191121.tar.gz 12755 BLAKE2B
040e1b39b83dc27e542093a12830fa51c9786c2747962740c31e684235acab33275a40761fd87cd1307284c2b8e49362d4acb216000338bc0744dd0ca6b0144c
SHA512
bb1ae0099e37220b13f91303e56e8ae7892964638c1000fd66b6ceb23925c8aa2ac0c629bbb799a59c1a8adb035c34c4b0bee31afe05fcc9f80cd94d5a84ddc1
diff --git a/sys-process/rtirq/files/rtirq.initd
b/sys-process/rtirq/files/rtirq.initd
new file mode 100644
index 00000000000..5bd77921c66
--- /dev/null
+++ b/sys-process/rtirq/files/rtirq.initd
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+command="/usr/bin/rtirq"
+
+extra_commands="status"
+
+depend() {
+ need localmount
+ after alsasound logger
+}
+
+start() {
+ ebegin "Starting rtirq"
+ ${command} start
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping rtirq"
+ ${command} stop
+ eend ${?}
+}
+
+status() {
+ ${command} status
+}
diff --git a/sys-process/rtirq/rtirq-20191121.ebuild
b/sys-process/rtirq/rtirq-20191121.ebuild
new file mode 100644
index 00000000000..f936e02182f
--- /dev/null
+++ b/sys-process/rtirq/rtirq-20191121.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit linux-info systemd
+
+DESCRIPTION="Modify realtime scheduling policy and priority of IRQ handlers"
+HOMEPAGE="https://www.rncbc.org/archive/#rtirq"
+SRC_URI="https://www.rncbc.org/archive/${P}.tar.gz
+ https://www.rncbc.org/archive/old/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+src_prepare() {
+ # Correct config file path.
+ sed -i -e "s:^\(RTIRQ_CONFIG\=\)\(.*\):\1/etc/conf.d/rtirq:" ${PN}.sh
|| die
+ sed -i -e "s:/etc/sysconfig/rtirq:/etc/conf.d/rtirq:" ${PN}.conf || die
+ sed -i -e "s:/etc/init.d/rtirq:/usr/bin/rtirq:" ${PN}{,-resume}.service
|| die
+
+ default
+}
+
+src_install() {
+ newbin rtirq.sh rtirq
+ newinitd "${FILESDIR}"/rtirq.initd rtirq
+ newconfd rtirq.conf rtirq
+ systemd_dounit rtirq{,-resume}.service
+}
+
+pkg_postinst() {
+ local kconfig_warn=1
+ local cmdline
+
+ if linux-info_get_any_version && linux_config_exists; then
+ if linux_chkconfig_present PREEMPT_RT; then
+ kconfig_warn=0
+ elif linux_chkconfig_present IRQ_FORCED_THREADING; then
+ cmdline=$(< /proc/cmdline) || die
+ [[ ${cmdline} == *threadirqs* ]] && kconfig_warn=0
+ fi
+ fi
+
+ if (( ${kconfig_warn} )); then
+ ewarn "To use rtirq, you need one of the following kernel
configurations:"
+ ewarn " - PREEMPT_RT config option enabled (e.g. with
sys-kernel/rt-sources);"
+ ewarn " - IRQ_FORCED_THREADING config option enabled and
'threadirqs' option"
+ ewarn " added to the kernel cmdline."
+ fi
+}