Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gnome-remote-desktop for 
openSUSE:Factory checked in at 2021-01-18 14:38:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnome-remote-desktop (Old)
 and      /work/SRC/openSUSE:Factory/.gnome-remote-desktop.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gnome-remote-desktop"

Mon Jan 18 14:38:59 2021 rev:2 rq:863162 version:0.1.9

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/gnome-remote-desktop/gnome-remote-desktop.changes    
    2020-03-27 22:03:00.522992081 +0100
+++ 
/work/SRC/openSUSE:Factory/.gnome-remote-desktop.new.28504/gnome-remote-desktop.changes
     2021-01-18 14:45:58.998034690 +0100
@@ -1,0 +2,16 @@
+Fri Jan  8 15:37:47 UTC 2021 - Frederic Crozat <[email protected]>
+
+- Update to version 0.1.9:
+  + add support for RDP (requires freerdp2)
+  + many bugfixes
+- Add pkgconfig(freerdp2), pkgconfig(winpr2), pkgconfig(cairo) as
+  BuildRequires.
+- Bump pipewire minimum version to 0.3.0.
+- Update url to GNOME main project.
+- Add0001-vnc-Drop-frames-if-client-is-gone.patch 
+  Avoid race condition on disconnect (glgo#GNOME/gnome-remote-desktop#43)
+- Add gnutls-anontls.patch (Fedora), requires patched libVNCServer.
+- Add 0001-vnc-Copy-pixels-using-the-right-destination-stride.patch:
+  Copy using the right destination stride (glgo#GNOME/gnome-remote-desktop!21)
+
+-------------------------------------------------------------------

Old:
----
  gnome-remote-desktop-0.1.8.obscpio

New:
----
  0001-vnc-Copy-pixels-using-the-right-destination-stride.patch
  0001-vnc-Drop-frames-if-client-is-gone.patch
  gnome-remote-desktop-0.1.9.obscpio
  gnutls-anontls.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gnome-remote-desktop.spec ++++++
--- /var/tmp/diff_new_pack.VmqILU/_old  2021-01-18 14:46:00.106036360 +0100
+++ /var/tmp/diff_new_pack.VmqILU/_new  2021-01-18 14:46:00.110036367 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package gnome-remote-desktop
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,36 +12,47 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 %global systemd_unit gnome-remote-desktop.service
 
+%define freerdp_version 2.2.0
+
 Name:           gnome-remote-desktop
-Version:        0.1.8
+Version:        0.1.9
 Release:        0
 Summary:        GNOME Remote Desktop screen sharing service
 License:        GPL-2.0-or-later
 Group:          System/Management
-URL:            https://gitlab.gnome.org/jadahl/gnome-remote-desktop
+URL:            https://gitlab.gnome.org/GNOME/gnome-remote-desktop
 Source0:        %{name}-%{version}.tar.xz
+# PATCH-FIX-UPSTREAM Avoid race condition on disconnect 
glgo#GNOME/gnome-remote-desktop#43
+Patch0:         0001-vnc-Drop-frames-if-client-is-gone.patch
+# PATCH-FEATURE-UPSTREAM Adds encryption support (requires patched 
LibVNCServer)
+Patch1:         gnutls-anontls.patch
+# PATCH-FIX-UPSTREAM Copy using the right destination stride 
glgo#GNOME/gnome-remote-desktop!21
+Patch2:         0001-vnc-Copy-pixels-using-the-right-destination-stride.patch
 
 BuildRequires:  meson >= 0.36.0
 BuildRequires:  pkgconfig
 BuildRequires:  systemd-rpm-macros
+BuildRequires:  pkgconfig(cairo)
+BuildRequires:  pkgconfig(freerdp2) >= %{freerdp_version}
 BuildRequires:  pkgconfig(gio-unix-2.0) >= 2.32
 BuildRequires:  pkgconfig(glib-2.0) >= 2.32
 BuildRequires:  pkgconfig(gstreamer-1.0) >= 1.10.0
 BuildRequires:  pkgconfig(gstreamer-video-1.0) >= 1.10.0
 BuildRequires:  pkgconfig(libnotify)
-BuildRequires:  pkgconfig(libpipewire-0.3)
+BuildRequires:  pkgconfig(libpipewire-0.3) >= 0.3.0
 BuildRequires:  pkgconfig(libsecret-1)
 BuildRequires:  pkgconfig(libvncserver) >= 0.9.10
 BuildRequires:  pkgconfig(systemd)
+BuildRequires:  pkgconfig(winpr2) >= %{freerdp_version}
 %{?systemd_requires}
 
-Requires:       pipewire >= 0.1.3
+Requires:       pipewire >= 0.3.0
 
 %description
 GNOME Remote Desktop is a remote desktop and screen sharing service for the

++++++ 0001-vnc-Copy-pixels-using-the-right-destination-stride.patch ++++++
>From 81172effba7c70d3b2932c67be79a2924eae9d73 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <[email protected]>
Date: Mon, 12 Oct 2020 17:34:30 +0200
Subject: [PATCH] vnc: Copy pixels using the right destination stride

We're copying the pixels in a separate thread managed by PipeWire, and
in this thread, accessing the VNC framebuffer dimension and stride is
racy. Instead of fetching the dimension directly, pass the expected
width and get the stride it will eventually have.

Already before this patch, when the copied pixel end up on the main
thread and the dimension still doesn't match up, the frame will be
dropped.
---
 src/grd-session-vnc.c         | 5 +++--
 src/grd-session-vnc.h         | 3 ++-
 src/grd-vnc-pipewire-stream.c | 5 +++--
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/grd-session-vnc.c b/src/grd-session-vnc.c
index 69fb33d..f4835aa 100644
--- a/src/grd-session-vnc.c
+++ b/src/grd-session-vnc.c
@@ -535,9 +535,10 @@ grd_session_vnc_get_fd (GrdSessionVnc *session_vnc)
 }
 
 int
