diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-apps/irqbalance/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-apps/irqbalance/files')
-rw-r--r-- | sys-apps/irqbalance/files/irqbalance-1.2.0-tinfo.patch | 32 | ||||
-rw-r--r-- | sys-apps/irqbalance/files/irqbalance.confd-1 | 19 | ||||
-rw-r--r-- | sys-apps/irqbalance/files/irqbalance.init.3 | 27 | ||||
-rw-r--r-- | sys-apps/irqbalance/files/irqbalance.init.4 | 20 | ||||
-rw-r--r-- | sys-apps/irqbalance/files/irqbalance.service.1 | 8 |
5 files changed, 106 insertions, 0 deletions
diff --git a/sys-apps/irqbalance/files/irqbalance-1.2.0-tinfo.patch b/sys-apps/irqbalance/files/irqbalance-1.2.0-tinfo.patch new file mode 100644 index 000000000000..20716542b6dd --- /dev/null +++ b/sys-apps/irqbalance/files/irqbalance-1.2.0-tinfo.patch @@ -0,0 +1,32 @@ +From 287d50594fe624bdb4400611d0dbecec6ff38a41 Mon Sep 17 00:00:00 2001 +From: Lars Wendler <polynomial-c@gentoo.org> +Date: Wed, 1 Mar 2017 17:11:42 +0100 +Subject: [PATCH] Prefer pkgconfig to check for ncursesw. + +That way we take possible separate tinfo lib into account. +--- + configure.ac | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 17b879a..77d8aa4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -26,7 +26,13 @@ AC_CHECK_FUNCS(getopt_long) + AC_CHECK_LIB(numa, numa_available) + AC_CHECK_LIB(m, floor) + +-AC_CHECK_LIB(curses, mvprintw) ++PKG_CHECK_MODULES([NCURSESW], [ncursesw], [has_ncursesw=yes], [AC_CHECK_LIB(curses, mvprintw)]) ++AS_IF([test "x$has_ncursesw" = "xyes"], [ ++ AC_SUBST([NCURSESW_CFLAGS]) ++ AC_SUBST([NCURSESW_LIBS]) ++ LIBS="$LIBS $NCURSESW_LIBS" ++ AC_SUBST([LIBS]) ++]) + + AC_C_CONST + AC_C_INLINE +-- +2.12.0 + diff --git a/sys-apps/irqbalance/files/irqbalance.confd-1 b/sys-apps/irqbalance/files/irqbalance.confd-1 new file mode 100644 index 000000000000..2761cfcd3596 --- /dev/null +++ b/sys-apps/irqbalance/files/irqbalance.confd-1 @@ -0,0 +1,19 @@ +# /etc/conf.d/irqbalance: config file for /etc/init.d/irqbalance + +# Additional options to pass to irqbalance itself. +IRQBALANCE_OPTS="" + +# These are envvars used by irqbalance itself, so make sure the "export" +# is retained. For more info, please see the irqbalance manpage. + +# Run irqbalance once and then exit +#export IRQBALANCE_ONESHOT="0" + +# Include debug messages in output +#export IRQBALANCE_DEBUG="0" + +# List of cpus to not include in balancing +#export IRQBALANCE_BANNED_CPUS="" + +# List of interrupts to not include in balancing +#export IRQBALANCE_BANNED_INTERRUPTS="" diff --git a/sys-apps/irqbalance/files/irqbalance.init.3 b/sys-apps/irqbalance/files/irqbalance.init.3 new file mode 100644 index 000000000000..9ed16416510d --- /dev/null +++ b/sys-apps/irqbalance/files/irqbalance.init.3 @@ -0,0 +1,27 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +depend() { + need localmount + after bootmisc +} + +command="/usr/sbin/irqbalance" +command_args="${IRQBALANCE_OPTS}" + +check_sysfs() { + if grep -q MSI /proc/interrupts 2>/dev/null && \ + test -z "$(find /sys/devices -type d -name msi_irqs 2>/dev/null)"; then + eerror "MSI interrupts found in /proc/interrupts but none found in sysfs." + eerror "You need to update your kernel." + return 1 + fi +} + +start() { + check_sysfs || return 1 + ebegin "Starting irqbalance" + start-stop-daemon --exec ${command} --start -- ${IRQBALANCE_OPTS} + eend $? +} diff --git a/sys-apps/irqbalance/files/irqbalance.init.4 b/sys-apps/irqbalance/files/irqbalance.init.4 new file mode 100644 index 000000000000..1fb9eeb11f4a --- /dev/null +++ b/sys-apps/irqbalance/files/irqbalance.init.4 @@ -0,0 +1,20 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +depend() { + need localmount + after bootmisc +} + +command="/usr/sbin/irqbalance" +command_args="${IRQBALANCE_OPTS}" + +start_pre() { + if grep -q MSI /proc/interrupts 2>/dev/null && \ + test -z "$(find /sys/devices -type d -name msi_irqs 2>/dev/null)"; then + eerror "MSI interrupts found in /proc/interrupts but none found in sysfs." + eerror "You need to update your kernel." + return 1 + fi +} diff --git a/sys-apps/irqbalance/files/irqbalance.service.1 b/sys-apps/irqbalance/files/irqbalance.service.1 new file mode 100644 index 000000000000..af7a979a25d0 --- /dev/null +++ b/sys-apps/irqbalance/files/irqbalance.service.1 @@ -0,0 +1,8 @@ +[Unit] +Description=CPU Interrupt Balancer + +[Service] +ExecStart=/usr/sbin/irqbalance --foreground + +[Install] +WantedBy=multi-user.target |