Repository navigation
feat(remote): export ranged remote APFS reading as pkg/remote - #1410
Open
KishanBagaria wants to merge 2 commits into
Open
KishanBagaria wants to merge 2 commits into
KishanBagaria wants to merge 2 commits into
Conversation
Move the HTTP range ReaderAt out of internal/download and the ZIP member -> AEA -> UDIF -> GPT -> APFS chain out of internal/commands/extract, so other modules can open a volume of a remote IPSW without copying them. `ipsw extract --ranged` calls the new package; its behavior is unchanged. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]>
This branch has not been deployed
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.
Moves the ranged remote-volume reading added in #1408 and #1409 from
internal/to a public package,pkg/remote. The motivation is my ipswrun package, which reads files out of remote restore images the same way and carries its own copy of this code; with this exported it can import it and drop the copy.NewRangeReader(url, *Config): the reader frominternal/download/range_reader.go, moved with its tests.OpenZipAPFS(remote, size, member, *AEAConfig): stored ZIP member, then AEA, UDIF and GPT when present, then go-apfsOpenReader. This is the first half ofextractRemoteDMGRanged, moved as it was.OpenAPFS(image, size, *AEAConfig): the same for image bytes that are not a ZIP member.APFSPartition(source, size): moved frominternal/commands/extract.ipsw extract --rangedcalls the package; its behavior is unchanged.Testing
go build ./...passes.go test -count=1 ./pkg/remote ./internal/commands/extract ./internal/download: all threeok.TestOpenAPFSImageopens the existing synthetic APFS fixture throughOpenAPFS. The existing end-to-end tests (plain and AEA) go throughOpenZipAPFS.Not run:
go test ./...in full, and a live run against an Apple restore image.AI Assistance
Planned and written by Claude Fable 5.2. Reviewed manually.
🤖 Generated with Claude Code