-grd_session_vnc_get_framebuffer_stride (GrdSessionVnc *session_vnc)
+grd_session_vnc_get_stride_for_width (GrdSessionVnc *session_vnc,
+                                      int            width)
 {
-  return session_vnc->rfb_screen->paddedWidthInBytes;
+  return width * BGRX_BYTES_PER_PIXEL;
 }
 
 rfbClientPtr
diff --git a/src/grd-session-vnc.h b/src/grd-session-vnc.h
index 0d01ad3..ccd046c 100644
--- a/src/grd-session-vnc.h
+++ b/src/grd-session-vnc.h
@@ -60,7 +60,8 @@ void grd_session_vnc_move_cursor (GrdSessionVnc *session_vnc,
 
 int grd_session_vnc_get_fd (GrdSessionVnc *session_vnc);
 
-int grd_session_vnc_get_framebuffer_stride (GrdSessionVnc *session_vnc);
+int grd_session_vnc_get_stride_for_width (GrdSessionVnc *session_vnc,
+                                          int            width);
 
 gboolean grd_session_vnc_is_client_gone (GrdSessionVnc *session_vnc);
 
diff --git a/src/grd-vnc-pipewire-stream.c b/src/grd-vnc-pipewire-stream.c
index 96dd7c9..82ceb9b 100644
--- a/src/grd-vnc-pipewire-stream.c
+++ b/src/grd-vnc-pipewire-stream.c
@@ -326,10 +326,11 @@ process_buffer (GrdVncPipeWireStream *stream,
       int height;
       int y;
 
-      src_stride = buffer->datas[0].chunk->stride;
-      dst_stride = grd_session_vnc_get_framebuffer_stride (stream->session);
       height = stream->spa_format.size.height;
       width = stream->spa_format.size.width;
+      src_stride = buffer->datas[0].chunk->stride;
+      dst_stride = grd_session_vnc_get_stride_for_width (stream->session,
+                                                         width);
 
       frame->data = g_malloc (height * dst_stride);
       for (y = 0; y < height; y++)
-- 
2.28.0

++++++ 0001-vnc-Drop-frames-if-client-is-gone.patch ++++++
>From ab97841629f5f3f4fab9993b6255b6ae04828b9c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <[email protected]>
Date: Wed, 9 Sep 2020 10:14:20 +0200
Subject: [PATCH] vnc: Drop frames if client is gone

Frames from PipeWire are posted asynchronously from a I/O thread to the
main thread where they are turned into VNC frame updates and cursor
movements. On the other hand, sessions are closed asynchronously when
the VNC client disappears. If a frame ended up on the main thread after
a client disappeared but before the session and stream was closed, we'd
try to turn the new frames into VNC updates without a client being
available, causing use after free.

Fix this by dropping frames that happens during this time frame.

Closes: https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/issues/43
---
 src/grd-session-vnc.c         | 7 +++++++
 src/grd-session-vnc.h         | 2 ++
 src/grd-vnc-pipewire-stream.c | 8 ++++++++
 3 files changed, 17 insertions(+)

diff --git a/src/grd-session-vnc.c b/src/grd-session-vnc.c
index 813838a..a06d34d 100644
--- a/src/grd-session-vnc.c
+++ b/src/grd-session-vnc.c
@@ -209,6 +209,12 @@ maybe_queue_close_session_idle (GrdSessionVnc *session_vnc)
     g_idle_add (close_session_idle, session_vnc);
 }
 
+gboolean
+grd_session_vnc_is_client_gone (GrdSessionVnc *session_vnc)
+{
+  return !session_vnc->rfb_client;
+}
+
 static void
 handle_client_gone (rfbClientPtr rfb_client)
 {
@@ -218,6 +224,7 @@ handle_client_gone (rfbClientPtr rfb_client)
 
   grd_session_vnc_detach_source (session_vnc);
   maybe_queue_close_session_idle (session_vnc);
+  session_vnc->rfb_client = NULL;
 }
 
 static void
diff --git a/src/grd-session-vnc.h b/src/grd-session-vnc.h
index 579a12a..07678c8 100644
--- a/src/grd-session-vnc.h
+++ b/src/grd-session-vnc.h
@@ -57,4 +57,6 @@ void grd_session_vnc_move_cursor (GrdSessionVnc *session_vnc,
 
 int grd_session_vnc_get_framebuffer_stride (GrdSessionVnc *session_vnc);
 
+gboolean grd_session_vnc_is_client_gone (GrdSessionVnc *session_vnc);
+
 #endif /* GRD_SESSION_VNC_H */
diff --git a/src/grd-vnc-pipewire-stream.c b/src/grd-vnc-pipewire-stream.c
index 78793c4..96dd7c9 100644
--- a/src/grd-vnc-pipewire-stream.c
+++ b/src/grd-vnc-pipewire-stream.c
@@ -234,6 +234,14 @@ do_render (struct spa_loop *loop,
   if (!frame)
     return 0;
 
+  if (grd_session_vnc_is_client_gone (stream->session))
+    {
+      g_free (frame->data);
+      g_clear_pointer (&frame->rfb_cursor, rfbFreeCursor);
+      g_free (frame);
+      return 0;
+    }
+
   if (frame->rfb_cursor)
     grd_session_vnc_set_cursor (stream->session, frame->rfb_cursor);
 
-- 
2.26.2

++++++ _service ++++++
--- /var/tmp/diff_new_pack.VmqILU/_old  2021-01-18 14:46:00.174036463 +0100
+++ /var/tmp/diff_new_pack.VmqILU/_new  2021-01-18 14:46:00.178036469 +0100
@@ -1,8 +1,8 @@
 <services>
   <service name="obs_scm" mode="disabled">
-    <param 
name="url">https://gitlab.gnome.org/jadahl/gnome-remote-desktop.git</param>
+    <param 
name="url">https://gitlab.gnome.org/GNOME/gnome-remote-desktop.git</param>
     <param name="scm">git</param>
-    <param name="revision">refs/tags/0.1.8</param>
+    <param name="revision">refs/tags/0.1.9</param>
     <param name="versionformat">@PARENT_TAG@</param>
   </service>
   <service mode="buildtime" name="tar" />

++++++ gnome-remote-desktop-0.1.8.obscpio -> gnome-remote-desktop-0.1.9.obscpio 
++++++
++++ 3876 lines of diff (skipped)

++++++ gnome-remote-desktop.obsinfo ++++++
--- /var/tmp/diff_new_pack.VmqILU/_old  2021-01-18 14:46:00.314036674 +0100
+++ /var/tmp/diff_new_pack.VmqILU/_new  2021-01-18 14:46:00.314036674 +0100
@@ -1,5 +1,5 @@
 name: gnome-remote-desktop
-version: 0.1.8
-mtime: 1584690350
-commit: 3141a7efec1529f06e2bcc64b68d8bad02d9a4c1
+version: 0.1.9
+mtime: 1599590329
+commit: ba216dc82c7cdfcd2b99066b8be480e6a76cc60b
 

++++++ gnutls-anontls.patch ++++++
++++ 1491 lines (skipped)

Reply via email to