[Cmake-commits] CMake branch, next, updated. v2.8.4-1550-ge061c8b

David Cole david.cole at kitware.com
Mon May 16 18:20:46 EDT 2011


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  e061c8bfaec0e8f48b73a2208bafd63269c6a1cd (commit)
       via  0fb388c733e163e9e271f3f8f8abd386e0d63db1 (commit)
      from  994990ba19e875639e07eddfbfccae7a0ebec1da (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=e061c8bfaec0e8f48b73a2208bafd63269c6a1cd
commit e061c8bfaec0e8f48b73a2208bafd63269c6a1cd
Merge: 994990b 0fb388c
Author:     David Cole <david.cole at kitware.com>
AuthorDate: Mon May 16 18:20:44 2011 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon May 16 18:20:44 2011 -0400

    Merge topic 'fix-cpack-osxx11-perms' into next
    
    0fb388c Ensure executable files have executable permissions.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0fb388c733e163e9e271f3f8f8abd386e0d63db1
commit 0fb388c733e163e9e271f3f8f8abd386e0d63db1
Author:     Wesley Turner <wes.turner at kitware.com>
AuthorDate: Mon May 16 18:15:32 2011 -0400
Commit:     David Cole <david.cole at kitware.com>
CommitDate: Mon May 16 18:15:32 2011 -0400

    Ensure executable files have executable permissions.
    
    Fix the OSX X11 CPack generator to make sure the installer
    that it generates contains executable files.

diff --git a/Source/CPack/cmCPackOSXX11Generator.cxx b/Source/CPack/cmCPackOSXX11Generator.cxx
index 0e8cbc0..75ad640 100644
--- a/Source/CPack/cmCPackOSXX11Generator.cxx
+++ b/Source/CPack/cmCPackOSXX11Generator.cxx
@@ -21,6 +21,7 @@
 
 #include <cmsys/SystemTools.hxx>
 #include <cmsys/Glob.hxx>
+#include <sys/stat.h>
 
 //----------------------------------------------------------------------
 cmCPackOSXX11Generator::cmCPackOSXX11Generator()
@@ -135,6 +136,32 @@ int cmCPackOSXX11Generator::PackageFiles()
     return 0;
     }
 
+  // Two of the files need to have execute permission, so ensure they do:
+  std::string runTimeScript = dir;
+  runTimeScript += "/";
+  runTimeScript += "RuntimeScript";
+
+  std::string appScriptName = appdir;
+  appScriptName += "/";
+  appScriptName += this->GetOption("CPACK_PACKAGE_FILE_NAME");
+
+  mode_t mode;
+  if (cmsys::SystemTools::GetPermissions(runTimeScript.c_str(), mode))
+    {
+    mode |= (S_IXUSR | S_IXGRP | S_IXOTH);
+    cmsys::SystemTools::SetPermissions(runTimeScript.c_str(), mode);
+    cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Setting: " << runTimeScript
+      << " to permission: " << mode << std::endl);
+    }
+
+  if (cmsys::SystemTools::GetPermissions(appScriptName.c_str(), mode))
+    {
+    mode |= (S_IXUSR | S_IXGRP | S_IXOTH);
+    cmsys::SystemTools::SetPermissions(appScriptName.c_str(), mode);
+    cmCPackLogger(cmCPackLog::LOG_OUTPUT,  "Setting: " << appScriptName
+      << " to permission: " << mode << std::endl);
+    }
+
   std::string output;
   std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
   tmpFile += "/hdiutilOutput.log";

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

Summary of changes:
 Source/CPack/cmCPackOSXX11Generator.cxx |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list