Skip to content

lutris: init at 0.4.18 - #42075

Closed
ghost wants to merge 11 commits into
masterfrom
unknown repository
Closed

ghost wants to merge 11 commits into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Jun 15, 2018 •

Copy link
Copy Markdown
Motivation for this change

Steam-like program for keeping games in order and easily accessible.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@ghost

ghost commented Jun 15, 2018

Copy link
Copy Markdown
Author

nix-shell -p nox --run "nox-review wip" errored, however the error was an osquery test, Lutris itself seems to work fine, aside from this issue when using online functions I'm not sure how to resolve:

Traceback (most recent call last):
  File "/nix/store/6864ay4b9skqskzi4sszbyx8pycwy4pk-lutris-v0.4.18/lib/python3.6/site-packages/lutris/gui/lutriswindow.py", line 169, in <lambda>
    lambda *x: open_uri('https://lutris.net/user/register/')
  File "/nix/store/6864ay4b9skqskzi4sszbyx8pycwy4pk-lutris-v0.4.18/lib/python3.6/site-packages/lutris/util/system.py", line 387, in open_uri
    Gtk.show_uri(None, uri, Gdk.CURRENT_TIME)
GLib.Error: g-io-error-quark: Operation not supported (15)

@ghost ghost mentioned this pull request Jun 15, 2018
3 of 8 tasks

@lukateras lukateras left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@GrahamcOfBorg GrahamcOfBorg added 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jun 15, 2018
@lukateras

Copy link
Copy Markdown
Member

This should work for the most part, although native Steam client won't be accessible.

@lukateras

Copy link
Copy Markdown
Member

Oh, have you tested if external emulators (say, SNES9x) installed either in user or system profile work?

@bkchr

bkchr commented Jun 15, 2018

Copy link
Copy Markdown
Contributor

Any plan to maybe integrate a patch, that calls patchelf on dowloaded wine installations?

@lukateras

lukateras commented Jun 15, 2018 •

Copy link
Copy Markdown
Member

There's no need, because it runs in a FHS environment that tolerates ELF headers of downloaded Wine installations.

@bkchr

bkchr commented Jun 15, 2018

Copy link
Copy Markdown
Contributor

Ahh! Nice! I did not saw that, then it is really nice :)

@ghost

ghost commented Jun 15, 2018

Copy link
Copy Markdown
Author

The native steam client should be possible by adding steam-runtime-native to the FHS environment IIRC.
I can't tell one way or another if the external emulators work, I do know they download and I can log in, but adding any games to the menu is either impossible or impossible to show, there are no error messages, just no action.

Sorry, I guess I pushed a somewhat broken commit in my excitement.

@ghost

ghost commented Jun 15, 2018

Copy link
Copy Markdown
Author

Again, a lot of the trouble probably stems from this:

Traceback (most recent call last):
  File "/nix/store/6864ay4b9skqskzi4sszbyx8pycwy4pk-lutris-v0.4.18/lib/python3.6/site-packages/lutris/gui/lutriswindow.py", line 169, in <lambda>
    lambda *x: open_uri('https://lutris.net/user/register/')
  File "/nix/store/6864ay4b9skqskzi4sszbyx8pycwy4pk-lutris-v0.4.18/lib/python3.6/site-packages/lutris/util/system.py", line 387, in open_uri
    Gtk.show_uri(None, uri, Gdk.CURRENT_TIME)
GLib.Error: g-io-error-quark: Operation not supported (15)

@ghost

ghost commented Jun 15, 2018

Copy link
Copy Markdown
Author

Oh wait hang on, after restarting the program a lot of my games show up, will test.

@ghost

ghost commented Jun 15, 2018

Copy link
Copy Markdown
Author

Okay, will probably have to pull dependencies like X.

@tenten8401

Copy link
Copy Markdown

It seems regardless of distro, Lutris needs a restart for my games to properly show up, at least when syncing from the lutris website. I don't think that's related to anything you've done.

@tenten8401

tenten8401 commented Jun 15, 2018 •

Copy link
Copy Markdown

Getting a fun error over here when attempting to install Battlefield 1 using the Wine runner.
image

Looks like we probably need an shasum utilitiy in order for the verification of downloaded files.

@ghost

ghost commented Jun 15, 2018

Copy link
Copy Markdown
Author

This is a big project with a lot of "unknown" dependencies.
Please report all bugs and I'll attempt to fix them.
Will continue until I get everything (at least on the surface) working.

@ghost

ghost commented Jun 15, 2018

Copy link
Copy Markdown
Author

