Skip to content

Conversation

@TheDechev
Copy link
Contributor

Summary

This PR improves the Linux user experience by ensuring executable files in the runtime/ directory have proper execute permissions when the repository is cloned. This eliminates the need for Linux users to manually run chmod +x after cloning and prevents executable permission changes from appearing as unstaged modifications in Git, providing a cleaner development workflow.

Changes Made

1. Updated .gitattributes

  • Added explicit binary marking for runtime executables to ensure Git properly handles file permissions
  • Targets runtime/*.exe, runtime/Update.exe, and runtime/Path*of*Building-PoE2.exe

2. Set executable permissions in Git repository

  • Used chmod +x to set executable permissions on local filesystem
  • Used git update-index --chmod=+x to make Git track the files as executable in repository metadata
  • This combination ensures new clones will have the correct permissions automatically
  • Updates permissions for the current release's executable files (Path of Building-PoE2.exe and Update.exe)
    • Permission changes (mode 100644→100755) are included in commit 13beaa9fc

3. Updated CONTRIBUTING.md

  • Added a brief note for Linux users about executable permissions being automatically handled

Technical Details

The improvement addresses:

  • Git only tracks the owner execute bit, not full permissions
  • Binary files without proper Git attributes can lose executable status during clone operations
  • Linux systems require explicit execute permissions to run binary files

The solution:

  • Uses Git's built-in permission tracking via git update-index --chmod=+x
  • Leverages .gitattributes to ensure consistent handling across platforms
  • Works for both Windows (no impact) and Linux (improves user experience)

Verification

  • ✅ Windows: No impact, executables work as before
  • ✅ Linux: Fresh clones will have proper executable permissions
  • ✅ Existing clones: Permissions will be corrected on next git pull
  • ✅ Git metadata: Executable permissions are now tracked in repository (confirmed via git ls-files --stage)

Backward Compatibility

  • No breaking changes
  • Windows users are unaffected
  • Existing Linux users who have already fixed permissions locally are unaffected
  • Only benefits new Linux users who clone the repository

Improves: Linux user experience by eliminating manual chmod +x requirement and preventing permission-related unstaged changes in Git
Platforms: Primarily benefits Linux users, no impact on Windows

@LocalIdentity LocalIdentity added the technical Hidden from release notes label Aug 22, 2025
@TheDechev
Copy link
Contributor Author

@Wires77 , will you be able to take a look please?

@Wires77 Wires77 added the pob1 Should also be merged into PoB1 Repo label Aug 25, 2025
@Wires77 Wires77 merged commit ea4806b into PathOfBuildingCommunity:dev Aug 29, 2025
2 checks passed
majochem pushed a commit to majochem/PathOfBuilding-PoE2 that referenced this pull request Aug 30, 2025
* Add execute permissions to current 'exe' files

* Preserve execution permissions for executable files on Unix systems

* Update CONTRIBUTING.md with permissions info for Linux
Tonkat pushed a commit to Tonkat/PathOfBuilding-PoE2 that referenced this pull request Sep 1, 2025
* Add execute permissions to current 'exe' files

* Preserve execution permissions for executable files on Unix systems

* Update CONTRIBUTING.md with permissions info for Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pob1-merged pob1 Should also be merged into PoB1 Repo technical Hidden from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants