diff --git a/0001-fix-crash-when-connection-fails-early.patch b/0001-fix-crash-when-connection-fails-early.patch deleted file mode 100644 index c3694cc..0000000 --- a/0001-fix-crash-when-connection-fails-early.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 06a27a4fb52653b4cbf67b75b8116cf6692b435d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= -Date: Fri, 24 Aug 2018 17:18:04 +0100 -Subject: [PATCH] fix crash when connection fails early -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When reading the initial greeting a timer is set in the background. If -the connection fails early, we can jump to cleanup code before the timer -is disable. The timer will later fire, read a coroutine context from -freed memory, and likely jump to somewhere awful with predictably crashy -results. - - https://bugzilla.redhat.com/show_bug.cgi?id=1620203 - -Signed-off-by: Daniel P. Berrangé ---- - src/vncconnection.c | 15 ++++++++++++++- - 1 file changed, 14 insertions(+), 1 deletion(-) - -diff --git a/src/vncconnection.c b/src/vncconnection.c -index b6e13d5..afc1418 100644 ---- a/src/vncconnection.c -+++ b/src/vncconnection.c -@@ -319,7 +319,9 @@ static gboolean vnc_connection_timeout(gpointer data) - { - struct wait_queue *wait = data; - -+ VNC_DEBUG("Connection timeout wakeup start %p", data); - g_io_wakeup(wait); -+ VNC_DEBUG("Connection timeout wakeup done %p", data); - - return FALSE; - } -@@ -5318,6 +5320,7 @@ static gboolean vnc_connection_initialize(VncConnection *conn) - - priv->absPointer = TRUE; - -+ VNC_DEBUG("Schedule greeting timeout %p", &priv->wait); - timeout = g_timeout_add_seconds(2, vnc_connection_timeout, &priv->wait); - want = 12; - while (want > 0) { -@@ -5369,7 +5372,9 @@ static gboolean vnc_connection_initialize(VncConnection *conn) - } - - if (timeout != 0) { -+ VNC_DEBUG("Remove timeout %p", &priv->wait); - g_source_remove(timeout); -+ timeout = 0; - } - - version[12] = 0; -@@ -5449,6 +5454,11 @@ static gboolean vnc_connection_initialize(VncConnection *conn) - return !vnc_connection_has_error(conn); - - fail: -+ if (timeout != 0) { -+ VNC_DEBUG("Remove timeout %p", &priv->wait); -+ g_source_remove(timeout); -+ timeout = 0; -+ } - return !vnc_connection_has_error(conn); - } - -@@ -5481,6 +5491,7 @@ static GSocket *vnc_connection_connect_socket(struct wait_queue *wait, - if (!sock) - return NULL; - -+ VNC_DEBUG("Schedule socket timeout %p", wait); - guint timeout = g_timeout_add_seconds(10, vnc_connection_timeout, wait); - - g_socket_set_blocking(sock, FALSE); -@@ -5513,8 +5524,10 @@ timeout: - sock = NULL; - - end: -- if (timeout != 0) -+ if (timeout != 0) { -+ VNC_DEBUG("Remove timeout %p", wait); - g_source_remove(timeout); -+ } - - return sock; - } --- -2.17.1 - diff --git a/0002-gvnc-1.0.pc.in-Use-GLIB_REQUIRED.patch b/0002-gvnc-1.0.pc.in-Use-GLIB_REQUIRED.patch deleted file mode 100644 index 51f1de7..0000000 --- a/0002-gvnc-1.0.pc.in-Use-GLIB_REQUIRED.patch +++ /dev/null @@ -1,25 +0,0 @@ -From fe11054a9940cdb9a9d6bd4b05bd2276a51d0abf Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Guido=20G=C3=BCnther?= -Date: Thu, 30 Aug 2018 18:08:35 +0200 -Subject: [PATCH] gvnc-1.0.pc.in: Use GLIB_REQUIRED - -GOBJECT_REQUIRED is no more - -(cherry picked from commit 41c32208248b028f2c96da4d20ba6dc8e51b83ad) ---- - gvnc-1.0.pc.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gvnc-1.0.pc.in b/gvnc-1.0.pc.in -index da95b65..b79fdf7 100644 ---- a/gvnc-1.0.pc.in -+++ b/gvnc-1.0.pc.in -@@ -5,7 +5,7 @@ includedir=@includedir@ - - Name: GVNC - Description: GObject for VNC client connections --Requires: gobject-2.0 >= @GOBJECT_REQUIRED@ -+Requires: gobject-2.0 >= @GLIB_REQUIRED@ - Version: @VERSION@ - Libs: -L${libdir} -lgvnc-1.0 - Cflags: -I${includedir}/gvnc-1.0 diff --git a/gtk-vnc-0.9.0.tar.xz b/gtk-vnc-0.9.0.tar.xz deleted file mode 100644 index 10e4efc..0000000 Binary files a/gtk-vnc-0.9.0.tar.xz and /dev/null differ diff --git a/gtk-vnc-1.0.0.tar.xz b/gtk-vnc-1.0.0.tar.xz new file mode 100644 index 0000000..8cf40a0 Binary files /dev/null and b/gtk-vnc-1.0.0.tar.xz differ diff --git a/gtk-vnc.spec b/gtk-vnc.spec index a5bedd0..bed0772 100644 --- a/gtk-vnc.spec +++ b/gtk-vnc.spec @@ -1,19 +1,16 @@ Summary: VNC viewer widget for GTK Name: gtk-vnc -Version: 0.9.0 -Release: 4 +Version: 1.0.0 +Release: 1 License: LGPLv2+ URL: https://wiki.gnome.org/Projects/gtk-vnc -Source: https://download.gnome.org/sources/gtk-vnc/0.9/gtk-vnc-0.9.0.tar.xz -Patch1: 0001-fix-crash-when-connection-fails-early.patch -Patch2: 0002-gvnc-1.0.pc.in-Use-GLIB_REQUIRED.patch +Source: https://download.gnome.org/sources/gtk-vnc/1.0/gtk-vnc-%{version}.tar.xz + +BuildRequires: python3 python3-devel gnutls-devel libgcrypt-devel cyrus-sasl-devel +BuildRequires: zlib-devel intltool gobject-introspection-devel gtk3-devel vala +BuildRequires: pulseaudio-libs-devel perl-podlators meson Requires: gvnc = %{version}-%{release} -BuildRequires: python3 gnutls-devel libgcrypt-devel cyrus-sasl-devel -BuildRequires: zlib-devel intltool gobject-introspection-devel -BuildRequires: gtk3-devel vala-tools pulseaudio-libs-devel -BuildRequires: /usr/bin/pod2man - %description gtk-vnc is a VNC viewer widget for GTK. It is built using coroutines allowing it to be completely asynchronous while remaining single @@ -92,27 +89,21 @@ Libraries, includes, etc. to compile with the gtk-vnc library %package_help %prep -%setup -q -n gtk-vnc-%{version} -c -pushd gtk-vnc-%{version} -%patch1 -p1 -%patch2 -p1 -popd -cp -a gtk-vnc-%{version} gtk-vnc2-%{version} +%autosetup -n gtk-vnc-%{version} %build -pushd gtk-vnc2-%{version} -%configure --with-gtk=3.0 --enable-introspection=yes --with-tls-priority="@LIBVIRT,SYSTEM" -%make_build V=1 +%meson -Dwith-tls-priority="@LIBVIRT,SYSTEM" +%meson_build chmod -x examples/*.pl examples/*.js examples/*.py -popd %install -pushd gtk-vnc2-%{version} -%make_install -popd +%meson_install %delete_la_and_a %find_lang %{name} +%check +%meson_test + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -165,10 +156,10 @@ popd %{_datadir}/vala/vapi/gtk-vnc-2.0.vapi %files -n gtk-vnc2-devel -%doc gtk-vnc2-%{version}/examples/gvncviewer.c -%doc gtk-vnc2-%{version}/examples/gvncviewer.js -%doc gtk-vnc2-%{version}/examples/gvncviewer.pl -%doc gtk-vnc2-%{version}/examples/gvncviewer.py +%doc examples/gvncviewer.c +%doc examples/gvncviewer.js +%doc examples/gvncviewer.pl +%doc examples/gvncviewer.py %{_libdir}/libgtk-vnc-2.0.so %dir %{_includedir}/%{name}-2.0/ %{_includedir}/%{name}-2.0/*.h @@ -176,14 +167,18 @@ popd %{_datadir}/gir-1.0/GtkVnc-2.0.gir %files help -%doc gtk-vnc-%{version}/AUTHORS -%doc gtk-vnc-%{version}/ChangeLog -%doc gtk-vnc-%{version}/ChangeLog-old -%doc gtk-vnc-%{version}/NEWS -%doc gtk-vnc-%{version}/README -%doc gtk-vnc-%{version}/COPYING.LIB +%doc AUTHORS +%doc ChangeLog +%doc ChangeLog-old +%doc NEWS +%doc README +%doc COPYING.LIB %{_mandir}/man1/gvnccapture.1* %changelog +* Tue Jun 22 2021 weijin deng - 1.0.0-1 +- Upgrade to 1.0.0 +- Delete all two patches which existed in this version 1.0.0 + * Fri Feb 14 2020 fengbing - 0.9.0-4 - Package init