From 3204b01f5352d9161db43bd5e3efe58b79c47ead Mon Sep 17 00:00:00 2001 From: Adam Duskett Date: Tue, 17 Oct 2023 13:08:09 +0200 Subject: [PATCH] package/openrc: add split-user support Also, introduce a new test in support/testing/tests/init/test_openrc.py that ensures split-user support works properly. Signed-off-by: Adam Duskett Signed-off-by: Thomas Petazzoni --- package/openrc/openrc.mk | 6 ++++++ support/testing/tests/init/test_openrc.py | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/package/openrc/openrc.mk b/package/openrc/openrc.mk index e3f51d45d1..63aec7615e 100644 --- a/package/openrc/openrc.mk +++ b/package/openrc/openrc.mk @@ -40,6 +40,12 @@ else OPENRC_CONF_OPTS += -Dpam=false endif +ifeq ($(BR2_ROOTFS_MERGED_USR),y) +OPENRC_CONF_OPTS += -Dsplit-usr=false +else +OPENRC_CONF_OPTS += -Dsplit-usr=true +endif + define OPENRC_INSTALL_SYSV_RCS_SCRIPT $(INSTALL) -D -m 0755 $(OPENRC_PKGDIR)/sysv-rcs \ $(TARGET_DIR)/etc/init.d/sysv-rcs diff --git a/support/testing/tests/init/test_openrc.py b/support/testing/tests/init/test_openrc.py index c6ade7676d..a1eb8fe213 100644 --- a/support/testing/tests/init/test_openrc.py +++ b/support/testing/tests/init/test_openrc.py @@ -44,3 +44,16 @@ class TestInitSystemOpenrcRwFull(InitSystemOpenrcBase): def test_run(self): self.start_emulator("ext2") self.check_init() + + +class TestInitSystemOpenrcMergedUsrFull(InitSystemOpenrcBase): + config = InitSystemOpenrcBase.config + \ + """ + BR2_ROOTFS_MERGED_USR=y + BR2_SYSTEM_DHCP="eth0" + BR2_TARGET_ROOTFS_EXT2=y + """ + + def test_run(self): + self.start_emulator("ext2") + self.check_init()