From 0a0268ee4b04ba9b7828ed2ab15d45bc4a11870c Mon Sep 17 00:00:00 2001 From: Gliczy <129636582+Gliczy@users.noreply.github.com> Date: Sun, 14 Dec 2025 06:46:51 +0100 Subject: [PATCH] rtkit: 0.13 -> 0.14 --- ...son-actual-use-systemd_systemunitdir.patch | 22 ------ .../meson-fix-librt-find_library-check.patch | 22 ------ pkgs/by-name/rt/rtkit/package.nix | 30 +++++--- ...n-dont-log-debug-messages-by-default.patch | 73 ------------------- 4 files changed, 18 insertions(+), 129 deletions(-) delete mode 100644 pkgs/by-name/rt/rtkit/meson-actual-use-systemd_systemunitdir.patch delete mode 100644 pkgs/by-name/rt/rtkit/meson-fix-librt-find_library-check.patch delete mode 100644 pkgs/by-name/rt/rtkit/rtkit-daemon-dont-log-debug-messages-by-default.patch diff --git a/pkgs/by-name/rt/rtkit/meson-actual-use-systemd_systemunitdir.patch b/pkgs/by-name/rt/rtkit/meson-actual-use-systemd_systemunitdir.patch deleted file mode 100644 index fa1ca26088ce..000000000000 --- a/pkgs/by-name/rt/rtkit/meson-actual-use-systemd_systemunitdir.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 7d62095b94f8df3891c984a1535026d2658bb177 Mon Sep 17 00:00:00 2001 -From: Edmund Wu -Date: Sat, 11 Apr 2020 16:59:35 -0400 -Subject: [PATCH] meson: actually use systemd_systemunitdir - ---- - meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 02e6c73..ba5ba1e 100644 ---- a/meson.build -+++ b/meson.build -@@ -58,7 +58,7 @@ if policydir == '' - policydir = get_option('datadir') / 'polkit-1' / 'actions' - endif - --systemunitdir = '' -+systemunitdir = get_option('systemd_systemunitdir') - if systemunitdir == '' and systemd_dep.found() - systemunitdir = systemd_dep.get_pkgconfig_variable( - 'systemdsystemunitdir', diff --git a/pkgs/by-name/rt/rtkit/meson-fix-librt-find_library-check.patch b/pkgs/by-name/rt/rtkit/meson-fix-librt-find_library-check.patch deleted file mode 100644 index 54992e84ca66..000000000000 --- a/pkgs/by-name/rt/rtkit/meson-fix-librt-find_library-check.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 98f70edd8f534c371cb4308b9720739c5178918d Mon Sep 17 00:00:00 2001 -From: Felipe Sateler -Date: Sat, 11 Apr 2020 10:59:21 -0400 -Subject: [PATCH] meson: fix librt find_library check - ---- - meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 02e6c73..49da472 100644 ---- a/meson.build -+++ b/meson.build -@@ -22,7 +22,7 @@ polkit_dep = dependency('polkit-gobject-1', required: false) - systemd_dep = dependency('systemd', required: false) - thread_dep = dependency('threads') - --librt_dep = cc.find_library('z') -+librt_dep = cc.find_library('rt') - cc.check_header('sched.h', dependencies: librt_dep) - cc.has_function('sched_setscheduler', dependencies: librt_dep) - diff --git a/pkgs/by-name/rt/rtkit/package.nix b/pkgs/by-name/rt/rtkit/package.nix index 350f6ccdd18a..c95ad16d5283 100644 --- a/pkgs/by-name/rt/rtkit/package.nix +++ b/pkgs/by-name/rt/rtkit/package.nix @@ -1,7 +1,7 @@ { lib, stdenv, - fetchFromGitHub, + fetchFromGitLab, meson, ninja, pkg-config, @@ -10,23 +10,27 @@ libcap, polkit, systemd, + fetchpatch, }: -stdenv.mkDerivation { +stdenv.mkDerivation (finalAttrs: { pname = "rtkit"; - version = "0.13"; + version = "0.14"; - src = fetchFromGitHub { - owner = "heftig"; + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + owner = "pipewire"; repo = "rtkit"; - rev = "c295fa849f52b487be6433e69e08b46251950399"; - sha256 = "0yfsgi3pvg6dkizrww1jxpkvcbhzyw9110n1dypmzq0c5hlzjxcd"; + tag = "v${finalAttrs.version}"; + hash = "sha256-y952SHbUWIjg1BKqenHABVWm0S5d/sBac1zRp9BpXB8="; }; patches = [ - ./meson-actual-use-systemd_systemunitdir.patch - ./meson-fix-librt-find_library-check.patch - ./rtkit-daemon-dont-log-debug-messages-by-default.patch + # Let us override the `sysusersdir` path + (fetchpatch { + url = "https://gitlab.freedesktop.org/pipewire/rtkit/-/commit/621fdc3f2c037781dc279760cfbff64974fdbe77.patch"; + hash = "sha256-Ffdi6dfZmdBpClpJkPNISmEoeUkIufrObz5g7RSPqLw="; + }) ]; nativeBuildInputs = [ @@ -35,6 +39,7 @@ stdenv.mkDerivation { pkg-config unixtools.xxd ]; + buildInputs = [ dbus libcap @@ -50,10 +55,11 @@ stdenv.mkDerivation { "-Ddbus_rulesdir=${placeholder "out"}/etc/dbus-1/system.d" "-Dpolkit_actiondir=${placeholder "out"}/share/polkit-1/actions" "-Dsystemd_systemunitdir=${placeholder "out"}/etc/systemd/system" + (lib.mesonOption "systemd_sysusersdir" "${placeholder "out"}/lib/sysusers.d") ]; meta = { - homepage = "https://github.com/heftig/rtkit"; + homepage = "https://gitlab.freedesktop.org/pipewire/rtkit"; description = "Daemon that hands out real-time priority to processes"; mainProgram = "rtkitctl"; license = with lib.licenses; [ @@ -62,4 +68,4 @@ stdenv.mkDerivation { ]; # lib is bsd license platforms = lib.platforms.linux; }; -} +}) diff --git a/pkgs/by-name/rt/rtkit/rtkit-daemon-dont-log-debug-messages-by-default.patch b/pkgs/by-name/rt/rtkit/rtkit-daemon-dont-log-debug-messages-by-default.patch deleted file mode 100644 index 667d80ab6915..000000000000 --- a/pkgs/by-name/rt/rtkit/rtkit-daemon-dont-log-debug-messages-by-default.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 4880b9c67628a781bdb183dcdc69f12cb829817d 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. ---- - rtkit-daemon.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff --git a/rtkit-daemon.c b/rtkit-daemon.c -index 17122fa..0c5d814 100644 ---- 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)); -