News for hackers. Stuff that matters.
Re:Apple introduces Ask Apple for developers by saagarjha on Wednesday October 12, 2022 @04:21AM (#33174286)
Xcode is not an OS component, but it could certainly be distributed as a APFS disk image that could be union mounted (this is actually how the watchOS and tvOS SDKs work today, plus Apple does this internally). I suspect they use XIPs to get that signature (which, tbh, is kind of useless) and compress it hard, but IMO these tradeoffs are not great. I have a long-term goal of writing out to a disk image myself, but my motivation would be to bypass filesystem performance bottlenecks when decompressing the archive.

> For that matter, given that the APFS OS volume is read-only, is there a reason macOS hasn't yet transitioned to the coreOS model where OS updates just are just Courgette-alike binary diffs that construct a new OS volume beside the old OS volume atomically by stream-merging the old volume with the patch, and then blessing the result?

To my knowledge this is pretty close to how updates work today.

Re:Apple introduces Ask Apple for developers by derefr on Wednesday October 12, 2022 @12:04PM (#33178990)
> To my knowledge this is pretty close to how updates work today.

But the key advantage of this model is a sort of green/blue deploy model for your OS — when you do it, you can construct the new updated OS release in the background while the previous release of the OS is running; and then you "update" by just rewriting the UEFI boot priority to default to the new release. There's no reason that an "OS update" should ever be a thing that sits around and blocks startup.

I think your intended meaning, is that the current model involves a binary diff that gets used to patch the OS volume, while the OS is booted into the recovery volume. Which, yeah, uses kind of the same ideas, but doesn't give any of the same advantages.