From ce880e7a6a120b3691de2c6e7031f544645dc69a Mon Sep 17 00:00:00 2001
From: Apertis CI robot <devel@lists.apertis.org>
Date: Tue, 18 Jan 2022 07:51:24 +0000
Subject: [PATCH] Release wireplumber version 0.4.7-1+apertis1

---
 debian/changelog                              | 14 +++
 ...-clean-up-unneeded-code-when-setting.patch | 31 -------
 ...-always-return-task-error-if-set-por.patch | 85 -------------------
 ...-always-return-transition-error-if-a.patch | 65 --------------
 ...-handle-proxy-destroyed-signal-when-.patch | 53 ------------
 debian/patches/series                         |  4 -
 6 files changed, 14 insertions(+), 238 deletions(-)
 delete mode 100644 debian/patches/0001-si-audio-adapter-clean-up-unneeded-code-when-setting.patch
 delete mode 100644 debian/patches/0002-si-audio-adapter-always-return-task-error-if-set-por.patch
 delete mode 100644 debian/patches/0003-si-standard-link-always-return-transition-error-if-a.patch
 delete mode 100644 debian/patches/0004-si-standard-link-handle-proxy-destroyed-signal-when-.patch
 delete mode 100644 debian/patches/series

diff --git a/debian/changelog b/debian/changelog
index 33265047..c8831167 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,17 @@
+wireplumber (0.4.7-1+apertis1) apertis; urgency=medium
+
+  * Sync updates from Debian bookworm
+  * Drop patches included in upstream release:
+    - 0001-si-audio-adapter-clean-up-unneeded-code-when-setting.patch
+    - 0002-si-audio-adapter-always-return-task-error-if-set-por.patch
+    - 0003-si-standard-link-always-return-transition-error-if-a.patch
+  * Drop patch not needed anymore:
+    - 0004-si-standard-link-handle-proxy-destroyed-signal-when-.patch
+  * Remaining Apertis delta:
+    - Install AppArmor rules
+
+ -- Apertis CI <devel@lists.apertis.org>  Tue, 18 Jan 2022 07:51:24 +0000
+
 wireplumber (0.4.7-1) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/patches/0001-si-audio-adapter-clean-up-unneeded-code-when-setting.patch b/debian/patches/0001-si-audio-adapter-clean-up-unneeded-code-when-setting.patch
