summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-i18n')
-rw-r--r--app-i18n/ibus/Manifest1
-rw-r--r--app-i18n/ibus/files/ibus-1.5.21-fix-authorization.patch175
-rw-r--r--app-i18n/ibus/ibus-1.5.21-r1.ebuild182
-rw-r--r--app-i18n/ibus/metadata.xml1
4 files changed, 0 insertions, 359 deletions
diff --git a/app-i18n/ibus/Manifest b/app-i18n/ibus/Manifest
index 8fdca0a8374..31cbcd1a2d9 100644
--- a/app-i18n/ibus/Manifest
+++ b/app-i18n/ibus/Manifest
@@ -1,2 +1 @@
-DIST ibus-1.5.21.tar.gz 3463069 BLAKE2B 75b9e7cc4d84b69941d53321da1fe63ad911740a36ed51c7fceaa2a7bc30f6ae39d3f575b4b5fc4268d7c3b3e1c0bae11881dd7a8b7bd441ecf89c83c7279858 SHA512 c7c06e13e78fb4d4d26ce8975b6db4f7914efb325a903999a82197229e13d5ebb4afc876ef67e1d86db58f08c16350dc095aaea050b2f69c2bfc4c452adc5331
DIST ibus-1.5.22.tar.gz 3578251 BLAKE2B 08ad72bd455d2841700b11a4ade88e2b9768433f86bac4baf20db882580b10a4705f545a845a03d3b4196a75c43d33c51ffd31a3516d71030f891ce48dce69c2 SHA512 0abe89acc6da8cea484a6b9f807c08e94869072f374f9e8f4541a426636f818f1c3cb8b9237f97245771f9e4bf19184983d8ac924177dc4824ca6e8b5304425d
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
deleted file mode 100644
index 8b7674cddea..00000000000
--- a/app-i18n/ibus/files/ibus-1.5.21-fix-authorization.patch
+++ /dev/null
@@ -1,175 +0,0 @@
-From 3d442dbf936d197aa11ca0a71663c2bc61696151 Mon Sep 17 00:00:00 2001
-From: fujiwarat <takao.fujiwara1@gmail.com>
-Date: Fri, 13 Sep 2019 15:59:03 +0900
-Subject: [PATCH] bus: Implement GDBusAuthObserver callback
-
-ibus uses a GDBusServer with G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS,
-and doesn't set a GDBusAuthObserver, which allows anyone who can connect
-to its AF_UNIX socket to authenticate and be authorized to send method calls.
-It also seems to use an abstract AF_UNIX socket, which does not have
-filesystem permissions, so the practical effect might be that a local
-attacker can connect to another user's ibus service and make arbitrary
-method calls.
-
-BUGS=rhbz#1717958
----
- bus/server.c | 89 ++++++++++++++++++++++++++++++++++++++++++----------
- 1 file changed, 73 insertions(+), 16 deletions(-)
-
-diff --git a/bus/server.c b/bus/server.c
-index 3a626230..2439de14 100644
---- a/bus/server.c
-+++ b/bus/server.c
-@@ -2,7 +2,8 @@
- /* vim:set et sts=4: */
- /* bus - The Input Bus
- * Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@gmail.com>
-- * Copyright (C) 2008-2010 Red Hat, Inc.
-+ * Copyright (C) 2011-2019 Takao Fujiwara <takao.fujiwara1@gmail.com>
-+ * Copyright (C) 2008-2019 Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
-@@ -69,17 +70,64 @@ _restart_server (void)
- exit (-1);
- }
-
-+/**
-+ * bus_allow_mechanism_cb:
-+ * @observer: A #GDBusAuthObserver.
-+ * @mechanism: The name of the mechanism.
-+ * @user_data: always %NULL.
-+ *
-+ * Check if @mechanism can be used to authenticate the other peer.
-+ * Returns: %TRUE if the peer's mechanism is allowed.
-+ */
-+static gboolean
-+bus_allow_mechanism_cb (GDBusAuthObserver *observer,
-+ const gchar *mechanism,
-+ G_GNUC_UNUSED gpointer user_data)
-+{
-+ if (g_strcmp0 (mechanism, "EXTERNAL") == 0)
-+ return TRUE;
-+ return FALSE;
-+}
-+
-+/**
-+ * bus_authorize_authenticated_peer_cb:
-+ * @observer: A #GDBusAuthObserver.
-+ * @stream: A #GIOStream.
-+ * @credentials: A #GCredentials.
-+ * @user_data: always %NULL.
-+ *
-+ * Check if a peer who has already authenticated should be authorized.
-+ * Returns: %TRUE if the peer's credential is authorized.
-+ */
-+static gboolean
-+bus_authorize_authenticated_peer_cb (GDBusAuthObserver *observer,
-+ GIOStream *stream,
-+ GCredentials *credentials,
-+ G_GNUC_UNUSED gpointer user_data)
-+{
-+ gboolean authorized = FALSE;
-+ if (credentials) {
-+ GCredentials *own_credentials = g_credentials_new ();
-+ if (g_credentials_is_same_user (credentials, own_credentials, NULL))
-+ authorized = TRUE;
-+ g_object_unref (own_credentials);
-+ }
-+ return authorized;
-+}
-+
- /**
- * bus_new_connection_cb:
-- * @user_data: always NULL.
-- * @returns: TRUE when the function can handle the connection.
-+ * @observer: A #GDBusAuthObserver.
-+ * @dbus_connection: A #GDBusconnection.
-+ * @user_data: always %NULL.
- *
- * Handle incoming connections.
-+ * Returns: %TRUE when the function can handle the connection.
- */
- static gboolean
--bus_new_connection_cb (GDBusServer *server,
-- GDBusConnection *dbus_connection,
-- gpointer user_data)
-+bus_new_connection_cb (GDBusServer *server,
-+ GDBusConnection *dbus_connection,
-+ G_GNUC_UNUSED gpointer user_data)
- {
- BusConnection *connection = bus_connection_new (dbus_connection);
- bus_dbus_impl_new_connection (dbus, connection);
-@@ -94,9 +142,9 @@ bus_new_connection_cb (GDBusServer *server,
- }
-
- static void
--_server_connect_start_portal_cb (GObject *source_object,
-- GAsyncResult *res,
-- gpointer user_data)
-+_server_connect_start_portal_cb (GObject *source_object,
-+ GAsyncResult *res,
-+ G_GNUC_UNUSED gpointer user_data)
- {
- GVariant *result;
- GError *error = NULL;
-@@ -113,9 +161,9 @@ _server_connect_start_portal_cb (GObject *source_object,
- }
-
- static void
--bus_acquired_handler (GDBusConnection *connection,
-- const gchar *name,
-- gpointer user_data)
-+bus_acquired_handler (GDBusConnection *connection,
-+ const gchar *name,
-+ G_GNUC_UNUSED gpointer user_data)
- {
- g_dbus_connection_call (connection,
- IBUS_SERVICE_PORTAL,
-@@ -136,14 +184,17 @@ void
- bus_server_init (void)
- {
- GError *error = NULL;
-+ GDBusServerFlags flags = G_DBUS_SERVER_FLAGS_NONE;
-+ gchar *guid;
-+ GDBusAuthObserver *observer;
-
- dbus = bus_dbus_impl_get_default ();
- ibus = bus_ibus_impl_get_default ();
- bus_dbus_impl_register_object (dbus, (IBusService *)ibus);
-
- /* init server */
-- GDBusServerFlags flags = G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS;
-- gchar *guid = g_dbus_generate_guid ();
-+ guid = g_dbus_generate_guid ();
-+ observer = g_dbus_auth_observer_new ();
- if (!g_str_has_prefix (g_address, "unix:tmpdir=") &&
- !g_str_has_prefix (g_address, "unix:path=")) {
- g_error ("Your socket address does not have the format unix:tmpdir=$DIR "
-@@ -152,7 +203,7 @@ bus_server_init (void)
- server = g_dbus_server_new_sync (
- g_address, /* the place where the socket file lives, e.g. /tmp, abstract namespace, etc. */
- flags, guid,
-- NULL /* observer */,
-+ observer,
- NULL /* cancellable */,
- &error);
- if (server == NULL) {
-@@ -162,7 +213,13 @@ bus_server_init (void)
- }
- g_free (guid);
-
-- g_signal_connect (server, "new-connection", G_CALLBACK (bus_new_connection_cb), NULL);
-+ g_signal_connect (observer, "allow-mechanism",
-+ G_CALLBACK (bus_allow_mechanism_cb), NULL);
-+ g_signal_connect (observer, "authorize-authenticated-peer",
-+ G_CALLBACK (bus_authorize_authenticated_peer_cb), NULL);
-+ g_object_unref (observer);
-+ g_signal_connect (server, "new-connection",
-+ G_CALLBACK (bus_new_connection_cb), NULL);
-
- g_dbus_server_start (server);
-
---
-2.24.0
-
diff --git a/app-i18n/ibus/ibus-1.5.21-r1.ebuild b/app-i18n/ibus/ibus-1.5.21-r1.ebuild
deleted file mode 100644
index 66c047159f5..00000000000
--- a/app-i18n/ibus/ibus-1.5.21-r1.ebuild
+++ /dev/null
@@ -1,182 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python{2_7,3_6,3_7} )
-VALA_MIN_API_VERSION="0.34"
-VALA_USE_DEPEND="vapigen"
-
-inherit autotools bash-completion-r1 gnome2-utils python-r1 vala virtualx xdg-utils
-
-DESCRIPTION="Intelligent Input Bus for Linux / Unix OS"
-HOMEPAGE="https://github.com/ibus/ibus/wiki"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~ia64 ppc ppc64 sparc x86"
-IUSE="+X +emoji gconf +gtk +gtk2 +introspection kde nls +python test +unicode vala wayland"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="emoji? ( gtk )
- gtk2? ( gtk )
- kde? ( gtk )
- python? (
- ${PYTHON_REQUIRED_USE}
- introspection
- )
- test? ( gtk )
- vala? ( introspection )"
-
-CDEPEND="app-text/iso-codes
- dev-libs/glib:2
- gnome-base/dconf
- gnome-base/librsvg:2
- sys-apps/dbus[X?]
- X? (
- x11-libs/libX11
- !gtk? ( x11-libs/gtk+:2 )
- )
- gconf? ( gnome-base/gconf:2 )
- gtk? (
- x11-libs/gtk+:3
- x11-libs/libX11
- x11-libs/libXi
- gtk2? ( x11-libs/gtk+:2 )
- )
- introspection? ( dev-libs/gobject-introspection )
- kde? ( dev-qt/qtgui:5 )
- nls? ( virtual/libintl )
- python? (
- ${PYTHON_DEPS}
- dev-python/pygobject:3[${PYTHON_USEDEP}]
- )
- wayland? (
- dev-libs/wayland
- x11-libs/libxkbcommon
- )"
-RDEPEND="${CDEPEND}
- python? (
- gtk? (
- x11-libs/gtk+:3[introspection]
- )
- )"
-DEPEND="${CDEPEND}
- $(vala_depend)
- dev-util/glib-utils
- virtual/pkgconfig
- emoji? (
- app-i18n/unicode-cldr
- app-i18n/unicode-emoji
- )
- nls? ( sys-devel/gettext )
- unicode? ( app-i18n/unicode-data )"
-
-PATCHES=( "${FILESDIR}"/${P}-fix-authorization.patch )
-src_prepare() {
- vala_src_prepare --ignore-use
- sed -i "/UCD_DIR=/s/\$with_emoji_annotation_dir/\$with_ucd_dir/" configure.ac
- if ! has_version 'x11-libs/gtk+:3[wayland]'; then
- touch ui/gtk3/panelbinding.vala
- fi
- if ! use emoji; then
- touch \
- tools/main.vala \
- ui/gtk3/panel.vala
- fi
- if ! use kde; then
- touch ui/gtk3/panel.vala
- fi
-
- # for multiple Python implementations
- sed -i "s/^\(PYGOBJECT_DIR =\).*/\1/" bindings/Makefile.am
- # fix for parallel install
- sed -i "/^if ENABLE_PYTHON2/,/^endif/d" bindings/pygobject/Makefile.am
- # require user interaction
- sed -i "/^TESTS += ibus-\(compose\|keypress\)/d" src/tests/Makefile.am
-
- sed -i "/^bash_completion/d" tools/Makefile.am
-
- default
- eautoreconf
- xdg_environment_reset
-}
-
-src_configure() {
- local unicodedir="${EPREFIX}"/usr/share/unicode
- local python_conf=()
- if use python; then
- python_setup
- python_conf+=(
- $(use_enable gtk setup)
- --with-python=${EPYTHON}
- )
- else
- python_conf+=( --disable-setup )
- fi
-
- econf \
- $(use_enable X xim) \
- $(use_enable emoji emoji-dict) \
- $(use_with emoji unicode-emoji-dir "${unicodedir}"/emoji) \
- $(use_with emoji emoji-annotation-dir "${unicodedir}"/cldr/common/annotations) \
- $(use_enable gconf) \
- $(use_enable gtk gtk3) \
- $(use_enable gtk ui) \
- $(use_enable gtk2) \
- $(use_enable introspection) \
- $(use_enable kde appindicator) \
- $(use_enable nls) \
- $(use_enable test tests) \
- $(use_enable unicode unicode-dict) \
- $(use_with unicode ucd-dir "${EPREFIX}/usr/share/unicode-data") \
- $(use_enable vala) \
- $(use_enable wayland) \
- "${python_conf[@]}"
-}
-
-src_test() {
- unset DBUS_SESSION_BUS_ADDRESS
- virtx emake -j1 check
-}
-
-src_install() {
- default
- find "${ED}" -name '*.la' -delete || die
-
- if use python; then
- python_install() {
- emake -C bindings/pygobject \
- pyoverridesdir="$(${EPYTHON} -c 'import gi; print(gi._overridesdir)')" \
- DESTDIR="${D}" \
- install
- }
- python_foreach_impl python_install
- fi
-
- keepdir /usr/share/ibus/engine
-
- newbashcomp tools/${PN}.bash ${PN}
-
- insinto /etc/X11/xinit/xinput.d
- newins xinput-${PN} ${PN}.conf
-}
-
-pkg_preinst() {
- use gconf && gnome2_gconf_savelist
-}
-
-pkg_postinst() {
- use gconf && gnome2_gconf_install
- use gtk && gnome2_query_immodules_gtk3
- use gtk2 && gnome2_query_immodules_gtk2
- gnome2_icon_cache_update
- gnome2_schemas_update
- dconf update
-}
-
-pkg_postrm() {
- use gtk && gnome2_query_immodules_gtk3
- use gtk2 && gnome2_query_immodules_gtk2
- gnome2_icon_cache_update
- gnome2_schemas_update
-}
diff --git a/app-i18n/ibus/metadata.xml b/app-i18n/ibus/metadata.xml
index 3e5476424e4..0a198f3d160 100644
--- a/app-i18n/ibus/metadata.xml
+++ b/app-i18n/ibus/metadata.xml
@@ -12,7 +12,6 @@
</longdescription>
<use>
<flag name="emoji">Enable support for Emoji</flag>
- <flag name="gconf">Enable support for <pkg>gnome-base/gconf</pkg></flag>
<flag name="gtk2">Enable support for <pkg>x11-libs/gtk+</pkg>:2</flag>
<flag name="unicode">Enable support for Unicode choice</flag>
</use>