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