netbrain / zwift

Easily zwift on linux
The Unlicense
230 stars 27 forks source link

Various Fixes for Podman/ Docker #113

Closed sHedC closed 2 months ago

sHedC commented 2 months ago

From the latest have updated to fix the following, mainly for podman but tested with both docker and podman on xwayland, x11, wayland in both KDE (Manjaro) and Gnome (Fedora).

Wayland i tried to fix, it starts wine notepad however zwift complains about screen size and doesn't work correctly.

netbrain commented 2 months ago

@hobeone do you have any inputs on this?

hobeone commented 2 months ago

Only other input is Thank You for doing all of this!

sHedC commented 2 months ago

Your bash skills are a notch above mine 👍

lgtm,. however one question.

I have been coding for over 35 years, I actually was trying not to change too much :) I am more than happy to help with Podman integration and Wayland as this is what I use for my other developments.

sHedC commented 2 months ago

Fixed the comments above, I have updated bin/test_build.sh to trap for errors and clean up after (annoying if you have to manually delete the container on failure).

I didn't update the bin/build.sh but the test one should work for both Podman and Docker, if you are happy I will move it into build.sh and update the readme.

I am just running docker tests now.

sHedC commented 2 months ago

There is an issue with the docker and using a different ZWIFT_UID/ GID, checking it.

sHedC commented 2 months ago

Ok docker is working but when I try using a different ZWIFT_UID/GID I get an error later when starting, this might just be because I am not using it right as not sure why it would be used.

The entrypoint is setting all the permissions correctly and setting up the right mapping. Can you seee if that part works?

hobeone commented 2 months ago

What error are you seeing?

sHedC commented 2 months ago

What error are you seeing?

image

netbrain commented 2 months ago

Looks like an error from the runfromprocess-rs binary. @quietvoid

quietvoid commented 2 months ago

The process PID is probably invalid.

sHedC commented 2 months ago

This is only when I put ZWIFT_UID and ZWIFT_GID different to my local id of 1000. Without setting those it works fine.

sHedC commented 2 months ago

ok got it, because I mount /run/user/??? directly it is not setting the ownership correctly. Problem is /run/user//?? is neede for wayland, need to re-adjust.

sHedC commented 2 months ago

Have changed it back a bit, so basically to use Wayland or XWayland we need to map /run/user/xxxx, however doing this means you can not change ownership of /run/user/xxxx to the UID/ GID provided in ZWIFT_UID and GID.

So in short at the moment if you use ZWIFT_UID / GID you have to use X11, but wayland works for default.

Will look into this more but fixed to Podman/ Docker works with defefault in Wayland and X11 but adding ZWIFT_UID/GID requires using X11

sHedC commented 2 months ago

Found a couple of minor issues with podman savng documents and sound since fixing the ZWIFT_UID issue.

netbrain commented 2 months ago

Nice, is it all done now or are there any remaining issues?

sHedC commented 2 months ago

Nice, is it all done now or are there any remaining issues?

Just testing and one more I notice the update script should e reversed, "UPDATE" should be checked after install is checked.

sHedC commented 2 months ago

Fixed Tested with ZWIFT_UID and docker (podman fails for some weird reson but nearly works) Fix Audio on Docker Build now supports docker and podman Fixed Podman permissions

Tested everything I can

sHedC commented 2 months ago

Weirdly Podman now supports using ZWIFT_UID under X11 not sure how that happened.

sHedC commented 2 months ago

I this all good now anything else you notice?

netbrain commented 2 months ago

What is the reasoning behind the different names? i.e why when podman you have localhost/zwift instead of netbrain/zwift? relic from testing?

sHedC commented 2 months ago

What is the reasoning behind the different names? i.e why when podman you have localhost/zwift instead of netbrain/zwift? relic from testing?

Think you missed my answer or it's not commenting properly from my phone.

Podman always prefixes with localhost automatically unless you build against a real domain. So wasn't really a choice to use localhost for podman local build.

netbrain commented 2 months ago

Thanks for your contribution, The community appreciates it!

netbrain commented 2 months ago

Just got around to test this myself now, seems to work well. :clap: Have released this as a new image built from scratch. So for the next upcoming releases we'll see if the updating routine works aswell.

sHedC commented 2 months ago

Just got around to test this myself now, seems to work well. 👏 Have released this as a new image built from scratch. So for the next upcoming releases we'll see if the updating routine works aswell.

Perfect glad I can help i am more than willing to help in the future I use this a few times a week and it was one of the last things I used windows for, really appreciate the effort you have all putin to make this work so happy I can assist.

netbrain commented 2 months ago
Happy to hear! 🤗