[v3] - fix(windows): use 7za-only archive extraction for compressed tarballs#1175
Open
luthermonson wants to merge 1 commit into
Open
[v3] - fix(windows): use 7za-only archive extraction for compressed tarballs#1175luthermonson wants to merge 1 commit into
luthermonson wants to merge 1 commit into
Conversation
The previous implementation piped 7za output to Windows' built-in tar.exe to handle gz/xz/bz2 tarballs. This fails on certain archives containing symlinks: Windows tar.exe cannot create symlinks unless the build is running with Developer Mode enabled or with admin privileges, and a failure mid-extract leaves the source tree in a broken state. Replace the pipeline with a two-pass 7za extraction (compressed wrapper then inner .tar) into a temp directory, with strip-components handled in PHP. 7za silently skips symlinks during tar extraction, which is the desired behavior for spc's source preparation - the symlinks in question are documentation or build-system artifacts that aren't needed for the static build.
Owner
|
Same as #1174 . BTW I plan to replace php-sdk-binary-tools to msys2 tools because php-sdk-binary-tools' msys2 is missing some components that we may have to use in the future. It will also need to download separated 7z executable first in our toolchain. But I'll handle it later. And for full-7za instead of |
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.
The previous implementation piped 7za output to Windows' built-in tar.exe to handle gz/xz/bz2 tarballs. This fails on certain archives containing symlinks: Windows tar.exe cannot create symlinks unless the build is running with Developer Mode enabled or with admin privileges, and a failure mid-extract leaves the source tree in a broken state.
Replace the pipeline with a two-pass 7za extraction (compressed wrapper then inner .tar) into a temp directory, with strip-components handled in PHP. 7za silently skips symlinks during tar extraction, which is the desired behavior for spc's source preparation - the symlinks in question are documentation or build-system artifacts that aren't needed for the static build.