how do I display file permissions of rpm internal contents

Here's a way that shows you permissions "like ls does":

 $ rpm -q --qf "[%-15{=NAME} %-36{FILENAMES} %{FILEMODES:perms}\n]" -p $FILENAME
 FILENAME            /etc/pam.d/sudo                      -rw-r--r--
 FILENAME            /etc/file/name/here                  -rw-r--r--
 ....

ref


On CentOS 6 and 7, adding the -l and -v options to -qp seems to be enough:

$ rpm -qpl golang-vet-0-1.0.hgd32b5854c941.el7.x86_64.rpm
/usr/bin/vet
/usr/lib/golang/pkg/tool/linux_amd64/vet
$ rpm -qplv golang-vet-0-1.0.hgd32b5854c941.el7.x86_64.rpm
-rwxr-xr-x    1 root    root                  5764251 Aug 21  2014 /usr/bin/vet
lrwxrwxrwx    1 root    root                       12 Aug 21  2014 /usr/lib/golang/pkg/tool/linux_amd64/vet -> /usr/bin/vet
$ rpm --version
RPM version 4.11.3

The --dump option to rpm gives you this information (as well as other information).

rpm -qp --dump "$RPM_PACKAGE_FILENAME"

Tags:

Rpm