diff --git a/mkosi.presets/00-base/mkosi.build b/mkosi.presets/00-base/mkosi.build index d31eb338c6..eb95d15201 100755 --- a/mkosi.presets/00-base/mkosi.build +++ b/mkosi.presets/00-base/mkosi.build @@ -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 diff --git a/mkosi.presets/00-base/mkosi.conf.d/10-centos-fedora.conf b/mkosi.presets/00-base/mkosi.conf.d/10-centos-fedora.conf index 283369ff10..4dec24cc20 100644 --- a/mkosi.presets/00-base/mkosi.conf.d/10-centos-fedora.conf +++ b/mkosi.presets/00-base/mkosi.conf.d/10-centos-fedora.conf @@ -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 diff --git a/mkosi.presets/00-base/mkosi.conf.d/10-fedora.conf b/mkosi.presets/00-base/mkosi.conf.d/10-fedora.conf index eba6f040da..9c4c12423c 100644 --- a/mkosi.presets/00-base/mkosi.conf.d/10-fedora.conf +++ b/mkosi.presets/00-base/mkosi.conf.d/10-fedora.conf @@ -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 index ef001c92c9..0000000000 --- a/mkosi.presets/00-base/mkosi.conf.d/11-centos-8.conf +++ /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 index 61c1d27f44..0000000000 --- a/mkosi.presets/00-base/mkosi.conf.d/11-centos-9.conf +++ /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 index c056d4fc59..0000000000 --- a/mkosi.presets/00-base/mkosi.prepare +++ /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 diff --git a/mkosi.presets/20-final/mkosi.conf.d/10-centos-fedora.conf b/mkosi.presets/20-final/mkosi.conf.d/10-centos-fedora.conf index cb68c8dd1a..ad77a2b8d4 100644 --- a/mkosi.presets/20-final/mkosi.conf.d/10-centos-fedora.conf +++ b/mkosi.presets/20-final/mkosi.conf.d/10-centos-fedora.conf @@ -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 diff --git a/mkosi.presets/20-final/mkosi.conf.d/10-fedora.conf b/mkosi.presets/20-final/mkosi.conf.d/10-fedora.conf index 5ae623e47d..42d0093a89 100644 --- a/mkosi.presets/20-final/mkosi.conf.d/10-fedora.conf +++ b/mkosi.presets/20-final/mkosi.conf.d/10-fedora.conf @@ -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 index 2fa476454d..0000000000 --- a/mkosi.presets/20-final/mkosi.conf.d/11-centos-8.conf +++ /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 index d6ab3ee1c3..0000000000 --- a/mkosi.presets/20-final/mkosi.conf.d/11-centos-9.conf +++ /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)