source: xsoft/graphweb/chromium.xml@ 2315c0bc

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

Update to Chromium-58.0.3029.81. Fixes #9154.

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

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