Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

There is something strange with RPM packages. The listed contents, enumerated by rpm -ql differ from the actually presented files. For instance, I downloaded a openldap-servers-2.4.26-8.fc16.i686.rpm and ran the one-liner:

rpmfile=openldap-servers-2.4.26-8.fc16.i686.rpm; diff <(rpm2cpio $rpmfile | cpio -t | sed -e 's!^\.!!g') <(rpm -ql -p $rpmfile)

It compares the contents of the rpm unpacked by rpm2cpio with output from rpm -ql

And got:

9122 blocks
20a21,22
> /etc/openldap/slapd.conf
> /etc/openldap/slapd.conf.bak
21a24
> /etc/pki/tls/certs/slapd.pem

rpm -ql states that there are 3 files in the package which actually are absent.
Is there an explanation for that?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

RPM packages are built using a .spec file that contains various sections that tell rpm what to do as it installs your package. The files that you are seeing are most likely being created on the fly by rpm as it installs the openldap package. The rpm -ql command is actually reading the .spec file and telling you exactly what will be installed, while the cpio command is just dumping a list of files that are archived in the .rpm. If you're really curious you can download openldap-2.4.26-8.fc16.src.rpm, install it and look at the .spec file for yourself, it's pretty straight forward to read. Careful building though, an incorrect path combined with running rpmbuild as root can really ruin your day.

share|improve this answer
    
Thank you. I have already examine source package and post install scripts. You are right. It is "temp" files for creatig initial slapd.d config. –  dchirikov Jan 13 '13 at 11:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.