deleted file mode 100644
index 494b877d..00000000
--- a/debian/patches/0001-si-audio-adapter-clean-up-unneeded-code-when-setting.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 9a1f4848d969bfa5691ff100cd26a3032495c50c Mon Sep 17 00:00:00 2001
-From: Julian Bouzas <julian.bouzas@collabora.com>
-Date: Thu, 18 Nov 2021 11:38:04 -0500
-Subject: [PATCH 1/4] si-audio-adapter: clean up unneeded code when setting
- ports format
-Content-Type: text/plain; charset="utf-8"
-Content-Transfer-Encoding: 8bit
-
----
- modules/module-si-audio-adapter.c | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/modules/module-si-audio-adapter.c b/modules/module-si-audio-adapter.c
-index 0087024..c1982b0 100644
---- a/modules/module-si-audio-adapter.c
-+++ b/modules/module-si-audio-adapter.c
-@@ -591,11 +591,9 @@ si_audio_adapter_set_ports_format (WpSiAdapter * item, WpSpaPod *f,
-     const gchar *mode, GAsyncReadyCallback callback, gpointer data)
- {
-   WpSiAudioAdapter *self = WP_SI_AUDIO_ADAPTER (item);
--  g_autoptr (WpCore) core = wp_object_get_core (WP_OBJECT (self));
-   g_autoptr (WpSpaPod) format = f;
-   guint32 active = 0;
- 
--  g_return_if_fail (core);
- 
-   /* cancel previous task if any */
-   if (self->format_task) {
--- 
-2.25.1
-
diff --git a/debian/patches/0002-si-audio-adapter-always-return-task-error-if-set-por.patch b/debian/patches/0002-si-audio-adapter-always-return-task-error-if-set-por.patch
deleted file mode 100644
index c30e60b1..00000000
--- a/debian/patches/0002-si-audio-adapter-always-return-task-error-if-set-por.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From ae729e38046db1c35a33fa4fd546a4beab9f5353 Mon Sep 17 00:00:00 2001
-From: Julian Bouzas <julian.bouzas@collabora.com>
-Date: Thu, 18 Nov 2021 11:58:18 -0500
-Subject: [PATCH 2/4] si-audio-adapter: always return task error if set ports
- format fails
-Content-Type: text/plain; charset="utf-8"
-Content-Transfer-Encoding: 8bit
-
-Avoids having the session item in an invalid state.
----
- modules/module-si-audio-adapter.c | 31 ++++++++++++++++---------------
- 1 file changed, 16 insertions(+), 15 deletions(-)
-
-diff --git a/modules/module-si-audio-adapter.c b/modules/module-si-audio-adapter.c
-index c1982b0..23fb859 100644
---- a/modules/module-si-audio-adapter.c
-+++ b/modules/module-si-audio-adapter.c
-@@ -592,9 +592,9 @@ si_audio_adapter_set_ports_format (WpSiAdapter * item, WpSpaPod *f,
- {
-   WpSiAudioAdapter *self = WP_SI_AUDIO_ADAPTER (item);
-   g_autoptr (WpSpaPod) format = f;
-+  g_autoptr (GTask) task = g_task_new (self, NULL, callback, data);
-   guint32 active = 0;
- 
--
-   /* cancel previous task if any */
-   if (self->format_task) {
-     g_autoptr (GTask) t = g_steal_pointer (&self->format_task);
-@@ -605,17 +605,18 @@ si_audio_adapter_set_ports_format (WpSiAdapter * item, WpSpaPod *f,
-   /* build default format if NULL was given */
-   if (!format && !g_strcmp0 (mode, "dsp")) {
-     format = build_adapter_default_format (self, mode);
--    g_return_if_fail (format);
-+    if (!format) {
-+      g_task_return_new_error (task, WP_DOMAIN_LIBRARY,
-+          WP_LIBRARY_ERROR_OPERATION_FAILED,
-+          "failed to build default format, aborting set format operation");
-+      return;
-+    }
-   }
- 
--  /* create the new task */
--  g_return_if_fail (!self->format_task);
--  self->format_task = g_task_new (self, NULL, callback, data);
--
-+  /* make sure the node has WP_NODE_FEATURE_PORTS */
-   active = wp_object_get_active_features (WP_OBJECT (self->node));
-   if (G_UNLIKELY (!(active & WP_NODE_FEATURE_PORTS))) {
--    g_autoptr (GTask) t = g_steal_pointer (&self->format_task);
--    g_task_return_new_error (t, WP_DOMAIN_LIBRARY,
-+    g_task_return_new_error (task, WP_DOMAIN_LIBRARY,
-         WP_LIBRARY_ERROR_OPERATION_FAILED,
-         "node feature ports is not enabled, aborting set format operation");
-     return;
-@@ -625,20 +626,20 @@ si_audio_adapter_set_ports_format (WpSiAdapter * item, WpSpaPod *f,
-   if (!g_strcmp0 (mode, self->mode) &&
-       ((format == NULL && self->format == NULL) ||
-         wp_spa_pod_equal (format, self->format))) {
--    g_autoptr (GTask) t = g_steal_pointer (&self->format_task);
--    g_task_return_boolean (t, TRUE);
-+    g_task_return_boolean (task, TRUE);
-     return;
-   }
- 
--  /* set format and mode */
--  g_clear_pointer (&self->format, wp_spa_pod_unref);
--  self->format = g_steal_pointer (&format);
--  strncpy (self->mode, mode ? mode : "dsp", sizeof (self->mode) - 1);
--
-   /* ensure the node is suspended */
-   if (wp_node_get_state (self->node, NULL) >= WP_NODE_STATE_IDLE)
-     wp_node_send_command (self->node, "Suspend");
- 
-+  /* set task, format and mode */
-+  self->format_task = g_steal_pointer (&task);
-+  g_clear_pointer (&self->format, wp_spa_pod_unref);
-+  self->format = g_steal_pointer (&format);
-+  strncpy (self->mode, mode ? mode : "dsp", sizeof (self->mode) - 1);
-+
-   /* configure DSP with chosen format */
-   wp_pipewire_object_set_param (WP_PIPEWIRE_OBJECT (self->node),
-       "PortConfig", 0, wp_spa_pod_new_object (
--- 
-2.25.1
-
diff --git a/debian/patches/0003-si-standard-link-always-return-transition-error-if-a.patch b/debian/patches/0003-si-standard-link-always-return-transition-error-if-a.patch
deleted file mode 100644
index 31e903d0..00000000
--- a/debian/patches/0003-si-standard-link-always-return-transition-error-if-a.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 103ee33e388f64454f17f08d42401a8eaf55b6b9 Mon Sep 17 00:00:00 2001
-From: Julian Bouzas <julian.bouzas@collabora.com>
-Date: Thu, 18 Nov 2021 11:58:34 -0500
-Subject: [PATCH 3/4] si-standard-link: always return transition error if
- activation fails
-Content-Type: text/plain; charset="utf-8"
-Content-Transfer-Encoding: 8bit
-
-Avoids having the session item in an invalid state.
----
- modules/module-si-standard-link.c | 26 +++++++++++++++++++-------
- 1 file changed, 19 insertions(+), 7 deletions(-)
-
-diff --git a/modules/module-si-standard-link.c b/modules/module-si-standard-link.c
-index 95ec7ca..1a23195 100644
---- a/modules/module-si-standard-link.c
-+++ b/modules/module-si-standard-link.c
-@@ -329,9 +329,12 @@ get_ports_and_create_links (WpSiStandardLink *self, WpTransition *transition)
- 
-   si_out = WP_SI_LINKABLE (g_weak_ref_get (&self->out_item));
-   si_in = WP_SI_LINKABLE (g_weak_ref_get (&self->in_item));
--
--  g_return_if_fail (si_out);
--  g_return_if_fail (si_in);
-+  if (!si_out || !si_in) {
-+    wp_transition_return_error (transition, g_error_new (WP_DOMAIN_LIBRARY,
-+          WP_LIBRARY_ERROR_INVARIANT,
-+          "Failed to create links because one of the nodes was destroyed"));
-+    return;
-+  }
- 
-   out_ports = wp_si_linkable_get_ports (si_out, self->out_item_port_context);
-   in_ports = wp_si_linkable_get_ports (si_in, self->in_item_port_context);
-@@ -444,15 +447,24 @@ on_main_adapter_ready (GObject *obj, GAsyncResult * res, gpointer p)
- static void
- configure_and_link_adapters (WpSiStandardLink *self, WpTransition *transition)
- {
-+  g_autoptr (WpSiAdapter) si_out =
-+      WP_SI_ADAPTER (g_weak_ref_get (&self->out_item));
-+  g_autoptr (WpSiAdapter) si_in =
-+      WP_SI_ADAPTER (g_weak_ref_get (&self->in_item));
-   struct adapter *out, *in, *main, *other;
-   const gchar *str = NULL;
- 
-+  if (!si_out || !si_in) {
-+    wp_transition_return_error (transition, g_error_new (WP_DOMAIN_LIBRARY,
-+          WP_LIBRARY_ERROR_INVARIANT,
-+          "Failed to create links because one of the adapters was destroyed"));
-+    return;
-+  }
-+
-   out = g_slice_new0 (struct adapter);
-   in = g_slice_new0 (struct adapter);
--  out->si = WP_SI_ADAPTER (g_weak_ref_get (&self->out_item));
--  in->si = WP_SI_ADAPTER (g_weak_ref_get (&self->in_item));
--  g_return_if_fail (out->si);
--  g_return_if_fail (in->si);
-+  out->si = g_steal_pointer (&si_out);
-+  in->si = g_steal_pointer (&si_in);
- 
-   str = wp_session_item_get_property (WP_SESSION_ITEM (out->si), "item.node.type");
-   out->is_device = !g_strcmp0 (str, "device");
--- 
-2.25.1
-
diff --git a/debian/patches/0004-si-standard-link-handle-proxy-destroyed-signal-when-.patch b/debian/patches/0004-si-standard-link-handle-proxy-destroyed-signal-when-.patch
deleted file mode 100644
index 6a74f0e4..00000000
--- a/debian/patches/0004-si-standard-link-handle-proxy-destroyed-signal-when-.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 890d1bc12c7ec1a4c7a04452cb2524e14cd72d71 Mon Sep 17 00:00:00 2001
-From: Julian Bouzas <julian.bouzas@collabora.com>
-Date: Fri, 19 Nov 2021 10:06:26 -0500
-Subject: [PATCH 4/4] si-standard-link: handle proxy destroyed signal when
- creating links
-Content-Type: text/plain; charset="utf-8"
-Content-Transfer-Encoding: 8bit
-
----
- modules/module-si-standard-link.c | 20 ++++++++++++++++++++
- 1 file changed, 20 insertions(+)
-
-diff --git a/modules/module-si-standard-link.c b/modules/module-si-standard-link.c
-index 1a23195..6bade78 100644
---- a/modules/module-si-standard-link.c
-+++ b/modules/module-si-standard-link.c
-@@ -221,6 +221,24 @@ score_ports(struct port *out, struct port *in)
-   return score;
- }
- 
-+static void
-+on_link_destroyed (WpProxy * proxy, WpTransition * transition)
-+{
-+  WpSiStandardLink *self = wp_transition_get_source_object (transition);
-+  WpLink *link = WP_LINK (proxy);
-+
-+  wp_object_deactivate (WP_OBJECT (link), WP_OBJECT_FEATURES_ALL);
-+  g_ptr_array_remove_fast (self->node_links, link);
-+
-+  self->n_async_ops_wait--;
-+  if (self->n_async_ops_wait == 0) {
-+    g_clear_pointer (&self->node_links, g_ptr_array_unref);
-+    wp_transition_return_error (transition, g_error_new (WP_DOMAIN_LIBRARY,
-+          WP_LIBRARY_ERROR_INVARIANT,
-+          "PipeWire links destroyed before finishing their activation"));
-+  }
-+}
-+
- static gboolean
- create_links (WpSiStandardLink * self, WpTransition * transition,
-     GVariant * out_ports, GVariant * in_ports)
-@@ -306,6 +324,8 @@ create_links (WpSiStandardLink * self, WpTransition * transition,
- 
-     /* create the link */
-     link = wp_link_new_from_factory (core, "link-factory", props);
-+    g_signal_connect_object (link, "pw-proxy-destroyed",
-+        G_CALLBACK (on_link_destroyed), transition, 0);
-     g_ptr_array_add (self->node_links, link);
- 
-     /* activate to ensure it is created without errors */
--- 
-2.25.1
-
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 47d3b757..00000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,4 +0,0 @@
-0001-si-audio-adapter-clean-up-unneeded-code-when-setting.patch
-0002-si-audio-adapter-always-return-task-error-if-set-por.patch
-0003-si-standard-link-always-return-transition-error-if-a.patch
-0004-si-standard-link-handle-proxy-destroyed-signal-when-.patch
-- 
GitLab