Skip to content

fix: package-pkg pins BundleIsRelocatable and rejects a relocatable pkg - #187

Merged
chaodu-agent merged 1 commit into
mainfrom
fix/package-pkg-relocatable
Nov 29, 2026
Merged

chaodu-agent merged 1 commit into
mainfrom
fix/package-pkg-relocatable

Conversation

@chaodu-agent

Copy link
Copy Markdown
Contributor

Replaces #186.

#186 was built on the 0.10.1 tree. The rename it carried (LaunchAgent dev.openab.computer, ~/.local/oab-computer/oab-computer.app, executable oab-computer, oab-computer-* artifacts) is already on main via #117 and shipped in v0.12.0. The one change main still lacked is the package-pkg.sh relocatable handling. This PR contains only that change, with a stricter version of it.

Change (scripts/package-pkg.sh)

  • Exit 70 if pkgbuild --analyze lists no :0 bundle. That is a packaging fault, and the script no longer treats it as a missing key.
  • Set :0:BundleIsRelocatable false when the key exists. Add :0:BundleIsRelocatable bool false when some macOS releases leave it out. Before this change the Set failed on those releases.
  • After pkgbuild, expand the pkg and exit 70 (removing the pkg) if PackageInfo lists a <bundle> under <relocate>. release.yml calls package-pkg.sh but not test-packaging.sh, so the release job now checks for the v0.6.0 relocation failure too.

Verification (macOS build host, clean git archive of this tree)

Check Result
swift build exit 0
swift test exit 0, 856 tests, 5 skipped, 0 failures
bash scripts/smoke.sh .build/debug/oab-computer exit 0
bash scripts/test-packaging.sh .build/debug/oab-computer exit 0, packaging smoke: OK (0.12.0)

The display-name issue stays tracked in #185.

pkgbuild --analyze on some macOS releases omits BundleIsRelocatable, and
the old `Set :0:BundleIsRelocatable false` then failed. package-pkg.sh now:
- fails (exit 70) when --analyze lists no :0 bundle at all;
- Sets the key to false when present, Adds it as bool false when absent;
- expands the built pkg and fails (exit 70, pkg removed) if PackageInfo
  lists a <bundle> under <relocate>. release.yml calls this script but not
  test-packaging.sh, so the release job now gets the v0.6.0 guard too.

Replaces #186, whose rename work main already ships in v0.12.0 (#117).

Verified on a macOS build host from a clean `git archive` of this tree
(80659ef), rsynced into the verify directory:
- swift build: exit 0
- swift test: exit 0, 856 XCTest tests, 5 skipped, 0 failures
- bash scripts/smoke.sh .build/debug/oab-computer: exit 0
- bash scripts/test-packaging.sh .build/debug/oab-computer: exit 0
  ("packaging smoke: OK (0.12.0)")
@chaodu-agent
chaodu-agent merged commit 973dd09 into main Nov 29, 2026
12 of 13 checks passed
@chaodu-agent
chaodu-agent deleted the fix/package-pkg-relocatable branch November 29, 2026 03:37
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