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

Wang, Peng 1. (Nokia - CN/Hangzhou) peng.1.wang at nokia.com
Mon Mar 28 02:22:14 EDT 2016


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