代码签名资源规则路径在Jenkins上失败,CODE_SIGN_RESOURCE_RULES_PATH [英] Code Signing Resource Rules Path fails on Jenkins, CODE_SIGN_RESOURCE_RULES_PATH

查看:746
本文介绍了代码签名资源规则路径在Jenkins上失败,CODE_SIGN_RESOURCE_RULES_PATH的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



基本上它听起来像是使用 ResourceRules.plist在Jenkins上构建失败:不能读取资源



我的情况是:



1)Jenkins



2)在本地工作在Xcode 7 beta(在单独的分支上)



6.4.1并且对他们一切都很好



4)Jenkins slave安装了Xcode 6.4.1



strong>您有一些人会说这个问题被问了数百万次,例如此处这里此处此处



文档说明了以下内容:


资源规则



OS X Mavericks v10.9之前的系统记录了一个签名功能(--resource-rules),用于控制包中的哪些文件应该被代码签名密封。小牛的这个功能已经过时了。 Mavericks中的代码签名以后总是封装所有文件;没有必要明确指定这一点。这也意味着Xcode中的代码签名资源规则路径构建设置应该不再使用,应该留空。


问题是为什么每个人都这么快就在旁边,黑客,解决这个问题,当文档清楚地说,应该是空白,它已过时?



这背后真正的问题是什么?为什么构建失败了几年不需要的东西?

解决方案

我有同样的问题。丹佛先生这里的解决方案建议为了我。



只是为了节省一些时间,这里是我们从网络链接所需要的。



,在签署应用程序时不应包含资源规则选项,但由于某种原因,脚本仍将此选项传递到代码签名工具。



解决方法是修改PackageApplication脚本,使它不再这样做(需要sudo访问)。脚本的第155行构造了要传递给代码签名者的参数,所以我们可以简单地删除对资源规则的引用:

  // Remove  -  Begin 
- my @codesign_args =(/ usr / bin / codesign,--force ,--preserve-metadata = identifier,entitlements,resource-rules,
- --sign,$ opt {sign},
- --resource-rules = $ destApp / ResourceRules .plist);
//删除 - 结束

//添加 - 开始
+ my @codesign_args =(/ usr / bin / codesign,--force preserve-metadata = identifier,entitlements,
+--sign,$ opt {sign});
// Add - 开始


I am little concerned about how people treat the following issue.

Basically it sounds like "Build fails on Jenkins with the ResourceRules.plist: cannot read resources"

My circumstances are:

1) Jenkins

2) Locally I work in Xcode 7 beta (on a separate branch)

3) My teammates work in 6.4.1 and for them everything works fine

4) Jenkins slave has Xcode 6.4.1 installed

Some of you will say "this question was asked millions of times", like here, here, here, here.

But the documentation says the following:

Resource Rules

Systems before OS X Mavericks v10.9 documented a signing feature (--resource-rules) to control which files in a bundle should be sealed by a code signature. This feature has been obsoleted for Mavericks. Code signatures made in Mavericks and later always seal all files in a bundle; there is no need to specify this explicitly any more. This also means that the Code Signing Resource Rules Path build setting in Xcode should no longer be used and should be left blank.

So my question is why everybody is so quick on hand to bypass, hack, workaround this issue, when the documentation clearly says that is should be blank and it's obsolete?

What is the real problem behind this? Why the build fails on something that is not required for several years?

解决方案

I had the same problem. The solution suggested by Mr.Dan Cutting here works for me.

Just to save some time, here is what we need from the web link.

"As of Mavericks, the resource-rules option should not be included when signing apps, but for some reason the script still passes this option along to the code signing tool.

The workaround is to alter the PackageApplication script so it no longer does this (which will require sudo access). Line 155 of the script constructs the parameters to pass through to the code signer, so we can simply remove the references to resource-rules:"

//Remove - Begin
    - my @codesign_args = ("/usr/bin/codesign", "--force", "--preserve-metadata=identifier,entitlements,resource-rules",
    -   "--sign", $opt{sign},
    -   "--resource-rules=$destApp/ResourceRules.plist");
//Remove - End

//Add - Begin
    + my @codesign_args = ("/usr/bin/codesign", "--force", "--preserve-metadata=identifier,entitlements",
    +   "--sign", $opt{sign});
//Add - Starts

这篇关于代码签名资源规则路径在Jenkins上失败,CODE_SIGN_RESOURCE_RULES_PATH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