Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-i18n/ibus/files/, app-i18n/ibus/
Date: Sat, 05 Sep 2020 02:04:34
Message-Id: 1599271361.0db6509390a646aea051b51146773fac53d76820.floppym@gentoo
1 commit: 0db6509390a646aea051b51146773fac53d76820
2 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
3 AuthorDate: Fri Sep 4 02:00:00 2020 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 5 02:02:41 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0db65093
7
8 app-i18n/ibus: Delete old version (1.5.21-r1).
9
10 Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
11 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
12
13 app-i18n/ibus/Manifest | 1 -
14 .../ibus/files/ibus-1.5.21-fix-authorization.patch | 175 --------------------
15 app-i18n/ibus/ibus-1.5.21-r1.ebuild | 182 ---------------------
16 app-i18n/ibus/metadata.xml | 1 -
17 4 files changed, 359 deletions(-)
18
19 diff --git a/app-i18n/ibus/Manifest b/app-i18n/ibus/Manifest
20 index 8fdca0a8374..31cbcd1a2d9 100644
21 --- a/app-i18n/ibus/Manifest
22 +++ b/app-i18n/ibus/Manifest
23 @@ -1,2 +1 @@
24 -DIST ibus-1.5.21.tar.gz 3463069 BLAKE2B 75b9e7cc4d84b69941d53321da1fe63ad911740a36ed51c7fceaa2a7bc30f6ae39d3f575b4b5fc4268d7c3b3e1c0bae11881dd7a8b7bd441ecf89c83c7279858 SHA512 c7c06e13e78fb4d4d26ce8975b6db4f7914efb325a903999a82197229e13d5ebb4afc876ef67e1d86db58f08c16350dc095aaea050b2f69c2bfc4c452adc5331
25 DIST ibus-1.5.22.tar.gz 3578251 BLAKE2B 08ad72bd455d2841700b11a4ade88e2b9768433f86bac4baf20db882580b10a4705f545a845a03d3b4196a75c43d33c51ffd31a3516d71030f891ce48dce69c2 SHA512 0abe89acc6da8cea484a6b9f807c08e94869072f374f9e8f4541a426636f818f1c3cb8b9237f97245771f9e4bf19184983d8ac924177dc4824ca6e8b5304425d
26
27 diff --git a/app-i18n/ibus/files/ibus-1.5.21-fix-authorization.patch b/app-i18n/ibus/files/ibus-1.5.21-fix-authorization.patch
28 deleted file mode 100644
29 index 8b7674cddea..00000000000
30 --- a/app-i18n/ibus/files/ibus-1.5.21-fix-authorization.patch
31 +++ /dev/null
32 @@ -1,175 +0,0 @@
33 -From 3d442dbf936d197aa11ca0a71663c2bc61696151 Mon Sep 17 00:00:00 2001
34 -From: fujiwarat <takao.fujiwara1@×××××.com>
35 -Date: Fri, 13 Sep 2019 15:59:03 +0900
36 -Subject: [PATCH] bus: Implement GDBusAuthObserver callback
37 -
38 -ibus uses a GDBusServer with G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS,
39 -and doesn't set a GDBusAuthObserver, which allows anyone who can connect
40 -to its AF_UNIX socket to authenticate and be authorized to send method calls.
41 -It also seems to use an abstract AF_UNIX socket, which does not have
42 -filesystem permissions, so the practical effect might be that a local
43 -attacker can connect to another user's ibus service and make arbitrary
44 -method calls.
45 -
46 -BUGS=rhbz#1717958
47 ----
48 - bus/server.c | 89 ++++++++++++++++++++++++++++++++++++++++++----------
49 - 1 file changed, 73 insertions(+), 16 deletions(-)
50 -
51 -diff --git a/bus/server.c b/bus/server.c
52 -index 3a626230..2439de14 100644
53 ---- a/bus/server.c
54 -+++ b/bus/server.c
55 -@@ -2,7 +2,8 @@
56 - /* vim:set et sts=4: */
57 - /* bus - The Input Bus
58 - * Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@×××××.com>
59 -- * Copyright (C) 2008-2010 Red Hat, Inc.
60 -+ * Copyright (C) 2011-2019 Takao Fujiwara <takao.fujiwara1@×××××.com>
61 -+ * Copyright (C) 2008-2019 Red Hat, Inc.
62 - *
63 - * This library is free software; you can redistribute it and/or
64 - * modify it under the terms of the GNU Lesser General Public
65 -@@ -69,17 +70,64 @@ _restart_server (void)
66 - exit (-1);
67 - }
68 -
69 -+/**
70 -+ * bus_allow_mechanism_cb:
71 -+ * @observer: A #GDBusAuthObserver.
72 -+ * @mechanism: The name of the mechanism.
73 -+ * @user_data: always %NULL.
74 -+ *
75 -+ * Check if @mechanism can be used to authenticate the other peer.
76 -+ * Returns: %TRUE if the peer's mechanism is allowed.
77 -+ */
78 -+static gboolean
79 -+bus_allow_mechanism_cb (GDBusAuthObserver *observer,
80 -+ const gchar *mechanism,
81 -+ G_GNUC_UNUSED gpointer user_data)
82 -+{
83 -+ if (g_strcmp0 (mechanism, "EXTERNAL") == 0)
84 -+ return TRUE;
85 -+ return FALSE;
86 -+}
87 -+
88 -+/**
89 -+ * bus_authorize_authenticated_peer_cb:
90 -+ * @observer: A #GDBusAuthObserver.
91 -+ * @stream: A #GIOStream.
92 -+ * @credentials: A #GCredentials.
93 -+ * @user_data: always %NULL.
94 -+ *
95 -+ * Check if a peer who has already authenticated should be authorized.
96 -+ * Returns: %TRUE if the peer's credential is authorized.
97 -+ */
98 -+static gboolean
99 -+bus_authorize_authenticated_peer_cb (GDBusAuthObserver *observer,
100 -+ GIOStream *stream,
101 -+ GCredentials *credentials,
102 -+ G_GNUC_UNUSED gpointer user_data)
103 -+{
104 -+ gboolean authorized = FALSE;
105 -+ if (credentials) {
106 -+ GCredentials *own_credentials = g_credentials_new ();
107 -+ if (g_credentials_is_same_user (credentials, own_credentials, NULL))
108 -+ authorized = TRUE;
109 -+ g_object_unref (own_credentials);
110 -+ }
111 -+ return authorized;
112 -+}
113 -+
114 - /**
115 - * bus_new_connection_cb:
116 -- * @user_data: always NULL.
117 -- * @returns: TRUE when the function can handle the connection.
118 -+ * @observer: A #GDBusAuthObserver.
119 -+ * @dbus_connection: A #GDBusconnection.
120 -+ * @user_data: always %NULL.
121 - *
122 - * Handle incoming connections.
123 -+ * Returns: %TRUE when the function can handle the connection.
124 - */
125 - static gboolean
126 --bus_new_connection_cb (GDBusServer *server,
127 -- GDBusConnection *dbus_connection,
128 -- gpointer user_data)
129 -+bus_new_connection_cb (GDBusServer *server,
130 -+ GDBusConnection *dbus_connection,
131 -+ G_GNUC_UNUSED gpointer user_data)
132 - {
133 - BusConnection *connection = bus_connection_new (dbus_connection);
134 - bus_dbus_impl_new_connection (dbus, connection);
135 -@@ -94,9 +142,9 @@ bus_new_connection_cb (GDBusServer *server,
136 - }
137 -
138 - static void
139 --_server_connect_start_portal_cb (GObject *source_object,
140 -- GAsyncResult *res,
141 -- gpointer user_data)
142 -+_server_connect_start_portal_cb (GObject *source_object,
143 -+ GAsyncResult *res,
144 -+ G_GNUC_UNUSED gpointer user_data)
145 - {
146 - GVariant *result;
147 - GError *error = NULL;
148 -@@ -113,9 +161,9 @@ _server_connect_start_portal_cb (GObject *source_object,
149 - }
150 -
151 - static void
152 --bus_acquired_handler (GDBusConnection *connection,
153 -- const gchar *name,
154 -- gpointer user_data)
155 -+bus_acquired_handler (GDBusConnection *connection,
156 -+ const gchar *name,
157 -+ G_GNUC_UNUSED gpointer user_data)
158 - {
159 - g_dbus_connection_call (connection,
160 - IBUS_SERVICE_PORTAL,
161 -@@ -136,14 +184,17 @@ void
162 - bus_server_init (void)
163 - {
164 - GError *error = NULL;
165 -+ GDBusServerFlags flags = G_DBUS_SERVER_FLAGS_NONE;
166 -+ gchar *guid;
167 -+ GDBusAuthObserver *observer;
168 -
169 - dbus = bus_dbus_impl_get_default ();
170 - ibus = bus_ibus_impl_get_default ();
171 - bus_dbus_impl_register_object (dbus, (IBusService *)ibus);
172 -
173 - /* init server */
174 -- GDBusServerFlags flags = G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS;
175 -- gchar *guid = g_dbus_generate_guid ();
176 -+ guid = g_dbus_generate_guid ();
177 -+ observer = g_dbus_auth_observer_new ();
178 - if (!g_str_has_prefix (g_address, "unix:tmpdir=") &&
179 - !g_str_has_prefix (g_address, "unix:path=")) {
180 - g_error ("Your socket address does not have the format unix:tmpdir=$DIR "
181 -@@ -152,7 +203,7 @@ bus_server_init (void)
182 - server = g_dbus_server_new_sync (
183 - g_address, /* the place where the socket file lives, e.g. /tmp, abstract namespace, etc. */
184 - flags, guid,
185 -- NULL /* observer */,
186 -+ observer,
187 - NULL /* cancellable */,
188 - &error);
189 - if (server == NULL) {
190 -@@ -162,7 +213,13 @@ bus_server_init (void)
191 - }
192 - g_free (guid);
193 -
194 -- g_signal_connect (server, "new-connection", G_CALLBACK (bus_new_connection_cb), NULL);
195 -+ g_signal_connect (observer, "allow-mechanism",
196 -+ G_CALLBACK (bus_allow_mechanism_cb), NULL);
197 -+ g_signal_connect (observer, "authorize-authenticated-peer",
198 -+ G_CALLBACK (bus_authorize_authenticated_peer_cb), NULL);
199 -+ g_object_unref (observer);
200 -+ g_signal_connect (server, "new-connection",
201 -+ G_CALLBACK (bus_new_connection_cb), NULL);
202 -
203 - g_dbus_server_start (server);
204 -
205 ---
206 -2.24.0
207 -
208
209 diff --git a/app-i18n/ibus/ibus-1.5.21-r1.ebuild b/app-i18n/ibus/ibus-1.5.21-r1.ebuild
210 deleted file mode 100644
211 index 66c047159f5..00000000000
212 --- a/app-i18n/ibus/ibus-1.5.21-r1.ebuild
213 +++ /dev/null
214 @@ -1,182 +0,0 @@
215 -# Copyright 1999-2020 Gentoo Authors
216 -# Distributed under the terms of the GNU General Public License v2
217 -
218 -EAPI=6
219 -PYTHON_COMPAT=( python{2_7,3_6,3_7} )
220 -VALA_MIN_API_VERSION="0.34"
221 -VALA_USE_DEPEND="vapigen"
222 -
223 -inherit autotools bash-completion-r1 gnome2-utils python-r1 vala virtualx xdg-utils
224 -
225 -DESCRIPTION="Intelligent Input Bus for Linux / Unix OS"
226 -HOMEPAGE="https://github.com/ibus/ibus/wiki"
227 -SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz"
228 -
229 -LICENSE="LGPL-2.1"
230 -SLOT="0"
231 -KEYWORDS="~alpha amd64 arm arm64 ~ia64 ppc ppc64 sparc x86"
232 -IUSE="+X +emoji gconf +gtk +gtk2 +introspection kde nls +python test +unicode vala wayland"
233 -RESTRICT="!test? ( test )"
234 -REQUIRED_USE="emoji? ( gtk )
235 - gtk2? ( gtk )
236 - kde? ( gtk )
237 - python? (
238 - ${PYTHON_REQUIRED_USE}
239 - introspection
240 - )
241 - test? ( gtk )
242 - vala? ( introspection )"
243 -
244 -CDEPEND="app-text/iso-codes
245 - dev-libs/glib:2
246 - gnome-base/dconf
247 - gnome-base/librsvg:2
248 - sys-apps/dbus[X?]
249 - X? (
250 - x11-libs/libX11
251 - !gtk? ( x11-libs/gtk+:2 )
252 - )
253 - gconf? ( gnome-base/gconf:2 )
254 - gtk? (
255 - x11-libs/gtk+:3
256 - x11-libs/libX11
257 - x11-libs/libXi
258 - gtk2? ( x11-libs/gtk+:2 )
259 - )
260 - introspection? ( dev-libs/gobject-introspection )
261 - kde? ( dev-qt/qtgui:5 )
262 - nls? ( virtual/libintl )
263 - python? (
264 - ${PYTHON_DEPS}
265 - dev-python/pygobject:3[${PYTHON_USEDEP}]
266 - )
267 - wayland? (
268 - dev-libs/wayland
269 - x11-libs/libxkbcommon
270 - )"
271 -RDEPEND="${CDEPEND}
272 - python? (
273 - gtk? (
274 - x11-libs/gtk+:3[introspection]
275 - )
276 - )"
277 -DEPEND="${CDEPEND}
278 - $(vala_depend)
279 - dev-util/glib-utils
280 - virtual/pkgconfig
281 - emoji? (
282 - app-i18n/unicode-cldr
283 - app-i18n/unicode-emoji
284 - )
285 - nls? ( sys-devel/gettext )
286 - unicode? ( app-i18n/unicode-data )"
287 -
288 -PATCHES=( "${FILESDIR}"/${P}-fix-authorization.patch )
289 -src_prepare() {
290 - vala_src_prepare --ignore-use
291 - sed -i "/UCD_DIR=/s/\$with_emoji_annotation_dir/\$with_ucd_dir/" configure.ac
292 - if ! has_version 'x11-libs/gtk+:3[wayland]'; then
293 - touch ui/gtk3/panelbinding.vala
294 - fi
295 - if ! use emoji; then
296 - touch \
297 - tools/main.vala \
298 - ui/gtk3/panel.vala
299 - fi
300 - if ! use kde; then
301 - touch ui/gtk3/panel.vala
302 - fi
303 -
304 - # for multiple Python implementations
305 - sed -i "s/^\(PYGOBJECT_DIR =\).*/\1/" bindings/Makefile.am
306 - # fix for parallel install
307 - sed -i "/^if ENABLE_PYTHON2/,/^endif/d" bindings/pygobject/Makefile.am
308 - # require user interaction
309 - sed -i "/^TESTS += ibus-\(compose\|keypress\)/d" src/tests/Makefile.am
310 -
311 - sed -i "/^bash_completion/d" tools/Makefile.am
312 -
313 - default
314 - eautoreconf
315 - xdg_environment_reset
316 -}
317 -
318 -src_configure() {
319 - local unicodedir="${EPREFIX}"/usr/share/unicode
320 - local python_conf=()
321 - if use python; then
322 - python_setup
323 - python_conf+=(
324 - $(use_enable gtk setup)
325 - --with-python=${EPYTHON}
326 - )
327 - else
328 - python_conf+=( --disable-setup )
329 - fi
330 -
331 - econf \
332 - $(use_enable X xim) \
333 - $(use_enable emoji emoji-dict) \
334 - $(use_with emoji unicode-emoji-dir "${unicodedir}"/emoji) \
335 - $(use_with emoji emoji-annotation-dir "${unicodedir}"/cldr/common/annotations) \
336 - $(use_enable gconf) \
337 - $(use_enable gtk gtk3) \
338 - $(use_enable gtk ui) \
339 - $(use_enable gtk2) \
340 - $(use_enable introspection) \
341 - $(use_enable kde appindicator) \
342 - $(use_enable nls) \
343 - $(use_enable test tests) \
344 - $(use_enable unicode unicode-dict) \
345 - $(use_with unicode ucd-dir "${EPREFIX}/usr/share/unicode-data") \
346 - $(use_enable vala) \
347 - $(use_enable wayland) \
348 - "${python_conf[@]}"
349 -}
350 -
351 -src_test() {
352 - unset DBUS_SESSION_BUS_ADDRESS
353 - virtx emake -j1 check
354 -}
355 -
356 -src_install() {
357 - default
358 - find "${ED}" -name '*.la' -delete || die
359 -
360 - if use python; then
361 - python_install() {
362 - emake -C bindings/pygobject \
363 - pyoverridesdir="$(${EPYTHON} -c 'import gi; print(gi._overridesdir)')" \
364 - DESTDIR="${D}" \
365 - install
366 - }
367 - python_foreach_impl python_install
368 - fi
369 -
370 - keepdir /usr/share/ibus/engine
371 -
372 - newbashcomp tools/${PN}.bash ${PN}
373 -
374 - insinto /etc/X11/xinit/xinput.d
375 - newins xinput-${PN} ${PN}.conf
376 -}
377 -
378 -pkg_preinst() {
379 - use gconf && gnome2_gconf_savelist
380 -}
381 -
382 -pkg_postinst() {
383 - use gconf && gnome2_gconf_install
384 - use gtk && gnome2_query_immodules_gtk3
385 - use gtk2 && gnome2_query_immodules_gtk2
386 - gnome2_icon_cache_update
387 - gnome2_schemas_update
388 - dconf update
389 -}
390 -
391 -pkg_postrm() {
392 - use gtk && gnome2_query_immodules_gtk3
393 - use gtk2 && gnome2_query_immodules_gtk2
394 - gnome2_icon_cache_update
395 - gnome2_schemas_update
396 -}
397
398 diff --git a/app-i18n/ibus/metadata.xml b/app-i18n/ibus/metadata.xml
399 index 3e5476424e4..0a198f3d160 100644
400 --- a/app-i18n/ibus/metadata.xml
401 +++ b/app-i18n/ibus/metadata.xml
402 @@ -12,7 +12,6 @@
403 </longdescription>
404 <use>
405 <flag name="emoji">Enable support for Emoji</flag>
406 - <flag name="gconf">Enable support for <pkg>gnome-base/gconf</pkg></flag>
407 <flag name="gtk2">Enable support for <pkg>x11-libs/gtk+</pkg>:2</flag>
408 <flag name="unicode">Enable support for Unicode choice</flag>
409 </use>