This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via 11d9a18decaffe6cd8941f7e578c54b0b77c579f (commit) via fea1abfaa20f9c290c9f695a461bc0be5ce1ada3 (commit) via 9c109672631853c5393b68de5febd3a59ee57760 (commit) from 513509a2e233824225ce57a6487c26c2e28847fb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=11d9a18decaffe6cd8941f7e578c54b0b77c579f commit 11d9a18decaffe6cd8941f7e578c54b0b77c579f Merge: 513509a fea1abf Author: Domen Vrankar <domen.vran...@gmail.com> AuthorDate: Thu Sep 22 13:25:27 2016 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Thu Sep 22 13:25:27 2016 -0400 Merge topic 'cpack-rpm-debuginfo-sources' into next fea1abfa CPack/RPM debuginfo packaging documentation 9c109672 CPack/RPM debuginfo directories to sources https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fea1abfaa20f9c290c9f695a461bc0be5ce1ada3 commit fea1abfaa20f9c290c9f695a461bc0be5ce1ada3 Author: Domen Vrankar <domen.vran...@gmail.com> AuthorDate: Thu Sep 22 19:24:25 2016 +0200 Commit: Domen Vrankar <domen.vran...@gmail.com> CommitDate: Thu Sep 22 19:24:25 2016 +0200 CPack/RPM debuginfo packaging documentation diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 95904f7..4ae0382 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -60,14 +60,6 @@ # * Mandatory : YES # * Default : :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` # -# .. variable:: CPACK_RPM_DEBUGINFO_PACKAGE -# CPACK_RPM_<component>_DEBUGINFO_PACKAGE -# -# Option to additionally generate debuginfo RPM package(s). -# -# * Mandatory : NO -# * Default : OFF -# # .. variable:: CPACK_RPM_PACKAGE_NAME # CPACK_RPM_<component>_PACKAGE_NAME # @@ -707,6 +699,76 @@ # package installation may cause initial symbolic link to point to an # invalid location. # +# Packaging of debug information +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# +# Debuginfo packages contain debug symbols and sources for debugging packaged +# binaries. +# +# .. note:: +# +# Currently multiple debuginfo packages are generated if component based +# packaging is used - one debuginfo package per component. This duplicates +# sources if multiple binaries are using them. This is a side effect of +# how CPackRPM currently generates component packages and will be addressed +# in later versions of the generator. +# +# Debuginfo RPM packaging has it's own set of variables: +# +# .. variable:: CPACK_RPM_DEBUGINFO_PACKAGE +# CPACK_RPM_<component>_DEBUGINFO_PACKAGE +# +# Enable generation of debuginfo RPM package(s). +# +# * Mandatory : NO +# * Default : OFF +# +# .. note:: +# +# Binaries must contain debug symbols before packaging so use either ``Debug`` +# or ``RelWithDebInfo`` for :variable:`CMAKE_BUILD_TYPE` variable value. +# +# .. note:: +# +# Packages generated from packages without binary files, with binary files but +# without execute permissions or without debug symbols will be empty. +# +# .. variable:: CPACK_BUILD_SOURCE_DIRS +# +# Provides locations of root directories of source files from which binaries +# were built. +# +# * Mandatory : YES if :variable:`CPACK_RPM_DEBUGINFO_PACKAGE` is set +# * Default : - +# +# .. note:: +# +# For CMake project :variable:`CPACK_BUILD_SOURCE_DIRS` is set by default to +# point to :variable:`CMAKE_SOURCE_DIR` and :variable:`CMAKE_BINARY_DIR` paths. +# +# .. note:: +# +# Sources with path prefixes that do not fall under any location provided with +# :variable:`CPACK_BUILD_SOURCE_DIRS` will not be present in debuginfo package. +# +# .. variable:: CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX +# +# Prefix of location where sources will be placed during package installation. +# +# * Mandatory : YES if :variable:`CPACK_RPM_DEBUGINFO_PACKAGE` is set +# * Default : "/usr/src/debug/${CPACK_PACKAGE_FILE_NAME}" +# +# .. note:: +# +# Each source path prefix is additionaly suffixed by ``src_${index_}`` where +# index_ is index of the path used from :variable:`CPACK_BUILD_SOURCE_DIRS` +# variable. This produces ``${CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX}/src_${index_}`` +# replacement path. +# Limitation is that replaced path part must be shorter or of equal +# length than the length of its replacement. If that is not the case either +# :variable:`CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX` variable has to be set to +# a shorter path or source directories must be placed on a longer path. +# # Packaging of sources (SRPM) # ^^^^^^^^^^^^^^^^^^^^^^^^^^^ # https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9c109672631853c5393b68de5febd3a59ee57760 commit 9c109672631853c5393b68de5febd3a59ee57760 Author: Domen Vrankar <domen.vran...@gmail.com> AuthorDate: Thu Sep 22 18:34:54 2016 +0200 Commit: Domen Vrankar <domen.vran...@gmail.com> CommitDate: Thu Sep 22 18:35:58 2016 +0200 CPack/RPM debuginfo directories to sources List of sources must be split into paths parts so that debuginfo package cleans up after itself. diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 5b1eec8..95904f7 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -1415,10 +1415,38 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR) string(APPEND TMP_RPM_DEBUGINFO_INSTALL "${part_}\n") endforeach() + if(NOT DEFINED CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS) + set(CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS /usr /usr/src /usr/src/debug) + if(CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS_ADDITION) + if(CPACK_RPM_PACKAGE_DEBUG) + message("CPackRPM:Debug: Adding ${CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS_ADDITION} to builtin omit list.") + endif() + list(APPEND CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS "${CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS_ADDITION}") + endif() + endif() + if(CPACK_RPM_PACKAGE_DEBUG) + message("CPackRPM:Debug: CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS= ${CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS}") + endif() + list(REMOVE_DUPLICATES additional_sources_) + unset(additional_sources_all_) + foreach(source_ IN LISTS additional_sources_) + string(REPLACE "/" ";" split_source_ " ${source_}") + list(REMOVE_AT split_source_ 0) + unset(tmp_path_) + # Now generate all segments of the path + foreach(segment_ IN LISTS split_source_) + string(APPEND tmp_path_ "/${segment_}") + list(APPEND additional_sources_all_ "${tmp_path_}") + endforeach() + endforeach() + + list(REMOVE_DUPLICATES additional_sources_all_) + list(REMOVE_ITEM additional_sources_all_ ${CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS}) + unset(TMP_DEBUGINFO_ADDITIONAL_SOURCES) - foreach(part_ IN LISTS additional_sources_) - string(APPEND TMP_DEBUGINFO_ADDITIONAL_SOURCES "${part_}\n") + foreach(source_ IN LISTS additional_sources_all_) + string(APPEND TMP_DEBUGINFO_ADDITIONAL_SOURCES "${source_}\n") endforeach() set(TMP_RPM_DEBUGINFO_INSTALL "${TMP_RPM_DEBUGINFO_INSTALL}" PARENT_SCOPE) diff --git a/Tests/RunCMake/CPack/RPM/DEBUGINFO-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/DEBUGINFO-ExpectedFiles.cmake index 9e62a62..a583e32 100644 --- a/Tests/RunCMake/CPack/RPM/DEBUGINFO-ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/RPM/DEBUGINFO-ExpectedFiles.cmake @@ -9,6 +9,6 @@ set(EXPECTED_FILE_3 "debuginfo*-libs.rpm") set(EXPECTED_FILE_CONTENT_3 "^/usr/bas${whitespaces_}/usr/bas/libtest_lib.so$") set(EXPECTED_FILE_4 "debuginfo-applications-debuginfo*.rpm") -set(EXPECTED_FILE_CONTENT_4 ".*/src/src_1/main.cpp.*") +set(EXPECTED_FILE_CONTENT_4 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*") set(EXPECTED_FILE_5 "debuginfo-libs-debuginfo*.rpm") -set(EXPECTED_FILE_CONTENT_5 ".*/src/src_1/test_lib.cpp.*") +set(EXPECTED_FILE_CONTENT_5 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/test_lib.cpp.*") ----------------------------------------------------------------------- Summary of changes: Modules/CPackRPM.cmake | 110 ++++++++++++++++++-- .../CPack/RPM/DEBUGINFO-ExpectedFiles.cmake | 4 +- 2 files changed, 102 insertions(+), 12 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits