Accepting request 1155631 from multimedia:libs

OBS-URL: https://build.opensuse.org/request/show/1155631
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/wireplumber?expand=0&rev=29
This commit is contained in:
Dominique Leuenberger 2024-03-06 22:03:40 +00:00 committed by Git OBS Bridge
commit 4deb86a1c8
9 changed files with 244 additions and 87 deletions

View File

@ -0,0 +1,25 @@
From a141ec0c684a20b816ea793e94c665ab3ba3d7a2 Mon Sep 17 00:00:00 2001
From: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date: Tue, 5 Mar 2024 16:34:11 +0200
Subject: [PATCH] scripts: fix typo in rescan-virtual-links.lua
---
src/scripts/linking/rescan-virtual-links.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/scripts/linking/rescan-virtual-links.lua b/src/scripts/linking/rescan-virtual-links.lua
index bc96c31d..2470f211 100644
--- a/src/scripts/linking/rescan-virtual-links.lua
+++ b/src/scripts/linking/rescan-virtual-links.lua
@@ -12,7 +12,7 @@ defaults = {}
defaults.duck_level = 0.3
config = {}
-config.duck_level = default.duck_level -- FIXME
+config.duck_level = defaults.duck_level -- FIXME
config.roles = Conf.get_section_as_object ("virtual-item-roles")
-- enable ducking if mixer-api is loaded
--
GitLab

View File

@ -3,7 +3,7 @@
<service name="obs_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://gitlab.freedesktop.org/pipewire/wireplumber.git</param>
<param name="revision">refs/tags/0.4.17</param>
<param name="revision">refs/tags/0.4.90</param>
<param name="versionformat">@PARENT_TAG@</param>
<!--
<param name="revision">master</param>

View File

