public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/wireplumber/files/, media-video/wireplumber/
Date: Sat, 12 Feb 2022 05:17:07 +0000 (UTC)	[thread overview]
Message-ID: <1644643012.786a2d71d3bd51fc39dc73c548b7c9d7fa45096e.sam@gentoo> (raw)

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"


             reply	other threads:[~2022-02-12  5:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-12  5:17 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-15 19:01 [gentoo-commits] repo/gentoo:master commit in: media-video/wireplumber/files/, media-video/wireplumber/ Sam James
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-01-09  7:56 Sam James
2022-01-06 20:53 Sam James
2021-12-01 19:49 Sam James
2021-09-15 17:06 Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1644643012.786a2d71d3bd51fc39dc73c548b7c9d7fa45096e.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox