Skip to content

Commit 56674ea

Browse files
committed
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 element-hq#10509
1 parent 9ed647d commit 56674ea

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
# Link to the binary
4+
ln -sf '/opt/${productFilename}/${executable}' '/usr/bin/${executable}'
5+
6+
# SUID chrome-sandbox for Electron 5+
7+
# Remove this custom after-install.tpl once this change has been upstreamed
8+
# https://github.com/electron-userland/electron-builder/pull/4163
9+
chmod 4755 '/opt/${productFilename}/chrome-sandbox' || true
10+
11+
update-mime-database /usr/share/mime || true
12+
update-desktop-database /usr/share/applications || true

‎package.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@
175175
"StartupWMClass": "riot"
176176
}
177177
},
178+
"deb": {
179+
"afterInstall": "electron_app/build/linux/after-install.tpl"
180+
},
178181
"mac": {
179182
"category": "public.app-category.social-networking"
180183
},

0 commit comments

Comments
 (0)