diff options
author | B. Watson <yalhcru@gmail.com> | 2022-04-04 14:07:14 -0400 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2022-04-04 14:07:14 -0400 |
commit | 533599f74e56dc42bdac215e2d152f9769b6b56e (patch) | |
tree | 9a8d349d138937a7c2880589ae16078b68f4009e /sbopkglint.d/15-noarch.t.sh | |
download | sbo-maintainer-tools-533599f74e56dc42bdac215e2d152f9769b6b56e.tar.gz |
initial commit
Diffstat (limited to 'sbopkglint.d/15-noarch.t.sh')
-rw-r--r-- | sbopkglint.d/15-noarch.t.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sbopkglint.d/15-noarch.t.sh b/sbopkglint.d/15-noarch.t.sh new file mode 100644 index 0000000..55c17f6 --- /dev/null +++ b/sbopkglint.d/15-noarch.t.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# sbopkglint test, must be sourced by sbopkglint (not run standalone). + +# PKG, PRGNAM, VERSION, ARCH are set by sbopkglint. also the current +# directory is the root of the installed package tree. + +######################################################################## +# makes sure "noarch" packages really are noarch. + +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 +fi |