Debian Bug report logs - #611156
under fakechroot, mknod fails if given a full path

version graph

Package: fakechroot; Maintainer for fakechroot is Piotr Roszatycki <dexter@debian.org>; Source for fakechroot is src:fakechroot.

Reported by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>

Date: Wed, 26 Jan 2011 04:00:02 UTC

Severity: important

Tags: patch

Found in version fakechroot/2.14-1

Fixed in version fakechroot/2.15-1

Done: Piotr Roszatycki <dexter@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, dkg@fifthhorseman.net, Piotr Roszatycki <dexter@debian.org>:
Bug#611156; Package fakechroot. (Wed, 26 Jan 2011 04:00:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Kahn Gillmor <dkg@fifthhorseman.net>:
New Bug report received and forwarded. Copy sent to dkg@fifthhorseman.net, Piotr Roszatycki <dexter@debian.org>. (Wed, 26 Jan 2011 04:00:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: under fakechroot, mknod fails if given a full path
Date: Tue, 25 Jan 2011 22:56:37 -0500
[Message part 1 (text/plain, inline)]
Package: fakechroot
Version: 2.14-1
Severity: important

If i try to "fakeroot fakechroot mknod /dev/ttyS0 c 4 64" with
fakechroot 2.14-1, i get this error:

   /bin/mknod: `/dev/ttyS0': No such file or directory

I don't get the error if i use relative (not absolute) paths.  And i
also don't get the error with version 2.9-1.1 (the version in squeeze).

attached is a log with the strace, showing that the chroot prefix is
somehow being doubly prepended:

[pid 20915] open("/home/dkg/tmp/home/dkg/tmp/dev/ttyS0", O_WRONLY|O_CREAT|O_TRUNC, 0644) = -1 ENOENT (No such file or directory)

Thanks for maintaining fakechroot in debian,

       --dkg

-- System Information:
Debian Release: 6.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages fakechroot depends on:
ii  libc6                         2.11.2-9   Embedded GNU C Library: Shared lib

fakechroot recommends no packages.

Versions of packages fakechroot suggests:
pn  libc6-amd64                   <none>     (no description available)

-- no debconf information
[bug.log (text/plain, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, dkg@fifthhorseman.net, Piotr Roszatycki <dexter@debian.org>:
Bug#611156; Package fakechroot. (Wed, 26 Jan 2011 04:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Kahn Gillmor <dkg@fifthhorseman.net>:
Extra info received and forwarded to list. Copy sent to dkg@fifthhorseman.net, Piotr Roszatycki <dexter@debian.org>. (Wed, 26 Jan 2011 04:30:03 GMT) Full text and rfc822 format available.

Message #10 received at 611156@bugs.debian.org (full text, mbox):

From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Debian Bug Tracking System <611156@bugs.debian.org>
Subject: Re: fakechroot, mknod fails if given a full path
Date: Tue, 25 Jan 2011 23:25:53 -0500
Package: fakechroot
Version: 2.14-1
Severity: normal

here is me running the same command with FAKECHROOT_DEBUG:

0 dkg@i386:~$ FAKECHROOT_DEBUG=1 fakeroot fakechroot /usr/sbin/chroot tmp mknod /dev/ttyS1 c 4 65
fakechroot: fakechroot_init()
fakechroot: fopen("/etc/passwd", "rme")
fakechroot: bindtextdomain("coreutils", "/usr/share/locale")
fakechroot: chroot("tmp")
fakechroot: chdir("/")
fakechroot: execvp("mknod", {"mknod", ...})
fakechroot: execve("/usr/local/bin/mknod", {"mknod", ...}, {"USER=dkg", ...})
fakechroot: execve("/usr/bin/mknod", {"mknod", ...}, {"USER=dkg", ...})
fakechroot: execve("/bin/mknod", {"mknod", ...}, {"USER=dkg", ...})
fakechroot: statfs64("/selinux", &buf)
fakechroot: fakechroot_init()
fakechroot: fopen("/etc/passwd", "rme")
fakechroot: fopen64("/proc/filesystems", "r")
fakechroot: fakechroot_init()
fakechroot: bindtextdomain("coreutils", "/usr/share/locale")
fakechroot: __xmknod(1, "/dev/ttyS1", 020666d, &dev)
fakechroot: open("/home/dkg/tmp/dev/ttyS1", 577, ...)
mknod: `/dev/ttyS1': No such file or directory
1 dkg@i386:~$ exit


so maybe the problem is in __xmknod?

      --dkg

-- System Information:
Debian Release: 6.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages fakechroot depends on:
ii  libc6                         2.11.2-9   Embedded GNU C Library: Shared lib

fakechroot recommends no packages.

Versions of packages fakechroot suggests:
pn  libc6-amd64                   <none>     (no description available)

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, dexter@debian.org, Piotr Roszatycki <dexter@debian.org>:
Bug#611156; Package fakechroot. (Mon, 20 Jun 2011 13:45:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Johannes Schauer <j.schauer@email.de>:
Extra info received and forwarded to list. Copy sent to dexter@debian.org, Piotr Roszatycki <dexter@debian.org>. (Mon, 20 Jun 2011 13:45:04 GMT) Full text and rfc822 format available.

Message #15 received at 611156@bugs.debian.org (full text, mbox):

From: Johannes Schauer <j.schauer@email.de>
To: Debian Bug Tracking System <611156@bugs.debian.org>
Subject: fakechroot patch trying to solve the double path prepend issue
Date: Mon, 20 Jun 2011 15:43:41 +0200
[Message part 1 (text/plain, inline)]
Package: fakechroot
Version: 2.14-1
Severity: normal

While I can confirm the reported behaviour, I ran into a very similar
issue when using fakechroot with a foreign armhf build. Using strace I
found that fakechroot put a double chroot path when access and
subsequently fstat was called.

Strangely that issue is not existant on other platforms. This problem
does for example not occur with armel and amd64 rootfs.

So while the mknod problem persists on all three architectures (didnt
test others), the fstat problem is only on armhf.

I do not know where the error comes from but I attached a patch that
solved both issues for me. It just adds a check to expand_chroot_path
whether the path really has to be expanded or (for a reason unknown to
me) already comes with the fakechroot_path prepended.

I hope the patch doesnt break anything else and can be applied by you?

If the patch is bad, how else would one fix the issue?

cheers, josch
[expand_chroot_path.patch (text/x-diff, attachment)]

Added tag(s) patch. Request was from Geert Stappers <stappers@stappers.nl> to control@bugs.debian.org. (Thu, 30 Jun 2011 21:42:02 GMT) Full text and rfc822 format available.

Reply sent to Piotr Roszatycki <dexter@debian.org>:
You have taken responsibility. (Mon, 03 Oct 2011 21:21:08 GMT) Full text and rfc822 format available.

Notification sent to Daniel Kahn Gillmor <dkg@fifthhorseman.net>:
Bug acknowledged by developer. (Mon, 03 Oct 2011 21:21:10 GMT) Full text and rfc822 format available.

Message #22 received at 611156-close@bugs.debian.org (full text, mbox):

From: Piotr Roszatycki <dexter@debian.org>
To: 611156-close@bugs.debian.org
Subject: Bug#611156: fixed in fakechroot 2.15-1
Date: Mon, 03 Oct 2011 21:17:38 +0000
Source: fakechroot
Source-Version: 2.15-1

We believe that the bug you reported is fixed in the latest version of
fakechroot, which is due to be installed in the Debian FTP archive:

fakechroot_2.15-1.debian.tar.gz
  to main/f/fakechroot/fakechroot_2.15-1.debian.tar.gz
fakechroot_2.15-1.dsc
  to main/f/fakechroot/fakechroot_2.15-1.dsc
fakechroot_2.15-1_all.deb
  to main/f/fakechroot/fakechroot_2.15-1_all.deb
fakechroot_2.15.orig.tar.gz
  to main/f/fakechroot/fakechroot_2.15.orig.tar.gz
libfakechroot_2.15-1_i386.deb
  to main/f/fakechroot/libfakechroot_2.15-1_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 611156@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Piotr Roszatycki <dexter@debian.org> (supplier of updated fakechroot package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Fri, 30 Sep 2011 14:07:46 +0200
Source: fakechroot
Binary: fakechroot libfakechroot
Architecture: source all i386
Version: 2.15-1
Distribution: unstable
Urgency: low
Maintainer: Piotr Roszatycki <dexter@debian.org>
Changed-By: Piotr Roszatycki <dexter@debian.org>
Description: 
 fakechroot - gives a fake chroot environment - utilities
 libfakechroot - gives a fake chroot environment - runtime
Closes: 611156 632954 635625 637119 641079
Changes: 
 fakechroot (2.15-1) unstable; urgency=low
 .
   * New upstream release:
     - New function faccessat(2) was added.  It fixes "test -r" command.
       Thanks to Johannes Schauer.  Closes: #641079.
     - The popen(3) function were reimplemented based on OpenBSD source to
       prevent some coredumps with newer GNU C Library.  Closes: #637119.
     - Manpage explains that fakeroot should be called in the fakechroot
       environment to prevent some problems with incorrect order of preloaded
       libraries.  Closes: #611156.
   * Multiarch support.  Splitting package into fakechroot and libfakechroot.
     Thanks to Johannes Schauer.  Closes: #632954, #635625
   * Attached example for debootstrap usage to fakechroot package.
Checksums-Sha1: 
 fe2d57fefd70f77bdab13ada2c998323d636b3aa 1231 fakechroot_2.15-1.dsc
 716773da43ca3c4317e21500cf8c5ddba9b80f86 413609 fakechroot_2.15.orig.tar.gz
 1726baf9e0819c2af6258b43830aa0a80f3667bb 7740 fakechroot_2.15-1.debian.tar.gz
 c8ba9bb7e9268d86af2616680e76974e39ce6238 22022 fakechroot_2.15-1_all.deb
 81f128eda446b9a555cc42a7a6c2164889d2e6eb 42652 libfakechroot_2.15-1_i386.deb
Checksums-Sha256: 
 05c219130dc0618c07caed90f5c65869676a88a1e59642e0b8b3cb807c52ba99 1231 fakechroot_2.15-1.dsc
 ce184d359212085ce4e02639f6740aac22b26896fb06f3e54941d125939d584c 413609 fakechroot_2.15.orig.tar.gz
 b4f8d5461cbf9451d356d135f38258ee41d20c2d8ac20ceb7c8886bd44b7054c 7740 fakechroot_2.15-1.debian.tar.gz
 3261ed4d1b55eac6806437590754527e8c516c6ac1817dd526a25bec19ae3b56 22022 fakechroot_2.15-1_all.deb
 42e4835dc5506084e6d721f645991223542e771051ccbcdfe5b664d78b1adfb5 42652 libfakechroot_2.15-1_i386.deb
Files: 
 d2717c5cca18f98be187bd5890d5a244 1231 utils optional fakechroot_2.15-1.dsc
 ce8bdde1d30274e124e8ecf8f59681ff 413609 utils optional fakechroot_2.15.orig.tar.gz
 fba0b9ab189ba51f32cdb6f5aa6636b1 7740 utils optional fakechroot_2.15-1.debian.tar.gz
 6f438af9360b3d1219a2600b29af430d 22022 utils optional fakechroot_2.15-1_all.deb
 160182537ac3286d89072fb53964e980 42652 utils optional libfakechroot_2.15-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk6Fub8ACgkQhMHHe8CxCltCSQCg8sHYWpd8KPMEr0IyMzIYbnlP
M0QAn1zQcd65wQNu5cGHUS/ifTOuI8Vy
=sLhg
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 11 Nov 2011 07:34:53 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 18:26:36 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.