[CMake] Building cmake-3.0.0 rpm on CentOS 7.0 using cmake/cpack

Zack Perry zack.perry at sbcglobal.net
Tue Jul 29 13:00:56 EDT 2014


RHEL 7.0 (and its free rebuilds, e.g. CentOS 7.0) is bundled with newer rpm which rigorously checks whether a package declare system directories or not. If a package does, then it would issue an error like what's shown below:

Transaction check error: file /usr from install of cmake-3.0.0-1.x86_64 conflicts with file from package filesystem-3.2-18.el7.x86_64 file /usr/bin from install of cmake-3.0.0-1.x86_64 conflicts with file from package filesystem-3.2-18.el7.x86_64 file /usr/share from install of cmake-3.0.0-1.x86_64 conflicts with file from package filesystem-3.2-18.el7.x86_64 file /usr/share/aclocal from install of cmake-3.0.0-1.x86_64 conflicts with file from package filesystem-3.2-18.el7.x86_64
So, I have done a 2 step bootstrapping:
0. use cmake 2.8.11 to build a cmake-3.0.0 rpm, rpmrebuild -pe to edit the rpm, and install the "fixed" rpm
1. use the installed "fixed" cmake-3.0.0 rpm to rebuild cmake-3.0.0 and regenerate a RPM.

Alas, the resulting RPM still has the /usr/share/aclocal declared in the %files section ;(  I tried to define the following variable at a few different places and tried them all. Same issue :(

CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST

What is the right way to exclude /usr/share/aclocal?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140729/8554d685/attachment.html>


More information about the CMake mailing list