Package: sbuild
Version: 0.81.2
Severity: normal

Dear Maintainer,

My existing and newly created chroots with sbuild-createchroot
are missing target/usr/libexec/qemu-binfmt/.  This lead me to
see the following symptoms when attempting to schroot in my
arm64 chroot overlay environment on top of amd64 machine:

        $ sudo sbuild-createchroot --arch=arm64 sid target/
        [...]

        $ schroot -d / -c sid-arm64-sbuild
        E: 15binfmt: touch: cannot touch 
'/var/run/schroot/mount/sid-arm64-sbuild-542dde2d-092f-4135-a59e-9db33d518450/usr/libexec/qemu-binfmt/aarch64-binfmt-P':
 No such file or directory
        E: 15binfmt: touch: cannot touch 
'/var/run/schroot/mount/sid-arm64-sbuild-542dde2d-092f-4135-a59e-9db33d518450/usr/libexec/qemu-binfmt/aarch64-binfmt-P':
 No such file or directory
        E: sid-arm64-sbuild-542dde2d-092f-4135-a59e-9db33d518450: Chroot setup 
failed: stage=setup-start

The chroot setup fails and I cannot use my build environment.
I could fix that issue by manually adding the missing directory:

        $ sudo mkdir -p target/usr/libexec/qemu-binfmt

        $ schroot -d / -c sid-arm64-sbuild

        (sid-arm64-sbuild)$ echo ok
        ok

It looks to me like this appears since qemu 1:5.2+dfsg-4: the
actual binfmt binary is now located below the directory
/usr/libexec/qemu-binfmt/.  I see in the change log:

>  * qemu-user: attempt to preserve argv[0] when run under binfmt
>    (Closes: #970460)
>    This changes the enterpreter name for all linux-user registered
>    binfmts, so it potentially can break stuff.  The actual binary
>    being registered now is /usr/libexec/qemu-binfmt/foo-binfmt-P,
>    which is a symlink to actual /usr/lib/qemu-foo[-static].

I am not too sure whether this is a bug in the sbuild package,
or something more relevant to plain debootstrap, a documentation
item perhaps, or just me missing a step on my end.  Please feel
free to reassign as deemed the most appropriate.

Have a nice day,  :)
Étienne.


-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-3-amd64 (SMP w/6 CPU threads)
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: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages sbuild depends on:
ii  adduser         3.118
ii  libsbuild-perl  0.81.2
ii  perl            5.32.1-2

Versions of packages sbuild recommends:
ii  autopkgtest  5.16
ii  debootstrap  1.0.123
ii  schroot      1.6.10-11+b1

Versions of packages sbuild suggests:
pn  deborphan  <none>
ii  e2fsprogs  1.46.1-1
ii  kmod       28-1
ii  wget       1.21-1+b1

-- no debconf information

-- 
Étienne Mollier <etienne.moll...@mailoo.org>
Fingerprint:  8f91 b227 c7d6 f2b1 948c  8236 793c f67e 8f0d 11da
Sent from /dev/pts/4, please excuse my verbosity.

Reply via email to