Skip to content

Resolve symlinked executable path when detecting install root#1415

Open
Ninja3047 wants to merge 1 commit intoapple:mainfrom
Ninja3047:resolve-symlink-install-root
Open

Resolve symlinked executable path when detecting install root#1415
Ninja3047 wants to merge 1 commit intoapple:mainfrom
Ninja3047:resolve-symlink-install-root

Conversation

@Ninja3047
Copy link
Copy Markdown

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

This allows the container binary to be symlinked to alternative locations for packaging purposes, but still be able to resolve plugins properly. As a workaround, packagers can set CONTAINER_INSTALL_ROOT to the actual install location but this seems more elegant.

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

@Ninja3047 Ninja3047 force-pushed the resolve-symlink-install-root branch from c7d1f50 to c1a9514 Compare April 14, 2026 20:43
@Ninja3047 Ninja3047 force-pushed the resolve-symlink-install-root branch from c1a9514 to e956e82 Compare April 14, 2026 20:48
@JaewonHur JaewonHur requested a review from jglogan April 20, 2026 17:20
@jglogan
Copy link
Copy Markdown
Contributor

jglogan commented Apr 28, 2026

@Ninja3047 Can you provide more details in an enhancement issue about the packaging use case you'd like to support?

We just removed some code that relates to this in #1451.

The extension and packaging documentation is still a work in progress but basically, we allow you to symlink to your unpacked package from a unix-like install root (such as /usr/local or /opt/homebrew), but you need to copy your plugin hierarchy from your package root to ${INSTALL_ROOT}/libexec/container/plugin. With this structure there

Third-party plugins should install into ${INSTALL_ROOT}/libexec/container-plugin/${plugin_id}.

If we resolve symlinks for the install root path, then for Homebrew cask installs, the plugins are resolved under Caskroom whose paths change with each release, and this can cause confusion in TCC for local network privacy policy.

We only need to resolve symlinks for the executable path in launchd plists. Here, if we're not pointing to the right place and we're doing bundle packaging, Gatekeeper will keep the executable from launching.

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.

3 participants