Firefox

From John's wiki
Revision as of 06:27, 20 January 2020 by Sixsigma (talk | contribs)
Jump to navigation Jump to search

https://github.com/mozilla/gecko-dev

bootstrap.py

jj5@jj-dev:~$ uname -m
x86_64
jj5@jj-dev:~$ python --version
Python 2.7.17
jj5@jj-dev:~$ python3 --version
Python 3.6.9
jj5@jj-dev:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           394M  1.1M  393M   1% /run
/dev/sda1        98G   16G   78G  18% /
tmpfs           2.0G  177M  1.8G   9% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
tmpfs           394M   12K  394M   1% /run/user/1000
jj5@jj-dev:~$ mkdir /var/export/jj-dev/src
jj5@jj-dev:~$ ln -s /var/export/jj-dev/src .
jj5@jj-dev:~$ cd src
jj5@jj-dev:~/src$ vim get-bootstrap.py.sh
jj5@jj-dev:~/src$ chmod +x get-bootstrap.py.sh 
jj5@jj-dev:~/src$ ./get-bootstrap.py.sh 
--2020-01-20 06:15:58--  https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py
Resolving hg.mozilla.org (hg.mozilla.org)... 63.245.208.203
Connecting to hg.mozilla.org (hg.mozilla.org)|63.245.208.203|:443... connected.
HTTP request sent, awaiting response... 200 Script output follows
Length: 7064 (6.9K) [text/x-python]
Saving to: 'bootstrap.py’

bootstrap.py          100%[=========================>]   6.90K  --.-KB/s    in 0s      

2020-01-20 06:16:00 (45.5 MB/s) - 'bootstrap.py’ saved [7064/7064]
jj5@jj-dev:~/src$ ll
total 20K
drwxrwxr-x 2 jj5 jj5 4.0K Jan 20 06:16 ./
drwxr-xr-x 6 jj5 jj5 4.0K Jan 20 06:14 ../
-rw-rw-r-- 1 jj5 jj5 6.9K Jan 20 06:16 bootstrap.py
-rwxrwxr-x 1 jj5 jj5  107 Jan 20 06:15 get-bootstrap.py.sh*
jj5@jj-dev:~/src$ chmod +x bootstrap.py 
jj5@jj-dev:~/src$ ./bootstrap.py 

Note on Artifact Mode:

Artifact builds download prebuilt C++ components rather than building
them locally. Artifact builds are faster!

Artifact builds are recommended for people working on Firefox or
Firefox for Android frontends, or the GeckoView Java API. They are unsuitable
for those working on C++ code. For more information see:
https://developer.mozilla.org/en-US/docs/Artifact_builds.

Please choose the version of Firefox you want to build:
  1. Firefox for Desktop Artifact Mode
  2. Firefox for Desktop
  3. GeckoView/Firefox for Android Artifact Mode
  4. GeckoView/Firefox for Android
Your choice: 2
Executing as root: sudo apt-get install autoconf2.13 build-essential nodejs python-dev python-pip python-setuptools unzip uuid zip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.4ubuntu1).
unzip is already the newest version (6.0-21ubuntu1).
zip is already the newest version (3.0-11build1).
nodejs is already the newest version (8.10.0~dfsg-2ubuntu0.4).
The following additional packages will be installed:
  libexpat1-dev libossp-uuid16 libpython-all-dev libpython-dev libpython2.7-dev
  python-all python-all-dev python-asn1crypto python-cffi-backend python-crypto
  python-cryptography python-idna python-ipaddress python-keyring python-keyrings.alt
  python-pip-whl python-secretstorage python-wheel python-xdg python2.7-dev
Suggested packages:
  gnu-standards python-crypto-doc python-cryptography-doc python-cryptography-vectors
  gir1.2-gnomekeyring-1.0 python-fs python-gdata python-keyczar
  python-secretstorage-doc python-setuptools-doc
The following NEW packages will be installed:
  autoconf2.13 libexpat1-dev libossp-uuid16 libpython-all-dev libpython-dev
  libpython2.7-dev python-all python-all-dev python-asn1crypto python-cffi-backend
  python-crypto python-cryptography python-dev python-idna python-ipaddress
  python-keyring python-keyrings.alt python-pip python-pip-whl python-secretstorage
  python-setuptools python-wheel python-xdg python2.7-dev uuid
0 to upgrade, 25 to newly install, 0 to remove and 0 not to upgrade.
Need to get 31.8 MB of archives.
After this operation, 52.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

...

Executing as root: sudo apt-get install libasound2-dev libcurl4-openssl-dev libdbus-1-dev libdbus-glib-1-dev libgtk-3-dev libgtk2.0-dev libpulse-dev libx11-xcb-dev libxt-dev python-dbus xvfb yasm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libxt-dev is already the newest version (1:1.1.5-1).
libxt-dev set to manually installed.
python-dbus is already the newest version (1.2.6-1).
The following additional packages will be installed:
  gir1.2-gtk-2.0 libatk-bridge2.0-dev libatk1.0-dev libatspi2.0-dev
  libcairo-script-interpreter2 libcairo2-dev libdrm-dev libegl1-mesa-dev libepoxy-dev
  libfontconfig1-dev libfreetype6-dev libgdk-pixbuf2.0-dev libgles1 libglvnd-core-dev
  libglvnd-dev libopengl0 libpango1.0-dev libpixman-1-dev libpng-dev libpng-tools
  libwayland-bin libwayland-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev
  libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev
  libxcb-shm0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcomposite-dev libxcursor-dev
  libxdamage-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev
  libxkbcommon-dev libxrandr-dev libxrender-dev libxshmfence-dev libxtst-dev
  libxxf86vm-dev mesa-common-dev wayland-protocols x11proto-composite-dev
  x11proto-damage-dev x11proto-fixes-dev x11proto-input-dev x11proto-randr-dev
  x11proto-record-dev x11proto-xext-dev x11proto-xf86vidmode-dev x11proto-xinerama-dev
