aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@theqtcompany.com>2015-10-03 09:58:09 -0700
committerJake Petroules <jake.petroules@theqtcompany.com>2015-10-31 03:19:07 +0000
commite58833f87a83156b886ad435294bd3cbbc21f496 (patch)
treeffa8e06e53c994580d30a74a070cb539e1558d11
parent9d8d800463406c350266face4d4df615df85e3bb (diff)
Add signingTimestamp property.
This lets the user control if/how timestamps are applied to signed code. Qbs defaults to "none" to match Xcode. Change-Id: I72463681c8c769ada7d9e406a5a398134007a85f Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
-rw-r--r--doc/reference/modules/xcode-module.qdoc9
-rw-r--r--share/qbs/imports/qbs/DarwinTools/darwin-tools.js16
-rw-r--r--share/qbs/modules/bundle/BundleModule.qbs2
-rw-r--r--share/qbs/modules/cpp/gcc.js3
-rw-r--r--share/qbs/modules/xcode/xcode.qbs2
5 files changed, 32 insertions, 0 deletions
diff --git a/doc/reference/modules/xcode-module.qdoc b/doc/reference/modules/xcode-module.qdoc
index 62b8f9058..4e772a573 100644
--- a/doc/reference/modules/xcode-module.qdoc
+++ b/doc/reference/modules/xcode-module.qdoc
@@ -120,6 +120,15 @@
\li 1.5
\li \c{"~/Library/MobileDevice/Provisioning Profiles"}
\li Path to directory containing provisioning profiles installed on the system.
+ \row
+ \li signingTimestamp
+ \li string
+ \li 1.5
+ \li \c{"none"}
+ \li URL of the timestamp authority server to be contacted to authenticate code signing.
+ \c{undefined} indicates that a system-specific default should be used, and the empty
+ string indicates the default server provided by Apple. \c{"none"} explicitly disables
+ the use of timestamp services and this should not usually need to be changed.
\endtable
\section1 Read-only Properties
diff --git a/share/qbs/imports/qbs/DarwinTools/darwin-tools.js b/share/qbs/imports/qbs/DarwinTools/darwin-tools.js
index 0656027f7..0d67f90ab 100644
--- a/share/qbs/imports/qbs/DarwinTools/darwin-tools.js
+++ b/share/qbs/imports/qbs/DarwinTools/darwin-tools.js
@@ -232,3 +232,19 @@ function cleanPropertyList(plist) {
cleanPropertyList(plist[key]);
}
}
+
+function _codeSignTimestampFlags(product) {
+ // If signingTimestamp is undefined, do not specify the flag at all -
+ // this uses the system-specific default behavior
+ var signingTimestamp = product.moduleProperty("xcode", "signingTimestamp");
+ if (signingTimestamp !== undefined) {
+ // If signingTimestamp is an empty string, specify the flag but do
+ // not specify a value - this uses a default Apple-provided server
+ var flag = "--timestamp";
+ if (signingTimestamp)
+ flag += "=" + signingTimestamp;
+ return [flag];
+ }
+
+ return [];
+}
diff --git a/share/qbs/modules/bundle/BundleModule.qbs b/share/qbs/modules/bundle/BundleModule.qbs
index 360978122..81961cd7f 100644
--- a/share/qbs/modules/bundle/BundleModule.qbs
+++ b/share/qbs/modules/bundle/BundleModule.qbs
@@ -628,6 +628,8 @@ Module {
var args = product.moduleProperty("xcode", "codesignFlags") || [];
args.push("--force");
args.push("--sign", actualSigningIdentity);
+ args = args.concat(DarwinTools._codeSignTimestampFlags(product));
+
for (var j in inputs.xcent) {
args.push("--entitlements", inputs.xcent[j].filePath);
break; // there should only be one
diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js
index 4f9337458..bb26ec17b 100644
--- a/share/qbs/modules/cpp/gcc.js
+++ b/share/qbs/modules/cpp/gcc.js
@@ -30,6 +30,7 @@
var File = loadExtension("qbs.File");
var FileInfo = loadExtension("qbs.FileInfo");
+var DarwinTools = loadExtension("qbs.DarwinTools");
var ModUtils = loadExtension("qbs.ModUtils");
var PathTools = loadExtension("qbs.PathTools");
var UnixUtils = loadExtension("qbs.UnixUtils");
@@ -764,6 +765,8 @@ function prepareLinker(project, product, inputs, outputs, input, output) {
var args = product.moduleProperty("xcode", "codesignFlags") || [];
args.push("--force");
args.push("--sign", actualSigningIdentity);
+ args = args.concat(DarwinTools._codeSignTimestampFlags(product));
+
for (var j in inputs.xcent) {
args.push("--entitlements", inputs.xcent[j].filePath);
break; // there should only be one
diff --git a/share/qbs/modules/xcode/xcode.qbs b/share/qbs/modules/xcode/xcode.qbs
index 7daf2c586..ad54b6cd2 100644
--- a/share/qbs/modules/xcode/xcode.qbs
+++ b/share/qbs/modules/xcode/xcode.qbs
@@ -62,6 +62,8 @@ Module {
return _actualSigningIdentity[0][1];
}
+ property string signingTimestamp: "none"
+
property string provisioningProfile
property string securityName: "security"