Package: mmdebstrap
Version: 1.5.7-1
Severity: normal

Dear Maintainer,

It seems that when passing the --script option to
mmdebstrap-autopkgtest-build-qemu, the script is uploaded to the unshare
and then executed in a chroot.

Whereas autopkgtest-build-qemu's --script option executes the script on
the host, passing in the chroot dir as the first and sole argument to
the script, and it is up to the script to do any chroots necessary.

I noticed this because my --scripts have a

  [ -n "\$1" ] || exit 1

at the top and they started erroring out.

I assume this is a bug because mmdebstrap-autopkgtest-build-qemu(1)
describes --script as being "called with the root filesystem of the
image as its first parameter", just like the original it models would.

I also noticed that autopkgtest's own setup-commands/setup-testbed
script is called correctly, that is on the host, not the schroot. So I
think the solution could be as simple as replacing the

   --chrooted-customize-hook=sh /userscript

with a

   --customize-hook=sh $SCRIPT $1

or similar.

Best,
Christian


-- System Information:
Debian Release: 13.0
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500,
'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.41+deb13-amd64 (SMP w/32 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages mmdebstrap depends on:
ii  apt      3.0.3
ii  perl     5.40.1-6
ii  python3  3.13.5-1

Versions of packages mmdebstrap recommends:
ii  arch-test            0.22-1
ii  gpg                  2.4.7-21+b3
ii  libdistro-info-perl  1.13
ii  libdpkg-perl         1.22.21
ii  mount                2.41-5
ii  uidmap               1:4.17.4-2

Versions of packages mmdebstrap suggests:
pn  apt-transport-tor               <none>
ii  apt-utils                       3.0.3
ii  bzip2                           1.0.8-6
ii  ca-certificates                 20250419
ii  debootstrap                     1.0.141
ii  distro-info-data                0.66
ii  dpkg-dev                        1.22.21
ii  e2fsprogs                       1.47.2-3+b3
pn  fakechroot                      <none>
ii  fakeroot                        1.37.1.1-1
pn  genext2fs                       <none>
ii  libarchive13t64 [libarchive13]  3.7.4-4
pn  lz4                             <none>
ii  lzop                            1.04-2
pn  ncompress                       <none>
pn  perl-doc                        <none>
ii  qemu-user                       1:10.0.2+ds-2+b1
pn  qemu-user-static                <none>
pn  squashfs-tools-ng               <none>
ii  systemd                         257.7-1
ii  xz-utils                        5.8.1-1
ii  zstd                            1.5.7+dfsg-1

-- no debconf information

Reply via email to