Bug 896464 - rpm built with cmake failing with file conflict errors
Summary: rpm built with cmake failing with file conflict errors
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: cmake
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
URL: http://public.kitware.com/Bug/view.ph...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-17 11:30 UTC by Jean-Eudes ONFRAY
Modified: 2013-11-07 15:55 UTC (History)
6 users (show)

Fixed In Version: 2.8.12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-07 15:55:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jean-Eudes ONFRAY 2013-01-17 11:30:57 UTC
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.

Comment 1 Orion Poplawski 2013-01-17 15:39:14 UTC
I'm afraid that this really needs to be brought directly upstream.  

http://public.kitware.com/Bug

Comment 2 Jean-Eudes ONFRAY 2013-01-17 16:05:38 UTC
Done.

http://public.kitware.com/Bug/view.php?id=13854

Comment 3 Orion Poplawski 2013-01-18 17:09:44 UTC
My suggested solution is to be able to disable the auto filelist generator and specifying files directly.  Noted in the URL linked here.

Comment 4 Orion Poplawski 2013-11-07 15:55:44 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.