tauri-apps / tauri

Build smaller, faster, and more secure desktop applications with a web frontend.
https://tauri.app
Apache License 2.0
79.71k stars 2.37k forks source link

[bug] Please update linuxdeploy in tauri-apps/binary-releases #8604

Open olivierlemasle opened 5 months ago

olivierlemasle commented 5 months ago

Describe the bug

I couldn't build AppImages, because I hit this linuxdeploy bug: https://github.com/linuxdeploy/linuxdeploy/issues/241

Reproduction

On Linux, with no root permissions:

$ mkdir foobin
$ cat << E0F > ./foobin/foo
#!/bin/bash
echo "Foo"
E0F
$ ln -s ./foobin/foo ./publicfoo
$ export PATH="$(pwd):${PATH}"
$ sudo chown -R root:root ./foobin
$ sudo chmod -R 700 ./foobin

Then try to do a Tauri build.

Expected behavior

Build AppImages successfully, with a recent version of linuxdeploy.

Full tauri info output

[✔] Environment
    - OS: Fedora 39.0.0 X64
    ✔ webkit2gtk-4.0: 2.42.3
    ✔ rsvg2: 2.57.1
    ✔ rustc: 1.75.0 (82e1608df 2023-12-21)
    ✔ cargo: 1.75.0 (1d8b05cdd 2023-11-20)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 21.5.0
    - pnpm: 8.14.1
    - yarn: 1.22.21
    - npm: 10.2.4

[-] Packages
    - tauri [RUST]: 1.5.2
    - tauri-build [RUST]: 1.5.0
    - wry [RUST]: 0.24.4
    - tao [RUST]: 0.16.5
    - @tauri-apps/api [NPM]: 1.5.1
    - @tauri-apps/cli [NPM]: 1.5.6

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: http://localhost:1420/
    - framework: React
    - bundler: Vite

Stack trace

Error failed to bundle project: error running appimage.sh

Additional context

The linuxdeploy bug was fixed in https://github.com/linuxdeploy/linuxdeploy/pull/242

A recent version of linuxdeploy would fix the issue.

tauri-builder is using the latest linuxdeploy release from https://github.com/tauri-apps/binary-releases:

https://github.com/tauri-apps/tauri/blob/5cb196976e5c84f2a34a34018e957424105cf42f/tooling/bundler/src/bundle/linux/templates/appimage#L73

FabianLars commented 5 months ago

I swear the appimage bundler makes me go mental 😂 (or already did 🤔)

See the release notes here: https://github.com/tauri-apps/binary-releases/releases/tag/linuxdeploy - I did upgrade it to latest but it broke the bundler even more so i reverted it.

Also, can you confirm that a new version would actually fix your issue? If you copy paste the file into ~/.cache/tauri the bundler should pick it up. If it overwrites i guess you'd have to modify the cli/bundler to skip the download for a test :/

Edit: the revert is not permanent, but since it's our production cdn i had to revert it asap and did not have a chance to look into the problem yet.

olivierlemasle commented 5 months ago

Sorry, I did not see your past upgrade, and when I first read https://github.com/tauri-apps/binary-releases/releases/tag/linuxdeploy, I did not have my Discord credentials, so I didn't read the conversation there and assumed this was an old revert.

Anyway, as I want to preserve your mental health :exploding_head:, I'll look at this appimage issue with latest linuxdeploy (BTW, was it the latest, i.e. 1-alpha-20240109-1, or the previous one?). I'll try to reproduce (and fix if possible) the issue reported on Discord.

I'll keep this issue open, as the problem is real, but it is quite easy to circumvent (just delete the symlink). BTW, I confirm that the issue is solved with latest linuxdeploy.

I guess that something could be improved in the future:

FabianLars commented 5 months ago

Anyway, as I want to preserve your mental health 🤯,

❤️

I'll look at this appimage issue with latest linuxdeploy (BTW, was it the latest, i.e. 1-alpha-20240109-1, or the previous one?). I'll try to reproduce (and fix if possible) the issue reported on Discord.

It was the latest Continuous build. I didn't revert the arm binaries so the link for that is the version that was broken.

BTW, I confirm that the issue is solved with latest linuxdeploy.

Cool, thanks 👍

use versioned linuxdeploy binaries

Maybe, yeah. As long as we can keep updating the version on the fly without a new bundler/cli release (at least as long as we're having so many issues with it lol)

perhaps make it easier to customize the appimage script

Yeah, that'd be nice ig. There are probably more places in the cli/bundler this applies too.

olivierlemasle commented 5 months ago

It was the latest Continuous build. I didn't revert the arm binaries so the link for that is the version that was broken.

In https://github.com/tauri-apps/binary-releases/releases/tag/linuxdeploy, the link for arm is the same as for x86. I guess it's an error.

However, the Discord thread has logs showing that the problematic version of linuxdeploy was 4b24a49

use versioned linuxdeploy binaries

Maybe, yeah. As long as we can keep updating the version on the fly without a new bundler/cli release (at least as long as we're having so many issues with it lol)

Ok, I understand. However, it means builds are not reproducible...

perhaps make it easier to customize the appimage script

Yeah, that'd be nice ig. There are probably more places in the cli/bundler this applies too.

I'll think about a way to configure appimage building. I don't know if new environment variables is the way to go...

FabianLars commented 5 months ago

In https://github.com/tauri-apps/binary-releases/releases/tag/linuxdeploy, the link for arm is the same as for x86. I guess it's an error.

Whoops, copy pasting is hard, fixed.

Ok, I understand. However, it means builds are not reproducible...

If you think this is valuable then we can change it (idk if we should wait for v2?), i can't say i actually care about the appimage bundler anymore so idk why i even said anything against it.

I'll think about a way to configure appimage building. I don't know if new environment variables is the way to go...

Maybe what we do on windows to allow custom wix and nsis templates?