@@ -21,6 +21,7 @@ PACKAGES=(
2121 expect
2222 fdisk
2323 gettext
24+ gnu-efi
2425 iputils-ping
2526 isc-dhcp-client
2627 itstool
@@ -77,6 +78,14 @@ if [[ "$COMPILER" == clang ]]; then
7778 CXX=" clang++-$COMPILER_VERSION "
7879 AR=" llvm-ar-$COMPILER_VERSION "
7980
81+ if systemd-analyze compare-versions " $COMPILER_VERSION " ge 17; then
82+ CFLAGS=" -fno-sanitize=function"
83+ CXXFLAGS=" -fno-sanitize=function"
84+ else
85+ CFLAGS=" "
86+ CXXFLAGS=" "
87+ fi
88+
8089 # Prefer the distro version if available
8190 if ! apt install --dry-run " llvm-$COMPILER_VERSION " > /dev/null; then
8291 # Latest LLVM stack deb packages provided by https://apt.llvm.org/
@@ -91,6 +100,8 @@ elif [[ "$COMPILER" == gcc ]]; then
91100 CC=" gcc-$COMPILER_VERSION "
92101 CXX=" g++-$COMPILER_VERSION "
93102 AR=" gcc-ar-$COMPILER_VERSION "
103+ CFLAGS=" "
104+ CXXFLAGS=" "
94105
95106 if ! apt install --dry-run " gcc-$COMPILER_VERSION " > /dev/null; then
96107 # Latest gcc stack deb packages provided by
@@ -103,16 +114,20 @@ else
103114 fatal " Unknown compiler: $COMPILER "
104115fi
105116
106- # PPA with some newer build dependencies (like zstd)
107- add-apt-repository -y ppa:upstream-systemd-ci/systemd-ci
108- apt-get -y update
109- apt-get -y build-dep systemd
110- apt-get -y install " ${PACKAGES[@]} "
117+ # This is added by default, and it is often broken, but we don't need anything from it
118+ sudo rm -f /etc/apt/sources.list.d/microsoft-prod.{list,sources}
119+ # add-apt-repository --enable-source does not work on deb822 style sources.
120+ for f in /etc/apt/sources.list.d/* .sources; do
121+ sudo sed -i " s/Types: deb/Types: deb deb-src/g" " $f "
122+ done
123+ sudo apt-get -y update
124+ sudo apt-get -y build-dep systemd
125+ sudo apt-get -y install " ${PACKAGES[@]} "
111126# Install more or less recent meson and ninja with pip, since the distro versions don't
112127# always support all the features we need (like --optimization=). Since the build-dep
113128# command above installs the distro versions, let's install the pip ones just
114129# locally and add the local bin directory to the $PATH.
115- pip3 install --user -r .github/workflows/requirements.txt --require-hashes
130+ pip3 install --user -r .github/workflows/requirements.txt --require-hashes --break-system-packages
116131export PATH=" $HOME /.local/bin:$PATH "
117132
118133$CC --version
@@ -139,8 +154,8 @@ for args in "${ARGS[@]}"; do
139154 info " Checking build with $args "
140155 # shellcheck disable=SC2086
141156 if ! AR=" $AR " \
142- CC=" $CC " CC_LD=" $LD " CFLAGS=" -Werror " \
143- CXX=" $CXX " CXX_LD=" $LD " CXXFLAGS=" -Werror " \
157+ CC=" $CC " CC_LD=" $LD " CFLAGS=" $CFLAGS " \
158+ CXX=" $CXX " CXX_LD=" $LD " CXXFLAGS=" $CXXFLAGS " \
144159 meson -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true --werror \
145160 -Dnobody-group=nogroup -Dcryptolib=" ${CRYPTOLIB:? } " \
146161 $args build; then
0 commit comments