Commit graph

83 commits

Author SHA1 Message Date
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
d768099912
Grab just the image ID
When building the image, grab the image id using `-q`, which removes all
the decorations in the output and just keeps the image ID.
2023-03-09 19:04:59 +02: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
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
Maeve Andrews
c26326450b
Add a --distro option to build-deb.py
Add an optional --distro argument to build-deb.py, to specify the Debian
version in the package name, which currently is "1". This option may
prove useful when publishing packages to freedomofpress/apt-tools-prod,
where packages from different distros with the same names but different
contents are not accepted.
2023-02-14 15:49:51 +02:00
Alex Pyrgiotis
4eead90c00
install: Fail early when image build fails 2023-01-16 18:48:09 +02: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
Alex Pyrgiotis
a0503c8c40
install: Do not create Debian source package twice 2023-01-16 18:48:08 +02:00
Alex Pyrgiotis
1daaafe2a3
install: Introduce a script for installing Podman
Introduce a script for installing Podman in Ubuntu Focal, in
environments that may, or may not, have sudo installed.

Also, update our CircleCI configuration to use this script when
installing Podman.
2022-11-10 16:35:48 +02:00
deeplow
4d8e4c53e3
sort imports with isort linter 2022-08-22 10:15:26 +01:00
Guthrie McAfee Armstrong
395eba0a74
Remove requests dependency 2022-08-19 15:16:14 +01: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
b3b52c3963
Rename build scripts 2021-11-23 15:47:25 -08:00
Micah Lee
9acfd2764e
Make the new code work in linux 2021-11-22 18:51:47 -05:00
Micah Lee
588206a9e8
Start implementing built-in container in Linux, without a VM 2021-08-04 14:42:46 -07:00
Micah Lee
d24d593094
Rip out everything required to make dangerzone-container run with root privs 2021-06-17 14:16:27 -07:00
Micah Lee
d50b0c1bed
Remove docker dependency in Linux and replace with podman 2021-06-17 14:12:44 -07:00
Micah Lee
a437906d1d
Version bump to 0.2, update changelog, and fix all linux builds 2021-06-16 11:16:38 -07:00
Micah Lee
46c73329a5
Switch from termcolor to colorama 2021-06-10 10:24:28 -07:00
Micah Lee
76c74df71a
Fix CircleCI and test in Fedora 2020-10-29 17:01:47 -07:00
Micah Lee
71fff406d2
Add python3-termcolor dependency 2020-10-14 09:45:20 -07:00
Micah Lee
f7532ecacc
Update fedora build script 2020-03-17 11:43:14 -07:00
Micah Lee
d62995366f
Allow fedora to use either docker or docker-ce 2020-03-16 17:02:07 -07:00
Micah Lee
cf367adcfa
This creates a separate script dangerzone-container which is a wrapper for running the container. This lets us run dangerzone as unprivileged, but dangerzone-container as privileged, to avoid adding the user to the dangerzone group. 2020-03-13 16:49:53 -07:00
Gaurav Sitlani
bacc2d714e
Added podman dependency for Fedora (#42) 2020-03-12 14:50:21 -07:00
Micah Lee
8845ac6440
Allow opening docm files 2020-03-03 19:23:46 +05:30
Micah Lee
7113ac3c02
Add missing deps: dh-python for debian, python3-pyxdg for fedora, and python3-requests for both 2020-02-24 15:58:03 -08:00
Micah Lee
45f78637af
Add build script and instructions for fedora 2020-02-21 16:04:11 -08:00
Micah Lee
5c99796496
Make linux version open all MIME types 2020-01-13 14:41:01 -08:00
Micah Lee
e4e5f71419
Make passing in the filename an argument instead of an option, so desktop file will work properly 2020-01-07 17:20:14 -08:00
Micah Lee
e85191b498
Debian packaging 2020-01-07 17:10:54 -08:00