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 783234 - Port to meson
Port to meson
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: --
Assigned To: Felipe Borges
GNOME Boxes maintainer(s)
Depends on: 784204
Blocks: 782980
 
 
Reported: 2017-05-30 08:18 UTC by Felipe Borges
Modified: 2017-10-16 11:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
data: Add DBus activable service file (1.55 KB, patch)
2017-06-21 13:19 UTC, Felipe Borges
committed Details | Review
Port to meson (15.72 KB, patch)
2017-06-21 13:19 UTC, Felipe Borges
none Details | Review
Port to meson (12.75 KB, patch)
2017-06-26 09:43 UTC, Felipe Borges
none Details | Review
Port to meson (12.97 KB, patch)
2017-07-25 13:02 UTC, Felipe Borges
committed Details | Review
build: Specify install_dir (774 bytes, patch)
2017-09-20 13:16 UTC, Felipe Borges
committed Details | Review
build: Install the custom osinfo database with Meson (2.15 KB, patch)
2017-10-11 11:36 UTC, Debarshi Ray
none Details | Review
build: Install the custom osinfo database with Meson (2.17 KB, patch)
2017-10-11 11:54 UTC, Debarshi Ray
none Details | Review
build: Install QEMU source & disk.img with Meson (904 bytes, patch)
2017-10-11 12:05 UTC, Debarshi Ray
none Details | Review
build: Install the custom osinfo database with Meson (1.57 KB, patch)
2017-10-12 11:57 UTC, Debarshi Ray
committed Details | Review
build: Install QEMU source & disk.img with Meson (840 bytes, patch)
2017-10-12 11:57 UTC, Debarshi Ray
committed Details | Review

Comment 2 Felipe Borges 2017-06-21 13:19:16 UTC
Created attachment 354152 [details] [review]
data: Add DBus activable service file

We were generating the dbus service file from within
the Makefile.

With the port to meson, it is more sane to have an
service.in file instead.
Comment 3 Felipe Borges 2017-06-21 13:19:21 UTC
Created attachment 354153 [details] [review]
Port to meson
Comment 4 Marc-Andre Lureau 2017-06-21 16:19:48 UTC
Review of attachment 354153 [details] [review]:

