[Cmake-commits] CMake branch, next, updated. v3.0.2-5477-g1a34c8e

Brad King brad.king at kitware.com
Fri Sep 26 15:09:16 EDT 2014


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  1a34c8ef1819f16065c0f2df7e1d78b365da65b3 (commit)
       via  72455bd2427672c10d8145f03fe0155966ef4590 (commit)
      from  5736f05da25a5b5b7de4bf9cb5c2612320afc81f (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=1a34c8ef1819f16065c0f2df7e1d78b365da65b3
commit 1a34c8ef1819f16065c0f2df7e1d78b365da65b3
Merge: 5736f05 72455bd
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 26 15:09:15 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Sep 26 15:09:15 2014 -0400

    Merge topic 'cpack-osx-codesign' into next
    
    72455bd2 Revert "CPack: Add support for code signing of bundles on MacOS"


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=72455bd2427672c10d8145f03fe0155966ef4590
commit 72455bd2427672c10d8145f03fe0155966ef4590
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 26 15:08:49 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 26 15:08:49 2014 -0400

    Revert "CPack: Add support for code signing of bundles on MacOS"
    
    This reverts commit 1a9b066845f8923d6652235ba2217d2d4c9463d5.
    It fails tests because missing 'codesign' is an error even
    when not used.  It will have to be revised.

diff --git a/Modules/CPackDMG.cmake b/Modules/CPackDMG.cmake
index 402a149..b7a6ba5 100644
--- a/Modules/CPackDMG.cmake
+++ b/Modules/CPackDMG.cmake
@@ -36,24 +36,6 @@
 #  background image is set. The background image is applied after applying the
 #  custom .DS_Store file.
 #
-# .. variable:: CPACK_APPLE_CERT_APP
-#
-#  The name of your Apple supplied code signing certificate for the application.
-#  The name usually takes the form "Developer ID Application: [Name]" or
-#  "3rd Party Mac Developer Application: [Name]". If this variable is not set
-#  the application will not be signed.
-#
-# .. variable:: CPACK_APPLE_ENTITLEMENTS
-#
-#  The name of the plist file that contains your apple entitlements for sandboxing
-#  your application. This file is required for submission to the Mac App Store.
-#
-# .. variable:: CPACK_APPLE_CODESIGN_FILES
-#
-#  A list of additional files that you wish to be signed. You do not need to
-#  list the main application folder, or the main executable. You should
-#  list any frameworks and plugins that are included in your app bundle.
-#
 # .. variable:: CPACK_COMMAND_HDIUTIL
 #
 #  Path to the hdiutil(1) command used to operate on disk image files on Mac
@@ -72,14 +54,6 @@
 #  Path to the Rez(1) command used to compile resources on Mac OS X. This
 #  variable can be used to override the automatically detected command (or
 #  specify its location if the auto-detection fails to find it.)
-#
-# .. variable:: CPACK_COMMAND_CODESIGN
-#
-#  Path to the codesign(1) command used to sign applications with an
-#  Apple cert. This variable can be used to override the automatically
-#  detected command (or specify its location if the auto-detection fails
-#  to find it.)
-#
 
 #=============================================================================
 # Copyright 2006-2012 Kitware, Inc.
diff --git a/Source/CPack/cmCPackBundleGenerator.cxx b/Source/CPack/cmCPackBundleGenerator.cxx
index c5f7139..6c994f1 100644
--- a/Source/CPack/cmCPackBundleGenerator.cxx
+++ b/Source/CPack/cmCPackBundleGenerator.cxx
@@ -53,7 +53,7 @@ const char* cmCPackBundleGenerator::GetPackagingInstallPrefix()
 }
 
 //----------------------------------------------------------------------
-int cmCPackBundleGenerator::ConstructAppBundle()
+int cmCPackBundleGenerator::PackageFiles()
 {
 
   // Get required arguments ...
@@ -165,22 +165,6 @@ int cmCPackBundleGenerator::ConstructAppBundle()
     cmSystemTools::SetPermissions(command_target.str().c_str(), 0777);
     }
 
-  return 1;
-}
-
-//----------------------------------------------------------------------
-int cmCPackBundleGenerator::PackageFiles()
-{
-  if(!this->ConstructAppBundle())
-    {
-    return 0;
-    }
-
-  if(!this->SignPackage(toplevel))
-    {
-    return 0;
-    }
-
   return this->CreateDMG(toplevel, packageFileNames[0]);
 }
 
diff --git a/Source/CPack/cmCPackBundleGenerator.h b/Source/CPack/cmCPackBundleGenerator.h
index fa9f2fa..ed0187d 100644
--- a/Source/CPack/cmCPackBundleGenerator.h
+++ b/Source/CPack/cmCPackBundleGenerator.h
@@ -31,7 +31,6 @@ public:
 protected:
   virtual int InitializeInternal();
   virtual const char* GetPackagingInstallPrefix();
-  int ConstructAppBundle();
   int PackageFiles();
   bool SupportsComponentInstallation() const;
 
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx
index b797701..9f0a77e 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.cxx
+++ b/Source/CPack/cmCPackDragNDropGenerator.cxx
@@ -103,17 +103,6 @@ int cmCPackDragNDropGenerator::InitializeInternal()
     }
   this->SetOptionIfNotSet("CPACK_COMMAND_REZ", rez_path.c_str());
 
