drop /usr/sbin prefixes from executables

pull/24/head
parent c6c9c27969
commit cffd47e087
Signed by: josch
GPG Key ID: F2CBA5C78FBD83E1

@ -2437,7 +2437,7 @@ sub run_prepare {
any { $_ eq $options->{mode} } any { $_ eq $options->{mode} }
('root', 'unshare', 'fakechroot') ('root', 'unshare', 'fakechroot')
) { ) {
push @chrootcmd, ('/usr/sbin/chroot', $options->{root}); push @chrootcmd, ('chroot', $options->{root});
} else { } else {
error "unknown mode: $options->{mode}"; error "unknown mode: $options->{mode}";
} }
@ -3051,7 +3051,7 @@ sub hookhelper {
# Fakechroot requires tar to run inside the chroot or # Fakechroot requires tar to run inside the chroot or
# otherwise absolute symlinks will include the path to the # otherwise absolute symlinks will include the path to the
# root directory # root directory
push @cmdprefix, '/usr/sbin/chroot', $root; push @cmdprefix, 'chroot', $root;
} elsif ($mode eq 'proot') { } elsif ($mode eq 'proot') {
# proot requires tar to run inside proot or otherwise # proot requires tar to run inside proot or otherwise
# permissions will be completely off # permissions will be completely off
@ -4744,13 +4744,12 @@ sub main() {
if (!exists $deb2qemu->{ $options->{nativearch} }) { if (!exists $deb2qemu->{ $options->{nativearch} }) {
warning "no mapping from $options->{nativearch} to" warning "no mapping from $options->{nativearch} to"
. " qemu-user binary"; . " qemu-user binary";
} elsif (!can_execute '/usr/sbin/update-binfmts') { } elsif (!can_execute 'update-binfmts') {
warning "cannot find /usr/sbin/update-binfmts"; warning "cannot find update-binfmts";
} else { } else {
my $binfmt_identifier my $binfmt_identifier
= 'qemu-' . $deb2qemu->{ $options->{nativearch} }; = 'qemu-' . $deb2qemu->{ $options->{nativearch} };
open my $fh, '-|', '/usr/sbin/update-binfmts', open my $fh, '-|', 'update-binfmts', '--display',
'--display',
$binfmt_identifier // error "failed to fork(): $!"; $binfmt_identifier // error "failed to fork(): $!";
chomp( chomp(
my $binfmts = do { local $/; <$fh> } my $binfmts = do { local $/; <$fh> }
@ -5561,7 +5560,7 @@ sub main() {
# Fakechroot requires tar to run inside the chroot or # Fakechroot requires tar to run inside the chroot or
# otherwise absolute symlinks will include the path to the # otherwise absolute symlinks will include the path to the
# root directory # root directory
0 == system('/usr/sbin/chroot', $options->{root}, 'tar', 0 == system('chroot', $options->{root}, 'tar',
@taropts, '-C', '/', '.') @taropts, '-C', '/', '.')
or error "tar failed: $?"; or error "tar failed: $?";
} elsif ($options->{mode} eq 'proot') { } elsif ($options->{mode} eq 'proot') {

Loading…
Cancel
Save