Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Add sandbox documentation #1218

Merged
merged 6 commits into from
Dec 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions docs/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,49 @@ following command line options.

On Windows, please make sure to add -- before options. For example,
`C:\Users\YourUser\AppData\Local\Programs\ssb-patchwork\Patchwork.exe -- --proxy-server=....`

## Start

### npm

```shell
npm start
```

### Yarn

```shell
yarn start
```

## Sandbox

Some Linux users may see an error like this:

> The SUID sandbox helper binary was found, but is not configured correctly.
> Rather than run without sandboxing I'm aborting now. You need to make sure
> that node_modules/electron/dist/chrome-sandbox is owned by root and has mode
> 4755.

You have three options, pick the one that you think sucks the least:

1. Change your kernel settings: `sudo sysctl kernel.unprivileged_userns_clone=1`
2. Follow the instructions and change the file's owner to root
- `sudo chown root node_modules/electron/dist/chrome-sandbox`
- `sudo chmod 4755 node_modules/electron/dist/chrome-sandbox`
3. Disable the sandbox with either:
- `npm start -- --no-sandbox`, or
- `yarn start -- --no-sandbox`

See also:

- https://github.com/electron/electron/issues/17972
- https://github.com/electron-userland/electron-builder/issues/3872

### AppImage

Note that the `chown` and `chmod` solution doesn't work with AppImages, but you can launch the AppImage with the `--no-sandbox` flag appended to the command.

You can permanently patch the AppImage to add `--no-sandbox`, but that change is experimental and requires some [extra steps][appimage-fix].

[appimage-fix]: https://github.com/ssbc/patchwork/issues/1217#issuecomment-559609983
36 changes: 29 additions & 7 deletions docs/release-notes-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,29 @@

## Install

- **Windows:** [`Patchwork-Setup-$$VERSION.exe`][exe]
- **macOS:** [`Patchwork-$$VERSION.dmg`][dmg]
- You must [allow apps from "unidentified" developers](https://support.apple.com/kb/PH25088).
- **Linux:** [`Patchwork-$$VERSION.AppImage`][appimage]
- You must [make it executable](https://docs.appimage.org/user-guide/run-appimages.html): `chmod +x Patchwork-$$VERSION.AppImage`
- You may need to [fix the sandbox](https://github.com/electron/electron/issues/17972): `sudo sysctl kernel.unprivileged_userns_clone=1`
Use [your favorite package manager](https://github.com/ssbc/patchwork#installation) or install manually.

### Windows

**[`Patchwork-Setup-$$VERSION.exe`][exe]**

### macOS

**[`Patchwork-$$VERSION.dmg`][dmg]**

You must [allow apps from "unidentified" developers](https://support.apple.com/kb/PH25088).

### Linux

**[`Patchwork-$$VERSION.AppImage`][appimage]**

You may need to [fix the sandbox](https://github.com/ssbc/patchwork/blob/master/docs/INSTALL.md#sandbox).

There are also releases for Debian and Snapcraft:

- **Debian:** [`ssb-patchwork_$$VERSION_amd64.deb`][deb]
- **Snapcraft:** [`ssb-patchwork_$$VERSION_amd64.snap`][snap]
- You must install with `snap install --dangerous` because it's unsigned.

## Getting started

Expand All @@ -23,6 +40,11 @@ $$CHANGES

:sos: [Need help? Please create an issue!](https://github.com/ssbc/patchwork/issues/new)

[appimage]: https://github.com/ssbc/patchwork/releases/download/v$$VERSION/Patchwork-$$VERSION.AppImage
[dmg]: https://github.com/ssbc/patchwork/releases/download/v$$VERSION/Patchwork-$$VERSION.dmg
[deb]: https://github.com/ssbc/patchwork/releases/download/v$$VERSION/ssb-patchwork_$$VERSION.dmg
[snap]: https://github.com/ssbc/patchwork/releases/download/v$$VERSION/ssb-patchwork_$$VERSION.snap
[exe]: https://github.com/ssbc/patchwork/releases/download/v$$VERSION/Patchwork-Setup-$$VERSION.exe
[appimage]: https://github.com/ssbc/patchwork/releases/download/v$$VERSION/Patchwork-$$VERSION.AppImage
[npm]: https://npmjs.org/
[yarn]: https://yarnpkg.com/en/
[yay]: https://github.com/Jguer/yay