From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B0077158009 for ; Thu, 29 Jun 2023 10:22:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EF019E07E6; Thu, 29 Jun 2023 10:22:44 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D25ADE07E2 for ; Thu, 29 Jun 2023 10:22:44 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D9AA5340F84 for ; Thu, 29 Jun 2023 10:22:43 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4CED251F for ; Thu, 29 Jun 2023 10:22:42 +0000 (UTC) From: "Marek Szuba" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Marek Szuba" Message-ID: <1688034152.d3f5e5c07d3c72c3aabbdbe09e45d21d52622f71.marecki@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-auth/rtkit/files/, sys-auth/rtkit/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-auth/rtkit/files/rtkit-0.13_daemon_verbosity.patch sys-auth/rtkit/rtkit-0.13-r2.ebuild X-VCS-Directories: sys-auth/rtkit/files/ sys-auth/rtkit/ X-VCS-Committer: marecki X-VCS-Committer-Name: Marek Szuba X-VCS-Revision: d3f5e5c07d3c72c3aabbdbe09e45d21d52622f71 X-VCS-Branch: master Date: Thu, 29 Jun 2023 10:22:42 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 16412cfe-1bb6-4eed-b7b1-7e2670bd6bf6 X-Archives-Hash: 438db6079fdb2ae61013c3ef75087501 commit: d3f5e5c07d3c72c3aabbdbe09e45d21d52622f71 Author: Marek Szuba gentoo org> AuthorDate: Thu Jun 29 10:20:57 2023 +0000 Commit: Marek Szuba gentoo org> CommitDate: Thu Jun 29 10:22:32 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3f5e5c0 sys-auth/rtkit: better control over daemon verbosity for non-systemd users Closes: https://bugs.gentoo.org/909157 Signed-off-by: Marek Szuba gentoo.org> .../rtkit/files/rtkit-0.13_daemon_verbosity.patch | 67 ++++++++++++++++++++++ sys-auth/rtkit/rtkit-0.13-r2.ebuild | 49 ++++++++++++++++ 2 files changed, 116 insertions(+) diff --git a/sys-auth/rtkit/files/rtkit-0.13_daemon_verbosity.patch b/sys-auth/rtkit/files/rtkit-0.13_daemon_verbosity.patch new file mode 100644 index 000000000000..e8fb9c821dde --- /dev/null +++ b/sys-auth/rtkit/files/rtkit-0.13_daemon_verbosity.patch @@ -0,0 +1,67 @@ +From ad649ee491ed1a41537774ad11564a208e598a09 Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Sat, 15 Apr 2023 11:53:27 +0200 +Subject: [PATCH] rtkit-daemon: Don't log debug messages by default + +The rtkit-daemon service is a lot more verbose than other services +when it doesn't have anything to do. Stop logging the debug messages +by default to avoid flooding the system log. + +This addresses issue #22. +--- a/rtkit-daemon.c ++++ b/rtkit-daemon.c +@@ -154,6 +154,9 @@ static bool canary_demote_unknown = FALSE; + /* Log to stderr? */ + static bool log_stderr = FALSE; + ++/* Also log debugging messages? */ ++static bool log_debug = FALSE; ++ + /* Scheduling policy to use */ + static int sched_policy = SCHED_RR; + +@@ -1876,6 +1879,7 @@ enum { + ARG_CANARY_DEMOTE_UNKNOWN, + ARG_CANARY_REFUSE_SEC, + ARG_STDERR, ++ ARG_DEBUG, + ARG_INTROSPECT + }; + +@@ -1905,6 +1909,7 @@ static const struct option long_options[] = { + { "canary-demote-unknown", no_argument, 0, ARG_CANARY_DEMOTE_UNKNOWN }, + { "canary-refuse-sec", required_argument, 0, ARG_CANARY_REFUSE_SEC }, + { "stderr", no_argument, 0, ARG_STDERR }, ++ { "debug", no_argument, 0, ARG_DEBUG }, + { "introspect", no_argument, 0, ARG_INTROSPECT }, + { NULL, 0, 0, 0} + }; +@@ -1933,6 +1938,7 @@ static void show_help(const char *exe) { + " --version Show version\n\n" + "OPTIONS:\n" + " --stderr Log to STDERR in addition to syslog\n" ++ " --debug Also log debugging mssages\n" + " --user-name=USER Run daemon as user (%s)\n\n" + " --scheduling-policy=(RR|FIFO) Choose scheduling policy (%s)\n" + " --our-realtime-priority=[%i..%i] Realtime priority for the daemon (%u)\n" +@@ -2222,6 +2228,10 @@ static int parse_command_line(int argc, char *argv[], int *ret) { + log_stderr = TRUE; + break; + ++ case ARG_DEBUG: ++ log_debug = TRUE; ++ break; ++ + case ARG_INTROSPECT: + fputs(introspect_xml, stdout); + *ret = 0; +@@ -2251,6 +2261,9 @@ static int parse_command_line(int argc, char *argv[], int *ret) { + return -1; + } + ++ if (!log_debug) ++ setlogmask(LOG_UPTO(LOG_INFO)); ++ + assert(our_realtime_priority >= (unsigned) sched_get_priority_min(sched_policy)); + assert(our_realtime_priority <= (unsigned) sched_get_priority_max(sched_policy)); + diff --git a/sys-auth/rtkit/rtkit-0.13-r2.ebuild b/sys-auth/rtkit/rtkit-0.13-r2.ebuild new file mode 100644 index 000000000000..58762eba219a --- /dev/null +++ b/sys-auth/rtkit/rtkit-0.13-r2.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit linux-info meson + +DESCRIPTION="Realtime Policy and Watchdog Daemon" +HOMEPAGE="https://github.com/heftig/rtkit" +SRC_URI="https://github.com/heftig/${PN}/releases/download/v${PV}/${P}.tar.xz" + +LICENSE="GPL-3 BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="selinux systemd" + +BDEPEND="virtual/pkgconfig" +DEPEND="acct-group/rtkit + acct-user/rtkit + sys-apps/dbus + sys-auth/polkit + sys-libs/libcap + systemd? ( sys-apps/systemd )" +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-rtkit )" + +PATCHES=( + "${FILESDIR}"/${PN}-0.13_daemon_verbosity.patch + "${FILESDIR}"/${PN}-0.13_meson_rtkitctl_dir.patch + "${FILESDIR}"/${PN}-0.13_meson_xxd_optional.patch +) + +pkg_pretend() { + if use kernel_linux; then + CONFIG_CHECK="~!RT_GROUP_SCHED" + ERROR_RT_GROUP_SCHED="CONFIG_RT_GROUP_SCHED is enabled. rtkit-daemon (or any other " + ERROR_RT_GROUP_SCHED+="real-time task) will not work unless run as root. Please consider " + ERROR_RT_GROUP_SCHED+="unsetting this option." + check_extra_config + fi +} + +src_configure() { + local emesonargs=( + -Dinstalled_tests=false + $(meson_feature systemd libsystemd) + ) + meson_src_configure +}