This commit is contained in:
Дмитрий Левин 2003-11-08 16:39:27 +00:00
parent 08e9323c9d
commit 3a742bc4a1

View File

@ -29,29 +29,8 @@ fi
cd "$RPM_BUILD_ROOT" cd "$RPM_BUILD_ROOT"
SHOW_METHODS= export VERIFY_ELF_RPATH=normal
add_show_methods() export VERIFY_ELF_TEXTREL=normal
{
if [ -z "$SHOW_METHODS" ]; then
SHOW_METHODS="$*"
else
SHOW_METHODS="$SHOW_METHODS,$*"
fi
}
export VERIFY_ELF_RPATH=
set_rpath_method()
{
VERIFY_ELF_RPATH="$1"
add_show_methods rpath="$1"
}
export VERIFY_ELF_TEXTREL=
set_textrel_method()
{
VERIFY_ELF_TEXTREL="$1"
add_show_methods textrel="$1"
}
for t in `printf %s "$RPM_VERIFY_ELF_METHOD" |tr , ' '`; do for t in `printf %s "$RPM_VERIFY_ELF_METHOD" |tr , ' '`; do
case "$t" in case "$t" in
@ -59,28 +38,28 @@ for t in `printf %s "$RPM_VERIFY_ELF_METHOD" |tr , ' '`; do
exit 0 exit 0
;; ;;
rpath) rpath)
set_rpath_method normal VERIFY_ELF_RPATH=normal
;; ;;
rpath=*) rpath=*)
set_rpath_method "${t#rpath=}" VERIFY_ELF_RPATH="${t#rpath=}"
;; ;;
textrel) textrel)
set_textrel_method normal VERIFY_ELF_TEXTREL=normal
;; ;;
textrel=*) textrel=*)
set_textrel_method "${t#textrel=}" VERIFY_ELF_TEXTREL="${t#textrel=}"
;; ;;
normal) normal)
set_rpath_method normal VERIFY_ELF_RPATH=normal
set_textrel_method normal VERIFY_ELF_TEXTREL=normal
;; ;;
strict) strict)
set_rpath_method strict VERIFY_ELF_RPATH=strict
set_textrel_method strict VERIFY_ELF_TEXTREL=strict
;; ;;
relaxed) relaxed)
set_rpath_method relaxed VERIFY_ELF_RPATH=relaxed
set_textrel_method relaxed #VERIFY_ELF_TEXTREL=relaxed
;; ;;
*) *)
echo "Unrecognized verify_elf method: $t" echo "Unrecognized verify_elf method: $t"
@ -95,6 +74,6 @@ done
: ${RPM_VERIFY_ELF_TOPDIR:=} : ${RPM_VERIFY_ELF_TOPDIR:=}
[ -d "$RPM_BUILD_ROOT$RPM_VERIFY_ELF_TOPDIR" ] || exit 0 [ -d "$RPM_BUILD_ROOT$RPM_VERIFY_ELF_TOPDIR" ] || exit 0
echo "Verifying ELF objects in $RPM_BUILD_ROOT$RPM_VERIFY_ELF_TOPDIR ($SHOW_METHODS)" echo "Verifying ELF objects in $RPM_BUILD_ROOT$RPM_VERIFY_ELF_TOPDIR (rpath=$VERIFY_ELF_RPATH,textrel=$VERIFY_ELF_TEXTREL)"
find .$RPM_VERIFY_ELF_TOPDIR -type f -print0 |xargs -r0 @RPMCONFIGDIR@/verify-elf find .$RPM_VERIFY_ELF_TOPDIR -type f -print0 |xargs -r0 @RPMCONFIGDIR@/verify-elf