Repository navigation
OPENSTEP support: open Sun-labelled NeXT CDs, expand .tar.bz2 on import - #86
Merged
Merged
Conversation
…XT label The OPENSTEP 4.2 Install CD boots on m68k, Intel and SPARC, so block 0 holds a Sun label with no usable slices and detection stopped there: inspect showed no partitions and nothing could be browsed. The NeXT probe now runs ahead of Sun (its checksum cannot match by accident) and also looks at the copies these discs keep at 512-byte blocks 16 and 48. A label rewrite updates those copies too and keeps the block numbers they record in 2048-byte units. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…NeXT CDs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The OPENSTEP archive carries .tar.bz2 sources, which --expand-archives copied in verbatim because tar detection only peeled gzip and zstd. The five copies of the magic sniff collapse into one open_tar_stream helper that also recognises bzip2 (multi-stream, since pbzip2 writes one stream per block). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Two changes from building the OPENSTEP CD-ROM set.
1. Open Sun-labelled NeXT CDs through their NeXT label
CDs that also boot on SPARC carry a Sun disklabel at block 0 (next to an HP-PA LIF header) and keep their NeXT
dlV3copies at 512-byte blocks 16 / 30 / 48 (bytes 8192 / 15360 / 24576). Partition detection checked for Sun first and returned on it, sorb-cli inspectshowed "Partition table: Sun / No partitions detected" and the UFS could not be browsed or checked.present_copiessees them too, so a label rewrite (restore resize, partition edits) updates every copy, not just the one at block 30.write_copieskeeps thedl_label_blknothose two copies record (4 and 12, in 2048-byte units), matching the real disc.Checked by hand with the release binary (
inspect,fsck IMG@1) on every NeXT CD image available:New test
a_sun_labelled_multi_arch_disc_opens_through_its_next_labelinnext_cd_builder.rsreshapes a built disc into that layout and checks detection, the copy stamps, and that the UFS opens, takes a file and passes fsck. No real ISO is committed.2. Expand
.tar.bz2archives on import--expand-archivescopied.tar.bz2files in verbatim because tar detection only recognised gzip and zstd. The five copies of that magic-byte check insrc/fs/tar_import.rsare now oneopen_tar_streamhelper, which also recognises bzip2, including multi-stream files as pbzip2 writes them..tbzjoins the suffixes stripped from unpack folder names. Thebzip2crate was already a dependency (0.6, and 0.5.2 in the vintage manifest), so nothing new is added. New testa_multi_stream_tar_bz2_expands_into_its_own_folder; CLI help anddocs/cli-reference.mdupdated.Used for the OPENSTEP set:
Developer/egcs-1.1.2-2.s.tar.bz2now unpacks to 5,838 entries with its original dates.Checks
scripts/preflight.shpassed on each change (release tests, MiSTer feature set, Rust 1.73 vintage build, doc parity, rb-regress); clippy and the affected tests pass on the combined branch.🤖 Generated with Claude Code