]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ci: Switch to Ubuntu 24.04
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 7 Jun 2024 08:55:53 +0000 (10:55 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 8 Jun 2024 10:33:32 +0000 (12:33 +0200)
20 files changed:
.github/workflows/build_test.sh
.github/workflows/build_test.yml
.github/workflows/cflite_pr.yml
.github/workflows/cifuzz.yml
.github/workflows/codeql.yml
.github/workflows/coverity.yml
.github/workflows/development_freeze.yml
.github/workflows/differential-shellcheck.yml
.github/workflows/gather-pr-metadata.yml
.github/workflows/issue_labeler.yml
.github/workflows/labeler.yml
.github/workflows/linter.yml
.github/workflows/make_release.yml
.github/workflows/mkosi.yml
.github/workflows/scorecards.yml
.github/workflows/unit_tests.sh
.github/workflows/unit_tests.yml
mkosi.conf
mkosi.images/system/mkosi.conf.d/10-centos/mkosi.conf
mkosi.images/system/mkosi.postinst.chroot

index 8d5dc660de9681d06b7329e17660040a72db25d2..f9bbdcee7236e69c2b9fecb7f4b823cb7f62260b 100755 (executable)
@@ -84,6 +84,14 @@ if [[ "$COMPILER" == clang ]]; then
     CXX="clang++-$COMPILER_VERSION"
     AR="llvm-ar-$COMPILER_VERSION"
 
+    if systemd-analyze compare-versions "$COMPILER_VERSION" ge 17; then
+        CFLAGS="-fno-sanitize=function"
+        CXXFLAGS="-fno-sanitize=function"
+    else
+        CFLAGS=""
+        CXXFLAGS=""
+    fi
+
     # Prefer the distro version if available
     if ! apt-get -y install --dry-run "llvm-$COMPILER_VERSION" >/dev/null; then
         # Latest LLVM stack deb packages provided by https://apt.llvm.org/
@@ -99,6 +107,8 @@ elif [[ "$COMPILER" == gcc ]]; then
     CC="gcc-$COMPILER_VERSION"
     CXX="g++-$COMPILER_VERSION"
     AR="gcc-ar-$COMPILER_VERSION"
+    CFLAGS=""
+    CXXFLAGS=""
 
     if ! apt-get -y install --dry-run "gcc-$COMPILER_VERSION" >/dev/null; then
         # Latest gcc stack deb packages provided by
@@ -112,10 +122,11 @@ else
 fi
 
 # This is added by default, and it is often broken, but we don't need anything from it
-sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
-# PPA with some newer build dependencies (like zstd)
-sudo add-apt-repository -y --no-update ppa:upstream-systemd-ci/systemd-ci
-sudo add-apt-repository -y --no-update --enable-source
+sudo rm -f /etc/apt/sources.list.d/microsoft-prod.{list,sources}
+# add-apt-repository --enable-source does not work on deb822 style sources.
+for f in /etc/apt/sources.list.d/*.sources; do
+    sudo sed -i "s/Types: deb/Types: deb deb-src/g" "$f"
+done
 sudo apt-get -y update
 sudo apt-get -y build-dep systemd
 sudo apt-get -y install "${PACKAGES[@]}"
@@ -123,7 +134,7 @@ sudo apt-get -y install "${PACKAGES[@]}"
 # always support all the features we need (like --optimization=). Since the build-dep
 # command above installs the distro versions, let's install the pip ones just
 # locally and add the local bin directory to the $PATH.
-pip3 install --user -r .github/workflows/requirements.txt --require-hashes
+pip3 install --user -r .github/workflows/requirements.txt --require-hashes --break-system-packages
 export PATH="$HOME/.local/bin:$PATH"
 
 $CC --version
@@ -141,8 +152,8 @@ for args in "${ARGS[@]}"; do
     info "Checking build with $args"
     # shellcheck disable=SC2086
     if ! AR="$AR" \
-         CC="$CC" CC_LD="$LINKER" CFLAGS="-Werror" \
-         CXX="$CXX" CXX_LD="$LINKER" CXXFLAGS="-Werror" \
+         CC="$CC" CC_LD="$LINKER" CFLAGS="$CFLAGS" \
+         CXX="$CXX" CXX_LD="$LINKER" CXXFLAGS="$CXXFLAGS" \
          meson setup \
                -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true --werror \
                -Dnobody-group=nogroup -Dcryptolib="${CRYPTOLIB:?}" -Ddebug=false \
index 1fdf39bf561c387b46e7fc13c278e05af9797804..164b3a05422543ddeecef94783bb0f61645b989e 100644 (file)
@@ -17,7 +17,7 @@ permissions:
 
 jobs:
   build:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     concurrency:
       group: ${{ github.workflow }}-${{ toJSON(matrix.env) }}-${{ github.ref }}
       cancel-in-progress: true
index 707ea0b6ba625996e7736b38a4dbc1fc0a1bf117..f0d321794a8301241841383bec6aa8b36976d1d4 100644 (file)
@@ -13,7 +13,7 @@ permissions: read-all
 
 jobs:
   PR:
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-24.04
     if: github.repository != 'systemd/systemd' || github.event.pull_request.user.login == 'dependabot[bot]'
     concurrency:
       group: ${{ github.workflow }}-${{ matrix.sanitizer }}-${{ github.ref }}
index a12ad9335f9d00ae230ab93b44caccf1752b9799..9b917405fe4588f0189a3ae3345e73c6a738d206 100644 (file)
@@ -22,7 +22,8 @@ on:
       - main
 jobs:
   Fuzzing:
-    runs-on: ubuntu-latest
+    # FIXME: Figure out why 32-bit applications fail to run in docker on Ubuntu 24.04.
+    runs-on: ubuntu-22.04
     if: github.repository == 'systemd/systemd'
     concurrency:
       group: ${{ github.workflow }}-${{ matrix.sanitizer }}-${{ matrix.architecture }}-${{ github.ref }}
index c840b18372744aaf7c7f73e03a6d32df3d0cece9..0d284f75f13260d25b31b71b048a08fec09564cf 100644 (file)
@@ -27,7 +27,7 @@ jobs:
   analyze:
     name: Analyze
     if: github.repository != 'systemd/systemd-security'
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     concurrency:
       group: ${{ github.workflow }}-${{ matrix.language }}-${{ github.ref }}
       cancel-in-progress: true
index 4ac3443c60c50ffa18bfb4f1b5036393f5b122f6..ad7a5d2f4921c4458044b8a43f9670e0f7ea1232 100644 (file)
@@ -14,7 +14,7 @@ permissions:
 
 jobs:
   build:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     if: github.repository == 'systemd/systemd'
     env:
       # Set in repo settings -> secrets -> actions
index f8a2e6c94c1b0b8eaf6937fed492a542ccb7530a..c2360a35ef8a16c8b17c4ce8b55b214d5c9fbe62 100644 (file)
@@ -17,7 +17,7 @@ jobs:
       github.event.workflow_run.event == 'pull_request' &&
       github.event.workflow_run.conclusion == 'success' &&
       github.repository == 'systemd/systemd'
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
 
     permissions:
       pull-requests: write
index bc9b22c497078be9d5510a90ced036f2b472c759..244f5d503b689f244462baafca76cbd016556ee4 100644 (file)
@@ -16,7 +16,7 @@ permissions:
 jobs:
   lint:
     if: github.event.repository.name != 'systemd-security'
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-24.04
 
     permissions:
       security-events: write
index 29b8c578d59902a6b1c04bd19b0004b37e06b9ca..e4a0caff0397f0754a3a00689e8e0fbbdb07e996 100644 (file)
@@ -12,7 +12,7 @@ permissions:
 jobs:
   gather-metadata:
     if: github.repository == 'systemd/systemd'
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
 
     steps:
       - name: Repository checkout
index b30fc80fe5e148254034c882751a6f3eee88e477..4bedf0d3f2d5565a515b621cc393eca4c162dfdd 100644 (file)
@@ -10,7 +10,7 @@ permissions:
 
 jobs:
   label-component:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
 
     permissions:
       issues: write
index dd0933d2f78109df78842fdf29722cf6be67c8ec..241b5819aa998586cef15da3466aa4d694b07b67 100644 (file)
@@ -24,7 +24,7 @@ permissions:
 jobs:
   triage:
     if: github.repository == 'systemd/systemd'
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-24.04
     permissions:
       pull-requests: write
 
index 8c3c622c0bb1d0ffc637daebbc0fc646a8b2f2e1..cf0bc09453fb9b3a2ce00bbd8c5a09b0cb601f52 100644 (file)
@@ -16,7 +16,7 @@ permissions:
 jobs:
   build:
     name: Lint Code Base
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-24.04
     concurrency:
       group: ${{ github.workflow }}-${{ github.ref }}
       cancel-in-progress: true
@@ -29,7 +29,7 @@ jobs:
           fetch-depth: 0
 
       - name: Lint Code Base
-        uses: super-linter/super-linter/slim@4e51915f4a812abf59fed160bb14595c0a38a9e7
+        uses: super-linter/super-linter/slim@88ea3923a7e1f89dd485d079f6eb5f5e8f937589
         env:
           DEFAULT_BRANCH: main
           MULTI_STATUS: false
index aed724b142e3032fbaa1b85613ef372f16f7a0f7..dc7de6999e9ec0a67d0894de01c814dbd21a50dd 100644 (file)
@@ -11,7 +11,7 @@ permissions:
 jobs:
   release:
     if: github.repository == 'systemd/systemd' || github.repository == 'systemd/systemd-stable'
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-24.04
 
     permissions:
       contents: write
index e732d12dd6e1a563404ec2fe8afabb43e82051de..40fc167195fcbb1cf11efefa548aa8d297426d40 100644 (file)
@@ -46,7 +46,7 @@ permissions:
 
 jobs:
   ci:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     concurrency:
       group: ${{ github.workflow }}-${{ matrix.distro }}-${{ matrix.release }}-${{ github.ref }}
       cancel-in-progress: true
@@ -159,6 +159,7 @@ jobs:
             meson \
             gperf \
             libfdisk-dev \
+            libmount-dev \
             libtss2-dev \
             libblkid-dev \
             libmicrohttpd-dev \
index abb8bdac6b2aba037c7cbac11aa1491316814b0f..44ee6f18b51ec8bd084f1e332adb2d8be2c5f465 100644 (file)
@@ -23,7 +23,7 @@ jobs:
   analysis:
     name: Scorecards analysis
     if: github.repository == 'systemd/systemd'
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-24.04
     permissions:
       id-token: write # Used to receive a badge.
 
index 9236d45186d4ce8d92f60f6773386073c2f7b9ea..4433d847ce264089d5d13317aab2d1609e53176c 100755 (executable)
@@ -53,14 +53,15 @@ for phase in "${PHASES[@]}"; do
         SETUP)
             info "Setup phase"
             # This is added by default, and it is often broken, but we don't need anything from it
-            rm -f /etc/apt/sources.list.d/microsoft-prod.list
-            # PPA with some newer build dependencies
-            add-apt-repository -y --no-update ppa:upstream-systemd-ci/systemd-ci
-            add-apt-repository -y --no-update --enable-source
+            rm -f /etc/apt/sources.list.d/microsoft-prod.{list,sources}
+            # add-apt-repository --enable-source does not work on deb822 style sources.
+            for f in /etc/apt/sources.list.d/*.sources; do
+                sed -i "s/Types: deb/Types: deb deb-src/g" "$f"
+            done
             apt-get -y update
             apt-get -y build-dep systemd
             apt-get -y install "${ADDITIONAL_DEPS[@]}"
-            pip3 install -r .github/workflows/requirements.txt --require-hashes
+            pip3 install -r .github/workflows/requirements.txt --require-hashes --break-system-packages
 
             # Make sure the build dir is accessible even when drop privileges, otherwise the unprivileged
             # part of test-execute gets skipped, since it can't run systemd-executor
@@ -71,6 +72,8 @@ for phase in "${PHASES[@]}"; do
             if [[ "$phase" =~ ^RUN_CLANG ]]; then
                 export CC=clang
                 export CXX=clang++
+                export CFLAGS="-fno-sanitize=function"
+                export CXXFLAGS="-fno-sanitize=function"
                 if [[ "$phase" == RUN_CLANG ]]; then
                     # The docs build is slow and is not affected by compiler/flags, so do it just once
                     MESON_ARGS+=(-Dman=enabled)
@@ -95,6 +98,8 @@ for phase in "${PHASES[@]}"; do
             if [[ "$phase" =~ ^RUN_CLANG_ASAN_UBSAN ]]; then
                 export CC=clang
                 export CXX=clang++
+                export CFLAGS="-fno-sanitize=function"
+                export CXXFLAGS="-fno-sanitize=function"
                 # 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
index f2857f1d4dcaa287e6518d35659b72395703d67a..895068c2a2a7bbdde9f176fdb937e94d2fc9115d 100644 (file)
@@ -14,7 +14,7 @@ permissions:
 
 jobs:
   build:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     concurrency:
       group: ${{ github.workflow }}-${{ matrix.run_phase }}-${{ matrix.cryptolib }}-${{ github.ref }}
       cancel-in-progress: true
index 650124865527cc71bf25ed4ff952d49f89303bf5..38d6e8331a2e7abe3af61dc60610ba136bfed22f 100644 (file)
@@ -10,9 +10,6 @@ MinimumVersion=23~devel
 @CacheDirectory=build/mkosi.cache
 
 [Content]
-# The kernel versions in CentOS Stream 9 and Ubuntu 22.04 don't support orphan_file, but later
-# versions of mkfs.ext4 enabled it by default, so we disable it explicitly.
-Environment=SYSTEMD_REPART_MKFS_OPTIONS_EXT4="-O ^orphan_file"
 @SELinuxRelabel=no
 BuildSourcesEphemeral=yes
 
index 395a22b56a80b5aad2de187ae4d84b0db8cfdb5a..25059c229241ca090f28ca5174f322f582c022f3 100644 (file)
@@ -5,6 +5,9 @@ Distribution=centos
 
 [Content]
 Environment=
+        # The kernel versions in CentOS Stream 9 doesn't support orphan_file, but later versions of
+        # mkfs.ext4 enabled it by default, so we disable it explicitly.
+        Environment=SYSTEMD_REPART_MKFS_OPTIONS_EXT4="-O ^orphan_file"
         GIT_URL=https://git.centos.org/rpms/systemd.git
         GIT_BRANCH=c9s-sig-hyperscale
         GIT_COMMIT=8cf2aed0181920611421384f7374720db269d6c7
index 3c8756369d7c30d8bf41f8496cb68d3fe02a4ab3..aaf4ac504e2fbaa4b090e39e81e1574ef28b8f0d 100755 (executable)
@@ -38,15 +38,10 @@ cp "$SRCDIR/factory/etc/nsswitch.conf" /etc/nsswitch.conf
 # Remove to make TEST-73-LOCALE pass on Ubuntu.
 rm -f /etc/default/keyboard
 
-# mkfs.ext4 on CentOS doesn't know the orphan_file feature so clear the mkfs options when we're building for
-# CentOS.
-if [[ "$DISTRIBUTION" == "centos" ]]; then
-    SYSTEMD_REPART_MKFS_OPTIONS_EXT4=""
-fi
-
-export SYSTEMD_REPART_MKFS_OPTIONS_EXT4
-
-systemd-repart \
+# This is executed inside the chroot so no need to disable any features as the default features will match
+# the kernel's supported features.
+SYSTEMD_REPART_MKFS_OPTIONS_EXT4="" \
+    systemd-repart \
     --empty=create \
     --dry-run=no \
     --size=auto \