diff --git a/osbuild/buildroot.py b/osbuild/buildroot.py index 373de8f3..a1b0ecde 100644 --- a/osbuild/buildroot.py +++ b/osbuild/buildroot.py @@ -1,6 +1,7 @@ import contextlib import os +import platform import socket import shutil import subprocess @@ -38,6 +39,13 @@ class BuildRoot: raise self.mounts.append(target) + if platform.machine() == "s390x": + # work around a combination of systemd not creating the link from + # /lib64 -> /usr/lib64 (see systemd issue #14311) and the dynamic + # linker is being set to (/lib/ld64.so.1 -> /lib64/ld64.so.1) + # Therefore we manually create the link before calling nspawn + os.symlink("/usr/lib64", f"{self.root}/lib64") + def mount_var(self): target = os.path.join(self.root, "var") os.mkdir(target)