source: xsoft/graphweb/chromium.xml@ 266784c0

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

Update to Chromium-56.0.2924.87. Fixes #8845.

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

  • Property mode set to 100644
File size: 17.6 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 "b687feb24ca152a0b0a2ab5df5cd28d2">
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 &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 partially remedied in 56.x but yet to verify all
172 libvpx still requires experimental vp9 as of 0.6 -->
173 </para>
174 </note>
175
176<!-- Again, thanks to Arch, this is much better than listing all the needed
177shipped libs required to use the remove_bundled_files.py script -->
178<screen><userinput>for LIB in flac harfbuzz-ng libwebp libxslt yasm; do
179 find -type f -path "*third_party/$LIB/*" \
180 \! -path "*third_party/$LIB/chromium/*" \
181 \! -path "*third_party/$LIB/google/*" \
182 \! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
183 -delete
184done &amp;&amp;
185
186python build/linux/unbundle/replace_gn_files.py \
187 --system-libraries flac harfbuzz-ng libwebp libxslt yasm</userinput></screen>
188
189 <para><application>Chromium</application> uses an internal tool, <ulink
190 url="https://chromium.googlesource.com/chromium/src/tools/gn">gn</ulink>,
191 to generate the <application>Ninja</application> build files. Complete
192 configuration of the build using the following commands:</para>
193
194 <note>
195 <para>
196 <!-- Taken from Arch Linux - an immensely helpful link - Thanks -->
197 The Google API Key and OAuth tokens below are specific to LFS. If using
198 these instructions for another distro, or if you intend to distribute
199 binary copies of the software using these instructions, please obtain
200 your own keys following the instructions located at
201 <ulink url="http://www.chromium.org/developers/how-tos/api-keys"/>.
202 <!-- BLFS Devs, register an account at Google with your
203 @linuxfromscratch.org email address, and I'll make you an administrator
204 for the 'Chromium for LFS' project (where the API and OAuth keys were
205 created for use in the book).-->
206 </para>
207 </note>
208
209<screen><userinput>GN_CONFIG=("google_api_key=\"AIzaSyDxKL42zsPjbke5O8_rPVpVrLrJ8aeE9rQ\""
210"google_default_client_id=\"595013732528-llk8trb03f0ldpqq6nprjp1s79596646.apps.googleusercontent.com\""
211"google_default_client_secret=\"5ntt6GbbkjnTVXx-MSxbmx5e\""
212'clang_use_chrome_plugins=false'
213'enable_hangout_services_extension=true'
214'enable_nacl=false'
215'enable_nacl_nonsfi=false'
216'enable_widevine=true'
217'fatal_linker_warnings=false'
218'ffmpeg_branding="Chrome"'
219'fieldtrial_testing_like_official_build=true'
220'is_debug=false'
221'is_clang=false'
222'link_pulseaudio=true'
223'linux_use_bundled_binutils=false'
224'proprietary_codecs=true'
225'remove_webcore_debug_symbols=true'
226'symbol_level=0'
227'treat_warnings_as_errors=false'
228'use_allocator="none"'
229'use_cups=true'
230'use_gconf=false'
231'use_gnome_keyring=false'
232'use_gold=false'
233'use_gtk3=false'
234'use_kerberos=true'
235'use_pulseaudio=true'
236'use_sysroot=false')</userinput></screen>
237
238 <para>Build <application>gn</application> and use it to prepare the
239 <application>Ninja</application> build files:</para>
240
241<screen><userinput>python tools/gn/bootstrap/bootstrap.py --gn-gen-args "${GN_CONFIG[*]}" &amp;&amp;
242out/Release/gn gen out/Release --args="${GN_CONFIG[*]}"</userinput></screen>
243
244 <para>Build <application>Chromium</application> using the following
245 command:</para>
246
247<screen><userinput>ninja -C out/Release chrome chrome_sandbox chromedriver widevinecdmadapter</userinput></screen>
248
249 <para>This package was already tested as part of the build.</para>
250
251 <para>Now, as the <systemitem class="username">root</systemitem> user,
252 install the pacakage:</para>
253
254<screen role="root"><userinput>install -vDm755 out/Release/chrome \
255 /usr/lib/chromium/chromium &amp;&amp;
256install -vDm4755 out/Release/chrome_sandbox \
257 /usr/lib/chromium/chrome-sandbox &amp;&amp;
258install -vDm755 out/Release/chromedriver \
259 /usr/lib/chromium/chromedriver &amp;&amp;
260ln -svf /usr/lib/chromium/chromium /usr/bin &amp;&amp;
261ln -svf /usr/lib/chromium/chromedriver /usr/bin/ &amp;&amp;
262
263install -vm755 out/Release/libwidevinecdmadapter.so \
264 /usr/lib/chromium/ &amp;&amp;
265install -vDm644 out/Release/icudtl.dat /usr/lib/chromium &amp;&amp;
266install -vDm644 out/Release/gen/content/content_resources.pak \
267 /usr/lib/chromium/ &amp;&amp;
268install -vm644 out/Release/{*.pak,*.bin} \
269 /usr/lib/chromium/ &amp;&amp;
270
271cp -av out/Release/locales /usr/lib/chromium/ &amp;&amp;
272chown -Rv root:root /usr/lib/chromium/locales &amp;&amp;
273
274install -vDm644 out/Release/chrome.1 \
275 /usr/share/man/man1/chromium.1</userinput></screen>
276
277 <para>While still the <systemitem class="username">root</systemitem> user,
278 install icons and the .desktop file:</para>
279
280<screen><userinput role="root">for size in 16 32; do
281 install -vDm644 \
282 "chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \
283 "/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
284done &amp;&amp;
285
286for size in 22 24 48 64 128 256; do
287 install -vDm644 "chrome/app/theme/chromium/product_logo_$size.png" \
288 "/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
289done &amp;&amp;
290
291cat &gt; /usr/share/applications/chromium.desktop &lt;&lt; "EOF"
292[Desktop Entry]
293Encoding=UTF-8
294Name=Chromium Web Browser
295Comment=Access the Internet
296GenericName=Web Browser
297Exec=chromium %u
298Terminal=false
299Type=Application
300Icon=chromium
301Categories=GTK;Network;WebBrowser;
302MimeType=application/xhtml+xml;text/xml;application/xhtml+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
303EOF</userinput></screen>
304
305 <bridgehead renderas="sect3">Chromium Launcher</bridgehead>
306 <para><application>Chromium Launcher</application> is a wrapper for
307 <application>chromium</application> that allows use of the Pepper Flash
308 plugin. If you intend to use the <application>Pepper Flash</application>
309 plugin, build <application>Chromium Launcher</application> by running the
310 following commands:</para>
311
312<screen><userinput>tar -xf ../chromium-launcher-3.tar.gz &amp;&amp;
313cd chromium-launcher-3 &amp;&amp;
314make PREFIX=/usr</userinput></screen>
315
316 <para>Install Chromium Launcher with the following commands (as the
317 <systemitem class="username">root</systemitem> user):</para>
318
319<screen role="root"><userinput>rm -f /usr/bin/chromium &amp;&amp;
320make PREFIX=/usr install-strip &amp;&amp;
321cd ..</userinput></screen>
322
323 <bridgehead renderas="sect3">Extracting the WideVine plugin from Chrome</bridgehead>
324
325 <para>Extract the downloaded deb file with the following commands:</para>
326
327<screen><userinput>mkdir temp &amp;&amp;
328cd temp &amp;&amp;
329ar -x ../../google-chrome-stable_&chromium-version;*.deb &amp;&amp;
330tar -xf data.tar.xz</userinput></screen>
331
332 <para>As the <systemitem class="username">root</systemitem> user, install
333 the WideVine plugin with the following command:</para>
334
335<screen role="root"><userinput>install -vm755 opt/google/chrome/libwidevinecdm.so \
336 /usr/lib/chromium/</userinput></screen>
337
338
339 <bridgehead renderas="sect3">Installing the Pepper Flash plugin:</bridgehead>
340
341 <para>Extract the <application>Flash Player</application> plugin with the
342 following command:</para>
343
344<screen><userinput>tar -xf ../../flash_player_ppapi_linux.*.tar.gz</userinput></screen>
345 <para>As the <systemitem class="username">root</systemitem> user, install
346 the Pepper Flash plugin with the following command:</para>
347
348<screen role="root"><userinput>install -vdm755 /usr/lib/PepperFlash &amp;&amp;
349install -vm755 libpepflashplayer.so /usr/lib/PepperFlash &amp;&amp;
350install -vm644 manifest.json /usr/lib/PepperFlash</userinput></screen>
351
352 </sect2>
353
354 <sect2 role="commands">
355 <title>Command Explanations</title>
356
357 <para><command>GN_CONFIG=(...)</command>: this array contains
358 all of the defines used in the build.</para>
359
360 <para><command>sed "s/#include &lt;sys...</command>: this command undefines
361 MADV_FREE to fix a build issue with Linux-4.5 and newer.</para>
362
363 <para><command>python tools/gn/bootstrap/bootstrap.py --gn-gen-args "${GN_CONFIG[*]}"</command>:
364 this command replaces defines in the gn files with the values contained in
365 <envar>${GN_CONFIG[@]}</envar>.</para>
366
367 <para><command>out/Release/gn gen out/Release --args="${GN_CONFIG[*]}"</command>:
368 this command runs a Google provided configuration script
369 <application>gn</application> on the source tree to produce
370 a <application>Ninja</application> configuration suitable for the build
371 machine.</para>
372
373 <para><command>ar -x ../../google-chrome-stable*.deb</command>:
374 the <command>ar</command> utility is used to extract Debian archives.</para>
375
376 </sect2>
377
378 <sect2 role="content">
379 <title>Contents</title>
380
381 <segmentedlist>
382 <segtitle>Installed Programs</segtitle>
383 <segtitle>Installed Libraries</segtitle>
384 <segtitle>Installed Directories</segtitle>
385
386 <seglistitem>
387 <seg>/usr/bin/chromium, /usr/lib/chromium/chromium,
388 /usr/lib/chromium/chromedriver, and
389 /usr/lib/chromium/chrome-sandbox</seg>
390 <seg>none</seg>
391 <seg>/usr/lib/chromium, /usr/lib/chromium-launcher,
392 and (optionally) /usr/lib/PepperFlash</seg>
393 </seglistitem>
394 </segmentedlist>
395
396 <variablelist>
397 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
398 <?dbfo list-presentation="list"?>
399 <?dbhtml list-presentation="table"?>
400
401 <varlistentry id="chromium-prog">
402 <term><command>/usr/bin/chromium</command></term>
403 <listitem>
404 <para> is a wrapper for the main chromium binary (in
405 /usr/lib/chromium) that allow use of the Pepper Flash plugin.</para>
406 <indexterm zone="chromium chromium-prog">
407 <primary sortas="b-chromium">chromium</primary>
408 </indexterm>
409 </listitem>
410 </varlistentry>
411
412 <varlistentry id="chromium-lib">
413 <term><command>/usr/lib/chromium/chromium</command></term>
414 <listitem>
415 <para> is the main chromium executable.</para>
416 <indexterm zone="chromium chromium-lib">
417 <primary sortas="b-chromiumlib">chromium</primary>
418 </indexterm>
419 </listitem>
420 </varlistentry>
421
422 <varlistentry id="chromedriver">
423 <term><command>/usr/bin/chromedriver</command></term>
424 <listitem>
425 <para> is a
426 <ulink url="http://www.seleniumhq.org/projects/webdriver/">
427 WebDriver</ulink> for Chromium.</para>
428 <indexterm zone="chromium chromedriver">
429 <primary sortas="b-chromedriver">chromedriver</primary>
430 </indexterm>
431 </listitem>
432 </varlistentry>
433
434 <varlistentry id="chrome-sandbox">
435 <term><command>/usr/lib/chromium/chrome-sandbox</command></term>
436 <listitem>
437 <para> creates a sandboxed environment for running untrusted
438 code (plugins).</para>
439 <indexterm zone="chromium chrome-sandbox">
440 <primary sortas="b-chrome-sandbox">chrome-sandbox</primary>
441 </indexterm>
442 </listitem>
443 </varlistentry>
444
445 </variablelist>
446
447 </sect2>
448
449</sect1>
Note: See TracBrowser for help on using the repository browser.