From 19c0188798f39149e5a82f70a3f96b96cfdaa7d9 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Wed, 30 Oct 2019 13:23:35 +0000 Subject: [PATCH] Ensure debootstrap runs through 'sh' rather than 'bash' This fixes #338 and fixes #294 --- scripts/common | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/common b/scripts/common index 68fab54..e2048d9 100644 --- a/scripts/common +++ b/scripts/common @@ -17,8 +17,9 @@ bootstrap(){ BOOTSTRAP_ARGS+=(--components "main,contrib,non-free") BOOTSTRAP_ARGS+=(--keyring "${STAGE_DIR}/files/raspberrypi.gpg") BOOTSTRAP_ARGS+=("$@") + printf -v BOOTSTRAP_STR '%q ' "${BOOTSTRAP_ARGS[@]}" - setarch linux32 capsh --drop=cap_setfcap -- "${BOOTSTRAP_CMD}" "${BOOTSTRAP_ARGS[@]}" || true + setarch linux32 capsh --drop=cap_setfcap -- -c "'${BOOTSTRAP_CMD}' $BOOTSTRAP_STR" || true if [ -d "$2/debootstrap" ]; then rmdir "$2/debootstrap"