source: xsoft/graphweb/chromium.xml@ a9b50a4

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 a9b50a4 was a9b50a4, checked in by DJ Lucas <dj@…>, 7 years ago

Update to chromium-59.0.3071.109. Fixes #9336.

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

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