Skip to content
Permalink
Browse files

Set SUID bit on chrome-sandbox for Debian

This tweaks Linux packages for Riot to SUID `chrome-sandbox` after install. This
is required as of Electron 5 for certain distros, such as Debian.

This change has also been provided to `electron-builder` upstream, so ideally
they'll include it in the future and this becomes redundant.

Fixes #10509
  • Loading branch information...
jryans committed Aug 16, 2019
1 parent 9ed647d commit 56674ea70849b3a793fa7b862945163aa10b36b8
Showing with 15 additions and 0 deletions.
  1. +12 −0 electron_app/build/linux/after-install.tpl
  2. +3 −0 package.json
@@ -0,0 +1,12 @@
#!/bin/bash

# Link to the binary
ln -sf '/opt/${productFilename}/${executable}' '/usr/bin/${executable}'

# SUID chrome-sandbox for Electron 5+
# Remove this custom after-install.tpl once this change has been upstreamed
# https://github.com/electron-userland/electron-builder/pull/4163
chmod 4755 '/opt/${productFilename}/chrome-sandbox' || true

update-mime-database /usr/share/mime || true
update-desktop-database /usr/share/applications || true
@@ -175,6 +175,9 @@
"StartupWMClass": "riot"
}
},
"deb": {
"afterInstall": "electron_app/build/linux/after-install.tpl"
},
"mac": {
"category": "public.app-category.social-networking"
},

0 comments on commit 56674ea

Please sign in to comment.
You can’t perform that action at this time.