public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/irqbalance/files/, sys-apps/irqbalance/
Date: Fri, 15 Dec 2023 02:33:05 +0000 (UTC)	[thread overview]
Message-ID: <1702607530.c74e7cf4220c1f0d398f2e60f33b1cf8e83d521a.sam@gentoo> (raw)

commit:     c74e7cf4220c1f0d398f2e60f33b1cf8e83d521a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 15 02:31:45 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec 15 02:32:10 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c74e7cf4

sys-apps/irqbalance: backport fix for systemd journal noise

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../irqbalance-1.9.3-systemd-journal-noise.patch   | 21 ++++++
 sys-apps/irqbalance/irqbalance-1.9.3-r1.ebuild     | 78 ++++++++++++++++++++++
 2 files changed, 99 insertions(+)

diff --git a/sys-apps/irqbalance/files/irqbalance-1.9.3-systemd-journal-noise.patch b/sys-apps/irqbalance/files/irqbalance-1.9.3-systemd-journal-noise.patch
new file mode 100644
index 000000000000..7cf465f62e7d
--- /dev/null
+++ b/sys-apps/irqbalance/files/irqbalance-1.9.3-systemd-journal-noise.patch
@@ -0,0 +1,21 @@
+https://github.com/Irqbalance/irqbalance/issues/281
+https://github.com/Irqbalance/irqbalance/commit/f3282f4ddc10be44e6c423de6de8db600f748f85
+
+From f3282f4ddc10be44e6c423de6de8db600f748f85 Mon Sep 17 00:00:00 2001
+From: Neil Horman <nhorman@openssl.org>
+Date: Thu, 30 Nov 2023 16:55:30 -0500
+Subject: [PATCH] filter console only output when using journal mode
+
+Fixes #281
+--- a/irqbalance.h
++++ b/irqbalance.h
+@@ -138,7 +138,8 @@ extern unsigned int log_mask;
+ #ifdef HAVE_LIBSYSTEMD
+ #define log(mask, lvl, fmt, args...) do {					\
+ 	if (journal_logging) {							\
+-		sd_journal_print(lvl, fmt, ##args);				\
++        if (log_mask & mask & TO_SYSLOG) \
++            sd_journal_print(lvl, fmt, ##args);			\
+ 		if (log_mask & mask & TO_CONSOLE)				\
+ 			printf(fmt, ##args);					\
+ 	} else { 								\

diff --git a/sys-apps/irqbalance/irqbalance-1.9.3-r1.ebuild b/sys-apps/irqbalance/irqbalance-1.9.3-r1.ebuild
new file mode 100644
index 000000000000..ddb504106b0a
--- /dev/null
+++ b/sys-apps/irqbalance/irqbalance-1.9.3-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools udev systemd linux-info optfeature
+
+DESCRIPTION="Distribute hardware interrupts across processors on a multiprocessor system"
+HOMEPAGE="https://github.com/Irqbalance/irqbalance"
+SRC_URI="https://github.com/Irqbalance/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
+IUSE="caps +numa systemd selinux thermal tui"
+# Hangs
+RESTRICT="test"
+
+DEPEND="
+	dev-libs/glib:2
+	caps? ( sys-libs/libcap-ng )
+	numa? ( sys-process/numactl )
+	systemd? ( sys-apps/systemd:= )
+	thermal? ( dev-libs/libnl:3 )
+	tui? ( sys-libs/ncurses:=[unicode(+)] )
+"
+BDEPEND="
+	virtual/pkgconfig
+"
+RDEPEND="
+	${DEPEND}
+	selinux? ( sec-policy/selinux-irqbalance )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-systemd-journal-noise.patch
+)
+
+pkg_setup() {
+	CONFIG_CHECK="~PCI_MSI"
+	linux-info_pkg_setup
+}
+
+src_prepare() {
+	# Follow systemd policies
+	# https://wiki.gentoo.org/wiki/Project:Systemd/Ebuild_policy
+	sed \
+		-e 's/ $IRQBALANCE_ARGS//' \
+		-e '/EnvironmentFile/d' \
+		-i misc/irqbalance.service || die
+
+	default
+	eautoreconf
+}
+
+src_configure() {
+	local myeconfargs=(
+		$(use_with caps libcap-ng)
+		$(use_enable numa)
+		$(use_with systemd)
+		$(use_enable thermal)
+		$(use_with tui irqbalance-ui)
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+
+	newinitd "${FILESDIR}"/irqbalance.init.4 irqbalance
+	newconfd "${FILESDIR}"/irqbalance.confd-1 irqbalance
+	systemd_dounit misc/irqbalance.service
+	udev_dorules misc/90-irqbalance.rules
+}
+
+pkg_postinst() {
+	optfeature "thermal events support (requires USE=thermal)" sys-power/thermald
+}


             reply	other threads:[~2023-12-15  2:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-15  2:33 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-03 12:43 [gentoo-commits] repo/gentoo:master commit in: sys-apps/irqbalance/files/, sys-apps/irqbalance/ Sam James
2024-03-28  4:47 Sam James
2018-07-09 12:34 Lars Wendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1702607530.c74e7cf4220c1f0d398f2e60f33b1cf8e83d521a.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox