Skip to content

Embed Info.plist into the binary on macOS#1039

Merged
edigaryev merged 2 commits into
mainfrom
edi-embed-info-plist
Mar 17, 2026
Merged

Embed Info.plist into the binary on macOS#1039
edigaryev merged 2 commits into
mainfrom
edi-embed-info-plist

Conversation

@edigaryev

Copy link
Copy Markdown
Contributor

This should hopefully allow us to add TCC.db entries based on a bundle identifier (com.github.cirruslabs.cirrus-cli), which is useful for long-term AMI baking.

Currently only absolute paths are possible (/opt/homebrew/Cellar/cirrus/0.165.1/bin/cirrus), which change on each newly released version.

@edigaryev
edigaryev requested a review from fkorotkov as a code owner March 16, 2026 21:59

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c7c0fb4601

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .goreleaser.yml Outdated
ldflags:
- -X github.com/cirruslabs/cirrus-cli/internal/version.Version={{.Version}}
- -X github.com/cirruslabs/cirrus-cli/internal/version.Commit={{.ShortCommit}}
- '{{- if eq .Os "darwin" }}-extldflags "-sectcreate __TEXT __info_plist Info.generated.plist"{{ end }}'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Force external link mode when adding __info_plist section

go doc cmd/link states that -extldflags are passed to the external linker and that -linkmode controls internal/external/auto behavior; this change adds only -extldflags for darwin without forcing external mode. I checked this repo’s sources with rg 'import "C"|#cgo' and found no cgo files, so auto mode can remain internal and skip -sectcreate, which means Info.generated.plist is not embedded and the bundle identifier requirement from this commit is not reliably met.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Interesting detail.

Improved in ec9dd3c.

@edigaryev
edigaryev merged commit 614579a into main Mar 17, 2026
10 of 11 checks passed
@edigaryev
edigaryev deleted the edi-embed-info-plist branch March 17, 2026 13:18
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.

2 participants