[CMake] Custom RPM build failing for want of RPMBUILD_FLAGS
Eric Noulard
eric.noulard at gmail.com
Fri Mar 22 07:56:42 EDT 2019
Le mer. 6 mars 2019 à 21:33, Stewart, Robert <Robert.Stewart at sig.com> a
écrit :
> We've recently upgraded CMake from 2.8+ to 3.5+ (different versions on
> different platforms). In so doing, our CMake invocation of CPack to create
> RPMs now fails and I'm hoping someone can help. I have a spec file and I
> want to run rpmbuild -bb, but I can't figure out how to do it.
>
>
>
> The result is that my attempt to port to the all-variable approach failed,
> so I'm setting CPACK_RPM_USER_BINARY_SPECFILE to refer to my spec file as
> before. Unfortunately, when I do so, CPackRPM.cmake doesn't set
> RPMBUILD_FLAGS, and that leads to rpmbuild doing nothing useful. The issue
> is in the following code:
>
> # We should generate a USER spec file template:
> # - either because the user asked for it :
> CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
> # - or the user did not provide one : NOT
> CPACK_RPM_USER_BINARY_SPECFILE
> if(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT
> CPACK_RPM_USER_BINARY_SPECFILE)
> set(RPMBUILD_FLAGS "-bb")
>
I missed that. Do you mean that even though you
set(CPACK_RPM_USER_BINARY_SPECFILE /xxxx)
CPackRPM does not process the spec file with rpmbuild -bb ?
AFAIU from the source:
"-bb" flags are always setup when binary RPM is built.
https://gitlab.kitware.com/cmake/cmake/blob/master/Modules/Internal/CPack/CPackRPM.cmake#L1658
I am confused. Could restate the problem.
--
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190322/23ad698f/attachment.html>
More information about the CMake
mailing list