GNOME Bugzilla – Bug 777317
Make libmutter and friends parallel installable
Last modified: 2017-02-14 03:23:56 UTC
The libmutter API is very X11 centric, and in my opinion, it wouldn't hurt with a proper cleanup; such as merging MetaDisplay and MetaScreen, stop using integers to refer to monitors (which in fact are not really monitors), remove incompatible API, move X11 specific things behind an X11 layer, and many other things etc. Doing this however is very problematic with how things work now. The thing is that libmutter is used by not only gnome-shell, and I believe that without doubt, it makes sense to continue making that possible. Thus I'm proposing to make libmutter (and libmutter-clutter,cogl,...) parallel installable. I'm attaching two patches, one for mutter and one for gnome-shell. The gnome-shell one simply changes gnome-shell to use the new libraries. The mutter patch does the following changes, more or less: Name the mutter library 'libmutter-$APIVERSION.so' Name the clutter library 'libmutter-clutter-$APIVERSION.so' Name the cogl library 'libmutter-cogl-$APIVERSION.so' Name the cogl-path library 'libmutter-cogl-path-$APIVERSION.so' Name the cogl-pango library 'libmutter-cogl-pango-$APIVERSION.so' Rename all of the pkg-config files in the same way. where in this patch $APIVERSION is '0'. The "module version" of all of these is changed to whatever version mutter is, i.e. the new mutter-clutter-0.pc will have the module version "3.23.3".
Created attachment 343545 [details] [review] Make libmutter and friends parallel installable In order to minimize the amount of breakage, while at the same time making it easier to make backward incompatible changes needed to continue turning libmutter into a capable Wayland compositor, make the libmutter and friends (libmutter-clutter, libmutter-cogl*) parallel installable by adding a version number to the name. This changes various filenames, for example what previously was libmutter.so is now libmutter-0.so (assuming the version for now is 0), and libmutter-clutter-1.0.so is now libmutter-clutter-0.so. The pkg-config filenames and GObject introspection has been renamed to reflect this as well. This enables a downstream compositor rely on a specific version of the libmutter API, while gracefully handling API/ABI changes by having to update to the new version at their own pace.
Created attachment 343546 [details] [review] Use the versioned libmutter*.so versions Mutter now provides versioned libraries and pkg-config files, meaning an application using libmutter and friends need to depend on a specific version of the API.
Review of attachment 343546 [details] [review]: ::: js/ui/environment.js @@ +1,3 @@ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- +imports.gi.versions.Clutter = '0'; This version could be added to js/misc/config.js.in where we can replace it with the value from autoconf
Created attachment 343851 [details] [review] Use the versioned libmutter*.so versions Mutter now provides versioned libraries and pkg-config files, meaning an application using libmutter and friends need to depend on a specific version of the API.
I don't have a strong opinion about this in principle. If you think it's useful for other projects (and perhaps even to us in the future), looks good to me.
Comment on attachment 343545 [details] [review] Make libmutter and friends parallel installable Got an ack from fmuellner on IRC, so pushing this now. Attachment 343545 [details] pushed as 4ebc55f - Make libmutter and friends parallel installable
Attachment 343851 [details] pushed as a46ea3f - Use the versioned libmutter*.so versions