1 |
commit: 2c7cf52b42ecfc82e17986f1c026a54be3c900f6 |
2 |
Author: Matthew S. Turnbull <sparky <AT> bluefang-logic <DOT> com> |
3 |
AuthorDate: Sat Jan 16 20:52:07 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 23 03:44:44 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c7cf52b |
7 |
|
8 |
app-accessibility/caribou: Fix crash due to xserver CVE fix |
9 |
|
10 |
xorg-server 1.20.10 contains a fix for CVE-2020-25712. |
11 |
|
12 |
This causes a previous work-around in caribou to result in |
13 |
a BadLength error, when interacting with XKB, and crashes |
14 |
the hosting application. |
15 |
|
16 |
Fixes provided by Cinnamon upstream from Fedora RPM: |
17 |
https://src.fedoraproject.org/rpms/caribou/tree/master |
18 |
|
19 |
This also includes an upstreamed antler fix and bumps |
20 |
PYTHON_COMPAT for 3.9 support. |
21 |
|
22 |
Bug: https://bugs.gentoo.org/765661 |
23 |
Package-Manager: Portage-3.0.12, Repoman-3.0.2 |
24 |
Signed-off-by: Matthew S. Turnbull <sparky <AT> bluefang-logic.com> |
25 |
Closes: https://github.com/gentoo/gentoo/pull/19082 |
26 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
27 |
|
28 |
app-accessibility/caribou/caribou-0.4.21-r2.ebuild | 103 +++++++++++++++++++++ |
29 |
.../files/caribou-fix-antler-style-css.patch | 26 ++++++ |
30 |
.../files/caribou-fix-compilation-error.patch | 25 +++++ |
31 |
.../caribou/files/caribou-fix-subkey-popmenu.patch | 32 +++++++ |
32 |
.../files/caribou-fix-xadapter-xkb-calls.patch | 46 +++++++++ |
33 |
5 files changed, 232 insertions(+) |
34 |
|
35 |
diff --git a/app-accessibility/caribou/caribou-0.4.21-r2.ebuild b/app-accessibility/caribou/caribou-0.4.21-r2.ebuild |
36 |
new file mode 100644 |
37 |
index 00000000000..63eadbd8cb2 |
38 |
--- /dev/null |
39 |
+++ b/app-accessibility/caribou/caribou-0.4.21-r2.ebuild |
40 |
@@ -0,0 +1,103 @@ |
41 |
+# Copyright 1999-2021 Gentoo Authors |
42 |
+# Distributed under the terms of the GNU General Public License v2 |
43 |
+ |
44 |
+EAPI=6 |
45 |
+ |
46 |
+GNOME2_LA_PUNT="yes" |
47 |
+ |
48 |
+PYTHON_COMPAT=( python3_{6..9} ) |
49 |
+ |
50 |
+PYTHON_REQ_USE="xml" |
51 |
+ |
52 |
+inherit gnome2 python-r1 vala |
53 |
+ |
54 |
+DESCRIPTION="Input assistive technology intended for switch and pointer users" |
55 |
+HOMEPAGE="https://wiki.gnome.org/Projects/Caribou" |
56 |
+ |
57 |
+LICENSE="LGPL-2.1" |
58 |
+SLOT="0" |
59 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
60 |
+ |
61 |
+IUSE="" |
62 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
63 |
+ |
64 |
+COMMON_DEPEND=" |
65 |
+ app-accessibility/at-spi2-core |
66 |
+ >=dev-python/pygobject-2.90.3:3[${PYTHON_USEDEP}] |
67 |
+ >=x11-libs/gtk+-3:3[introspection] |
68 |
+ x11-libs/gtk+:2 |
69 |
+ >=dev-libs/gobject-introspection-0.10.7:= |
70 |
+ dev-libs/libgee:0.8 |
71 |
+ dev-libs/libxml2 |
72 |
+ >=media-libs/clutter-1.5.11:1.0[introspection] |
73 |
+ x11-libs/libX11 |
74 |
+ x11-libs/libxklavier |
75 |
+ x11-libs/libXtst |
76 |
+ ${PYTHON_DEPS} |
77 |
+ $(vala_depend) |
78 |
+" |
79 |
+# gsettings-desktop-schemas is needed for the 'toolkit-accessibility' key |
80 |
+# pyatspi-2.1.90 needed to run caribou if pygobject:3 is installed |
81 |
+# librsvg needed to load svg images in css styles |
82 |
+RDEPEND="${COMMON_DEPEND} |
83 |
+ dev-libs/glib[dbus] |
84 |
+ >=dev-python/pyatspi-2.1.90[${PYTHON_USEDEP}] |
85 |
+ >=gnome-base/gsettings-desktop-schemas-3 |
86 |
+ gnome-base/librsvg:2 |
87 |
+ sys-apps/dbus |
88 |
+ !<x11-base/xorg-server-1.20.10 |
89 |
+" |
90 |
+DEPEND="${COMMON_DEPEND} |
91 |
+ dev-libs/libxslt |
92 |
+ >=dev-util/intltool-0.35.5 |
93 |
+ virtual/pkgconfig |
94 |
+" |
95 |
+ |
96 |
+PATCHES=( |
97 |
+ "${FILESDIR}/${PN}-fix-compilation-error.patch" |
98 |
+ "${FILESDIR}/${PN}-fix-subkey-popmenu.patch" |
99 |
+ "${FILESDIR}/${PN}-fix-xadapter-xkb-calls.patch" |
100 |
+ "${FILESDIR}/${PN}-fix-antler-style-css.patch" |
101 |
+) |
102 |
+ |
103 |
+src_prepare() { |
104 |
+ # FIXME: Now this supports python3 too... |
105 |
+ # delete custom PYTHONPATH, useless on Gentoo and potential bug source |
106 |
+ # + caribou is python2 only so fix the shell scripts |
107 |
+# sed -e '/export PYTHONPATH=.*python/ d' \ |
108 |
+# -e "s:@PYTHON@:${EPREFIX}/usr/bin/python2:" \ |
109 |
+# -i bin/{antler-keyboard,caribou-preferences}.in || |
110 |
+# die "sed failed" |
111 |
+ |
112 |
+ vala_src_prepare |
113 |
+ gnome2_src_prepare |
114 |
+ |
115 |
+ prepare_caribou() { |
116 |
+ mkdir -p "${BUILD_DIR}" || die |
117 |
+ } |
118 |
+ python_foreach_impl prepare_caribou |
119 |
+} |
120 |
+ |
121 |
+src_configure() { |
122 |
+ ECONF_SOURCE="${S}" python_foreach_impl run_in_build_dir \ |
123 |
+ gnome2_src_configure \ |
124 |
+ --disable-docs \ |
125 |
+ --disable-static \ |
126 |
+ --enable-gtk3-module \ |
127 |
+ --enable-gtk2-module |
128 |
+} |
129 |
+ |
130 |
+src_compile() { |
131 |
+ python_foreach_impl run_in_build_dir gnome2_src_compile |
132 |
+} |
133 |
+ |
134 |
+src_test() { |
135 |
+ python_foreach_impl run_in_build_dir default |
136 |
+} |
137 |
+ |
138 |
+src_install() { |
139 |
+ python_foreach_impl run_in_build_dir gnome2_src_install |
140 |
+ |
141 |
+ # https://bugzilla.gnome.org/show_bug.cgi?id=769323 |
142 |
+ dodoc AUTHORS NEWS README # ChangeLog simply points to git log |
143 |
+} |
144 |
|
145 |
diff --git a/app-accessibility/caribou/files/caribou-fix-antler-style-css.patch b/app-accessibility/caribou/files/caribou-fix-antler-style-css.patch |
146 |
new file mode 100644 |
147 |
index 00000000000..4c4486bb788 |
148 |
--- /dev/null |
149 |
+++ b/app-accessibility/caribou/files/caribou-fix-antler-style-css.patch |
150 |
@@ -0,0 +1,26 @@ |
151 |
+From 13df8b92ae89c796238e669ee6ef4447a42d6355 Mon Sep 17 00:00:00 2001 |
152 |
+From: Jeremy Bicha <jbicha@××××××.com> |
153 |
+Date: Fri, 1 Dec 2017 12:11:35 -0500 |
154 |
+Subject: [PATCH] style.css: Fix failure to start in GNOME Flashback |
155 |
+ |
156 |
+The order for 'font' properties matters |
157 |
+https://developer.gnome.org/gtk3/stable/chap-css-properties.html |
158 |
+ |
159 |
+https://bugzilla.gnome.org/show_bug.cgi?id=791001 |
160 |
+--- |
161 |
+ data/antler/style.css | 2 +- |
162 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
163 |
+ |
164 |
+diff --git a/data/antler/style.css b/data/antler/style.css |
165 |
+index 5ab6f71..4d84904 100644 |
166 |
+--- a/data/antler/style.css |
167 |
++++ b/data/antler/style.css |
168 |
+@@ -13,7 +13,7 @@ |
169 |
+ border-width: 0px; |
170 |
+ border-radius: 2px; |
171 |
+ border-image: url("dark-key-border.svg") 2 2 2 2 repeat stretch; |
172 |
+- font: Sans 14px; |
173 |
++ font: 14px Sans; |
174 |
+ background-image: -gtk-gradient (linear, |
175 |
+ left top, |
176 |
+ left bottom, |
177 |
|
178 |
diff --git a/app-accessibility/caribou/files/caribou-fix-compilation-error.patch b/app-accessibility/caribou/files/caribou-fix-compilation-error.patch |
179 |
new file mode 100644 |
180 |
index 00000000000..d427cd35a11 |
181 |
--- /dev/null |
182 |
+++ b/app-accessibility/caribou/files/caribou-fix-compilation-error.patch |
183 |
@@ -0,0 +1,25 @@ |
184 |
+From bc6f3e7ca0921b50a3ff836d08ce264a4f114224 Mon Sep 17 00:00:00 2001 |
185 |
+From: Clement Lefebvre <clement.lefebvre@×××××××××.com> |
186 |
+Date: Tue, 12 Jan 2021 17:29:16 +0000 |
187 |
+Subject: [PATCH 1/4] Fix compilation error |
188 |
+ |
189 |
+--- |
190 |
+ libcaribou/key-model.vala | 2 +- |
191 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
192 |
+ |
193 |
+diff --git a/libcaribou/key-model.vala b/libcaribou/key-model.vala |
194 |
+index 89015bc..e88342e 100644 |
195 |
+--- a/libcaribou/key-model.vala |
196 |
++++ b/libcaribou/key-model.vala |
197 |
+@@ -101,7 +101,7 @@ namespace Caribou { |
198 |
+ unichar uc; |
199 |
+ while (text.get_next_char (ref index, out uc)) { |
200 |
+ uint keyval = Gdk.unicode_to_keyval (uc); |
201 |
+- if (keyval != uc | 0x01000000) |
202 |
++ if (keyval != (uc | 0x01000000)) |
203 |
+ _keyvals += keyval; |
204 |
+ } |
205 |
+ } else { |
206 |
+-- |
207 |
+2.29.2 |
208 |
+ |
209 |
|
210 |
diff --git a/app-accessibility/caribou/files/caribou-fix-subkey-popmenu.patch b/app-accessibility/caribou/files/caribou-fix-subkey-popmenu.patch |
211 |
new file mode 100644 |
212 |
index 00000000000..ffd4423c298 |
213 |
--- /dev/null |
214 |
+++ b/app-accessibility/caribou/files/caribou-fix-subkey-popmenu.patch |
215 |
@@ -0,0 +1,32 @@ |
216 |
+From 85ac8f9e210243d95163cf8b1013470a6d9c7eaa Mon Sep 17 00:00:00 2001 |
217 |
+From: Clement Lefebvre <clement.lefebvre@×××××××××.com> |
218 |
+Date: Tue, 12 Jan 2021 17:30:25 +0000 |
219 |
+Subject: [PATCH 2/4] Fix subkey popmenu not showing after being dismissed |
220 |
+ |
221 |
+To reproduce the issue: |
222 |
+ |
223 |
+- long-press the "e" button |
224 |
+- don't select any sub button.. just select "e" again to close the menu |
225 |
+ |
226 |
+After this the menu no long appears when long-pressing "e". |
227 |
+ |
228 |
+This commit fixes that. |
229 |
+--- |
230 |
+ libcaribou/key-model.vala | 1 + |
231 |
+ 1 file changed, 1 insertion(+) |
232 |
+ |
233 |
+diff --git a/libcaribou/key-model.vala b/libcaribou/key-model.vala |
234 |
+index e88342e..2f640f2 100644 |
235 |
+--- a/libcaribou/key-model.vala |
236 |
++++ b/libcaribou/key-model.vala |
237 |
+@@ -179,6 +179,7 @@ namespace Caribou { |
238 |
+ hold_tid = GLib.Timeout.add (1000, on_key_held); |
239 |
+ |
240 |
+ key_pressed(this); |
241 |
++ show_subkeys = false; |
242 |
+ } |
243 |
+ |
244 |
+ public void release () { |
245 |
+-- |
246 |
+2.29.2 |
247 |
+ |
248 |
|
249 |
diff --git a/app-accessibility/caribou/files/caribou-fix-xadapter-xkb-calls.patch b/app-accessibility/caribou/files/caribou-fix-xadapter-xkb-calls.patch |
250 |
new file mode 100644 |
251 |
index 00000000000..bcb2a19c3d0 |
252 |
--- /dev/null |
253 |
+++ b/app-accessibility/caribou/files/caribou-fix-xadapter-xkb-calls.patch |
254 |
@@ -0,0 +1,46 @@ |
255 |
+From 00653c5dcc4be5e983b670d00d5724fc21da2e82 Mon Sep 17 00:00:00 2001 |
256 |
+From: Clement Lefebvre <clement.lefebvre@×××××××××.com> |
257 |
+Date: Tue, 12 Jan 2021 18:01:47 +0000 |
258 |
+Subject: [PATCH 3/4] [mtwebster] xadapter.vala: Remove XkbKeyTypesMask and |
259 |
+ fields from XKbChangeMap call. |
260 |
+MIME-Version: 1.0 |
261 |
+Content-Type: text/plain; charset=UTF-8 |
262 |
+Content-Transfer-Encoding: 8bit |
263 |
+ |
264 |
+This was originally a workaround for xFree86 4.3 - see: |
265 |
+https://bugzilla.gnome.org/show_bug.cgi?id=673547 |
266 |
+ |
267 |
+As of https://gitlab.freedesktop.org/xorg/xserver/-/commit/87c64fc5b0 this |
268 |
+causes a BadLength error when attempting to use shifted characters. |
269 |
+ |
270 |
+Ref: |
271 |
+https://www.x.org/releases/X11R7.7/doc/libX11/XKB/xkblib.html#Changing_Map_Components_in_the_Server |
272 |
+--- |
273 |
+ libcaribou/xadapter.vala | 9 ++------- |
274 |
+ 1 file changed, 2 insertions(+), 7 deletions(-) |
275 |
+ |
276 |
+diff --git a/libcaribou/xadapter.vala b/libcaribou/xadapter.vala |
277 |
+index 22858b7..1da5a78 100644 |
278 |
+--- a/libcaribou/xadapter.vala |
279 |
++++ b/libcaribou/xadapter.vala |
280 |
+@@ -195,15 +195,10 @@ namespace Caribou { |
281 |
+ |
282 |
+ Xkb.MapChanges changes = Xkb.MapChanges (); |
283 |
+ |
284 |
+- // We don't touch key types here but include the |
285 |
+- // information in XkbSetMap request to the server, because |
286 |
+- // some X servers need the information to check the sanity |
287 |
+- // of the keysyms change. |
288 |
+- changes.changed = (ushort) (Xkb.KeySymsMask | Xkb.KeyTypesMask); |
289 |
++ changes.changed = (ushort) Xkb.KeySymsMask; |
290 |
+ changes.first_key_sym = (char) this.reserved_keycode; |
291 |
+ changes.num_key_syms = this.xkbdesc.map.key_sym_map[this.reserved_keycode].width; |
292 |
+- changes.first_type = 0; |
293 |
+- changes.num_types = this.xkbdesc.map.num_types; |
294 |
++ |
295 |
+ Xkb.change_map (this.xdisplay, this.xkbdesc, changes); |
296 |
+ |
297 |
+ this.xdisplay.flush (); |
298 |
+-- |
299 |
+2.29.2 |
300 |
+ |