[Cmake-commits] CMake branch, next, updated. v3.7.1-1838-g451fea2

Domen Vrankar domen.vrankar at gmail.com
Wed Dec 21 12:20:32 EST 2016


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  451fea216b47ccd5be8e699e1b08536f573e62b4 (commit)
       via  fb4a45ee9daddfc982e3e85f6f914be93dc51138 (commit)
      from  e2747bb4fca04ea829223496b39036c2b4627e7b (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=451fea216b47ccd5be8e699e1b08536f573e62b4
commit 451fea216b47ccd5be8e699e1b08536f573e62b4
Merge: e2747bb fb4a45e
Author:     Domen Vrankar <domen.vrankar at gmail.com>
AuthorDate: Wed Dec 21 12:20:31 2016 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Dec 21 12:20:31 2016 -0500

    Merge topic 'cpack-deb-md5sums-paths-fix' into next
    
    fb4a45ee CPack/Deb invalid md5sums file fix


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fb4a45ee9daddfc982e3e85f6f914be93dc51138
commit fb4a45ee9daddfc982e3e85f6f914be93dc51138
Author:     Domen Vrankar <domen.vrankar at gmail.com>
AuthorDate: Tue Dec 20 23:08:52 2016 +0100
Commit:     Domen Vrankar <domen.vrankar at gmail.com>
CommitDate: Wed Dec 21 18:19:40 2016 +0100

    CPack/Deb invalid md5sums file fix
    
    Monolithic deb packages were packaged
    with invalid md5sums file as trailing
    slash in path was causing string replace
    to fail and preserve build path.
    
    Fixes #16517

diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 36566a4..5c50da8 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -173,7 +173,11 @@ int cmCPackDebGenerator::PackageComponentsAllInOne(
     std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME")) +
     this->GetOutputExtension());
   // all GROUP in one vs all COMPONENT in one
-  localToplevel += "/" + compInstDirName;
+  // if must be here otherwise non component paths have a trailing / while
+  // components don't
+  if (!compInstDirName.empty()) {
+    localToplevel += "/" + compInstDirName;
+  }
 
   /* replace the TEMP DIRECTORY with the component one */
   this->SetOption("CPACK_TEMPORARY_DIRECTORY", localToplevel.c_str());
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index 3077340..96141e9 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -15,6 +15,7 @@ run_cpack_test(GENERATE_SHLIBS_LDCONFIG "DEB" true "COMPONENT")
 run_cpack_test(INSTALL_SCRIPTS "RPM" false "COMPONENT")
 run_cpack_test(LONG_FILENAMES "DEB" false "MONOLITHIC")
 run_cpack_test_subtests(MAIN_COMPONENT "invalid;found" "RPM" false "COMPONENT")
+run_cpack_test(MD5SUMS "DEB" false "MONOLITHIC;COMPONENT")
 run_cpack_test(MINIMAL "RPM;DEB;TGZ" false "MONOLITHIC")
 run_cpack_test_subtests(PACKAGE_CHECKSUM "invalid;MD5;SHA1;SHA224;SHA256;SHA384;SHA512" "TGZ" false "MONOLITHIC")
 run_cpack_test(PARTIALLY_RELOCATABLE_WARNING "RPM" false "COMPONENT")
diff --git a/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake
new file mode 100644
index 0000000..6142eb3
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake
@@ -0,0 +1,2 @@
+set(EXPECTED_FILES_COUNT "1")
+set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt")
diff --git a/Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake
new file mode 100644
index 0000000..fbdda9c
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/MD5SUMS/VerifyResult.cmake
@@ -0,0 +1,3 @@
+set(whitespaces_ "[\t\n\r ]*")
+set(md5sums_md5sums "^.* usr/foo/CMakeLists\.txt${whitespaces_}$")
+verifyDebControl("${FOUND_FILE_1}" "md5sums" "md5sums")
diff --git a/Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake b/Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake
new file mode 100644
index 0000000..15c5892
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/MD5SUMS/test.cmake
@@ -0,0 +1,5 @@
+install(FILES CMakeLists.txt DESTINATION foo COMPONENT test)
+
+if(PACKAGING_TYPE STREQUAL "COMPONENT")
+  set(CPACK_COMPONENTS_ALL test)
+endif()

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list