source: xsoft/graphweb/chromium.xml@ aa9c0853

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

Remove unneeded '-DLIB_INSTALL_DIR' from KF5 and Plasma build instructions, Clean up Chromium instructions. Thanks Bruce.

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

  • Property mode set to 100644
File size: 16.5 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>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). 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 -vDm644 out/Release/gen/content/content_resources.pak \
287 /usr/lib/chromium/ &amp;&amp;
288install -vm644 out/Release/{*.pak,*.bin} \
289 /usr/lib/chromium/ &amp;&amp;
290
291cp -av out/Release/locales /usr/lib/chromium/ &amp;&amp;
292chown -Rv root:root /usr/lib/chromium/locales &amp;&amp;
293
294install -vDm644 out/Release/chrome.1 \
295 /usr/share/man/man1/chromium.1</userinput></screen>
296
297 <para>While still the <systemitem class="username">root</systemitem> user,
298 install icons and the .desktop file:</para>
299
300<screen role="root"><userinput>for size in 16 32; do
301 install -vDm644 \
302 "chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \
303 "/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
304done &amp;&amp;
305
306for size in 22 24 48 64 128 256; do
307 install -vDm644 "chrome/app/theme/chromium/product_logo_$size.png" \
308 "/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
309done &amp;&amp;
310
311cat &gt; /usr/share/applications/chromium.desktop &lt;&lt; "EOF"
312[Desktop Entry]
313Encoding=UTF-8
314Name=Chromium Web Browser
315Comment=Access the Internet
316GenericName=Web Browser
317Exec=chromium %u
318Terminal=false
319Type=Application
320Icon=chromium
321Categories=GTK;Network;WebBrowser;
322MimeType=application/xhtml+xml;text/xml;application/xhtml+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
323EOF</userinput></screen>
324
325 <bridgehead renderas="sect3">Extracting the WideVine plugin from Chrome</bridgehead>
326
327 <para>Extract the downloaded deb file with the following commands:</para>
328
329<screen><userinput>mkdir temp &amp;&amp;
330cd temp &amp;&amp;
331case $(uname -m) in
332 x86_64) ar -x ../../google-chrome-stable_&chromium-version;-1_amd64.deb
333 ;;
334 x86) ar -x ../../google-chrome-stable_48.0.2564.116-1_i386.deb
335 ;;
336esac</userinput></screen>
337
338 <para>As the <systemitem class="username">root</systemitem> user, enable
339 the WideVine plugin with the following commands:</para>
340
341<!-- Note that libwidevinecdmadapter.so is not in the tarball. It is
342created only if enable_widevine=true i sset in GN_CONFIG -->
343
344<screen role="root"><userinput>tar -xf data.tar.xz &amp;&amp;
345install -vm755 ../out/Release/libwidevinecdmadapter.so /usr/lib/chromium/ &amp;&amp;
346install -vm755 opt/google/chrome/libwidevinecdm.so /usr/lib/chromium/</userinput></screen>
347
348 </sect2>
349
350 <sect2 role="commands">
351 <title>Command Explanations</title>
352
353 <para><command>GN_CONFIG=(...)</command>: this array contains
354 all of the defines used in the build.</para>
355
356 <para><command>python tools/gn/bootstrap/bootstrap.py --gn-gen-args "${GN_CONFIG[*]}"</command>:
357 this command replaces defines in the gn files with the values contained in
358 <envar>${GN_CONFIG[@]}</envar>.</para>
359
360 <para><command>out/Release/gn gen out/Release --args="${GN_CONFIG[*]}"</command>:
361 this command runs a Google provided configuration script
362 <application>gn</application> on the source tree to produce
363 a <application>Ninja</application> configuration suitable for the build
364 machine.</para>
365
366 <para><command>ar -x ../../google-chrome-stable*.deb</command>:
367 the <command>ar</command> utility is used to extract Debian archives.</para>
368
369 </sect2>
370
371 <sect2 role="content">
372 <title>Contents</title>
373
374 <segmentedlist>
375 <segtitle>Installed Programs</segtitle>
376 <segtitle>Installed Libraries</segtitle>
377 <segtitle>Installed Directories</segtitle>
378
379 <seglistitem>
380 <seg>/usr/lib/chromium/chromium,
381 /usr/lib/chromium/chromedriver, and
382 /usr/lib/chromium/chrome-sandbox</seg>
383 <seg>none</seg>
384 <seg>/usr/lib/chromium</seg>
385 </seglistitem>
386 </segmentedlist>
387
388 <variablelist>
389 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
390 <?dbfo list-presentation="list"?>
391 <?dbhtml list-presentation="table"?>
392
393 <varlistentry id="chromium-prog">
394 <term><command>/usr/bin/chromium</command></term>
395 <listitem>
396 <para> is a wrapper for the main chromium binary (in
397 /usr/lib/chromium) that allow use of the Pepper Flash plugin.</para>
398 <indexterm zone="chromium chromium-prog">
399 <primary sortas="b-chromium">chromium</primary>
400 </indexterm>
401 </listitem>
402 </varlistentry>
403
404 <varlistentry id="chromium-lib">
405 <term><command>/usr/lib/chromium/chromium</command></term>
406 <listitem>
407 <para> is the main chromium executable.</para>
408 <indexterm zone="chromium chromium-lib">
409 <primary sortas="b-chromiumlib">chromium</primary>
410 </indexterm>
411 </listitem>
412 </varlistentry>
413
414 <varlistentry id="chromedriver">
415 <term><command>/usr/bin/chromedriver</command></term>
416 <listitem>
417 <para> is a
418 <ulink url="http://www.seleniumhq.org/projects/webdriver/">
419 WebDriver</ulink> for Chromium.</para>
420 <indexterm zone="chromium chromedriver">
421 <primary sortas="b-chromedriver">chromedriver</primary>
422 </indexterm>
423 </listitem>
424 </varlistentry>
425
426 <varlistentry id="chrome-sandbox">
427 <term><command>/usr/lib/chromium/chrome-sandbox</command></term>
428 <listitem>
429 <para> creates a sandboxed environment for running untrusted
430 code (plugins).</para>
431 <indexterm zone="chromium chrome-sandbox">
432 <primary sortas="b-chrome-sandbox">chrome-sandbox</primary>
433 </indexterm>
434 </listitem>
435 </varlistentry>
436
437 </variablelist>
438
439 </sect2>
440
441</sect1>
Note: See TracBrowser for help on using the repository browser.