Pacman

Welcome to the Pacman bug tracker. Please search the current bugs and feature requests before filing a new one! Use advanced search and select "Search in Comments".

* Please select the correct category and version.
* Write a descriptive summary, background info, and provide a reproducible test case whenever possible.
Tasklist

FS#64394 - Switch to meson for buildsystem

Attached to Project: Pacman
Opened by Allan McRae (Allan) - Tuesday, 05 November 2019, 04:52 GMT
Last edited by Allan McRae (Allan) - Monday, 04 May 2020, 23:16 GMT
Task Type Bug Report
Category General
Status Assigned
Assigned To Allan McRae (Allan)
Dave Reisner (falconindy)
Andrew Gregory (andrewgregory)
Eli Schwartz (eschwartz)
Architecture All
Severity Low
Priority Normal
Reported Version git
Due in Version 6.0.0
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

This bug is to record the current state of switching to meson for our build system.

Things I do with autotools that I can't with meson:

Outstanding:
* 'meson dist' does not distribute built manpages. I'm not keen on an asciidoc dep for release tarballs.

(not blockers)
* 'ninja uninstall' leaves behind lots and lots!


Fixed:
* make PY_LOG_FLAGS=--valgrind check
* make update-copyright OLD=2018 NEW=2019
* repo-add does not work in the build tree
* remove-remove does not get created in the build tree
* Expected Fail: 0 (some of our tests do have XFAILs)
This task depends upon

Comment by Allan McRae (Allan) - Tuesday, 05 November 2019, 04:57 GMT
Added all main pacman developers as a catch-all. We have discussed things on IRC, but they get lost. I'd like to track everything here so we can switch over.
Comment by Eli Schwartz (eschwartz) - Tuesday, 05 November 2019, 05:19 GMT
meson does not let you define random variables per run, the way make does. So the update-copyright should probably be moved over to a build-aux/ script just like the update-po script we currently have.

OTOH with a custom target script we could also wire this up to meson, so that running

OLD=2018 NEW=2019 ninja -C builddir copyright

would read OLD/NEW as environment variables, not make variables, and those would be interpreted outside of ninja, by the custom target script. This would be useful if we want to hand a list of meson sources to update copyrights... but currently for make, we run it on every file in the source tree matching a git grep, so I would not bother.


For PY_LOG_FLAGS=--valgrind I guess we would want to do something similar? How is this passed? Would it be sufficient to add this as a meson -Dvalgrind=true or something?
Comment by Allan McRae (Allan) - Tuesday, 05 November 2019, 05:28 GMT
Patch submitted moving update-copyright out of Makefile.am and into build-aux.
Comment by Eli Schwartz (eschwartz) - Tuesday, 05 November 2019, 14:53 GMT
For distributing built manpages, https://github.com/mesonbuild/meson/issues/2166#issuecomment-325219859 seems relevant.
Comment by Eli Schwartz (eschwartz) - Tuesday, 12 November 2019, 05:08 GMT
To generate proper wrappers for repo-add/repo-remove and a few more things: https://lists.archlinux.org/pipermail/pacman-dev/2019-November/023854.html

This also reduces the number of files left behind after a ninja uninstall, which is good!
Comment by Eli Schwartz (eschwartz) - Thursday, 16 January 2020, 06:34 GMT
For PY_LOG_FLAGS=--valgrind, we switched in https://git.archlinux.org/pacman.git/commit/?id=3073752bcd9718b243661dd727e8f8bc18035938 to making this work consistently:

PACTEST_VALGRIND=1 meson test -C builddir/

or

PACTEST_VALGRIND=1 make check

Loading...