From cfa4f49ae02a74680249e46441f5024d52202187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 16 Feb 2022 11:28:36 +0100 Subject: [PATCH 01/14] Update to 42.beta --- .gitignore | 1 + gnome-remote-desktop.spec | 14 ++++- gnutls-anontls.patch | 118 +++++++++++++++++++------------------- sources | 2 +- 4 files changed, 73 insertions(+), 62 deletions(-) diff --git a/.gitignore b/.gitignore index c3a16e7..2fcea58 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /gnome-remote-desktop-41.0.tar.xz /gnome-remote-desktop-41.1.tar.xz /gnome-remote-desktop-41.2.tar.xz +/gnome-remote-desktop-42.beta.tar.xz diff --git a/gnome-remote-desktop.spec b/gnome-remote-desktop.spec index 820d98e..37f7c82 100644 --- a/gnome-remote-desktop.spec +++ b/gnome-remote-desktop.spec @@ -3,8 +3,8 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-remote-desktop -Version: 41.2 -Release: 2%{?dist} +Version: 42~beta +Release: 1%{?dist} Summary: GNOME Remote Desktop screen share service License: GPLv2+ @@ -31,9 +31,16 @@ BuildRequires: pkgconfig(xkbcommon) BuildRequires: pkgconfig(libsecret-1) BuildRequires: pkgconfig(libnotify) BuildRequires: pkgconfig(gnutls) +BuildRequires: pkgconfig(libdrm) +BuildRequires: pkgconfig(epoxy) +BuildRequires: pkgconfig(gbm) +BuildRequires: pkgconfig(gudev-1.0) + BuildRequires: systemd Requires: pipewire >= 0.3.0 +Requires: libdrm +Requires: libepoxy Obsoletes: vino < 3.22.0-21 @@ -80,6 +87,9 @@ GNOME desktop environment. %changelog +* Wed Feb 16 2022 Jonas Ådahl - 42~beta-1 +- Update to 42.beta + * Thu Jan 20 2022 Fedora Release Engineering - 41.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/gnutls-anontls.patch b/gnutls-anontls.patch index 1c5e384..daba810 100644 --- a/gnutls-anontls.patch +++ b/gnutls-anontls.patch @@ -1,4 +1,4 @@ -From 06f99dc1aaef90275547d8c93ddf18e9d0c88257 Mon Sep 17 00:00:00 2001 +From 0fb8045a40412a472db93131df899b94e626886f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 14 Jun 2018 12:21:37 +0200 Subject: [PATCH 1/7] vnc: Add anonymous TLS encryption support @@ -25,10 +25,10 @@ VNC connection. create mode 100644 src/grd-vnc-tls.h diff --git a/meson.build b/meson.build -index c8c957c..536e94a 100644 +index 4ac9093..a7d3bb0 100644 --- a/meson.build +++ b/meson.build -@@ -54,6 +54,7 @@ endif +@@ -57,6 +57,7 @@ endif if have_vnc libvncserver_dep = dependency('libvncserver') libvncclient_dep = dependency('libvncclient') @@ -52,7 +52,7 @@ index ffab821..4333863 100644 + #endif /* GRD_ENUMS_H */ diff --git a/src/grd-session-vnc.c b/src/grd-session-vnc.c -index 0e520dc..0c189fd 100644 +index a4cb958..c2e29b4 100644 --- a/src/grd-session-vnc.c +++ b/src/grd-session-vnc.c @@ -45,7 +45,9 @@ struct _GrdSessionVnc @@ -65,7 +65,7 @@ index 0e520dc..0c189fd 100644 GSource *source; rfbScreenInfoPtr rfb_screen; rfbClientPtr rfb_client; -@@ -540,6 +542,12 @@ check_rfb_password (rfbClientPtr rfb_client, +@@ -543,6 +545,12 @@ check_rfb_password (rfbClientPtr rfb_client, } } @@ -78,7 +78,7 @@ index 0e520dc..0c189fd 100644 int grd_session_vnc_get_stride_for_width (GrdSessionVnc *session_vnc, int width) -@@ -547,6 +555,18 @@ grd_session_vnc_get_stride_for_width (GrdSessionVnc *session_vnc, +@@ -550,6 +558,18 @@ grd_session_vnc_get_stride_for_width (GrdSessionVnc *session_vnc, return width * BGRX_BYTES_PER_PIXEL; } @@ -97,7 +97,7 @@ index 0e520dc..0c189fd 100644 static void init_vnc_session (GrdSessionVnc *session_vnc) { -@@ -590,44 +610,85 @@ init_vnc_session (GrdSessionVnc *session_vnc) +@@ -593,44 +613,85 @@ init_vnc_session (GrdSessionVnc *session_vnc) rfbProcessEvents (rfb_screen, 0); } @@ -208,7 +208,7 @@ index 0e520dc..0c189fd 100644 } return G_SOURCE_CONTINUE; -@@ -640,7 +701,10 @@ grd_session_vnc_attach_source (GrdSessionVnc *session_vnc) +@@ -643,7 +704,10 @@ grd_session_vnc_attach_source (GrdSessionVnc *session_vnc) socket = g_socket_connection_get_socket (session_vnc->connection); session_vnc->source = g_socket_create_source (socket, @@ -220,7 +220,7 @@ index 0e520dc..0c189fd 100644 NULL); g_source_set_callback (session_vnc->source, (GSourceFunc) handle_socket_data, -@@ -666,8 +730,10 @@ grd_session_vnc_new (GrdVncServer *vnc_server, +@@ -669,8 +733,10 @@ grd_session_vnc_new (GrdVncServer *vnc_server, "context", context, NULL); @@ -231,7 +231,7 @@ index 0e520dc..0c189fd 100644 grd_session_vnc_attach_source (session_vnc); init_vnc_session (session_vnc); -@@ -682,6 +748,8 @@ grd_session_vnc_dispose (GObject *object) +@@ -685,6 +751,8 @@ grd_session_vnc_dispose (GObject *object) g_assert (!session_vnc->rfb_screen); @@ -241,12 +241,12 @@ index 0e520dc..0c189fd 100644 G_OBJECT_CLASS (grd_session_vnc_parent_class)->dispose (object); diff --git a/src/grd-session-vnc.h b/src/grd-session-vnc.h -index a532567..4e7b33d 100644 +index fcc508d..092d9dc 100644 --- a/src/grd-session-vnc.h +++ b/src/grd-session-vnc.h @@ -36,6 +36,9 @@ G_DECLARE_FINAL_TYPE (GrdSessionVnc, GRD, SESSION_VNC, - GrdSession); + GrdSession) +typedef gboolean (* GrdVncSocketGrabFunc) (GrdSessionVnc *session_vnc, + GError **error); @@ -276,7 +276,7 @@ index a532567..4e7b33d 100644 + #endif /* GRD_SESSION_VNC_H */ diff --git a/src/grd-settings.c b/src/grd-settings.c -index d2f31d2..12d8693 100644 +index 4560a37..744ff89 100644 --- a/src/grd-settings.c +++ b/src/grd-settings.c @@ -60,6 +60,7 @@ struct _GrdSettings @@ -287,7 +287,7 @@ index d2f31d2..12d8693 100644 } vnc; }; -@@ -242,6 +243,12 @@ grd_settings_get_vnc_auth_method (GrdSettings *settings) +@@ -248,6 +249,12 @@ grd_settings_get_vnc_auth_method (GrdSettings *settings) return settings->vnc.auth_method; } @@ -300,7 +300,7 @@ index d2f31d2..12d8693 100644 static void update_rdp_tls_cert (GrdSettings *settings) { -@@ -277,6 +284,13 @@ update_vnc_auth_method (GrdSettings *settings) +@@ -285,6 +292,13 @@ update_vnc_auth_method (GrdSettings *settings) "auth-method"); } @@ -314,7 +314,7 @@ index d2f31d2..12d8693 100644 static void on_rdp_settings_changed (GSettings *rdp_settings, const char *key, -@@ -314,6 +328,11 @@ on_vnc_settings_changed (GSettings *vnc_settings, +@@ -322,6 +336,11 @@ on_vnc_settings_changed (GSettings *vnc_settings, update_vnc_auth_method (settings); g_signal_emit (settings, signals[VNC_AUTH_METHOD_CHANGED], 0); } @@ -326,7 +326,7 @@ index d2f31d2..12d8693 100644 } static void -@@ -345,6 +364,8 @@ grd_settings_init (GrdSettings *settings) +@@ -356,6 +375,8 @@ grd_settings_init (GrdSettings *settings) settings->rdp.port = GRD_RDP_SERVER_PORT; settings->vnc.port = GRD_VNC_SERVER_PORT; @@ -335,7 +335,7 @@ index d2f31d2..12d8693 100644 } static void -@@ -389,4 +410,11 @@ grd_settings_class_init (GrdSettingsClass *klass) +@@ -400,4 +421,11 @@ grd_settings_class_init (GrdSettingsClass *klass) 0, NULL, NULL, NULL, G_TYPE_NONE, 0); @@ -359,7 +359,7 @@ index e12e47e..b940fdb 100644 + #endif /* GRD_SETTINGS_H */ diff --git a/src/grd-vnc-server.c b/src/grd-vnc-server.c -index a6d95cb..f9c68db 100644 +index aae1029..3e43391 100644 --- a/src/grd-vnc-server.c +++ b/src/grd-vnc-server.c @@ -24,11 +24,13 @@ @@ -924,10 +924,10 @@ index 0000000..135ef8c + +#endif /* GRD_VNC_TLS_H */ diff --git a/src/meson.build b/src/meson.build -index 2fe3923..bf8059f 100644 +index 9723d4a..326bef6 100644 --- a/src/meson.build +++ b/src/meson.build -@@ -97,10 +97,13 @@ if have_vnc +@@ -105,10 +105,13 @@ if have_vnc 'grd-vnc-pipewire-stream.h', 'grd-vnc-server.c', 'grd-vnc-server.h', @@ -942,11 +942,11 @@ index 2fe3923..bf8059f 100644 endif diff --git a/src/org.gnome.desktop.remote-desktop.gschema.xml.in b/src/org.gnome.desktop.remote-desktop.gschema.xml.in -index 7633e00..c2c543e 100644 +index 0779c8c..b8e3b0a 100644 --- a/src/org.gnome.desktop.remote-desktop.gschema.xml.in +++ b/src/org.gnome.desktop.remote-desktop.gschema.xml.in @@ -49,5 +49,15 @@ - * password - by requiring the remote client to provide a known password + * password - by requiring the remote client to provide a known password + @@ -962,10 +962,10 @@ index 7633e00..c2c543e 100644 -- -2.31.1 +2.34.1 -From 9f289a90a167e29cf43e6d0d91c4f7605a131f39 Mon Sep 17 00:00:00 2001 +From 3f7df606d5eed6d5b8444fef801c2bbc2a710b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 27 Nov 2019 11:02:09 +0100 Subject: [PATCH 2/7] session-vnc: Add paused/resumed signals @@ -978,7 +978,7 @@ out-of-socket source. 1 file changed, 65 insertions(+), 7 deletions(-) diff --git a/src/grd-session-vnc.c b/src/grd-session-vnc.c -index 0c189fd..596896d 100644 +index c2e29b4..4be4c49 100644 --- a/src/grd-session-vnc.c +++ b/src/grd-session-vnc.c @@ -41,14 +41,27 @@ @@ -1009,8 +1009,8 @@ index 0c189fd..596896d 100644 rfbScreenInfoPtr rfb_screen; rfbClientPtr rfb_client; -@@ -76,7 +89,7 @@ struct _GrdSessionVnc - G_DEFINE_TYPE (GrdSessionVnc, grd_session_vnc, GRD_TYPE_SESSION); +@@ -77,7 +90,7 @@ struct _GrdSessionVnc + G_DEFINE_TYPE (GrdSessionVnc, grd_session_vnc, GRD_TYPE_SESSION) static void -grd_session_vnc_detach_source (GrdSessionVnc *session_vnc); @@ -1018,7 +1018,7 @@ index 0c189fd..596896d 100644 static gboolean close_session_idle (gpointer user_data); -@@ -235,7 +248,8 @@ handle_client_gone (rfbClientPtr rfb_client) +@@ -236,7 +249,8 @@ handle_client_gone (rfbClientPtr rfb_client) g_debug ("VNC client gone"); @@ -1028,7 +1028,7 @@ index 0c189fd..596896d 100644 maybe_queue_close_session_idle (session_vnc); session_vnc->rfb_client = NULL; } -@@ -304,7 +318,7 @@ handle_new_client (rfbClientPtr rfb_client) +@@ -305,7 +319,7 @@ handle_new_client (rfbClientPtr rfb_client) session_vnc->prompt_cancellable, prompt_response_callback, session_vnc); @@ -1037,7 +1037,7 @@ index 0c189fd..596896d 100644 return RFB_CLIENT_ON_HOLD; case GRD_VNC_AUTH_METHOD_PASSWORD: session_vnc->rfb_screen->passwordCheck = check_rfb_password; -@@ -533,7 +547,7 @@ check_rfb_password (rfbClientPtr rfb_client, +@@ -536,7 +550,7 @@ check_rfb_password (rfbClientPtr rfb_client, if (memcmp (challenge_encrypted, response_encrypted, len) == 0) { grd_session_start (GRD_SESSION (session_vnc)); @@ -1046,7 +1046,7 @@ index 0c189fd..596896d 100644 return TRUE; } else -@@ -718,6 +732,36 @@ grd_session_vnc_detach_source (GrdSessionVnc *session_vnc) +@@ -721,6 +735,36 @@ grd_session_vnc_detach_source (GrdSessionVnc *session_vnc) g_clear_pointer (&session_vnc->source, g_source_destroy); } @@ -1083,7 +1083,7 @@ index 0c189fd..596896d 100644 GrdSessionVnc * grd_session_vnc_new (GrdVncServer *vnc_server, GSocketConnection *connection) -@@ -735,6 +779,7 @@ grd_session_vnc_new (GrdVncServer *vnc_server, +@@ -738,6 +782,7 @@ grd_session_vnc_new (GrdVncServer *vnc_server, grd_session_vnc_grab_socket (session_vnc, vnc_socket_grab_func); grd_session_vnc_attach_source (session_vnc); @@ -1091,7 +1091,7 @@ index 0c189fd..596896d 100644 init_vnc_session (session_vnc); -@@ -764,7 +809,7 @@ grd_session_vnc_stop (GrdSession *session) +@@ -767,7 +812,7 @@ grd_session_vnc_stop (GrdSession *session) g_clear_object (&session_vnc->pipewire_stream); @@ -1100,7 +1100,7 @@ index 0c189fd..596896d 100644 g_clear_object (&session_vnc->connection); g_clear_object (&session_vnc->clipboard_vnc); -@@ -817,8 +862,8 @@ grd_session_vnc_stream_ready (GrdSession *session, +@@ -827,8 +872,8 @@ grd_session_vnc_stream_ready (GrdSession *session, G_CALLBACK (on_pipewire_stream_closed), session_vnc); @@ -1111,9 +1111,9 @@ index 0c189fd..596896d 100644 } static void -@@ -837,4 +882,17 @@ grd_session_vnc_class_init (GrdSessionVncClass *klass) - - session_class->stop = grd_session_vnc_stop; +@@ -849,4 +894,17 @@ grd_session_vnc_class_init (GrdSessionVncClass *klass) + session_class->remote_desktop_session_started = + grd_session_vnc_remote_desktop_session_started; session_class->stream_ready = grd_session_vnc_stream_ready; + + signals[PAUSED] = g_signal_new ("paused", @@ -1130,10 +1130,10 @@ index 0c189fd..596896d 100644 + G_TYPE_NONE, 0); } -- -2.31.1 +2.34.1 -From 1d34839781948d8de331641863a589ae4eb46c30 Mon Sep 17 00:00:00 2001 +From 30b795a086db2afaba5a6089567550aaabf66a78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 27 Nov 2019 11:03:46 +0100 Subject: [PATCH 3/7] session-vnc: Add grd_session_vnc_dispatch() helper @@ -1146,10 +1146,10 @@ available that is not visible to the socket source. 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/grd-session-vnc.c b/src/grd-session-vnc.c -index 596896d..06b2cf7 100644 +index 4be4c49..9708de0 100644 --- a/src/grd-session-vnc.c +++ b/src/grd-session-vnc.c -@@ -672,6 +672,21 @@ vnc_socket_grab_func (GrdSessionVnc *session_vnc, +@@ -675,6 +675,21 @@ vnc_socket_grab_func (GrdSessionVnc *session_vnc, return TRUE; } @@ -1171,7 +1171,7 @@ index 596896d..06b2cf7 100644 static gboolean handle_socket_data (GSocket *socket, GIOCondition condition, -@@ -688,16 +703,7 @@ handle_socket_data (GSocket *socket, +@@ -691,16 +706,7 @@ handle_socket_data (GSocket *socket, } else if (condition & G_IO_IN) { @@ -1190,7 +1190,7 @@ index 596896d..06b2cf7 100644 else { diff --git a/src/grd-session-vnc.h b/src/grd-session-vnc.h -index 4e7b33d..cf275af 100644 +index 092d9dc..e9eced0 100644 --- a/src/grd-session-vnc.h +++ b/src/grd-session-vnc.h @@ -79,6 +79,8 @@ void grd_session_vnc_grab_socket (GrdSessionVnc *session_vnc, @@ -1203,10 +1203,10 @@ index 4e7b33d..cf275af 100644 #endif /* GRD_SESSION_VNC_H */ -- -2.31.1 +2.34.1 -From 9cdf72aa277782906a4b979773a7025a61994785 Mon Sep 17 00:00:00 2001 +From 808f23c5e083f872b9b4343fc06efc76f8a8b9c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 27 Nov 2019 11:05:13 +0100 Subject: [PATCH 4/7] vnc/tls: Add some logging @@ -1280,10 +1280,10 @@ index ec4758e..ac6c35f 100644 { g_warning ("TLS handshake failed: %s", error->message); -- -2.31.1 +2.34.1 -From 2c24c7ffa583c94d3cfd7eb105eb264a6430b128 Mon Sep 17 00:00:00 2001 +From c571ae4d81b77684d19c844435915f6403b5130a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 27 Nov 2019 11:07:40 +0100 Subject: [PATCH 5/7] vnc/tls: Dispatch also when data is pending outside of @@ -1300,7 +1300,7 @@ long as there is data to read in those buffers. 2 files changed, 86 insertions(+), 6 deletions(-) diff --git a/src/grd-session-vnc.h b/src/grd-session-vnc.h -index cf275af..efc0038 100644 +index e9eced0..8a916b7 100644 --- a/src/grd-session-vnc.h +++ b/src/grd-session-vnc.h @@ -79,6 +79,8 @@ void grd_session_vnc_grab_socket (GrdSessionVnc *session_vnc, @@ -1450,10 +1450,10 @@ index ac6c35f..312b6b9 100644 } -- -2.31.1 +2.34.1 -From 28dcea05f8f42c3fe5d43d0dff0cdb1c9fc7f213 Mon Sep 17 00:00:00 2001 +From 8a7cef31e9b22ef3e98fa5b54ac0756083b581e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 27 Nov 2019 16:48:00 +0100 Subject: [PATCH 6/7] session-vnc: Set our own password handling function up @@ -1472,10 +1472,10 @@ password prompt. 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/grd-session-vnc.c b/src/grd-session-vnc.c -index 06b2cf7..7a4c6b3 100644 +index 9708de0..bc60285 100644 --- a/src/grd-session-vnc.c +++ b/src/grd-session-vnc.c -@@ -94,11 +94,6 @@ grd_session_vnc_pause (GrdSessionVnc *session_vnc); +@@ -95,11 +95,6 @@ grd_session_vnc_pause (GrdSessionVnc *session_vnc); static gboolean close_session_idle (gpointer user_data); @@ -1487,7 +1487,7 @@ index 06b2cf7..7a4c6b3 100644 static void swap_uint8 (uint8_t *a, uint8_t *b) -@@ -321,7 +316,6 @@ handle_new_client (rfbClientPtr rfb_client) +@@ -322,7 +317,6 @@ handle_new_client (rfbClientPtr rfb_client) grd_session_vnc_pause (session_vnc); return RFB_CLIENT_ON_HOLD; case GRD_VNC_AUTH_METHOD_PASSWORD: @@ -1495,7 +1495,7 @@ index 06b2cf7..7a4c6b3 100644 /* * authPasswdData needs to be non NULL in libvncserver to trigger * password authentication. -@@ -620,6 +614,8 @@ init_vnc_session (GrdSessionVnc *session_vnc) +@@ -623,6 +617,8 @@ init_vnc_session (GrdSessionVnc *session_vnc) rfb_screen->frameBuffer = g_malloc0 (screen_width * screen_height * 4); memset (rfb_screen->frameBuffer, 0x1f, screen_width * screen_height * 4); @@ -1505,10 +1505,10 @@ index 06b2cf7..7a4c6b3 100644 rfbProcessEvents (rfb_screen, 0); } -- -2.31.1 +2.34.1 -From 2327474d5fa0f6527b2f5f39d54f96f8ff9627db Mon Sep 17 00:00:00 2001 +From 99cf5c5df74b71e5c8ad99ab10cff2f09ee7e677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 12 Oct 2020 17:34:30 +0200 Subject: [PATCH 7/7] vnc: Copy pixels using the right destination stride @@ -1526,7 +1526,7 @@ dropped. 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/grd-session-vnc.h b/src/grd-session-vnc.h -index efc0038..f3a6314 100644 +index 8a916b7..e85f31e 100644 --- a/src/grd-session-vnc.h +++ b/src/grd-session-vnc.h @@ -67,7 +67,8 @@ int grd_session_vnc_get_stride_for_width (GrdSessionVnc *session_vnc, @@ -1540,5 +1540,5 @@ index efc0038..f3a6314 100644 gboolean grd_session_vnc_is_client_gone (GrdSessionVnc *session_vnc); -- -2.31.1 +2.34.1 diff --git a/sources b/sources index 27be743..a01d0b7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-remote-desktop-41.2.tar.xz) = 7636c0446c86748ce51c869734a2d33d8285c30616a28a0358f45d8399fd9f5dba7a1bdb830d3ca4753982ac3b9715604eb5934906645a1c11c58b4342c524eb +SHA512 (gnome-remote-desktop-42.beta.tar.xz) = 24d0ab9091f2fb88a975a07493039be3280cd39b698558c4b6cc6901e89bcb56fab88eeec184206647e0f4ac9786c5aeaf94a6feb35fb28b67e54162fab74193 From 5ba48ee9ea1a671bd6c660f355ca8e91a75bf29a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 14 Mar 2022 09:55:28 +0100 Subject: [PATCH 02/14] Update to 42.rc Also add patch adding man page for grdctl. --- .gitignore | 1 + 0001-Add-man-page.patch | 220 ++++++++++++++++++++++++++++++++++++++ gnome-remote-desktop.spec | 10 +- gnutls-anontls.patch | 56 +++++----- sources | 2 +- 5 files changed, 259 insertions(+), 30 deletions(-) create mode 100644 0001-Add-man-page.patch diff --git a/.gitignore b/.gitignore index 2fcea58..067d29c 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /gnome-remote-desktop-41.1.tar.xz /gnome-remote-desktop-41.2.tar.xz /gnome-remote-desktop-42.beta.tar.xz +/gnome-remote-desktop-42.rc.tar.xz diff --git a/0001-Add-man-page.patch b/0001-Add-man-page.patch new file mode 100644 index 0000000..ef8ef47 --- /dev/null +++ b/0001-Add-man-page.patch @@ -0,0 +1,220 @@ +From 712d6a036cfb6b49ad35d4d27ba8255f5fef36b6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20=C3=85dahl?= +Date: Mon, 14 Mar 2022 10:38:55 +0100 +Subject: [PATCH] Add man page + +Uses asciidoc; the stylesheet was copied from gnome-shell. +--- + .gitlab-ci.yml | 3 +- + man/grdctl.txt | 88 ++++++++++++++++++++++++++++++++++++++++++++++ + man/meson.build | 9 +++++ + man/stylesheet.xsl | 27 ++++++++++++++ + meson.build | 5 +++ + meson_options.txt | 5 +++ + 6 files changed, 136 insertions(+), 1 deletion(-) + create mode 100644 man/grdctl.txt + create mode 100644 man/meson.build + create mode 100644 man/stylesheet.xsl + +diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml +index f261657..735bb64 100644 +--- a/.gitlab-ci.yml ++++ b/.gitlab-ci.yml +@@ -9,7 +9,7 @@ stages: + .gnome-remote-desktop.fedora:35@common: + variables: + FDO_DISTRIBUTION_VERSION: 35 +- BASE_TAG: '2022-02-11.0' ++ BASE_TAG: '2022-03-14.0' + FDO_UPSTREAM_REPO: GNOME/gnome-remote-desktop + FDO_DISTRIBUTION_EXEC: | + dnf -y update && dnf -y upgrade && +@@ -21,6 +21,7 @@ stages: + dnf builddep -y gnome-remote-desktop && + dnf install -y 'pkgconfig(epoxy)' 'pkgconfig(libdrm)' 'pkgconfig(gbm)' \ + 'pkgconfig(gudev-1.0)' && ++ dnf install -y asciidoc && + + # To test + dnf install -y 'pkgconfig(libvncclient)' && +diff --git a/man/grdctl.txt b/man/grdctl.txt +new file mode 100644 +index 0000000..83777da +--- /dev/null ++++ b/man/grdctl.txt +@@ -0,0 +1,88 @@ ++GRDCTL(1) ++========= ++:man manual: User Commands ++:man source: GNOME-REMOTE-DESKTOP ++:doctype: manpage ++:date: March 2022 ++ ++NAME ++---- ++grdctl - Command line tool for configuring GNOME Remote Desktop ++ ++SYNOPSIS ++-------- ++*grdctl* ['OPTION'...] ['COMMAND'] ['SUBCOMMAND'...] ++ ++DESCRIPTION ++----------- ++grdctl provides methods for configuring the GNOME Remote Desktop service, ++for example setting credentials. ++ ++OPTIONS ++------- ++*--help*:: ++Show help text. ++ ++GENERAL COMMANDS ++---------------- ++*status*:: ++Show current status. ++ ++RDP COMMANDS ++------------ ++*rdp* *enable*:: ++Enable the RDP backend. ++ ++*rdp* *disable*:: ++Disable the RDP backend. ++ ++*rdp* *set-tls-cert* 'TLS-CERT':: ++Set path to TLS certificate. ++ ++*rdp* *set-tls-key* 'TLS-KEY':: ++Set path to TLS key. ++ ++*rdp* *set-credentials* 'USERNAME' 'PASSWORD':: ++Set username and password credentials. ++ ++*rdp* *clear-credentials*:: ++Clear username and password credentials. ++ ++*rdp* *enable-view-only*:: ++Disable remote control of input devices. ++ ++*rdp* *disable-view-only*:: ++Enable remote control of input devices. ++ ++VNC COMMANDS ++------------ ++*vnc* *enable*:: ++Enable the VNC backend. ++ ++*vnc* *disable*:: ++Disable the VNC backend. ++ ++*vnc* *set-password* 'PASSWORD':: ++Set the VNC password. ++ ++*vnc* *clear-password*:: ++Clear the VNC password. ++ ++*vnc* *set-auth-method* 'AUTH-METHOD':: ++Set the authorization method used for new VNC connections. Can be either ++*password* or *prompt*. ++ ++*vnc* *enable-view-only*: ++Disable remote control of input devices. ++ ++*vnc* *disable-view-only*:: ++Enable remote control of input devices. ++ ++BUGS ++---- ++The bug tracker can be reached by visiting the website ++https://gitlab.gnome.org/GNOME/gnome-remote-desktop/issues. Before sending ++a bug report, please verify that you have the latest version of ++gnome-remote-desktop. Many bugs (major and minor) are fixed at each ++release, and if yours is out of date, the problem may already have been ++solved. +diff --git a/man/meson.build b/man/meson.build +new file mode 100644 +index 0000000..1e73f11 +--- /dev/null ++++ b/man/meson.build +@@ -0,0 +1,9 @@ ++a2x = find_program('a2x') ++ ++custom_target('man page', ++ input: ['grdctl.txt', 'stylesheet.xsl'], ++ output: 'grdctl.1', ++ command: [a2x, '-v', '-D', '@OUTDIR@', '--xsl-file', '@INPUT1@', '-f' ,'manpage', '@INPUT0@'], ++ install_dir: mandir + '/man1', ++ install: true ++) +diff --git a/man/stylesheet.xsl b/man/stylesheet.xsl +new file mode 100644 +index 0000000..047bd1b +--- /dev/null ++++ b/man/stylesheet.xsl +@@ -0,0 +1,27 @@ ++ ++ ++ ++ ++ ++ .PP ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ .RS 4 ++ ++ .\" ++ ++ ++ ++ .RE ++ ++ ++ ++ +diff --git a/meson.build b/meson.build +index 6bd2420..0660cd0 100644 +--- a/meson.build ++++ b/meson.build +@@ -55,6 +55,7 @@ endif + prefix = get_option('prefix') + libexecdir = join_paths(prefix, get_option('libexecdir')) + datadir = join_paths(prefix, get_option('datadir')) ++mandir = join_paths(prefix, get_option('mandir')) + schemadir = join_paths(datadir, 'glib-2.0', 'schemas') + + grd_datadir = join_paths(datadir, 'gnome-remote-desktop') +@@ -93,6 +94,10 @@ subdir('src') + subdir('tests') + subdir('po') + ++if get_option('man') ++ subdir('man') ++endif ++ + meson.add_install_script('meson_post_install.py') + + output = [ +diff --git a/meson_options.txt b/meson_options.txt +index 3527588..2897f30 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -1,3 +1,8 @@ ++option('man', ++ type: 'boolean', ++ value: true, ++ description: 'Generate man pages') ++ + option('rdp', + type: 'boolean', + value: true, +-- +2.34.1 + diff --git a/gnome-remote-desktop.spec b/gnome-remote-desktop.spec index 37f7c82..2f8a3af 100644 --- a/gnome-remote-desktop.spec +++ b/gnome-remote-desktop.spec @@ -3,7 +3,7 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-remote-desktop -Version: 42~beta +Version: 42~rc Release: 1%{?dist} Summary: GNOME Remote Desktop screen share service @@ -14,9 +14,12 @@ Source0: https://download.gnome.org/sources/gnome-remote-desktop/40/%{nam # Adds encryption support (requires patched LibVNCServer) Patch0: gnutls-anontls.patch +Patch1: 0001-Add-man-page.patch + BuildRequires: git BuildRequires: gcc BuildRequires: meson >= 0.36.0 +BuildRequires: asciidoc BuildRequires: pkgconfig BuildRequires: pkgconfig(cairo) BuildRequires: pkgconfig(glib-2.0) >= 2.32 @@ -79,14 +82,19 @@ GNOME desktop environment. %files -f gnome-remote-desktop.lang %license COPYING %doc README +%{_bindir}/grdctl %{_libexecdir}/gnome-remote-desktop-daemon %{_userunitdir}/gnome-remote-desktop.service %{_datadir}/glib-2.0/schemas/org.gnome.desktop.remote-desktop.gschema.xml %{_datadir}/glib-2.0/schemas/org.gnome.desktop.remote-desktop.enums.xml %{_datadir}/gnome-remote-desktop/ +%{_mandir}/man1/grdctl.1* %changelog +* Mon Mar 14 2022 Jonas Ådahl - 42~rc-1 +- Update to 42.rc + * Wed Feb 16 2022 Jonas Ådahl - 42~beta-1 - Update to 42.beta diff --git a/gnutls-anontls.patch b/gnutls-anontls.patch index daba810..98a9a49 100644 --- a/gnutls-anontls.patch +++ b/gnutls-anontls.patch @@ -1,4 +1,4 @@ -From 0fb8045a40412a472db93131df899b94e626886f Mon Sep 17 00:00:00 2001 +From 6ca82648e9b6791fbfbbbc9b05f15ec07a992e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 14 Jun 2018 12:21:37 +0200 Subject: [PATCH 1/7] vnc: Add anonymous TLS encryption support @@ -25,10 +25,10 @@ VNC connection. create mode 100644 src/grd-vnc-tls.h diff --git a/meson.build b/meson.build -index 4ac9093..a7d3bb0 100644 +index 6bd2420..d6c5d9b 100644 --- a/meson.build +++ b/meson.build -@@ -57,6 +57,7 @@ endif +@@ -50,6 +50,7 @@ endif if have_vnc libvncserver_dep = dependency('libvncserver') libvncclient_dep = dependency('libvncclient') @@ -37,10 +37,10 @@ index 4ac9093..a7d3bb0 100644 prefix = get_option('prefix') diff --git a/src/grd-enums.h b/src/grd-enums.h -index ffab821..4333863 100644 +index e3ecc40..fa8dfb7 100644 --- a/src/grd-enums.h +++ b/src/grd-enums.h -@@ -27,4 +27,10 @@ typedef enum +@@ -33,4 +33,10 @@ typedef enum GRD_VNC_AUTH_METHOD_PASSWORD } GrdVncAuthMethod; @@ -276,10 +276,10 @@ index fcc508d..092d9dc 100644 + #endif /* GRD_SESSION_VNC_H */ diff --git a/src/grd-settings.c b/src/grd-settings.c -index 4560a37..744ff89 100644 +index c8f28fb..502d956 100644 --- a/src/grd-settings.c +++ b/src/grd-settings.c -@@ -60,6 +60,7 @@ struct _GrdSettings +@@ -69,6 +69,7 @@ struct _GrdSettings gboolean view_only; GrdVncAuthMethod auth_method; int port; @@ -287,7 +287,7 @@ index 4560a37..744ff89 100644 } vnc; }; -@@ -248,6 +249,12 @@ grd_settings_get_vnc_auth_method (GrdSettings *settings) +@@ -245,6 +246,12 @@ grd_settings_get_vnc_auth_method (GrdSettings *settings) return settings->vnc.auth_method; } @@ -298,9 +298,9 @@ index 4560a37..744ff89 100644 +} + static void - update_rdp_tls_cert (GrdSettings *settings) + update_screen_share_mode (GrdSettings *settings) { -@@ -285,6 +292,13 @@ update_vnc_auth_method (GrdSettings *settings) +@@ -303,6 +310,13 @@ update_vnc_auth_method (GrdSettings *settings) "auth-method"); } @@ -314,7 +314,7 @@ index 4560a37..744ff89 100644 static void on_rdp_settings_changed (GSettings *rdp_settings, const char *key, -@@ -322,6 +336,11 @@ on_vnc_settings_changed (GSettings *vnc_settings, +@@ -355,6 +369,11 @@ on_vnc_settings_changed (GSettings *vnc_settings, update_vnc_auth_method (settings); g_signal_emit (settings, signals[VNC_AUTH_METHOD_CHANGED], 0); } @@ -326,7 +326,7 @@ index 4560a37..744ff89 100644 } static void -@@ -356,6 +375,8 @@ grd_settings_init (GrdSettings *settings) +@@ -392,6 +411,8 @@ grd_settings_init (GrdSettings *settings) settings->rdp.port = GRD_RDP_SERVER_PORT; settings->vnc.port = GRD_VNC_SERVER_PORT; @@ -335,7 +335,7 @@ index 4560a37..744ff89 100644 } static void -@@ -400,4 +421,11 @@ grd_settings_class_init (GrdSettingsClass *klass) +@@ -457,4 +478,11 @@ grd_settings_class_init (GrdSettingsClass *klass) 0, NULL, NULL, NULL, G_TYPE_NONE, 0); @@ -348,10 +348,10 @@ index 4560a37..744ff89 100644 + G_TYPE_NONE, 0); } diff --git a/src/grd-settings.h b/src/grd-settings.h -index e12e47e..b940fdb 100644 +index 449894a..900d81e 100644 --- a/src/grd-settings.h +++ b/src/grd-settings.h -@@ -64,4 +64,6 @@ gboolean grd_settings_get_vnc_view_only (GrdSettings *settings); +@@ -65,4 +65,6 @@ gboolean grd_settings_get_vnc_view_only (GrdSettings *settings); GrdVncAuthMethod grd_settings_get_vnc_auth_method (GrdSettings *settings); @@ -359,7 +359,7 @@ index e12e47e..b940fdb 100644 + #endif /* GRD_SETTINGS_H */ diff --git a/src/grd-vnc-server.c b/src/grd-vnc-server.c -index aae1029..3e43391 100644 +index 0b4322d..e8833f1 100644 --- a/src/grd-vnc-server.c +++ b/src/grd-vnc-server.c @@ -24,11 +24,13 @@ @@ -376,7 +376,7 @@ index aae1029..3e43391 100644 enum -@@ -130,6 +132,43 @@ on_incoming (GSocketService *service, +@@ -129,6 +131,43 @@ on_incoming (GSocketService *service, return TRUE; } @@ -420,7 +420,7 @@ index aae1029..3e43391 100644 gboolean grd_vnc_server_start (GrdVncServer *vnc_server, GError **error) -@@ -220,12 +259,18 @@ static void +@@ -217,12 +256,18 @@ static void grd_vnc_server_constructed (GObject *object) { GrdVncServer *vnc_server = GRD_VNC_SERVER (object); @@ -924,10 +924,10 @@ index 0000000..135ef8c + +#endif /* GRD_VNC_TLS_H */ diff --git a/src/meson.build b/src/meson.build -index 9723d4a..326bef6 100644 +index 1d671d7..ab675ff 100644 --- a/src/meson.build +++ b/src/meson.build -@@ -105,10 +105,13 @@ if have_vnc +@@ -115,10 +115,13 @@ if have_vnc 'grd-vnc-pipewire-stream.h', 'grd-vnc-server.c', 'grd-vnc-server.h', @@ -942,10 +942,10 @@ index 9723d4a..326bef6 100644 endif diff --git a/src/org.gnome.desktop.remote-desktop.gschema.xml.in b/src/org.gnome.desktop.remote-desktop.gschema.xml.in -index 0779c8c..b8e3b0a 100644 +index 939b9a6..e57affb 100644 --- a/src/org.gnome.desktop.remote-desktop.gschema.xml.in +++ b/src/org.gnome.desktop.remote-desktop.gschema.xml.in -@@ -49,5 +49,15 @@ +@@ -90,5 +90,15 @@ * password - by requiring the remote client to provide a known password @@ -965,7 +965,7 @@ index 0779c8c..b8e3b0a 100644 2.34.1 -From 3f7df606d5eed6d5b8444fef801c2bbc2a710b52 Mon Sep 17 00:00:00 2001 +From 212fa98088cb4a754bac8cdb3a69d2a3e6b4dff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 27 Nov 2019 11:02:09 +0100 Subject: [PATCH 2/7] session-vnc: Add paused/resumed signals @@ -1133,7 +1133,7 @@ index c2e29b4..4be4c49 100644 2.34.1 -From 30b795a086db2afaba5a6089567550aaabf66a78 Mon Sep 17 00:00:00 2001 +From db1ce3962bbe49491b87cb0a4a90de41614e118b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 27 Nov 2019 11:03:46 +0100 Subject: [PATCH 3/7] session-vnc: Add grd_session_vnc_dispatch() helper @@ -1206,7 +1206,7 @@ index 092d9dc..e9eced0 100644 2.34.1 -From 808f23c5e083f872b9b4343fc06efc76f8a8b9c1 Mon Sep 17 00:00:00 2001 +From d6115fc524886ba716ba22464743c1a72472ff75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 27 Nov 2019 11:05:13 +0100 Subject: [PATCH 4/7] vnc/tls: Add some logging @@ -1283,7 +1283,7 @@ index ec4758e..ac6c35f 100644 2.34.1 -From c571ae4d81b77684d19c844435915f6403b5130a Mon Sep 17 00:00:00 2001 +From c71c9d295a2921014d55820042fc8bdad02df19c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 27 Nov 2019 11:07:40 +0100 Subject: [PATCH 5/7] vnc/tls: Dispatch also when data is pending outside of @@ -1453,7 +1453,7 @@ index ac6c35f..312b6b9 100644 2.34.1 -From 8a7cef31e9b22ef3e98fa5b54ac0756083b581e2 Mon Sep 17 00:00:00 2001 +From edc2380304d19e1bea58b079b943bad42cac5d69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 27 Nov 2019 16:48:00 +0100 Subject: [PATCH 6/7] session-vnc: Set our own password handling function up @@ -1508,7 +1508,7 @@ index 9708de0..bc60285 100644 2.34.1 -From 99cf5c5df74b71e5c8ad99ab10cff2f09ee7e677 Mon Sep 17 00:00:00 2001 +From 539d2c562b8068f1f698468cb87b36b4968c1517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 12 Oct 2020 17:34:30 +0200 Subject: [PATCH 7/7] vnc: Copy pixels using the right destination stride diff --git a/sources b/sources index a01d0b7..9f8f626 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-remote-desktop-42.beta.tar.xz) = 24d0ab9091f2fb88a975a07493039be3280cd39b698558c4b6cc6901e89bcb56fab88eeec184206647e0f4ac9786c5aeaf94a6feb35fb28b67e54162fab74193 +SHA512 (gnome-remote-desktop-42.rc.tar.xz) = b37f058f623cef85b046115c26411fb85a6c633b13f70bbfc5c943f091dc51621ef9d783193cf777eb2999a714c7e461d71e1999674ae6006ef6ecb98cea1c39 From 8b6fc5111313ee841add5e6009d7610fbb363e8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 21 Mar 2022 07:14:31 +0100 Subject: [PATCH 03/14] Update to 42.0 --- .gitignore | 1 + gnome-remote-desktop.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 067d29c..d78ebf2 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /gnome-remote-desktop-41.2.tar.xz /gnome-remote-desktop-42.beta.tar.xz /gnome-remote-desktop-42.rc.tar.xz +/gnome-remote-desktop-42.0.tar.xz diff --git a/gnome-remote-desktop.spec b/gnome-remote-desktop.spec index 2f8a3af..2428c4e 100644 --- a/gnome-remote-desktop.spec +++ b/gnome-remote-desktop.spec @@ -3,7 +3,7 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-remote-desktop -Version: 42~rc +Version: 42.0 Release: 1%{?dist} Summary: GNOME Remote Desktop screen share service @@ -92,6 +92,9 @@ GNOME desktop environment. %changelog +* Mon Mar 21 2022 Jonas Ådahl - 42.0 +- Update to 42.0 + * Mon Mar 14 2022 Jonas Ådahl - 42~rc-1 - Update to 42.rc diff --git a/sources b/sources index 9f8f626..cbcd187 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-remote-desktop-42.rc.tar.xz) = b37f058f623cef85b046115c26411fb85a6c633b13f70bbfc5c943f091dc51621ef9d783193cf777eb2999a714c7e461d71e1999674ae6006ef6ecb98cea1c39 +SHA512 (gnome-remote-desktop-42.0.tar.xz) = 3bf03fc96205df4c5efcef0e340ad85e7011ad8e4fecf2e29d9902fbb1633801da7d1094645e850267249dda9383ae0aa782f3e0207a7351d764482f2d0dc349 From 151c60fed40ddad37c2ac50684b1cc92dd57e889 Mon Sep 17 00:00:00 2001 From: David King Date: Tue, 26 Apr 2022 09:46:19 +0100 Subject: [PATCH 04/14] Update to 42.1 (#2061546) --- .gitignore | 1 + gnome-remote-desktop.spec | 62 ++++++++++++++++++++------------------- sources | 2 +- 3 files changed, 34 insertions(+), 31 deletions(-) diff --git a/.gitignore b/.gitignore index d78ebf2..db0f27c 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /gnome-remote-desktop-42.beta.tar.xz /gnome-remote-desktop-42.rc.tar.xz /gnome-remote-desktop-42.0.tar.xz +/gnome-remote-desktop-42.1.tar.xz diff --git a/gnome-remote-desktop.spec b/gnome-remote-desktop.spec index 2428c4e..05c7110 100644 --- a/gnome-remote-desktop.spec +++ b/gnome-remote-desktop.spec @@ -3,47 +3,43 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-remote-desktop -Version: 42.0 +Version: 42.1 Release: 1%{?dist} Summary: GNOME Remote Desktop screen share service License: GPLv2+ -URL: https://gitlab.gnome.org/jadahl/gnome-remote-desktop -Source0: https://download.gnome.org/sources/gnome-remote-desktop/40/%{name}-%{tarball_version}.tar.xz +URL: https://gitlab.gnome.org/GNOME/gnome-remote-desktop +Source0: https://download.gnome.org/sources/%{name}/42/%{name}-%{tarball_version}.tar.xz # Adds encryption support (requires patched LibVNCServer) Patch0: gnutls-anontls.patch Patch1: 0001-Add-man-page.patch -BuildRequires: git -BuildRequires: gcc -BuildRequires: meson >= 0.36.0 BuildRequires: asciidoc -BuildRequires: pkgconfig +BuildRequires: gcc +BuildRequires: meson >= 0.47.0 +BuildRequires: systemd-rpm-macros BuildRequires: pkgconfig(cairo) -BuildRequires: pkgconfig(glib-2.0) >= 2.32 -BuildRequires: pkgconfig(gio-unix-2.0) >= 2.32 -BuildRequires: pkgconfig(libpipewire-0.3) >= 0.3.0 -BuildRequires: pkgconfig(libvncserver) >= 0.9.11-7 -BuildRequires: pkgconfig(freerdp2) -BuildRequires: pkgconfig(winpr2) -BuildRequires: pkgconfig(fuse3) -BuildRequires: pkgconfig(ffnvcodec) -BuildRequires: pkgconfig(xkbcommon) -BuildRequires: pkgconfig(libsecret-1) -BuildRequires: pkgconfig(libnotify) -BuildRequires: pkgconfig(gnutls) -BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(epoxy) +BuildRequires: pkgconfig(ffnvcodec) +BuildRequires: pkgconfig(freerdp2) +BuildRequires: pkgconfig(fuse3) BuildRequires: pkgconfig(gbm) +BuildRequires: pkgconfig(glib-2.0) >= 2.68 +BuildRequires: pkgconfig(gio-unix-2.0) +BuildRequires: pkgconfig(gnutls) BuildRequires: pkgconfig(gudev-1.0) +BuildRequires: pkgconfig(libdrm) +BuildRequires: pkgconfig(libnotify) +BuildRequires: pkgconfig(libpipewire-0.3) +BuildRequires: pkgconfig(libsecret-1) +BuildRequires: pkgconfig(libvncserver) >= 0.9.11-7 +BuildRequires: pkgconfig(systemd) +BuildRequires: pkgconfig(winpr2) +BuildRequires: pkgconfig(xkbcommon) -BuildRequires: systemd - -Requires: pipewire >= 0.3.0 -Requires: libdrm -Requires: libepoxy +Requires: pipewire{?_isa} >= 0.3.0 Obsoletes: vino < 3.22.0-21 @@ -53,18 +49,21 @@ GNOME desktop environment. %prep -%autosetup -S git -n %{name}-%{tarball_version} +%autosetup -p1 -n %{name}-%{tarball_version} %build -%meson +%meson \ + -Drdp=true \ + -Dsystemd=true \ + -Dvnc=true %meson_build %install %meson_install -%find_lang gnome-remote-desktop +%find_lang %{name} %post @@ -79,12 +78,12 @@ GNOME desktop environment. %systemd_user_postun_with_restart %{systemd_unit} -%files -f gnome-remote-desktop.lang +%files -f %{name}.lang %license COPYING %doc README %{_bindir}/grdctl %{_libexecdir}/gnome-remote-desktop-daemon -%{_userunitdir}/gnome-remote-desktop.service +%{_userunitdir}/%{systemd_unit} %{_datadir}/glib-2.0/schemas/org.gnome.desktop.remote-desktop.gschema.xml %{_datadir}/glib-2.0/schemas/org.gnome.desktop.remote-desktop.enums.xml %{_datadir}/gnome-remote-desktop/ @@ -92,6 +91,9 @@ GNOME desktop environment. %changelog +* Tue Apr 26 2022 David King - 42.1-1 +- Update to 42.1 (#2061546) + * Mon Mar 21 2022 Jonas Ådahl - 42.0 - Update to 42.0 diff --git a/sources b/sources index cbcd187..cd666c3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-remote-desktop-42.0.tar.xz) = 3bf03fc96205df4c5efcef0e340ad85e7011ad8e4fecf2e29d9902fbb1633801da7d1094645e850267249dda9383ae0aa782f3e0207a7351d764482f2d0dc349 +SHA512 (gnome-remote-desktop-42.1.tar.xz) = 3e17d6482941fccfe6860d2ca2db50235ee70a26fd8942ee1850addb11006cfb152dd949102a4c573f2b6a29f9f2bb78c9ad5be1cba8622ad5b54f82c509376f From 7944a77c191bbf770adc2815104457b10954887c Mon Sep 17 00:00:00 2001 From: David King Date: Wed, 27 Apr 2022 12:05:03 +0100 Subject: [PATCH 05/14] Fix isa macro in Requires --- .gitignore | 1 + gnome-remote-desktop.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index db0f27c..21d67eb 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /gnome-remote-desktop-42.rc.tar.xz /gnome-remote-desktop-42.0.tar.xz /gnome-remote-desktop-42.1.tar.xz +/gnome-remote-desktop-42.1.1.tar.xz diff --git a/gnome-remote-desktop.spec b/gnome-remote-desktop.spec index 05c7110..ef4f912 100644 --- a/gnome-remote-desktop.spec +++ b/gnome-remote-desktop.spec @@ -4,7 +4,7 @@ Name: gnome-remote-desktop Version: 42.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GNOME Remote Desktop screen share service License: GPLv2+ @@ -39,7 +39,7 @@ BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(winpr2) BuildRequires: pkgconfig(xkbcommon) -Requires: pipewire{?_isa} >= 0.3.0 +Requires: pipewire%{?_isa} >= 0.3.0 Obsoletes: vino < 3.22.0-21 @@ -91,6 +91,9 @@ GNOME desktop environment. %changelog +* Wed Apr 27 2022 David King - 42.1-2 +- Fix isa macro in Requires + * Tue Apr 26 2022 David King - 42.1-1 - Update to 42.1 (#2061546) diff --git a/sources b/sources index cd666c3..bf29544 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-remote-desktop-42.1.tar.xz) = 3e17d6482941fccfe6860d2ca2db50235ee70a26fd8942ee1850addb11006cfb152dd949102a4c573f2b6a29f9f2bb78c9ad5be1cba8622ad5b54f82c509376f +SHA512 (gnome-remote-desktop-42.1.1.tar.xz) = 4fbf9305aa7339d9e7fcbf8df8eea97ba675630f6d01ef9a9f049ca3a3bf930f26b0e993ffe386682906d719b15058ce752e4592a3e710ceceb977000ebb1ce1 From 3618b7fc2029deda03956643d18cb6073c6a9c6f Mon Sep 17 00:00:00 2001 From: David King Date: Wed, 27 Apr 2022 12:08:44 +0100 Subject: [PATCH 06/14] Update sources --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index bf29544..cd666c3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-remote-desktop-42.1.1.tar.xz) = 4fbf9305aa7339d9e7fcbf8df8eea97ba675630f6d01ef9a9f049ca3a3bf930f26b0e993ffe386682906d719b15058ce752e4592a3e710ceceb977000ebb1ce1 +SHA512 (gnome-remote-desktop-42.1.tar.xz) = 3e17d6482941fccfe6860d2ca2db50235ee70a26fd8942ee1850addb11006cfb152dd949102a4c573f2b6a29f9f2bb78c9ad5be1cba8622ad5b54f82c509376f From 3d4913a7bede8c3799bbefa87438dddb78ce16a5 Mon Sep 17 00:00:00 2001 From: David King Date: Wed, 11 May 2022 11:26:25 +0100 Subject: [PATCH 07/14] Update to 42.1.1 (#2061546) --- ...s-using-the-right-destination-stride.patch | 71 --- 0001-vnc-Drop-frames-if-client-is-gone.patch | 80 --- ...pewire-stream-Handle-stride-mismatch.patch | 73 --- gnome-remote-desktop.spec | 7 +- gnutls-anontls.patch | 464 +++++++++--------- sources | 2 +- 6 files changed, 238 insertions(+), 459 deletions(-) delete mode 100644 0001-vnc-Copy-pixels-using-the-right-destination-stride.patch delete mode 100644 0001-vnc-Drop-frames-if-client-is-gone.patch delete mode 100644 0001-vnc-pipewire-stream-Handle-stride-mismatch.patch diff --git a/0001-vnc-Copy-pixels-using-the-right-destination-stride.patch b/0001-vnc-Copy-pixels-using-the-right-destination-stride.patch deleted file mode 100644 index fc5c830..0000000 --- a/0001-vnc-Copy-pixels-using-the-right-destination-stride.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 81172effba7c70d3b2932c67be79a2924eae9d73 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jonas=20=C3=85dahl?= -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 - diff --git a/0001-vnc-Drop-frames-if-client-is-gone.patch b/0001-vnc-Drop-frames-if-client-is-gone.patch deleted file mode 100644 index 59dde2a..0000000 --- a/0001-vnc-Drop-frames-if-client-is-gone.patch +++ /dev/null @@ -1,80 +0,0 @@ -From ab97841629f5f3f4fab9993b6255b6ae04828b9c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jonas=20=C3=85dahl?= -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 - diff --git a/0001-vnc-pipewire-stream-Handle-stride-mismatch.patch b/0001-vnc-pipewire-stream-Handle-stride-mismatch.patch deleted file mode 100644 index dcdad19..0000000 --- a/0001-vnc-pipewire-stream-Handle-stride-mismatch.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 78c5bcb181fe2b0b9fc17eea696feac8b504df54 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jonas=20=C3=85dahl?= -Date: Thu, 7 May 2020 15:48:22 +0200 -Subject: [PATCH] vnc/pipewire-stream: Handle stride mismatch - -The VNC server framebuffer assumes a particular stride; but there is no -guarantee that we'll get the same from PipeWire. Handle this gracefully -by coping row by row instead of the whole buffer. ---- - src/grd-vnc-pipewire-stream.c | 23 +++++++++++++++-------- - 1 file changed, 15 insertions(+), 8 deletions(-) - -diff --git a/src/grd-vnc-pipewire-stream.c b/src/grd-vnc-pipewire-stream.c -index 88c07be..261292a 100644 ---- a/src/grd-vnc-pipewire-stream.c -+++ b/src/grd-vnc-pipewire-stream.c -@@ -187,8 +187,6 @@ on_stream_param_changed (void *user_data, - struct spa_pod_builder pod_builder; - int width; - int height; -- int stride; -- int size; - const struct spa_pod *params[3]; - - if (!format || id != SPA_PARAM_Format) -@@ -203,14 +201,9 @@ on_stream_param_changed (void *user_data, - - grd_session_vnc_queue_resize_framebuffer (stream->session, width, height); - -- stride = grd_session_vnc_get_framebuffer_stride (stream->session); -- size = stride * height; -- - params[0] = spa_pod_builder_add_object ( - &pod_builder, - SPA_TYPE_OBJECT_ParamBuffers, SPA_PARAM_Buffers, -- SPA_PARAM_BUFFERS_size, SPA_POD_Int (size), -- SPA_PARAM_BUFFERS_stride, SPA_POD_Int (stride), - SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int (8, 1, 8), - 0); - -@@ -319,6 +312,10 @@ process_buffer (GrdVncPipeWireStream *stream, - size_t size; - uint8_t *map; - void *src_data; -+ int src_stride; -+ int dst_stride; -+ int height; -+ int y; - struct spa_meta_cursor *spa_meta_cursor; - g_autofree GrdVncFrame *frame = NULL; - -@@ -359,7 +356,17 @@ process_buffer (GrdVncPipeWireStream *stream, - return NULL; - } - -- frame->data = g_memdup (src_data, buffer->datas[0].maxsize); -+ src_stride = buffer->datas[0].chunk->stride; -+ dst_stride = grd_session_vnc_get_framebuffer_stride (stream->session); -+ height = stream->spa_format.size.height; -+ -+ frame->data = g_malloc (height * dst_stride); -+ for (y = 0; y < height; y++) -+ { -+ memcpy (((uint8_t *) frame->data) + y * dst_stride, -+ ((uint8_t *) src_data) + y * src_stride, -+ stream->spa_format.size.width * 4); -+ } - - if (map) - { --- -2.26.2 - diff --git a/gnome-remote-desktop.spec b/gnome-remote-desktop.spec index ef4f912..544bfd5 100644 --- a/gnome-remote-desktop.spec +++ b/gnome-remote-desktop.spec @@ -3,8 +3,8 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-remote-desktop -Version: 42.1 -Release: 2%{?dist} +Version: 42.1.1 +Release: 1%{?dist} Summary: GNOME Remote Desktop screen share service License: GPLv2+ @@ -91,6 +91,9 @@ GNOME desktop environment. %changelog +* Wed May 11 2022 David King - 42.1.1-1 +- Update to 42.1.1 (#2061546) + * Wed Apr 27 2022 David King - 42.1-2 - Fix isa macro in Requires diff --git a/gnutls-anontls.patch b/gnutls-anontls.patch index 98a9a49..d36acfd 100644 --- a/gnutls-anontls.patch +++ b/gnutls-anontls.patch @@ -1,4 +1,4 @@ -From 6ca82648e9b6791fbfbbbc9b05f15ec07a992e1a Mon Sep 17 00:00:00 2001 +From 63d1c041e3997bfc78803b4d0fe09d96b53c9e50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 14 Jun 2018 12:21:37 +0200 Subject: [PATCH 1/7] vnc: Add anonymous TLS encryption support @@ -25,7 +25,7 @@ VNC connection. create mode 100644 src/grd-vnc-tls.h diff --git a/meson.build b/meson.build -index 6bd2420..d6c5d9b 100644 +index 72d34a4..9a341fa 100644 --- a/meson.build +++ b/meson.build @@ -50,6 +50,7 @@ endif @@ -52,7 +52,7 @@ index e3ecc40..fa8dfb7 100644 + #endif /* GRD_ENUMS_H */ diff --git a/src/grd-session-vnc.c b/src/grd-session-vnc.c -index a4cb958..c2e29b4 100644 +index fbc66a4..fa694f0 100644 --- a/src/grd-session-vnc.c +++ b/src/grd-session-vnc.c @@ -45,7 +45,9 @@ struct _GrdSessionVnc @@ -220,7 +220,7 @@ index a4cb958..c2e29b4 100644 NULL); g_source_set_callback (session_vnc->source, (GSourceFunc) handle_socket_data, -@@ -669,8 +733,10 @@ grd_session_vnc_new (GrdVncServer *vnc_server, +@@ -673,8 +737,10 @@ grd_session_vnc_new (GrdVncServer *vnc_server, "context", context, NULL); @@ -231,7 +231,7 @@ index a4cb958..c2e29b4 100644 grd_session_vnc_attach_source (session_vnc); init_vnc_session (session_vnc); -@@ -685,6 +751,8 @@ grd_session_vnc_dispose (GObject *object) +@@ -689,6 +755,8 @@ grd_session_vnc_dispose (GObject *object) g_assert (!session_vnc->rfb_screen); @@ -276,7 +276,7 @@ index fcc508d..092d9dc 100644 + #endif /* GRD_SESSION_VNC_H */ diff --git a/src/grd-settings.c b/src/grd-settings.c -index c8f28fb..502d956 100644 +index dad5d57..7753186 100644 --- a/src/grd-settings.c +++ b/src/grd-settings.c @@ -69,6 +69,7 @@ struct _GrdSettings @@ -287,7 +287,7 @@ index c8f28fb..502d956 100644 } vnc; }; -@@ -245,6 +246,12 @@ grd_settings_get_vnc_auth_method (GrdSettings *settings) +@@ -259,6 +260,12 @@ grd_settings_get_vnc_auth_method (GrdSettings *settings) return settings->vnc.auth_method; } @@ -300,7 +300,7 @@ index c8f28fb..502d956 100644 static void update_screen_share_mode (GrdSettings *settings) { -@@ -303,6 +310,13 @@ update_vnc_auth_method (GrdSettings *settings) +@@ -317,6 +324,13 @@ update_vnc_auth_method (GrdSettings *settings) "auth-method"); } @@ -314,7 +314,7 @@ index c8f28fb..502d956 100644 static void on_rdp_settings_changed (GSettings *rdp_settings, const char *key, -@@ -355,6 +369,11 @@ on_vnc_settings_changed (GSettings *vnc_settings, +@@ -369,6 +383,11 @@ on_vnc_settings_changed (GSettings *vnc_settings, update_vnc_auth_method (settings); g_signal_emit (settings, signals[VNC_AUTH_METHOD_CHANGED], 0); } @@ -326,7 +326,7 @@ index c8f28fb..502d956 100644 } static void -@@ -392,6 +411,8 @@ grd_settings_init (GrdSettings *settings) +@@ -406,6 +425,8 @@ grd_settings_init (GrdSettings *settings) settings->rdp.port = GRD_RDP_SERVER_PORT; settings->vnc.port = GRD_VNC_SERVER_PORT; @@ -335,7 +335,7 @@ index c8f28fb..502d956 100644 } static void -@@ -457,4 +478,11 @@ grd_settings_class_init (GrdSettingsClass *klass) +@@ -471,4 +492,11 @@ grd_settings_class_init (GrdSettingsClass *klass) 0, NULL, NULL, NULL, G_TYPE_NONE, 0); @@ -962,181 +962,13 @@ index 939b9a6..e57affb 100644 -- -2.34.1 +2.36.1 -From 212fa98088cb4a754bac8cdb3a69d2a3e6b4dff9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jonas=20=C3=85dahl?= -Date: Wed, 27 Nov 2019 11:02:09 +0100 -Subject: [PATCH 2/7] session-vnc: Add paused/resumed signals - -Paused is when the socket sourec is detached, and resumed when attached. -Meant to be used by the TLS channel security to a attach/detach -out-of-socket source. ---- - src/grd-session-vnc.c | 72 ++++++++++++++++++++++++++++++++++++++----- - 1 file changed, 65 insertions(+), 7 deletions(-) - -diff --git a/src/grd-session-vnc.c b/src/grd-session-vnc.c -index c2e29b4..4be4c49 100644 ---- a/src/grd-session-vnc.c -+++ b/src/grd-session-vnc.c -@@ -41,14 +41,27 @@ - #define BGRX_SAMPLES_PER_PIXEL 3 - #define BGRX_BYTES_PER_PIXEL 4 - -+enum -+{ -+ PAUSED, -+ RESUMED, -+ -+ N_SIGNALS -+}; -+ -+static guint signals[N_SIGNALS]; -+ - struct _GrdSessionVnc - { - GrdSession parent; - - GrdVncServer *vnc_server; - GSocketConnection *connection; -+ - GList *socket_grabs; - GSource *source; -+ gboolean is_paused; -+ - rfbScreenInfoPtr rfb_screen; - rfbClientPtr rfb_client; - -@@ -77,7 +90,7 @@ struct _GrdSessionVnc - G_DEFINE_TYPE (GrdSessionVnc, grd_session_vnc, GRD_TYPE_SESSION) - - static void --grd_session_vnc_detach_source (GrdSessionVnc *session_vnc); -+grd_session_vnc_pause (GrdSessionVnc *session_vnc); - - static gboolean - close_session_idle (gpointer user_data); -@@ -236,7 +249,8 @@ handle_client_gone (rfbClientPtr rfb_client) - - g_debug ("VNC client gone"); - -- grd_session_vnc_detach_source (session_vnc); -+ grd_session_vnc_pause (session_vnc); -+ - maybe_queue_close_session_idle (session_vnc); - session_vnc->rfb_client = NULL; - } -@@ -305,7 +319,7 @@ handle_new_client (rfbClientPtr rfb_client) - session_vnc->prompt_cancellable, - prompt_response_callback, - session_vnc); -- grd_session_vnc_detach_source (session_vnc); -+ grd_session_vnc_pause (session_vnc); - return RFB_CLIENT_ON_HOLD; - case GRD_VNC_AUTH_METHOD_PASSWORD: - session_vnc->rfb_screen->passwordCheck = check_rfb_password; -@@ -536,7 +550,7 @@ check_rfb_password (rfbClientPtr rfb_client, - if (memcmp (challenge_encrypted, response_encrypted, len) == 0) - { - grd_session_start (GRD_SESSION (session_vnc)); -- grd_session_vnc_detach_source (session_vnc); -+ grd_session_vnc_pause (session_vnc); - return TRUE; - } - else -@@ -721,6 +735,36 @@ grd_session_vnc_detach_source (GrdSessionVnc *session_vnc) - g_clear_pointer (&session_vnc->source, g_source_destroy); - } - -+gboolean -+grd_session_vnc_is_paused (GrdSessionVnc *session_vnc) -+{ -+ return session_vnc->is_paused; -+} -+ -+static void -+grd_session_vnc_pause (GrdSessionVnc *session_vnc) -+{ -+ if (grd_session_vnc_is_paused (session_vnc)) -+ return; -+ -+ session_vnc->is_paused = TRUE; -+ -+ grd_session_vnc_detach_source (session_vnc); -+ g_signal_emit (session_vnc, signals[PAUSED], 0); -+} -+ -+static void -+grd_session_vnc_resume (GrdSessionVnc *session_vnc) -+{ -+ if (!grd_session_vnc_is_paused (session_vnc)) -+ return; -+ -+ session_vnc->is_paused = FALSE; -+ -+ grd_session_vnc_attach_source (session_vnc); -+ g_signal_emit (session_vnc, signals[RESUMED], 0); -+} -+ - GrdSessionVnc * - grd_session_vnc_new (GrdVncServer *vnc_server, - GSocketConnection *connection) -@@ -738,6 +782,7 @@ grd_session_vnc_new (GrdVncServer *vnc_server, - - grd_session_vnc_grab_socket (session_vnc, vnc_socket_grab_func); - grd_session_vnc_attach_source (session_vnc); -+ session_vnc->is_paused = FALSE; - - init_vnc_session (session_vnc); - -@@ -767,7 +812,7 @@ grd_session_vnc_stop (GrdSession *session) - - g_clear_object (&session_vnc->pipewire_stream); - -- grd_session_vnc_detach_source (session_vnc); -+ grd_session_vnc_pause (session_vnc); - - g_clear_object (&session_vnc->connection); - g_clear_object (&session_vnc->clipboard_vnc); -@@ -827,8 +872,8 @@ grd_session_vnc_stream_ready (GrdSession *session, - G_CALLBACK (on_pipewire_stream_closed), - session_vnc); - -- if (!session_vnc->source) -- grd_session_vnc_attach_source (session_vnc); -+ if (grd_session_vnc_is_paused (session_vnc)) -+ grd_session_vnc_resume (session_vnc); - } - - static void -@@ -849,4 +894,17 @@ grd_session_vnc_class_init (GrdSessionVncClass *klass) - session_class->remote_desktop_session_started = - grd_session_vnc_remote_desktop_session_started; - session_class->stream_ready = grd_session_vnc_stream_ready; -+ -+ signals[PAUSED] = g_signal_new ("paused", -+ G_TYPE_FROM_CLASS (klass), -+ G_SIGNAL_RUN_LAST, -+ 0, -+ NULL, NULL, NULL, -+ G_TYPE_NONE, 0); -+ signals[RESUMED] = g_signal_new ("resumed", -+ G_TYPE_FROM_CLASS (klass), -+ G_SIGNAL_RUN_LAST, -+ 0, -+ NULL, NULL, NULL, -+ G_TYPE_NONE, 0); - } --- -2.34.1 - - -From db1ce3962bbe49491b87cb0a4a90de41614e118b Mon Sep 17 00:00:00 2001 +From 38d981d05fa79da2aa15076637253f6c4cc606d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 27 Nov 2019 11:03:46 +0100 -Subject: [PATCH 3/7] session-vnc: Add grd_session_vnc_dispatch() helper +Subject: [PATCH 2/7] session-vnc: Add grd_session_vnc_dispatch() helper To be used by the TLS channel security to dispatch when there is data available that is not visible to the socket source. @@ -1146,10 +978,10 @@ available that is not visible to the socket source. 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/grd-session-vnc.c b/src/grd-session-vnc.c -index 4be4c49..9708de0 100644 +index fa694f0..1edd33a 100644 --- a/src/grd-session-vnc.c +++ b/src/grd-session-vnc.c -@@ -675,6 +675,21 @@ vnc_socket_grab_func (GrdSessionVnc *session_vnc, +@@ -661,6 +661,21 @@ vnc_socket_grab_func (GrdSessionVnc *session_vnc, return TRUE; } @@ -1171,7 +1003,7 @@ index 4be4c49..9708de0 100644 static gboolean handle_socket_data (GSocket *socket, GIOCondition condition, -@@ -691,16 +706,7 @@ handle_socket_data (GSocket *socket, +@@ -677,16 +692,7 @@ handle_socket_data (GSocket *socket, } else if (condition & G_IO_IN) { @@ -1203,13 +1035,13 @@ index 092d9dc..e9eced0 100644 #endif /* GRD_SESSION_VNC_H */ -- -2.34.1 +2.36.1 -From d6115fc524886ba716ba22464743c1a72472ff75 Mon Sep 17 00:00:00 2001 +From 9aacfa825fcdef0f2eb87b7f48872b1a93ec7923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 27 Nov 2019 11:05:13 +0100 -Subject: [PATCH 4/7] vnc/tls: Add some logging +Subject: [PATCH 3/7] vnc/tls: Add some logging Uses the log utility from libvncserver as it is related to the RFB protocol rather than the session itself. @@ -1280,13 +1112,13 @@ index ec4758e..ac6c35f 100644 { g_warning ("TLS handshake failed: %s", error->message); -- -2.34.1 +2.36.1 -From c71c9d295a2921014d55820042fc8bdad02df19c Mon Sep 17 00:00:00 2001 +From aeaa81db6cf160a32c8d83a945c860bb7451babf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 27 Nov 2019 11:07:40 +0100 -Subject: [PATCH 5/7] vnc/tls: Dispatch also when data is pending outside of +Subject: [PATCH 4/7] vnc/tls: Dispatch also when data is pending outside of the socket gnutls may have data available in its buffers, and we have our own peek @@ -1450,13 +1282,216 @@ index ac6c35f..312b6b9 100644 } -- -2.34.1 +2.36.1 -From edc2380304d19e1bea58b079b943bad42cac5d69 Mon Sep 17 00:00:00 2001 +From be203b966ff119e82ea7ac9894b67a1db2f55f26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= -Date: Wed, 27 Nov 2019 16:48:00 +0100 -Subject: [PATCH 6/7] session-vnc: Set our own password handling function up +Date: Mon, 12 Oct 2020 17:34:30 +0200 +Subject: [PATCH 5/7] 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.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/grd-session-vnc.h b/src/grd-session-vnc.h +index 8a916b7..e85f31e 100644 +--- a/src/grd-session-vnc.h ++++ b/src/grd-session-vnc.h +@@ -67,7 +67,8 @@ int grd_session_vnc_get_stride_for_width (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); + +-- +2.36.1 + + +From ffd24b13dfce2e89acf5eb6ccd7bb6b90487e547 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20=C3=85dahl?= +Date: Wed, 11 May 2022 11:17:00 +0100 +Subject: [PATCH 6/7] session-vnc: Add paused/resumed signals + +Paused is when the socket sourec is detached, and resumed when attached. +Meant to be used by the TLS channel security to a attach/detach +out-of-socket source. +--- + src/grd-session-vnc.c | 72 ++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 65 insertions(+), 7 deletions(-) + +diff --git a/src/grd-session-vnc.c b/src/grd-session-vnc.c +index 1edd33a..39d3ead 100644 +--- a/src/grd-session-vnc.c ++++ b/src/grd-session-vnc.c +@@ -41,14 +41,27 @@ + #define BGRX_SAMPLES_PER_PIXEL 3 + #define BGRX_BYTES_PER_PIXEL 4 + ++enum ++{ ++ PAUSED, ++ RESUMED, ++ ++ N_SIGNALS ++}; ++ ++static guint signals[N_SIGNALS]; ++ + struct _GrdSessionVnc + { + GrdSession parent; + + GrdVncServer *vnc_server; + GSocketConnection *connection; ++ + GList *socket_grabs; + GSource *source; ++ gboolean is_paused; ++ + rfbScreenInfoPtr rfb_screen; + rfbClientPtr rfb_client; + +@@ -77,7 +90,7 @@ struct _GrdSessionVnc + G_DEFINE_TYPE (GrdSessionVnc, grd_session_vnc, GRD_TYPE_SESSION) + + static void +-grd_session_vnc_detach_source (GrdSessionVnc *session_vnc); ++grd_session_vnc_pause (GrdSessionVnc *session_vnc); + + static gboolean + close_session_idle (gpointer user_data); +@@ -236,7 +249,8 @@ handle_client_gone (rfbClientPtr rfb_client) + + g_debug ("VNC client gone"); + +- grd_session_vnc_detach_source (session_vnc); ++ grd_session_vnc_pause (session_vnc); ++ + maybe_queue_close_session_idle (session_vnc); + session_vnc->rfb_client = NULL; + } +@@ -305,7 +319,7 @@ handle_new_client (rfbClientPtr rfb_client) + session_vnc->prompt_cancellable, + prompt_response_callback, + session_vnc); +- grd_session_vnc_detach_source (session_vnc); ++ grd_session_vnc_pause (session_vnc); + return RFB_CLIENT_ON_HOLD; + case GRD_VNC_AUTH_METHOD_PASSWORD: + session_vnc->rfb_screen->passwordCheck = check_rfb_password; +@@ -536,7 +550,7 @@ check_rfb_password (rfbClientPtr rfb_client, + if (memcmp (challenge_encrypted, response_encrypted, len) == 0) + { + grd_session_start (GRD_SESSION (session_vnc)); +- grd_session_vnc_detach_source (session_vnc); ++ grd_session_vnc_pause (session_vnc); + return TRUE; + } + else +@@ -731,6 +745,36 @@ grd_session_vnc_detach_source (GrdSessionVnc *session_vnc) + g_clear_pointer (&session_vnc->source, g_source_unref); + } + ++gboolean ++grd_session_vnc_is_paused (GrdSessionVnc *session_vnc) ++{ ++ return session_vnc->is_paused; ++} ++ ++static void ++grd_session_vnc_pause (GrdSessionVnc *session_vnc) ++{ ++ if (grd_session_vnc_is_paused (session_vnc)) ++ return; ++ ++ session_vnc->is_paused = TRUE; ++ ++ grd_session_vnc_detach_source (session_vnc); ++ g_signal_emit (session_vnc, signals[PAUSED], 0); ++} ++ ++static void ++grd_session_vnc_resume (GrdSessionVnc *session_vnc) ++{ ++ if (!grd_session_vnc_is_paused (session_vnc)) ++ return; ++ ++ session_vnc->is_paused = FALSE; ++ ++ grd_session_vnc_attach_source (session_vnc); ++ g_signal_emit (session_vnc, signals[RESUMED], 0); ++} ++ + GrdSessionVnc * + grd_session_vnc_new (GrdVncServer *vnc_server, + GSocketConnection *connection) +@@ -748,6 +792,7 @@ grd_session_vnc_new (GrdVncServer *vnc_server, + + grd_session_vnc_grab_socket (session_vnc, vnc_socket_grab_func); + grd_session_vnc_attach_source (session_vnc); ++ session_vnc->is_paused = FALSE; + + init_vnc_session (session_vnc); + +@@ -777,7 +822,7 @@ grd_session_vnc_stop (GrdSession *session) + + g_clear_object (&session_vnc->pipewire_stream); + +- grd_session_vnc_detach_source (session_vnc); ++ grd_session_vnc_pause (session_vnc); + + g_clear_object (&session_vnc->connection); + g_clear_object (&session_vnc->clipboard_vnc); +@@ -837,8 +882,8 @@ grd_session_vnc_stream_ready (GrdSession *session, + G_CALLBACK (on_pipewire_stream_closed), + session_vnc); + +- if (!session_vnc->source) +- grd_session_vnc_attach_source (session_vnc); ++ if (grd_session_vnc_is_paused (session_vnc)) ++ grd_session_vnc_resume (session_vnc); + } + + static void +@@ -859,4 +904,17 @@ grd_session_vnc_class_init (GrdSessionVncClass *klass) + session_class->remote_desktop_session_started = + grd_session_vnc_remote_desktop_session_started; + session_class->stream_ready = grd_session_vnc_stream_ready; ++ ++ signals[PAUSED] = g_signal_new ("paused", ++ G_TYPE_FROM_CLASS (klass), ++ G_SIGNAL_RUN_LAST, ++ 0, ++ NULL, NULL, NULL, ++ G_TYPE_NONE, 0); ++ signals[RESUMED] = g_signal_new ("resumed", ++ G_TYPE_FROM_CLASS (klass), ++ G_SIGNAL_RUN_LAST, ++ 0, ++ NULL, NULL, NULL, ++ G_TYPE_NONE, 0); + } +-- +2.36.1 + + +From 156cd6920fd461a677c3eb848590a88249079303 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20=C3=85dahl?= +Date: Wed, 11 May 2022 11:19:26 +0100 +Subject: [PATCH 7/7] session-vnc: Set our own password handling function up front libvncserver decides whether to register a auth security handler @@ -1472,7 +1507,7 @@ password prompt. 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/grd-session-vnc.c b/src/grd-session-vnc.c -index 9708de0..bc60285 100644 +index 39d3ead..6d0e5e2 100644 --- a/src/grd-session-vnc.c +++ b/src/grd-session-vnc.c @@ -95,11 +95,6 @@ grd_session_vnc_pause (GrdSessionVnc *session_vnc); @@ -1505,40 +1540,5 @@ index 9708de0..bc60285 100644 rfbProcessEvents (rfb_screen, 0); } -- -2.34.1 - - -From 539d2c562b8068f1f698468cb87b36b4968c1517 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jonas=20=C3=85dahl?= -Date: Mon, 12 Oct 2020 17:34:30 +0200 -Subject: [PATCH 7/7] 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.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/grd-session-vnc.h b/src/grd-session-vnc.h -index 8a916b7..e85f31e 100644 ---- a/src/grd-session-vnc.h -+++ b/src/grd-session-vnc.h -@@ -67,7 +67,8 @@ int grd_session_vnc_get_stride_for_width (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); - --- -2.34.1 +2.36.1 diff --git a/sources b/sources index cd666c3..bf29544 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-remote-desktop-42.1.tar.xz) = 3e17d6482941fccfe6860d2ca2db50235ee70a26fd8942ee1850addb11006cfb152dd949102a4c573f2b6a29f9f2bb78c9ad5be1cba8622ad5b54f82c509376f +SHA512 (gnome-remote-desktop-42.1.1.tar.xz) = 4fbf9305aa7339d9e7fcbf8df8eea97ba675630f6d01ef9a9f049ca3a3bf930f26b0e993ffe386682906d719b15058ce752e4592a3e710ceceb977000ebb1ce1 From 8a15fb5061d406d769e5effb6b8b748c16497c7c Mon Sep 17 00:00:00 2001 From: David King Date: Sun, 29 May 2022 18:11:31 +0100 Subject: [PATCH 08/14] Update to 42.2 --- .gitignore | 1 + gnome-remote-desktop.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 21d67eb..310dcd7 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /gnome-remote-desktop-42.0.tar.xz /gnome-remote-desktop-42.1.tar.xz /gnome-remote-desktop-42.1.1.tar.xz +/gnome-remote-desktop-42.2.tar.xz diff --git a/gnome-remote-desktop.spec b/gnome-remote-desktop.spec index 544bfd5..2dfcf3a 100644 --- a/gnome-remote-desktop.spec +++ b/gnome-remote-desktop.spec @@ -3,7 +3,7 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-remote-desktop -Version: 42.1.1 +Version: 42.2 Release: 1%{?dist} Summary: GNOME Remote Desktop screen share service @@ -91,6 +91,9 @@ GNOME desktop environment. %changelog +* Sun May 29 2022 David King - 42.2-1 +- Update to 42.2 + * Wed May 11 2022 David King - 42.1.1-1 - Update to 42.1.1 (#2061546) diff --git a/sources b/sources index bf29544..aab132c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-remote-desktop-42.1.1.tar.xz) = 4fbf9305aa7339d9e7fcbf8df8eea97ba675630f6d01ef9a9f049ca3a3bf930f26b0e993ffe386682906d719b15058ce752e4592a3e710ceceb977000ebb1ce1 +SHA512 (gnome-remote-desktop-42.2.tar.xz) = 620f2119bec845bf93226b1b873519c5609b7b6212232b33de2d1c420160378ad917c7b593b00c3e15a3b3c3788f3300ef89a226952afb6dae40f9fcc6782e16 From 944d3009029b28de84e47eecece1e6120618fee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 9 Jun 2022 18:11:30 +0200 Subject: [PATCH 09/14] Backport regression fix Resolves: #2094291 --- ...-assertion-into-normal-conditional-s.patch | 49 ++++++++++++++ ...trivial-boolean-value-for-condition-.patch | 64 +++++++++++++++++++ gnome-remote-desktop.spec | 10 ++- 3 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 0001-rdp-nw-auto-Turn-assertion-into-normal-conditional-s.patch create mode 100644 0002-session-rdp-Use-trivial-boolean-value-for-condition-.patch diff --git a/0001-rdp-nw-auto-Turn-assertion-into-normal-conditional-s.patch b/0001-rdp-nw-auto-Turn-assertion-into-normal-conditional-s.patch new file mode 100644 index 0000000..d295ea9 --- /dev/null +++ b/0001-rdp-nw-auto-Turn-assertion-into-normal-conditional-s.patch @@ -0,0 +1,49 @@ +From 2c1eadaa59e5eb0342e63e38c1166ed9bfe3f18a Mon Sep 17 00:00:00 2001 +From: Pascal Nowack +Date: Tue, 7 Jun 2022 17:47:21 +0200 +Subject: [PATCH 1/2] rdp/nw-auto: Turn assertion into normal conditional + statement + +For unknown reasons, the initial state of the bandwidth measure stop +event is set to TRUE on some systems, although the opposite should be +the case, leading to an assertion hit. + +So, turn for now the assertion into a normal condition. +In addition to that, always reset the event before hitting the new +condition to avoid further unnecessary wakeups. + +Closes: https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/issues/102 +--- + src/grd-rdp-network-autodetection.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +diff --git a/src/grd-rdp-network-autodetection.c b/src/grd-rdp-network-autodetection.c +index edf11af..f8ff912 100644 +--- a/src/grd-rdp-network-autodetection.c ++++ b/src/grd-rdp-network-autodetection.c +@@ -303,14 +303,17 @@ void + grd_rdp_network_autodetection_bw_measure_stop (GrdRdpNetworkAutodetection *network_autodetection) + { + rdpAutoDetect *rdp_autodetect = network_autodetection->rdp_autodetect; ++ g_autoptr (GMutexLocker) locker = NULL; + +- g_mutex_lock (&network_autodetection->bw_measure_mutex); +- g_assert (network_autodetection->bw_measure_state == BW_MEASURE_STATE_PENDING_STOP || +- network_autodetection->bw_measure_state == BW_MEASURE_STATE_QUEUED_STOP); +- ++ locker = g_mutex_locker_new (&network_autodetection->bw_measure_mutex); + ResetEvent (network_autodetection->bw_measure_stop_event); ++ ++ if (network_autodetection->bw_measure_state != BW_MEASURE_STATE_PENDING_STOP && ++ network_autodetection->bw_measure_state != BW_MEASURE_STATE_QUEUED_STOP) ++ return; ++ + network_autodetection->bw_measure_state = BW_MEASURE_STATE_PENDING_RESULTS; +- g_mutex_unlock (&network_autodetection->bw_measure_mutex); ++ g_clear_pointer (&locker, g_mutex_locker_free); + + rdp_autodetect->BandwidthMeasureStop (network_autodetection->rdp_context, + BW_MEASURE_SEQUENCE_NUMBER); +-- +2.35.3 + diff --git a/0002-session-rdp-Use-trivial-boolean-value-for-condition-.patch b/0002-session-rdp-Use-trivial-boolean-value-for-condition-.patch new file mode 100644 index 0000000..bd76221 --- /dev/null +++ b/0002-session-rdp-Use-trivial-boolean-value-for-condition-.patch @@ -0,0 +1,64 @@ +From 3bac20c80dceda7b7baa8376a8b81b737900abd2 Mon Sep 17 00:00:00 2001 +From: Pascal Nowack +Date: Thu, 9 Jun 2022 05:44:02 +0200 +Subject: [PATCH 2/2] session-rdp: Use trivial boolean value for condition in + graphics thread + +On a few systems, some WinPR events, but not all of them, are handled +in very unexpected manners. +While the cause for this issue is not yet known, reduce their usage and +simplify the conditions involving them. + +https://errors.ubuntu.com/problem/797565ad6b046057aa5c7c21d86404a0935989b8 +https://errors.ubuntu.com/problem/7da7b9d76648f53ed3806718217d177a1f4681d5 +--- + src/grd-session-rdp.c | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +diff --git a/src/grd-session-rdp.c b/src/grd-session-rdp.c +index e9b5fe9..7028338 100644 +--- a/src/grd-session-rdp.c ++++ b/src/grd-session-rdp.c +@@ -123,6 +123,7 @@ struct _GrdSessionRdp + GrdRdpSAMFile *sam_file; + uint32_t rdp_error_info; + GrdRdpScreenShareMode screen_share_mode; ++ gboolean session_stopped; + + GMutex rdp_flags_mutex; + RdpPeerFlag rdp_flags; +@@ -2111,7 +2112,7 @@ graphics_thread_func (gpointer data) + if (session_rdp->hwaccel_nvidia) + grd_hwaccel_nvidia_push_cuda_context (session_rdp->hwaccel_nvidia); + +- while (WaitForSingleObject (session_rdp->stop_event, 0) == WAIT_TIMEOUT) ++ while (!session_rdp->session_stopped) + g_main_context_iteration (session_rdp->graphics_context, TRUE); + + if (session_rdp->hwaccel_nvidia) +@@ -2202,6 +2203,8 @@ grd_session_rdp_stop (GrdSession *session) + g_debug ("Stopping RDP session"); + + unset_rdp_peer_flag (session_rdp, RDP_PEER_ACTIVATED); ++ session_rdp->session_stopped = TRUE; ++ + if (WaitForSingleObject (session_rdp->stop_event, 0) == WAIT_TIMEOUT) + { + freerdp_set_error_info (peer->context->rdp, +@@ -2222,12 +2225,8 @@ grd_session_rdp_stop (GrdSession *session) + + if (session_rdp->graphics_thread) + { +- uint32_t status; +- + g_assert (session_rdp->graphics_context); +- +- status = WaitForSingleObject (session_rdp->stop_event, 0); +- g_assert (status != WAIT_TIMEOUT); ++ g_assert (session_rdp->session_stopped); + + g_main_context_wakeup (session_rdp->graphics_context); + g_clear_pointer (&session_rdp->graphics_thread, g_thread_join); +-- +2.35.3 + diff --git a/gnome-remote-desktop.spec b/gnome-remote-desktop.spec index 2dfcf3a..a4fb6b9 100644 --- a/gnome-remote-desktop.spec +++ b/gnome-remote-desktop.spec @@ -4,7 +4,7 @@ Name: gnome-remote-desktop Version: 42.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GNOME Remote Desktop screen share service License: GPLv2+ @@ -16,6 +16,10 @@ Patch0: gnutls-anontls.patch Patch1: 0001-Add-man-page.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=2094291 +Patch2: 0001-rdp-nw-auto-Turn-assertion-into-normal-conditional-s.patch +Patch3: 0002-session-rdp-Use-trivial-boolean-value-for-condition-.patch + BuildRequires: asciidoc BuildRequires: gcc BuildRequires: meson >= 0.47.0 @@ -91,6 +95,10 @@ GNOME desktop environment. %changelog +* Thu Jun 09 2022 Jonas Ådahl - 42.2-2 +- Backport regression fix + Resolves: #2094291 + * Sun May 29 2022 David King - 42.2-1 - Update to 42.2 From fac6463ed1f21f5741eb66305df060956a9fa591 Mon Sep 17 00:00:00 2001 From: David King Date: Thu, 7 Jul 2022 13:50:20 +0100 Subject: [PATCH 10/14] Update to 42.3 (#2091415) --- .gitignore | 1 + ...-assertion-into-normal-conditional-s.patch | 49 -------------- ...trivial-boolean-value-for-condition-.patch | 64 ------------------- gnome-remote-desktop.spec | 11 ++-- sources | 2 +- 5 files changed, 7 insertions(+), 120 deletions(-) delete mode 100644 0001-rdp-nw-auto-Turn-assertion-into-normal-conditional-s.patch delete mode 100644 0002-session-rdp-Use-trivial-boolean-value-for-condition-.patch diff --git a/.gitignore b/.gitignore index 310dcd7..2f0b258 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /gnome-remote-desktop-42.1.tar.xz /gnome-remote-desktop-42.1.1.tar.xz /gnome-remote-desktop-42.2.tar.xz +/gnome-remote-desktop-42.3.tar.xz diff --git a/0001-rdp-nw-auto-Turn-assertion-into-normal-conditional-s.patch b/0001-rdp-nw-auto-Turn-assertion-into-normal-conditional-s.patch deleted file mode 100644 index d295ea9..0000000 --- a/0001-rdp-nw-auto-Turn-assertion-into-normal-conditional-s.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 2c1eadaa59e5eb0342e63e38c1166ed9bfe3f18a Mon Sep 17 00:00:00 2001 -From: Pascal Nowack -Date: Tue, 7 Jun 2022 17:47:21 +0200 -Subject: [PATCH 1/2] rdp/nw-auto: Turn assertion into normal conditional - statement - -For unknown reasons, the initial state of the bandwidth measure stop -event is set to TRUE on some systems, although the opposite should be -the case, leading to an assertion hit. - -So, turn for now the assertion into a normal condition. -In addition to that, always reset the event before hitting the new -condition to avoid further unnecessary wakeups. - -Closes: https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/issues/102 ---- - src/grd-rdp-network-autodetection.c | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -diff --git a/src/grd-rdp-network-autodetection.c b/src/grd-rdp-network-autodetection.c -index edf11af..f8ff912 100644 ---- a/src/grd-rdp-network-autodetection.c -+++ b/src/grd-rdp-network-autodetection.c -@@ -303,14 +303,17 @@ void - grd_rdp_network_autodetection_bw_measure_stop (GrdRdpNetworkAutodetection *network_autodetection) - { - rdpAutoDetect *rdp_autodetect = network_autodetection->rdp_autodetect; -+ g_autoptr (GMutexLocker) locker = NULL; - -- g_mutex_lock (&network_autodetection->bw_measure_mutex); -- g_assert (network_autodetection->bw_measure_state == BW_MEASURE_STATE_PENDING_STOP || -- network_autodetection->bw_measure_state == BW_MEASURE_STATE_QUEUED_STOP); -- -+ locker = g_mutex_locker_new (&network_autodetection->bw_measure_mutex); - ResetEvent (network_autodetection->bw_measure_stop_event); -+ -+ if (network_autodetection->bw_measure_state != BW_MEASURE_STATE_PENDING_STOP && -+ network_autodetection->bw_measure_state != BW_MEASURE_STATE_QUEUED_STOP) -+ return; -+ - network_autodetection->bw_measure_state = BW_MEASURE_STATE_PENDING_RESULTS; -- g_mutex_unlock (&network_autodetection->bw_measure_mutex); -+ g_clear_pointer (&locker, g_mutex_locker_free); - - rdp_autodetect->BandwidthMeasureStop (network_autodetection->rdp_context, - BW_MEASURE_SEQUENCE_NUMBER); --- -2.35.3 - diff --git a/0002-session-rdp-Use-trivial-boolean-value-for-condition-.patch b/0002-session-rdp-Use-trivial-boolean-value-for-condition-.patch deleted file mode 100644 index bd76221..0000000 --- a/0002-session-rdp-Use-trivial-boolean-value-for-condition-.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 3bac20c80dceda7b7baa8376a8b81b737900abd2 Mon Sep 17 00:00:00 2001 -From: Pascal Nowack -Date: Thu, 9 Jun 2022 05:44:02 +0200 -Subject: [PATCH 2/2] session-rdp: Use trivial boolean value for condition in - graphics thread - -On a few systems, some WinPR events, but not all of them, are handled -in very unexpected manners. -While the cause for this issue is not yet known, reduce their usage and -simplify the conditions involving them. - -https://errors.ubuntu.com/problem/797565ad6b046057aa5c7c21d86404a0935989b8 -https://errors.ubuntu.com/problem/7da7b9d76648f53ed3806718217d177a1f4681d5 ---- - src/grd-session-rdp.c | 11 +++++------ - 1 file changed, 5 insertions(+), 6 deletions(-) - -diff --git a/src/grd-session-rdp.c b/src/grd-session-rdp.c -index e9b5fe9..7028338 100644 ---- a/src/grd-session-rdp.c -+++ b/src/grd-session-rdp.c -@@ -123,6 +123,7 @@ struct _GrdSessionRdp - GrdRdpSAMFile *sam_file; - uint32_t rdp_error_info; - GrdRdpScreenShareMode screen_share_mode; -+ gboolean session_stopped; - - GMutex rdp_flags_mutex; - RdpPeerFlag rdp_flags; -@@ -2111,7 +2112,7 @@ graphics_thread_func (gpointer data) - if (session_rdp->hwaccel_nvidia) - grd_hwaccel_nvidia_push_cuda_context (session_rdp->hwaccel_nvidia); - -- while (WaitForSingleObject (session_rdp->stop_event, 0) == WAIT_TIMEOUT) -+ while (!session_rdp->session_stopped) - g_main_context_iteration (session_rdp->graphics_context, TRUE); - - if (session_rdp->hwaccel_nvidia) -@@ -2202,6 +2203,8 @@ grd_session_rdp_stop (GrdSession *session) - g_debug ("Stopping RDP session"); - - unset_rdp_peer_flag (session_rdp, RDP_PEER_ACTIVATED); -+ session_rdp->session_stopped = TRUE; -+ - if (WaitForSingleObject (session_rdp->stop_event, 0) == WAIT_TIMEOUT) - { - freerdp_set_error_info (peer->context->rdp, -@@ -2222,12 +2225,8 @@ grd_session_rdp_stop (GrdSession *session) - - if (session_rdp->graphics_thread) - { -- uint32_t status; -- - g_assert (session_rdp->graphics_context); -- -- status = WaitForSingleObject (session_rdp->stop_event, 0); -- g_assert (status != WAIT_TIMEOUT); -+ g_assert (session_rdp->session_stopped); - - g_main_context_wakeup (session_rdp->graphics_context); - g_clear_pointer (&session_rdp->graphics_thread, g_thread_join); --- -2.35.3 - diff --git a/gnome-remote-desktop.spec b/gnome-remote-desktop.spec index a4fb6b9..5f6ce2b 100644 --- a/gnome-remote-desktop.spec +++ b/gnome-remote-desktop.spec @@ -3,8 +3,8 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-remote-desktop -Version: 42.2 -Release: 2%{?dist} +Version: 42.3 +Release: 1%{?dist} Summary: GNOME Remote Desktop screen share service License: GPLv2+ @@ -16,10 +16,6 @@ Patch0: gnutls-anontls.patch Patch1: 0001-Add-man-page.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=2094291 -Patch2: 0001-rdp-nw-auto-Turn-assertion-into-normal-conditional-s.patch -Patch3: 0002-session-rdp-Use-trivial-boolean-value-for-condition-.patch - BuildRequires: asciidoc BuildRequires: gcc BuildRequires: meson >= 0.47.0 @@ -95,6 +91,9 @@ GNOME desktop environment. %changelog +* Thu Jul 07 2022 David King - 42.3-1 +- Update to 42.3 (#2091415) + * Thu Jun 09 2022 Jonas Ådahl - 42.2-2 - Backport regression fix Resolves: #2094291 diff --git a/sources b/sources index aab132c..e04d4b6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-remote-desktop-42.2.tar.xz) = 620f2119bec845bf93226b1b873519c5609b7b6212232b33de2d1c420160378ad917c7b593b00c3e15a3b3c3788f3300ef89a226952afb6dae40f9fcc6782e16 +SHA512 (gnome-remote-desktop-42.3.tar.xz) = 3545ec6b3f7f80315546d03ecb0c30ed554e879c743e1d7031ac65cf10e6d9d510553049393221be0be203a79b8be8bc96c0d3fe600be1ac3c0a1e24431ba945 From cff0d6ae0d3116535d56e2ec7bfc4b5c850af0fd Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Mon, 15 Aug 2022 15:38:15 +0200 Subject: [PATCH 11/14] Rebuild for updated FreeRDP --- gnome-remote-desktop.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnome-remote-desktop.spec b/gnome-remote-desktop.spec index 5f6ce2b..fbda45a 100644 --- a/gnome-remote-desktop.spec +++ b/gnome-remote-desktop.spec @@ -4,7 +4,7 @@ Name: gnome-remote-desktop Version: 42.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GNOME Remote Desktop screen share service License: GPLv2+ @@ -91,6 +91,9 @@ GNOME desktop environment. %changelog +* Mon Aug 15 2022 Simone Caronni - 42.3-2 +- Rebuild for updated FreeRDP. + * Thu Jul 07 2022 David King - 42.3-1 - Update to 42.3 (#2091415) From 163a86b2092a04573045471ad3d48eb65871846e Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Thu, 18 Aug 2022 12:52:47 +0200 Subject: [PATCH 12/14] Update to 42.4 --- .gitignore | 1 + gnome-remote-desktop.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 2f0b258..305e864 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /gnome-remote-desktop-42.1.1.tar.xz /gnome-remote-desktop-42.2.tar.xz /gnome-remote-desktop-42.3.tar.xz +/gnome-remote-desktop-42.4.tar.xz diff --git a/gnome-remote-desktop.spec b/gnome-remote-desktop.spec index fbda45a..dd67c97 100644 --- a/gnome-remote-desktop.spec +++ b/gnome-remote-desktop.spec @@ -3,8 +3,8 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-remote-desktop -Version: 42.3 -Release: 2%{?dist} +Version: 42.4 +Release: 1%{?dist} Summary: GNOME Remote Desktop screen share service License: GPLv2+ @@ -91,6 +91,9 @@ GNOME desktop environment. %changelog +* Thu Aug 18 2022 Kalev Lember - 42.4-1 +- Update to 42.4 + * Mon Aug 15 2022 Simone Caronni - 42.3-2 - Rebuild for updated FreeRDP. diff --git a/sources b/sources index e04d4b6..ff92d7c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-remote-desktop-42.3.tar.xz) = 3545ec6b3f7f80315546d03ecb0c30ed554e879c743e1d7031ac65cf10e6d9d510553049393221be0be203a79b8be8bc96c0d3fe600be1ac3c0a1e24431ba945 +SHA512 (gnome-remote-desktop-42.4.tar.xz) = dc040e216c7cff4a2f95d706d7916489ba0a871dff502fbc5ef81d374f7ea1edc32286d32ad07f961a3bc55b353663e72296042b61837c3479fc929bd1253d98 From ecb142b8b0498947610c8a4735fdc04913d001c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 5 Oct 2022 19:46:15 +0200 Subject: [PATCH 13/14] Update to 42.5 --- .gitignore | 1 + gnome-remote-desktop.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 305e864..62f0d95 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /gnome-remote-desktop-42.2.tar.xz /gnome-remote-desktop-42.3.tar.xz /gnome-remote-desktop-42.4.tar.xz +/gnome-remote-desktop-42.5.tar.xz diff --git a/gnome-remote-desktop.spec b/gnome-remote-desktop.spec index dd67c97..f588364 100644 --- a/gnome-remote-desktop.spec +++ b/gnome-remote-desktop.spec @@ -3,7 +3,7 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-remote-desktop -Version: 42.4 +Version: 42.5 Release: 1%{?dist} Summary: GNOME Remote Desktop screen share service @@ -91,6 +91,9 @@ GNOME desktop environment. %changelog +* Wed Oct 05 2022 Jonas Ådahl - 42.5-1 +- Update to 42.5 + * Thu Aug 18 2022 Kalev Lember - 42.4-1 - Update to 42.4 diff --git a/sources b/sources index ff92d7c..50fa67f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-remote-desktop-42.4.tar.xz) = dc040e216c7cff4a2f95d706d7916489ba0a871dff502fbc5ef81d374f7ea1edc32286d32ad07f961a3bc55b353663e72296042b61837c3479fc929bd1253d98 +SHA512 (gnome-remote-desktop-42.5.tar.xz) = 4850537d020a324a054089f14dbd6d17ad70ee25305c66ffcd1ec79b3c63a7e87db562681d14fa33c36a58a7491152f467c6e6efc1ce5a3a4b2499915384f947 From 17522d38ff4ee40d64beae5e9e60182e5ea68edf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 25 Nov 2022 23:35:12 +0100 Subject: [PATCH 14/14] Update to 42.6 --- .gitignore | 1 + gnome-remote-desktop.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 62f0d95..11f8a4a 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /gnome-remote-desktop-42.3.tar.xz /gnome-remote-desktop-42.4.tar.xz /gnome-remote-desktop-42.5.tar.xz +/gnome-remote-desktop-42.6.tar.xz diff --git a/gnome-remote-desktop.spec b/gnome-remote-desktop.spec index f588364..0eab6ff 100644 --- a/gnome-remote-desktop.spec +++ b/gnome-remote-desktop.spec @@ -3,7 +3,7 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-remote-desktop -Version: 42.5 +Version: 42.6 Release: 1%{?dist} Summary: GNOME Remote Desktop screen share service @@ -91,6 +91,9 @@ GNOME desktop environment. %changelog +* Fri Nov 25 2022 Jonas Ådahl - 42.6-1 +- Update to 42.6 + * Wed Oct 05 2022 Jonas Ådahl - 42.5-1 - Update to 42.5 diff --git a/sources b/sources index 50fa67f..6ec4d9f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-remote-desktop-42.5.tar.xz) = 4850537d020a324a054089f14dbd6d17ad70ee25305c66ffcd1ec79b3c63a7e87db562681d14fa33c36a58a7491152f467c6e6efc1ce5a3a4b2499915384f947 +SHA512 (gnome-remote-desktop-42.6.tar.xz) = dfd116a225cfe579a1d6c37e130bf70812c3bf83e76d4764eb025d39136c911c06ca43f665d6c9d9521c51af3f5bd0bb7e4882e9124c8ef801c5b1ba8bb20013