Accepting request 976093 from home:XRevan86

- Update to version 0.4.10.

OBS-URL: https://build.opensuse.org/request/show/976093
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/wireplumber?expand=0&rev=42
This commit is contained in:
Antonio Larrosa 2022-05-13 07:47:14 +00:00 committed by Git OBS Bridge
parent a6e37ec93c
commit 7ba6585911
10 changed files with 110 additions and 139 deletions

View File

@ -1,31 +0,0 @@
From 82856f8643402d56b62d62b0eea4debfae1cd16e Mon Sep 17 00:00:00 2001
From: Pauli Virtanen <pav@iki.fi>
Date: Mon, 28 Mar 2022 20:16:52 +0300
Subject: [PATCH] scripts: policy-device-profile: clear tables when devices
removed
When device ids are invalidated, clear all local tables about them,
because the id may be reused by different object, or the same object
reappearing.
---
src/scripts/policy-device-profile.lua | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/scripts/policy-device-profile.lua b/src/scripts/policy-device-profile.lua
index d0aa2696..9daeafaa 100644
--- a/src/scripts/policy-device-profile.lua
+++ b/src/scripts/policy-device-profile.lua
@@ -229,4 +229,10 @@ self.om:connect("object-added", function (_, device)
handleProfiles (device, true)
end)
+self.om:connect("object-removed", function (_, device)
+ local dev_id = device["bound-id"]
+ self.active_profiles[dev_id] = nil
+ self.best_profiles[dev_id] = nil
+end)
+
self.om:activate()
--
GitLab

View File

@ -1,85 +0,0 @@
From 7e6e0e9ba044ca95365f6ceb9f8ae301aac994ae Mon Sep 17 00:00:00 2001
From: Pauli Virtanen <pav@iki.fi>
Date: Tue, 22 Mar 2022 20:51:02 +0200
Subject: [PATCH] src: setlocale in main() for tools and the daemon
Previously, pw_init calls setlocale(), but this will change in future.
Setting the locale should be done by the main application, and is needed
in wireplumber for e.g. for translated UI elements.
Set the locale in main() for wireplumber daemon and tools, to have the
locale set also with the new pw_init behavior.
Set also LC_NUMERIC to C, to match old pw_init behavior.
---
src/main.c | 3 +++
src/tools/wpctl.c | 3 +++
src/tools/wpexec.c | 3 +++
3 files changed, 9 insertions(+)
diff --git a/src/main.c b/src/main.c
index 3bfaf98e..7e12d29e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -10,6 +10,7 @@
#include <glib-unix.h>
#include <pipewire/pipewire.h>
#include <spa/utils/json.h>
+#include <locale.h>
#define WP_DOMAIN_DAEMON (wp_domain_daemon_quark ())
static G_DEFINE_QUARK (wireplumber-daemon, wp_domain_daemon);
@@ -402,6 +403,8 @@ main (gint argc, gchar **argv)
g_autoptr (WpProperties) properties = NULL;
g_autofree gchar *config_file_path = NULL;
+ setlocale (LC_ALL, "");
+ setlocale (LC_NUMERIC, "C");
wp_init (WP_INIT_ALL);
context = g_option_context_new ("- PipeWire Session/Policy Manager");
diff --git a/src/tools/wpctl.c b/src/tools/wpctl.c
index 8b0fe0aa..81aa936f 100644
--- a/src/tools/wpctl.c
+++ b/src/tools/wpctl.c
@@ -8,6 +8,7 @@
#include <wp/wp.h>
#include <stdio.h>
+#include <locale.h>
#include <spa/utils/defs.h>
#include <pipewire/keys.h>
#include <pipewire/extensions/session-manager/keys.h>
@@ -1114,6 +1115,8 @@ main (gint argc, gchar **argv)
g_autoptr (GError) error = NULL;
g_autofree gchar *summary = NULL;
+ setlocale (LC_ALL, "");
+ setlocale (LC_NUMERIC, "C");
wp_init (WP_INIT_ALL);
ctl.context = g_option_context_new (
diff --git a/src/tools/wpexec.c b/src/tools/wpexec.c
index 5e7a4b52..79d90e51 100644
--- a/src/tools/wpexec.c
+++ b/src/tools/wpexec.c
@@ -10,6 +10,7 @@
#include <glib-unix.h>
#include <pipewire/keys.h>
#include <stdio.h>
+#include <locale.h>
#define WP_DOMAIN_DAEMON (wp_domain_daemon_quark ())
static G_DEFINE_QUARK (wireplumber-daemon, wp_domain_daemon);
@@ -219,6 +220,8 @@ main (gint argc, gchar **argv)
g_autoptr (GOptionContext) context = NULL;
g_autoptr (GError) error = NULL;
+ setlocale (LC_ALL, "");
+ setlocale (LC_NUMERIC, "C");
wp_init (WP_INIT_ALL);
context = g_option_context_new ("- WirePlumber script interpreter");
--
GitLab

View File

@ -4,7 +4,7 @@
<param name="scm">git</param>
<param name="url">https://gitlab.freedesktop.org/pipewire/wireplumber.git</param>
<param name="changesgenerate">enable</param>
<param name="revision">0.4.9</param>
<param name="revision">0.4.10</param>
<param name="versionformat">@PARENT_TAG@</param>
<!--
<param name="versionprefix">0.4.6+git</param>

View File

@ -1,4 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://gitlab.freedesktop.org/pipewire/wireplumber.git</param>
<param name="changesrevision">8b97b40c4467951fbd4181afb47e4175361365a6</param></service></servicedata>
<param name="changesrevision">3400acd0db95fefdda7595d20466c095902d8997</param></service></servicedata>

View File

@ -4,16 +4,33 @@ Subject: Reduce the minimum required meson version
With this, we can build wireplumber in SLE 15 SP3/Leap 15.3
which only have meson 0.54
Index: wireplumber/meson.build
Index: wireplumber-0.4.10/meson.build
===================================================================
--- wireplumber.orig/meson.build
+++ wireplumber/meson.build
@@ -1,3 +1,3 @@
--- wireplumber-0.4.10.orig/meson.build
+++ wireplumber-0.4.10/meson.build
@@ -1,7 +1,7 @@
project('wireplumber', ['c'],
version : '0.4.10',
license : 'MIT',
- meson_version : '>= 0.56.0',
- meson_version : '>= 0.59.0',
+ meson_version : '>= 0.54.0',
default_options : [
@@ -123,8 +123,8 @@ endif
'warning_level=1',
'buildtype=debugoptimized',
@@ -42,7 +42,11 @@ spa_dep = dependency('libspa-0.2', versi
pipewire_dep = dependency('libpipewire-0.3', version: '>= 0.3.48')
mathlib = cc.find_library('m')
threads_dep = dependency('threads')
-libintl_dep = dependency('intl')
+libintl_dep = dependency('', required: false)
+
+if not cc.has_function('ngettext')
+ libintl_dep = cc.find_library('intl')
+endif
system_lua = get_option('system-lua')
if system_lua
@@ -131,8 +135,8 @@ endif
conf_uninstalled = configuration_data()
conf_uninstalled.set('MESON', '')

View File

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

View File

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

View File

@ -1,3 +1,69 @@
-------------------------------------------------------------------
Tue May 10 14:39:24 UTC 2022 - Alexei Sorokin <sor.alexei@meowr.ru>
- Update to version 0.4.10:
* Changes
- Add i18n support to be able to translate some user-visible
strings.
- wpctl now supports using @DEFAULT_{AUDIO_,VIDEO_,}{SINK,SOURCE}@
as ID, almost like pactl. Additionally, it supports a --pid
flag for changing volume and mute state by specifying a
process ID, applying the state to all nodes of a specific
client process.
- The Lua engine now supports loading Lua libraries. These can
be placed either in the standard Lua libraries path or in
the "lib" subdirectory of WirePlumber's "scripts" directory
and can be loaded with ``require()``
- The Lua engine's sandbox has been relaxed to allow more
functionality in scripts (the debug & coroutine libraries
and some other previously disabled functions)
- Lua scripts are now wrapped in special WpPlugin objects,
allowing them to load asynchronously and declare when they
have finished their loading
- Add a new script that provides the same functionality as
module-fallback-sink from PipeWire, but also takes endpoints
into account and can be customised more easily. Disabled by
default for now to avoid conflicts.
* Policy
- Add an optional experimental feature that allows filter-like
streams (like echo-cancel or filter-node) to match the
channel layout of the device they connect to, on both sides
of the filter; that means that if, for instance, a sink has
6 channels and the echo-cancel's source stream is linked to
that sink, then the virtual sink presented by echo-cancel
will also be configured to the same 6 channels layout. This
feature needs to be explicitly enabled in the configuration
("filter.forward-format")
- filter-like streams (filter-chain and such) no longer follow
the default sink when it changes, like in PulseAudio.
* Fixes
- The suspend-node script now also suspends nodes that go into
the "error" state, allowing them to recover from errors
without having to restart WirePlumber.
- Fix a crash in mixer-api when setting volume with
channelVolumes.
- logind module now watches only for user state changes,
avoiding errors when machined is not running.
* Misc
- The configuration files now have comments mentioning which
options need to be disabled in order to run WirePlumber
without D-Bus.
- The configuration files now have properties to
enable/disable the monitors and other sections, so that it
is possible to disable them by dropping in a file that just
sets the relevant property to false.
- setlocale() is now called directly instead of relying on
pw_init().
- WpSpaJson received some fixes and is now used internally to
parse configuration files.
- More applications were added to the bluetooth auto-switch
applications whitelist.
- Add a new wireplumber-lang package.
- Drop patches already upstream:
* 0001-scripts-policy-device-profile-clear-tables-when-devices-removed.patch
* 0001-src-setlocale-in-main-for-tools-and-the-daemon.patch
- Rebase reduce-meson-required-version.patch
-------------------------------------------------------------------
Wed Mar 30 16:12:03 UTC 2022 - Antonio Larrosa <alarrosa@suse.com>

View File

@ -1,4 +1,4 @@
name: wireplumber
version: 0.4.9
mtime: 1647949138
commit: 8b97b40c4467951fbd4181afb47e4175361365a6
version: 0.4.10
mtime: 1652193117
commit: 3400acd0db95fefdda7595d20466c095902d8997

View File

@ -16,13 +16,13 @@
#
%define pipewire_minimum_version 0.3.43
%define pipewire_minimum_version 0.3.48
%define apiver 0.4
%define apiver_str 0_4
%define sover 0
%define libwireplumber libwireplumber-%{apiver_str}-%{sover}
Name: wireplumber
Version: 0.4.9
Version: 0.4.10
Release: 0
Summary: Session / policy manager implementation for PipeWire
License: MIT
@ -30,12 +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
# PATCH-FIX-UPSTREAM
Patch0: 0001-src-setlocale-in-main-for-tools-and-the-daemon.patch
# PATCH-FIX-UPSTREAM
Patch1: 0001-scripts-policy-device-profile-clear-tables-when-devices-removed.patch
# PATCH-FIX-OPENSUSE reduce-meson-dependency.patch
Patch100: reduce-meson-required-version.patch
# PATCH-FIX-OPENSUSE reduce-meson-required-version.patch
Patch0: reduce-meson-required-version.patch
# docs
BuildRequires: doxygen
BuildRequires: graphviz
@ -77,6 +73,8 @@ a GObject-based high-level library that wraps PipeWire's API,
providing convenience for writing the daemon's modules as well as
external tools for managing PipeWire.
%lang_package
%package audio
Summary: Session / policy manager implementation for PipeWire (audio support)
Group: Development/Libraries/C and C++
@ -134,7 +132,10 @@ This package provides the GObject Introspection bindings for
the wireplumber shared library.
%prep
%autosetup -p1
%autosetup -N
%if 0%{?sle_version} == 150300
%patch0 -p1
%endif
pushd src/config/main.lua.d
python3 %{SOURCE1}
@ -153,6 +154,7 @@ export CC=gcc-9
%install
%meson_install
%fdupes -s %{buildroot}/%{_datadir}/doc/pipewire/html
%find_lang %{name} %{?no_lang_C}
%ifnarch %ix86 ppc64
%check
@ -199,6 +201,8 @@ export XDG_RUNTIME_DIR=/tmp
%{_datadir}/wireplumber
%exclude %{_datadir}/wireplumber/main.lua.d/90-2-1-enable-alsa.lua
%files lang -f %{name}.lang
%files audio
%{_datadir}/wireplumber/main.lua.d/90-2-1-enable-alsa.lua