%general-entities; ]> $LastChangedBy$ $Date$ Chromium-&chromium-version; Chromium Introduction to Chromium Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web. &lfs7a_checked; Package Information Download (HTTP): Download MD5 sum: &chromium-md5sum; Download size: &chromium-size; Estimated disk space required: &chromium-buildsize; Estimated build time: &chromium-time; Additional Downloads Download this file via wget as: wget https://github.com/foutrelis/chromium-launcher/archive/v3.tar.gz \ -O chromium-launcher-3.tar.gz Optional launcher (to eanble Pepper Flash - x86_64 only): Optional Chrome distribution (to copy plugins - x86_64 only): Chromium Dependencies Required , , , , , , , , , , , , , and Recommended , , , , , , , , , , , , and Optional , (required to build PNaCL on i686), , , , speech-dispatcher (for the screen reader), and snappy User Notes: Installation of Chromium If you'd like to import binary Pepper plugins from Chrome, you'll need to enable PNaCL. PNaCL is a sandboxed environment for running untrusted code, but the binary toolchain is available only on x86_64. Download the binary PNaCL toolchain with the following commands: python build/download_nacl_toolchains.py --packages \ nacl_x86_newlib,pnacl_newlib,pnacl_translator \ sync --extract To enable use of WideVine, needed for Netflix support (see the binary Chrome plugins section below), in addition to enabling PNaCL above, you'll need to define an available product name ("Pinkie Pie" in this case) with the following command: sed "s/WIDEVINE_CDM_AVAILABLE/&\n\n#define WIDEVINE_CDM_VERSION_STRING \"Pinkie Pie\"/" \ -i third_party/widevine/cdm/stub/widevine_cdm_version.h Setup Chromium build options by running the following commands: Chromium uses many external projects, the selections below are not set in stone, however they have been tested thoroughly. With 53.0.2785.116, system versions of icu, libxml2, libvpx, and zlib are known to break the build at this time. Additionally, the Google API Key and 0Auth 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 . CHROMIUM_CONFIG=( -Dgoogle_api_key=AIzaSyDxKL42zsPjbke5O8_rPVpVrLrJ8aeE9rQ -Dgoogle_default_client_id=595013732528-llk8trb03f0ldpqq6nprjp1s79596646.apps.googleusercontent.com -Dgoogle_default_client_secret=5ntt6GbbkjnTVXx-MSxbmx5e -Dwerror= -Dclang=0 -Dpython_ver=2.7 -Dlinux_link_gsettings=1 -Dlinux_link_libpci=1 -Dlinux_link_pulseaudio=1 -Dlinux_strip_binary=1 -Dlinux_use_bundled_binutils=0 -Dlinux_use_bundled_gold=0 -Dlinux_use_gold_flags=0 -Dicu_use_data_file_flag=1 -Dlogging_like_official_build=1 -Dtracing_like_official_build=1 -Dfieldtrial_testing_like_official_build=1 -Drelease_extra_cflags="$CFLAGS" -Dffmpeg_branding=Chrome -Dproprietary_codecs=1 -Duse_gnome_keyring=0 -Duse_system_bzip2=1 -Duse_system_flac=1 -Duse_system_ffmpeg=0 -Duse_system_harfbuzz=1 -Duse_system_icu=0 -Duse_system_libevent=1 -Duse_system_libjpeg=1 -Duse_system_libpng=1 -Duse_system_libvpx=0 -Duse_system_libxml=0 -Duse_system_snappy=0 -Duse_system_xdg_utils=1 -Duse_system_yasm=1 -Duse_system_zlib=0 -Dusb_ids_path=/usr/share/hwdata/usb.ids -Duse_mojo=0 -Duse_gconf=1 -Duse_sysroot=0 -Denable_hangout_services_extension=1 -Denable_widevine=1 -Ddisable_fatal_linker_warnings=1 -Ddisable_glibc=1) Fix a build issue with GCC-6. export CFLAGS+=' -fno-delete-null-pointer-checks' Fix a build issue with cups-2.2. sed 's/#include <cups\/cups\.h>/&\n#include <cups\/ppd.h>/' \ -i printing/backend/cups_helper.h Fix a potential build issue on Linux-4.5+: sed 's/#include \<sys\/mman\.h>/&\n\n#if defined(MADV_FREE)\n#undef MADV_FREE\n#endif\n/' \ -i.bak third_party/WebKit/Source/wtf/allocator/PageAllocator.cpp Chromium uses GYP to generate the Ninja build files. Complete configuration of the build using the following commands: build/linux/unbundle/replace_gyp_files.py "${CHROMIUM_CONFIG[@]}" && build/gyp_chromium --depth=. "${CHROMIUM_CONFIG[@]}" Build Chromium using the following command: ninja -C out/Release chrome chrome_sandbox chromedriver This package was already tested as part of the build. Now, as the root user, install the pacakage: 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/icudtl.dat /usr/lib/chromium && install -vm644 out/Release/{*.pak,*.bin} \ /usr/lib/chromium/ && cp -av out/Release/locales /usr/lib/chromium/ && chown -Rv root:root /usr/lib/chromium/locales && install -vDm644 out/Release/chrome.1 \ /usr/share/man/man1/chromium.1 While still the root user, install icons and the .desktop file: 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 && cat > /usr/share/applications/chromium.desktop << "EOF" [Desktop Entry] Encoding=UTF-8 Name=Chromium Web Browser Comment=Access the Internet GenericName=Web Browser Exec=chromium %u Terminal=false Type=Application Icon=chromium Categories=GTK;Network;WebBrowser; MimeType=application/xhtml+xml;text/xml;application/xhtml+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https; EOF If you've enabled PNaCL support, while still the root user: install -vm755 out/Release/nacl_helper{,_bootstrap} \ out/Release/nacl_irt_*.nexe \ /usr/lib/chromium/ If you've enabled WideVine support, while still the root user: install -vm755 out/Release/libwidevinecdmadapter.so \ /usr/lib/chromium/ Chromium Lanucher Chromium Launcher is a wrapper for chromium that allows use of the Pepper Flash plugin. If you intend to use the Pepper Flash plugin, build Chromium Launcher by running the following commands: tar -xf ../chromium-launcher-3.tar.gz && cd chromium-launcher-3 && make PREFIX=/usr Install Chromium Launcher with the following commands (as the root user): rm -f /usr/bin/chromium && make PREFIX=/usr install-strip && cd .. Extracting binary plugins from Chrome Extract the downloaded deb file with the following commands: mkdir temp && cd temp && ar -x ../../google-chrome-stable_&chromium-version;*.deb && tar -xf data.tar.xz Pepper Flash As the root user, install the Pepper Flash plugin with the following command: install -vdm755 /usr/lib/PepperFlash && install -vm755 opt/google/chrome/PepperFlash/* /usr/lib/PepperFlash WideVine As the root user, install the WideVine plugin with the following command: install -vm755 opt/google/chrome/libwidevinecdm.so /usr/lib/chromium/ Command Explanations CHROMIUM_CONFIG=(...): this array contains all of the defines used in the build. sed 's/#include <cups...: this command fixes a build issue with Cups 2.2 and newer where functions are defined in a different file (cups/ppd.h). sed "s/#include <sys...: this command undefines MADV_FREE to fix a build issue with Linux-4.5 and newer. build/linux/unbundle/replace_gyp_files.py "${CHROMIUM_CONFIG[@]}": this command replaces defines in the gyp file with the values contained in ${CHROMIUM_CONFIG[@]}. build/gyp_chromium --depth=. "${CHROMIUM_CONFIG[@]}": this command runs a Google modified version of gyp on the source tree to produce a Ninja configuration suitable for the build machine. ar -x ../../google-chrome-stable_53.0.2785.116*.deb: the ar utility is used to extract Debian archives. Contents Installed Programs Installed Libraries Installed Directories /usr/bin/chromium, /usr/lib/chromium/chromium, /usr/lib/chromium/chromedriver, and /usr/lib/chromium/chrome-sandbox none /usr/lib/chromium, /usr/lib/chromium-launcher, and (optionally) /usr/lib/PepperFlash Short Descriptions /usr/bin/chromium is a wrapper for the main chromium binary (in /usr/lib/chromium) that allow use of the Pepper Flash plugin. chromium /usr/lib/chromium/chromium is the main chromium executable. chromium /usr/bin/chromedriver is a WebDriver for Chromium. chromedriver /usr/lib/chromium/chrome-sandbox creates a sandboxed environment for running untrusted code (plugins). chrome-sandbox