source: xsoft/graphweb/chromium.xml@ f57918e

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

Add File::BaseDir-0.07.

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

  • Property mode set to 100644
File size: 18.7 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 "7035148d1566ddeab3153b2007b86613">
10 <!ENTITY chromium-size "440 MB">
11 <!ENTITY chromium-buildsize "6.2 GB">
12 <!ENTITY chromium-time "111 SBU">
13]>
14
15<sect1 id="chromium" xreflabel="Chromium-&chromium-version;">
16 <?dbhtml filename="chromium.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>Chromium-&chromium-version;</title>
24
25 <indexterm zone="chromium">
26 <primary sortas="a-Chromium">Chromium</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to Chromium</title>
31
32 <para><application>Chromium</application> is an open-source browser project
33 that aims to build a safer, faster, and more stable way for all users to
34 experience the web.</para>
35
36 &lfs7a_checked;
37
38 <bridgehead renderas="sect3">Package Information</bridgehead>
39 <itemizedlist spacing="compact">
40 <listitem>
41 <para>Download (HTTP): <ulink url="&chromium-download-http;"/></para>
42 </listitem>
43<!-- <listitem>
44 <para>Download (FTP): <ulink url="&chromium-download-ftp;"/></para>
45 </listitem> -->
46 <listitem>
47 <para>Download MD5 sum: &chromium-md5sum;</para>
48 </listitem>
49 <listitem>
50 <para>Download size: &chromium-size;</para>
51 </listitem>
52 <listitem>
53 <para>Estimated disk space required: &chromium-buildsize;</para>
54 </listitem>
55 <listitem>
56 <para>Estimated build time: &chromium-time;</para>
57 </listitem>
58 </itemizedlist>
59
60 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
61 <note><para>Download this file via wget as:</para>
62<screen><userinput>wget https://github.com/foutrelis/chromium-launcher/archive/v3.tar.gz \
63 -O chromium-launcher-3.tar.gz</userinput></screen>
64 </note>
65 <itemizedlist spacing="compact">
66 <listitem>
67 <para>Optional launcher (to eanble Pepper Flash - x86_64 only):
68 <ulink url="https://github.com/foutrelis/chromium-launcher/archive/v3.tar.gz"/>
69 </para>
70 </listitem>
71 <listitem>
72 <para>Optional Chrome distribution (to copy plugins - x86_64 only):
73 <ulink url="http://mirror.ufs.ac.za/google-chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_53.0.2785.116-1_amd64.deb"/>
74 </para>
75 </listitem>
76 </itemizedlist>
77
78 <bridgehead renderas="sect3">Chromium Dependencies</bridgehead>
79
80 <bridgehead renderas="sect4">Required</bridgehead>
81 <para role="required">
82 <xref linkend="alsa-lib"/>,
83 <xref linkend="cups"/>,
84 <xref linkend="desktop-file-utils"/>,
85 <xref linkend="dbus"/>,
86 <xref linkend="perl-file-basedir"/>,
87 <xref linkend="gtk2"/>,
88 <xref linkend="hicolor-icon-theme"/>,
89 <xref linkend="mesa"/>,
90 <xref linkend="ninja"/>,
91 <xref linkend="nss"/>,
92 <xref linkend="python2"/>, and
93 <xref linkend="x-window-system"/>
94 </para>
95
96 <bridgehead renderas="sect4">Recommended</bridgehead>
97 <para role="recommended">
98 <xref linkend="flac"/>,
99 <xref linkend="GConf"/>,
100 <xref linkend="gnome-keyring"/>,
101 <xref linkend="hicolor-icon-theme"/>,
102 <xref linkend="libevent"/>,
103 <xref linkend="libexif"/>,
104 <xref linkend="libjpeg"/>,
105 <xref linkend="libpng"/>,
106 <xref linkend="libsecret"/>,
107 <xref linkend="pciutils"/>,
108 <xref linkend="pulseaudio"/>,
109 <xref linkend="xdg-utils"/>, and
110 <xref linkend="yasm"/>
111 </para>
112
113 <bridgehead renderas="sect4">Optional</bridgehead>
114 <para role="optional">
115 <xref linkend="ffmpeg"/>,
116 <xref linkend="git"/> (required to build PNaCL on i686),
117 <ulink url="http://www.gnu.org/software/gperf">gperf</ulink>,
118 <xref linkend="icu"/>,
119 <xref linkend="libxml2"/>,
120 <xref linkend="libvpx"/>,
121 <ulink url="http://www.freebsoft.org/speechd">speech-dispatcher</ulink>
122 (for the screen reader), and
123 <ulink url="https://google.github.io/snappy">snappy</ulink>
124 </para>
125
126 <para condition="html" role="usernotes">User Notes:
127 <ulink url="&blfs-wiki;/chromium"/></para>
128
129 </sect2>
130
131 <sect2 role="installation">
132 <title>Installation of Chromium</title>
133
134 <para>If you'd like to import binary Pepper plugins from Chrome, you'll
135 need to enable PNaCL. PNaCL is a sandboxed environment for running
136 untrusted code, but the binary toolchain is availalbe only on x86_64.
137 Download the binary PNaCL toolchain with the following commands:</para>
138
139<screen><userinput>python build/download_nacl_toolchains.py --packages \
140 nacl_x86_newlib,pnacl_newlib,pnacl_translator \
141 sync --extract</userinput></screen>
142
143<!-- <para>If on any other arch than x86_64, you will have to build the PNaCL
144 environment yourself. Please report if this works without issue as this
145 has not been tested. Instuctions were taken directly from
146 <ulink url="https://www.chromium.org/nativeclient/pnacl/building-pnacl-components-for-distribution-packagers">
147 here</ulink>. Note that Google no longer support i686 builds, so any
148 plugin extracted from the binary installation of Chrome (libwidevinecdm.so)
149 will be necessarely out of date.</para>
150
151<screen><userinput>toolchain_build/toolchain_build_pnacl.py \
152 - -verbose - -sync - -clobber - -gcc - -no-use-cached-results \
153 - -no-use-remote-cache - -disable-git-cache - -build-sbtc
154build/package_version/package_version.py - -packages pnacl_newlib \
155 - -tar-dir toolchain_build/out/packages - -dest-dir toolchain/ \
156 extract - -skip-missing
157build/package_version/package_version.py - -packages pnacl_translator \
158 - -tar-dir toolchain_build/out/packages - -dest-dir toolchain/ \
159 extract - -skip-missing</userinput></screen> -->
160
161 <para>To enable use of
162 <ulink url="http://www.widevine.com/">WideVine</ulink>, needed for Netflix
163 support (see the binary Chrome plugins section below), in addition to
164 enabling PNaCL above, you'll need to define an availalbe product name
165 ("Pinkie Pie" in this case) with the following command:</para>
166
167<screen><userinput>sed "s/WIDEVINE_CDM_AVAILABLE/&amp;\n\n#define WIDEVINE_CDM_VERSION_STRING \"Pinkie Pie\"/" \
168 -i third_party/widevine/cdm/stub/widevine_cdm_version.h</userinput></screen>
169
170 <para>Setup <application>Chromium</application> build options by running
171 the following commands:</para>
172
173 <note>
174 <para>
175 Chromium uses many exteranl projects, the selections below are not set
176 in stone, however they have been tested thoroughly. With 53.0.2785.116,
177 system versions of icu, libxml2, libvpx, and zlib are known to break
178 the build at this time.</para>
179 <!-- This should be remedied by 55.x as updates are coming upstream -->
180
181 <!-- Taken from Arch Linux - an immensely helpful link - Thanks -->
182 <para>Additionally, the Google API Key and 0Auth tokens below are
183 specific to LFS. If using these instructions for another distro, or if
184 you intend to distribute binary copies of the software using these
185 instructions, please obtain your own keys following the instructions
186 located at
187 <ulink url="http://www.chromium.org/developers/how-tos/api-keys"/>.
188 <!-- BLFS Devs, register an account at Google with your
189 @linuxfromscratch.org email address, and I'll make you an administrator
190 for the 'Chromium for LFS' project (where the API and 0Auth keys were
191 created for the book).-->
192 </para>
193 </note>
194
195<screen><userinput>CHROMIUM_CONFIG=(
196-Dgoogle_api_key=AIzaSyDxKL42zsPjbke5O8_rPVpVrLrJ8aeE9rQ
197-Dgoogle_default_client_id=595013732528-llk8trb03f0ldpqq6nprjp1s79596646.apps.googleusercontent.com
198-Dgoogle_default_client_secret=5ntt6GbbkjnTVXx-MSxbmx5e
199-Dwerror=
200-Dclang=0
201-Dpython_ver=2.7
202-Dlinux_link_gsettings=1
203-Dlinux_link_libpci=1
204-Dlinux_link_pulseaudio=1
205-Dlinux_strip_binary=1
206-Dlinux_use_bundled_binutils=0
207-Dlinux_use_bundled_gold=0
208-Dlinux_use_gold_flags=0
209-Dicu_use_data_file_flag=1
210-Dlogging_like_official_build=1
211-Dtracing_like_official_build=1
212-Dfieldtrial_testing_like_official_build=1
213-Drelease_extra_cflags="$CFLAGS"
214-Dffmpeg_branding=Chrome
215-Dproprietary_codecs=1
216-Duse_gnome_keyring=0
217-Duse_system_bzip2=1
218-Duse_system_flac=1
219-Duse_system_ffmpeg=0
220-Duse_system_harfbuzz=1
221-Duse_system_icu=0
222-Duse_system_libevent=1
223-Duse_system_libjpeg=1
224-Duse_system_libpng=1
225-Duse_system_libvpx=0
226-Duse_system_libxml=0
227-Duse_system_snappy=0
228-Duse_system_xdg_utils=1
229-Duse_system_yasm=1
230-Duse_system_zlib=0
231-Dusb_ids_path=/usr/share/hwdata/usb.ids
232-Duse_mojo=0
233-Duse_gconf=1
234-Duse_sysroot=0
235-Denable_hangout_services_extension=1
236-Denable_widevine=1
237-Ddisable_fatal_linker_warnings=1
238-Ddisable_glibc=1)</userinput></screen>
239
240<!-- <para>If you are not on x86_64 (or you elected to rebuild the PNaCL
241 sandbox manually on x86_64), execute the following commands:</para>
242
243<screen><userinput>CHROMIUM_CONFIG+=(
244-Dpnacl_newlib_toolchain=$PWD/toolchain/linux_x86/pnacl_newlib
245-Dpnacl_translator_dir=PWD/toolchain/linux_x86/pnacl_translator
246)</userinput></screen> -->
247
248 <para>Fix a build issue with GCC-6.</para>
249
250<screen><userinput>export CFLAGS+=' -fno-delete-null-pointer-checks'</userinput></screen>
251
252 <para>Fix a build issue with cups-2.2.</para>
253
254<screen><userinput>sed 's/#include &lt;cups\/cups\.h&gt;/&amp;\n#include &lt;cups\/ppd.h&gt;/' \
255 -i printing/backend/cups_helper.h</userinput></screen>
256
257 <para>Fix a potential build issue on Linux-4.5+:</para>
258
259<screen><userinput>sed "s/#include \&lt;sys\/mman.h\&gt;/&amp;\n\n#if defined(MADV_FREE)\n#undef MADV_FREE\n#endif\n\n/" \
260 -i third_party/WebKit/Source/wtf/allocator/PageAllocator.cpp</userinput></screen>
261
262 <para>Replace a missing file to allow the test suite to run:</para>
263
264<screen><userinput>touch chrome/test/data/webui/i18n_process_css_test.html</userinput></screen>
265
266 <para><application>Chromium</application> uses
267 <ulink url="https://gyp.gsrc.io/">GYP</ulink> to generate the
268 <application>Ninja</application> build files. Complete configuration of
269 the buld using the following commands:</para>
270
271<screen><userinput>build/linux/unbundle/replace_gyp_files.py "${CHROMIUM_CONFIG[@]}" &amp;&amp;
272build/gyp_chromium --depth=. "${CHROMIUM_CONFIG[@]}"</userinput></screen>
273
274 <para>Build <application>Chromium</application> using the following
275 command:</para>
276
277<screen><userinput>ninja -C out/Release chrome chrome_sandbox chromedriver</userinput></screen>
278
279 <para>This package was already tested as part of the build.</para>
280
281 <para>Now, as the <systemitem class="username">root</systemitem> user,
282 install the pacakage:</para>
283
284<screen role="root"><userinput>install -vDm755 out/Release/chrome \
285 /usr/lib/chromium/chromium &amp;&amp;
286install -vDm4755 out/Release/chrome_sandbox \
287 /usr/lib/chromium/chrome-sandbox &amp;&amp;
288install -vDm755 out/Release/chromedriver \
289 /usr/lib/chromium/chromedriver &amp;&amp;
290ln -svf /usr/lib/chromium/chromium /usr/bin &amp;&amp;
291ln -svf /usr/lib/chromium/chromedriver /usr/bin/ &amp;&amp;
292install -vDm644 out/Release/icudtl.dat /usr/lib/chromium &amp;&amp;
293
294install -vm644 out/Release/{*.pak,*.bin} \
295 /usr/lib/chromium/ &amp;&amp;
296
297cp -av out/Release/locales /usr/lib/chromium/ &amp;&amp;
298chown -Rv root:root /usr/lib/chromium/locales &amp;&amp;
299
300install -vDm644 out/Release/chrome.1 \
301 /usr/share/man/man1/chromium.1</userinput></screen>
302
303 <para>While still the <systemitem class="username">root</systemitem> user,
304 install icons and the .desktop file:</para>
305
306<screen><userinput role="root">for size in 16 32; do
307 install -vDm644 \
308 "chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \
309 "/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
310done &amp;&amp;
311
312for size in 22 24 48 64 128 256; do
313 install -vDm644 "chrome/app/theme/chromium/product_logo_$size.png" \
314 "/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
315done &amp;&amp;
316
317cat &gt; /usr/share/applications/chromium.desktop &lt;&lt; "EOF"
318[Desktop Entry]
319Encoding=UTF-8
320Name=Chromium Web Browser
321Comment=Access the Internet
322GenericName=Web Browser
323Exec=chromium %u
324Terminal=false
325Type=Application
326Icon=chromium
327Categories=GTK;Network;WebBrowser;
328MimeType=application/xhtml+xml;text/xml;application/xhtml+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
329EOF</userinput></screen>
330
331 <para>If you've enabled PNaCL support, while still the
332 <systemitem class="username">root</systemitem> user:</para>
333
334<screen><userinput role="root">install -vm755 out/Release/nacl_helper{,_bootstrap} \
335 out/Release/nacl_irt_*.nexe \
336 /usr/lib/chromium/</userinput></screen>
337
338 <para>If you've enabled <application>WideVine</application> support, while
339 still the <systemitem class="username">root</systemitem> user:</para>
340
341<screen><userinput role="root">install -vm755 out/Release/libwidevinecdmadapter.so \
342 /usr/lib/chromium/</userinput></screen>
343
344 <bridgehead renderas="sect3">Chromium Lanucher</bridgehead>
345 <para><application>Chromium Launcher</application> is a wrapper for
346 <application>chromium</application> that allows use of the Pepper Flash
347 plugin. If you intend to use the <application>Pepper Flash</application>
348 plugin, build <application>Chromium Launcher</application> by running the
349 following commands:</para>
350
351<screen><userinput>tar -xf ../chromium-launcher-3.tar.gz &amp;&amp;
352cd chromium-launcher-3 &amp;&amp;
353make PREFIX=/usr</userinput></screen>
354
355 <para>Install Chromium Launcher with the following commands (as the
356 <systemitem class="username">root</systemitem> user:</para>
357
358<screen role="root"><userinput>rm -f /usr/bin/chromium &amp;&amp;
359make PREFIX=/usr install-strip &amp;&amp;
360cd ..</userinput></screen>
361
362 <bridgehead renderas="sect3">Extracting binary plugins from Chrome</bridgehead>
363
364 <para>Extract the downloaded deb file with the following commands:</para>
365
366<screen><userinput>mkdir temp &amp;&amp;
367cd temp &amp;&amp;
368ar -x ../../google-chrome-stable_&chromium-version;*.deb &amp;&amp;
369tar -xf data.tar.xz</userinput></screen>
370
371 <bridgehead renderas="sect4">Pepper Flash</bridgehead>
372
373 <para>As the <systemitem class="username">root</systemitem> user, install
374 the Pepper Flash plugin with the following command:</para>
375
376<screen role="root"><userinput>install -vdm755 /usr/lib/PepperFlash &amp;&amp;
377install -vm755 opt/google/chrome/PepperFlash/* /usr/lib/PepperFlash</userinput></screen>
378
379 <bridgehead renderas="sect4">WideVine</bridgehead>
380
381 <para>As the <systemitem class="username">root</systemitem> user, install
382 the WideVine plugin with the following command:</para>
383
384<screen role="root"><userinput>install -vm755 opt/google/chrome/libwidevinecdm.so /usr/lib/chromium/</userinput></screen>
385
386 </sect2>
387
388 <sect2 role="commands">
389 <title>Command Explanations</title>
390
391 <para><command>CHROMIUM_CONFIG=(...)</command>: this array contains
392 all of the defines used in the build.</para>
393
394 <para><command>sed 's/#include &lt;cups...</command>: this command fixes
395 a build issue with Cups 2.2 and newer where functions are defined in a
396 different file (cups/ppd.h).</para>
397
398 <para><command>sed "s/#include &lt;sys...</command>: this command udefines
399 MADV_FREE to fix a build issue with Linux-4.5 and newer.</para>
400
401 <para><command>build/linux/unbundle/replace_gyp_files.py "${CHROMIUM_CONFIG[@]}"</command>:
402 this command replaces defines in the gyp file with the values contained in
403 <envar>${CHROMIUM_CONFIG[@]}</envar>.</para>
404
405 <para><command>build/gyp_chromium --depth=. "${CHROMIUM_CONFIG[@]}"</command>:
406 this command runs a Google modified version of
407 <application>gyp</application> on the source tree to produce
408 a <application>Ninja</application> configuration suitable for the build
409 machine.</para>
410
411 <para><command>ar -x ../../google-chrome-stable_53.0.2785.116*.deb</command>:
412 the <command>ar</command> utility is used to extract Debian archives.</para>
413
414 </sect2>
415
416 <sect2 role="content">
417 <title>Contents</title>
418
419 <segmentedlist>
420 <segtitle>Installed Programs</segtitle>
421 <segtitle>Installed Libraries</segtitle>
422 <segtitle>Installed Directories</segtitle>
423
424 <seglistitem>
425 <seg>/usb/bin/chromium, /usr/lib/chromium/chromium,
426 /usr/lib/chromium/chromedriver, and
427 /usr/lib/chromium/chrome-sandbox</seg>
428 <seg>none</seg>
429 <seg>/usr/lib/chromium</seg>
430 </seglistitem>
431 </segmentedlist>
432
433 <variablelist>
434 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
435 <?dbfo list-presentation="list"?>
436 <?dbhtml list-presentation="table"?>
437
438 <varlistentry id="chromium-prog">
439 <term><command>/usr/bin/chromium</command></term>
440 <listitem>
441 <para> is a wrapper for the main chromium binary (in
442 /usr/lib/chromium) that allow use of the Pepper Flash plugin.</para>
443 <indexterm zone="chromium chromium-prog">
444 <primary sortas="b-chromium">chromium</primary>
445 </indexterm>
446 </listitem>
447 </varlistentry>
448
449 <varlistentry id="chromium-lib">
450 <term><command>/usr/lib/chromium/chromium</command></term>
451 <listitem>
452 <para> is the main chromium executable.</para>
453 <indexterm zone="chromium chromium-lib">
454 <primary sortas="b-chromiumlib">chromium</primary>
455 </indexterm>
456 </listitem>
457 </varlistentry>
458
459 <varlistentry id="chromedriver">
460 <term><command>/usr/bin/chromedriver</command></term>
461 <listitem>
462 <para> is a
463 <ulink url="http://www.seleniumhq.org/projects/webdriver/">
464 WebDriver</ulink> for Chromium.</para>
465 <indexterm zone="chromium chromedriver">
466 <primary sortas="b-chromedriver">chromedriver</primary>
467 </indexterm>
468 </listitem>
469 </varlistentry>
470
471 <varlistentry id="chrome-sandbox">
472 <term><command>/usr/lib/chromium/chrome-sandbox</command></term>
473 <listitem>
474 <para> creates a sandboxed environment for running untrusted
475 code (plugins).</para>
476 <indexterm zone="chromium chrome-sandbox">
477 <primary sortas="b-chrome-sandbox">chrome-sandbox</primary>
478 </indexterm>
479 </listitem>
480 </varlistentry>
481
482 </variablelist>
483
484 </sect2>
485
486</sect1>
Note: See TracBrowser for help on using the repository browser.