Specifically, under certain circumstances, it can dump debuginfo files into /usr/lib/debug and /usr/src/debug under your buildroot, neglect to build the corresponding -debuginfo package, and then have the gall to complain about the unpackaged files it dumped there.
I have a confession to make: I’m anal-retentive enough about the systems I administer where I need to build RPM packages for everything so they can be easily updated, but I’m lazy enough where I usually just grab source RPMs out of the most recent Fedora repositories and modify the specfiles until they work on CentOS 5. This can lead to some interesting issues, because RPM and rpmbuild are not quite the same in CentOS as they are in Fedora. Sometimes you’re never quite sure if something is a bugfix or a feature enhancement, and this was one of those lovely times.
This week, I got a request from a user to build a more recent version of gnuplot than the 4.0 version that ships with CentOS 5. Simple enough, right? I took the F13 SRPM, bumped the underlying source tarball to 4.4.1, made a couple of config fixes for the distro change and version bump, and then fired up Mock to build it for CentOS. It would build successfully, and the RPM packaging would bomb out with errors like the following in Mock’s build.log:
RPM build errors: Installed (but unpackaged) file(s) found: /usr/lib/debug/usr/bin/gnuplot-minimal.debug /usr/lib/debug/usr/bin/gnuplot-wx.debug /usr/lib/debug/usr/libexec/gnuplot/4.4/gnuplot_x11.debug /usr/src/debug/gnuplot-4.4.1/src/alloc.c /usr/src/debug/gnuplot-4.4.1/src/axis.c /usr/src/debug/gnuplot-4.4.1/src/axis.h ...
It took me two to three days of looking at this issue off and on to determine that the problem was related to a single innocuous line buried deep inside the package spec:
Interestingly, this was on a subpackage, which apparently is enough to trip up rpmbuild for all packages listed in the spec.
After removing that line, the -debuginfo was generated fine.
In short: on older rpmbuild versions, don’t build arch-specific binary packages that have noarch subpackages. This does work fine on newer rpmbuild versions.
Hope this helps somebody, somewhere.