source: xsoft/graphweb/firefox.xml@ b6e52eed

perl-modules
Last change on this file since b6e52eed was b6e52eed, checked in by Ken Moffat <ken@…>, 6 years ago

perl-modules branch: merge trunk r20482 to r20489.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/perl-modules@20490 af4574ff-66df-0310-9fd7-8a98e5e911e0

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