Your message dated Mon, 04 Mar 2019 20:03:00 +0000
with message-id <410ee9b9-7f7d-7b6b-849f-78e77a8c7...@thykier.net>
and subject line Re: fakechroot: mv(1) cannot be used inside fakechroot
has caused the Debian Bug report #921924,
regarding fakechroot: mv(1) cannot be used inside fakechroot
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
921924: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921924
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: fakechroot
Version: 2.19-3.2
Severity: grave
Justification: renders package unusable
Control: block -1 by 915559

Hi,

currently, it is not possible to use the mv(1) tool from coreutils
within fakechroot. Since mv is also used in the dash and apt postinst
scripts, this means that:

 - fakechroot is unfit for a debootstrap-like scenario
 - shell scripts using mv will not work inside fakechroot

Since one of the main uses of fakechroot is to be used together with
debootstrap and since the mv tool is such an essential utility, I'm
marking this bug with RC severity.

Steps to reproduce:

    $ fakechroot fakeroot -s fakeroot.state debootstrap --variant=fakechroot 
unstable debian-unstable
    [...]
    W: Failure while configuring required packages.
    W: See /home/josch/debian-unstable/debootstrap/debootstrap.log for details 
(possibly the package dash is at fault)

And from the log:

    Setting up dash (0.5.10.2-5) ...
    No diversion 'diversion of /bin/sh by bash', none removed.
    Adding 'diversion of /bin/sh to /bin/sh.distrib by dash'
    mv: cannot move '/bin/sh.tmp' to '/bin/sh': No such file or directory
    dpkg: error processing package dash (--configure):
     installed dash package post-installation script subprocess returned error 
exit status 1

To reproduce it manually:

    fakechroot fakeroot -s fakeroot.state chroot debian-unstable mv /bin/sh.tmp 
/bin/sh
    mv: cannot move '/bin/sh.tmp' to '/bin/sh': No such file or directory

The problem is, that coreutils directly invokes the renameat2 systemcall
instead of its glibc wrapper function. fakechroot cannot intercept
system calls, so the bare renameat2 call will be executed. From wrapping
the above in strace:

    [pid  8332] renameat2(AT_FDCWD, "/bin/sh.tmp", AT_FDCWD, "/bin/sh", 
RENAME_NOREPLACE) = -1 ENOENT (No such file or directory)

As one can see, the paths did not get adjusted by fakechroot.

There is a bug against coreutils which backports a patch from coreutils
upstream that fixes this problem. The issue is tracked in #915559.

Thanks!

cheers, josch

--- End Message ---
--- Begin Message ---
On Sun, 10 Feb 2019 11:33:19 +0100 Johannes 'josch' Schauer
<jo...@debian.org> wrote:
> Package: fakechroot
> Version: 2.19-3.2
> Severity: grave
> Justification: renders package unusable
> Control: block -1 by 915559
> 
> Hi,
> 
> currently, it is not possible to use the mv(1) tool from coreutils
> within fakechroot. Since mv is also used in the dash and apt postinst
> scripts, this means that:
> 
>  - fakechroot is unfit for a debootstrap-like scenario
>  - shell scripts using mv will not work inside fakechroot
> 
> Since one of the main uses of fakechroot is to be used together with
> debootstrap and since the mv tool is such an essential utility, I'm
> marking this bug with RC severity.
> 
> Steps to reproduce:
> 
>     $ fakechroot fakeroot -s fakeroot.state debootstrap --variant=fakechroot 
> unstable debian-unstable
>     [...]
>     W: Failure while configuring required packages.
>     W: See /home/josch/debian-unstable/debootstrap/debootstrap.log for 
> details (possibly the package dash is at fault)
> 
> And from the log:
> 
>     Setting up dash (0.5.10.2-5) ...
>     No diversion 'diversion of /bin/sh by bash', none removed.
>     Adding 'diversion of /bin/sh to /bin/sh.distrib by dash'
>     mv: cannot move '/bin/sh.tmp' to '/bin/sh': No such file or directory
>     dpkg: error processing package dash (--configure):
>      installed dash package post-installation script subprocess returned 
> error exit status 1
> 
> To reproduce it manually:
> 
>     fakechroot fakeroot -s fakeroot.state chroot debian-unstable mv 
> /bin/sh.tmp /bin/sh
>     mv: cannot move '/bin/sh.tmp' to '/bin/sh': No such file or directory
> 
> The problem is, that coreutils directly invokes the renameat2 systemcall
> instead of its glibc wrapper function. fakechroot cannot intercept
> system calls, so the bare renameat2 call will be executed. From wrapping
> the above in strace:
> 
>     [pid  8332] renameat2(AT_FDCWD, "/bin/sh.tmp", AT_FDCWD, "/bin/sh", 
> RENAME_NOREPLACE) = -1 ENOENT (No such file or directory)
> 
> As one can see, the paths did not get adjusted by fakechroot.
> 
> There is a bug against coreutils which backports a patch from coreutils
> upstream that fixes this problem. The issue is tracked in #915559.
> 
> Thanks!
> 
> cheers, josch
> 
> 

The underlying issue has been fixed in coreutils and we expect it to
migrate before the full freeze.  I am closing this to keep the bug
tracker clean.

Thanks,
~Niels

--- End Message ---

Reply via email to