From 6c7c0b615f1b641600b3ac0d3457acc65dc35fbf Mon Sep 17 00:00:00 2001 From: Alex Pyrgiotis Date: Mon, 3 Apr 2023 17:42:46 +0300 Subject: [PATCH] dev_scripts: Add missing packages in Dangerzone envs Install the following packages in Dangerzone envs: * python3-setuptools: We've seen that this package is necessary to build the RPM package for Dangerzone. The error that we encountered was the following: * Deleting old build and dist * Building RPM package Traceback (most recent call last): File "/home/user/dangerzone/setup.py", line 5, in import setuptools ModuleNotFoundError: No module named 'setuptools' Traceback (most recent call last): File "/home/user/./dangerzone/install/linux/build-rpm.py", line 43, in main() File "/home/user/./dangerzone/install/linux/build-rpm.py", line 30, in main subprocess.run( File "/usr/lib64/python3.11/subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'python3 setup.py bdist_rpm --requires='podman,python3-pyside2,python3-appdirs,python3-click,python3-pyxdg,python3-colorama'' returned non-zero exit status 1. * fuse-overlayfs: In Ubuntu 22.10 (at least), we encountered the following error when running Podman: ERRO[0000] User-selected graph driver "overlay" overwritten by graph driver "vfs" from database - delete libpod local files to resolve The `vfs` driver is much slower than the `overlayfs` storage driver, so we need to fix this. The reason why we encounter this error is explained in the Podman docs [1]: [...] and is vfs for non-root users when fuse-overlayfs is not available. Normally, the `fuse-overlayfs` package would have been installed, but we don't install it due to the `--no-install-recommends` flag, so we install it manually. [1]: https://docs.podman.io/en/latest/markdown/podman.1.html#storage-driver-value --- dev_scripts/env.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev_scripts/env.py b/dev_scripts/env.py index f87abd1..7e5c188 100755 --- a/dev_scripts/env.py +++ b/dev_scripts/env.py @@ -78,7 +78,7 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install -y --no-install-recommends podman uidmap dh-python make \ - build-essential fakeroot libqt5gui5 pipx python3 python3-dev \ + build-essential fakeroot fuse-overlayfs libqt5gui5 pipx python3 python3-dev \ python3-venv python3-stdeb python3-all \ && rm -rf /var/lib/apt/lists/* # NOTE: `pipx install poetry` fails on Ubuntu Focal, when installed through APT. By @@ -97,7 +97,7 @@ RUN apt-get update \ # FIXME: Install Poetry on Fedora via package manager. DOCKERFILE_BUILD_DEV_FEDORA_DEPS = r""" -RUN dnf install -y rpm-build podman python3 pipx make qt5-qtbase-gui \ +RUN dnf install -y rpm-build podman python3 python3-setuptools pipx make qt5-qtbase-gui \ && dnf clean all # FIXME: Drop this fix after it's resolved upstream. @@ -143,7 +143,7 @@ RUN cd /home/user/dangerzone && poetry --no-ansi install DOCKERFILE_BUILD_DEBIAN_DEPS = r""" ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update \ - && apt-get install -y --no-install-recommends mupdf \ + && apt-get install -y --no-install-recommends mupdf fuse-overlayfs \ && rm -rf /var/lib/apt/lists/* """