From 2d6703add0d2af67dff6b6ab8bf65e5c195436b2 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Mon, 22 Oct 2018 15:06:20 +0200 Subject: [PATCH] fix tar call in proot mode (avoid extra entry for /dev and error message about non-existant working directory) --- mmdebstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmdebstrap b/mmdebstrap index e5678fc..15f8106 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -1667,7 +1667,7 @@ 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}", 'tar', @taropts, '-C', '/', '.') or die "tar failed: $?"; + 0 == system('proot', '--root-id', "--rootfs=$options->{root}", '--cwd=/', 'tar', @taropts, '--exclude=./dev', '-C', '/', '.') or die "tar failed: $?"; } elsif (any { $_ eq $options->{mode} } ('root')) { 0 == system('tar', @taropts, '-C', $options->{root}, '.') or die "tar failed: $?"; } else {