source: xsoft/graphweb/firefox.xml@ b674aa1

12.0 12.1 gimp3 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/for-12.3 xry111/llvm18 xry111/spidermonkey128 xry111/xf86-video-removal
Last change on this file since b674aa1 was b6cb36ff, checked in by Ken Moffat <ken@…>, 14 months ago

Update to firefox-115.0.2esr.

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