Package: autopkgtest
Version: 5.49
Severity: wishlist

Dear Maintainer,

The podman backend of autopkgtest can be used for tests that require the use of
an init system. This requires an image built with 'autopkgtest-build-podman
--init=<init-system>' (or other images built with an init system), and running
autopkgtest with args such as 'autopkgtest -- podman --init <image>'. These info
can be found and pieced together from the two manpages of 
autopkgtest-build-podman
and autopkgtest-virt-podman, but is nonetheless quite confusing and could take
a lot of iterations to reach the correct answer. This can be fixed by simply 
adding
an example to the autopkgtest-virt-podman manpage that contains the usage of the
podman backend with --init.

I have attached a patch to do the same. If doesn't matter if this very patch is 
not
accepted, I'd be happy as long as there is improvements to the manpage. If on 
the
other hand the patch needs some adjustments, or if you'd prefer a salsa MR, 
please
let me know so that I can do that.
Ananthu

-- System Information:
Debian Release: trixie/sid
  APT prefers buildd-unstable
  APT policy: (500, 'buildd-unstable'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-32-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect

Versions of packages autopkgtest depends on:
ii  apt-utils            3.0.1
ii  libdpkg-perl         1.22.18
ii  mawk                 1.3.4.20250131-1
ii  procps               2:4.0.4-8
ii  python3              3.13.3-1
ii  python3-debian       1.0.1
ii  python3-distro-info  1.13
ii  retry                1.0.5-3

Versions of packages autopkgtest recommends:
ii  autodep8  0.29
ii  fakeroot  1.37.1.1-1

Versions of packages autopkgtest suggests:
pn  docker-cli | docker.io  <none>
pn  docker.io               <none>
pn  fakemachine             <none>
ii  genisoimage             9:1.1.11-4
pn  incus                   <none>
pn  lxc                     <none>
pn  lxd                     <none>
pn  mmdebstrap              <none>
pn  ovmf                    <none>
pn  ovmf-ia32               <none>
ii  podman                  5.4.2+ds1-1+b2
pn  qemu-efi-aarch64        <none>
pn  qemu-efi-arm            <none>
pn  qemu-efi-riscv64        <none>
pn  qemu-system             <none>
pn  qemu-utils              <none>
pn  schroot                 <none>
ii  uidmap                  1:4.17.4-2
ii  util-linux              2.41-5
pn  vmdb2                   <none>
pn  zerofree                <none>

-- no debconf information

-- 
Best,
Ananthu
From 1183668f0751f870491bcadc81a4430ec5bfed40 Mon Sep 17 00:00:00 2001
From: Ananthu C V <[email protected]>
Date: Sun, 11 May 2025 16:39:54 +0530
Subject: [PATCH] autopkgtest-virt-docker.1: add example containing --init
 option

---
 virt/autopkgtest-virt-docker.1 | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/virt/autopkgtest-virt-docker.1 b/virt/autopkgtest-virt-docker.1
index c219daa9..3d338854 100644
--- a/virt/autopkgtest-virt-docker.1
+++ b/virt/autopkgtest-virt-docker.1
@@ -214,6 +214,21 @@ autopkgtest hello_2.8\-4.dsc \-\- podman localhost/autopkgtest/debian:sid
 .EE
 .RE
 
+For creating an image suitable for autopkgtests that require the presence of an init system,
+like systemd, you can use the --init option:
+
+.RS
+.EX
+autopkgtest\-build\-podman \-\-init=systemd \-\-image debian:sid
+autopkgtest hello_2.8\-4.dsc \-\- podman \-\-init localhost/autopkgtest/debian:sid
+.EE
+.RE
+
+Since autopkgtest\-build\-podman labels the image correctly as using the systemd init system (see
+the "Image Requirements" section above), autopkgtest can still work the same way even with
+dropping the \-\-init option from the podman args. In cases when this labeling is not present,
+the \-\-init option is mandatory for the container to start with /sbin/init as the inital command.
+
 If you would prefer not to trust images downloaded from docker.io,
 an equivalent image can be built from a minbase tarball generated by
 .BR mmdebstrap (1):
-- 
2.49.0

Attachment: signature.asc
Description: PGP signature

Reply via email to