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
This commit is contained in:
Christian Kellner 2019-12-11 15:41:57 +01:00 committed by Lars Karlitski
parent e590dee93b
commit 575039db29

View file

@ -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)