These steps are from a box running CentOS 6.5. I merely tried converting a RPM package to a CPIO archive and was surprised to find files listed in the RPM but absent from the archive. Here are the steps taken.
List out paths in the RPM:
$ rpm -qlp sssd-1.9.2-82.4.el6_4.x86_64.rpm | sort > rpm.lst
Convert the RPM to a CPIO archive:
$ rpm2cpio sssd-1.9.2-82.4.el6_4.x86_64.rpm > sssd-1.9.2-82.4.el6_4.x86_64.cpio
Save the list of files in the archive. The sed
filter is required to remove leading dot entries from pathnames. This is not required for the RPM listing.
$ cpio -i -t < sssd-1.9.2-82.4.el6_4.x86_64.cpio | sed -e 's|^.||' | sort > cpio.lst
Finally, the diff showing missing files:
$ diff -u cpio.lst rpm.lst
--- cpio.lst 2015-07-16 19:54:06.020494348 +0530
+++ rpm.lst 2015-07-16 19:53:38.012494371 +0530
@@ -2,6 +2,7 @@
/etc/rc.d/init.d/sssd
/etc/rwtab.d/sssd
/etc/sssd
+/etc/sssd/sssd.conf
/usr/bin/sss_ssh_authorizedkeys
/usr/bin/sss_ssh_knownhostsproxy
/usr/lib64/ldb/modules/ldb/memberof.so
@@ -102,6 +103,8 @@
/var/lib/sss
/var/lib/sss/db
/var/lib/sss/mc
+/var/lib/sss/mc/group
+/var/lib/sss/mc/passwd
/var/lib/sss/pipes
/var/lib/sss/pipes/private
/var/lib/sss/pubconf
Why are there files present in the RPM but missing in the CPIO archive? My interest was especially in /etc/sssd/sssd.conf
because I wanted to look at a sample config file. We are using a sssd
package that is older then the one coming from CentOS. I repeated the steps above with the package from CentOS. The result was the same.