From a5866a347ce82d368ecea9f9b20174900936cdc0 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Tue, 23 Oct 2018 15:36:58 +0200 Subject: [PATCH] add --qemu option to proot when creating tar of foreign arch chroot --- mmdebstrap | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mmdebstrap b/mmdebstrap index 3b14a20..96d17df 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -1721,7 +1721,11 @@ sub main() { } elsif ($options->{mode} eq 'proot') { # proot requires tar to run inside proot or otherwise # permissions will be completely off - 0 == system('proot', '--root-id', "--rootfs=$options->{root}", '--cwd=/', 'tar', @taropts, '-C', '/', '.') or die "tar failed: $?"; + my @qemuopt = (); + if (defined $options->{qemu}) { + push @qemuopt, "--qemu=qemu-$options->{qemu}"; + } + 0 == system('proot', '--root-id', "--rootfs=$options->{root}", '--cwd=/', @qemuopt, 'tar', @taropts, '-C', '/', '.') or die "tar failed: $?"; } elsif (any { $_ eq $options->{mode} } ('root', 'chrootless')) { 0 == system('tar', @taropts, '-C', $options->{root}, '.') or die "tar failed: $?"; } else {