::: vapi/uuid.vapi
@@ +1,1 @@
+/* libuuid Vala Bindings

Why do you need a copy of the uuid bindings?

btw, glib now has g_uuid_string_random() so you could get rid of that dependency (probably as a different bug).
Comment 5 Felipe Borges 2017-06-26 09:43:14 UTC
Created attachment 354494 [details] [review]
Port to meson
Comment 6 Felipe Borges 2017-06-26 09:44:31 UTC
(In reply to Marc-Andre Lureau from comment #4)
> Review of attachment 354153 [details] [review] [review]:
> 
> ::: vapi/uuid.vapi
> @@ +1,1 @@
> +/* libuuid Vala Bindings
> 
> Why do you need a copy of the uuid bindings?
> 
> btw, glib now has g_uuid_string_random() so you could get rid of that
> dependency (probably as a different bug).

That's right. I proposed the patches at Bug 784204, and I updated the meson patch accordingly.

Thanks for taking a look at it, elmarco.
Comment 7 Zeeshan Ali 2017-07-11 12:15:11 UTC
Review of attachment 354152 [details] [review]:

ack
Comment 8 Zeeshan Ali 2017-07-11 12:24:00 UTC
Review of attachment 354494 [details] [review]:

Great stuff! Comments below:

* I assume you tested this, including all the build options. What about the installed tests? I know they probably need update since vbenes just gave up on those. :(
* I'm not so sure why we need to move libgd under subprojects? If that's needed, would be nice to document the need in the commit log.
* If this was based on my experimental branch, I wouldn't mind a bit of attribution in the commit log. :)

::: meson.build
@@ +2,3 @@
+         ['vala', 'c'],
+         version: '3.25.3',
+         license: 'GPL2+',

Boxes is under LGPL. :)
Comment 9 Felipe Borges 2017-07-12 09:17:50 UTC
(In reply to Zeeshan Ali (Khattak) from comment #8)
> Review of attachment 354494 [details] [review] [review]:
> 
> Great stuff! Comments below:
> 
> * I assume you tested this, including all the build options. What about the
> installed tests? I know they probably need update since vbenes just gave up
> on those. :(

I will check it out and update accordingly. :)

> * I'm not so sure why we need to move libgd under subprojects? If that's
> needed, would be nice to document the need in the commit log.

Sure. Meson recently started to support the subproject() utility, which handles git submodules in a clearer way, see http://mesonbuild.com/Subprojects.html
Comment 10 Felipe Borges 2017-07-12 09:24:37 UTC
Comment on attachment 354152 [details] [review]
data: Add DBus activable service file

Attachment 354152 [details] pushed as 19e1942 - data: Add DBus activable service file
Comment 11 Felipe Borges 2017-07-25 13:02:15 UTC
Created attachment 356357 [details] [review]
Port to meson

This has been based in the outdated work of Zeeshan Ali in
wip/meson, and in the recent port of GNOME Clocks to meson.

libgd was moved into the subprojects/ directory so we can
benefit from meson the subproject() utility.
Comment 12 Felipe Borges 2017-09-12 09:35:39 UTC
Since we are just past the release 3.26[0], the new 6 months cycle shall give us plenty of time to test the new build system, and to file and fix build related bugs.

My planing is to make a gradual transition by merging the meson build code[1] and keep it working simultaneously with the current autotools machinery.

At some point in the cycle we should decide whether the meson build is good enough and finally drop autotools entirely (making jhbuild build from meson by default, for instance).

This way I encourage you to try the new build with its different options in order to stress it as much as possible.

A normal Boxes build under meson should require $meson_version >= 0.40, and the following instructions:

    $ meson build
    $ cd build
    $ ninja
    $ ./build/src/gnome-boxes # To run from the build dir
Or
    $ sudo ninja install # To install it against the system

[0] https://git.gnome.org/browse/gnome-boxes/log/?h=gnome-3-26
[1] https://git.gnome.org/browse/gnome-boxes/log/?h=wip/feborges/meson
Comment 13 Felipe Borges 2017-09-20 13:16:32 UTC
Created attachment 360128 [details] [review]
build: Specify install_dir

This way jhbuild can build out of the source tree.
Comment 14 Felipe Borges 2017-09-20 13:17:17 UTC
Comment on attachment 360128 [details] [review]
build: Specify install_dir

Attachment 360128 [details] pushed as 3dbd182 - build: Specify install_dir
Comment 15 Debarshi Ray 2017-10-11 11:36:43 UTC
Created attachment 361324 [details] [review]
build: Install the custom osinfo database with Meson
Comment 16 Debarshi Ray 2017-10-11 11:37:21 UTC
We weren't installing Boxes' extension to the osinfo database.
Comment 17 Debarshi Ray 2017-10-11 11:54:59 UTC
Created attachment 361325 [details] [review]
build: Install the custom osinfo database with Meson

Sorry! Copy/paste embarassment with spaces before parentheses.
Comment 18 Debarshi Ray 2017-10-11 12:05:48 UTC
Created attachment 361326 [details] [review]
build: Install QEMU source & disk.img with Meson
Comment 19 Felipe Borges 2017-10-11 13:18:12 UTC
Review of attachment 361325 [details] [review]:

Thanks!

We could use meson's foreach here, example:

osinfo_db = [
  ['debian-1.0.xml', 'gnome-boxes/osinfo/os/debian.org'],
  ['fedora-1.xml', 'gnome-boxes/osinfo/os/fedoraproject.org'],
  ['ubuntu-4.10.xml', 'gnome-boxes/osinfo/os/ubuntu.com'],
]

foreach os: osinfo_db
  install_data (os[0], install_dir : join_paths (data_dir, os[1]))
endforeach

::: data/osinfo/meson.build
@@ +1,2 @@
+install_data ('debian-1.0.xml',
+              install_dir : join_paths (get_option ('datadir'), 'gnome-boxes/osinfo/os/debian.org'))

$data_dir is already defined in ../../meson.build
Comment 20 Felipe Borges 2017-10-11 13:19:15 UTC
Review of attachment 361326 [details] [review]:

Feel free to push it after addressing my comments.

::: data/meson.build
@@ +52,3 @@
 
+install_data ('QEMU_Session',
+              install_dir : join_paths (get_option ('datadir'), 'gnome-boxes/sources'))

same. data_dir was already defined.
Comment 21 Debarshi Ray 2017-10-12 11:56:42 UTC
(In reply to Felipe Borges from comment #19)
> Review of attachment 361325 [details] [review] [review]:
>
> [...]
>
> We could use meson's foreach here, example:
> 
> osinfo_db = [
>   ['debian-1.0.xml', 'gnome-boxes/osinfo/os/debian.org'],
>   ['fedora-1.xml', 'gnome-boxes/osinfo/os/fedoraproject.org'],
>   ['ubuntu-4.10.xml', 'gnome-boxes/osinfo/os/ubuntu.com'],
> ]
> 
> foreach os: osinfo_db
>   install_data (os[0], install_dir : join_paths (data_dir, os[1]))
> endforeach

Oh, that's nice.
 
> ::: data/osinfo/meson.build
> @@ +1,2 @@
> +install_data ('debian-1.0.xml',
> +              install_dir : join_paths (get_option ('datadir'),
> 'gnome-boxes/osinfo/os/debian.org'))
> 
> $data_dir is already defined in ../../meson.build

Oops, sorry.
Comment 22 Debarshi Ray 2017-10-12 11:57:12 UTC
Created attachment 361415 [details] [review]
build: Install the custom osinfo database with Meson
Comment 23 Debarshi Ray 2017-10-12 11:57:27 UTC
Created attachment 361416 [details] [review]
build: Install QEMU source & disk.img with Meson
Comment 24 Felipe Borges 2017-10-16 08:29:40 UTC
Review of attachment 361415 [details] [review]:

thanks!
Comment 25 Felipe Borges 2017-10-16 08:30:04 UTC
Review of attachment 361416 [details] [review]:

lgtm
Comment 26 Debarshi Ray 2017-10-16 11:35:01 UTC
Comment on attachment 361416 [details] [review]
build: Install QEMU source & disk.img with Meson

Thanks, Felipe! Pushed to master.