source: xsoft/graphweb/chromium.xml@ 0d4cd97

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.1 8.2 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 0d4cd97 was 0d4cd97, checked in by DJ Lucas <dj@…>, 7 years ago

Update to Chromium-59.0.0.115. Fixes #9412.

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

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