Bug#1118496: eom: not compatible with pygobject >= 3.52
Package: eom
Version: 1.26.1-1
Severity: important
Tags: patch upstream
X-Debbugs-Cc: pygobject@packages.debian.org
Control: block 1118363 by -1
pygobject >= 3.52 (available in experimental) has switched from
libgirepository-1.0 to libgirepository-2.0 as its way to access GObject
libraries such as GTK.
libgirepository-1.0 and libgirepository-2.0 can be installed on the same
system, but they cannot both be used within the same process, because
they both register a GObject type named "GIRepository". This means that
pygobject, libpeas, and apps like eom all need to agree on which version
they are going to use.
As a result we need to do a coordinated transition from:
pygobject 3.50.x
older libpeas
older pygobject-dependent apps
to:
pygobject >= 3.52
libpeas >= 1.36.0-6~
newer pygobject-dependent apps
The symptom is that if you start eom on a system that has the versions of
pygobject and libpeas from experimental:
sudo apt install libgirepository-2.0-0 eom
sudo apt install python3-gi{,-cairo}/experimental libpeas-1.0-0/experimental gir1.2-peas-1.0/experimental
eom
it won't start, with messages similar to those below:
>(eom:14104): EOM-WARNING **: 12:13:03.157: Error loading Peas typelib: Typelib file for namespace 'GIRepository', version '3.0' not found
>(eom:14104): EOM-WARNING **: 12:13:03.167: Error loading PeasGtk typelib: Typelib file for namespace 'GIRepository', version '3.0' not found
>(eom:14104): GLib-GObject-CRITICAL **: 12:13:03.168: cannot register existing type 'GIRepository'
>(eom:14104): GLib-CRITICAL **: 12:13:03.168: g_once_init_leave_pointer: assertion 'result != 0' failed
>(eom:14104): GLib-GObject-CRITICAL **: 12:13:03.168: g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed
>(eom:14104): GLib-GObject-CRITICAL **: 12:13:03.168: g_object_add_weak_pointer: assertion 'G_IS_OBJECT (object)' failed
>(eom:14104): GLib-CRITICAL **: 12:13:03.168: g_once_init_leave: assertion 'result != 0' failed
>(eom:14104): GLib-GObject-CRITICAL **: 12:13:03.168: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
For GNOME apps, a similar issue is fixed in the latest experimental
uploads of eog, gedit, rhythmbox and totem, but now we need to do the
same for non-GNOME apps as well.
To resolve this in experimental, please apply the attached patches and
upload to experimental (or the GNOME team can NMU this for you if
required, please let us know). Do not upload to unstable at this stage:
it will not work.
For your convenience the patches are also available from:
git fetch https://salsa.debian.org/smcv/eom.git wip/smcv/libgirepository-2.0
and I will update that location with the bug number when I receive it.
I'd have sent a merge request, but they are not currently enabled for
this package's git repo.
After we get a transition slot from the release team, we will need to
include eom in a coordinated upload to unstable of pygobject, libpeas
and several affected apps. Again, this can either be a maintainer upload
or an NMU.
(The patch to the upstream source was taken from Fedora, which has
already done the equivalent of this transition; thanks to Leigh Scott.)
Thanks,
smcv
>From 56ff2e0503c641928347d03da89f01c318b5b5fe Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@debian.org>
Date: Mon, 20 Oct 2025 23:40:38 +0100
Subject: [PATCH 1/2] Build with a libpeas that uses libgirepository-2.0
Add patch from Fedora to enable that.
Helps: #1099164, #1118363
Closes: #-1
---
debian/control | 2 +-
.../1001-Rebuild-for-libpeas1-changes.patch | 86 +++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 88 insertions(+), 1 deletion(-)
create mode 100644 debian/patches/1001-Rebuild-for-libpeas1-changes.patch
create mode 100644 debian/patches/series
diff --git a/debian/control b/debian/control
index 45b43a7..d5b825a 100644
--- a/debian/control
+++ b/debian/control
@@ -26,7 +26,7 @@ Build-Depends: autoconf-archive,
libjpeg-dev,
liblcms2-dev,
libmate-desktop-dev (>= 1.18),
- libpeas-dev,
+ libpeas-dev (>= 1.36.0-6~),
librsvg2-dev (>= 2.36.2),
libstartup-notification0-dev,
libxml2-dev,
diff --git a/debian/patches/1001-Rebuild-for-libpeas1-changes.patch b/debian/patches/1001-Rebuild-for-libpeas1-changes.patch
new file mode 100644
index 0000000..35fbba6
--- /dev/null
+++ b/debian/patches/1001-Rebuild-for-libpeas1-changes.patch
@@ -0,0 +1,86 @@
+From: Leigh Scott <leigh123linux@gmail.com>
+Date: Wed, 10 Sep 2025 14:21:43 +0100
+Subject: Rebuild for libpeas1 changes
+
+Recent libpeas versions add patches from the (as yet unreleased) 1.38
+upstream branch to make it compatible with pygobject >= 3.52, by using
+libgirepository-2.0 instead of libgirepository-1.0. Do similarly here.
+
+This leaks some references to the global singleton GIRepository
+instance, but that should be harmless since it's a global singleton.
+
+[smcv: Added commit message]
+
+Origin: vendor, Fedora, https://src.fedoraproject.org/rpms/eom/c/84b45dc6302f378926be390d39a7cca3ec4f26ea?branch=rawhide
+Bug-Debian: https://bugs.debian.org/1099164
+Bug-Debian: https://bugs.debian.org/1118363
+---
+ src/eom-plugin-engine.c | 8 ++++----
+ src/main.c | 4 ++--
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/eom-plugin-engine.c b/src/eom-plugin-engine.c
+index dc434f2..19d1988 100644
+--- a/src/eom-plugin-engine.c
++++ b/src/eom-plugin-engine.c
+@@ -34,7 +34,7 @@
+ #include <glib/gi18n.h>
+ #include <glib.h>
+ #include <gio/gio.h>
+-#include <girepository.h>
++#include <girepository/girepository.h>
+
+ #define USER_EOM_PLUGINS_LOCATION "plugins/"
+
+@@ -87,7 +87,7 @@ eom_plugin_engine_new (void)
+ private_path = g_build_filename (LIBDIR, "girepository-1.0", NULL);
+
+ /* This should be moved to libpeas */
+- if (g_irepository_require (g_irepository_get_default (),
++ if (gi_repository_require (gi_repository_dup_default (),
+ "Peas", "1.0", 0, &error) == NULL)
+ {
+ g_warning ("Error loading Peas typelib: %s\n",
+@@ -95,7 +95,7 @@ eom_plugin_engine_new (void)
+ g_clear_error (&error);
+ }
+
+- if (g_irepository_require (g_irepository_get_default (),
++ if (gi_repository_require (gi_repository_dup_default (),
+ "PeasGtk", "1.0", 0, &error) == NULL)
+ {
+ g_warning ("Error loading PeasGtk typelib: %s\n",
+@@ -103,7 +103,7 @@ eom_plugin_engine_new (void)
+ g_clear_error (&error);
+ }
+
+- if (g_irepository_require_private (g_irepository_get_default (),
++ if (gi_repository_require_private (gi_repository_dup_default (),
+ private_path, "Eom", "1.0", 0,
+ &error) == NULL)
+ {
+diff --git a/src/main.c b/src/main.c
+index 5f0806c..cb24122 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -27,7 +27,7 @@
+ #include "config.h"
+ #endif
+ #ifdef HAVE_INTROSPECTION
+-#include <girepository.h>
++#include <girepository/girepository.h>
+ #endif
+
+ #include "eom-session.h"
+@@ -111,7 +111,7 @@ main (int argc, char **argv)
+ * Using gtk_get_option_group here initializes gtk during parsing */
+ g_option_context_add_group (ctx, gtk_get_option_group (TRUE));
+ #ifdef HAVE_INTROSPECTION
+- g_option_context_add_group (ctx, g_irepository_get_option_group ());
++ g_option_context_add_group (ctx, gi_repository_get_option_group ());
+ #endif
+
+ if (!g_option_context_parse (ctx, &argc, &argv, &error)) {
+--
+2.51.0
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..e7e6022
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+1001-Rebuild-for-libpeas1-changes.patch
--
2.51.0
>From 60bf3d9ff40c5a59a7a2deeafc814f02154a725b Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@debian.org>
Date: Mon, 20 Oct 2025 23:41:54 +0100
Subject: [PATCH 2/2] Update changelog
---
debian/changelog | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index cbdcff0..40d632c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+eom (1.26.1-1.1) UNRELEASED; urgency=medium
+
+ * d/control: Build with a libpeas that uses libgirepository-2.0.
+ - d/p/1001-Rebuild-for-libpeas1-changes.patch:
+ Add patch from Fedora to enable that.
+ (Helps: #1099164, #1118363) (Closes: #-1)
+
+ -- Simon McVittie <smcv@debian.org> Mon, 20 Oct 2025 23:40:46 +0100
+
eom (1.26.1-1) unstable; urgency=medium
* New upstream release.
--
2.51.0
Reply to: