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).
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.
- Unpack the downloaded
tar
archive to any location, such as/opt
:# tar -xvf ungoogled-chromium_xxxxxxx.tar.xz -C /opt
- Follow the instructions in
/opt/ungoogled-chromium_xxxxxxx/README
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).
- 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 underdocs/jumbo.md
).50
is a normal setting, while8
will conserve more RAM.
- To reduce RAM consumption, set the GN flag
- At least 8 GB of filesystem space. 16 GB should be safe.
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):
- 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 constantCLANG_REVISION
. (For more info about how Google manages its prebuilt LLVM toolchain, see the file in the Chromium source treedocs/updating_clang.md
) - The latest stable LLVM version (not development/trunk!)
- 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.
- A build of the LLVM revision used by Google to build Chromium. This is specified in the Chromium source tree under
For Debian-based systems:
- 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.
# apt install clang-8 lld-8 llvm-8-dev python python3 ninja-build
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 removingbuild/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.
First, follow the instructions in Build a tar archive.
Then, run the following:
./package.appimage.sh
An .AppImage
file will appear under build
./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
See LICENSE