MantisBT - CMake
View Issue Details
0014660CMakeCPackpublic2013-12-19 12:442015-11-02 09:13
Joe Nardone 
Domen Vrankar 
normalmajoralways
closedfixed 
LinuxCentOS6.4
CMake 2.8.10 
CMake 3.3 
0014660: File tree builder is too greedy with 'sed'
CPackRPM uses the following crazy `find` command to build its file list:

execute_process(COMMAND find . -type f -o -type l -o (-type d -a -not ( -name "." ${_RPM_DIRS_TO_OMIT} ) )
                COMMAND sed s:.*/man.*/.*:&*:
                COMMAND sed s/\\.\\\(.*\\\)/\"\\1\"/
                WORKING_DIRECTORY "${WDIR}"
                OUTPUT_VARIABLE CPACK_RPM_INSTALL_FILES)

However, the first `sed` is too greedy. It will match any path with the text 'man' in it. Which is fine for man pages, but for, say, a company name with those letters in it (even if it's in the install prefix) it will match every single item, and wildcard them. This leads to lots of files getting included multiple times.
Any package that has something like:

set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/manna")

should trigger it.
No tags attached.
Issue History
2013-12-19 12:44Joe NardoneNew Issue
2015-01-14 17:35Domen VrankarAssigned To => Domen Vrankar
2015-01-14 17:35Domen VrankarStatusnew => assigned
2015-04-21 09:33Domen VrankarNote Added: 0038571
2015-04-21 09:33Domen VrankarStatusassigned => resolved
2015-04-21 09:33Domen VrankarFixed in Version => CMake 3.3
2015-04-21 09:33Domen VrankarResolutionopen => fixed
2015-11-02 09:13Robert MaynardNote Added: 0039784
2015-11-02 09:13Robert MaynardStatusresolved => closed

Notes
(0038571)
Domen Vrankar   
2015-04-21 09:33   
Fixed with commit:
http://www.cmake.org/gitweb?p=cmake.git;a=commit;h=50eefbb [^]

CPackRPM now only treats paths copied from brp-compress rpm script as man pages and permits additional paths to be added using variable CPACK_RPM_ADDITIONAL_MAN_DIRS (additional paths also have to be added to brp-compress or files on those paths won't be compressed).
(0039784)
Robert Maynard   
2015-11-02 09:13   
Closing resolved issues that have not been updated in more than 4 months.