Skip to content

Build out unshare Executor and Instance API

To allow us to run lintian, piuparts and blhc under unshare, we need to implement the rest of the Executor and Instance API. (#219 (closed)) Currently most of the low-level functions are NotImplemented: https://salsa.debian.org/freexian-team/debusine/-/blob/devel/debusine/tasks/executors/unshare.py

How we envision unshare instances to work:

  • An unshare instance is an extracted system-tarball in a temporary directory.
  • No init system is run in the instance.

Requirements:

  • Creating the instance should extract the tarball into a temporary directory.
  • Deleting the instance (including GC) clean up the temporary directory. The directory can be deleted from within unshare, the way autopkgtest-virt-unshare does.
  • Starting the instance is a noop.
  • Stopping the instance should be a noop.
  • File push should install a file with appropriate permissions in the container. Maybe using the ownership of the parent directory? This may require passing the file to a cat inside the unshare.
  • File pull should copy a file out of the container.
  • Run should execute the provided command as an argument to unshare. autopkgtest-virt-unshare uses --map-auto, --map-root-user, --user, --mount. I guess we should do the same.
    • If possible: Use --kill-child and --pid to clean up processes at the end of the run.
Edited by Stefano Rivera
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information