-  const std::string codesign_path = cmSystemTools::FindProgram("codesign",
-    std::vector<std::string>(), false);
-  if(codesign_path.empty())
-    {
-    cmCPackLogger(cmCPackLog::LOG_ERROR,
-      "Cannot locate codesign command"
-      << std::endl);
-    return 0;
-    }
-  this->SetOptionIfNotSet("CPACK_COMMAND_CODESIGN", codesign_path.c_str());
-
   return this->Superclass::InitializeInternal();
 }
 
@@ -227,103 +216,6 @@ bool cmCPackDragNDropGenerator::RunCommand(cmOStringStream& command,
   return true;
 }
 
-int cmCPackDragNDropGenerator::SignPackage(const std::string& src_dir)
-{
-  // Get optional arguments ...
-  const std::string cpack_apple_cert_app =
-    this->GetOption("CPACK_APPLE_CERT_APP")
-    ? this->GetOption("CPACK_APPLE_CERT_APP") : "";
-
-  //A list of additional files to sign, ie. frameworks and plugins.
-  const std::string sign_files =
-    this->GetOption("CPACK_APPLE_CODESIGN_FILES")
-    ? this->GetOption("CPACK_APPLE_CODESIGN_FILES") : "";
-
-  cmOStringStream staging;
-  staging << src_dir;
-
-  //Optionally codesign the application.
-  if(!cpack_apple_cert_app.empty())
-    {
-    std::string bundle_path;
-    bundle_path = staging.str() + "/";
-    bundle_path += this->GetOption("CPACK_BUNDLE_NAME");
-    bundle_path += ".app";
-
-    std::vector<std::string> relFiles;
-
-    cmSystemTools::ExpandListArgument(sign_files, relFiles);
-
-    //sign the files supplied by the user, ie. frameworks.
-    for(std::vector<std::string>::iterator it = relFiles.begin();
-      it != relFiles.end(); ++it)
-      {
-      cmOStringStream temp_sign_file_cmd;
-      temp_sign_file_cmd << this->GetOption("CPACK_COMMAND_CODESIGN");
-      temp_sign_file_cmd << " --deep -f -s \"" << cpack_apple_cert_app;
-      temp_sign_file_cmd << "\" -i ";
-      temp_sign_file_cmd << this->GetOption("CPACK_APPLE_BUNDLE_ID");
-      temp_sign_file_cmd << " \"";
-      temp_sign_file_cmd << bundle_path;
-      temp_sign_file_cmd << it->c_str() << "\"";
-
-      if(!this->RunCommand(temp_sign_file_cmd))
-        {
-        cmCPackLogger(cmCPackLog::LOG_ERROR,
-          "Error signing file:"
-          << bundle_path << it->c_str() << std::endl);
-
-        return 0;
-        }
-      }
-
-    //sign main binary
-    cmOStringStream temp_sign_binary_cmd;
-    temp_sign_binary_cmd << this->GetOption("CPACK_COMMAND_CODESIGN");
-    temp_sign_binary_cmd << " --deep -f -s \"" << cpack_apple_cert_app;
-    temp_sign_binary_cmd << "\" \"" << bundle_path << "\"";
-
-    if(!this->RunCommand(temp_sign_binary_cmd))
-      {
-      cmCPackLogger(cmCPackLog::LOG_ERROR,
-        "Error signing the application binary."
-        << std::endl);
-
-      return 0;
-      }
-
-    //sign app bundle
-    cmOStringStream temp_codesign_cmd;
-    temp_codesign_cmd << this->GetOption("CPACK_COMMAND_CODESIGN");
-    temp_codesign_cmd << " --deep -f -s \"" << cpack_apple_cert_app << "\"";
-    if(this->GetOption("CPACK_APPLE_ENTITLEMENTS"))
-      {
-      temp_codesign_cmd << " --entitlements ";
-      temp_codesign_cmd << this->GetOption("CPACK_APPLE_ENTITLEMENTS");
-      }
-    temp_codesign_cmd << " \"" << bundle_path << "\"";
-
-    if(!this->RunCommand(temp_codesign_cmd))
-      {
-      cmCPackLogger(cmCPackLog::LOG_ERROR,
-        "Error signing the application package."
-        << std::endl);
-
-      return 0;
-      }
-
-    cmCPackLogger(cmCPackLog::LOG_OUTPUT,
-      "- Application has been codesigned"
-      << std::endl);
-    cmCPackLogger(cmCPackLog::LOG_VERBOSE,
-       (this->GetOption("CPACK_APPLE_ENTITLEMENTS")
-         ? "with entitlement sandboxing" : "without entitlement sandboxing")
-       << std::endl);
-  }
-
-  return 1;
-}
-
 //----------------------------------------------------------------------
 int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
                                          const std::string& output_file)
diff --git a/Source/CPack/cmCPackDragNDropGenerator.h b/Source/CPack/cmCPackDragNDropGenerator.h
index b852422..808c618 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.h
+++ b/Source/CPack/cmCPackDragNDropGenerator.h
@@ -39,7 +39,6 @@ protected:
   std::string
   GetComponentInstallDirNameSuffix(const std::string& componentName);
 
-  int SignPackage(const std::string& src_dir);
   int CreateDMG(const std::string& src_dir, const std::string& output_file);
 
   std::string InstallPrefix;

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

Summary of changes:
 Modules/CPackDMG.cmake                     |   26 -------
 Source/CPack/cmCPackBundleGenerator.cxx    |   18 +----
 Source/CPack/cmCPackBundleGenerator.h      |    1 -
 Source/CPack/cmCPackDragNDropGenerator.cxx |  108 ----------------------------
 Source/CPack/cmCPackDragNDropGenerator.h   |    1 -
 5 files changed, 1 insertion(+), 153 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list