fix WSL setup issues with line endings and dependencies#711
fix WSL setup issues with line endings and dependencies#711tobsec wants to merge 1 commit intoFOME-Tech:masterfrom
Conversation
39a62a6 to
1fb63c1
Compare
- Add gradlew to .gitattributes to enforce LF line endings - Update build-tools submodule to include .gitattributes for shell scripts - Update openjdk-8 to openjdk-21 (openjdk-8 no longer available) - Add missing dependencies: file and rsync
1fb63c1 to
e3dddb8
Compare
| *.java text eol=lf | ||
| *.bat text eol=lf | ||
| *.sh text eol=lf | ||
| gradlew text eol=lf |
There was a problem hiding this comment.
we can stick this in /java_tools/.gitattributes
There was a problem hiding this comment.
also, why is this ASCII shell script special (gradlew)? shouldn't it follow from * text=auto?
There was a problem hiding this comment.
i guess the auto will use crlf on windows by default?
seems thats not an issue for most of the files which are not explicitely handled in the .gitattributes, but especially the .sh and gradlew needs to be lf to not cause the issue
hope you also saw this related PR which handles the lf endings for inflate.sh
|
I've picked the missing |
|
Updated the setup script to java 21 as well, all that's left is whether the gitattributes change is necessary. |
Fixes issues encountered when running
setup_linux_environment.shon Windows Subsystem for Linux (WSL):.gitattributesforgradlewand shell scripts in submodule - prevents$'\r': command not founderrors on WSL regardless of git configuration (ensures all shell scripts are checked out with Unix (LF) line endings even whencore.autocrlf=trueon Windows.)openjdk-8-jdk-headlesstoopenjdk-21-jdk-headless(openjdk-8 package no longer available on recent Ubuntu/Debian, Java 21 should be backward compatible, but to be checked if no issue building all Java stuff)filecommand dependency (required byext/build-tools/inflate.sh)rsyncdependency (required by build process)Tested on WSL with Debian.