Skip to content

LiMium/ungoogled-chromium-portablelinux

 
 

Repository files navigation

ungoogled-chromium-portablelinux

Portable Linux (i.e. a generic Linux version) packaging for ungoogled-chromium.

Portable Linux builds can run on any Linux distribution (that regular Chromium supports).

Downloads

Download binaries from the Contributor Binaries website.

Source Code: It is recommended to use a tag via git checkout (see building instructions below). You may also use master, but it is for development and may not be stable.

Installing the binaries

  1. Unpack the downloaded tar archive to any location, such as /opt:
    # tar -xvf ungoogled-chromium_xxxxxxx.tar.xz -C /opt
  2. Follow the instructions in /opt/ungoogled-chromium_xxxxxxx/README

Building

These instructions will build packages compatible with any Linux distribution that Chromium supports. They are portable and have minimal dependencies on system libraries (just as in regular Chromium).

Hardware requirements

  • For 64-bit systems, at least 8 GB of RAM is highly recommended (per the document in the Chromium source tree under docs/linux_build_instructions.md).
    • To reduce RAM consumption, set the GN flag jumbo_file_merge_limit with a lower value (documented in the Chromium source code under docs/jumbo.md). 50 is a normal setting, while 8 will conserve more RAM.
  • At least 8 GB of filesystem space. 16 GB should be safe.

Software requirements

TODO: Document all libraries and tools needed to build. For now, see the build dependencies for Debian systems.

  • Python 3 (tested on 3.5) for ungoogled-chromium's utilities

  • Python 2 (tested on 2.7) for building GN and running other build-time scripts

  • Ninja for running the build command

  • One of the following LLVM toolchain versions, in descending order of preference (which must include Clang and LLD):

    1. A build of the LLVM revision used by Google to build Chromium. This is specified in the Chromium source tree under tools/clang/scripts/update.py in the constant CLANG_REVISION. (For more info about how Google manages its prebuilt LLVM toolchain, see the file in the Chromium source tree docs/updating_clang.md)
    2. The latest stable LLVM version (not development/trunk!)
    3. A nightly snapshot LLVM build, available from the LLVM apt repo. For best results, the branch version should match the current stable LLVM version (e.g. if the current stable is 8.0.1, use branch version 8)

    Note that any other LLVM version may outright fail, or cause unexpected behavior.

For Debian-based systems:

  1. Add the the LLVM APT repo for the appropriate LLVM version (currently 8).
    • Note that the APT URLs for development (aka nightly snapshot) LLVM versions do not contain the LLVM version in them.
  2. # apt install clang-8 lld-8 llvm-8-dev python python3 ninja-build

Build a tar archive

git clone --recurse-submodules https://github.com/ungoogled-software/ungoogled-chromium-portablelinux.git
# Replace TAG_OR_BRANCH_HERE with a tag or branch name
git checkout --recurse-submodules TAG_OR_BRANCH_HERE
# Use "export ..." for AR, NM, CC, CXX, or others to specify the compiler to use
# It defaults to LLVM tools. See build.sh for more details
./build.sh
./package.sh

A compressed tar archive will appear under build

NOTE: If the build fails, you must take additional steps before re-running the build:

  • If the build fails while downloading the Chromium source code (during build.sh), it can be fixed by removing build/download_cache and re-running the build instructions.
  • If the build fails at any other point after downloading, it can be fixed by removing build/src and re-running the build instructions. This will clear out all the code used by the build, and any files generated by the build.

Building an AppImage

First, follow the instructions in Build a tar archive.

Then, run the following:

./package.appimage.sh

An .AppImage file will appear under build

Developer info

Updating patches

./devutils/update_patches.sh merge
source devutils/set_quilt_vars.sh

# Setup Chromium source
mkdir -p build/{src,download_cache}
./ungoogled-chromium/utils/downloads.py retrieve -i ungoogled-chromium/downloads.ini -c build/download_cache
./ungoogled-chromium/utils/downloads.py unpack -i ungoogled-chromium/downloads.ini -c build/download_cache build/src

cd build/src
# Use quilt to refresh patches. See ungoogled-chromium's docs/developing.md section "Updating patches" for more details
quilt pop -a

cd ../../
# Remove all patches introduced by ungoogled-chromium
./devutils/update_patches.sh unmerge
# Ensure patches/series is formatted correctly, e.g. blank lines

# Sanity checking for consistency in series file
./devutils/check_patch_files.sh

# Use git to add changes and commit

License

See LICENSE

About

Portable Linux packaging for ungoogled-chromium

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%