mirror of
https://github.com/nchevsky/systemrescue-zfs.git
synced 2026-01-04 07:40:25 +01:00
Test binaries from custom packages during the build (#133)
This commit is contained in:
parent
4c5f6f581a
commit
e039170e31
|
|
@ -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
|
||||
|
||||
|
|
|
|||
25
airootfs/usr/bin/check-binaries.sh
Executable file
25
airootfs/usr/bin/check-binaries.sh
Executable 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
|
||||
Loading…
Reference in a new issue