Skip to content
Piotr Roszatycki edited this page Nov 3, 2013 · 26 revisions

logo

Home | Download | Documentation | ChangeLog | Development | ToDo | Links

Build Status

What is it?

fakechroot runs a command in an environment were is additional possibility to use chroot(8) command without root privileges. This is useful for allowing users to create own chrooted environment with possibility to install another packages without need for root privileges.

News

11 Dec 2011

Version 2.16 is released. The fakechroot script loads additional environment settings from configuration directory (--config-dir option). By default additional settings are provided for chroot(8) and debootstrap(8) commands. Wrapped chroot(8) command loads ld.so.conf paths to LD_LIBRARY_PATH environment variable. Fixes were made for getpeeraddr(3) and getsockaddr(3) functions.

29 Sep 2011

Version 2.15 is released. New function faccessat(2) was added: it fixes test -r command. The popen(3) function were reimplemented based on OpenBSD source to prevent some coredumps with newer GNU C Library.

16 Dec 2010

Version 2.14 is released. The source code was refactored: all functions was moved to separated files. The opendir(3) function is compiled only if it doesn't call other function internally. It fixes opendir(3), fts_open(3) and ftw(3) functions. The fts_*(3) functions were reimplemented based on OpenBSD source. The __opendir2(3) function was reimplemented based on FreeBSD source. Fixes were made for older GNU C Library.

How does it work?

fakechroot replaces more library functions (chroot(2), open(2), etc.) by ones that simulate the effect the real library functions would have had, had the user really been in chroot. These wrapper functions are in a shared library /usr/lib/fakechroot/libfakechroot.so which is loaded through the LD_PRELOAD mechanism of the dynamic loader. (See ld.so(8))

In fake chroot you can install Debian bootstrap with debootstrap --variant=fakechroot command. In this environment you can use i.e. apt-get(8) command to install another packages from common user's account.

Where is it used?

fakechroot is mainly used as:

  • a variant of debootstrap, the tool which can set up new Debian or Ubuntu system.
  • a helper for febootstrap, the tool which can set up new Fedora system.

fakechroot had found another purposes:

  • to be a part of Klik application installer as kfakechroot project
  • to be a supporter for pbuilder building system
  • to be a supporter for Apport retracer
  • to be a supporter for libguestfs tools for accessing and modifying virtual machine disk images
  • to be a part of Slind - a minimal Debian-based distro for embedded devices as libfakechroot-cross project
Clone this wiki locally