Commit graph

56 commits

Author SHA1 Message Date
deeplow
f27296cd45
Replace MIT license with AGPLv3
License change required due to the inclusion of the AGPL-licensed
PyMuPDF. This library greatly benefited Dangerzone in many aspects
detailed in [1].

Fixes #658

[1]: https://github.com/freedomofpress/dangerzone/issues/658
2024-01-04 09:57:49 +00:00
deeplow
250d8356cd
Hash-verify container pip install & merge build-image
Ensure that when the container image is installing pymupdf (unavailable
in the repos) with verified hashes. To do so, it has the pymupdf
dependency declared in a "container" group in `pyproject.toml`, which
then gets exported into a requirements.txt, which is then used for
hash-verification when building the container.

Because this required modifying the container image build scripts, they
were all merged to avoid duplicate code. This was an overdue change
anyways.
2024-01-03 12:58:35 +00:00
deeplow
8d05bcc10f
Update windows certificate in build-app.bat 2023-08-21 13:04:14 +01:00
Alex Pyrgiotis
03df60db5f
Always pull base image when building ours
Always pull the base container image (alpine:latest) before building our
own container image. Else, in an environments that we haven't touched
for a while, an older image may be used.
2023-08-02 13:47:59 +03:00
deeplow
206c262554
Bump python version on Windows to 3.11
Python 3.10.12 fixes some CVEs for which Dangerzone does not appear to be
affected, however its binaries are not made available by the python
foundation. Moving to 3.11 should be trivial since this was already
deployed in Fedora 37+.
2023-07-06 14:32:31 +01:00
deeplow
814d533c3b
Restructure container code
The files in `container/` no longer make sense to have that name since
the "document to pixels" part will run in Qubes OS in its own virtual
machine.

To adapt to this, this PR does the following:
- Moves all the files in `container` to `dangerzone/conversion`
- Splits the old `container/dangerzone.py` into its two components
  `dangerzone/conversion/{doc_to_pixels,pixels_to_pdf}.py` with a
  `common.py` file for shared functions
- Moves the Dockerfile to the project root and adapts it to the new
  container code location
- Updates the CircleCI config to properly cache Docker images.
- Updates our install scripts to properly build Docker images.
- Adds the new conversion module to the container image, so that it can
  be imported as a package.
- Adapts the container isolation provider to use the new way of calling
  the code.

NOTE: We have made zero changes to the conversion code in this commit,
except for necessary imports in order to factor out some common parts.
Any changes necessary for Qubes integration follow in the subsequent
commits.
2023-06-21 11:44:47 +03:00
Alex Pyrgiotis
7fe01d6470
install/windows: Remove -rc identifiers from version
Remove any -rc identifiers (e.g., 0.4.1-rc3) from the Dangerzone
version, if it includes them. If we don't remove them, then building
the MSI for Windows will fail as follows:

    error CNDL0108: The Product/@Version attribute's value, '0.4.1-rc3',
    is not a valid version. Legal version values should look like
    'x.x.x.x' where x is an integer from 0 to 65534.
2023-04-03 19:35:19 +03:00
Alex Pyrgiotis
a33dcfbb51
Replace First Look Media references
Update several references to First Look Media in the code, to better
reflect the current status, where Freedom of the Press Foundation has
taken over the stewardship of the project.

Fixes #343
2023-03-08 18:40:55 +02:00
Alex Pyrgiotis
4668443be6
install: Use the full image tag
Use the full image tag (dangerzone.rocks/dangerzone:latest) when
building the image. Else, we risk creating a `share/image-id.txt` file
with multiple IDs in it, if we have another
`dangerzone.rocks/dangerzone` image (with a different tag) in our dev
environment.
2023-03-08 17:40:26 +02:00
deeplow
fb85421db8
Fix Windows build for PySide6 (illegal file names)
Building the `.msi` on Windows was failing in the `candle.exe` step due
to some files in the PySide6 library being too long (PySide6/examples)
or having illegal character (`+`) in their file names
(PySide6/qml/QtQuick).

Skipping copying these files to the `.msi` fixes the issue. Skipping
`examples/` should be of no impact since they're just examples and
skipping `qml/QtQuick` shouldn't cause issues because we don't use QML.

Reverts commit `bbbf822` and adapts it from PySide2 to PySide6.
2023-02-23 09:12:02 +00:00
deeplow
9b3d98b20b
Build arm64 docker image for arm-based Macs
Remove --patform args completely so that by default we build natively
on each platform.

