[CMake] Debuginfo builds and CPack RPM support

Joe Nardone jnardone at gmail.com
Mon Dec 3 13:31:14 EST 2012


I'm struggling to figure out the right way to support debuginfo packages
using CPack RPMs.  (Debuginfo packages contain the debug symbols from
binaries that are otherwise stripped.)

The canonical way on conformant platforms is to include %debug_package in
the SPEC file, which triggers a number of actions, namely to
find-debuginfo.sh (which creates the debug files and generates a
sub-package in the RPM spec that includes this.)

However, CPack's RPM generator does not play nice with this.  Since it has
a fixed RPM name and not a template, what ends up happening is the
sub-package overwrites the main installer (using the same name).  Attempts
to change the rpm name to a template confuse the upstream CPack, which
assumes a single installer with the same name as it provided to the
module.

You can't really use installer components here because the debug info
generation assumes an install-type tree to work with, which only happens
during packaging.  I don't see a way to identify all of the things that
*would* be installed prior to actual install from inside CMake.

Is anyone doing this now?  Is there a way to have a single .spec file
generate multiple RPMs that plays nice with CPack?  Or is there an
alternate way to generate debuginfo packages for RPM platforms within the
confines of CMake/CPack?

joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121203/bb5aa8ab/attachment.htm>


More information about the CMake mailing list