Update to 1.0.0 release

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2019-08-08 09:31:33 +01:00
parent 44f2a80840
commit 7a4c1ce11e
4 changed files with 30 additions and 268 deletions

View File

@ -1,88 +0,0 @@
From 06a27a4fb52653b4cbf67b75b8116cf6692b435d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
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é <berrange@redhat.com>
---
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

View File

@ -1,25 +0,0 @@
From fe11054a9940cdb9a9d6bd4b05bd2276a51d0abf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
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

View File

@ -1,27 +1,7 @@
# -*- rpm-spec -*-
# This spec file assumes you are building for Fedora 26 or newer,
# or for RHEL 6 or newer. It may need some tweaks for other distros.
%global with_gir 0
%if 0%{?fedora} || 0%{?rhel} >= 7
%global with_gir 1
%endif
%global with_gtk2 1
%if 0%{?rhel} >= 8
%global with_gtk2 0
%endif
%global with_gtk3 0
%if 0%{?fedora} || 0%{?rhel} >= 7
%global with_gtk3 1
%endif
%global with_vala 0
%if 0%{with_gtk3}
%global with_vala 1
%endif
# or for RHEL 7 or newer. It may need some tweaks for other distros.
%if 0%{?fedora} || 0%{?rhel} >= 8
%global tls_priority "@LIBVIRT,SYSTEM"
@ -29,19 +9,14 @@
%global tls_priority "NORMAL"
%endif
Summary: A GTK2 widget for VNC clients
Summary: A GTK widget for VNC clients
Name: gtk-vnc
Version: 0.9.0
Release: 6%{?dist}%{?extra_release}
Version: 1.0.0
Release: 1%{?dist}
License: LGPLv2+
Source: http://ftp.gnome.org/pub/GNOME/sources/%{name}/0.5/%{name}-%{version}.tar.xz
Patch1: 0001-fix-crash-when-connection-fails-early.patch
Patch2: 0002-gvnc-1.0.pc.in-Use-GLIB_REQUIRED.patch
URL: https://wiki.gnome.org/Projects/gtk-vnc
Requires: gvnc = %{version}-%{release}
%if %{with_gtk2}
BuildRequires: gtk2-devel >= 2.14
%endif
%if 0%{?fedora}
BuildRequires: python3
%else
@ -51,37 +26,18 @@ BuildRequires: python3-devel
BuildRequires: python
%endif
%endif
BuildRequires: gnutls-devel libgcrypt-devel cyrus-sasl-devel zlib-devel intltool
%if %{with_gir}
BuildRequires: gnutls-devel libgcrypt-devel cyrus-sasl-devel zlib-devel
BuildRequires: gobject-introspection-devel
%endif
%if %{with_gtk3}
BuildRequires: gtk3-devel
%endif
%if %{with_vala}
BuildRequires: vala
%endif
BuildRequires: vala-tools
BuildRequires: pulseaudio-libs-devel
BuildRequires: /usr/bin/pod2man
BuildRequires: meson
%description
gtk-vnc is a VNC viewer widget for GTK2. It is built using coroutines
gtk-vnc is a VNC viewer widget for GTK. It is built using coroutines
allowing it to be completely asynchronous while remaining single threaded.
%if %{with_gtk2}
%package devel
Summary: Development files to build GTK2 applications with gtk-vnc
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig
Requires: gtk2-devel
%description devel
gtk-vnc is a VNC viewer widget for GTK2. It is built using coroutines
allowing it to be completely asynchronous while remaining single threaded.
Libraries, includes, etc. to compile with the gtk-vnc library
%endif
%package -n gvnc
Summary: A GObject for VNC connections
@ -132,10 +88,10 @@ Provides useful command line utilities for interacting with
VNC servers. Includes the gvnccapture program for capturing
screenshots of a VNC desktop
%if %{with_gtk3}
%package -n gtk-vnc2
Summary: A GTK3 widget for VNC clients
Requires: gvnc = %{version}-%{release}
Obsoletes: gtk-vnc
%description -n gtk-vnc2
gtk-vnc is a VNC viewer widget for GTK3. It is built using coroutines
@ -146,174 +102,93 @@ Summary: Development files to build GTK3 applications with gtk-vnc
Requires: gtk-vnc2 = %{version}-%{release}
Requires: pkgconfig
Requires: gtk3-devel
Obsoletes: gtk-vnc-devel
%description -n gtk-vnc2-devel
gtk-vnc is a VNC viewer widget for GTK3. It is built using coroutines
allowing it to be completely asynchronous while remaining single threaded.
Libraries, includes, etc. to compile with the gtk-vnc library
%endif
%prep
%setup -q -n gtk-vnc-%{version} -c
cd gtk-vnc-%{version}
%patch1 -p1
%patch2 -p1
cd ..
%if %{with_gtk3}
cp -a gtk-vnc-%{version} gtk-vnc2-%{version}
%endif
%autosetup -n gtk-vnc-%{version}
%build
%if %{with_gir}
%define gir_arg --enable-introspection=yes
%else
%define gir_arg --enable-introspection=no
%endif
%if %{with_gtk2}
cd gtk-vnc-%{version}
%configure --with-gtk=2.0 %{gir_arg} \
--with-tls-priority=%{tls_priority}
%__make %{?_smp_mflags} V=1
%meson
%meson_build
chmod -x examples/*.pl examples/*.js examples/*.py
cd ..
%endif
%if %{with_gtk3}
cd gtk-vnc2-%{version}
%configure --with-gtk=3.0 %{gir_arg} \
--with-tls-priority=%{tls_priority}
%__make %{?_smp_mflags} V=1
chmod -x examples/*.pl examples/*.js examples/*.py
cd ..
%endif
%install
rm -fr %{buildroot}
%if %{with_gtk2}
cd gtk-vnc-%{version}
%__make install DESTDIR=%{buildroot}
cd ..
%endif
%if %{with_gtk3}
cd gtk-vnc2-%{version}
%__make install DESTDIR=%{buildroot}
cd ..
%endif
rm -f %{buildroot}%{_libdir}/*.a
rm -f %{buildroot}%{_libdir}/*.la
%meson_install
%find_lang %{name}
%ldconfig_scriptlets
%check
%meson_test
%ldconfig_scriptlets -n gvnc
%ldconfig_scriptlets -n gvncpulse
%if %{with_gtk3}
%ldconfig_scriptlets -n gtk-vnc2
%endif
%if %{with_gtk2}
%files
%{_libdir}/libgtk-vnc-1.0.so.*
%if %{with_gir}
%{_libdir}/girepository-1.0/GtkVnc-1.0.typelib
%endif
%files devel
%doc gtk-vnc-%{version}/examples/gvncviewer.c
%{_libdir}/libgtk-vnc-1.0.so
%dir %{_includedir}/%{name}-1.0/
%{_includedir}/%{name}-1.0/*.h
%{_libdir}/pkgconfig/%{name}-1.0.pc
%if %{with_gir}
%{_datadir}/gir-1.0/GtkVnc-1.0.gir
%endif
%endif
%files -n gvnc -f %{name}.lang
%{_libdir}/libgvnc-1.0.so.*
%if %{with_gir}
%{_libdir}/girepository-1.0/GVnc-1.0.typelib
%endif
%if %{with_vala}
%{_datadir}/vala/vapi/gvnc-1.0.deps
%{_datadir}/vala/vapi/gvnc-1.0.vapi
%endif
%files -n gvnc-devel
%{_libdir}/libgvnc-1.0.so
%dir %{_includedir}/gvnc-1.0/
%{_includedir}/gvnc-1.0/*.h
%{_libdir}/pkgconfig/gvnc-1.0.pc
%if %{with_gir}
%{_datadir}/gir-1.0/GVnc-1.0.gir
%endif
%files -n gvncpulse -f %{name}.lang
%{_libdir}/libgvncpulse-1.0.so.*
%if %{with_gir}
%{_libdir}/girepository-1.0/GVncPulse-1.0.typelib
%endif
%if %{with_vala}
%{_datadir}/vala/vapi/gvncpulse-1.0.deps
%{_datadir}/vala/vapi/gvncpulse-1.0.vapi
%endif
%files -n gvncpulse-devel
%{_libdir}/libgvncpulse-1.0.so
%dir %{_includedir}/gvncpulse-1.0/
%{_includedir}/gvncpulse-1.0/*.h
%{_libdir}/pkgconfig/gvncpulse-1.0.pc
%if %{with_gir}
%{_datadir}/gir-1.0/GVncPulse-1.0.gir
%endif
%files -n gvnc-tools
%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
%{_bindir}/gvnccapture
%{_mandir}/man1/gvnccapture.1*
%if %{with_gtk3}
%files -n gtk-vnc2
%{_libdir}/libgtk-vnc-2.0.so.*
%if %{with_gir}
%{_libdir}/girepository-1.0/GtkVnc-2.0.typelib
%endif
%if %{with_vala}
%{_datadir}/vala/vapi/gtk-vnc-2.0.deps
%{_datadir}/vala/vapi/gtk-vnc-2.0.vapi
%endif
%files -n gtk-vnc2-devel
%doc gtk-vnc2-%{version}/examples/gvncviewer.c
%if %{with_gir}
%doc gtk-vnc2-%{version}/examples/gvncviewer.js
%doc gtk-vnc2-%{version}/examples/gvncviewer.pl
%doc gtk-vnc2-%{version}/examples/gvncviewer.py
%endif
%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
%{_libdir}/pkgconfig/%{name}-2.0.pc
%if %{with_gir}
%{_datadir}/gir-1.0/GtkVnc-2.0.gir
%endif
%endif
%changelog
* Thu Aug 8 2019 Daniel P. Berrangé <berrange@redhat.com> - 1.0.0-1
- Update to 1.0.0 release
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (gtk-vnc-0.9.0.tar.xz) = 498b368eb53ac58172db280c80f9da71ce82b636c39f186046e4f674e44c574ff4b63c3f777acc79d32c17d70e4efcdc207768ed49b3d1842bc4b73618296215
SHA512 (gtk-vnc-1.0.0.tar.xz) = 63a40b9b284c4e46a92d5375ab3660b324ff27bfc572559d3b34d29fe4f7d24e976396b6688b8f3e3109d49dc5527075d128c43bb997507e68ddc0880b0ad148