public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ibus] autotool: Revert "Revert GDM relative patch"
@ 2026-05-31  2:09 Takao Fujiwara
  0 siblings, 0 replies; only message in thread
From: Takao Fujiwara @ 2026-05-31  2:09 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/ibus
            Branch : autotool
            Commit : 7ef78b8105818dad2810b4cda61b91b6558b495e
            Author : Takao Fujiwara <tfujiwar@redhat.com>
            Date   : 2025-10-16T13:54:40+09:00
            Stats  : +127/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/ibus/c/7ef78b8105818dad2810b4cda61b91b6558b495e?branch=autotool

            Log:
            Revert "Revert GDM relative patch"

This reverts the patch in commit 2fd52dbb59914c92fe57f5434914c1b587077462.

---
diff --git a/ibus-HEAD.patch b/ibus-HEAD.patch
index 2715ed0..6767a68 100644
--- a/ibus-HEAD.patch
+++ b/ibus-HEAD.patch
@@ -120,3 +120,130 @@ index ad4f1929..b353a654 100644
 -- 
 2.51.0
 
+From 4a45bf155c968bcc2f711d6b4827788802de18d1 Mon Sep 17 00:00:00 2001
+From: Joan Torres Lopez <joantolo@redhat.com>
+Date: Sun, 5 Oct 2025 10:39:50 +0900
+Subject: [PATCH] bus: Update gdm bits based on new gdm changes
+
+Since GDM 49 version, gdm user doesn't exist and for each greeter
+there's a dynamic user creation, e.g. gdm-greeter-1, gdm-greeter-2.
+All of them are part of gdm group, so instead of checking for a specific
+user, we check for a specific group.
+
+Also, remove Conflicts in systemd service to allow ibus in GDM sessions.
+This covers some cases where users might have special characters in their
+password or username.
+
+BUG=https://gitlab.gnome.org/GNOME/gdm/-/issues/1018
+BUG=https://github.com/ibus/ibus/pull/2804
+---
+ bus/main.c                                    | 33 ++++++++++++++++++-
+ ....freedesktop.IBus.session.GNOME.service.in |  3 --
+ configure.ac                                  |  2 +-
+ 3 files changed, 33 insertions(+), 5 deletions(-)
+
+diff --git a/bus/main.c b/bus/main.c
+index 63ec5536..e0db15b3 100644
+--- a/bus/main.c
++++ b/bus/main.c
+@@ -39,6 +39,7 @@
+ 
+ #ifdef G_OS_UNIX
+ #include <glib-unix.h>
++#include <grp.h>
+ #endif
+ 
+ #include "global.h"
+@@ -56,10 +57,12 @@ static gchar *config = "default";
+ static gchar *desktop = "gnome";
+ 
+ static gchar *panel_extension_disable_users[] = {
+-    "gdm",
+     "gnome-initial-setup",
+     "liveuser"
+ };
++static gchar *panel_extension_disable_groups[] = {
++    "gdm",
++};
+ 
+ static void
+ show_version_and_quit (void)
+@@ -184,6 +187,11 @@ main (gint argc, gchar **argv)
+ {
+     int i;
+     const gchar *username = ibus_get_user_name ();
++    const gchar *groupname = NULL;
++#ifdef HAVE_GETGRGID_R
++    char buffer[4096];
++    struct group gbuf;
++#endif
+ 
+     setlocale (LC_ALL, "");
+ 
+@@ -216,6 +224,23 @@ main (gint argc, gchar **argv)
+         }
+     }
+ 
++    /* get group name */
++    {
++        struct group *grp = NULL;
++#ifdef HAVE_GETGRGID_R
++        /* MT-Safe locale */
++        getgrgid_r (getgid (), &gbuf, buffer, sizeof(buffer), &grp);
++#else
++        /* MT-Unsafe race:grgid locale */
++        grp = getgrgid (getgid ());
++#endif
++
++        if (grp && grp->gr_name && grp->gr_name[0])
++            groupname = grp->gr_name;
++        else
++            g_warning ("Couldn't get group name");
++    }
++
+     /* daemonize process */
+     if (daemonize) {
+         if (daemon (1, 0) != 0) {
+@@ -259,6 +284,12 @@ main (gint argc, gchar **argv)
+             break;
+         }
+     }
++    for (i = 0; i < G_N_ELEMENTS(panel_extension_disable_groups); i++) {
++        if (g_strcmp0 (groupname, panel_extension_disable_groups[i]) == 0) {
++            emoji_extension = "disable";
++            break;
++        }
++    }
+     if (!single) {
+         /* execute config component */
+         if (g_strcmp0 (config, "default") == 0) {
+diff --git a/bus/services/org.freedesktop.IBus.session.GNOME.service.in b/bus/services/org.freedesktop.IBus.session.GNOME.service.in
+index 858cf10d..f0debb37 100644
+--- a/bus/services/org.freedesktop.IBus.session.GNOME.service.in
++++ b/bus/services/org.freedesktop.IBus.session.GNOME.service.in
+@@ -12,9 +12,6 @@ Before=gnome-session.target
+ After=gnome-session-initialized.target
+ PartOf=gnome-session-initialized.target
+ 
+-# Never run in GDM
+-Conflicts=gnome-session@gnome-login.target
+-
+ [Service]
+ Type=dbus
+ # Only pull --xim in X11 session, it is done via Xwayland-session.d on Wayland
+diff --git a/configure.ac b/configure.ac
+index a9396d7e..fc32398c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -178,7 +178,7 @@ AC_MSG_RESULT([$enable_product_build])
+ AC_CHECK_HEADERS([sys/prctl.h])
+ 
+ # Check functions.
+-AC_CHECK_FUNCS(daemon)
++AC_CHECK_FUNCS(daemon getgrgid_r)
+ 
+ # Check dlclose() in libc.so.
+ AC_CHECK_LIB(c, dlclose, LIBDL="", [AC_CHECK_LIB(dl, dlclose, LIBDL="-ldl")])
+-- 
+2.51.0
+

diff --git a/ibus.spec b/ibus.spec
index a522ac3..8ff7dda 100644
--- a/ibus.spec
+++ b/ibus.spec
@@ -72,7 +72,6 @@ Source1:        https://github.com/ibus/%name/releases/download/%{source_version
 Source2:        %{name}-xinput
 Source3:        %{name}.conf.5
 # Patch0:         %%{name}-HEAD.patch
-Patch0:         %{name}-HEAD.patch
 # Under testing #1349148 #1385349 #1350291 #1406699 #1432252 #1601577
 Patch1:         %{name}-1385349-segv-bus-proxy.patch
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-31  2:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-31  2:09 [rpms/ibus] autotool: Revert "Revert GDM relative patch" Takao Fujiwara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox