Repository navigation
Add an opt-in portable DER entitlements encoder (apple.portable_derq) - #3104
Open
mauriciogg wants to merge 1 commit into
Open
mauriciogg wants to merge 1 commit into
mauriciogg wants to merge 1 commit into
Conversation
ProcessDEREntitlements runs /usr/bin/derq to encode the entitlements plist that is linked into the __TEXT,__ents_der section of simulator binaries. derq exists only on macOS, so every link of such a binary carries a Mac-only input even when compilation and linking run on Linux remote executors. Add tools/derq, a Python encoder of the TN3125 DER layout invoked with derq's argv (`query -f xml -i IN -o OUT --raw`), expose it from the xplat tools toolchain as derq_tool, and use it for ProcessDEREntitlements when the new apple.portable_derq feature is enabled. Without the feature nothing changes: the action still runs /usr/bin/derq in the Mac execution group. The encoder's output is byte-identical to derq's on fixtures covering every plist value type and key ordering (derq_unittest). derq aborts on <data> and <date> values and silently truncates <real>; the tool rejects them instead.
mauriciogg
requested review from
aaronsky,
adincebic,
brentleyjones,
keith and
luispadron
as code owners
October 13, 2026 18:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ProcessDEREntitlementsruns/usr/bin/derqto produce the DER copy of the entitlements.derqonly exists on macOS, so every link of such a binary has a Mac-only input even when compilation and linking otherwise run on Linux remote executors.Opt-in only. Without the feature nothing changes: the action still runs
/usr/bin/derqin the Mac execution group. Documented indoc/common_info.mdalongside the otherapple.*features.Testing
//tools/derq:derq_unittestchecks the encoder's output is byte-identical to Apple's derq on fixtures covering every plist value type (bool, integer, string, data-free arrays and dicts, nesting, unicode, long strings) and key ordering, plus the error cases: derq aborts on<data>and<date>values and silently truncates<real>, and the tool rejects those with an error instead. The feature path has been used to build and run a large iOS app with remote execution on Linux workers, with the resulting binary installing and launching on the simulator.