source: xsoft/graphweb/firefox.xml@ 44cd41e

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.4 9.0 9.1 bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt 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 44cd41e was 44cd41e, checked in by Ken Moffat <ken@…>, 5 years ago

Update to firefox-63.0.

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

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