source: xsoft/graphweb/chromium.xml@ e5c8de0

10.0 10.1 11.0 11.1 11.2 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind lazarus perl-modules plabs/python-mods qt5new trunk upgradedb xry111/intltool xry111/soup3 xry111/test-20220226
Last change on this file since e5c8de0 was e5c8de0, checked in by DJ Lucas <dj@…>, 5 years ago

Update to gnome-online-accounts-3.26.1.
Add notes about Google and Mozilla 0Auth API ID/secrets.

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

  • Property mode set to 100644
File size: 18.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 chromium-download-http "https://commondatastorage.googleapis.com/chromium-browser-official/chromium-&chromium-version;.tar.xz">
8 <!ENTITY chromium-download-ftp " ">
9 <!ENTITY chromium-md5sum "bf0629c03b3e3b957a9ee99c10b28210">
10 <!ENTITY chromium-size "531 MB">
11 <!ENTITY chromium-buildsize "6.1 GB">
12 <!ENTITY chromium-time "94 SBU (with 4 threads)">
13 <!-- Ninja defaults to parallel build unless supplying -j1, SBU measured on
14 dual core, hyperthreaded CPU (4 threads). -->
15]>
16
17<sect1 id="chromium" xreflabel="Chromium-&chromium-version;">
18 <?dbhtml filename="chromium.html"?>
19
20 <sect1info>
21 <othername>$LastChangedBy$</othername>
22 <date>$Date$</date>
23 </sect1info>
24
25 <title>Chromium-&chromium-version;</title>
26
27 <indexterm zone="chromium">
28 <primary sortas="a-Chromium">Chromium</primary>
29 </indexterm>
30
31 <sect2 role="package">
32 <title>Introduction to Chromium</title>
33
34 <para><application>Chromium</application> is an open-source browser project
35 that aims to build a safer, faster, and more stable way for all users to
36 experience the web.</para>
37
38 &lfs81_checked;
39
40 <bridgehead renderas="sect3">Package Information</bridgehead>
41 <itemizedlist spacing="compact">
42 <listitem>
43 <para>Download (HTTP): <ulink url="&chromium-download-http;"/></para>
44 </listitem>
45 <listitem>
46 <para>Download (FTP): <ulink url="&chromium-download-ftp;"/></para>
47 </listitem>
48 <listitem>
49 <para>Download MD5 sum: &chromium-md5sum;</para>
50 </listitem>
51 <listitem>
52 <para>Download size: &chromium-size;</para>
53 </listitem>
54 <listitem>
55 <para>Estimated disk space required: &chromium-buildsize;</para>
56 </listitem>
57 <listitem>
58 <para>Estimated build time: &chromium-time;</para>
59 </listitem>
60 </itemizedlist>
61
62 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
63
64 <bridgehead renderas="sect4">Required patch to fix build issues with
65 <application>gcc-7.1.0</application>:</bridgehead>
66 <itemizedlist spacing="compact">
67 <listitem>
68 <para>
69 <ulink url="&patch-root;/chromium-&chromium-version;-gcc7-1.patch"/>
70 </para>
71 </listitem>
72 </itemizedlist>
73
74 <bridgehead renderas="sect4">Required patch to fix build issues with
75 <application>GlibC-2.26</application>:</bridgehead>
76 <itemizedlist spacing="compact">
77 <listitem>
78 <para>
79 <ulink url="&patch-root;/chromium-&chromium-version;-glibc-2.26-1.patch"/>
80 </para>
81 </listitem>
82 </itemizedlist>
83
84 <bridgehead renderas="sect4">Optional Chrome binaries to extract the
85 <application>WideVine</application> plug-in (Netflix) support:</bridgehead>
86 <itemizedlist spacing="compact">
87 <listitem>
88 <para>Download (HTTP):
89 <ulink url="http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_&chromium-version;-1_amd64.deb"/>
90 </para>
91 </listitem>
92 <listitem>
93 <para>Download MD5 sum: 3282688ec79c41add2ad4390885dc203</para>
94 </listitem>
95 <listitem>
96 <para>Download size: 63 MB</para>
97 </listitem>
98 </itemizedlist>
99 <itemizedlist spacing="compact">
100 <listitem>
101 <para>Download (HTTP):
102 <ulink url="http://mirror.retrosnub.co.uk/apt/google/pool/main/g/google-chrome-stable/google-chrome-stable_48.0.2564.116-1_i386.deb"/>
103 </para>
104 </listitem>
105 <listitem>
106 <para>Download MD5 sum: 895e877b9bfe5da05a061369c2078626</para>
107 </listitem>
108 <listitem>
109 <para>Download size: 45 MB</para>
110 </listitem>
111 </itemizedlist>
112
113 <bridgehead renderas="sect3">Chromium Dependencies</bridgehead>
114
115 <bridgehead renderas="sect4">Required</bridgehead>
116 <para role="required">
117 <xref linkend="alsa-lib"/>,
118 <xref linkend="cups"/>,
119 <xref linkend="desktop-file-utils"/>,
120 <xref linkend="dbus"/>,
121 <xref linkend="perl-file-basedir"/>,
122 <xref linkend="gtk3"/>,
123 <xref linkend="hicolor-icon-theme"/>,
124 <xref linkend="mitkrb"/>,
125 <xref linkend="mesa"/>,
126 <xref linkend="nodejs"/>,
127 <xref linkend="nss"/>,
128 <xref linkend="python2"/>,
129 <xref linkend="usbutils"/>, and
130 <xref linkend="x-window-system"/>
131 </para>
132
133 <bridgehead renderas="sect4">Recommended</bridgehead>
134 <para role="recommended">
135 <xref linkend="ffmpeg"/>,
136 <xref linkend="flac"/>,
137 <xref linkend="git"/>,
138<!-- <xref linkend="icu"/>, -->
139<!-- <xref linkend="libevent"/>, -->
140 <xref linkend="libexif"/>,
141 <xref linkend="libjpeg"/>,
142 <xref linkend="libpng"/>,
143 <xref linkend="libsecret"/>,
144<!-- <xref linkend="libvpx"/>, -->
145 <xref linkend="libwebp"/>,
146 <xref linkend="pciutils"/>,
147 <xref linkend="pulseaudio"/>,
148 <xref linkend="xdg-utils"/>, and
149 <xref linkend="yasm"/>
150 </para>
151
152 <bridgehead renderas="sect4">Optional</bridgehead>
153 <para role="optional">
154 <xref linkend="GConf"/>,
155 <xref linkend="icu"/> (currently broken),
156 <xref linkend="gnome-keyring"/>,
157 <xref linkend="libevent"/> (currently broken),
158 <xref linkend="libvpx"/> (currently broken),
159 <xref linkend="libxml2"/> (currently broken),
160 <ulink url="https://devel.freebsoft.org/speechd">speech-dispatcher</ulink>
161 (for the screen reader), and
162 <ulink url="https://google.github.io/snappy">snappy</ulink>
163 </para>
164
165 <para condition="html" role="usernotes">User Notes:
166 <ulink url="&blfs-wiki;/chromium"/></para>
167
168 </sect2>
169
170 <sect2 role="installation">
171 <title>Installation of Chromium</title>
172
173 <para>Apply a patch to fix errors with building with
174 <application>GCC-7.1.0</application>:</para>
175
176<screen><userinput>patch -Np1 -i ../chromium-&chromium-version;-gcc7-1.patch</userinput></screen>
177
178 <para>Apply a patch to fix an issue when building against GlibC-2.26:</para>
179
180<screen><userinput>patch -Np1 -i ../chromium-&chromium-version;-glibc-2.26-1.patch</userinput></screen>
181
182 <para>Enable the use of the
183 <ulink url="http://www.widevine.com/">WideVine</ulink> plugin, needed for
184 Netflix support (see the WideVine section below). Define an
185 available product name ("Pinkie Pie" in this case) with the following
186 command:</para>
187
188<screen><userinput>sed 's/WIDEVINE_CDM_AVAILABLE/&amp;\n\n#define WIDEVINE_CDM_VERSION_STRING "Pinkie Pie"/' \
189 -i third_party/widevine/cdm/stub/widevine_cdm_version.h</userinput></screen>
190
191 <para>Fix to minor build errors in gn:</para>
192
193<screen><userinput>sed -e "/histogram_samples.cc/a\ 'base/metrics/histogram_snapshot_manager.cc'," \
194 -e "/heap_profiler_event_writer.cc/s/event_/heap_dump_/" \
195 -i tools/gn/bootstrap/bootstrap.py</userinput></screen>
196
197 <para>Fix a build issue with current ATK:</para>
198
199<screen><userinput>sed '/atk_state_set_add_state/s@atk_state_set,@state_set,@' \
200 -i content/browser/accessibility/browser_accessibility_auralinux.cc</userinput></screen>
201
202 <para>Remove third-party build files that interfere with system versions:</para>
203
204 <note>
205 <para>
206 Chromium uses many external projects, the selections below are not set
207 in stone, however they have been tested thoroughly. With Chromium
208 &chromium-version;, system versions of icu, libevent, libvpx, libxml2,
209 and zlib are known to break the build at this time.
210 <!-- icu: Not at 59 internally -->
211 <!-- libevent: needs internal headers -->
212 <!-- libvpx: breaks build in gfx -->
213 <!-- libxml2: breaks build with ui -->
214 <!-- zlib requires libminizip -->
215 </para>
216 </note>
217
218<!-- Again, thanks to Arch, this is much better than listing all the needed
219shipped libs required to use the remove_bundled_files.py script -->
220<screen><userinput>for LIB in ffmpeg flac harfbuzz-ng<!-- icu libevent--> libjpeg \
221 libjpeg_turbo libpng libwebp<!-- libxml libvpx--> libxslt yasm; do
222 find -type f -path "*third_party/$LIB/*" \
223 \! -path "*third_party/$LIB/chromium/*" \
224 \! -path "*third_party/$LIB/google/*" \
225 \! -path "*base/third_party/icu/*" \
226 \! -path "*base/third_party/libevent/*" \
227 \! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
228 -delete
229done &amp;&amp;
230
231python build/linux/unbundle/replace_gn_files.py \
232 --system-libraries ffmpeg flac harfbuzz-ng<!-- icu libevent--> libjpeg \
233 libpng libwebp<!-- libxml libvpx--> libxslt yasm &amp;&amp;
234python third_party/libaddressinput/chromium/tools/update-strings.py</userinput></screen>
235
236 <para><application>Chromium</application> uses an internal tool, <ulink
237 url="https://chromium.googlesource.com/chromium/src/tools/gn">gn</ulink>,
238 to generate the <application>Ninja</application> build files. Complete
239 configuration of the build using the following commands:</para>
240
241 <note>
242 <para>
243 <!-- Taken from Arch Linux - an immensely helpful link - Thanks -->
244 The Google API Key and OAuth tokens below are specific to LFS. If using
245 these instructions for another distro, or if you intend to distribute
246 binary copies of the software using these instructions, please obtain
247 your own keys following the instructions located at
248 <ulink url="http://www.chromium.org/developers/how-tos/api-keys"/>.
249 <!-- BLFS Devs, register an account at Google with your
250 @linuxfromscratch.org email address, and I'll make you an administrator
251 for the 'Google APIs for LFS' project (where the API and OAuth keys
252 were created for use in the book).-->
253 </para>
254 </note>
255
256<screen><userinput>GN_CONFIG=('google_api_key="AIzaSyDxKL42zsPjbke5O8_rPVpVrLrJ8aeE9rQ"'
257'google_default_client_id="595013732528-llk8trb03f0ldpqq6nprjp1s79596646.apps.googleusercontent.com"'
258'google_default_client_secret="5ntt6GbbkjnTVXx-MSxbmx5e"'
259'clang_use_chrome_plugins=false'
260'enable_hangout_services_extension=true'
261'enable_nacl=false'
262'enable_nacl_nonsfi=false'
263'enable_swiftshader=false'
264'enable_widevine=true'
265'fatal_linker_warnings=false'
266'ffmpeg_branding="Chrome"'
267'fieldtrial_testing_like_official_build=true'
268'is_debug=false'
269'is_clang=false'
270'link_pulseaudio=true'
271'linux_use_bundled_binutils=false'
272'proprietary_codecs=true'
273'remove_webcore_debug_symbols=true'
274'symbol_level=0'
275'treat_warnings_as_errors=false'
276'use_allocator="none"'
277'use_cups=true'
278'use_gconf=false'
279'use_gnome_keyring=false'
280'use_gold=false'
281'use_gtk3=true'
282'use_kerberos=true'
283'use_pulseaudio=true'
284'use_sysroot=false')</userinput></screen>
285
286 <para>Build <application>gn</application> and use it to prepare the
287 <application>Ninja</application> build files:</para>
288
289<screen><userinput>python tools/gn/bootstrap/bootstrap.py --gn-gen-args "${GN_CONFIG[*]}" &amp;&amp;
290out/Release/gn gen out/Release --args="${GN_CONFIG[*]}"</userinput></screen>
291
292 <warning>
293 <para>Ninja, by default, sets the number of jobs to the number of
294 available threads. If your machine is memory constrained, with regard to
295 number of threads, you should reduce the number of jobs by passing the
296 <parameter>-j#</parameter> switch to the <command>ninja</command> command
297 below. Plan for roughly 1.25GB per thread while linking
298 <application>WebKit</application> to avoid out of memory errors.</para>
299 </warning>
300
301 <para>Build <application>Chromium</application> using the following
302 commands:</para>
303
304<screen><userinput>mkdir -p third_party/node/linux/node-linux-x64/bin &amp;&amp;
305ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/ &amp;&amp;
306ninja -C out/Release chrome chrome_sandbox chromedriver widevinecdmadapter</userinput></screen>
307
308 <para>This package was already tested as part of the build.</para>
309
310 <para>Now, as the <systemitem class="username">root</systemitem> user,
311 install the package:</para>
312
313<screen role="root"><userinput>install -vDm755 out/Release/chrome \
314 /usr/lib/chromium/chromium &amp;&amp;
315install -vDm4755 out/Release/chrome_sandbox \
316 /usr/lib/chromium/chrome-sandbox &amp;&amp;
317install -vDm755 out/Release/chromedriver \
318 /usr/lib/chromium/chromedriver &amp;&amp;
319ln -svf /usr/lib/chromium/chromium /usr/bin &amp;&amp;
320ln -svf /usr/lib/chromium/chromedriver /usr/bin/ &amp;&amp;
321
322install -vm644 out/Release/icudtl.dat /usr/lib/chromium/ &amp;&amp;
323install -vDm644 out/Release/gen/content/content_resources.pak \
324 /usr/lib/chromium/ &amp;&amp;
325install -vm644 out/Release/{*.pak,*.bin} \
326 /usr/lib/chromium/ &amp;&amp;
327
328cp -av out/Release/locales /usr/lib/chromium/ &amp;&amp;
329chown -Rv root:root /usr/lib/chromium/locales &amp;&amp;
330
331install -vDm644 out/Release/chrome.1 \
332 /usr/share/man/man1/chromium.1</userinput></screen>
333
334 <para>While still the <systemitem class="username">root</systemitem> user,
335 install icons and the .desktop file:</para>
336
337<screen role="root"><userinput>for size in 16 32; do
338 install -vDm644 \
339 "chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \
340 "/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
341done &amp;&amp;
342
343for size in 22 24 48 64 128 256; do
344 install -vDm644 "chrome/app/theme/chromium/product_logo_$size.png" \
345 "/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
346done &amp;&amp;
347
348cat &gt; /usr/share/applications/chromium.desktop &lt;&lt; "EOF"
349[Desktop Entry]
350Encoding=UTF-8
351Name=Chromium Web Browser
352Comment=Access the Internet
353GenericName=Web Browser
354Exec=chromium %u
355Terminal=false
356Type=Application
357Icon=chromium
358Categories=GTK;Network;WebBrowser;
359MimeType=application/xhtml+xml;text/xml;application/xhtml+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
360EOF</userinput></screen>
361
362 <note>
363 <para>If upgrading from a previous build of chromium using gtk+-2.x, you
364 may need to remove the <filename
365 class="directory">~/.config/chromium</filename> directory.</para>
366 </note>
367
368 <bridgehead renderas="sect3">Extracting the WideVine plugin from Chrome</bridgehead>
369
370 <para>Extract the downloaded deb file with the following commands:</para>
371
372<screen><userinput>mkdir temp &amp;&amp;
373cd temp &amp;&amp;
374case $(uname -m) in
375 x86_64) ar -x ../../google-chrome-stable_&chromium-version;-1_amd64.deb
376 ;;
377 i?86) ar -x ../../google-chrome-stable_48.0.2564.116-1_i386.deb
378 ;;
379esac</userinput></screen>
380
381 <para>As the <systemitem class="username">root</systemitem> user, enable
382 the WideVine plugin with the following commands:</para>
383
384<!-- Note that libwidevinecdmadapter.so is not in the tarball. It is
385created only if enable_widevine=true i sset in GN_CONFIG -->
386
387<screen role="root"><userinput>tar -xf data.tar.xz &amp;&amp;
388install -vm755 ../out/Release/libwidevinecdmadapter.so /usr/lib/chromium/ &amp;&amp;
389install -vm755 opt/google/chrome/libwidevinecdm.so /usr/lib/chromium/</userinput></screen>
390
391 </sect2>
392
393 <sect2 role="commands">
394 <title>Command Explanations</title>
395
396 <para><command>GN_CONFIG=(...)</command>: this array contains
397 all of the defines used in the build.</para>
398
399 <para><command>python tools/gn/bootstrap/bootstrap.py --gn-gen-args "${GN_CONFIG[*]}"</command>:
400 this command replaces defines in the gn files with the values contained in
401 <envar>${GN_CONFIG[@]}</envar>.</para>
402
403 <para><command>out/Release/gn gen out/Release --args="${GN_CONFIG[*]}"</command>:
404 this command runs a Google provided configuration script
405 <application>gn</application> on the source tree to produce
406 a <application>Ninja</application> configuration suitable for the build
407 machine.</para>
408
409 <para><command>mkdir...ln -s /usr/bin/node
410 third_party/node/linux/node-linux-x64/bin/</command>: these commands
411 replaced the local <application>Node.js</application> (no longer available)
412 with the system installed <application>Node.js</application>.</para>
413
414 <para><command>ar -x ../../google-chrome-stable*.deb</command>:
415 the <command>ar</command> utility is used to extract Debian archives.</para>
416
417 </sect2>
418
419 <sect2 role="content">
420 <title>Contents</title>
421
422 <segmentedlist>
423 <segtitle>Installed Programs</segtitle>
424 <segtitle>Installed Libraries</segtitle>
425 <segtitle>Installed Directories</segtitle>
426
427 <seglistitem>
428 <seg>/usr/lib/chromium/chromium,
429 /usr/lib/chromium/chromedriver, and
430 /usr/lib/chromium/chrome-sandbox</seg>
431 <seg>none</seg>
432 <seg>/usr/lib/chromium</seg>
433 </seglistitem>
434 </segmentedlist>
435
436 <variablelist>
437 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
438 <?dbfo list-presentation="list"?>
439 <?dbhtml list-presentation="table"?>
440
441 <varlistentry id="chromium-lib">
442 <term><command>/usr/lib/chromium/chromium</command></term>
443 <listitem>
444 <para> is the main chromium executable.</para>
445 <indexterm zone="chromium chromium-lib">
446 <primary sortas="b-chromiumlib">chromium</primary>
447 </indexterm>
448 </listitem>
449 </varlistentry>
450
451 <varlistentry id="chromedriver">
452 <term><command>/usr/lib/chromium/chromedriver</command></term>
453 <listitem>
454 <para> is a
455 <ulink url="http://www.seleniumhq.org/projects/webdriver/">
456 WebDriver</ulink> for Chromium.</para>
457 <indexterm zone="chromium chromedriver">
458 <primary sortas="b-chromedriver">chromedriver</primary>
459 </indexterm>
460 </listitem>
461 </varlistentry>
462
463 <varlistentry id="chrome-sandbox">
464 <term><command>/usr/lib/chromium/chrome-sandbox</command></term>
465 <listitem>
466 <para> creates a sandboxed environment for running untrusted
467 code (plugins).</para>
468 <indexterm zone="chromium chrome-sandbox">
469 <primary sortas="b-chrome-sandbox">chrome-sandbox</primary>
470 </indexterm>
471 </listitem>
472 </varlistentry>
473
474 </variablelist>
475
476 </sect2>
477
478</sect1>
Note: See TracBrowser for help on using the repository browser.