Skip to content

Commit

Permalink
Fix system call failures when running winetricks verbs (#115)
Browse files Browse the repository at this point in the history
* umu_run: remove winetricks environment variables

- Currently, winetricks verbs are being applied to the wine prefix by executing the winetricks script as an executable for Proton. For some reason, this results in system calls failing for container binaries such as grep and sed, which are required by winetricks for parsing. Here's an example of grep's coredump:

>Stack trace of thread 52329:
>\#0  0x000070003275383b n/a (/lib/ld-linux-x86-64.so.2 + 0x2183b)
>#1  0x000070003274e0f8 n/a (/lib/ld-linux-x86-64.so.2 + 0x1c0f8)
>#2  0x000070003274f9be n/a (/lib/ld-linux-x86-64.so.2 + 0x1d9be)
>#3  0x000070003274e748 n/a (/lib/ld-linux-x86-64.so.2 + 0x1c748)
>ELF object binary architecture: AMD x86-64

While this doesn't appear to impact the application of winetricks verbs to the prefix nor has there been reports of this problem yet, as a precaution, we should set these environment variables from the proton script and replicate protonfixes' execution. As a result, theere should be no more coredumps except from wine64-preloader, which should be normal, and the launcher will only guard against valid winetricks verbs

* umu_test: update test
  • Loading branch information
R1kaB3rN authored Jun 30, 2024
1 parent de17548 commit fb28c60
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
14 changes: 0 additions & 14 deletions umu/umu_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,20 +296,6 @@ def set_env(

# Winetricks
if env.get("EXE", "").endswith("winetricks"):
# Proton directory with the last segment being subdirectory containing
# the Proton libraries and binaries. In upstream Proton 9 the subdir
# is 'files', while in other versions it may be 'dist'.
proton_dist: str = (
f"{env['PROTONPATH']}/files"
if Path(env["PROTONPATH"], "files").is_dir()
else f"{env['PROTONPATH']}/dist"
)

env["WINE"] = f"{proton_dist}/bin/wine"
env["WINELOADER"] = env["WINE"]
env["WINESERVER"] = f"{proton_dist}/bin/wineserver"
env["WINETRICKS_LATEST_VERSION_CHECK"] = "disabled"
env["LD_PRELOAD"] = ""
env["WINETRICKS_SUPER_QUIET"] = (
"" if os.environ.get("UMU_LOG") == "debug" else "1"
)
Expand Down
10 changes: 0 additions & 10 deletions umu/umu_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2091,16 +2091,6 @@ def test_set_env_winetricks(self):
)

# Winetricks
self.assertTrue(self.env["WINE"], "WINE is not set")
self.assertTrue(self.env["WINELOADER"], "WINELOADER is not set")
self.assertTrue(self.env["WINESERVER"], "WINESERVER is not set")
self.assertTrue(
self.env["WINETRICKS_LATEST_VERSION_CHECK"],
"WINETRICKS_LATEST_VERSION_CHECK is not set",
)
self.assertTrue(
self.env["LD_PRELOAD"] == "", "LD_PRELOAD is not set"
)
self.assertTrue(
self.env["WINETRICKS_SUPER_QUIET"],
"WINETRICKS_SUPER_QUIET is not set",
Expand Down

0 comments on commit fb28c60

Please sign in to comment.