Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protontricks: 1.4.4 -> 1.5.0 #120612

Merged
merged 1 commit into from Apr 30, 2021
Merged

Conversation

kira-bruneau
Copy link
Contributor

@kira-bruneau kira-bruneau commented Apr 25, 2021

  • Update steam-run.patch to support Pressure Vessel runtime
  • Fix adding $PROTON_DIST_PATH/lib to LD_LIBRARY_PATH when using legacy runtime
  • Use bash instead of /bin/sh now that wrappers are non-POSIX compliant
  • Remove test_run_steam_runtime_not_found in steam-run.patch instead of using disabledTests
  • Add import check
Motivation for this change

Update to the latest version: https://github.com/Matoking/protontricks/releases/tag/1.5.0 (fixes #119150)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
    • Verified installing libraries with Pressure Vessel container (default behaviour)
    • Verified installing libraries without Pressure Vessel container (--no-bwrap)
    • Verified installing libraries with legacy runtime (forced game to use Proton 4.11-13)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@kira-bruneau
Copy link
Contributor Author

Result of nixpkgs-review pr 120612 run on x86_64-linux 1

1 package built:
  • protontricks

- Update steam-run.patch to support Pressure Vessel runtime
- Fix adding $PROTON_DIST_PATH/lib to LD_LIBRARY_PATH when using legacy runtime
- Use bash instead of /bin/sh now that wrappers are non-POSIX compliant
- Remove `test_run_steam_runtime_not_found` in steam-run.patch instead of using disabledTests
- Add import check
@kira-bruneau
Copy link
Contributor Author

Sorry for the force-pushes. I noticed that the non-bwrap environment was using the scout runtime from steam-run instead of the runtime specified by the game. With the force-pushes there's less of a difference from upstream now.

@kira-bruneau
Copy link
Contributor Author

Result of nixpkgs-review pr 120612 run on x86_64-linux 1

1 package built:
  • protontricks

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

It would be great for reviewing if the patch was a bit smaller.

@kira-bruneau
Copy link
Contributor Author

kira-bruneau commented Apr 27, 2021

@SuperSandro2000 Hmm, the only changes that are unnecessary are the unused legacy runtime functions that I removed (their purpose is replaced by the fhs environment setup by steam-run). Although, I removed those functions in the previous patch, so keeping them in would make the diff bigger.

The diff probably looks so big because upstream changed so much in 1.5.0. Maybe it would be easier to just look through just the patch file instead of the diff between the old and new patch file?

@kira-bruneau
Copy link
Contributor Author

kira-bruneau commented Apr 27, 2021

One thing I just wanted to mention is that with the steam-run.patch, the legacy runtime library paths are equivalent to the runtime paths used in the use_bwrap environment, so I just renamed the use_bwrap parameter to proton_app_only:

-def get_runtime_library_paths(proton_app, use_bwrap=True):
+def get_runtime_library_paths(proton_app, proton_app_only=True):
"""
Get LD_LIBRARY_PATH value to use when running a command using Steam Runtime
"""
@@ -95,7 +77,7 @@ def get_runtime_library_paths(proton_app, use_bwrap=True):
)
)
- if use_bwrap:
+ if proton_app_only:
return "".join([
str(proton_app.proton_dist_path / "lib"), os.pathsep,
str(proton_app.proton_dist_path / "lib64"), os.pathsep
@@ -111,14 +93,19 @@ def get_runtime_library_paths(proton_app, use_bwrap=True):
])

And updated the legacy runtime code path to use get_runtime_library_paths with proton_app_only=True

- # Legacy Steam Runtime requires a different LD_LIBRARY_PATH
os.environ["PROTON_LD_LIBRARY_PATH"] = \
- get_legacy_runtime_library_paths(
- legacy_steam_runtime_path, proton_app
- )
+ get_runtime_library_paths(proton_app, proton_app_only=True)

@SuperSandro2000 SuperSandro2000 merged commit 2dc423f into NixOS:master Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Protontricks is out of date
2 participants