Compare commits

...

30 commits

Author SHA1 Message Date
Alex Pyrgiotis
d9efcd8a26
Retain Grype ignore list from current branch
Some checks are pending
Tests / build-deb (debian trixie) (push) Blocked by required conditions
Tests / build-deb (ubuntu 22.04) (push) Blocked by required conditions
Tests / build-deb (ubuntu 24.04) (push) Blocked by required conditions
Tests / build-deb (ubuntu 24.10) (push) Blocked by required conditions
Tests / build-deb (ubuntu 25.04) (push) Blocked by required conditions
Tests / install-deb (debian bookworm) (push) Blocked by required conditions
Tests / install-deb (debian bullseye) (push) Blocked by required conditions
Tests / install-deb (debian trixie) (push) Blocked by required conditions
Tests / install-deb (ubuntu 22.04) (push) Blocked by required conditions
Tests / install-deb (ubuntu 24.04) (push) Blocked by required conditions
Tests / install-deb (ubuntu 24.10) (push) Blocked by required conditions
Tests / install-deb (ubuntu 25.04) (push) Blocked by required conditions
Tests / build-install-rpm (fedora 40) (push) Blocked by required conditions
Tests / build-install-rpm (fedora 41) (push) Blocked by required conditions
Tests / build-install-rpm (fedora 42) (push) Blocked by required conditions
Tests / run tests (debian bookworm) (push) Blocked by required conditions
Tests / run tests (debian bullseye) (push) Blocked by required conditions
Tests / run tests (debian trixie) (push) Blocked by required conditions
Tests / run tests (fedora 40) (push) Blocked by required conditions
Tests / run tests (fedora 41) (push) Blocked by required conditions
Tests / run tests (fedora 42) (push) Blocked by required conditions
Tests / run tests (ubuntu 22.04) (push) Blocked by required conditions
Tests / run tests (ubuntu 24.04) (push) Blocked by required conditions
Tests / run tests (ubuntu 24.10) (push) Blocked by required conditions
Tests / run tests (ubuntu 25.04) (push) Blocked by required conditions
Release multi-arch container image / build-push-image (push) Waiting to run
Scan latest app and container / security-scan-container (ubuntu-24.04) (push) Waiting to run
Scan latest app and container / security-scan-container (ubuntu-24.04-arm) (push) Waiting to run
Scan latest app and container / security-scan-app (ubuntu-24.04) (push) Waiting to run
Scan latest app and container / security-scan-app (ubuntu-24.04-arm) (push) Waiting to run
When security scanning our poetry.lock file for the **released**
Dangerzone version, retain the Grype ignore
list (.grype.yaml) of the current branch, which would be otherwise
overwritten by a git checkout to the latest released tag (v0.9.0 as of
writing this). This way, we can instruct Grype to ignore vulnerabilities
in the latest Dangerzone release.
2025-04-28 15:24:41 +03:00
Alex Pyrgiotis
a127eef9db
Ignore CVE-2025-43859 / GHSA-vqfr-h8mv-ghfj
Ignore an h11 vulnerability that is present in the Dangerzone
application released from the `v0.9.0` tag. This vulnerability
reportedly affects web servers behind reverse proxies, which is not
Dangerzone's case.
2025-04-28 15:22:23 +03:00
dependabot[bot]
847926f59a
build(deps-dev): bump h11 from 0.14.0 to 0.16.0
Bumps [h11](https://github.com/python-hyper/h11) from 0.14.0 to 0.16.0.
- [Commits](https://github.com/python-hyper/h11/compare/v0.14.0...v0.16.0)

---
updated-dependencies:
- dependency-name: h11
  dependency-version: 0.16.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28 14:29:10 +03:00
Alexis Métaireau
ec7f6b7321
Fix Debian-derivatives installation instructions
The way to handle the trust for a PGP key has changed in recent versions
of `apt-secure` and now requires the use of PGP keys in something
different than the internal GPG keybox database.

When updating the CI checks, I found that there were a difference between
them and the instructions that were provided in the INSTALL.md file, which
was using the armored version.

The instructions now require the unarmored keys, stored in a `.gpg`
file, and installation of these keys differ depending on the system,
using `sq` on newer distributions.
2025-04-28 10:05:18 +02:00
Alexis Métaireau
83be5fb151
Release container is now using the .tar format
Some checks failed
Tests / run tests (fedora 41) (push) Has been cancelled
Tests / run tests (fedora 42) (push) Has been cancelled
Tests / run tests (ubuntu 22.04) (push) Has been cancelled
Tests / run tests (ubuntu 24.04) (push) Has been cancelled
Tests / run tests (ubuntu 24.10) (push) Has been cancelled
Tests / windows (push) Has been cancelled
Tests / macOS (arch64) (push) Has been cancelled
Tests / macOS (x86_64) (push) Has been cancelled
Tests / build-deb (debian bookworm) (push) Has been cancelled
Tests / build-deb (debian bullseye) (push) Has been cancelled
Tests / build-deb (debian trixie) (push) Has been cancelled
Tests / build-deb (ubuntu 22.04) (push) Has been cancelled
Tests / build-deb (ubuntu 24.04) (push) Has been cancelled
Tests / build-deb (ubuntu 24.10) (push) Has been cancelled
Tests / build-deb (ubuntu 25.04) (push) Has been cancelled
Tests / install-deb (debian bookworm) (push) Has been cancelled
Tests / install-deb (debian bullseye) (push) Has been cancelled
Tests / install-deb (debian trixie) (push) Has been cancelled
Tests / install-deb (ubuntu 22.04) (push) Has been cancelled
Tests / install-deb (ubuntu 24.04) (push) Has been cancelled
Tests / install-deb (ubuntu 24.10) (push) Has been cancelled
Tests / install-deb (ubuntu 25.04) (push) Has been cancelled
Tests / build-install-rpm (fedora 40) (push) Has been cancelled
Tests / build-install-rpm (fedora 41) (push) Has been cancelled
Tests / build-install-rpm (fedora 42) (push) Has been cancelled
Tests / run tests (debian bookworm) (push) Has been cancelled
Tests / run tests (debian bullseye) (push) Has been cancelled
Tests / run tests (debian trixie) (push) Has been cancelled
Tests / run tests (fedora 40) (push) Has been cancelled
Tests / run tests (ubuntu 25.04) (push) Has been cancelled
Update the CI check to account for it.
2025-04-14 15:08:32 +02:00
Alex Pyrgiotis
04096380ff
Include Ubuntu Plucky and Fedora 42 in our nightly repo checks
Some checks failed
Tests / windows (push) Has been cancelled
Tests / macOS (arch64) (push) Has been cancelled
Tests / macOS (x86_64) (push) Has been cancelled
Tests / build-deb (debian bookworm) (push) Has been cancelled
Tests / build-deb (debian bullseye) (push) Has been cancelled
Tests / build-deb (debian trixie) (push) Has been cancelled
Tests / build-deb (ubuntu 22.04) (push) Has been cancelled
Tests / build-deb (ubuntu 24.04) (push) Has been cancelled
Tests / build-deb (ubuntu 24.10) (push) Has been cancelled
Tests / build-deb (ubuntu 25.04) (push) Has been cancelled
Tests / install-deb (debian bookworm) (push) Has been cancelled
Tests / install-deb (debian bullseye) (push) Has been cancelled
Tests / install-deb (debian trixie) (push) Has been cancelled
Tests / install-deb (ubuntu 22.04) (push) Has been cancelled
Tests / install-deb (ubuntu 24.04) (push) Has been cancelled
Tests / install-deb (ubuntu 24.10) (push) Has been cancelled
Tests / install-deb (ubuntu 25.04) (push) Has been cancelled
Tests / build-install-rpm (fedora 40) (push) Has been cancelled
Tests / build-install-rpm (fedora 41) (push) Has been cancelled
Tests / build-install-rpm (fedora 42) (push) Has been cancelled
Tests / run tests (debian bookworm) (push) Has been cancelled
Tests / run tests (debian bullseye) (push) Has been cancelled
Tests / run tests (debian trixie) (push) Has been cancelled
Tests / run tests (fedora 40) (push) Has been cancelled
Tests / run tests (fedora 41) (push) Has been cancelled
Tests / run tests (fedora 42) (push) Has been cancelled
Tests / run tests (ubuntu 22.04) (push) Has been cancelled
Tests / run tests (ubuntu 24.04) (push) Has been cancelled
Tests / run tests (ubuntu 24.10) (push) Has been cancelled
Tests / run tests (ubuntu 25.04) (push) Has been cancelled
2025-04-10 12:00:15 +02:00
Alexis Métaireau
21ca927b8b
Send release notes to editorial during the release process
Some checks are pending
Tests / windows (push) Blocked by required conditions
Tests / macOS (arch64) (push) Blocked by required conditions
Tests / macOS (x86_64) (push) Blocked by required conditions
Tests / build-deb (debian bookworm) (push) Blocked by required conditions
Tests / build-deb (debian bullseye) (push) Blocked by required conditions
Tests / build-deb (debian trixie) (push) Blocked by required conditions
Tests / build-deb (ubuntu 22.04) (push) Blocked by required conditions
Tests / build-deb (ubuntu 24.04) (push) Blocked by required conditions
Tests / build-deb (ubuntu 24.10) (push) Blocked by required conditions
Tests / build-deb (ubuntu 25.04) (push) Blocked by required conditions
Tests / install-deb (debian bookworm) (push) Blocked by required conditions
Tests / build-install-rpm (fedora 42) (push) Blocked by required conditions
Tests / run tests (debian bookworm) (push) Blocked by required conditions
Tests / install-deb (debian bullseye) (push) Blocked by required conditions
Tests / install-deb (debian trixie) (push) Blocked by required conditions
Tests / install-deb (ubuntu 22.04) (push) Blocked by required conditions
Tests / install-deb (ubuntu 24.04) (push) Blocked by required conditions
Tests / run tests (debian bullseye) (push) Blocked by required conditions
Tests / install-deb (ubuntu 24.10) (push) Blocked by required conditions
Tests / install-deb (ubuntu 25.04) (push) Blocked by required conditions
Tests / build-install-rpm (fedora 40) (push) Blocked by required conditions
Tests / build-install-rpm (fedora 41) (push) Blocked by required conditions
Tests / run tests (debian trixie) (push) Blocked by required conditions
Tests / run tests (fedora 40) (push) Blocked by required conditions
Tests / run tests (fedora 41) (push) Blocked by required conditions
Release multi-arch container image / build-push-image (push) Waiting to run
Scan latest app and container / security-scan-container (ubuntu-24.04) (push) Waiting to run
Scan latest app and container / security-scan-container (ubuntu-24.04-arm) (push) Waiting to run
Scan latest app and container / security-scan-app (ubuntu-24.04) (push) Waiting to run
Scan latest app and container / security-scan-app (ubuntu-24.04-arm) (push) Waiting to run
2025-04-09 20:55:31 +02:00
Alexis Métaireau
05040de212
Point download links to the 0.9.0 release 2025-04-09 17:08:50 +02:00
Alexis Métaireau
4014c8591b
Docs: Update the Podman Desktop docs for macOS
In order to access our custom seccomp policy, we require it to be
mounted on the podman machine.

Co-Author: Alex Pyrgiotis <alex.p@freedom.press>
2025-04-09 17:04:42 +02:00
Alex Pyrgiotis
6cd706af10
windows: Minor change to uninstallation message
Some checks are pending
Tests / Download and cache Tesseract data (push) Waiting to run
Tests / windows (push) Blocked by required conditions
Tests / macOS (arch64) (push) Blocked by required conditions
Tests / macOS (x86_64) (push) Blocked by required conditions
Tests / build-deb (debian bookworm) (push) Blocked by required conditions
Tests / build-deb (debian bullseye) (push) Blocked by required conditions
Tests / build-deb (debian trixie) (push) Blocked by required conditions
Tests / build-deb (ubuntu 24.04) (push) Blocked by required conditions
Tests / build-deb (ubuntu 24.10) (push) Blocked by required conditions
Tests / build-deb (ubuntu 25.04) (push) Blocked by required conditions
Tests / install-deb (debian bookworm) (push) Blocked by required conditions
Tests / build-install-rpm (fedora 42) (push) Blocked by required conditions
Tests / run tests (debian bookworm) (push) Blocked by required conditions
Tests / install-deb (debian bullseye) (push) Blocked by required conditions
Tests / install-deb (debian trixie) (push) Blocked by required conditions
Tests / install-deb (ubuntu 22.04) (push) Blocked by required conditions
Tests / install-deb (ubuntu 24.04) (push) Blocked by required conditions
Tests / run tests (debian bullseye) (push) Blocked by required conditions
Tests / install-deb (ubuntu 24.10) (push) Blocked by required conditions
Tests / install-deb (ubuntu 25.04) (push) Blocked by required conditions
Tests / build-install-rpm (fedora 40) (push) Blocked by required conditions
Tests / build-install-rpm (fedora 41) (push) Blocked by required conditions
Tests / run tests (debian trixie) (push) Blocked by required conditions
Tests / run tests (fedora 40) (push) Blocked by required conditions
Tests / run tests (fedora 41) (push) Blocked by required conditions
Release multi-arch container image / build-push-image (push) Waiting to run
Scan latest app and container / security-scan-container (ubuntu-24.04) (push) Waiting to run
Scan latest app and container / security-scan-container (ubuntu-24.04-arm) (push) Waiting to run
Scan latest app and container / security-scan-app (ubuntu-24.04) (push) Waiting to run
Scan latest app and container / security-scan-app (ubuntu-24.04-arm) (push) Waiting to run
Refs #1026
2025-04-09 14:26:45 +02:00
Alex Pyrgiotis
634b171b97
windows: Detect Dangerzone 0.8.1 during install
Detect Dangerzone 0.8.1 versions during install, so that we can prompt
users to manually uninstall it.

Refs #929
2025-04-09 14:26:44 +02:00
Alexis Métaireau
c99c424f87
Document Podman Desktop experimental support for Windows and macOS
Some checks are pending
Tests / build-deb (debian trixie) (push) Blocked by required conditions
Tests / build-deb (ubuntu 22.04) (push) Blocked by required conditions
Tests / build-deb (ubuntu 24.04) (push) Blocked by required conditions
Tests / build-deb (ubuntu 24.10) (push) Blocked by required conditions
Tests / build-deb (ubuntu 25.04) (push) Blocked by required conditions
Tests / install-deb (debian bookworm) (push) Blocked by required conditions
Tests / install-deb (debian bullseye) (push) Blocked by required conditions
Tests / install-deb (debian trixie) (push) Blocked by required conditions
Tests / install-deb (ubuntu 22.04) (push) Blocked by required conditions
Tests / install-deb (ubuntu 24.04) (push) Blocked by required conditions
Tests / install-deb (ubuntu 24.10) (push) Blocked by required conditions
Tests / install-deb (ubuntu 25.04) (push) Blocked by required conditions
Tests / build-install-rpm (fedora 40) (push) Blocked by required conditions
Tests / build-install-rpm (fedora 41) (push) Blocked by required conditions
Tests / build-install-rpm (fedora 42) (push) Blocked by required conditions
Tests / run tests (debian bookworm) (push) Blocked by required conditions
Tests / run tests (debian bullseye) (push) Blocked by required conditions
Tests / run tests (debian trixie) (push) Blocked by required conditions
Tests / run tests (fedora 40) (push) Blocked by required conditions
Tests / run tests (fedora 41) (push) Blocked by required conditions
Tests / run tests (fedora 42) (push) Blocked by required conditions
Tests / run tests (ubuntu 22.04) (push) Blocked by required conditions
Tests / run tests (ubuntu 24.04) (push) Blocked by required conditions
Tests / run tests (ubuntu 24.10) (push) Blocked by required conditions
Tests / run tests (ubuntu 25.04) (push) Blocked by required conditions
Release multi-arch container image / build-push-image (push) Waiting to run
Scan latest app and container / security-scan-container (ubuntu-24.04) (push) Waiting to run
Scan latest app and container / security-scan-container (ubuntu-24.04-arm) (push) Waiting to run
Scan latest app and container / security-scan-app (ubuntu-24.04) (push) Waiting to run
Scan latest app and container / security-scan-app (ubuntu-24.04-arm) (push) Waiting to run
2025-04-08 16:08:55 +02:00
Alex Pyrgiotis
19fa11410b
Update reference template for Qubes to Fedora 41
Closes #1078
2025-04-08 16:37:28 +03:00
Alex Pyrgiotis
10be85b9f2
container: Add workarounds for Podman Desktop support on Windows
In case we run on Windows and use Podman Desktop (for which we currently
offer experimental support), we must not pass some Podman flags in order
to avoid conversion errors.

Refs #1127
2025-04-08 16:36:08 +03:00
Alexis Métaireau
47d732e603
Document the Makefile targets
It now outputs the following:

```
build-linux                  Build linux packages (.rpm and .deb)
build-macos-arm              Build macOS Apple Silicon package (.dmg)
build-macos-intel            Build macOS intel package (.dmg)
Dockerfile                   Regenerate the Dockerfile from its template
fix                          apply all the suggestions from ruff
help                         Print this message and exit.
lint                         Check the code for linting, formatting, and typing issues with ruff and mypy
regenerate-reference-pdfs    Regenerate the reference PDFs
test                         Run the tests
test-large                   Run large test set
```
2025-04-08 16:34:34 +03:00
Alexis Métaireau
d6451290db
Move multithreading patch up so that it's working in the GUI 2025-04-08 16:34:34 +03:00
Alex Pyrgiotis
f0bb65cb4e
Bypass a cx-freeze issue for fitz._wxcolors
Bypass an issue with `cx-freeze` that fails to include the
`fitz._wxcolors` module in the final Windows artifact.

Refs #1128
2025-04-08 16:34:34 +03:00
Alex Pyrgiotis
0c741359cc
Make our build-image.py script runable on Windows 2025-04-08 16:34:34 +03:00
Alex Pyrgiotis
8c61894e25
Handle the case where Docker is not installed
Refs #1132
2025-04-08 16:33:15 +03:00
Alex Pyrgiotis
57667a96be
Add a way to unset the container runtime
Add a way to set the container runtime that Dangerzone uses back to the
default.
2025-04-07 18:23:13 +03:00
Alex Pyrgiotis
1a644e2506
Do not install poetry-plugin-export
Do not unconditionally install the Poetry plugin for exporting
dependencies as a requirements.txt file, since it's used only when
building a Debian package. Keep it instead in the Linux instructions and
when building a Dangerzone environment.
2025-04-07 18:23:10 +03:00
Alex Pyrgiotis
843e68cdf7
Handle the case of empty tesseract dirs during download 2025-04-07 18:22:52 +03:00
Alex Pyrgiotis
33b2a183ce
docs: Improve doit docs 2025-04-07 18:22:52 +03:00
Alex Pyrgiotis
c7121b69a3
Prefer poetry sync to poetry install --sync
Use `poetry sync` instead of `poetry install --sync`, since the latter
is deprecated and will be removed after June 2025, as seen in the
following warning message:

  The `--sync` option is deprecated and slated for removal in the next
  minor release after June 2025, use the `poetry sync` command instead.
2025-04-07 18:22:50 +03:00
Alex Pyrgiotis
0b3bf89d5b
Implicitly run doit with poetry run
Implicitly run `doit` with `poetry run`, else `poetry env remove --all`
will remove the calling Python interpreter.
2025-04-02 12:01:14 +03:00
Alex Pyrgiotis
e0b10c5e40
doit: Remove tessdata dir from targets
Remove the tesseract data dir from the doit targets, else we encounter
the following error:

  Traceback (most recent call last):
    [...]
    File "[...]/Library/Caches/pypoetry/virtualenvs/dangerzone-52Yr5wv_-py3.11/lib/python3.11/site-packages/doit/dependency.py", line 39, in get_file_md5
      with open(path, 'rb') as file_data:
           ^^^^^^^^^^^^^^^^
  IsADirectoryError: [Errno 21] Is a directory: 'share/tessdata'
2025-04-02 11:46:20 +03:00
Alex Pyrgiotis
092eec55d1
doit: Remove unused 'DEBIAN_VERSIONS' variable 2025-04-02 11:45:47 +03:00
Alex Pyrgiotis
14a480c3a3
doit: Fix typo in Fedora targets
Fix a typo when building a Fedora target. Also, add Fedora 42 support.
2025-04-02 11:44:50 +03:00
Alex Pyrgiotis
9df825db5c
debian: Use abbreviated months in changelog
Use abbreviated months in the Debian changelog, else we'll have warnings
like the following:

  LINE:  -- Freedom of the Press Foundation   <info@freedom.press>  Mon, 31 March 2025 15:57:18 +0300
  dpkg-source: warning: dangerzone/debian/changelog(l5): cannot parse non-conformant date '31 March 20
2025-04-02 11:35:31 +03:00
Alex Pyrgiotis
2ee22a497a
Reinstall deps after doit cleans everything
Make sure to reinstall the project dependencies once `doit clean` runs,
since it also removes itself.
2025-04-02 11:30:31 +03:00
24 changed files with 224 additions and 95 deletions

View file

@ -19,6 +19,8 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- distro: ubuntu
version: "25.04" # plucky
- distro: ubuntu - distro: ubuntu
version: "24.10" # oracular version: "24.10" # oracular
- distro: ubuntu - distro: ubuntu
@ -32,8 +34,8 @@ jobs:
- distro: debian - distro: debian
version: "11" # bullseye version: "11" # bullseye
steps: steps:
- name: Add packages.freedom.press PGP key (gpg) - name: Add packages.freedom.press PGP key (gpg --keyring)
if: matrix.version != 'trixie' if: matrix.version != 'trixie' && matrix.version != "25.04"
run: | run: |
apt-get update && apt-get install -y gnupg2 ca-certificates apt-get update && apt-get install -y gnupg2 ca-certificates
dirmngr # NOTE: This is a command that's necessary only in containers dirmngr # NOTE: This is a command that's necessary only in containers
@ -46,7 +48,7 @@ jobs:
mv ./fpf-apt-tools-archive-keyring.gpg /etc/apt/keyrings/. mv ./fpf-apt-tools-archive-keyring.gpg /etc/apt/keyrings/.
- name: Add packages.freedom.press PGP key (sq) - name: Add packages.freedom.press PGP key (sq)
if: matrix.version == 'trixie' if: matrix.version == 'trixie' || matrix.version == '25.04'
run: | run: |
apt-get update && apt-get install -y ca-certificates sq apt-get update && apt-get install -y ca-certificates sq
mkdir -p /etc/apt/keyrings/ mkdir -p /etc/apt/keyrings/
@ -55,7 +57,10 @@ jobs:
sq network keyserver \ sq network keyserver \
--server hkps://keys.openpgp.org \ --server hkps://keys.openpgp.org \
search "DE28 AB24 1FA4 8260 FAC9 B8BA A7C9 B385 2260 4281" \ search "DE28 AB24 1FA4 8260 FAC9 B8BA A7C9 B385 2260 4281" \
--output /etc/apt/keyrings/fpf-apt-tools-archive-keyring.gpg --output - \
| sq packet dearmor \
> /etc/apt/keyrings/fpf-apt-tools-archive-keyring.gpg
- name: Add packages.freedom.press to our APT sources - name: Add packages.freedom.press to our APT sources
run: | run: |
. /etc/os-release . /etc/os-release
@ -79,6 +84,8 @@ jobs:
version: 40 version: 40
- distro: fedora - distro: fedora
version: 41 version: 41
- distro: fedora
version: 42
steps: steps:
- name: Add packages.freedom.press to our YUM sources - name: Add packages.freedom.press to our YUM sources
run: | run: |

View file

@ -20,7 +20,7 @@ jobs:
- name: Download container image for the latest release and load it - name: Download container image for the latest release and load it
run: | run: |
VERSION=$(curl https://api.github.com/repos/freedomofpress/dangerzone/releases/latest | grep "tag_name" | cut -d '"' -f 4) VERSION=$(curl https://api.github.com/repos/freedomofpress/dangerzone/releases/latest | grep "tag_name" | cut -d '"' -f 4)
CONTAINER_FILENAME=container-${VERSION:1}-${{ matrix.arch }}.tar.gz CONTAINER_FILENAME=container-${VERSION:1}-${{ matrix.arch }}.tar
wget https://github.com/freedomofpress/dangerzone/releases/download/${VERSION}/${CONTAINER_FILENAME} -O ${CONTAINER_FILENAME} wget https://github.com/freedomofpress/dangerzone/releases/download/${VERSION}/${CONTAINER_FILENAME} -O ${CONTAINER_FILENAME}
docker load -i ${CONTAINER_FILENAME} docker load -i ${CONTAINER_FILENAME}
- name: Get image tag - name: Get image tag
@ -67,8 +67,12 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- name: Checkout the latest released tag - name: Checkout the latest released tag
run: | run: |
# Grab the latest Grype ignore list before git checkout overwrites it.
cp .grype.yaml .grype.yaml.new
VERSION=$(curl https://api.github.com/repos/freedomofpress/dangerzone/releases/latest | jq -r '.tag_name') VERSION=$(curl https://api.github.com/repos/freedomofpress/dangerzone/releases/latest | jq -r '.tag_name')
git checkout $VERSION git checkout $VERSION
# Restore the newest Grype ignore list.
mv .grype.yaml.new .grype.yaml
# NOTE: Scan first without failing, else we won't be able to read the scan # NOTE: Scan first without failing, else we won't be able to read the scan
# report. # report.
- name: Scan application (no fail) - name: Scan application (no fail)

View file

@ -45,4 +45,12 @@ ignore:
# present in Debian Bookworm. Also, libcurl is an HTTP client, and the # present in Debian Bookworm. Also, libcurl is an HTTP client, and the
# Dangerzone container does not make any network calls. # Dangerzone container does not make any network calls.
- vulnerability: CVE-2025-0665 - vulnerability: CVE-2025-0665
# CVE-2025-43859
# ==============
#
# GitHub advisory: https://github.com/advisories/GHSA-vqfr-h8mv-ghfj
# Verdict: Dangerzone is not affected because the vulnerable code is triggered
# when parsing HTTP requests, e.g., by web **servers**. Dangerzone on the
# other hand performs HTTP requests, i.e., it operates as **client**.
- vulnerability: CVE-2025-43859
- vulnerability: GHSA-vqfr-h8mv-ghfj

View file

@ -113,7 +113,7 @@ Install Poetry using `pipx`:
```sh ```sh
pipx install poetry pipx install poetry
pipx inject poetry poetry-plugin-export pipx inject poetry
``` ```
Clone this repository: Clone this repository:
@ -187,27 +187,27 @@ Overview of the qubes you'll create:
|--------------|----------|---------| |--------------|----------|---------|
| dz | app qube | Dangerzone development | | dz | app qube | Dangerzone development |
| dz-dvm | app qube | offline disposable template for performing conversions | | dz-dvm | app qube | offline disposable template for performing conversions |
| fedora-40-dz | template | template for the other two qubes | | fedora-41-dz | template | template for the other two qubes |
#### In `dom0`: #### In `dom0`:
The following instructions require typing commands in a terminal in dom0. The following instructions require typing commands in a terminal in dom0.
1. Create a new Fedora **template** (`fedora-40-dz`) for Dangerzone development: 1. Create a new Fedora **template** (`fedora-41-dz`) for Dangerzone development:
``` ```
qvm-clone fedora-40 fedora-40-dz qvm-clone fedora-41 fedora-41-dz
``` ```
> :bulb: Alternatively, you can use your base Fedora 40 template in the > :bulb: Alternatively, you can use your base Fedora 40 template in the
> following instructions. In that case, skip this step and replace > following instructions. In that case, skip this step and replace
> `fedora-40-dz` with `fedora-40` in the steps below. > `fedora-41-dz` with `fedora-41` in the steps below.
2. Create an offline disposable template (app qube) called `dz-dvm`, based on the `fedora-40-dz` 2. Create an offline disposable template (app qube) called `dz-dvm`, based on the `fedora-41-dz`
template. This will be the qube where the documents will be sanitized: template. This will be the qube where the documents will be sanitized:
``` ```
qvm-create --class AppVM --label red --template fedora-40-dz \ qvm-create --class AppVM --label red --template fedora-41-dz \
--prop netvm="" --prop template_for_dispvms=True \ --prop netvm="" --prop template_for_dispvms=True \
--prop default_dispvm='' dz-dvm --prop default_dispvm='' dz-dvm
``` ```
@ -216,7 +216,7 @@ The following instructions require typing commands in a terminal in dom0.
and initiating the sanitization process: and initiating the sanitization process:
``` ```
qvm-create --class AppVM --label red --template fedora-40-dz dz qvm-create --class AppVM --label red --template fedora-41-dz dz
qvm-volume resize dz:private $(numfmt --from=auto 20Gi) qvm-volume resize dz:private $(numfmt --from=auto 20Gi)
``` ```
@ -261,12 +261,12 @@ test it.
./install/linux/build-rpm.py --qubes ./install/linux/build-rpm.py --qubes
``` ```
4. Copy the produced `.rpm` file into `fedora-40-dz` 4. Copy the produced `.rpm` file into `fedora-41-dz`
```sh ```sh
qvm-copy dist/*.x86_64.rpm qvm-copy dist/*.x86_64.rpm
``` ```
#### In the `fedora-40-dz` template #### In the `fedora-41-dz` template
1. Install the `.rpm` package you just copied 1. Install the `.rpm` package you just copied
@ -274,7 +274,7 @@ test it.
sudo dnf install ~/QubesIncoming/dz/*.rpm sudo dnf install ~/QubesIncoming/dz/*.rpm
``` ```
2. Shutdown the `fedora-40-dz` template 2. Shutdown the `fedora-41-dz` template
### Developing Dangerzone ### Developing Dangerzone
@ -305,7 +305,7 @@ For changes in the server side components, you can simply edit them locally,
and they will be mirrored to the disposable qube through the `dz.ConvertDev` and they will be mirrored to the disposable qube through the `dz.ConvertDev`
RPC call. RPC call.
The only reason to build a new Qubes RPM and install it in the `fedora-40-dz` The only reason to build a new Qubes RPM and install it in the `fedora-41-dz`
template for development is if: template for development is if:
1. The project requires new server-side components. 1. The project requires new server-side components.
2. The code for `qubes/dz.ConvertDev` needs to be updated. 2. The code for `qubes/dz.ConvertDev` needs to be updated.
@ -326,7 +326,7 @@ cd dangerzone
Install Python dependencies: Install Python dependencies:
```sh ```sh
python3 -m pip install poetry poetry-plugin-export python3 -m pip install poetry
poetry install poetry install
``` ```
@ -387,7 +387,7 @@ Install Microsoft Visual C++ 14.0 or greater. Get it with ["Microsoft C++ Build
Install [poetry](https://python-poetry.org/). Open PowerShell, and run: Install [poetry](https://python-poetry.org/). Open PowerShell, and run:
``` ```
python -m pip install poetry poetry-plugin-export python -m pip install poetry
``` ```
Install git from [here](https://git-scm.com/download/win), open a Windows terminal (`cmd.exe`) and clone this repository: Install git from [here](https://git-scm.com/download/win), open a Windows terminal (`cmd.exe`) and clone this repository:

View file

@ -7,6 +7,10 @@ since 0.4.1, and this project adheres to [Semantic Versioning](https://semver.or
## [Unreleased](https://github.com/freedomofpress/dangerzone/compare/v0.9.0...HEAD) ## [Unreleased](https://github.com/freedomofpress/dangerzone/compare/v0.9.0...HEAD)
## Changed
- Update installation instructions (and CI checks) for Debian derivatives ([#1141](https://github.com/freedomofpress/dangerzone/pull/1141))
## [0.9.0](https://github.com/freedomofpress/dangerzone/compare/v0.9.0...0.8.1) ## [0.9.0](https://github.com/freedomofpress/dangerzone/compare/v0.9.0...0.8.1)
### Added ### Added
@ -68,6 +72,7 @@ since 0.4.1, and this project adheres to [Semantic Versioning](https://semver.or
Thanks [@jkarasti](https://github.com/jkarasti) for the contribution. Thanks [@jkarasti](https://github.com/jkarasti) for the contribution.
- Work around a `cx_freeze` build issue ([#974](https://github.com/freedomofpress/dangerzone/issues/974)) - Work around a `cx_freeze` build issue ([#974](https://github.com/freedomofpress/dangerzone/issues/974))
- tests: mark the hancom office suite tests for rerun on failures ([#991](https://github.com/freedomofpress/dangerzone/pull/991)) - tests: mark the hancom office suite tests for rerun on failures ([#991](https://github.com/freedomofpress/dangerzone/pull/991))
- Update reference template for Qubes to Fedora 41 ([#1078](https://github.com/freedomofpress/dangerzone/issues/1078))
## [0.8.1](https://github.com/freedomofpress/dangerzone/compare/v0.8.1...0.8.0) ## [0.8.1](https://github.com/freedomofpress/dangerzone/compare/v0.8.1...0.8.0)

View file

@ -110,30 +110,30 @@ Dangerzone is available for:
</tr> </tr>
</table> </table>
First, retrieve the PGP keys. First, retrieve the PGP keys. The instructions differ depending on the specific
distribution you are using:
Starting with Trixie, follow these instructions to download the PGP keys: For Debian Trixie and Ubuntu Plucky (25.04), follow these instructions to
download the PGP keys:
```bash ```bash
sudo apt-get update && sudo apt-get install sq -y sudo apt-get update && sudo apt-get install sq ca-certificates -y
mkdir -p /etc/apt/keyrings/
sq network keyserver \ sq network keyserver \
--server hkps://keys.openpgp.org \ --server hkps://keys.openpgp.org \
search "DE28 AB24 1FA4 8260 FAC9 B8BA A7C9 B385 2260 4281" \ search "DE28 AB24 1FA4 8260 FAC9 B8BA A7C9 B385 2260 4281" \
--output /etc/apt/keyrings/fpf-apt-tools-archive-keyring.gpg --output - | sq packet dearmor fpfdz.gpg
sudo mkdir -p /etc/apt/keyrings/
sudo mv fpfdz.gpg /etc/apt/keyrings/fpf-apt-tools-archive-keyring.gpg
``` ```
On other Debian-derivatives: On other Debian-derivatives:
```sh ```sh
sudo apt-get update && sudo apt-get install gnupg2 ca-certificates -y sudo apt-get update && sudo apt-get install gnupg2 ca-certificates -y
gpg --keyserver hkps://keys.openpgp.org \
--no-default-keyring --keyring ./fpf-apt-tools-archive-keyring.gpg \
--recv-keys "DE28 AB24 1FA4 8260 FAC9 B8BA A7C9 B385 2260 4281"
sudo mkdir -p /etc/apt/keyrings/ sudo mkdir -p /etc/apt/keyrings/
sudo gpg --no-default-keyring --keyring ./fpf-apt-tools-archive-keyring.gpg \ sudo gpg --keyserver hkps://keys.openpgp.org \
--armor --export "DE28 AB24 1FA4 8260 FAC9 B8BA A7C9 B385 2260 4281" \ --no-default-keyring --keyring /etc/apt/keyrings/fpf-apt-tools-archive-keyring.gpg \
> /etc/apt/keyrings/fpf-apt-tools-archive-keyring.gpg --recv-keys "DE28 AB24 1FA4 8260 FAC9 B8BA A7C9 B385 2260 4281"
``` ```
Then, on all distributions, add the URL of the repo in your APT sources: Then, on all distributions, add the URL of the repo in your APT sources:
@ -231,8 +231,8 @@ After confirming that it matches, type `y` (for yes) and the installation should
> [!IMPORTANT] > [!IMPORTANT]
> This section will install Dangerzone in your **default template** > This section will install Dangerzone in your **default template**
> (`fedora-40` as of writing this). If you want to install it in a different > (`fedora-41` as of writing this). If you want to install it in a different
> one, make sure to replace `fedora-40` with the template of your choice. > one, make sure to replace `fedora-41` with the template of your choice.
The following steps must be completed once. Make sure you run them in the The following steps must be completed once. Make sure you run them in the
specified qubes. specified qubes.
@ -249,7 +249,7 @@ Create a **disposable**, offline app qube (`dz-dvm`), based on your default
template. This will be the qube where the documents will be sanitized: template. This will be the qube where the documents will be sanitized:
``` ```
qvm-create --class AppVM --label red --template fedora-40 \ qvm-create --class AppVM --label red --template fedora-41 \
--prop netvm="" --prop template_for_dispvms=True \ --prop netvm="" --prop template_for_dispvms=True \
--prop default_dispvm='' dz-dvm --prop default_dispvm='' dz-dvm
``` ```
@ -262,7 +262,7 @@ document, with the following contents:
dz.Convert * @anyvm @dispvm:dz-dvm allow dz.Convert * @anyvm @dispvm:dz-dvm allow
``` ```
#### In the `fedora-40` template #### In the `fedora-41` template
Install Dangerzone: Install Dangerzone:

View file

@ -22,7 +22,7 @@ fix: ## apply all the suggestions from ruff
ruff format ruff format
.PHONY: test .PHONY: test
test: test: ## Run the tests
# Make each GUI test run as a separate process, to avoid segfaults due to # Make each GUI test run as a separate process, to avoid segfaults due to
# shared state. # shared state.
# See more in https://github.com/freedomofpress/dangerzone/issues/493 # See more in https://github.com/freedomofpress/dangerzone/issues/493
@ -47,27 +47,31 @@ test-large: test-large-init ## Run large test set
python -m pytest --tb=no tests/test_large_set.py::TestLargeSet -v $(JUNIT_FLAGS) --junitxml=$(TEST_LARGE_RESULTS) python -m pytest --tb=no tests/test_large_set.py::TestLargeSet -v $(JUNIT_FLAGS) --junitxml=$(TEST_LARGE_RESULTS)
python $(TEST_LARGE_RESULTS)/report.py $(TEST_LARGE_RESULTS) python $(TEST_LARGE_RESULTS)/report.py $(TEST_LARGE_RESULTS)
Dockerfile: Dockerfile.env Dockerfile.in Dockerfile: Dockerfile.env Dockerfile.in ## Regenerate the Dockerfile from its template
poetry run jinja2 Dockerfile.in Dockerfile.env > Dockerfile poetry run jinja2 Dockerfile.in Dockerfile.env > Dockerfile
.PHONY: poetry-install
poetry-install: ## Install project dependencies
poetry install
.PHONY: build-clean .PHONY: build-clean
build-clean: build-clean:
doit clean poetry run doit clean
.PHONY: build-macos-intel .PHONY: build-macos-intel
build-macos-intel: build-clean build-macos-intel: build-clean poetry-install ## Build macOS intel package (.dmg)
doit -n 8 poetry run doit -n 8
.PHONY: build-macos-arm .PHONY: build-macos-arm
build-macos-arm: build-clean build-macos-arm: build-clean poetry-install ## Build macOS Apple Silicon package (.dmg)
doit -n 8 macos_build_dmg poetry run doit -n 8 macos_build_dmg
.PHONY: build-linux .PHONY: build-linux
build-linux: build-clean build-linux: build-clean poetry-install ## Build linux packages (.rpm and .deb)
doit -n 8 fedora_rpm debian_deb poetry run doit -n 8 fedora_rpm debian_deb
.PHONY: regenerate-reference-pdfs .PHONY: regenerate-reference-pdfs
regenerate-reference-pdfs: regenerate-reference-pdfs: ## Regenerate the reference PDFs
pytest tests/test_cli.py -k regenerate --generate-reference-pdfs pytest tests/test_cli.py -k regenerate --generate-reference-pdfs
# Makefile self-help borrowed from the securedrop-client project # Makefile self-help borrowed from the securedrop-client project
# Explaination of the below shell command should it ever break. # Explaination of the below shell command should it ever break.

View file

@ -14,15 +14,15 @@ _Read more about Dangerzone in the [official site](https://dangerzone.rocks/abou
Follow the instructions for each platform: Follow the instructions for each platform:
* [macOS](https://github.com/freedomofpress/dangerzone/blob/v0.8.1/INSTALL.md#macos) * [macOS](https://github.com/freedomofpress/dangerzone/blob/v0.9.0/INSTALL.md#macos)
* [Windows](https://github.com/freedomofpress/dangerzone/blob/v0.8.1//INSTALL.md#windows) * [Windows](https://github.com/freedomofpress/dangerzone/blob/v0.9.0//INSTALL.md#windows)
* [Ubuntu Linux](https://github.com/freedomofpress/dangerzone/blob/v0.8.1/INSTALL.md#ubuntu-debian) * [Ubuntu Linux](https://github.com/freedomofpress/dangerzone/blob/v0.9.0/INSTALL.md#ubuntu-debian)
* [Debian Linux](https://github.com/freedomofpress/dangerzone/blob/v0.8.1/INSTALL.md#ubuntu-debian) * [Debian Linux](https://github.com/freedomofpress/dangerzone/blob/v0.9.0/INSTALL.md#ubuntu-debian)
* [Fedora Linux](https://github.com/freedomofpress/dangerzone/blob/v0.8.1/INSTALL.md#fedora) * [Fedora Linux](https://github.com/freedomofpress/dangerzone/blob/v0.9.0/INSTALL.md#fedora)
* [Qubes OS (beta)](https://github.com/freedomofpress/dangerzone/blob/v0.8.0/INSTALL.md#qubes-os) * [Qubes OS (beta)](https://github.com/freedomofpress/dangerzone/blob/v0.9.0/INSTALL.md#qubes-os)
* [Tails](https://github.com/freedomofpress/dangerzone/blob/v0.8.1/INSTALL.md#tails) * [Tails](https://github.com/freedomofpress/dangerzone/blob/v0.9.0/INSTALL.md#tails)
You can read more about our operating system support [here](https://github.com/freedomofpress/dangerzone/blob/v0.8.1/INSTALL.md#operating-system-support). You can read more about our operating system support [here](https://github.com/freedomofpress/dangerzone/blob/v0.9.0/INSTALL.md#operating-system-support).
## Some features ## Some features
@ -82,3 +82,7 @@ Dangerzone gets updates to improve its features _and_ to fix problems. So, updat
1. Check which version of Dangerzone you are currently using: run Dangerzone, then look for a series of numbers to the right of the logo within the app. The format of the numbers will look similar to `0.4.1` 1. Check which version of Dangerzone you are currently using: run Dangerzone, then look for a series of numbers to the right of the logo within the app. The format of the numbers will look similar to `0.4.1`
2. Now find the latest available version of Dangerzone: go to the [download page](https://dangerzone.rocks/#downloads). Look for the version number displayed. The number will be using the same format as in Step 1. 2. Now find the latest available version of Dangerzone: go to the [download page](https://dangerzone.rocks/#downloads). Look for the version number displayed. The number will be using the same format as in Step 1.
3. Is the version on the Dangerzone download page higher than the version of your installed app? Go ahead and update. 3. Is the version on the Dangerzone download page higher than the version of your installed app? Go ahead and update.
### Can I use Podman Desktop?
Yes! We've introduced [experimental support for Podman Desktop](https://github.com/freedomofpress/dangerzone/blob/main/docs/podman-desktop.md) on Windows and macOS.

View file

@ -21,6 +21,7 @@ Here is a list of tasks that should be done before issuing the release:
- [ ] Update screenshot in `README.md`, if necessary - [ ] Update screenshot in `README.md`, if necessary
- [ ] CHANGELOG.md should be updated to include a list of all major changes since the last release - [ ] CHANGELOG.md should be updated to include a list of all major changes since the last release
- [ ] A draft release should be created. Copy the release notes text from the template at [`docs/templates/release-notes`](https://github.com/freedomofpress/dangerzone/tree/main/docs/templates/) - [ ] A draft release should be created. Copy the release notes text from the template at [`docs/templates/release-notes`](https://github.com/freedomofpress/dangerzone/tree/main/docs/templates/)
- [ ] Send the release notes to editorial for review
- [ ] Do the QA tasks - [ ] Do the QA tasks
## Add new Linux platforms and remove obsolete ones ## Add new Linux platforms and remove obsolete ones
@ -123,7 +124,7 @@ Here is what you need to do:
# In case of a new Python installation or minor version upgrade, e.g., from # In case of a new Python installation or minor version upgrade, e.g., from
# 3.11 to 3.12, reinstall Poetry # 3.11 to 3.12, reinstall Poetry
python3 -m pip install poetry poetry-plugin-export python3 -m pip install poetry
# You can verify the correct Python version is used # You can verify the correct Python version is used
poetry debug info poetry debug info
@ -141,7 +142,7 @@ Here is what you need to do:
poetry env remove --all poetry env remove --all
# Install the dependencies # Install the dependencies
poetry install --sync poetry sync
``` ```
- [ ] Build the container image and the OCR language data - [ ] Build the container image and the OCR language data
@ -205,7 +206,7 @@ The Windows release is performed in a Windows 11 virtual machine (as opposed to
```bash ```bash
# In case of a new Python installation or minor version upgrade, e.g., from # In case of a new Python installation or minor version upgrade, e.g., from
# 3.11 to 3.12, reinstall Poetry # 3.11 to 3.12, reinstall Poetry
python3 -m pip install poetry poetry-plugin-export python3 -m pip install poetry
# You can verify the correct Python version is used # You can verify the correct Python version is used
poetry debug info poetry debug info
@ -223,7 +224,7 @@ The Windows release is performed in a Windows 11 virtual machine (as opposed to
poetry env remove --all poetry env remove --all
# Install the dependencies # Install the dependencies
poetry install --sync poetry sync
``` ```
- [ ] Copy the container image into the VM - [ ] Copy the container image into the VM

View file

@ -4,6 +4,12 @@ import sys
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
# Call freeze_support() to avoid passing unknown options to the subprocess.
# See https://github.com/freedomofpress/dangerzone/issues/873
import multiprocessing
multiprocessing.freeze_support()
try: try:
from . import vendor # type: ignore [attr-defined] from . import vendor # type: ignore [attr-defined]

View file

@ -52,7 +52,11 @@ def print_header(s: str) -> None:
@click.option( @click.option(
"--set-container-runtime", "--set-container-runtime",
required=False, required=False,
help="The path to the container runtime you want to set in the settings", help=(
"The name or full path of the container runtime you want Dangerzone to use."
" You can specify the value 'default' if you want to take back your choice, and"
" let Dangerzone use the default runtime for this OS"
),
) )
@click.version_option(version=get_version(), message="%(version)s") @click.version_option(version=get_version(), message="%(version)s")
@errors.handle_document_errors @errors.handle_document_errors
@ -69,10 +73,16 @@ def cli_main(
display_banner() display_banner()
if set_container_runtime: if set_container_runtime:
settings = Settings() settings = Settings()
container_runtime = settings.set_custom_runtime( if set_container_runtime == "default":
set_container_runtime, autosave=True settings.unset_custom_runtime()
) click.echo(
click.echo(f"Set the settings container_runtime to {container_runtime}") "Instructed Dangerzone to use the default container runtime for this OS"
)
else:
container_runtime = settings.set_custom_runtime(
set_container_runtime, autosave=True
)
click.echo(f"Set the settings container_runtime to {container_runtime}")
sys.exit(0) sys.exit(0)
elif not filenames: elif not filenames:
raise click.UsageError("Missing argument 'FILENAMES...'") raise click.UsageError("Missing argument 'FILENAMES...'")

View file

@ -3,7 +3,6 @@ import os
import platform import platform
import tempfile import tempfile
import typing import typing
from multiprocessing import freeze_support
from multiprocessing.pool import ThreadPool from multiprocessing.pool import ThreadPool
from pathlib import Path from pathlib import Path
from typing import List, Optional from typing import List, Optional
@ -228,7 +227,9 @@ class MainWindow(QtWidgets.QMainWindow):
if not is_version_valid: if not is_version_valid:
self.handle_docker_desktop_version_check(is_version_valid, version) self.handle_docker_desktop_version_check(is_version_valid, version)
except errors.UnsupportedContainerRuntime as e: except errors.UnsupportedContainerRuntime as e:
pass # It's catched later in the flow. pass # It's caught later in the flow.
except errors.NoContainerTechException as e:
pass # It's caught later in the flow.
self.show() self.show()
@ -1236,9 +1237,6 @@ class DocumentsListWidget(QtWidgets.QListWidget):
def start_conversion(self) -> None: def start_conversion(self) -> None:
if not self.thread_pool_initized: if not self.thread_pool_initized:
max_jobs = self.dangerzone.isolation_provider.get_max_parallel_conversions() max_jobs = self.dangerzone.isolation_provider.get_max_parallel_conversions()
# Call freeze_support() to avoid passing unknown options to the subprocess.
# See https://github.com/freedomofpress/dangerzone/issues/873
freeze_support()
self.thread_pool = ThreadPool(max_jobs) self.thread_pool = ThreadPool(max_jobs)
for doc in self.docs_list: for doc in self.docs_list:

View file

@ -56,7 +56,14 @@ class Container(IsolationProvider):
security_args = ["--log-driver", "none"] security_args = ["--log-driver", "none"]
security_args += ["--security-opt", "no-new-privileges"] security_args += ["--security-opt", "no-new-privileges"]
if container_utils.get_runtime_version() >= (4, 1): if container_utils.get_runtime_version() >= (4, 1):
security_args += ["--userns", "nomap"] # We perform a platform check to avoid the following Podman Desktop
# error on Windows:
#
# Error: nomap is only supported in rootless mode
#
# See also: https://github.com/freedomofpress/dangerzone/issues/1127
if platform.system() != "Windows":
security_args += ["--userns", "nomap"]
else: else:
security_args = ["--security-opt=no-new-privileges:true"] security_args = ["--security-opt=no-new-privileges:true"]
@ -67,7 +74,15 @@ class Container(IsolationProvider):
# [1] https://github.com/freedomofpress/dangerzone/issues/846 # [1] https://github.com/freedomofpress/dangerzone/issues/846
# [2] https://github.com/containers/common/blob/d3283f8401eeeb21f3c59a425b5461f069e199a7/pkg/seccomp/seccomp.json # [2] https://github.com/containers/common/blob/d3283f8401eeeb21f3c59a425b5461f069e199a7/pkg/seccomp/seccomp.json
seccomp_json_path = str(get_resource_path("seccomp.gvisor.json")) seccomp_json_path = str(get_resource_path("seccomp.gvisor.json"))
security_args += ["--security-opt", f"seccomp={seccomp_json_path}"] # We perform a platform check to avoid the following Podman Desktop
# error on Windows:
#
# Error: opening seccomp profile failed: open
# C:\[...]\dangerzone\share\seccomp.gvisor.json: no such file or directory
#
# See also: https://github.com/freedomofpress/dangerzone/issues/1127
if runtime.name == "podman" and platform.system() != "Windows":
security_args += ["--security-opt", f"seccomp={seccomp_json_path}"]
security_args += ["--cap-drop", "all"] security_args += ["--cap-drop", "all"]
security_args += ["--cap-add", "SYS_CHROOT"] security_args += ["--cap-add", "SYS_CHROOT"]

View file

@ -52,6 +52,10 @@ class Settings:
self.save() self.save()
return container_runtime return container_runtime
def unset_custom_runtime(self) -> None:
self.settings.pop("container_runtime")
self.save()
def get(self, key: str) -> Any: def get(self, key: str) -> Any:
return self.settings[key] return self.settings[key]

4
debian/changelog vendored
View file

@ -2,13 +2,13 @@ dangerzone (0.9.0) unstable; urgency=low
* Released Dangerzone 0.9.0 * Released Dangerzone 0.9.0
-- Freedom of the Press Foundation <info@freedom.press> Mon, 31 March 2025 15:57:18 +0300 -- Freedom of the Press Foundation <info@freedom.press> Mon, 31 Mar 2025 15:57:18 +0300
dangerzone (0.8.1) unstable; urgency=low dangerzone (0.8.1) unstable; urgency=low
* Released Dangerzone 0.8.1 * Released Dangerzone 0.8.1
-- Freedom of the Press Foundation <info@freedom.press> Tue, 22 December 2024 22:03:28 +0300 -- Freedom of the Press Foundation <info@freedom.press> Tue, 22 Dec 2024 22:03:28 +0300
dangerzone (0.8.0) unstable; urgency=low dangerzone (0.8.0) unstable; urgency=low

View file

@ -331,7 +331,7 @@ Install Poetry using `pipx`:
```sh ```sh
pipx install poetry pipx install poetry
pipx inject poetry poetry-plugin-export pipx inject poetry
``` ```
Clone this repository: Clone this repository:
@ -397,7 +397,7 @@ Install Microsoft Visual C++ 14.0 or greater. Get it with ["Microsoft C++ Build
Install [poetry](https://python-poetry.org/). Open PowerShell, and run: Install [poetry](https://python-poetry.org/). Open PowerShell, and run:
``` ```
python -m pip install poetry poetry-plugin-export python -m pip install poetry
``` ```
Install git from [here](https://git-scm.com/download/win), open a Windows terminal (`cmd.exe`) and clone this repository: Install git from [here](https://git-scm.com/download/win), open a Windows terminal (`cmd.exe`) and clone this repository:
@ -835,8 +835,8 @@ class QAWindows(QABase):
"Install Poetry and the project's dependencies", ref=REF_BUILD, auto=True "Install Poetry and the project's dependencies", ref=REF_BUILD, auto=True
) )
def install_poetry(self): def install_poetry(self):
self.run("python", "-m", "pip", "install", "poetry", "poetry-plugin-export") self.run("python", "-m", "pip", "install", "poetry")
self.run("poetry", "install", "--sync") self.run("poetry", "sync")
@QABase.task("Build Dangerzone container image", ref=REF_BUILD, auto=True) @QABase.task("Build Dangerzone container image", ref=REF_BUILD, auto=True)
def build_image(self): def build_image(self):

View file

@ -42,7 +42,8 @@ doit <task>
## Tips and tricks ## Tips and tricks
* You can run `doit list --all -s` to see the full list of tasks, their * You can run `doit list --all -s` to see the full list of tasks, their
dependencies, and whether they are up to date. dependencies, and whether they are up to date (U) or will run (R). Note that
certain small tasks are always configured to run.
* You can run `doit info <task>` to see which dependencies are missing. * You can run `doit info <task>` to see which dependencies are missing.
* You can pass the following environment variables to the script, in order to * You can pass the following environment variables to the script, in order to
affect some global parameters: affect some global parameters:

53
docs/podman-desktop.md Normal file
View file

@ -0,0 +1,53 @@
# Podman Desktop support
Starting with Dangerzone 0.9.0, it is possible to use Podman Desktop on
Windows and macOS. The support for this container runtime is currently only
experimental. If you try it out and encounter issues, please reach to us, we'll
be glad to help.
With [Podman Desktop](https://podman-desktop.io/) installed on your machine,
here are the required steps to change the dangerzone container runtime.
You will be required to open a terminal and follow these steps:
## On macOS
You will need to configure podman to access the shared Dangerzone resources:
```bash
podman machine stop
podman machine rm
cat > ~/.config/containers/containers.conf <<EOF
[machine]
volumes = ["/Users:/Users", "/private:/private", "/var/folders:/var/folders", "/Applications/Dangerzone.app:/Applications/Dangerzone.app"]
EOF
podman machine init
podman machine set --rootful=false
podman machine start
```
Then, set the container runtime to podman using this command:
```bash
/Applications/Dangerzone.app/Contents/MacOS/dangerzone-cli --set-container-runtime podman
```
In order to get back to the default behaviour (Docker Desktop on macOS), pass
the `default` value instead:
```bash
/Applications/Dangerzone.app/Contents/MacOS/dangerzone-cli --set-container-runtime default
```
## On Windows
To set the container runtime to podman, use this command:
```bash
'C:\Program Files\Dangerzone\dangerzone-cli.exe' --set-container-runtime podman
```
To revert back to the default behavior, pass the `default` value:
```bash
'C:\Program Files\Dangerzone\dangerzone-cli.exe' --set-container-runtime podman
```

View file

@ -8,8 +8,7 @@ from doit.action import CmdAction
ARCH = "arm64" if platform.machine() == "arm64" else "i686" ARCH = "arm64" if platform.machine() == "arm64" else "i686"
VERSION = open("share/version.txt").read().strip() VERSION = open("share/version.txt").read().strip()
FEDORA_VERSIONS = ["40", "41"] FEDORA_VERSIONS = ["40", "41", "42"]
DEBIAN_VERSIONS = ["bullseye", "jammy", "mantic", "noble", "trixie"]
### Global parameters ### Global parameters
@ -44,7 +43,6 @@ def list_language_data():
tessdata_dir = Path("share") / "tessdata" tessdata_dir = Path("share") / "tessdata"
langs = json.loads(open(tessdata_dir.parent / "ocr-languages.json").read()).values() langs = json.loads(open(tessdata_dir.parent / "ocr-languages.json").read()).values()
targets = [tessdata_dir / f"{lang}.traineddata" for lang in langs] targets = [tessdata_dir / f"{lang}.traineddata" for lang in langs]
targets.append(tessdata_dir)
return targets return targets
@ -124,7 +122,7 @@ def build_deb(cwd):
def build_rpm(version, cwd, qubes=False): def build_rpm(version, cwd, qubes=False):
"""Build an .rpm package on the requested Fedora distro.""" """Build an .rpm package on the requested Fedora distro."""
return build_linux_pkg(distro="Fedora", version=version, cwd=cwd, qubes=qubes) return build_linux_pkg(distro="fedora", version=version, cwd=cwd, qubes=qubes)
### Tasks ### Tasks
@ -208,7 +206,7 @@ def task_build_image():
def task_poetry_install(): def task_poetry_install():
"""Setup the Poetry environment""" """Setup the Poetry environment"""
return {"actions": ["poetry install --sync"], "clean": ["poetry env remove --all"]} return {"actions": ["poetry sync"], "clean": ["poetry env remove --all"]}
def task_macos_build_dmg(): def task_macos_build_dmg():

View file

@ -5,7 +5,7 @@ import subprocess
import sys import sys
from pathlib import Path from pathlib import Path
BUILD_CONTEXT = "dangerzone/" BUILD_CONTEXT = "dangerzone"
IMAGE_NAME = "dangerzone.rocks/dangerzone" IMAGE_NAME = "dangerzone.rocks/dangerzone"
if platform.system() in ["Darwin", "Windows"]: if platform.system() in ["Darwin", "Windows"]:
CONTAINER_RUNTIME = "docker" CONTAINER_RUNTIME = "docker"
@ -122,7 +122,8 @@ def main():
subprocess.run( subprocess.run(
[ [
"./dev_scripts/repro-build.py", sys.executable,
str(Path("dev_scripts") / "repro-build.py"),
"build", "build",
"--runtime", "--runtime",
args.runtime, args.runtime,

View file

@ -51,6 +51,8 @@ def main():
if files == expected_files: if files == expected_files:
logger.info("Skipping tessdata download, language data already exists") logger.info("Skipping tessdata download, language data already exists")
return return
elif not files:
logger.info("Tesseract dir is empty, proceeding to download language data")
else: else:
logger.info(f"Found {tessdata_dir} but contents do not match") logger.info(f"Found {tessdata_dir} but contents do not match")
return 1 return 1

View file

@ -193,7 +193,7 @@ def main():
Path="C:\\Program Files (x86)\\Dangerzone", Path="C:\\Program Files (x86)\\Dangerzone",
) )
ET.SubElement(directory_search_el, "FileSearch", Name="dangerzone.exe") ET.SubElement(directory_search_el, "FileSearch", Name="dangerzone.exe")
registry_search_el = ET.SubElement(package_el, "Property", Id="DANGERZONE080FOUND") registry_search_el = ET.SubElement(package_el, "Property", Id="DANGERZONE08FOUND")
ET.SubElement( ET.SubElement(
registry_search_el, registry_search_el,
"RegistrySearch", "RegistrySearch",
@ -202,11 +202,19 @@ def main():
Name="DisplayName", Name="DisplayName",
Type="raw", Type="raw",
) )
ET.SubElement(
registry_search_el,
"RegistrySearch",
Root="HKLM",
Key="SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{8AAC0808-3556-4164-9D15-6EC1FB673AB2}",
Name="DisplayName",
Type="raw",
)
ET.SubElement( ET.SubElement(
package_el, package_el,
"Launch", "Launch",
Condition="NOT OLDDANGERZONEFOUND AND NOT DANGERZONE080FOUND", Condition="NOT OLDDANGERZONEFOUND AND NOT DANGERZONE08FOUND",
Message="A previous version of [ProductName] is already installed. Please uninstall it from Programs and Features before proceeding with the installation.", Message='A previous version of [ProductName] is already installed. Please uninstall it from "Apps & Features" before proceeding with the installation.',
) )
# Add the ProgramMenuFolder StandardDirectory # Add the ProgramMenuFolder StandardDirectory

16
poetry.lock generated
View file

@ -405,33 +405,33 @@ test = ["pytest (>=6)"]
[[package]] [[package]]
name = "h11" name = "h11"
version = "0.14.0" version = "0.16.0"
description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1"
optional = false optional = false
python-versions = ">=3.7" python-versions = ">=3.8"
groups = ["dev"] groups = ["dev"]
markers = "platform_machine == \"x86_64\" or platform_machine == \"i686\" or platform_machine == \"aarch64\" or platform_machine == \"armv7l\" or platform_machine == \"ppc64le\" or platform_machine == \"s390x\" or sys_platform != \"linux\" or platform_machine != \"x86_64\" and platform_machine != \"i686\" and platform_machine != \"aarch64\" and platform_machine != \"armv7l\" and platform_machine != \"ppc64le\" and platform_machine != \"s390x\"" markers = "platform_machine == \"x86_64\" or platform_machine == \"i686\" or platform_machine == \"aarch64\" or platform_machine == \"armv7l\" or platform_machine == \"ppc64le\" or platform_machine == \"s390x\" or sys_platform != \"linux\" or platform_machine != \"x86_64\" and platform_machine != \"i686\" and platform_machine != \"aarch64\" and platform_machine != \"armv7l\" and platform_machine != \"ppc64le\" and platform_machine != \"s390x\""
files = [ files = [
{file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, {file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"},
{file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, {file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"},
] ]
[[package]] [[package]]
name = "httpcore" name = "httpcore"
version = "1.0.7" version = "1.0.9"
description = "A minimal low-level HTTP client." description = "A minimal low-level HTTP client."
optional = false optional = false
python-versions = ">=3.8" python-versions = ">=3.8"
groups = ["dev"] groups = ["dev"]
markers = "platform_machine == \"x86_64\" or platform_machine == \"i686\" or platform_machine == \"aarch64\" or platform_machine == \"armv7l\" or platform_machine == \"ppc64le\" or platform_machine == \"s390x\" or sys_platform != \"linux\" or platform_machine != \"x86_64\" and platform_machine != \"i686\" and platform_machine != \"aarch64\" and platform_machine != \"armv7l\" and platform_machine != \"ppc64le\" and platform_machine != \"s390x\"" markers = "platform_machine == \"x86_64\" or platform_machine == \"i686\" or platform_machine == \"aarch64\" or platform_machine == \"armv7l\" or platform_machine == \"ppc64le\" or platform_machine == \"s390x\" or sys_platform != \"linux\" or platform_machine != \"x86_64\" and platform_machine != \"i686\" and platform_machine != \"aarch64\" and platform_machine != \"armv7l\" and platform_machine != \"ppc64le\" and platform_machine != \"s390x\""
files = [ files = [
{file = "httpcore-1.0.7-py3-none-any.whl", hash = "sha256:a3fff8f43dc260d5bd363d9f9cf1830fa3a458b332856f34282de498ed420edd"}, {file = "httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55"},
{file = "httpcore-1.0.7.tar.gz", hash = "sha256:8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c"}, {file = "httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"},
] ]
[package.dependencies] [package.dependencies]
certifi = "*" certifi = "*"
h11 = ">=0.13,<0.15" h11 = ">=0.16"
[package.extras] [package.extras]
asyncio = ["anyio (>=4.0,<5.0)"] asyncio = ["anyio (>=4.0,<5.0)"]

View file

@ -13,7 +13,7 @@ setup(
description="Dangerzone", description="Dangerzone",
options={ options={
"build_exe": { "build_exe": {
"packages": ["dangerzone", "dangerzone.gui"], "packages": ["dangerzone", "dangerzone.gui", "pymupdf._wxcolors"],
"excludes": ["test", "tkinter"], "excludes": ["test", "tkinter"],
"include_files": [("share", "share"), ("LICENSE", "LICENSE")], "include_files": [("share", "share"), ("LICENSE", "LICENSE")],
"include_msvcr": True, "include_msvcr": True,