Skip to content

Commit 726f105

Browse files
authored
Merge pull request #28397 from DaanDeMeyer/python-stuff
mkosi: Stop using python3.9 on CentOS 8
2 parents 0865c46 + 8229217 commit 726f105

File tree

18 files changed

+38
-135
lines changed

18 files changed

+38
-135
lines changed

.github/workflows/mkosi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676

7777
steps:
7878
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
79-
- uses: systemd/mkosi@b1a570550ee077ed7a9a9359e4732636034807e6
79+
- uses: systemd/mkosi@5866c0ff3b36d350c943016e5a3b115f7a95d37f
8080

8181
- name: Configure
8282
run: |

meson.build

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2143,16 +2143,15 @@ if efi_arch == 'x64' and cc.links('''
21432143
endif
21442144

21452145
have_pyelftools = pymod.find_installation('python3', required : false, modules : ['elftools']).found()
2146-
if get_option('bootloader') == 'true' and (not python_39 or not have_pyelftools)
2147-
error('EFI bootloader support requires Python >= 3.9 and pyelftools.')
2146+
if get_option('bootloader') == 'true' and not have_pyelftools
2147+
error('EFI bootloader support requires pyelftools.')
21482148
endif
21492149

21502150
conf.set10(
21512151
'ENABLE_BOOTLOADER',
21522152
get_option('efi') and
21532153
get_option('bootloader') in ['auto', 'true'] and
21542154
efi_arch != '' and
2155-
python_39 and
21562155
have_pyelftools,
21572156
)
21582157

mkosi.conf.d/10-centos.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ Distribution=centos
66
[Distribution]
77
Release=9
88
Repositories=epel
9+
epel-next
10+
hyperscale-packages-main

mkosi.conf.d/10-systemd.conf

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# SPDX-License-Identifier: LGPL-2.1-or-later
22

33
[Output]
4+
OutputDirectory=mkosi.output
5+
BuildDirectory=mkosi.builddir
6+
CacheDirectory=mkosi.cache
7+
8+
[Content]
49
# Prevent ASAN warnings when building the image and ship the real ASAN options prefixed with MKOSI_.
510
Environment=ASAN_OPTIONS=verify_asan_link_order=false
611
MKOSI_ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:disable_coredump=0:use_madv_dontdump=1
712
MKOSI_UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1
8-
OutputDirectory=mkosi.output
9-
10-
[Content]
11-
BuildDirectory=mkosi.builddir
12-
CacheDirectory=mkosi.cache
1313

1414
[Host]
1515
Incremental=yes
@@ -22,21 +22,10 @@ KernelCommandLineExtra=systemd.crash_shell
2222
systemd.log_ratelimit_kmsg=0
2323
systemd.journald.forward_to_console
2424
systemd.journald.max_level_console=warning
25-
# Tell the kernel to only log warning and up to the console.
26-
loglevel=4
2725
# Disable the kernel's ratelimiting on userspace logging to kmsg.
2826
printk.devkmsg=on
29-
# Tell networkd to manage the ethernet interface.
30-
ip=enp0s1:any
31-
# Make sure sulogin works even with a locked root account.
32-
SYSTEMD_SULOGIN_FORCE=1
3327
# Make sure /sysroot is mounted rw in the initrd.
3428
rw
35-
# Make sure we pull in network related units even if nothing else depends on the
36-
# network to be online.
37-
systemd.wants=network-online.target
38-
# Make sure we don't load vmw_vmci which messes with virtio vsock.
39-
module_blacklist=vmw_vmci
4029
# Lower the default device timeout so we get a shell earlier if the root device does
4130
# not appear for some reason.
4231
systemd.default_device_timeout_sec=10

mkosi.conf.d/11-centos-8/mkosi.conf

Lines changed: 0 additions & 8 deletions
This file was deleted.

mkosi.conf.d/11-centos-8/mkosi.reposdir/CentOS-Stream-Hyperscale.repo

Lines changed: 0 additions & 7 deletions
This file was deleted.

mkosi.conf.d/11-centos-8/mkosi.reposdir/powertools.repo

Lines changed: 0 additions & 10 deletions
This file was deleted.

mkosi.presets/00-base/mkosi.build

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ if [ ! -f "$BUILDDIR"/build.ninja ]; then
4848
rootprefix=/${rootprefix#/}
4949
fi
5050

51+
. /etc/os-release
52+
if [ "$ID" = "centos" ] && [ "$VERSION" = "8" ]; then
53+
UKIFY=false
54+
else
55+
UKIFY=true
56+
fi
57+
5158
CONFIGURE_OPTS=(
5259
-D sysvinit-path="$sysvinit_path"
5360
-D rootprefix="$rootprefix"
@@ -133,7 +140,7 @@ if [ ! -f "$BUILDDIR"/build.ninja ]; then
133140
-D kernel-install=true
134141
-D analyze=true
135142
-D bpf-framework=true
136-
-D ukify=true
143+
-D ukify="$UKIFY"
137144
-D seccomp=true
138145
-D selinux=auto
139146
-D apparmor=auto

mkosi.presets/00-base/mkosi.conf.d/10-centos-fedora.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ BuildPackages=
2828
bpftool
2929
docbook-xsl
3030
findutils
31+
libgcrypt-devel # CentOS Stream 8 libgcrypt-devel doesn't ship a pkg-config file.
3132
libxslt
3233
pam-devel
3334
pkgconfig(audit)
@@ -65,4 +66,10 @@ BuildPackages=
6566
pkgconfig(tss2-tcti-device)
6667
pkgconfig(valgrind)
6768
pkgconfig(xkbcommon)
69+
python3
70+
python3dist(jinja2)
71+
python3dist(lxml)
72+
python3dist(pefile)
73+
python3dist(pyelftools)
74+
python3dist(pytest)
6875
rpm

mkosi.presets/00-base/mkosi.conf.d/10-fedora.conf

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,4 @@ Packages=
88
python3dist(pytest-flakes)
99

1010
BuildPackages=
11-
pkgconfig(libgcrypt)
1211
pkgconfig(xencontrol)
13-
python3
14-
python3dist(jinja2)
15-
python3dist(lxml)
16-
python3dist(pefile)
17-
python3dist(pyelftools)
18-
python3dist(pytest)

0 commit comments

Comments
 (0)