xmake-io / xmake

🔥 A cross-platform build utility based on Lua
https://xmake.io
Apache License 2.0
9.87k stars 776 forks source link

xmake windows 的安装包内置 7z 太旧,出现解包出额外的 tar 信息 #5251

Closed zeromake closed 3 months ago

zeromake commented 3 months ago

Xmake 版本

2.9.3

操作系统版本和架构

Windows_NT DESKTOP-S6KRG6H 10.0 22631 x86_64 MS/Windows

描述问题

主要是 SPIRV-Cross-5d127b.tar.gz 使用内置 7z 会有这个问题。 下面是 windows 使用 powershell 的操作。

$ curl -L -o xmake-v2.9.3.win64.zip https://github.com/xmake-io/xmake/releases/download/v2.9.3/xmake-master.win64.zip
# 下载出现问题的 tar.gz 包
$ curl -L -o 5d127b.tar.gz https://github.com/KhronosGroup/SPIRV-Cross/archive/5d127b917f080c6f052553c47170ec0ba702e54f.tar.gz
$ Expand-Archive -Path .\xmake-v2.9.3.win64.zip -DestinationPath .
$ .\xmake\winenv\bin\7z x -y .\5d127b.tar.gz
$ .\xmake\winenv\bin\7z x -y .\5d127b.tar "-o.\source.temp"
$ dir .\source.temp
# 正常应该只有 SPIRV-Cross-5d127b917f080c6f052553c47170ec0ba702e54f 目录
Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----           2024/6/18    23:12                SPIRV-Cross-5d127b917f080c6f052553c47170ec0ba702e54f
-a---           2024/6/18    23:12           3558 1b6918c5eb80848d0949152ec706d633a7466c62.data
-a---           2024/6/18    23:12            200 1b6918c5eb80848d0949152ec706d633a7466c62.paxheader
-a---           2024/6/18    23:12           2698 307f8952ce6b0fb92a258db1c2d427604ff873b5.data
-a---           2024/6/18    23:12            201 307f8952ce6b0fb92a258db1c2d427604ff873b5.paxheader
-a---           2024/6/18    23:12           6751 573c4f2dadfe9f229527eb34f5324aadb023efc4.data
-a---           2024/6/18    23:12            214 573c4f2dadfe9f229527eb34f5324aadb023efc4.paxheader
-a---           2024/6/18    23:12            674 6f0d06a869e8d918db76e0b22a590dcf2158e0b2.data
-a---           2024/6/18    23:12            191 6f0d06a869e8d918db76e0b22a590dcf2158e0b2.paxheader
-a---           2024/6/18    23:12           9603 938eea96a5759b40c19bd40a56bfd82492c526d4.data
-a---           2024/6/18    23:12            210 938eea96a5759b40c19bd40a56bfd82492c526d4.paxheader
-a---           2024/6/18    23:12           2420 f8becad4834b2b1b48d91d1a17a03b2fd19f4e63.data
-a---           2024/6/18    23:12            205 f8becad4834b2b1b48d91d1a17a03b2fd19f4e63.paxheader
-a---           2024/6/18    23:12             52 pax_global_header

期待的结果

正常解压不会有 pax_global_header 之类的文件。

工程配置

无需

附加信息和错误日志

尝试了 https://7-zip.org/download.html 的 7-Zip 24.07 (2024-06-19) 都能正常解压不会出现 pax_global_header 应该是windows 打包的 7z 版本太旧了,可以先用 7-Zip 24.07 的 7z.exe,7z.dll 替换 xmake 安装包里的 winenv/bin 目录下的 7z。

Issues-translate-bot commented 3 months ago

Bot detected the issue body's language is not English, translate it automatically.


Title: The built-in xmake of Windows is too old, and extra tar information appears when unpacking.

Xmake version

2.9.3

Operating system version and architecture

Windows_NT DESKTOP-S6KRG6H 10.0 22631 x86_64 MS/Windows

