meta-virtualization/recipes-extended/irqbalance/irqbalance.inc
He Zhe 46f9004365 irqbalance: Use built-in irqbalance.service instead of local one
The local irqbalanced.service was written long before when there wasn't one in
upstream. Then upstream created temporary runtime directory /run/irqbalance in
its irqbalanced.service, but no one did this for this recipe. Which renders the
following error.

/usr/sbin/irqbalance[314]: Daemon couldn't be bound to the file-based socket.

This patch starts to use upstream irqbalance.service instead and remove the
local one.

root@qemux86-64:~# systemctl status irqbalanced
* irqbalanced.service - irqbalance daemon
     Loaded: loaded (/lib/systemd/system/irqbalanced.service; enabled; preset: enabled)
     Active: active (running) since Mon 2022-08-22 10:10:22 UTC; 3s ago
       Docs: man:irqbalance(1)
             https://github.com/Irqbalance/irqbalance
   Main PID: 208 (irqbalance)
      Tasks: 2 (limit: 263)
     Memory: 1.4M
     CGroup: /system.slice/irqbalanced.service
             `-208 /usr/sbin/irqbalance --foreground

Aug 22 10:10:22 qemux86-64 systemd[1]: Started irqbalance daemon.
root@qemux86-64:~# ls -l /run/irqbalance/irqbalance208.sock
srwxr-xr-x 1 root root 0 Aug 22 10:10 /run/irqbalance/irqbalance208.sock

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2022-08-23 21:43:33 -04:00

47 lines
1.4 KiB
PHP

#
# Copyright (C) 2013 Wind River Systems, Inc.
#
SUMMARY = "IRQ allocation daemon"
DESCRIPTION = "A daemon to balance interrupts across multiple CPUs, \
which can lead to better performance and IO balance on SMP systems."
HOMEPAGE = "http://code.google.com/p/irqbalance/"
BUGTRACKER = "http://code.google.com/p/irqbalance/issues/list"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://irqbalance.c;beginline=6;endline=8;md5=b94e153694672307b503b1bc87dc9e24 \
"
DEPENDS = "glib-2.0"
INITSCRIPT_NAME = "irqbalanced"
INITSCRIPT_PARAMS = "defaults"
inherit autotools update-rc.d pkgconfig systemd
SYSTEMD_PACKAGES = "irqbalance"
SYSTEMD_SERVICE:irqbalance = "irqbalanced.service"
EXTRA_OECONF = "--program-transform-name= \
"
# let the recipes or appends define options
#
PACKAGECONFIG ?= ""
# enable,disable,depends,rdepends
#
PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl,"
PACKAGECONFIG[libcap-ng] = "--with-libcap-ng,--without-libcap-ng,libcap-ng,"
do_install () {
oe_runmake 'DESTDIR=${D}' install
install -d ${D}${sysconfdir}/init.d
cat ${S}/irqbalance.init | sed -e's,/usr/sbin,${sbindir},g' > ${D}${sysconfdir}/init.d/irqbalanced
chmod 755 ${D}${sysconfdir}/init.d/irqbalanced
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${S}/misc/irqbalance.service ${D}${systemd_unitdir}/system/irqbalanced.service
}