#1101778 mmdebstrap-autopkgtest-build-qemu: please make sbuild-qemu-boot's --shared-dir option work

Package:
mmdebstrap
Source:
mmdebstrap
Submitter:
Francesco Poli (wintermute)
Date:
2025-06-06 20:25:02 UTC
Severity:
normal
#1101778#5
Date:
2025-03-31 21:37:55 UTC
From:
To:
Hello!   :-)

I noticed that there's something missing in images created with
'mmdebstrap-autopkgtest-build-qemu'.


After:

  $ mkdir -p ~/.cache/sbuild/build
  $ cd /dev/shm
  $ TMPDIR=/dev/shm mmdebstrap-autopkgtest-build-qemu \
                    --size=25G --boot=efi sid unstable-autopkgtest-amd64.img
  $ mv -i unstable-autopkgtest-amd64.img ~/.cache/sbuild/

I can run 'sbuild-qemu-boot':

  $ sbuild-qemu-boot --boot=efi --shared-dir $(pwd) unstable-autopkgtest-amd64.img

however, the '--shared-dir' option fails to work.

Actually the man page sbuild-qemu-boot(1) says that this will only
work when the image was created with sbuild-qemu-create(1).

But I would like this option to also work when the image was created
with mmdebstrap-autopkgtest-build-qemu(1).
So this is my feature request: please modify
'mmdebstrap-autopkgtest-build-qemu' so that the '--shared-dir' option
of sbuild-qemu-boot(1) can work.

I hope this is not too difficult.
Please let me know.

Thanks for your time and patience!

#1101778#10
Date:
2025-06-06 19:53:16 UTC
From:
To:
The solution to this is actually quite simple. All that is needed are
these two lines [1], which in the guest create an fstab entry for a 9p
filesystem with the ID 'sbuild-qemu'.

This ID is poorly chosen, I'll name it to something more generic like
'host-shared' or whatever in the next release so that other tools can
make use of the same feature if they want (regardless of
sbuild-qemu-boot or not).

Best,
Christian

[1]: https://sources.debian.org/src/sbuild/0.89.2/bin/sbuild-qemu-create-modscript/#L81-L82