Partial fix for #50
2023-02-16 10:59:00 +00:00
deeplow
bbbf8224f1
install: Remove PySide2-related code for Windows 2023-01-30 11:42:24 +00:00
Alex Pyrgiotis
624d480cca
install: Do not create intermediate tarfile for container
Skip the creation of the `share/container.tar` file, since it's not used
anywhere. Instead, pipe our `docker/podman save` invocations to `gzip`
directly, which will compress the tarfile on the fly. This saves both
time and disk space.
2023-01-16 18:48:08 +02:00
deeplow
5761255b56
Fix Python version in Windows build scripts
Windows python build scripts were still referencing the old python 3.9
version, whereas 3.10 is the currently used one in the dev environment.
2022-12-01 14:58:29 +00:00
Micah Lee
6713cce503
Updates to the macOS and Windows build scripts and documentation 2022-08-26 14:06:06 -07:00
deeplow
4d8e4c53e3
sort imports with isort linter 2022-08-22 10:15:26 +01:00
Micah Lee
0cf514eba7
Fix version path 2021-12-13 15:32:35 -08:00
Micah Lee
a710178d75
Add package scripts for windows 2021-12-13 15:25:41 -08:00
Micah Lee
bc8b9d62b4
Switch Windows package from pyinstaller to cx_freeze 2021-12-13 15:23:45 -08:00
Micah Lee
42f8fb9e2f
Rename the container in CircleCI 2021-11-29 16:04:20 -08:00
Micah Lee
433639d51f
Explicitly build linux/amd64 container 2021-11-29 15:51:18 -08:00
Micah Lee
2de2b6dca5
Rename dangerzone-converter to container 2021-11-29 15:30:21 -08:00
Micah Lee
387a742487
Delete the .tar after compressing in Windows, and fix Windows installer 2021-11-24 16:38:15 -08:00
Micah Lee
65a66b78cd
Remove indent line, this function is deprecated 2021-11-24 12:36:18 -08:00
Micah Lee
61839f5b24
Change multistep windows build into one step 2021-11-24 12:21:38 -08:00
Micah Lee
4572922042
Update Windows code signing 2021-11-24 11:42:02 -08:00
Micah Lee
7441796fbe
Support Windows 2021-11-23 15:39:23 -08:00
Micah Lee
a54e19fe11
Get WaitingWidget to properly check for and install the image 2021-11-22 14:37:53 -08:00
Micah Lee
27a7f86641 Change how the VM initializes, to work in virtualbox 2021-08-17 13:44:52 -07:00
Micah Lee
46681bc771 Start making Windows VM work with virtualbox 2021-08-09 14:05:07 -07:00
Micah Lee
173f31ff41 Start porting VM to Windows 2021-08-09 12:04:17 -07:00
Micah Lee
e8a348419f
Must remove InstallExecuteSequence for Wix package to build 2021-06-22 12:03:29 -07:00
Micah Lee
c6c011f235
Change Wix config to allow upgrades 2021-06-22 11:51:35 -07:00
Micah Lee
ebd3a841dc
Fix finding version when building Windows installer 2021-06-16 15:17:11 -07:00
Micah Lee
26ea568080
Don't put the start menu shortcut in a folder 2020-10-29 11:10:48 -07:00
Micah Lee
87be2bbc7d
Fix detecting if dangerzone or dangerzone-container is running in Windows, update docker.exe path, fix Windows build scripts to include to docker-container.exe symlink 2020-10-29 10:43:23 -07:00
Micah Lee
1116c9a029
Make Windows docker link clickable, and make Windows installer add a start menu shortcut 2020-10-28 16:48:16 -07:00
Micah Lee
10dfc1441b
Build the Wix wxs file on the fly 2020-10-28 12:13:09 -07:00
Micah Lee
e798da9a99
Version bump to 0.1.2 and update changelog 2020-04-09 16:23:15 -07:00
Micah Lee
2674f1457a
Version bump to 0.1.1 2020-03-17 11:11:47 -07:00
Micah Lee
4eba0087e7
Version bump to 0.1.1.dev1 2020-03-16 17:07:43 -07:00
Micah Lee
4d6de4f077
Create dangerzone-container.exe symlink in Windows when creating the binary and installer 2020-03-16 16:14:49 -07:00
Micah Lee
271ac9641b
Version bump to 0.1 2020-02-28 17:38:49 -08:00
Micah Lee
bb68430db5
Remove more references to container 2020-02-27 16:06:41 -08:00
Micah Lee
2f77159e3f
Version bump to 0.0.3 2020-02-27 15:45:02 -08:00
Micah Lee
e7f5ce0c38
Remove git submodule, and all references to the container 2020-02-27 15:21:30 -08:00
Micah Lee
2503fde829
Update release docs, fix bug in windows build script 2020-02-27 14:56:32 -08:00
Micah Lee
fc2fcf6bd3
Version bump to 0.0.2 2020-02-27 09:56:03 -08:00
Micah Lee
2f9d368beb
Add code signing to windows release 2020-02-24 16:51:59 -08:00
Micah Lee
75f4f828a2
Change version in Windows installer to 0.0.1 as well 2020-02-24 16:44:55 -08:00