Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.

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) - Thursday, 03 September 2020, 00:51 GMT
Task Type Bug Report
Category General
Status Closed
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 100%
Votes 0
Private No


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:

* '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!

* 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

Closed by  Allan McRae (Allan)
Thursday, 03 September 2020, 00:51 GMT
Reason for closing:  Implemented
Additional comments about closing: mit/?id=454ea024383eab60295e4c4fdf2c3294 75887b2c
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 and into build-aux.
Comment by Eli Schwartz (eschwartz) - Tuesday, 05 November 2019, 14:53 GMT
For distributing built manpages, 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:

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 to making this work consistently:

PACTEST_VALGRIND=1 meson test -C builddir/


Comment by Eli Schwartz (eschwartz) - Thursday, 11 June 2020, 02:52 GMT
  • Field changed: Percent Complete (0% → 100%)
Comment by Allan McRae (Allan) - Monday, 10 August 2020, 21:21 GMT
I'd still ilke to distribute built man pages so we don't have a build dep on asciidoc, as asciidoc is buggy. E.g. I don't think man pages build in Debian testing.
Comment by Allan McRae (Allan) - Thursday, 03 September 2020, 00:51 GMT
I'm going to close this. I'd still like a better solution than requiring asciidoc for release builds to make man pages, but we can make this release as is and see if actually issues occur and move from there.