GObject based C libraries often provide bindings for other languages based on GObject Introspection / GIR. Some packages ship those introspection files with the main library. Some split them off OpenSUSE-style into typelib-foo-1.0 subpackages. Some projects also provide language-specific enhancements overrides to those introspection-based bindings.
There are no Guidelines for how to split those things into multiple subpackages, if at all:
This package may be a good example: signon-glib
BTW, I'm not saying that this is the correct way to do things. But it's the best solution I came up with at the time.
I initially split off python3 overrides into a separate package (python3-signon) because using those also pulls in python3-gobject unconditionally, which might not be desirable when using the plain C library. Other packages I have looked at ship it with the main library, sometÃmes adding the Requires on python3-gobject, sometimes not.
I suggest the following new guidelines:
Where language-specific overrides / enhancements for those introspection-based bindings should go I am not sure. For python3, a separate subpackage with the appropriate Requires: python3-gobject and Requires: main-library = %{version}-%{release} seems like a good idea, but including it with the main library subpackage should be fine too.
Requires: python3-gobject
Requires: main-library = %{version}-%{release}
Thoughts?
Why do we still lack dependency generators for this? Both Mageia and openSUSE generate typelib() dependencies so that dependencies are correctly matched.
typelib()
The main reason for wanting to subpackage out the typelib files is to avoid requiring gobject-introspection as a runtime dependency for the main library packages when they're unneeded (since the g-i repository paths are in that package).
gobject-introspection
+1 from me. This is exactly how we've been doing this in GNOME packaging in Fedora and codifies the status quo.
Should the guidelines also mention how to package the directories? In the signon-glib example above it leaves behind unowned:
%{_libdir}/girepository-1.0 %{_datadir}/gir-1.0 %{_datadir}/vala %{_datadir}/vala/vapi
directories. These should also be owned by the package that installs files in there (or alternatively we could make filesystem own them).
Why wouldn't we have -filesystem packages for those?
-filesystem
Should the guidelines also mention how to package the directories? In the signon-glib example above it leaves behind unowned: %{_libdir}/girepository-1.0 %{_datadir}/gir-1.0 %{_datadir}/vala %{_datadir}/vala/vapi directories. These should also be owned by the package that installs files in there (or alternatively we could make filesystem own them).
You are right. I thought they were owned by glib2-devel or gobject-introspection-devel, because that would make the most sense, instead of all packages owning them.
I think I'd prefer it if we kept the convention of having the python3-library as a separate subpackage, irrespective of whether it contains overrides. Here's my reasoning:
Requires: python3-foo
Login to comment on this ticket.