Describe the problem

Mainly SPIRV-Cross-5d127b.tar.gz has this problem when using the built-in 7z. The following is the operation of windows using powershell.

$ curl -L -o xmake-v2.9.3.win64.zip https://github.com/xmake-io/xmake/releases/download/v2.9.3/xmake-master.win64.zip
# Download the problematic tar.gz package
$ curl -L -o 5d127b.tar.gz https://github.com/KhronosGroup/SPIRV-Cross/archive/5d127b917f080c6f052553c47170ec0ba702e54f.tar.gz
$ Expand-Archive -Path .\xmake-v2.9.3.win64.zip -DestinationPath .
$ .\xmake\winenv\bin\7z x -y .\5d127b.tar.gz
$ .\xmake\winenv\bin\7z x -y .\5d127b.tar "-o.\source.temp"
$dir.\source.temp
# Normally there should be only the SPIRV-Cross-5d127b917f080c6f052553c47170ec0ba702e54f directory
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 2024/6/18 23:12 SPIRV-Cross-5d127b917f080c6f052553c47170ec0ba702e54f
-a--- 2024/6/18 23:12 3558 1b6918c5eb80848d0949152ec706d633a7466c62.data
-a--- 2024/6/18 23:12 200 1b6918c5eb80848d0949152ec706d633a7466c62.paxheader
-a--- 2024/6/18 23:12 2698 307f8952ce6b0fb92a258db1c2d427604ff873b5.data
-a--- 2024/6/18 23:12 201 307f8952ce6b0fb92a258db1c2d427604ff873b5.paxheader
-a--- 2024/6/18 23:12 6751 573c4f2dadfe9f229527eb34f5324aadb023efc4.data
-a--- 2024/6/18 23:12 214 573c4f2dadfe9f229527eb34f5324aadb023efc4.paxheader
-a--- 2024/6/18 23:12 674 6f0d06a869e8d918db76e0b22a590dcf2158e0b2.data
-a--- 2024/6/18 23:12 191 6f0d06a869e8d918db76e0b22a590dcf2158e0b2.paxheader
-a--- 2024/6/18 23:12 9603 938eea96a5759b40c19bd40a56bfd82492c526d4.data
-a--- 2024/6/18 23:12 210 938eea96a5759b40c19bd40a56bfd82492c526d4.paxheader
-a--- 2024/6/18 23:12 2420 f8becad4834b2b1b48d91d1a17a03b2fd19f4e63.data
-a--- 2024/6/18 23:12 205 f8becad4834b2b1b48d91d1a17a03b2fd19f4e63.paxheader
-a--- 2024/6/18 23:12 52 pax_global_header

Expected results

Normal decompression will not have files such as pax_global_header.

Project configuration

No need

Additional information and error logs

I tried 7-Zip 24.07 (2024-06-19) from https://7-zip.org/download.html and it decompressed normally without pax_global_header appearing. It should be that the 7z version packaged by Windows is too old. You can use 7 first. -Zip 24.07's 7z.exe, 7z.dll replaces 7z in the winenv/bin directory in the xmake installation package.

waruqi commented 3 months ago

更新了,你下载这里的包,全量重装下试试,https://github.com/xmake-io/xmake/actions/runs/9655573973

zeromake commented 3 months ago

@waruqi https://github.com/xmake-io/xmake/actions/runs/9655573973xmake-latest.win64.zip 我手动解压了,测试了 winenv/bin/7z.exe 没有变化还是 7-Zip 19.00

waruqi commented 3 months ago

应该可以了,再试试

https://github.com/xmake-io/xmake/actions/runs/9665828447

zeromake commented 3 months ago

@waruqi 没问题了确实是 7-Zip 24.07 了

Issues-translate-bot commented 3 months ago

Bot detected the issue body's language is not English, translate it automatically.


@waruqi No problem, it is indeed 7-Zip 24.07