Changes between Version 1 and Version 2 of WebKitGTK/Chroot
- Timestamp:
- Jun 19, 2013, 2:53:55 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WebKitGTK/Chroot
v1 v2 7 7 Working in a `chroot`, however, brings some drawbacks. Here you can find some tips, common problems and solutions. 8 8 9 == Running tests into the chroot ==10 9 11 WebKitGtkLayoutTests explains how to run WebKit tests. 10 == Problems with shared memory == 11 12 Different components and programs may need access to the shared memory and this may lead to some problems. 12 13 13 14 === Running python based test with multiprocess support === 15 16 For example, in WebKitGtkLayoutTests it is explained how to run WebKit tests. 14 17 15 18 I'm running my development environment in a schroot with Ubuntu in an … … 60 63 http://www.boris.co/2012/02/server-ubuntu-11.html 61 64 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. 65 Python's ''_multithreading'' requires `/dev/shm` to work. 65 66 66 Create /dev/shm directory67 67 68 {{{ 69 $ sudo -i (become root) 70 $ mkdir /dev/shm 71 }}} 68 === SHM Fix === 72 69 73 Add to /etc/fstab mounting of /dev/shm command 70 ==== SHM Ubuntu ==== 74 71 75 {{{ 76 tmpfs /dev/shm tmpfs defaults,noexec,nosuid 0 0 77 }}} 72 In 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 78 73 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. 74 However, 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` 86 75 87 76 88 77 == Pulse Audio == 89 78 79 In 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 81 In 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 87 First, we have to make work `/dev/shm` following the instructions [wiki:WebKitGTK/Chroot#SHM_Ubuntu above]. 88 89 We also need to mount bind `/var/lib/dbus` , `~/.pulse` and `/tmp`. 90 91 For 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 110 devpts /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 }}}