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

Update git url parsing and readme #26

Merged
merged 4 commits into from
Feb 15, 2023
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
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