]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: Add back CentOS Stream 8 to CI
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 29 Jan 2023 14:17:06 +0000 (15:17 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 29 Jan 2023 16:05:23 +0000 (17:05 +0100)
It's still useful to test the EFI handover logic in systemd-boot.
We use a mkosi.prepare script to install a newer python and update
the system to use it.

.github/workflows/mkosi.yml
mkosi.prepare [new file with mode: 0755]

index 4b77be24b40511e2fe07d733b1673b55aaf45c63..86321c062347f82a8592dbea09d1fcf3bc6cfe53 100644 (file)
@@ -74,10 +74,12 @@ jobs:
             release: tumbleweed
           - distro: centos
             release: "9"
+          - distro: centos
+            release: "8"
 
     steps:
     - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
-    - uses: systemd/mkosi@37c0524360ee460174f83081fa14e0dc9bc6ee0d
+    - uses: systemd/mkosi@f36983f552a197faf9e36361cc68a297e68bee73
 
     - name: Configure
       run: |
diff --git a/mkosi.prepare b/mkosi.prepare
new file mode 100755 (executable)
index 0000000..9d377cf
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+# SPDX-License-Identifier: LGPL-2.1-or-later
+set -e
+
+if [ "$(grep '^ID=' /etc/os-release)" = "ID=\"centos\"" ] && [ "$(grep '^VERSION=' /etc/os-release)" = "VERSION=\"8\"" ]; then
+    # python39-pluggy is a pytest dependency that's not installed for some reason.
+    dnf \
+        -y \
+        --enablerepo=powertools \
+         --setopt=powertools.module_hotfixes=true \
+         install \
+         python39 \
+         python39-pefile \
+         python39-jinja2 \
+         python39-pytest \
+         python39-pluggy
+    alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
+    alternatives --set python3 /usr/bin/python3.9
+fi