]> git.ipfire.org Git - thirdparty/systemd.git/blob - mkosi.prepare
mkosi: Update to latest
[thirdparty/systemd.git] / mkosi.prepare
1 #!/bin/sh
2 # SPDX-License-Identifier: LGPL-2.1-or-later
3 set -e
4
5 if [ "$(grep '^ID=' /etc/os-release)" = "ID=\"centos\"" ] && [ "$(grep '^VERSION=' /etc/os-release)" = "VERSION=\"8\"" ]; then
6 # python39-pluggy is a pytest dependency that's not installed for some reason.
7 dnf \
8 -y \
9 --enablerepo=powertools \
10 --setopt=powertools.module_hotfixes=true \
11 install \
12 python39 \
13 python39-pefile \
14 python39-jinja2 \
15 python39-pytest \
16 python39-pluggy
17 alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
18 alternatives --set python3 /usr/bin/python3.9
19 fi
20
21 # Make sure the necessary test users are available in the build image. We do this here because the build
22 # script does not run as root.
23 if [ "$1" = "build" ]; then
24 for id in 1 2 3; do
25 getent group $id >/dev/null || echo "g testgroup$id $id -" | systemd-sysusers -
26 done
27 fi