Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
d20152c
podman: Vendor PodmanCommand from podman-py repo
apyrgio Aug 5, 2025
9af1d21
podman: Comment out an import of podman-py
apyrgio Aug 5, 2025
e86a261
Vendor Podman-related assets
apyrgio Aug 5, 2025
a530368
dev_scripts: Use pathlib for our path insertion trick
apyrgio Sep 25, 2025
7298fe1
podman: Create DZ-aware module for Podman machines
apyrgio Aug 5, 2025
8aa82fc
podman: Add CLI command to manage Podman machines
apyrgio Aug 5, 2025
5ad2a82
Add logic for initializing a PodmanCommand instance
apyrgio Aug 5, 2025
f555f66
cli: Add --debug option in Settings
apyrgio Aug 5, 2025
ef52573
Silence some Pytest warnings
apyrgio Aug 5, 2025
12e5486
tests: Always isolate settings
apyrgio Aug 5, 2025
559e4c1
Add startup tasks
apyrgio Aug 5, 2025
512959a
Wrap startup tasks with signals
apyrgio Aug 5, 2025
635ae04
gui: Factor out traceback widget
apyrgio Aug 5, 2025
ed498b7
gui: Add window with background logs
apyrgio Aug 5, 2025
71f8946
gui: Add a status bar to the Dangerzone GUI
apyrgio Aug 5, 2025
2740bd7
Replace `Runtime` with `PodmanCommand`
apyrgio Aug 5, 2025
8c070d1
cli: Run startup tasks in the Dangerzone CLI
apyrgio Aug 5, 2025
fdaeab8
gui: Run startup tasks in background thread
apyrgio Aug 5, 2025
d027e90
ci: Add end-to-end tests for macOS and Windows
apyrgio Aug 5, 2025
277ae73
podman: Add note about replacing this module
apyrgio Aug 6, 2025
bf690c9
gui: Rename ContentWidget to ConversionWidget
apyrgio Aug 7, 2025
c9f4169
Move MyPy flags to pyproject.toml
apyrgio Aug 29, 2025
532485d
Various MyPy fixes
apyrgio Sep 26, 2025
e757820
Update our changelog
apyrgio Aug 29, 2025
dfcad54
debian: Depend on python3-pyside6.qtsvgwidgets
apyrgio Sep 26, 2025
04de234
Add user-friendly error in case of missing Podman
apyrgio Sep 4, 2025
9adf5f3
Improve colors for dark mode
apyrgio Sep 9, 2025
e4ce223
Add a design system for Dangerzone
apyrgio Sep 9, 2025
34bcb74
Remove unused import
apyrgio Sep 9, 2025
915f6f2
Start a Podman machine for dangerzone-image commands that require it
apyrgio Sep 9, 2025
aa6b5fc
Fix font size issue in Settings widget
apyrgio Sep 9, 2025
364ea71
gui: Add checkbox to Alert dialog
apyrgio Sep 18, 2025
98ed11f
Stop other running Podman machines
apyrgio Sep 18, 2025
155731a
gui: Add "View Logs" menu entry
apyrgio Sep 10, 2025
b1cf63f
Parameterize the Podman machine
apyrgio Sep 11, 2025
4d47a56
Include dangerzone-image and dangerzone-cli in packages
apyrgio Sep 11, 2025
c8d6207
Show the conversion widget only if a conversion has succeeded
apyrgio Sep 17, 2025
88dcbc4
Increase the application height on macOS
apyrgio Sep 22, 2025
ec5ef9c
Add a series of tasks for shutting down Dangerzone
apyrgio Sep 26, 2025
be6fb74
Speed up container startup times on Wndows/macOS
apyrgio Sep 22, 2025
2310e9a
ci: Force enconding to UTF-8 for Windows tests
apyrgio Sep 26, 2025
fee60fd
Feat: Capture commands output in the logs
almet Sep 17, 2025
c34e710
Pass `--offline` to `cosign verify-blob`
almet Sep 24, 2025
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
75 changes: 66 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,28 @@ jobs:
registry_token: ${{ secrets.GITHUB_TOKEN }}

