diff --git a/.gitignore b/.gitignore index 5826e78..ed422ba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -SOURCES/gobject-introspection-1.56.1.tar.xz -/gobject-introspection-1.56.1.tar.xz +gobject-introspection-1.79.1.tar.xz diff --git a/441.patch b/441.patch new file mode 100644 index 0000000..173f10d --- /dev/null +++ b/441.patch @@ -0,0 +1,86 @@ +From 171f1804dc76dfcc2857e809d49a2290b15612c4 Mon Sep 17 00:00:00 2001 +From: Simon McVittie +Date: Fri, 29 Dec 2023 16:15:10 +0000 +Subject: [PATCH] girepository: Skip GIRepository versions not matching + GIRepository-2.0 + +A few applications such as gnome-music load the GIRepository typelib +and use it to adjust their search paths. + +GLib 2.79.x now provides libgirepository-2.0.so.0 (GIRepository-3.0), +but each OS distribution is likely to have a transitional period during +which GLib's libgirepository-2.0.so.0 has become available, but bindings +like PyGI and gjs are still linked to gobject-introspection's +libgirepository-1.0.so.1 (GIRepository-2.0). + +During this transitional period, interpreted languages that load the +GIRepository namespace could get the "wrong" version, which will result +in adjusting a search path that will not actually affect the language +binding's typelib lookup, and could also lead to symbol and type-system +conflicts. + +We can avoid this collision by making GLib's GIRepository library refuse +to load versions of the GIRepository typelib that are not 3.0, and +similarly making gobject-introspection's GIRepository library refuse to +load typelib versions that are not 2.0. A relatively neat way to achieve +that is to make each version behave as if the other one doesn't exist. + +Signed-off-by: Simon McVittie +--- + girepository/girepository.c | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +diff --git a/girepository/girepository.c b/girepository/girepository.c +index a0754f456..12eaf366f 100644 +--- a/girepository/girepository.c ++++ b/girepository/girepository.c +@@ -54,6 +54,13 @@ + * and the g_irepository_prepend_search_path() calls. + */ + ++/* The namespace and version corresponding to libgirepository itself, so ++ * that we can refuse to load typelibs corresponding to the newer, ++ * incompatible version of this same library in GLib. */ ++#define GIREPOSITORY_TYPELIB_NAME "GIRepository" ++#define GIREPOSITORY_TYPELIB_VERSION "2.0" ++#define GIREPOSITORY_TYPELIB_FILENAME \ ++ GIREPOSITORY_TYPELIB_NAME "-" GIREPOSITORY_TYPELIB_VERSION ".typelib" + + static GIRepository *default_repository = NULL; + static GSList *typelib_search_path = NULL; +@@ -1255,6 +1262,16 @@ find_namespace_version (const gchar *namespace, + GMappedFile *mfile = NULL; + char *fname; + ++ if (g_str_equal (namespace, GIREPOSITORY_TYPELIB_NAME) && ++ !g_str_equal (version, GIREPOSITORY_TYPELIB_VERSION)) ++ { ++ g_debug ("Ignoring %s-%s.typelib because this libgirepository " ++ "corresponds to %s-%s", ++ namespace, version, ++ namespace, GIREPOSITORY_TYPELIB_VERSION); ++ return NULL; ++ } ++ + fname = g_strdup_printf ("%s-%s.typelib", namespace, version); + + for (ldir = search_path; ldir; ldir = ldir->next) +@@ -1406,6 +1423,15 @@ enumerate_namespace_versions (const gchar *namespace, + const char *name_end; + int major, minor; + ++ if (g_str_equal (namespace, GIREPOSITORY_TYPELIB_NAME) && ++ !g_str_equal (entry, GIREPOSITORY_TYPELIB_FILENAME)) ++ { ++ g_debug ("Ignoring %s because this libgirepository " ++ "corresponds to %s", ++ entry, GIREPOSITORY_TYPELIB_FILENAME); ++ continue; ++ } ++ + name_end = strrchr (entry, '.'); + last_dash = strrchr (entry, '-'); + version = g_strndup (last_dash+1, name_end-(last_dash+1)); +-- +GitLab + diff --git a/gating.yaml b/gating.yaml deleted file mode 100644 index ea86f9d..0000000 --- a/gating.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- !Policy -product_versions: - - rhel-8 -decision_context: osci_compose_gate -rules: - - !PassingTestCaseRule {test_case_name: desktop-qe.desktop-ci.tier1-gating.functional} diff --git a/gobject-introspection.spec b/gobject-introspection.spec index e6e7172..6cafda4 100644 --- a/gobject-introspection.spec +++ b/gobject-introspection.spec @@ -1,33 +1,34 @@ -%global glib2_version 2.56.1 - -%global __python %{__python3} +%global glib2_version 2.79.0 Name: gobject-introspection -Version: 1.56.1 -Release: 1%{?dist} +Version: 1.79.1 +Release: 6%{?dist} Summary: Introspection system for GObject-based libraries -License: GPLv2+, LGPLv2+, MIT +License: GPL-2.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause URL: https://wiki.gnome.org/Projects/GObjectIntrospection -Source0: https://download.gnome.org/sources/gobject-introspection/1.56/%{name}-%{version}.tar.xz +Source: https://download.gnome.org/sources/%{name}/1.79/%{name}-%{version}.tar.xz + +# Workaround for Python 3.12 compatibility +# https://bugzilla.redhat.com/show_bug.cgi?id=2208966 +Patch: workaround.patch + +# Backported from upstream +# https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/441 +Patch: 441.patch BuildRequires: bison -BuildRequires: cairo-gobject-devel -BuildRequires: chrpath BuildRequires: flex -BuildRequires: fontconfig-devel -BuildRequires: freetype-devel +BuildRequires: gcc BuildRequires: gettext -BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: gtk-doc -BuildRequires: libffi-devel -BuildRequires: libX11-devel -BuildRequires: libXfixes-devel -BuildRequires: libXft-devel -BuildRequires: libxml2-devel -BuildRequires: mesa-libGL-devel +BuildRequires: meson BuildRequires: python3-devel BuildRequires: python3-mako +BuildRequires: python3-markdown +BuildRequires: pkgconfig(cairo-gobject) +BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} +BuildRequires: pkgconfig(libffi) Requires: glib2%{?_isa} >= %{glib2_version} @@ -44,49 +45,278 @@ Requires: %{name}%{?_isa} = %{version}-%{release} Requires: libtool # For g-ir-doctool Requires: python3-mako +Requires: python3-markdown +# This package only works with the Python version it was built with +# https://bugzilla.redhat.com/show_bug.cgi?id=1691064 +Requires: (python(abi) = %{python3_version} if python3) +# The package uses distutils which is no longer part of Python 3.12+ standard library +# https://bugzilla.redhat.com/show_bug.cgi?id=2135406 +Requires: (python3-setuptools if python3 >= 3.12) %description devel Libraries and headers for gobject-introspection %prep %autosetup -p1 +mv giscanner/ast.py giscanner/gio_ast.py %build -%configure --enable-gtk-doc --enable-doctool --with-python=%{__python3} -%make_build +%meson -Ddoctool=enabled -Dgtk_doc=true -Dpython=%{__python3} +%meson_build %install -%make_install +%meson_install -# Remove lib64 rpaths -chrpath --delete $RPM_BUILD_ROOT%{_bindir}/g-ir-compiler -chrpath --delete $RPM_BUILD_ROOT%{_bindir}/g-ir-generate -chrpath --delete $RPM_BUILD_ROOT%{_bindir}/g-ir-inspect - -# Die libtool, die. -find $RPM_BUILD_ROOT -type f -name "*.la" -print -delete -find $RPM_BUILD_ROOT -type f -name "*.a" -print -delete +%check +%meson_test %files -%license COPYING - -%{_libdir}/lib*.so.* +%doc NEWS README.rst +%license COPYING COPYING.GPL COPYING.LGPL +%{_libdir}/libgirepository-1.0.so.1* %dir %{_libdir}/girepository-1.0 %{_libdir}/girepository-1.0/*.typelib %files devel -%{_libdir}/lib*.so +%{_libdir}/libgirepository-1.0.so %{_libdir}/gobject-introspection/ -%{_libdir}/pkgconfig/* -%{_includedir}/* +%{_libdir}/pkgconfig/gobject-introspection-1.0.pc +%{_libdir}/pkgconfig/gobject-introspection-no-export-1.0.pc +%{_includedir}/gobject-introspection-1.0/ %{_bindir}/g-ir-* -%{_datadir}/gir-1.0 +%dir %{_datadir}/gir-1.0 +%{_datadir}/gir-1.0/*.gir +%{_datadir}/gir-1.0/gir-1.2.rnc %{_datadir}/gobject-introspection-1.0/ %{_datadir}/aclocal/introspection.m4 -%{_mandir}/man1/*.gz +%dir %{_datadir}/gtk-doc +%dir %{_datadir}/gtk-doc/html %{_datadir}/gtk-doc/html/gi/ +%{_mandir}/man1/g-ir-compiler.1* +%{_mandir}/man1/g-ir-doc-tool.1* +%{_mandir}/man1/g-ir-generate.1* +%{_mandir}/man1/g-ir-scanner.1* %changelog +* Tue Oct 29 2024 Troy Dawson - 1.79.1-6 +- Bump release for October 2024 mass rebuild: + Resolves: RHEL-64018 + +* Mon Jun 24 2024 Troy Dawson - 1.79.1-5 +- Bump release for June 2024 mass rebuild + +* Wed Jan 24 2024 Fedora Release Engineering - 1.79.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 1.79.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Jan 11 2024 Kalev Lember - 1.79.1-2 +- Backport a patch to avoid loading mismatching GIRepository versions + +* Thu Jan 11 2024 Kalev Lember - 1.79.1-1 +- Update to 1.79.1 + +* Mon Sep 18 2023 Kalev Lember - 1.78.1-1 +- Update to 1.78.1 + +* Wed Jul 19 2023 Fedora Release Engineering - 1.76.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jun 15 2023 Python Maint - 1.76.1-4 +- Rebuilt for Python 3.12 + +* Fri Jun 09 2023 Tomáš Hrnčiar - 1.76.1-3 +- Add workaround patch for compatibility with Python 3.12 + +* Fri May 19 2023 David King - 1.76.1-2 +- Enable tests during check phase + +* Fri Mar 24 2023 David King - 1.76.1-1 +- Update to 1.76.1 + +* Tue Mar 14 2023 David King - 1.76.0-1 +- Update to 1.76.0 + +* Wed Feb 15 2023 David King - 1.75.6-1 +- Update to 1.75.6 + +* Mon Feb 06 2023 David King - 1.75.4-1 +- Update to 1.75.4 + +* Thu Jan 19 2023 Fedora Release Engineering - 1.74.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Tue Dec 20 2022 Kalev Lember - 1.74.0-2 +- Require python3-distutils for Python 3.12+ support (#2135406) + +* Mon Sep 19 2022 Kalev Lember - 1.74.0-1 +- Update to 1.74.0 + +* Tue Sep 06 2022 Kalev Lember - 1.73.1-1 +- Update to 1.73.1 + +* Thu Jul 21 2022 Fedora Release Engineering - 1.73.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Jul 15 2022 Kalev Lember - 1.73.0-1 +- Update to 1.73.0 + +* Mon Jun 13 2022 Python Maint - 1.72.0-2 +- Rebuilt for Python 3.11 + +* Fri Mar 18 2022 David King - 1.72.0-1 +- Update to 1.72.0 + +* Mon Feb 14 2022 David King - 1.71.0-1 +- Update to 1.71.0 + +* Thu Jan 20 2022 Fedora Release Engineering - 1.70.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Sat Jan 08 2022 Miro Hrončok - 1.70.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Changes/LIBFFI34 + +* Sat Sep 18 2021 Kalev Lember - 1.70.0-1 +- Update to 1.70.0 + +* Tue Aug 24 2021 Kalev Lember - 1.69.0-1 +- Update to 1.69.0 +- Tighten soname globs + +* Thu Jul 22 2021 Fedora Release Engineering - 1.68.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon Jun 28 2021 David King - 1.68.0-5 +- Add Requires on python-markdown for g-ir-doc-tool +- Add license texts and documentation files + +* Thu Jun 03 2021 Python Maint - 1.68.0-4 +- Rebuilt for Python 3.10 + +* Wed Apr 28 2021 David King - 1.68.0-3 +- Fix the license field (#1915340) + +* Mon Apr 26 2021 Kalev Lember - 1.68.0-2 +- Fix graphene instrospection build on i686 + +* Mon Mar 22 2021 Kalev Lember - 1.68.0-1 +- Update to 1.68.0 + +* Mon Mar 15 2021 Kalev Lember - 1.67.1-1 +- Update to 1.67.1 + +* Tue Jan 26 2021 Fedora Release Engineering - 1.66.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Nov 04 2020 Kalev Lember - 1.66.1-2 +- Backport an upstream MR to fix the build with Python 3.10 (#1893194) + +* Mon Oct 5 2020 Kalev Lember - 1.66.1-1 +- Update to 1.66.1 + +* Sat Sep 12 2020 Kalev Lember - 1.66.0-1 +- Update to 1.66.0 + +* Wed Sep 09 2020 Than Ngo - 1.64.1-5 +- Rebuild + +* Sat Aug 01 2020 Fedora Release Engineering - 1.64.1-4 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 1.64.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri May 22 2020 Miro Hrončok - 1.64.1-2 +- Rebuilt for Python 3.9 + +* Sun Apr 05 2020 Kalev Lember - 1.64.1-1 +- Update to 1.64.1 + +* Thu Mar 26 2020 Kalev Lember - 1.64.0-2 +- Fix the build with Python 3.9 (#1817649) + +* Sat Mar 07 2020 Kalev Lember - 1.64.0-1 +- Update to 1.64.0 + +* Tue Jan 28 2020 Fedora Release Engineering - 1.63.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Jan 17 2020 Kalev Lember - 1.63.2-1 +- Update to 1.63.2 + +* Thu Jan 16 2020 Kalev Lember - 1.63.1-1 +- Update to 1.63.1 + +* Mon Sep 09 2019 Kalev Lember - 1.62.0-1 +- Update to 1.62.0 + +* Mon Aug 19 2019 Kalev Lember - 1.61.2-1 +- Update to 1.61.2 + +* Thu Aug 15 2019 Miro Hrončok - 1.61.1-2 +- Rebuilt for Python 3.8 + +* Mon Aug 12 2019 Kalev Lember - 1.61.1-1 +- Update to 1.61.1 + +* Thu Jul 25 2019 Fedora Release Engineering - 1.60.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue May 07 2019 Miro Hrončok - 1.60.1-3 +- Require the Python version this was built with + +* Tue Apr 16 2019 Adam Williamson - 1.60.1-2 +- Rebuild with Meson fix for #1699099 + +* Mon Apr 08 2019 Kalev Lember - 1.60.1-1 +- Update to 1.60.1 + +* Mon Mar 11 2019 Kalev Lember - 1.60.0-1 +- Update to 1.60.0 + +* Mon Mar 04 2019 Kalev Lember - 1.59.5-1 +- Update to 1.59.5 + +* Mon Feb 04 2019 Kalev Lember - 1.59.4-1 +- Update to 1.59.4 + +* Thu Jan 31 2019 Fedora Release Engineering - 1.59.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Tue Jan 08 2019 Kalev Lember - 1.59.3-1 +- Update to 1.59.3 + +* Sat Jan 05 2019 Kalev Lember - 1.59.2-1 +- Update to 1.59.2 +- Switch to the meson build system +- Fix gtk-doc directory ownership + +* Sun Dec 30 2018 Kalev Lember - 1.58.3-1 +- Update to 1.58.3 + +* Mon Dec 10 2018 Kalev Lember - 1.58.2-1 +- Update to 1.58.2 + +* Sat Nov 17 2018 Kalev Lember - 1.58.1-1 +- Update to 1.58.1 + +* Fri Sep 07 2018 Kalev Lember - 1.58.0-2 +- Rebuilt against fixed atk (#1626575) + +* Thu Sep 06 2018 Kalev Lember - 1.58.0-1 +- Update to 1.58.0 + +* Sun Aug 12 2018 Kalev Lember - 1.57.2-1 +- Update to 1.57.2 + +* Fri Jul 13 2018 Fedora Release Engineering - 1.56.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 1.56.1-2 +- Rebuilt for Python 3.7 + * Mon Apr 09 2018 Kalev Lember - 1.56.1-1 - Update to 1.56.1 diff --git a/sources b/sources index eba3770..bb176b8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gobject-introspection-1.56.1.tar.xz) = 2bfcd45b8c5ad68a3f6550c2f80a6804db0e1a72ffaf4fdd3cec3d8acc23e79ad14bb5bf612fe26fc896691839ab19ca8dd1c9994db14d730e56fa79df9d973d +SHA512 (gobject-introspection-1.79.1.tar.xz) = 9f425c186266ed9c97a1cf14be5cc66afbed7d31370310ccafd3d4fa9542deae83ea20b216dc6153bd3920f6fcbe635df880ac25cf14f9cc16055a95ac4c150b diff --git a/workaround.patch b/workaround.patch new file mode 100644 index 0000000..5bb9896 --- /dev/null +++ b/workaround.patch @@ -0,0 +1,24 @@ +diff -rU3 gobject-introspection-1.76.1-orig/giscanner/__init__.py gobject-introspection-1.76.1/giscanner/__init__.py +--- gobject-introspection-1.76.1-orig/giscanner/__init__.py 2023-03-22 23:43:34.000000000 +0100 ++++ gobject-introspection-1.76.1/giscanner/__init__.py 2023-06-07 11:50:00.217226422 +0200 +@@ -25,3 +25,8 @@ + from ._version import __version__ + except ImportError: + __version__ = '0.0.0' ++ ++from . import gio_ast as ast ++ ++import sys ++sys.modules['giscanner.ast'] = ast +diff -rU3 gobject-introspection-1.76.1-orig/giscanner/meson.build gobject-introspection-1.76.1/giscanner/meson.build +--- gobject-introspection-1.76.1-orig/giscanner/meson.build 2023-03-22 23:43:34.000000000 +0100 ++++ gobject-introspection-1.76.1/giscanner/meson.build 2023-06-07 11:48:32.922732028 +0200 +@@ -2,7 +2,7 @@ + '__init__.py', + 'annotationmain.py', + 'annotationparser.py', +- 'ast.py', ++ 'gio_ast.py', + 'cachestore.py', + 'ccompiler.py', + 'codegen.py',