[arch-projects] [PATCH] [devtools] Fix soname checking
This makes soname checking much more robust and is explicit when a soname change is found. --- checkpkg.in | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/checkpkg.in b/checkpkg.in index ccbbecd..6078e59 100644 --- a/checkpkg.in +++ b/checkpkg.in @@ -64,10 +64,20 @@ for _pkgname in "${pkgname[@]}"; do sdiff -s "$TEMPDIR/filelist-$_pkgname-old" "$TEMPDIR/filelist-$_pkgname" if diff "$TEMPDIR/filelist-$_pkgname"{-old,} | grep '\.so' &>/dev/null; then - mkdir -p "$TEMPDIR/pkg" - bsdtar -x -C "$TEMPDIR" -f "$pkgfile" #> /dev/null - comm -13 <(sort "$TEMPDIR/filelist-$_pkgname-old") <(sort "$TEMPDIR/filelist-$_pkgname") | grep .so$ | while read i; do - echo "${i}: " "$(objdump -p "$TEMPDIR/$i" | grep SONAME)" + mkdir -p "$TEMPDIR/pkg" "$TEMPDIR/pkg-old" + bsdtar -x -C "$TEMPDIR/pkg" -f "$pkgfile" #> /dev/null + bsdtar -x -C "$TEMPDIR/pkg-old" -f "$oldpkg" #> /dev/null + comm -2 "$TEMPDIR/filelist-$_pkgname-old" "$TEMPDIR/filelist-$_pkgname" | grep '\.so$' | while read i; do + oldsoname="$(objdump -p "$TEMPDIR/pkg-old/$i" | awk '/SONAME/ {print $2}')" + if [[ -e "$TEMPDIR/pkg/$i" ]]; then + newsoname="$(objdump -p "$TEMPDIR/pkg/$i" | awk '/SONAME/ {print $2}')" + else + newsoname="MISSING" + fi + if [[ $oldsoname != $newsoname ]]; then + msg "SONAMES differ!" + printf "$i\n\tOld: %s\n\tNew: %s\n" "$oldsoname" "$newsoname" + fi done else msg "No soname differences for $_pkgname." -- 2.1.0
participants (1)
-
Doug Newgard