Gentoo Archives: gentoo-commits

From: Dennis Lamm <expeditioneer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/vino/files/, net-misc/vino/
Date: Fri, 01 Mar 2019 18:34:39
Message-Id: 1551465259.3d6bb2617e6e5db6d21c9b1a3afd366f80d52c8d.expeditioneer@gentoo
1 commit: 3d6bb2617e6e5db6d21c9b1a3afd366f80d52c8d
2 Author: Dennis Lamm <expeditioneer <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 1 18:34:02 2019 +0000
4 Commit: Dennis Lamm <expeditioneer <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 1 18:34:19 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d6bb261
7
8 net-misc/vino: fixed segfaults in wayland
9
10 Signed-off-by: Dennis Lamm <expeditioneer <AT> gentoo.org>
11 Bug: https://bugs.gentoo.org/617902
12 Bug: https://bugs.gentoo.org/639264
13 Package-Manager: Portage-2.3.51, Repoman-2.3.11
14
15 .../vino-return-error-if-X11-is-no-detected.patch | 41 ++++++++++++
16 .../vino/files/vino-segfaults-on-wayland.patch | 30 +++++++++
17 net-misc/vino/vino-3.22.0-r1.ebuild | 72 ++++++++++++++++++++++
18 3 files changed, 143 insertions(+)
19
20 diff --git a/net-misc/vino/files/vino-return-error-if-X11-is-no-detected.patch b/net-misc/vino/files/vino-return-error-if-X11-is-no-detected.patch
21 new file mode 100644
22 index 00000000000..171d8590e3c
23 --- /dev/null
24 +++ b/net-misc/vino/files/vino-return-error-if-X11-is-no-detected.patch
25 @@ -0,0 +1,41 @@
26 +From 5e49ab2d125388b843eca4f1f47849d18ccabcd3 Mon Sep 17 00:00:00 2001
27 +From: Ondrej Holy <oholy@××××××.com>
28 +Date: Tue, 20 Feb 2018 12:26:18 +0100
29 +Subject: [PATCH] Return error if X11 is not detected
30 +
31 +Vino-server crashes on Wayland in XQueryExtension. Since vino-server is
32 +not expected to work on displays other than X11, let's exit immediately
33 +if GDK_IS_X11_DISPLAY fail.
34 +
35 +https://bugzilla.gnome.org/show_bug.cgi?id=761120
36 +---
37 + server/vino-main.c | 7 +++++++
38 + 1 file changed, 7 insertions(+)
39 +
40 +diff --git a/server/vino-main.c b/server/vino-main.c
41 +index dd95de7..7be3fff 100644
42 +--- a/server/vino-main.c
43 ++++ b/server/vino-main.c
44 +@@ -28,6 +28,7 @@
45 + #include <glib/gi18n.h>
46 + #include <gtk/gtk.h>
47 + #include <locale.h>
48 ++#include <gdk/gdkx.h>
49 +
50 + #include "vino-input.h"
51 + #include "vino-mdns.h"
52 +@@ -273,6 +274,12 @@ main (int argc, char **argv)
53 + g_option_context_free (context);
54 + }
55 +
56 ++ if (!GDK_IS_X11_DISPLAY (gdk_display_get_default ()))
57 ++ {
58 ++ g_printerr ("X11 is not detected\n");
59 ++ return 1;
60 ++ }
61 ++
62 + /* GSettings */
63 + vino.settings = g_settings_new ("org.gnome.Vino");
64 +
65 +--
66 +2.16.2
67
68 diff --git a/net-misc/vino/files/vino-segfaults-on-wayland.patch b/net-misc/vino/files/vino-segfaults-on-wayland.patch
69 new file mode 100644
70 index 00000000000..ee161ae6fb9
71 --- /dev/null
72 +++ b/net-misc/vino/files/vino-segfaults-on-wayland.patch
73 @@ -0,0 +1,30 @@
74 +From c5e3011b7364729fa2cd4f11761bf1f001a931a4 Mon Sep 17 00:00:00 2001
75 +From: Ondrej Holy <oholy@××××××.com>
76 +Date: Tue, 22 May 2018 20:45:45 +0200
77 +Subject: [PATCH] Do not restart service after unclean exit code
78 +
79 +Currently, the vino-server.service has Restart=on-failure, which means
80 +that it is restarted in abnormal cases, but also in case of non-zero
81 +exit code. It is restarted 5 times e.g. in case when X11 is not detected,
82 +which doesn't make sense. Non-zero exit code is used only for states
83 +which won't change with restart (invalid commandline, wayland and some
84 +sanity checks). Change the value to Restart=on-abnormal in order to
85 +prevent the useless restarts and to not spam journal.
86 +
87 +https://bugzilla.gnome.org/show_bug.cgi?id=761120
88 +---
89 + server/vino-server.service.in | 2 +-
90 + 1 file changed, 1 insertion(+), 1 deletion(-)
91 +
92 +diff --git a/server/vino-server.service.in b/server/vino-server.service.in
93 +index a48b813..49e9c1f 100644
94 +--- a/server/vino-server.service.in
95 ++++ b/server/vino-server.service.in
96 +@@ -5,4 +5,4 @@ Description=Vino VNC server
97 + Type=dbus
98 + BusName=org.gnome.Vino
99 + ExecStart=@libexecdir@/vino-server
100 +-Restart=on-failure
101 ++Restart=on-abnormal
102 +--
103 +2.17.0
104
105 diff --git a/net-misc/vino/vino-3.22.0-r1.ebuild b/net-misc/vino/vino-3.22.0-r1.ebuild
106 new file mode 100644
107 index 00000000000..9f17a92230a
108 --- /dev/null
109 +++ b/net-misc/vino/vino-3.22.0-r1.ebuild
110 @@ -0,0 +1,72 @@
111 +# Copyright 1999-2019 Gentoo Authors
112 +# Distributed under the terms of the GNU General Public License v2
113 +
114 +EAPI=6
115 +inherit gnome2 systemd
116 +
117 +DESCRIPTION="An integrated VNC server for GNOME"
118 +HOMEPAGE="https://wiki.gnome.org/Projects/Vino"
119 +
120 +LICENSE="GPL-2+"
121 +SLOT="0"
122 +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
123 +IUSE="crypt debug gnome-keyring ipv6 jpeg ssl systemd +telepathy zeroconf +zlib"
124 +# bug #394611; tight encoding requires zlib encoding
125 +REQUIRED_USE="jpeg? ( zlib )"
126 +
127 +# cairo used in vino-fb
128 +# libSM and libICE used in eggsmclient-xsmp
129 +RDEPEND="
130 + >=dev-libs/glib-2.26:2
131 + >=dev-libs/libgcrypt-1.1.90:0=
132 + >=x11-libs/gtk+-3:3
133 +
134 + x11-libs/cairo:=
135 + x11-libs/libICE
136 + x11-libs/libSM
137 + x11-libs/libX11
138 + x11-libs/libXdamage
139 + x11-libs/libXext
140 + x11-libs/libXfixes
141 + x11-libs/libXtst
142 + x11-libs/pango[X]
143 +
144 + >=x11-libs/libnotify-0.7.0:=
145 +
146 + crypt? ( >=dev-libs/libgcrypt-1.1.90:0= )
147 + gnome-keyring? ( app-crypt/libsecret )
148 + jpeg? ( virtual/jpeg:0= )
149 + ssl? ( >=net-libs/gnutls-2.2.0:= )
150 + systemd? ( sys-apps/dbus[user-session] )
151 + telepathy? (
152 + dev-libs/dbus-glib
153 + >=net-libs/telepathy-glib-0.18 )
154 + zeroconf? ( >=net-dns/avahi-0.6:=[dbus] )
155 + zlib? ( sys-libs/zlib:= )
156 +"
157 +DEPEND="${RDEPEND}
158 + app-crypt/libsecret
159 + dev-util/glib-utils
160 + >=dev-util/intltool-0.50
161 + virtual/pkgconfig
162 +"
163 +# libsecret is always required at build time per bug 322763
164 +
165 +PATCHES=(
166 + "${FILESDIR}/${PN}-segfaults-on-wayland.patch"
167 + "${FILESDIR}/${PN}-return-error-if-X11-is-no-detected.patch"
168 +)
169 +
170 +src_configure() {
171 + gnome2_src_configure \
172 + $(use_enable ipv6) \
173 + $(use_with crypt gcrypt) \
174 + $(usex debug --enable-debug=yes ' ') \
175 + $(use_with gnome-keyring secret) \
176 + $(use_with jpeg) \
177 + $(use_with ssl gnutls) \
178 + $(use_with telepathy) \
179 + $(use_with zeroconf avahi) \
180 + $(use_with zlib) \
181 + --with-systemduserunitdir="$(systemd_get_userunitdir)"
182 +}