Created attachment 241047 [details] patch Currently the 'stripped' check always skips the first unstripped file. It uses the "find [...] -exec sh -c 'readelf -S -- /dev/null $0 "$@" || :' -- {} +" command. When arguments are passed to shell like this: "sh -c 'script' arg1 arg2 arg3" - $@ within the script is assigned to 'arg2 arg3', and $0 is assigned to arg1. This is a quirk in how shells handle arguments in case when the script is passed using -c. The attached script adds $0 to account for the first passed file.
It looks good to me. Go ahead with `Approved by: portmgr-lurkers (garga)`
Committed, thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=67ce8cec004c85caeee5a6e965bd10f872e1b895 commit 67ce8cec004c85caeee5a6e965bd10f872e1b895 Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2023-06-02 06:40:46 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2023-06-02 06:45:29 +0000 Mk/Scripts: Fix the 'stripped' check from 'make check-plist' to report all unstripped files Prior to this patch, the 'stripped' check always skipped the first unstripped file. It uses the "find [...] -exec sh -c 'readelf -S -- /dev/null $0 "$@" || :' -- {} +" command. When arguments are passed to shell like this: "sh -c 'script' arg1 arg2 arg3" - $@ within the script is assigned to 'arg2 arg3', and $0 is assigned to arg1. This is a quirk in how shells handle arguments in case when the script is passed using -c. This patch adds $0 to account for the first passed file. PR: 270398 Approved by: portmgr-lurkers (garga) Mk/Scripts/qa.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=c92e6eff6f2c3dcdfb2340f66dd3eb374e28075b commit c92e6eff6f2c3dcdfb2340f66dd3eb374e28075b Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2023-06-05 15:21:32 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2023-06-05 15:24:03 +0000 Mk/Scripts: Add quotes to $0 in the stripped() function in qa.sh This is a followup to the previous patch that fixed the bug with missing unstripped file suggestions. PR: 270398 Suggested by: mat@ Mk/Scripts/qa.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)