From 8dfeeaccc2e5774f1c0650efbcf750bcc9eb1c8a Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Thu, 28 Apr 2022 15:45:29 -0400 Subject: sbolint: fix tarball handling, relax SlackBuild perms check. sbopkglint: recommend noarch. --- sbopkglint.d/15-noarch.t.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'sbopkglint.d/15-noarch.t.sh') diff --git a/sbopkglint.d/15-noarch.t.sh b/sbopkglint.d/15-noarch.t.sh index 55c17f6..7480ba8 100644 --- a/sbopkglint.d/15-noarch.t.sh +++ b/sbopkglint.d/15-noarch.t.sh @@ -7,8 +7,16 @@ ######################################################################## # makes sure "noarch" packages really are noarch. +# for packages that aren't noarch, recommend noarch if it looks like one. +# the recommendation is not an error! + +elfbins="$( find * -type f -print0 | xargs -0 file -m /etc/file/magic/elf | grep ELF | cut -d: -f1 )" if [ "$ARCH" = "noarch" ]; then - elfbins="$( find * -type f -print0 | xargs -0 file -m /etc/file/magic/elf | grep ELF | cut -d: -f1 )" - [ -n "$elfbins" ] && warn "package claims to be noarch, but contains ELF binaries:" && ls -l $elfbins + [ -n "$elfbins" ] && \ + warn "package claims to be noarch, but contains ELF binaries:" && \ + ls -l $elfbins +elif [ -z "$elfbins" ] && [ ! -e usr/lib ] && [ ! -e usr/lib64 ]; then + x="$( find usr/share/pkgconfig -type f -exec grep 'usr/lib' {} \+ 2>/dev/null )" + [ -z "$x" ] && note "package might be a good candidate for noarch" fi -- cgit v1.2.3