mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-23 22:42:14 +08:00
3f2db3a638
They only contain a date tag that is nowhere used.
477 lines
18 KiB
XML
477 lines
18 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
%general-entities;
|
|
|
|
<!ENTITY chromium-download-http "https://commondatastorage.googleapis.com/chromium-browser-official/chromium-&chromium-version;.tar.xz">
|
|
<!ENTITY chromium-download-ftp " ">
|
|
<!ENTITY chromium-md5sum "0c361a429c5dcea568cbc7b001a82d92">
|
|
<!ENTITY chromium-size "460 MB">
|
|
<!ENTITY chromium-buildsize "6.0 GB">
|
|
<!ENTITY chromium-time "120 SBU (with parallelism=4)">
|
|
<!-- Ninja defaults to parallel build unless supplying -jx, SBU measured on
|
|
dual core, hyperthreaded CPU (4 threads).
|
|
|
|
I measured with -j4. - Bruce
|
|
|
|
-->
|
|
]>
|
|
|
|
<sect1 id="chromium" xreflabel="Chromium-&chromium-version;">
|
|
<?dbhtml filename="chromium.html"?>
|
|
|
|
|
|
<title>Chromium-&chromium-version;</title>
|
|
|
|
<indexterm zone="chromium">
|
|
<primary sortas="a-Chromium">Chromium</primary>
|
|
</indexterm>
|
|
|
|
<sect2 role="package">
|
|
<title>Introduction to Chromium</title>
|
|
|
|
<para><application>Chromium</application> is an open-source browser project
|
|
that aims to build a safer, faster, and more stable way for all users to
|
|
experience the web.</para>
|
|
|
|
&lfs82_checked;
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>Download (HTTP): <ulink url="&chromium-download-http;"/></para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Download (FTP): <ulink url="&chromium-download-ftp;"/></para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Download MD5 sum: &chromium-md5sum;</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Download size: &chromium-size;</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Estimated disk space required: &chromium-buildsize;</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Estimated build time: &chromium-time;</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
|
|
|
<bridgehead renderas="sect4">Required patch:</bridgehead>
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>
|
|
<ulink url="&patch-root;/chromium-&chromium-version;-constexpr-1.patch"/>
|
|
</para>
|
|
</listitem>
|
|
<!-- <listitem>
|
|
<para>
|
|
<ulink url="&patch-root;/chromium-&chromium-version;-glibc-2.26-1.patch"/>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
<ulink url="&patch-root;/chromium-&chromium-version;-gn_bootstrap-1.patch"/>
|
|
</para>
|
|
</listitem> -->
|
|
</itemizedlist>
|
|
|
|
<bridgehead renderas="sect4">Optional Chrome binaries to extract the
|
|
<application>WideVine</application> plug-in (Netflix) support:</bridgehead>
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>Download (HTTP):
|
|
<ulink url="http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_&chromium-version;-1_amd64.deb"/>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Download MD5 sum: 1caee436e3dc8fda6560a421e60717e4</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Download size: 49.1 MB</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>Download (HTTP):
|
|
<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"/>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Download MD5 sum: 895e877b9bfe5da05a061369c2078626</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Download size: 45.3 MB</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<bridgehead renderas="sect3">Chromium Dependencies</bridgehead>
|
|
|
|
<bridgehead renderas="sect4">Required</bridgehead>
|
|
<para role="required">
|
|
<xref linkend="alsa-lib"/>,
|
|
<xref linkend="cups"/>,
|
|
<xref linkend="desktop-file-utils"/>,
|
|
<xref linkend="dbus"/>,
|
|
<xref linkend="perl-file-basedir"/>,
|
|
<xref linkend="gtk3"/>,
|
|
<xref linkend="hicolor-icon-theme"/>,
|
|
<xref linkend="mitkrb"/>,
|
|
<xref linkend="mesa"/>,
|
|
<xref linkend="nodejs"/>,
|
|
<xref linkend="nss"/>,
|
|
<xref linkend="python2"/>,
|
|
<xref linkend="usbutils"/>, and
|
|
<xref linkend="x-window-system"/>
|
|
</para>
|
|
|
|
<bridgehead renderas="sect4">Recommended</bridgehead>
|
|
<para role="recommended">
|
|
<xref linkend="make-ca"/> (runtime),
|
|
<!-- <xref linkend="ffmpeg"/>, -->
|
|
<xref linkend="flac"/>,
|
|
<xref linkend="git"/>,
|
|
<!-- <xref linkend="icu"/>, -->
|
|
<!-- <xref linkend="libevent"/>, -->
|
|
<xref linkend="liberation-fonts"/>
|
|
<xref linkend="libexif"/>,
|
|
<xref linkend="libjpeg"/>,
|
|
<!-- <xref linkend="libpng"/>, -->
|
|
<xref linkend="libsecret"/>,
|
|
<!-- <xref linkend="libvpx"/>, -->
|
|
<xref linkend="libwebp"/>,
|
|
<xref linkend="pciutils"/>,
|
|
<xref linkend="pulseaudio"/>,
|
|
<xref linkend="xdg-utils"/>, and
|
|
<xref linkend="yasm"/>
|
|
</para>
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
<para role="optional">
|
|
<xref linkend="ffmpeg"/> (currently broken),<!-- https://crbug.com/731766 -->
|
|
<xref linkend="GConf"/>,
|
|
<xref linkend="icu"/> (currently broken),<!-- Review comments at https://chromium.googlesource.com/chromium/src/+/e58fa0ba66272c5f28828b15d06c7e42a9882b3b to verify fitness for BLFS's ICU build -->
|
|
<xref linkend="gnome-keyring"/>,
|
|
<xref linkend="libevent"/>,
|
|
<xref linkend="libpng"/> (currently broken),<!-- https://crbug.com/75240 -->
|
|
<xref linkend="libvpx"/> (currently broken),<!-- https://bugs.gentoo.org/611394 -->
|
|
<xref linkend="libxml2"/> (currently broken),<!-- https://crbug.com/736026 -->
|
|
<xref linkend="upower"/> (runtime),
|
|
<ulink url="https://devel.freebsoft.org/speechd">speech-dispatcher</ulink>
|
|
(for the screen reader), and
|
|
<ulink url="https://google.github.io/snappy">snappy</ulink>
|
|
</para>
|
|
|
|
<para condition="html" role="usernotes">User Notes:
|
|
<ulink url="&blfs-wiki;/chromium"/></para>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="installation">
|
|
<title>Installation of Chromium</title>
|
|
|
|
<para>Enable the use of the
|
|
<ulink url="http://www.widevine.com/">WideVine</ulink> plugin, needed for
|
|
Netflix support (see the WideVine section below). Define an
|
|
available product name ("Pinkie Pie" in this case) with the following
|
|
command:</para>
|
|
|
|
<screen><userinput>line='#define WIDEVINE_CDM_VERSION_STRING "Pinkie Pie"'
|
|
sed "/WIDEVINE_CDM_AVAILABLE/a$line" \
|
|
-i third_party/widevine/cdm/stub/widevine_cdm_version.h</userinput></screen>
|
|
|
|
<para>Optionally silence several (2000+) invalid warnings:</para>
|
|
|
|
<screen><userinput>sed '/static_assert/s:^://:' \
|
|
-i third_party/WebKit/Source/platform/wtf/text/TextCodec.h</userinput></screen>
|
|
|
|
<para>Fix a build issue with recent versions of GCC:</para>
|
|
|
|
<screen><userinput>patch -Np1 -i ../chromium-&chromium-version;-constexpr-1.patch</userinput></screen>
|
|
|
|
<para>Remove third-party build files that interfere with system versions:</para>
|
|
|
|
<note>
|
|
<para>
|
|
Chromium uses many external projects, the selections below are not set
|
|
in stone, however they have been tested thoroughly. With Chromium
|
|
&chromium-version;, system versions of libvpx, libxml2,
|
|
and zlib are known to break the build at this time.
|
|
<!-- icu: Now at 59 internally - seems to work now -->
|
|
<!-- icu: Now at 60 - is broken -->
|
|
<!-- libevent: needs internal headers - seems to work now -->
|
|
<!-- libvpx: breaks build in gfx -->
|
|
<!-- libxml2: breaks build with ui - seems to work now -->
|
|
<!-- zlib requires libminizip -->
|
|
</para>
|
|
</note>
|
|
|
|
<!-- Again, thanks to Arch, this is much better than listing all the needed
|
|
shipped libs required to use the remove_bundled_files.py script -->
|
|
<screen><userinput>for LIB in <!--ffmpeg -->flac freetype harfbuzz-ng<!-- icu libevent--> libjpeg \
|
|
libjpeg_turbo<!-- libpng--> libwebp <!-- libxml libvpx-->libxslt yasm; do
|
|
find -type f -path "*third_party/$LIB/*" \
|
|
\! -path "*third_party/$LIB/chromium/*" \
|
|
\! -path "*third_party/$LIB/google/*" \
|
|
\! -path "*base/third_party/icu/*" \
|
|
\! -path './third_party/yasm/run_yasm.py' \
|
|
\! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
|
|
\! -path './third_party/freetype/src/src/psnames/pstables.h' \
|
|
-delete
|
|
done &&
|
|
|
|
python build/linux/unbundle/replace_gn_files.py \
|
|
--system-libraries<!-- ffmpeg--> flac <!-- harfbuzz-ng -->libjpeg libxml libevent \
|
|
<!--libpng -->libwebp libxslt opus yasm <!-- freetype libxml libvpx--> &&
|
|
|
|
python third_party/libaddressinput/chromium/tools/update-strings.py</userinput></screen>
|
|
|
|
<para><application>Chromium</application> uses an internal tool, <ulink
|
|
url="https://chromium.googlesource.com/chromium/src/tools/gn">gn</ulink>,
|
|
to generate the <application>Ninja</application> build files. Complete
|
|
configuration of the build using the following commands:</para>
|
|
|
|
<note>
|
|
<para>
|
|
<!-- Taken from Arch Linux - an immensely helpful link - Thanks -->
|
|
The Google API Key and OAuth tokens below are specific to LFS. If using
|
|
these instructions for another distro, or if you intend to distribute
|
|
binary copies of the software using these instructions, please obtain
|
|
your own keys following the instructions located at
|
|
<ulink url="http://www.chromium.org/developers/how-tos/api-keys"/>.
|
|
<!-- BLFS Devs, register an account at Google with your
|
|
@linuxfromscratch.org email address, and I'll make you an administrator
|
|
for the 'Google APIs for LFS' project (where the API and OAuth keys
|
|
were created for use in the book).-->
|
|
</para>
|
|
</note>
|
|
|
|
<screen><userinput>GN_CONFIG=('google_api_key="AIzaSyDxKL42zsPjbke5O8_rPVpVrLrJ8aeE9rQ"'
|
|
'google_default_client_id="595013732528-llk8trb03f0ldpqq6nprjp1s79596646.apps.googleusercontent.com"'
|
|
'google_default_client_secret="5ntt6GbbkjnTVXx-MSxbmx5e"'
|
|
'clang_use_chrome_plugins=false'
|
|
'enable_hangout_services_extension=true'
|
|
'enable_nacl=false'
|
|
'enable_nacl_nonsfi=false'
|
|
'enable_swiftshader=false'
|
|
'enable_widevine=true'
|
|
'fatal_linker_warnings=false'
|
|
'ffmpeg_branding="Chrome"'
|
|
'fieldtrial_testing_like_official_build=true'
|
|
'is_debug=false'
|
|
'is_clang=false'
|
|
'link_pulseaudio=true'
|
|
'linux_use_bundled_binutils=false'
|
|
'proprietary_codecs=true'
|
|
'remove_webcore_debug_symbols=true'
|
|
'symbol_level=0'
|
|
'treat_warnings_as_errors=false'
|
|
'use_allocator="none"'
|
|
'use_cups=true'
|
|
'use_gconf=false'
|
|
'use_gnome_keyring=false'
|
|
'use_gold=false'
|
|
'use_gtk3=true'
|
|
'use_kerberos=true'
|
|
'use_pulseaudio=true'
|
|
'use_sysroot=false'
|
|
'use_system_freetype=true'
|
|
'use_system_harfbuzz=true')</userinput></screen>
|
|
|
|
<para>Build <application>gn</application> and use it to prepare the
|
|
<application>Ninja</application> build files:</para>
|
|
|
|
<screen><userinput>python tools/gn/bootstrap/bootstrap.py --gn-gen-args "${GN_CONFIG[*]}" &&
|
|
out/Release/gn gen out/Release --args="${GN_CONFIG[*]}"</userinput></screen>
|
|
|
|
<warning>
|
|
<para>Ninja, by default, sets the number of jobs to the number of
|
|
available threads. If your machine is memory constrained, with regard to
|
|
number of threads, you should reduce the number of jobs by passing the
|
|
<parameter>-j#</parameter> switch to the <command>ninja</command> command
|
|
below. Plan for roughly 1.25GB per thread while linking
|
|
<application>WebKit</application> to avoid out of memory errors.</para>
|
|
</warning>
|
|
|
|
<para>Build <application>Chromium</application> using the following
|
|
commands:</para>
|
|
|
|
<screen><userinput>mkdir -p third_party/node/linux/node-linux-x64/bin &&
|
|
ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/ &&
|
|
ninja -C out/Release chrome chrome_sandbox chromedriver widevinecdmadapter</userinput></screen>
|
|
|
|
<para>This package was already tested as part of the build.</para>
|
|
|
|
<para>Now, as the <systemitem class="username">root</systemitem> user,
|
|
install the package:</para>
|
|
|
|
<screen role="root"><userinput>install -vDm755 out/Release/chrome \
|
|
/usr/lib/chromium/chromium &&
|
|
|
|
install -vDm4755 out/Release/chrome_sandbox \
|
|
/usr/lib/chromium/chrome-sandbox &&
|
|
|
|
install -vDm755 out/Release/chromedriver \
|
|
/usr/lib/chromium/chromedriver &&
|
|
|
|
ln -svf /usr/lib/chromium/chromium /usr/bin &&
|
|
ln -svf /usr/lib/chromium/chromedriver /usr/bin &&
|
|
|
|
install -vDm644 out/Release/gen/content/content_resources.pak \
|
|
/usr/lib/chromium/ &&
|
|
<!-- This is needed if using internal icu -->
|
|
install -vDm644 out/Release/icudtl.dat \
|
|
/usr/lib/chromium/icudtl.dat &&
|
|
|
|
install -vDm644 out/Release/{*.pak,*.bin} \
|
|
/usr/lib/chromium/ &&
|
|
|
|
sed -i \
|
|
-e "s/@@MENUNAME@@/Chromium/g" \
|
|
-e "s/@@PACKAGE@@/chromium/g" \
|
|
-e "s/@@USR_BIN_SYMLINK_NAME@@/chromium/g" \
|
|
chrome/installer/linux/common/desktop.template \
|
|
chrome/app/resources/manpage.1.in &&
|
|
|
|
install -vDm644 chrome/installer/linux/common/desktop.template \
|
|
/usr/share/applications/chromium.desktop &&
|
|
|
|
install -vDm644 chrome/app/resources/manpage.1.in \
|
|
/usr/share/man/man1/chromium.1 &&
|
|
|
|
cp -av out/Release/locales /usr/lib/chromium/ &&
|
|
chown -Rv root:root /usr/lib/chromium/locales &&
|
|
|
|
for size in 16 32; do
|
|
install -vDm644 \
|
|
"chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \
|
|
"/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
|
|
done &&
|
|
|
|
for size in 22 24 48 64 128 256; do
|
|
install -vDm644 "chrome/app/theme/chromium/product_logo_$size.png" \
|
|
"/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
|
|
done</userinput></screen>
|
|
|
|
<note>
|
|
<para>If upgrading from a previous build of chromium using gtk+-2.x, you
|
|
may need to remove the <filename
|
|
class="directory">~/.config/chromium</filename> directory.</para>
|
|
</note>
|
|
|
|
<bridgehead renderas="sect3">Extracting the WideVine plugin from Chrome</bridgehead>
|
|
|
|
<para>Extract the downloaded deb file with the following commands:</para>
|
|
|
|
<screen><userinput>mkdir temp &&
|
|
cd temp &&
|
|
case $(uname -m) in
|
|
x86_64) ar -x ../../google-chrome-stable_&chromium-version;-1_amd64.deb
|
|
;;
|
|
i?86) ar -x ../../google-chrome-stable_48.0.2564.116-1_i386.deb
|
|
;;
|
|
esac</userinput></screen>
|
|
|
|
<para>As the <systemitem class="username">root</systemitem> user, enable
|
|
the WideVine plugin with the following commands:</para>
|
|
|
|
<!-- Note that libwidevinecdmadapter.so is not in the tarball. It is
|
|
created only if enable_widevine=true i sset in GN_CONFIG -->
|
|
|
|
<screen role="root"><userinput>tar -xf data.tar.xz &&
|
|
install -vm755 ../out/Release/libwidevinecdmadapter.so /usr/lib/chromium/ &&
|
|
install -vm755 opt/google/chrome/libwidevinecdm.so /usr/lib/chromium/</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="commands">
|
|
<title>Command Explanations</title>
|
|
|
|
<para><command>GN_CONFIG=(...)</command>: this array contains
|
|
all of the defines used in the build.</para>
|
|
|
|
<para><command>python tools/gn/bootstrap/bootstrap.py --gn-gen-args "${GN_CONFIG[*]}"</command>:
|
|
this command replaces defines in the gn files with the values contained in
|
|
<envar>${GN_CONFIG[@]}</envar>.</para>
|
|
|
|
<para><command>out/Release/gn gen out/Release --args="${GN_CONFIG[*]}"</command>:
|
|
this command runs a Google provided configuration script
|
|
<application>gn</application> on the source tree to produce
|
|
a <application>Ninja</application> configuration suitable for the build
|
|
machine.</para>
|
|
|
|
<para><command>mkdir...ln -s /usr/bin/node
|
|
third_party/node/linux/node-linux-x64/bin/</command>: these commands
|
|
replaced the local <application>Node.js</application> (no longer available)
|
|
with the system installed <application>Node.js</application>.</para>
|
|
|
|
<para><command>ar -x ../../google-chrome-stable*.deb</command>:
|
|
the <command>ar</command> utility is used to extract Debian archives.</para>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="content">
|
|
<title>Contents</title>
|
|
|
|
<segmentedlist>
|
|
<segtitle>Installed Programs</segtitle>
|
|
<segtitle>Installed Libraries</segtitle>
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
<seglistitem>
|
|
<seg>/usr/lib/chromium/chromium,
|
|
/usr/lib/chromium/chromedriver, and
|
|
/usr/lib/chromium/chrome-sandbox</seg>
|
|
<seg>none</seg>
|
|
<seg>/usr/lib/chromium</seg>
|
|
</seglistitem>
|
|
</segmentedlist>
|
|
|
|
<variablelist>
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
<?dbfo list-presentation="list"?>
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
<varlistentry id="chromium-lib">
|
|
<term><command>/usr/lib/chromium/chromium</command></term>
|
|
<listitem>
|
|
<para> is the main chromium executable.</para>
|
|
<indexterm zone="chromium chromium-lib">
|
|
<primary sortas="b-chromiumlib">chromium</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="chromedriver">
|
|
<term><command>/usr/lib/chromium/chromedriver</command></term>
|
|
<listitem>
|
|
<para> is a
|
|
<ulink url="http://www.seleniumhq.org/projects/webdriver/">
|
|
WebDriver</ulink> for Chromium.</para>
|
|
<indexterm zone="chromium chromedriver">
|
|
<primary sortas="b-chromedriver">chromedriver</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="chrome-sandbox">
|
|
<term><command>/usr/lib/chromium/chrome-sandbox</command></term>
|
|
<listitem>
|
|
<para> creates a sandboxed environment for running untrusted
|
|
code (plugins).</para>
|
|
<indexterm zone="chromium chrome-sandbox">
|
|
<primary sortas="b-chrome-sandbox">chrome-sandbox</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|