-
-
Notifications
You must be signed in to change notification settings - Fork 246
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
[BUG] Keka doesn’t extract tarballs with XZ compression correctly. #712
Comments
By the way, if I have a file named Firefox Beta (84.0).txz, Keka extracts it to Firefox Beta (84 folder. This isn’t that much of a problem (but you can see it in the screenshot) so I'll just leave it FYI. |
@VaslD what Since the bundle is so big, maybe you can just create a txz with a file of the bundle and share it with me, for example: tar -cJf ~/Desktop/Test.txz -C /Applications Affinity Publisher.app/Contents/Frameworks/libxmp.dylib What I've did:
aONe-Mini:~ aone$ which tar
/usr/bin/tar
aONe-Mini:~ aone$ tar --version
bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.6
Reproduced this issue, only when using "Always extract in a subfolder" or with the context menu item "Extract to Firefox (84.0)". Fixing this one right away!
Indeed! 😂 |
I have the exact But I can no longer reproduce the issue with just a .dylib, or modified Affinity Publisher.app less than 100 MB. I haven’t tried re-tarring the 3 GB package. I’ll get back to you when I have more info. |
@VaslD also for me it's no problem downloading a 3GB (or more) package, so in case is no problem for you just send me a link to info@keka.io. |
Since I can't reproduce this anymore I'll close it until next time. |
Hopefully we can reproduce this in the future to fix it :) Thanks a lot @VaslD! |
@VaslD I've finally reproduced it (thanks to a mail from Jérôme from https://foxtrot-search.com) and fixed it in this build. The fix will come eventually in v1.2.7 so hopefully you'll never find this issue again. It was also reported in #741, it's almost the same issue, and the feedback with the build was positive :) |
Awesome! May I know what went wrong (in some detail)? It's been bugging me constantly, especially that it doesn't happen every time. |
Sure! It was about the locale setting being empty while running |
Sorry I have to reopen this. The latest GitHub version of Keka (1.2.12) on macOS 11.2.3 (20D91) still has the same issue. XZ ( Logs attached: In the first session, Keka failed to extract its own application bundle from XZ archive. But in the second session, Keka succeeded in compressing and decompressing XZ of another open-source utility App Cleaner. I also tried excluding resource forks, leaving the app running or killing it before compressing, using different output folders. None worked. |
No problem for me on 10.15.7. Can you share with me that |
This is an XZ of Keka.app compressed when Keka itself was running. (It's not a zip but an |
Probably won't fix it, but at least I should try. This build also applies the UTF-8 variable during compression. So let me know if compressing with that version fixes the issue: I'm mostly sure it won't. I'll have to deeply debug this one again, then. |
Appreciated. I’ll run it on the machine that exhibit the issue and get back to you hopefully tomorrow.
If you need any additional debugging info or to run additional tests, let me know.
Best,
Yi
… On Apr 13, 2021, at 22:50, aONe ***@***.***> wrote:
Probably won't fix it, but at least I should try. This build also applies the UTF-8 variable during compression. So let me know if compressing with that version fixes the issue:
Keka-1.2.13r4522.7z
I'm mostly sure it won't. I'll have to deeply debug this one again, then.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Also, would it be possible to then fallback to system/BSD `tar` if extraction result was unexpected? E.g. checksum failure, recursively extracting archive from archive, extraction produced none-sense or internal metadata like PAXHeader, to name a few.
Since system `tar` is pretty much always available and stable, it would be a better/prioritized choice then falling back to 7-zip.
… On Apr 13, 2021, at 22:54, Yi Ding ***@***.***> wrote:
Appreciated. I’ll run it on the machine that exhibit the issue and get back to you hopefully tomorrow.
If you need any additional debugging info or to run additional tests, let me know.
Best,
Yi
>> On Apr 13, 2021, at 22:50, aONe ***@***.***> wrote:
>>
>
> Probably won't fix it, but at least I should try. This build also applies the UTF-8 variable during compression. So let me know if compressing with that version fixes the issue:
>
> Keka-1.2.13r4522.7z
>
> I'm mostly sure it won't. I'll have to deeply debug this one again, then.
>
> —
> You are receiving this because you modified the open/close state.
> Reply to this email directly, view it on GitHub, or unsubscribe.
|
Same error with system one (running through Keka). The problem here is sandboxing... |
Turns out this was indeed a sandbox issue, that package contains quarantine data and sandboxed Since all sandboxed applications (like Keka) have a quarantine applied for any newly created files (macOS system applies it), that quarantine would be replaced anyway so I'm skipping that warning. This build should extract the package properly: Keka-v1.2.13-r4540.7z If you have 2 minutes try to apply a color flag to Thanks again for all the feedback @VaslD! |
Apologies for not checking the other build today as promised. Mac should flag my Mail.app to remind me to check my flagged emails. So, the new build worked flawlessly. Tested using another 100 MB+ app bundle to be sure, both color attribute and permissions needed to execute the app were set as expected. Thank you for keeping Keka live and awesome. Closing this as resolved. |
Thank you @VaslD, users like you are 🔝 |
Configuration
Describe the bug
Our company’s managed account had no access to Disk Utility and DMG functionalities so I wrote a bash (probably zsh syntax) script to compress each application in
/Applications
usingtar
command. So later I could selectively untar individual apps using Keka.For most apps this worked flawlessly. But for Affinity Publisher, Keka and macOS Archive Utility exhibited entirely different behaviors.
(I’ve been doing it this way for years. Interestingly, I think my last issue with Keka was also when compressing or uncompressing Affinity apps.)
All archives were created with
tar -c -J
(which means create an archive with XZ compression). Their extensions were set to.txz
.I did 4 runs for science:
tar -x -J
(which means uncompress an XZ archive) in Terminal.On first 2 runs, Keka seemed to process an archive twice: First extracting a
*.tar
or a file with the same filename but no filename extension; then processing the file in the first step to extract a folder named PaxHeader with the original app, which macOS deemed cannot be opened because of permission issues.On last 2 runs, both
tar
command and AU extracted the original app with no extra steps/files. The app can be opened and passed GateKeeper.I did not do a hash check for individual files in the application bundle.
To Reproduce
Not sure this is 100% reproducible though.
Create a tarball with XZ compression for any application.
Uncompress new archive using Keka.
Uncompress the same archive using Archive Utility.
Uncompress with
tar
:Compare results.
Expected behavior
Keka should recreate the original app from archive with correct permissions, and should swallow any "header" (without actually extracting them).
Screenshots
This is what happened to Affinity Publisher and Firefox. All tarballs were created equal.
Additional context
Keka log for extracting Firefox (correctly) and Affinity Publisher (incorrectly).
Keka_2020-12-02-200230755.log
The text was updated successfully, but these errors were encountered: