FaithLife-Community / LogosLinuxInstaller

A Python application that helps install and maintain FaithLife's Logos Bible (Verbum) Software on Linux through Wine.
MIT License
35 stars 10 forks source link

Fix #17. Add Alpine Support #183

Open thw26 opened 2 months ago

thw26 commented 2 months ago

Fix #17.

thw26 commented 2 months ago

The binary requires gcompat to be installed before we can run, due to using muslc. To support Alpine, it might be best to see if there are github actions that could support a build with muslc. Otherwise, we would need some way to obtain compatibility between the two binaries.

Currently errors when running the binary:

Error relocating /tmp/_MEIefOMjg/libz.so.1: crc32_z: symbol not found

This appears to be related to the use of muslc instead of glibc.

https://github.com/JonathonReinhart/staticx/issues/143


Running from source breaks during wineboot. This is easily replicable at the CLI:

localhost:~/LogosBible10/data/bin$ ./wine64 wineboot --init
MESA: error: ZINK: vkCreateInstance failed (VK_ERROR_INCOMPATIBLE_DRIVER)
glx: failed to create drisw screen
Error relocating /tmp/.mount_wine64kCnHcE/lib/x86_64-linux-gnu/libselinux.so.1: fts_set: symbol not found
Error relocating /tmp/.mount_wine64kCnHcE/lib/x86_64-linux-gnu/libselinux.so.1: fts_close: symbol not found
Error relocating /tmp/.mount_wine64kCnHcE/lib/x86_64-linux-gnu/libselinux.so.1: fts_read: symbol not found
Error relocating /tmp/.mount_wine64kCnHcE/lib/x86_64-linux-gnu/libselinux.so.1: fts_open: symbol not found
Error relocating /tmp/.mount_wine64kCnHcE/bin/ln: rpmatch: symbol not found
Error relocating /tmp/.mount_wine64kCnHcE/bin/ln: renameat2: symbol not found
Error relocating /tmp/.mount_wine64kCnHcE/lib/x86_64-linux-gnu/libselinux.so.1: fts_set: symbol not found
Error relocating /tmp/.mount_wine64kCnHcE/lib/x86_64-linux-gnu/libselinux.so.1: fts_close: symbol not found
Error relocating /tmp/.mount_wine64kCnHcE/lib/x86_64-linux-gnu/libselinux.so.1: fts_read: symbol not found
Error relocating /tmp/.mount_wine64kCnHcE/lib/x86_64-linux-gnu/libselinux.so.1: fts_open: symbol not found
Error relocating /tmp/.mount_wine64kCnHcE/lib/x86_64-linux-gnu/libselinux.so.1: fts_set: symbol not found
Error relocating /tmp/.mount_wine64kCnHcE/lib/x86_64-linux-gnu/libselinux.so.1: fts_close: symbol not found
Error relocating /tmp/.mount_wine64kCnHcE/lib/x86_64-linux-gnu/libselinux.so.1: fts_read: symbol not found
Error relocating /tmp/.mount_wine64kCnHcE/lib/x86_64-linux-gnu/libselinux.so.1: fts_open: symbol not found
Error relocating /tmp/.mount_wine64kCnHcE/bin/dash: sigsetmask: symbol not found

This appears to be a mesa↔zink issue within VMs based on what I can find in my searches. I hit this in both VirtualBox and Qemu. I would need a hardware install apparently to test further.

thw26 commented 1 month ago

I checked this on an Alpine machine. I've gotten further with some necessary commands for fuse, but fuse mounts are still not being recognized.

thw26 commented 1 month ago

Because we use pkexec sh -c, bash needs to be added as a dep. There is a permission error in Alpine that appears to be caused by something not set in:

thw26 commented 1 month ago

Okay. This took a bit of doing, and even now it isn't perfect, but I have Logos running on it.

There is something wrong with the AppImage support and I cannot get it to work.

Alpine is added to the list of bad OSes alongside Arch and Fedora.

After doing a manual install at the pkexec prompt for the preinstall commands (we need someway to determine if these are run), for some reason it still won't mount.

Instead I switched to the edge repository for Wine Dev 9.17 as the stable repo only has 9.0 at present.

I then had to write /usr/bin/wine to the config in order to override our wine branch check.

This then bypassed the wine choice in the installer.

After this, it was able to install, though it seemed to blaze through the winetricks steps which makes me think they didn't work.

On running Logos, it causes a critical error that crashes. This was because of the wine branch checking in logos.py. I got around this by adding in an if/else that defaults to trusting the user's config if we can't verify that the branch actually is bad. This probably has some kind of unintended consequence.

Once I did all this, I was then able to run Logos and I got to the login screen.

thw26 commented 1 month ago

I am requesting a review on this as technically it works, but we need to do some testing to see if my workarounds don't cause additional breakage.

The reason why Alpine will be supported/not supported is that it is waiting on additional package updates.

Also, ideally we would have some kind of check that could determine if AppImage support is available, and if not, we do not list the AppImage as an option. (In this case, does fusermount work.)

fuse: failed to exec fusermount: No such file or directory

Cannot mount AppImage, please check your FUSE setup.
…
open dir error: No such file or directory

These commands are required after installing fuse3.

        config.SUPERUSER_COMMAND, "modprobe", "fuse", "&&",
        config.SUPERUSER_COMMAND, "rc-update", "add", "fuse", "boot", "&&",
        config.SUPERUSER_COMMAND, "sed", "-i", "'s/#user_allow_other/user_allow_other/g'", "/etc/fuse.conf", "&&",
        config.SUPERUSER_COMMAND, "addgroup", "fuse", "&&",
        config.SUPERUSER_COMMAND, "adduser", f"{user}", "fuse", "&&",
        config.SUPERUSER_COMMAND, "rc-service", "fuse", "restart",

This requires the user to reboot (logout?) but even after running these, there is no change.

Unfortunately, what that would mean is that there are no working options for Alpine (until stable's wine version is updated) and a user would meet a blank wine choice menu on opening.

But based on testing, the distro's install now works when conditions are met on it, so our support is technically there, just not practically yet, unless the user is on edge.

thw26 commented 4 days ago

Changing fuse3 to fuse fixed the appimage issues.

Now there's just the oddity of the postinstall commands not working. When run, they error out the installer, but I have absolutely no idea why.

I'd appreciate a second pair of eyes on it, but otherwise, if the commands are run outside of the installer, the install works, and thus Alpine is listed under the bad_os.

We can merge and make an issue for Alpine's outstanding issues.