netbrain / zwift

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

Latest commit unable to find /bin/run_zwift.sh - How is podman supposed to get this entrypoint? #111

Closed nlavalle closed 2 months ago

nlavalle commented 2 months ago

My zwift.sh was working around 1.62.0, but is breaking on the latest. I tracked this down to the commit, https://github.com/netbrain/zwift/commit/0f06074d0de86de520c3085a17dbbd9b00b7d088 this is modifying the podman run to look for a /bin/run_zwift.sh entrypoint but there's nothing in the install.sh to create that from what I can see, I omitted the entrypoint and userns commands echo'd in and was successfully able to run the container with:

CONTAINER=$($CONTAINER_TOOL run \
    -d \
    --rm \
    --privileged \
    --network $NETWORKING \
    --name zwift-$USER \
    -e DISPLAY=$DISPLAY \
    -e ZWIFT_UID=$ZWIFT_UID \
    -e ZWIFT_GID=$ZWIFT_GID \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -v /run/user/$UID/pulse:/run/user/$ZWIFT_UID/pulse \
    -v zwift-$USER:/home/user/.wine/drive_c/users/user/Documents/Zwift \
    $ZWIFT_CONFIG_FLAG \
    $ZWIFT_USER_CONFIG_FLAG \
    $DBUS_CONFIG_FLAGS \
    $VGA_DEVICE_FLAG \
    $IMAGE:$VERSION)

Should we be copying the run_zwift.sh in the github repo to our /bin/ and doing a chmod +x on it?

netbrain commented 2 months ago

Yeah sorry, we've been doing som refactorings that has broken a few things along the way. Im building the image from scratch now, which should fix this issue for podman. let me know how it goes.

sHedC commented 2 months ago

I have an update that should fix Podman just testing docker, also fixes a few other things and some bits and pieces such as Arguments. Will make a pull request as soon as I have finished testing docker.

sHedC commented 2 months ago

Hopfully fixed in the lastest pull request, for me now works in Wayland and X11 without modificaiton, entrypoint script now detects if podman so no need for extra parameter

MailFranzel commented 2 months ago

Hi, i am running Fedora 39 and use podman. With the old zwift.sh it was running fine under Wayland and X11. But with the new zwift.sh, nothing works. When I delete the two new lines $([ "$CONTAINER_TOOL" = "podman" ] && echo '--userns=keep-id') \ $([ "$CONTAINER_TOOL" = "podman" ] && echo '--entrypoint /bin/run_zwift.sh') \ It is running again only under X11. I made all update from Fedora und make a new pull for the container ...

Should I switch to docker?

sHedC commented 2 months ago

Hi, i am running Fedora 39 and use podman. With the old zwift.sh it was running fine under Wayland and X11. But with the new zwift.sh, nothing works. When I delete the two new lines $([ "$CONTAINER_TOOL" = "podman" ] && echo '--userns=keep-id') \ $([ "$CONTAINER_TOOL" = "podman" ] && echo '--entrypoint /bin/run_zwift.sh') \ It is running again only under X11. I made all update from Fedora und make a new pull for the container ...

Should I switch to docker?

Hi, I am running Fedora 40 with Wayland and Podman, so have been working on getting this working properly. I have submitted a pull request so pending review from netbrain as soon as he is feeling better. After this shoudl work fine, it works fine for me tested podman/ docker under KDE/ Gnome with X11 and Wayland.

MailFranzel commented 2 months ago

Hi sHedC, thanks for the answer. I made new (clean Workstation)Fedora 40 installation on a second PC. After some configuration include podman, I install die "zwift.sh" script. `... +++ echo '--entrypoint /bin/run_zwift.sh' ++ podman run -d --rm --privileged --network bridge --name zwift-martin -e DISPLAY=:0 --userns=keep-id --entrypoint /bin/run_zwift.sh -e ZWIFT_UID=1000 -e ZWIFT_GID=1000 -v /tmp/.X11-unix:/tmp/.X11-unix -v /run/user/1000/pulse:/run/user/1000/pulse -v zwift-martin:/home/user/.wine/drive_c/users/user/Documents/Zwift -e DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus -v /run/user/1000/bus:/run/user/1000/bus --device /dev/dri:/dev/dri docker.io/netbrain/zwift:latest Error: crun: executable file ´/bin/run_zwift.sh´ not found in $PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found

MailFranzel commented 2 months ago

It is only running under X11 with the two lines deleted!

sHedC commented 2 months ago

Hi, can you re-try. Re-install the latest zwift program and you probably have to remove the volume.

podman volume rm zwift-xxxxx

Where xxxx is your userid, then re-try. Latest should just work with Wayland and X11 under podman and docker.

nlavalle commented 2 months ago

Hi, can you re-try. Re-install the latest zwift program and you probably have to remove the volume.

podman volume rm zwift-xxxxx

Where xxxx is your userid, then re-try. Latest should just work with Wayland and X11 under podman and docker.

I removed the mount then reran the curl install script in the readme and ran zwift and that resolved it. Thank you

sHedC commented 2 months ago

Perfect :)