Skip to content

Commit d4f8909

Browse files
committed
run-gnu-tests-smack-ci.sh: Use alpine busybox
1 parent 33d698b commit d4f8909

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

util/run-gnu-tests-smack-ci.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@ mkdir -p "$QEMU_DIR"/{rootfs/{bin,lib64,proc,sys,dev,tmp,etc,gnu},kernel}
1717

1818
# Copy Ubuntu kernel (runner's kernel does not work)
1919
sudo apt-get update || :
20-
sudo apt-get install -y linux-image-generic
20+
sudo apt-get install -y --no-install-recommends linux-image-generic
2121
sudo install -Dvm644 "$(ls -1 /boot/vmlinuz-*-generic | head -n 1)" "$QEMU_DIR/kernel/vmlinuz"
2222

2323
# Setup busybox
24-
BUSYBOX=/tmp/busybox
25-
[ -f "$BUSYBOX" ] || curl -sL -o "$BUSYBOX" https://busybox.net/downloads/binaries/1.35.0-x86_64-linux-musl/busybox
26-
chmod +x "$BUSYBOX"
27-
cp "$BUSYBOX" "$QEMU_DIR/rootfs/bin/"
28-
(cd "$QEMU_DIR/rootfs/bin" && "$BUSYBOX" --list | xargs -I{} ln -sf busybox {} 2>/dev/null)
24+
curl -L -o b.tar.gz https://dl-cdn.alpinelinux.org/alpine/latest-stable/main/x86_64/busybox-static-1.37.0-r30.apk
25+
tar -xf b.tar.gz
26+
install -Dvm755 bin/busybox.static "$QEMU_DIR/rootfs/bin/busybox"
27+
(cd "$QEMU_DIR/rootfs/bin" && ./busybox --list | xargs -I{} ln -sf busybox {} 2>/dev/null)
2928

3029
# Copy required libraries
3130
for lib in ld-linux-x86-64.so.2 libc.so.6 libm.so.6 libgcc_s.so.1 libpthread.so.0 libdl.so.2 librt.so.1; do
@@ -104,7 +103,7 @@ for TEST_PATH in $QEMU_TESTS; do
104103

105104
# Hardlink utilities for SMACK/ROOTFS tests
106105
for U in $("$REPO_DIR/target/${PROFILE}/coreutils" --list); do
107-
ln -vf "$REPO_DIR/target/${PROFILE}/coreutils" "$WORK/bin/$U"
106+
ln -f "$REPO_DIR/target/${PROFILE}/coreutils" "$WORK/bin/$U"
108107
done
109108

110109
# Set test script path and user

0 commit comments

Comments
 (0)