From 14359d1f6bc146390bb77cdba8122672c06c68eb5ca299b41036894b9d8f84f6 Mon Sep 17 00:00:00 2001 From: Antonio Larrosa Date: Fri, 8 Jul 2022 12:44:56 +0000 Subject: [PATCH] Accepting request 987884 from home:favogt:branches:multimedia:libs - Add patch to fix alsa device creation: * fix-alsa.patch OBS-URL: https://build.opensuse.org/request/show/987884 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/wireplumber?expand=0&rev=48 --- fix-alsa.patch | 39 +++++++++++++++++++++++++++++++++++++++ wireplumber.changes | 6 ++++++ wireplumber.spec | 3 +++ 3 files changed, 48 insertions(+) create mode 100644 fix-alsa.patch diff --git a/fix-alsa.patch b/fix-alsa.patch new file mode 100644 index 0000000..0ba91f1 --- /dev/null +++ b/fix-alsa.patch @@ -0,0 +1,39 @@ +From c16e637c329bc9dda8544b18f5bd47a8d63ee253 Mon Sep 17 00:00:00 2001 +From: George Kiagiadakis +Date: Thu, 7 Jul 2022 20:58:36 +0300 +Subject: [PATCH] alsa: use "obj_type" as a variable name to avoid shadowing + lua's "type" function + +This causes a crash when running in a VM because the code tries to +execute lua's "type()" and ends up executing the local string variable... + +Fixes: #303 +--- + src/scripts/monitors/alsa.lua | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/scripts/monitors/alsa.lua b/src/scripts/monitors/alsa.lua +index 43fab943..38f847f7 100644 +--- a/src/scripts/monitors/alsa.lua ++++ b/src/scripts/monitors/alsa.lua +@@ -49,7 +49,7 @@ function nonempty(str) + return str ~= "" and str or nil + end + +-function createNode(parent, id, type, factory, properties) ++function createNode(parent, id, obj_type, factory, properties) + local dev_props = parent.properties + + -- set the device id and spa factory name; REQUIRED, do not change +@@ -199,7 +199,7 @@ function createDevice(parent, id, factory, properties) + end + end + +-function prepareDevice(parent, id, type, factory, properties) ++function prepareDevice(parent, id, obj_type, factory, properties) + -- ensure the device has an appropriate name + local name = "alsa_card." .. + (properties["device.name"] or +-- +GitLab + diff --git a/wireplumber.changes b/wireplumber.changes index a123de3..143aee6 100644 --- a/wireplumber.changes +++ b/wireplumber.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jul 8 11:02:44 UTC 2022 - Fabian Vogt + +- Add patch to fix alsa device creation: + * fix-alsa.patch + ------------------------------------------------------------------- Tue Jul 5 15:13:07 UTC 2022 - Alexei Sorokin diff --git a/wireplumber.spec b/wireplumber.spec index 62907be..bb58957 100644 --- a/wireplumber.spec +++ b/wireplumber.spec @@ -32,6 +32,8 @@ Source0: wireplumber-%{version}.tar.xz Source1: split-config-file.py # PATCH-FIX-OPENSUSE reduce-meson-required-version.patch Patch0: reduce-meson-required-version.patch +# PATCH-FIX-UPSTREAM +Patch1: fix-alsa.patch # docs BuildRequires: doxygen BuildRequires: graphviz @@ -140,6 +142,7 @@ the wireplumber shared library. %if 0%{?sle_version} == 150300 %patch0 -p1 %endif +%patch1 -p1 pushd src/config/main.lua.d python3 %{SOURCE1}