import CS git pipewire-1.4.11-1.el10_2

This commit is contained in:
AlmaLinux RelEng Bot 2026-07-30 06:53:45 -04:00
parent 4cc8a49f63
commit 7aaee34f43
12 changed files with 2346 additions and 508 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/pipewire-0.3.6.tar.gz
pipewire-1.4.11.tar.gz

View File

@ -1 +0,0 @@
edbc897685e921dc6add83dee57e74e140294dcb SOURCES/pipewire-0.3.6.tar.gz

View File

@ -0,0 +1,244 @@
From 0d7801240eca8c7e7ccbdb3530dd14d2797b43bc Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Mon, 6 Apr 2026 14:18:22 +0200
Subject: [PATCH 1/5] only dlopen from the defined search paths
Don't accept absolute library paths that are not in the search path,
skip the ../ in paths to avoid opening arbitrary libraries from
unexpected places.
---
spa/plugins/filter-graph/ladspa_plugin.c | 72 ++++++++++++---------
src/daemon/filter-chain/source-rnnoise.conf | 1 -
src/modules/module-jack-tunnel.c | 3 +-
src/modules/module-jack-tunnel/weakjack.h | 48 +++++++-------
src/pipewire/impl-module.c | 3 +
src/pipewire/pipewire.c | 3 +
6 files changed, 72 insertions(+), 58 deletions(-)
diff --git a/spa/plugins/filter-graph/ladspa_plugin.c b/spa/plugins/filter-graph/ladspa_plugin.c
index 45026c8e7..354e779b9 100644
--- a/spa/plugins/filter-graph/ladspa_plugin.c
+++ b/spa/plugins/filter-graph/ladspa_plugin.c
@@ -218,43 +218,49 @@ static inline const char *split_walk(const char *str, const char *delimiter, siz
return s;
}
-static int load_ladspa_plugin(struct plugin *impl, const char *path)
+static void make_search_paths(const char **path, const char **search_dirs)
{
- int res = -ENOENT;
+ const char *p;
+
+ while ((p = strstr(*path, "../")) != NULL)
+ *path = p + 3;
- if (path[0] != '/') {
- const char *search_dirs, *p, *state = NULL;
- char filename[PATH_MAX];
- size_t len;
+ *search_dirs = getenv("LADSPA_PATH");
+ if (!*search_dirs)
+ *search_dirs = "/usr/lib64/ladspa:/usr/lib/ladspa:" LIBDIR;
+}
- search_dirs = getenv("LADSPA_PATH");
- if (!search_dirs)
- search_dirs = "/usr/lib64/ladspa:/usr/lib/ladspa:" LIBDIR;
+static int load_ladspa_plugin(struct plugin *impl, const char *path, const char *search_dirs)
+{
+ int res = -ENOENT;
+ const char *p, *state = NULL;
+ char filename[PATH_MAX];
+ size_t len;
- /*
- * set the errno for the case when `ladspa_handle_load_by_path()`
- * is never called, which can only happen if the supplied
- * LADSPA_PATH contains too long paths
- */
- res = -ENAMETOOLONG;
+ /*
+ * set the errno for the case when `ladspa_handle_load_by_path()`
+ * is never called, which can only happen if the supplied
+ * LADSPA_PATH contains too long paths
+ */
+ res = -ENAMETOOLONG;
- while ((p = split_walk(search_dirs, ":", &len, &state))) {
- int namelen;
+ while ((p = split_walk(search_dirs, ":", &len, &state))) {
+ int namelen;
- if (len >= sizeof(filename))
- continue;
+ if (len >= sizeof(filename))
+ continue;
+ if (strncmp(path, p, len) == 0)
+ namelen = snprintf(filename, sizeof(filename), "%s", path);
+ else
namelen = snprintf(filename, sizeof(filename), "%.*s/%s.so", (int) len, p, path);
- if (namelen < 0 || (size_t) namelen >= sizeof(filename))
- continue;
- res = ladspa_handle_load_by_path(impl, filename);
- if (res >= 0)
- break;
- }
- }
- else {
- res = ladspa_handle_load_by_path(impl, path);
+ if (namelen < 0 || (size_t) namelen >= sizeof(filename))
+ continue;
+
+ res = ladspa_handle_load_by_path(impl, filename);
+ if (res >= 0)
+ break;
}
return res;
}
@@ -302,7 +308,7 @@ impl_init(const struct spa_handle_factory *factory,
struct plugin *impl;
uint32_t i;
int res;
- const char *path = NULL;
+ const char *path = NULL, *search_dirs;
handle->get_interface = impl_get_interface;
handle->clear = impl_clear;
@@ -320,9 +326,11 @@ impl_init(const struct spa_handle_factory *factory,
if (path == NULL)
return -EINVAL;
- if ((res = load_ladspa_plugin(impl, path)) < 0) {
- spa_log_error(impl->log, "failed to load plugin '%s': %s",
- path, spa_strerror(res));
+ make_search_paths(&path, &search_dirs);
+
+ if ((res = load_ladspa_plugin(impl, path, search_dirs)) < 0) {
+ spa_log_error(impl->log, "failed to load plugin '%s' in '%s': %s",
+ path, search_dirs, spa_strerror(res));
return res;
}
diff --git a/src/daemon/filter-chain/source-rnnoise.conf b/src/daemon/filter-chain/source-rnnoise.conf
index f3c2c71be..83142dd29 100644
--- a/src/daemon/filter-chain/source-rnnoise.conf
+++ b/src/daemon/filter-chain/source-rnnoise.conf
@@ -21,7 +21,6 @@ context.modules = [
# listed in the environment variable LADSPA_PATH or
# /usr/lib64/ladspa, /usr/lib/ladspa or the system library directory
# as a fallback.
- # You might want to use an absolute path here to avoid problems.
plugin = "librnnoise_ladspa"
label = noise_suppressor_stereo
control = {
diff --git a/src/modules/module-jack-tunnel.c b/src/modules/module-jack-tunnel.c
index b55dd5ee8..55fac1a10 100644
--- a/src/modules/module-jack-tunnel.c
+++ b/src/modules/module-jack-tunnel.c
@@ -49,8 +49,7 @@
* ## Module Options
*
* - `jack.library`: the libjack to load, by default libjack.so.0 is searched in
- * JACK_PATH directories and then some standard library paths.
- * Can be an absolute path.
+ * LIBJACK_PATH directories and then some standard library paths.
* - `jack.server`: the name of the JACK server to tunnel to.
* - `jack.client-name`: the name of the JACK client.
* - `jack.connect`: if jack ports should be connected automatically. Can also be
diff --git a/src/modules/module-jack-tunnel/weakjack.h b/src/modules/module-jack-tunnel/weakjack.h
index 1b057b0ba..19537dbff 100644
--- a/src/modules/module-jack-tunnel/weakjack.h
+++ b/src/modules/module-jack-tunnel/weakjack.h
@@ -158,34 +158,36 @@ static inline int weakjack_load_by_path(struct weakjack *jack, const char *path)
static inline int weakjack_load(struct weakjack *jack, const char *lib)
{
int res = -ENOENT;
+ const char *search_dirs, *p, *state = NULL;
+ char path[PATH_MAX];
+ size_t len;
- if (lib[0] != '/') {
- const char *search_dirs, *p, *state = NULL;
- char path[PATH_MAX];
- size_t len;
+ while ((p = strstr(lib, "../")) != NULL)
+ lib = p + 3;
- search_dirs = getenv("LIBJACK_PATH");
- if (!search_dirs)
- search_dirs = PREFIX "/lib64/:" PREFIX "/lib/:"
- "/usr/lib64/:/usr/lib/:" LIBDIR;
+ search_dirs = getenv("LIBJACK_PATH");
+ if (!search_dirs)
+ search_dirs = PREFIX "/lib64/:" PREFIX "/lib/:"
+ "/usr/lib64/:/usr/lib/:" LIBDIR;
- while ((p = pw_split_walk(search_dirs, ":", &len, &state))) {
- int pathlen;
+ res = -ENAMETOOLONG;
- if (len >= sizeof(path)) {
- res = -ENAMETOOLONG;
- continue;
- }
+ while ((p = pw_split_walk(search_dirs, ":", &len, &state))) {
+ int pathlen;
+
+ if (len >= sizeof(path))
+ continue;
+
+ if (strncmp(lib, p, len) == 0)
+ pathlen = snprintf(path, sizeof(path), "%s", lib);
+ else
pathlen = snprintf(path, sizeof(path), "%.*s/%s", (int) len, p, lib);
- if (pathlen < 0 || (size_t) pathlen >= sizeof(path)) {
- res = -ENAMETOOLONG;
- continue;
- }
- if ((res = weakjack_load_by_path(jack, path)) == 0)
- break;
- }
- } else {
- res = weakjack_load_by_path(jack, lib);
+
+ if (pathlen < 0 || (size_t) pathlen >= sizeof(path))
+ continue;
+
+ if ((res = weakjack_load_by_path(jack, path)) == 0)
+ break;
}
return res;
}
diff --git a/src/pipewire/impl-module.c b/src/pipewire/impl-module.c
index 10aa432fe..1921c87cd 100644
--- a/src/pipewire/impl-module.c
+++ b/src/pipewire/impl-module.c
@@ -154,6 +154,9 @@ pw_context_load_module(struct pw_context *context,
NULL
};
+ while ((p = strstr(name, "../")) != NULL)
+ name = p + 3;
+
pw_log_info("%p: name:%s args:%s", context, name, args);
module_dir = getenv("PIPEWIRE_MODULE_DIR");
diff --git a/src/pipewire/pipewire.c b/src/pipewire/pipewire.c
index 4451fa525..bccd48f35 100644
--- a/src/pipewire/pipewire.c
+++ b/src/pipewire/pipewire.c
@@ -232,6 +232,9 @@ static struct spa_handle *load_spa_handle(const char *lib,
if (lib == NULL)
lib = sup->support_lib;
+ while ((p = strstr(lib, "../")) != NULL)
+ lib = p + 3;
+
pw_log_debug("load lib:'%s' factory-name:'%s'", lib, factory_name);
plugin = NULL;
--
2.54.0

View File

@ -0,0 +1,50 @@
From 726f9d31440b5e28ca72b7a69a6ae6e8966986b3 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Wed, 8 Apr 2026 12:00:04 +0200
Subject: [PATCH 2/5] dlopen: improve prefix check some more
If we pass a path /usr/libevil/mycode.so, it might have a prefix of
/usr/lib but we should still reject it. Do thi by checking that after
the prefix match, we start a new directory.
---
spa/plugins/filter-graph/ladspa_plugin.c | 4 ++--
src/modules/module-jack-tunnel/weakjack.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/spa/plugins/filter-graph/ladspa_plugin.c b/spa/plugins/filter-graph/ladspa_plugin.c
index 354e779b9..32e57c90a 100644
--- a/spa/plugins/filter-graph/ladspa_plugin.c
+++ b/spa/plugins/filter-graph/ladspa_plugin.c
@@ -247,10 +247,10 @@ static int load_ladspa_plugin(struct plugin *impl, const char *path, const char
while ((p = split_walk(search_dirs, ":", &len, &state))) {
int namelen;
- if (len >= sizeof(filename))
+ if (len == 0 || len >= sizeof(filename))
continue;
- if (strncmp(path, p, len) == 0)
+ if (strncmp(path, p, len) == 0 && path[len] == '/')
namelen = snprintf(filename, sizeof(filename), "%s", path);
else
namelen = snprintf(filename, sizeof(filename), "%.*s/%s.so", (int) len, p, path);
diff --git a/src/modules/module-jack-tunnel/weakjack.h b/src/modules/module-jack-tunnel/weakjack.h
index 19537dbff..7e621bffb 100644
--- a/src/modules/module-jack-tunnel/weakjack.h
+++ b/src/modules/module-jack-tunnel/weakjack.h
@@ -175,10 +175,10 @@ static inline int weakjack_load(struct weakjack *jack, const char *lib)
while ((p = pw_split_walk(search_dirs, ":", &len, &state))) {
int pathlen;
- if (len >= sizeof(path))
+ if (len == 0 || len >= sizeof(path))
continue;
- if (strncmp(lib, p, len) == 0)
+ if (strncmp(lib, p, len) == 0 && lib[len] == '/')
pathlen = snprintf(path, sizeof(path), "%s", lib);
else
pathlen = snprintf(path, sizeof(path), "%.*s/%s", (int) len, p, lib);
--
2.54.0

View File

@ -0,0 +1,42 @@
From 142d3d7896a28f6426a887f5e2b569f0151bac40 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Mon, 13 Apr 2026 10:26:33 +0200
Subject: [PATCH 3/5] dlopen: support search path ending in /
When the search path is /usr/lib/, /usr/lib/foo.so fails to load because
there is no / after the search path. Fix this by requiring that either
the search path end with / or the following char is a /.
---
spa/plugins/filter-graph/ladspa_plugin.c | 2 +-
src/modules/module-jack-tunnel/weakjack.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/spa/plugins/filter-graph/ladspa_plugin.c b/spa/plugins/filter-graph/ladspa_plugin.c
index 32e57c90a..9274e69c4 100644
--- a/spa/plugins/filter-graph/ladspa_plugin.c
+++ b/spa/plugins/filter-graph/ladspa_plugin.c
@@ -250,7 +250,7 @@ static int load_ladspa_plugin(struct plugin *impl, const char *path, const char
if (len == 0 || len >= sizeof(filename))
continue;
- if (strncmp(path, p, len) == 0 && path[len] == '/')
+ if (strncmp(path, p, len) == 0 && (path[len-1] == '/' || path[len] == '/'))
namelen = snprintf(filename, sizeof(filename), "%s", path);
else
namelen = snprintf(filename, sizeof(filename), "%.*s/%s.so", (int) len, p, path);
diff --git a/src/modules/module-jack-tunnel/weakjack.h b/src/modules/module-jack-tunnel/weakjack.h
index 7e621bffb..3bb0dd17e 100644
--- a/src/modules/module-jack-tunnel/weakjack.h
+++ b/src/modules/module-jack-tunnel/weakjack.h
@@ -178,7 +178,7 @@ static inline int weakjack_load(struct weakjack *jack, const char *lib)
if (len == 0 || len >= sizeof(path))
continue;
- if (strncmp(lib, p, len) == 0 && lib[len] == '/')
+ if (strncmp(lib, p, len) == 0 && (lib[len-1] == '/' || lib[len] == '/'))
pathlen = snprintf(path, sizeof(path), "%s", lib);
else
pathlen = snprintf(path, sizeof(path), "%.*s/%s", (int) len, p, lib);
--
2.54.0

View File

@ -0,0 +1,51 @@
From 925e071a260b28e79645d65393d7cdd8b883d8fa Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Thu, 7 May 2026 13:30:41 +0200
Subject: [PATCH 4/5] filter-graph: error when there are no valid nodes
The nodes might have failed to load or there was an empty array or the
array did not contain objects.
---
spa/plugins/filter-graph/filter-graph.c | 5 ++++-
src/modules/module-filter-chain.c | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/spa/plugins/filter-graph/filter-graph.c b/spa/plugins/filter-graph/filter-graph.c
index eaaebe3f2..b83a6b1da 100644
--- a/spa/plugins/filter-graph/filter-graph.c
+++ b/spa/plugins/filter-graph/filter-graph.c
@@ -2092,6 +2092,10 @@ static int load_graph(struct graph *graph, const struct spa_dict *props)
if ((res = load_node(graph, &it[1])) < 0)
return res;
}
+ if (spa_list_is_empty(&graph->node_list)) {
+ spa_log_error(impl->log, "filter.graph has no nodes");
+ return -EINVAL;
+ }
if (plinks != NULL) {
while (spa_json_enter_object(plinks, &it[1]) > 0) {
if ((res = parse_link(graph, &it[1])) < 0)
@@ -2144,7 +2148,6 @@ static int load_graph(struct graph *graph, const struct spa_dict *props)
else
graph->default_outputs = last->desc->n_output;
-
return 0;
}
diff --git a/src/modules/module-filter-chain.c b/src/modules/module-filter-chain.c
index 764cd481a..cedeb675e 100644
--- a/src/modules/module-filter-chain.c
+++ b/src/modules/module-filter-chain.c
@@ -1191,7 +1191,7 @@ static const struct pw_stream_events out_stream_events = {
static int setup_streams(struct impl *impl)
{
- int res;
+ int res = 0;
uint32_t i, n_params, *offs;
struct pw_array offsets;
const struct spa_pod **params = NULL;
--
2.54.0

View File

@ -0,0 +1,164 @@
From 61726f41d533199cbb5399436e0222dbbb21d74b Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Thu, 14 May 2026 13:23:19 +0200
Subject: [PATCH 5/5] filter-graph: relax LADSPA plugin loading
Make a new library.filter-path for the filter-graph that will filter and
restrict the dlopen filenames (used for the LADSPA plugin only).
By default this is false and so filter-chain can load from absolute
paths without extra checks.
Enable the extra checks for the pulse LADSPA modules and the
audioconvert filter graphs because these allow loading LADSPA plugins
into other processes.
Fixes #5222
---
spa/plugins/audioconvert/audioconvert.c | 1 +
spa/plugins/filter-graph/filter-graph.c | 8 +++++++-
spa/plugins/filter-graph/ladspa_plugin.c | 19 ++++++++++++-------
.../modules/module-ladspa-sink.c | 1 +
.../modules/module-ladspa-source.c | 1 +
5 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/spa/plugins/audioconvert/audioconvert.c b/spa/plugins/audioconvert/audioconvert.c
index 946e1934c..cfdda59ec 100644
--- a/spa/plugins/audioconvert/audioconvert.c
+++ b/spa/plugins/audioconvert/audioconvert.c
@@ -1258,6 +1258,7 @@ static int load_filter_graph(struct impl *impl, const char *graph, int order)
&SPA_DICT_ITEMS(
SPA_DICT_ITEM(SPA_KEY_LIBRARY_NAME, "filter-graph/libspa-filter-graph"),
SPA_DICT_ITEM("clock.quantum-limit", qlimit),
+ SPA_DICT_ITEM("library.filter-path", "true"),
SPA_DICT_ITEM("filter.graph", graph)));
if (new_handle == NULL)
goto error;
diff --git a/spa/plugins/filter-graph/filter-graph.c b/spa/plugins/filter-graph/filter-graph.c
index b83a6b1da..69a5a9069 100644
--- a/spa/plugins/filter-graph/filter-graph.c
+++ b/spa/plugins/filter-graph/filter-graph.c
@@ -219,6 +219,7 @@ struct impl {
uint32_t quantum_limit;
uint32_t max_align;
long unsigned rate;
+ bool filter_path;
struct spa_list plugin_list;
@@ -830,7 +831,7 @@ static struct plugin *plugin_load(struct impl *impl, const char *type, const cha
struct spa_handle *hndl = NULL;
struct plugin *plugin;
char module[PATH_MAX];
- char factory_name[256], dsp_ptr[256];
+ char factory_name[256], dsp_ptr[256], filter[16];
void *iface;
int res;
@@ -848,11 +849,14 @@ static struct plugin *plugin_load(struct impl *impl, const char *type, const cha
"filter.graph.plugin.%s", type);
spa_scnprintf(dsp_ptr, sizeof(dsp_ptr),
"pointer:%p", impl->dsp);
+ spa_scnprintf(filter, sizeof(filter),
+ "%s", impl->filter_path ? "true" : "false");
hndl = spa_plugin_loader_load(impl->loader, factory_name,
&SPA_DICT_ITEMS(
SPA_DICT_ITEM(SPA_KEY_LIBRARY_NAME, module),
SPA_DICT_ITEM("filter.graph.path", path),
+ SPA_DICT_ITEM("library.filter-path", filter),
SPA_DICT_ITEM("filter.graph.audio.dsp", dsp_ptr)));
if (hndl == NULL) {
@@ -2261,6 +2265,8 @@ impl_init(const struct spa_handle_factory *factory,
spa_atou32(s, &impl->info.n_inputs, 0);
if (spa_streq(k, "filter-graph.n_outputs"))
spa_atou32(s, &impl->info.n_outputs, 0);
+ if (spa_streq(k, "library.filter-path"))
+ impl->filter_path = spa_atob(s);
}
if (impl->quantum_limit == 0)
return -EINVAL;
diff --git a/spa/plugins/filter-graph/ladspa_plugin.c b/spa/plugins/filter-graph/ladspa_plugin.c
index 9274e69c4..1f7cb6ae5 100644
--- a/spa/plugins/filter-graph/ladspa_plugin.c
+++ b/spa/plugins/filter-graph/ladspa_plugin.c
@@ -20,6 +20,7 @@
struct plugin {
struct spa_handle handle;
struct spa_fga_plugin plugin;
+ bool filter_path;
struct spa_log *log;
@@ -218,13 +219,13 @@ static inline const char *split_walk(const char *str, const char *delimiter, siz
return s;
}
-static void make_search_paths(const char **path, const char **search_dirs)
+static void make_search_paths(const char **path, const char **search_dirs, bool filter)
{
- const char *p;
-
- while ((p = strstr(*path, "../")) != NULL)
- *path = p + 3;
-
+ if (filter) {
+ const char *p;
+ while ((p = strstr(*path, "../")) != NULL)
+ *path = p + 3;
+ }
*search_dirs = getenv("LADSPA_PATH");
if (!*search_dirs)
*search_dirs = "/usr/lib64/ladspa:/usr/lib/ladspa:" LIBDIR;
@@ -237,6 +238,8 @@ static int load_ladspa_plugin(struct plugin *impl, const char *path, const char
char filename[PATH_MAX];
size_t len;
+ if (!impl->filter_path && path[0] == '/')
+ return ladspa_handle_load_by_path(impl, path);
/*
* set the errno for the case when `ladspa_handle_load_by_path()`
* is never called, which can only happen if the supplied
@@ -322,11 +325,13 @@ impl_init(const struct spa_handle_factory *factory,
const char *s = info->items[i].value;
if (spa_streq(k, "filter.graph.path"))
path = s;
+ else if (spa_streq(k, "library.filter-path"))
+ impl->filter_path = spa_atob(s);
}
if (path == NULL)
return -EINVAL;
- make_search_paths(&path, &search_dirs);
+ make_search_paths(&path, &search_dirs, impl->filter_path);
if ((res = load_ladspa_plugin(impl, path, search_dirs)) < 0) {
spa_log_error(impl->log, "failed to load plugin '%s' in '%s': %s",
diff --git a/src/modules/module-protocol-pulse/modules/module-ladspa-sink.c b/src/modules/module-protocol-pulse/modules/module-ladspa-sink.c
index 50c368398..d19239d36 100644
--- a/src/modules/module-protocol-pulse/modules/module-ladspa-sink.c
+++ b/src/modules/module-protocol-pulse/modules/module-ladspa-sink.c
@@ -200,6 +200,7 @@ static int module_ladspa_sink_prepare(struct module * const module)
} else {
pw_properties_set(props, PW_KEY_NODE_DESCRIPTION, str);
}
+ pw_properties_set(props, "library.filter-path", "true");
if ((str = pw_properties_get(props, "master")) != NULL ||
(str = pw_properties_get(props, "sink_master")) != NULL) {
diff --git a/src/modules/module-protocol-pulse/modules/module-ladspa-source.c b/src/modules/module-protocol-pulse/modules/module-ladspa-source.c
index 09eb11ce4..2f3521d12 100644
--- a/src/modules/module-protocol-pulse/modules/module-ladspa-source.c
+++ b/src/modules/module-protocol-pulse/modules/module-ladspa-source.c
@@ -200,6 +200,7 @@ static int module_ladspa_source_prepare(struct module * const module)
} else {
pw_properties_set(props, PW_KEY_NODE_DESCRIPTION, str);
}
+ pw_properties_set(props, "library.filter-path", "true");
if ((str = pw_properties_get(props, "master")) != NULL ||
(str = pw_properties_get(props, "source_master")) != NULL) {
--
2.54.0

View File

@ -1,24 +0,0 @@
From 13945e27434951366960dd3a0461c58487df82a2 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Mon, 30 Mar 2020 15:32:04 +0200
Subject: [PATCH] conf: disable bluez5
Disable bluetooth handling by default to avoid causing
conflicts with pulseaudio.
---
src/daemon/pipewire.conf.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in
index 574cba4f..4ecec24f 100644
--- a/src/daemon/pipewire.conf.in
+++ b/src/daemon/pipewire.conf.in
@@ -71,4 +71,4 @@ create-object spa-node-factory factory.name=support.node.driver node.name=Dummy
# Execute the given program. This is usually used to start the
# session manager. run the session manager with -h for options
#
-exec pipewire-media-session # -d alsa-seq,alsa-pcm,bluez5,metadata
+exec pipewire-media-session -d bluez5 # -d alsa-seq,alsa-pcm,metadata
--
2.26.2

View File

@ -1,482 +0,0 @@
%global apiversion 0.3
%global spaversion 0.2
#global snap 20141103
#global gitrel 327
#global gitcommit aec811798cd883a454b9b5cd82c77831906bbd2d
#global shortcommit %(c=%{gitcommit}; echo ${c:0:5})
# https://bugzilla.redhat.com/983606
%global _hardened_build 1
# where/how to apply multilib hacks
%global multilib_archs x86_64 %{ix86} ppc64 ppc s390x s390 sparc64 sparcv9 ppc64le
%global enable_alsa 1
%if 0%{?fedora}
%global enable_jack 1
%global enable_pulse 1
%global enable_vulkan 1
%endif
# libpulse and libjack subpackages shouldn't have library provides
# as the files they ship are not in the linker path. We also have
# to exclude requires or else the subpackages wind up requiring the
# libs they're no longer providing
# FIXME: the jack-audio-connection-kit and pulseaudio subpackages
# should get the auto-generated Provides: instead, but they do not,
# either with or without the lines below, not sure how to fix that
%global __provides_exclude_from ^%{_libdir}/pipewire-%{apiversion}/.*$
%global __requires_exclude_from ^%{_libdir}/pipewire-%{apiversion}/.*$
Name: pipewire
Summary: Media Sharing Server
Version: 0.3.6
Release: 1%{?snap:.%{snap}git%{shortcommit}}%{?dist}
License: MIT
URL: https://pipewire.org/
%if 0%{?gitrel}
# git clone git://anongit.freedesktop.org/gstreamer/pipewire
# cd pipewire; git reset --hard %{gitcommit}; ./autogen.sh; make; make distcheck
Source0: pipewire-%{version}-%{gitrel}-g%{shortcommit}.tar.gz
%else
Source0: https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/%{version}/pipewire-%{version}.tar.gz
%endif
## upstream patches
## upstreamable patches
## fedora patches
Patch0: 0001-conf-disable-bluez5.patch
BuildRequires: meson >= 0.49.0
BuildRequires: gcc
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(glib-2.0) >= 2.32
BuildRequires: pkgconfig(gio-unix-2.0) >= 2.32
BuildRequires: pkgconfig(gstreamer-1.0) >= 1.10.0
BuildRequires: pkgconfig(gstreamer-base-1.0) >= 1.10.0
BuildRequires: pkgconfig(gstreamer-plugins-base-1.0) >= 1.10.0
BuildRequires: pkgconfig(gstreamer-net-1.0) >= 1.10.0
BuildRequires: pkgconfig(gstreamer-allocators-1.0) >= 1.10.0
%if 0%{?enable_vulkan}
BuildRequires: pkgconfig(vulkan)
%endif
BuildRequires: pkgconfig(bluez)
BuildRequires: systemd-devel >= 184
BuildRequires: alsa-lib-devel
BuildRequires: libv4l-devel
BuildRequires: doxygen
BuildRequires: xmltoman
BuildRequires: graphviz
BuildRequires: sbc-devel
BuildRequires: libsndfile-devel
Requires(pre): shadow-utils
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: systemd >= 184
Requires: rtkit
# https://bugzilla.redhat.com/983606
%global _hardened_build 1
## enable systemd activation
%global systemd 1
%description
PipeWire is a multimedia server for Linux and other Unix like operating
systems.
%package libs
Summary: Libraries for PipeWire clients
License: MIT
Recommends: %{name}%{?_isa} = %{version}-%{release}
%description libs
This package contains the runtime libraries for any application that wishes
to interface with a PipeWire media server.
%package gstreamer
Summary: GStreamer elements for PipeWire
License: MIT
Recommends: %{name}%{?_isa} = %{version}-%{release}
%description gstreamer
This package contains GStreamer elements to interface with a
PipeWire media server.
%package devel
Summary: Headers and libraries for PipeWire client development
License: MIT
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description devel
Headers and libraries for developing applications that can communicate with
a PipeWire media server.
%package doc
Summary: PipeWire media server documentation
License: MIT
%description doc
This package contains documentation for the PipeWire media server.
%package utils
Summary: PipeWire media server utilities
License: MIT
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description utils
This package contains command line utilities for the PipeWire media server.
%if 0%{?enable_alsa}
%package alsa
Summary: PipeWire media server ALSA support
License: MIT
Recommends: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description alsa
This package contains an ALSA plugin for the PipeWire media server.
%endif
%if 0%{?enable_jack}
%package libjack
Summary: PipeWire libjack library
License: MIT
Recommends: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
BuildRequires: jack-audio-connection-kit-devel >= 1.9.10
# Renamed in F32
Obsoletes: pipewire-jack < 0.2.96-2
%description libjack
This package contains a PipeWire replacement for JACK audio connection kit
"libjack" library.
%package jack-audio-connection-kit
Summary: PipeWire JACK implementation
License: MIT
Recommends: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-libjack%{?_isa} = %{version}-%{release}
BuildRequires: jack-audio-connection-kit-devel >= 1.9.10
Conflicts: jack-audio-connection-kit
Conflicts: jack-audio-connection-kit-dbus
Provides: jack-audio-connection-kit
%description jack-audio-connection-kit
This package provides a JACK implementation based on PipeWire
%package plugin-jack
Summary: PipeWire media server JACK support
License: MIT
BuildRequires: jack-audio-connection-kit-devel
Recommends: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: jack-audio-connection-kit
%description plugin-jack
This package contains the PipeWire spa plugin to connect to a JACK server.
%endif
%if 0%{?enable_pulse}
%package libpulse
Summary: PipeWire libpulse library
License: MIT
Recommends: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
BuildRequires: pulseaudio-libs-devel
# Renamed in F32
Obsoletes: pipewire-pulseaudio < 0.2.96-2
%description libpulse
This package contains a PipeWire replacement for PulseAudio "libpulse" library.
%package pulseaudio
Summary: PipeWire PulseAudio implementation
License: MIT
Recommends: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-libpulse%{?_isa} = %{version}-%{release}
BuildRequires: pulseaudio-libs-devel
Conflicts: pulseaudio-libs
Conflicts: pulseaudio-libs-glib2
Provides: pulseaudio-libs
Provides: pulseaudio-libs-glib2
%description pulseaudio
This package provides a PulseAudio implementation based on PipeWire
%endif
%prep
%setup -q -T -b0 -n %{name}-%{version}%{?gitrel:-%{gitrel}-g%{shortcommit}}
%patch0 -p1 -b .0000
%build
%meson \
-D docs=true -D man=true -D gstreamer=true -D systemd=true \
%{!?enable_jack:-D jack=false -D pipewire-jack=false} \
%{!?enable_pulse:-D pipewire-pulseaudio=false} \
%{!?enable_alsa:-D pipewire-alsa=false} \
%{!?enable_vulkan:-D vulkan=false}
%install
%meson_install
mkdir %{buildroot}%{_userunitdir}/sockets.target.wants
ln -s ../pipewire.socket %{buildroot}%{_userunitdir}/sockets.target.wants/pipewire.socket
%if 0%{?enable_jack}
ln -s pipewire-%{apiversion}/jack/libjack.so.0 %{buildroot}%{_libdir}/libjack.so.0.1.0
ln -s libjack.so.0.1.0 %{buildroot}%{_libdir}/libjack.so.0
ln -s pipewire-%{apiversion}/jack/libjackserver.so.0 %{buildroot}%{_libdir}/libjackserver.so.0.1.0
ln -s libjackserver.so.0.1.0 %{buildroot}%{_libdir}/libjackserver.so.0
ln -s pipewire-%{apiversion}/jack/libjacknet.so.0 %{buildroot}%{_libdir}/libjacknet.so.0.1.0
ln -s libjacknet.so.0.1.0 %{buildroot}%{_libdir}/libjacknet.so.0
%endif
%if 0%{?enable_pulse}
ln -s pipewire-%{apiversion}/pulse/libpulse.so.0 %{buildroot}%{_libdir}/libpulse.so.0
ln -s pipewire-%{apiversion}/pulse/libpulse-simple.so.0 %{buildroot}%{_libdir}/libpulse-simple.so.0
ln -s pipewire-%{apiversion}/pulse/libpulse-mainloop-glib.so.0 %{buildroot}%{_libdir}/libpulse-mainloop-glib.so.0
%endif
%if 0%{?enable_alsa}
mkdir -p %{buildroot}%{_sysconfdir}/alsa/conf.d/
cp %{buildroot}%{_datadir}/alsa/alsa.conf.d/50-pipewire.conf \
%{buildroot}%{_sysconfdir}/alsa/conf.d/50-pipewire.conf
cp %{buildroot}%{_datadir}/alsa/alsa.conf.d/99-pipewire-default.conf \
%{buildroot}%{_sysconfdir}/alsa/conf.d/99-pipewire-default.conf
%endif
%check
%ifarch s390x
# FIXME: s390x FAIL: pw-test-stream, pw-test-endpoint
%global tests_nonfatal 1
%endif
%meson_test || TESTS_ERROR=$?
if [ "${TESTS_ERROR}" != "" ]; then
echo "test failed"
%{!?tests_nonfatal:exit $TESTS_ERROR}
fi
%pre
getent group pipewire >/dev/null || groupadd -r pipewire
getent passwd pipewire >/dev/null || \
useradd -r -g pipewire -d %{_localstatedir}/run/pipewire -s /sbin/nologin -c "PipeWire System Daemon" pipewire
exit 0
%ldconfig_scriptlets libs
%files
%license LICENSE COPYING
%doc README.md
%if 0%{?systemd}
%{_userunitdir}/pipewire.*
%{_userunitdir}/sockets.target.wants/pipewire.socket
%endif
%{_bindir}/pipewire
%{_bindir}/pipewire-media-session
%{_mandir}/man1/pipewire.1*
%dir %{_sysconfdir}/pipewire/
%config(noreplace) %{_sysconfdir}/pipewire/pipewire.conf
%{_mandir}/man5/pipewire.conf.5*
%files libs
%license LICENSE COPYING
%doc README.md
%{_libdir}/libpipewire-%{apiversion}.so.*
%{_libdir}/pipewire-%{apiversion}/libpipewire-*.so
%dir %{_libdir}/spa-%{spaversion}
%{_libdir}/spa-%{spaversion}/alsa/
%{_libdir}/spa-%{spaversion}/audioconvert/
%{_libdir}/spa-%{spaversion}/audiomixer/
%{_libdir}/spa-%{spaversion}/bluez5/
%{_libdir}/spa-%{spaversion}/control/
%{_libdir}/spa-%{spaversion}/support/
%{_libdir}/spa-%{spaversion}/v4l2/
%{_libdir}/spa-%{spaversion}/videoconvert/
%if 0%{?enable_vulkan}
%{_libdir}/spa-%{spaversion}/vulkan/
%endif
%files gstreamer
%{_libdir}/gstreamer-1.0/libgstpipewire.*
%files devel
%{_libdir}/libpipewire-%{apiversion}.so
%{_includedir}/pipewire-%{apiversion}/
%{_includedir}/spa-%{spaversion}/
%{_libdir}/pkgconfig/libpipewire-%{apiversion}.pc
%{_libdir}/pkgconfig/libspa-%{spaversion}.pc
%files doc
%{_datadir}/doc/pipewire/html
%files utils
%{_bindir}/pw-mon
%{_bindir}/pw-metadata
%{_bindir}/pw-mididump
%{_bindir}/pw-midiplay
%{_bindir}/pw-midirecord
%{_bindir}/pw-cli
%{_bindir}/pw-dot
%{_bindir}/pw-cat
%{_bindir}/pw-play
%{_bindir}/pw-profiler
%{_bindir}/pw-record
%{_mandir}/man1/pw-mon.1*
%{_mandir}/man1/pw-cli.1*
%{_mandir}/man1/pw-cat.1*
%{_mandir}/man1/pw-dot.1*
%{_mandir}/man1/pw-metadata.1*
%{_mandir}/man1/pw-mididump.1*
%{_mandir}/man1/pw-profiler.1*
%{_bindir}/spa-monitor
%{_bindir}/spa-inspect
%if 0%{?enable_alsa}
%files alsa
%{_libdir}/alsa-lib/libasound_module_pcm_pipewire.so
%{_datadir}/alsa/alsa.conf.d/50-pipewire.conf
%{_datadir}/alsa/alsa.conf.d/99-pipewire-default.conf
%config(noreplace) %{_sysconfdir}/alsa/conf.d/50-pipewire.conf
%config(noreplace) %{_sysconfdir}/alsa/conf.d/99-pipewire-default.conf
%endif
%if 0%{?enable_jack}
%files libjack
%{_libdir}/pipewire-%{apiversion}/jack/libjack.so*
%{_libdir}/pipewire-%{apiversion}/jack/libjacknet.so*
%{_libdir}/pipewire-%{apiversion}/jack/libjackserver.so*
%{_bindir}/pw-jack
%{_mandir}/man1/pw-jack.1*
%files jack-audio-connection-kit
%{_libdir}/libjack.so.*
%{_libdir}/libjackserver.so.*
%{_libdir}/libjacknet.so.*
%files plugin-jack
%{_libdir}/spa-%{spaversion}/jack/
%endif
%if 0%{?enable_pulse}
%files libpulse
%{_libdir}/pipewire-%{apiversion}/pulse/libpulse.so*
%{_libdir}/pipewire-%{apiversion}/pulse/libpulse-simple.so*
%{_libdir}/pipewire-%{apiversion}/pulse/libpulse-mainloop-glib.so*
%{_bindir}/pw-pulse
%{_mandir}/man1/pw-pulse.1*
%files pulseaudio
%{_libdir}/libpulse.so.0
%{_libdir}/libpulse-simple.so.0
%{_libdir}/libpulse-mainloop-glib.so.0
%endif
%changelog
* Tue Jun 23 2020 Wim Taymans <wtaymans@redhat.com> - 0.3.6-1
- Update to 0.3.6
- Resolves: rhbz#1832347
* Mon Jun 15 2020 Wim Taymans <wtaymans@redhat.com> - 0.3.5-3
- Rebuild
- Resolves: rhbz#1832347
* Tue May 19 2020 Wim Taymans <wtaymans@redhat.com> - 0.3.5-2
- Disable vulkan
- Resolves: rhbz#1832347
* Tue May 19 2020 Wim Taymans <wtaymans@redhat.com> - 0.3.5-1
- Update to 0.3.5
- Disable pulse and jack
- Add patch to work with meson 0.49
- Add patch to fix neon compilation
- Resolves: rhbz#1832347
* Fri Oct 18 2019 David King <dking@redhat.com> - 0.2.7-1
- Rebase to 0.2.7 (#1748331)
* Fri Jan 11 2019 Wim Taymans <wtaymans@redhat.com> - 0.2.5-1
- Update to 0.2.5
- Revert patch that requires too new meson
- Add patch to avoid invalid conversion error with C++ compilers
- Resolves: #1664569
* Fri Nov 30 2018 Wim Taymans <wtaymans@redhat.com> - 0.2.4-1
- Update to 0.2.4
- Add defines for cursor and bitmap metadata
- Revert patch that requires too new meson
- Resolves: #1655028
* Thu Oct 18 2018 Wim Taymans <wtaymans@redhat.com> - 0.2.3-2
- Add systemd socket activation
- Resolves: #1639871
* Fri Oct 12 2018 Wim Taymans <wtaymans@redhat.com> - 0.2.3-1
- Update to 0.2.3
- Resolves: #1638046
* Wed Aug 01 2018 Wim Taymans <wtaymans@redhat.com> - 0.2.2-1
- Update to 0.2.2
* Tue Feb 27 2018 Wim Taymans <wtaymans@redhat.com> - 0.1.9-1
- Update to 0.1.9
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.1.8-2
- Switch to %%ldconfig_scriptlets
* Tue Jan 23 2018 Wim Taymans <wtaymans@redhat.com> - 0.1.8-1
- Update to 0.1.8
* Fri Nov 24 2017 Wim Taymans <wtaymans@redhat.com> - 0.1.7-1
- Update to 0.1.7
- Add to build when memfd_create is already defined
* Fri Nov 03 2017 Wim Taymans <wtaymans@redhat.com> - 0.1.6-1
- Update to 0.1.6
* Tue Sep 19 2017 Wim Taymans <wtaymans@redhat.com> - 0.1.5-2
- Add patch to avoid segfault when probing
* Tue Sep 19 2017 Wim Taymans <wtaymans@redhat.com> - 0.1.5-1
- Update to 0.1.5
* Thu Sep 14 2017 Kalev Lember <klember@redhat.com> - 0.1.4-3
- Rebuilt for GNOME 3.26.0 megaupdate
* Fri Sep 08 2017 Wim Taymans <wtaymans@redhat.com> - 0.1.4-2
- Install SPA hooks
* Wed Aug 23 2017 Wim Taymans <wtaymans@redhat.com> - 0.1.4-1
- Update to 0.1.4
* Wed Aug 09 2017 Wim Taymans <wtaymans@redhat.com> - 0.1.3-1
- Update to 0.1.3
* Tue Jul 04 2017 Wim Taymans <wtaymans@redhat.com> - 0.1.2-1
- Update to 0.1.2
- Added more build requirements
- Make separate doc package
* Mon Jun 26 2017 Wim Taymans <wtaymans@redhat.com> - 0.1.1-1
- Update to 0.1.1
- Add dbus-1 to BuildRequires
- change libs-devel to -devel
* Wed Sep 9 2015 Wim Taymans <wtaymans@redhat.com> - 0.1.0-2
- Fix BuildRequires to use pkgconfig, add all dependencies found in configure.ac
- Add user and groups if needed
- Add license to %%licence
* Tue Sep 1 2015 Wim Taymans <wtaymans@redhat.com> - 0.1.0-1
- First version

1791
pipewire.spec Normal file

File diff suppressed because it is too large Load Diff

2
pipewire.sysusers Normal file
View File

@ -0,0 +1,2 @@
#Type Name ID GECOS Home directory Shell
u pipewire - "PipeWire System Daemon" /run/pipewire -

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (pipewire-1.4.11.tar.gz) = 917d599914dcc535a5aa2478c54de306e620c06e9d1a02220e9681e13e05566fe997eb25b59930d95ea9e9a8dc8fe6da86d41652d707cec0a2ee970b00e18a13