exec mkosi-chroot "$SCRIPT" "$@"
fi
+# We don't want to install our build of systemd in the base image, but use it as an extra tree for the
+# initrd and final images, so override DESTDIR to store it in the output directory so we can reference it as
+# an extra tree in the initrd and final image builds.
+DESTDIR="$OUTPUTDIR/systemd"
+
# If mkosi.builddir/ exists mkosi will set $BUILDDIR to it, let's then use it
# as out-of-tree build dir. Otherwise, let's make up our own builddir.
[ -z "$BUILDDIR" ] && BUILDDIR="$PWD"/build
# CentOS Stream 8 includes bpftool 4.18.0 which is lower than what we need. However, they've backported the
# specific feature we need ("gen skeleton") to this version, so we replace bpftool with a script that reports
# version 5.6.0 to satisfy meson which makes bpf work on CentOS Stream 8 as well.
-if [ "$(grep '^ID=' /etc/os-release)" = "ID=\"centos\"" ] && [ "$(grep '^VERSION=' /etc/os-release)" = "VERSION=\"8\"" ]; then
+. /usr/lib/os-release
+if [ "$ID" = "centos" ] && [ "$VERSION" = "8" ]; then
cat >"$BUILDDIR"/bpftool <<EOF
#!/bin/sh
if [ "\$1" = --version ]; then
if [ ! -f "$BUILDDIR"/build.ninja ]; then
sysvinit_path=$(realpath /etc/init.d)
- . /etc/os-release
if [ "$ID" = "centos" ] && [ "$VERSION" = "8" ]; then
UKIFY=false
else
# On debian-like systems the library directory is not /usr/lib64 but /usr/lib/<arch-triplet>/.
# It is important to use the right one especially for cryptsetup plugins, otherwise they will be
# installed in the wrong directory and not be found by cryptsetup. Assume native build.
- if grep -q -e "ID=debian" -e "ID_LIKE=debian" /etc/os-release && command -v dpkg 2>/dev/null; then
+ if grep -q -e "ID=debian" -e "ID_LIKE=debian" /usr/lib/os-release && command -v dpkg 2>/dev/null; then
CONFIGURE_OPTS+=(
-D libdir="/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)"
-D pamlibdir="/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/security"
# Set various uids and gids for which Fedora has "soft static" allocations.
# Without this, we would get warning about mismatched sysusers.d entries
# between the files that we and Fedora's setup package install.
- if grep -q '^ID=fedora' /etc/os-release; then
+ if grep -q '^ID=fedora' /usr/lib/os-release; then
CONFIGURE_OPTS+=(
-Dadm-gid=4
-Daudio-gid=63
)
fi
- if grep -q '^ID="opensuse' /etc/os-release; then
+ if grep -q '^ID="opensuse' /usr/lib/os-release; then
CONFIGURE_OPTS+=(
-Dbpf-compiler=gcc
)
Distribution=opensuse
[Content]
-# We install gawk, gzip, grep, xz here explicitly so that the busybox versions don't get installed instead.
+# We install gawk, gzip, grep, xz, sed, rsync and docbook-xsl-stylesheets here explicitly so that the busybox
+# versions don't get installed instead.
Packages=
device-mapper
+ distribution-release
+ docbook-xsl-stylesheets
gawk
grep
gzip
libp11-kit0
libqrencode4
libseccomp2
- libxkbcommon0
- libzstd1
- pam
- shadow
libtss2-esys0
libtss2-mu0
libtss2-rc0
libtss2-tcti-device0
- # Workaround for CI issue with our stub getting overwritten
- systemd-boot
+ libxkbcommon0
+ libzstd1
+ pam
+ rsync
+ sed
+ shadow
tpm2-0-tss
xz
bpftool
cross-bpf-gcc13
dbus-1-devel
- docbook-xsl-stylesheets
fdupes
gcc-c++
glib2-devel
python3-pytest-flakes
qrencode-devel
shadow
- systemd-sysvinit
timezone
tpm2-0-tss-devel
xen-devel