From 1f145d25d616bbf36755d518ba3e5ad94aeeb51b Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Wed, 14 Oct 2020 16:02:38 -0700 Subject: [PATCH] RHEL 9.0.0 Alpha bootstrap The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/pipewire#7a754f81002c002b9c5402b6788d8b0b30cda5b4 --- .gitignore | 34 + 0001-acp-pass-right-user_data-to-event.patch | 25 + ...-alsa-monitor-avoid-crash-in-release.patch | 53 ++ 0001-conf-disable-bluez5.patch | 24 + ...dd-option-to-disable-device-provider.patch | 96 +++ ...make-sure-we-don-t-read-invalid-data.patch | 123 ++++ 0001-pulse-limit-get_writable_size.patch | 61 ++ pipewire.spec | 648 ++++++++++++++++++ sources | 1 + 9 files changed, 1065 insertions(+) create mode 100644 0001-acp-pass-right-user_data-to-event.patch create mode 100644 0001-alsa-monitor-avoid-crash-in-release.patch create mode 100644 0001-conf-disable-bluez5.patch create mode 100644 0001-gst-add-option-to-disable-device-provider.patch create mode 100644 0001-media-session-make-sure-we-don-t-read-invalid-data.patch create mode 100644 0001-pulse-limit-get_writable_size.patch create mode 100644 pipewire.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..4856895 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,34 @@ +/pipewire-0.1.3.tar.gz +/pipewire-0.1.4.tar.gz +/pipewire-0.1.5.tar.gz +/pipewire-0.1.6.tar.gz +/pipewire-0.1.7.tar.gz +/pipewire-0.1.8.tar.gz +/pipewire-0.1.9.tar.gz +/pipewire-0.2.0.tar.gz +/pipewire-0.2.1.tar.gz +/pipewire-0.2.2.tar.gz +/0.2.3.tar.gz +/0.2.4.tar.gz +/0.2.5.tar.gz +/0.2.6.tar.gz +/pipewire-0.2.7.tar.gz +/pipewire-0.2.91.tar.gz +/pipewire-0.2.92.tar.gz +/pipewire-0.2.94.tar.gz +/pipewire-0.2.95.tar.gz +/pipewire-0.2.96.tar.gz +/pipewire-0.2.97.tar.gz +/pipewire-0.3.0.tar.gz +/pipewire-0.3.1.tar.gz +/pipewire-0.3.2.tar.gz +/pipewire-0.3.4.tar.gz +/pipewire-0.3.5.tar.gz +/pipewire-0.3.6.tar.gz +/pipewire-0.3.7.tar.gz +/pipewire-0.3.8.tar.gz +/pipewire-0.3.9.tar.gz +/pipewire-0.3.10.tar.gz +/pipewire-0.3.11.tar.gz +/pipewire-0.3.12.tar.gz +/pipewire-0.3.13.tar.gz diff --git a/0001-acp-pass-right-user_data-to-event.patch b/0001-acp-pass-right-user_data-to-event.patch new file mode 100644 index 0000000..916bc58 --- /dev/null +++ b/0001-acp-pass-right-user_data-to-event.patch @@ -0,0 +1,25 @@ +From 735eefa2fb17219cd2067f084c16f08d42d84aa6 Mon Sep 17 00:00:00 2001 +From: Wim Taymans +Date: Thu, 1 Oct 2020 11:31:52 +0200 +Subject: [PATCH] acp: pass right user_data to event + +--- + spa/plugins/alsa/acp/acp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/spa/plugins/alsa/acp/acp.c b/spa/plugins/alsa/acp/acp.c +index 6106bbba..35a6dfc9 100644 +--- a/spa/plugins/alsa/acp/acp.c ++++ b/spa/plugins/alsa/acp/acp.c +@@ -568,7 +568,7 @@ static int hdmi_eld_changed(snd_mixer_elem_t *melem, unsigned int mask) + pa_proplist_as_dict(p->proplist, &p->port.props); + + if (changed && mask != 0 && impl->events && impl->events->props_changed) +- impl->events->props_changed(impl); ++ impl->events->props_changed(impl->user_data); + return 0; + } + +-- +2.26.2 + diff --git a/0001-alsa-monitor-avoid-crash-in-release.patch b/0001-alsa-monitor-avoid-crash-in-release.patch new file mode 100644 index 0000000..0f24826 --- /dev/null +++ b/0001-alsa-monitor-avoid-crash-in-release.patch @@ -0,0 +1,53 @@ +From 81ca70af9bb6c60e2998b4aaf939b82eba257472 Mon Sep 17 00:00:00 2001 +From: Wim Taymans +Date: Mon, 28 Sep 2020 18:23:23 +0200 +Subject: [PATCH] alsa-monitor: avoid crash in release + +Only try to release the device when we have a proxy. + +Fixes #310 +--- + src/examples/media-session/alsa-monitor.c | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +diff --git a/src/examples/media-session/alsa-monitor.c b/src/examples/media-session/alsa-monitor.c +index a27370b8..6154d4ca 100644 +--- a/src/examples/media-session/alsa-monitor.c ++++ b/src/examples/media-session/alsa-monitor.c +@@ -594,6 +594,12 @@ static void reserve_acquired(void *data, struct rd_device *d) + rd_device_release(device->reserve); + } + ++static void complete_release(struct device *device) ++{ ++ if (device->reserve) ++ rd_device_complete_release(device->reserve, true); ++} ++ + static void sync_complete_done(void *data, int seq) + { + struct device *device = data; +@@ -605,8 +611,7 @@ static void sync_complete_done(void *data, int seq) + spa_hook_remove(&device->sync_listener); + device->seq = 0; + +- if (device->reserve) +- rd_device_complete_release(device->reserve, true); ++ complete_release(device); + } + + static void sync_destroy(void *data) +@@ -627,6 +632,10 @@ static void reserve_release(void *data, struct rd_device *d, int forced) + struct device *device = data; + + pw_log_info("%p: reserve release", device); ++ if (device->sdevice == NULL || device->sdevice->obj.proxy == NULL) { ++ complete_release(device); ++ return; ++ } + + set_profile(device, 0); + +-- +2.26.2 + diff --git a/0001-conf-disable-bluez5.patch b/0001-conf-disable-bluez5.patch new file mode 100644 index 0000000..512db49 --- /dev/null +++ b/0001-conf-disable-bluez5.patch @@ -0,0 +1,24 @@ +From 13945e27434951366960dd3a0461c58487df82a2 Mon Sep 17 00:00:00 2001 +From: Wim Taymans +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 @media_session_path@ # -d alsa-seq,alsa-pcm,bluez5,metadata ++exec @media_session_path@ -d bluez5 # -d alsa-seq,alsa-pcm,metadata +-- +2.26.2 + diff --git a/0001-gst-add-option-to-disable-device-provider.patch b/0001-gst-add-option-to-disable-device-provider.patch new file mode 100644 index 0000000..e47a8ed --- /dev/null +++ b/0001-gst-add-option-to-disable-device-provider.patch @@ -0,0 +1,96 @@ +From ea14ff1998ccc59946d9bede5b60081409a3b74f Mon Sep 17 00:00:00 2001 +From: Wim Taymans +Date: Tue, 13 Oct 2020 12:40:48 +0200 +Subject: [PATCH] gst: add option to disable device provider + +--- + config.h.meson | 2 ++ + meson.build | 6 ++++++ + meson_options.txt | 4 ++++ + src/gst/gstpipewire.c | 2 ++ + src/gst/meson.build | 5 ++++- + 5 files changed, 18 insertions(+), 1 deletion(-) + +diff --git a/config.h.meson b/config.h.meson +index a8acb340..ae2c2d0d 100644 +--- a/config.h.meson ++++ b/config.h.meson +@@ -468,3 +468,5 @@ + + #mesondefine PA_ALSA_PATHS_DIR + #mesondefine PA_ALSA_PROFILE_SETS_DIR ++ ++#mesondefine HAVE_GSTREAMER_DEVICE_PROVIDER +diff --git a/meson.build b/meson.build +index 06b46343..f8dcfcb0 100644 +--- a/meson.build ++++ b/meson.build +@@ -296,6 +296,12 @@ if get_option('bluez5') + endif + endif + ++if get_option('gstreamer') ++ if get_option('gstreamer-device-provider') ++ cdata.set('HAVE_GSTREAMER_DEVICE_PROVIDER', 1) ++ endif ++endif ++ + configure_file(input : 'config.h.meson', + output : 'config.h', + configuration : cdata) +diff --git a/meson_options.txt b/meson_options.txt +index 6a8bb071..72f6e721 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -22,6 +22,10 @@ option('gstreamer', + description: 'Build GStreamer plugins', + type: 'boolean', + value: true) ++option('gstreamer-device-provider', ++ description: 'Build GStreamer device provider plugin', ++ type: 'boolean', ++ value: true) + option('systemd', + description: 'Enable systemd integration', + type: 'boolean', +diff --git a/src/gst/gstpipewire.c b/src/gst/gstpipewire.c +index 786ad195..9f752fe2 100644 +--- a/src/gst/gstpipewire.c ++++ b/src/gst/gstpipewire.c +@@ -53,9 +53,11 @@ plugin_init (GstPlugin *plugin) + gst_element_register (plugin, "pipewiresink", GST_RANK_NONE, + GST_TYPE_PIPEWIRE_SINK); + ++#if HAVE_GSTREAMER_DEVICE_PROVIDER + if (!gst_device_provider_register (plugin, "pipewiredeviceprovider", + GST_RANK_PRIMARY + 1, GST_TYPE_PIPEWIRE_DEVICE_PROVIDER)) + return FALSE; ++#endif + + GST_DEBUG_CATEGORY_INIT (pipewire_debug, "pipewire", 0, "PipeWire elements"); + +diff --git a/src/gst/meson.build b/src/gst/meson.build +index e6c097f1..66ea5261 100644 +--- a/src/gst/meson.build ++++ b/src/gst/meson.build +@@ -2,13 +2,16 @@ pipewire_gst_sources = [ + 'gstpipewire.c', + 'gstpipewirecore.c', + 'gstpipewireclock.c', +- 'gstpipewiredeviceprovider.c', + 'gstpipewireformat.c', + 'gstpipewirepool.c', + 'gstpipewiresink.c', + 'gstpipewiresrc.c', + ] + ++if get_option('gstreamer-device-provider') ++ pipewire_gst_sources += [ 'gstpipewiredeviceprovider.c' ] ++endif ++ + pipewire_gst_headers = [ + 'gstpipewireclock.h', + 'gstpipewirecore.h', +-- +2.26.2 + diff --git a/0001-media-session-make-sure-we-don-t-read-invalid-data.patch b/0001-media-session-make-sure-we-don-t-read-invalid-data.patch new file mode 100644 index 0000000..e883376 --- /dev/null +++ b/0001-media-session-make-sure-we-don-t-read-invalid-data.patch @@ -0,0 +1,123 @@ +From 0da406d30407f574f4cc28a0e3532aec4dd9fdb6 Mon Sep 17 00:00:00 2001 +From: Wim Taymans +Date: Thu, 1 Oct 2020 11:32:40 +0200 +Subject: [PATCH] media-session: make sure we don't read invalid data + +--- + src/examples/media-session/default-routes.c | 23 ++++++++++++------ + src/examples/media-session/restore-stream.c | 26 ++++++++++++++++----- + 2 files changed, 36 insertions(+), 13 deletions(-) + +diff --git a/src/examples/media-session/default-routes.c b/src/examples/media-session/default-routes.c +index 6c3a4627..ef7fcda3 100644 +--- a/src/examples/media-session/default-routes.c ++++ b/src/examples/media-session/default-routes.c +@@ -176,10 +176,13 @@ static int restore_route(struct device *dev, const char *val, uint32_t index, ui + spa_pod_builder_prop(&b, SPA_PARAM_ROUTE_props, 0); + spa_pod_builder_push_object(&b, &f[1], + SPA_TYPE_OBJECT_Props, SPA_PARAM_Route); +- for (p = val; *p; p++) { ++ ++ p = val; ++ while (*p) { + if (strstr(p, "volume:") == p) { +- vol = strtof(p+7, &end); +- if (end == p + 7) ++ p += 7; ++ vol = strtof(p, &end); ++ if (end == p) + continue; + spa_pod_builder_prop(&b, SPA_PROP_volume, 0); + spa_pod_builder_float(&b, vol); +@@ -192,14 +195,18 @@ static int restore_route(struct device *dev, const char *val, uint32_t index, ui + p+=6; + } + else if (strstr(p, "volumes:") == p) { +- n_vols = strtol(p+8, &end, 10); +- if (end == p+8 || n_vols >= SPA_AUDIO_MAX_CHANNELS) ++ p += 8; ++ n_vols = strtol(p, &end, 10); ++ if (end == p) + continue; + p = end; ++ if (n_vols >= SPA_AUDIO_MAX_CHANNELS) ++ continue; + vols = alloca(n_vols * sizeof(float)); + for (i = 0; i < n_vols && *p == ','; i++) { +- vols[i] = strtof(p+1, &end); +- if (end == p+1) ++ p++; ++ vols[i] = strtof(p, &end); ++ if (end == p) + break; + p = end; + } +@@ -209,6 +216,8 @@ static int restore_route(struct device *dev, const char *val, uint32_t index, ui + spa_pod_builder_prop(&b, SPA_PROP_channelVolumes, 0); + spa_pod_builder_array(&b, sizeof(float), SPA_TYPE_Float, + n_vols, vols); ++ } else { ++ p++; + } + } + spa_pod_builder_pop(&b, &f[1]); +diff --git a/src/examples/media-session/restore-stream.c b/src/examples/media-session/restore-stream.c +index 094a2b1b..237683a3 100644 +--- a/src/examples/media-session/restore-stream.c ++++ b/src/examples/media-session/restore-stream.c +@@ -202,9 +202,13 @@ static int restore_stream(struct stream *str, const char *val) + + spa_pod_builder_push_object(&b, &f[0], + SPA_TYPE_OBJECT_Props, SPA_PARAM_Props); +- for (p = val; *p; p++) { ++ p = val; ++ while (*p) { + if (strstr(p, "volume:") == p) { +- vol = strtof(p+7, &end); ++ p += 7; ++ vol = strtof(p, &end); ++ if (end == p) ++ continue; + spa_pod_builder_prop(&b, SPA_PROP_volume, 0); + spa_pod_builder_float(&b, vol); + p = end; +@@ -216,15 +220,23 @@ static int restore_stream(struct stream *str, const char *val) + p+=6; + } + else if (strstr(p, "volumes:") == p) { +- n_vols = strtol(p+8, &end, 10); +- if (n_vols >= SPA_AUDIO_MAX_CHANNELS) ++ p += 8; ++ n_vols = strtol(p, &end, 10); ++ if (end == p) + continue; + p = end; ++ if (n_vols >= SPA_AUDIO_MAX_CHANNELS) ++ continue; + vols = alloca(n_vols * sizeof(float)); +- for (i = 0; i < n_vols; i++) { +- vols[i] = strtof(p+1, &end); ++ for (i = 0; i < n_vols && *p == ','; i++) { ++ p++; ++ vols[i] = strtof(p, &end); ++ if (end == p) ++ break; + p = end; + } ++ if (i != n_vols) ++ continue; + spa_pod_builder_prop(&b, SPA_PROP_channelVolumes, 0); + spa_pod_builder_array(&b, sizeof(float), SPA_TYPE_Float, + n_vols, vols); +@@ -238,6 +250,8 @@ static int restore_stream(struct stream *str, const char *val) + i = end - p; + strncpy(target, p, i); + target[i-1] = 0; ++ } else { ++ p++; + } + } + param = spa_pod_builder_pop(&b, &f[0]); +-- +2.26.2 + diff --git a/0001-pulse-limit-get_writable_size.patch b/0001-pulse-limit-get_writable_size.patch new file mode 100644 index 0000000..5312733 --- /dev/null +++ b/0001-pulse-limit-get_writable_size.patch @@ -0,0 +1,61 @@ +From 62ef0145c3bffdca23c6087117d7cf7830b13a28 Mon Sep 17 00:00:00 2001 +From: Wim Taymans +Date: Tue, 29 Sep 2020 09:56:14 +0200 +Subject: [PATCH] pulse: limit get_writable_size() + +Try to limit the amount of data we can write. Fixes chrome playback. +--- + pipewire-pulseaudio/src/stream.c | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) + +diff --git a/pipewire-pulseaudio/src/stream.c b/pipewire-pulseaudio/src/stream.c +index c30cd00e..0a398c66 100644 +--- a/pipewire-pulseaudio/src/stream.c ++++ b/pipewire-pulseaudio/src/stream.c +@@ -493,8 +493,7 @@ static void stream_process(void *data) + s, queued, target, wanted, required); + + if (s->write_callback && s->state == PA_STREAM_READY && +- queued < wanted && +- wanted >= required) ++ queued < wanted && wanted >= required) + s->write_callback(s, wanted, s->write_userdata); + } + else { +@@ -1283,7 +1282,7 @@ SPA_EXPORT + size_t pa_stream_writable_size(PA_CONST pa_stream *s) + { + const pa_timing_info *i; +- uint64_t now, then, queued, writable, elapsed, required; ++ uint64_t now, then, queued, target, wanted, elapsed, required; + struct timespec ts; + + spa_assert(s); +@@ -1306,16 +1305,18 @@ size_t pa_stream_writable_size(PA_CONST pa_stream *s) + } + + queued = queued_size(s, elapsed); +- writable = writable_size(s, queued); ++ target = target_queue(s); ++ wanted = wanted_size(s, queued, target); + required = required_size(s); + +- pw_log_debug("stream %p: writable:%"PRIu64" queued:%"PRIu64" required:%"PRIu64, s, +- writable, queued, required); ++ pw_log_debug("stream %p: queued:%"PRIu64" target:%"PRIu64 ++ " wanted:%"PRIu64" required:%"PRIu64, s, ++ queued, target, wanted, required); + +- if (writable < required) +- writable = 0; ++ if (queued >= wanted || wanted < required) ++ wanted = 0; + +- return writable; ++ return wanted; + } + + SPA_EXPORT +-- +2.26.2 + diff --git a/pipewire.spec b/pipewire.spec new file mode 100644 index 0000000..94fe9cb --- /dev/null +++ b/pipewire.spec @@ -0,0 +1,648 @@ +%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.13 +Release: 5%{?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 +Patch1: 0001-pulse-limit-get_writable_size.patch +Patch2: 0001-alsa-monitor-avoid-crash-in-release.patch +Patch3: 0001-acp-pass-right-user_data-to-event.patch +Patch4: 0001-media-session-make-sure-we-don-t-read-invalid-data.patch +Patch5: 0001-gst-add-option-to-disable-device-provider.patch + +## 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 + +%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} +Requires: %{name}-libs%{?_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 +%patch1 -p1 -b .0001 +%patch2 -p1 -b .0002 +%patch3 -p1 -b .0003 +%patch4 -p1 -b .0004 +%patch5 -p1 -b .0005 + +%build +%meson \ + -D docs=true -D man=true -D gstreamer=true -D systemd=true \ + -D gstreamer-device-provider=false \ + %{!?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} +%meson_build + +%install +%meson_install + +%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 + +# upstream should use udev.pc +mkdir -p %{buildroot}%{_prefix}/lib/udev/rules.d +mv -fv %{buildroot}/lib/udev/rules.d/90-pipewire-alsa.rules %{buildroot}%{_prefix}/lib/udev/rules.d + + +%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 + +%post +%{?ldconfig} +%systemd_user_post pipewire.service +%systemd_user_post pipewire.socket + +%ldconfig_postun + +%triggerun -- %{name} < 0.3.6-2 +# This is for upgrades from previous versions which had a static symlink. +# The %%post scriptlet above only does anything on initial package installation. +# Remove before F33. +systemctl --no-reload preset --global pipewire.socket >/dev/null 2>&1 || : + +%files +%license LICENSE COPYING +%doc README.md +%{_userunitdir}/pipewire.* +%{_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 %{_datadir}/alsa-card-profile/ +%dir %{_datadir}/alsa-card-profile/mixer/ +%{_datadir}/alsa-card-profile/mixer/paths/ +%{_datadir}/alsa-card-profile/mixer/profile-sets/ +%{_prefix}/lib/udev/rules.d/90-pipewire-alsa.rules +%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 +%{_bindir}/pw-reserve +%{_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-acp-tool +%{_bindir}/spa-inspect +%{_bindir}/spa-monitor +%{_bindir}/spa-resample + +%if 0%{?enable_alsa} +%files alsa +%{_libdir}/alsa-lib/libasound_module_pcm_pipewire.so +%{_libdir}/alsa-lib/libasound_module_ctl_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 Oct 13 2020 Wim Taymans - 0.3.13-5 +- Disable device provider for now +- Fixes rhbz#1884260 + +* Thu Oct 1 2020 Wim Taymans - 0.3.13-4 +- Add patches for some crasher bugs +- Fixes rhbz#1884177 + +* Tue Sep 29 2020 Wim Taymans - 0.3.13-3 +- Add patch to improve pulse compatibility + +* Mon Sep 28 2020 Jeff Law - 0.3.13-2 +- Re-enable LTO as upstream GCC target/96939 has been fixed + +* Mon Sep 28 2020 Wim Taymans - 0.3.13-1 +- Update to 0.3.13 + +* Fri Sep 18 2020 Wim Taymans - 0.3.12-1 +- Update to 0.3.12 + +* Fri Sep 11 2020 Wim Taymans - 0.3.11-2 +- Add some patches to improve pulse compatibility + +* Thu Sep 10 2020 Wim Taymans - 0.3.11-1 +- Update to 0.3.11 + +* Mon Aug 17 2020 Wim Taymans - 0.3.10-1 +- Update to 0.3.10 + +* Tue Aug 04 2020 Wim Taymans - 0.3.9-1 +- Update to 0.3.9 + +* Tue Aug 04 2020 Wim Taymans - 0.3.8-3 +- Add patch to avoid segfault when iterating ports. +- Fixes #1865827 + +* Wed Jul 29 2020 Wim Taymans - 0.3.8-2 +- Add patch for fix chrome audio hicups +- Add patch for infinite loop in device add/remove +- Disable LTO on armv7 + +* Tue Jul 28 2020 Wim Taymans - 0.3.8-1 +- Update to 0.3.8 + +* Tue Jul 21 2020 Wim Taymans - 0.3.7-2 +- Add patch to avoid crash when clearing metadata + +* Tue Jul 21 2020 Wim Taymans - 0.3.7-1 +- Update to 0.3.7 + +* Wed Jun 10 2020 Wim Taymans - 0.3.6-2 +- Use systemd presets to enable pipewire.socket +- Remove duplicate hardened_build flags +- Add meson build again +- Fix -gstreamer subpackage Requires: + +* Wed Jun 10 2020 Wim Taymans - 0.3.6-1 +- Update to 0.3.6 +- Add new man pages +- Only build vulkan/pulse/jack in Fedora. + +* Mon May 11 2020 Wim Taymans - 0.3.5-1 +- Update to 0.3.5 + +* Fri May 01 2020 Adam Williamson - 0.3.4-2 +- Suppress library provides from pipewire-lib{pulse,jack} + +* Thu Apr 30 2020 Wim Taymans - 0.3.4-1 +- Update to 0.3.4 +- Add 2 more packages that replace libjack and libpulse + +* Tue Mar 31 2020 Wim Taymans - 0.3.2-3 +- Add patch to unsubscribe unused sequencer ports +- Change config to only disable bluez5 handling by default. + +* Mon Mar 30 2020 Wim Taymans - 0.3.2-2 +- Add config to disable alsa and bluez5 handling by default. + +* Thu Mar 26 2020 Wim Taymans - 0.3.2-1 +- Update to 0.3.2 + +* Fri Mar 06 2020 Wim Taymans - 0.3.1-1 +- Update to 0.3.1 + +* Thu Feb 20 2020 Wim Taymans - 0.3.0-1 +- Update to 0.3.0 +- Add libpulse-simple-pw.so + +* Wed Feb 19 2020 Wim Taymans - 0.2.97-1 +- Update to 0.2.97 +- Change download link + +* Tue Feb 18 2020 Kalev Lember - 0.2.96-2 +- Rename subpackages so that libjack-pw is in -libjack + and libpulse-pw is in -libpulse +- Split libspa-jack.so out to -plugin-jack subpackage +- Avoid hard-requiring the daemon from any of the library subpackages + +* Tue Feb 11 2020 Wim Taymans - 0.2.96-1 +- Update to 0.2.96 +- Split -gstreamer package +- Enable aarch64 tests again + +* Fri Feb 07 2020 Wim Taymans - 0.2.95-1 +- Update to 0.2.95 +- Disable test on aarch64 for now + +* Wed Feb 05 2020 Wim Taymans - 0.2.94-1 +- Update to 0.2.94 +- Move pipewire modules to -libs +- Add pw-profiler +- Add libsndfile-devel as a BR + +* Thu Jan 30 2020 Fedora Release Engineering - 0.2.92-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Jan 28 2020 Wim Taymans - 0.2.93-1 +- Update to 0.2.93 + +* Wed Jan 15 2020 Wim Taymans - 0.2.92-1 +- Update to 0.2.92 + +* Wed Jan 15 2020 Wim Taymans - 0.2.91-1 +- Update to 0.2.91 +- Add some more BR +- Fix some unit tests + +* Mon Jan 13 2020 Wim Taymans - 0.2.90-1 +- Update to 0.2.90 + +* Thu Nov 28 2019 Kalev Lember - 0.2.7-2 +- Move spa plugins to -libs subpackage + +* Thu Sep 26 2019 Wim Taymans - 0.2.7-1 +- Update to 0.2.7 + +* Mon Sep 16 2019 Kalev Lember - 0.2.6-5 +- Don't require the daemon package for -devel subpackage +- Move pipewire.conf man page to the daemon package + +* Fri Jul 26 2019 Fedora Release Engineering - 0.2.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Wed Jun 19 2019 Wim Taymans - 0.2.6-3 +- Add patch to reuse fd in pipewiresrc +- Add patch for device provider +- Add patch to disable extra security checks until portal is fixed. + +* Tue Jun 04 2019 Kalev Lember - 0.2.6-2 +- Split libpipewire and the gstreamer plugin out to -libs subpackage + +* Wed May 22 2019 Wim Taymans - 0.2.6-1 +- Update to 0.2.6 +- Add patch for alsa-lib 1.1.9 include path + +* Sat Feb 02 2019 Fedora Release Engineering - 0.2.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jan 04 2019 Wim Taymans - 0.2.5-2 +- Add patch to avoid invalid conversion error with C++ compilers + +* Thu Nov 22 2018 Wim Taymans - 0.2.5-1 +- Update to 0.2.5 + +* Thu Nov 22 2018 Wim Taymans - 0.2.4-1 +- Update to 0.2.4 + +* Thu Oct 18 2018 Wim Taymans - 0.2.3-2 +- Add systemd socket activation + +* Thu Aug 30 2018 Wim Taymans - 0.2.3-1 +- Update to 0.2.3 + +* Tue Jul 31 2018 Wim Taymans - 0.2.2-1 +- Update to 0.2.2 + +* Fri Jul 20 2018 Wim Taymans - 0.2.1-1 +- Update to 0.2.1 + +* Tue Jul 17 2018 Wim Taymans - 0.2.0-1 +- Update to 0.2.0 + +* Fri Jul 13 2018 Fedora Release Engineering - 0.1.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Feb 27 2018 Wim Taymans - 0.1.9-1 +- Update to 0.1.9 + +* Fri Feb 09 2018 Fedora Release Engineering - 0.1.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Feb 03 2018 Igor Gnatenko - 0.1.8-2 +- Switch to %%ldconfig_scriptlets + +* Tue Jan 23 2018 Wim Taymans - 0.1.8-1 +- Update to 0.1.8 + +* Fri Nov 24 2017 Wim Taymans - 0.1.7-1 +- Update to 0.1.7 +- Add to build when memfd_create is already defined + +* Fri Nov 03 2017 Wim Taymans - 0.1.6-1 +- Update to 0.1.6 + +* Tue Sep 19 2017 Wim Taymans - 0.1.5-2 +- Add patch to avoid segfault when probing + +* Tue Sep 19 2017 Wim Taymans - 0.1.5-1 +- Update to 0.1.5 + +* Thu Sep 14 2017 Kalev Lember - 0.1.4-3 +- Rebuilt for GNOME 3.26.0 megaupdate + +* Fri Sep 08 2017 Wim Taymans - 0.1.4-2 +- Install SPA hooks + +* Wed Aug 23 2017 Wim Taymans - 0.1.4-1 +- Update to 0.1.4 + +* Wed Aug 09 2017 Wim Taymans - 0.1.3-1 +- Update to 0.1.3 + +* Tue Jul 04 2017 Wim Taymans - 0.1.2-1 +- Update to 0.1.2 +- Added more build requirements +- Make separate doc package + +* Mon Jun 26 2017 Wim Taymans - 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 - 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 - 0.1.0-1 +- First version diff --git a/sources b/sources new file mode 100644 index 0000000..45d4fca --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (pipewire-0.3.13.tar.gz) = 38ce7d8808e69935db0148c077340cfbc1b85f5a016a0a57eff2c076560c42f0695cfe681c9f16ebf15796d773dd113c9a84631eb50ac44dfb09f91ed3fc61f0