]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Use Meson for the 'reduced' and 'legacy' build variants
authorRalf Habacker <ralf.habacker@freenet.de>
Tue, 8 Aug 2023 17:39:49 +0000 (19:39 +0200)
committerSimon McVittie <smcv@collabora.com>
Mon, 14 Aug 2023 16:38:17 +0000 (17:38 +0100)
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 <smcv@collabora.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
.gitlab-ci.yml
tools/ci-build.sh

index a56a3e367e24843d398d0622550b4b386ac71d2f..b2d11306ebb4ba4b2a292c1f2927d60268f39b7c 100644 (file)
@@ -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
index 42b8d69e770b84939baec868bc0c01ae1f70fd5c..d57281a0f285ff635a53d0ce510c7c8a38a16cdc 100755 (executable)
@@ -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