source: xsoft/graphweb/chromium.xml@ 2fd0fc93

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

Update to Chromium-60.0.3112.90. Fixes #9566.

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

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