Commit graph

105 commits

Author SHA1 Message Date
Alexis Métaireau
c01515b775
Bump the minimum python version to 3.9
The minimum python version when installing from source is now python
3.9, as Pyside6 6.7.1 dropped support for python 3.8 (see #780 for more
information).

On Debian-derivatives distributions, the minimum Python version is now
set to 3.8. In practice, because Pyside6 is not packaged for Debian, we
use Pyside2 [0], which is why we can relax the python version requirement.

In practice, when installing from source on an environment where
python3.9 is not the default python, poetry will look for it and use it
if available

> For various reasons, this Python version might not be compatible with
> the python range supported by the project. In this case, Poetry will
> try to find one that is and use it.
>
> [Poetry docs](https://python-poetry.org/docs/managing-environments/)

On Ubuntu Focal (20.04) where Python 3.9 is not installed by default,
it is possible to install it using the `python3.9` package.

Additionally, In version 1.24.3, PyMuPDF changed its package name from `fitz`
to `pymupdf` [2], resulting in a breakage on how it is installed in our
container. This is now fixed.

[0] More information on how Pyside6 packaging affects dangerzone on #221
[1] See [the current status of Pyside6 packaging](https://repology.org/
project/python:pyside6/packages)
[2] PyMuPDF changelog: https://pymupdf.readthedocs.io/en/latest/changes.html#change-log
2024-06-04 19:57:40 +02:00
Alex Pyrgiotis
8c59589be1
Inform users about Pyside6 and conmon packages
Inform users that for specific distros and versions, we install some
extra packages (PySide6, conmon), in order to fix some incompatibilities
between Dangerzone and the base system. Provide also a link to the
source / build instructions for the package, as well as any relevant
issues.

Fixes #767
2024-05-09 17:36:04 +03:00
Naglis Jonaitis
b284a55dc6
Fix typos 2024-03-28 13:23:36 +02:00
Alex Pyrgiotis
29d6854eca
Minor Wix-related fixes
Fix an outdated instruction for installing WiX, and point to the correct
executable for Windows, which was rebuilt for the new WiX version.
2024-03-23 15:06:21 +02:00
Alex Pyrgiotis
2703448d60
Update Jammy build instructions regarding conmon
Update the build instructions for Ubuntu Jammy regarding conmon, now
that oldstable-proposed-updates no longer offers a patched conmon
package. Propose instead to install conmon from our apt-tools-prod repo.
2024-02-13 12:33:57 +02:00
Alex Pyrgiotis
d1afe4c30a
Fix Podman crashes due to old conmon version
Switching from mounting files to writing to stdout has introduced some
Podman crashes in specific environments (Ubuntu Jammy / Debian Bullseye)
due to a conmon bug that affects version 2.0.25.

Fixing it for various permutations of the environments we support
requires the following:

1. CI tests: Install conmon from the oldstable-proposed-updates in
   our Debian Bullseye / Ubuntu Jammy dev/end-user environments.
2. Developers: Add a line in BUILD.md that suggests users to install
   conmon from the oldstable-proposed-updates repo, or some other repo
   they prefer.
3. End-user installations: We will build conmon for Ubuntu Jammy, and
   wait until the proposed updates repo gets merged in Debian Bullseye.

Fixes #685
2024-02-07 12:53:15 +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
a3a64882a3
Add PyMuPDF to dev env in Qubes
Since PyMuPDF is now used in Pixels to PDF we needed to add it to the
qubes development environment.
2024-01-03 12:58:32 +00:00
deeplow
e923ac0788
Remove whitespace
Remove whitespace accidentally added in [1].

[1]: commit d6c162ea080f0df27f3109bf4aab84788704272c
2024-01-03 10:52:47 +00:00
deeplow
555cd33eb6
Simplify Qubes install instructions
Many instructions relied on the fact that the developer would have to
copy over the RPC policies and install the dependencies manually on the
template. This is no longer needed since a Qubes-built package ships
the necessary RPC policies and dependencies.

Removing the dependencies installation also helps with documentation
maintenance since it would be yet another place where we would need to
keep the dependency list up to date.
2024-01-03 10:52:47 +00:00
deeplow
5849800606
Improve "Developing Dangerzone" docs section
Make it clearer that we are talking about the two main
development-workflow differences when developing on Qubes.
2024-01-03 10:52:46 +00:00
deeplow
d1eb4ec76c
Remove duplicate "cd dangerzone" instruction 2024-01-03 10:52:46 +00:00
deeplow
3f6437cf66
Remove poetry install part from Qubes instructions
Make the first part of the Dangerzone development just to install the
Qubes RPC policies. Poetry install and other development related tasks
should be pointed to in the Fedora part of the instructions to avoid
duplication.
2024-01-03 10:52:46 +00:00
deeplow
6597b57452
Apply 2023-10-25 advisory in BUILD instructions
On the security advisory done in 2023-10-25 we updated the instructions
in INSTALL.md, but missed the ones in BUILD.md, leaving developers with
a network path. This is not too critical since it's development but it
should be fixed in any case.

[1]: https://github.com/freedomofpress/dangerzone/blob/5acb968/docs/advisories/2023-10-25.md
2024-01-03 10:52:46 +00:00
deeplow
0ae7f89dea
Add note that Qubes instr. are on dom0 terminal
It was not entirely clear that what we showed should be run in a
terminal.
2024-01-03 10:52:46 +00:00
deeplow
5121b4f702
Qubes: clarify instructions for skipping step 1
Make it clearer that step 1 should be skipped entirely when the user
wants to install it on their default template.
2024-01-03 10:52:46 +00:00
deeplow
cac06caf82
Correct Qubes Instructions: dz-dvm is not disposable
The qube dz-dvm is not a disposable qube but rather a disposable
template qube (aka. app qube).
2024-01-03 10:52:46 +00:00
Erik Moeller
822f5bcd4c
Minor tweaks to Qubes build docs
- `keyring` command will only work if `python3-keyring` is installed
- fix `cp` command (`qubes` directory not included in prior command)
2023-10-17 11:45:02 +03:00
deeplow
18898992f1
BUILD.md: Add instructions to clone the git repo 2023-10-13 07:47:27 +01:00
Alex Pyrgiotis
b11920a3af
Add a note in build instructions for dev environments 2023-10-11 15:54:10 +01:00
Alex Pyrgiotis
c94c8c8ba5
Add installation instructions for Qubes
Add instructions for installing Dangerzone on Qubes from our official
repos. These instructions are adapted from the build instructions, but
have been greatly simplified because we don't need some of the qubes
that the development environment needs.

Closes #431
2023-09-25 12:51:40 +03:00
Alex Pyrgiotis
f5abe0abd0
Update RPM dependencies
Update the dependencies required to build RPM packages. More
specifically, remove the older python3-setuptools dependency, and depend
instead on python3-devel and python3-poetry-core.

Note that this commit may break our CI, but it will be resolved in
subsequent commits.
2023-09-20 16:48:53 +03:00
deeplow
ed298ec5b0
BUILD.md fix typo: dz-dvm is not a template 2023-08-29 19:29:43 +01:00
deeplow
ab3293ff70
BUILD.md replace deprecated cmd qvm-copy-to-vm
qvm-copy-to-vm since a long time doesn't respect the qube name
provided. Instead it is enforced by the dom0 policy prompt. This is
probably a leftover from a command ran in dom0, where this command
actually works.
2023-08-29 19:29:41 +01:00
deeplow
688bfe056b
BUILD.md: cd into dangerzone/ after cloning 2023-08-29 19:29:31 +01:00
deeplow
831c3250c2
Add overview table of qubes 2023-08-29 19:20:36 +01:00
deeplow
4f2de90f93
Add overview table of qubes 2023-08-24 14:50:53 +01:00
deeplow
c3cdca977f
Qubes alpha: bump fedora version (37 -> 38) 2023-08-24 14:42:54 +01:00
deeplow
1ab14dbd86
Use containers in Qubes until Beta
Reverse the logic in Qubes to run in containers by default and only
perform the conversion with VMs when explicitly set by the env var
QUBES_CONVERSION=1. This will avoid surprises when someone installs
Dangerzone on Qubes expecting it to work out of the box just like any
other Linux.

Fixes #451
2023-07-26 14:02:06 +01:00
Alex Pyrgiotis
26cf3db4b4
Install Qt6 in CI runners and dev environments
Upgrade from Qt5 to Qt6 in our CI runners and dev environments, since
the latest PySide6 versions do not support Qt5. This leaves only our
Debian / Fedora packages relying on Qt5, since there's no PySide6
package for them yet.

There are some caveats to the Qt6 upgrade:

1. Debian Bullseye has a missing dependency to `libgl1`, so we need to
   install it separately.
2. Ubuntu Jammy has a missing dependency to `libxkbcommon-x11-0`, which
   we have to install separately.
3. Ubuntu Focal does not have Qt6, but surprisingly PySide6 works with
   Qt5.
4. All Debian-based distros require `libxcb-cursor0`.

As a side effect, we have to make our `env.py` a bit more complicated,
to cater to these exceptions.

Refs #482
2023-07-25 14:53:17 +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
Alex Pyrgiotis
20b24a6c71
Add development instructions for Qubes integration
Add instructions aimed at developers who want to try out Qubes
integration.

Fixes #411
2023-06-21 15:06:22 +03:00
Chris Kerr
1a82962224
Fix typo
"keying" -> "keyring"

Signed-off-by: deeplow <deeplower@protonmail.com>
2023-05-17 08:52:34 +01:00
Alex Pyrgiotis
96d8cdef94
Suggest users to install Poetry via pipx
Replace the command to install Poetry globally via `pip` in our build
instructions, with a command that installs Poetry under ~/.local/bin
via `pipx`. The rationale is the same as in the previous commit, i.e.,
PEP 668 does not allow it.

Note that in this case, we don't have any CI restrictions, so we could
use the official installer instead. However, for security reasons, we
prefer suggesting `pipx` to the users, and of course give them a list of
alternatives.

Note that for Windows and MacOS we leave the command as is, until we
figure out how PEP 668 applies in there.
2023-03-08 17:36:42 +02:00
deeplow
f307e03215
Windows build: link to adding Wix to PATH 2023-02-23 09:12:04 +00:00
Alex Pyrgiotis
5100e15213
Add missing build dependencies for Ubuntu Focal
Add some missing build dependencies that we encountered for Ubuntu
Focal, but they apply to the rest of the Debian-based distros as well.
2023-02-21 20:20:03 +02:00
deeplow
3b2544a2cd
Add comment about poetry install keyring prompt
Running `poetry install` would show a keyring prompt asking the user for
a password or to create a new keyring. This should not be needed for a
successful install.

discussion context: https://github.com/freedomofpress/dangerzone/pull/284#issue-1477773398
2023-01-18 14:17:59 +00:00
Alex Pyrgiotis
ea99b1e1dd
Narrow down installed system packages
Narrow down the system packages that we install in dev environments. The
rationale is that we get most of the Python dependencies from Poetry, so
we don't need to install them from the system as well.

The packages that we do need to install are non-Python ones, and this
commit adds some that were missing: make, python3-stdeb. Also, we
explicitly install the base Qt5 libraries, in order to get the graphics
and C++ libraries that we can't get from PyPI.
2023-01-16 18:48:09 +02:00
Ro
ffdc1425bb
Update Debian, Fedora instructions, add QubesOS instructions. 2023-01-09 11:13:12 +00:00
Alex Pyrgiotis
82fc69655e
Align Poetry instructions across OSes
Align build instructions about Python Poetry, which where previously
present only on MacOS and Windows. With this commit we:

1. Add Poetry instructions on Linux.
2. Add missing Poetry instructions on Windows, when running Dangerzone
   from source.
2022-11-07 12:03:24 +02:00
deeplow
a6c2b943f4
document new windows dev dep.: MS Visual C++ >= 14
On a windows system when running `pip install` it fails to install
`cx_Logging-3.0` with the error:

    error: Microsoft Visual C++ 14.0 or greater is required. Get it
    with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

Installing this dependency solves the issue.
2022-10-25 10:23:02 +01:00
Guthrie McAfee Armstrong
e552411db2
Support Python 3.10
PySide2 5.15.2.1 added support for Python 3.10
2022-10-25 10:23:00 +01:00
Micah Lee
6713cce503
Updates to the macOS and Windows build scripts and documentation 2022-08-26 14:06:06 -07:00
Guthrie McAfee Armstrong
e63c931800
Remove psutil, termcolor, and wmi dependencies 2022-08-19 15:16:19 +01:00
Guthrie McAfee Armstrong
395eba0a74
Remove requests dependency 2022-08-19 15:16:14 +01:00
Micah Lee
bc8b9d62b4
Switch Windows package from pyinstaller to cx_freeze 2021-12-13 15:23:45 -08:00
Micah Lee
3e11dc11e0
Switch back to PyInstaller from PyPi 2021-11-29 15:04:20 -08:00
Micah Lee
2a5891dfc3
Typo 2021-11-29 14:55:49 -08:00
Micah Lee
bd0b032c30
For testing, install deps with peotry, and run with poetry, without building a package 2021-11-24 15:39:23 -08:00
Micah Lee
61839f5b24
Change multistep windows build into one step 2021-11-24 12:21:38 -08:00