-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirefox-build-debootstrap.html
18 lines (18 loc) · 2.21 KB
/
firefox-build-debootstrap.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!doctype html><meta charset=utf-8><title>make</title><meta content="Thomas Duboucher" name=author><meta content="Thomas Duboucher, Serianox,blog" name=keywords><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name=viewport><link href=style.css rel=stylesheet><h1 id=building-firefox-in-a-chroot>Building Firefox in a chroot</h1><p>Something I don’t like is project with tons of build dependencies. They tend to stay and pollute the system. Something I don’t like even more are containers.<p>Let’s work with old school chroot.<h2 id=installing-dependencies>Installing dependencies</h2><pre><code>sudo aptitude install debootstrap schroot</code></pre><h2 id=installing-an-image>Installing an image</h2><p>A recent version of Ubuntu is enough.<pre><code>sudo debootstrap --variant=buildd arch=amd64 artful /srv/chroot/firefox-chroot http://archive.ubuntu.com/ubuntu/</code></pre><h2 id=configuring-and-starting-the-chroot>Configuring and starting the chroot</h2><pre><code>cat <<EOF > /etc/schroot/chroot.d/firefox.conf
[firefox]
description=Firefox
directory=/srv/chroot/firefox-chroot
users=user1
root-users=user1
type=directory
EOF</code></pre><p>We need to enable write access to shared memory, else the build configuration tool will fail.<pre><code>cat <<EOF >> /etc/schroot/default/fstab
/dev/shm /dev/shm none rw,bind 0 0
EOF</code></pre><h2 id=configuring-the-image>Configuring the image</h2><p>The list of sources is missing some lines, so we must add them before installing dependencies. Moreover, the Firefox bootstrap forget to install Clang.<pre><code>cat <<EOF >> /srv/chroot/firefox-chroot/etc/apt/sources.list
deb http://fr.archive.ubuntu.com/ubuntu/ artful-updates main restricted
deb http://fr.archive.ubuntu.com/ubuntu/ artful universe
deb http://fr.archive.ubuntu.com/ubuntu/ artful-updates universe
EOF
sudo schroot -c firefox
apt-get update
apt-get install python clang
exit</code></pre><p>## Starting the chroot<pre><code>schroot -c firefox</code></pre><p>Now you can follow the <a href=https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_build/Linux_and_MacOS_build_preparation>official build steps</a>.