Skip to content

Commit 006fba8

Browse files
committed
Merge branch 'master' of github.com:Eloston/ungoogled-chromium
2 parents f4c6e0a + 39dceb8 commit 006fba8

13 files changed

+69
-62
lines changed

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ container:
44
code_check_task:
55
pip_cache:
66
folder: ~/.cache/pip
7-
populate_script: pip install pylint requests yapf
8-
pip_install_script: pip install pylint requests yapf
7+
fingerprint_script: cat .cirrus_requirements.txt
8+
populate_script: pip install -r .cirrus_requirements.txt
99
utils_script:
1010
- python3 -m yapf --style '.style.yapf' -e '*/third_party/*' -rpd utils
1111
- ./devutils/run_utils_pylint.py --hide-fixme

.cirrus_Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Dockerfile for Python 3 with xz-utils (for tar.xz unpacking)
22

3-
FROM python:3.5-slim
3+
FROM python:3.7-slim
44

55
RUN apt update && apt install -y xz-utils

.cirrus_requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Based on Python package versions in Debian buster
2+
astroid==2.1.0 # via pylint
3+
pylint==2.2.2
4+
requests==2.21.0
5+
yapf==0.25.0

README.md

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
* [Motivation and Philosophy](#motivation-and-philosophy)
2424
* [Feature Overview](#feature-overview)
2525
* [**Downloads**](#downloads)
26-
* [Software Repositories](#software-repositories)
27-
* [Contributor Binaries](#contributor-binaries)
28-
* [Source Code](#source-code)
26+
* [Source Code](#source-code)
2927
* [**FAQ**](#faq)
3028
* [Building Instructions](#building-instructions)
3129
* [Design Documentation](#design-documentation)
@@ -103,34 +101,21 @@ Other platforms are discussed and tracked in this repository's Issue Tracker. Le
103101

104102
## Downloads
105103

106-
*To download and run ungoogled-chromium:*
104+
[**Download binaries from here**](//ungoogled-software.github.io/ungoogled-chromium-binaries/)
107105

108-
* Download from [Software Repositories](#software-repositories) if your system is supported.
109-
* Otherwise, download [Contributor Binaries](#contributor-binaries).
106+
*NOTE: These binaries are provided by anyone who are willing to build and submit them. Because these binaries are not necessarily [reproducible](https://reproducible-builds.org/), authenticity cannot be guaranteed; In other words, there is always a non-zero probability that these binaries may have been tampered with. In the unlikely event that this has happened to you, please [report it in a new issue](#contributing-reporting-contacting).*
110107

111-
To build ungoogled-chromium, see [Source Code](#source-code).
108+
These binaries are known as **contributor binaries**.
112109

113-
### Software Repositories
114-
115-
*Install and run ungoogled-chromium from a software repository:*
110+
Also, ungoogled-chromium is available in several **software repositories**:
116111

117112
* Arch Linux: [Available in AUR as `ungoogled-chromium`](https://aur.archlinux.org/packages/ungoogled-chromium/)
118113
* NOTE: `ungoogled-chromium-bin` is *not* officially part of ungoogled-chromium. Please submit all issues to the maintainer of the PKGBUILD.
119114
* Gentoo Linux: [`::chaoslab`](https://gitlab.com/chaoslab/chaoslab-overlay) overlay maintains an *unofficial* [`ungoogled-chromium`](https://gitlab.com/chaoslab/chaoslab-overlay/tree/master/www-client/ungoogled-chromium) ebuild.
120115
* GNU Guix: Available as `ungoogled-chromium`.
121116
* macOS cask: Available as `eloston-chromium`
122117

123-
### Contributor Binaries
124-
125-
*Download, install, and run ungoogled-chromium from machine code provided by volunteers.*
126-
127-
[**Download from here**](//ungoogled-software.github.io/ungoogled-chromium-binaries/)
128-
129-
**IMPORTANT**: These binaries are provided by anyone who are willing to build and submit them. Because these binaries are not necessarily [reproducible](https://reproducible-builds.org/), authenticity cannot be guaranteed; In other words, there is always a non-zero probability that these binaries may have been tampered with. In the unlikely event that this has happened to you, please [report it in a new issue](#contributing-reporting-contacting).
130-
131-
To contribute binaries, [consult the instructions in the ungoogled-chromium-binaries repository](//github.com/ungoogled-software/ungoogled-chromium-binaries)
132-
133-
### Source Code
118+
## Source Code
134119

135120
This repository contains the common code for all platforms. To build ungoogled-chromium for a specific platform, [consult the repository for that plaform](docs/platforms.md).
136121

chromium_version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
73.0.3683.86
1+
73.0.3683.103

devutils/check_patch_files.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from third_party import unidiff
2424

2525
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils'))
26-
from _common import ENCODING, get_logger
26+
from _common import ENCODING, get_logger, parse_series
2727
sys.path.pop(0)
2828

2929
# File suffixes to ignore for checking unused patches
@@ -39,9 +39,7 @@ def _read_series_file(patches_dir, series_file, join_dir=False):
3939
4040
join_dir indicates if the patches_dir should be joined with the series entries
4141
"""
42-
with (patches_dir / series_file).open(encoding=ENCODING) as file_obj:
43-
series_entries = filter(len, file_obj.read().splitlines())
44-
for entry in series_entries:
42+
for entry in parse_series(patches_dir / series_file):
4543
if join_dir:
4644
yield patches_dir / entry
4745
else:

devutils/update_platform_patches.py

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,21 @@ def unmerge_platform_patches(platform_patches_dir):
106106
get_logger().error('Unable to find series.orig at: %s', platform_patches_dir / _SERIES_ORIG)
107107
return False
108108
orig_series = (platform_patches_dir / _SERIES_ORIG).read_text(encoding=ENCODING).splitlines()
109-
# patch path -> number of following blank lines
110-
path_spaces = dict()
109+
# patch path -> list of lines after patch path and before next patch path
110+
path_comments = dict()
111+
# patch path -> inline comment for patch
112+
path_inline_comments = dict()
111113
previous_path = None
112114
for partial_path in orig_series:
113-
if partial_path:
114-
previous_path = partial_path
115-
elif previous_path in path_spaces:
116-
path_spaces[previous_path] += 1
115+
if not partial_path or partial_path.startswith('#'):
116+
if partial_path not in path_comments:
117+
path_comments[previous_path] = list()
118+
path_comments[previous_path].append(partial_path)
117119
else:
118-
path_spaces[previous_path] = 1
120+
path_parts = partial_path.split(' #', maxsplit=1)
121+
previous_path = path_parts[0]
122+
if len(path_parts) == 2:
123+
path_inline_comments[path_parts[0]] = path_parts[1]
119124

120125
# Apply changes on series.merged into a modified version of series.orig
121126
if not (platform_patches_dir / _SERIES_MERGED).exists():
@@ -128,8 +133,11 @@ def unmerge_platform_patches(platform_patches_dir):
128133
new_series = list(new_series)
129134
series_index = 0
130135
while series_index < len(new_series):
131-
if new_series[series_index] in path_spaces:
132-
new_series.insert(series_index + 1, '\n' * (path_spaces[new_series[series_index]] - 1))
136+
current_path = new_series[series_index]
137+
if current_path in path_inline_comments:
138+
new_series[series_index] = current_path + ' #' + path_inline_comments[current_path]
139+
if current_path in path_comments:
140+
new_series.insert(series_index + 1, '\n'.join(path_comments[current_path]))
133141
series_index += 1
134142
series_index += 1
135143

devutils/validate_patches.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils'))
2828
from domain_substitution import TREE_ENCODINGS
29-
from _common import ENCODING, get_logger, get_chromium_version
29+
from _common import ENCODING, get_logger, get_chromium_version, parse_series
3030
sys.path.pop(0)
3131

3232
try:
@@ -600,13 +600,6 @@ def _get_files_under_test(args, required_files, parser):
600600
return files_under_test
601601

602602

603-
def _get_series_iterable(series_path):
604-
"""Returns an iterable of the relative patch paths in the series file"""
605-
with series_path.open(encoding=ENCODING) as series_file:
606-
series_iter = filter(len, map(str.strip, series_file.read().splitlines()))
607-
return tuple(series_iter)
608-
609-
610603
def main():
611604
"""CLI Entrypoint"""
612605
parser = argparse.ArgumentParser(description=__doc__)
@@ -664,7 +657,7 @@ def main():
664657
else:
665658
get_logger(initial_level=logging.INFO)
666659

667-
series_iterable = _get_series_iterable(args.series)
660+
series_iterable = tuple(parse_series(args.series))
668661
patch_cache = _load_all_patches(series_iterable, args.patches)
669662
required_files = _get_required_files(patch_cache)
670663
files_under_test = _get_files_under_test(args, required_files, parser)

docs/building.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ The recommended way to build ungoogled-chromium is by consulting [the repository
66

77
* *Linux users*: If your distribution is not listed, you will need to use Portable Linux.
88

9-
If you want to make a custom build, you will need to develop your own build process. *Beware that this may be a time-consuming process.* The easiest way to do this is to modify an existing platform's code, like Portable Linux. Additionally, you may have a look at the example below for some inspiration.
9+
If you want to know how to use ungoogled-chromium's build process in your own Chromium builds, you may have a look at the rough example below. Additionally, you may reference the repositories for supported platforms for inspiration.
1010

1111
## Rough example
1212

13-
**NOTE: These are for users who want to make a custom build.** You should already be familiar with the [standard Chromium build process](https://chromium.googlesource.com/chromium/src/+/lkgr/docs/get_the_code.md), and [ungoogled-chromium's design documentation](design.md).
13+
**NOTE: This example is intended only for users who want to learn how ungoogled-chromium's build process works.** If you are simply trying to build and run ungoogled-chromium, please consult the [repository for your supported platform](platforms.md).
1414

15-
The following example demonstrates a typical build process. Please note that these steps alone may not be sufficient to get a working build.
15+
In order to get a working build from this example, you will need to develop your own build process. **This may be a time-consuming process.** Before continuing, you should be familiar with the [standard Chromium build process](https://chromium.googlesource.com/chromium/src/+/lkgr/docs/get_the_code.md), and [ungoogled-chromium's design documentation](design.md).
16+
17+
The following example demonstrates a typical build process. Please note that these steps alone will probably not be sufficient to get a working build.
1618

1719
1. Download and unpack the source code:
1820

@@ -46,7 +48,7 @@ mkdir -p build/download_cache
4648
mkdir -p build/src/out/Default
4749
cp flags.gn build/src/out/Default/args.gn
4850
cd build/src
49-
./tools/gn/bootstrap.py --skip-generate-buildfiles -j4 -o out/Default/gn
51+
./tools/gn/bootstrap/bootstrap.py --skip-generate-buildfiles -j4 -o out/Default/gn
5052
```
5153

5254
6. Build Chromium:

docs/design.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ All of ungoogled-chromium's patches for the Chromium source code are located in
6464

6565
* All patches must reside inside `patches/`
6666
* There is a `patches/series` text file that defines the order to apply all the patches. These patches are listed as a relative path from the `patches` directory.
67+
* Lines starting with the pound symbol (`#`) are ignored
68+
* For lines with patch paths: If there is a space followed by a pound symbol, the text after the patch path will be ignored.
6769

6870
All patch files in ungoogled-chromium must satisfy these formatting requirements:
6971

0 commit comments

Comments
 (0)