Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

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
  • Loading branch information
eaon authored Feb 15, 2023
2 parents 4b569af + 7de364e commit 92ade02
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
34 changes: 24 additions & 10 deletions 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`.
2 changes: 1 addition & 1 deletion scripts/common.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TOPLEVEL=$(git rev-parse --show-toplevel)
export TOPLEVEL
PROJECT=$(git remote get-url origin | sed -e 's,.*/\(.*\)\.git,\1,')
PROJECT=$(git remote get-url origin | xargs basename -s .git)
export PROJECT

OCI_RUN_ARGUMENTS="${OCI_RUN_ARGUMENTS:-}"
Expand Down

0 comments on commit 92ade02

Please sign in to comment.