Archiver: preserve symlinks and explicit build-context entries#1391
Open
mazdak wants to merge 1 commit intoapple:mainfrom
Open
Archiver: preserve symlinks and explicit build-context entries#1391mazdak wants to merge 1 commit intoapple:mainfrom
mazdak wants to merge 1 commit intoapple:mainfrom
Conversation
This was referenced Apr 5, 2026
Open
jglogan
reviewed
Apr 5, 2026
| return hasher.finalize() | ||
| } | ||
|
|
||
| public static func uncompress(source: URL, destination: URL) throws { |
Contributor
There was a problem hiding this comment.
I removed this in #1372 because it's insecure and should not be used. See ArchiveReader.extractContents() in containerization in this commit: apple/containerization@3e93416
Contributor
|
Can you provide a simple |
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.
Type of Change
Motivation and Context
While building out a Docker Compose-style plugin and validating it against our own real development stack, we ran into two classes of problems in the build-context path:
Original Issue
So the original problem was: our repo/docker-compose made the build-context path look both too slow and not fully trustworthy.
This PR fixes build-context archiving in
containerso symlinks are preserved correctly, digest calculation reflects symlink target changes, and fssync archives the exact selected file set in the already-computed order.Before this change, build-context archiving could mis-handle symlinks, archive a broader tree walk than necessary, and produce a digest that did not change when symlink targets changed.
Part of the fix was also more generally related to the Containerization framework. This PR intentionally stays independently mergeable against the current released
containerizationdependency, so it keeps the local archiver implementation needed for these fixes today. The Containerization PR is: apple/containerization#652Testing