From daf1323c5ded7e4e7783205f5e30457b40eb322f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Sch=C3=A4fer?= Date: Mon, 2 Dec 2024 09:48:50 +0100 Subject: [PATCH] Added /dev/pts to bind mount locations During runtime several kernel filesystems are bind mounted into the image root system such that programs expecting it can work. /dev/pts was not needed so far but seems to be a good addition to the list to make tools like sudo to work properly when called e.g. from a config.sh script. This Fixes #2686 --- kiwi/system/root_bind.py | 1 + test/unit/system/root_bind_test.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/kiwi/system/root_bind.py b/kiwi/system/root_bind.py index 011b7c25b14..bb5cbc6bdb5 100644 --- a/kiwi/system/root_bind.py +++ b/kiwi/system/root_bind.py @@ -68,6 +68,7 @@ def __init__(self, root_init: RootInit): self.bind_locations = [ '/proc', '/dev', + '/dev/pts', '/var/run/dbus', '/sys' ] diff --git a/test/unit/system/root_bind_test.py b/test/unit/system/root_bind_test.py index 9d5fcd0ec19..dddc7534d4b 100644 --- a/test/unit/system/root_bind_test.py +++ b/test/unit/system/root_bind_test.py @@ -28,6 +28,15 @@ def setup(self): root.root_dir = 'root-dir' self.bind_root = RootBind(root) + # test expected real bind mount locations + assert self.bind_root.bind_locations == [ + '/proc', + '/dev', + '/dev/pts', + '/var/run/dbus', + '/sys' + ] + # stub config files and bind locations self.bind_root.config_files = ['/etc/sysconfig/proxy'] self.bind_root.bind_locations = ['/proc']