aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-06-17 04:43:29 -0400
committerB. Watson <urchlay@slackware.uk>2023-06-17 04:43:29 -0400
commit695d606224bc3dae5a2aa96581d1af49310822b2 (patch)
treee65548049fcc383f5f98af5a4ca3f405bff1917a
parentc8407a74a3013f09495edba29705c7b481e46f19 (diff)
downloadsbo-maintainer-tools-695d606224bc3dae5a2aa96581d1af49310822b2.tar.gz
sbopkglint: spaces in filenames WIP #9.
-rw-r--r--sbopkglint.d/15-noarch.t.sh10
-rw-r--r--sbopkglint.d/pre-doinst.sh2
2 files changed, 7 insertions, 5 deletions
diff --git a/sbopkglint.d/15-noarch.t.sh b/sbopkglint.d/15-noarch.t.sh
index 7480ba8..1d4c0fc 100644
--- a/sbopkglint.d/15-noarch.t.sh
+++ b/sbopkglint.d/15-noarch.t.sh
@@ -10,13 +10,15 @@
# 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 )"
+find . -type f -print0 | xargs -0 file -m /etc/file/magic/elf | grep ELF | cut -d: -f1 | xargs -d "\n" ls -lb > .elfbins.$$
if [ "$ARCH" = "noarch" ]; then
- [ -n "$elfbins" ] && \
+ [ -s .elfbins.$$ ] && \
warn "package claims to be noarch, but contains ELF binaries:" && \
- ls -l $elfbins
-elif [ -z "$elfbins" ] && [ ! -e usr/lib ] && [ ! -e usr/lib64 ]; then
+ cat .elfbins.$$
+elif [ ! -s .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
+
+rm -f .elfbins.$$
diff --git a/sbopkglint.d/pre-doinst.sh b/sbopkglint.d/pre-doinst.sh
index 5beb6a2..24a5815 100644
--- a/sbopkglint.d/pre-doinst.sh
+++ b/sbopkglint.d/pre-doinst.sh
@@ -35,6 +35,6 @@ if [ -d usr/share/fonts ]; then
fi
find_warnfiles "package contains actual symlinks:" \
- find -P . -type l
+ -P . -type l
[ -f install/slack-desc ] || warn "required file install/slack-desc is missing"