Hi Patrick,
Quoting Patrick Schleizer (2019-03-31 18:57:00)
> Dear maintainer,
>
> # How to reproduce:
>
> sudo /home/user/whonix_dot/Whonix/help-steps/mmdebstrap --verbose
> --architectures=i386 stretch /var/cache/pbuilder/base.cow_i386
> /home/user/whonix_dot/Whonix/build_sources/debian_stable_current_clearnet.list
>
> (Could probably simplified but I hope you can reproduce this easily /
> hope you also have usr/bin/mkdir.)
>
> # Expected result:
>
> No error.
>
> # Actual result:
>
> > I: automatically chosen mode: root
> > I: i386 cannot be executed, falling back to qemu-user
> > update-binfmts: warning: qemu-i386 not in database of installed binary
> > formats.
> > update-binfmts: exiting due to previous errors
> > qemu-i386 is not a supported binfmt name at
> > /home/user/whonix_dot/Whonix/help-steps/mmdebstrap line 1838.
>
> # Misc:
>
> /usr/sbin/update-binfmts --display qemu-i386
>
> > update-binfmts: warning: qemu-i386 not in database of installed binary
> > formats.
> > update-binfmts: exiting due to previous errors
>
> I guess the issue is somewhere here:
>
> open my $fh, '-|', '/usr/sbin/update-binfmts',
> '--display',
> "qemu-$options->{qemu}" // die "failed to fork(): $!";
> chomp (my $binfmts = do { local $/; <$fh> });
> close $fh;
> if ($binfmts eq '') {
> die "qemu-$options->{qemu} is not a supported binfmt
> name";
> }
>
> Removing
> die "qemu-$options->{qemu} is not a supported binfmt name";
> helps as a workaround. I can now build i386 on amd64.
qemu is only chosen because of the earlier message "i386 cannot be executed,
falling back to qemu-user" which occurs because the arch-test program
determined that i386 cannot be executed on amd64. This is not true and maybe
there is a bug in the arch-test package in stretch?
>
> Building armhf or arm64 fails.
>
> I: installing packages...
> /usr/sbin/chroot: failed to run command \u2018dpkg\u2019: Permission denied
> env --unset=APT_CONFIG /usr/sbin/chroot
> /var/cache/pbuilder/base.cow_arm64 dpkg --install --force-depends
> /var/cache/apt/archives//sysvinit-utils_2.88dsf-59.9_arm64.deb ...
> /home/user/whonix_dot/Whonix/help-steps/mmdebstrap line 551.
>
> This might be more a user support question than actual bug. I hope you
> don't mind me asking here. Please kindly let me know if I should take
> this elsewhere please.
>
> > dpkg -l | grep qemu
> > ii ipxe-qemu
> > 1.0.0+git-20161027.b991c67-1 all PXE boot firmware -
> > ROM images for qemu
> > ii qemu 1:2.8+dfsg-6+deb9u5
> > amd64fast processor emulator
> > ii qemu-slof 20161019+dfsg-1
> > all Slimline Open Firmware -- QEMU PowerPC version
> > ii qemu-system 1:2.8+dfsg-6+deb9u5
> > amd64QEMU full system emulation binaries
> > ii qemu-system-arm 1:2.8+dfsg-6+deb9u5
> > amd64QEMU full system emulation binaries (arm)
> > ii qemu-system-common1:2.8+dfsg-6+deb9u5
> > amd64QEMU full system emulation binaries (common
> > files)
> > ii qemu-system-mips 1:2.8+dfsg-6+deb9u5
> > amd64QEMU full system emulation binaries (mips)
> > ii qemu-system-misc 1:2.8+dfsg-6+deb9u5
> > amd64QEMU full system emulation binaries
> > (miscellaneous)
> > ii qemu-system-ppc 1:2.8+dfsg-6+deb9u5
> > amd64QEMU full system emulation binaries (ppc)
> > ii qemu-system-sparc 1:2.8+dfsg-6+deb9u5
> > amd64QEMU full system emulation binaries (sparc)
> > ii qemu-system-x86 1:2.8+dfsg-6+deb9u5
> > amd64QEMU full system emulation binaries (x86)
> > ii qemu-user 1:2.8+dfsg-6+deb9u5
> > amd64QEMU user mode emulation binaries
> > ii qemu-user-static 1:2.8+dfsg-6+deb9u5
> > amd64QEMU user mode emulation binaries (static
> > version)
> > ii qemu-utils1:2.8+dfsg-6+deb9u5
> > amd64QEMU utilitie
>
> I am using mmdebstrap (git version) and I am still on Debian stretch.
> Perhaps stretch is unsupported and all of this works in buster?
I have never tested this on stretch and would be surprised if it works there.
mmdebstrap makes use of very recent apt and dpkg options and I would not be
surprised if