@tenten8401 Could you give more detail about that error please?
Does something need to be added into the target packages?

@tenten8401

tenten8401 commented Jun 15, 2018 via email

Copy link
Copy Markdown

@ghost

ghost commented Jun 15, 2018

Copy link
Copy Markdown
Author

What package is sha1sum part of? Isn't it bin or coreutils?

@tenten8401

tenten8401 commented Jun 15, 2018 via email

Copy link
Copy Markdown

@ghost

ghost commented Jun 15, 2018

Copy link
Copy Markdown
Author

Could you test it out? I don't have BF1.
Just add coreutils to targetPkgs = pkgs: with pkgs; with xorg; [

@tenten8401

tenten8401 commented Jun 15, 2018 via email

Copy link
Copy Markdown

@ghost

ghost commented Jun 15, 2018

Copy link
Copy Markdown
Author

Okay, that commit should at least make this somewhat usable.
As far as I can tell, most emulators work, I can't get WINE to work no matter what I do, same with this error on Citra: This application failed to start because it could not find or load the Qt platform plugin "xcb" - It's a QT issue or some sort. Mednafen is weird with sound, not the fault of this package.

@lukateras

Copy link
Copy Markdown
Member

@Chiiruno export QT_QPA_PLATFORM_PLUGIN_PATH=$(nix-build '<nixpkgs>' -A qt5.qtbase)/lib/qt-5.10/plugins/platforms will likely help (could be part of buildFHSUserEnv runScript).

@tenten8401

tenten8401 commented Jun 16, 2018 via email •

Copy link
Copy Markdown

@ghost

ghost commented Jun 16, 2018 •

Copy link
Copy Markdown
Author

@yegortimoshenko I'm afraid I've tried many variations of that already, thanks for the heads-up though.
@tenten8401 I'm sorry to hear that, I hope my package didn't cause you any (albeit indirect) permanent damage.

@tenten8401

tenten8401 commented Jun 16, 2018 via email

Copy link
Copy Markdown

@ghost

ghost commented Jun 16, 2018

Copy link
Copy Markdown
Author

I'm not sure there's a lot more I can do to improve this package, any idea?

@tenten8401

tenten8401 commented Jul 26, 2018 •

Copy link
Copy Markdown

also, dumb question, but is makeWrapper even getting called? I see you have the args but I don't know if it's getting called or not, as I don't see anywhere the LD_LIBRARY_PATH is being set.

scratch that, just realized that makeWrapperArgs is a parameter of buildPythonApplication. Hmm.

@tenten8401

Copy link
Copy Markdown

Alright, I'm at the point where my lack of knowledge of the Nix package management system is what's stopping me from working on this further.

I'd be willing to send $10 PayPal to anyone who can successfully get this package fully working as intended, since I think this point we're basically stuck on Lutris versions of Wine not being able to find the libraries correctly.

@ghost

ghost commented Aug 13, 2018

Copy link
Copy Markdown
Author

#44047 may be a possible fix for the QT issues.

@infinisil

Copy link
Copy Markdown
Member

While trying to install Portal 1:

WARNING  2018-10-13 23:05:43,893 [lutriswindow]:portal is not available
INFO     2018-10-13 23:05:57,276 [steam]:Data path for SteamApp 400 not found.
** (process:25779): WARNING **: 23:05:57.289: chrootenv doesn't stack!
** Message: 23:05:57.290: Requires Linux version >= 3.19 built with CONFIG_USER_NS
** (process:25781): ERROR **: 23:05:57.291: main: unshare: Operation not permitted

Which sounds pretty bad.. Seems like we don't have a chance for this to ever work reliably, because we need to run everything in a chroot to begin with.

@ghost

ghost commented Oct 13, 2018

Copy link
Copy Markdown
Author

So there's nothing we can do?
What about how the Steam package does things?
Can we incorporate anything from other FHS packages?

@lukateras

lukateras commented Oct 13, 2018 •

Copy link
Copy Markdown
Member

The problem here is that Steam package and Lutris both use chrootenv, which doesn't stack because, I think, Linux user namespaces do not. I might be wrong about that, however here's a similar situation with Flatpak + Docker: flatpak/flatpak#1326

There might be intricate ways of dealing with this issue (making buildFHSUserEnv stack, rather; making all dirs in container's / read-writable, detecting stacking attempt in wrapper script and appending to existing container's FS instead of trying to create a new one), but can't really come up with any quick fixes.

@colemickens

Copy link
Copy Markdown
Member

Has anyone tried it with a kernel with CONFIG_USER_NS enabled? Some other distros do enable it.

@infinisil

Copy link
Copy Markdown
Member

@colemickens Hmm I thought it was enabled, even by default, but now I'm not so sure anymore. I originally interpreted the Requires Linux version >= 3.19 built with CONFIG_USER_NS error as just being a false assumption based on the first error by the program.

But now I'm also confused even more, because in the man page on user namespaces they clearly mention that they can be nested up to 32 levels deep. I guess chrootenv doesn't stack! doesn't have much to do with user namespaces maybe? Not sure what stack means in this context if not nesting.

@lukateras

lukateras commented Oct 14, 2018 •

Copy link
Copy Markdown
Member

@colemickens It's on for NixOS users unless one uses hardened kernel:

$ zcat /proc/config.gz | grep CONFIG_USER_NS
CONFIG_USER_NS=y

@infinisil Good find! Now we should try to understand why it fails to unshare the second time. Source code for reference: https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/build-fhs-userenv/chrootenv/chrootenv.c

@silverhook

Copy link
Copy Markdown
Contributor

I'd be willing to send $10 PayPal to anyone who can successfully get this package fully working as intended, since I think this point we're basically stuck on Lutris versions of Wine not being able to find the libraries correctly.

I’m also wiling to chip in 10 € for a box of beer.

@JohnAZoidberg

Copy link
Copy Markdown
Member

It doesn't work for me anymore.
Most (all?) curls to https://abbradar.net/steamrt/pool/main/... and http://repo.steampowered.com/steamrt/pool/main/... result in 404.

@davidak

davidak commented Nov 14, 2018

Copy link
Copy Markdown
Member

@JohnAZoidberg that's related to #49048

@nixos-discourse

Copy link
Copy Markdown

This pull request has been mentioned on Nix community. There might be relevant details there:

https://discourse.nixos.org/t/request-nixos-steam-for-dummies/1428/5

"--prefix LD_LIBRARY_PATH : ${fullPath}:$out/lib"
"--set GI_TYPELIB_PATH $GI_TYPELIB_PATH"
"--prefix XDG_DATA_DIRS : $out/share"
"--suffix XDG_DATA_DIRS : $XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

GSETTINGS_SCHEMAS_PATH will be also set automatically by wrapGAppsHook when glib gnome3.gsettings_desktop_schemas are in buildInputs: https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/instant-messengers/rambox/default.nix#L33

@teto

teto commented Feb 3, 2019

Copy link
Copy Markdown
Member

would be great to have a FOSS alternative at steam. Any update ?

@nyanloutre

Copy link
Copy Markdown
Member

Would a similar approach work for GameHub, or did anyone tried to package it ?

https://github.com/tkashkin/gamehub

@L-as

L-as commented Feb 5, 2019

Copy link
Copy Markdown
Member

What are the issues with this PR?

@KiaraGrouwstra

Copy link
Copy Markdown
Contributor

we may want to update the PR at least -- using the present one I just ran into lutris/lutris#967.

@KiaraGrouwstra

Copy link
Copy Markdown
Contributor

trying to update it, but still figuring out how to expose requests to it:

  Could not find a version that satisfies the requirement requests (from lutris==0.5.1) (from versions: )
No matching distribution found for requests (from lutris==0.5.1)

@teto

teto commented Apr 19, 2019

Copy link
Copy Markdown
Member

@tycho01 that might come from a version mismatch, you can fetch a requests from master or patch the setup.py with the hope it works.
The latest lutris allows to access the epic store which has made a few interesting games free in the upcoming weeks (thinking about Assassin's Creed Unity where you can jump from Notre Dame):
https://www.gamingonlinux.com/articles/you-can-now-easily-run-the-epic-store-on-linux-with-lutris-epic-suggests-applying-for-a-grant.13964

@TheSirC

TheSirC commented Apr 30, 2019

Copy link
Copy Markdown

It seams that the only conflicting files on this PR is on the top-level packages file. Any updates on the PR other than that ?

@abbradar abbradar mentioned this pull request May 20, 2019
5 of 10 tasks
@abbradar

Copy link
Copy Markdown
Member

I've rebased and updated that PR at #61742 and fixed Steam too. I noticed that some people offered bounty for this but I'm here just for the fun ;)

@ghost

ghost commented May 20, 2019

Copy link
Copy Markdown
Author

Closed in favor of #61742

@ghost ghost closed this May 20, 2019
@ghost
ghost deleted the dev/lutris branch August 24, 2019 08:48
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.