diff --git a/libarchive.spec b/libarchive.spec index d7493f5..8b62a75 100644 --- a/libarchive.spec +++ b/libarchive.spec @@ -181,6 +181,17 @@ cat_logs () run_testsuite () { rc=0 + # Workaround: libtool wrappers (e.g. ./bsdcpio) copy the real binary from + # .libs/bsdcpio to .libs/lt-bsdcpio and execute that, so argv[0] becomes + # "lt-bsdcpio". On filesystems with large inode numbers (e.g. ppc64le), + # cpio newc format tests emit truncation warnings containing the program + # name and fail because they expect "bsdcpio:" but get "lt-bsdcpio:". + # Fix by patching the wrapper scripts to not use the lt- prefix. + for f in bsdcpio bsdtar bsdcat bsdunzip; do + if [ -f "$f" ] && grep -q "lt-$f" "$f" 2>/dev/null; then + sed -i "s|lt-$f|$f|g" "$f" + fi + done %make_build check -j1 || { # error happened - try to extract in koji as much info as possible cat_logs