From ee3689b32aa5b96d96b7d76eb36850522d4dc11b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Tue, 11 Feb 2025 19:13:18 +0100 Subject: [PATCH] Add the ability to download diffoci for multiple platforms The hash list provided on the Github releases page is now bundled in the `reproduce-image.py` script, and the proper hashes are checked after download. --- dangerzone/errors.py | 4 ++++ dangerzone/updater/__init__.py | 7 +++++++ dangerzone/util.py | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dangerzone/errors.py b/dangerzone/errors.py index c1c2849..bdfab85 100644 --- a/dangerzone/errors.py +++ b/dangerzone/errors.py @@ -126,6 +126,10 @@ class ImageNotPresentException(Exception): pass +class MultipleImagesFoundException(Exception): + pass + + class ImageInstallationException(Exception): pass diff --git a/dangerzone/updater/__init__.py b/dangerzone/updater/__init__.py index 3988bf1..57bfa1c 100644 --- a/dangerzone/updater/__init__.py +++ b/dangerzone/updater/__init__.py @@ -1,3 +1,10 @@ import logging log = logging.getLogger(__name__) + +from .signatures import ( + DEFAULT_PUBKEY_LOCATION, + is_update_available, + upgrade_container_image, + verify_local_image, +) diff --git a/dangerzone/util.py b/dangerzone/util.py index 6cae643..03d8f39 100644 --- a/dangerzone/util.py +++ b/dangerzone/util.py @@ -8,7 +8,7 @@ from pathlib import Path try: import platformdirs except ImportError: - import appdirs as platformdirs + import appdirs as platformdirs # type: ignore[no-redef] def get_config_dir() -> Path: