From: Ralf Habacker Date: Tue, 8 Aug 2023 17:39:49 +0000 (+0200) Subject: Use Meson for the 'reduced' and 'legacy' build variants X-Git-Tag: dbus-1.15.8~18^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d1922784cceea68411e8cdc4c6d9eb2ba7c4ef4;p=thirdparty%2Fdbus.git Use Meson for the 'reduced' and 'legacy' build variants There are some differences between Autotools and Meson here: - Because we detect native atomic operations differently, we can no longer emulate a platform that doesn't have them, such as ARMv4; but modern OSs no longer support ARMv4 and all significant hardware platforms now have native atomic operations, so this is now less of a concern. - Similarly, we can no longer emulate a platform that doesn't have the getrandom() library function, but that function is available in all relevant glibc versions (such as CentOS >= 8, Debian >= 10, Ubuntu >= 18.04) so testing the fallback path is less of a concern now. We also no longer try to disable dnotify in the legacy build, but our dnotify code path was removed in 2013, so --disable-dnotify didn't do anything anyway. [Separated from a larger commit on dbus!378 —smcv] Co-authored-by: Simon McVittie Signed-off-by: Simon McVittie --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a56a3e367..b2d11306e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -176,18 +176,6 @@ debian autotools debug: variables: ci_variant: "debug" -debian autotools reduced: - extends: .debian-build - when: manual - variables: - ci_variant: "reduced" - -debian autotools legacy: - extends: .debian-build - when: manual - variables: - ci_variant: "legacy" - debian cmake: extends: - .cmake-common @@ -227,6 +215,24 @@ debian mingw32 autotools debug: ci_host: "i686-w64-mingw32" ci_variant: "debug" +debian meson reduced: + extends: + - .meson-common + - .debian-build + when: manual + variables: + ci_buildsys: "meson" + ci_variant: "reduced" + +debian meson legacy: + extends: + - .meson-common + - .debian-build + when: manual + variables: + ci_buildsys: "meson" + ci_variant: "legacy" + debian mingw32 cmake: extends: - .cmake-common diff --git a/tools/ci-build.sh b/tools/ci-build.sh index 42b8d69e7..d57281a0f 100755 --- a/tools/ci-build.sh +++ b/tools/ci-build.sh @@ -272,61 +272,6 @@ case "$ci_buildsys" in export DBUS_TEST_MALLOC_FAILURES=0 ;; - (reduced) - # A smaller configuration than normal, with - # various features disabled; this emulates - # an older system or one that does not have - # all the optional libraries. - set _ "$@" - # No LSMs (the production build has both) - set "$@" --disable-selinux --disable-apparmor - # No inotify (we will use dnotify) - set "$@" --disable-inotify - # No epoll or kqueue (we will use poll) - set "$@" --disable-epoll --disable-kqueue - # No special init system support - set "$@" --disable-launchd --disable-systemd - # No libaudit or valgrind - set "$@" --disable-libaudit --without-valgrind - # Disable optional features, some of which are on by - # default - set "$@" --disable-stats - set "$@" --disable-user-session - shift - ;; - - (legacy) - # An unrealistically cut-down configuration, - # to check that it compiles and works. - set _ "$@" - # Disable native atomic operations on Unix - # (armv4, as used as the baseline for Debian - # armel, is one architecture that really - # doesn't have them) - set "$@" dbus_cv_sync_sub_and_fetch=no - # Disable getrandom syscall - set "$@" ac_cv_func_getrandom=no - # No epoll, kqueue or poll (we will fall back - # to select, even on Unix where we would - # usually at least have poll) - set "$@" --disable-epoll --disable-kqueue - set "$@" CPPFLAGS=-DBROKEN_POLL=1 - # Enable SELinux and AppArmor but not - # libaudit - that configuration has sometimes - # failed - set "$@" --enable-selinux --enable-apparmor - set "$@" --disable-libaudit --without-valgrind - # No directory monitoring at all - set "$@" --disable-inotify --disable-dnotify - # No special init system support - set "$@" --disable-launchd --disable-systemd - # No X11 autolaunching - set "$@" --disable-x11-autolaunch - # Leave stats, user-session, etc. at default settings - # to check that the defaults can compile on an old OS - shift - ;; - (*) ;; esac @@ -533,6 +478,53 @@ case "$ci_buildsys" in ;; esac + shift + ;; + (reduced) + # A smaller configuration than normal, with + # various features disabled; this emulates + # an older system or one that does not have + # all the optional libraries. + set _ "$@" + # No LSMs (the production build has both) + set "$@" -Dselinux=disabled -Dapparmor=disabled + # No inotify (we will use dnotify) + set "$@" -Dinotify=disabled + # No epoll or kqueue (we will use poll) + set "$@" -Depoll=disabled -Dkqueue=disabled + # No special init system support + set "$@" -Dlaunchd=disabled -Dsystemd=disabled + # No libaudit or valgrind + set "$@" -Dlibaudit=disabled -Dvalgrind=disabled + # Disable optional features, some of which are on by + # default + set "$@" -Dstats=false + set "$@" -Duser_session=false + shift + ;; + + (legacy) + # An unrealistically cut-down configuration, + # to check that it compiles and works. + set _ "$@" + # No epoll, kqueue or poll (we will fall back + # to select, even on Unix where we would + # usually at least have poll) + set "$@" -Depoll=disabled -Dkqueue=disabled + export CPPFLAGS=-DBROKEN_POLL=1 + # Enable SELinux and AppArmor but not + # libaudit - that configuration has sometimes + # failed + set "$@" -Dselinux=enabled -Dapparmor=enabled + set "$@" -Dlibaudit=disabled -Dvalgrind=disabled + # No directory monitoring at all + set "$@" -Dinotify=disabled + # No special init system support + set "$@" -Dlaunchd=disabled -Dsystemd=disabled + # No X11 autolaunching + set "$@" -Dx11_autolaunch=disabled + # Leave stats, user-session, etc. at default settings + # to check that the defaults can compile on an old OS shift ;; esac