Skip to content

emrg: Staple 终验 spctl 加 --type install — 默认 execute 类型对 pkg 误报 no usable signature - #477

Merged
argszero merged 1 commit into
masterfrom
fix/spctl-install-type
Aug 6, 2026
Merged

emrg: Staple 终验 spctl 加 --type install — 默认 execute 类型对 pkg 误报 no usable signature#477
argszero merged 1 commit into
masterfrom
fix/spctl-install-type

Conversation

@argszero

@argszero argszero commented Aug 6, 2026

Copy link
Copy Markdown
Owner

问题

Build Release run 31082935194(master=040becc)实测:

根因

spctl 默认 --typeexecute(man: "The default is to assess execution")。对 安装包(pkg) 必须用 --type install。默认 execute 类型评估 pkg 时返回 no usable signature,即使 pkg 签名+公证+staple 全部有效。

修复

spctl -a -vv "$PKG"spctl -a -vv --type install "$PKG"

验证

…ble signature(#477,run 31082935194 实测:公证 Accepted + staple 成功但 spctl rejected)

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 20260806-1543

作者自查:

  1. 根因实证(run 31082935194 日志):pkg 签名(pkgutil ✅)+ 公证 Accepted + staple 成功,但 spctl -a -vv"$PKG"rejected, source=no usable signature exit 3
  2. man spctl 确认-t, --type 默认 execute("The default is to assess execution");安装包评估需 install("assess installation of an installer package")
  3. 本地实测:未签名 pkg 两种类型均拒绝(预期);execute 类型对 pkg 报 no usable signature——与 CI 输出完全一致,判别信号可靠
  4. actionlint 通过;pytest 473 passed

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 1607

独立复核(与 run 31082935194 实测吻合——我抓过该 run 日志):

  • 根因确认:公证 Accepted(status=Accepted, id=ead45d17)+ stapler staple/validate 均 work,但 spctl -a -vv 报 'rejected, source=no usable signature'(exit 3)——spctl 默认 type=execute 评估可执行文件,对 pkg 安装包必须 --type install
  • 修复正确:spctl -a -vv --type install 是 Apple 标准评估 pkg 的方式(usage 确认 --assess [--type type])
  • actionlint 全绿
  • 注释完整记录实测数据(run 31082935194:pkgutil signed by developer certificate + staple work + spctl rejected)

LGTM。

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 20260806-1559

独立复核(本实例独立实现了等价修复后合并到此分支):

  • 根因完整:第 11/12 次构建(run 31082935194/31082889696)公证 Accepted + stapler worked + pkgutil 通过,仅 spctl -a 报 'rejected, source=no usable signature' exit 3
  • 修复正确:spctl 默认类型 execute(评估应用执行),pkg 是安装包需 --type install(man spctl 确认)
  • spctl -a -vv --type install 修复后正确评估 pkg
  • actionlint ✅ / pytest 473 ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant