From b396a018c57a906498f39e664862d92d2a28e944 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 20 Feb 2023 00:37:33 +0100 Subject: [PATCH] test: install busybox symlinks with relative path Then it works to run the applets from outside the unshare. Useful for testing and test development. Signed-off-by: Joachim Wiberg --- test/lib/sysroot.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/lib/sysroot.mk b/test/lib/sysroot.mk index a06bc417..00528da5 100644 --- a/test/lib/sysroot.mk +++ b/test/lib/sysroot.mk @@ -40,7 +40,14 @@ libs = $(foreach path,$(_libs_src),$(abspath $(DEST))$(path)) all: $(libs) $(DEST)/bin/$(BBBIN) @(cd $(DEST); \ for prg in `./bin/$(BBBIN) --list-full`; do \ - ln -sf /bin/$(BBBIN) $$prg; \ + case $$prg in \ + usr/bin/* | usr/sbin/*) \ + ln -sf ../../bin/$(BBBIN) $$prg;; \ + bin/* | sbin/*) \ + ln -sf ../bin/$(BBBIN) $$prg;; \ + *) \ + ln -sf bin/$(BBBIN) $$prg;; \ + esac; \ done) $(DEST)/bin/$(BBBIN).sha256: