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

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

问题描述

我不太关心人们如何对待以下问题.

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

基本上听起来像在 Jenkins 上构建失败,ResourceRules.plist: cannot read resources"

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

我的情况是:

1) 詹金斯

2) 在本地,我在 Xcode 7 beta 中工作(在一个单独的分支上)

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

3) 我的队友在 6.4.1 中工作,对他们来说一切正常

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

4) Jenkins slave 已安装 Xcode 6.4.1

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.

但是文档 说如下:

资源规则

OS X Mavericks v10.9 之前的系统记录了一个签名功能 (--resource-rules) 来控制捆绑包中的哪些文件应由代码签名密封.此功能已被 Mavericks 淘汰.在 Mavericks 和后来的代码签名总是将所有文件密封在一个包中;不再需要明确指定这一点.这也意味着 Xcode 中的 Code Signing Resource Rules Path 构建设置不应再使用,应留空.

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?

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

推荐答案

我也遇到了同样的问题.Dan Cutting 先生提出的解决方案 here 有效给我.

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.

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

"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.

解决方法是更改​​ PackageApplication 脚本,使其不再执行此操作(这将需要 sudo 访问权限).脚本的第 155 行构造了要传递给代码签名者的参数,因此我们可以简单地删除对资源规则的引用:"

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天全站免登陆