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 787806 - Port to meson build system
Port to meson build system
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks: 782980 787857 790389
 
 
Reported: 2017-09-17 20:20 UTC by Iñigo Martínez
Modified: 2017-11-16 14:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Port to meson build system (28.08 KB, patch)
2017-09-17 20:27 UTC, Iñigo Martínez
none Details | Review
Port to meson build system (28.13 KB, patch)
2017-09-17 20:33 UTC, Iñigo Martínez
none Details | Review
Remove autotools (40.42 KB, patch)
2017-09-17 20:33 UTC, Iñigo Martínez
none Details | Review
Port to meson build system (28.21 KB, patch)
2017-09-18 16:15 UTC, Iñigo Martínez
needs-work Details | Review
build: Remove UPower 0.9 support (6.15 KB, patch)
2017-11-15 16:38 UTC, Bastien Nocera
committed Details | Review
build: Port to meson build system (27.78 KB, patch)
2017-11-15 16:45 UTC, Bastien Nocera
needs-work Details | Review
build: Port to meson build system (27.73 KB, patch)
2017-11-16 13:50 UTC, Bastien Nocera
committed Details | Review
main: Remove GConf autostart support (8.99 KB, patch)
2017-11-16 13:52 UTC, Bastien Nocera
committed Details | Review

Description Iñigo Martínez 2017-09-17 20:20:27 UTC
meson is a build system focused on speed an ease of use, which helps speeding up the software development.
Comment 1 Iñigo Martínez 2017-09-17 20:27:44 UTC
Created attachment 359945 [details] [review]
Port to meson build system

Patch that adds meson build system along autotools.

It needs an unreleased version of meson (0.43.0), which includes `annotate`[0] support for `gdbus-codegen`.

There is also a minor issue regarding 'gnome.desktop' file, which is copied to both 'xsessions' and 'wayland-sessions'. Although it's working thanks to a workaround, there is an open query about it[1].

Although I tried to test it as much as I could, more testing would be welcome.

Any suggestion would also be very appreciated.

[0] https://github.com/mesonbuild/meson/pull/2266
[1] https://groups.google.com/forum/#!topic/mesonbuild/3iIoYPrN4P0
[2] https://git.gnome.org/browse/gnome-session/tree/Makefile.am
Comment 2 Iñigo Martínez 2017-09-17 20:33:06 UTC
Created attachment 359946 [details] [review]
Port to meson build system

An update which adds the bug URL to the commit message.
Comment 3 Iñigo Martínez 2017-09-17 20:33:44 UTC
Created attachment 359947 [details] [review]
Remove autotools

Some applications are removing autotools to avoid the burden of maintaining two  build systems. This patch removes autotools in case it is considered.
Comment 4 Iñigo Martínez 2017-09-17 20:35:57 UTC
Finally I've created a wip branch[0] to ease it's testing.

[0] https://git.gnome.org/browse/gnome-session/log/?h=wip/inigomartinez/meson
Comment 5 Ray Strode [halfline] 2017-09-18 14:32:54 UTC
hey thanks for looking into this. I don't know much about meson yet, so I won't be able to provide meaningful review I think.  On the other hand, if you got it working then it's probably good to go I guess.  We can always do follow up commits regardless anyway.

Still, we should wait until 0.43.0 is released before pushing this.
Comment 6 Ray Strode [halfline] 2017-09-18 14:34:41 UTC
Review of attachment 359946 [details] [review]:

::: data/meson.build
@@ +2,3 @@
+
+# FIXME: the same target can not be copied into two directories
+#        https://groups.google.com/forum/#!topic/mesonbuild/3iIoYPrN4P0

would be good if you point out that you work around this in postinstall.
Comment 7 Iñigo Martínez 2017-09-18 16:15:26 UTC
Created attachment 359995 [details] [review]
Port to meson build system

(In reply to Ray Strode [halfline] from comment #5)
> hey thanks for looking into this. I don't know much about meson yet, so I
> won't be able to provide meaningful review I think.  On the other hand, if
> you got it working then it's probably good to go I guess.  We can always do
> follow up commits regardless anyway.
> 
> Still, we should wait until 0.43.0 is released before pushing this.

You are welcome. I'll be around, so I can try to help as much as possible :)

(In reply to Ray Strode [halfline] from comment #6)
> Review of attachment 359946 [details] [review] [review]:
> 
> ::: data/meson.build
> @@ +2,3 @@
> +
> +# FIXME: the same target can not be copied into two directories
> +#        https://groups.google.com/forum/#!topic/mesonbuild/3iIoYPrN4P0
> 
> would be good if you point out that you work around this in postinstall.

Here goes an updated patch with an extended comment. Although it's working, my idea was to solve it somehow. Either with the help of an answer to the question in the meson's google group[0], or looking at the meson code and solving it myself (I don't know if I would be able to but I want to try).
Comment 8 Bastien Nocera 2017-11-15 16:38:49 UTC
Created attachment 363708 [details] [review]
build: Remove UPower 0.9 support

The 1.0 API has been current for 4 years, so we shouldn't need to
support the old 0.9 API. mutter, gnome-shell, gnome-control-center and
gnome-settings-daemon all support the newer 1.0 API.
Comment 9 Bastien Nocera 2017-11-15 16:45:17 UTC
Review of attachment 359995 [details] [review]:

::: meson.build
@@ +71,3 @@
+  ['HAVE_SYS_TYPES_H', 'sys/types.h'],
+  ['HAVE_SYSLOG_H', 'syslog.h'],
+  ['HAVE_TCPD_H', 'tcpd.h'],

This is tcp-wrappers support for the ICE protocol. It hasn't been used since 2008 as far as I can see.

@@ +262,3 @@
+
+# check for backtrace support
+execinfo_dep = dependency('execinfo', required: false)

This hasn't been used since commit 76c7543dec2d8f4eefc6b8732c4e1d34fc39c4e0, you can remove it as well.
Comment 10 Bastien Nocera 2017-11-15 16:45:33 UTC
Created attachment 363709 [details] [review]
build: Port to meson build system

meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.
Comment 11 Bastien Nocera 2017-11-16 13:50:37 UTC
Created attachment 363832 [details] [review]
build: Port to meson build system

meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.
Comment 12 Bastien Nocera 2017-11-16 13:51:40 UTC
Review of attachment 363709 [details] [review]:

::: gnome-session/meson.build
@@ +69,3 @@
+  '-DDATA_DIR="@0@"'.format(session_pkgdatadir),
+  '-DLIBEXECDIR="@0@"'.format(session_libexecdir),
+  '-DGTKBUILDER_DIR="@0@"'.format(session_pkgdatadir)

This isn't used (see bug 738616), so removed.
Comment 13 Bastien Nocera 2017-11-16 13:52:11 UTC
Created attachment 363834 [details] [review]
main: Remove GConf autostart support

We haven't used it since GNOME 3.0, and have had time to port
applications in the 6 years since then.
Comment 14 Bastien Nocera 2017-11-16 14:36:36 UTC
Attachment 363708 [details] pushed as d8b8665 - build: Remove UPower 0.9 support
Attachment 363832 [details] pushed as eeefdc8 - build: Port to meson build system
Attachment 363834 [details] pushed as 926c3fc - main: Remove GConf autostart support