Test binaries from custom packages during the build (#133)

This commit is contained in:
fdupoux 2020-08-05 20:03:43 +01:00
parent 4c5f6f581a
commit e039170e31
2 changed files with 28 additions and 0 deletions

View file

@ -71,6 +71,9 @@ fi
# Update pacman.conf
sed -i -e '/# ==== BEGIN customrepos ====/,/# ==== END customrepos ====/d' /etc/pacman.conf
# Check for issues with binaries
/usr/bin/check-binaries.sh
# Customizations
/usr/bin/updatedb

View file

@ -0,0 +1,25 @@
#!/bin/bash
errcnt=0
for curfile in /usr/bin/{*btrfs*,*xfs*,featherpad,ms-sys,nwipe,udp*,whdd,zerofree} /opt/firefox*/firefox*
do
test -x ${curfile} || continue
file --mime ${curfile} | grep -q x-pie-executable || continue
if ldd ${curfile} | grep -q -F 'not found'
then
echo "ERROR: Program ${curfile} is missing libraries"
ldd ${curfile}
errcnt=$((errcnt + 1))
fi
done
if [ ${errcnt} -eq 0 ]
then
echo "SUCCESS: Have not found any missing library"
exit 0
else
echo "FAILURE: Have found ${errcnt} issues"
exit 1
fi