Use systemd 246 when building on CI
In the next patch, we are going to switch to Fedora 32 builds on CI.
However, Fedora 32 uses systemd 245.8 which unfortunately suffers from
the bug which affects function calls in sdbus-c++ [1].
Therefore we should use systemd<245 or systemd>245 which do not have the
bug.
CMake will fail with FATAL_ERROR if systemd 245 is found.
[1] https://github.com/Kistler-Group/sdbus-cpp/issues/106
Change-Id: I2499b43e5bd3c2a1d99bacb3179eb863c0f2bbf3
diff --git a/ci/build.sh b/ci/build.sh
index 9effe9e..1f84af9 100755
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -65,6 +65,30 @@
curl ${ARTIFACT_URL} | unzstd --stdout | tar -C ${PREFIX} -xf -
+BUILD_SD=~/build-sd
+pushd ${ZUUL_PROJECT_SRC_DIR}/../../github/systemd/systemd
+env \
+ -u CC \
+ -u CXX \
+ -u LD \
+ -u CFLAGS \
+ -u CXXFLAGS \
+ -u LDFLAGS \
+ meson ${BUILD_SD} \
+ -Drootprefix=${PREFIX} \
+ -Dprefix=${PREFIX} \
+ -Dsysconfdir=${PREFIX}/etc \
+ -Dlocalstatedir=${PREFIX}/var \
+ -Dsysvinit-path=${PREFIX}/etc/init.d \
+ -Dsysvrcnd-path=${PREFIX}/etc/rc.d \
+ -Drc-local=${PREFIX}/etc/rc.local \
+ -Dcertificate-root=${PREFIX}/etc/ssl \
+ -Dbashcompletiondir=${PREFIX}/share/bash-completion/completions \
+ -Dcreate-log-dirs=false \
+ -Dhwdb=false
+ninja-build -C ${BUILD_SD} install
+popd
+
cd ${BUILD_DIR}
cmake -GNinja -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Debug} -DCMAKE_INSTALL_PREFIX=${PREFIX} ${CMAKE_OPTIONS} ${ZUUL_PROJECT_SRC_DIR}
ninja-build