mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-05-08 22:41:50 +02:00

This reverses how the airgapped container images were working. During preparation, the `index.json` is now trimmed down to be loadable by podman and docker. The original `index.json` is kept in the archive as `dangerzone.json`. This has two benefits: 1. The image is now loadable by a container engine without changes; 2. There is no more a need to recreate the archive at runtime, leading to less CPU and space usage on the user device.
79 lines
1.3 KiB
Python
79 lines
1.3 KiB
Python
class UpdaterError(Exception):
|
|
pass
|
|
|
|
|
|
class ImageAlreadyUpToDate(UpdaterError):
|
|
pass
|
|
|
|
|
|
class ImageNotFound(UpdaterError):
|
|
pass
|
|
|
|
|
|
class SignatureError(UpdaterError):
|
|
pass
|
|
|
|
|
|
class RegistryError(UpdaterError):
|
|
pass
|
|
|
|
|
|
class AirgappedImageDownloadError(UpdaterError):
|
|
pass
|
|
|
|
|
|
class NoRemoteSignatures(SignatureError):
|
|
pass
|
|
|
|
|
|
class SignatureVerificationError(SignatureError):
|
|
pass
|
|
|
|
|
|
class SignatureExtractionError(SignatureError):
|
|
pass
|
|
|
|
|
|
class SignaturesFolderDoesNotExist(SignatureError):
|
|
pass
|
|
|
|
|
|
class InvalidSignatures(SignatureError):
|
|
pass
|
|
|
|
|
|
class SignatureMismatch(SignatureError):
|
|
pass
|
|
|
|
|
|
class LocalSignatureNotFound(SignatureError):
|
|
pass
|
|
|
|
|
|
class CosignNotInstalledError(SignatureError):
|
|
pass
|
|
|
|
|
|
class InvalidLogIndex(SignatureError):
|
|
pass
|
|
|
|
|
|
class InvalidImageArchive(UpdaterError):
|
|
pass
|
|
|
|
|
|
class InvalidDangerzoneManifest(InvalidImageArchive):
|
|
"""Raised when the dangerzone.json manifest dodesn't match the index.json
|
|
manifest in a container.tar image.
|
|
|
|
This could mean that the container image has been tempered and is not safe
|
|
to load, so we bail out.
|
|
"""
|
|
|
|
pass
|
|
|
|
|
|
class NeedUserInput(UpdaterError):
|
|
"""The user has not yet been prompted to know if they want to check for updates."""
|
|
|
|
pass
|