-
-
- :information_source: Backport notice for Ubuntu 24.04 (Noble) users regarding the conmon package
+ :information_source: Backport notice for Ubuntu 22.04 (Jammy) users regarding the conmon package
The `conmon` version that Podman uses and Ubuntu Jammy ships, has a bug
diff --git a/dangerzone/gui/main_window.py b/dangerzone/gui/main_window.py
index 80301e1..bb87371 100644
--- a/dangerzone/gui/main_window.py
+++ b/dangerzone/gui/main_window.py
@@ -55,13 +55,6 @@ about updates.
HAMBURGER_MENU_SIZE = 30
-WARNING_MESSAGE = """\
-Warning: Ubuntu Focal systems and their derivatives will
-stop being supported in subsequent Dangerzone releases. We encourage you to upgrade to a
-more recent version of your operating system in order to get security updates.
-"""
-
-
def load_svg_image(filename: str, width: int, height: int) -> QtGui.QPixmap:
"""Load an SVG image from a filename.
@@ -192,6 +185,9 @@ class MainWindow(QtWidgets.QMainWindow):
header_layout.addWidget(self.hamburger_button)
header_layout.addSpacing(15)
+ # Content widget, contains all the window content except waiting widget
+ self.content_widget = ContentWidget(self.dangerzone)
+
if self.dangerzone.isolation_provider.should_wait_install():
# Waiting widget replaces content widget while container runtime isn't available
self.waiting_widget: WaitingWidget = WaitingWidgetContainer(self.dangerzone)
@@ -201,9 +197,6 @@ class MainWindow(QtWidgets.QMainWindow):
self.waiting_widget = WaitingWidget()
self.dangerzone.is_waiting_finished = True
- # Content widget, contains all the window content except waiting widget
- self.content_widget = ContentWidget(self.dangerzone)
-
# Only use the waiting widget if container runtime isn't available
if self.dangerzone.is_waiting_finished:
self.waiting_widget.hide()
@@ -626,17 +619,6 @@ class ContentWidget(QtWidgets.QWidget):
self.dangerzone = dangerzone
self.conversion_started = False
- self.warning_label = None
- if platform.system() == "Linux":
- # Add the warning message only for ubuntu focal
- os_release_path = Path("/etc/os-release")
- if os_release_path.exists():
- os_release = os_release_path.read_text()
- if "Ubuntu 20.04" in os_release or "focal" in os_release:
- self.warning_label = QtWidgets.QLabel(WARNING_MESSAGE)
- self.warning_label.setWordWrap(True)
- self.warning_label.setProperty("style", "warning")
-
# Doc selection widget
self.doc_selection_widget = DocSelectionWidget(self.dangerzone)
self.doc_selection_widget.documents_selected.connect(self.documents_selected)
@@ -662,8 +644,6 @@ class ContentWidget(QtWidgets.QWidget):
# Layout
layout = QtWidgets.QVBoxLayout()
- if self.warning_label:
- layout.addWidget(self.warning_label) # Add warning at the top
layout.addWidget(self.settings_widget, stretch=1)
layout.addWidget(self.documents_list, stretch=1)
layout.addWidget(self.doc_selection_wrapper, stretch=1)
@@ -894,22 +874,16 @@ class SettingsWidget(QtWidgets.QWidget):
self.safe_extension_name_layout.setSpacing(0)
self.safe_extension_name_layout.addWidget(self.safe_extension_filename)
self.safe_extension_name_layout.addWidget(self.safe_extension)
- # FIXME: Workaround for https://github.com/freedomofpress/dangerzone/issues/339.
- # We should drop this once we drop Ubuntu Focal support.
- if hasattr(QtGui, "QRegularExpressionValidator"):
- QRegEx = QtCore.QRegularExpression
- QRegExValidator = QtGui.QRegularExpressionValidator
- else:
- QRegEx = QtCore.QRegExp # type: ignore [assignment]
- QRegExValidator = QtGui.QRegExpValidator # type: ignore [assignment]
- self.dot_pdf_validator = QRegExValidator(QRegEx(r".*\.[Pp][Dd][Ff]"))
+ self.dot_pdf_validator = QtGui.QRegularExpressionValidator(
+ QtCore.QRegularExpression(r".*\.[Pp][Dd][Ff]")
+ )
if platform.system() == "Linux":
illegal_chars_regex = r"[/]"
elif platform.system() == "Darwin":
illegal_chars_regex = r"[\\]"
else:
illegal_chars_regex = r"[\"*/:<>?\\|]"
- self.illegal_chars_regex = QRegEx(illegal_chars_regex)
+ self.illegal_chars_regex = QtCore.QRegularExpression(illegal_chars_regex)
self.safe_extension_layout = QtWidgets.QHBoxLayout()
self.safe_extension_layout.addWidget(self.save_checkbox)
self.safe_extension_layout.addWidget(self.safe_extension_label)
diff --git a/dangerzone/util.py b/dangerzone/util.py
index bcad701..1fa3025 100644
--- a/dangerzone/util.py
+++ b/dangerzone/util.py
@@ -58,7 +58,7 @@ def get_tessdata_dir() -> pathlib.Path:
pathlib.Path("/usr/share/tessdata/"), # on some Debian
pathlib.Path("/usr/share/tesseract/tessdata/"), # on Fedora
pathlib.Path("/usr/share/tesseract-ocr/tessdata/"), # ? (documented)
- pathlib.Path("/usr/share/tesseract-ocr/4.00/tessdata/"), # on Ubuntu Focal
+ pathlib.Path("/usr/share/tesseract-ocr/4.00/tessdata/"), # on Debian Bullseye
pathlib.Path("/usr/share/tesseract-ocr/5/tessdata/"), # on Debian Trixie
]
diff --git a/dev_scripts/env.py b/dev_scripts/env.py
index ff4e489..a739004 100755
--- a/dev_scripts/env.py
+++ b/dev_scripts/env.py
@@ -60,24 +60,6 @@ Run Dangerzone in the end-user environment:
"""
-# NOTE: For Ubuntu 20.04 specifically, we need to install some extra deps, mainly for
-# Podman. This needs to take place both in our dev and end-user environment. See the
-# corresponding note in our Installation section:
-#
-# https://github.com/freedomofpress/dangerzone/blob/main/INSTALL.md#ubuntu-debian
-DOCKERFILE_UBUNTU_2004_DEPS = r"""
-ARG DEBIAN_FRONTEND=noninteractive
-
-RUN apt-get update \
- && apt-get install -y python-all python3.9 curl wget gnupg2 \
- && rm -rf /var/lib/apt/lists/*
-RUN . /etc/os-release \
- && sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_$VERSION_ID/ /' \
- > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" \
- && wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_$VERSION_ID/Release.key -O- \
- | apt-key add -
-"""
-
# XXX: overcome the fact that ubuntu images (starting on 23.04) ship with the 'ubuntu'
# user by default https://bugs.launchpad.net/cloud-images/+bug/2005129
# Related issue https://github.com/freedomofpress/dangerzone/pull/461
@@ -115,15 +97,7 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends dh-python make build-essential \
git {qt_deps} pipx python3 python3-pip python3-venv dpkg-dev debhelper python3-setuptools \
&& rm -rf /var/lib/apt/lists/*
-# NOTE: `pipx install poetry` fails on Ubuntu Focal, when installed through APT. By
-# installing the latest version, we sidestep this issue.
-RUN bash -c 'if [[ "$(pipx --version)" < "1" ]]; then \
- apt-get update \
- && apt-get remove -y pipx \
- && apt-get install -y --no-install-recommends python3-pip \
- && pip install pipx \
- && rm -rf /var/lib/apt/lists/*; \
- else true; fi'
+RUN pipx install poetry
RUN apt-get update \
&& apt-get install -y --no-install-recommends mupdf thunar \
&& rm -rf /var/lib/apt/lists/*
@@ -573,12 +547,7 @@ class Env:
# See https://github.com/freedomofpress/dangerzone/issues/482
qt_deps = "libqt6gui6 libxcb-cursor0"
install_deps = DOCKERFILE_BUILD_DEV_DEBIAN_DEPS
- if self.distro == "ubuntu" and self.version in ("20.04", "focal"):
- qt_deps = "libqt5gui5 libxcb-cursor0" # Ubuntu Focal has only Qt5.
- install_deps = (
- DOCKERFILE_UBUNTU_2004_DEPS + DOCKERFILE_BUILD_DEV_DEBIAN_DEPS
- )
- elif self.distro == "ubuntu" and self.version in ("22.04", "jammy"):
+ if self.distro == "ubuntu" and self.version in ("22.04", "jammy"):
# Ubuntu Jammy misses a dependency to `libxkbcommon-x11-0`, which we can
# install indirectly via `qt6-qpa-plugins`.
qt_deps += " qt6-qpa-plugins"
@@ -642,11 +611,7 @@ class Env:
install_cmd = "dnf install -y"
else:
install_deps = DOCKERFILE_BUILD_DEBIAN_DEPS
- if self.distro == "ubuntu" and self.version in ("20.04", "focal"):
- install_deps = (
- DOCKERFILE_UBUNTU_2004_DEPS + DOCKERFILE_BUILD_DEBIAN_DEPS
- )
- elif self.distro == "ubuntu" and self.version in ("22.04", "jammy"):
+ if self.distro == "ubuntu" and self.version in ("22.04", "jammy"):
# Ubuntu Jammy requires a more up-to-date conmon
# package (see https://github.com/freedomofpress/dangerzone/issues/685)
install_deps = DOCKERFILE_CONMON_UPDATE + DOCKERFILE_BUILD_DEBIAN_DEPS
diff --git a/dev_scripts/qa.py b/dev_scripts/qa.py
index ef2b321..12526a2 100755
--- a/dev_scripts/qa.py
+++ b/dev_scripts/qa.py
@@ -251,29 +251,6 @@ Install dependencies:
|