Changes

Jump to navigation Jump to search
805 bytes removed ,  21:33, 23 February 2010
m
Line 1: Line 1: −
Sugar ought to be easy to run from chroots. For a variety of silly reasons, this isn't yet the case, but it might be soon. Ping [[User:Mstone|Michael]] with questions.
+
=== Status ===
   −
=== Chroot Construction ===
+
* sugar-chroot-0.1 released: see [http://dev.laptop.org/git/users/mstone/sugar-chroot sugar-chroot]
   −
There are lots of ways to create appropriate chroots; e.g. by hand, with debootstrap, with mock, etc.
+
=== Purpose ===
   −
With debootstrap, you want something like
+
''You want to hack sugar. You don't want to fuss around. '''You want sugar-chroot.'''''
   −
  debootstrap --arch i386 sid sid-root http://debian.lcs.mit.edu/debian
+
=== Usage ===
  sudo chroot sid-root /bin/bash -l
     −
With mock, it would be more like
+
As excerpted from the '''[http://dev.laptop.org/git/users/mstone/sugar-chroot/plain/README README]''':
   −
  mock -r fedora-devel-i386 --init
+
sugar-chroot consists of simple scripts. Download and unpack them like so:
  mock -r fedora-devel-i386 --shell
     −
=== X11 ===
+
NV=sugar-chroot-0.1
 +
curl http://dev.laptop.org/~mstone/releases/SOURCES/$NV.tar.xz | tar Zxf $NV.tar.xz
 +
cd $NV
   −
Most X11 servers are configured to disable TCP connections. This means that in order to get a working X connection we can:
+
To use them, pick a supported distro:
   −
# bind-mount the X unix socket into the chroot.
+
DISTRO=debian
# ssh ''into'' the chroot with X11-forwarding enabled.
+
DISTRO=fedora
# enable TCP on an X server, e.g. a nested Xephyr.
     −
We're going to try option (3) first:
+
To configure:
   −
  Xephyr -ac :1
+
echo $DISTRO > conf/distro
 
+
$EDITOR conf/$DISTRO.mk
and, inside the chroot:
     −
  export DISPLAY=localhost:1
+
Then run
   −
::''NB: If you figure out how to make Xephyr bind only to localhost sockets (or how to make it use a custom xauth config), speak up!''
+
sudo make r/distro
   −
=== D-Bus ===
+
to install your chroot.
   −
Sugar wants to be able to use global state stored in both HAL and NetworkManager, both of which live on the system bus. Consequently, we need to bind-mount
+
=== History ===
   −
  mount --bind /var/run/dbus $CHROOT/var/run/dbus
+
See http://wiki.sugarlabs.org/index.php?title=Development_Team/Chroot&oldid=36911 for the manual instructions which sugar-chroot automates.
 
  −
before entering the chroot. (Mock uses unshare() to enter a new mount-point namespace since this makes garbage collection of mountpoints much easier.)
  −
 
  −
With debootstrap, you'll also need to run some of
  −
 
  −
  mount -t proc proc $CHROOT/proc
  −
  mount -t devpts devpts $CHROOT/dev/pts
  −
  mount -t selinuxfs selinux $CHROOT/selinux
  −
 
  −
manually in order to get a working chroot.
 

Navigation menu