From e257340a1e4c53fcb5f630d0b27805be472e4618 Mon Sep 17 00:00:00 2001 From: Pavol Sloboda Date: Tue, 14 Apr 2026 08:38:46 +0200 Subject: [PATCH] Added the fix for the failing tests on ppc64le by working around the libtool wrapper that adds the `lt-` prefix to binaries not yet installed on the system which causes the (namely the bsdcpio test_basic.c test) tests to fail since they expect exact error output which cannot be achieved if the binary name conatins the prefix Author: Kiran Belle Related: RHEL-157397 --- libarchive.spec | 11 +++++++++++ 1 file changed, 11 insertions(+) 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