Suggested packages:
  libasound2-doc libcairo2-doc libcurl4-doc libidn11-dev libkrb5-dev libldap2-dev
  librtmp-dev libssh2-1-dev libgtk-3-doc libgtk2.0-doc libpango1.0-doc libwayland-doc
  libxext-doc
The following NEW packages will be installed:
  gir1.2-gtk-2.0 libasound2-dev libatk-bridge2.0-dev libatk1.0-dev libatspi2.0-dev
  libcairo-script-interpreter2 libcairo2-dev libcurl4-openssl-dev libdbus-1-dev
  libdbus-glib-1-dev libdrm-dev libegl1-mesa-dev libepoxy-dev libfontconfig1-dev
  libfreetype6-dev libgdk-pixbuf2.0-dev libgles1 libglvnd-core-dev libglvnd-dev
  libgtk-3-dev libgtk2.0-dev libopengl0 libpango1.0-dev libpixman-1-dev libpng-dev
  libpng-tools libpulse-dev libwayland-bin libwayland-dev libx11-xcb-dev
  libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev libxcb-present-dev
  libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-shm0-dev
  libxcb-sync-dev libxcb-xfixes0-dev libxcomposite-dev libxcursor-dev libxdamage-dev
  libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxkbcommon-dev
  libxrandr-dev libxrender-dev libxshmfence-dev libxtst-dev libxxf86vm-dev
  mesa-common-dev wayland-protocols x11proto-composite-dev x11proto-damage-dev
  x11proto-fixes-dev x11proto-input-dev x11proto-randr-dev x11proto-record-dev
  x11proto-xext-dev x11proto-xf86vidmode-dev x11proto-xinerama-dev xvfb yasm
0 to upgrade, 67 to newly install, 0 to remove and 0 not to upgrade.
Need to get 12.4 MB of archives.
After this operation, 69.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

...

You do not have Mercurial installed

Mercurial releases a new version every 3 months and your distro's package
may become out of date. This may cause incompatibility with some
Mercurial extensions that rely on new Mercurial features. As a result,
you may not have an optimal version control experience.

To have the best Mercurial experience possible, we recommend installing
Mercurial via the "pip" Python packaging utility. This will likely result
in files being placed in /usr/local/bin and /usr/local/lib.

How would you like to continue?
  1. Install a modern Mercurial via pip (recommended)
  2. Install a legacy Mercurial via apt
  3. Do not install Mercurial
Your choice: 1
Executing as root: sudo pip install --upgrade Mercurial
The directory '/home/jj5/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/jj5/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting Mercurial
  Downloading https://files.pythonhosted.org/packages/f7/25/f0dba6943dfead28c07e0356f627cf4cd98842c6760593f1ea4115097ead/mercurial-5.2.2.tar.gz (7.3MB)
    100% |████████████████████████████████| 7.3MB 264kB/s
Installing collected packages: Mercurial
  Running setup.py install for Mercurial ... done
Successfully installed Mercurial-5.2.2
Your version of Python (2.7.17) is new enough.
Could not find a Rust compiler.
Will try to install Rust.
Downloading rustup-init... Ok
Running rustup-init...
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2019-12-19, rust version 1.40.0 (73528e339 2019-12-16)
info: downloading component 'rustc'
 57.8 MiB /  57.8 MiB (100 %)  10.9 MiB/s ETA:   0 s
info: downloading component 'rust-std'
 18.5 MiB /  18.5 MiB (100 %)  11.0 MiB/s ETA:   0 s
info: downloading component 'cargo'
info: downloading component 'rust-docs'
 11.9 MiB /  11.9 MiB (100 %)  10.9 MiB/s ETA:   0 s
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'cargo'
info: installing component 'rust-docs'
info: default toolchain set to 'stable'

  stable installed - rustc 1.40.0 (73528e339 2019-12-16)


Rust installation complete. You should now have rustc and cargo
in /home/jj5/.cargo/bin

The installer tries to add these to your default shell PATH, so
restarting your shell and running this script again may work.
If it doesn't, you'll need to add the new command location
manually.

If restarting doesn't work, edit your shell initialization
script, which may be called ~/.bashrc or ~/.bash_profile or
~/.profile, and add the following line:

    source /home/jj5/.cargo/env

Then restart your shell and run the bootstrap script again.

The Firefox build system and related tools store shared, persistent state
in a common directory on the filesystem. On this machine, that directory
is:

  /home/jj5/.mozbuild

If you would like to use a different directory, hit CTRL+c and set the
MOZBUILD_STATE_PATH environment variable to the directory you'd like to
use and re-run the bootstrapper.

Would you like to create this directory? (Yn): Y
Firefox can be cloned using either Git or Mercurial.

Please choose the VCS you want to use:
1. Mercurial
2. Git
Your choice: 1