<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 6 mars 2019 à 21:33, Stewart, Robert <<a href="mailto:Robert.Stewart@sig.com">Robert.Stewart@sig.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">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.<br><br></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
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:<br>
<br>
# We should generate a USER spec file template:<br>
# - either because the user asked for it : CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE<br>
# - or the user did not provide one : NOT CPACK_RPM_USER_BINARY_SPECFILE<br>
if(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE)<br>
set(RPMBUILD_FLAGS "-bb")<br></blockquote><div><br></div><div><br></div><div>I missed that. Do you mean that even though you </div><div>set(CPACK_RPM_USER_BINARY_SPECFILE /xxxx)</div><div><br></div><div>CPackRPM does not process the spec file with rpmbuild -bb ?</div><div><br></div><div>AFAIU from the source:</div><div><br></div><div>"-bb" flags are always setup when binary RPM is built.</div><div><a href="https://gitlab.kitware.com/cmake/cmake/blob/master/Modules/Internal/CPack/CPackRPM.cmake#L1658">https://gitlab.kitware.com/cmake/cmake/blob/master/Modules/Internal/CPack/CPackRPM.cmake#L1658</a><br></div><div><br></div><div>I am confused. Could restate the problem.</div><div><br></div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div></div></div></div>