run_wine_session: initialize and stop the prefix with $WINE #217

Open
github-bot wants to merge 1 commit from github-bot/gh-217 into main AGit
Owner

@⁠Andretuta on GitHub · 2026-11-24 02:46 UTC · original
ubiquitarianism:old-pr/9952 → main · +94 −3 · 3 files · 1 commits · draft

Carried over from old PR 9952 by SkippySteve in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9952, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
SkippySteve: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

Claim: https://github.com/ItsNotRexed/Leonida/issues/9677#issuecomment-7116873558

scripts/run_wine_session.sh ran wineboot and wineserver from PATH, while run_wine_tests.py runs the tests with $WINE. With WINE set to Proton's or UMU-Proton's files/bin/wine:

  • on a host without a system Wine, the script stopped at timeout: failed to run command 'wineboot' (exit 127), and the exit trap printed wineserver: command not found;
  • on a host with a system Wine, the prefix was initialized by that other Wine, and the trap stopped the wrong wineserver.

The script now runs "$WINE" wineboot --init (default wine, as run_wine_tests.py does) and, at exit, stops $WINESERVER, else the wineserver next to $WINE, else wineserver on PATH (the same lookup winetricks uses). A WINE that can't be found is reported with status 127. CI doesn't set WINE, so it still uses the Wine on PATH and its wineserver. docs/testing.md says so in one sentence.

Tests

  • tests/test_run_wine_session.py (new, fake wine/wineserver scripts, including a path with a space): 4 tests pass; against the old script all 4 fail.
  • Arch Linux, UMU-Proton 11.0-2e, no system Wine: WINE=<UMU-Proton>/files/bin/wine WINEPREFIX=$(mktemp -d) bash scripts/run_wine_session.sh "$WINE" cmd /c echo … initializes the prefix, prints the echo, exits 0, and leaves no wineserver running. The old script exits 127 here.
  • bash -n, scripts/check_no_game_data.py clean.

No game files used. AI-assisted.

**@⁠Andretuta** on GitHub · 2026-11-24 02:46 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/217) `ubiquitarianism:old-pr/9952` → `main` · +94 −3 · 3 files · 1 commits · draft > Carried over from **old PR 9952** by `SkippySteve` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9952`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `SkippySteve`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): Claim: https://github.com/ItsNotRexed/Leonida/issues/9677#issuecomment-7116873558 `scripts/run_wine_session.sh` ran `wineboot` and `wineserver` from `PATH`, while `run_wine_tests.py` runs the tests with `$WINE`. With `WINE` set to Proton's or UMU-Proton's `files/bin/wine`: - on a host without a system Wine, the script stopped at `timeout: failed to run command 'wineboot'` (exit 127), and the exit trap printed `wineserver: command not found`; - on a host with a system Wine, the prefix was initialized by that other Wine, and the trap stopped the wrong wineserver. The script now runs `"$WINE" wineboot --init` (default `wine`, as `run_wine_tests.py` does) and, at exit, stops `$WINESERVER`, else the `wineserver` next to `$WINE`, else `wineserver` on `PATH` (the same lookup winetricks uses). A `WINE` that can't be found is reported with status 127. CI doesn't set `WINE`, so it still uses the Wine on `PATH` and its `wineserver`. `docs/testing.md` says so in one sentence. ### Tests - `tests/test_run_wine_session.py` (new, fake wine/wineserver scripts, including a path with a space): 4 tests pass; against the old script all 4 fail. - Arch Linux, UMU-Proton 11.0-2e, no system Wine: `WINE=<UMU-Proton>/files/bin/wine WINEPREFIX=$(mktemp -d) bash scripts/run_wine_session.sh "$WINE" cmd /c echo …` initializes the prefix, prints the echo, exits 0, and leaves no wineserver running. The old script exits 127 here. - `bash -n`, `scripts/check_no_game_data.py` clean. No game files used. AI-assisted.
The session script ran wineboot and wineserver from PATH while
run_wine_tests.py runs the tests with $WINE. With WINE set to Proton's or
UMU-Proton's files/bin/wine, the prefix was initialized by another Wine, or
the script stopped at 'wineboot: command not found' on a host without a
system Wine, and the exit trap stopped the wrong wineserver.

Run "$WINE" wineboot --init and stop $WINESERVER, else the wineserver next
to $WINE, else wineserver on PATH; report a missing $WINE with status 127.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:49:09 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/217/head:github-bot/gh-217'
git switch 'github-bot/gh-217'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-217'
git switch 'github-bot/gh-217'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-217'
git switch 'github-bot/gh-217'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-217'
git switch 'main'
git merge --squash 'github-bot/gh-217'
git switch 'main'
git merge --ff-only 'github-bot/gh-217'
git switch 'main'
git merge 'github-bot/gh-217'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.