From f5cfdfb8e7efeea82f2ea3c19deae79b9fbfbb77bfbf79dc6b223904b36fd012 Mon Sep 17 00:00:00 2001 From: Antonio Larrosa Date: Wed, 3 Nov 2021 13:04:02 +0000 Subject: [PATCH] Accepting request 929023 from home:alarrosa:branches:multimedia:libs - Add patch from upstream to fix a problem saving the default route: * 0001-add-missing-break-in-best-route-selection-logic.patch - Add patch to let wireplumber build in Leap 15.3/SLE-15-SP3 which only have meson 0.54: * reduce-meson-required-version.patch - Add %post/%pre/... sections to enable the user service automatically OBS-URL: https://build.opensuse.org/request/show/929023 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/wireplumber?expand=0&rev=7 --- ...-break-in-best-route-selection-logic.patch | 26 +++++++++++++++++++ reduce-meson-required-version.patch | 24 +++++++++++++++++ wireplumber.changes | 17 ++++++++++++ wireplumber.spec | 22 ++++++++++++++-- 4 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 0001-add-missing-break-in-best-route-selection-logic.patch create mode 100644 reduce-meson-required-version.patch diff --git a/0001-add-missing-break-in-best-route-selection-logic.patch b/0001-add-missing-break-in-best-route-selection-logic.patch new file mode 100644 index 0000000..3597fe4 --- /dev/null +++ b/0001-add-missing-break-in-best-route-selection-logic.patch @@ -0,0 +1,26 @@ +From ff9b49064df436b0523bda66e567eb60ecf07f70 Mon Sep 17 00:00:00 2001 +From: George Kiagiadakis +Date: Mon, 1 Nov 2021 12:14:04 +0200 +Subject: [PATCH] default-routes.lua: add missing break in best route selection + logic + +Fixes #86 +--- + src/scripts/default-routes.lua | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/scripts/default-routes.lua b/src/scripts/default-routes.lua +index 9c5593a4..b55ae4e0 100644 +--- a/src/scripts/default-routes.lua ++++ b/src/scripts/default-routes.lua +@@ -266,6 +266,7 @@ function findBestRoute(dev_info, device_id) + if ri.direction == "Output" and ri.available ~= ri.prev_available then + best_avail = ri + ri.save = true ++ break + elseif ri.available == "yes" then + if (best_avail == nil or ri.priority > best_avail.priority) then + best_avail = ri +-- +GitLab + diff --git a/reduce-meson-required-version.patch b/reduce-meson-required-version.patch new file mode 100644 index 0000000..efcb25e --- /dev/null +++ b/reduce-meson-required-version.patch @@ -0,0 +1,24 @@ +Index: wireplumber/meson.build +=================================================================== +--- wireplumber.orig/meson.build ++++ wireplumber/meson.build +@@ -1,7 +1,7 @@ + project('wireplumber', ['c'], + version : '0.4.4', + license : 'MIT', +- meson_version : '>= 0.56.0', ++ meson_version : '>= 0.54.0', + default_options : [ + 'warning_level=1', + 'buildtype=debugoptimized', +@@ -123,8 +123,8 @@ endif + + conf_uninstalled = configuration_data() + conf_uninstalled.set('MESON', '') +-conf_uninstalled.set('MESON_SOURCE_ROOT', meson.project_source_root()) +-conf_uninstalled.set('MESON_BUILD_ROOT', meson.project_build_root()) ++conf_uninstalled.set('MESON_SOURCE_ROOT', meson.source_root()) ++conf_uninstalled.set('MESON_BUILD_ROOT', meson.build_root()) + + wp_uninstalled = configure_file( + input : 'wp-uninstalled.sh', diff --git a/wireplumber.changes b/wireplumber.changes index f9b3204..03d187c 100644 --- a/wireplumber.changes +++ b/wireplumber.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Wed Nov 3 08:34:01 UTC 2021 - Antonio Larrosa + +- Add patch from upstream to fix a problem saving the default + route: + * 0001-add-missing-break-in-best-route-selection-logic.patch + +- Add patch to let wireplumber build in Leap 15.3/SLE-15-SP3 + which only have meson 0.54: + * reduce-meson-required-version.patch + +------------------------------------------------------------------- +Thu Oct 21 10:15:34 UTC 2021 - Antonio Larrosa + +- Add %post/%pre/... sections to enable the user service + automatically + ------------------------------------------------------------------- Tue Oct 19 10:59:25 UTC 2021 - Antonio Larrosa diff --git a/wireplumber.spec b/wireplumber.spec index 6854c5e..2fb3953 100644 --- a/wireplumber.spec +++ b/wireplumber.spec @@ -30,12 +30,13 @@ URL: https://gitlab.freedesktop.org/pipewire/wireplumber Source0: wireplumber-%{version}.tar.xz Patch0: 0001-si-standard-link-fix-crash-after-returning-a-link-error.patch Patch1: 0002-policy-node-enforce-the-direction-of-the-target-when-linking-by-node-name.patch +Patch2: 0001-add-missing-break-in-best-route-selection-logic.patch +Patch3: reduce-meson-required-version.patch BuildRequires: cmake -BuildRequires: cpptoml-devel BuildRequires: doxygen BuildRequires: fdupes BuildRequires: graphviz -BuildRequires: meson >= 0.56.0 +BuildRequires: meson >= 0.54.0 BuildRequires: pipewire >= 0.3.32 #!BuildIgnore: pipewire-session-manager BuildRequires: pipewire-spa-plugins-0_2 @@ -131,6 +132,10 @@ the wireplumber shared library. %setup -n wireplumber-%{version} %patch0 -p1 %patch1 -p1 +%patch2 -p1 +%if %{pkg_vcmp meson < 0.56.0} +%patch3 -p1 +%endif %build %if %{pkg_vcmp gcc < 8} @@ -151,9 +156,22 @@ export XDG_RUNTIME_DIR=/tmp %meson_test %endif +%pre +%systemd_user_pre wireplumber.service + +%post +%systemd_user_post wireplumber.service + +%preun +%systemd_user_preun wireplumber.service + +%postun +%systemd_user_postun wireplumber.service + %post -n %{libwireplumber} -p /sbin/ldconfig %postun -n %{libwireplumber} -p /sbin/ldconfig + %files %{_bindir}/wireplumber %{_bindir}/wpctl