source: xsoft/graphweb/firefox.xml@ 0590db71

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 0590db71 was ab67425, checked in by Ken Moffat <ken@…>, 6 years ago

firefox-60.0. No release notes yet, so I'm not marking this as a security update - but I will not be surprised if htat turns out to be the case.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@20131 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 19.3 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;/source/firefox-&firefox-version;.source.tar.xz">
8 <!ENTITY firefox-download-ftp " ">
9 <!ENTITY firefox-md5sum "3d89ee8a722279c4e883a7a8af81c21d">
10 <!ENTITY firefox-size "255 MB">
11 <!-- NB with stylo, much of the build uses rust, and therefore cargo files.
12 But the extra files, if any, seem to be minimal -->
13 <!ENTITY firefox-buildsize "7.7 GB (157 MB installed) without tests">
14 <!ENTITY firefox-time "27 SBU (with parallelism=4) without tests">
15]>
16
17<sect1 id="firefox" xreflabel="Firefox-&firefox-version;">
18 <?dbhtml filename="firefox.html" ?>
19
20 <sect1info>
21 <othername>$LastChangedBy$</othername>
22 <date>$Date$</date>
23 </sect1info>
24
25 <title>Firefox-&firefox-version;</title>
26
27 <indexterm zone="firefox">
28 <primary sortas="a-Firefox">Firefox</primary>
29 </indexterm>
30
31 <sect2 role="package">
32 <title>Introduction to Firefox</title>
33
34 <para>
35 <application>Firefox</application> is a stand-alone browser based on the
36 <application>Mozilla</application> codebase.
37 </para>
38
39 &lfs82_checked;
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>Required patch if ffmpeg &gt;=3.5 has been installed: <ulink url="&patch-root;/firefox-&firefox-version;-ffmpeg4.0-1.patch"/></para>
79 </listitem>
80 <listitem>
81 <para>
82 Optional patch to allow system versions of <xref linkend="graphite2"/>
83 and <xref linkend="harfbuzz"/>:
84 <ulink url="&patch-root;/firefox-&firefox-version;-system_graphite2_harfbuzz-1.patch"/>
85 </para>
86 </listitem>
87 </itemizedlist>
88
89 <note>
90 <para>
91 Extracting the tarball
92 will reset the permissions of the current directory to 0755 if you
93 have permission to do that. If you do this in a directory where
94 the sticky bit is set, such
95 as <filename class="directory">/tmp</filename> it will end with error
96 messages:
97 </para>
98
99<literallayout>tar: .: Cannot utime: Operation not permitted
100tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
101tar: Exiting with failure status due to previous errors
102</literallayout>
103
104 <para>
105 This does finish with non-zero status, but it does
106 <emphasis>NOT</emphasis> mean there is a real problem.
107 Do not untar as the <systemitem class="username">root</systemitem> user
108 in a directory where the sticky bit is set - that will unset it.
109 </para>
110
111 <para>
112 As with other large packages which use C++ (or rust), the SBU times
113 to build this vary more widely than you might expect. Also, almost 6GB
114 of real memory is used during the final link and the SBUs can increase
115 significantly if the machine has to swap to do this.
116 </para>
117
118 <para>
119 Although upstream prefer to use <application>PulseAudio</application>,
120 for the moment <application>Alsa</application> can still be used. Both
121 may need runtime configuration to get sound working.
122 </para>
123 </note>
124
125 <bridgehead renderas="sect3">Firefox Dependencies</bridgehead>
126
127 <bridgehead renderas="sect4">Required</bridgehead>
128 <para role="required">
129 <xref linkend="autoconf213"/>,
130 both <xref linkend="gtk3"/> and
131 <xref linkend="gtk2"/>,
132 <xref linkend="libnotify"/>,
133 <xref linkend="nss"/>,
134 <xref linkend="pulseaudio"/>
135 (or
136 <xref linkend="alsa-lib"/> if you edit the mozconfig;
137 now deprecated by mozilla), in either case please read the
138 Configuration Information,
139 <xref linkend="rust"/>,
140 <xref linkend="unzip"/>,
141 <xref linkend="yasm"/>, and
142 <xref linkend="zip"/>
143 </para>
144
145 <bridgehead renderas="sect4">Recommended</bridgehead>
146 <para role="recommended">
147 <xref linkend="icu"/>,
148 <xref linkend="libevent"/>,
149 <xref linkend="libvpx"/>,
150 <package>clang</package> from <xref linkend="llvm"/> (for stylo), and
151 <xref linkend="sqlite"/>
152 </para>
153
154 <note>
155 <para>
156 If you don't install recommended dependencies, then internal copies of
157 those packages will be used. They might be tested to work, but they can
158 be out of date or contain security holes.
159 </para>
160 </note>
161
162 <bridgehead renderas="sect4">Optional</bridgehead>
163 <para role="optional">
164 <xref linkend="curl"/>,
165 <xref linkend="dbus-glib"/>,
166 <xref linkend="doxygen"/>,
167 <xref linkend="GConf"/>,
168 <xref role="runtime" linkend="ffmpeg"/> (runtime, to play mov, mp3 or mp4 files),
169 <xref linkend="libwebp"/>,
170 <xref linkend="openjdk"/>,
171 <xref linkend="startup-notification"/>,
172 <xref linkend="valgrind"/>,
173 <xref linkend="wget"/>,
174 <xref linkend="wireless_tools"/>,
175 <ulink url="https://hunspell.github.io/">Hunspell</ulink>,
176 <phrase revision="sysv"><ulink url="http://sourceforge.net/projects/liboauth/files/">liboauth</ulink></phrase>
177 <phrase revision="systemd"><xref linkend="liboauth"/></phrase>,
178 <ulink url="https://github.com/libproxy/libproxy">libproxy</ulink>,
179 and (with the patch)
180 <xref linkend="graphite2"/> and
181 <xref linkend="harfbuzz"/>
182 </para>
183
184 <para condition="html" role="usernotes">
185 User Notes: <ulink url="&blfs-wiki;/firefox"/>
186 </para>
187 </sect2>
188
189 <sect2 role="installation">
190 <title>Installation of Firefox</title>
191
192 <para>
193 The configuration of <application>Firefox</application> is accomplished
194 by creating a <filename>mozconfig</filename> file containing the desired
195 configuration options. A default <filename>mozconfig</filename> is
196 created below. To see the entire list of available configuration options
197 (and an abbreviated description of some of them), issue <command>./mach
198 configure &amp;&amp; ./configure --help | less</command>. You may also
199 wish to review the entire file and uncomment any other desired options.
200 Create the file by issuing the following command:
201 </para>
202
203<screen><userinput>cat &gt; mozconfig &lt;&lt; "EOF"
204<literal># If you have a multicore machine, all cores will be used by default.
205# You can change the number of non-rust jobs by setting a valid number
206# of cores in this option, but when rust crates are being compiled
207# jobs will be scheduled for all the available CPU cores.
208#mk_add_options MOZ_MAKE_FLAGS="-j1"
209
210# If you have installed dbus-glib, comment out this line:
211ac_add_options --disable-dbus
212
213# If you have installed dbus-glib, and you have installed (or will install)
214# wireless-tools, and you wish to use geolocation web services, comment out
215# this line
216ac_add_options --disable-necko-wifi
217
218# API Keys for geolocation APIs - necko-wifi (above) is required for MLS
219# Uncomment the following line if you wish to use Mozilla Location Service
220#ac_add_options --with-mozilla-api-keyfile=$PWD/mozilla-key
221
222# Uncomment the following line if you wish to use Google's geolocaton API
223# (needed for use with saved maps with Google Maps)
224#ac_add_options --with-google-api-keyfile=$PWD/google-key
225
226# Uncomment these lines if you have installed optional dependencies:
227#ac_add_options --enable-system-hunspell
228#ac_add_options --enable-startup-notification
229
230# Uncomment the following option if you have not installed PulseAudio
231#ac_add_options --disable-pulseaudio
232# and uncomment this if you installed alsa-lib instead of PulseAudio
233#ac_add_options --enable-alsa
234
235# If you have installed GConf, comment out this line
236ac_add_options --disable-gconf
237
238# Stylo is the new CSS code, including the rust 'style'
239# package. It is enabled by default but requires clang.
240# Uncomment this if you do not wish to use stylo.
241#ac_add_options --disable-stylo
242
243# Comment out following options if you have not installed
244# recommended dependencies:
245ac_add_options --enable-system-sqlite
246ac_add_options --with-system-libevent
247ac_add_options --with-system-libvpx
248ac_add_options --with-system-nspr
249ac_add_options --with-system-nss
250ac_add_options --with-system-icu
251
252# If you are going to apply the patch for system graphite
253# and system harfbuzz, uncomment these lines:
254#ac_add_options --with-system-graphite2
255#ac_add_options --with-system-harfbuzz
256
257# Stripping is now enabled by default.
258# Uncomment these lines if you need to run a debugger:
259#ac_add_options --disable-strip
260#ac_add_options --disable-install-strip
261
262# The BLFS editors recommend not changing anything below this line:
263ac_add_options --prefix=/usr
264ac_add_options --enable-application=browser
265
266ac_add_options --disable-crashreporter
267ac_add_options --disable-updater
268# enabling the tests will use a lot more space and significantly
269# increase the build time, for no obvious benefit.
270ac_add_options --disable-tests
271
272# Optimization for size is broken with gcc7
273ac_add_options --enable-optimize="-O2"
274
275ac_add_options --enable-official-branding
276
277# In firefox-59.0 system cairo breaks the build, so comment it.
278#ac_add_options --enable-system-cairo
279ac_add_options --enable-system-ffi
280ac_add_options --enable-system-pixman
281
282ac_add_options --with-pthreads
283
284ac_add_options --with-system-bz2
285ac_add_options --with-system-jpeg
286ac_add_options --with-system-png
287ac_add_options --with-system-zlib
288
289mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir</literal>
290EOF</userinput></screen>
291
292 <para>
293 Compile <application>Firefox</application> by issuing the following
294 commands:
295 </para>
296
297 <para>
298 If you have installed system versions of graphite2 and harfbuzz and wish
299 firefox to use those instead of its shipped versions, apply the patch and
300 uncomment the appropriate entries in the <filename>mozconfig</filename>
301 file.
302 </para>
303
304<screen><userinput>patch -Np1 -i ../firefox-&firefox-version;-system_graphite2_harfbuzz-1.patch</userinput></screen>
305
306 <para>
307 If the geolocation APIs are needed:
308 </para>
309
310 <note>
311 <para>
312 <!-- Taken from Arch Linux - an immensely helpful link - Thanks -->
313 The Google and Mozilla API Keys below are specific to LFS. If using
314 these instructions for another distro, or if you intend to distribute
315 binary copies of the software using these instructions, please obtain
316 your own keys following the instructions located at
317 <ulink url="http://www.chromium.org/developers/how-tos/api-keys"/> and
318 <ulink url="https://location.services.mozilla.com/api"/> respectively.
319 <!-- BLFS Devs, register an account at Google with your
320 @linuxfromscratch.org email address, and I'll make you an administrator
321 for the 'Google APIs for LFS' project (where the API and OAuth keys
322 were created for use in the book).-->
323 </para>
324 </note>
325
326<screen><userinput>echo "AIzaSyDxKL42zsPjbke5O8_rPVpVrLrJ8aeE9rQ" > google-key
327echo "d2284a20-0505-4927-a809-7ffaf4d91e55" > mozilla-key</userinput></screen>
328
329 <note><para>
330 If you are compiling <application>Firefox</application> in chroot, make
331 sure you have <envar>$SHELL</envar> environment variable set or prepend
332 <envar>SHELL=/bin/sh</envar>.
333 </para></note>
334
335<screen><userinput>./mach build</userinput></screen>
336
337 <para>
338 The <filename>mozconfig</filename> above disables the tests because
339 they use a lot more time and disk space for no obvious benefit. If
340 you have nevertheless enabled them, you can run the tests by executing
341 <command>./mach gtest</command>. This will require a network connection,
342 and to be run from within an Xorg session - there is a popup dialog
343 when it fails to connect to ALSA (that does not create a failed test).
344 One or two tests will fail. To see the details of the failure(s) you
345 will need to log the output from that command so that you can review it.
346 </para>
347
348 <para>
349 Now, as the <systemitem class="username">root</systemitem> user:
350 </para>
351
352<screen role="root"><userinput>./mach install &amp;&amp;
353
354mkdir -pv /usr/lib/mozilla/plugins &amp;&amp;
355ln -sfv ../../mozilla/plugins /usr/lib/firefox/browser/</userinput></screen>
356<!--
357 <para>
358 Set environment variables back to their values:
359 </para>
360
361<screen><userinput>export CFLAGS=$CFLAGS_HOLD &amp;&amp;
362export CXXFLAGS=$CXXFLAGS_HOLD &amp;&amp;
363unset CFLAGS_HOLD CXXFLAGS_HOLD</userinput></screen>
364-->
365
366 </sect2>
367
368 <sect2 role="commands">
369 <title>Command Explanations</title>
370
371 <para>
372 <command>./mach build</command>: <application>Firefox</application>
373 now uses this <application>python2</application> script to run the
374 build and install.
375 </para>
376
377 <para>
378 <option>./mach build --verbose</option>: Use this alternative if you
379 need details of which files are being compiled, together with any C or
380 C++ flags being used.
381 </para>
382
383 <para>
384 <command>mkdir -pv /usr/lib/mozilla/plugins</command>: This ensures
385 that <filename class="directory">/usr/lib/mozilla/plugins/</filename>
386 exists.
387 </para>
388
389 <para>
390 <command>ln -sv ... /usr/lib/firefox/browser</command>:
391 This command creates a symbolic link to <filename
392 class="directory">/usr/lib/mozilla/plugins</filename>. It's not really
393 needed, as <application>Firefox</application> checks <filename
394 class="directory">/usr/lib/mozilla/plugins</filename> by default, but the
395 symbolic link is made to keep all the plugins installed in one folder.
396 </para>
397
398 </sect2>
399
400 <sect2 role="configuration">
401 <title>Configuring Firefox</title>
402
403 <para>
404 If you use a desktop environment like <application>Gnome</application> or
405 <application>KDE</application> you may like to create a
406 <filename>firefox.desktop</filename> file so that
407 <application>Firefox</application> appears in the panel's menus. If you
408 didn't enable startup-notification in your mozconfig change the
409 StartupNotify line to false. As the
410 <systemitem class="username">root</systemitem> user:
411 </para>
412
413<screen role="root"><userinput>mkdir -pv /usr/share/applications &amp;&amp;
414mkdir -pv /usr/share/pixmaps &amp;&amp;
415
416cat &gt; /usr/share/applications/firefox.desktop &lt;&lt; "EOF" &amp;&amp;
417<literal>[Desktop Entry]
418Encoding=UTF-8
419Name=Firefox Web Browser
420Comment=Browse the World Wide Web
421GenericName=Web Browser
422Exec=firefox %u
423Terminal=false
424Type=Application
425Icon=firefox
426Categories=GNOME;GTK;Network;WebBrowser;
427MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
428StartupNotify=true</literal>
429EOF
430
431ln -sfv /usr/lib/firefox/browser/chrome/icons/default/default128.png \
432 /usr/share/pixmaps/firefox.png</userinput></screen>
433
434 <sect3><title>Configuration Information</title>
435
436 <para>
437 The application settings for firefox are accessible by keying
438 <command>about:config</command> in the address bar.
439 </para>
440
441 <para>
442 With this version of <application>firefox</application>, getting
443 working sound can be a problem. Although upstream prefers pulseaudio,
444 on balance using <application>Alsa</application> may be easier.
445 </para>
446
447 <para>
448 If you enabled <application>Alsa</application> for sound, you may need
449 to alter one variable to get working sound. If you run
450 <command>firefox</command> from a term and try to play something with
451 sound you might encounter error messages like:
452 </para>
453
454 <para>
455 <literal>Sandbox: seccomp sandbox violation: pid 3941, tid 4030,
456 syscall 16, args 48 2147767296 139909894784796 0 0 0.</literal>
457 </para>
458
459 <para>
460 That was on x86_64, on i686 the syscall number is 54. To allow this
461 syscall, in <command>about:config</command> change
462 <command>security.sandbox.content.syscall_whitelist</command> to 16
463 (or 54 if using i686).
464 </para>
465
466 <para>
467 If you use <command>pulseaudio</command> in a Desktop Environment, it
468 might already be started by that DE. But if it is not, although
469 firefox-57 managed to start it, firefox-58 does not. If you run
470 <command>firefox</command> from a term, trying to play sound will
471 encounter error messages warning <literal>Can't get cubeb
472 context!</literal>
473 </para>
474
475 <para>
476 The fix for this is to close firefox, start pulseaudio to check it
477 does start (if not, read the information on Configuring in <xref
478 linkend="pulseaudio"/>) and restart firefox to check it is working.
479 If it now works, add the following to your <filename>~/.xinitrc</filename>:
480<phrase revision="sysv">
481<literal>pulseaudio --verbose --log-target=syslog&amp;</literal></phrase>
482<phrase revision="systemd">
483<literal>pulseaudio --verbose --log-target=journald&amp;</literal></phrase>
484 (unfortunately, on some systems this does not work).
485 </para>
486
487 <para>
488 You may wish to use multiple profiles within firefox. To do that, invoke
489 firefox as <command>firefox --ProfileManager</command>. You can also
490 check which profile is currently in use from
491 <command>about:profiles</command>.
492 </para>
493
494 </sect3>
495 </sect2>
496
497 <sect2 role="content">
498 <title>Contents</title>
499
500 <segmentedlist>
501 <segtitle>Installed Programs</segtitle>
502 <segtitle>Installed Libraries</segtitle>
503 <segtitle>Installed Directory</segtitle>
504
505 <seglistitem>
506 <seg>
507 firefox
508 </seg>
509 <seg>
510 Numerous libraries, browser components, plugins, extensions, and
511 helper modules installed in /usr/lib/firefox
512 </seg>
513 <seg>
514 /usr/lib/firefox and /usr/lib/mozilla
515 </seg>
516 </seglistitem>
517 </segmentedlist>
518
519 <variablelist>
520 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
521 <?dbfo list-presentation="list"?>
522 <?dbhtml list-presentation="table"?>
523
524 <varlistentry id="firefox-prog">
525 <term><command>firefox</command></term>
526 <listitem>
527 <para>
528 is a <application>GTK+-3</application> internet browser that uses
529 the Mozilla Gecko rendering engine.
530 </para>
531 <indexterm zone="firefox firefox-prog">
532 <primary sortas="b-firefox">firefox</primary>
533 </indexterm>
534 </listitem>
535 </varlistentry>
536
537 </variablelist>
538
539 </sect2>
540
541</sect1>
Note: See TracBrowser for help on using the repository browser.