On Fri, 25 Apr 2025 at 18:15:56 -0400, Stefano Rivera wrote:
This breaks this VM image detection logic:

https://salsa.debian.org/ci-team/autopkgtest/-/blob/07eb656d26b097028c28ff743f4ea7eb71bc2d01/setup-commands/setup-testbed#L72

if [ "$root" != "/" ] || [ -e /dev/ttyS1 ] || [ -e /dev/hvc1 ]; then

$root is / and the host's serial devices are... whatever they are.

Ideas:
1. We could just always install these root shell services (but they are
  a security risk, if these images are used for anything other than
  autopkgtest)

Yeah, I'd prefer to avoid that. A passwordless root shell on /dev/hvc1 and/or /dev/ttyS1 is non-problematic in a throwaway VM that is being run via autopkgtest-virt-qemu, but could be a very serious problem if the VM image is booted in some other way that we don't control.

(In the long term I still want to teach autopkgtest to communicate with qemu VMs via ssh, so that we don't need to go to heroic efforts to tunnel all commands through screen-scraping an interactive shell on a serial port and writing files in a shared filesystem.)

3. Have a command line argument to install them?

Or an environment variable, perhaps? setup-testbed has historically not taken command-line arguments except for the sysroot to act on, and adding a proper command-line parser to it doesn't seem hugely appealing when we have to write it with one hand tied behind our backs (as described in debian/README.source it's expected to be runnable on 10+ year old operating systems).

    smcv

Reply via email to