aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Ribbers <bribbers@disroot.org>2022-06-09 17:19:26 +0200
committerBart Ribbers <bribbers@disroot.org>2022-06-09 17:19:26 +0200
commit9be2ae3f69a02f0c68a6e9b575aa9829fefa14b3 (patch)
tree930d67a760a011356ab690467feb0a611785c3b5
parentaea6aa76942c03b375d18f1c06c292e49616c905 (diff)
community/pipewire: backport patch to fix usage of the PULSE_RUNTIME_PATH env variable
-rw-r--r--community/pipewire/0002-dont-append-pulse-to-PULSE_RUNTIME_PATH.patch91
-rw-r--r--community/pipewire/APKBUILD4
2 files changed, 94 insertions, 1 deletions
diff --git a/community/pipewire/0002-dont-append-pulse-to-PULSE_RUNTIME_PATH.patch b/community/pipewire/0002-dont-append-pulse-to-PULSE_RUNTIME_PATH.patch
new file mode 100644
index 00000000000..ab8ea8dab45
--- /dev/null
+++ b/community/pipewire/0002-dont-append-pulse-to-PULSE_RUNTIME_PATH.patch
@@ -0,0 +1,91 @@
+From 4821c7ca2fe5e25ba018e9f5d4967f08d6bb816f Mon Sep 17 00:00:00 2001
+From: Wim Taymans <wtaymans@redhat.com>
+Date: Thu, 9 Jun 2022 17:06:07 +0200
+Subject: [PATCH] pulse-server: don't append "/pulse" to PULSE_RUNTIME_PATH
+
+Fixes #2431
+---
+ src/modules/module-protocol-pulse/server.c | 2 +-
+ src/modules/module-protocol-pulse/utils.c | 17 ++++++++++-------
+ src/modules/module-protocol-pulse/utils.h | 2 +-
+ 3 files changed, 12 insertions(+), 9 deletions(-)
+
+diff --git a/src/modules/module-protocol-pulse/server.c b/src/modules/module-protocol-pulse/server.c
+index d6b7797b8..31402e312 100644
+--- a/src/modules/module-protocol-pulse/server.c
++++ b/src/modules/module-protocol-pulse/server.c
+@@ -460,7 +460,7 @@ static int parse_unix_address(const char *address, struct sockaddr_storage *addr
+ if (address[0] != '/') {
+ char runtime_dir[PATH_MAX];
+
+- if ((res = get_runtime_dir(runtime_dir, sizeof(runtime_dir), "pulse")) < 0)
++ if ((res = get_runtime_dir(runtime_dir, sizeof(runtime_dir))) < 0)
+ return res;
+
+ res = snprintf(addr.sun_path, sizeof(addr.sun_path),
+diff --git a/src/modules/module-protocol-pulse/utils.c b/src/modules/module-protocol-pulse/utils.c
+index 52ddf75fc..cd96a8dfb 100644
+--- a/src/modules/module-protocol-pulse/utils.c
++++ b/src/modules/module-protocol-pulse/utils.c
+@@ -50,27 +50,30 @@
+ #include "log.h"
+ #include "utils.h"
+
+-int get_runtime_dir(char *buf, size_t buflen, const char *dir)
++int get_runtime_dir(char *buf, size_t buflen)
+ {
+- const char *runtime_dir;
++ const char *runtime_dir, *dir = NULL;
+ struct stat stat_buf;
+ int res, size;
+
+ runtime_dir = getenv("PULSE_RUNTIME_PATH");
+- if (runtime_dir == NULL)
++ if (runtime_dir == NULL) {
+ runtime_dir = getenv("XDG_RUNTIME_DIR");
+-
++ dir = "pulse";
++ }
+ if (runtime_dir == NULL) {
+ pw_log_error("could not find a suitable runtime directory in"
+ "$PULSE_RUNTIME_PATH and $XDG_RUNTIME_DIR");
+ return -ENOENT;
+ }
+
+- size = snprintf(buf, buflen, "%s/%s", runtime_dir, dir);
++ size = snprintf(buf, buflen, "%s%s%s", runtime_dir,
++ dir ? "/" : "", dir ? dir : "");
+ if (size < 0)
+ return -errno;
+ if ((size_t) size >= buflen) {
+- pw_log_error("path %s/%s too long", runtime_dir, dir);
++ pw_log_error("path %s%s%s too long", runtime_dir,
++ dir ? "/" : "", dir ? dir : "");
+ return -ENAMETOOLONG;
+ }
+
+@@ -182,7 +185,7 @@ int create_pid_file(void) {
+ FILE *f;
+ int res;
+
+- if ((res = get_runtime_dir(pid_file, sizeof(pid_file), "pulse")) < 0)
++ if ((res = get_runtime_dir(pid_file, sizeof(pid_file))) < 0)
+ return res;
+
+ if (strlen(pid_file) > PATH_MAX - sizeof("/pid")) {
+diff --git a/src/modules/module-protocol-pulse/utils.h b/src/modules/module-protocol-pulse/utils.h
+index 488951f9f..fafccf3f8 100644
+--- a/src/modules/module-protocol-pulse/utils.h
++++ b/src/modules/module-protocol-pulse/utils.h
+@@ -31,7 +31,7 @@
+ struct client;
+ struct pw_context;
+
+-int get_runtime_dir(char *buf, size_t buflen, const char *dir);
++int get_runtime_dir(char *buf, size_t buflen);
+ int check_flatpak(struct client *client, pid_t pid);
+ pid_t get_client_pid(struct client *client, int client_fd);
+ const char *get_server_name(struct pw_context *context);
+--
+GitLab
+
diff --git a/community/pipewire/APKBUILD b/community/pipewire/APKBUILD
index 75ed7650c27..df1f2631be4 100644
--- a/community/pipewire/APKBUILD
+++ b/community/pipewire/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=pipewire
pkgver=0.3.51
-pkgrel=1
+pkgrel=2
pkgdesc="Multimedia processing graphs"
url="https://pipewire.org/"
arch="all"
@@ -54,6 +54,7 @@ source="https://gitlab.freedesktop.org/PipeWire/pipewire/-/archive/$pkgver/pipew
pipewire.desktop
pipewire-launcher.sh
0001-Revert-pulse-tunnel-use-format-channels-and-rate-pro.patch
+ 0002-dont-append-pulse-to-PULSE_RUNTIME_PATH.patch
"
case "$CARCH" in
@@ -202,4 +203,5 @@ a762fd260b4b14ad9ef142be11ab1c22268da6726e2179559ffb254f0ce7daf7a502779e33c64313
d5d8bc64e42715aa94296e3e26e740142bff7f638c7eb4fecc0301e46d55636d889bdc0c0399c1eb523271b20f7c48cc03f6ce3c072e0e8576c821ed1ea0e3dd pipewire.desktop
be2bd1520fae27ccca6af4c98e8ebe63541260af55eb085839235a8441a7bce434ba8bf23a5d1ca8b5f361229f5482d5b63504b9a5cbbe9d39bc051207cd7dac pipewire-launcher.sh
5a84a255794cd260476f93b154a32a84efc925c1f6ecc64efe659d89eb81bb3090438e2b3c4000a8ab68d8c72bca453e13297719a95f1e4457f43e43acec8bfa 0001-Revert-pulse-tunnel-use-format-channels-and-rate-pro.patch
+015a43dc433c72ed75c051faf673445fd2ad5acb73de7862be772405f860653ab733c58b9aeb10df1db10c4c40c0c5c0c41fae5b750cbe0d7ba8e04866a56af1 0002-dont-append-pulse-to-PULSE_RUNTIME_PATH.patch
"