git: f0f863b1a2d6 - main - Mk/Scripts/qa.sh: readelf 1 file a time, baselibs()
Baptiste Daroussin <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.cvs.ports |
|---|---|
| Message-ID | <[email protected]> |
The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/ports/commit/?id=f0f863b1a2d650ba2a3dfbff29fc057dad99c5f9 commit f0f863b1a2d650ba2a3dfbff29fc057dad99c5f9 Author: Matthias Andree <[email protected]> AuthorDate: 2026-07-18 20:10:01 +0000 Commit: Baptiste Daroussin <[email protected]> CommitDate: 2026-08-17 08:25:34 +0000 Mk/Scripts/qa.sh: readelf 1 file a time, baselibs() ...to repair detection of libssl/libcrypto usage inside a port, to avoid a bogus "you may not need USES=ssl" warning from stage-qa in ports that have USES=ssl and that do dynamically link against libcrypto.so or libssl.so. The cause is that the script currently feeds many files to readelf -d, in lexiographical order from find -s, and might feed non-ELF executables, such as scripts. In that case, readelf aborts without looking at any other file, and the error message is sent 2>/dev/null, we and may miss those files later in the list that do use crypto/ssl. Fix: feed files individually to readelf -d to make sure it really looks at each of them. PR: 296889 Fixes: cfff850 Make baselibs QA check non recursive and activate it again (The ldd -a used before the earlier more lenient and would process all files.) --- Mk/Scripts/qa.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mk/Scripts/qa.sh b/Mk/Scripts/qa.sh index 523519e08a2f..d47478924a87 100644 --- a/Mk/Scripts/qa.sh +++ b/Mk/Scripts/qa.sh @@ -136,7 +136,7 @@ baselibs() { ;; esac done <<-EOF - $(list_stagedir_elfs -exec readelf -d {} + 2>/dev/null) + $(list_stagedir_elfs -exec readelf -d {} \; 2>/dev/null) EOF if ! list_stagedir_elfs | egrep -q 'lib(crypto|ssl).so*'; then