source: xsoft/graphweb/chromium.xml@ 63584a3

10.0 10.1 11.0 11.1 11.2 8.1 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 63584a3 was 63584a3, checked in by DJ Lucas <dj@…>, 6 years ago

Multiple fixes for Flash Player and md5fix for Chromium.

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

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