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