Update electron and electron-builder#26072
Conversation
They're in the readme on GitHub, but they appear to be out of date. 24.3.0 came out 2 days ago, I'm running a tag build to verify if it builds correctly. If it does, could you bump the version in this PR? Also, could you update after-install and after-remove scripts? I thought I added that as an item to the electron-builder update checklist but it turns out that I didn't. I'll add them now. |
Done.
Done. I tested it on Ubuntu, the symlinks adding/removal seem to work fine. but I guess it is a standard message. The symlink was removed. |
f15e33e to
76a9d97
Compare
ravicious
left a comment
There was a problem hiding this comment.
I tested the install scripts on Ubuntu and Fedora. I also tested the universal build on arm64 and x64.
| # Remove the link to the Electron app binary. | ||
| rm -f "$BIN/${executable}" | ||
| if type update-alternatives >/dev/null 2>&1; then | ||
| update-alternatives --remove "${executable}" "$BIN/${executable}" |
There was a problem hiding this comment.
It appears that the call to update-alternatives in after-remove appears to be incorrect in electron-builder's template.
On Fedora, installation works without problems, but on remove I got this:
/usr/local/bin/teleport-connect has not been configured as an alternative for teleport-connect
warning: %postun(teleport-connect-1.0.0_dev-1.aarch64) scriptlet failed, exit status 2
I tried to execute the commands manually and I got some other error, then it occured to me that the call might be wrong.
$ update-alternatives --help
alternatives version 1.24 - Copyright (C) 2001 Red Hat, Inc.
This may be freely redistributed under the terms of the GNU Public License.
usage: alternatives --install <link> <name> <path> <priority>
[--initscript <service>]
[--family <family>]
[--follower <follower_link> <follower_name> <follower_path>]*
alternatives --remove <name> <path>
| update-alternatives --remove "${executable}" "$BIN/${executable}" | |
| update-alternatives --remove "${executable}" "$APP/${executable}" |
(but you also need to copy APP from after-install and define it in after-remove)
After applying this change, the error on Fedora is gone. The warning on Ubuntu still persists though.
There was a problem hiding this comment.
I should have tested it on Fedora 😞 My only excuse is that I was slightly tired of testing the app before opening the PR.
Anyway, good catch! WDYT about opening a PR with the fix in electron-builder?
There was a problem hiding this comment.
I mean if you want to then go for it. 😏
* Upgrade electron and electron-builder * Update the path to x64 build * Update electron to 24.3.0 * Use the latest after-install and after-remove scripts * Run prettier * Use correct indentation * Use app path in `update-alternatives --remove` (cherry picked from commit a5679de)
* Upgrade electron and electron-builder * Update the path to x64 build * Update electron to 24.3.0 * Use the latest after-install and after-remove scripts * Run prettier * Use correct indentation * Use app path in `update-alternatives --remove` (cherry picked from commit a5679de)
* Upgrade electron and electron-builder * Update the path to x64 build * Update electron to 24.3.0 * Use the latest after-install and after-remove scripts * Run prettier * Use correct indentation * Use app path in `update-alternatives --remove` (cherry picked from commit a5679de)
* Update `electron` and `electron-builder` (#26072) * Upgrade electron and electron-builder * Update the path to x64 build * Update electron to 24.3.0 * Use the latest after-install and after-remove scripts * Run prettier * Use correct indentation * Use app path in `update-alternatives --remove` (cherry picked from commit a5679de) * Update yarn.lock
Updates
electronandelectron-builderto the latest versions. I looked at the change lists for both and I did not see any breaking changes that would affect us.Tested on:
I tested the app Ubuntu 18.04 because Node.js 18 drops support for it and I was curious if the app really would not work 🙃 (it did not).
We should update operating system support page for Connect with the requirements from Node.js 18 (I tried to find the requirements in electron docs but I could not).
The Node requirements:
BTW, it looks like our page is incorrect anyway, I tried to run our current Connect v13 on Ubuntu 18.04 and the app started but it rendered only white background. The same happened to vscode.
Drone build: https://drone.platform.teleport.sh/gravitational/teleport/23758/16/2 - the
build-linux-arm64job shows as timed out, but on GHA it succeeded after 3.5 hours. Anyway, it is not related to Connect.I also removed
electron-debug- we do not use it.While testing the app on the virtual machines I experienced a lot of rendering artifacts (like suddenly disappearing background of the login modal or some weird green, green or pink lines and triangles). I do not think it is a new thing and it is related to a virtual machine, but I would be grateful @avatus if you could try it on some real Linux 🙏 (if you still have one).