[Cmake-commits] CMake branch, next, updated. v3.7.2-2535-gf28a0de
Brad King
brad.king at kitware.com
Fri Feb 3 13:14:54 EST 2017
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 f28a0de44953afab170272a04dca84432c4e0768 (commit)
via fafb38bf32458bb9f7514a7c6483ca324a15fc22 (commit)
via f801bf68320dc6bbccd8f420d3714f61d201b5f3 (commit)
via b200010717b18854a765a9cbe2c3fc72d58fdc1c (commit)
from a792ec426975260a7fe6fb87ae0972030a06d2c6 (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=f28a0de44953afab170272a04dca84432c4e0768
commit f28a0de44953afab170272a04dca84432c4e0768
Merge: a792ec4 fafb38b
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Feb 3 13:14:53 2017 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Feb 3 13:14:53 2017 -0500
Merge topic 'productbuild_signing' into next
fafb38bf CPackProductBuild: Fixed a possible crash if the variables aren't defined
f801bf68 CPackProductBuild: Add options to sign packages
b2000107 CPackProductBuild: Add options to sign packages
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fafb38bf32458bb9f7514a7c6483ca324a15fc22
commit fafb38bf32458bb9f7514a7c6483ca324a15fc22
Author: Roman Wüger <office at wueger.at>
AuthorDate: Fri Feb 3 18:30:11 2017 +0100
Commit: Roman Wüger <office at wueger.at>
CommitDate: Fri Feb 3 18:30:11 2017 +0100
CPackProductBuild: Fixed a possible crash if the variables aren't defined
diff --git a/Source/CPack/cmCPackProductBuildGenerator.cxx b/Source/CPack/cmCPackProductBuildGenerator.cxx
index 833a27e..07b539d 100644
--- a/Source/CPack/cmCPackProductBuildGenerator.cxx
+++ b/Source/CPack/cmCPackProductBuildGenerator.cxx
@@ -75,9 +75,9 @@ int cmCPackProductBuildGenerator::PackageFiles()
std::string version = this->GetOption("CPACK_PACKAGE_VERSION");
std::string productbuild = this->GetOption("CPACK_COMMAND_PRODUCTBUILD");
- std::string identityName =
+ const char* identityName =
this->GetOption("CPACK_PRODUCTBUILD_IDENTITY_NAME");
- std::string keychainPath =
+ const char* keychainPath =
this->GetOption("CPACK_PRODUCTBUILD_KEYCHAIN_PATH");
pkgCmd << productbuild << " --distribution \"" << packageDirFileName
@@ -86,9 +86,8 @@ int cmCPackProductBuildGenerator::PackageFiles()
<< "\""
<< " --resources \"" << resDir << "\""
<< " --version \"" << version << "\""
- << (identityName.empty() ? "" : " --sign \"" + identityName + "\"")
- << (keychainPath.empty() ? ""
- : " --keychain \"" + keychainPath + "\"")
+ << (identityName ? " --sign \"" + identityName + "\"" : "")
+ << (keychainPath ? " --keychain \"" + keychainPath + "\"" : "")
<< " \"" << packageFileNames[0] << "\"";
// Run ProductBuild
@@ -200,17 +199,16 @@ bool cmCPackProductBuildGenerator::GenerateComponentPackage(
std::string version = this->GetOption("CPACK_PACKAGE_VERSION");
std::string pkgbuild = this->GetOption("CPACK_COMMAND_PKGBUILD");
- std::string identityName = this->GetOption("CPACK_PKGBUILD_IDENTITY_NAME");
- std::string keychainPath = this->GetOption("CPACK_PKGBUILD_KEYCHAIN_PATH");
+ const char* identityName = this->GetOption("CPACK_PKGBUILD_IDENTITY_NAME");
+ const char* keychainPath = this->GetOption("CPACK_PKGBUILD_KEYCHAIN_PATH");
pkgCmd << pkgbuild << " --root \"" << packageDir << "\""
<< " --identifier \"" << pkgId << "\""
<< " --scripts \"" << scriptDir << "\""
<< " --version \"" << version << "\""
<< " --install-location \"/\""
- << (identityName.empty() ? "" : " --sign \"" + identityName + "\"")
- << (keychainPath.empty() ? ""
- : " --keychain \"" + keychainPath + "\"")
+ << (identityName ? " --sign \"" + identityName + "\"" : "")
+ << (keychainPath ? " --keychain \"" + keychainPath + "\"" : "")
<< " \"" << packageFile << "\"";
// Run ProductBuild
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f801bf68320dc6bbccd8f420d3714f61d201b5f3
commit f801bf68320dc6bbccd8f420d3714f61d201b5f3
Author: Roman Wüger <roman.wueger at gmx.at>
AuthorDate: Fri Feb 3 09:31:39 2017 +0100
Commit: Roman Wüger <roman.wueger at gmx.at>
CommitDate: Fri Feb 3 09:39:32 2017 +0100
CPackProductBuild: Add options to sign packages
diff --git a/Source/CPack/cmCPackProductBuildGenerator.cxx b/Source/CPack/cmCPackProductBuildGenerator.cxx
index 35b2ccc..833a27e 100644
--- a/Source/CPack/cmCPackProductBuildGenerator.cxx
+++ b/Source/CPack/cmCPackProductBuildGenerator.cxx
@@ -85,17 +85,11 @@ int cmCPackProductBuildGenerator::PackageFiles()
<< " --package-path \"" << packageDirFileName << "/Contents/Packages"
<< "\""
<< " --resources \"" << resDir << "\""
- << " --version \"" << version << "\"";
-
- if (!identityName.empty()) {
- pkgCmd << " --sign \"" << identityName << "\"";
- }
-
- if (!keychainPath.empty()) {
- pkgCmd << " --keychain \"" << keychainPath << "\"";
- }
-
- pkgCmd << " \"" << packageFileNames[0] << "\"";
+ << " --version \"" << version << "\""
+ << (identityName.empty() ? "" : " --sign \"" + identityName + "\"")
+ << (keychainPath.empty() ? ""
+ : " --keychain \"" + keychainPath + "\"")
+ << " \"" << packageFileNames[0] << "\"";
// Run ProductBuild
return RunProductBuild(pkgCmd.str());
@@ -213,17 +207,11 @@ bool cmCPackProductBuildGenerator::GenerateComponentPackage(
<< " --identifier \"" << pkgId << "\""
<< " --scripts \"" << scriptDir << "\""
<< " --version \"" << version << "\""
- << " --install-location \"/\"";
-
- if (!identityName.empty()) {
- pkgCmd << " --sign \"" << identityName << "\"";
- }
-
- if (!keychainPath.empty()) {
- pkgCmd << " --keychain \"" << keychainPath << "\"";
- }
-
- pkgCmd << " \"" << packageFile << "\"";
+ << " --install-location \"/\""
+ << (identityName.empty() ? "" : " --sign \"" + identityName + "\"")
+ << (keychainPath.empty() ? ""
+ : " --keychain \"" + keychainPath + "\"")
+ << " \"" << packageFile << "\"";
// Run ProductBuild
return RunProductBuild(pkgCmd.str());
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b200010717b18854a765a9cbe2c3fc72d58fdc1c
commit b200010717b18854a765a9cbe2c3fc72d58fdc1c
Author: Roman Wüger <office at wueger.at>
AuthorDate: Sun Jan 15 01:29:34 2017 +0100
Commit: Roman Wüger <roman.wueger at gmx.at>
CommitDate: Fri Feb 3 09:39:32 2017 +0100
CPackProductBuild: Add options to sign packages
diff --git a/Help/release/dev/cpack-productbuild-signing.rst b/Help/release/dev/cpack-productbuild-signing.rst
new file mode 100644
index 0000000..0b91b38
--- /dev/null
+++ b/Help/release/dev/cpack-productbuild-signing.rst
@@ -0,0 +1,8 @@
+cpack-productbuild-signing
+--------------------------
+
+* The :module:`CPackProductBuild` module gained options to sign packages.
+ See the variables :variable:`CPACK_PRODUCTBUILD_IDENTITY_NAME`,
+ :variable:`CPACK_PRODUCTBUILD_KEYCHAIN_PATH`,
+ :variable:`CPACK_PKGBUILD_IDENTITY_NAME`, and
+ :variable:`CPACK_PKGBUILD_KEYCHAIN_PATH`.
diff --git a/Modules/CPackProductBuild.cmake b/Modules/CPackProductBuild.cmake
index ea2fa7c..d545d3e 100644
--- a/Modules/CPackProductBuild.cmake
+++ b/Modules/CPackProductBuild.cmake
@@ -20,9 +20,29 @@
# the automatically detected command (or specify its location if the
# auto-detection fails to find it.)
#
+# .. variable:: CPACK_PRODUCTBUILD_IDENTITY_NAME
+#
+# Adds a digital signature to the resulting package.
+#
+#
+# .. variable:: CPACK_PRODUCTBUILD_KEYCHAIN_PATH
+#
+# Specify a specific keychain to search for the signing identity.
+#
+#
# .. variable:: CPACK_COMMAND_PKGBUILD
#
# Path to the pkgbuild(1) command used to generate an OS X component package
# on 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_PKGBUILD_IDENTITY_NAME
+#
+# Adds a digital signature to the resulting package.
+#
+#
+# .. variable:: CPACK_PKGBUILD_KEYCHAIN_PATH
+#
+# Specify a specific keychain to search for the signing identity.
+#
diff --git a/Source/CPack/cmCPackProductBuildGenerator.cxx b/Source/CPack/cmCPackProductBuildGenerator.cxx
index a46e3a6..35b2ccc 100644
--- a/Source/CPack/cmCPackProductBuildGenerator.cxx
+++ b/Source/CPack/cmCPackProductBuildGenerator.cxx
@@ -75,14 +75,27 @@ int cmCPackProductBuildGenerator::PackageFiles()
std::string version = this->GetOption("CPACK_PACKAGE_VERSION");
std::string productbuild = this->GetOption("CPACK_COMMAND_PRODUCTBUILD");
+ std::string identityName =
+ this->GetOption("CPACK_PRODUCTBUILD_IDENTITY_NAME");
+ std::string keychainPath =
+ this->GetOption("CPACK_PRODUCTBUILD_KEYCHAIN_PATH");
pkgCmd << productbuild << " --distribution \"" << packageDirFileName
<< "/Contents/distribution.dist\""
<< " --package-path \"" << packageDirFileName << "/Contents/Packages"
<< "\""
<< " --resources \"" << resDir << "\""
- << " --version \"" << version << "\""
- << " \"" << packageFileNames[0] << "\"";
+ << " --version \"" << version << "\"";
+
+ if (!identityName.empty()) {
+ pkgCmd << " --sign \"" << identityName << "\"";
+ }
+
+ if (!keychainPath.empty()) {
+ pkgCmd << " --keychain \"" << keychainPath << "\"";
+ }
+
+ pkgCmd << " \"" << packageFileNames[0] << "\"";
// Run ProductBuild
return RunProductBuild(pkgCmd.str());
@@ -193,13 +206,24 @@ bool cmCPackProductBuildGenerator::GenerateComponentPackage(
std::string version = this->GetOption("CPACK_PACKAGE_VERSION");
std::string pkgbuild = this->GetOption("CPACK_COMMAND_PKGBUILD");
+ std::string identityName = this->GetOption("CPACK_PKGBUILD_IDENTITY_NAME");
+ std::string keychainPath = this->GetOption("CPACK_PKGBUILD_KEYCHAIN_PATH");
pkgCmd << pkgbuild << " --root \"" << packageDir << "\""
<< " --identifier \"" << pkgId << "\""
<< " --scripts \"" << scriptDir << "\""
<< " --version \"" << version << "\""
- << " --install-location \"/\""
- << " \"" << packageFile << "\"";
+ << " --install-location \"/\"";
+
+ if (!identityName.empty()) {
+ pkgCmd << " --sign \"" << identityName << "\"";
+ }
+
+ if (!keychainPath.empty()) {
+ pkgCmd << " --keychain \"" << keychainPath << "\"";
+ }
+
+ pkgCmd << " \"" << packageFile << "\"";
// Run ProductBuild
return RunProductBuild(pkgCmd.str());
-----------------------------------------------------------------------
Summary of changes:
Help/release/dev/cpack-productbuild-signing.rst | 8 ++++++++
Modules/CPackProductBuild.cmake | 20 ++++++++++++++++++++
Source/CPack/cmCPackProductBuildGenerator.cxx | 10 ++++++++++
3 files changed, 38 insertions(+)
create mode 100644 Help/release/dev/cpack-productbuild-signing.rst
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list