tags 548691 pending
thanks

Already applied to github repository with proper test unit.

Thank you very much!

2009/9/28 Jameson Graef Rollins <jroll...@finestructure.net>

> Package: fakechroot
> Version: 2.9-1
> Severity: normal
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> So we (debirf maintainers) have stumbled upon a strangeness in the
> behavior of getcwd() under fakechroot.  It appears that the path gets
> confused depending on if the chroot root path has been specified as a
> relative path or not:
>
> servo:/srv/debirf/rescue 0$ fakeroot fakechroot chroot root pwd
> /
> servo:/srv/debirf/rescue 0$ fakeroot fakechroot chroot
> /srv/debirf/rescue/root pwd
> /
> servo:/srv/debirf/rescue 0$ fakeroot fakechroot chroot ./root pwd
> /srv/debirf/rescue/root
> servo:/srv/debirf/rescue 0$
>
> In the last case, where the root is specified as a relative path to
> the current path, getcwd() in the fakechroot (as called from 'pwd')
> returns a "jailbroken" path.  This causes problems for some programs,
> most notably apt-get:
>
> servo:/srv/debirf/rescue 0$ fakeroot fakechroot chroot ./root apt-get
> update
> Get: 1 http://mirrors.kernel.org squeeze Release.gpg [835B]
> Ign http://mirrors.kernel.org squeeze/main Translation-en_US
> Get: 2 http://mirrors.kernel.org squeeze Release [96.5kB]
> Get: 3 http://mirrors.kernel.org squeeze/main Packages/DiffIndex [2,038B]
> Get: 4 http://mirrors.kernel.org squeeze/main 2009-09-28-0316.44.pdiff
> [11.9kB]
> Get: 5 http://mirrors.kernel.org squeeze/main 2009-09-28-0316.44.pdiff
> [11.9kB]
> Get: 6 http://mirrors.kernel.org squeeze/main 2009-09-28-0316.44.pdiff
> [11.9kB]
> Fetched 111kB in 16s (6,603B/s)
> E: Unable to change to /srv/debirf/rescue/root/ - chdir (2: No such file or
> directory)
> servo:/srv/debirf/rescue 100$
>
> (curiously aptitude does not seem bothered).  I imagine there might be
> an easy fix to this, but more skilled eyes can probably come up with
> one much quicker than I ever could.
>
> Thanks for the help, and thanks for maintaining an important tool.
>
> jamie.
>
>
-- 
 .''`.    Piotr Roszatycki
: :' :    mailto:piotr.roszaty...@gmail.com
`. `'     mailto:dex...@debian.org
  `-

Reply via email to