diff options
author | Eric NOULARD <eric.noulard@gmail.com> | 2010-07-04 12:05:25 (GMT) |
---|---|---|
committer | Eric NOULARD <eric.noulard@gmail.com> | 2010-07-04 13:08:17 (GMT) |
commit | 6926e9114c832607bdad97827bb918cb21ab231d (patch) | |
tree | 8d6febf3001f93fd44fdabae2373332c94a02d77 /Modules/CPackRPM.cmake | |
parent | efee95cd710808ca7ac261359b9b8e6dacb09211 (diff) | |
download | CMake-6926e9114c832607bdad97827bb918cb21ab231d.zip CMake-6926e9114c832607bdad97827bb918cb21ab231d.tar.gz CMake-6926e9114c832607bdad97827bb918cb21ab231d.tar.bz2 |
CPackRPM:: Quote every filenames in %file section (see bugs 10701,10871,10345)
Diffstat (limited to 'Modules/CPackRPM.cmake')
-rw-r--r-- | Modules/CPackRPM.cmake | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 3bf8e0e..ae679f0 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -396,12 +396,13 @@ SET(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}") # Use files tree to construct files command (spec file) # We should not forget to include symlinks (thus -o -type l) -# We must remove the './' due to the local search (thus the sed) +# We must remove the './' due to the local search and escape the +# file name by enclosing it between double quotes (thus the sed) # Then we must authorize any man pages extension (adding * at the end) # because rpmbuild may automatically compress those files EXECUTE_PROCESS(COMMAND find -type f -o -type l - COMMAND sed {s/\\.//} - COMMAND sed {s/.*man.*\\/.*/&*/} + COMMAND sed {s:.*/man.*/.*:&*:} + COMMAND sed {s/\\.\\\(.*\\\)/\"\\1\"/} WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}" OUTPUT_VARIABLE CPACK_RPM_INSTALL_FILES) |