]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: Stop using python3.9 on CentOS 8
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 14 Jul 2023 12:31:40 +0000 (14:31 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 14 Jul 2023 12:52:08 +0000 (14:52 +0200)
Let's get rid of all the complexity and just not build ukify on
CentOS Stream 8.

mkosi.presets/00-base/mkosi.build
mkosi.presets/00-base/mkosi.conf.d/10-centos-fedora.conf
mkosi.presets/00-base/mkosi.conf.d/10-fedora.conf
mkosi.presets/00-base/mkosi.conf.d/11-centos-8.conf [deleted file]
mkosi.presets/00-base/mkosi.conf.d/11-centos-9.conf [deleted file]
mkosi.presets/00-base/mkosi.prepare [deleted file]
mkosi.presets/20-final/mkosi.conf.d/10-centos-fedora.conf
mkosi.presets/20-final/mkosi.conf.d/10-fedora.conf
mkosi.presets/20-final/mkosi.conf.d/11-centos-8.conf [deleted file]
mkosi.presets/20-final/mkosi.conf.d/11-centos-9.conf [deleted file]

index d31eb338c63322b43cb6db3c62a5e85a7e6c8d52..eb95d1520111fb6f8437caec5cb160e8af25bd81 100755 (executable)
@@ -48,6 +48,13 @@ if [ ! -f "$BUILDDIR"/build.ninja ]; then
         rootprefix=/${rootprefix#/}
     fi
 
+    . /etc/os-release
+    if [ "$ID" = "centos" ] && [ "$VERSION" = "8" ]; then
+        UKIFY=false
+    else
+        UKIFY=true
+    fi
+
     CONFIGURE_OPTS=(
         -D sysvinit-path="$sysvinit_path"
         -D rootprefix="$rootprefix"
@@ -133,7 +140,7 @@ if [ ! -f "$BUILDDIR"/build.ninja ]; then
         -D kernel-install=true
         -D analyze=true
         -D bpf-framework=true
-        -D ukify=true
+        -D ukify="$UKIFY"
         -D seccomp=true
         -D selinux=auto
         -D apparmor=auto
index 283369ff109a35c247ed904b09e2526c0b821a9e..4dec24cc2070dadd2e32ffc38d8f7add368f72df 100644 (file)
@@ -28,6 +28,7 @@ BuildPackages=
         bpftool
         docbook-xsl
         findutils
+        libgcrypt-devel # CentOS Stream 8 libgcrypt-devel doesn't ship a pkg-config file.
         libxslt
         pam-devel
         pkgconfig(audit)
@@ -65,4 +66,10 @@ BuildPackages=
         pkgconfig(tss2-tcti-device)
         pkgconfig(valgrind)
         pkgconfig(xkbcommon)
+        python3
+        python3dist(jinja2)
+        python3dist(lxml)
+        python3dist(pefile)
+        python3dist(pyelftools)
+        python3dist(pytest)
         rpm
index eba6f040da4c975ab1977e5f7a9cf43a87384758..9c4c12423c31daad274bb9eb674762dc77660250 100644 (file)
@@ -8,11 +8,4 @@ Packages=
         python3dist(pytest-flakes)
 
 BuildPackages=
-        pkgconfig(libgcrypt)
         pkgconfig(xencontrol)
-        python3
-        python3dist(jinja2)
-        python3dist(lxml)
-        python3dist(pefile)
-        python3dist(pyelftools)
-        python3dist(pytest)
diff --git a/mkosi.presets/00-base/mkosi.conf.d/11-centos-8.conf b/mkosi.presets/00-base/mkosi.conf.d/11-centos-8.conf
deleted file mode 100644 (file)
index ef001c9..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# SPDX-License-Identifier: LGPL-2.1-or-later
-
-[Match]
-Distribution=centos
-Release=8
-
-[Content]
-BuildPackages=
-        libgcrypt-devel # CentOS Stream 8 libgcrypt-devel doesn't ship a pkg-config file.
-        platform-python
-        python3.9dist(jinja2)
-        python3.9dist(lxml)
-        python3.9dist(pefile)
-        python3.9dist(pyelftools)
-        python3.9dist(pytest)
-        python39
diff --git a/mkosi.presets/00-base/mkosi.conf.d/11-centos-9.conf b/mkosi.presets/00-base/mkosi.conf.d/11-centos-9.conf
deleted file mode 100644 (file)
index 61c1d27..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-# SPDX-License-Identifier: LGPL-2.1-or-later
-
-[Match]
-Distribution=centos
-Release=9
-
-[Content]
-BuildPackages=
-        pkgconfig(libgcrypt)
-        platform-python
-        python3dist(jinja2)
-        python3dist(lxml)
-        python3dist(pefile)
-        python3dist(pyelftools)
-        python3dist(pytest)
diff --git a/mkosi.presets/00-base/mkosi.prepare b/mkosi.presets/00-base/mkosi.prepare
deleted file mode 100755 (executable)
index c056d4f..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-# SPDX-License-Identifier: LGPL-2.1-or-later
-set -e
-
-if [ "$1" = "build" ]; then
-    . /etc/os-release
-
-    if [ "$ID" = "centos" ] && [ "$VERSION" = "8" ]; then
-        alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
-        alternatives --set python3 /usr/bin/python3.9
-    fi
-fi
index cb68c8dd1ad9b12d126d048c2129a36d959513d0..ad77a2b8d4b52a3f17ebfe4ad90bdc76b4db0768 100644 (file)
@@ -23,5 +23,10 @@ Packages=
         passwd
         polkit
         procps-ng
+        python3
+        python3dist(pefile)
+        python3dist(pluggy) # python3-pluggy is a pytest dependency that's not installed for some reason.
+        python3dist(psutil)
+        python3dist(pytest)
         quota
         vim-common
index 5ae623e47d9c2d8c546caf07b7568eb1e436b1a9..42d0093a89c6e4493f9502b27a42f46fd5c7178a 100644 (file)
@@ -8,7 +8,3 @@ Packages=
         btrfs-progs
         compsize
         f2fs-tools
-        python3
-        python3dist(pefile)
-        python3dist(psutil)
-        python3dist(pytest)
diff --git a/mkosi.presets/20-final/mkosi.conf.d/11-centos-8.conf b/mkosi.presets/20-final/mkosi.conf.d/11-centos-8.conf
deleted file mode 100644 (file)
index 2fa4764..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-# SPDX-License-Identifier: LGPL-2.1-or-later
-
-[Match]
-Distribution=centos
-Release=8
-
-[Content]
-Packages=
-        platform-python
-        python3.9dist(pefile)
-        python3.9dist(pluggy) # python39-pluggy is a pytest dependency that's not installed for some reason.
-        python3.9dist(psutil)
-        python3.9dist(pytest)
-        python39
diff --git a/mkosi.presets/20-final/mkosi.conf.d/11-centos-9.conf b/mkosi.presets/20-final/mkosi.conf.d/11-centos-9.conf
deleted file mode 100644 (file)
index d6ab3ee..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# SPDX-License-Identifier: LGPL-2.1-or-later
-
-[Match]
-Distribution=centos
-Release=9
-
-[Content]
-Packages=
-        platform-python
-        python3dist(pefile)
-        python3dist(pluggy) # python39-pluggy is a pytest dependency that's not installed for some reason.
-        python3dist(psutil)
-        python3dist(pytest)