summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnima2023-10-09 13:03:04 +1300
committerAnima2023-10-09 13:03:04 +1300
commitd4e46562a198c41f7266986d053789faeb0c43b7 (patch)
treeeceaa8723eb2734023612cc8556af13379b0b59f
downloadaur-d4e46562a198c41f7266986d053789faeb0c43b7.tar.gz
Initial commit
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD50
-rw-r--r--irqbalance.confd19
-rw-r--r--irqbalance.initd19
-rw-r--r--musl.patch21
5 files changed, 134 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..29b61bd50e30
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = irqbalance-openrc
+ pkgdesc = Daemon that distributes interrupts over the processors
+ pkgver = 1.9.2
+ pkgrel = 1
+ url = https://github.com/Irqbalance/irqbalance
+ arch = any
+ license = GPL-2.0-or-later
+ makedepends = glib2
+ makedepends = autoconf
+ makedepends = automake
+ makedepends = libtool
+ makedepends = ncurses
+ makedepends = numactl
+ provides = irqbalance
+ conflicts = irqbalance
+ source = irqbalance-openrc-1.9.2.tar.gz::https://github.com/Irqbalance/irqbalance/archive/v1.9.2.tar.gz
+ source = musl.patch
+ source = irqbalance.confd
+ source = irqbalance.initd
+ sha256sums = 19a1feb379803cc27f86a71cf1b94bb2e103811691ff7448119d8f1e88645bd3
+ sha256sums = c98932f04ff362e16aaece28bda2cb3ab90e882935bc2a98f207360d2f761b2e
+ sha256sums = 98bb18cd977a0706c3e63a36a7dfb2aa01cd84cabb719da0ea5bf795e5d02413
+ sha256sums = 7c6b7a0c0385fcc63a693bb705bc378a333ff69a6ec100ce9695de1d92bca262
+
+pkgname = irqbalance-openrc
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a62cf214e218
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Anima <animafps@pm.me>
+pkgname=irqbalance-openrc
+pkgver=1.9.2
+pkgrel=1
+pkgdesc="Daemon that distributes interrupts over the processors"
+url="https://github.com/Irqbalance/irqbalance"
+arch=('any')
+license=('GPL-2.0-or-later')
+conflicts=('irqbalance')
+provides=('irqbalance')
+makedepends=('glib2' 'autoconf' 'automake' 'libtool' 'ncurses' 'numactl')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/Irqbalance/irqbalance/archive/v$pkgver.tar.gz"
+ 'musl.patch'
+ 'irqbalance.confd'
+ 'irqbalance.initd'
+ )
+
+prepare() {
+ cd irqbalance-$pkgver
+ ./autogen.sh
+}
+
+build() {
+ cd irqbalance-$pkgver
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make
+}
+
+check() {
+ cd irqbalance-$pkgver
+ make check
+}
+
+package() {
+ cd irqbalance-$pkgver
+ make DESTDIR="$pkgdir" install
+ cd ..
+ install -m755 -D "$srcdir"/irqbalance.initd "$pkgdir"/etc/init.d/irqblance
+ install -m644 -D "$srcdir"/irqbalance.confd "$pkgdir"/etc/conf.d/irqbalance
+}
+sha256sums=('19a1feb379803cc27f86a71cf1b94bb2e103811691ff7448119d8f1e88645bd3'
+ 'c98932f04ff362e16aaece28bda2cb3ab90e882935bc2a98f207360d2f761b2e'
+ '98bb18cd977a0706c3e63a36a7dfb2aa01cd84cabb719da0ea5bf795e5d02413'
+ '7c6b7a0c0385fcc63a693bb705bc378a333ff69a6ec100ce9695de1d92bca262')
diff --git a/irqbalance.confd b/irqbalance.confd
new file mode 100644
index 000000000000..2761cfcd3596
--- /dev/null
+++ b/irqbalance.confd
@@ -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/irqbalance.initd b/irqbalance.initd
new file mode 100644
index 000000000000..9c40fd923885
--- /dev/null
+++ b/irqbalance.initd
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/irqbalance/files/irqbalance.init,v 1.5 2012/01/07 22:04:49 vapier Exp $
+
+command="/usr/sbin/irqbalance"
+command_args="--foreground $IRQBALANCE_OPTS"
+pidfile="/run/$RC_SVCNAME.pid"
+command_background=true
+
+depends() {
+ need localmount
+ after bootmisc hwdrivers modules
+}
+
+start_pre() {
+ checkpath --quiet --directory --mode 0755 \
+ --owner root:root /run/irqbalance
+}
diff --git a/musl.patch b/musl.patch
new file mode 100644
index 000000000000..c2b444c9f67f
--- /dev/null
+++ b/musl.patch
@@ -0,0 +1,21 @@
+this is a long unsigned int, initialising it with a pointer doesn't make sense
+--
+diff --git a/procinterrupts.c b/procinterrupts.c
+index e91b203..a60fe00 100644
+--- a/procinterrupts.c
++++ b/procinterrupts.c
+@@ -107,10 +107,10 @@ static void guess_arm_irq_hints(char *name, struct irq_info *info)
+ static int compiled = 0;
+ /* Note: Last entry is a catchall */
+ static struct irq_match matches[] = {
+- { "eth.*" ,{NULL} ,NULL, IRQ_TYPE_LEGACY, IRQ_GBETH },
+- { "[A-Z0-9]{4}[0-9a-f]{4}", {NULL} ,check_platform_device, IRQ_TYPE_LEGACY, IRQ_OTHER},
+- { "PNP[0-9a-f]{4}", {NULL} ,check_platform_device, IRQ_TYPE_LEGACY, IRQ_OTHER},
+- { ".*", {NULL}, NULL, IRQ_TYPE_LEGACY, IRQ_OTHER},
++ { "eth.*" ,{0} ,NULL, IRQ_TYPE_LEGACY, IRQ_GBETH },
++ { "[A-Z0-9]{4}[0-9a-f]{4}", {0},check_platform_device, IRQ_TYPE_LEGACY, IRQ_OTHER},
++ { "PNP[0-9a-f]{4}", {0},check_platform_device, IRQ_TYPE_LEGACY, IRQ_OTHER},
++ { ".*", {0}, NULL, IRQ_TYPE_LEGACY, IRQ_OTHER},
+ {NULL},
+ };
+