From fb28c60f0b6209dacf46c876447f64259d063de8 Mon Sep 17 00:00:00 2001 From: R1kaB3rN <100738684+R1kaB3rN@users.noreply.github.com> Date: Sun, 30 Jun 2024 10:38:06 -0700 Subject: [PATCH] Fix system call failures when running winetricks verbs (#115) * 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 --- umu/umu_run.py | 14 -------------- umu/umu_test.py | 10 ---------- 2 files changed, 24 deletions(-) diff --git a/umu/umu_run.py b/umu/umu_run.py index 3574b2de..abbd7261 100755 --- a/umu/umu_run.py +++ b/umu/umu_run.py @@ -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" ) diff --git a/umu/umu_test.py b/umu/umu_test.py index 7f39adb4..8ca7285f 100644 --- a/umu/umu_test.py +++ b/umu/umu_test.py @@ -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",