After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 777317 - Make libmutter and friends parallel installable
Make libmutter and friends parallel installable
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2017-01-16 11:56 UTC by Jonas Ådahl
Modified: 2017-02-14 03:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Make libmutter and friends parallel installable (46.99 KB, patch)
2017-01-16 11:56 UTC, Jonas Ådahl
committed Details | Review
Use the versioned libmutter*.so versions (5.37 KB, patch)
2017-01-16 11:56 UTC, Jonas Ådahl
none Details | Review
Use the versioned libmutter*.so versions (6.42 KB, patch)
2017-01-20 02:27 UTC, Jonas Ådahl
committed Details | Review

Description Jonas Ådahl 2017-01-16 11:56:14 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".
Comment 1 Jonas Ådahl 2017-01-16 11:56:19 UTC
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.
Comment 2 Jonas Ådahl 2017-01-16 11:56:39 UTC
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.
Comment 3 Rui Matos 2017-01-19 17:51:07 UTC
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
Comment 4 Jonas Ådahl 2017-01-20 02:27:08 UTC
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.
Comment 5 Rui Matos 2017-01-23 12:36:49 UTC
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 6 Jonas Ådahl 2017-02-14 03:22:05 UTC
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
Comment 7 Jonas Ådahl 2017-02-14 03:23:51 UTC
Attachment 343851 [details] pushed as a46ea3f - Use the versioned libmutter*.so versions