[CMake] 'CPACK_RPM_PACKAGE_AUTOPROV' doesn't work when pack existing binaries with CPack

Domen Vrankar domen.vrankar at gmail.com
Mon Mar 28 13:00:10 EDT 2016


CPackRPM generates spec files from which it generates the packages
(just search for *.spec in your build directory). It is possible that
Autoprov or Autoreqprov is not set correctly. Another possibility is
that rpmbuild executed from within CPack is executed with different
parameters.

Please check for the differences between your spec file and the one
that is generated by CPackRPM. I can also do that myself if you
provide me with a minimal working spec file and commands that you used
for generating the correct package.

Thanks,
Domen

2016-03-28 8:22 GMT+02:00 Wang, Peng 1. (Nokia - CN/Hangzhou)
<peng.1.wang at nokia.com>:
> Thanks for your answer.
> Actually, I was trying this on RHEL, not ubuntu. rpmbuild and rpmdevtools are correctly installed in my machine, I've tested that to generate RPM with my spec file based on rpmbuild and rpmdevtools, it works, libraries information is generated in the 'PROVIDES' fields of the RPM package. But with cpack, it doesn't.
>
> Wang Peng (Rex)
> Seat: 21F
> HZ SE Team
> +86018605811125
>
> -----Original Message-----
> From: EXT Domen Vrankar [mailto:domen.vrankar at gmail.com]
> Sent: Friday, March 25, 2016 5:52 PM
> To: Wang, Peng 1. (Nokia - CN/Hangzhou) <peng.1.wang at nokia.com>
> Cc: cmake at cmake.org
> Subject: Re: [CMake] 'CPACK_RPM_PACKAGE_AUTOPROV' doesn't work when pack existing binaries with CPack
>
>> Does someone know why this "CPACK_RPM_PACKAGE_AUTOPROV" option doesn't take
>> effect? how can I make it auto generates these 'PROVIDES' information in the
>> RPM?  thanks for your time and it will be very appreciated if you can
>> provide some hints.
>
> CPackRPM relies on rpmbuild and other rpm tools to correctly create
> the package and rpm is not the most automation friendly beast because
> of its macro system.
>
> In cmake tests: Tests/RunCMake/CPack/RPM/DEPENDENCIES-specifics.cmake
> there is a comment
>
> # FIXME auto autoprov is not tested at the moment as Ubuntu 15.04 rpmbuild
> # does not use them correctly: https://bugs.launchpad.net/rpm/+bug/1475755
>
> I'm guessing that this is environment related (missing packages,
> failing/missing rpm macros, ...) as for the same version of rpmbuild
> installed on different Linux distros (each through their own package
> repository that came with the distro) it either worked or not and
> never told that it failed (you could see that only after inspecting
> the content of rpm package after it has already been created). I
> haven't looked deeper into it but perhaps you've stumbled across this
> as well.
>
> You could try to make the package on a different distro and see if it
> works there.
>
> Regards,
> Domen


More information about the CMake mailing list