* [gentoo-commits] repo/gentoo:master commit in: media-video/wireplumber/files/, media-video/wireplumber/
@ 2021-09-15 17:06 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2021-09-15 17:06 UTC (permalink / raw
To: gentoo-commits
commit: 639f62636b5ce8dd284fdeb3a5e95dd08bd59115
Author: Niklāvs Koļesņikovs <89q1r14hd <AT> relay <DOT> firefox <DOT> com>
AuthorDate: Wed Sep 15 11:32:40 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Sep 15 17:06:10 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=639f6263
media-video/pipewire: enable support for test IUSE
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd <AT> relay.firefox.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
...ber-0.4.2-meson-Build-tests-conditionally.patch | 41 ++++++++++++++++++++++
.../wireplumber/wireplumber-0.4.2-r1.ebuild | 9 ++++-
media-video/wireplumber/wireplumber-9999.ebuild | 5 ++-
3 files changed, 53 insertions(+), 2 deletions(-)
diff --git a/media-video/wireplumber/files/wireplumber-0.4.2-meson-Build-tests-conditionally.patch b/media-video/wireplumber/files/wireplumber-0.4.2-meson-Build-tests-conditionally.patch
new file mode 100644
index 00000000000..dab53c71bf4
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.2-meson-Build-tests-conditionally.patch
@@ -0,0 +1,41 @@
+From 3b24c419b497c283e64df23b3b5eecd4c3d51927 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 14 Sep 2021 05:07:41 +0100
+Subject: [PATCH 1/5] meson: Build tests conditionally
+
+It's useful downstream to be able to control building
+tests, as there's not much use building them if we're
+not going to run them.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ meson.build | 5 ++++-
+ meson_options.txt | 2 ++
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 3712a82..5f87ade 100644
+--- a/meson.build
++++ b/meson.build
+@@ -109,4 +109,7 @@ subdir('lib')
+ subdir('docs')
+ subdir('modules')
+ subdir('src')
+-subdir('tests')
++
++if get_option('tests')
++ subdir('tests')
++endif
+diff --git a/meson_options.txt b/meson_options.txt
+index a7a0a89..4008864 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -24,3 +24,5 @@ option('systemd-user-unit-dir',
+ description : 'Directory for user systemd units')
+ option('glib-supp', type : 'string', value : '',
+ description: 'The glib.supp valgrind suppressions file to be used when running valgrind')
++option('tests', type : 'boolean', value : 'true',
++ description : 'Build the test suite')
+--
+2.33.0
+
diff --git a/media-video/wireplumber/wireplumber-0.4.2-r1.ebuild b/media-video/wireplumber/wireplumber-0.4.2-r1.ebuild
index 6e5080a5e1d..ed677c4b5aa 100644
--- a/media-video/wireplumber/wireplumber-0.4.2-r1.ebuild
+++ b/media-video/wireplumber/wireplumber-0.4.2-r1.ebuild
@@ -21,10 +21,12 @@ HOMEPAGE="https://gitlab.freedesktop.org/pipewire/wireplumber"
LICENSE="MIT"
SLOT="0/0.4"
-IUSE="systemd"
+IUSE="systemd test"
REQUIRED_USE="${LUA_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
# introspection? ( dev-libs/gobject-introspection ) is valid but likely only used for doc building
BDEPEND="
dev-libs/glib
@@ -48,6 +50,10 @@ RDEPEND="${DEPEND}"
DOCS=( {NEWS,README}.rst )
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.4.2-meson-Build-tests-conditionally.patch
+)
+
src_configure() {
local emesonargs=(
-Dintrospection=disabled # Only used for Sphinx doc generation
@@ -58,6 +64,7 @@ src_configure() {
$(meson_use systemd systemd-user-service)
-Dsystemd-system-unit-dir=$(systemd_get_systemunitdir)
-Dsystemd-user-unit-dir=$(systemd_get_userunitdir)
+ $(meson_use test tests)
)
meson_src_configure
diff --git a/media-video/wireplumber/wireplumber-9999.ebuild b/media-video/wireplumber/wireplumber-9999.ebuild
index 6e5080a5e1d..6477107a785 100644
--- a/media-video/wireplumber/wireplumber-9999.ebuild
+++ b/media-video/wireplumber/wireplumber-9999.ebuild
@@ -21,10 +21,12 @@ HOMEPAGE="https://gitlab.freedesktop.org/pipewire/wireplumber"
LICENSE="MIT"
SLOT="0/0.4"
-IUSE="systemd"
+IUSE="systemd test"
REQUIRED_USE="${LUA_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
# introspection? ( dev-libs/gobject-introspection ) is valid but likely only used for doc building
BDEPEND="
dev-libs/glib
@@ -58,6 +60,7 @@ src_configure() {
$(meson_use systemd systemd-user-service)
-Dsystemd-system-unit-dir=$(systemd_get_systemunitdir)
-Dsystemd-user-unit-dir=$(systemd_get_userunitdir)
+ $(meson_use test tests)
)
meson_src_configure
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/wireplumber/files/, media-video/wireplumber/
@ 2021-12-01 19:49 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2021-12-01 19:49 UTC (permalink / raw
To: gentoo-commits
commit: f14cc9569d7591317f868b9359232a8ddafb76e5
Author: Niklāvs Koļesņikovs <89q1r14hd <AT> relay <DOT> firefox <DOT> com>
AuthorDate: Fri Nov 19 08:07:46 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 1 19:49:41 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f14cc956
media-video/wireplumber: apply multiple important looking fixes
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd <AT> relay.firefox.com>
Closes: https://github.com/gentoo/gentoo/pull/23001
Signed-off-by: Sam James <sam <AT> gentoo.org>
...-alsa-handle-the-release-requested-signal.patch | 33 ++++++++
...ead-hidden-files-from-the-config-director.patch | 27 ++++++
...evice-replace-the-hash-table-key-on-new-i.patch | 47 +++++++++++
...de-wait-for-nodes-when-we-become-unlinked.patch | 34 ++++++++
.../wireplumber/wireplumber-0.4.5-r1.ebuild | 96 ++++++++++++++++++++++
5 files changed, 237 insertions(+)
diff --git a/media-video/wireplumber/files/wireplumber-0.4.5-alsa-handle-the-release-requested-signal.patch b/media-video/wireplumber/files/wireplumber-0.4.5-alsa-handle-the-release-requested-signal.patch
new file mode 100644
index 000000000000..511dc6df377e
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.5-alsa-handle-the-release-requested-signal.patch
@@ -0,0 +1,33 @@
+From efd24584182903bf5ee4660a3b3360cc47ad895b Mon Sep 17 00:00:00 2001
+From: Wim Taymans <wtaymans@redhat.com>
+Date: Tue, 23 Nov 2021 13:17:29 +0100
+Subject: [PATCH] alsa: handle the release-requested signal
+
+Handle the release-requested signal by destroying the device and
+then calling release.
+
+Fixes pipewire/pipewire#1846
+---
+ src/scripts/monitors/alsa.lua | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/scripts/monitors/alsa.lua b/src/scripts/monitors/alsa.lua
+index 68c39d8..be4648e 100644
+--- a/src/scripts/monitors/alsa.lua
++++ b/src/scripts/monitors/alsa.lua
+@@ -287,6 +287,12 @@ function prepareDevice(parent, id, type, factory, properties)
+ end
+ end)
+
++ rd:connect("release-requested", function (rd)
++ Log.info("release requested")
++ parent:store_managed_object(id, nil)
++ rd:call("release")
++ end)
++
+ if jack_device then
+ rd:connect("notify::owner-name-changed", function (rd, pspec)
+ if rd["state"] == "busy" and
+--
+2.34.1
+
diff --git a/media-video/wireplumber/files/wireplumber-0.4.5-lib-don-t-read-hidden-files-from-the-config-director.patch b/media-video/wireplumber/files/wireplumber-0.4.5-lib-don-t-read-hidden-files-from-the-config-director.patch
new file mode 100644
index 000000000000..1554c65e27da
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.5-lib-don-t-read-hidden-files-from-the-config-director.patch
@@ -0,0 +1,27 @@
+From ee5f3f2f195b01fd89ee148da5799b02f99ebb6e Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Sun, 14 Nov 2021 19:44:30 +1000
+Subject: [PATCH 3/3] lib: don't read hidden files from the config directory
+
+Fixes #104
+---
+ lib/wp/wp.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/lib/wp/wp.c b/lib/wp/wp.c
+index ffdff1a..c356133 100644
+--- a/lib/wp/wp.c
++++ b/lib/wp/wp.c
+@@ -315,6 +315,9 @@ wp_new_files_iterator (WpLookupDirs dirs, const gchar *subdir,
+ if (dir) {
+ const gchar *filename;
+ while ((filename = g_dir_read_name (dir))) {
++ if (filename[0] == '.')
++ continue;
++
+ if (suffix && !g_str_has_suffix (filename, suffix))
+ continue;
+
+--
+2.34.0
+
diff --git a/media-video/wireplumber/files/wireplumber-0.4.5-m-reserve-device-replace-the-hash-table-key-on-new-i.patch b/media-video/wireplumber/files/wireplumber-0.4.5-m-reserve-device-replace-the-hash-table-key-on-new-i.patch
new file mode 100644
index 000000000000..70d69093d082
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.5-m-reserve-device-replace-the-hash-table-key-on-new-i.patch
@@ -0,0 +1,47 @@
+From f4546a18e871537be698916178b40091a4a0b377 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Fri, 12 Nov 2021 11:19:54 +1000
+Subject: [PATCH 3/3] m-reserve-device: replace the hash table key on new
+ insert
+
+We're using the WpReserveDevice's name as key in the hash table, so we
+must update the key as well when we replace an item in the hashtable -
+the old device (and its name) will be released.
+
+The side-effect of this is that the *third* device with an identical
+name will no longer replace the previous device. This results in the
+following sequence:
+
+- dev1 added: name Audio0
+ - dev1 requests name owner Audio0
+- dev2 added: name Audio0
+ - replace dev1 in the hashtable
+ - dev1 emits "release" signal
+ - dev1 unowns the Audio0 name
+ - dev2 requests name owner Audio0
+- dev3 added: name Audio0
+ - adds to the hashtable because the existing key is now undefined
+ - dev3 requests name owner Audio0
+ - error, you cannot request ownership for the same name twice
+
+Fixes #93
+---
+ modules/module-reserve-device/plugin.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/modules/module-reserve-device/plugin.c b/modules/module-reserve-device/plugin.c
+index d8e4e09..68df6ee 100644
+--- a/modules/module-reserve-device/plugin.c
++++ b/modules/module-reserve-device/plugin.c
+@@ -221,7 +221,7 @@ wp_reserve_device_plugin_create_reservation (WpReserveDevicePlugin *self,
+ NULL);
+
+ /* use rd->name to avoid copying @em name again */
+- g_hash_table_insert (self->reserve_devices, rd->name, rd);
++ g_hash_table_replace (self->reserve_devices, rd->name, rd);
+
+ return g_object_ref (rd);
+ }
+--
+2.34.0
+
diff --git a/media-video/wireplumber/files/wireplumber-0.4.5-policy-node-wait-for-nodes-when-we-become-unlinked.patch b/media-video/wireplumber/files/wireplumber-0.4.5-policy-node-wait-for-nodes-when-we-become-unlinked.patch
new file mode 100644
index 000000000000..0ce16a647697
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.5-policy-node-wait-for-nodes-when-we-become-unlinked.patch
@@ -0,0 +1,34 @@
+From 83041b0ce277c95afaf1824f525ea0bec516f03f Mon Sep 17 00:00:00 2001
+From: Wim Taymans <wtaymans@redhat.com>
+Date: Thu, 18 Nov 2021 15:23:23 +0100
+Subject: [PATCH 2/3] policy-node: wait for nodes when we become unlinked
+
+If we were linked before but our node is removed, wait until a new node
+becomes available instead of failing.
+
+This fixes an issue where there is only 1 sink available and the card
+profile is toggeled between pro and stereo. After the profile is
+toggled, the sink is removed and the node would be killed with an error
+because there is no fallback sink. The fix is similar to the
+pipewire-media-session logic.
+---
+ src/scripts/policy-node.lua | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/scripts/policy-node.lua b/src/scripts/policy-node.lua
+index 5029d1b..445b1a7 100644
+--- a/src/scripts/policy-node.lua
++++ b/src/scripts/policy-node.lua
+@@ -493,6 +493,9 @@ function handleLinkable (si)
+ if not reconnect then
+ Log.info (si, "... destroy node")
+ node:request_destroy()
++ elseif si_flags[si.id].was_handled then
++ Log.info (si, "... waiting reconnect")
++ return
+ end
+
+ local client_id = node.properties["client.id"]
+--
+2.34.0
+
diff --git a/media-video/wireplumber/wireplumber-0.4.5-r1.ebuild b/media-video/wireplumber/wireplumber-0.4.5-r1.ebuild
new file mode 100644
index 000000000000..977f3e5b79a7
--- /dev/null
+++ b/media-video/wireplumber/wireplumber-0.4.5-r1.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-{3,4} )
+
+inherit lua-single meson systemd
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://gitlab.freedesktop.org/pipewire/${PN}.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+else
+ SRC_URI="https://gitlab.freedesktop.org/pipewire/${PN}/-/archive/${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+fi
+
+DESCRIPTION="Replacement for pipewire-media-session"
+HOMEPAGE="https://gitlab.freedesktop.org/pipewire/wireplumber"
+
+LICENSE="MIT"
+SLOT="0/0.4"
+IUSE="elogind systemd test"
+
+REQUIRED_USE="
+ ${LUA_REQUIRED_USE}
+ ?? ( elogind systemd )
+"
+
+RESTRICT="!test? ( test )"
+
+# introspection? ( dev-libs/gobject-introspection ) is valid but likely only used for doc building
+BDEPEND="
+ dev-libs/glib
+ dev-util/gdbus-codegen
+ dev-util/glib-utils
+"
+
+DEPEND="
+ ${LUA_DEPS}
+ >=dev-libs/glib-2.62
+ >=media-video/pipewire-0.3.39
+ virtual/libc
+ elogind? ( sys-auth/elogind )
+ systemd? ( sys-apps/systemd )
+"
+
+# Any dev-lua/* deps get declared like this inside RDEPEND:
+# $(lua_gen_cond_dep '
+# dev-lua/<NAME>[${LUA_USEDEP}]
+# ')
+RDEPEND="${DEPEND}"
+
+DOCS=( {NEWS,README}.rst )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.4.5-m-reserve-device-replace-the-hash-table-key-on-new-i.patch
+ "${FILESDIR}"/${PN}-0.4.5-policy-node-wait-for-nodes-when-we-become-unlinked.patch
+ "${FILESDIR}"/${PN}-0.4.5-lib-don-t-read-hidden-files-from-the-config-director.patch
+ "${FILESDIR}"/${PN}-0.4.5-alsa-handle-the-release-requested-signal.patch
+)
+
+src_configure() {
+ local emesonargs=(
+ -Dintrospection=disabled # Only used for Sphinx doc generation
+ -Dsystem-lua=true # We always unbundle everything we can
+ -Dsystem-lua-version=$(ver_cut 1-2 $(lua_get_version))
+ $(meson_feature elogind)
+ $(meson_feature systemd)
+ -Dsystemd-system-service=false # Matches upstream
+ $(meson_use systemd systemd-user-service)
+ -Dsystemd-system-unit-dir=$(systemd_get_systemunitdir)
+ -Dsystemd-user-unit-dir=$(systemd_get_userunitdir)
+ $(meson_use test tests)
+ )
+
+ meson_src_configure
+}
+
+pkg_postinst() {
+ if systemd_is_booted ; then
+ ewarn "pipewire-media-session.service is no longer installed. You must switch"
+ ewarn "to wireplumber.service user unit before your next logout/reboot:"
+ ewarn "systemctl --user disable pipewire-media-session.service"
+ ewarn "systemctl --user --force enable wireplumber.service"
+ else
+ ewarn "Switch to WirePlumber will happen the next time gentoo-pipewire-launcher"
+ ewarn "is started (a replacement for directly calling pipewire binary)."
+ ewarn
+ ewarn "Please ensure that ${EROOT}/etc/pipewire/pipewire.conf either does not exist"
+ ewarn "or, if it does exist, that any reference to"
+ ewarn "${EROOT}/usr/bin/pipewire-media-session is commented out (begins with a #)."
+ fi
+ ewarn
+}
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/wireplumber/files/, media-video/wireplumber/
@ 2022-01-06 20:53 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2022-01-06 20:53 UTC (permalink / raw
To: gentoo-commits
commit: 26754e7d4280639fb756a8340e0de7d29b8de78a
Author: Niklāvs Koļesņikovs <89q1r14hd <AT> relay <DOT> firefox <DOT> com>
AuthorDate: Tue Jan 4 06:38:20 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan 6 20:53:31 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26754e7d
media-video/wireplumber: add fix to stop stream move on HDMI suspend
The patch looks like it might fix other things too but the best known
issue it should be resolving is that without it having a display
suspend or enter power off state would make audio streams be moved
to the next highest priority device. Such behavior might be
PulseAudio default but for PipeWire it's considered undesirable and
a bug to fix.
Bug: https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/94
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd <AT> relay.firefox.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
...tes.lua-reevaluate-current-profile-only-f.patch | 81 ++++++++++++++++++++++
...0.4.5-r3.ebuild => wireplumber-0.4.5-r4.ebuild} | 1 +
2 files changed, 82 insertions(+)
diff --git a/media-video/wireplumber/files/wireplumber-0.4.5-default-routes.lua-reevaluate-current-profile-only-f.patch b/media-video/wireplumber/files/wireplumber-0.4.5-default-routes.lua-reevaluate-current-profile-only-f.patch
new file mode 100644
index 000000000000..423a1fcb6139
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.5-default-routes.lua-reevaluate-current-profile-only-f.patch
@@ -0,0 +1,81 @@
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/22fd4292ab35786b09561508778ab49cc6488dc6
+
+From 22fd4292ab35786b09561508778ab49cc6488dc6 Mon Sep 17 00:00:00 2001
+From: Julian Bouzas <julian.bouzas@collabora.com>
+Date: Tue, 7 Dec 2021 14:10:32 -0500
+Subject: [PATCH] default-routes.lua: reevaluate current profile only for its
+ own routes
+
+Only check the current active profile when some routes changed that are part of
+the profile. If some other route changed, just ignore it.
+---
+ src/scripts/default-routes.lua | 39 +++++++++++++++++++---------------
+ 1 file changed, 22 insertions(+), 17 deletions(-)
+
+diff --git a/src/scripts/default-routes.lua b/src/scripts/default-routes.lua
+index 1840989f..953cba33 100644
+--- a/src/scripts/default-routes.lua
++++ b/src/scripts/default-routes.lua
+@@ -352,6 +352,12 @@ function handleDevice(device)
+ local dev_info = dev_infos[device["bound-id"]]
+ local new_route_infos = {}
+ local avail_routes_changed = false
++ local profile = nil
++
++ -- get current profile
++ for p in device:iterate_params("Profile") do
++ profile = parseParam(p, "Profile")
++ end
+
+ -- look at all the routes and update/reset cached information
+ for p in device:iterate_params("EnumRoute") do
+@@ -370,7 +376,9 @@ function handleDevice(device)
+ Log.info(device, "route " .. route.name .. " available changed " ..
+ route_info.available .. " -> " .. route.available)
+ route_info.available = route.available
+- avail_routes_changed = true
++ if profile and arrayContains(route.profiles, profile.index) then
++ avail_routes_changed = true
++ end
+ end
+ route_info.prev_active = route_info.active
+ route_info.active = false
+@@ -419,23 +427,20 @@ function handleDevice(device)
+ ::skip_route::
+ end
+
+- -- now get the profile and restore routes for it
+- for p in device:iterate_params("Profile") do
+- local profile = parseParam(p, "Profile")
+- if profile then
+- local profile_changed = (dev_info.active_profile ~= profile.index)
+-
+- -- if the profile changed, restore routes for that profile
+- -- if any of the routes of the current profile changed in availability,
+- -- then try to select a new "best" route for each device and ignore
+- -- what was stored
+- if profile_changed or avail_routes_changed then
+- dev_info.active_profile = profile.index
+- restoreProfileRoutes(device, dev_info, profile, profile_changed)
+- end
+-
+- saveProfile(dev_info, profile.name)
++ -- restore routes for profile
++ if profile then
++ local profile_changed = (dev_info.active_profile ~= profile.index)
++
++ -- if the profile changed, restore routes for that profile
++ -- if any of the routes of the current profile changed in availability,
++ -- then try to select a new "best" route for each device and ignore
++ -- what was stored
++ if profile_changed or avail_routes_changed then
++ dev_info.active_profile = profile.index
++ restoreProfileRoutes(device, dev_info, profile, profile_changed)
+ end
++
++ saveProfile(dev_info, profile.name)
+ end
+ end
+
+--
+GitLab
diff --git a/media-video/wireplumber/wireplumber-0.4.5-r3.ebuild b/media-video/wireplumber/wireplumber-0.4.5-r4.ebuild
similarity index 97%
rename from media-video/wireplumber/wireplumber-0.4.5-r3.ebuild
rename to media-video/wireplumber/wireplumber-0.4.5-r4.ebuild
index e39673240df7..faf7c563e19f 100644
--- a/media-video/wireplumber/wireplumber-0.4.5-r3.ebuild
+++ b/media-video/wireplumber/wireplumber-0.4.5-r4.ebuild
@@ -64,6 +64,7 @@ PATCHES=(
"${FILESDIR}"/${P}-lib-don-t-read-hidden-files-from-the-config-director.patch
"${FILESDIR}"/${P}-alsa-handle-the-release-requested-signal.patch
"${FILESDIR}"/${P}-access-config-add-restricted-access-permissions.patch
+ "${FILESDIR}"/${P}-default-routes.lua-reevaluate-current-profile-only-f.patch
"${WORKDIR}"/${P}-endianness-fixes.patch
)
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/wireplumber/files/, media-video/wireplumber/
@ 2022-01-09 7:56 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2022-01-09 7:56 UTC (permalink / raw
To: gentoo-commits
commit: 39651aab61fdc7770b13aaf18edee284c54a8818
Author: Niklāvs Koļesņikovs <89q1r14hd <AT> relay <DOT> firefox <DOT> com>
AuthorDate: Fri Jan 7 20:54:44 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan 9 07:56:39 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39651aab
media-video/wireplumber: bump to 0.4.6-r1 for two patches
Turns out the current BE fix was a WIP patch which was, apparently
superseded by an entirely different patch fixing the same issue.
Additionally include a recently upstreamed fix for random PA client
delays on device rescan and a few minor fixes which have no associated
upstream issue but look like they'd be good idea to have.
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd <AT> relay.firefox.com>
Closes: https://github.com/gentoo/gentoo/pull/23690
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/wireplumber-0.4.6-endianness-fixes.patch | 229 ---------------------
...-find-best-linkable-if-default-one-cannot.patch | 48 +++++
...cy-node-fix-typo-when-finding-best-target.patch | 27 +++
...-schedule-a-rescan-without-timeout-if-def.patch | 50 +++++
...-different-architecture-errors-for-boolea.patch | 40 ++++
...er-0.4.6.ebuild => wireplumber-0.4.6-r1.ebuild} | 5 +-
6 files changed, 169 insertions(+), 230 deletions(-)
diff --git a/media-video/wireplumber/files/wireplumber-0.4.6-endianness-fixes.patch b/media-video/wireplumber/files/wireplumber-0.4.6-endianness-fixes.patch
deleted file mode 100644
index 9b8bba93a8ab..000000000000
--- a/media-video/wireplumber/files/wireplumber-0.4.6-endianness-fixes.patch
+++ /dev/null
@@ -1,229 +0,0 @@
-Bunch of patches from https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/49
-Requires pipewire 0.3.42 for 03f0a7c9bac3e61126fc852e543b8ea254471eb7.
-
---- a/tests/wp/spa-pod.c
-+++ b/tests/wp/spa-pod.c
-@@ -6,6 +6,8 @@
- * SPDX-License-Identifier: MIT
- */
-
-+#include <stdbool.h>
-+
- #include <wp/wp.h>
-
- static void
-@@ -428,12 +430,12 @@ test_spa_pod_object (void)
- wp_spa_type_name (wp_spa_pod_get_spa_type (pod)));
-
- const char *id_name;
-- gboolean mute = TRUE;
-+ bool mute = true;
- float vol = 0.0;
- gint32 frequency;
- const char *device;
- gint64 device_fd;
-- gboolean custom = FALSE;
-+ bool custom = false;
- g_assert_true (wp_spa_pod_get_object (pod,
- &id_name,
- "mute", "b", &mute,
-@@ -475,12 +477,12 @@ test_spa_pod_object (void)
- wp_spa_type_name (wp_spa_pod_get_spa_type (pod)));
-
- const char *id_name;
-- gboolean mute = TRUE;
-+ bool mute = true;
- float vol = 0.0;
- gint32 frequency;
- const char *device;
- gint64 device_fd;
-- gboolean custom = FALSE;
-+ bool custom = false;
- g_autoptr (WpSpaPodParser) p = wp_spa_pod_parser_new_object (pod, &id_name);
- g_assert_nonnull (pod);
- g_assert_true (wp_spa_pod_parser_get (p, "mute", "b", &mute, NULL));
-@@ -603,7 +605,7 @@ test_spa_pod_struct (void)
- g_assert_true (wp_spa_pod_parser_get (p, "P", &value_object, NULL));
- g_assert_nonnull (value_object);
- const char *id_name;
-- gboolean mute = TRUE;
-+ bool mute = true;
-
- g_assert_true (wp_spa_pod_get_object (value_object,
- &id_name,
---- a/tests/wp/endpoint.c
-+++ b/tests/wp/endpoint.c
-@@ -499,7 +499,7 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- g_auto (GValue) item = G_VALUE_INIT;
- g_autoptr (WpSpaPod) pod = NULL;
- gfloat float_value = 0.0f;
-- gboolean boolean_value = TRUE;
-+ bool boolean_value = true;
-
- iterator = wp_pipewire_object_enum_params_sync (
- WP_PIPEWIRE_OBJECT (fixture->proxy_endpoint), "Props", NULL);
-@@ -513,7 +513,7 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- "mute", "b", &boolean_value,
- NULL));
- g_assert_cmpfloat_with_epsilon (float_value, 1.0f, 0.001);
-- g_assert_cmpint (boolean_value, ==, FALSE);
-+ g_assert_cmpint (boolean_value, ==, false);
- }
-
- /* setup change signals */
-@@ -541,7 +541,7 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- g_auto (GValue) item = G_VALUE_INIT;
- g_autoptr (WpSpaPod) pod = NULL;
- gfloat float_value = 0.0f;
-- gboolean boolean_value = TRUE;
-+ bool boolean_value = true;
-
- iterator = wp_pipewire_object_enum_params_sync (
- WP_PIPEWIRE_OBJECT (fixture->proxy_endpoint), "Props", NULL);
-@@ -556,14 +556,14 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- "mute", "b", &boolean_value,
- NULL));
- g_assert_cmpfloat_with_epsilon (float_value, 0.7f, 0.001);
-- g_assert_cmpint (boolean_value, ==, FALSE);
-+ g_assert_cmpint (boolean_value, ==, false);
- }
- {
- g_autoptr (WpIterator) iterator = NULL;
- g_auto (GValue) item = G_VALUE_INIT;
- g_autoptr (WpSpaPod) pod = NULL;
- gfloat float_value = 0.0f;
-- gboolean boolean_value = TRUE;
-+ bool boolean_value = true;
-
- iterator = wp_pipewire_object_enum_params_sync (
- WP_PIPEWIRE_OBJECT (fixture->impl_endpoint), "Props", NULL);
-@@ -577,14 +577,14 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- "mute", "b", &boolean_value,
- NULL));
- g_assert_cmpfloat_with_epsilon (float_value, 0.7f, 0.001);
-- g_assert_cmpint (boolean_value, ==, FALSE);
-+ g_assert_cmpint (boolean_value, ==, false);
- }
- {
- g_autoptr (WpIterator) iterator = NULL;
- g_auto (GValue) item = G_VALUE_INIT;
- g_autoptr (WpSpaPod) pod = NULL;
- gfloat float_value = 0.0f;
-- gboolean boolean_value = TRUE;
-+ bool boolean_value = true;
-
- iterator = wp_pipewire_object_enum_params_sync (
- WP_PIPEWIRE_OBJECT (endpoint->node), "Props", NULL);
-@@ -598,7 +598,7 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- "mute", "b", &boolean_value,
- NULL));
- g_assert_cmpfloat_with_epsilon (float_value, 0.7f, 0.001);
-- g_assert_cmpint (boolean_value, ==, FALSE);
-+ g_assert_cmpint (boolean_value, ==, false);
- }
-
- /* change control on the impl */
-@@ -618,7 +618,7 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- g_auto (GValue) item = G_VALUE_INIT;
- g_autoptr (WpSpaPod) pod = NULL;
- gfloat float_value = 0.0f;
-- gboolean boolean_value = TRUE;
-+ bool boolean_value = true;
-
- iterator = wp_pipewire_object_enum_params_sync (
- WP_PIPEWIRE_OBJECT (fixture->proxy_endpoint), "Props", NULL);
-@@ -633,14 +633,14 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- "mute", "b", &boolean_value,
- NULL));
- g_assert_cmpfloat_with_epsilon (float_value, 0.7f, 0.001);
-- g_assert_cmpint (boolean_value, ==, TRUE);
-+ g_assert_cmpint (boolean_value, ==, true);
- }
- {
- g_autoptr (WpIterator) iterator = NULL;
- g_auto (GValue) item = G_VALUE_INIT;
- g_autoptr (WpSpaPod) pod = NULL;
- gfloat float_value = 0.0f;
-- gboolean boolean_value = TRUE;
-+ bool boolean_value = true;
-
- iterator = wp_pipewire_object_enum_params_sync (
- WP_PIPEWIRE_OBJECT (fixture->impl_endpoint), "Props", NULL);
-@@ -654,14 +654,14 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- "mute", "b", &boolean_value,
- NULL));
- g_assert_cmpfloat_with_epsilon (float_value, 0.7f, 0.001);
-- g_assert_cmpint (boolean_value, ==, TRUE);
-+ g_assert_cmpint (boolean_value, ==, true);
- }
- {
- g_autoptr (WpIterator) iterator = NULL;
- g_auto (GValue) item = G_VALUE_INIT;
- g_autoptr (WpSpaPod) pod = NULL;
- gfloat float_value = 0.0f;
-- gboolean boolean_value = TRUE;
-+ bool boolean_value = true;
-
- iterator = wp_pipewire_object_enum_params_sync (
- WP_PIPEWIRE_OBJECT (endpoint->node), "Props", NULL);
-@@ -675,7 +675,7 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- "mute", "b", &boolean_value,
- NULL));
- g_assert_cmpfloat_with_epsilon (float_value, 0.7f, 0.001);
-- g_assert_cmpint (boolean_value, ==, TRUE);
-+ g_assert_cmpint (boolean_value, ==, true);
- }
-
- /* change control on the node */
-@@ -695,7 +695,7 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- g_auto (GValue) item = G_VALUE_INIT;
- g_autoptr (WpSpaPod) pod = NULL;
- gfloat float_value = 0.0f;
-- gboolean boolean_value = TRUE;
-+ bool boolean_value = true;
-
- iterator = wp_pipewire_object_enum_params_sync (
- WP_PIPEWIRE_OBJECT (fixture->proxy_endpoint), "Props", NULL);
-@@ -709,14 +709,14 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- "mute", "b", &boolean_value,
- NULL));
- g_assert_cmpfloat_with_epsilon (float_value, 0.2f, 0.001);
-- g_assert_cmpint (boolean_value, ==, TRUE);
-+ g_assert_cmpint (boolean_value, ==, true);
- }
- {
- g_autoptr (WpIterator) iterator = NULL;
- g_auto (GValue) item = G_VALUE_INIT;
- g_autoptr (WpSpaPod) pod = NULL;
- gfloat float_value = 0.0f;
-- gboolean boolean_value = TRUE;
-+ bool boolean_value = true;
-
- iterator = wp_pipewire_object_enum_params_sync (
- WP_PIPEWIRE_OBJECT (fixture->impl_endpoint), "Props", NULL);
-@@ -730,14 +730,14 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- "mute", "b", &boolean_value,
- NULL));
- g_assert_cmpfloat_with_epsilon (float_value, 0.2f, 0.001);
-- g_assert_cmpint (boolean_value, ==, TRUE);
-+ g_assert_cmpint (boolean_value, ==, true);
- }
- {
- g_autoptr (WpIterator) iterator = NULL;
- g_auto (GValue) item = G_VALUE_INIT;
- g_autoptr (WpSpaPod) pod = NULL;
- gfloat float_value = 0.0f;
-- gboolean boolean_value = TRUE;
-+ bool boolean_value = true;
-
- iterator = wp_pipewire_object_enum_params_sync (
- WP_PIPEWIRE_OBJECT (endpoint->node), "Props", NULL);
-@@ -751,7 +751,7 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- "mute", "b", &boolean_value,
- NULL));
- g_assert_cmpfloat_with_epsilon (float_value, 0.2f, 0.001);
-- g_assert_cmpint (boolean_value, ==, TRUE);
-+ g_assert_cmpint (boolean_value, ==, true);
- }
-
- /* destroy impl endpoint */
diff --git a/media-video/wireplumber/files/wireplumber-0.4.6-policy-node-find-best-linkable-if-default-one-cannot.patch b/media-video/wireplumber/files/wireplumber-0.4.6-policy-node-find-best-linkable-if-default-one-cannot.patch
new file mode 100644
index 000000000000..0cedea4ac6be
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.6-policy-node-find-best-linkable-if-default-one-cannot.patch
@@ -0,0 +1,48 @@
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/bee9827ae376b75feceea926b0afc727fecca51b
+
+From bee9827ae376b75feceea926b0afc727fecca51b Mon Sep 17 00:00:00 2001
+From: Julian Bouzas <julian.bouzas@collabora.com>
+Date: Fri, 7 Jan 2022 15:35:10 -0500
+Subject: [PATCH] policy-node: find best linkable if default one cannot be
+ linked
+
+Fixes issue with echo cancellation pipewire module.
+---
+ src/scripts/policy-node.lua | 19 ++++++++++++++-----
+ 1 file changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/src/scripts/policy-node.lua b/src/scripts/policy-node.lua
+index c273c1fe..9df50072 100644
+--- a/src/scripts/policy-node.lua
++++ b/src/scripts/policy-node.lua
+@@ -477,13 +477,22 @@ function findBestLinkable (si)
+ end
+
+ function findUndefinedTarget (si)
+- -- Find the default linkable if the default nodes module is loaded, otherwise
+- -- just find the best linkable based on priority and routes
+- if default_nodes ~= nil then
+- return findDefaultlinkable (si)
+- else
++ -- Just find the best linkable if default nodes module is not loaded
++ if default_nodes == nil then
+ return findBestLinkable (si)
+ end
++
++ -- Otherwise find the default linkable. If the default linkabke cannot link,
++ -- we find the best one instead. We return nil if default does not exist.
++ local si_target, can_passthrough = findDefaultlinkable (si)
++ if si_target then
++ if canLink (si.properties, si_target) then
++ return si_target, can_passthrough
++ else
++ return findBestLinkable (si)
++ end
++ end
++ return nil, nil
+ end
+
+ function lookupLink (si_id, si_target_id)
+--
+GitLab
+
diff --git a/media-video/wireplumber/files/wireplumber-0.4.6-policy-node-fix-typo-when-finding-best-target.patch b/media-video/wireplumber/files/wireplumber-0.4.6-policy-node-fix-typo-when-finding-best-target.patch
new file mode 100644
index 000000000000..f18920c475a8
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.6-policy-node-fix-typo-when-finding-best-target.patch
@@ -0,0 +1,27 @@
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/23fc4d21a9cfad492f8d3a367e438115197dff4a
+
+From 23fc4d21a9cfad492f8d3a367e438115197dff4a Mon Sep 17 00:00:00 2001
+From: Julian Bouzas <julian.bouzas@collabora.com>
+Date: Fri, 7 Jan 2022 10:12:04 -0500
+Subject: [PATCH] policy-node: fix typo when finding best target
+
+---
+ src/scripts/policy-node.lua | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/scripts/policy-node.lua b/src/scripts/policy-node.lua
+index 0d716c1c..8ca5a695 100644
+--- a/src/scripts/policy-node.lua
++++ b/src/scripts/policy-node.lua
+@@ -482,7 +482,7 @@ function findUndefinedTarget (si)
+ if default_nodes ~= nil then
+ return findDefaultlinkable (si)
+ else
+- return findBestlinkable (si)
++ return findBestLinkable (si)
+ end
+ end
+
+--
+GitLab
+
diff --git a/media-video/wireplumber/files/wireplumber-0.4.6-policy-node-schedule-a-rescan-without-timeout-if-def.patch b/media-video/wireplumber/files/wireplumber-0.4.6-policy-node-schedule-a-rescan-without-timeout-if-def.patch
new file mode 100644
index 000000000000..28b5a5ea22a4
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.6-policy-node-schedule-a-rescan-without-timeout-if-def.patch
@@ -0,0 +1,50 @@
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/afe71d7e48c28b0ae5cbd9327433e3c55c103fcb
+
+From afe71d7e48c28b0ae5cbd9327433e3c55c103fcb Mon Sep 17 00:00:00 2001
+From: Julian Bouzas <julian.bouzas@collabora.com>
+Date: Thu, 6 Jan 2022 10:53:38 -0500
+Subject: [PATCH] policy-node: schedule a rescan without timeout if defined
+ target is not found
+
+Fixes #146
+---
+ src/scripts/policy-node.lua | 17 ++++-------------
+ 1 file changed, 4 insertions(+), 13 deletions(-)
+
+diff --git a/src/scripts/policy-node.lua b/src/scripts/policy-node.lua
+index 8ca5a695..c273c1fe 100644
+--- a/src/scripts/policy-node.lua
++++ b/src/scripts/policy-node.lua
+@@ -552,25 +552,16 @@ function handleLinkable (si)
+ si_target = nil
+ end
+
+- -- wait up to 2 seconds for the requested target to become available
+- -- this is because the client may have already "seen" a target that we haven't
+- -- yet prepared, which leads to a race condition
++ -- if the client has seen a target that we haven't yet prepared, schedule
++ -- a rescan one more time and hope for the best
+ local si_id = si.id
+ if si_props["node.target"] and si_props["node.target"] ~= "-1"
+ and not si_target
+ and not si_flags[si_id].was_handled
+ and not si_flags[si_id].done_waiting then
+- if not si_flags[si_id].timeout_source then
+- si_flags[si_id].timeout_source = Core.timeout_add(2000, function()
+- if si_flags[si_id] then
+- si_flags[si_id].done_waiting = true
+- si_flags[si_id].timeout_source = nil
+- scheduleRescan()
+- end
+- return false
+- end)
+- end
+ Log.info (si, "... waiting for target")
++ si_flags[si_id].done_waiting = true
++ scheduleRescan()
+ return
+ end
+
+--
+GitLab
+
diff --git a/media-video/wireplumber/files/wireplumber-0.4.6-spa-pod-fix-different-architecture-errors-for-boolea.patch b/media-video/wireplumber/files/wireplumber-0.4.6-spa-pod-fix-different-architecture-errors-for-boolea.patch
new file mode 100644
index 000000000000..b11a2f6f70f6
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.6-spa-pod-fix-different-architecture-errors-for-boolea.patch
@@ -0,0 +1,40 @@
+https://gitlab.freedesktop.org/julian/wireplumber/-/commit/5afd176698aee835c8812eb7944ba12da53ffeab
+
+From 5afd176698aee835c8812eb7944ba12da53ffeab Mon Sep 17 00:00:00 2001
+From: Julian Bouzas <julian.bouzas@collabora.com>
+Date: Mon, 13 Dec 2021 12:01:52 -0500
+Subject: [PATCH] spa-pod: fix different architecture errors for boolean values
+
+---
+ lib/wp/spa-pod.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/lib/wp/spa-pod.c b/lib/wp/spa-pod.c
+index c1c22572..bd7b8876 100644
+--- a/lib/wp/spa-pod.c
++++ b/lib/wp/spa-pod.c
+@@ -2332,6 +2332,10 @@ wp_spa_pod_builder_add_valist (WpSpaPodBuilder *self, va_list args)
+ }
+ break;
+ }
++ case 'b':
++ spa_pod_builder_bool(&self->builder,
++ va_arg(args, gboolean) ? true : false);
++ break;
+ default:
+ SPA_POD_BUILDER_COLLECT(&self->builder, *format, args);
+ break;
+@@ -2778,6 +2782,10 @@ wp_spa_pod_parser_get_valist (WpSpaPodParser *self, va_list args)
+ }
+ break;
+ }
++ case 'b':
++ *va_arg(args, gboolean*) =
++ SPA_POD_VALUE(struct spa_pod_bool, pod) ? TRUE : FALSE;
++ break;
+ default:
+ SPA_POD_PARSER_COLLECT (pod, *format, args);
+ break;
+--
+GitLab
+
diff --git a/media-video/wireplumber/wireplumber-0.4.6.ebuild b/media-video/wireplumber/wireplumber-0.4.6-r1.ebuild
similarity index 89%
rename from media-video/wireplumber/wireplumber-0.4.6.ebuild
rename to media-video/wireplumber/wireplumber-0.4.6-r1.ebuild
index 92ffe0cec0a2..16b0e2144871 100644
--- a/media-video/wireplumber/wireplumber-0.4.6.ebuild
+++ b/media-video/wireplumber/wireplumber-0.4.6-r1.ebuild
@@ -55,7 +55,10 @@ RDEPEND="${DEPEND}"
DOCS=( {NEWS,README}.rst )
PATCHES=(
- "${FILESDIR}"/${P}-endianness-fixes.patch
+ "${FILESDIR}"/${P}-policy-node-fix-typo-when-finding-best-target.patch
+ "${FILESDIR}"/${P}-policy-node-schedule-a-rescan-without-timeout-if-def.patch
+ "${FILESDIR}"/${P}-policy-node-find-best-linkable-if-default-one-cannot.patch
+ "${FILESDIR}"/${P}-spa-pod-fix-different-architecture-errors-for-boolea.patch
)
src_configure() {
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/wireplumber/files/, media-video/wireplumber/
@ 2022-02-12 5:17 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2022-02-12 5:17 UTC (permalink / raw
To: gentoo-commits
commit: 786a2d71d3bd51fc39dc73c548b7c9d7fa45096e
Author: Niklāvs Koļesņikovs <89q1r14hd <AT> relay <DOT> firefox <DOT> com>
AuthorDate: Fri Feb 11 19:41:30 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 12 05:16:52 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=786a2d71
media-video/wireplumber: backport a fix and enable config protection
WirePlumber 0.4.8 contains a config/script change that, if not present
in the user modified files, will cause startup failure. This commit
backports an upstream fix to prevent a crash in addition to also
implementing a solution to at least keep /etc/wireplumber up to date
though the usual config_protect mechanism. This is needed because while
the particular issue has been addressed, it does not solve the general
problem with there potentially being outdated files in /etc/wireplumber
directory. The same is true for $HOME/.config/wireplumber, too, however
there's no reasonable way to help users who decide to copy config files
to there and then never update them against newer versions.
Closes: https://bugs.gentoo.org/832952
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd <AT> relay.firefox.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
...eam-do-not-crash-if-config.properties-is-.patch | 27 ++++++++++++++++++++++
...0.4.7-r1.ebuild => wireplumber-0.4.7-r2.ebuild} | 11 +++++++++
...er-0.4.8.ebuild => wireplumber-0.4.8-r1.ebuild} | 15 ++++++++++++
media-video/wireplumber/wireplumber-9999.ebuild | 11 +++++++++
4 files changed, 64 insertions(+)
diff --git a/media-video/wireplumber/files/wireplumber-0.4.8-restore-stream-do-not-crash-if-config.properties-is-.patch b/media-video/wireplumber/files/wireplumber-0.4.8-restore-stream-do-not-crash-if-config.properties-is-.patch
new file mode 100644
index 000000000000..5f4a838c36a6
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.8-restore-stream-do-not-crash-if-config.properties-is-.patch
@@ -0,0 +1,27 @@
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/5f96f69218273573e625475846269b3914cfcecf
+
+From 5f96f69218273573e625475846269b3914cfcecf Mon Sep 17 00:00:00 2001
+From: George Kiagiadakis <george.kiagiadakis@collabora.com>
+Date: Wed, 9 Feb 2022 13:35:13 +0200
+Subject: [PATCH] restore-stream: do not crash if config.properties is nil
+
+Fixes #190
+---
+ src/scripts/restore-stream.lua | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/scripts/restore-stream.lua b/src/scripts/restore-stream.lua
+index 404eede5..0c17bdd7 100644
+--- a/src/scripts/restore-stream.lua
++++ b/src/scripts/restore-stream.lua
+@@ -10,6 +10,7 @@
+
+ -- Receive script arguments from config.lua
+ local config = ... or {}
++config.properties = config.properties or {}
+ config_restore_props = config.properties["restore-props"] or false
+ config_restore_target = config.properties["restore-target"] or false
+
+--
+GitLab
+
diff --git a/media-video/wireplumber/wireplumber-0.4.7-r1.ebuild b/media-video/wireplumber/wireplumber-0.4.7-r2.ebuild
similarity index 90%
rename from media-video/wireplumber/wireplumber-0.4.7-r1.ebuild
rename to media-video/wireplumber/wireplumber-0.4.7-r2.ebuild
index 6c3ec05b1b1c..03a62724a829 100644
--- a/media-video/wireplumber/wireplumber-0.4.7-r1.ebuild
+++ b/media-video/wireplumber/wireplumber-0.4.7-r2.ebuild
@@ -82,6 +82,17 @@ src_configure() {
meson_src_configure
}
+src_install() {
+ meson_src_install
+
+ # We copy the default config, so that Gentoo tools can pick up on any
+ # updates and /etc does not end up with stale overrides.
+ # If a reflinking CoW filesystem is used (e.g. Btrfs), then the files
+ # will not actually get stored twice until modified.
+ insinto /etc
+ doins -r ${ED}/usr/share/wireplumber
+}
+
pkg_postinst() {
if systemd_is_booted ; then
ewarn "pipewire-media-session.service is no longer installed. You must switch"
diff --git a/media-video/wireplumber/wireplumber-0.4.8.ebuild b/media-video/wireplumber/wireplumber-0.4.8-r1.ebuild
similarity index 87%
rename from media-video/wireplumber/wireplumber-0.4.8.ebuild
rename to media-video/wireplumber/wireplumber-0.4.8-r1.ebuild
index e270841b0638..6348d11b2485 100644
--- a/media-video/wireplumber/wireplumber-0.4.8.ebuild
+++ b/media-video/wireplumber/wireplumber-0.4.8-r1.ebuild
@@ -60,6 +60,10 @@ RDEPEND="${DEPEND}
DOCS=( {NEWS,README}.rst )
+PATCHES=(
+ "${FILESDIR}"/${P}-restore-stream-do-not-crash-if-config.properties-is-.patch
+)
+
src_configure() {
local emesonargs=(
-Ddoc=disabled # Ebuild not wired up yet (Sphinx, Doxygen?)
@@ -78,6 +82,17 @@ src_configure() {
meson_src_configure
}
+src_install() {
+ meson_src_install
+
+ # We copy the default config, so that Gentoo tools can pick up on any
+ # updates and /etc does not end up with stale overrides.
+ # If a reflinking CoW filesystem is used (e.g. Btrfs), then the files
+ # will not actually get stored twice until modified.
+ insinto /etc
+ doins -r ${ED}/usr/share/wireplumber
+}
+
pkg_postinst() {
if systemd_is_booted ; then
ewarn "pipewire-media-session.service is no longer installed. You must switch"
diff --git a/media-video/wireplumber/wireplumber-9999.ebuild b/media-video/wireplumber/wireplumber-9999.ebuild
index e270841b0638..2e425ab4a17e 100644
--- a/media-video/wireplumber/wireplumber-9999.ebuild
+++ b/media-video/wireplumber/wireplumber-9999.ebuild
@@ -78,6 +78,17 @@ src_configure() {
meson_src_configure
}
+src_install() {
+ meson_src_install
+
+ # We copy the default config, so that Gentoo tools can pick up on any
+ # updates and /etc does not end up with stale overrides.
+ # If a reflinking CoW filesystem is used (e.g. Btrfs), then the files
+ # will not actually get stored twice until modified.
+ insinto /etc
+ doins -r ${ED}/usr/share/wireplumber
+}
+
pkg_postinst() {
if systemd_is_booted ; then
ewarn "pipewire-media-session.service is no longer installed. You must switch"
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/wireplumber/files/, media-video/wireplumber/
@ 2022-02-14 20:08 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2022-02-14 20:08 UTC (permalink / raw
To: gentoo-commits
commit: 570b62814fc7fb91ee5755647499353ff5653eef
Author: Niklāvs Koļesņikovs <89q1r14hd <AT> relay <DOT> firefox <DOT> com>
AuthorDate: Mon Feb 14 09:07:31 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb 14 20:08:01 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=570b6281
media-video/wireplumber: fixes a possible 0.4.8 crash on tty switch
This commit backports one upstream patch to fix a crash inside Bluetooth
module when the user switches to tty.
Additionally it adds another backport that changes the internal API to
fix support for some unknown architectures (perhaps embedded?). It does
not appear that the API change would leak to outside of WP itself.
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd <AT> relay.firefox.com>
Closes: https://github.com/gentoo/gentoo/pull/24188
Signed-off-by: Sam James <sam <AT> gentoo.org>
...tooth-fix-string.find-crash-with-nil-stri.patch | 28 +++
...x-va-list-APIs-for-different-architecture.patch | 214 +++++++++++++++++++++
.../wireplumber/wireplumber-0.4.8-r2.ebuild | 122 ++++++++++++
3 files changed, 364 insertions(+)
diff --git a/media-video/wireplumber/files/wireplumber-0.4.8-policy-bluetooth-fix-string.find-crash-with-nil-stri.patch b/media-video/wireplumber/files/wireplumber-0.4.8-policy-bluetooth-fix-string.find-crash-with-nil-stri.patch
new file mode 100644
index 000000000000..364f8df195cf
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.8-policy-bluetooth-fix-string.find-crash-with-nil-stri.patch
@@ -0,0 +1,28 @@
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/c4c5ca8e2215e5fc295b39af4504c43ed3fe176f
+
+From c4c5ca8e2215e5fc295b39af4504c43ed3fe176f Mon Sep 17 00:00:00 2001
+From: George Kiagiadakis <george.kiagiadakis@collabora.com>
+Date: Mon, 14 Feb 2022 10:38:51 +0200
+Subject: [PATCH] policy-bluetooth: fix string.find crash with nil string
+
+Fixes #193
+---
+ src/scripts/policy-bluetooth.lua | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/scripts/policy-bluetooth.lua b/src/scripts/policy-bluetooth.lua
+index 24fbffbb..f8f69a14 100644
+--- a/src/scripts/policy-bluetooth.lua
++++ b/src/scripts/policy-bluetooth.lua
+@@ -118,7 +118,7 @@ local function isSwitched(device)
+ end
+
+ local function isBluez5AudioSink(sink_name)
+- if string.find(sink_name, "bluez_output.") ~= nil then
++ if sink_name and string.find(sink_name, "bluez_output.") ~= nil then
+ return true
+ end
+ return false
+--
+GitLab
+
diff --git a/media-video/wireplumber/files/wireplumber-0.4.8-spa-json-fix-va-list-APIs-for-different-architecture.patch b/media-video/wireplumber/files/wireplumber-0.4.8-spa-json-fix-va-list-APIs-for-different-architecture.patch
new file mode 100644
index 000000000000..b77cfa3c3c6f
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.8-spa-json-fix-va-list-APIs-for-different-architecture.patch
@@ -0,0 +1,214 @@
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/e429db7e8c266045aee25e153fb2308bd61fe233
+
+From e429db7e8c266045aee25e153fb2308bd61fe233 Mon Sep 17 00:00:00 2001
+From: Julian Bouzas <julian.bouzas@collabora.com>
+Date: Wed, 9 Feb 2022 07:59:59 -0500
+Subject: [PATCH] spa-json: fix va_list APIs for different architectures
+
+The va_list type might not always be a pointer in some architectures, so we
+cannot guarantee it will be modified after using it for a second time in another
+function. This fixes the issue by using macros so args does not get copied, and
+always gets modified when using it more than once.
+---
+ lib/wp/spa-json.c | 156 ++++++++++++++++++++++++----------------------
+ 1 file changed, 80 insertions(+), 76 deletions(-)
+
+diff --git a/lib/wp/spa-json.c b/lib/wp/spa-json.c
+index f14f395d..c5e59a3e 100644
+--- a/lib/wp/spa-json.c
++++ b/lib/wp/spa-json.c
+@@ -363,33 +363,33 @@ wp_spa_json_new_string (const gchar *value)
+ wp_spa_json_builder_new_formatted ("\"%s\"", value));
+ }
+
+-static void
+-wp_spa_json_builder_add_value (WpSpaJsonBuilder *self, const gchar *fmt,
+- va_list args)
+-{
+- switch (*fmt) {
+- case 'n':
+- wp_spa_json_builder_add_null (self);
+- break;
+- case 'b':
+- wp_spa_json_builder_add_boolean (self, va_arg(args, gboolean));
+- break;
+- case 'i':
+- wp_spa_json_builder_add_int (self, va_arg(args, gint));
+- break;
+- case 'f':
+- wp_spa_json_builder_add_float (self, (float)va_arg(args, double));
+- break;
+- case 's':
+- wp_spa_json_builder_add_string (self, va_arg(args, const gchar *));
+- break;
+- case 'J':
+- wp_spa_json_builder_add_json (self, va_arg(args, WpSpaJson *));
+- break;
+- default:
+- return;
+- }
+-}
++/* Args is not a pointer in some architectures, so this needs to be a macro to
++ * avoid args being copied */
++#define wp_spa_json_builder_add_value(self,fmt,args) \
++do { \
++ switch (*fmt) { \
++ case 'n': \
++ wp_spa_json_builder_add_null (self); \
++ break; \
++ case 'b': \
++ wp_spa_json_builder_add_boolean (self, va_arg(args, gboolean)); \
++ break; \
++ case 'i': \
++ wp_spa_json_builder_add_int (self, va_arg(args, gint)); \
++ break; \
++ case 'f': \
++ wp_spa_json_builder_add_float (self, (float)va_arg(args, double)); \
++ break; \
++ case 's': \
++ wp_spa_json_builder_add_string (self, va_arg(args, const gchar *)); \
++ break; \
++ case 'J': \
++ wp_spa_json_builder_add_json (self, va_arg(args, WpSpaJson *)); \
++ break; \
++ default: \
++ break; \
++ } \
++} while(false)
+
+ /*!
+ * \brief Creates a spa json of type array
+@@ -724,48 +724,46 @@ wp_spa_json_parse_object_valist (WpSpaJson *self, va_list args)
+ return res;
+ }
+
+-static gboolean
+-wp_spa_json_parse_value (const gchar *data, int len, const gchar *fmt,
+- va_list args)
+-{
+- switch (*fmt) {
+- case 'n':
+- if (!spa_json_is_null (data, len))
+- return FALSE;
+- break;
+- case 'b':
+- if (!wp_spa_json_parse_boolean_internal (data, len,
+- va_arg(args, gboolean *)))
+- return FALSE;
+- break;
+- case 'i':
+- if (spa_json_parse_int (data, len, va_arg(args, gint *)) < 0)
+- return FALSE;
+- break;
+- case 'f':
+- if (spa_json_parse_float (data, len,
+- (float *)va_arg(args, double *)) < 0)
+- return FALSE;
+- break;
+- case 's': {
+- gchar *str = wp_spa_json_parse_string_internal (data, len);
+- if (!str)
+- return FALSE;
+- *va_arg(args, gchar **) = str;
+- break;
+- }
+- case 'J': {
+- WpSpaJson *j = wp_spa_json_new (data, len);
+- if (!j)
+- return FALSE;
+- *va_arg(args, WpSpaJson **) = j;
+- break;
+- }
+- default:
+- return FALSE;
+- }
+- return TRUE;
+-}
++/* Args is not a pointer in some architectures, so this needs to be a macro to
++ * avoid args being copied */
++#define wp_spa_json_parse_value(data,len,fmt,args) \
++do { \
++ switch (*fmt) { \
++ case 'n': \
++ if (!spa_json_is_null (data, len)) \
++ return FALSE; \
++ break; \
++ case 'b': \
++ if (!wp_spa_json_parse_boolean_internal (data, len, \
++ va_arg(args, gboolean *))) \
++ return FALSE; \
++ break; \
++ case 'i': \
++ if (spa_json_parse_int (data, len, va_arg(args, gint *)) < 0) \
++ return FALSE; \
++ break; \
++ case 'f': \
++ if (spa_json_parse_float (data, len, va_arg(args, float *)) < 0) \
++ return FALSE; \
++ break; \
++ case 's': { \
++ gchar *str = wp_spa_json_parse_string_internal (data, len); \
++ if (!str) \
++ return FALSE; \
++ *va_arg(args, gchar **) = str; \
++ break; \
++ } \
++ case 'J': { \
++ WpSpaJson *j = wp_spa_json_new (data, len); \
++ if (!j) \
++ return FALSE; \
++ *va_arg(args, WpSpaJson **) = j; \
++ break; \
++ } \
++ default: \
++ return FALSE; \
++ } \
++} while(false)
+
+ /*!
+ * \brief Parses the object property values of a spa json object
+@@ -827,8 +825,7 @@ wp_spa_json_object_get_valist (WpSpaJson *self, va_list args)
+ value = g_value_get_boxed (&item);
+
+ if (g_strcmp0 (key_str, lookup_key) == 0) {
+- if (!wp_spa_json_parse_value (value->data, value->size, lookup_fmt, args))
+- return FALSE;
++ wp_spa_json_parse_value (value->data, value->size, lookup_fmt, args);
+ lookup_key = va_arg(args, const gchar *);
+ if (!lookup_key)
+ return TRUE;
+@@ -1366,9 +1363,12 @@ gboolean
+ wp_spa_json_parser_get_value (WpSpaJsonParser *self, const gchar *fmt,
+ va_list args)
+ {
+- return wp_spa_json_parser_advance (self) &&
+- wp_spa_json_parse_value (self->curr.cur,
+- self->curr.end - self->curr.cur, fmt, args);
++ if (wp_spa_json_parser_advance (self)) {
++ wp_spa_json_parse_value (self->curr.cur, self->curr.end - self->curr.cur,
++ fmt, args);
++ return TRUE;
++ }
++ return FALSE;
+ }
+
+ /*!
+@@ -1419,9 +1419,13 @@ wp_spa_json_parser_get_valist (WpSpaJsonParser *self, va_list args)
+ if (!format)
+ return TRUE;
+
+- /* parse value */
+- if (!wp_spa_json_parser_get_value (self, format, args))
++ /* advance */
++ if (!wp_spa_json_parser_advance (self))
+ return FALSE;
++
++ /* parse value */
++ wp_spa_json_parse_value (self->curr.cur, self->curr.end - self->curr.cur,
++ format, args);
+ } while (TRUE);
+
+ return FALSE;
+--
+GitLab
+
diff --git a/media-video/wireplumber/wireplumber-0.4.8-r2.ebuild b/media-video/wireplumber/wireplumber-0.4.8-r2.ebuild
new file mode 100644
index 000000000000..5e77689f2572
--- /dev/null
+++ b/media-video/wireplumber/wireplumber-0.4.8-r2.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{3,4} )
+
+inherit lua-single meson systemd
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://gitlab.freedesktop.org/pipewire/${PN}.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+else
+ SRC_URI="https://gitlab.freedesktop.org/pipewire/${PN}/-/archive/${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+DESCRIPTION="Replacement for pipewire-media-session"
+HOMEPAGE="https://gitlab.freedesktop.org/pipewire/wireplumber"
+
+LICENSE="MIT"
+SLOT="0/0.4"
+IUSE="elogind system-service systemd test"
+
+REQUIRED_USE="
+ ${LUA_REQUIRED_USE}
+ ?? ( elogind systemd )
+ system-service? ( systemd )
+"
+
+RESTRICT="!test? ( test )"
+
+# introspection? ( dev-libs/gobject-introspection ) is valid but likely only used for doc building
+BDEPEND="
+ dev-libs/glib
+ dev-util/gdbus-codegen
+ dev-util/glib-utils
+"
+
+DEPEND="
+ ${LUA_DEPS}
+ >=dev-libs/glib-2.62
+ >=media-video/pipewire-0.3.45:=
+ virtual/libc
+ elogind? ( sys-auth/elogind )
+ systemd? ( sys-apps/systemd )
+"
+
+# Any dev-lua/* deps get declared like this inside RDEPEND:
+# $(lua_gen_cond_dep '
+# dev-lua/<NAME>[${LUA_USEDEP}]
+# ')
+RDEPEND="${DEPEND}
+ system-service? (
+ acct-user/pipewire
+ acct-group/pipewire
+ )
+"
+
+DOCS=( {NEWS,README}.rst )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-restore-stream-do-not-crash-if-config.properties-is-.patch
+ "${FILESDIR}"/${P}-spa-json-fix-va-list-APIs-for-different-architecture.patch
+ "${FILESDIR}"/${P}-policy-bluetooth-fix-string.find-crash-with-nil-stri.patch
+)
+
+src_configure() {
+ local emesonargs=(
+ -Ddoc=disabled # Ebuild not wired up yet (Sphinx, Doxygen?)
+ -Dintrospection=disabled # Only used for Sphinx doc generation
+ -Dsystem-lua=true # We always unbundle everything we can
+ -Dsystem-lua-version=$(ver_cut 1-2 $(lua_get_version))
+ $(meson_feature elogind)
+ $(meson_feature systemd)
+ $(meson_use system-service systemd-system-service)
+ $(meson_use systemd systemd-user-service)
+ -Dsystemd-system-unit-dir=$(systemd_get_systemunitdir)
+ -Dsystemd-user-unit-dir=$(systemd_get_userunitdir)
+ $(meson_use test tests)
+ )
+
+ meson_src_configure
+}
+
+src_install() {
+ meson_src_install
+
+ # We copy the default config, so that Gentoo tools can pick up on any
+ # updates and /etc does not end up with stale overrides.
+ # If a reflinking CoW filesystem is used (e.g. Btrfs), then the files
+ # will not actually get stored twice until modified.
+ insinto /etc
+ doins -r ${ED}/usr/share/wireplumber
+}
+
+pkg_postinst() {
+ if systemd_is_booted ; then
+ ewarn "pipewire-media-session.service is no longer installed. You must switch"
+ ewarn "to wireplumber.service user unit before your next logout/reboot:"
+ ewarn "systemctl --user disable pipewire-media-session.service"
+ ewarn "systemctl --user --force enable wireplumber.service"
+ else
+ ewarn "Switch to WirePlumber will happen the next time gentoo-pipewire-launcher"
+ ewarn "is started (a replacement for directly calling pipewire binary)."
+ ewarn
+ ewarn "Please ensure that ${EROOT}/etc/pipewire/pipewire.conf either does not exist"
+ ewarn "or, if it does exist, that any reference to"
+ ewarn "${EROOT}/usr/bin/pipewire-media-session is commented out (begins with a #)."
+ fi
+ if use system-service; then
+ ewarn
+ ewarn "WARNING: you have enabled the system-service USE flag, which installs"
+ ewarn "the system-wide systemd units that enable WirePlumber to run as a system"
+ ewarn "service. This is more than likely NOT what you want. You are strongly"
+ ewarn "advised not to enable this mode and instead stick with systemd user"
+ ewarn "units. The default configuration files will likely not work out of"
+ ewarn "box, and you are on your own with configuration."
+ ewarn
+ fi
+}
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/wireplumber/files/, media-video/wireplumber/
@ 2022-04-21 21:57 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2022-04-21 21:57 UTC (permalink / raw
To: gentoo-commits
commit: dbd15d4f2887fa9bd30a88ae68e77d23f0835928
Author: Niklāvs Koļesņikovs <89q1r14hd <AT> relay <DOT> firefox <DOT> com>
AuthorDate: Thu Apr 21 18:02:38 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr 21 21:57:00 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbd15d4f
media-video/wireplumber: backport two minor fixes
The first fix deals with handling of device removal and is included for
correctness sake, since it appears to be the right thing for WirePlumber
to do.
The second fix implements and documents D-Bus disabling for
WirePlumber which must be done when attempting to run WirePlumber as
a system service. This does not mean it's a recommended or even fully
supported configuration but there's people who want it. And having it
available should not cause any harm to other users.
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd <AT> relay.firefox.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
...ment-which-options-need-to-be-turned-off-.patch | 87 +++++++++++++++
...icy-device-profile-clear-tables-when-devi.patch | 33 ++++++
.../wireplumber/wireplumber-0.4.9-r1.ebuild | 121 +++++++++++++++++++++
3 files changed, 241 insertions(+)
diff --git a/media-video/wireplumber/files/wireplumber-0.4.9-config-document-which-options-need-to-be-turned-off-.patch b/media-video/wireplumber/files/wireplumber-0.4.9-config-document-which-options-need-to-be-turned-off-.patch
new file mode 100644
index 000000000000..9e664ec56564
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.9-config-document-which-options-need-to-be-turned-off-.patch
@@ -0,0 +1,87 @@
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/0da29f38181e391160fa8702623050b8544ec775
+
+From 0da29f38181e391160fa8702623050b8544ec775 Mon Sep 17 00:00:00 2001
+From: George Kiagiadakis <george.kiagiadakis@collabora.com>
+Date: Mon, 4 Apr 2022 14:38:28 +0300
+Subject: [PATCH] config: document which options need to be turned off to use
+ wp without D-Bus
+
+and actually implement an option for the logind module
+
+Related to: #237
+---
+ src/config/bluetooth.lua.d/30-bluez-monitor.lua | 4 +++-
+ src/config/bluetooth.lua.d/50-bluez-config.lua | 8 ++++++++
+ src/config/main.lua.d/50-alsa-config.lua | 4 +++-
+ src/config/main.lua.d/50-default-access-config.lua | 3 +++
+ 4 files changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/src/config/bluetooth.lua.d/30-bluez-monitor.lua b/src/config/bluetooth.lua.d/30-bluez-monitor.lua
+index 266d3e2f..ba86657f 100644
+--- a/src/config/bluetooth.lua.d/30-bluez-monitor.lua
++++ b/src/config/bluetooth.lua.d/30-bluez-monitor.lua
+@@ -8,5 +8,7 @@ function bluez_monitor.enable()
+ rules = bluez_monitor.rules,
+ })
+
+- load_optional_module("logind")
++ if bluez_monitor.properties["with-logind"] then
++ load_optional_module("logind")
++ end
+ end
+diff --git a/src/config/bluetooth.lua.d/50-bluez-config.lua b/src/config/bluetooth.lua.d/50-bluez-config.lua
+index 072504ec..dd8033ff 100644
+--- a/src/config/bluetooth.lua.d/50-bluez-config.lua
++++ b/src/config/bluetooth.lua.d/50-bluez-config.lua
+@@ -34,6 +34,14 @@ bluez_monitor.properties = {
+ -- Register dummy AVRCP player, required for AVRCP volume function.
+ -- Disable if you are running mpris-proxy or equivalent.
+ --["bluez5.dummy-avrcp-player"] = true,
++
++ -- Enable the logind module, which arbitrates which user will be allowed
++ -- to have bluetooth audio enabled at any given time (particularly useful
++ -- if you are using GDM as a display manager, as the gdm user also launches
++ -- pipewire and wireplumber).
++ -- This requires access to the D-Bus user session; disable if you are running
++ -- a system-wide instance of wireplumber.
++ ["with-logind"] = true,
+ }
+
+ bluez_monitor.rules = {
+diff --git a/src/config/main.lua.d/50-alsa-config.lua b/src/config/main.lua.d/50-alsa-config.lua
+index 6c97e8ad..d29b0b6f 100644
+--- a/src/config/main.lua.d/50-alsa-config.lua
++++ b/src/config/main.lua.d/50-alsa-config.lua
+@@ -7,6 +7,8 @@ alsa_monitor.properties = {
+ --["alsa.jack-device"] = false,
+
+ -- Reserve devices via org.freedesktop.ReserveDevice1 on D-Bus
++ -- Disable if you are running a system-wide instance, which
++ -- doesn't have access to the D-Bus user session
+ ["alsa.reserve"] = true,
+ --["alsa.reserve.priority"] = -20,
+ --["alsa.reserve.application-name"] = "WirePlumber",
+@@ -20,7 +22,7 @@ alsa_monitor.properties = {
+
+ alsa_monitor.rules = {
+ -- An array of matches/actions to evaluate.
+- --
++ --
+ -- If you want to disable some devices or nodes, you can apply properties per device as the following example.
+ -- The name can be found by running pw-cli ls Device, or pw-cli dump Device
+ --{
+diff --git a/src/config/main.lua.d/50-default-access-config.lua b/src/config/main.lua.d/50-default-access-config.lua
+index 6cf18bed..45cc5b73 100644
+--- a/src/config/main.lua.d/50-default-access-config.lua
++++ b/src/config/main.lua.d/50-default-access-config.lua
+@@ -1,4 +1,7 @@
+ default_access.properties = {
++ -- Enable the use of the flatpak portal integration.
++ -- Disable if you are running a system-wide instance, which
++ -- doesn't have access to the D-Bus user session
+ ["enable-flatpak-portal"] = true,
+ }
+
+--
+GitLab
+
diff --git a/media-video/wireplumber/files/wireplumber-0.4.9-scripts-policy-device-profile-clear-tables-when-devi.patch b/media-video/wireplumber/files/wireplumber-0.4.9-scripts-policy-device-profile-clear-tables-when-devi.patch
new file mode 100644
index 000000000000..4dc8e276fbfa
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.9-scripts-policy-device-profile-clear-tables-when-devi.patch
@@ -0,0 +1,33 @@
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/da5d25acbea5ae03336bd2b4ef2b0687b380978e
+
+From da5d25acbea5ae03336bd2b4ef2b0687b380978e 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
+
diff --git a/media-video/wireplumber/wireplumber-0.4.9-r1.ebuild b/media-video/wireplumber/wireplumber-0.4.9-r1.ebuild
new file mode 100644
index 000000000000..f269c7faf59c
--- /dev/null
+++ b/media-video/wireplumber/wireplumber-0.4.9-r1.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{3,4} )
+
+inherit lua-single meson systemd
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://gitlab.freedesktop.org/pipewire/${PN}.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+else
+ SRC_URI="https://gitlab.freedesktop.org/pipewire/${PN}/-/archive/${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+DESCRIPTION="Replacement for pipewire-media-session"
+HOMEPAGE="https://gitlab.freedesktop.org/pipewire/wireplumber"
+
+LICENSE="MIT"
+SLOT="0/0.4"
+IUSE="elogind system-service systemd test"
+
+REQUIRED_USE="
+ ${LUA_REQUIRED_USE}
+ ?? ( elogind systemd )
+ system-service? ( systemd )
+"
+
+RESTRICT="!test? ( test )"
+
+# introspection? ( dev-libs/gobject-introspection ) is valid but likely only used for doc building
+BDEPEND="
+ dev-libs/glib
+ dev-util/gdbus-codegen
+ dev-util/glib-utils
+"
+
+DEPEND="
+ ${LUA_DEPS}
+ >=dev-libs/glib-2.62
+ >=media-video/pipewire-0.3.48:=
+ virtual/libc
+ elogind? ( sys-auth/elogind )
+ systemd? ( sys-apps/systemd )
+"
+
+# Any dev-lua/* deps get declared like this inside RDEPEND:
+# $(lua_gen_cond_dep '
+# dev-lua/<NAME>[${LUA_USEDEP}]
+# ')
+RDEPEND="${DEPEND}
+ system-service? (
+ acct-user/pipewire
+ acct-group/pipewire
+ )
+"
+
+DOCS=( {NEWS,README}.rst )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-scripts-policy-device-profile-clear-tables-when-devi.patch
+ "${FILESDIR}"/${P}-config-document-which-options-need-to-be-turned-off-.patch
+)
+
+src_configure() {
+ local emesonargs=(
+ -Ddoc=disabled # Ebuild not wired up yet (Sphinx, Doxygen?)
+ -Dintrospection=disabled # Only used for Sphinx doc generation
+ -Dsystem-lua=true # We always unbundle everything we can
+ -Dsystem-lua-version=$(ver_cut 1-2 $(lua_get_version))
+ $(meson_feature elogind)
+ $(meson_feature systemd)
+ $(meson_use system-service systemd-system-service)
+ $(meson_use systemd systemd-user-service)
+ -Dsystemd-system-unit-dir=$(systemd_get_systemunitdir)
+ -Dsystemd-user-unit-dir=$(systemd_get_userunitdir)
+ $(meson_use test tests)
+ )
+
+ meson_src_configure
+}
+
+src_install() {
+ meson_src_install
+
+ # We copy the default config, so that Gentoo tools can pick up on any
+ # updates and /etc does not end up with stale overrides.
+ # If a reflinking CoW filesystem is used (e.g. Btrfs), then the files
+ # will not actually get stored twice until modified.
+ insinto /etc
+ doins -r ${ED}/usr/share/wireplumber
+}
+
+pkg_postinst() {
+ if systemd_is_booted ; then
+ ewarn "pipewire-media-session.service is no longer installed. You must switch"
+ ewarn "to wireplumber.service user unit before your next logout/reboot:"
+ ewarn "systemctl --user disable pipewire-media-session.service"
+ ewarn "systemctl --user --force enable wireplumber.service"
+ else
+ ewarn "Switch to WirePlumber will happen the next time gentoo-pipewire-launcher"
+ ewarn "is started (a replacement for directly calling pipewire binary)."
+ ewarn
+ ewarn "Please ensure that ${EROOT}/etc/pipewire/pipewire.conf either does not exist"
+ ewarn "or, if it does exist, that any reference to"
+ ewarn "${EROOT}/usr/bin/pipewire-media-session is commented out (begins with a #)."
+ fi
+ if use system-service; then
+ ewarn
+ ewarn "WARNING: you have enabled the system-service USE flag, which installs"
+ ewarn "the system-wide systemd units that enable WirePlumber to run as a system"
+ ewarn "service. This is more than likely NOT what you want. You are strongly"
+ ewarn "advised not to enable this mode and instead stick with systemd user"
+ ewarn "units. The default configuration files will likely not work out of"
+ ewarn "box, and you are on your own with configuration."
+ ewarn
+ fi
+}
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/wireplumber/files/, media-video/wireplumber/
@ 2022-04-21 21:57 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2022-04-21 21:57 UTC (permalink / raw
To: gentoo-commits
commit: 0479ba8351119cc528869546d64d7439d3bc90f2
Author: Niklāvs Koļesņikovs <89q1r14hd <AT> relay <DOT> firefox <DOT> com>
AuthorDate: Thu Apr 21 18:11:50 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr 21 21:57:01 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0479ba83
media-video/wireplumber: clean up 0.4.8-r3
It so happened that WirePlumber 0.4.9 ended up being stabilized, and
it's hard to imagine what we'd still need 0.4.8 for. Therefore let's
clean it up now.
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd <AT> relay.firefox.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-video/wireplumber/Manifest | 1 -
...tooth-fix-string.find-crash-with-nil-stri.patch | 28 ---
...eam-do-not-crash-if-config.properties-is-.patch | 27 ---
...4.8-si-audio-adapter-relax-format-parsing.patch | 44 -----
...x-va-list-APIs-for-different-architecture.patch | 214 ---------------------
.../wireplumber/wireplumber-0.4.8-r3.ebuild | 123 ------------
6 files changed, 437 deletions(-)
diff --git a/media-video/wireplumber/Manifest b/media-video/wireplumber/Manifest
index 3c57ec31c440..0a2dee8196dd 100644
--- a/media-video/wireplumber/Manifest
+++ b/media-video/wireplumber/Manifest
@@ -1,2 +1 @@
-DIST wireplumber-0.4.8.tar.gz 374824 BLAKE2B 7b5c8492d58be8b40c4c98bc807d031c453904a7df51c9b0d96c353c93018ba8cbd699b2c3c885defe7b5360df4256ad5e175015dc0102e5007853f6e0132cb7 SHA512 cb96b1d55be7e9d1433fc4a4fb4accce63f5f318a9a2b5cffc51a9f052765df777a0ba4ac73579771084295a73e6f05ed3a16a5fb9d0f5da4e183cfd74483c2c
DIST wireplumber-0.4.9.tar.gz 376170 BLAKE2B 50f552c730ac543fc2e8b0e054c861bcd22ed281a62f2921fb956f39b917cce6eb53287dfcfc81db240476f82f5cf1d7556fa34be8bf507ff847089536b81f44 SHA512 39b9e9be014489042fe480219b99d7591e0b68dd44b889bd5c6aeee73e771adb807bc21f48d031217f097182827bd2f48b68d52291036d52e95d4fa75e7f9929
diff --git a/media-video/wireplumber/files/wireplumber-0.4.8-policy-bluetooth-fix-string.find-crash-with-nil-stri.patch b/media-video/wireplumber/files/wireplumber-0.4.8-policy-bluetooth-fix-string.find-crash-with-nil-stri.patch
deleted file mode 100644
index 364f8df195cf..000000000000
--- a/media-video/wireplumber/files/wireplumber-0.4.8-policy-bluetooth-fix-string.find-crash-with-nil-stri.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/c4c5ca8e2215e5fc295b39af4504c43ed3fe176f
-
-From c4c5ca8e2215e5fc295b39af4504c43ed3fe176f Mon Sep 17 00:00:00 2001
-From: George Kiagiadakis <george.kiagiadakis@collabora.com>
-Date: Mon, 14 Feb 2022 10:38:51 +0200
-Subject: [PATCH] policy-bluetooth: fix string.find crash with nil string
-
-Fixes #193
----
- src/scripts/policy-bluetooth.lua | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/scripts/policy-bluetooth.lua b/src/scripts/policy-bluetooth.lua
-index 24fbffbb..f8f69a14 100644
---- a/src/scripts/policy-bluetooth.lua
-+++ b/src/scripts/policy-bluetooth.lua
-@@ -118,7 +118,7 @@ local function isSwitched(device)
- end
-
- local function isBluez5AudioSink(sink_name)
-- if string.find(sink_name, "bluez_output.") ~= nil then
-+ if sink_name and string.find(sink_name, "bluez_output.") ~= nil then
- return true
- end
- return false
---
-GitLab
-
diff --git a/media-video/wireplumber/files/wireplumber-0.4.8-restore-stream-do-not-crash-if-config.properties-is-.patch b/media-video/wireplumber/files/wireplumber-0.4.8-restore-stream-do-not-crash-if-config.properties-is-.patch
deleted file mode 100644
index 5f4a838c36a6..000000000000
--- a/media-video/wireplumber/files/wireplumber-0.4.8-restore-stream-do-not-crash-if-config.properties-is-.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/5f96f69218273573e625475846269b3914cfcecf
-
-From 5f96f69218273573e625475846269b3914cfcecf Mon Sep 17 00:00:00 2001
-From: George Kiagiadakis <george.kiagiadakis@collabora.com>
-Date: Wed, 9 Feb 2022 13:35:13 +0200
-Subject: [PATCH] restore-stream: do not crash if config.properties is nil
-
-Fixes #190
----
- src/scripts/restore-stream.lua | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/scripts/restore-stream.lua b/src/scripts/restore-stream.lua
-index 404eede5..0c17bdd7 100644
---- a/src/scripts/restore-stream.lua
-+++ b/src/scripts/restore-stream.lua
-@@ -10,6 +10,7 @@
-
- -- Receive script arguments from config.lua
- local config = ... or {}
-+config.properties = config.properties or {}
- config_restore_props = config.properties["restore-props"] or false
- config_restore_target = config.properties["restore-target"] or false
-
---
-GitLab
-
diff --git a/media-video/wireplumber/files/wireplumber-0.4.8-si-audio-adapter-relax-format-parsing.patch b/media-video/wireplumber/files/wireplumber-0.4.8-si-audio-adapter-relax-format-parsing.patch
deleted file mode 100644
index 93225b02d88b..000000000000
--- a/media-video/wireplumber/files/wireplumber-0.4.8-si-audio-adapter-relax-format-parsing.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/afbc0ce57aac7aee8dc1651de4620f15c73dbace
-
-From afbc0ce57aac7aee8dc1651de4620f15c73dbace Mon Sep 17 00:00:00 2001
-From: Wim Taymans <wtaymans@redhat.com>
-Date: Mon, 21 Feb 2022 15:21:36 +0100
-Subject: [PATCH] si-audio-adapter: relax format parsing
-
-Some nodes can omit the format/rate/channels to indicate that they can
-deal with all possibilities and adapt to what they are linked to.
-
-See pipewire#876
----
- modules/module-si-audio-adapter.c | 11 ++---------
- 1 file changed, 2 insertions(+), 9 deletions(-)
-
-diff --git a/modules/module-si-audio-adapter.c b/modules/module-si-audio-adapter.c
-index f1f6218..84e393f 100644
---- a/modules/module-si-audio-adapter.c
-+++ b/modules/module-si-audio-adapter.c
-@@ -158,19 +158,12 @@ si_audio_adapter_find_format (WpSiAudioAdapter * self, WpNode * node)
- struct spa_pod *position = NULL;
- wp_spa_pod_fixate (pod);
-
-- /* defaults */
- spa_zero(raw_format);
-- raw_format.format = SPA_AUDIO_FORMAT_F32;
-- raw_format.rate = si_audio_adapter_get_default_clock_rate (self);
-- raw_format.channels = 2;
-- raw_format.position[0] = SPA_AUDIO_CHANNEL_FL;
-- raw_format.position[1] = SPA_AUDIO_CHANNEL_FR;
--
- if (spa_pod_parse_object(wp_spa_pod_get_spa_pod (pod),
- SPA_TYPE_OBJECT_Format, NULL,
-- SPA_FORMAT_AUDIO_format, SPA_POD_Id(&raw_format.format),
-+ SPA_FORMAT_AUDIO_format, SPA_POD_OPT_Id(&raw_format.format),
- SPA_FORMAT_AUDIO_rate, SPA_POD_OPT_Int(&raw_format.rate),
-- SPA_FORMAT_AUDIO_channels, SPA_POD_Int(&raw_format.channels),
-+ SPA_FORMAT_AUDIO_channels, SPA_POD_OPT_Int(&raw_format.channels),
- SPA_FORMAT_AUDIO_position, SPA_POD_OPT_Pod(&position)) < 0)
- continue;
-
---
-2.35.1
-
diff --git a/media-video/wireplumber/files/wireplumber-0.4.8-spa-json-fix-va-list-APIs-for-different-architecture.patch b/media-video/wireplumber/files/wireplumber-0.4.8-spa-json-fix-va-list-APIs-for-different-architecture.patch
deleted file mode 100644
index b77cfa3c3c6f..000000000000
--- a/media-video/wireplumber/files/wireplumber-0.4.8-spa-json-fix-va-list-APIs-for-different-architecture.patch
+++ /dev/null
@@ -1,214 +0,0 @@
-https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/e429db7e8c266045aee25e153fb2308bd61fe233
-
-From e429db7e8c266045aee25e153fb2308bd61fe233 Mon Sep 17 00:00:00 2001
-From: Julian Bouzas <julian.bouzas@collabora.com>
-Date: Wed, 9 Feb 2022 07:59:59 -0500
-Subject: [PATCH] spa-json: fix va_list APIs for different architectures
-
-The va_list type might not always be a pointer in some architectures, so we
-cannot guarantee it will be modified after using it for a second time in another
-function. This fixes the issue by using macros so args does not get copied, and
-always gets modified when using it more than once.
----
- lib/wp/spa-json.c | 156 ++++++++++++++++++++++++----------------------
- 1 file changed, 80 insertions(+), 76 deletions(-)
-
-diff --git a/lib/wp/spa-json.c b/lib/wp/spa-json.c
-index f14f395d..c5e59a3e 100644
---- a/lib/wp/spa-json.c
-+++ b/lib/wp/spa-json.c
-@@ -363,33 +363,33 @@ wp_spa_json_new_string (const gchar *value)
- wp_spa_json_builder_new_formatted ("\"%s\"", value));
- }
-
--static void
--wp_spa_json_builder_add_value (WpSpaJsonBuilder *self, const gchar *fmt,
-- va_list args)
--{
-- switch (*fmt) {
-- case 'n':
-- wp_spa_json_builder_add_null (self);
-- break;
-- case 'b':
-- wp_spa_json_builder_add_boolean (self, va_arg(args, gboolean));
-- break;
-- case 'i':
-- wp_spa_json_builder_add_int (self, va_arg(args, gint));
-- break;
-- case 'f':
-- wp_spa_json_builder_add_float (self, (float)va_arg(args, double));
-- break;
-- case 's':
-- wp_spa_json_builder_add_string (self, va_arg(args, const gchar *));
-- break;
-- case 'J':
-- wp_spa_json_builder_add_json (self, va_arg(args, WpSpaJson *));
-- break;
-- default:
-- return;
-- }
--}
-+/* Args is not a pointer in some architectures, so this needs to be a macro to
-+ * avoid args being copied */
-+#define wp_spa_json_builder_add_value(self,fmt,args) \
-+do { \
-+ switch (*fmt) { \
-+ case 'n': \
-+ wp_spa_json_builder_add_null (self); \
-+ break; \
-+ case 'b': \
-+ wp_spa_json_builder_add_boolean (self, va_arg(args, gboolean)); \
-+ break; \
-+ case 'i': \
-+ wp_spa_json_builder_add_int (self, va_arg(args, gint)); \
-+ break; \
-+ case 'f': \
-+ wp_spa_json_builder_add_float (self, (float)va_arg(args, double)); \
-+ break; \
-+ case 's': \
-+ wp_spa_json_builder_add_string (self, va_arg(args, const gchar *)); \
-+ break; \
-+ case 'J': \
-+ wp_spa_json_builder_add_json (self, va_arg(args, WpSpaJson *)); \
-+ break; \
-+ default: \
-+ break; \
-+ } \
-+} while(false)
-
- /*!
- * \brief Creates a spa json of type array
-@@ -724,48 +724,46 @@ wp_spa_json_parse_object_valist (WpSpaJson *self, va_list args)
- return res;
- }
-
--static gboolean
--wp_spa_json_parse_value (const gchar *data, int len, const gchar *fmt,
-- va_list args)
--{
-- switch (*fmt) {
-- case 'n':
-- if (!spa_json_is_null (data, len))
-- return FALSE;
-- break;
-- case 'b':
-- if (!wp_spa_json_parse_boolean_internal (data, len,
-- va_arg(args, gboolean *)))
-- return FALSE;
-- break;
-- case 'i':
-- if (spa_json_parse_int (data, len, va_arg(args, gint *)) < 0)
-- return FALSE;
-- break;
-- case 'f':
-- if (spa_json_parse_float (data, len,
-- (float *)va_arg(args, double *)) < 0)
-- return FALSE;
-- break;
-- case 's': {
-- gchar *str = wp_spa_json_parse_string_internal (data, len);
-- if (!str)
-- return FALSE;
-- *va_arg(args, gchar **) = str;
-- break;
-- }
-- case 'J': {
-- WpSpaJson *j = wp_spa_json_new (data, len);
-- if (!j)
-- return FALSE;
-- *va_arg(args, WpSpaJson **) = j;
-- break;
-- }
-- default:
-- return FALSE;
-- }
-- return TRUE;
--}
-+/* Args is not a pointer in some architectures, so this needs to be a macro to
-+ * avoid args being copied */
-+#define wp_spa_json_parse_value(data,len,fmt,args) \
-+do { \
-+ switch (*fmt) { \
-+ case 'n': \
-+ if (!spa_json_is_null (data, len)) \
-+ return FALSE; \
-+ break; \
-+ case 'b': \
-+ if (!wp_spa_json_parse_boolean_internal (data, len, \
-+ va_arg(args, gboolean *))) \
-+ return FALSE; \
-+ break; \
-+ case 'i': \
-+ if (spa_json_parse_int (data, len, va_arg(args, gint *)) < 0) \
-+ return FALSE; \
-+ break; \
-+ case 'f': \
-+ if (spa_json_parse_float (data, len, va_arg(args, float *)) < 0) \
-+ return FALSE; \
-+ break; \
-+ case 's': { \
-+ gchar *str = wp_spa_json_parse_string_internal (data, len); \
-+ if (!str) \
-+ return FALSE; \
-+ *va_arg(args, gchar **) = str; \
-+ break; \
-+ } \
-+ case 'J': { \
-+ WpSpaJson *j = wp_spa_json_new (data, len); \
-+ if (!j) \
-+ return FALSE; \
-+ *va_arg(args, WpSpaJson **) = j; \
-+ break; \
-+ } \
-+ default: \
-+ return FALSE; \
-+ } \
-+} while(false)
-
- /*!
- * \brief Parses the object property values of a spa json object
-@@ -827,8 +825,7 @@ wp_spa_json_object_get_valist (WpSpaJson *self, va_list args)
- value = g_value_get_boxed (&item);
-
- if (g_strcmp0 (key_str, lookup_key) == 0) {
-- if (!wp_spa_json_parse_value (value->data, value->size, lookup_fmt, args))
-- return FALSE;
-+ wp_spa_json_parse_value (value->data, value->size, lookup_fmt, args);
- lookup_key = va_arg(args, const gchar *);
- if (!lookup_key)
- return TRUE;
-@@ -1366,9 +1363,12 @@ gboolean
- wp_spa_json_parser_get_value (WpSpaJsonParser *self, const gchar *fmt,
- va_list args)
- {
-- return wp_spa_json_parser_advance (self) &&
-- wp_spa_json_parse_value (self->curr.cur,
-- self->curr.end - self->curr.cur, fmt, args);
-+ if (wp_spa_json_parser_advance (self)) {
-+ wp_spa_json_parse_value (self->curr.cur, self->curr.end - self->curr.cur,
-+ fmt, args);
-+ return TRUE;
-+ }
-+ return FALSE;
- }
-
- /*!
-@@ -1419,9 +1419,13 @@ wp_spa_json_parser_get_valist (WpSpaJsonParser *self, va_list args)
- if (!format)
- return TRUE;
-
-- /* parse value */
-- if (!wp_spa_json_parser_get_value (self, format, args))
-+ /* advance */
-+ if (!wp_spa_json_parser_advance (self))
- return FALSE;
-+
-+ /* parse value */
-+ wp_spa_json_parse_value (self->curr.cur, self->curr.end - self->curr.cur,
-+ format, args);
- } while (TRUE);
-
- return FALSE;
---
-GitLab
-
diff --git a/media-video/wireplumber/wireplumber-0.4.8-r3.ebuild b/media-video/wireplumber/wireplumber-0.4.8-r3.ebuild
deleted file mode 100644
index 5bd6d87c04e8..000000000000
--- a/media-video/wireplumber/wireplumber-0.4.8-r3.ebuild
+++ /dev/null
@@ -1,123 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LUA_COMPAT=( lua5-{3,4} )
-
-inherit lua-single meson systemd
-
-if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://gitlab.freedesktop.org/pipewire/${PN}.git"
- EGIT_BRANCH="master"
- inherit git-r3
-else
- SRC_URI="https://gitlab.freedesktop.org/pipewire/${PN}/-/archive/${PV}/${P}.tar.gz"
- KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
-fi
-
-DESCRIPTION="Replacement for pipewire-media-session"
-HOMEPAGE="https://gitlab.freedesktop.org/pipewire/wireplumber"
-
-LICENSE="MIT"
-SLOT="0/0.4"
-IUSE="elogind system-service systemd test"
-
-REQUIRED_USE="
- ${LUA_REQUIRED_USE}
- ?? ( elogind systemd )
- system-service? ( systemd )
-"
-
-RESTRICT="!test? ( test )"
-
-# introspection? ( dev-libs/gobject-introspection ) is valid but likely only used for doc building
-BDEPEND="
- dev-libs/glib
- dev-util/gdbus-codegen
- dev-util/glib-utils
-"
-
-DEPEND="
- ${LUA_DEPS}
- >=dev-libs/glib-2.62
- >=media-video/pipewire-0.3.45:=
- virtual/libc
- elogind? ( sys-auth/elogind )
- systemd? ( sys-apps/systemd )
-"
-
-# Any dev-lua/* deps get declared like this inside RDEPEND:
-# $(lua_gen_cond_dep '
-# dev-lua/<NAME>[${LUA_USEDEP}]
-# ')
-RDEPEND="${DEPEND}
- system-service? (
- acct-user/pipewire
- acct-group/pipewire
- )
-"
-
-DOCS=( {NEWS,README}.rst )
-
-PATCHES=(
- "${FILESDIR}"/${P}-restore-stream-do-not-crash-if-config.properties-is-.patch
- "${FILESDIR}"/${P}-spa-json-fix-va-list-APIs-for-different-architecture.patch
- "${FILESDIR}"/${P}-policy-bluetooth-fix-string.find-crash-with-nil-stri.patch
- "${FILESDIR}"/${P}-si-audio-adapter-relax-format-parsing.patch
-)
-
-src_configure() {
- local emesonargs=(
- -Ddoc=disabled # Ebuild not wired up yet (Sphinx, Doxygen?)
- -Dintrospection=disabled # Only used for Sphinx doc generation
- -Dsystem-lua=true # We always unbundle everything we can
- -Dsystem-lua-version=$(ver_cut 1-2 $(lua_get_version))
- $(meson_feature elogind)
- $(meson_feature systemd)
- $(meson_use system-service systemd-system-service)
- $(meson_use systemd systemd-user-service)
- -Dsystemd-system-unit-dir=$(systemd_get_systemunitdir)
- -Dsystemd-user-unit-dir=$(systemd_get_userunitdir)
- $(meson_use test tests)
- )
-
- meson_src_configure
-}
-
-src_install() {
- meson_src_install
-
- # We copy the default config, so that Gentoo tools can pick up on any
- # updates and /etc does not end up with stale overrides.
- # If a reflinking CoW filesystem is used (e.g. Btrfs), then the files
- # will not actually get stored twice until modified.
- insinto /etc
- doins -r ${ED}/usr/share/wireplumber
-}
-
-pkg_postinst() {
- if systemd_is_booted ; then
- ewarn "pipewire-media-session.service is no longer installed. You must switch"
- ewarn "to wireplumber.service user unit before your next logout/reboot:"
- ewarn "systemctl --user disable pipewire-media-session.service"
- ewarn "systemctl --user --force enable wireplumber.service"
- else
- ewarn "Switch to WirePlumber will happen the next time gentoo-pipewire-launcher"
- ewarn "is started (a replacement for directly calling pipewire binary)."
- ewarn
- ewarn "Please ensure that ${EROOT}/etc/pipewire/pipewire.conf either does not exist"
- ewarn "or, if it does exist, that any reference to"
- ewarn "${EROOT}/usr/bin/pipewire-media-session is commented out (begins with a #)."
- fi
- if use system-service; then
- ewarn
- ewarn "WARNING: you have enabled the system-service USE flag, which installs"
- ewarn "the system-wide systemd units that enable WirePlumber to run as a system"
- ewarn "service. This is more than likely NOT what you want. You are strongly"
- ewarn "advised not to enable this mode and instead stick with systemd user"
- ewarn "units. The default configuration files will likely not work out of"
- ewarn "box, and you are on your own with configuration."
- ewarn
- fi
-}
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/wireplumber/files/, media-video/wireplumber/
@ 2022-05-13 0:41 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2022-05-13 0:41 UTC (permalink / raw
To: gentoo-commits
commit: 12ffc90b5986b4a2eb943fb5bf94c3393991761d
Author: Niklāvs Koļesņikovs <89q1r14hd <AT> relay <DOT> firefox <DOT> com>
AuthorDate: Thu May 12 13:51:21 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May 13 00:41:15 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12ffc90b
media-video/wireplumber: patch 0.4.10 to default enable backends
Due to signifiant number of people having outdated copies of
WirePlumber scripts, upstream chose to change the default behavior of
WP monitors (essentially PW backends) and to enable them by default,
so that they work with the older scripts.
Gentoo already duplicates to /etc/wireplumber which would trigger the
usual config protection mechanism but users could also have copied them
to ~/.config/wireplumber. Therefore it's still a nice thing to apply this
change.
Bug: https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/254
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd <AT> relay.firefox.com>
Closes: https://github.com/gentoo/gentoo/pull/25455
Signed-off-by: Sam James <sam <AT> gentoo.org>
...-enabled-property-to-default-to-true-when.patch | 129 +++++++++++++++++++++
.../wireplumber/wireplumber-0.4.10-r1.ebuild | 122 +++++++++++++++++++
2 files changed, 251 insertions(+)
diff --git a/media-video/wireplumber/files/wireplumber-0.4.10-config-fix-enabled-property-to-default-to-true-when.patch b/media-video/wireplumber/files/wireplumber-0.4.10-config-fix-enabled-property-to-default-to-true-when.patch
new file mode 100644
index 000000000000..40a486616580
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.10-config-fix-enabled-property-to-default-to-true-when.patch
@@ -0,0 +1,129 @@
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/1f045309208ab5d927883b5adc2b7d1623fae162
+
+From 1f045309208ab5d927883b5adc2b7d1623fae162 Mon Sep 17 00:00:00 2001
+From: George Kiagiadakis <george.kiagiadakis@collabora.com>
+Date: Thu, 12 May 2022 12:19:38 +0300
+Subject: [PATCH] config: fix enabled property to default to "true" when not
+ defined
+
+Fixes backwards compatibility with older config files
+
+Fixes: #254
+---
+ src/config/bluetooth.lua.d/30-bluez-monitor.lua | 2 +-
+ src/config/main.lua.d/20-default-access.lua | 2 +-
+ src/config/main.lua.d/30-alsa-monitor.lua | 2 +-
+ src/config/main.lua.d/30-libcamera-monitor.lua | 2 +-
+ src/config/main.lua.d/30-v4l2-monitor.lua | 2 +-
+ src/config/main.lua.d/40-device-defaults.lua | 2 +-
+ src/config/main.lua.d/40-stream-defaults.lua | 2 +-
+ src/config/policy.lua.d/10-default-policy.lua | 2 +-
+ 8 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/src/config/bluetooth.lua.d/30-bluez-monitor.lua b/src/config/bluetooth.lua.d/30-bluez-monitor.lua
+index b40026c2..a870aa5d 100644
+--- a/src/config/bluetooth.lua.d/30-bluez-monitor.lua
++++ b/src/config/bluetooth.lua.d/30-bluez-monitor.lua
+@@ -3,7 +3,7 @@ bluez_monitor.properties = {}
+ bluez_monitor.rules = {}
+
+ function bluez_monitor.enable()
+- if not bluez_monitor.enabled then
++ if bluez_monitor.enabled == false then
+ return
+ end
+
+diff --git a/src/config/main.lua.d/20-default-access.lua b/src/config/main.lua.d/20-default-access.lua
+index a6ffb2ee..0a7eb955 100644
+--- a/src/config/main.lua.d/20-default-access.lua
++++ b/src/config/main.lua.d/20-default-access.lua
+@@ -3,7 +3,7 @@ default_access.properties = {}
+ default_access.rules = {}
+
+ function default_access.enable()
+- if not default_access.enabled then
++ if default_access.enabled == false then
+ return
+ end
+
+diff --git a/src/config/main.lua.d/30-alsa-monitor.lua b/src/config/main.lua.d/30-alsa-monitor.lua
+index da0b2c70..8e45e434 100644
+--- a/src/config/main.lua.d/30-alsa-monitor.lua
++++ b/src/config/main.lua.d/30-alsa-monitor.lua
+@@ -3,7 +3,7 @@ alsa_monitor.properties = {}
+ alsa_monitor.rules = {}
+
+ function alsa_monitor.enable()
+- if not alsa_monitor.enabled then
++ if alsa_monitor.enabled == false then
+ return
+ end
+
+diff --git a/src/config/main.lua.d/30-libcamera-monitor.lua b/src/config/main.lua.d/30-libcamera-monitor.lua
+index 4a8257ff..cd820a83 100644
+--- a/src/config/main.lua.d/30-libcamera-monitor.lua
++++ b/src/config/main.lua.d/30-libcamera-monitor.lua
+@@ -3,7 +3,7 @@ libcamera_monitor.properties = {}
+ libcamera_monitor.rules = {}
+
+ function libcamera_monitor.enable()
+- if not libcamera_monitor.enabled then
++ if libcamera_monitor.enabled == false then
+ return
+ end
+
+diff --git a/src/config/main.lua.d/30-v4l2-monitor.lua b/src/config/main.lua.d/30-v4l2-monitor.lua
+index 7cfd4bcd..3fbdc9e7 100644
+--- a/src/config/main.lua.d/30-v4l2-monitor.lua
++++ b/src/config/main.lua.d/30-v4l2-monitor.lua
+@@ -3,7 +3,7 @@ v4l2_monitor.properties = {}
+ v4l2_monitor.rules = {}
+
+ function v4l2_monitor.enable()
+- if not v4l2_monitor.enabled then
++ if v4l2_monitor.enabled == false then
+ return
+ end
+
+diff --git a/src/config/main.lua.d/40-device-defaults.lua b/src/config/main.lua.d/40-device-defaults.lua
+index 55aafe85..2204c4ac 100644
+--- a/src/config/main.lua.d/40-device-defaults.lua
++++ b/src/config/main.lua.d/40-device-defaults.lua
+@@ -38,7 +38,7 @@ device_defaults.persistent_profiles = {
+ }
+
+ function device_defaults.enable()
+- if not device_defaults.enabled then
++ if device_defaults.enabled == false then
+ return
+ end
+
+diff --git a/src/config/main.lua.d/40-stream-defaults.lua b/src/config/main.lua.d/40-stream-defaults.lua
+index 2975f4f6..307d83df 100644
+--- a/src/config/main.lua.d/40-stream-defaults.lua
++++ b/src/config/main.lua.d/40-stream-defaults.lua
+@@ -25,7 +25,7 @@ stream_defaults.rules = {
+ }
+
+ function stream_defaults.enable()
+- if not stream_defaults.enabled then
++ if stream_defaults.enabled == false then
+ return
+ end
+
+diff --git a/src/config/policy.lua.d/10-default-policy.lua b/src/config/policy.lua.d/10-default-policy.lua
+index 7b00e94e..edfdeb1c 100644
+--- a/src/config/policy.lua.d/10-default-policy.lua
++++ b/src/config/policy.lua.d/10-default-policy.lua
+@@ -38,7 +38,7 @@ bluetooth_policy.policy = {
+ }
+
+ function default_policy.enable()
+- if not default_policy.enabled then
++ if default_policy.enabled == false then
+ return
+ end
+
+--
+GitLab
+
diff --git a/media-video/wireplumber/wireplumber-0.4.10-r1.ebuild b/media-video/wireplumber/wireplumber-0.4.10-r1.ebuild
new file mode 100644
index 000000000000..b711ad6e7ae9
--- /dev/null
+++ b/media-video/wireplumber/wireplumber-0.4.10-r1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{3,4} )
+
+inherit lua-single meson systemd
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://gitlab.freedesktop.org/pipewire/${PN}.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+else
+ SRC_URI="https://gitlab.freedesktop.org/pipewire/${PN}/-/archive/${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+DESCRIPTION="Replacement for pipewire-media-session"
+HOMEPAGE="https://gitlab.freedesktop.org/pipewire/wireplumber"
+
+LICENSE="MIT"
+SLOT="0/0.4"
+IUSE="elogind system-service systemd test"
+
+REQUIRED_USE="
+ ${LUA_REQUIRED_USE}
+ ?? ( elogind systemd )
+ system-service? ( systemd )
+"
+
+RESTRICT="!test? ( test )"
+
+# introspection? ( dev-libs/gobject-introspection ) is valid but likely only used for doc building
+BDEPEND="
+ dev-libs/glib
+ dev-util/gdbus-codegen
+ dev-util/glib-utils
+ sys-devel/gettext
+"
+
+DEPEND="
+ ${LUA_DEPS}
+ >=dev-libs/glib-2.62
+ >=media-video/pipewire-0.3.48:=
+ virtual/libc
+ virtual/libintl
+ elogind? ( sys-auth/elogind )
+ systemd? ( sys-apps/systemd )
+"
+
+# Any dev-lua/* deps get declared like this inside RDEPEND:
+# $(lua_gen_cond_dep '
+# dev-lua/<NAME>[${LUA_USEDEP}]
+# ')
+RDEPEND="${DEPEND}
+ system-service? (
+ acct-user/pipewire
+ acct-group/pipewire
+ )
+"
+
+DOCS=( {NEWS,README}.rst )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-config-fix-enabled-property-to-default-to-true-when.patch
+)
+
+src_configure() {
+ local emesonargs=(
+ -Ddoc=disabled # Ebuild not wired up yet (Sphinx, Doxygen?)
+ -Dintrospection=disabled # Only used for Sphinx doc generation
+ -Dsystem-lua=true # We always unbundle everything we can
+ -Dsystem-lua-version=$(ver_cut 1-2 $(lua_get_version))
+ $(meson_feature elogind)
+ $(meson_feature systemd)
+ $(meson_use system-service systemd-system-service)
+ $(meson_use systemd systemd-user-service)
+ -Dsystemd-system-unit-dir=$(systemd_get_systemunitdir)
+ -Dsystemd-user-unit-dir=$(systemd_get_userunitdir)
+ $(meson_use test tests)
+ )
+
+ meson_src_configure
+}
+
+src_install() {
+ meson_src_install
+
+ # We copy the default config, so that Gentoo tools can pick up on any
+ # updates and /etc does not end up with stale overrides.
+ # If a reflinking CoW filesystem is used (e.g. Btrfs), then the files
+ # will not actually get stored twice until modified.
+ insinto /etc
+ doins -r ${ED}/usr/share/wireplumber
+}
+
+pkg_postinst() {
+ if systemd_is_booted ; then
+ ewarn "pipewire-media-session.service is no longer installed. You must switch"
+ ewarn "to wireplumber.service user unit before your next logout/reboot:"
+ ewarn "systemctl --user disable pipewire-media-session.service"
+ ewarn "systemctl --user --force enable wireplumber.service"
+ else
+ ewarn "Switch to WirePlumber will happen the next time gentoo-pipewire-launcher"
+ ewarn "is started (a replacement for directly calling pipewire binary)."
+ ewarn
+ ewarn "Please ensure that ${EROOT}/etc/pipewire/pipewire.conf either does not exist"
+ ewarn "or, if it does exist, that any reference to"
+ ewarn "${EROOT}/usr/bin/pipewire-media-session is commented out (begins with a #)."
+ fi
+ if use system-service; then
+ ewarn
+ ewarn "WARNING: you have enabled the system-service USE flag, which installs"
+ ewarn "the system-wide systemd units that enable WirePlumber to run as a system"
+ ewarn "service. This is more than likely NOT what you want. You are strongly"
+ ewarn "advised not to enable this mode and instead stick with systemd user"
+ ewarn "units. The default configuration files will likely not work out of"
+ ewarn "box, and you are on your own with configuration."
+ ewarn
+ fi
+}
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/wireplumber/files/, media-video/wireplumber/
@ 2022-05-30 4:46 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2022-05-30 4:46 UTC (permalink / raw
To: gentoo-commits
commit: 6773cae240f67b63545aad170a8ce49222379296
Author: Niklāvs Koļesņikovs <89q1r14hd <AT> relay <DOT> firefox <DOT> com>
AuthorDate: Sun May 29 14:05:25 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 30 04:42:28 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6773cae2
media-video/wireplumber: fix a bad mistake in 0.4.10-r2 by doing -r3
Somehow git format-patch ended up producing a revert for an unrelated
commit which either randomly or perhaps via some copy and paste error
happened to be a revert of the only patch that 0.4.10-r1 was applying.
Because of that wireplumber-0.4.10-r2 incorrectly dropped it. This is
now fixed in 0.4.10-r3 by reinstating the removed patch as well as
adding in the one that was meant to be present in -r2 but had been
incorrectly generated due to probably wrong git format-patch command.
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd <AT> relay.firefox.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
...nodes-don-t-check-if-all-device-nodes-are.patch | 187 +++++++++++++++++++++
.../wireplumber/wireplumber-0.4.10-r3.ebuild | 126 ++++++++++++++
2 files changed, 313 insertions(+)
diff --git a/media-video/wireplumber/files/wireplumber-0.4.10-m-default-nodes-don-t-check-if-all-device-nodes-are.patch b/media-video/wireplumber/files/wireplumber-0.4.10-m-default-nodes-don-t-check-if-all-device-nodes-are.patch
new file mode 100644
index 000000000000..d9c51489a893
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.10-m-default-nodes-don-t-check-if-all-device-nodes-are.patch
@@ -0,0 +1,187 @@
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/392cce2136e81ac3146078eacbbae85b694c917a
+
+From 392cce2136e81ac3146078eacbbae85b694c917a Mon Sep 17 00:00:00 2001
+From: Julian Bouzas <julian.bouzas@collabora.com>
+Date: Fri, 20 May 2022 07:38:24 -0400
+Subject: [PATCH] m-default-nodes: don't check if all device nodes are ready
+ when finding default node
+
+This check was originally added to avoid a small audio glitch when changing
+default nodes while also changing the device profile (eg Gnome Sound Settings).
+The check is removed because it causes issues when disabling alsa nodes. There
+are plans to fix the audio glitch issue in the future with the planned
+event-dispatcher architecture.
+
+Fixes #279
+---
+ modules/module-default-nodes.c | 136 ---------------------------------
+ 1 file changed, 136 deletions(-)
+
+diff --git a/modules/module-default-nodes.c b/modules/module-default-nodes.c
+index 0fdaed5..577f9bb 100644
+--- a/modules/module-default-nodes.c
++++ b/modules/module-default-nodes.c
+@@ -345,135 +345,6 @@ reevaluate_default_node (WpDefaultNodes * self, WpMetadata *m, gint node_t)
+ }
+ }
+
+-static guint
+-get_device_total_nodes (WpPipewireObject * proxy)
+-{
+- g_autoptr (WpIterator) profiles = NULL;
+- g_auto (GValue) item = G_VALUE_INIT;
+-
+- profiles = wp_pipewire_object_enum_params_sync (proxy, "Profile", NULL);
+- if (!profiles)
+- return 0;
+-
+- for (; wp_iterator_next (profiles, &item); g_value_unset (&item)) {
+- WpSpaPod *pod = g_value_get_boxed (&item);
+- gint idx = -1;
+- const gchar *name = NULL;
+- g_autoptr (WpSpaPod) classes = NULL;
+-
+- /* Parse */
+- if (!wp_spa_pod_get_object (pod, NULL,
+- "index", "i", &idx,
+- "name", "s", &name,
+- "classes", "?P", &classes,
+- NULL))
+- continue;
+- if (!classes)
+- continue;
+-
+- /* Parse profile classes */
+- {
+- g_autoptr (WpIterator) it = wp_spa_pod_new_iterator (classes);
+- g_auto (GValue) v = G_VALUE_INIT;
+- gint total_nodes = 0;
+- for (; wp_iterator_next (it, &v); g_value_unset (&v)) {
+- WpSpaPod *entry = g_value_get_boxed (&v);
+- g_autoptr (WpSpaPodParser) pp = NULL;
+- const gchar *media_class = NULL;
+- gint n_nodes = 0;
+- g_return_val_if_fail (entry, 0);
+- if (!wp_spa_pod_is_struct (entry))
+- continue;
+- pp = wp_spa_pod_parser_new_struct (entry);
+- g_return_val_if_fail (pp, 0);
+- g_return_val_if_fail (wp_spa_pod_parser_get_string (pp, &media_class), 0);
+- g_return_val_if_fail (wp_spa_pod_parser_get_int (pp, &n_nodes), 0);
+- wp_spa_pod_parser_end (pp);
+-
+- total_nodes += n_nodes;
+- }
+-
+- if (total_nodes > 0)
+- return total_nodes;
+- }
+- }
+-
+- return 0;
+-}
+-
+-static gboolean
+-nodes_ready (WpDefaultNodes * self)
+-{
+- g_autoptr (WpIterator) it = NULL;
+- g_auto (GValue) val = G_VALUE_INIT;
+-
+- /* Get the total number of nodes for each device and make sure they exist
+- * and have at least 1 port */
+- it = wp_object_manager_new_filtered_iterator (self->rescan_om,
+- WP_TYPE_DEVICE, NULL);
+- for (; wp_iterator_next (it, &val); g_value_unset (&val)) {
+- WpPipewireObject *device = g_value_get_object (&val);
+- guint total_nodes = get_device_total_nodes (device);
+- if (total_nodes > 0) {
+- guint32 device_id = wp_proxy_get_bound_id (WP_PROXY (device));
+- g_autoptr (WpIterator) node_it = NULL;
+- g_auto (GValue) node_val = G_VALUE_INIT;
+- guint ready_nodes = 0;
+-
+- node_it = wp_object_manager_new_filtered_iterator (self->rescan_om,
+- WP_TYPE_NODE, WP_CONSTRAINT_TYPE_PW_PROPERTY,
+- PW_KEY_DEVICE_ID, "=i", device_id, NULL);
+- for (; wp_iterator_next (node_it, &node_val); g_value_unset (&node_val)) {
+- WpPipewireObject *node = g_value_get_object (&node_val);
+- g_autoptr (WpPort) port =
+- wp_object_manager_lookup (self->rescan_om,
+- WP_TYPE_PORT, WP_CONSTRAINT_TYPE_PW_PROPERTY,
+- PW_KEY_NODE_ID, "=u", wp_proxy_get_bound_id (WP_PROXY (node)),
+- NULL);
+- if (port)
+- ready_nodes++;
+- }
+-
+- if (ready_nodes < total_nodes) {
+- const gchar *device_name = wp_pipewire_object_get_property (
+- WP_PIPEWIRE_OBJECT (device), PW_KEY_DEVICE_NAME);
+- wp_debug_object (self, "device '%s' is not ready (%d/%d)", device_name,
+- ready_nodes, total_nodes);
+- return FALSE;
+- }
+- }
+- }
+-
+- /* Make sure Audio and Video virtual sources have ports */
+- {
+- g_autoptr (WpIterator) node_it = NULL;
+- g_auto (GValue) node_val = G_VALUE_INIT;
+- node_it = wp_object_manager_new_filtered_iterator (self->rescan_om,
+- WP_TYPE_NODE, WP_CONSTRAINT_TYPE_PW_PROPERTY, PW_KEY_DEVICE_ID, "-",
+- NULL);
+- for (; wp_iterator_next (node_it, &node_val); g_value_unset (&node_val)) {
+- WpPipewireObject *node = g_value_get_object (&node_val);
+- const gchar *media_class = wp_pipewire_object_get_property (
+- WP_PIPEWIRE_OBJECT (node), PW_KEY_MEDIA_CLASS);
+- g_autoptr (WpPort) port =
+- wp_object_manager_lookup (self->rescan_om,
+- WP_TYPE_PORT, WP_CONSTRAINT_TYPE_PW_PROPERTY,
+- PW_KEY_NODE_ID, "=u", wp_proxy_get_bound_id (WP_PROXY (node)),
+- NULL);
+- if (!port &&
+- (g_strcmp0 ("Audio/Source/Virtual", media_class) == 0 ||
+- g_strcmp0 ("Video/Source/Virtual", media_class) == 0)) {
+- const gchar *node_name = wp_pipewire_object_get_property (
+- WP_PIPEWIRE_OBJECT (node), PW_KEY_NODE_NAME);
+- wp_debug_object (self, "virtual node '%s' is not ready", node_name);
+- return FALSE;
+- }
+- }
+- }
+-
+- return TRUE;
+-}
+-
+ static void
+ sync_rescan (WpCore * core, GAsyncResult * res, WpDefaultNodes * self)
+ {
+@@ -491,10 +362,6 @@ sync_rescan (WpCore * core, GAsyncResult * res, WpDefaultNodes * self)
+ if (!metadata)
+ return;
+
+- /* Make sure nodes are ready for current profile */
+- if (!nodes_ready (self))
+- return;
+-
+ wp_trace_object (self, "re-evaluating defaults");
+ reevaluate_default_node (self, metadata, AUDIO_SINK);
+ reevaluate_default_node (self, metadata, AUDIO_SOURCE);
+@@ -584,13 +451,10 @@ on_metadata_added (WpObjectManager *om, WpMetadata *metadata, gpointer d)
+ self->rescan_om = wp_object_manager_new ();
+ wp_object_manager_add_interest (self->rescan_om, WP_TYPE_DEVICE, NULL);
+ wp_object_manager_add_interest (self->rescan_om, WP_TYPE_NODE, NULL);
+- wp_object_manager_add_interest (self->rescan_om, WP_TYPE_PORT, NULL);
+ wp_object_manager_request_object_features (self->rescan_om, WP_TYPE_DEVICE,
+ WP_OBJECT_FEATURES_ALL);
+ wp_object_manager_request_object_features (self->rescan_om, WP_TYPE_NODE,
+ WP_OBJECT_FEATURES_ALL);
+- wp_object_manager_request_object_features (self->rescan_om, WP_TYPE_PORT,
+- WP_OBJECT_FEATURES_ALL);
+ g_signal_connect_object (self->rescan_om, "objects-changed",
+ G_CALLBACK (schedule_rescan), self, G_CONNECT_SWAPPED);
+ g_signal_connect_object (self->rescan_om, "object-added",
+--
+2.35.1
+
diff --git a/media-video/wireplumber/wireplumber-0.4.10-r3.ebuild b/media-video/wireplumber/wireplumber-0.4.10-r3.ebuild
new file mode 100644
index 000000000000..f5d48d6fca34
--- /dev/null
+++ b/media-video/wireplumber/wireplumber-0.4.10-r3.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{3,4} )
+
+inherit lua-single meson systemd
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://gitlab.freedesktop.org/pipewire/${PN}.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+else
+ SRC_URI="https://gitlab.freedesktop.org/pipewire/${PN}/-/archive/${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+DESCRIPTION="Replacement for pipewire-media-session"
+HOMEPAGE="https://gitlab.freedesktop.org/pipewire/wireplumber"
+
+LICENSE="MIT"
+SLOT="0/0.4"
+IUSE="elogind system-service systemd test"
+
+REQUIRED_USE="
+ ${LUA_REQUIRED_USE}
+ ?? ( elogind systemd )
+ system-service? ( systemd )
+"
+
+RESTRICT="!test? ( test )"
+
+# introspection? ( dev-libs/gobject-introspection ) is valid but likely only used for doc building
+BDEPEND="
+ dev-libs/glib
+ dev-util/gdbus-codegen
+ dev-util/glib-utils
+ sys-devel/gettext
+"
+
+DEPEND="
+ ${LUA_DEPS}
+ >=dev-libs/glib-2.62
+ >=media-video/pipewire-0.3.48:=
+ virtual/libc
+ virtual/libintl
+ elogind? ( sys-auth/elogind )
+ systemd? ( sys-apps/systemd )
+"
+
+# Any dev-lua/* deps get declared like this inside RDEPEND:
+# $(lua_gen_cond_dep '
+# dev-lua/<NAME>[${LUA_USEDEP}]
+# ')
+RDEPEND="${DEPEND}
+ system-service? (
+ acct-user/pipewire
+ acct-group/pipewire
+ )
+"
+
+DOCS=( {NEWS,README}.rst )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-config-fix-enabled-property-to-default-to-true-when.patch
+ "${FILESDIR}"/${P}-m-lua-scripting-allow-converting-GValue-holding-NUL.patch
+ "${FILESDIR}"/${P}-alsa.lua-fix-device-name-deduplication-when-reserva.patch
+ "${FILESDIR}"/${P}-m-default-nodes-don-t-check-if-all-device-nodes-are.patch
+ "${FILESDIR}"/${P}-m-lua-scripting-fix-object-refcounting.patch
+)
+
+src_configure() {
+ local emesonargs=(
+ -Ddoc=disabled # Ebuild not wired up yet (Sphinx, Doxygen?)
+ -Dintrospection=disabled # Only used for Sphinx doc generation
+ -Dsystem-lua=true # We always unbundle everything we can
+ -Dsystem-lua-version=$(ver_cut 1-2 $(lua_get_version))
+ $(meson_feature elogind)
+ $(meson_feature systemd)
+ $(meson_use system-service systemd-system-service)
+ $(meson_use systemd systemd-user-service)
+ -Dsystemd-system-unit-dir=$(systemd_get_systemunitdir)
+ -Dsystemd-user-unit-dir=$(systemd_get_userunitdir)
+ $(meson_use test tests)
+ )
+
+ meson_src_configure
+}
+
+src_install() {
+ meson_src_install
+
+ # We copy the default config, so that Gentoo tools can pick up on any
+ # updates and /etc does not end up with stale overrides.
+ # If a reflinking CoW filesystem is used (e.g. Btrfs), then the files
+ # will not actually get stored twice until modified.
+ insinto /etc
+ doins -r ${ED}/usr/share/wireplumber
+}
+
+pkg_postinst() {
+ if systemd_is_booted ; then
+ ewarn "pipewire-media-session.service is no longer installed. You must switch"
+ ewarn "to wireplumber.service user unit before your next logout/reboot:"
+ ewarn "systemctl --user disable pipewire-media-session.service"
+ ewarn "systemctl --user --force enable wireplumber.service"
+ else
+ ewarn "Switch to WirePlumber will happen the next time gentoo-pipewire-launcher"
+ ewarn "is started (a replacement for directly calling pipewire binary)."
+ ewarn
+ ewarn "Please ensure that ${EROOT}/etc/pipewire/pipewire.conf either does not exist"
+ ewarn "or, if it does exist, that any reference to"
+ ewarn "${EROOT}/usr/bin/pipewire-media-session is commented out (begins with a #)."
+ fi
+ if use system-service; then
+ ewarn
+ ewarn "WARNING: you have enabled the system-service USE flag, which installs"
+ ewarn "the system-wide systemd units that enable WirePlumber to run as a system"
+ ewarn "service. This is more than likely NOT what you want. You are strongly"
+ ewarn "advised not to enable this mode and instead stick with systemd user"
+ ewarn "units. The default configuration files will likely not work out of"
+ ewarn "box, and you are on your own with configuration."
+ ewarn
+ fi
+}
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/wireplumber/files/, media-video/wireplumber/
@ 2022-07-19 21:22 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2022-07-19 21:22 UTC (permalink / raw
To: gentoo-commits
commit: fb53fea720a58c87881d06b3d07e3af216d260ce
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 19 21:21:31 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jul 19 21:21:31 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb53fea7
media-video/wireplumber: backport dbus crash fix
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../wireplumber-0.4.11-dbus-reconnect-crash.patch | 45 +++++++
.../wireplumber/wireplumber-0.4.11-r2.ebuild | 130 +++++++++++++++++++++
2 files changed, 175 insertions(+)
diff --git a/media-video/wireplumber/files/wireplumber-0.4.11-dbus-reconnect-crash.patch b/media-video/wireplumber/files/wireplumber-0.4.11-dbus-reconnect-crash.patch
new file mode 100644
index 000000000000..6098ed11c302
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.11-dbus-reconnect-crash.patch
@@ -0,0 +1,45 @@
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/eb406bdb2cbbcd49c55c71285f8f2eddb624d24b
+
+From eb406bdb2cbbcd49c55c71285f8f2eddb624d24b Mon Sep 17 00:00:00 2001
+From: George Kiagiadakis <george.kiagiadakis@collabora.com>
+Date: Wed, 13 Jul 2022 13:38:14 +0300
+Subject: [PATCH] dbus: fix crash when trying to reconnect
+
+When coming from on_sync_reconnect, data points to the WpDBus object
+instead of the activation transition.
+
+Fixes: #305
+--- a/lib/wp/dbus.c
++++ b/lib/wp/dbus.c
+@@ -58,14 +58,26 @@ wp_dbus_set_state (WpDbus *self, WpDBusState new_state)
+ static void
+ on_got_bus (GObject * obj, GAsyncResult * res, gpointer data)
+ {
+- WpTransition *transition = WP_TRANSITION (data);
+- WpDbus *self = wp_transition_get_source_object (transition);
++ WpTransition *transition;
++ WpDbus *self;
+ g_autoptr (GError) error = NULL;
+
++ if (WP_IS_TRANSITION (data)) {
++ // coming from wp_dbus_enable
++ transition = WP_TRANSITION (data);
++ self = wp_transition_get_source_object (transition);
++ } else {
++ // coming from on_sync_reconnect
++ transition = NULL;
++ self = WP_DBUS (data);
++ }
++
+ self->connection = g_dbus_connection_new_for_address_finish (res, &error);
+ if (!self->connection) {
+- g_prefix_error (&error, "Failed to connect to bus: ");
+- wp_transition_return_error (transition, g_steal_pointer (&error));
++ if (transition) {
++ g_prefix_error (&error, "Failed to connect to bus: ");
++ wp_transition_return_error (transition, g_steal_pointer (&error));
++ }
+ return;
+ }
+
+GitLab
diff --git a/media-video/wireplumber/wireplumber-0.4.11-r2.ebuild b/media-video/wireplumber/wireplumber-0.4.11-r2.ebuild
new file mode 100644
index 000000000000..804d3273b583
--- /dev/null
+++ b/media-video/wireplumber/wireplumber-0.4.11-r2.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# 1. Please regularly check (even at the point of bumping) Fedora's packaging
+# for needed backports at https://src.fedoraproject.org/rpms/wireplumber/tree/rawhide
+#
+# 2. Keep an eye on git master (for both PipeWire and WirePlumber) as things
+# continue to move quickly. It's not uncommon for fixes to be made shortly
+# after releases.
+
+LUA_COMPAT=( lua5-{3,4} )
+
+inherit lua-single meson systemd
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://gitlab.freedesktop.org/pipewire/${PN}.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+else
+ SRC_URI="https://gitlab.freedesktop.org/pipewire/${PN}/-/archive/${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+DESCRIPTION="Replacement for pipewire-media-session"
+HOMEPAGE="https://gitlab.freedesktop.org/pipewire/wireplumber"
+
+LICENSE="MIT"
+SLOT="0/0.4"
+IUSE="elogind system-service systemd test"
+
+REQUIRED_USE="
+ ${LUA_REQUIRED_USE}
+ ?? ( elogind systemd )
+ system-service? ( systemd )
+"
+
+RESTRICT="!test? ( test )"
+
+# introspection? ( dev-libs/gobject-introspection ) is valid but likely only used for doc building
+BDEPEND="
+ dev-libs/glib
+ dev-util/gdbus-codegen
+ dev-util/glib-utils
+ sys-devel/gettext
+"
+
+DEPEND="
+ ${LUA_DEPS}
+ >=dev-libs/glib-2.62
+ >=media-video/pipewire-0.3.53-r1:=
+ virtual/libintl
+ elogind? ( sys-auth/elogind )
+ systemd? ( sys-apps/systemd )
+"
+
+# Any dev-lua/* deps get declared like this inside RDEPEND:
+# $(lua_gen_cond_dep '
+# dev-lua/<NAME>[${LUA_USEDEP}]
+# ')
+RDEPEND="${DEPEND}
+ system-service? (
+ acct-user/pipewire
+ acct-group/pipewire
+ )
+"
+
+DOCS=( {NEWS,README}.rst )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.4.10-config-disable-sound-server-parts.patch # defer enabling sound server parts to media-video/pipewire
+ "${FILESDIR}"/${P}-alsa-lua-crash.patch
+ "${FILESDIR}"/${P}-dbus-reconnect-crash.patch
+)
+
+src_configure() {
+ local emesonargs=(
+ -Ddoc=disabled # Ebuild not wired up yet (Sphinx, Doxygen?)
+ -Dintrospection=disabled # Only used for Sphinx doc generation
+ -Dsystem-lua=true # We always unbundle everything we can
+ -Dsystem-lua-version=$(ver_cut 1-2 $(lua_get_version))
+ $(meson_feature elogind)
+ $(meson_feature systemd)
+ $(meson_use system-service systemd-system-service)
+ $(meson_use systemd systemd-user-service)
+ -Dsystemd-system-unit-dir=$(systemd_get_systemunitdir)
+ -Dsystemd-user-unit-dir=$(systemd_get_userunitdir)
+ $(meson_use test tests)
+ )
+
+ meson_src_configure
+}
+
+src_install() {
+ meson_src_install
+
+ # We copy the default config, so that Gentoo tools can pick up on any
+ # updates and /etc does not end up with stale overrides.
+ # If a reflinking CoW filesystem is used (e.g. Btrfs), then the files
+ # will not actually get stored twice until modified.
+ insinto /etc
+ doins -r "${ED}"/usr/share/wireplumber
+}
+
+pkg_postinst() {
+ if systemd_is_booted ; then
+ ewarn "pipewire-media-session.service is no longer installed. You must switch"
+ ewarn "to wireplumber.service user unit before your next logout/reboot:"
+ ewarn "systemctl --user disable pipewire-media-session.service"
+ ewarn "systemctl --user --force enable wireplumber.service"
+ else
+ ewarn "Switch to WirePlumber will happen the next time gentoo-pipewire-launcher"
+ ewarn "is started (a replacement for directly calling pipewire binary)."
+ ewarn
+ ewarn "Please ensure that ${EROOT}/etc/pipewire/pipewire.conf either does not exist"
+ ewarn "or, if it does exist, that any reference to"
+ ewarn "${EROOT}/usr/bin/pipewire-media-session is commented out (begins with a #)."
+ fi
+ if use system-service; then
+ ewarn
+ ewarn "WARNING: you have enabled the system-service USE flag, which installs"
+ ewarn "the system-wide systemd units that enable WirePlumber to run as a system"
+ ewarn "service. This is more than likely NOT what you want. You are strongly"
+ ewarn "advised not to enable this mode and instead stick with systemd user"
+ ewarn "units. The default configuration files will likely not work out of"
+ ewarn "box, and you are on your own with configuration."
+ ewarn
+ fi
+}
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/wireplumber/files/, media-video/wireplumber/
@ 2022-08-26 10:51 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2022-08-26 10:51 UTC (permalink / raw
To: gentoo-commits
commit: 916a0b55068c037e5871ab411da6c3a2e5444349
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 26 10:51:07 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Aug 26 10:51:07 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=916a0b55
media-video/wireplumber: backport 100% CPU loop fixes
Closes: https://bugs.gentoo.org/866551
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/wireplumber-0.4.11-loop.patch | 147 +++++++++++++++++++++
.../wireplumber/wireplumber-0.4.11-r3.ebuild | 131 ++++++++++++++++++
2 files changed, 278 insertions(+)
diff --git a/media-video/wireplumber/files/wireplumber-0.4.11-loop.patch b/media-video/wireplumber/files/wireplumber-0.4.11-loop.patch
new file mode 100644
index 000000000000..75e2bafcaddc
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.11-loop.patch
@@ -0,0 +1,147 @@
+https://bugs.gentoo.org/866551
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/37c839b9308cd3d6580bf01077db8cb29ec2aa2f
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/370b692933634675213110048fcda6dff52eb52b
+
+From: Pauli Virtanen <pav@iki.fi>
+Date: Tue, 19 Jul 2022 20:39:06 +0300
+Subject: [PATCH] policy-node: fix potential rescan loop
+
+SiLink activation might be delayed indefinitely under some error
+conditions. Currently, policy-node schedules a rescan when it sees a
+non-activated link on a stream to be moved, which produces busy loop if
+the si-link doesn't activate.
+
+Instead of rescheduling on non-active si-links, just remove and emit a
+warning. The si-link then gets removed once it gets activated.
+
+Reproducer:
+
+1. Play audio from Rhythmbox and pause.
+2. Switch default output with pactl between two different outputs
+3. Links from the paused stream stay at "init"
+--- a/src/scripts/policy-node.lua
++++ b/src/scripts/policy-node.lua
+@@ -694,16 +694,15 @@ function handleLinkable (si)
+ local link = lookupLink (si_id, si_flags[si_id].peer_id)
+ if reconnect then
+ if link ~= nil then
+- -- remove old link if active, otherwise schedule rescan
+- if ((link:get_active_features() & Feature.SessionItem.ACTIVE) ~= 0) then
+- si_flags[si_id].peer_id = nil
+- link:remove ()
+- Log.info (si, "... moving to new target")
+- else
+- scheduleRescan()
+- Log.info (si, "... scheduled rescan")
+- return
++ -- remove old link
++ if ((link:get_active_features() & Feature.SessionItem.ACTIVE) == 0) then
++ -- remove also not yet activated links: they might never become active,
++ -- and we should not loop waiting for them
++ Log.warning (link, "Link was not activated before removing")
+ end
++ si_flags[si_id].peer_id = nil
++ link:remove ()
++ Log.info (si, "... moving to new target")
+ end
+ else
+ if link ~= nil then
+GitLab
+
+From: Pauli Virtanen <pav@iki.fi>
+Date: Tue, 19 Jul 2022 20:01:10 +0300
+Subject: [PATCH] m-si-link: don't wait for establish before activation +
+ cleanup links
+
+SiLink should not wait for WpLinks becoming ESTABLISHED, before
+activation. That flag shows whether a link has moved away from the
+"init" state, however, links to e.g. Pulseaudio corked streams can stay
+in "init" state until uncorking. This causes trouble for policies,
+which needlessly wait for such links to establish.
+
+The WpLink objects may also be kept alive by other referents, and
+just unrefing them does not necessarily destroy the PW objects.
+
+Activate SiLink even if the WpLink is still in "init" state. It's enough
+that the link otherwise successfully establishes.
+
+At dispose time, explicitly request destroying the WpLinks that were
+created by the SiLink, to ensure they are removed even if there's
+something else referring to them.
+--- a/modules/module-si-standard-link.c
++++ b/modules/module-si-standard-link.c
+@@ -132,6 +132,27 @@ si_standard_link_get_associated_proxy (WpSessionItem * item, GType proxy_type)
+ return NULL;
+ }
+
++static void
++request_destroy_link (gpointer data, gpointer user_data)
++{
++ WpLink *link = WP_LINK (data);
++
++ wp_global_proxy_request_destroy (WP_GLOBAL_PROXY (link));
++}
++
++static void
++clear_node_links (GPtrArray **node_links_p)
++{
++ /*
++ * Something else (eg. object managers) may be keeping the WpLink
++ * objects alive. Deactive the links now, to destroy the PW objects.
++ */
++ if (*node_links_p)
++ g_ptr_array_foreach (*node_links_p, request_destroy_link, NULL);
++
++ g_clear_pointer (node_links_p, g_ptr_array_unref);
++}
++
+ static void
+ si_standard_link_disable_active (WpSessionItem *si)
+ {
+@@ -154,7 +175,8 @@ si_standard_link_disable_active (WpSessionItem *si)
+ WP_SI_LINKABLE (si_in));
+ }
+
+- g_clear_pointer (&self->node_links, g_ptr_array_unref);
++ clear_node_links (&self->node_links);
++
+ self->n_active_links = 0;
+ self->n_failed_links = 0;
+ self->n_async_ops_wait = 0;
+@@ -168,7 +190,7 @@ on_link_activated (WpObject * proxy, GAsyncResult * res,
+ WpTransition * transition)
+ {
+ WpSiStandardLink *self = wp_transition_get_source_object (transition);
+- guint len = self->node_links->len;
++ guint len = self->node_links ? self->node_links->len : 0;
+
+ /* Count the number of failed and active links */
+ if (wp_object_activate_finish (proxy, res, NULL))
+@@ -182,7 +204,7 @@ on_link_activated (WpObject * proxy, GAsyncResult * res,
+
+ /* We only active feature if all links activated successfully */
+ if (self->n_failed_links > 0) {
+- g_clear_pointer (&self->node_links, g_ptr_array_unref);
++ clear_node_links (&self->node_links);
+ wp_transition_return_error (transition, g_error_new (
+ WP_DOMAIN_LIBRARY, WP_LIBRARY_ERROR_OPERATION_FAILED,
+ "%d of %d PipeWire links failed to activate",
+@@ -251,7 +273,7 @@ create_links (WpSiStandardLink * self, WpTransition * transition,
+ /* Clear old links if any */
+ self->n_active_links = 0;
+ self->n_failed_links = 0;
+- g_clear_pointer (&self->node_links, g_ptr_array_unref);
++ clear_node_links (&self->node_links);
+
+ /* tuple format:
+ uint32 node_id;
+@@ -327,7 +349,7 @@ create_links (WpSiStandardLink * self, WpTransition * transition,
+
+ /* activate to ensure it is created without errors */
+ wp_object_activate_closure (WP_OBJECT (link),
+- WP_OBJECT_FEATURES_ALL, NULL,
++ WP_OBJECT_FEATURES_ALL & ~WP_LINK_FEATURE_ESTABLISHED, NULL,
+ g_cclosure_new_object (
+ (GCallback) on_link_activated, G_OBJECT (transition)));
+ }
+GitLab
diff --git a/media-video/wireplumber/wireplumber-0.4.11-r3.ebuild b/media-video/wireplumber/wireplumber-0.4.11-r3.ebuild
new file mode 100644
index 000000000000..99ca2c5c7956
--- /dev/null
+++ b/media-video/wireplumber/wireplumber-0.4.11-r3.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# 1. Please regularly check (even at the point of bumping) Fedora's packaging
+# for needed backports at https://src.fedoraproject.org/rpms/wireplumber/tree/rawhide
+#
+# 2. Keep an eye on git master (for both PipeWire and WirePlumber) as things
+# continue to move quickly. It's not uncommon for fixes to be made shortly
+# after releases.
+
+LUA_COMPAT=( lua5-{3,4} )
+
+inherit lua-single meson systemd
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://gitlab.freedesktop.org/pipewire/${PN}.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+else
+ SRC_URI="https://gitlab.freedesktop.org/pipewire/${PN}/-/archive/${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+DESCRIPTION="Replacement for pipewire-media-session"
+HOMEPAGE="https://gitlab.freedesktop.org/pipewire/wireplumber"
+
+LICENSE="MIT"
+SLOT="0/0.4"
+IUSE="elogind system-service systemd test"
+
+REQUIRED_USE="
+ ${LUA_REQUIRED_USE}
+ ?? ( elogind systemd )
+ system-service? ( systemd )
+"
+
+RESTRICT="!test? ( test )"
+
+# introspection? ( dev-libs/gobject-introspection ) is valid but likely only used for doc building
+BDEPEND="
+ dev-libs/glib
+ dev-util/gdbus-codegen
+ dev-util/glib-utils
+ sys-devel/gettext
+"
+
+DEPEND="
+ ${LUA_DEPS}
+ >=dev-libs/glib-2.62
+ >=media-video/pipewire-0.3.53-r1:=
+ virtual/libintl
+ elogind? ( sys-auth/elogind )
+ systemd? ( sys-apps/systemd )
+"
+
+# Any dev-lua/* deps get declared like this inside RDEPEND:
+# $(lua_gen_cond_dep '
+# dev-lua/<NAME>[${LUA_USEDEP}]
+# ')
+RDEPEND="${DEPEND}
+ system-service? (
+ acct-user/pipewire
+ acct-group/pipewire
+ )
+"
+
+DOCS=( {NEWS,README}.rst )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.4.10-config-disable-sound-server-parts.patch # defer enabling sound server parts to media-video/pipewire
+ "${FILESDIR}"/${P}-alsa-lua-crash.patch
+ "${FILESDIR}"/${P}-dbus-reconnect-crash.patch
+ "${FILESDIR}"/${P}-loop.patch
+)
+
+src_configure() {
+ local emesonargs=(
+ -Ddoc=disabled # Ebuild not wired up yet (Sphinx, Doxygen?)
+ -Dintrospection=disabled # Only used for Sphinx doc generation
+ -Dsystem-lua=true # We always unbundle everything we can
+ -Dsystem-lua-version=$(ver_cut 1-2 $(lua_get_version))
+ $(meson_feature elogind)
+ $(meson_feature systemd)
+ $(meson_use system-service systemd-system-service)
+ $(meson_use systemd systemd-user-service)
+ -Dsystemd-system-unit-dir=$(systemd_get_systemunitdir)
+ -Dsystemd-user-unit-dir=$(systemd_get_userunitdir)
+ $(meson_use test tests)
+ )
+
+ meson_src_configure
+}
+
+src_install() {
+ meson_src_install
+
+ # We copy the default config, so that Gentoo tools can pick up on any
+ # updates and /etc does not end up with stale overrides.
+ # If a reflinking CoW filesystem is used (e.g. Btrfs), then the files
+ # will not actually get stored twice until modified.
+ insinto /etc
+ doins -r "${ED}"/usr/share/wireplumber
+}
+
+pkg_postinst() {
+ if systemd_is_booted ; then
+ ewarn "pipewire-media-session.service is no longer installed. You must switch"
+ ewarn "to wireplumber.service user unit before your next logout/reboot:"
+ ewarn "systemctl --user disable pipewire-media-session.service"
+ ewarn "systemctl --user --force enable wireplumber.service"
+ else
+ ewarn "Switch to WirePlumber will happen the next time gentoo-pipewire-launcher"
+ ewarn "is started (a replacement for directly calling pipewire binary)."
+ ewarn
+ ewarn "Please ensure that ${EROOT}/etc/pipewire/pipewire.conf either does not exist"
+ ewarn "or, if it does exist, that any reference to"
+ ewarn "${EROOT}/usr/bin/pipewire-media-session is commented out (begins with a #)."
+ fi
+ if use system-service; then
+ ewarn
+ ewarn "WARNING: you have enabled the system-service USE flag, which installs"
+ ewarn "the system-wide systemd units that enable WirePlumber to run as a system"
+ ewarn "service. This is more than likely NOT what you want. You are strongly"
+ ewarn "advised not to enable this mode and instead stick with systemd user"
+ ewarn "units. The default configuration files will likely not work out of"
+ ewarn "box, and you are on your own with configuration."
+ ewarn
+ fi
+}
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/wireplumber/files/, media-video/wireplumber/
@ 2022-12-10 4:36 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2022-12-10 4:36 UTC (permalink / raw
To: gentoo-commits
commit: 995ecdbe98cdd53e619e8010263680e7b6328c9b
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 10 04:30:25 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec 10 04:35:06 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=995ecdbe
media-video/wireplumber: drop 0.4.11-r3
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-video/wireplumber/Manifest | 1 -
.../files/wireplumber-0.4.11-alsa-lua-crash.patch | 33 -----
.../wireplumber-0.4.11-dbus-reconnect-crash.patch | 45 -------
.../files/wireplumber-0.4.11-loop.patch | 147 ---------------------
.../wireplumber/wireplumber-0.4.11-r3.ebuild | 131 ------------------
5 files changed, 357 deletions(-)
diff --git a/media-video/wireplumber/Manifest b/media-video/wireplumber/Manifest
index bc9a9c83c560..f04df271892e 100644
--- a/media-video/wireplumber/Manifest
+++ b/media-video/wireplumber/Manifest
@@ -1,2 +1 @@
-DIST wireplumber-0.4.11.tar.gz 403931 BLAKE2B 77ef2540081420d4255dcb54165d0aceb08d97c60d19b9eb7606e90cf95e305e690794a1f46234b53b13765452fea0d23ae6acae9deea672db67e21c31d2307d SHA512 73a5120cd0c55b5fe5248cc22497efd23e40bb91961553639d9cf1bbf138d273db65153fa3c1bb0d2794f869e077e011156d323832534f62651d66f8cc87dca4
DIST wireplumber-0.4.12.tar.bz2 317524 BLAKE2B 5f020759fab459fb3311f8a5cddddef2bf7dc62304b6e95f5d983b86b0e6ddef7bc16c4f2ef6a36264d7ed94e48dbb4c66ff3389bfd7ca58841b4fd6cdfb21bc SHA512 79827ea9f61bacf8df80f9cd0ca4c80192cf85a1b181a51256b3c845d1d04a690ea5c1270d6d5d05d56f799f16980a593e61d003ef78ad7dc8d5e9ea332aa5d4
diff --git a/media-video/wireplumber/files/wireplumber-0.4.11-alsa-lua-crash.patch b/media-video/wireplumber/files/wireplumber-0.4.11-alsa-lua-crash.patch
deleted file mode 100644
index 3bc8bbd08bb6..000000000000
--- a/media-video/wireplumber/files/wireplumber-0.4.11-alsa-lua-crash.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/c16e637c329bc9dda8544b18f5bd47a8d63ee253
-
-From c16e637c329bc9dda8544b18f5bd47a8d63ee253 Mon Sep 17 00:00:00 2001
-From: George Kiagiadakis <george.kiagiadakis@collabora.com>
-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
---- 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/media-video/wireplumber/files/wireplumber-0.4.11-dbus-reconnect-crash.patch b/media-video/wireplumber/files/wireplumber-0.4.11-dbus-reconnect-crash.patch
deleted file mode 100644
index 6098ed11c302..000000000000
--- a/media-video/wireplumber/files/wireplumber-0.4.11-dbus-reconnect-crash.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/eb406bdb2cbbcd49c55c71285f8f2eddb624d24b
-
-From eb406bdb2cbbcd49c55c71285f8f2eddb624d24b Mon Sep 17 00:00:00 2001
-From: George Kiagiadakis <george.kiagiadakis@collabora.com>
-Date: Wed, 13 Jul 2022 13:38:14 +0300
-Subject: [PATCH] dbus: fix crash when trying to reconnect
-
-When coming from on_sync_reconnect, data points to the WpDBus object
-instead of the activation transition.
-
-Fixes: #305
---- a/lib/wp/dbus.c
-+++ b/lib/wp/dbus.c
-@@ -58,14 +58,26 @@ wp_dbus_set_state (WpDbus *self, WpDBusState new_state)
- static void
- on_got_bus (GObject * obj, GAsyncResult * res, gpointer data)
- {
-- WpTransition *transition = WP_TRANSITION (data);
-- WpDbus *self = wp_transition_get_source_object (transition);
-+ WpTransition *transition;
-+ WpDbus *self;
- g_autoptr (GError) error = NULL;
-
-+ if (WP_IS_TRANSITION (data)) {
-+ // coming from wp_dbus_enable
-+ transition = WP_TRANSITION (data);
-+ self = wp_transition_get_source_object (transition);
-+ } else {
-+ // coming from on_sync_reconnect
-+ transition = NULL;
-+ self = WP_DBUS (data);
-+ }
-+
- self->connection = g_dbus_connection_new_for_address_finish (res, &error);
- if (!self->connection) {
-- g_prefix_error (&error, "Failed to connect to bus: ");
-- wp_transition_return_error (transition, g_steal_pointer (&error));
-+ if (transition) {
-+ g_prefix_error (&error, "Failed to connect to bus: ");
-+ wp_transition_return_error (transition, g_steal_pointer (&error));
-+ }
- return;
- }
-
-GitLab
diff --git a/media-video/wireplumber/files/wireplumber-0.4.11-loop.patch b/media-video/wireplumber/files/wireplumber-0.4.11-loop.patch
deleted file mode 100644
index 75e2bafcaddc..000000000000
--- a/media-video/wireplumber/files/wireplumber-0.4.11-loop.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-https://bugs.gentoo.org/866551
-https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/37c839b9308cd3d6580bf01077db8cb29ec2aa2f
-https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/370b692933634675213110048fcda6dff52eb52b
-
-From: Pauli Virtanen <pav@iki.fi>
-Date: Tue, 19 Jul 2022 20:39:06 +0300
-Subject: [PATCH] policy-node: fix potential rescan loop
-
-SiLink activation might be delayed indefinitely under some error
-conditions. Currently, policy-node schedules a rescan when it sees a
-non-activated link on a stream to be moved, which produces busy loop if
-the si-link doesn't activate.
-
-Instead of rescheduling on non-active si-links, just remove and emit a
-warning. The si-link then gets removed once it gets activated.
-
-Reproducer:
-
-1. Play audio from Rhythmbox and pause.
-2. Switch default output with pactl between two different outputs
-3. Links from the paused stream stay at "init"
---- a/src/scripts/policy-node.lua
-+++ b/src/scripts/policy-node.lua
-@@ -694,16 +694,15 @@ function handleLinkable (si)
- local link = lookupLink (si_id, si_flags[si_id].peer_id)
- if reconnect then
- if link ~= nil then
-- -- remove old link if active, otherwise schedule rescan
-- if ((link:get_active_features() & Feature.SessionItem.ACTIVE) ~= 0) then
-- si_flags[si_id].peer_id = nil
-- link:remove ()
-- Log.info (si, "... moving to new target")
-- else
-- scheduleRescan()
-- Log.info (si, "... scheduled rescan")
-- return
-+ -- remove old link
-+ if ((link:get_active_features() & Feature.SessionItem.ACTIVE) == 0) then
-+ -- remove also not yet activated links: they might never become active,
-+ -- and we should not loop waiting for them
-+ Log.warning (link, "Link was not activated before removing")
- end
-+ si_flags[si_id].peer_id = nil
-+ link:remove ()
-+ Log.info (si, "... moving to new target")
- end
- else
- if link ~= nil then
-GitLab
-
-From: Pauli Virtanen <pav@iki.fi>
-Date: Tue, 19 Jul 2022 20:01:10 +0300
-Subject: [PATCH] m-si-link: don't wait for establish before activation +
- cleanup links
-
-SiLink should not wait for WpLinks becoming ESTABLISHED, before
-activation. That flag shows whether a link has moved away from the
-"init" state, however, links to e.g. Pulseaudio corked streams can stay
-in "init" state until uncorking. This causes trouble for policies,
-which needlessly wait for such links to establish.
-
-The WpLink objects may also be kept alive by other referents, and
-just unrefing them does not necessarily destroy the PW objects.
-
-Activate SiLink even if the WpLink is still in "init" state. It's enough
-that the link otherwise successfully establishes.
-
-At dispose time, explicitly request destroying the WpLinks that were
-created by the SiLink, to ensure they are removed even if there's
-something else referring to them.
---- a/modules/module-si-standard-link.c
-+++ b/modules/module-si-standard-link.c
-@@ -132,6 +132,27 @@ si_standard_link_get_associated_proxy (WpSessionItem * item, GType proxy_type)
- return NULL;
- }
-
-+static void
-+request_destroy_link (gpointer data, gpointer user_data)
-+{
-+ WpLink *link = WP_LINK (data);
-+
-+ wp_global_proxy_request_destroy (WP_GLOBAL_PROXY (link));
-+}
-+
-+static void
-+clear_node_links (GPtrArray **node_links_p)
-+{
-+ /*
-+ * Something else (eg. object managers) may be keeping the WpLink
-+ * objects alive. Deactive the links now, to destroy the PW objects.
-+ */
-+ if (*node_links_p)
-+ g_ptr_array_foreach (*node_links_p, request_destroy_link, NULL);
-+
-+ g_clear_pointer (node_links_p, g_ptr_array_unref);
-+}
-+
- static void
- si_standard_link_disable_active (WpSessionItem *si)
- {
-@@ -154,7 +175,8 @@ si_standard_link_disable_active (WpSessionItem *si)
- WP_SI_LINKABLE (si_in));
- }
-
-- g_clear_pointer (&self->node_links, g_ptr_array_unref);
-+ clear_node_links (&self->node_links);
-+
- self->n_active_links = 0;
- self->n_failed_links = 0;
- self->n_async_ops_wait = 0;
-@@ -168,7 +190,7 @@ on_link_activated (WpObject * proxy, GAsyncResult * res,
- WpTransition * transition)
- {
- WpSiStandardLink *self = wp_transition_get_source_object (transition);
-- guint len = self->node_links->len;
-+ guint len = self->node_links ? self->node_links->len : 0;
-
- /* Count the number of failed and active links */
- if (wp_object_activate_finish (proxy, res, NULL))
-@@ -182,7 +204,7 @@ on_link_activated (WpObject * proxy, GAsyncResult * res,
-
- /* We only active feature if all links activated successfully */
- if (self->n_failed_links > 0) {
-- g_clear_pointer (&self->node_links, g_ptr_array_unref);
-+ clear_node_links (&self->node_links);
- wp_transition_return_error (transition, g_error_new (
- WP_DOMAIN_LIBRARY, WP_LIBRARY_ERROR_OPERATION_FAILED,
- "%d of %d PipeWire links failed to activate",
-@@ -251,7 +273,7 @@ create_links (WpSiStandardLink * self, WpTransition * transition,
- /* Clear old links if any */
- self->n_active_links = 0;
- self->n_failed_links = 0;
-- g_clear_pointer (&self->node_links, g_ptr_array_unref);
-+ clear_node_links (&self->node_links);
-
- /* tuple format:
- uint32 node_id;
-@@ -327,7 +349,7 @@ create_links (WpSiStandardLink * self, WpTransition * transition,
-
- /* activate to ensure it is created without errors */
- wp_object_activate_closure (WP_OBJECT (link),
-- WP_OBJECT_FEATURES_ALL, NULL,
-+ WP_OBJECT_FEATURES_ALL & ~WP_LINK_FEATURE_ESTABLISHED, NULL,
- g_cclosure_new_object (
- (GCallback) on_link_activated, G_OBJECT (transition)));
- }
-GitLab
diff --git a/media-video/wireplumber/wireplumber-0.4.11-r3.ebuild b/media-video/wireplumber/wireplumber-0.4.11-r3.ebuild
deleted file mode 100644
index 4904287cdb8b..000000000000
--- a/media-video/wireplumber/wireplumber-0.4.11-r3.ebuild
+++ /dev/null
@@ -1,131 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# 1. Please regularly check (even at the point of bumping) Fedora's packaging
-# for needed backports at https://src.fedoraproject.org/rpms/wireplumber/tree/rawhide
-#
-# 2. Keep an eye on git master (for both PipeWire and WirePlumber) as things
-# continue to move quickly. It's not uncommon for fixes to be made shortly
-# after releases.
-
-LUA_COMPAT=( lua5-{3,4} )
-
-inherit lua-single meson systemd
-
-if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://gitlab.freedesktop.org/pipewire/${PN}.git"
- EGIT_BRANCH="master"
- inherit git-r3
-else
- SRC_URI="https://gitlab.freedesktop.org/pipewire/${PN}/-/archive/${PV}/${P}.tar.gz"
- KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv ~sparc x86"
-fi
-
-DESCRIPTION="Replacement for pipewire-media-session"
-HOMEPAGE="https://gitlab.freedesktop.org/pipewire/wireplumber"
-
-LICENSE="MIT"
-SLOT="0/0.4"
-IUSE="elogind system-service systemd test"
-
-REQUIRED_USE="
- ${LUA_REQUIRED_USE}
- ?? ( elogind systemd )
- system-service? ( systemd )
-"
-
-RESTRICT="!test? ( test )"
-
-# introspection? ( dev-libs/gobject-introspection ) is valid but likely only used for doc building
-BDEPEND="
- dev-libs/glib
- dev-util/gdbus-codegen
- dev-util/glib-utils
- sys-devel/gettext
-"
-
-DEPEND="
- ${LUA_DEPS}
- >=dev-libs/glib-2.62
- >=media-video/pipewire-0.3.53-r1:=
- virtual/libintl
- elogind? ( sys-auth/elogind )
- systemd? ( sys-apps/systemd )
-"
-
-# Any dev-lua/* deps get declared like this inside RDEPEND:
-# $(lua_gen_cond_dep '
-# dev-lua/<NAME>[${LUA_USEDEP}]
-# ')
-RDEPEND="${DEPEND}
- system-service? (
- acct-user/pipewire
- acct-group/pipewire
- )
-"
-
-DOCS=( {NEWS,README}.rst )
-
-PATCHES=(
- "${FILESDIR}"/${PN}-0.4.10-config-disable-sound-server-parts.patch # defer enabling sound server parts to media-video/pipewire
- "${FILESDIR}"/${P}-alsa-lua-crash.patch
- "${FILESDIR}"/${P}-dbus-reconnect-crash.patch
- "${FILESDIR}"/${P}-loop.patch
-)
-
-src_configure() {
- local emesonargs=(
- -Ddoc=disabled # Ebuild not wired up yet (Sphinx, Doxygen?)
- -Dintrospection=disabled # Only used for Sphinx doc generation
- -Dsystem-lua=true # We always unbundle everything we can
- -Dsystem-lua-version=$(ver_cut 1-2 $(lua_get_version))
- $(meson_feature elogind)
- $(meson_feature systemd)
- $(meson_use system-service systemd-system-service)
- $(meson_use systemd systemd-user-service)
- -Dsystemd-system-unit-dir=$(systemd_get_systemunitdir)
- -Dsystemd-user-unit-dir=$(systemd_get_userunitdir)
- $(meson_use test tests)
- )
-
- meson_src_configure
-}
-
-src_install() {
- meson_src_install
-
- # We copy the default config, so that Gentoo tools can pick up on any
- # updates and /etc does not end up with stale overrides.
- # If a reflinking CoW filesystem is used (e.g. Btrfs), then the files
- # will not actually get stored twice until modified.
- insinto /etc
- doins -r "${ED}"/usr/share/wireplumber
-}
-
-pkg_postinst() {
- if systemd_is_booted ; then
- ewarn "pipewire-media-session.service is no longer installed. You must switch"
- ewarn "to wireplumber.service user unit before your next logout/reboot:"
- ewarn "systemctl --user disable pipewire-media-session.service"
- ewarn "systemctl --user --force enable wireplumber.service"
- else
- ewarn "Switch to WirePlumber will happen the next time gentoo-pipewire-launcher"
- ewarn "is started (a replacement for directly calling pipewire binary)."
- ewarn
- ewarn "Please ensure that ${EROOT}/etc/pipewire/pipewire.conf either does not exist"
- ewarn "or, if it does exist, that any reference to"
- ewarn "${EROOT}/usr/bin/pipewire-media-session is commented out (begins with a #)."
- fi
- if use system-service; then
- ewarn
- ewarn "WARNING: you have enabled the system-service USE flag, which installs"
- ewarn "the system-wide systemd units that enable WirePlumber to run as a system"
- ewarn "service. This is more than likely NOT what you want. You are strongly"
- ewarn "advised not to enable this mode and instead stick with systemd user"
- ewarn "units. The default configuration files will likely not work out of"
- ewarn "box, and you are on your own with configuration."
- ewarn
- fi
-}
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/wireplumber/files/, media-video/wireplumber/
@ 2024-03-19 5:48 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2024-03-19 5:48 UTC (permalink / raw
To: gentoo-commits
commit: 7149f311e97fb3a4d7f443359e239431a06871ff
Author: Igor V. Kovalenko <igor.v.kovalenko <AT> gmail <DOT> com>
AuthorDate: Fri Feb 2 20:04:07 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Mar 19 05:21:38 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7149f311
media-video/wireplumber: Amend sound-server split, new conf syntax
Bug: https://bugs.gentoo.org/921393
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
...-0.4.81-config-disable-sound-server-parts.patch | 27 ++++++++++++++++++++++
media-video/wireplumber/wireplumber-9999.ebuild | 4 ++--
2 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/media-video/wireplumber/files/wireplumber-0.4.81-config-disable-sound-server-parts.patch b/media-video/wireplumber/files/wireplumber-0.4.81-config-disable-sound-server-parts.patch
new file mode 100644
index 000000000000..3a9e828837b5
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.81-config-disable-sound-server-parts.patch
@@ -0,0 +1,27 @@
+From ed5ce9c176db2e26ac9915b4d86c3a076a8093ae Mon Sep 17 00:00:00 2001
+From: "Igor V. Kovalenko" <igor.v.kovalenko@gmail.com>
+Date: Fri, 2 Feb 2024 22:00:03 +0300
+Subject: [PATCH] config: Disable alsa and bluez monitors by default
+
+---
+ src/config/wireplumber.conf | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/config/wireplumber.conf b/src/config/wireplumber.conf
+index 822b7967..ca0faa0a 100644
+--- a/src/config/wireplumber.conf
++++ b/src/config/wireplumber.conf
+@@ -64,8 +64,8 @@ wireplumber.profiles = {
+ support.settings = required
+ support.log-settings = required
+ metadata.sm-objects = required
+- hardware.audio = required
+- hardware.bluetooth = required
++ #hardware.audio = required
++ #hardware.bluetooth = required
+ hardware.video-capture = required
+ policy.standard = required
+ #policy.role-priority-system = optional
+--
+2.43.0
+
diff --git a/media-video/wireplumber/wireplumber-9999.ebuild b/media-video/wireplumber/wireplumber-9999.ebuild
index 42e484bf9447..9b1c4d46ea55 100644
--- a/media-video/wireplumber/wireplumber-9999.ebuild
+++ b/media-video/wireplumber/wireplumber-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -70,7 +70,7 @@ RDEPEND="${DEPEND}
DOCS=( {NEWS,README}.rst )
PATCHES=(
- "${FILESDIR}"/${PN}-0.4.15-config-disable-sound-server-parts.patch # defer enabling sound server parts to media-video/pipewire
+ "${FILESDIR}"/${PN}-0.4.81-config-disable-sound-server-parts.patch # defer enabling sound server parts to media-video/pipewire
)
src_configure() {
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/wireplumber/files/, media-video/wireplumber/
@ 2024-09-13 2:10 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2024-09-13 2:10 UTC (permalink / raw
To: gentoo-commits
commit: 17048008b017505277071b5ca38aaf62bd57c244
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 13 02:10:05 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Sep 13 02:10:05 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17048008
media-video/wireplumber: backport autoswitch fix
We might now have a stable candidate.
Bug: https://bugs.gentoo.org/936967
Bug: https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/715
Signed-off-by: Sam James <sam <AT> gentoo.org>
...replumber-0.5.6-bluetooth-only-autoswitch.patch | 64 ++++++++++
.../wireplumber/wireplumber-0.5.6-r1.ebuild | 132 +++++++++++++++++++++
2 files changed, 196 insertions(+)
diff --git a/media-video/wireplumber/files/wireplumber-0.5.6-bluetooth-only-autoswitch.patch b/media-video/wireplumber/files/wireplumber-0.5.6-bluetooth-only-autoswitch.patch
new file mode 100644
index 000000000000..779a4d4f21bf
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.5.6-bluetooth-only-autoswitch.patch
@@ -0,0 +1,64 @@
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/715
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/669
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/b68a6794cd5c3702a2144be60c41a9ca982c416b
+
+From b68a6794cd5c3702a2144be60c41a9ca982c416b Mon Sep 17 00:00:00 2001
+From: Pauli Virtanen <pav@iki.fi>
+Date: Sun, 8 Sep 2024 20:22:41 +0300
+Subject: [PATCH] autoswitch-bluetooth-profile: switch only Bluetooth devices
+
+Handle only devices associated with Bluetooth loopback nodes.
+
+Make sure the node.link-group iteration cannot get stuck if there is a
+loop in the link graph.
+--- a/src/scripts/device/autoswitch-bluetooth-profile.lua
++++ b/src/scripts/device/autoswitch-bluetooth-profile.lua
+@@ -301,13 +301,14 @@ end
+
+ -- We consider a Stream of interest if it is linked to a bluetooth loopback
+ -- source filter
+-local function checkStreamStatus (stream, node_om)
++local function checkStreamStatus (stream, node_om, visited_link_groups)
+ -- check if the stream is linked to a bluetooth loopback source
+ local stream_id = tonumber(stream["bound-id"])
+ local peer_id = lutils.getNodePeerId (stream_id)
+ if peer_id ~= nil then
+ local bt_node = node_om:lookup {
+- Constraint { "bound-id", "=", peer_id, type = "gobject" }
++ Constraint { "bound-id", "=", peer_id, type = "gobject" },
++ Constraint { "bluez5.loopback", "=", "true", type = "pw" }
+ }
+ if bt_node ~= nil then
+ local dev_id = bt_node.properties["device.id"]
+@@ -325,18 +326,27 @@ local function checkStreamStatus (stream, node_om)
+ else
+ -- Check if it is linked to a filter main node, and recursively advance if so
+ local filter_main_node = node_om:lookup {
+- Constraint { "bound-id", "=", peer_id, type = "gobject" }
++ Constraint { "bound-id", "=", peer_id, type = "gobject" },
++ Constraint { "node.link-group", "+", type = "pw" }
+ }
+ if filter_main_node ~= nil then
+ -- Now check all stream nodes for this filter
+ local filter_link_group = filter_main_node.properties ["node.link-group"]
++ if visited_link_groups == nil then
++ visited_link_groups = {}
++ end
++ if visited_link_groups [filter_link_group] then
++ return nil
++ else
++ visited_link_groups [filter_link_group] = true
++ end
+ for filter_stream_node in node_om:iterate {
+ Constraint { "media.class", "matches", "Stream/Input/Audio", type = "pw-global" },
+ Constraint { "stream.monitor", "!", "true", type = "pw" },
+ Constraint { "bluez5.loopback", "!", "true", type = "pw" },
+ Constraint { "node.link-group", "=", filter_link_group, type = "pw" }
+ } do
+- local dev_id = checkStreamStatus (filter_stream_node, node_om)
++ local dev_id = checkStreamStatus (filter_stream_node, node_om, visited_link_groups)
+ if dev_id ~= nil then
+ return dev_id
+ end
+--
+GitLab
diff --git a/media-video/wireplumber/wireplumber-0.5.6-r1.ebuild b/media-video/wireplumber/wireplumber-0.5.6-r1.ebuild
new file mode 100644
index 000000000000..a5d10f865805
--- /dev/null
+++ b/media-video/wireplumber/wireplumber-0.5.6-r1.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# 1. Please regularly check (even at the point of bumping) Fedora's packaging
+# for needed backports at https://src.fedoraproject.org/rpms/wireplumber/tree/rawhide
+#
+# 2. Keep an eye on git master (for both PipeWire and WirePlumber) as things
+# continue to move quickly. It's not uncommon for fixes to be made shortly
+# after releases.
+
+LUA_COMPAT=( lua5-{3,4} )
+
+inherit lua-single meson systemd
+
+DESCRIPTION="Replacement for pipewire-media-session"
+HOMEPAGE="https://gitlab.freedesktop.org/pipewire/wireplumber"
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://gitlab.freedesktop.org/pipewire/${PN}.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+else
+ SRC_URI="https://gitlab.freedesktop.org/pipewire/${PN}/-/archive/${PV}/${P}.tar.bz2"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+LICENSE="MIT"
+SLOT="0/0.5"
+IUSE="elogind system-service systemd test"
+
+REQUIRED_USE="
+ ${LUA_REQUIRED_USE}
+ ?? ( elogind systemd )
+ system-service? ( systemd )
+"
+
+RESTRICT="!test? ( test )"
+
+# introspection? ( dev-libs/gobject-introspection ) is valid but likely only used for doc building
+BDEPEND="
+ dev-libs/glib
+ dev-util/gdbus-codegen
+ dev-util/glib-utils
+ sys-devel/gettext
+ test? ( sys-apps/dbus )
+"
+DEPEND="
+ ${LUA_DEPS}
+ >=dev-libs/glib-2.68
+ >=media-video/pipewire-1.0.5-r1:=
+ virtual/libintl
+ elogind? ( sys-auth/elogind )
+ systemd? ( sys-apps/systemd )
+"
+RDEPEND="
+ ${DEPEND}
+ system-service? (
+ acct-user/pipewire
+ acct-group/pipewire
+ )
+"
+
+DOCS=( {NEWS,README}.rst )
+
+PATCHES=(
+ # Defer enabling sound server parts to media-video/pipewire
+ # TODO: Soon, we should be able to migrate to just a dropin at
+ # /usr/share. See https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/652#note_2399735.
+ "${FILESDIR}"/${PN}-0.5.6-config-disable-sound-server-parts.patch
+
+ "${FILESDIR}"/${P}-bluetooth-only-autoswitch.patch
+)
+
+src_configure() {
+ local emesonargs=(
+ -Ddaemon=true
+ -Dtools=true
+ -Dmodules=true
+ # Ebuild not wired up yet (Sphinx, Doxygen?)
+ -Ddoc=disabled
+ # Only used for Sphinx doc generation
+ -Dintrospection=disabled
+ -Dsystem-lua=true
+ -Dsystem-lua-version=$(ver_cut 1-2 $(lua_get_version))
+ $(meson_feature elogind)
+ $(meson_feature systemd)
+ $(meson_use system-service systemd-system-service)
+ $(meson_use systemd systemd-user-service)
+ -Dsystemd-system-unit-dir=$(systemd_get_systemunitdir)
+ -Dsystemd-user-unit-dir=$(systemd_get_userunitdir)
+ $(meson_use test tests)
+ $(meson_use test dbus-tests)
+ )
+
+ meson_src_configure
+}
+
+src_install() {
+ meson_src_install
+
+ mv "${ED}"/usr/share/doc/wireplumber/* "${ED}"/usr/share/doc/${PF} || die
+ rmdir "${ED}"/usr/share/doc/wireplumber || die
+}
+
+pkg_postinst() {
+ if systemd_is_booted ; then
+ ewarn "pipewire-media-session.service is no longer installed. You must switch"
+ ewarn "to wireplumber.service user unit before your next logout/reboot:"
+ ewarn "systemctl --user disable pipewire-media-session.service"
+ ewarn "systemctl --user --force enable wireplumber.service"
+ else
+ ewarn "Switch to WirePlumber will happen the next time gentoo-pipewire-launcher"
+ ewarn "is started (a replacement for directly calling pipewire binary)."
+ ewarn
+ ewarn "Please ensure that ${EROOT}/etc/pipewire/pipewire.conf either does not exist"
+ ewarn "or, if it does exist, that any reference to"
+ ewarn "${EROOT}/usr/bin/pipewire-media-session is commented out (begins with a #)."
+ fi
+
+ if use system-service; then
+ ewarn
+ ewarn "WARNING: you have enabled the system-service USE flag, which installs"
+ ewarn "the system-wide systemd units that enable WirePlumber to run as a system"
+ ewarn "service. This is more than likely NOT what you want. You are strongly"
+ ewarn "advised not to enable this mode and instead stick with systemd user"
+ ewarn "units. The default configuration files will likely not work out of"
+ ewarn "box, and you are on your own with configuration."
+ ewarn
+ fi
+}
^ permalink raw reply related [flat|nested] 15+ messages in thread
end of thread, other threads:[~2024-09-13 2:11 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-01 19:49 [gentoo-commits] repo/gentoo:master commit in: media-video/wireplumber/files/, media-video/wireplumber/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2024-09-13 2:10 Sam James
2024-03-19 5:48 Sam James
2022-12-10 4:36 Sam James
2022-08-26 10:51 Sam James
2022-07-19 21:22 Sam James
2022-05-30 4:46 Sam James
2022-05-13 0:41 Sam James
2022-04-21 21:57 Sam James
2022-04-21 21:57 Sam James
2022-02-14 20:08 Sam James
2022-02-12 5:17 Sam James
2022-01-09 7:56 Sam James
2022-01-06 20:53 Sam James
2021-09-15 17:06 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox