Changes between Version 1 and Version 2 of WebKitGTK/Chroot


Ignore:
Timestamp:
Jun 19, 2013 2:53:55 PM (11 years ago)
Author:
Andres Gomez
Comment:

Added Fixes

Legend:

Unmodified
Added
Removed
Modified
  • WebKitGTK/Chroot

    v1 v2  
    77Working in a `chroot`, however, brings some drawbacks. Here you can find some tips, common problems and solutions.
    88
    9 == Running tests into the chroot ==
    109
    11 WebKitGtkLayoutTests explains how to run WebKit tests.
     10== Problems with shared memory ==
     11
     12Different components and programs may need access to the shared memory and this may lead to some problems.
    1213
    1314=== Running python based test with multiprocess support ===
     15
     16For example, in WebKitGtkLayoutTests it is explained how to run WebKit tests.
    1417
    1518I'm running my development environment in a schroot with Ubuntu in an
     
    6063http://www.boris.co/2012/02/server-ubuntu-11.html
    6164
    62 Python's multithreading requires /dev/shm to work. In Ubuntu /dev/shm
    63 points to /run/shm by default. Rename (or delete, I doubt it is
    64 necessary anymore) existing /dev/shm.
     65Python's ''_multithreading'' requires `/dev/shm` to work.
    6566
    66 Create /dev/shm directory
    6767
    68 {{{
    69 $ sudo -i (become root)
    70 $ mkdir /dev/shm
    71 }}}
     68=== SHM Fix ===
    7269
    73 Add to /etc/fstab mounting of /dev/shm command
     70==== SHM Ubuntu ====
    7471
    75 {{{
    76 tmpfs /dev/shm    tmpfs   defaults,noexec,nosuid     0     0
    77 }}}
     72In Ubuntu `/dev/shm` points to `/run/shm` by default. One of the possible ways of fixing this is the one explained at http://www.boris.co/2012/02/server-ubuntu-11.html
    7873
    79 Mount all unmounted filesystems from /etc/fstab.
    80 
    81 {{{
    82 $ mount -a
    83 }}}
    84 
    85 You may need to do this into your schroot too.
     74However, in order provide a solution that will also cover pulse audio's case a good solution would be to bind mount `/dev` into the chroot and also `/run/shm`
    8675
    8776
    8877== Pulse Audio ==
    8978
     79In order to have the audio output working correctly pulse audio working in the chroot is not strictly needed. GStreamer, through the `playbin2` element, tries to use `pulsesink` as audio sink but will fall to `alsasink` if `pulsesink` fails. In case the local pulse audio daemon is not making use of the audio device, alsa will work without problems in the chroot.
     80
     81In any case, having pulse audio working in the `chroot` would be nice. The complete information about this can be found at http://www.freedesktop.org/wiki/Software/PulseAudio/FAQ/#index36h3
     82
     83=== Pulse Fix ===
     84
     85==== Pulse Ubuntu ====
     86
     87First, we have to make work `/dev/shm` following the instructions [wiki:WebKitGTK/Chroot#SHM_Ubuntu above].
     88
     89We also need to mount bind `/var/lib/dbus` , `~/.pulse` and `/tmp`.
     90
     91For example, this is my working `fstab` file using `schroot`:
     92{{{
     93#!sh
     94$ cat /etc/schroot/webkit/fstab
     95# fstab: static file system information for chroots.
     96# Note that the mount point will be prefixed by the chroot path
     97# (CHROOT_PATH)
     98#
     99# <file system> <mount point>   <type>  <options>       <dump>  <pass>
     100/proc           /proc           none    rw,bind         0       0
     101/sys            /sys            none    rw,bind         0       0
     102/dev            /dev            none    rw,bind         0       0
     103/home           /home           none    rw,bind         0       0
     104/tmp            /tmp            none    rw,bind         0       0
     105
     106# Added
     107
     108/var/lib/dbus   /var/lib/dbus   none    rw,bind         0       0
     109/run/shm        /run/shm        none    rw,bind         0       0
     110devpts          /dev/pts        devpts  gid=5,mode=620  0       0
     111/opt/my-webkit-home /home/user  none    rw,bind         0       0
     112/home/user/.pulse /home/user/.pulse none rw,bind        0       0
     113}}}