Compare commits
2 Commits
a83dcebbff
...
9a7c70aa91
Author | SHA1 | Date |
---|---|---|
Sertonix | 9a7c70aa91 | |
Sertonix | 23910d50f6 |
|
@ -38,7 +38,7 @@ doc_threshold=$((2 * 1024 * 1024)) # 2 MiB
|
|||
umask 022
|
||||
|
||||
shell_escape() {
|
||||
echo \'${1/\'/\'\\\'\'}\'
|
||||
printf %s\\n \'"${1//\'/\'\\\'\'}"\'
|
||||
}
|
||||
|
||||
# run optional log command for remote logging
|
||||
|
@ -2406,10 +2406,10 @@ apk_add_makedeps() {
|
|||
|
||||
local repo_args="--repository $(shell_escape "$REPODEST/$repo")"
|
||||
[ -s "$repo_template" ] && repo_args=$(while read r; do
|
||||
echo --repository "$(shell_escape "$REPODEST/${r##*/}")"
|
||||
printf %s\\n "--repository $(shell_escape "$REPODEST/${r##*/}")"
|
||||
done) < "$repo_template"
|
||||
|
||||
eval $SUDO_APK add $apk_opt_wait $repo_args \
|
||||
eval "$SUDO_APK" add "$apk_opt_wait" "$repo_args" \
|
||||
--virtual .${prefix}depends-$pkgname "\$@" || return
|
||||
}
|
||||
|
||||
|
|
|
@ -1181,7 +1181,7 @@ create_mock_apk() {
|
|||
echo 'aarch64'
|
||||
exit 0
|
||||
fi
|
||||
echo apk "\$@" >&2
|
||||
printf 'apk %s\n' "\$*" >&2
|
||||
EOF
|
||||
chmod +x bin/apk
|
||||
ln -s apk bin/abuild-apk
|
||||
|
@ -1242,4 +1242,8 @@ abuild_deps_body() {
|
|||
-e not-match:'apk add.*--arch armhf.*builddep' \
|
||||
abuild deps
|
||||
|
||||
# Check shell_escape
|
||||
atf_check \
|
||||
-e match:"apk add .*--repository It's \\\\b'\"\"' \"escaped\"/.*" \
|
||||
abuild -P "It's \b'\"\"' \"escaped\"" deps
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue