source: xsoft/graphweb/chromium.xml@ 58d4e57

10.0 10.1 11.0 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind ken/refactor-virt lazarus perl-modules qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 58d4e57 was 58d4e57, checked in by DJ Lucas <dj@…>, 5 years ago

Update to Chromium-56.0.2924.76. Fixes #8812.

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

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