[Rpm-maint] [rpm-software-management/rpm] WIP: RFC: Buildsystem overhaul (meson) (#1209)

Igor Gnatenko notifications at github.com
Thu May 7 17:37:07 UTC 2020


So I was tempted for long time to implement meson buildsystem for RPM because autofoo is very slow.

systemd and many other core projects has switched to meson long long time ago and this morning I finally saw that util-linux is switching to meson (https://github.com/karelzak/util-linux/pull/968) and I had good mood, so I actually did port.

Not sure if I should write benefits of meson compared to autotools apart from build speed, usability and IDE integration, so I will not.

There are also some commits which can be useful on their own.

Note that this requires quite modern version of meson, but if this becomes a problem, it is possible to downgrade this requirement to something what is, for example, in EL8.

Of course, it does not mean that we should do the big-bang and can ship one or few more releases with both buildsystems to give people time for a transition.

## autotools

Over 6k lines of code in configure.ac/Makefile.am files. The time for configure & compile is:

```
$ git clean -dffx && /usr/bin/time fish -c './autogen.sh --noconfigure && ./configure --with-vendor=redhat --disable-plugins && make -j8'
…
76.10user 21.74system 0:34.33elapsed 284%CPU (0avgtext+0avgdata 58004maxresident)k
0inputs+97240outputs (0major+5277874minor)pagefaults 0swaps
```

## meson

Less than 1k lines of code in meson.build files. The time for configure & compile is:

```
$ git clean -dffx && /usr/bin/time fish -c 'meson builddir -Ddoc=enabled -Dvendor=redhat && ninja -C builddir'
…
rpm 4.15.90

       Lua: True

  Database formats
       BDB: True
       NDB: False
    SQLite: True

  Compression formats
     bzdio: True
     xzdio: True
     lzdio: True
     zstio: True
…
15.80user 3.43system 0:05.35elapsed 359%CPU (0avgtext+0avgdata 38352maxresident)k
0inputs+22288outputs (0major+886000minor)pagefaults 0swaps
```

When running it, it shows quite nice table with configured options:

![image](https://user-images.githubusercontent.com/2866862/81324202-e5049b80-9096-11ea-85d6-d5f7abd875c6.png)

---

The missing things are:

* [ ] Installation of man pages
* [ ] librpm plugins
* [ ] Python bindings
* [ ] Switch to disable translations
* [ ] pkg-config files handling
* [ ] platform.in & co. files handling
* [ ] Testing on MacOS (@Conan-Kudo)
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/1209

-- Commit Summary --

  * build: Use same ifdef format for BN_bn2binpad
  * build: Set default AWK program in gentbl.sh
  * build: Use ifdefs in consistent manner
  * lib: Move otherwise unused variable declarations under NLS ifdef
  * lib: Rename tagtbl.C to tagtbl.h
  * Add meson buildsystem

-- File Changes --

    M .gitignore (1)
    A build/meson.build (42)
    M build/parseSpec.c (2)
    M configure.ac (4)
    A doc/meson.build (34)
    A fileattrs/meson.build (23)
    M lib/Makefile.am (4)
    M lib/gentagtbl.sh (2)
    A lib/meson.build (128)
    M lib/rpmds.c (2)
    M lib/rpmrc.c (4)
    M lib/tagexts.c (3)
    M lib/tagname.c (2)
    A luaext/meson.build (18)
    A meson.build (434)
    A meson_options.txt (92)
    A misc/meson.build (5)
    A po/meson.build (7)
    M rpmio/digest_openssl.c (4)
    M rpmio/macro.c (2)
    A rpmio/meson.build (49)
    A scripts/meson.build (43)
    A sign/meson.build (22)
    M system.h (4)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/1209.patch
https://github.com/rpm-software-management/rpm/pull/1209.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1209
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200507/9afd56c3/attachment-0001.html>


More information about the Rpm-maint mailing list