Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to electron-builder 22 (fixes SUID sandbox issues) #1400

Merged
merged 2 commits into from
Feb 4, 2020

Conversation

pabzm
Copy link
Contributor

@pabzm pabzm commented Jan 29, 2020

electron-builder >= 22.0.0 fixes the setuid problem with the sandboxing helper: electron-userland/electron-builder#4163

This helper is required if kernel.unprivileged_userns_clone is not allowed (0), e.g. on Debian and derivates. (On other linux systems user name-spaces are used instead of the sandboxing helper.)

Fixing the sandbox-helper problem would enable us to update electron (see #895 and #948), which is apparently required to get into the MacOS app store (#1134, electron/electron#20027).

The update is jumping to a new major version, but the Changelog doesn't list any breaking changes, so I suppose this shouldn't make problems.

@Simon-Laux
Copy link
Member

Simon-Laux commented Jan 29, 2020

can some folks test the appimage of this PR? I forgot the password of my debian VM
https://download.delta.chat/desktop/preview/deltachat-desktop-1400.AppImage

@Simon-Laux
Copy link
Member

Would be really awesome if this works.

Copy link
Member

@Simon-Laux Simon-Laux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you upgrade electron in this pr, too?
So that we can give the preview builds to debian folks to test it.

@pabzm
Copy link
Contributor Author

pabzm commented Jan 29, 2020

Doesn't work... :( Oh my, it sounded like a good plan. I'll try to find out, what's wrong.

You don't need debian to test, just do sudo sysctl kernel.unprivileged_userns_clone=0.

@pabzm
Copy link
Contributor Author

pabzm commented Jan 29, 2020

Hmm, maybe this runs only after installing a packages somewhere, but not during packaging? https://github.com/electron-userland/electron-builder/pull/4163/files

I'll investigate tomorrow.

@pabzm
Copy link
Contributor Author

pabzm commented Jan 29, 2020

Well, duh... The commit message of electron-userland/electron-builder#4163 says that this is a fix for the debian package. So maybe this does help debian people by enabling them to use the debian-package at least? Could someone test that?

@pabzm
Copy link
Contributor Author

pabzm commented Jan 30, 2020

Works! 🎉

I installed a locally built .deb in a Debian Buster (v10) VM and could start it, I'd say that's a sufficient check?

From my point of view we could go down this route. Debian users will still not be able to use the AppImage out of the box, but I think that's a sufferable loss.

@pabzm
Copy link
Contributor Author

pabzm commented Jan 30, 2020

I also checked that running the flatpak-installed thing (from flathub.org, not locally modifed) works, so Debian users had one option left anyway. Now they'd have two.

@Simon-Laux
Copy link
Member

@pabzm pabzm requested a review from Simon-Laux January 31, 2020 10:23
@Simon-Laux
Copy link
Member

I agree to merge this, but I'm still a bit unsure about the AppImage...
Let's do it and see what happens - YOLO 😁 .

@Simon-Laux
Copy link
Member

Simon-Laux commented Feb 1, 2020

we should scroll up from this https://www.electronjs.org/docs/breaking-changes#planned-breaking-api-changes-40 and check for apis we use.

Update: (results of reading it)

https://www.electronjs.org/docs/breaking-changes#new-browserwindow-webpreferences- (changed defaults)
unlikely, but maybe from interest:
https://www.electronjs.org/docs/breaking-changes#winsetmenunull

@Jikstra
Copy link
Contributor

Jikstra commented Feb 2, 2020

Seems like we can upgrade electron & builder without bigger issues. For the AppImages we could still stay on electron 4 if that helps. I would still prefer to merge this during the next release cycle.

@Simon-Laux Simon-Laux merged commit af711fe into master Feb 4, 2020
@pabzm
Copy link
Contributor Author

pabzm commented Feb 4, 2020

@Simon-Laux: Why did you merge this despite open questions? @Jikstra had suggested to stay with electron 4 for the AppImage — I don't agree to that, but we should not ignore each another like this.

@Jikstra Wouldn't that mean to maintain different dependencies for different build targets? I don't know how this could work, and I am afraid of the complexity it brings, and I think it's not worth the effort: People shouldn't use AppImage anyway, if any other alternative works (AppImage has no validated download, no update-channel, etc.).
I'd rather suggest to put some effort into setting up a Debian repository in order to make it easy for Debian users to install Delta Chat.

@Simon-Laux
Copy link
Member

Simon-Laux commented Feb 4, 2020 via email

@pabzm
Copy link
Contributor Author

pabzm commented Feb 4, 2020

Ok, thank you for the explanation. I didn't know you had been talking with jikstra AFK. Could you next time drop a hint, so I won't bother you again in such a case?

Also thanks for checking out electron's breaking changes!

@Simon-Laux
Copy link
Member

Simon-Laux commented Feb 4, 2020 via email

@Jikstra Jikstra deleted the electron-builder-22 branch July 12, 2020 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants