brp-verify_elf: handle all rules for setting LD_PRELOAD in the form of pairs of RPM_LD_PRELOAD_@ and RPM_FILES_TO_LD_PRELOAD_@ env vars

This commit is contained in:
Ivan Zakharyaschev 2016-03-28 21:43:41 +03:00
parent 9d2611ea44
commit e124ef0b4c

View File

@ -1,4 +1,4 @@
#!/bin/sh -e
#!/bin/sh -ef
#
# brp-verify_elf - verify ELF objects.
#
@ -139,6 +139,17 @@ while IFS=$'\t' read -r f t; do
$skip) continue 2 ;;
esac
done
printf '%s\n' "$f"
VERIFY_ELF_LD_PRELOAD=
for rule in ${!RPM_LD_PRELOAD_@}; do
pats="${rule/#RPM/RPM_FILES_TO}"
for pat in ${!pats}; do
case "${f#.}" in
$pat) VERIFY_ELF_LD_PRELOAD="$VERIFY_ELF_LD_PRELOAD ${!rule}"
break
;;
esac
done
done
printf '%s\t%s\n' "$f" "$VERIFY_ELF_LD_PRELOAD"
done |
@RPMCONFIGDIR@/verify-elf