[CMake] CPack DebugInfo RPM depend on runtime RPM

philip.clapham at bt.com philip.clapham at bt.com
Thu Oct 5 08:39:34 EDT 2017


Hi,

 

I'm successfully using Cmake version 3.9.1 (on CentOS 6.9) to build a C++
project, and then using CPack (from CMake) to build two RPMs, a RUNTIME and
a DEVEL. I have set the DEVEL to depend upon the RUNTIME using:

SET(CPACK_RPM_DEVEL_PACKAGE_REQUIRES "${PROJECT_NAME} ==
${FULL_VERSION}-${RELEASE_STRING}%{?dist}")

This works exactly how I want it to; requiring that the DEVEL package have
the exact same release version of RUNTIME installed. 

 

I also use:

SET(CPACK_RPM_RUNTIME_DEBUGINFO_PACKAGE ON)

To make a separate debuginfo RPM for the code in my runtime RPM. This also
works as intended, to a point. If a user has all three RPMs installed, then
everything is fine. They then learn an update (of all three RPMs) has been
placed in the repo, so they run 'sudo yum update myRpm-devel', knowing that
this will also update the runtime package. Unfortunately this doesn't update
the debuginfo package, so they are no longer in-sync.

 

I searched around and tried to use a
"CPACK_RPM_<COMPONENT_NAME>_DEBUGINFO_PACKAGE_REQUIRES" variable from CMake,
but it didn't work, and as I'm using CPack to generate my SPEC files I can't
see another way to modify them. CPack only generates two SPEC files, one for
the DEVEL and one for the RUNTIME, and the additional instructions to
generate the debuginfo are in the RUNTIME's SPEC file. 

 

Is there a way to set package-requires for debuginfo RPMs?

 

Thanks,

Phil

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20171005/d713745e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 7994 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake/attachments/20171005/d713745e/attachment.bin>


More information about the CMake mailing list