]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - travis-ci/managers/debian.sh
Merge pull request #15840 from Werkov/mkosi-opensuse
[thirdparty/systemd.git] / travis-ci / managers / debian.sh
index dd9b816c986928a872e36b1bc66f892c13977eec..60f6237606f6269d8edc7bdb3254ae6ab731820a 100755 (executable)
@@ -18,7 +18,14 @@ REPO_ROOT="${REPO_ROOT:-$PWD}"
 ADDITIONAL_DEPS=(python3-libevdev
                  python3-pyparsing
                  clang
-                 perl)
+                 perl
+                 libpwquality-dev
+                 fdisk
+                 libfdisk-dev
+                 libp11-kit-dev
+                 libssl-dev
+                 libzstd-dev
+                 zstd)
 
 function info() {
     echo -e "\033[33;1m$1\033[0m"
@@ -35,10 +42,14 @@ for phase in "${PHASES[@]}"; do
             info "Using Debian $DEBIAN_RELEASE"
             printf "FROM debian:$DEBIAN_RELEASE\nRUN bash -c 'apt-get -y update && apt-get install -y systemd'\n" | docker build -t debian-with-systemd/latest -
             info "Starting container $CONT_NAME"
-            $DOCKER_RUN -v $REPO_ROOT:/build:rw \
+            $DOCKER_RUN -v $REPO_ROOT:/build:rw -e container=docker \
                         -w /build --privileged=true --name $CONT_NAME \
                         -dit --net=host debian-with-systemd/latest /bin/systemd
             $DOCKER_EXEC bash -c "echo deb-src http://deb.debian.org/debian $DEBIAN_RELEASE main >>/etc/apt/sources.list"
+            # Wait for the container to properly boot up, otherwise we were
+            # running following apt-get commands during the initializing/starting
+            # (early/late bootup) phase, which caused nasty race conditions
+            $DOCKER_EXEC bash -c 'systemctl is-system-running --wait || :'
             $DOCKER_EXEC apt-get -y update
             $DOCKER_EXEC apt-get -y build-dep systemd
             $DOCKER_EXEC apt-get -y install "${ADDITIONAL_DEPS[@]}"
@@ -54,7 +65,10 @@ for phase in "${PHASES[@]}"; do
         RUN_ASAN|RUN_CLANG_ASAN)
             if [[ "$phase" = "RUN_CLANG_ASAN" ]]; then
                 ENV_VARS="-e CC=clang -e CXX=clang++"
-                MESON_ARGS="-Db_lundef=false" # See https://github.com/mesonbuild/meson/issues/764
+                # Build fuzzer regression tests only with clang (for now),
+                # see: https://github.com/systemd/systemd/pull/15886#issuecomment-632689604
+                # -Db_lundef=false: See https://github.com/mesonbuild/meson/issues/764
+                MESON_ARGS="-Db_lundef=false -Dfuzz-tests=true --optimization=1"
             fi
             docker exec $ENV_VARS -it $CONT_NAME meson --werror -Dtests=unsafe -Db_sanitize=address,undefined -Dsplit-usr=true $MESON_ARGS build
             $DOCKER_EXEC ninja -v -C build