If you have a previous rpm package file, you can unzip it, for example, using it unrpmin a temporary directory and using diff -rit to compare the results.
Here is an example I made to illustrate between two versions of ncurses:
#!/bin/sh
failed() {
echo "? $*" >&2
exit 1
}
oldpkg=$(readlink -f "${1:-/tmp/ncurses6-6.0-20150926.x86_64.rpm}")
pkgname=$(rpm -qip "$oldpkg" 2>/dev/null | awk '/^Name .*:/ { print $3; exit 0; }')
[ -f "$oldpkg" ] || failed "no package file found: $oldpkg"
[ -n "$pkgname" ] || failed "no package name found in $oldpkg"
tempdir=$(mktemp -d "${TMPDIR:-/tmp}/pkgcompare.XXXXXX")
trap 'rm -rf "$tempdir"' EXIT ERR
unset CDPATH
mkdir -p "$tempdir"/{new-version,old-version}
cd "$tempdir/new-version" || exit
rpm -ql "$pkgname" | while :
do
read path
[ -z "$path" ] && break
[ -d "$path" ] && mkdir -p ".$path"
[ -f "$path" ] && mkdir -p "./${path%/*}"
[ -f "$path" ] && cp -p "$path" ".$path"
done
cd "$tempdir/old-version" || exit
rpm2cpio "$oldpkg" | cpio -i -d 2>/dev/null
cd $tempdir || exit
diff -r -u -N old-version new-version | diffstat
( diffstat, ):
bin/ncursesw6-config | 2 +-
include/ncursesw6/curses.h | 8 ++++----
include/ncursesw6/ncurses.h | 8 ++++----
lib64/libncurses++w6.so |binary
lib64/libncurses++w6.so.6 |binary
lib64/libncurses++w6.so.6.0 |binary
lib64/libncursesw6.so |binary
lib64/libncursesw6.so.6 |binary
lib64/libncursesw6.so.6.0 |binary
lib64/libtinfow6.so |binary
lib64/libtinfow6.so.6 |binary
lib64/libtinfow6.so.6.0 |binary
lib64/pkgconfig/formw6.pc | 2 +-
lib64/pkgconfig/menuw6.pc | 2 +-
lib64/pkgconfig/ncurses++w6.pc | 2 +-
lib64/pkgconfig/ncursesw6.pc | 2 +-
lib64/pkgconfig/panelw6.pc | 2 +-
lib64/pkgconfig/ticw6.pc | 2 +-
lib64/pkgconfig/tinfow6.pc | 2 +-
19 files changed, 16 insertions(+), 16 deletions(-)
, rpm; , , .