windows:
runs-on: windows-latest
needs:
- build-container-image
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: windows-2022
- runner: windows-2025
env:
DUMMY_CONVERSION: 1
# NOTE: We have to set the encoding for this run to UTF-8, else we get an
# enoding error when Dangerzone attempts to display its banner, since the
# default seems to be CP-1252:
#
# File "D:\a\dangerzone\dangerzone\dangerzone\cli.py", line 225, in display_banner
# print(Back.BLACK + Fore.YELLOW + Style.DIM + "\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e")
# ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# File "C:\hostedtoolcache\windows\Python\3.13.7\x64\Lib\encodings\cp1252.py", line 19, in encode
# return codecs.charmap_encode(input,self.errors,encoding_table)[0]
# ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# UnicodeEncodeError: 'charmap' codec can't encode characters in position 14-41: character maps to <undefined>
PYTHONIOENCODING: UTF-8
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v5
Expand All @@ -75,12 +94,25 @@ jobs:
path: |
share/tessdata/
share/vendor/
share/machine.tar
key: v1-mazette-windows-${{ hashFiles('./mazette.lock') }}
- name: Install mazette assets
if: steps.cache-mazette.outputs.cache-hit != 'true'
run: poetry run mazette install
- name: Check cosign is present
run: ls share/vendor
- name: Restore container image
uses: actions/cache/restore@v4
with:
path: |-
share/container.tar
share/freedomofpress-dangerzone.pub
share/image-name.txt
enableCrossOsArchive: true
fail-on-cache-miss: true
key: v6-container-${{ needs.build-container-image.outputs.image_uri }}
- name: Smoke test
run: poetry run .\dev_scripts\dangerzone-cli.bat .\tests\test_docs\sample-pdf.pdf --ocr-lang eng --debug
- name: Run CLI tests
run: poetry run make test
- name: Set up .NET CLI environment
Expand All @@ -95,6 +127,7 @@ jobs:
# NOTE: This also builds the .exe internally.
run: poetry run .\install\windows\build-app.bat
- name: Upload MSI installer
if: matrix.runner == 'windows-2025'
uses: actions/upload-artifact@v4
with:
name: Dangerzone.msi
Expand All @@ -104,16 +137,18 @@ jobs:

macOS:
name: "macOS (${{ matrix.arch }})"
needs:
- build-container-image
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: macos-latest # CPU type: Apple Silicon (M1)
arch: arch64
# See https://github.com/abiosoft/colima/issues/970
- runner: macos-15
arch: arm64
- runner: macos-13 # CPU type: Intel x86_64
arch: x86_64
env:
DUMMY_CONVERSION: 1
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v5
Expand All @@ -128,12 +163,34 @@ jobs:
path: |
share/tessdata/
share/vendor/
share/machine.tar
key: v1-mazette-darwin-${{ matrix.arch }}-${{ hashFiles('./mazette.lock') }}
- name: Install mazette assets
if: steps.cache-mazette.outputs.cache-hit != 'true'
run: poetry run mazette install
- name: Check cosign is present
run: ls share/vendor
- name: Restore container image
uses: actions/cache/restore@v4
with:
path: |-
share/container.tar
share/freedomofpress-dangerzone.pub
share/image-name.txt
enableCrossOsArchive: true
fail-on-cache-miss: true
key: v6-container-${{ needs.build-container-image.outputs.image_uri }}
- name: Smoke test
# Nested virtualization does not work on M1 CPUs.
continue-on-error: ${{ matrix.arch == 'arm64'}}
run: poetry run ./dev_scripts/dangerzone-cli ./tests/test_docs/sample-pdf.pdf --ocr-lang eng --debug
- name: Run CLI tests
run: poetry run make test
run: |
# Nested virtualization does not work on M1 CPUs.
if [ ${{ matrix.arch }} == 'arm64' ]; then
export DUMMY_CONVERSION=1
fi
poetry run make test
- name: Build macOS app
run: poetry run python ./install/macos/build-app.py
- name: Upload macOS app
Expand Down Expand Up @@ -271,7 +328,7 @@ jobs:
run: |
./dev_scripts/env.py --distro ${{ matrix.distro }} \
--version ${{ matrix.version }} \
run dangerzone-cli dangerzone/tests/test_docs/sample-pdf.pdf --ocr-lang eng
run dangerzone-cli dangerzone/tests/test_docs/sample-pdf.pdf --ocr-lang eng --debug

- name: Check that the Dangerzone GUI imports work
run: |
Expand Down Expand Up @@ -365,7 +422,7 @@ jobs:
- name: Run a test command
run: |
./dev_scripts/env.py --distro ${{ matrix.distro }} --version ${{ matrix.version }} \
run dangerzone-cli dangerzone/tests/test_docs/sample-pdf.pdf --ocr-lang eng
run dangerzone-cli dangerzone/tests/test_docs/sample-pdf.pdf --ocr-lang eng --debug

- name: Check that the Dangerzone GUI imports work
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pip-wheel-metadata/
share/python-wheels/
share/tessdata/
share/vendor/
share/machine.tar
*.egg-info/
.installed.cfg
*.egg
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ since 0.4.1, and this project adheres to [Semantic Versioning](https://semver.or
- Sign the sandbox/container images and automatically upgrade them to their latest version
([#1006](https://github.com/freedomofpress/dangerzone/issues/1006)).
Read more about this feature [in our docs](https://github.com/freedomofpress/dangerzone/blob/main/docs/independent-container-updates.md).
- Make Dangerzone use an embedded version of Podman under the hood
([#1145](https://github.com/freedomofpress/dangerzone/issues/1145))
- Bundle Podman images for Windows and macOS alongside our application
([#1170](https://github.com/freedomofpress/dangerzone/issues/1170))
- Introduce a new CLI helper called `dangerzone-machine` to manage the Podman
machine the Dangerzone uses under the hood
([#1172](https://github.com/freedomofpress/dangerzone/issues/1172))
- Capture all the command outputs in the logs ([#1236](https://github.com/freedomofpress/dangerzone/issues/1172))

### Removed

- Docker Desktop is no longer required to run Dangerzone. In fact, they are no
longer compatible, due to some changes in the bundled container image.
Instead, Podman Desktop is used under the hood
([#118](https://github.com/freedomofpress/dangerzone/issues/118))

### Fixed

Expand All @@ -30,6 +45,8 @@ since 0.4.1, and this project adheres to [Semantic Versioning](https://semver.or
- Improve our release instructions by splitting the large `RELEASE.md` file
into distinct docs, whose instructions can be executed sequentially
([#1212](https://github.com/freedomofpress/dangerzone/pull/1212))
- Run our full CI test suite on Windows and macOS GitHub runners
([#1009](https://github.com/freedomofpress/dangerzone/issues/1009))

### Removed

Expand Down
10 changes: 1 addition & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
LARGE_TEST_REPO_DIR:=tests/test_docs_large
GIT_DESC=$$(git describe)
JUNIT_FLAGS := --capture=sys -o junit_logging=all
MYPY_ARGS := --ignore-missing-imports \
--disallow-incomplete-defs \
--disallow-untyped-defs \
--show-error-codes \
--warn-unreachable \
--warn-unused-ignores \
--exclude $(LARGE_TEST_REPO_DIR)/*.py

.PHONY: lint
lint: ## Check the code for linting, formatting, and typing issues with ruff and mypy
ruff check
ruff format --check
mypy $(MYPY_ARGS) dangerzone
mypy $(MYPY_ARGS) tests
mypy dangerzone tests

.PHONY: fix
fix: ## apply all the suggestions from ruff
Expand Down
Loading
Loading