Commit Graph
2 Commits
Author SHA1 Message Date
Dylan M. TaylorandRRFZ 42bb9d35bb tar: preserve current sparse, PAX size and CRC symlink behavior (#2012)
* tar: port old GNU sparse extension traversal from Craft Anything

Source: storytold/craft-anything#1973, 8ea2ec66a1bc80f0420f3695baac877a0cb9b9a5. Retains non-extractable sparse member kind and regression tests.

* tar: preserve GNU CRC symlink checksum compatibility

Source: storytold/craft-anything#1984, b226a475f7dce9710e3af7a069386fe7a9720df7; preserves nonzero checks and regular-file checksum validation.

* tar: apply valid PAX sizes before legacy member size fields

Source: storytold/craft-anything#2007, d29465c20b0d570ea4973be512a0cb4e212bb60f; metadata records still retain their own framing.

* Record provenance of current TAR and CPIO compatibility fixes

---------

Co-authored-by: RRFZ <247457381+Plastic-time@users.noreply.github.com>
2026-11-17 09:58:18 -05:00
d25dcc5773 Add craft-tar: TAR and cpio member walkers from Craft Anything
Moves Craft Anything's crates/formats/src/tarcpio.rs (main 090188d7) into a shared crate with
its unit tests, the TAR integration tests from crates/formats/tests, and the archive builders
those tests use. The public API is unchanged; CpioChecksum and cpio_with_checksum become public
so the app's firmware scanner can keep sharing its checksum allowance. The pax record handling
is split out of the walker (same checks, same warnings) to stay under the workspace's
cognitive-complexity limit. Serialize is behind an optional `serde` feature.

Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: Afloat <ShuffleMonkey@163.com>
Co-authored-by: BFlat <bombayapirat@gmail.com>
Co-authored-by: RRFZ <247457381+Plastic-time@users.noreply.github.com>
Co-authored-by: NetterSilver <133535268+Silvertree2010@users.noreply.github.com>
2026-11-16 11:30:54 +01:00