Skip to content

fix WSL setup issues with line endings and dependencies#711

Open
tobsec wants to merge 1 commit intoFOME-Tech:masterfrom
tobsec:fix-wsl-setup-dependencies
Open

fix WSL setup issues with line endings and dependencies#711
tobsec wants to merge 1 commit intoFOME-Tech:masterfrom
tobsec:fix-wsl-setup-dependencies

Conversation

@tobsec
Copy link

@tobsec tobsec commented Jan 3, 2026

Fixes issues encountered when running setup_linux_environment.sh on Windows Subsystem for Linux (WSL):

  • Enforce LF line endings via .gitattributes for gradlew and shell scripts in submodule - prevents $'\r': command not found errors on WSL regardless of git configuration (ensures all shell scripts are checked out with Unix (LF) line endings even when core.autocrlf=true on Windows.)
  • Update openjdk-8-jdk-headless to openjdk-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)
  • Add missing file command dependency (required by ext/build-tools/inflate.sh)
  • Add missing rsync dependency (required by build process)

Tested on WSL with Debian.

@tobsec tobsec force-pushed the fix-wsl-setup-dependencies branch from 39a62a6 to 1fb63c1 Compare January 3, 2026 14:23
- 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
@tobsec tobsec force-pushed the fix-wsl-setup-dependencies branch from 1fb63c1 to e3dddb8 Compare January 3, 2026 15:03
@tobsec tobsec marked this pull request as ready for review January 3, 2026 18:26
*.java text eol=lf
*.bat text eol=lf
*.sh text eol=lf
gradlew text eol=lf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can stick this in /java_tools/.gitattributes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, why is this ASCII shell script special (gradlew)? shouldn't it follow from * text=auto?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

mck1117 added a commit that referenced this pull request Jan 23, 2026
@mck1117
Copy link
Collaborator

mck1117 commented Jan 23, 2026

I've picked the missing rsync and file deps. crlf I'm wondering if we actually need, see nmschulte's comments above. Java version is a little bit of work to upgrade some other various java parts, but I think it's a good idea to do.

@mck1117
Copy link
Collaborator

mck1117 commented Jan 23, 2026

Updated the setup script to java 21 as well, all that's left is whether the gitattributes change is necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants