Commit graph

1389 commits

Author SHA1 Message Date
Alexis Métaireau
f540a67d06
Update RELEASE.md to upload container.tar.gz for both i686 and arm64 architectures.
Some checks are pending
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 20.04) (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 / 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 20.04) (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 / build-install-rpm (fedora 39) (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 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 39) (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 (ubuntu 20.04) (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
Scan latest app and container / security-scan-container (push) Waiting to run
Scan latest app and container / security-scan-app (push) Waiting to run
2024-10-30 19:11:24 +01:00
Alex Pyrgiotis
68f8338d20
Revert "Disable gVisor's DirectFS feature."
This reverts commit 73b0f8b7d4.
Unfortunately, disabling DirectFS causes a problem in Linux systems that
enable Yama mode 2. Turns out that Tails is such a system, so we have to
revert this change, if we want to support it.

Refs #982
2024-10-30 19:10:26 +01:00
Alex Pyrgiotis
d561878e03
tests: Restore previously mocked function
Restore the `isolation_provider.base.kill_process_group()` function,
which was previously mocked, at the end of the
`test_linger_unkillable()` test. This function is initially mocked, in
order to simulate a hang process. After the mocking completes, the test
needs the original function once more, in order to actually kill the
spawned process.
2024-10-30 16:45:45 +01:00
Alexis Métaireau
59e1666c28
Drop support for Ubuntu Mantic (23.10), which is EOL since 11 Jul 2024. 2024-10-30 16:43:50 +01:00
jkarasti
95d7d8a4d9
Fix: Error with cx_freeze when building the windows executables 2024-10-30 17:41:15 +02:00
jkarasti
ed2791bbbc
Revert: "fix win build failure due to package autodiscovery"
This reverts commit 4d9f729654.

The error described in #178 doesen't happen anymore so this workaround is not needed.
2024-10-30 17:41:15 +02:00
Alexis Métaireau
c1cf16a705
chore: remove unused imports
Some checks are pending
Tests / build-deb (debian trixie) (push) Blocked by required conditions
Tests / build-deb (ubuntu 20.04) (push) Blocked by required conditions
Tests / build-deb (ubuntu 22.04) (push) Blocked by required conditions
Tests / build-deb (ubuntu 23.10) (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 / 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 20.04) (push) Blocked by required conditions
Tests / install-deb (ubuntu 22.04) (push) Blocked by required conditions
Tests / install-deb (ubuntu 23.10) (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 / build-install-rpm (fedora 39) (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 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 39) (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 (ubuntu 20.04) (push) Blocked by required conditions
Tests / run tests (ubuntu 22.04) (push) Blocked by required conditions
Tests / run tests (ubuntu 23.10) (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
Scan latest app and container / security-scan-container (push) Waiting to run
Scan latest app and container / security-scan-app (push) Waiting to run
2024-10-30 01:21:39 +01:00
Alexis Métaireau
281432fcaa
build: pin the PyMuPDF version to 1.24.11
This is the last PyMuPDF version to have support for python 3.8, which
is required for Ubuntu Focal (20.04)
2024-10-30 01:21:39 +01:00
Alexis Métaireau
71cc4b37e5
feat: show a deprecation warning for Ubuntu Focal (20.04) 2024-10-30 01:21:38 +01:00
Alex Pyrgiotis
5ed4a048a0
qubes: Do not close stderr
Some checks are pending
Tests / build-deb (debian trixie) (push) Blocked by required conditions
Tests / build-deb (ubuntu 20.04) (push) Blocked by required conditions
Tests / build-deb (ubuntu 22.04) (push) Blocked by required conditions
Tests / build-deb (ubuntu 23.10) (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 / 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 20.04) (push) Blocked by required conditions
Tests / install-deb (ubuntu 22.04) (push) Blocked by required conditions
Tests / install-deb (ubuntu 23.10) (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 / build-install-rpm (fedora 39) (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 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 39) (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 (ubuntu 20.04) (push) Blocked by required conditions
Tests / run tests (ubuntu 22.04) (push) Blocked by required conditions
Tests / run tests (ubuntu 23.10) (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
Scan latest app and container / security-scan-container (push) Waiting to run
Scan latest app and container / security-scan-app (push) Waiting to run
Do not close stderr as part of the Qubes termination logic, since we
need to read the debug logs. This shouldn't affect typical termination
scenarios, since we expect our disposable qube to be either busy reading
from stdin, or writing to stdout. If this is not the case, then
forcefully killing the `qrexec-client-vm` process should unblock the
qube.
2024-10-22 20:33:29 +03:00
Alex Pyrgiotis
50627d375c
Fix a small typo 2024-10-22 19:07:09 +03:00
Alex Pyrgiotis
8172195f95
tests: Add a doc with multimedia elements
Add a doc that contains an MP4 video in it, which has an audio and video
stream. This type of document could not be converted with the latest
Dangerzone releases, because PyMuPDF threw this error in the container's
stdout:

    MuPDF error: unsupported error: cannot create appearance stream for
    Screen annotations

This error message was treated literally by our client code, which
parsed the first few bytes in order to find out the page height/width.
This resulted to a misleading Dangerzone error, e.g.:

    A page exceeded the maximum height

This issue started occurring since 0.6.0, which added streaming support,
and was fixed by commit 3f86e7b465. That
fix was not accompanied by a test document that would ensure we would
not have this regression from now on, so we add it in this
commit.

Refs #877
Closes #917
2024-10-22 17:31:39 +03:00
Alex Pyrgiotis
f5242078a9
macos: Remove some stale entitlements
Remove some macOS entitlements that are not necessary for the current
iteration of Dangerzone. Those are the ability to run as a hypervisor,
and the ability to accept network connections. They are a relic from
when we were experimenting with VMs, instead of relying on Docker
Desktop.
2024-10-21 19:16:03 +03:00
dependabot[bot]
e68a43bbbf
build(deps): bump actions/stale from 5 to 9
Bumps [actions/stale](https://github.com/actions/stale) from 5 to 9.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v5...v9)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-21 14:19:30 +03:00
dependabot[bot]
10fb631b8e
build(deps): bump actions/setup-python from 4 to 5
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-21 14:16:38 +03:00
Alexis Métaireau
796ca79289
Automate the closing of stale issues 2024-10-17 19:28:07 +02:00
Alexis Métaireau
a95b612e78
Catch installation errors and display them.
Fixes #193
2024-10-17 16:20:56 +02:00
Alex Pyrgiotis
03b3c9eba8
debian: Add Tesseract languages as a dependency 2024-10-17 15:50:12 +03:00
Alex Pyrgiotis
0ea8e71f15
ci: Check OCR in Debian/Fedora tests 2024-10-17 15:50:12 +03:00
Alex Pyrgiotis
4398986970
tests: Improve test for top-level conversion errors 2024-10-17 15:50:12 +03:00
Alex Pyrgiotis
1ca867c295
tests: Remove provider_wait fixtures 2024-10-17 15:50:12 +03:00
Alex Pyrgiotis
6e55e43fef
Make Dummy isolation provider more realistic
Make the Dummy isolation provider follow the rest of the isolation
providers and perform the second part of the conversion on the host. The
first part of the conversion is just a dummy script that reads a file
from stdin and prints pixels to stdout.
2024-10-17 15:50:12 +03:00
Alex Pyrgiotis
703bb0e42a
Remove dead docs 2024-10-17 15:50:12 +03:00
Alex Pyrgiotis
7ea7c8a0cc
Remove dead code 2024-10-17 15:50:12 +03:00
Alex Pyrgiotis
f42bb23229
Update the way we get debug logs
Move the logic for grabbing debug logs to a new place, now that we have
merged the two conversion stages (doc to pixels, pixels to PDF).
2024-10-17 15:50:12 +03:00
Alex Pyrgiotis
e34c36f7bc
Perform on-host pixels to PDF conversion
Extend the base isolation provider to immediately convert each page to
a PDF, and optionally use OCR. In contract with the way we did things
previously, there are no more two separate stages (document to pixels,
pixels to PDF). We now handle each page individually, for two main
reasons:

1. We don't want to buffer pixel data, either on disk or in memory,
   since they take a lot of space, and can potentially leave traces.
2. We can perform these operations in parallel, saving time. This is
   more evident when OCR is not used, where the time to convert a page
   to pixels, and then back to a PDF are comparable.
2024-10-17 15:50:12 +03:00
Alex Pyrgiotis
08f5ef6558
Update .deb/.rpm dependencies
Update .deb/.rpm specs to include PyMuPDF as a required package.
2024-10-17 15:50:11 +03:00
Alex Pyrgiotis
57475b369f
Make PyMuPDF a main Dangerzone dependency
The PyMuPDF package was previously mainly used within the Dangerzone
container, as well as on Qubes. With on-host conversion, PyMuPDF will be
used in all supported platforms by default. For this reason, we can
promote it to a main dependency.
2024-10-17 15:50:11 +03:00
Alex Pyrgiotis
28b7249a6a
Add new way to detect tessdata dir
Add a new way to detect where the Tesseract data are stored in a user's
system. On Linux, the Tesseract data should be installed via the package
manager. On macOS and Windows, they should be bundled with the
Dangerzone application.

There is also the exception of running Dangerzone locally, where even
on Linux, we should get the Tesseract data from the Dangerzone share/
folder.
2024-10-17 15:50:11 +03:00
Alex Pyrgiotis
d1e119452e
Ignore tesseract data when building DEB/RPM packages 2024-10-17 15:50:11 +03:00
Alex Pyrgiotis
477bdfcc2e
ci: Add GitHub action for tessdata 2024-10-17 15:50:11 +03:00
Alex Pyrgiotis
ffcf664a48
Update build instructions 2024-10-17 15:50:10 +03:00
Alex Pyrgiotis
cd8812a85a
Add script for downloading Tesseract data
Add a Python script that can run in all supported platforms, and can
download and extract the Tesseract language data from GitHub, while
also:

1. Checking that the expected hash matches.
2. Informing the user if the language data have already been downloaded.
3. Extracting only the subset of language data that Dangerzone needs
2024-10-17 15:50:10 +03:00
Alex Pyrgiotis
5bba249c87
Provide sanitized version of output filename 2024-10-17 15:33:58 +03:00
Alex Pyrgiotis
bc58b78db7
Better way to collect tests 2024-10-17 15:33:58 +03:00
Alex Pyrgiotis
fba009a7f0
ci: Be explicit about the Debian package we install in end-user envs 2024-10-17 15:33:58 +03:00
Alex Pyrgiotis
dd3ab71065
ci: Explicitly use Ubuntu 24.04 for our runner images
GitHub actions somehow managed to downgrade our runners from Ubuntu
24.04 to Ubuntu 22.04, even though we use `ubuntu-latest`. Make the
Ubuntu 24.04 requirement more explicit, until GitHub migrates fully to
this version for the `ubuntu-latest` tag.

Fixes #957
2024-10-17 14:40:45 +03:00
JKarasti
4abd4720be
Change: Verify the signatures of the signed files with signtool verify 2024-10-16 18:04:47 +03:00
JKarasti
b79113c1c5
Change: Switch to using SHA256 signature algorithm to sign the Dangerzone executables and installer. 2024-10-16 18:04:47 +03:00
dependabot[bot]
941131f7a9
build(deps): bump anchore/scan-action from 4 to 5
Bumps [anchore/scan-action](https://github.com/anchore/scan-action) from 4 to 5.
- [Release notes](https://github.com/anchore/scan-action/releases)
- [Changelog](https://github.com/anchore/scan-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/anchore/scan-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: anchore/scan-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-16 17:52:33 +03:00
Alex Pyrgiotis
b6bb9a1216
ci: Make repo checking work for unreleased Fedora versions
Unreleased Fedora versions may refer to themselves as "rawhide", instead
of their version (e.g., "41"). For this reason, we should try and
replace the "rawhide" string with the proper Fedora version.
2024-10-16 17:37:40 +03:00
Alex Pyrgiotis
eaef95b774
Call 'dnf config-manager' via the dnf-3 interface
Fedora 41 has a newer dnf interface (dnf v5), and the config-manager
plugin that we use is not compatible with it. Suggest running it with
`dnf-3` instead, which is present in all Fedora versions.
2024-10-16 15:58:44 +03:00
Alex Pyrgiotis
13f5658947
Improve instructions for Fedora 41
Update our changelog and release instructions, and add a note for
Fedora 41 users in our build instructions to install Python 3.12.

Fixes #947
2024-10-15 19:43:28 +03:00
Alex Pyrgiotis
d832881452
Build RPM package for Python 3.13.
Add a hacky line in pyproject.toml that bumps the Python requirement to
3.14, so that we can build a Dangerzone RPM.
2024-10-15 19:43:14 +03:00
Alex Pyrgiotis
f3fbc33fcd
dev_scripts: Allow building a Fedora 41 dev env
Use Python 3.12 in Fedora 41 dev environments, since Python 3.13
(default in Fedora 41) does not work with PySide6 from PyPI yet.
2024-10-15 19:43:14 +03:00
Alex Pyrgiotis
5a97182979
ci: Add Fedora 41 CI jobs 2024-10-15 19:43:14 +03:00
Alexis Métaireau
49c3c2c6bb
Add support for 24.10 (oracular)
Refs #947
2024-10-15 19:41:49 +03:00
Alex Pyrgiotis
8ad95981ea
dev_scripts: Add user fix for Ubuntu 24.10
It seems that the container image for Ubuntu 24.10 also ships with a
default Ubuntu user with UID 1000, so we need to remove it when creating
our dev environment.
2024-10-15 19:41:49 +03:00
Alex Pyrgiotis
8f5ae9d6ad
dev_scripts: Make user networking work in an Ubuntu 24.10 dev environment
Try installing `passt`, which is responsible for user networking in
later Podman releases. If not installed, building the container image
within an Ubuntu 24.10 environment fails with:

    setup network: could not find pasta, the network namespace can't be
    configured: exec: "pasta": executable file not found in $PATH

Note that this package is not available in older Ubuntu versions. In
these cases, we should swallow installation failures and continue.
2024-10-15 15:47:58 +03:00
Alex Pyrgiotis
1eff14539f
debian: Vendor PyMuPDf when building Debian package
Install PyMuPDF under ./dangerzone/vendor, right before we build the
.deb package. We vendor PyMuPDF just for Debian, since the provided
versions don't have OCR support enabled.

Currently, we don't use PyMuPDf on the host, but this will change once
we fully implement the on-host conversion feature.

Refs #625
2024-10-15 14:58:06 +03:00