[f939f05] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[f939f05] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[2eae5bc] | 7 | <!ENTITY firefox-download-http "&mozilla-http;/firefox/releases/&firefox-version;esr/source/firefox-&firefox-version;esr.source.tar.xz">
|
---|
[8dfc5c3] | 8 | <!ENTITY firefox-download-ftp " ">
|
---|
[253d1ce] | 9 | <!ENTITY firefox-md5sum "ec12a707c129a98fb957e4123eadce84">
|
---|
| 10 | <!ENTITY firefox-size "319 MB">
|
---|
[5c2b024] | 11 | <!-- NB with stylo, much of the build uses rust, and therefore cargo files.
|
---|
[9da4cc6f] | 12 | But the extra cached cargo files, if any, seem to be minimal -->
|
---|
[253d1ce] | 13 | <!ENTITY firefox-buildsize "5.0 GB (185 MB installed) without tests">
|
---|
[9a469bc] | 14 | <!-- editors: with ff63 and rust-1.29, ./mach build -j4 is probably the
|
---|
[fe5f563d] | 15 | most practical way to get a timing on a machine with more cores, if taking
|
---|
| 16 | cores offline is not practical. If in doubt, round up -->
|
---|
[253d1ce] | 17 | <!ENTITY firefox-time "29 SBU (on a 4-core machine) without tests">
|
---|
[f939f05] | 18 | ]>
|
---|
| 19 |
|
---|
[ffe47ca2] | 20 | <sect1 id="firefox" xreflabel="Firefox-&firefox-version;">
|
---|
[b81991e1] | 21 | <?dbhtml filename="firefox.html" ?>
|
---|
| 22 |
|
---|
| 23 | <sect1info>
|
---|
| 24 | <othername>$LastChangedBy$</othername>
|
---|
| 25 | <date>$Date$</date>
|
---|
| 26 | </sect1info>
|
---|
| 27 |
|
---|
| 28 | <title>Firefox-&firefox-version;</title>
|
---|
| 29 |
|
---|
| 30 | <indexterm zone="firefox">
|
---|
| 31 | <primary sortas="a-Firefox">Firefox</primary>
|
---|
| 32 | </indexterm>
|
---|
| 33 |
|
---|
| 34 | <sect2 role="package">
|
---|
| 35 | <title>Introduction to Firefox</title>
|
---|
| 36 |
|
---|
[c1ae13c] | 37 | <para>
|
---|
| 38 | <application>Firefox</application> is a stand-alone browser based on the
|
---|
| 39 | <application>Mozilla</application> codebase.
|
---|
| 40 | </para>
|
---|
[b81991e1] | 41 |
|
---|
[193af65e] | 42 | &lfs10_checked;
|
---|
[76ae9a2] | 43 |
|
---|
[b81991e1] | 44 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 45 | <itemizedlist spacing="compact">
|
---|
| 46 | <listitem>
|
---|
[c1ae13c] | 47 | <para>
|
---|
| 48 | Download (HTTP): <ulink url="&firefox-download-http;"/>
|
---|
| 49 | </para>
|
---|
[b81991e1] | 50 | </listitem>
|
---|
| 51 | <listitem>
|
---|
[c1ae13c] | 52 | <para>
|
---|
| 53 | Download (FTP): <ulink url="&firefox-download-ftp;"/>
|
---|
| 54 | </para>
|
---|
[b81991e1] | 55 | </listitem>
|
---|
| 56 | <listitem>
|
---|
[c1ae13c] | 57 | <para>
|
---|
| 58 | Download MD5 sum: &firefox-md5sum;
|
---|
| 59 | </para>
|
---|
[b81991e1] | 60 | </listitem>
|
---|
| 61 | <listitem>
|
---|
[c1ae13c] | 62 | <para>
|
---|
| 63 | Download size: &firefox-size;
|
---|
| 64 | </para>
|
---|
[b81991e1] | 65 | </listitem>
|
---|
| 66 | <listitem>
|
---|
[c1ae13c] | 67 | <para>
|
---|
| 68 | Estimated disk space required: &firefox-buildsize;
|
---|
| 69 | </para>
|
---|
[b81991e1] | 70 | </listitem>
|
---|
| 71 | <listitem>
|
---|
[c1ae13c] | 72 | <para>
|
---|
| 73 | Estimated build time: &firefox-time;
|
---|
| 74 | </para>
|
---|
[b81991e1] | 75 | </listitem>
|
---|
| 76 | </itemizedlist>
|
---|
| 77 |
|
---|
[bf5fb94] | 78 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 79 | <itemizedlist spacing="compact">
|
---|
| 80 | <listitem>
|
---|
| 81 | <para>
|
---|
| 82 | Required patch:
|
---|
| 83 | <ulink url="&patch-root;/firefox-&firefox-version;esr-rustc1470-1.patch"/>
|
---|
| 84 | </para>
|
---|
| 85 | </listitem>
|
---|
| 86 | </itemizedlist>
|
---|
| 87 |
|
---|
[f06c692] | 88 | <note>
|
---|
[2eae5bc] | 89 | <para>
|
---|
| 90 | The directory name is firefox-&firefox-version;
|
---|
| 91 | </para>
|
---|
| 92 |
|
---|
[f06c692] | 93 | <para>
|
---|
[8d0bc761] | 94 | Extracting the tarball
|
---|
| 95 | will reset the permissions of the current directory to 0755 if you
|
---|
[765c2a7] | 96 | have permission to do that. If you do this in a directory where
|
---|
[37bf7b1] | 97 | the sticky bit is set, such
|
---|
[dc9a18a] | 98 | as <filename class="directory">/tmp</filename> it will end with error
|
---|
| 99 | messages:
|
---|
| 100 | </para>
|
---|
| 101 |
|
---|
| 102 | <literallayout>tar: .: Cannot utime: Operation not permitted
|
---|
| 103 | tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
|
---|
| 104 | tar: Exiting with failure status due to previous errors
|
---|
| 105 | </literallayout>
|
---|
| 106 |
|
---|
| 107 | <para>
|
---|
| 108 | This does finish with non-zero status, but it does
|
---|
| 109 | <emphasis>NOT</emphasis> mean there is a real problem.
|
---|
| 110 | Do not untar as the <systemitem class="username">root</systemitem> user
|
---|
| 111 | in a directory where the sticky bit is set - that will unset it.
|
---|
[f06c692] | 112 | </para>
|
---|
[8d0bc761] | 113 |
|
---|
| 114 | <para>
|
---|
[406e5ffe] | 115 | As with other large packages which use C++ (or rust), the SBU times
|
---|
[d5d7cd6] | 116 | to build this vary more widely than you might expect. The build times
|
---|
| 117 | will increase significantly if your machine has to swap.
|
---|
[8d0bc761] | 118 | </para>
|
---|
| 119 |
|
---|
[d5d7cd6] | 120 | <!-- commented, by 78.0 it seems to work reliably
|
---|
[e628b536] | 121 | <para>
|
---|
| 122 | The mach build system (Python scripts) can be somewhat unreliable: if
|
---|
| 123 | the build fails and reports an Error, it can still return a status of
|
---|
| 124 | success, causing a scripted build to try to install (which does not rerun
|
---|
| 125 | the build), fail during the preparations for installing, but still exit
|
---|
| 126 | with a status of success. Also, on occasion it may limit itself to only
|
---|
| 127 | running one set of jobs - that will make the build take about 3 times as
|
---|
| 128 | long as running with four sets of jobs.
|
---|
[d5d7cd6] | 129 | </para>-->
|
---|
[e628b536] | 130 |
|
---|
[8d0bc761] | 131 | <para>
|
---|
| 132 | Although upstream prefer to use <application>PulseAudio</application>,
|
---|
| 133 | for the moment <application>Alsa</application> can still be used. Both
|
---|
| 134 | may need runtime configuration to get sound working.
|
---|
| 135 | </para>
|
---|
[f06c692] | 136 | </note>
|
---|
| 137 |
|
---|
[b81991e1] | 138 | <bridgehead renderas="sect3">Firefox Dependencies</bridgehead>
|
---|
| 139 |
|
---|
| 140 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[c1ae13c] | 141 | <para role="required">
|
---|
[14de4227] | 142 | <xref linkend="autoconf213"/>,
|
---|
[44cd41e] | 143 | <xref linkend="cbindgen"/>,
|
---|
[703f0ce] | 144 | <xref linkend="dbus-glib"/>,
|
---|
[ac105103] | 145 | both <xref linkend="gtk3"/> and
|
---|
[9da4cc6f] | 146 | <xref linkend="gtk2"/>,
|
---|
[326f830] | 147 | <xref linkend="libnotify"/>,
|
---|
[74762a5] | 148 | <xref linkend="llvm"/> (clang, used for bindgen even if using gcc),
|
---|
[fe5f563d] | 149 | <xref linkend="nodejs"/>,
|
---|
[59a6b63] | 150 | <xref linkend="nss"/>,
|
---|
[be0bd12] | 151 | <xref linkend="pulseaudio"/>
|
---|
[81b3e7fd] | 152 | (or
|
---|
[9da4cc6f] | 153 | <xref linkend="alsa-lib"/> if you edit the mozconfig;
|
---|
[326f830] | 154 | now deprecated by mozilla), in either case please read the
|
---|
| 155 | Configuration Information,
|
---|
[d5d7cd6] | 156 | <!-- rustc is required by cbindgen so not needed here
|
---|
| 157 | <xref linkend="rust"/>,-->
|
---|
[693f28e1] | 158 | <xref linkend="python3"/> (rebuilt after installing <xref linkend="sqlite"/>),
|
---|
[d5d7cd6] | 159 | <xref linkend="startup-notification"/>,
|
---|
[59a6b63] | 160 | <xref linkend="unzip"/>,
|
---|
[479e03a] | 161 | <xref linkend="yasm"/>, and
|
---|
| 162 | <xref linkend="zip"/>
|
---|
[c1ae13c] | 163 | </para>
|
---|
| 164 |
|
---|
[1555d3d] | 165 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
[c1ae13c] | 166 | <para role="recommended">
|
---|
[b84fe71] | 167 | <xref linkend="icu"/>,
|
---|
[0e37869] | 168 | <xref linkend="libevent"/>,
|
---|
[e399c12] | 169 | <xref linkend="libwebp"/>,
|
---|
[d5d7cd6] | 170 | <xref linkend="nasm"/>
|
---|
[c1ae13c] | 171 | </para>
|
---|
[1555d3d] | 172 |
|
---|
[0e37869] | 173 | <note>
|
---|
| 174 | <para>
|
---|
[b9f61df] | 175 | If you don't install recommended dependencies, then internal copies of
|
---|
| 176 | those packages will be used. They might be tested to work, but they can
|
---|
| 177 | be out of date or contain security holes.
|
---|
[0e37869] | 178 | </para>
|
---|
| 179 | </note>
|
---|
[8d0bc761] | 180 |
|
---|
[b81991e1] | 181 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[c1ae13c] | 182 | <para role="optional">
|
---|
[6c64623f] | 183 | <xref linkend="curl"/>,
|
---|
[c1ae13c] | 184 | <xref linkend="doxygen"/>,
|
---|
[babf0a0] | 185 | <xref role="runtime" linkend="ffmpeg"/> (runtime, to play mov, mp3 or mp4 files),
|
---|
[fe30eab] | 186 | <!-- <phrase revision="sysv"><ulink url="http://sourceforge.net/projects/liboauth/files/">liboauth</ulink></phrase> -->
|
---|
| 187 | <xref linkend="liboauth"/>,
|
---|
[26fa7d2] | 188 | <xref linkend="openjdk"/>,
|
---|
[566fcae] | 189 | <xref linkend="valgrind"/>,
|
---|
[6000a3e] | 190 | <xref linkend="wget"/>,
|
---|
[73b06df] | 191 | <xref linkend="wireless_tools"/>,
|
---|
[d5d7cd6] | 192 | <ulink url="https://github.com/libproxy/libproxy">libproxy</ulink>
|
---|
[c1ae13c] | 193 | </para>
|
---|
| 194 |
|
---|
| 195 | <para condition="html" role="usernotes">
|
---|
| 196 | User Notes: <ulink url="&blfs-wiki;/firefox"/>
|
---|
| 197 | </para>
|
---|
[b81991e1] | 198 | </sect2>
|
---|
| 199 |
|
---|
| 200 | <sect2 role="installation">
|
---|
| 201 | <title>Installation of Firefox</title>
|
---|
| 202 |
|
---|
[f72a04a] | 203 | <para>
|
---|
[b9f61df] | 204 | The configuration of <application>Firefox</application> is accomplished
|
---|
| 205 | by creating a <filename>mozconfig</filename> file containing the desired
|
---|
| 206 | configuration options. A default <filename>mozconfig</filename> is
|
---|
| 207 | created below. To see the entire list of available configuration options
|
---|
[888e303] | 208 | (and an abbreviated description of some of them), issue <command>./mach
|
---|
| 209 | configure && ./configure --help | less</command>. You may also
|
---|
| 210 | wish to review the entire file and uncomment any other desired options.
|
---|
| 211 | Create the file by issuing the following command:
|
---|
[c1ae13c] | 212 | </para>
|
---|
[5a13c45] | 213 |
|
---|
[0e37869] | 214 | <screen><userinput>cat > mozconfig << "EOF"
|
---|
[dcb0fe6] | 215 | <literal># If you have a multicore machine, all cores will be used by default.
|
---|
| 216 |
|
---|
[703f0ce] | 217 | # If you have installed (or will install) wireless-tools, and you wish
|
---|
| 218 | # to use geolocation web services, comment out this line
|
---|
[6d1bf0e] | 219 | ac_add_options --disable-necko-wifi
|
---|
| 220 |
|
---|
[ad5a97d] | 221 | # API Keys for geolocation APIs - necko-wifi (above) is required for MLS
|
---|
| 222 | # Uncomment the following line if you wish to use Mozilla Location Service
|
---|
| 223 | #ac_add_options --with-mozilla-api-keyfile=$PWD/mozilla-key
|
---|
| 224 |
|
---|
| 225 | # Uncomment the following line if you wish to use Google's geolocaton API
|
---|
| 226 | # (needed for use with saved maps with Google Maps)
|
---|
[9116137c] | 227 | #ac_add_options --with-google-location-service-api-keyfile=$PWD/google-key
|
---|
[ad5a97d] | 228 |
|
---|
[d5d7cd6] | 229 | # startup-notification is required since firefox-78
|
---|
[495ebe07] | 230 |
|
---|
[81b3e7fd] | 231 | # Uncomment the following option if you have not installed PulseAudio
|
---|
| 232 | #ac_add_options --disable-pulseaudio
|
---|
[3507f80] | 233 | # or uncomment this if you installed alsa-lib instead of PulseAudio
|
---|
[81b3e7fd] | 234 | #ac_add_options --enable-alsa
|
---|
[89cdb63d] | 235 |
|
---|
[0e37869] | 236 | # Comment out following options if you have not installed
|
---|
| 237 | # recommended dependencies:
|
---|
| 238 | ac_add_options --with-system-libevent
|
---|
[8df543f] | 239 | ac_add_options --with-system-webp
|
---|
[0e37869] | 240 | ac_add_options --with-system-nspr
|
---|
| 241 | ac_add_options --with-system-nss
|
---|
[b84fe71] | 242 | ac_add_options --with-system-icu
|
---|
[9a469bc] | 243 |
|
---|
[e399c12] | 244 | # Do not specify the gold linker which is not the default. It will take
|
---|
| 245 | # longer and use more disk space when debug symbols are disabled.
|
---|
[9a469bc] | 246 |
|
---|
[e399c12] | 247 | # libdavid (av1 decoder) requires nasm. Uncomment this if nasm
|
---|
| 248 | # has not been installed.
|
---|
| 249 | #ac_add_options --disable-av1
|
---|
[0a561d8] | 250 |
|
---|
[9a469bc] | 251 | # You cannot distribute the binary if you do this
|
---|
| 252 | ac_add_options --enable-official-branding
|
---|
[0e37869] | 253 |
|
---|
[14de4227] | 254 | # Stripping is now enabled by default.
|
---|
| 255 | # Uncomment these lines if you need to run a debugger:
|
---|
| 256 | #ac_add_options --disable-strip
|
---|
| 257 | #ac_add_options --disable-install-strip
|
---|
| 258 |
|
---|
[e399c12] | 259 | # Disabling debug symbols makes the build much smaller and a little
|
---|
[ec54fa5b] | 260 | # faster. Comment this if you need to run a debugger. Note: This is
|
---|
| 261 | # required for compilation on i686.
|
---|
[e399c12] | 262 | ac_add_options --disable-debug-symbols
|
---|
| 263 |
|
---|
[c9677a35] | 264 | # The elf-hack is reported to cause failed installs (after successful builds)
|
---|
| 265 | # on some machines. It is supposed to improve startup time and it shrinks
|
---|
| 266 | # libxul.so by a few MB - comment this if you know your machine is not affected.
|
---|
| 267 | ac_add_options --disable-elf-hack
|
---|
| 268 |
|
---|
[d5d7cd6] | 269 | # The BLFS editors recommend not changing anything below this line:
|
---|
| 270 | ac_add_options --prefix=/usr
|
---|
| 271 | ac_add_options --enable-application=browser
|
---|
[5f5dcc2] | 272 | ac_add_options --disable-crashreporter
|
---|
| 273 | ac_add_options --disable-updater
|
---|
[57a8df2] | 274 | # enabling the tests will use a lot more space and significantly
|
---|
| 275 | # increase the build time, for no obvious benefit.
|
---|
[0e37869] | 276 | ac_add_options --disable-tests
|
---|
| 277 |
|
---|
[e399c12] | 278 | # The default level of optimization again produces a working build with gcc.
|
---|
[8df543f] | 279 | ac_add_options --enable-optimize
|
---|
[0e37869] | 280 |
|
---|
[41f2e90] | 281 | ac_add_options --enable-system-ffi
|
---|
[0e37869] | 282 | ac_add_options --enable-system-pixman
|
---|
| 283 |
|
---|
[d5d7cd6] | 284 | # --with-system-bz2 was removed in firefox-78
|
---|
[a0ace670] | 285 | ac_add_options --with-system-jpeg
|
---|
| 286 | ac_add_options --with-system-png
|
---|
| 287 | ac_add_options --with-system-zlib
|
---|
[aed37975] | 288 |
|
---|
[1b0a207] | 289 | # The following option unsets Telemetry Reporting. With the Addons Fiasco,
|
---|
| 290 | # Mozilla was found to be collecting user's data, including saved passwords and
|
---|
| 291 | # web form data, without users consent. Mozilla was also found shipping updates
|
---|
| 292 | # to systems without the user's knowledge or permission.
|
---|
| 293 | # As a result of this, use the following command to permanently disable
|
---|
| 294 | # telemetry reporting in Firefox.
|
---|
| 295 | unset MOZ_TELEMETRY_REPORTING
|
---|
| 296 |
|
---|
[4def8b6] | 297 | mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir</literal>
|
---|
[0e37869] | 298 | EOF</userinput></screen>
|
---|
[b9b7146] | 299 |
|
---|
[c1ae13c] | 300 | <para>
|
---|
| 301 | Compile <application>Firefox</application> by issuing the following
|
---|
| 302 | commands:
|
---|
| 303 | </para>
|
---|
[9572e88] | 304 |
|
---|
[d5d7cd6] | 305 | <para>
|
---|
| 306 | In the esr version of firefox-78, the code to ensure that add-ons
|
---|
| 307 | are signed by the trused root has been disabled, presumably for
|
---|
| 308 | organizations which require their own add-ons. To enable it as an
|
---|
| 309 | added security measure issue the following command:
|
---|
| 310 | </para>
|
---|
[14de4227] | 311 |
|
---|
[d5d7cd6] | 312 | <screen><userinput>sed -i -e 's/Disable/Enable/' \
|
---|
| 313 | -e '/^MOZ_REQUIRE_SIGNING/s/0/1/' \
|
---|
| 314 | build/mozconfig.common</userinput></screen>
|
---|
[14de4227] | 315 |
|
---|
[ad5a97d] | 316 | <para>
|
---|
| 317 | If the geolocation APIs are needed:
|
---|
| 318 | </para>
|
---|
| 319 |
|
---|
[e5c8de01] | 320 | <note>
|
---|
| 321 | <para>
|
---|
| 322 | <!-- Taken from Arch Linux - an immensely helpful link - Thanks -->
|
---|
| 323 | The Google and Mozilla API Keys below are specific to LFS. If using
|
---|
| 324 | these instructions for another distro, or if you intend to distribute
|
---|
| 325 | binary copies of the software using these instructions, please obtain
|
---|
| 326 | your own keys following the instructions located at
|
---|
| 327 | <ulink url="http://www.chromium.org/developers/how-tos/api-keys"/> and
|
---|
| 328 | <ulink url="https://location.services.mozilla.com/api"/> respectively.
|
---|
| 329 | <!-- BLFS Devs, register an account at Google with your
|
---|
| 330 | @linuxfromscratch.org email address, and I'll make you an administrator
|
---|
| 331 | for the 'Google APIs for LFS' project (where the API and OAuth keys
|
---|
| 332 | were created for use in the book).-->
|
---|
| 333 | </para>
|
---|
| 334 | </note>
|
---|
| 335 |
|
---|
[ad5a97d] | 336 | <screen><userinput>echo "AIzaSyDxKL42zsPjbke5O8_rPVpVrLrJ8aeE9rQ" > google-key
|
---|
[5f18b7a8] | 337 | echo "613364a7-9418-4c86-bcee-57e32fd70c23" > mozilla-key</userinput></screen>
|
---|
[ad5a97d] | 338 |
|
---|
[5b0a978e] | 339 | <note>
|
---|
| 340 |
|
---|
| 341 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 342 | href="../../xincludes/mozshm.xml"/>
|
---|
| 343 |
|
---|
| 344 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 345 | href="../../xincludes/mozmach.xml"/>
|
---|
| 346 |
|
---|
| 347 | </note>
|
---|
[57feeb5] | 348 | <!--
|
---|
[ec54fa5b] | 349 | <para>
|
---|
| 350 | If you are building on i686, apply a fix to prevent Internal Compiler
|
---|
| 351 | Errors in GCC-7+:
|
---|
[e399c12] | 352 | </para>
|
---|
| 353 |
|
---|
[ec54fa5b] | 354 | <screen><userinput remap="pre">case $(uname -m) in
|
---|
| 355 | i?86) sed -i "562 s/mips64/i386/" gfx/skia/skia/third_party/skcms/src/Transform_inl.h ;;
|
---|
| 356 | esac</userinput></screen>
|
---|
[57feeb5] | 357 | -->
|
---|
[bf5fb94] | 358 | <para>
|
---|
| 359 | Apply a patch to allow this to be compiled with <xref linkend="rust"/>:
|
---|
| 360 | </para>
|
---|
| 361 |
|
---|
| 362 | <screen><userinput remap="pre">patch -p1 -i ../firefox-&firefox-version;esr-rustc1470-1.patch</userinput></screen>
|
---|
[29b0395] | 363 |
|
---|
| 364 | <para>
|
---|
[d5d7cd6] | 365 | Now invoke the Python script to compile the package.
|
---|
[29b0395] | 366 | </para>
|
---|
[e8d45427] | 367 |
|
---|
[29b0395] | 368 | <screen><userinput>export CC=gcc CXX=g++ &&
|
---|
[ec1d8ae] | 369 | export MOZBUILD_STATE_PATH=${PWD}/mozbuild &&
|
---|
[f0b7ae67] | 370 | ./mach build</userinput></screen>
|
---|
[3bdfc9fd] | 371 |
|
---|
[0e37869] | 372 | <para>
|
---|
[57a8df2] | 373 | The <filename>mozconfig</filename> above disables the tests because
|
---|
| 374 | they use a lot more time and disk space for no obvious benefit. If
|
---|
[ecffcbbc] | 375 | you have nevertheless enabled them, you can run the tests by executing
|
---|
| 376 | <command>./mach gtest</command>. This will require a network connection,
|
---|
| 377 | and to be run from within an Xorg session - there is a popup dialog
|
---|
| 378 | when it fails to connect to ALSA (that does not create a failed test).
|
---|
| 379 | One or two tests will fail. To see the details of the failure(s) you
|
---|
| 380 | will need to log the output from that command so that you can review it.
|
---|
[0e37869] | 381 | </para>
|
---|
[01ce75f8] | 382 |
|
---|
[495ebe07] | 383 | <para>
|
---|
[b9f61df] | 384 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
[c1ae13c] | 385 | </para>
|
---|
[5a13c45] | 386 |
|
---|
[326f830] | 387 | <screen role="root"><userinput>./mach install &&
|
---|
[5ee1266] | 388 |
|
---|
[326f830] | 389 | mkdir -pv /usr/lib/mozilla/plugins &&
|
---|
[8d0bc761] | 390 | ln -sfv ../../mozilla/plugins /usr/lib/firefox/browser/</userinput></screen>
|
---|
[fe5f563d] | 391 |
|
---|
[a5708ba] | 392 | <para>
|
---|
| 393 | Set environment variables back to their values:
|
---|
| 394 | </para>
|
---|
| 395 |
|
---|
[e399c12] | 396 | <screen><userinput>unset CC CXX MOZBUILD_STATE_PATH</userinput></screen>
|
---|
[01ce75f8] | 397 |
|
---|
[b81991e1] | 398 | </sect2>
|
---|
| 399 |
|
---|
[361df3e] | 400 | <sect2 role="commands">
|
---|
| 401 | <title>Command Explanations</title>
|
---|
[7d09fcb9] | 402 |
|
---|
[29b0395] | 403 | <!--<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 404 | href="../../xincludes/SIOCGSTAMP.xml"/>-->
|
---|
[e8d45427] | 405 |
|
---|
[9a469bc] | 406 | <para>
|
---|
[e399c12] | 407 | <command>export CC=gcc CXX=g++ ...</command>: Upstream now prefer
|
---|
[d5d7cd6] | 408 | <application>clang</application> so that they can use one compiler
|
---|
| 409 | everywhere. On the X86 architectures <application>clang</application>
|
---|
[6629008] | 410 | now appears to support most of the same security-hardening options as
|
---|
[bf5fb94] | 411 | <application>GCC</application>.
|
---|
| 412 | <!-- supported in llvm-11
|
---|
| 413 | but the newer
|
---|
| 414 | <literal>-fstack-clash-protection</literal> is still not supported.-->
|
---|
[6629008] | 415 | With the current versions and the default flags,
|
---|
[d5d7cd6] | 416 | <application>GCC</application> creates a marginally bigger build but
|
---|
| 417 | takes typically 2 SBU less time on a 4-core machine using the mozconfig
|
---|
| 418 | above.
|
---|
[9a469bc] | 419 | </para>
|
---|
| 420 |
|
---|
[fe5f563d] | 421 | <para>
|
---|
| 422 | <command>export MOZBUILD_STATE_PATH=${PWD}/mozbuild</command>: The build
|
---|
| 423 | is now supposed to tell you that it intends to create <filename
|
---|
| 424 | class="directory">~/.mozbuild</filename>, and offer you an option to
|
---|
| 425 | press <ENTER> to accept this, or Ctrl-C to cancel and restart the
|
---|
| 426 | build after specifying the directory. In practice, the message may not
|
---|
| 427 | appear until after <ENTER> is keyed, i.e. the build stalls.
|
---|
| 428 | </para>
|
---|
| 429 |
|
---|
| 430 | <para>
|
---|
| 431 | That directory is used for a (probably random) telemetry identifier.
|
---|
| 432 | Creating this in the build directory, and deleting that after the
|
---|
| 433 | installation, prevents it being used. If you wish to participate in
|
---|
| 434 | telemetry, export MOZBUILD_STATE_PATH to point to its default directory.
|
---|
| 435 | </para>
|
---|
| 436 |
|
---|
[a0d558d] | 437 | <para>
|
---|
[326f830] | 438 | <command>./mach build</command>: <application>Firefox</application>
|
---|
[d5d7cd6] | 439 | now uses this <application>python</application> script to run the
|
---|
[326f830] | 440 | build and install.
|
---|
[a0d558d] | 441 | </para>
|
---|
| 442 |
|
---|
[c1ae13c] | 443 | <para>
|
---|
[326f830] | 444 | <option>./mach build --verbose</option>: Use this alternative if you
|
---|
| 445 | need details of which files are being compiled, together with any C or
|
---|
[d5d7cd6] | 446 | C++ flags being used. But do not add '--verbose' to the install command,
|
---|
| 447 | it is not accepted there.
|
---|
[c1ae13c] | 448 | </para>
|
---|
| 449 |
|
---|
[9a469bc] | 450 | <para>
|
---|
[fe5f563d] | 451 | <option>./mach build -jN</option>: The build should, by default, use
|
---|
[d5d7cd6] | 452 | all the online CPU cores. If using all the cores causes the build to swap
|
---|
| 453 | because you have insufficient memory, using fewer cores can be faster.
|
---|
[9a469bc] | 454 | </para>
|
---|
| 455 |
|
---|
[c1ae13c] | 456 | <para>
|
---|
[8d0bc761] | 457 | <command>mkdir -pv /usr/lib/mozilla/plugins</command>: This ensures
|
---|
| 458 | that <filename class="directory">/usr/lib/mozilla/plugins/</filename>
|
---|
[c1ae13c] | 459 | exists.
|
---|
| 460 | </para>
|
---|
| 461 |
|
---|
| 462 | <para>
|
---|
[8d0bc761] | 463 | <command>ln -sv ... /usr/lib/firefox/browser</command>:
|
---|
[24da103] | 464 | This command creates a symbolic link to <filename
|
---|
| 465 | class="directory">/usr/lib/mozilla/plugins</filename>. It's not really
|
---|
| 466 | needed, as <application>Firefox</application> checks <filename
|
---|
| 467 | class="directory">/usr/lib/mozilla/plugins</filename> by default, but the
|
---|
| 468 | symbolic link is made to keep all the plugins installed in one folder.
|
---|
[c1ae13c] | 469 | </para>
|
---|
[fa1bc3e] | 470 |
|
---|
[b81991e1] | 471 | </sect2>
|
---|
| 472 |
|
---|
[88cec02] | 473 | <sect2 role="configuration">
|
---|
| 474 | <title>Configuring Firefox</title>
|
---|
| 475 |
|
---|
[c1ae13c] | 476 | <para>
|
---|
| 477 | If you use a desktop environment like <application>Gnome</application> or
|
---|
| 478 | <application>KDE</application> you may like to create a
|
---|
| 479 | <filename>firefox.desktop</filename> file so that
|
---|
[3927e328] | 480 | <application>Firefox</application> appears in the panel's menus. <!--If you
|
---|
[c1ae13c] | 481 | didn't enable startup-notification in your mozconfig change the
|
---|
[3927e328] | 482 | StartupNotify line to false.--> As the
|
---|
[c1ae13c] | 483 | <systemitem class="username">root</systemitem> user:
|
---|
| 484 | </para>
|
---|
[31de6e7] | 485 |
|
---|
[eb5f847a] | 486 | <screen role="root"><userinput>mkdir -pv /usr/share/applications &&
|
---|
[0e37869] | 487 | mkdir -pv /usr/share/pixmaps &&
|
---|
[74f73ede] | 488 |
|
---|
[c099902d] | 489 | cat > /usr/share/applications/firefox.desktop << "EOF" &&
|
---|
[fcd66369] | 490 | <literal>[Desktop Entry]
|
---|
[31de6e7] | 491 | Encoding=UTF-8
|
---|
[0e37869] | 492 | Name=Firefox Web Browser
|
---|
| 493 | Comment=Browse the World Wide Web
|
---|
| 494 | GenericName=Web Browser
|
---|
| 495 | Exec=firefox %u
|
---|
| 496 | Terminal=false
|
---|
[31de6e7] | 497 | Type=Application
|
---|
| 498 | Icon=firefox
|
---|
[0e37869] | 499 | Categories=GNOME;GTK;Network;WebBrowser;
|
---|
| 500 | MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
|
---|
[fcd66369] | 501 | StartupNotify=true</literal>
|
---|
[31de6e7] | 502 | EOF
|
---|
[74f73ede] | 503 |
|
---|
[888e303] | 504 | ln -sfv /usr/lib/firefox/browser/chrome/icons/default/default128.png \
|
---|
[0e37869] | 505 | /usr/share/pixmaps/firefox.png</userinput></screen>
|
---|
| 506 |
|
---|
[326f830] | 507 | <sect3><title>Configuration Information</title>
|
---|
| 508 |
|
---|
| 509 | <para>
|
---|
| 510 | The application settings for firefox are accessible by keying
|
---|
| 511 | <command>about:config</command> in the address bar.
|
---|
| 512 | </para>
|
---|
| 513 |
|
---|
| 514 | <para>
|
---|
[d5d7cd6] | 515 | Occasionally, getting working sound in
|
---|
| 516 | <application>firefox</application> can be a problem. Although upstream
|
---|
| 517 | prefers pulseaudio,
|
---|
[326f830] | 518 | on balance using <application>Alsa</application> may be easier.
|
---|
| 519 | </para>
|
---|
| 520 |
|
---|
| 521 | <para>
|
---|
| 522 | If you enabled <application>Alsa</application> for sound, you may need
|
---|
| 523 | to alter one variable to get working sound. If you run
|
---|
| 524 | <command>firefox</command> from a term and try to play something with
|
---|
| 525 | sound you might encounter error messages like:
|
---|
| 526 | </para>
|
---|
| 527 |
|
---|
| 528 | <para>
|
---|
| 529 | <literal>Sandbox: seccomp sandbox violation: pid 3941, tid 4030,
|
---|
| 530 | syscall 16, args 48 2147767296 139909894784796 0 0 0.</literal>
|
---|
| 531 | </para>
|
---|
| 532 |
|
---|
| 533 | <para>
|
---|
| 534 | That was on x86_64, on i686 the syscall number is 54. To allow this
|
---|
| 535 | syscall, in <command>about:config</command> change
|
---|
| 536 | <command>security.sandbox.content.syscall_whitelist</command> to 16
|
---|
| 537 | (or 54 if using i686).
|
---|
| 538 | </para>
|
---|
| 539 |
|
---|
| 540 | <para>
|
---|
| 541 | If you use <command>pulseaudio</command> in a Desktop Environment, it
|
---|
| 542 | might already be started by that DE. But if it is not, although
|
---|
[7ebe22e] | 543 | firefox-57 managed to start it, firefox-58 did not. If you run
|
---|
| 544 | <command>firefox</command> from a term and this problem is present,
|
---|
| 545 | trying to play sound will
|
---|
[326f830] | 546 | encounter error messages warning <literal>Can't get cubeb
|
---|
| 547 | context!</literal>
|
---|
| 548 | </para>
|
---|
| 549 |
|
---|
| 550 | <para>
|
---|
| 551 | The fix for this is to close firefox, start pulseaudio to check it
|
---|
| 552 | does start (if not, read the information on Configuring in <xref
|
---|
| 553 | linkend="pulseaudio"/>) and restart firefox to check it is working.
|
---|
| 554 | If it now works, add the following to your <filename>~/.xinitrc</filename>:
|
---|
| 555 | <phrase revision="sysv">
|
---|
| 556 | <literal>pulseaudio --verbose --log-target=syslog&</literal></phrase>
|
---|
| 557 | <phrase revision="systemd">
|
---|
| 558 | <literal>pulseaudio --verbose --log-target=journald&</literal></phrase>
|
---|
| 559 | (unfortunately, on some systems this does not work).
|
---|
| 560 | </para>
|
---|
| 561 |
|
---|
| 562 | <para>
|
---|
| 563 | You may wish to use multiple profiles within firefox. To do that, invoke
|
---|
| 564 | firefox as <command>firefox --ProfileManager</command>. You can also
|
---|
| 565 | check which profile is currently in use from
|
---|
| 566 | <command>about:profiles</command>.
|
---|
| 567 | </para>
|
---|
| 568 |
|
---|
[d5d7cd6] | 569 | <para>
|
---|
| 570 | Although WebRender (using the GPU for compositing) is not used by
|
---|
| 571 | default, it now appears to work well on supported hardware (ATI, Nvidia
|
---|
| 572 | and Intel GPUs with Mesa-18 or later. For an explanation, please see
|
---|
| 573 | <ulink
|
---|
| 574 | url="https://hacks.mozilla.org/2017/10/the-whole-web-at-maximum-fps-how-webrender-gets-rid-of-jank/">hacks.mozilla.org</ulink>.
|
---|
| 575 | The only downside seems to be that on a machine with limited RAM it might
|
---|
| 576 | use more RAM.
|
---|
| 577 | </para>
|
---|
| 578 |
|
---|
| 579 | <para>
|
---|
| 580 | To check if WebRender is being used, look in about:support. In the Graphics
|
---|
| 581 | section Compositing will either show 'Basic' (i.e. not in use) or
|
---|
| 582 | 'WebRender'. To enable it, go to about:config and change gfx.webrender.all
|
---|
| 583 | to True. You will need to restart firefox.
|
---|
| 584 | </para>
|
---|
| 585 |
|
---|
| 586 | <para>
|
---|
| 587 | It may be useful to mention the processes from firefox which can appear in
|
---|
| 588 | <command>top</command> - as well as firefox itself, there may be multiple
|
---|
| 589 | Web Content processes, and now an RDD Process (Remote Data Decoder) which
|
---|
| 590 | appears when playing web videos encoded with av1 (libdav1d). If WebRender
|
---|
| 591 | has been enabled, a GPU Process will also appear when firefox has to
|
---|
| 592 | repaint (e.g. scrolling, opening a new tab, or playing a video).
|
---|
| 593 | </para>
|
---|
| 594 |
|
---|
[326f830] | 595 | </sect3>
|
---|
[88cec02] | 596 | </sect2>
|
---|
| 597 |
|
---|
[b81991e1] | 598 | <sect2 role="content">
|
---|
| 599 | <title>Contents</title>
|
---|
| 600 |
|
---|
| 601 | <segmentedlist>
|
---|
| 602 | <segtitle>Installed Programs</segtitle>
|
---|
| 603 | <segtitle>Installed Libraries</segtitle>
|
---|
[c5f005b] | 604 | <segtitle>Installed Directory</segtitle>
|
---|
[b81991e1] | 605 |
|
---|
| 606 | <seglistitem>
|
---|
[0e37869] | 607 | <seg>
|
---|
| 608 | firefox
|
---|
| 609 | </seg>
|
---|
[c1ae13c] | 610 | <seg>
|
---|
| 611 | Numerous libraries, browser components, plugins, extensions, and
|
---|
[8d0bc761] | 612 | helper modules installed in /usr/lib/firefox
|
---|
[c1ae13c] | 613 | </seg>
|
---|
[7498751] | 614 | <seg>
|
---|
[54814bdd] | 615 | /usr/lib/firefox and /usr/lib/mozilla
|
---|
[7498751] | 616 | </seg>
|
---|
[b81991e1] | 617 | </seglistitem>
|
---|
| 618 | </segmentedlist>
|
---|
| 619 |
|
---|
| 620 | <variablelist>
|
---|
| 621 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 622 | <?dbfo list-presentation="list"?>
|
---|
| 623 | <?dbhtml list-presentation="table"?>
|
---|
| 624 |
|
---|
| 625 | <varlistentry id="firefox-prog">
|
---|
| 626 | <term><command>firefox</command></term>
|
---|
| 627 | <listitem>
|
---|
[c1ae13c] | 628 | <para>
|
---|
[7e1afc9] | 629 | is a <application>GTK+-3</application> internet browser that uses
|
---|
| 630 | the Mozilla Gecko rendering engine.
|
---|
[c1ae13c] | 631 | </para>
|
---|
[b81991e1] | 632 | <indexterm zone="firefox firefox-prog">
|
---|
| 633 | <primary sortas="b-firefox">firefox</primary>
|
---|
| 634 | </indexterm>
|
---|
| 635 | </listitem>
|
---|
| 636 | </varlistentry>
|
---|
[0e37869] | 637 |
|
---|
[b81991e1] | 638 | </variablelist>
|
---|
[0e37869] | 639 |
|
---|
[b81991e1] | 640 | </sect2>
|
---|
[0e37869] | 641 |
|
---|
[4d37129] | 642 | </sect1>
|
---|