[Cmake-commits] CMake branch, next, updated. v3.2.1-1029-g0122877

Domen Vrankar domen.vrankar at gmail.com
Sun Mar 15 16:10:09 EDT 2015


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  012287707792efea6ed928ceff52cc15364e7eb5 (commit)
       via  140a53a810ea7449c26e6e572918df3bb20e86d1 (commit)
       via  4552bc886d1bd8966f6ef2f7790835dfdb2e6d8b (commit)
      from  8e743b99e4c688892ef05271b8dae5adb112f2c2 (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=012287707792efea6ed928ceff52cc15364e7eb5
commit 012287707792efea6ed928ceff52cc15364e7eb5
Merge: 8e743b9 140a53a
Author:     Domen Vrankar <domen.vrankar at gmail.com>
AuthorDate: Sun Mar 15 16:10:08 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Mar 15 16:10:08 2015 -0400

    Merge topic 'cpack_rpm_old_version_tests' into next
    
    140a53a8 CPack/RPM architecture test fixup
    4552bc88 CPack/RPM relocation paths test fixup


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=140a53a810ea7449c26e6e572918df3bb20e86d1
commit 140a53a810ea7449c26e6e572918df3bb20e86d1
Author:     Domen Vrankar <domen.vrankar at gmail.com>
AuthorDate: Sun Mar 15 21:08:19 2015 +0100
Commit:     Domen Vrankar <domen.vrankar at gmail.com>
CommitDate: Sun Mar 15 21:08:19 2015 +0100

    CPack/RPM architecture test fixup
    
    Fixed architecture test that was
    missing architecture in regular
    expressions - bug was detected
    on older rpm versions where the
    check failed.
    Extended architecture test that takes
    into account older versions of rpm.
    This patch is related to 15442.

diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
index 079b819..9261d11 100644
--- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
+++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
@@ -158,6 +158,12 @@ if(CPackGen MATCHES "RPM")
           ERROR_QUIET
           OUTPUT_STRIP_TRAILING_WHITESPACE)
 
+      execute_process(COMMAND ${RPM_EXECUTABLE} -pqa ${check_file}
+          RESULT_VARIABLE check_package_architecture_result
+          OUTPUT_VARIABLE check_package_architecture
+          ERROR_QUIET
+          OUTPUT_STRIP_TRAILING_WHITESPACE)
+
       execute_process(COMMAND ${RPM_EXECUTABLE} -pql ${check_file}
           OUTPUT_VARIABLE check_package_content
           ERROR_QUIET
@@ -169,28 +175,28 @@ 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${whitespaces}:${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
-        set(check_file_match_expected_architecture "Architecture: ${CPACK_RPM_applications_PACKAGE_ARCHITECTURE}")
+        set(check_file_match_expected_architecture "") # we don't explicitly set this value so it is different on each platform - ignore it
         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${whitespaces}:${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
-        set(check_file_match_expected_architecture "Architecture: ${CPACK_RPM_libraries_PACKAGE_ARCHITECTURE}")
+        set(check_file_match_expected_architecture "noarch")
         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${whitespaces}:${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}.*")
-        set(check_file_match_expected_architecture "Architecture: ${CPACK_RPM_headers_PACKAGE_ARCHITECTURE}")
+        set(check_file_match_expected_architecture "armv7hf")
         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${whitespaces}:${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
-        set(check_file_match_expected_architecture "Architecture: ${CPACK_RPM_Unspecified_PACKAGE_ARCHITECTURE}")
+        set(check_file_match_expected_architecture "") # we don't explicitly set this value so it is different on each platform - ignore it
         set(spec_regex "*Unspecified*")
         set(check_content_list "^/usr/foo/bar
 /usr/foo/bar/bin
@@ -230,9 +236,22 @@ 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()
 
-      string(REGEX MATCH ${check_file_match_expected_architecture} check_file_match_architecture ${check_file_content})
-      if (NOT check_file_match_architecture)
+      #######################
+      # test package architecture
+      #######################
+      string(REGEX MATCH "Architecture${whitespaces}:" check_info_contains_arch ${check_file_content})
+      if(check_info_contains_arch) # test for rpm versions that contain architecture in package info (e.g. 4.11.x)
+        string(REGEX MATCH "Architecture${whitespaces}:${whitespaces}${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()
+      elseif(NOT check_package_architecture_result) # test result only on platforms that support -pqa rpm query
+        # test for rpm versions that do not contain architecture in package info (e.g. 4.8.x)
+        string(REGEX MATCH ".*${check_file_match_expected_architecture}" check_file_match_architecture "${check_package_architecture}")
+        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_package_architecture}'; generated spec file: '${spec_file_content}'")
+        endif()
+      # else rpm version too old (e.g. 4.4.x) - skip test
       endif()
 
       #######################

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4552bc886d1bd8966f6ef2f7790835dfdb2e6d8b
commit 4552bc886d1bd8966f6ef2f7790835dfdb2e6d8b
Author:     Domen Vrankar <domen.vrankar at gmail.com>
AuthorDate: Sun Mar 15 20:37:16 2015 +0100
Commit:     Domen Vrankar <domen.vrankar at gmail.com>
CommitDate: Sun Mar 15 20:37:16 2015 +0100

    CPack/RPM relocation paths test fixup
    
    Patch fixes bug in test reported with
    id 15442 - older versions of rpm print
    out package info a bit differently so
    we should ignore white spaces

diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
index c7ec709..079b819 100644
--- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
+++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
@@ -163,31 +163,33 @@ if(CPackGen MATCHES "RPM")
           ERROR_QUIET
           OUTPUT_STRIP_TRAILING_WHITESPACE)
 
+      set(whitespaces "[\\t\\n\\r ]*")
+
       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(check_file_match_expected_relocation_path "Relocations${whitespaces}:${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}${whitespaces}${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_relocation_path "Relocations${whitespaces}:${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}${whitespaces}${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_relocation_path "Relocations${whitespaces}:${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}${whitespaces}${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_relocation_path "Relocations${whitespaces}:${whitespaces}${CPACK_PACKAGING_INSTALL_PREFIX}${whitespaces}${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

-----------------------------------------------------------------------

Summary of changes:
 .../RunCPackVerifyResult.cmake                     |   41 +++++++++++++++-----
 1 file changed, 31 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list