File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,12 +72,10 @@ poweroff -f
7272INIT
7373chmod +x " $SMACK_DIR /rootfs/init"
7474
75- # Build utilities with SMACK support
75+ # Build utilities with SMACK support (only ls has SMACK support for now)
76+ # TODO: When other utilities have SMACK support, build: ls id mkdir mknod mkfifo
7677echo " Building utilities with SMACK support..."
77- UTILS=" ls id mkdir mknod mkfifo"
78- for U in $UTILS ; do
79- cargo build --release --manifest-path=" $REPO_DIR /Cargo.toml" --package " uu_$U " --bin " $U " --features " uu_$U /smack" 2> /dev/null
80- done
78+ cargo build --release --manifest-path=" $REPO_DIR /Cargo.toml" --package uu_ls --bin ls --features uu_ls/smack
8179
8280# Find SMACK tests
8381SMACK_TESTS=$( grep -l ' require_smack_' -r " $GNU_DIR /tests/" 2> /dev/null || true)
@@ -102,11 +100,11 @@ for TEST_PATH in $SMACK_TESTS; do
102100 rm -rf " $WORK " " $WORK .gz"
103101 cp -a " $SMACK_DIR /rootfs" " $WORK "
104102
105- # Copy built utilities
106- for U in $UTILS ; do
107- rm -f " $ WORK /bin/$U "
108- cp " $REPO_DIR /target/release/ $U " " $ WORK /bin/$U "
109- done
103+ # Copy built utilities (only ls has SMACK support for now)
104+ # TODO: When other utilities have SMACK support, use:
105+ # for U in ls id mkdir mknod mkfifo; do cp "$REPO_DIR/target/release/$U" "$ WORK/bin/$U"; done
106+ rm -f " $ WORK /bin/ls "
107+ cp " $REPO_DIR /target/release/ls " " $WORK /bin/ls "
110108
111109 # Set test script path
112110 sed -i " s|\$ TEST_SCRIPT|$TEST_REL |g" " $WORK /init"
You can’t perform that action at this time.
0 commit comments