Package: release.debian.org Severity: normal Tags: buster User: release.debian....@packages.debian.org Usertags: pu X-Debbugs-CC: debian-input-met...@lists.debian.org
Dear Release team, Current fcitx v4.2.9.6 in Debian 10 has a broken implementation to flatpak support. As a result, software installed via flatpak cannot enable fcitx as the active input method. The corresponding Debian bug report is at https://bugs.debian.org/980268 . This bug is fixed by fcitx upstream in v4.2.9.7. I cherry-picked this upstream commit and prepared this buster-pu upload here. The full debdiff is provided in the attachment. Thanks, Boyuan Yang
diff -Nru fcitx-4.2.9.6/debian/changelog fcitx-4.2.9.6/debian/changelog --- fcitx-4.2.9.6/debian/changelog 2018-08-30 14:54:54.000000000 -0400 +++ fcitx-4.2.9.6/debian/changelog 2021-01-22 17:45:45.000000000 -0500 @@ -1,3 +1,11 @@ +fcitx (1:4.2.9.6-5+deb10u1) buster; urgency=medium + + * debian/patches/0009-ipcportal: Add patch to fix broken input + method support with software installed via flatpak. + (Closes: #980834) + + -- Boyuan Yang <by...@debian.org> Fri, 22 Jan 2021 17:45:45 -0500 + fcitx (1:4.2.9.6-5) unstable; urgency=medium * Team upload. diff -Nru fcitx-4.2.9.6/debian/patches/0009-ipcportal-use-org-freedesktop-portal-as-dbus-path-fo.patch fcitx-4.2.9.6/debian/patches/0009-ipcportal-use-org-freedesktop-portal-as-dbus-path-fo.patch --- fcitx-4.2.9.6/debian/patches/0009-ipcportal-use-org-freedesktop-portal-as-dbus-path-fo.patch 1969-12-31 19:00:00.000000000 -0500 +++ fcitx-4.2.9.6/debian/patches/0009-ipcportal-use-org-freedesktop-portal-as-dbus-path-fo.patch 2021-01-22 17:45:45.000000000 -0500 @@ -0,0 +1,114 @@ +From 1f4c3a96cb2d1308581864676dd86ea6aa393ccb Mon Sep 17 00:00:00 2001 +From: Weng Xuetian <wen...@gmail.com> +Date: Sat, 2 Nov 2019 22:02:54 -0700 +Subject: [PATCH] [ipcportal] use /org/freedesktop/portal as dbus path for + portal. + +Applied-Upstream: https://github.com/fcitx/fcitx/commit/1f4c3a96cb2d1308581864676dd86ea6aa393ccb +Bug-Debian: https://bugs.debian.org/980834 +--- + src/frontend/ipcportal/ipcportal.c | 8 ++++---- + src/frontend/ipcportal/ipcportal.h | 9 +++++---- + src/frontend/qt/fcitxinputcontextproxy.cpp | 2 +- + src/lib/fcitx-gclient/fcitxclient.c | 2 +- + 4 files changed, 11 insertions(+), 10 deletions(-) + +diff --git a/src/frontend/ipcportal/ipcportal.c b/src/frontend/ipcportal/ipcportal.c +index bed18299..14cd617c 100644 +--- a/src/frontend/ipcportal/ipcportal.c ++++ b/src/frontend/ipcportal/ipcportal.c +@@ -49,7 +49,7 @@ typedef struct _FcitxLastSentIMInfo + typedef struct _FcitxPortalIC { + int id; + char* sender; +- char path[32]; ++ char path[64]; + uuid_t uuid; + int width; + int height; +@@ -234,7 +234,7 @@ void* PortalCreate(FcitxInstance* instance, int frontendid) + } + + DBusObjectPathVTable fcitxPortalVTable = {NULL, &PortalDBusEventHandler, NULL, NULL, NULL, NULL }; +- dbus_connection_register_object_path(ipc->_conn, FCITX_IM_DBUS_PATH, &fcitxPortalVTable, ipc); ++ dbus_connection_register_object_path(ipc->_conn, FCITX_IM_DBUS_PORTAL_PATH, &fcitxPortalVTable, ipc); + dbus_connection_flush(ipc->_conn); + + FcitxIMEventHook hook; +@@ -266,7 +266,7 @@ void PortalCreateIC(void* arg, FcitxInputContext* context, void* priv) + ipcic->sender = strdup(dbus_message_get_sender(message)); + ipc->maxid ++; + ipcic->lastPreeditIsEmpty = false; +- sprintf(ipcic->path, "/inputcontext/%d", ipcic->id); ++ sprintf(ipcic->path, FCITX_IC_DBUS_PORTAL_PATH, ipcic->id); + uuid_generate(ipcic->uuid); + + int icpid = 0; +@@ -420,7 +420,7 @@ static DBusHandlerResult PortalICDBusEventHandler(DBusConnection *connection, DB + { + FcitxPortalFrontend* ipc = (FcitxPortalFrontend*) user_data; + int id = -1; +- sscanf(dbus_message_get_path(msg), "/inputcontext/%d", &id); ++ sscanf(dbus_message_get_path(msg), FCITX_IC_DBUS_PORTAL_PATH, &id); + FcitxInputContext* ic = FcitxInstanceFindIC(ipc->owner, ipc->frontendid, &id); + DBusHandlerResult result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + DBusMessage *reply = NULL; +diff --git a/src/frontend/ipcportal/ipcportal.h b/src/frontend/ipcportal/ipcportal.h +index 17e24138..07d1f6c4 100644 +--- a/src/frontend/ipcportal/ipcportal.h ++++ b/src/frontend/ipcportal/ipcportal.h +@@ -17,14 +17,15 @@ + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +-#ifndef FCITX_IPC_H +-#define FCITX_IPC_H ++#ifndef FCITX_IPC_PORTAL_H ++#define FCITX_IPC_PORTAL_H + + #ifdef __cplusplus + extern "C" { + #endif + +-#define FCITX_IM_DBUS_PATH "/inputmethod" ++#define FCITX_IM_DBUS_PORTAL_PATH "/org/freedesktop/portal/inputmethod" ++#define FCITX_IC_DBUS_PORTAL_PATH "/org/freedesktop/portal/inputcontext/%d" + + #define FCITX_PORTAL_SERVICE "org.freedesktop.portal.Fcitx" + #define FCITX_IM_DBUS_INTERFACE "org.fcitx.Fcitx.InputMethod1" +@@ -34,5 +35,5 @@ extern "C" { + } + #endif + +-#endif // FCITX_IPC_H ++#endif // FCITX_IPC_PORTAL_H + // kate: indent-mode cstyle; space-indent on; indent-width 0; +diff --git a/src/frontend/qt/fcitxinputcontextproxy.cpp b/src/frontend/qt/fcitxinputcontextproxy.cpp +index 0f7c5dfd..a418e81d 100644 +--- a/src/frontend/qt/fcitxinputcontextproxy.cpp ++++ b/src/frontend/qt/fcitxinputcontextproxy.cpp +@@ -116,7 +116,7 @@ void FcitxInputContextProxy::createInputContext() { + QFileInfo info(QCoreApplication::applicationFilePath()); + if (service == "org.freedesktop.portal.Fcitx") { + m_portal = true; +- m_im1proxy = new org::fcitx::Fcitx::InputMethod1(owner, "/inputmethod", ++ m_im1proxy = new org::fcitx::Fcitx::InputMethod1(owner, "/org/freedesktop/portal/inputmethod", + connection, this); + FcitxInputContextArgumentList list; + FcitxInputContextArgument arg; +diff --git a/src/lib/fcitx-gclient/fcitxclient.c b/src/lib/fcitx-gclient/fcitxclient.c +index 65916d3d..e7f89a63 100644 +--- a/src/lib/fcitx-gclient/fcitxclient.c ++++ b/src/lib/fcitx-gclient/fcitxclient.c +@@ -669,7 +669,7 @@ static void _fcitx_client_create_ic_portal(FcitxClient *self) { + fcitx_connection_get_g_dbus_connection(self->priv->connection), + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, + _fcitx_client_get_portal_interface_info(), +- "org.freedesktop.portal.Fcitx", "/inputmethod", ++ "org.freedesktop.portal.Fcitx", "/org/freedesktop/portal/inputmethod", + "org.fcitx.Fcitx.InputMethod1", self->priv->cancellable, + _fcitx_client_create_ic_portal_phase1_finished, self); + } +-- +2.30.0 + diff -Nru fcitx-4.2.9.6/debian/patches/series fcitx-4.2.9.6/debian/patches/series --- fcitx-4.2.9.6/debian/patches/series 2018-08-30 14:54:54.000000000 -0400 +++ fcitx-4.2.9.6/debian/patches/series 2021-01-22 16:50:38.000000000 -0500 @@ -5,3 +5,4 @@ 0006-misc-fix-fall-through-warning.patch 0007-xkb-use-iso-codes-json-file-to-parse-the-iso-codes-d.patch 0008-keyboard-iso-code-root-should-be-639-3.patch +0009-ipcportal-use-org-freedesktop-portal-as-dbus-path-fo.patch
signature.asc
Description: This is a digitally signed message part