Description of problem: As of rpm 4.10, different permissions for a directory are now considered a conflict. And cmake built packages are trying to own system directories, which is bad. See this for reference: https://bugzilla.redhat.com/show_bug.cgi?id=870655 Version-Release number of selected component (if applicable): cmake-2.8.10.2-1 rpm-4.10.2-1 How reproducible: Every time you build a rpm package with cmake Steps to Reproduce: Build a package with cmake ($ make package). Look at package %files in _CPack_Packages/Linux/RPM/SPECS/$package.spec Actual results: You'll find a bunch of system directories like: %dir "/usr" %dir "/usr/share" %dir "/usr/lib64" %dir "/usr/bin" Expected results: No system dirs Additional info: I guess the problem lays in /usr/share/cmake/Modules/CPackRPM.cmake around line 669 We should filter CPACK_RPM_INSTALL_FILES for system directories or get the permissions correctly.
I'm afraid that this really needs to be brought directly upstream. http://public.kitware.com/Bug
Done. http://public.kitware.com/Bug/view.php?id=13854
My suggested solution is to be able to disable the auto filelist generator and specifying files directly. Noted in the URL linked here.
With 2.8.12 you now have CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST which may be used to define a list of path to be excluded from "CPack RPM automatic handling machinery". The default value is: "/etc /etc/init.d /usr /usr/share /usr/share/doc /usr/bin /usr/lib /usr/lib64 /usr/include" user may overwrite it with its own set of paths.