You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: BUILDING.md
+28-36Lines changed: 28 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,34 +2,30 @@
2
2
3
3
**Notice for master branch users**: The information in this document may not apply to the latest tag version. Please consult the documentation from the tag instead.
4
4
5
-
ungoogled-chromium provides scripts to automate the downloading, patching, and building of Chromium with these patches. Here's an overview of the building scripts and files:
6
-
*`build-sandbox` - This directory is the build sandbox; the container for all files used and generated during building. It is created when the building environment is setup.
7
-
*`build_templates` - This holds the system-dependent files that are used for compiling and generating a binary package. They are copied into the build sandbox by the build setup scripts.
8
-
*`debian` - This contains files to generate a dpkg debian directory. Debian-specific patches are located here.
9
-
*`ubuntu` - This contains files to generate a dpkg debian directory for Ubuntu
10
-
*`download_source.sh` - This script downloads the source tarball from `commondatastorage.googleapis.com` and unpacks it into the build sandbox.
11
-
* It accepts arguments; pass in `-h` for more information.
12
-
*`generate_domain_substitution_list.sh` - This script generates a list of files containing domain names to be replaced
13
-
* It should be run at the root of the build sandbox.
14
-
* This script is not needed during the normal build process
15
-
*`domain_substitution_list` - This file is generated by `generate_domain_substitution_list.sh` for a specific version of Chromium
16
-
* It assumes that the cleaning list has been applied
17
-
*`domain_regex_list` - The list of regular expressions used to substitute domain names
18
-
*`evaluate_domain_substitution_list.py` - This script evaluates the domain substitution list in the current working directory
19
-
*`generate_cleaning_list.sh` - This script generates a file list of mostly all binary files to be stripped from the source tree.
20
-
* It should be run at the root of the build sandbox.
21
-
* This script is not needed during the normal build process
22
-
*`cleaning_list` - This file is generated by `generate_cleaning_list.sh` for a specific version of Chromium
23
-
*`evaluate_cleaning_list.py` - This script evaluates the cleaning list in the current working directory
24
-
*`generate_debian_scripts.sh` - This script creates a dpkg debian directory in the build sandbox for Debian
25
-
*`generate_ubuntu_scripts.sh` - This script creates a dpkg debian directory in the build sandbox for Ubuntu
26
-
*`build_debian.sh` - This is the main build script for Debian and derivative distributions. It handles the downloading, patching, and building of .deb packages.
27
-
* This script will invoke the other scripts to do certain tasks.
28
-
* It accepts arguments; pass in `-h` for more information.
5
+
## The building system
6
+
7
+
ungoogled-chromium provides a flexible and extensible Python library called [`buildlib`](buildlib) that does source code downloading, source cleaning, domain substitution, patching, building, and packaging. There's no documentation on `buildlib` yet, but it's pretty straight-forward to use. [See `build.py`](build.py) for an example on using `buildlib`.
8
+
9
+
Currently, there is no command-line-configurable build script. You must create a script to use `buildlib`.
10
+
11
+
## General building requirements
12
+
13
+
The following is needed to fully use `buildlib`:
14
+
* Python 3 (tested on 3.5) for running `buildlib`
15
+
* The below can be provided by [Google's depot_tools](https://www.chromium.org/developers/how-tos/install-depot-tools)
16
+
* Python 2 (tested on 2.7) for running gyp
17
+
*[Jinja2](http://jinja.pocoo.org/) for running gyp
18
+
*[Ninja](https://ninja-build.org/) for running the build command
19
+
20
+
There are additional requirements for specific platforms. See the following sections for more information.
21
+
22
+
## How to build
23
+
24
+
Building is done by simply invoking a Python script like `build.py`. It will take care of the setup and building processes. See the following for more information.
29
25
30
26
## Debian and derivatives
31
27
32
-
Distributions supported: Debian Jessie 64-bit and Stretch 64-bit, and Ubuntu Xenial 64-bit
28
+
As of now, only Debian Stretch 64-bit is tested. Ubuntu Xenial 64-bit support will come soon.
33
29
This may work on other Debian-based distributions and 32-bit systems
34
30
35
31
**Note for Debian Jessie users**: ungoogled-chromium is configured to build against the system's [FFmpeg](https://www.ffmpeg.org/) (available in Stretch and onwards); [Libav](http://libav.org) (used in Jessie) will not work. However, FFmpeg is available in `jessie-backports`. To install it, add `jessie-backports` to the apt sources, and then install `libavutil-dev`, `libavcodec-dev`, and `libavformat-dev` from it. Note that this will replace Libav.
@@ -39,29 +35,25 @@ Run these steps on the system you want to build packages for.
# Run dpkg-checkbuilddeps to find packages needed for building
43
-
./build_debian.sh -A
38
+
dpkg-checkbuilddeps resources/debian/dpkg_dir/control # Use this to see the packages needed to build
39
+
./build.py
44
40
45
-
Debian packages will appear under `ungoogled-chromium/`
46
-
47
-
Pass the `-h` flag into `build_debian.sh` or `download_source.sh` for more options.
41
+
Debian packages will appear in the current working directory.
48
42
49
43
## Arch Linux
50
44
51
45
For Arch Linux, consider using [Inox patchset](https://github.com/gcarq/inox-patchset); one of the projects which ungoogled-chromium draws its patches from. It offers pre-built binaries and is also available in AUR.
52
46
53
47
## Windows
54
48
55
-
TODO
49
+
TODO. See Issue #1
56
50
57
51
## Other systems, platforms, and configurations
58
52
59
-
Please note that building on other platforms and systems is not officially supported, and multiple things can go wrong while attempting to build. Nevertheless, here are some tips: TODO
60
-
61
53
Consult the build instructions on the [Chromium homepage](http://www.chromium.org/Home) to build Chromium for your system.
62
54
63
-
The patches in the `patches` directory should work for any build of Chromium. They assume a clean and unmodified Chromium source tree.
55
+
The main set of patches (in `resources/common/patches`) should work on most, if not all, platforms supported by desktop Chromium. Some patches are there to fix building with certain build flags, so those may not work with other platforms or configurations. However, the patches as they are should apply as long as there is a clean and unmodified source tree.
64
56
65
-
These patches are also tested with the GYP flags defined in [`build_templates/debian/rules`](build_templates/debian/rules). Note that enabling some flags, such as `safe_browsing`, may cause the build to fail.
57
+
It is not recommended to run domain substitution or source cleaning, especially if your build requires additional downloads from Google.
66
58
67
-
Note about `domain_substitution_list`: Replacing the domains will break URLs in the source tree pointing to Google servers. If your building steps requires additional downloads (such as the the PNaCl toolkit), scripts in the source tree may fail to work.
59
+
The domain substitution list, source cleaning list, and some patches in `resources/common` are designed to work with the build flags defined. They may require modifications if the flags are changed.
Copy file name to clipboardExpand all lines: README.md
+32-22Lines changed: 32 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,12 +11,13 @@ In addition to features provided by [Iridium Browser](https://iridiumbrowser.de/
11
11
* Added menu item under "More tools" to clear the HTTP authentication cache on-demand
12
12
* Disabled persistent per-site settings in Preferences file
13
13
* Make all popups go to tabs
14
-
* Replaced many domains in the source code with non-existant alternatives (see `generate_domain_substitution_list.sh`)
15
-
* Stripped binaries from the source code (see `generate_cleaning_list.sh`)
14
+
* Replaced many domains in the source code with non-existant alternatives (known as domain substitution)
15
+
* Stripped binaries from the source code (known as source cleaning)
16
16
* Disabled intranet redirect detector
17
17
* Debian build scripts
18
-
* (Debian build scripts change) Move the chrome-sandbox into a separate package
18
+
* (Debian build scripts change) Move the chrome-sandbox into a separate package
19
19
* (Iridium Browser feature change) Prevent URLs with the `trk:` scheme from connecting to the Internet
20
+
* Also prevents any URLs with the top-level domain `qjz9zk` (as used in domain substitution) from attempting a connection.
20
21
* (Iridium and Inox feature change) Prevent pinging of IPv6 address when detecting the availability of IPv6
21
22
22
23
**DISCLAIMER: Although I try my best to eliminate bugs and privacy-invading code, there will be those that slip by due to the enormity and continuing evolution of the Chromium project.**
@@ -34,24 +35,33 @@ The `master` branch is for development, so it is not guarenteed to be in a worki
34
35
35
36
## How ungoogled-chromium is designed
36
37
37
-
All features are implemented through patches. Patches are contained within the `patches` directory, with the exception of platform-specific patches in the `building/templates` directory
38
-
39
-
A summary of the files in the `patches` directory:
40
-
*`ungoogled-chromium/`
41
-
* This directory contains new patches for ungoogled-chromium. They implement the features described above.
42
-
*`iridium-browser`
43
-
* This directory contains a subset of patches from Iridium Browser.
44
-
* Patches are not touched unless they do not apply cleanly onto the version of Chromium being built
45
-
* Patches are from the `patchview` branch of its Git repository. [Web view of the patchview branch](https://git.iridiumbrowser.de/cgit.cgi/iridium-browser/?h=patchview)
46
-
*`inox-patchset/`
47
-
* This directory contains a modified subset of patches from Inox patchset.
48
-
* Patches are from [inox-patchset's GitHub](https://github.com/gcarq/inox-patchset)
* This directory contains patches from Debian's Chromium.
52
-
* These patches are not Debian-specific. For those, see the `build-templates/debian/` directory
53
-
*`patch_order`
54
-
* Determines which patches are used and what order they should be applied
38
+
Features are implemented through a combination of build flags, patches, and a few file inputs for automated source modification. All of these are stored in the `resources` directory. The `resources` directory contains the `common` directory, which has such files that apply to all platforms. All other directories, named by platform, contain additional platform-specific data. Most of the features, however, are stored in the `common` directory.
39
+
40
+
There are currently two automated scripts that process the source code:
41
+
* Source cleaner - Used to clean out binary files (i.e. do not seem to be human-readable text files, except a few required for building)
42
+
* Domain substitution - Used to replace Google and other domains in the source code to eliminate communication not caught by the patches and build flags.
43
+
44
+
Here's a breakdown of what is in a resources directory:
45
+
*`cleaning_list` - (Used for source cleaning) A list of files to be excluded during the extraction of the Chromium source
46
+
*`domain_regex_list` - (Used for domain substitution) A list of regular expressions that define how domains will be replaced in the source code
47
+
*`domain_substitution_list` - (Used for domain substitution) A list of files that are processed by `domain_regex_list`
48
+
*`gn_args.ini` - A list of GN arguments to use for building. (Currently unused, see Issue #16)
49
+
*`gyp_flags` - A list of GYP flags to use for building.
50
+
*`patches/` - Contains patches. The patches in here vary by platform, but the ones in the `common` directory are described below.
51
+
*`patch_order` - The order to apply the patches in. Patches from `common` should be applied before the one for a platform.
52
+
53
+
All of these files are human-readable, but they are usually processed by the Python building system. See the Building section below for more information.
54
+
55
+
Here's a breakdown of the `common/patches` directory:
56
+
*`ungoogled-chromium/` - Contains new patches for ungoogled-chromium. They implement the features described above.
57
+
*`iridium-browser` - Contains a subset of patches from Iridium Browser.
58
+
* Patches are not touched unless they do not apply cleanly onto the version of Chromium being built
59
+
* Patches are from the `patchview` branch of Iridium's Git repository. [Git webview of the patchview branch](https://git.iridiumbrowser.de/cgit.cgi/iridium-browser/?h=patchview)
60
+
*`inox-patchset/` - Contains a modified subset of patches from Inox patchset.
61
+
* Patches are from [inox-patchset's GitHub](https://github.com/gcarq/inox-patchset)
0 commit comments