@ -1,28 +0,0 @@
From: Antonio Larrosa <alarrosa@suse.com>
Subject: Fix bsc#1219411
wireplumber enables the bluetooth support in pipewire by default but this
clashes with the bluetooth support in pulseaudio if audio is disabled in
pipewire so this patch disables bluetooth support unless the
90-enable-all.lua file is installed and we now move that file into the
wireplumber-audio package.
Index: wireplumber-0.4.17/src/config/bluetooth.lua.d/50-bluez-config.lua
===================================================================
--- wireplumber-0.4.17.orig/src/config/bluetooth.lua.d/50-bluez-config.lua
+++ wireplumber-0.4.17/src/config/bluetooth.lua.d/50-bluez-config.lua
@@ -1,4 +1,4 @@
-bluez_monitor.enabled = true
+bluez_monitor.enabled = false
bluez_monitor.properties = {
-- Enabled roles (default: [ a2dp_sink a2dp_source bap_sink bap_source hfp_hf hfp_ag ])
Index: wireplumber-0.4.17/src/config/bluetooth.lua.d/90-enable-all.lua
===================================================================
--- wireplumber-0.4.17.orig/src/config/bluetooth.lua.d/90-enable-all.lua
+++ wireplumber-0.4.17/src/config/bluetooth.lua.d/90-enable-all.lua
@@ -1,2 +1,4 @@
+bluez_monitor.enabled = true
+
bluez_monitor.enable()
bluez_midi_monitor.enable()

View File

@ -1,48 +1,43 @@
#!/usr/bin/python3
import hashlib
import sys
import re
def sha256_from_data(data):
hash_sha256 = hashlib.sha256()
hash_sha256.update(data)
return hash_sha256.hexdigest()
contents = open('90-enable-all.lua', 'r', encoding='utf-8').read()
lines = open('wireplumber.conf', 'r', encoding='utf-8').readlines()
sha256sum = sha256_from_data(contents.encode('utf-8'))
expected_sha256sum = '86888e9d3fcc952c41e778ab4edae4a0eb1f9f51b62ae0772befa9f0fdef611d'
if sha256sum != expected_sha256sum:
print('The script has to be updated for new changes in 90-enable-all.lua')
print(f'File sha256sum: {sha256sum}')
print(f'expected sha256sum: {expected_sha256sum}')
sys.exit(1)
content_sections = contents.split('\n\n')
sections = ['enable-metadata',
'default-access-policy',
'load-devices',
'track-user-choices-devices',
'track-user-choices-streams',
'link-nodes-by-roles',
'suspend-idle-nodes',
'allow-loading-objects-on-demand']
if len(content_sections) != len(sections):
print('The script has to be updated for new changes in 90-enable-all.lua')
sys.exit(1)
for i, (content, sec) in enumerate(zip(content_sections, sections)):
if sec == 'load-devices':
lines = content.split('\n')
open(f'90-{i}-1-enable-alsa.lua', 'w',
encoding='utf-8').write(lines[1])
open(f'90-{i}-2-enable-v4l2.lua', 'w',
encoding='utf-8').write(lines[2])
open(f'90-{i}-3-enable-libcamera.lua', 'w',
encoding='utf-8').write(lines[3])
is_in_device_monitor = False
main_config_content = ''
device_monitors_content = ''
for line in lines:
if re.match(' *## Device monitors$', line):
main_config_content += line
main_config_content += ' # Section moved to a device-monitors.conf file which is provided by the wireplumber-audio package\n\n'
is_in_device_monitor = True
continue
elif re.match(' *## ', line):
is_in_device_monitor = False
filename = f'90-{i}-{sec}.lua'
open(filename, 'w', encoding='utf-8').write(content)
if is_in_device_monitor:
device_monitors_content += line
else:
main_config_content += line
config_sha256 = sha256_from_data(device_monitors_content.encode('utf-8'))
verified_sha256 = 'bf33d018e5b924da71266636757fa264bc677b945c35e4dcd7f708da42731cc9'
if config_sha256 != verified_sha256:
print('The "Device monitors" section was modified, please verify that the contents are ok')
print('and if they are, modify the "verified_sha256" value in this script to')
print(f' {config_sha256}')
print('Current device monitors section is:')
print(device_monitors_content)
sys.exit(1)
device_monitors_content = 'wireplumber.components = [\n' + device_monitors_content + ']'
open('wireplumber.conf', 'w', encoding='utf-8').write(main_config_content)
open('wireplumber.conf.d/00-device-monitors.conf', 'w', encoding='utf-8').write(device_monitors_content)

BIN
wireplumber-0.4.17.obscpio (Stored with Git LFS)

Binary file not shown.

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:65e3633c543715fecaf5435a3e2abb54a346bef5646ce1c8c10cd2ed5469467a
size 2727436

View File

@ -1,3 +1,163 @@
-------------------------------------------------------------------
Wed Mar 6 15:43:02 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
- Revert that last change. Obsoletes shouldn't be used for that.
-------------------------------------------------------------------
Wed Mar 6 11:27:41 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
- Obsolete libwireplumber-0_4-0 from libwireplumber-0_5-0
-------------------------------------------------------------------
Tue Mar 5 19:29:02 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
- Add patch from upstream to fix a typo a lua script:
* 0001-scripts-fix-typo-in-rescan-virtual-links.lua.patch
-------------------------------------------------------------------
Tue Mar 5 05:36:27 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
- Update to version 0.4.90 (0.5.0 RC1)
* Highlights:
- The configuration system has been changed back to load files
from the WirePlumber configuration directories, such as
/etc/wireplumber and $XDG_CONFIG_HOME/wireplumber, unlike in
the pre-releases. This was done because issues were observed
with installations that use a different prefix for pipewire
and wireplumber. If you had a wireplumber.conf file in
/etc/pipewire or $XDG_CONFIG_HOME/pipewire, you should move
it to /etc/wireplumber or $XDG_CONFIG_HOME/wireplumber
respectively (!601)
- The internal base directories lookup system now also respects
the XDG_CONFIG_DIRS and XDG_DATA_DIRS environment variables,
and their default values as per the XDG spec, so it is
possible to install configuration files also in places like
/etc/xdg/wireplumber and override system-wide data paths
(!601)
- wpctl now has a settings subcommand to show, change and
delete settings at runtime. This comes with changes in the
WpSettings system to validate settings using a schema that is
defined in the configuration file. The schema is also
exported on a metadata object, so it is available to any
client that wants to expose WirePlumber settings (!599, !600)
- The WpConf API has changed to not be a singleton and support
opening arbitrary config files. The main config file now
needs to be opened prior to creating a WpCore and passed to
the core using a property. The core uses that without letting
the underlying pw_context open and read the default
client.conf. The core also closes the WpConf after all
components are loaded, which means all the config loading is
done early at startup. Finally, WpConf loads all sections
lazily, keeping the underlying files memory mapped until it
is closed and merging them on demand (!601, !606)
- Remove patch that's already included:
* 0001-wpctl-add-settings-subcomand-to-show_-delete-or-change.patch
-------------------------------------------------------------------
Mon Feb 19 07:29:52 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
- Add patch from upstream to remove the "clear-persistent"
sub-command and add a "settings" sub-command:
* 0001-wpctl-add-settings-subcomand-to-show_-delete-or-change.patch
-------------------------------------------------------------------
Thu Feb 15 07:23:41 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
- Update to version 0.4.82 (0.5.0 pre-release 2)
* Highlights:
- Bluetooth auto-switching is now implemented with a virtual
source node. When an application links to it, the actual
device switches to the HSP/HFP profile to provide the real
audio stream. This is a more robust solution that works with
more applications and is more user-friendly than the previous
application whitelist approach
- Added support for dynamic log level changes via the PipeWire
settings metadata. Also added support for log level patterns
in the configuration file
- The "persistent" (i.e. stored) settings approach has changed
to use two different metadata objects: sm-settings and
persistent-sm-settings. Changes in the former are applied in
the current session but not stored, while changes in the
latter are stored and restored at startup. Some work was also
done to expose a wpctl interface to read and change these
settings, but more is underway
- Several WirePlumber-specific node properties that used to be
called target.* have been renamed to node.* to match the
PipeWire convention of node.dont-reconnect. These are also
now fully documented
* Other changes:
- Many documentation updates
- Added support for SNAP container permissions
- Fixed multiple issues related to restoring the Route
parameter of devices, which includes volume state
- Smart filters can now be targetted by specific streams
directly when the filter.smart.targetable property is set
- Ported the mechanism to override device profile priorities in
the configuration, which is used to re-prioritize Bluetooth
codecs
- WpSettings is no longer a singleton class and there is a
built-in component to preload an instance of it
-------------------------------------------------------------------
Mon Feb 5 16:11:12 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
- Update to version 0.4.81
* Highlights:
- Lua scripts have been refactored to use the new event
dispatcher API, which allows them to be split into multiple
small fragments that react to events in a specified order.
This allows scripts to be more modular and easier to
maintain, as well as more predictable in terms of execution
order.
- The configuration system has been refactored to use a single
SPA-JSON file, like PipeWire does, with support for fragments
that can override options. This file is also now loaded using
PipeWire's configuration API, which effectively means that
the file is now loaded from the PipeWire configuration
directories, such as /etc/pipewire and
$XDG_CONFIG_HOME/pipewire.
- The configuration system now has the concept of profiles,
which are groups of components that can be loaded together,
with the ability to mark certain components as optional. This
allows having multiple configurations that can be loaded
using the same configuration file. Optional components also
allow loading the same profile gracefully on different
setups, where some components may not be available (ex,
loading of the session D-Bus plugin on a system-wide PipeWire
setup now does not fail).
- Many configuration options are now exposed in the sm-settings
metadata, which allows changing them at runtime. This can be
leveraged in the future to implement configuration tools that
can modify WirePlumber's behaviour dynamically, without
restarting.
- A new "filters" system has been implemented, which allows
specifying chains of "filter" nodes to be dynamically linked
in-between streams and devices. This is achieved with certain
properties and metadata that can be set on the filter nodes
themselves.
- The default linking policy now reads some more target.*
properties from nodes, which allows fine-tuning some aspects
of their linking behaviour, such as whether they are allowed
to be re-linked or whether an error should be sent to the
client if they cannot be linked.
- Some state files have been renamed and some have changed
format to use JSON for storing complex values, such as
arrays. This may cause some of the old state to be lost on
upgrade, as there is no transition path implemented.
- The libcamera and V4L2 monitors have a "device deduplication"
logic built-in, which means that for each physical camera
device, only one node will be created, either from libcamera
or V4L2, depending on which one is considered better for the
device. This is mainly to avoid having multiple nodes for the
same camera device, which can cause confusion when looking at
the list of available cameras in applications.
- Bump apiver to 0.5
- Rewrite split-config-file.py to work with the new config
subsystem
- Remove patch which isn't applying anymore and whose fix is
now handled by the split-config-file.py script:
* fix-bsc1219411.patch
-------------------------------------------------------------------
Mon Feb 5 06:46:58 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>

View File

@ -1,4 +1,4 @@
name: wireplumber
version: 0.4.17
mtime: 1701626719
commit: d3eb77b292655cef333a8f4cab4e861415bc37c2
version: 0.4.90
mtime: 1709573349
commit: 2249d8d9df121cec987527327050924ba34b3930

View File

@ -16,13 +16,13 @@
#
%define pipewire_minimum_version 0.3.68
%define apiver 0.4
%define apiver_str 0_4
%define pipewire_minimum_version 0.3.75
%define apiver 0.5
%define apiver_str 0_5
%define sover 0
%define libwireplumber libwireplumber-%{apiver_str}-%{sover}
Name: wireplumber
Version: 0.4.17
Version: 0.4.90
Release: 0
Summary: Session / policy manager implementation for PipeWire
License: MIT
@ -30,8 +30,8 @@ Group: Development/Libraries/C and C++
URL: https://gitlab.freedesktop.org/pipewire/wireplumber
Source0: wireplumber-%{version}.tar.xz
Source1: split-config-file.py
# FIX-PATCH-SUSE fix-bsc1219411.patch alarrosa@suse.com -- Enable bluetooth only when audio support is enabled
Patch0: fix-bsc1219411.patch
# PATCH-FIX-UPSTREAM
Patch0: 0001-scripts-fix-typo-in-rescan-virtual-links.lua.patch
# docs
BuildRequires: doxygen
BuildRequires: graphviz
@ -147,9 +147,8 @@ Optional dependency offering zsh completion for various wpctl parameters.
%prep
%autosetup -p1
pushd src/config/main.lua.d
pushd src/config
python3 %{SOURCE1}
rm 90-enable-all.lua
popd
%build
@ -216,31 +215,37 @@ fi
%{_bindir}/wpctl
%{_bindir}/wpexec
%dir %{_libdir}/wireplumber-%{apiver}
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-dbus-connection.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-default-nodes-api.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-default-nodes.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-default-profile.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-file-monitor-api.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-log-settings.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-logind.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-lua-scripting.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-metadata.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-mixer-api.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-portal-permissionstore.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-reserve-device.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-settings.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-si-audio-adapter.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-si-audio-endpoint.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-si-audio-virtual.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-si-node.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-si-standard-link.so
%{_libdir}/wireplumber-%{apiver}/libwireplumber-module-standard-event-source.so
%{_userunitdir}/wireplumber.service
%{_userunitdir}/wireplumber@.service
%{_datadir}/wireplumber
%exclude %{_datadir}/wireplumber/main.lua.d/90-2-1-enable-alsa.lua
%exclude %{_datadir}/wireplumber/bluetooth.lua.d/90-enable-all.lua
%dir %{_datadir}/doc/wireplumber
%dir %{_datadir}/doc/wireplumber/examples
%{_datadir}/doc/wireplumber/examples/wireplumber.conf.d
%{_datadir}/wireplumber/wireplumber.conf
%dir %{_datadir}/wireplumber/wireplumber.conf.d
%exclude %{_datadir}/wireplumber/wireplumber.conf.d/00-device-monitors.conf
%{_datadir}/wireplumber/wireplumber.conf.d/alsa-vm.conf
%files lang -f %{name}.lang
%files audio
%{_datadir}/wireplumber/main.lua.d/90-2-1-enable-alsa.lua
%{_datadir}/wireplumber/bluetooth.lua.d/90-enable-all.lua
%{_datadir}/wireplumber/wireplumber.conf.d/00-device-monitors.conf
%files devel
%{_includedir}/wireplumber-%{apiver}