[Cmake-commits] CMake branch, next, updated. v2.8.8-3623-gc598d35

Eric Noulard eric.noulard at gmail.com
Tue Aug 7 13:20:43 EDT 2012


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  c598d350fa3a2fb243d08f9e066d92655c1b39b0 (commit)
       via  822c1eaf9e49007129998eab0cbe4b78cd610075 (commit)
       via  3bfabfa04a2919ec140bc3578ab80b060c96737e (commit)
       via  e2a57173df0b5b86aea229bb64403e0864b88a10 (commit)
       via  dc5b0b232b2c447ed1694a3524d3eb55e4b085d7 (commit)
      from  73123bf5248724b3276274758e2475cc5be18267 (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=c598d350fa3a2fb243d08f9e066d92655c1b39b0
commit c598d350fa3a2fb243d08f9e066d92655c1b39b0
Merge: 73123bf 822c1ea
Author:     Eric Noulard <eric.noulard at gmail.com>
AuthorDate: Tue Aug 7 13:20:40 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Aug 7 13:20:40 2012 -0400

    Merge topic 'CPackRPM-fixRelocatablePrefix' into next
    
    822c1ea Do not include directories which are part of the package install prefix.
    3bfabfa CMake Nightly Date Stamp
    e2a5717 CMake Nightly Date Stamp
    dc5b0b2 CMake Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=822c1eaf9e49007129998eab0cbe4b78cd610075
commit 822c1eaf9e49007129998eab0cbe4b78cd610075
Author:     Andy Piper <andy.piper at kaspersky.com>
AuthorDate: Tue Aug 7 19:15:19 2012 +0200
Commit:     Eric NOULARD <eric.noulard at gmail.com>
CommitDate: Tue Aug 7 19:15:19 2012 +0200

    Do not include directories which are part of the package install prefix.
    
    This fix bug #0013451. The bug prevents theorerically relocatable RPM package
    to be installed properly.
    Signed-off-by: Eric NOULARD <eric.noulard at gmail.com>

diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index ae93512..0ac6e17 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -639,6 +639,25 @@ SET(CPACK_RPM_FILE_NAME "${CPACK_OUTPUT_FILE_NAME}")
 #STRING(REGEX REPLACE " " "\\\\ " CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
 SET(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
 
+# if we are creating a relocatable package, omit parent directories of
+# 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
+  # from the RPM's content-list)
+  string(REPLACE "/" ";" _CPACK_RPM_PACKAGE_PREFIX_ELEMS ".${CPACK_RPM_PACKAGE_PREFIX}")
+  list(REMOVE_AT _CPACK_RPM_PACKAGE_PREFIX_ELEMS -1)
+  # 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}")
+    set(_OMIT_DIR "-o -path ${_OMIT_DIR}")
+    separate_arguments(_OMIT_DIR)
+    list(APPEND _RPM_DIRS_TO_OMIT ${_OMIT_DIR})
+  endforeach()
+endif()
+
 # Use files tree to construct files command (spec file)
 # We should not forget to include symlinks (thus -o -type l)
 # We should include directory as well (thus -type d)
@@ -647,7 +666,7 @@ SET(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
 # 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 -o (-type d -a -not -name ".")
+EXECUTE_PROCESS(COMMAND find . -type f -o -type l -o (-type d -a -not ( -name "." ${_RPM_DIRS_TO_OMIT} ) )
                 COMMAND sed s:.*/man.*/.*:&*:
                 COMMAND sed s/\\.\\\(.*\\\)/\"\\1\"/
                 WORKING_DIRECTORY "${WDIR}"

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

Summary of changes:
 Modules/CPackRPM.cmake    |   21 ++++++++++++++++++++-
 Source/CMakeVersion.cmake |    2 +-
 2 files changed, 21 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list