Skip to content

Conversation

@euanh
Copy link
Collaborator

@euanh euanh commented Mar 4, 2025

Motivation

The tar writer is able to write a single file into a tar archive. This is enough to build a container image around a single executable, but adding resource bundles (issue #48) requires the ability to write multiple files, directories and possibly symlinks into the archive. This commit begins to refactor the tar writer to support this. A future commit will add interoperability testing to ensure that more complex archives can be unpacked correctly.

Modifications

  • Add a TarHeader struct representing a standard tar archive member
  • Convert type flags to an enum
  • Wrap fields in a namespacing enum

Result

No functional change. Tar writer is more modular, easier to test and extend.

Test Plan

Existing tests continue to pass.

@euanh euanh force-pushed the tar/refactoring branch from 1840f9b to 3af764c Compare March 4, 2025 11:24
@euanh euanh force-pushed the tar/refactoring branch from 3af764c to 2508905 Compare March 4, 2025 11:29
@euanh euanh merged commit 2d0a85c into apple:main Mar 4, 2025
19 checks passed
@euanh euanh deleted the tar/refactoring branch March 4, 2025 12:15
@euanh euanh added kind/enhancement New feature or request semver/none No version bump required. labels Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement New feature or request semver/none No version bump required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant