>>> libwhich: Building testing/libwhich 1.1.0-r0 (using abuild 3.9.0-r0) started Sun, 22 May 2022 22:45:10 +0000 >>> libwhich: Checking sanity of /home/buildozer/aports/testing/libwhich/APKBUILD... >>> libwhich: Analyzing dependencies... >>> libwhich: Installing for build: build-base sed zlib-dev (1/3) Installing sed (4.8-r0) (2/3) Installing zlib-dev (1.2.12-r1) (3/3) Installing .makedepends-libwhich (20220522.224512) Executing busybox-1.35.0-r13.trigger OK: 332 MiB in 102 packages >>> libwhich: Cleaning up srcdir >>> libwhich: Cleaning up pkgdir >>> libwhich: Fetching https://distfiles.alpinelinux.org/distfiles/edge/libwhich-1.1.0.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 146 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (22) The requested URL returned error: 404 >>> libwhich: Fetching https://github.com/vtjnash/libwhich/archive/v1.1.0/libwhich-1.1.0.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 7211 0 7211 0 0 16555 0 --:--:-- --:--:-- --:--:-- 440k >>> libwhich: Fetching https://distfiles.alpinelinux.org/distfiles/edge/libwhich-1.1.0.tar.gz >>> libwhich: Checking sha512sums... libwhich-1.1.0.tar.gz: OK make-install.patch: OK >>> libwhich: Unpacking /var/cache/distfiles/edge/libwhich-1.1.0.tar.gz... >>> libwhich: make-install.patch patching file Makefile gcc -std=gnu99 -D_GNU_SOURCE -Wall -pedantic -O2 -Os -fomit-frame-pointer -Os -fomit-frame-pointer -c -o libwhich.o libwhich.c gcc libwhich.o -o libwhich -ldl -Wl,--as-needed,-O1,--sort-common ./test-libwhich.sh # set pipefail, if possible (running in bash), for additional error detection (set -o pipefail) 2>/dev/null && set -o pipefail # implement `mispipe "$@" "$ICONV"` for a posix shell dotest() { ( ( ( ( (exec 4>&- 3>&-; "$@"); echo $? >&3; ) | $ICONV >&4; ) 3>&1; ) | (read xs; exit $xs); ) 4>&1; } ## tests for failures ## S=`dotest ./libwhich` [ $? -eq 1 ] || exit 1 echo RESULT: $S RESULT: expected 1 argument specifying library to open (got 0) [ "$S" = "expected 1 argument specifying library to open (got 0)" ] || exit 1 S=`dotest ./libwhich '' 2` [ $? -eq 1 ] || exit 1 echo RESULT: $S RESULT: expected first argument to specify an output option: -p library path -a all dependencies -d direct dependencies [ "$S" = "expected first argument to specify an output option: -p library path -a all dependencies -d direct dependencies" ] || exit 1 S=`dotest ./libwhich 1 2\ 3 '4 5'` [ $? -eq 1 ] || exit 1 echo RESULT: $S RESULT: expected 1 argument specifying library to open (got 3) [ "$S" = "expected 1 argument specifying library to open (got 3)" ] || exit 1 S=`dotest ./libwhich not_a_library` [ $? -eq 1 ] || exit 1 echo RESULT: $S RESULT: failed to open library: Error loading shared library not_a_library: No such file or directory S1=`echo $S | $SED -e 's!^failed to open library: .*\.*$!ok!'` echo "$S1" ok [ "$S1" = "ok" ] || exit 1 ## tests for successes ## set -e # exit on error ### tests for script usages ### dotest ./libwhich -a libz.$SHEXT | $XARGS -0 echo > /dev/null # make sure the files are valid (suppress stdout) S=`dotest ./libwhich -p libz.$SHEXT` echo RESULT: $S RESULT: /lib/libz.so [ -n "$S" ] || exit 1 S=$(dotest ./libwhich -a libz.$SHEXT | $GREP -aF "$S") # make sure -p appears in the -a list echo RESULT: $S RESULT: /lib/libz.so [ -n "$S" ] || exit 1 S=`dotest ./libwhich -a libz.$SHEXT | $SED -e 's/\x00.*//'` # get an existing (the first) shared library path echo RESULT: $S RESULT: /lib/ld-musl-x86_64.so.1 [ -n "$S" ] || exit 1 stat "$S" File: /lib/ld-musl-x86_64.so.1 Size: 604704 Blocks: 1184 IO Block: 4096 regular file Device: fd01h/64769d Inode: 20972812 Links: 1 Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2022-05-22 14:32:46.638780938 +0000 Modify: 2022-04-08 05:38:28.000000000 +0000 Change: 2022-04-08 05:41:17.091592297 +0000 LIB=$S # save it for later usage S=`dotest ./libwhich -p "$LIB"` # test for identity echo RESULT: $S RESULT: /lib/ld-musl-x86_64.so.1 [ "$S" = "$LIB" ] || exit 1 S=`dotest ./libwhich -a "$LIB" | ${XARGS} -0 echo` # use xargs echo to turn \0 into spaces echo RESULT: "$S" RESULT: /lib/ld-musl-x86_64.so.1 [ -n "$S" ] || exit 1 S=`dotest ./libwhich -d "$LIB" | ${XARGS} -0 echo` # check that it didn't load anything else echo RESULT: $S RESULT: [ -z "$S" ] || exit 1 ### tests for command line ### S=`dotest ./libwhich "$LIB"` echo RESULT: $S RESULT: library: /lib/ld-musl-x86_64.so.1 dependencies: /lib/ld-musl-x86_64.so.1 S1=`! echo "$S" | $GREP '^+'` [ $? -eq 0 ] || exit 1 [ -z "$S1" ] || exit 1 if [ "$TARGET" = "WINNT" ]; then S2=`echo $S | $SED -e 's!^library: [A-Za-z]:\\\\[^ ]\+ dependencies: [A-Za-z]:\\\\.*!ok!'` else S2=`echo $S | $SED -e 's!^library: /[^ ]\+ dependencies: /.*$!ok!'` fi [ "$S2" = "ok" ] || exit 1 S=`dotest ./libwhich libz.$SHEXT` echo RESULT: $S RESULT: library: /lib/libz.so dependencies: /lib/ld-musl-x86_64.so.1 + /lib/libz.so S1a=`echo "$S" | $GREP '^+'` if [ "$TARGET" = "WINNT" ]; then S1b=`echo "$S" | $GREP '^+ [A-Za-z]:\\\\.*\(libz\|msvcrt\).*'` else S1b=`echo "$S" | $GREP '^+ /.*libz.*'` fi [ -n "$S1a" ] || exit 1 [ "$S1a" = "$S1b" ] || exit 1 if [ "$TARGET" = "WINNT" ]; then S2=`echo $S | $SED -e 's!^library: [A-Za-z]:\\\\[^ ]*libz[^ ]* dependencies: [A-Za-z]:\\\\.*libz.*$!ok!'` else S2=`echo $S | $SED -e 's!^library: /[^ ]*libz[^ ]* dependencies: /.*libz.*$!ok!'` fi [ "$S2" = "ok" ] || exit 1 ## finished successfully ## echo "SUCCESS" SUCCESS >>> libwhich: Entering fakeroot... mkdir -p /home/buildozer/aports/testing/libwhich/pkg/libwhich/usr/bin install -m755 libwhich /home/buildozer/aports/testing/libwhich/pkg/libwhich/usr/bin/libwhich >>> libwhich*: Running postcheck for libwhich >>> libwhich*: Preparing package libwhich... >>> libwhich*: Stripping binaries >>> libwhich*: Scanning shared objects >>> libwhich*: Tracing dependencies... so:libc.musl-x86_64.so.1 >>> libwhich*: Package size: 28.0 KB >>> libwhich*: Compressing data... >>> libwhich*: Create checksum... >>> libwhich*: Create libwhich-1.1.0-r0.apk >>> libwhich: Build complete at Sun, 22 May 2022 22:45:13 +0000 elapsed time 0h 0m 3s >>> libwhich: Cleaning up srcdir >>> libwhich: Cleaning up pkgdir >>> libwhich: Uninstalling dependencies... (1/3) Purging .makedepends-libwhich (20220522.224512) (2/3) Purging sed (4.8-r0) Executing sed-4.8-r0.post-deinstall (3/3) Purging zlib-dev (1.2.12-r1) Executing busybox-1.35.0-r13.trigger OK: 332 MiB in 99 packages >>> libwhich: Updating the testing/x86_64 repository index... >>> libwhich: Signing the index...