rimerosolutions / entrusted

Sanitize documents to safe PDFs, for active content removal
GNU General Public License v3.0
26 stars 0 forks source link

Live CD: Containerize most of the build process #79

Open yveszoundi opened 1 year ago

yveszoundi commented 1 year ago

Background

The Live CD is based on Debian stable. The build process generates ISO images for amd64 and aarch64

Problem

The build process is a bit too complex to both maintain and support:

Proposed approach

Try containerizing most of the build process similarly to Lima Alpine ISO build or other "Live CD kits".

Main Challenge

We need a "ready-to-go" folder structure with the entire contents of $HOME/.local/share/containers in the Live CD.

yveszoundi commented 11 months ago

One of the current annoyances is copying the locally built image into a chroot environment

yveszoundi commented 10 months ago

Running podman with a custom --root parameter doesn't seem to help.

The same applies to custom variables such as XDG_DATA_DIRS or XDG_DATA_HOME.

The CD builds successfully without requiring users to build the CD in a virtual machine. However, there are podman errors apparently related to temporary folders not found (likely references during the build while pointing to the chroot environment).

yveszoundi commented 10 months ago

Testing with Podman 4.8.2, there are still references to the initial chroot environment within the Live CD.

Various json files in ~/.local/share/containers refer to /tmp/entrusted-tmpbuild/entrusted-livecd/live_boot_tmpdir-0.3.2-amd64/entrusted-packaging/docker-dir/containers/storage.

yveszoundi commented 10 months ago

See also the following references

If it were possible, it would be nice to import/pull a built container image (podman export) within a chroot environment. Last time that I checked (1 year ago or so), it was kind of working for amd64, but failing for aarch64 (arm64).

yveszoundi commented 10 months ago

This won't be necessary if we manage to remove the container solution requirement first in #57 .