jasp-stats / jasp-issues

This repository is solely meant for reporting of bugs, feature requests and other issues in JASP.
58 stars 29 forks source link

[Bug]: Zip files expand with backslashes on Linux, no subdirectories #2886

Closed zirneklitis closed 2 weeks ago

zirneklitis commented 3 weeks ago

JASP Version

0.19.0

Commit ID

No response

JASP Module

Unrelated

What analysis are you seeing the problem on?

Instalation file format

What OS are you seeing the problem on?

Linux

Bug Description

The archivator, which is used for creating releases' ZIP files (e.g. JASP-0.19.0.0-Windows.zip), does not respect ZIP file specification. As the result Zip files expand with backslashes on Linux, no subdirectories. Files with fancy names are created like "translations\qtwebengine_locales\lv.pak".

Expected Behaviour

The necessary subdirectories should be created while unpacking the file.

Steps to Reproduce

  1. Open/extract archive in Linux environment. Wrong_Zip

Log (if any)

No response

More Debug Information

No response

Final Checklist

shun2wang commented 3 weeks ago

Hi, @zirneklitis

I'm curious what your use case is, why would you want to open a Windows zip installation package on a Linux system? on Windows the \ is a valid path delimiter, but yes we didn't has a subdirectory for that zip file.

zirneklitis commented 3 weeks ago

Hi. As I have mentioned, '\' delimiter is not a valid delimiter for any ZIP file. (https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT 4.4.17.1 ).
In my case I am managing my Windows-based computer class through my Linux system.

More info:

shun2wang commented 3 weeks ago

Yes I know that but it made on Windows by some windows tools, so it just valid on Windows but not following ZIP stand 4.4.17.1, we using powershell Compress-Archive to compress a .zip file, see here:https://github.com/jasp-stats/jasp-desktop/blob/e5877e750eca076932dcf174be486a0d6523bdd7/Tools/windows/zip/ZIP.cmd.in#L15C1-L15C28 and which dose not following the standard by Microsoft, see:https://github.com/PowerShell/Microsoft.PowerShell.Archive/issues/54

shun2wang commented 3 weeks ago

@boutinb @RensDofferhoff maybe we can set a 7zip installer on our buildbot and made ZIP files from it to following the standard. or we can just using msys2(from Rtools44) to run a zip command zip a.zip

but I must admit this is not a priority as it is not the use case for the vast majority of people on Windows.

tomtomme commented 3 weeks ago

I also have a use case. Testing stuff via older releases on linux via wine. E.g. to see if some result differs from jasp to jasp version. I used wine in the past using the msi installer on linux, but that one does not work for every release. To have the zip as a fallback would be cool since flatpak has nothing like this to go back in time.

RensDofferhoff commented 3 weeks ago

Interesting issue! I like your idea @shun2wang I'm doing buildbot work anyway so I might just do 7zip instead. weird that the MS tool doesn't follow the standard

RensDofferhoff commented 2 weeks ago

I implemented this on our new buildbot VM. It will build a development nightly this evening. We now use the zip shipped with Rtools as suggested by @shun2wang . This should resolve this issue.