diff options
-rw-r--r-- | abuild-sign.in | 2 | ||||
-rw-r--r-- | abuild.in | 162 | ||||
-rw-r--r-- | abump.in | 9 | ||||
-rw-r--r-- | apkgrel.in | 3 | ||||
-rwxr-xr-x | bootchartd | 2 | ||||
-rw-r--r-- | buildlab.in | 2 | ||||
-rw-r--r-- | newapkbuild.in | 2 | ||||
-rwxr-xr-x | run-tests.sh | 9 | ||||
-rw-r--r-- | tests/abuild/checkroot1/APKBUILD | 2 |
9 files changed, 107 insertions, 86 deletions
diff --git a/abuild-sign.in b/abuild-sign.in index 1ce3a88..6d04c48 100644 --- a/abuild-sign.in +++ b/abuild-sign.in @@ -17,7 +17,7 @@ fi do_sign() { local f i keyname repo - local openssl=$(command -v openssl || echo libressl) + local openssl="$(command -v openssl || echo libressl)" # we are actually only interested in the name, not the file itself keyname=${pubkey##*/} @@ -134,7 +134,6 @@ default_sanitycheck() { if [ $(echo "$pkgdesc" | wc -c) -gt 128 ]; then die "pkgdesc is too long" fi - is_function package || die "Missing package() function in APKBUILD" if [ -n "$replaces_priority" ] \ && ! echo $replaces_priority | egrep -q '^[0-9]+$'; then @@ -154,8 +153,8 @@ default_sanitycheck() { done for i in $install; do - local n=${i%.*} - local suff=${i##*.} + local n="${i%.*}" + local suff="${i##*.}" case "$suff" in pre-install|post-install|pre-upgrade|post-upgrade|pre-deinstall|post-deinstall);; *) die "$i: unknown install script suffix" @@ -173,8 +172,8 @@ default_sanitycheck() { done for i in $triggers; do - local f=${i%=*} - local p=${f%.trigger} + local f="${i%=*}" + local p="${f%.trigger}" [ "$f" = "$i" ] && die "$f: triggers must contain '='" [ "$p" = "$f" ] && die "$f: triggers scripts must have .trigger suffix" if ! subpackages_has "$p" && [ "$p" != "$pkgname" ]; then @@ -240,9 +239,11 @@ default_sanitycheck() { makedepends_has 'g++' && ! options_has toolchain && warning "g++ should not be in makedepends" + is_function package || die "Missing package() function in APKBUILD" + if ! options_has "!check" && [ -n "$REQUIRE_CHECK" ]; then - (unset check; . "$APKBUILD"; type check >/dev/null 2>&1) || \ - die "Testsuites (abuild check) are required or need to be explicitly disabled!" + is_function check \ + || die "Testsuites (abuild check) are required or need to be explicitly disabled!" fi check_provides || die "provides must not contain $pkgname" @@ -260,7 +261,7 @@ sumcheck() { # get number of checksums set -- $sums - local numsums=$(( $# / 2 )) + local numsums="$(( $# / 2 ))" set -- $source if [ $# -ne $numsums ]; then @@ -269,7 +270,8 @@ sumcheck() { fetch || return 1 msg "Checking ${algo}sums..." cd "$srcdir" || return 1 - IFS=$'\n' + IFS=" +" endreturnval=0 for src in $sums; do origin=$1; shift @@ -277,7 +279,7 @@ sumcheck() { endreturnval=1 is_remote $origin || continue - local csum="${src:0:8}" + local csum="$(printf '%s' "$src" | awk '{ print substr($0, 1, 8) }' )" local file="$SRCDEST/$(filename_from_uri $origin)" echo "Because the remote file above failed the ${algo}sum check it will be renamed." @@ -426,7 +428,7 @@ default_unpack() { verify || return 1 initdcheck || return 1 mkdir -p "$srcdir" - local gunzip=$(command -v pigz || echo gunzip) + local gunzip="$(command -v pigz || echo gunzip)" [ $gunzip = "/usr/bin/pigz" ] && gunzip="$gunzip -d" for u in $source; do local s @@ -492,7 +494,7 @@ subpkg_unset() { subpkg_set() { subpkgname=${1%%:*} - local _splitarch=${1#*:} + local _splitarch="${1#*:}" [ "$_splitarch" = "$1" ] && _splitarch="" subpkgsplit=${_splitarch%%:*} @@ -514,7 +516,8 @@ cleanpkg() { rm -f "$REPODEST/$repo/src/$pkgname-$pkgver-r$pkgrel.src.tar.gz" for i in $allpackages; do subpkg_set "$i" - rm -f "$REPODEST/$repo/${subpkgarch/noarch/$CARCH}/$subpkgname-$pkgver-r$pkgrel.apk" + [ "$subpkgarch" = "noarch" ] && subpkgarch="$CARCH" + rm -f "$REPODEST/$repo/$subpkgarch/$subpkgname-$pkgver-r$pkgrel.apk" done subpkg_unset @@ -587,7 +590,7 @@ update_config_guess() { } runpart() { - local part=$1 + local part="$1" [ -n "$DEBUG" ] && msg "$part" trap "die '$part failed'" EXIT if [ -d "$builddir" ]; then @@ -862,17 +865,17 @@ check_license() { } check_secfixes_comment() { - local c=$(sed -E -n -e '/^# secfixes:/,/(^[^#]|^$)/p' $APKBUILD | grep '^#') - local invalid=$(echo "$c" \ - | grep -v -E '(^# secfixes:|^# +- [A-Z0-9-]+|^# [0-9]+.*:$|^#$)') + local c="$(sed -E -n -e '/^# secfixes:/,/(^[^#]|^$)/p' $APKBUILD | grep '^#')" + local invalid="$(echo "$c" \ + | grep -v -E '(^# secfixes:|^# +- [A-Z0-9-]+|^# [0-9]+.*:$|^#$)')" if [ -z "$invalid" ]; then return 0 fi # check if there are tabs - if echo "$invalid" | grep -q $'\t'; then + if echo "$invalid" | grep -q "$(printf '\t')"; then error "secfixes comment must not have tabs:" - echo "$c" | grep $'\t' >&2 + echo "$c" | grep "$(printf '\t')" >&2 return 1 fi @@ -906,9 +909,9 @@ check_provides() { prepare_metafiles() { getpkgver || return 1 - local name=${subpkgname:-$pkgname} + local name="${subpkgname:-$pkgname}" [ -z "${name##* *}" ] && die "package name contains spaces" - local dir=${subpkgdir:-$pkgdir} + local dir="${subpkgdir:-$pkgdir}" local pkg="$name-$pkgver-r$pkgrel.apk" local pkginfo="$controldir"/.PKGINFO local sub @@ -916,7 +919,7 @@ prepare_metafiles() { [ ! -d "$dir" ] && die "Missing $dir" cd "$dir" mkdir -p "$controldir" - local builddate=$(date -u "+%s") + local builddate="$(date -u "+%s")" # Fix package size on several filesystems case "$(df -PT . | awk 'END {print $2}')" in @@ -924,7 +927,7 @@ prepare_metafiles() { sync;; esac - local size=$(du -sk | awk '{print $1 * 1024}') + local size="$(du -sk | awk '{print $1 * 1024}')" if [ "$arch" != "$apkbuild_arch" ]; then local msg="Split function set arch=\"$arch\" for $name, use subpackages=pkg:split:arch format instead" @@ -953,7 +956,7 @@ prepare_metafiles() { deps="$depends" if ! depends_has /bin/sh; then for i in $install $triggers; do - local s=${i%=*} + local s="${i%=*}" [ "$name" != "${s%.*}" ] && continue if head -n 1 "$startdir/$s" | grep '^#!/bin/sh' >/dev/null ; then msg "Script found. /bin/sh added as a dependency for $pkg" @@ -995,10 +998,11 @@ prepare_metafiles() { echo "provides = $i" >> "$pkginfo" done for i in $triggers; do - local f=${i%=*} - local dirs=${i#*=} + local f="${i%=*}" + local dirs="${i#*=}" [ "${f%.trigger}" != "$name" ] && continue - echo "triggers = ${dirs//:/ }" >> "$pkginfo" + dirs="$(printf '%s' "$dirs" | sed 's/:/ /g')" + echo "triggers = $dirs" >> "$pkginfo" done if [ -n "$install_if" ]; then echo "install_if = $(echo $install_if)" >> "$pkginfo" @@ -1006,8 +1010,8 @@ prepare_metafiles() { local metafiles=".PKGINFO" for i in $install $triggers; do - local f=${i%=*} - local n=${f%.*} + local f="${i%=*}" + local n="${f%.*}" if [ "$n" != "$name" ]; then continue fi @@ -1021,7 +1025,7 @@ prepare_metafiles() { } prepare_trace_rpaths() { - local dir=${subpkgdir:-$pkgdir} + local dir="${subpkgdir:-$pkgdir}" local etype= soname= file= sover= [ "${subpkgarch:-$pkgarch}" = "noarch" ] && return 0 options_has "!tracedeps" && return 0 @@ -1060,9 +1064,9 @@ prepare_pkgconfig_provides() { if ! [ -e "$i" ]; then continue fi - local f=${i##*/} - local v=$(PKG_CONFIG_PATH="$dir"/usr/lib/pkgconfig PKG_CONFIG_MAXIMUM_TRAVERSE_DEPTH=1 pkg-config \ - --modversion ${f%.pc}) + local f="${i##*/}" + local v="$(PKG_CONFIG_PATH="$dir"/usr/lib/pkgconfig PKG_CONFIG_MAXIMUM_TRAVERSE_DEPTH=1 pkg-config \ + --modversion ${f%.pc})" echo "$pcprefix${f%.pc}=${v:-0}" >> "$controldir"/.provides-pc done } @@ -1075,7 +1079,7 @@ prepare_command_provides() { if ! [ -x "$i" ]; then continue fi - local f=${i##*/} + local f="${i##*/}" echo $f >> "$controldir"/.provides-command done } @@ -1153,7 +1157,7 @@ real_so_path() { # search rpaths and /usr/lib /lib for given so files find_so_files() { - local rpaths=$(cat "$1") + local rpaths="$(cat "$1")" shift while [ $# -gt 0 ]; do real_so_path "$1" /usr/lib /lib $rpaths || return 1 @@ -1224,7 +1228,7 @@ trace_apk_deps() { # find all packages that holds the so files if [ -f "$dir"/.rpaths ]; then - local so_files=$(find_so_files "$dir"/.rpaths $missing) \ + local so_files="$(find_so_files "$dir"/.rpaths $missing)" \ || return 1 deppkgs=$($APK $apkroot info --quiet --who-owns $so_files) || return 1 fi @@ -1251,7 +1255,7 @@ trace_apk_deps() { autodeps="$autodeps pc:$pcprefix$i" elif subpkg_provides_pc "$i" \ || $APK $apkroot info --quiet --installed "pc:$i"; then - local provider=$(apk $apkroot search --quiet "pc:$i") + local provider="$(apk $apkroot search --quiet "pc:$i")" if list_has "$provider" $depends_dev; then warning "$provider should be removed from depends_dev" fi @@ -1260,7 +1264,7 @@ trace_apk_deps() { warning "Could not find any provider for pc:$i" local pcfile=/usr/lib/pkgconfig/"${i%%[<>=]*}".pc if [ -e "$pcfile" ]; then - local owner=$($APK $apkroot info --quiet --who-owns $pcfile) + local owner="$($APK $apkroot info --quiet --who-owns $pcfile)" warning "${owner:-package providing $pcfile} needs to be rebuilt" fi fi @@ -1391,8 +1395,11 @@ scan_shared_objects() { # Converts a relative path to absolute with respect to the symlink # path (2nd arg). normalize_target_path() { - local path=$1 - [ "${path:0:1}" = / ] || path=$(dirname "$2")/$path + local path="$1" + case "$path" in + /*) ;; + *) path="$(dirname "$2")/$path";; + esac local oifs="$IFS" pathstr= i= IFS='/' @@ -1459,7 +1466,7 @@ human_size() { create_apks() { local file= dir= name= ver= apk= datadir= size= - local gzip=$(command -v pigz gzip | head -1) + local gzip="$(command -v pigz || echo gzip)" getpkgver || return 1 if ! options_has "!tracedeps"; then for file in "$pkgbasedir"/.control.*/.PKGINFO; do @@ -1477,13 +1484,13 @@ create_apks() { for file in "$pkgbasedir"/.control.*/.PKGINFO; do local dir="${file%/.PKGINFO}" - local name=$(pkginfo_val pkgname $file) - local ver=$(pkginfo_val pkgver $file) - local size=$(pkginfo_val size $file | human_size) - local apk=$name-$ver.apk + local name="$(pkginfo_val pkgname $file)" + local ver="$(pkginfo_val pkgver $file)" + local size="$(pkginfo_val size $file | human_size)" + local apk="$name-$ver.apk" local datadir="$pkgbasedir"/$name - local subpkgname=$name - local subpkgarch=$(pkginfo_val arch $file) + local subpkgname="$name" + local subpkgarch="$(pkginfo_val arch $file)" trace_apk_deps "$name" "$dir" "$subpkgarch" || return 1 msg "Package size: ${size}" @@ -1500,7 +1507,7 @@ create_apks() { msg "Create checksum..." # append the hash for data.tar.gz - local sha256=$(sha256sum "$dir"/data.tar.gz | cut -f1 -d' ') + local sha256="$(sha256sum "$dir"/data.tar.gz | cut -f1 -d' ')" echo "datahash = $sha256" >> "$dir"/.PKGINFO # control.tar.gz @@ -1510,8 +1517,9 @@ create_apks() { abuild-sign -q control.tar.gz || exit 1 msg "Create $apk" - mkdir -p "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH} - cat control.tar.gz data.tar.gz > "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$apk + [ "$subpkgarch" = "noarch" ] && subpkgarch="$CARCH" + mkdir -p "$REPODEST"/$repo/$subpkgarch + cat control.tar.gz data.tar.gz > "$REPODEST"/$repo/$subpkgarch/$apk ) done } @@ -1528,14 +1536,14 @@ build_abuildrepo() { # check early if we have abuild key abuild-sign --installed logcmd "building $repo/$pkgname-$pkgver-r$pkgrel" - local _starttime=$(date --utc +%s) + local _starttime="$(date --utc +%s)" msg "Building $repo/$pkgname $pkgver-r$pkgrel (using $program $program_version) started $(date -R)" for part in sanitycheck builddeps clean fetch unpack prepare mkusers build \ $_check rootpkg; do runpart $part done - local _endtime=$(date --utc +%s) - local _difftime=$((_endtime - _starttime)) + local _endtime="$(date --utc +%s)" + local _difftime="$((_endtime - _starttime))" msg "Build complete at $(date -R) elapsed time $((_difftime/3600))h $((_difftime/60%60))m $((_difftime%60))s" cleanup $CLEANUP fi @@ -1562,7 +1570,7 @@ update_abuildrepo_index() { for i in $allarch; do cd "$REPODEST/$repo/$i" - local index=$i/APKINDEX.tar.gz + local index="$i/APKINDEX.tar.gz" msg "Updating the $repo/$i repository index..." local sign=".SIGN.RSA.${SIGN_PUBLIC_KEY##*/}" @@ -1591,7 +1599,7 @@ check() { # predefined splitfunc doc default_doc() { - local gzip=$(command -v pigz gzip | head -1) + local gzip="$(command -v pigz || echo gzip)" depends="$depends_doc" pkgdesc="$pkgdesc (documentation)" install_if="docs $pkgname=$pkgver-r$pkgrel" @@ -1662,7 +1670,7 @@ default_dbg() { mkdir -p $dstdir fi cd $srcdir - local XATTR=$(getfattr --match="" --dump "${srcfile}") + local XATTR="$(getfattr --match="" --dump "${srcfile}")" ${CROSS_COMPILE}objcopy --only-keep-debug $srcfile $dstfile ${CROSS_COMPILE}objcopy --add-gnu-debuglink=$dstfile $srcdir/$srcfile mv $dstfile $dstdir @@ -1751,9 +1759,12 @@ openrc() { } -is_function() { - type "$1" 2>&1 | head -n 1 | egrep -q "is a (shell )?function" -} +is_function() ( + unset -f "$1" >/dev/null 2>&1 || true + unalias "$1" >/dev/null 2>&1 || true + . "$APKBUILD" + PATH= type "$1" >/dev/null 2>&1 +) do_fakeroot() { if [ -n "$FAKEROOT" ]; then @@ -1804,7 +1815,7 @@ srcpkg() { done for i in $triggers; do - local f=${i%=*} + local f="${i%=*}" echo "Packaging trigger file: $f" files="$files $prefix/$f" done @@ -1840,7 +1851,8 @@ apk_up2date() { local i s for i in $allpackages; do subpkg_set "$i" - if [ ! -f "$REPODEST/$repo/${subpkgarch/noarch/$CARCH}/$subpkgname-$pkgver-r$pkgrel.apk" ]; then + [ "$subpkgarch" = "noarch" ] && subpkgarch="$CARCH" + if [ ! -f "$REPODEST/$repo/$subpkgarch/$subpkgname-$pkgver-r$pkgrel.apk" ]; then subpkg_unset return 1 fi @@ -1855,7 +1867,8 @@ apk_up2date() { else s="$startdir/${i##*/}" fi - if [ "$s" -nt "$REPODEST/$repo/${pkgarch/noarch/$CARCH}/$pkgname-$pkgver-r$pkgrel.apk" ]; then + [ "$pkgarch" = "noarch" ] && pkgarch="$CARCH" + if [ "$s" -nt "$REPODEST/$repo/$pkgarch/$pkgname-$pkgver-r$pkgrel.apk" ]; then return 1 fi done @@ -1868,7 +1881,8 @@ abuildindex_up2date() { for i in $allpackages; do subpkg_set "$i" - local dir="$REPODEST"/$repo/${subpkgarch/noarch/$CARCH} + [ "$subpkgarch" = "noarch" ] && subpkgarch="$CARCH" + local dir="$REPODEST"/$repo/$subpkgarch local idx="$dir"/APKINDEX.tar.gz local file="$dir"/$subpkgname-$pkgver-r$pkgrel.apk @@ -2009,7 +2023,7 @@ get_missing_deps() { shift while [ "$1" ]; do - local cp=${1#\!} + local cp="${1#\!}" if [ $cp != $1 ]; then if $cmd $cp; then error "Conflicting package installed: $cp" @@ -2069,7 +2083,7 @@ builddeps() { # find dependencies that are installed but missing in repo. for i in $builddeps; do - local m=$($APK search --repository "$REPODEST/$repo" ${i%%[<>=]*}) + local m="$($APK search --repository "$REPODEST/$repo" ${i%%[<>=]*})" if [ -z "$m" ]; then missing="$missing $i" fi @@ -2077,8 +2091,8 @@ builddeps() { for i in $(trace_makedepends $missing); do # i = pkg:dir - local dir=${i#*:} - local pkg=${i%:*} + local dir="${i#*:}" + local pkg="${i%:*}" # ignore if dependency is in other repo [ -d "$dir" ] || continue @@ -2168,7 +2182,7 @@ rootbld() { mkusers BUILD_ROOT=$(mktemp -d /var/tmp/abuild.XXXXXXXXXX) - local aportsgit=${APORTSDIR:-${startdir}} + local aportsgit="${APORTSDIR:-${startdir}}" mkdir -p "$BUILD_ROOT/proc" "$BUILD_ROOT/etc/apk/keys" \ "$BUILD_ROOT/$HOME/.abuild" "$BUILD_ROOT/$aportsgit" \ @@ -2187,10 +2201,10 @@ rootbld() { local version="edge" buildhost="edge" gitref if gitref="$(expr "$(git symbolic-ref --short HEAD)" : '\([0-9]\+\(\.[0-9]\+\)*\)-')"; then version=v${gitref} - buildhost=${gitref/./-} + buildhost="$(printf '%s' "$gitref" | sed 's/[.]/-/')" fi - local repo_template=$aportsgit/$repo/.rootbld-repositories + local repo_template="$aportsgit/$repo/.rootbld-repositories" [ -s "$repo_template" ] || die "rootbld: $repo_template does not exist" ( for key in $(git config --list --name-only); do @@ -2254,7 +2268,7 @@ stripbin() { [ -e "$filename" ] || continue [ "$osabi" != "STANDALONE" ] || continue - local XATTR=$(getfattr --match="" --dump "${filename}") + local XATTR="$(getfattr --match="" --dump "${filename}")" "${stripcmd}" "${filename}" if [ -n "$XATTR" ]; then echo "$XATTR" | setfattr --restore=- @@ -2400,14 +2414,14 @@ snapshot() { [ -z "$disturl" ] && warning "Missing disturl in APKBUILD, auto uploading disabled." [ -z "$svnurl" ] && [ -z "$giturl" ] && die "Missing repository url in APKBUILD!" [ -n "$svnurl" ] && [ -n "$giturl" ] && die "You can only use a single repository!" - local _date=$(date +%Y%m%d) + local _date="$(date +%Y%m%d)" local _format="tar.gz" # remove any repositories left in srcdir abuild clean mkdir -p "$srcdir" && cd "$srcdir" # clone git repo and archive if [ -n "$giturl" ]; then - local _version=${verbase:-0}_git${_date} + local _version="${verbase:-0}_git${_date}" [ "$git" = "true" ] && die "Missing git! Install git to support git clone." local _rev="${reporev:-HEAD}" [ "$_rev" = "HEAD" ] && local _depth="--depth=1" @@ -2421,7 +2435,7 @@ snapshot() { fi # export svn repo and archive if [ -n "$svnurl" ]; then - local _version=${verbase:-0}_svn${_date} + local _version="${verbase:-0}_svn${_date}" command -v svn >/dev/null || \ die "Missing svn! Install subverion to support svn export." [ -n "$reporev" ] && local _rev="-r $reporev" @@ -49,8 +49,13 @@ do_bump() { name=${name#*/} [ "$pkgname" = "$name" ] \ || die "APKBUILD has different \$pkgname for $name" - type package | grep -q function \ - || die "missing package() for $name" + + ( + unset -f package || true + unalias package || true + . "$a" + PATH= type package >/dev/null 2>&1 + ) || die "missing package() for $name" cd "${a%/*}" section=${PWD%/*} @@ -130,7 +130,8 @@ fi args=$(for a; do p=$(any_buildscript "$a") || die "can't find APKBUILD for $a"; echo "$p"; done) [ $? -eq 0 ] || exit 1 oldifs=$IFS -IFS=$'\n' +IFS=" +" set -- $args IFS=$oldifs @@ -81,7 +81,7 @@ do_logging() # Log the command output eval $cmd echo - } >&$fd + } > $fd 2>&1 i=$(($i + 1)) done fi diff --git a/buildlab.in b/buildlab.in index b5129ff..e8d3d09 100644 --- a/buildlab.in +++ b/buildlab.in @@ -49,7 +49,7 @@ die() { } runpart() { - local part=$1 + local part="$1" msg "Running part $part" $part || die "$part failed" } diff --git a/newapkbuild.in b/newapkbuild.in index 7dcc2b5..85f838f 100644 --- a/newapkbuild.in +++ b/newapkbuild.in @@ -154,7 +154,7 @@ __EOF__ # Create new aport from templates newaport() { local newname="${1##*/}" - local pn=${newname%-[0-9]*} + local pn="${newname%-[0-9]*}" local pv local source= is_url "$1" && source="$1" diff --git a/run-tests.sh b/run-tests.sh index ff99a49..b74627c 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -141,16 +141,17 @@ newapkbuild_simple_test() { shift pattern=$1 shift - pushd "tests/newapkbuild" 1>/dev/null + cd "tests/newapkbuild" [ -d $name ] && rm -r $name newapkbuild -n $name $@ if [ $? -ne 0 ]; then fail $name + cd "$OLDPWD" return fi grep $pattern $name/APKBUILD 1>/dev/null expect_success $name - popd 1>/dev/null + cd "$OLDPWD" } @@ -163,10 +164,10 @@ newapkbuild_simple_test simplever 'pkgver=1.0' simplever-1.0 # $1 - test name (test-autoconf-pkg, etc) # $2 - the invocation expected ("./configure", "cmake", etc) newapkbuild_pkg_test() { - pushd "tests/newapkbuild" 1>/dev/null + cd "tests/newapkbuild" [ -d $1 ] && rm -r $1 newapkbuild "https://distfiles.adelielinux.org/source/newapkbuild-tests/$1-1.0.tar.xz" 1>/dev/null 2>/dev/null - popd 1>/dev/null + cd "$OLDPWD" if [ $? -ne 0 ]; then fail "$1: newapkbuild failed" else diff --git a/tests/abuild/checkroot1/APKBUILD b/tests/abuild/checkroot1/APKBUILD index 6165c55..e0c2532 100644 --- a/tests/abuild/checkroot1/APKBUILD +++ b/tests/abuild/checkroot1/APKBUILD @@ -13,7 +13,7 @@ subpackages="" source="" check() { - [ $UID -ne 0 ] || return 1 + [ "$(id -u)" -ne 0 ] || return 1 } package() { |