Skip to content

Commit

Permalink
Merge pull request #26 from freedomofpress/any-remote-in-a-storm
Browse files Browse the repository at this point in the history
Update git url parsing and readme

(cherry picked from commit freedomofpress/securedrop-updater@92ade02)
  • Loading branch information
eaon authored and cfm committed Apr 23, 2024
1 parent f50279e commit ae7c7ff
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions launcher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The Updater ensures that the [SecureDrop Workstation](https://github.com/freedom

Qubes 4.1.1 uses an end-of-life Fedora template in dom0 (fedora-32). See rationale here: https://www.qubes-os.org/doc/supported-releases/#note-on-dom0-and-eol.

To run the preflight updater:
If you installed SecureDrop Updater on your Qubes machine's `dom0`, you can run the updater like this:
1. Open a `dom0` terminal
2. Run `sdw-updater --skip-delta 0`

Expand All @@ -16,12 +16,26 @@ To run the notifier that pops up if `/proc/uptime` (how long the system has been

## Developer environment

Install the following packages in Debian Bullseye: `make`, `python3-venv`, `xvfb` and `python3-pyqt5`.

To run the preflight updater outside of `dom0`:

1. `sudo apt install make python3-venv python3-pyqt5`
2. Set up your virtual environment by running `make venv && source .venv/bin/activate`
3. Now you can run the updater: `./files/sdw-updater` (it won't actually update VMs unless you are in `dom0`)
4. You can also run the notifier: `./files/sdw-notify`
5. And, finally, tests and linters by running: `sudo apt install xvfb`, then `make check`
Because `securedrop-updater` is used exclusively with Fedora 32 (see above), it follows that we target Python 3.8. To make development for this target more accessible, we use a containerized build and test environment. Here are the instructions to set it up:

- Install dependencies for building and testing:
- `make`
- Podman (default) or Docker (or Docker compatible drop-in)
- Install dependencies for development:
- `Python 3.8` (default) or any other version of Python 3
- (If you're on Debian/Ubuntu) `apt install python3-venv`
- Set up the virtual environment:
- Run `make venv && source .venv/bin/activate` - it will automatically create a virtual environment with `python3.8` if it is available on your machine. Otherwise, it will use your systems default Python interpreter.
- If used your systems default Python interpreter, install PyQt5:
- (On Debian/Ubuntu) `apt install python3-pyqt5`
- (On Fedora) `dnf install python3-qt5`
- If you used an alternative Python interpreter to create your virtual environment, install PyQt5 from PyPi:
- `pip install PyQt5==5.14.2`

After installing the development dependencies:

1. You can run the updater: `./files/sdw-updater` (it won't actually update VMs unless you are in `dom0`)
2. You can also run the notifier: `./files/sdw-notify`
3. And, finally, tests and linters by running: `make check`.

For more `make` targets, please refer to `make help`.

0 comments on commit ae7c7ff

Please sign in to comment.