From 575039db29779bddadbafb21daa09be5ec4c898f Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Wed, 11 Dec 2019 15:41:57 +0100 Subject: [PATCH] buildroot: work around s390x linker + nspawn issue 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 --- osbuild/buildroot.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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)