Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vcpkg_extract_archive: Use vcpkg.exe z-extract #42370

Closed
wants to merge 6 commits into from

Conversation

JavierMatosD
Copy link
Contributor

Uses vcpkg.exe to unpack 7z.exe archives.

This causes a bug with vcpgk_find_acquire(CLANG) since we are currently downloading its archive as a 7z.exe even though it is not a 7z archive. The tool cannot unpack it.

@JavierMatosD JavierMatosD marked this pull request as draft November 26, 2024 15:19
@Cheney-W Cheney-W added category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly info:internal This PR or Issue was filed by the vcpkg team. labels Nov 27, 2024
@JavierMatosD
Copy link
Contributor Author

vcpkg_find_acquire(7z) should give use the full 7zip as a.7z.exe, the tool should unpack that. ✅

vcpkg fetch 7zip should return full 7zip so we should be able to use 7zip for literally any unpacking. ✅ (We don't need 7zr for anything)

Problem:
vcpkg_find_acquire(CLANG) downloads as a .7z.exe -> triggers tool extraction -> 💣 (not a real 7z archive)

@JavierMatosD
Copy link
Contributor Author

Changed vcpkg_find_acquire(CLANG) to download as a .exe since it is not a 7z archive. I've opened another PR against the tool that specifically looks for .7z.exe extensions, assuming it is a 7zip archive, and uses the self extractor for those instances. Else, .exe will be extracted using 7zip.

@JavierMatosD JavierMatosD marked this pull request as ready for review December 3, 2024 20:46
@JavierMatosD JavierMatosD changed the title use vcpkg.exe for 7z.exe extraction use vcpkg.exe for extraction Dec 3, 2024
@JavierMatosD JavierMatosD changed the title use vcpkg.exe for extraction Use vcpkg.exe for extraction Dec 3, 2024
@BillyONeal
Copy link
Member

I merged with master due to #42491 merging for a CVE fix

Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not merge this into master.

Instead, assuming https://github.com/microsoft/vcpkg/ is origin, please:

git fetch origin
git merge origin/master
git reset origin/master
git commit -am "The commit text you're happy to put into vcpkg's history."
git push origin 7z_extraction

and close this PR.

We'll can use that resulting commit SHA in a tool release.

(I would follow the instructions myself but I want you to be listed as the author of the commit and I'm unwilling to git blame-someone-else to do that)

@BillyONeal
Copy link
Member

Hmmm.... Azure seems unhappy for some reason. No reason to think those failures are related to changes here yet.

@BillyONeal
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BillyONeal BillyONeal changed the title Use vcpkg.exe for extraction vcpkg_extract_archive: Use vcpkg.exe for extraction Dec 6, 2024
@BillyONeal BillyONeal changed the title vcpkg_extract_archive: Use vcpkg.exe for extraction vcpkg_extract_archive: Use vcpkg.exe z-extract Dec 6, 2024
@BillyONeal
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly info:internal This PR or Issue was filed by the vcpkg team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants