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 0c5c6acd4b370fed01ba977ac9dee77fd0f9eba3 (commit) via 3db740cb31afd32548bdeec5f1c35c6cfb3c0693 (commit) via 3cf86d9e7bb082b05c507c744b0a43981ba199c3 (commit) via 1cbb15625304b01e8a99a956fa42e4b7011fea48 (commit) from 07703234998b0d9bc1adf0c3db79711ccf51f0a7 (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 ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0c5c6acd4b370fed01ba977ac9dee77fd0f9eba3 commit 0c5c6acd4b370fed01ba977ac9dee77fd0f9eba3 Merge: 0770323 3db740c Author: Brad King <brad.k...@kitware.com> AuthorDate: Fri Feb 27 08:50:20 2015 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Feb 27 08:50:20 2015 -0500 Merge topic 'cpack_rpm_mulit_prefix_fixup-for-master' into next 3db740cb CPackRPM: Consolidate CPackComponentsForAll test case coverage 3cf86d9e Merge branch 'cpack_rpm_mulit_prefix_fixup' into cpack_rpm_mulit_prefix_fixup-for-master 1cbb1562 CPackRPM: Fix handling of relocation prefix parent directories http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3db740cb31afd32548bdeec5f1c35c6cfb3c0693 commit 3db740cb31afd32548bdeec5f1c35c6cfb3c0693 Author: Domen Vrankar <domen.vran...@gmail.com> AuthorDate: Fri Feb 27 00:36:25 2015 +0100 Commit: Brad King <brad.k...@kitware.com> CommitDate: Fri Feb 27 08:45:57 2015 -0500 CPackRPM: Consolidate CPackComponentsForAll test case coverage Use test infrastructure added by commit 1cbb1562 (Fix handling of relocation prefix parent directories, 2015-02-26) to cover the same use cases from tests added by commit 5857ca5e (CPackRPM: Drop explicit handling of '@' symbols that breaks them, 2015-01-07) and drop the latter. diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake index 9b9ca0a..c7ec709 100644 --- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake +++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake @@ -192,7 +192,11 @@ if(CPackGen MATCHES "RPM") set(spec_regex "*Unspecified*") set(check_content_list "^/usr/foo/bar /usr/foo/bar/bin -/usr/foo/bar/bin/mylibapp2$") +/usr/foo/bar/bin/@in@_@path@@with +/usr/foo/bar/bin/@in@_@path@@with/@and +/usr/foo/bar/bin/@in@_@path@@with/@and/@ +/usr/foo/bar/bin/@in@_@path@@with/@and/@/@in_path@ +/usr/foo/bar/bin/@in@_@path@@with/@and/@/@in_path@/mylibapp2$") else() message(FATAL_ERROR "error: unexpected rpm package '${check_file}'") endif() @@ -244,29 +248,5 @@ if(CPackGen MATCHES "RPM") message(FATAL_ERROR "error: '${check_file}' rpm package content does not match expected value - regex '${check_content_list}'; RPM output: '${check_package_content}'; generated spec file: '${spec_file_content}'") endif() endforeach() - - # test package content - foreach(check_file ${expected_file}) - string(REGEX MATCH ".*Unspecified.*" check_file_Unspecified_match ${check_file}) - - if(check_file_Unspecified_match) - execute_process(COMMAND ${RPM_EXECUTABLE} -pql ${check_file} - OUTPUT_VARIABLE check_file_content - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - - string(REGEX MATCH ".*bin/@in@_@path@@with/@and/@/@in_path@/mylibapp2$" check_at_in_path ${check_file_content}) - - if(NOT check_at_in_path) - file(GLOB_RECURSE spec_file "${CPackComponentsForAll_BINARY_DIR}/*Unspecified*.spec") - - if(spec_file) - file(READ ${spec_file} spec_file_content) - endif() - - message(FATAL_ERROR "error: '${check_file}' rpm package path with @ characters is missing or invalid. RPM output: '${check_file_content}'; generated spec file: '${spec_file_content}'") - endif() - endif() - endforeach() endif() endif() http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3cf86d9e7bb082b05c507c744b0a43981ba199c3 commit 3cf86d9e7bb082b05c507c744b0a43981ba199c3 Merge: 4817d28 1cbb156 Author: Domen Vrankar <domen.vran...@gmail.com> AuthorDate: Fri Feb 27 08:42:29 2015 -0500 Commit: Brad King <brad.k...@kitware.com> CommitDate: Fri Feb 27 08:42:29 2015 -0500 Merge branch 'cpack_rpm_mulit_prefix_fixup' into cpack_rpm_mulit_prefix_fixup-for-master Resolve conflict in Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake by combining the changes from both sides. diff --cc Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in index 4119b8d,e20f11a..e4780d3 --- a/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in +++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in @@@ -6,17 -6,16 +6,22 @@@ if(CPACK_GENERATOR MATCHES "ZIP" endif() if(CPACK_GENERATOR MATCHES "RPM") - set(CPACK_PACKAGING_INSTALL_PREFIX "/usr") - set(CPACK_RPM_COMPONENT_INSTALL "ON") + + # test that /usr and /usr/foo get omitted in relocatable + # rpms as shortest relocation path is treated as base of + # package (/usr/foo/bar is relocatable and must exist) + set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/foo/bar") + + # test requires set(CPACK_RPM_applications_PACKAGE_REQUIRES "mylib-libraries") + # test a "noarch" rpm + set(CPACK_RPM_headers_PACKAGE_ARCHITECTURE "noarch") + + # test cross-built rpm + set(CPACK_RPM_applications_PACKAGE_ARCHITECTURE "armv7hf") + # test package summary override set(CPACK_RPM_PACKAGE_SUMMARY "default summary") set(CPACK_RPM_libraries_PACKAGE_SUMMARY "libraries summary") diff --cc Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake index f06605a,69af374..9b9ca0a --- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake +++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake @@@ -162,26 -166,28 +167,32 @@@ if(CPackGen MATCHES "RPM" set(check_file_match_expected_summary ".*${CPACK_RPM_libraries_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*${CPACK_RPM_libraries_PACKAGE_DESCRIPTION}.*") set(check_file_match_expected_relocation_path "Relocations : ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") + set(check_file_match_expected_architecture "Architecture: ${CPACK_RPM_applications_PACKAGE_ARCHITECTURE}") set(spec_regex "*libraries*") + set(check_content_list "^/usr/foo/bar\n/usr/foo/bar/lib.*\n/usr/foo/bar/lib.*/libmylib.a$") elseif(check_file_headers_match) set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*${CPACK_COMPONENT_HEADERS_DESCRIPTION}.*") set(check_file_match_expected_relocation_path "Relocations : ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}") + set(check_file_match_expected_architecture "Architecture: ${CPACK_RPM_libraries_PACKAGE_ARCHITECTURE}") set(spec_regex "*headers*") + set(check_content_list "^/usr/foo/bar\n/usr/foo/bar/include\n/usr/foo/bar/include/mylib.h$") elseif(check_file_applications_match) set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*${CPACK_COMPONENT_APPLICATIONS_DESCRIPTION}.*") set(check_file_match_expected_relocation_path "Relocations : ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}") + set(check_file_match_expected_architecture "Architecture: ${CPACK_RPM_headers_PACKAGE_ARCHITECTURE}") set(spec_regex "*applications*") + set(check_content_list "^/usr/foo/bar\n/usr/foo/bar/bin\n/usr/foo/bar/bin/mylibapp$") elseif(check_file_Unspecified_match) set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*DESCRIPTION.*") set(check_file_match_expected_relocation_path "Relocations : ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}") + set(check_file_match_expected_architecture "Architecture: ${CPACK_RPM_Unspecified_PACKAGE_ARCHITECTURE}") set(spec_regex "*Unspecified*") + set(check_content_list "^/usr/foo/bar + /usr/foo/bar/bin + /usr/foo/bar/bin/mylibapp2$") else() message(FATAL_ERROR "error: unexpected rpm package '${check_file}'") endif() @@@ -209,34 -218,22 +223,50 @@@ message(FATAL_ERROR "error: '${check_file}' rpm package relocation path does not match expected value - regex '${check_file_match_expected_relocation_path}'; RPM output: '${check_file_content}'; generated spec file: '${spec_file_content}'") endif() + + string(REGEX MATCH ${check_file_match_expected_architecture} check_file_match_architecture ${check_file_content}) + if (NOT check_file_match_architecture) + message(FATAL_ERROR "error: '${check_file}' Architecture does not match expected value - '${check_file_match_expected_architecture}'; RPM output: '${check_file_content}'; generated spec file: '${spec_file_content}'") ++ endif() ++ + ####################### + # test package content + ####################### + string(REGEX MATCH "${check_content_list}" expected_content_list "${check_package_content}") + + if(NOT expected_content_list) + file(GLOB_RECURSE spec_file "${CPackComponentsForAll_BINARY_DIR}/${spec_regex}.spec") + + if(spec_file) + file(READ ${spec_file} spec_file_content) + endif() + + message(FATAL_ERROR "error: '${check_file}' rpm package content does not match expected value - regex '${check_content_list}'; RPM output: '${check_package_content}'; generated spec file: '${spec_file_content}'") endif() endforeach() - elseif(${CPackComponentWay} STREQUAL "IgnoreGroup") + + # test package content + foreach(check_file ${expected_file}) + string(REGEX MATCH ".*Unspecified.*" check_file_Unspecified_match ${check_file}) + + if(check_file_Unspecified_match) + execute_process(COMMAND ${RPM_EXECUTABLE} -pql ${check_file} + OUTPUT_VARIABLE check_file_content + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + + string(REGEX MATCH ".*bin/@in@_@path@@with/@and/@/@in_path@/mylibapp2$" check_at_in_path ${check_file_content}) + + if(NOT check_at_in_path) + file(GLOB_RECURSE spec_file "${CPackComponentsForAll_BINARY_DIR}/*Unspecified*.spec") + + if(spec_file) + file(READ ${spec_file} spec_file_content) + endif() + + message(FATAL_ERROR "error: '${check_file}' rpm package path with @ characters is missing or invalid. RPM output: '${check_file_content}'; generated spec file: '${spec_file_content}'") + endif() + endif() + endforeach() endif() endif() http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1cbb15625304b01e8a99a956fa42e4b7011fea48 commit 1cbb15625304b01e8a99a956fa42e4b7011fea48 Author: Domen Vrankar <domen.vran...@gmail.com> AuthorDate: Fri Feb 27 00:33:48 2015 +0100 Commit: Brad King <brad.k...@kitware.com> CommitDate: Fri Feb 27 08:37:24 2015 -0500 CPackRPM: Fix handling of relocation prefix parent directories In commit 3ec02547 (CPackRPM: Allow multiple path relocation prefixes for one package, 2015-01-21) a regression was introduced that causes parent directories of relocation paths to be incorrectly included in the rpm. Fix this and make the test case more strict to cover it. diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 7516393..e3f74d8 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -481,6 +481,7 @@ function(cpack_rpm_prepare_relocation_paths) endif() endforeach() + set(RPM_USED_PACKAGE_PREFIXES "${RPM_USED_PACKAGE_PREFIXES}" PARENT_SCOPE) set(TMP_RPM_PREFIXES "${TMP_RPM_PREFIXES}" PARENT_SCOPE) endfunction() @@ -945,24 +946,31 @@ set(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}") # CPACK_RPM_PACKAGE_PREFIX. This is achieved by building a "filter list" # which is passed to the find command that generates the content-list if(CPACK_RPM_PACKAGE_RELOCATABLE) - # get a list of the elements in CPACK_RPM_PACKAGE_PREFIX and remove - # the final element (so the install-prefix dir itself is not omitted + # get a list of the elements in CPACK_RPM_PACKAGE_PREFIXES that are + # destinct parent paths of other relocation paths and remove the + # final element (so the install-prefix dir itself is not omitted # from the RPM's content-list) - foreach(CPACK_RPM_PACKAGE_PREFIX ${RPM_PACKAGE_PREFIXES}) - string(REPLACE "/" ";" _CPACK_RPM_PACKAGE_PREFIX_ELEMS ".${CPACK_RPM_PACKAGE_PREFIX}") - list(REMOVE_AT _CPACK_RPM_PACKAGE_PREFIX_ELEMS -1) - unset(_TMP_LIST) - # Now generate all of the parent dirs of CPACK_RPM_PACKAGE_PREFIX - foreach(_ELEM ${_CPACK_RPM_PACKAGE_PREFIX_ELEMS}) - list(APPEND _TMP_LIST "${_ELEM}") - string(REPLACE ";" "/" _OMIT_DIR "${_TMP_LIST}") - list(FIND _RPM_DIRS_TO_OMIT "${_OMIT_DIR}" _DUPLICATE_FOUND) - if(_DUPLICATE_FOUND EQUAL -1) - set(_OMIT_DIR "-o -path ${_OMIT_DIR}") - separate_arguments(_OMIT_DIR) - list(APPEND _RPM_DIRS_TO_OMIT ${_OMIT_DIR}) - endif() - endforeach() + list(SORT RPM_USED_PACKAGE_PREFIXES) + set(_DISTINCT_PATH "NOT_SET") + foreach(_RPM_RELOCATION_PREFIX ${RPM_USED_PACKAGE_PREFIXES}) + if(NOT "${_RPM_RELOCATION_PREFIX}" MATCHES "${_DISTINCT_PATH}/.*") + set(_DISTINCT_PATH "${_RPM_RELOCATION_PREFIX}") + + string(REPLACE "/" ";" _CPACK_RPM_PACKAGE_PREFIX_ELEMS ".${_RPM_RELOCATION_PREFIX}") + list(REMOVE_AT _CPACK_RPM_PACKAGE_PREFIX_ELEMS -1) + unset(_TMP_LIST) + # Now generate all of the parent dirs of the relocation path + foreach(_PREFIX_PATH_ELEM ${_CPACK_RPM_PACKAGE_PREFIX_ELEMS}) + list(APPEND _TMP_LIST "${_PREFIX_PATH_ELEM}") + string(REPLACE ";" "/" _OMIT_DIR "${_TMP_LIST}") + list(FIND _RPM_DIRS_TO_OMIT "${_OMIT_DIR}" _DUPLICATE_FOUND) + if(_DUPLICATE_FOUND EQUAL -1) + set(_OMIT_DIR "-o -path ${_OMIT_DIR}") + separate_arguments(_OMIT_DIR) + list(APPEND _RPM_DIRS_TO_OMIT ${_OMIT_DIR}) + endif() + endforeach() + endif() endforeach() endif() diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in index de0ee46..e20f11a 100644 --- a/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in +++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in @@ -6,9 +6,14 @@ if(CPACK_GENERATOR MATCHES "ZIP") endif() if(CPACK_GENERATOR MATCHES "RPM") - set(CPACK_PACKAGING_INSTALL_PREFIX "/usr") - set(CPACK_RPM_COMPONENT_INSTALL "ON") + + # test that /usr and /usr/foo get omitted in relocatable + # rpms as shortest relocation path is treated as base of + # package (/usr/foo/bar is relocatable and must exist) + set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/foo/bar") + + # test requires set(CPACK_RPM_applications_PACKAGE_REQUIRES "mylib-libraries") # test package summary override diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake index 68d846f..69af374 100644 --- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake +++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake @@ -144,7 +144,7 @@ if(CPackGen MATCHES "RPM") # CMAKE_SIZEOF_VOID_P is not set here but lib is prefix of lib64 so # relocation path test won't fail on OSes with lib64 library location include(GNUInstallDirs) - set(CPACK_PACKAGING_INSTALL_PREFIX "/usr") + set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/foo/bar") foreach(check_file ${expected_file}) string(REGEX MATCH ".*libraries.*" check_file_libraries_match ${check_file}) @@ -157,30 +157,44 @@ if(CPackGen MATCHES "RPM") ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${RPM_EXECUTABLE} -pql ${check_file} + OUTPUT_VARIABLE check_package_content + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + if(check_file_libraries_match) set(check_file_match_expected_summary ".*${CPACK_RPM_libraries_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*${CPACK_RPM_libraries_PACKAGE_DESCRIPTION}.*") set(check_file_match_expected_relocation_path "Relocations : ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") set(spec_regex "*libraries*") + set(check_content_list "^/usr/foo/bar\n/usr/foo/bar/lib.*\n/usr/foo/bar/lib.*/libmylib.a$") elseif(check_file_headers_match) set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*${CPACK_COMPONENT_HEADERS_DESCRIPTION}.*") set(check_file_match_expected_relocation_path "Relocations : ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}") set(spec_regex "*headers*") + set(check_content_list "^/usr/foo/bar\n/usr/foo/bar/include\n/usr/foo/bar/include/mylib.h$") elseif(check_file_applications_match) set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*${CPACK_COMPONENT_APPLICATIONS_DESCRIPTION}.*") set(check_file_match_expected_relocation_path "Relocations : ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}") set(spec_regex "*applications*") + set(check_content_list "^/usr/foo/bar\n/usr/foo/bar/bin\n/usr/foo/bar/bin/mylibapp$") elseif(check_file_Unspecified_match) set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*DESCRIPTION.*") set(check_file_match_expected_relocation_path "Relocations : ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}") set(spec_regex "*Unspecified*") + set(check_content_list "^/usr/foo/bar +/usr/foo/bar/bin +/usr/foo/bar/bin/mylibapp2$") else() message(FATAL_ERROR "error: unexpected rpm package '${check_file}'") endif() + ####################### + # test package info + ####################### string(REGEX MATCH ${check_file_match_expected_summary} check_file_match_summary ${check_file_content}) if(NOT check_file_match_summary) @@ -204,6 +218,21 @@ if(CPackGen MATCHES "RPM") message(FATAL_ERROR "error: '${check_file}' rpm package relocation path does not match expected value - regex '${check_file_match_expected_relocation_path}'; RPM output: '${check_file_content}'; generated spec file: '${spec_file_content}'") endif() + + ####################### + # test package content + ####################### + string(REGEX MATCH "${check_content_list}" expected_content_list "${check_package_content}") + + if(NOT expected_content_list) + file(GLOB_RECURSE spec_file "${CPackComponentsForAll_BINARY_DIR}/${spec_regex}.spec") + + if(spec_file) + file(READ ${spec_file} spec_file_content) + endif() + + message(FATAL_ERROR "error: '${check_file}' rpm package content does not match expected value - regex '${check_content_list}'; RPM output: '${check_package_content}'; generated spec file: '${spec_file_content}'") + endif() endforeach() elseif(${CPackComponentWay} STREQUAL "IgnoreGroup") endif() ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits