Closed mcandre closed 5 months ago
Oh cool, windows added a basic tar.exe implementation in one of the Windows 10 builds. Also, Explorer now supports tgz files. So the number one reason for ZIP (portability without requiring third party archive expanding tools) is now moot.
A basic tar implementation in Rust with a feature like GNU tar's --mode
would go a long way for resolving portability conflicts.
We can ask BSD tar to add the flag, as well as Windows tar. And ask GNU tar and Windows tar to provide a symlink gtar
that expands to GNU tar. These minor changes would solve our portability problems.
Meanwhile, recommending a UNIX file system (e.g. WSL) goes a long way toward reasonably portable, minimal effort solutions. We mainly develop with archives at the release part of the development cycle, when executable applications get bundled together and uploaded. The rest of the build system is more portable, able to run without modification on a wide variety of platforms.
Research 7zip, peazip, etc. as tgz and --mode supporting alternative to tar.
Native Windows screws up file permissions and also struggles with sh processing.
In addition to problems archiving application ports, Windows developers may have trouble running linter tasks that rely on sh snippets.
We can solve many problems by recommending that contributors use UNIX environment such as WSL.
Let's also document how to install any Rust projects with cargo.
Let's integrate sh projects into some shell package managers.
If we implemented a POSIX + --mode feature tar, we'd want to extend the GNU syntax to constrain mode changes to a regex of paths, and allow the flag to be declared multiple times. But that would grow the software stack unnecessarily, when the real culprit is NTFS.
Changing modes across the board to 0755 is fine for archives that contain exclusively executable files and directories. But eventually when we get around to creating OS installers again, the process will be smoother if the original file chmod bits are preserved by the file system.
TODO: