├── .cirrus.yml ├── .cirrus_Dockerfile ├── .cirrus_requirements.txt ├── .github ├── ISSUE_TEMPLATE │ ├── bugreport.yml │ ├── create-an--updating-to-chromium-x-x-x-x-.md │ └── feature_request.yml ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── new_version_check.yml │ ├── release-on-tag.yml │ └── stale.yml ├── .gitignore ├── .style.yapf ├── CODEOWNERS ├── LICENSE ├── README.md ├── SUPPORT.md ├── chromium_version.txt ├── devutils ├── .coveragerc ├── README.md ├── __init__.py ├── check_all_code.sh ├── check_downloads_ini.py ├── check_files_exist.py ├── check_gn_flags.py ├── check_patch_files.py ├── print_tag_version.sh ├── pytest.ini ├── run_devutils_pylint.py ├── run_devutils_tests.sh ├── run_devutils_yapf.sh ├── run_other_pylint.py ├── run_other_yapf.sh ├── run_utils_pylint.py ├── run_utils_tests.sh ├── run_utils_yapf.sh ├── set_quilt_vars.fish ├── set_quilt_vars.sh ├── tests │ ├── __init__.py │ ├── test_check_patch_files.py │ └── test_validate_patches.py ├── third_party │ ├── README.md │ ├── __init__.py │ └── unidiff │ │ ├── __init__.py │ │ ├── __version__.py │ │ ├── constants.py │ │ ├── errors.py │ │ └── patch.py ├── update_lists.py ├── update_platform_patches.py ├── validate_config.py └── validate_patches.py ├── docs ├── building.md ├── contributing.md ├── default_settings.md ├── design.md ├── developing.md ├── flags.md ├── platforms.md └── repo_management.md ├── domain_regex.list ├── domain_substitution.list ├── downloads.ini ├── flags.gn ├── patches ├── core │ ├── bromite │ │ └── disable-fetching-field-trials.patch │ ├── inox-patchset │ │ ├── 0001-fix-building-without-safebrowsing.patch │ │ ├── 0003-disable-autofill-download-manager.patch │ │ ├── 0005-disable-default-extensions.patch │ │ ├── 0015-disable-update-pings.patch │ │ └── 0021-disable-rlz.patch │ ├── iridium-browser │ │ ├── all-add-trk-prefixes-to-possibly-evil-connections.patch │ │ ├── safe_browsing-disable-incident-reporting.patch │ │ └── safe_browsing-disable-reporting-of-safebrowsing-over.patch │ └── ungoogled-chromium │ │ ├── block-requests.patch │ │ ├── block-trk-and-subdomains.patch │ │ ├── disable-crash-reporter.patch │ │ ├── disable-domain-reliability.patch │ │ ├── disable-fonts-googleapis-references.patch │ │ ├── disable-gaia.patch │ │ ├── disable-gcm.patch │ │ ├── disable-google-host-detection.patch │ │ ├── disable-mei-preload.patch │ │ ├── disable-network-time-tracker.patch │ │ ├── disable-privacy-sandbox.patch │ │ ├── disable-profile-avatar-downloading.patch │ │ ├── disable-untraceable-urls.patch │ │ ├── disable-webrtc-log-uploader.patch │ │ ├── disable-webstore-urls.patch │ │ ├── doh-changes.patch │ │ ├── extensions-manifestv2.patch │ │ ├── fix-building-with-prunned-binaries.patch │ │ ├── fix-building-without-safebrowsing.patch │ │ ├── fix-learn-doubleclick-hsts.patch │ │ ├── remove-unused-preferences-fields.patch │ │ ├── replace-google-search-engine-with-nosearch.patch │ │ └── toggle-translation-via-switch.patch ├── extra │ ├── bromite │ │ ├── fingerprinting-flags-client-rects-and-measuretext.patch │ │ ├── flag-fingerprinting-canvas-image-data-noise.patch │ │ └── flag-max-connections-per-host.patch │ ├── debian │ │ └── disable │ │ │ └── google-api-warning.patch │ ├── inox-patchset │ │ ├── 0006-modify-default-prefs.patch │ │ ├── 0008-restore-classic-ntp.patch │ │ ├── 0013-disable-missing-key-warning.patch │ │ ├── 0016-chromium-sandbox-pie.patch │ │ └── 0019-disable-battery-status-service.patch │ ├── iridium-browser │ │ ├── Remove-EV-certificates.patch │ │ ├── browser-disable-profile-auto-import-on-first-run.patch │ │ ├── mime_util-force-text-x-suse-ymp-to-be-downloaded.patch │ │ ├── net-cert-increase-default-key-length-for-newly-gener.patch │ │ ├── prefs-always-prompt-for-download-directory-by-defaul.patch │ │ └── updater-disable-auto-update.patch │ └── ungoogled-chromium │ │ ├── add-components-ungoogled.patch │ │ ├── add-extra-channel-info.patch │ │ ├── add-flag-for-bookmark-bar-ntp.patch │ │ ├── add-flag-for-close-confirmation.patch │ │ ├── add-flag-for-custom-ntp.patch │ │ ├── add-flag-for-disabling-link-drag.patch │ │ ├── add-flag-for-grab-handle.patch │ │ ├── add-flag-for-incognito-themes.patch │ │ ├── add-flag-for-omnibox-autocomplete-filtering.patch │ │ ├── add-flag-for-qr-generator.patch │ │ ├── add-flag-for-search-engine-collection.patch │ │ ├── add-flag-for-tab-hover-cards.patch │ │ ├── add-flag-for-tabsearch-button.patch │ │ ├── add-flag-to-change-http-accept-header.patch │ │ ├── add-flag-to-clear-data-on-exit.patch │ │ ├── add-flag-to-close-window-with-last-tab.patch │ │ ├── add-flag-to-configure-extension-downloading.patch │ │ ├── add-flag-to-convert-popups-to-tabs.patch │ │ ├── add-flag-to-disable-beforeunload.patch │ │ ├── add-flag-to-disable-local-history-expiration.patch │ │ ├── add-flag-to-disable-sharing-hub.patch │ │ ├── add-flag-to-disable-tls-grease.patch │ │ ├── add-flag-to-force-punycode-hostnames.patch │ │ ├── add-flag-to-hide-crashed-bubble.patch │ │ ├── add-flag-to-hide-extensions-menu.patch │ │ ├── add-flag-to-hide-fullscreen-exit-ui.patch │ │ ├── add-flag-to-hide-tab-close-buttons.patch │ │ ├── add-flag-to-reduce-system-info.patch │ │ ├── add-flag-to-remove-client-hints.patch │ │ ├── add-flag-to-scroll-tabs.patch │ │ ├── add-flag-to-show-avatar-button.patch │ │ ├── add-flag-to-spoof-webgl-renderer-info.patch │ │ ├── add-flags-for-existing-switches.patch │ │ ├── add-flags-for-referrer-customization.patch │ │ ├── add-ipv6-probing-option.patch │ │ ├── add-suggestions-url-field.patch │ │ ├── add-ungoogled-flag-headers.patch │ │ ├── default-webrtc-ip-handling-policy.patch │ │ ├── disable-chromelabs.patch │ │ ├── disable-dial-repeating-discovery.patch │ │ ├── disable-download-quarantine.patch │ │ ├── disable-downloads-page-referrer-url.patch │ │ ├── disable-formatting-in-omnibox.patch │ │ ├── disable-intranet-redirect-detector.patch │ │ ├── disable-remote-optimization-guide.patch │ │ ├── enable-certificate-transparency-and-add-flag.patch │ │ ├── enable-default-prefetch-privacy-changes.patch │ │ ├── enable-extra-locales.patch │ │ ├── enable-menu-on-reload-button.patch │ │ ├── enable-page-saving-on-more-pages.patch │ │ ├── enable-paste-and-go-new-tab-button.patch │ │ ├── first-run-page.patch │ │ ├── fix-building-without-mdns-and-service-discovery.patch │ │ ├── fix-distilled-icons.patch │ │ ├── keep-expired-flags.patch │ │ ├── prepopulated-search-engines.patch │ │ ├── remove-disable-setuid-sandbox-as-bad-flag.patch │ │ ├── remove-pac-size-limit.patch │ │ └── remove-uneeded-ui.patch ├── series └── upstream-fixes │ ├── glue_core_pools.patch │ ├── hardware_destructive_interference_size.patch │ └── missing-dependencies.patch ├── pruning.list ├── revision.txt ├── shell.nix └── utils ├── .coveragerc ├── __init__.py ├── _common.py ├── _extraction.py ├── clone.py ├── depot_tools.patch ├── domain_substitution.py ├── downloads.py ├── filescfg.py ├── make_domsub_script.py ├── patches.py ├── prune_binaries.py ├── pytest.ini ├── tests ├── __init__.py ├── test_domain_substitution.py └── test_patches.py └── third_party ├── README.md ├── __init__.py └── schema.py /.cirrus.yml: -------------------------------------------------------------------------------- 1 | env: 2 | CIRRUS_CLONE_DEPTH: 1 3 | 4 | container: 5 | dockerfile: .cirrus_Dockerfile 6 | cpu: 8 7 | memory: 32G 8 | use_in_memory_disk: true 9 | 10 | code_check_task: 11 | pip_cache: 12 | folder: /usr/local/lib/python3.9/site-packages 13 | fingerprint_script: cat .cirrus_requirements.txt 14 | populate_script: pip install -r .cirrus_requirements.txt 15 | utils_script: 16 | - python3 -m yapf --style '.style.yapf' -e '*/third_party/*' -rpd utils 17 | - ./devutils/run_utils_pylint.py --hide-fixme 18 | - ./devutils/run_utils_tests.sh 19 | devutils_script: 20 | - python3 -m yapf --style '.style.yapf' -e '*/third_party/*' -rpd devutils 21 | - ./devutils/run_devutils_pylint.py --hide-fixme 22 | - ./devutils/run_devutils_tests.sh 23 | 24 | validate_config_task: 25 | validate_config_script: ./devutils/validate_config.py 26 | 27 | validate_with_source_task: 28 | pip_cache: 29 | folder: /usr/local/lib/python3.9/site-packages 30 | fingerprint_script: cat .cirrus_requirements.txt 31 | populate_script: pip install -r .cirrus_requirements.txt 32 | chromium_download_script: | 33 | # These directories will not exist when this is called, unless cache retrieval 34 | # fails and leaves partially-complete files around. 35 | rm -rf chromium_src 36 | rm -rf chromium_download_cache 37 | mkdir chromium_download_cache 38 | # Attempt to download tarball 39 | if ! ./utils/downloads.py retrieve -i downloads.ini -c chromium_download_cache ; then 40 | # If tarball is not available, attempt a clone 41 | ./utils/clone.py -o chromium_src 42 | rm -rf chromium_src/uc_staging 43 | find chromium_src -type d -name '.git' -exec rm -rf "{}" \; -prune 44 | tar cf chromium_download_cache/chromium-$(cat chromium_version.txt)-lite.tar.xz \ 45 | --transform s/chromium_src/chromium-$(cat chromium_version.txt)/ chromium_src 46 | fi 47 | unpack_source_script: | 48 | if [ ! -d chromium_src ]; then 49 | ./utils/downloads.py unpack -i downloads.ini -c chromium_download_cache chromium_src 50 | fi 51 | validate_patches_script: 52 | - ./devutils/validate_patches.py -l chromium_src -v 53 | validate_lists_script: 54 | # NOTE: This check is prone to false positives, but not false negatives. 55 | - ./devutils/check_files_exist.py chromium_src pruning.list domain_substitution.list 56 | 57 | # vim: set expandtab shiftwidth=4 softtabstop=4: 58 | -------------------------------------------------------------------------------- /.cirrus_Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile for Python 3 with xz-utils (for tar.xz unpacking) 2 | 3 | FROM python:3.9-slim-bullseye 4 | 5 | RUN apt update && apt install -y xz-utils patch axel curl git 6 | -------------------------------------------------------------------------------- /.cirrus_requirements.txt: -------------------------------------------------------------------------------- 1 | # Based on Python package versions in Debian bullseye 2 | # https://packages.debian.org/bullseye/python/ 3 | astroid==2.5.1 # via pylint 4 | pylint==2.7.2 5 | pytest-cov==2.10.1 6 | pytest==6.0.2 7 | httplib2==0.18.1 8 | requests==2.25.1 9 | yapf==0.30.0 10 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bugreport.yml: -------------------------------------------------------------------------------- 1 | name: Bug Report 2 | description: Report a bug building or running ungoogled-chromium 3 | labels: ["bug"] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Before submitting this issue, please confirm if you should submit it to a [platform-specific issue tracker instead](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/SUPPORT.md#platform-specific-support) 9 | 10 | Otherwise, your issue may not be noticed. In addition, please read through the [SUPPORT.md](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/SUPPORT.md) first 11 | - type: dropdown 12 | id: os 13 | attributes: 14 | label: OS/Platform 15 | description: OS/Platform you are running ungoogled-chromium on 16 | options: 17 | - Android 18 | - Arch Linux 19 | - Debian, Ubuntu, and derivatives 20 | - Fedora and CentOS 21 | - Gentoo 22 | - GNU Guix 23 | - macOS 24 | - NixOS 25 | - Other Linux (please specify) 26 | - Portable Linux 27 | - Slackware 28 | - Windows 29 | validations: 30 | required: true 31 | - type: dropdown 32 | id: install 33 | attributes: 34 | label: Installed 35 | description: How was ungoogled-chromium installed on your OS/Platform 36 | options: 37 | - Compiled from source 38 | - OS/Platform's package manager 39 | - Flatpak 40 | - https://ungoogled-software.github.io/ungoogled-chromium-binaries/ 41 | - Other (please use 'Additional context' field below to mention how exactly) 42 | validations: 43 | required: true 44 | - type: input 45 | id: version 46 | attributes: 47 | label: Version 48 | description: ungoogled-chromium version. Could be copied from chrome://settings/help 49 | validations: 50 | required: true 51 | - type: checkboxes 52 | attributes: 53 | label: Have you tested that this is not an upstream issue or an issue with your configuration? 54 | options: 55 | - label: I have tried reproducing this issue in Chrome and it could not be reproduced there 56 | - label: I have tried reproducing this issue in vanilla Chromium and it could not be reproduced there 57 | - label: I have tried reproducing this issue in ungoogled-chromium with a new and empty profile using `--user-data-dir` command line argument and it could not be reproduced there 58 | - type: input 59 | id: description 60 | attributes: 61 | label: Description 62 | description: A clear and concise description (in one line) of what the bug is 63 | validations: 64 | required: true 65 | - type: textarea 66 | id: repro 67 | attributes: 68 | label: How to Reproduce? 69 | description: Steps to reproduce the behaviour 70 | placeholder: | 71 | 1. Go to '...' 72 | 2. Click on '....' 73 | 3. Scroll down to '....' 74 | 4. See error 75 | validations: 76 | required: true 77 | - type: textarea 78 | id: actual 79 | attributes: 80 | label: Actual behaviour 81 | description: A clear and concise description of what happens 82 | validations: 83 | required: true 84 | - type: textarea 85 | id: expected 86 | attributes: 87 | label: Expected behaviour 88 | description: A clear and concise description of what you expected to happen 89 | validations: 90 | required: true 91 | - type: textarea 92 | id: logs 93 | attributes: 94 | label: Relevant log output 95 | description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. 96 | render: sh 97 | - type: textarea 98 | id: additional 99 | attributes: 100 | label: Additional context 101 | description: Add any other context about the problem here. If applicable, add screenshots to help explain your problem. 102 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/create-an--updating-to-chromium-x-x-x-x-.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Create an "Updating to Chromium x.x.x.x" 3 | about: For letting the community track progress to a new stable Chromium 4 | title: Updating to Chromium {{ env.VERSION }} on {{ env.PLATFORM }} 5 | labels: update 6 | assignees: '' 7 | 8 | --- 9 | 10 | Chromium stable channel for {{ env.PLATFORM }} has been updated to a newer version: {{ env.VERSION }}. 11 | 12 | If you are willing to work on updating the patches and lists, please leave a comment in this issue in order to facilitate better coordination and avoid wasted/duplicated efforts. 13 | 14 | If you'd like to increase visibility of your progress or get early feedback/advice, consider creating a [Draft Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests#draft-pull-requests). Finally, make sure to reference this issue in your PR. Please make sure to read [/docs/developing.md](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/docs/developing.md#updating-patches) for guidance. 15 | 16 | Feel free to raise issues or questions throughout the process here. However, please refrain from asking for ETAs unless no visible progress has been made here or in the developer's PR for a while (e.g. 2 weeks). 17 | 18 | {{ env.NOTIFY_MAINTAINERS }} 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | name: Feature request 2 | description: Suggest an idea 3 | labels: ["enhancement", "help wanted"] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Before submitting this feature request, please confirm if you should submit it to a [platform-specific issue tracker instead](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/SUPPORT.md#platform-specific-support) 9 | 10 | Otherwise, your issue may not be noticed. In addition, please read through the [SUPPORT.md](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/SUPPORT.md) first 11 | - type: input 12 | id: description 13 | attributes: 14 | label: Description 15 | description: A clear and concise description (in one line) of what your suggestion is 16 | validations: 17 | required: true 18 | - type: checkboxes 19 | attributes: 20 | label: Who's implementing? 21 | options: 22 | - label: I'm willing to implement this feature myself 23 | - type: textarea 24 | id: prob 25 | attributes: 26 | label: The problem 27 | description: Please describe the problem you are solving or new feature you're suggesting 28 | placeholder: I'm always frustrated when [...] happens 29 | validations: 30 | required: true 31 | - type: textarea 32 | id: sol 33 | attributes: 34 | label: Possible solutions 35 | description: Please describe possible solution(-s) to The Problem 36 | validations: 37 | required: true 38 | - type: textarea 39 | id: alt 40 | attributes: 41 | label: Alternatives 42 | description: Please describe alternatives you've considered, if any 43 | - type: textarea 44 | id: additional 45 | attributes: 46 | label: Additional context 47 | description: Add any other context about the feature request here 48 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | *(Please ensure you have read SUPPORT.md and docs/contributing.md before submitting the Pull Request)* 2 | -------------------------------------------------------------------------------- /.github/workflows/release-on-tag.yml: -------------------------------------------------------------------------------- 1 | name: Create new empty release 2 | 3 | on: 4 | push: 5 | tags: 6 | - '*' 7 | 8 | jobs: 9 | build: 10 | name: Create Release 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Create Release 14 | id: create_release 15 | uses: actions/create-release@latest 16 | env: 17 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 18 | with: 19 | tag_name: ${{ github.ref }} 20 | release_name: ${{ github.ref }} 21 | draft: false 22 | prerelease: false 23 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: 'Close stale issues and PRs' 2 | 3 | on: 4 | schedule: 5 | - cron: '30 1 * * *' 6 | 7 | permissions: 8 | issues: write 9 | pull-requests: write 10 | 11 | jobs: 12 | stale: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/stale@v6 16 | with: 17 | exempt-all-milestones: true 18 | any-of-labels: 'need info' 19 | days-before-stale: 30 20 | days-before-close: 7 21 | stale-issue-message: "This issue has been automatically marked as stale as there has been no recent activity in response to our request for more information. Please respond so that we can proceed with this issue." 22 | close-issue-message: "This issue has been automatically closed as sufficient information hasn't been provided on the issue for further actions to be taken. Feel free to add more information." 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Python files 2 | __pycache__/ 3 | *.py[cod] 4 | 5 | # Python testing files 6 | .coverage 7 | 8 | # Ignore macOS Finder meta 9 | .DS_Store 10 | .tm_properties 11 | 12 | # Ignore optional build / cache directory 13 | /build 14 | -------------------------------------------------------------------------------- /.style.yapf: -------------------------------------------------------------------------------- 1 | [style] 2 | based_on_style = pep8 3 | allow_split_before_dict_value = false 4 | coalesce_brackets = true 5 | column_limit = 100 6 | indent_width = 4 7 | join_multiple_lines = true 8 | spaces_before_comment = 1 9 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @ungoogled-software/core 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2015-2023, The ungoogled-chromium Authors 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | 3. Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /SUPPORT.md: -------------------------------------------------------------------------------- 1 | # Support 2 | 3 | **Before you submit feedback, please ensure you have tried the following**: 4 | 5 | * Read the [FAQ](https://ungoogled-software.github.io/ungoogled-chromium-wiki/faq) 6 | * If you are using a build for an officially-supported platform ([see the list here](docs/platforms.md)), then please refer to the [Platform-specific Support](#platform-specific-support) section first. 7 | * Check if your feedback already exists in the [Issue Tracker](https://github.com/ungoogled-software/ungoogled-chromium/issues) (make sure to search closed issues and use search filters, as applicable) 8 | * If this is a problem, ensure it does *not* occur with regular Chromium or Google Chrome. If it does, then this is *not* a problem with ungoogled-chromium. Instead, please submit your feedback to the [Chromium bug tracker](https://bugs.chromium.org/p/chromium/issues/list) or Google. 9 | * Read the documentation under [docs/](docs/) 10 | 11 | There are a few channels for support: 12 | 13 | * An issue tracker. Issue trackers are the main hubs for discussions and development activity, and thus the primary means of support. They includes problems, suggestions, and questions. If you are using a build for an officially-supported platform ([see the list here](docs/platforms.md)), then please refer to the [Platform-specific Support](#platform-specific-support) section to find its issue tracker. Otherwise, please use [the main issue tracker](https://github.com/ungoogled-software/ungoogled-chromium/issues). 14 | * A chat room. There are two options available: 15 | * [Gitter](https://gitter.im/ungoogled-software/Lobby). It can use your GitHub account as an identity. 16 | * Matrix.org under name `ungoogled-software/lobby`. It has a bidirectional connection with Gitter. 17 | 18 | ## Platform-specific Support 19 | 20 | For officially-supported platforms, **please visit their issue trackers before using the issue tracker in this repository**: 21 | 22 | * Android: [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-android/issues) 23 | * Arch Linux and derivatives (e.g. Manjaro): [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-archlinux/issues) 24 | * Debian & Ubuntu: [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-debian/issues) 25 | * Fedora & CentOS: [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-fedora/issues) 26 | * Flatpak: [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-flatpak/issues) 27 | * Gentoo ([@PF4Public](https://github.com/PF4Public)'s overlay): [Issue tracker](https://github.com/PF4Public/gentoo-overlay/issues?q=is%3Aissue++ungoogled-chromium+) 28 | * macOS: [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-macos/issues) 29 | * Portable Linux: [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-portablelinux/issues) 30 | * Windows: [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-windows/issues) 31 | -------------------------------------------------------------------------------- /chromium_version.txt: -------------------------------------------------------------------------------- 1 | 137.0.7151.55 2 | -------------------------------------------------------------------------------- /devutils/.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | branch = True 3 | parallel = True 4 | omit = tests/* 5 | 6 | [report] 7 | # Regexes for lines to exclude from consideration 8 | exclude_lines = 9 | # Have to re-enable the standard pragma 10 | pragma: no cover 11 | 12 | # Don't complain about missing debug-only code: 13 | def __repr__ 14 | if self\.debug 15 | 16 | # Don't complain if tests don't hit defensive assertion code: 17 | raise AssertionError 18 | raise NotImplementedError 19 | 20 | # Don't complain if non-runnable code isn't run: 21 | if 0: 22 | if __name__ == .__main__.: 23 | -------------------------------------------------------------------------------- /devutils/README.md: -------------------------------------------------------------------------------- 1 | # Developer utilities for ungoogled-chromium 2 | 3 | This is a collection of scripts written for developing on ungoogled-chromium. See the descriptions at the top of each script for more information. 4 | -------------------------------------------------------------------------------- /devutils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ungoogled-software/ungoogled-chromium/76f98dc4eb94681cd0d585854928127233354b08/devutils/__init__.py -------------------------------------------------------------------------------- /devutils/check_all_code.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Wrapper for devutils and utils formatter, linter, and tester 4 | 5 | set -eu 6 | 7 | _root_dir=$(dirname $(dirname $(readlink -f $0))) 8 | cd ${_root_dir}/devutils 9 | 10 | printf '###### utils yapf ######\n' 11 | ./run_utils_yapf.sh 12 | printf '###### utils pylint ######\n' 13 | ./run_utils_pylint.py || ./run_utils_pylint.py --hide-fixme 14 | printf '###### utils tests ######\n' 15 | ./run_utils_tests.sh 16 | 17 | printf '### devutils yapf ######\n' 18 | ./run_devutils_yapf.sh 19 | printf '###### devutils pylint ######\n' 20 | ./run_devutils_pylint.py || ./run_devutils_pylint.py --hide-fixme 21 | printf '###### devutils tests ######\n' 22 | ./run_devutils_tests.sh 23 | -------------------------------------------------------------------------------- /devutils/check_downloads_ini.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: UTF-8 -*- 3 | 4 | # Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved. 5 | # Use of this source code is governed by a BSD-style license that can be 6 | # found in the LICENSE file. 7 | """Run sanity checking algorithms over downloads.ini files 8 | 9 | It checks the following: 10 | 11 | * downloads.ini has the correct format (i.e. conforms to its schema) 12 | 13 | Exit codes: 14 | * 0 if no problems detected 15 | * 1 if warnings or errors occur 16 | """ 17 | 18 | import argparse 19 | import sys 20 | from pathlib import Path 21 | 22 | sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils')) 23 | from downloads import DownloadInfo, schema 24 | sys.path.pop(0) 25 | 26 | 27 | def check_downloads_ini(downloads_ini_iter): 28 | """ 29 | Combines and checks if the the downloads.ini files provided are valid. 30 | 31 | downloads_ini_iter must be an iterable of strings to downloads.ini files. 32 | 33 | Returns True if errors occured, False otherwise. 34 | """ 35 | try: 36 | DownloadInfo(downloads_ini_iter) 37 | except schema.SchemaError: 38 | return True 39 | return False 40 | 41 | 42 | def main(): 43 | """CLI entrypoint""" 44 | 45 | root_dir = Path(__file__).resolve().parent.parent 46 | default_downloads_ini = [str(root_dir / 'downloads.ini')] 47 | 48 | parser = argparse.ArgumentParser(description=__doc__) 49 | parser.add_argument('-d', 50 | '--downloads-ini', 51 | type=Path, 52 | nargs='*', 53 | default=default_downloads_ini, 54 | help='List of downloads.ini files to check. Default: %(default)s') 55 | args = parser.parse_args() 56 | 57 | if check_downloads_ini(args.downloads_ini): 58 | sys.exit(1) 59 | sys.exit(0) 60 | 61 | 62 | if __name__ == '__main__': 63 | main() 64 | -------------------------------------------------------------------------------- /devutils/check_files_exist.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | """ 7 | Checks if files in a list exist. 8 | 9 | Used for quick validation of lists in CI checks. 10 | """ 11 | 12 | import argparse 13 | import sys 14 | from pathlib import Path 15 | 16 | 17 | def main(): 18 | """CLI entrypoint""" 19 | parser = argparse.ArgumentParser(description=__doc__) 20 | parser.add_argument('root_dir', type=Path, help='The directory to check from') 21 | parser.add_argument('input_files', type=Path, nargs='+', help='The files lists to check') 22 | args = parser.parse_args() 23 | 24 | for input_name in args.input_files: 25 | file_iter = filter( 26 | len, map(str.strip, 27 | Path(input_name).read_text(encoding='UTF-8').splitlines())) 28 | for file_name in file_iter: 29 | if not Path(args.root_dir, file_name).exists(): 30 | print('ERROR: Path "{}" from file "{}" does not exist.'.format( 31 | file_name, input_name), 32 | file=sys.stderr) 33 | sys.exit(1) 34 | 35 | 36 | if __name__ == "__main__": 37 | main() 38 | -------------------------------------------------------------------------------- /devutils/check_gn_flags.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: UTF-8 -*- 3 | 4 | # Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved. 5 | # Use of this source code is governed by a BSD-style license that can be 6 | # found in the LICENSE file. 7 | """Run sanity checking algorithms over GN flags 8 | 9 | It checks the following: 10 | 11 | * GN flags in flags.gn are sorted and not duplicated 12 | 13 | Exit codes: 14 | * 0 if no problems detected 15 | * 1 if warnings or errors occur 16 | """ 17 | 18 | import argparse 19 | import sys 20 | from pathlib import Path 21 | 22 | sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils')) 23 | from _common import ENCODING, get_logger 24 | sys.path.pop(0) 25 | 26 | 27 | def check_gn_flags(gn_flags_path): 28 | """ 29 | Checks if GN flags are sorted and not duplicated. 30 | 31 | gn_flags_path is a pathlib.Path to the GN flags file to check 32 | 33 | Returns True if warnings were logged; False otherwise 34 | """ 35 | keys_seen = set() 36 | warnings = False 37 | with gn_flags_path.open(encoding=ENCODING) as file_obj: 38 | iterator = iter(file_obj.read().splitlines()) 39 | try: 40 | previous = next(iterator) 41 | except StopIteration: 42 | return warnings 43 | for current in iterator: 44 | gn_key = current.split('=')[0] 45 | if gn_key in keys_seen: 46 | get_logger().warning('In GN flags %s, "%s" appears at least twice', gn_flags_path, 47 | gn_key) 48 | warnings = True 49 | else: 50 | keys_seen.add(gn_key) 51 | if current < previous: 52 | get_logger().warning('In GN flags %s, "%s" should be sorted before "%s"', gn_flags_path, 53 | current, previous) 54 | warnings = True 55 | previous = current 56 | return warnings 57 | 58 | 59 | def main(): 60 | """CLI entrypoint""" 61 | 62 | root_dir = Path(__file__).resolve().parent.parent 63 | default_flags_gn = root_dir / 'flags.gn' 64 | 65 | parser = argparse.ArgumentParser(description=__doc__) 66 | parser.add_argument('-f', 67 | '--flags-gn', 68 | type=Path, 69 | default=default_flags_gn, 70 | help='Path to the GN flags to use. Default: %(default)s') 71 | args = parser.parse_args() 72 | 73 | if check_gn_flags(args.flags_gn): 74 | sys.exit(1) 75 | sys.exit(0) 76 | 77 | 78 | if __name__ == '__main__': 79 | main() 80 | -------------------------------------------------------------------------------- /devutils/print_tag_version.sh: -------------------------------------------------------------------------------- 1 | _root_dir=$(dirname $(dirname $(readlink -f $0))) 2 | printf '%s-%s' $(cat $_root_dir/chromium_version.txt) $(cat $_root_dir/revision.txt) 3 | -------------------------------------------------------------------------------- /devutils/pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | testpaths = tests 3 | #filterwarnings = 4 | # error 5 | # ignore::DeprecationWarning 6 | #addopts = --cov-report term-missing --hypothesis-show-statistics -p no:warnings 7 | # Live logging 8 | #log_cli=true 9 | #log_level=DEBUG 10 | addopts = -capture=all --cov=. --cov-config=.coveragerc --cov-report term-missing -p no:warnings 11 | -------------------------------------------------------------------------------- /devutils/run_devutils_pylint.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | """Run Pylint over devutils""" 7 | 8 | import argparse 9 | import sys 10 | from pathlib import Path 11 | 12 | from run_other_pylint import ChangeDir, run_pylint 13 | 14 | 15 | def main(): 16 | """CLI entrypoint""" 17 | parser = argparse.ArgumentParser(description='Run Pylint over devutils') 18 | parser.add_argument('--hide-fixme', action='store_true', help='Hide "fixme" Pylint warnings.') 19 | parser.add_argument('--show-locally-disabled', 20 | action='store_true', 21 | help='Show "locally-disabled" Pylint warnings.') 22 | args = parser.parse_args() 23 | 24 | disables = [ 25 | 'wrong-import-position', 26 | 'bad-continuation', 27 | 'duplicate-code', 28 | ] 29 | 30 | if args.hide_fixme: 31 | disables.append('fixme') 32 | if not args.show_locally_disabled: 33 | disables.append('locally-disabled') 34 | 35 | pylint_options = [ 36 | '--disable={}'.format(','.join(disables)), 37 | '--jobs=4', 38 | '--score=n', 39 | '--persistent=n', 40 | ] 41 | 42 | ignore_prefixes = [ 43 | ('third_party', ), 44 | ] 45 | 46 | sys.path.insert(1, str(Path(__file__).resolve().parent.parent / 'utils')) 47 | sys.path.insert(2, str(Path(__file__).resolve().parent.parent / 'devutils' / 'third_party')) 48 | with ChangeDir(Path(__file__).parent): 49 | result = run_pylint( 50 | Path(), 51 | pylint_options, 52 | ignore_prefixes=ignore_prefixes, 53 | ) 54 | sys.path.pop(2) 55 | sys.path.pop(1) 56 | if not result: 57 | sys.exit(1) 58 | sys.exit(0) 59 | 60 | 61 | if __name__ == '__main__': 62 | main() 63 | -------------------------------------------------------------------------------- /devutils/run_devutils_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | _root_dir=$(dirname $(dirname $(readlink -f $0))) 6 | cd ${_root_dir}/devutils 7 | python3 -m pytest -c ${_root_dir}/devutils/pytest.ini 8 | -------------------------------------------------------------------------------- /devutils/run_devutils_yapf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | _current_dir=$(dirname $(readlink -f $0)) 6 | _root_dir=$(dirname $_current_dir) 7 | python3 -m yapf --style "$_root_dir/.style.yapf" -e '*/third_party/*' -rpi "$_current_dir" 8 | -------------------------------------------------------------------------------- /devutils/run_other_pylint.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | """Run Pylint over any module""" 7 | 8 | import argparse 9 | import os 10 | import shutil 11 | import sys 12 | from pathlib import Path 13 | 14 | from pylint import lint 15 | 16 | 17 | class ChangeDir: 18 | """ 19 | Changes directory to path in with statement 20 | """ 21 | def __init__(self, path): 22 | self._path = path 23 | self._orig_path = os.getcwd() 24 | 25 | def __enter__(self): 26 | os.chdir(str(self._path)) 27 | 28 | def __exit__(self, *_): 29 | os.chdir(self._orig_path) 30 | 31 | 32 | def run_pylint(module_path, pylint_options, ignore_prefixes=tuple()): 33 | """Runs Pylint. Returns a boolean indicating success""" 34 | pylint_stats = Path('/run/user/{}/pylint_stats'.format(os.getuid())) 35 | if not pylint_stats.parent.is_dir(): #pylint: disable=no-member 36 | pylint_stats = Path('/run/shm/pylint_stats') 37 | os.environ['PYLINTHOME'] = str(pylint_stats) 38 | 39 | input_paths = list() 40 | if not module_path.exists(): 41 | print('ERROR: Cannot find', module_path) 42 | sys.exit(1) 43 | if module_path.is_dir(): 44 | for path in module_path.rglob('*.py'): 45 | ignore_matched = False 46 | for prefix in ignore_prefixes: 47 | if path.parts[:len(prefix)] == prefix: 48 | ignore_matched = True 49 | break 50 | if ignore_matched: 51 | continue 52 | input_paths.append(str(path)) 53 | else: 54 | input_paths.append(str(module_path)) 55 | runner = lint.Run((*input_paths, *pylint_options), do_exit=False) 56 | 57 | if pylint_stats.is_dir(): 58 | shutil.rmtree(str(pylint_stats)) 59 | 60 | if runner.linter.msg_status != 0: 61 | print('WARNING: Non-zero exit status:', runner.linter.msg_status) 62 | return False 63 | return True 64 | 65 | 66 | def main(): 67 | """CLI entrypoint""" 68 | 69 | parser = argparse.ArgumentParser(description='Run Pylint over arbitrary module') 70 | parser.add_argument('--hide-fixme', action='store_true', help='Hide "fixme" Pylint warnings.') 71 | parser.add_argument('--show-locally-disabled', 72 | action='store_true', 73 | help='Show "locally-disabled" Pylint warnings.') 74 | parser.add_argument('module_path', type=Path, help='Path to the module to check') 75 | args = parser.parse_args() 76 | 77 | if not args.module_path.exists(): 78 | print('ERROR: Module path "{}" does not exist'.format(args.module_path)) 79 | sys.exit(1) 80 | 81 | disables = [ 82 | 'wrong-import-position', 83 | 'bad-continuation', 84 | ] 85 | 86 | if args.hide_fixme: 87 | disables.append('fixme') 88 | if not args.show_locally_disabled: 89 | disables.append('locally-disabled') 90 | 91 | pylint_options = [ 92 | '--disable={}'.format(','.join(disables)), 93 | '--jobs=4', 94 | '--score=n', 95 | '--persistent=n', 96 | ] 97 | 98 | if not run_pylint(args.module_path, pylint_options): 99 | sys.exit(1) 100 | sys.exit(0) 101 | 102 | 103 | if __name__ == '__main__': 104 | main() 105 | -------------------------------------------------------------------------------- /devutils/run_other_yapf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | python3 -m yapf --style "$(dirname $(readlink -f $0))/.style.yapf" -rpi $@ 6 | -------------------------------------------------------------------------------- /devutils/run_utils_pylint.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | """Run Pylint over utils""" 7 | 8 | import argparse 9 | import sys 10 | from pathlib import Path 11 | 12 | from run_other_pylint import ChangeDir, run_pylint 13 | 14 | 15 | def main(): 16 | """CLI entrypoint""" 17 | parser = argparse.ArgumentParser(description='Run Pylint over utils') 18 | parser.add_argument('--hide-fixme', action='store_true', help='Hide "fixme" Pylint warnings.') 19 | parser.add_argument('--show-locally-disabled', 20 | action='store_true', 21 | help='Show "locally-disabled" Pylint warnings.') 22 | args = parser.parse_args() 23 | 24 | disable = ['bad-continuation'] 25 | 26 | if args.hide_fixme: 27 | disable.append('fixme') 28 | if not args.show_locally_disabled: 29 | disable.append('locally-disabled') 30 | 31 | pylint_options = [ 32 | '--disable={}'.format(','.join(disable)), 33 | '--jobs=4', 34 | '--max-args=7', 35 | '--score=n', 36 | '--persistent=n', 37 | ] 38 | 39 | ignore_prefixes = [ 40 | ('third_party', ), 41 | ('tests', ), 42 | ] 43 | 44 | sys.path.insert(1, str(Path(__file__).resolve().parent.parent / 'utils' / 'third_party')) 45 | sys.path.append(Path(__file__).resolve().parent.parent / 'utils') 46 | with ChangeDir(Path(__file__).resolve().parent.parent / 'utils'): 47 | result = run_pylint( 48 | Path(), 49 | pylint_options, 50 | ignore_prefixes=ignore_prefixes, 51 | ) 52 | sys.path.pop(1) 53 | if not result: 54 | sys.exit(1) 55 | sys.exit(0) 56 | 57 | 58 | if __name__ == '__main__': 59 | main() 60 | -------------------------------------------------------------------------------- /devutils/run_utils_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | _root_dir=$(dirname $(dirname $(readlink -f $0))) 6 | cd ${_root_dir}/utils 7 | python3 -m pytest -c ${_root_dir}/utils/pytest.ini 8 | -------------------------------------------------------------------------------- /devutils/run_utils_yapf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | _root_dir=$(dirname $(dirname $(readlink -f $0))) 6 | python3 -m yapf --style "$_root_dir/.style.yapf" -e '*/third_party/*' -rpi "$_root_dir/utils" 7 | -------------------------------------------------------------------------------- /devutils/set_quilt_vars.fish: -------------------------------------------------------------------------------- 1 | #!/bin/fish 2 | 3 | # Fish variant of set_quilt_vars.sh 4 | 5 | alias quilt='quilt --quiltrc -' 6 | 7 | set REPO_ROOT (dirname (dirname (readlink -f (status current-filename)))) 8 | 9 | set -gx QUILT_PATCHES "$REPO_ROOT/patches" 10 | 11 | set -gx QUILT_PUSH_ARGS "--color=auto" 12 | set -gx QUILT_DIFF_OPTS "--show-c-function" 13 | set -gx QUILT_PATCH_OPTS "--unified --reject-format=unified" 14 | set -gx QUILT_DIFF_ARGS "-p ab --no-timestamps --no-index --color=auto --sort" 15 | set -gx QUILT_REFRESH_ARGS "-p ab --no-timestamps --no-index --sort --strip-trailing-whitespace" 16 | set -gx QUILT_COLORS "diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33" 17 | set -gx QUILT_SERIES_ARGS "--color=auto" 18 | set -gx QUILT_PATCHES_ARGS "--color=auto" 19 | 20 | set -gx LC_ALL C 21 | -------------------------------------------------------------------------------- /devutils/set_quilt_vars.sh: -------------------------------------------------------------------------------- 1 | # Sets quilt variables for updating the patches 2 | # Make sure to run this with the shell command "source" in order to inherit the variables into the interactive environment 3 | 4 | # There is some problem with the absolute paths in QUILT_PATCHES and QUILT_SERIES breaking quilt 5 | # (refresh and diff don't read QUILT_*_ARGS, and series displays absolute paths instead of relative) 6 | # Specifying a quiltrc file fixes this, so "--quiltrc -" fixes this too. 7 | # One side effect of '--quiltrc -' is that we lose default settings from /etc/quilt.quiltrc, so they are redefined below. 8 | alias quilt='quilt --quiltrc -' 9 | 10 | # Assume this script lives within the repository 11 | REPO_ROOT=$(dirname "$(dirname "$(readlink -f "${BASH_SOURCE[0]:-${(%):-%x}}")")") 12 | 13 | export QUILT_PATCHES="$REPO_ROOT/patches" 14 | #export QUILT_SERIES=$(readlink -f "$REPO_ROOT/patches/series") 15 | 16 | # Options below borrowed from Debian and default quilt options (from /etc/quilt.quiltrc on Debian) 17 | export QUILT_PUSH_ARGS="--color=auto" 18 | export QUILT_DIFF_OPTS="--show-c-function" 19 | export QUILT_PATCH_OPTS="--unified --reject-format=unified" 20 | export QUILT_DIFF_ARGS="-p ab --no-timestamps --no-index --color=auto --sort" 21 | export QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index --sort --strip-trailing-whitespace" 22 | export QUILT_COLORS="diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33" 23 | export QUILT_SERIES_ARGS="--color=auto" 24 | export QUILT_PATCHES_ARGS="--color=auto" 25 | 26 | export LC_ALL=C 27 | # When non-default less options are used, add the -R option so that less outputs 28 | # ANSI color escape codes "raw". 29 | [ -n "$LESS" -a -z "${QUILT_PAGER+x}" ] && export QUILT_PAGER="less -FRX" 30 | -------------------------------------------------------------------------------- /devutils/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ungoogled-software/ungoogled-chromium/76f98dc4eb94681cd0d585854928127233354b08/devutils/tests/__init__.py -------------------------------------------------------------------------------- /devutils/tests/test_check_patch_files.py: -------------------------------------------------------------------------------- 1 | # -*- coding: UTF-8 -*- 2 | 3 | # Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | """Test check_patch_files.py""" 7 | 8 | import logging 9 | import tempfile 10 | import sys 11 | from pathlib import Path 12 | 13 | sys.path.insert(0, str(Path(__file__).resolve().parent.parent.parent / 'utils')) 14 | from _common import get_logger, set_logging_level 15 | sys.path.pop(0) 16 | 17 | sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) 18 | from check_patch_files import check_series_duplicates 19 | sys.path.pop(0) 20 | 21 | 22 | def test_check_series_duplicates(): 23 | """Test check_series_duplicates""" 24 | 25 | set_logging_level(logging.DEBUG) 26 | 27 | with tempfile.TemporaryDirectory() as tmpdirname: 28 | patches_dir = Path(tmpdirname) 29 | series_path = Path(tmpdirname, 'series') 30 | 31 | get_logger().info('Check no duplicates') 32 | series_path.write_text('\n'.join([ 33 | 'a.patch', 34 | 'b.patch', 35 | 'c.patch', 36 | ])) 37 | assert not check_series_duplicates(patches_dir) 38 | 39 | get_logger().info('Check duplicates') 40 | series_path.write_text('\n'.join([ 41 | 'a.patch', 42 | 'b.patch', 43 | 'c.patch', 44 | 'a.patch', 45 | ])) 46 | assert check_series_duplicates(patches_dir) 47 | 48 | 49 | if __name__ == '__main__': 50 | test_check_series_duplicates() 51 | -------------------------------------------------------------------------------- /devutils/tests/test_validate_patches.py: -------------------------------------------------------------------------------- 1 | # -*- coding: UTF-8 -*- 2 | 3 | # Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | """Test validate_patches.py""" 7 | 8 | import logging 9 | import tempfile 10 | import sys 11 | from pathlib import Path 12 | 13 | sys.path.insert(0, str(Path(__file__).resolve().parent.parent.parent / 'utils')) 14 | from _common import get_logger, set_logging_level 15 | sys.path.pop(0) 16 | 17 | sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) 18 | import validate_patches 19 | sys.path.pop(0) 20 | 21 | 22 | def test_test_patches(): 23 | """Test _dry_check_patched_file""" 24 | 25 | #pylint: disable=protected-access 26 | set_logging_level(logging.DEBUG) 27 | 28 | orig_file_content = """bye world""" 29 | series_iter = ['test.patch'] 30 | 31 | def _run_test_patches(patch_content): 32 | with tempfile.TemporaryDirectory() as tmpdirname: 33 | Path(tmpdirname, 'foobar.txt').write_text(orig_file_content) 34 | Path(tmpdirname, 'test.patch').write_text(patch_content) 35 | _, patch_cache = validate_patches._load_all_patches(series_iter, Path(tmpdirname)) 36 | required_files = validate_patches._get_required_files(patch_cache) 37 | files_under_test = validate_patches._retrieve_local_files(required_files, 38 | Path(tmpdirname)) 39 | return validate_patches._test_patches(series_iter, patch_cache, files_under_test) 40 | 41 | get_logger().info('Check valid modification') 42 | patch_content = """--- a/foobar.txt 43 | +++ b/foobar.txt 44 | @@ -1 +1 @@ 45 | -bye world 46 | +hello world 47 | """ 48 | assert not _run_test_patches(patch_content) 49 | 50 | get_logger().info('Check invalid modification') 51 | patch_content = """--- a/foobar.txt 52 | +++ b/foobar.txt 53 | @@ -1 +1 @@ 54 | -hello world 55 | +olleh world 56 | """ 57 | assert _run_test_patches(patch_content) 58 | 59 | get_logger().info('Check correct removal') 60 | patch_content = """--- a/foobar.txt 61 | +++ /dev/null 62 | @@ -1 +0,0 @@ 63 | -bye world 64 | """ 65 | assert not _run_test_patches(patch_content) 66 | 67 | get_logger().info('Check incorrect removal') 68 | patch_content = """--- a/foobar.txt 69 | +++ /dev/null 70 | @@ -1 +0,0 @@ 71 | -this line does not exist in foobar 72 | """ 73 | assert _run_test_patches(patch_content) 74 | 75 | 76 | if __name__ == '__main__': 77 | test_test_patches() 78 | -------------------------------------------------------------------------------- /devutils/third_party/README.md: -------------------------------------------------------------------------------- 1 | This directory contains third-party libraries used by devutils. 2 | 3 | Contents: 4 | 5 | * [python-unidiff](https://github.com/matiasb/python-unidiff) 6 | * For parsing and modifying unified diffs. 7 | -------------------------------------------------------------------------------- /devutils/third_party/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ungoogled-software/ungoogled-chromium/76f98dc4eb94681cd0d585854928127233354b08/devutils/third_party/__init__.py -------------------------------------------------------------------------------- /devutils/third_party/unidiff/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # The MIT License (MIT) 4 | # Copyright (c) 2014-2017 Matias Bordese 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in 14 | # all copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 20 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 21 | # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 22 | # OR OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | 25 | """Unidiff parsing library.""" 26 | 27 | from __future__ import unicode_literals 28 | 29 | from . import __version__ 30 | from .patch import ( 31 | DEFAULT_ENCODING, 32 | LINE_TYPE_ADDED, 33 | LINE_TYPE_CONTEXT, 34 | LINE_TYPE_REMOVED, 35 | Hunk, 36 | PatchedFile, 37 | PatchSet, 38 | UnidiffParseError, 39 | ) 40 | 41 | VERSION = __version__.__version__ 42 | -------------------------------------------------------------------------------- /devutils/third_party/unidiff/__version__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # The MIT License (MIT) 4 | # Copyright (c) 2014-2017 Matias Bordese 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in 14 | # all copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 20 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 21 | # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 22 | # OR OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | __version__ = '0.5.5' 25 | -------------------------------------------------------------------------------- /devutils/third_party/unidiff/constants.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # The MIT License (MIT) 4 | # Copyright (c) 2014-2017 Matias Bordese 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in 14 | # all copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 20 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 21 | # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 22 | # OR OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | 25 | """Useful constants and regexes used by the package.""" 26 | 27 | from __future__ import unicode_literals 28 | 29 | import re 30 | 31 | 32 | RE_SOURCE_FILENAME = re.compile( 33 | r'^--- (?P[^\t\n]+)(?:\t(?P[^\n]+))?') 34 | RE_TARGET_FILENAME = re.compile( 35 | r'^\+\+\+ (?P[^\t\n]+)(?:\t(?P[^\n]+))?') 36 | 37 | # @@ (source offset, length) (target offset, length) @@ (section header) 38 | RE_HUNK_HEADER = re.compile( 39 | r"^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))?\ @@[ ]?(.*)") 40 | 41 | # kept line (context) 42 | # \n empty line (treat like context) 43 | # + added line 44 | # - deleted line 45 | # \ No newline case 46 | RE_HUNK_BODY_LINE = re.compile( 47 | r'^(?P[- \+\\])(?P.*)', re.DOTALL) 48 | RE_HUNK_EMPTY_BODY_LINE = re.compile( 49 | r'^(?P[- \+\\]?)(?P[\r\n]{1,2})', re.DOTALL) 50 | 51 | RE_NO_NEWLINE_MARKER = re.compile(r'^\\ No newline at end of file') 52 | 53 | DEFAULT_ENCODING = 'UTF-8' 54 | 55 | LINE_TYPE_ADDED = '+' 56 | LINE_TYPE_REMOVED = '-' 57 | LINE_TYPE_CONTEXT = ' ' 58 | LINE_TYPE_EMPTY = '' 59 | LINE_TYPE_NO_NEWLINE = '\\' 60 | LINE_VALUE_NO_NEWLINE = ' No newline at end of file' 61 | -------------------------------------------------------------------------------- /devutils/third_party/unidiff/errors.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # The MIT License (MIT) 4 | # Copyright (c) 2014-2017 Matias Bordese 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in 14 | # all copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 20 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 21 | # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 22 | # OR OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | 25 | """Errors and exceptions raised by the package.""" 26 | 27 | from __future__ import unicode_literals 28 | 29 | 30 | class UnidiffParseError(Exception): 31 | """Exception when parsing the unified diff data.""" 32 | -------------------------------------------------------------------------------- /devutils/validate_config.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: UTF-8 -*- 3 | 4 | # Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved. 5 | # Use of this source code is governed by a BSD-style license that can be 6 | # found in the LICENSE file. 7 | """Run sanity checking algorithms over ungoogled-chromium's config files 8 | 9 | NOTE: This script is hardcoded to run over ungoogled-chromium's config files only. 10 | To check other files, use the other scripts imported by this script. 11 | 12 | It checks the following: 13 | 14 | * All patches exist 15 | * All patches are referenced by the patch order 16 | * Each patch is used only once 17 | * GN flags in flags.gn are sorted and not duplicated 18 | * downloads.ini has the correct format (i.e. conforms to its schema) 19 | 20 | Exit codes: 21 | * 0 if no problems detected 22 | * 1 if warnings or errors occur 23 | """ 24 | 25 | import sys 26 | from pathlib import Path 27 | 28 | from check_downloads_ini import check_downloads_ini 29 | from check_gn_flags import check_gn_flags 30 | from check_patch_files import (check_patch_readability, check_series_duplicates, 31 | check_unused_patches) 32 | 33 | 34 | def main(): 35 | """CLI entrypoint""" 36 | 37 | warnings = False 38 | root_dir = Path(__file__).resolve().parent.parent 39 | patches_dir = root_dir / 'patches' 40 | 41 | # Check patches 42 | warnings |= check_patch_readability(patches_dir) 43 | warnings |= check_series_duplicates(patches_dir) 44 | warnings |= check_unused_patches(patches_dir) 45 | 46 | # Check GN flags 47 | warnings |= check_gn_flags(root_dir / 'flags.gn') 48 | 49 | # Check downloads.ini 50 | warnings |= check_downloads_ini([root_dir / 'downloads.ini']) 51 | 52 | if warnings: 53 | sys.exit(1) 54 | sys.exit(0) 55 | 56 | 57 | if __name__ == '__main__': 58 | if sys.argv[1:]: 59 | print(__doc__) 60 | else: 61 | main() 62 | -------------------------------------------------------------------------------- /docs/building.md: -------------------------------------------------------------------------------- 1 | # Building ungoogled-chromium 2 | 3 | The recommended way to build ungoogled-chromium is by consulting [the repository for your supported platform (links here)](platforms.md). 4 | 5 | * *Linux users*: If your distribution is not listed, you will need to use Portable Linux. 6 | 7 | If you want to add ungoogled-chromium to your existing Chromium build process, see the next section. Additionally, you may reference the repositories for supported platforms for inspiration. 8 | 9 | ## Integrating ungoogled-chromium into your Chromium build process 10 | 11 | Typically, ungoogled-chromium is built from [code in platform-specific repositories](platforms.md). However, ungoogled-chromium can also be included in part or in whole into any custom Chromium build. In this section, **we will assume you already have a process to make your own Chromium builds**. 12 | 13 | **NOTE**: You may need additional patches and/or build configuration for [your supported platform](platforms.md) because this repository does not contain all the code necessary for all platforms. 14 | 15 | Before continuing, you may find it helpful to have a look through [the design documentation](design.md). 16 | 17 | The following procedure outline the essential steps to build Chromium will all of ungoogled-chromium's features. **They are not sufficient to build ungoogled-chromium on their own**. 18 | 19 | 1. Ensure Chromium is downloaded, such as by `depot_tools`. In most of our supported platforms, we instead use a custom tool to do this. 20 | 21 | ```sh 22 | mkdir -p build/download_cache 23 | ./utils/downloads.py retrieve -c build/download_cache -i downloads.ini 24 | ./utils/downloads.py unpack -c build/download_cache -i downloads.ini -- build/src 25 | ``` 26 | 27 | 2. Prune binaries 28 | 29 | ```sh 30 | ./utils/prune_binaries.py build/src pruning.list 31 | ``` 32 | 33 | 3. Apply patches 34 | 35 | ```sh 36 | ./utils/patches.py apply build/src patches 37 | ``` 38 | 39 | 4. Substitute domains 40 | 41 | ```sh 42 | ./utils/domain_substitution.py apply -r domain_regex.list -f domain_substitution.list -c build/domsubcache.tar.gz build/src 43 | ``` 44 | 45 | 5. Build GN. If you are using `depot_tools` to checkout Chromium or you already have a GN binary, you should skip this step. 46 | 47 | ```sh 48 | mkdir -p build/src/out/Default 49 | cd build/src 50 | ./tools/gn/bootstrap/bootstrap.py --skip-generate-buildfiles -j4 -o out/Default/ 51 | ``` 52 | 53 | 6. Invoke the build: 54 | 55 | ``` 56 | mkdir -p build/src/out/Default 57 | # NOTE: flags.gn contains only a subset of what is needed to run the build. 58 | cp flags.gn build/src/out/Default/args.gn 59 | cd build/src 60 | # If you have additional GN flags to add, make sure to add them now. 61 | ./out/Default/gn gen out/Default --fail-on-unused-args 62 | ninja -C out/Default chrome chromedriver chrome_sandbox 63 | ``` 64 | 65 | ## Building FAQ 66 | 67 | ### My build keeps crashing because I run out of RAM! How can I fix it? 68 | 69 | Here are several ways to address this, in decreasing order of preference: 70 | 71 | 1. Decrease the number of parallel threads to Ninja (the `-j` flag) 72 | 2. Add swap space 73 | -------------------------------------------------------------------------------- /docs/contributing.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This document contains our criteria and guidelines for contributing to ungoogled-chromium. 4 | 5 | If you have **small contributions that don't fit our criteria**, consider adding them to [ungoogled-software/contrib](https://github.com/ungoogled-software/contrib) or [our Wiki](https://github.com/ungoogled-software/ungoogled-chromium-wiki) instead. 6 | 7 | If you are a developer of an **officially-supported platform**, be sure to check out the [Platform Repository Standards and Guidelines](repo_management.md). 8 | 9 | List of contents: 10 | 11 | * [How to help](#how-to-help) 12 | * [Submitting changes](#submitting-changes) 13 | * [Criteria for new features](#criteria-for-new-features) 14 | 15 | ### How to help 16 | 17 | Generally, ungoogled-chromium needs contributors to help: 18 | 19 | * Keep up-to-date with the latest stable Chromium, and any problematic changes in the new version that needs modification. 20 | * Help with issues marked with the `help wanted` tag (usually either questions for other users, or request for help from other developers) 21 | * Review Pull Requests from other contributors 22 | * Implement feature requests ("enhancements" in the Issue Tracker), large or small. 23 | * Implement issues marked with the `backlog` tag (that are closed). 24 | * If it requires new code, please read through the [Submitting changes](#submitting-changes) section below. 25 | 26 | In addition, anyone is free to help others in need of support in the Issue Tracker. 27 | 28 | If there are fixes, tweaks, or additions you want to make, continue onto the following section. 29 | 30 | ### Submitting changes 31 | 32 | Please submit all changes via Pull Requests. 33 | 34 | Guidelines: 35 | 36 | * You are welcome to submit minor changes, such as bug fixes, documentation fixes, and tweaks. 37 | * If your change has an associated issue, please let others know that you are working on it. 38 | * If you want to submit a new feature, please read through the [Criteria for new features](#criteria-for-new-features) below. 39 | * When in doubt about the acceptance of a change, you are welcome to ask via an issue first. 40 | 41 | ### Criteria for new features 42 | 43 | 1. New features should not detract from the default Chromium experience, unless it falls under the project's main objectives (i.e. removing Google integration and enhancing privacy). 44 | 45 | * For larger features, please propose them via an issue first. 46 | 47 | 2. New features should live behind a setting that is **off by default**. 48 | 49 | * Settings are usually added via a command-line flag and `chrome://flags` entries. See [the relevant section in docs/developing.md](developing.md#adding-command-line-flags-and-chromeflags-options) for more information. 50 | * Unless there are significant benefits, adding the setting to `chrome://settings` is *not recommended* due to the additional maintenance required (caused by the infrastructure that backs preferences). 51 | 52 | **NOTE**: In the event that the codebase changes significantly for a non-essential patch (i.e. a patch that does not contribute to the main objectives of ungoogled-chromium), it will be removed until someone updates it. 53 | -------------------------------------------------------------------------------- /docs/default_settings.md: -------------------------------------------------------------------------------- 1 | # Default Settings 2 | 3 | Vanilla Chromium settings are not often changed by ungoogled-chromium, however there are some exceptions. 4 | Below is a list of the documented changes to the default Chromium settings. 5 | 6 | Setting | New State | Location 7 | -- | -- | -- 8 | Allow sites to check if you have payment methods saved | Disabled | chrome://settings/payments 9 | Ask where to save each file before downloading | Enabled | chrome://settings/downloads 10 | Auto sign-in | Disabled | chrome://settings/passwords 11 | Block third-party cookies | Enabled | chrome://settings/cookies 12 | Continue running background apps when Chromium is closed | Disabled | chrome://settings/system 13 | Hyperlink auditing (\) | Disabled | NA 14 | Link Doctor | Disabled | NA 15 | Offer to save passwords | Disabled | chrome://settings/passwords 16 | Payment autofill | Disabled | chrome://settings/payments 17 | Preload pages | Disabled | chrome://settings/cookies 18 | Search suggestions | Disabled | chrome://settings/syncSetup 19 | Show bookmark bar | Enabled | chrome://settings/appearance 20 | WebRTC IP handling policy | Disable Non-Proxied UDP | `--webrtc-ip-handling-policy` 21 | -------------------------------------------------------------------------------- /docs/platforms.md: -------------------------------------------------------------------------------- 1 | # Supported Platforms 2 | 3 | This page lists platforms officially supported by ungoogled-chromium, and their associated repositories. 4 | 5 | * Android: [ungoogled-chromium-android](https://github.com/ungoogled-software/ungoogled-chromium-android) 6 | * Arch Linux: [ungoogled-chromium-archlinux](https://github.com/ungoogled-software/ungoogled-chromium-archlinux) 7 | * Debian, Ubuntu, and derivatives: [ungoogled-chromium-debian](https://github.com/ungoogled-software/ungoogled-chromium-debian) 8 | * Fedora and CentOS: [ungoogled-chromium-fedora](https://github.com/ungoogled-software/ungoogled-chromium-fedora) 9 | * Portable Linux (for any Linux distro): [ungoogled-chromium-portablelinux](https://github.com/ungoogled-software/ungoogled-chromium-portablelinux) 10 | * Windows: [ungoogled-chromium-windows](https://github.com/ungoogled-software/ungoogled-chromium-windows) 11 | * macOS: [ungoogled-chromium-macos](https://github.com/ungoogled-software/ungoogled-chromium-macos) 12 | -------------------------------------------------------------------------------- /docs/repo_management.md: -------------------------------------------------------------------------------- 1 | # Platform Repository Standards and Guidelines 2 | 3 | *This document is new, and its structure and content may change. If you have suggestions, please create an issue!* 4 | 5 | ungoogled-chromium is comprised of anonymous developers who volunteer their efforts. Some of these developers may choose to provide long-term support for [an officially-supported platform](platforms.md), or bring support to a new platform. For such developers, this document consists of standards and management guidelines for platform repos. 6 | 7 | We will refer to this git repository as "the main repo", and refer to repositories that add platform-specific code to build ungoogled-chromium as "platform repos". An "officially-supported platform" is a platform with a platform repo in [the ungoogled-software organization](https://github.com/ungoogled-software) and noted in [docs/platforms.md](platforms.md). 8 | 9 | ## Standards 10 | 11 | An officially-supported platform repo: 12 | 13 | * Must not modify or remove existing patches, GN flags, domain substitution, or binary pruning in the main repo. Instead, you can add new patches or add more files/rules to domain substitution or binary pruning. (If you think a change is needed in the main repo, please make an issue!) 14 | * Must have a tagging/versioning scheme that includes the ungoogled-chromium version. 15 | * Must not require an Internet connection during compilation (before compilation is OK). 16 | * Should allow the user to download all build requirements before building. 17 | * Must not require external services to build, aside from repos in the ungoogled-software organization and repos provided by or used by Chromium. 18 | * Should have a reproducible build for all versions (currently, there is no formal process to enforce/verify reproducibility of binaries) 19 | 20 | Each deviation must be clearly noted in the platform repo's documentation (such as the repo's README), and have an associated issue in the platform repo. 21 | 22 | ## Teams in the ungoogled-software organization 23 | 24 | Each officially-supported platform has one or more teams in the ungoogled-software organization. These teams provide additional means for collaborating with other developers, such as issue triaging and private discussions (see section "How to communicate" below). 25 | 26 | If you are a regular contributor and would like to provide long-term support for a platform, you can request to be included in the ungoogled-software organization team for your platform. Since the number of developers is low, there is no formal process to do this; just ask in an issue. 27 | 28 | ## How to communicate 29 | 30 | In the interest of transparency, it is recommended to discuss work in public spaces like issues or PRs. If a discussion should not involve outsiders, you can lock the issue or PR to collaborators only. 31 | 32 | You must use team discussions if you are discussing or sharing information that can affect the security of the repository. Otherwise, you may use team discussions at your discretion. 33 | 34 | ## Issues 35 | 36 | Each platform repo should have a team in ungoogled-software with the Triage permission level. All members should feel free to manage issues. 37 | 38 | TODO: More details? 39 | 40 | ## Pull Requests 41 | 42 | TODO 43 | 44 | ## Repository Settings and Shared Resources 45 | 46 | Shared resources includes: 47 | 48 | * CI services like CirrusCI, GitHub Actions, etc. 49 | * Build services like OpenSUSE Build Service (OBS) 50 | 51 | These need to be handled with care, as they can cause a wide variety of issues from security and privacy leaks all the way to data loss. 52 | 53 | There are several ways to handle shared resources: 54 | 55 | * Assign one person to manage a certain set of settings (i.e. grant them "ownership" of those settings). If you want to change a setting, you should request a change in a team discussion. 56 | * TODO: More ways to manage settings? 57 | -------------------------------------------------------------------------------- /domain_regex.list: -------------------------------------------------------------------------------- 1 | fonts(\\*?)\.googleapis(\\*?)\.com#f0ntz\g<1>.9oo91e8p1\g<2>.qjz9zk 2 | google([A-Za-z\-]*?\\*?)\.com(?!mon)#9oo91e\g<1>.qjz9zk 3 | gstatic([A-Za-z\-]*?\\*?)\.com#95tat1c\g<1>.qjz9zk 4 | chrome([A-Za-z\-]*?\\*?)\.com(?!ponent)#ch40me\g<1>.qjz9zk 5 | chromium([A-Za-z\-]*?\\*?)\.org#ch40m1um\g<1>.qjz9zk 6 | mozilla([A-Za-z\-]*?\\*?)\.org#m0z111a\g<1>.qjz9zk 7 | facebook([A-Za-z\-]*?\\*?)\.com#f8c3b00k\g<1>.qjz9zk 8 | appspot([A-Za-z\-]*?\\*?)\.com#8pp2p8t\g<1>.qjz9zk 9 | youtube([A-Za-z\-]*?\\*?)\.com#y0u1ub3\g<1>.qjz9zk 10 | ytimg([A-Za-z\-]*?\\*?)\.com#yt1mg\g<1>.qjz9zk 11 | gmail([A-Za-z\-]*?\\*?)\.com#9ma1l\g<1>.qjz9zk 12 | doubleclick([A-Za-z\-]*?\\*?)\.net#60u613cl1c4\g<1>.n3t.qjz9zk 13 | doubleclick([A-Za-z\-]*?\\*?)\.com#60u613cl1c4\g<1>.c0m.qjz9zk 14 | googlezip(\\*?)\.net#9oo91e21p\g<1>.qjz9zk 15 | beacons([1-9]?\\*?)\.gvt([1-9]?\\*?)\.com#b3ac0n2\g<1>.9vt\g<2>.qjz9zk 16 | ggpht(\\*?)\.com#99pht\g<1>.qjz9zk 17 | microsoft(\\*?)\.com#m1cr050ft\g<1>.qjz9zk 18 | 1e100(\\*?)\.net#l3lOO\g<1>.qjz9zk 19 | (?.qjz9zk 20 | goo\.gl(e?)#goo.gl\g<1>.qjz9zk 21 | privacysandbox([A-Za-z\-]*?\\*?)\.com#pr1v4cy54ndb0x\g<1>.qjz9zk 22 | -------------------------------------------------------------------------------- /downloads.ini: -------------------------------------------------------------------------------- 1 | # Official Chromium source code archive 2 | # NOTE: Substitutions beginning with underscore are provided by utils 3 | [chromium] 4 | url = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-%(_chromium_version)s-lite.tar.xz 5 | download_filename = chromium-%(_chromium_version)s-lite.tar.xz 6 | hash_url = chromium|chromium-%(_chromium_version)s-lite.tar.xz.hashes|https://commondatastorage.googleapis.com/chromium-browser-official/chromium-%(_chromium_version)s-lite.tar.xz.hashes 7 | output_path = ./ 8 | strip_leading_dirs = chromium-%(_chromium_version)s 9 | -------------------------------------------------------------------------------- /flags.gn: -------------------------------------------------------------------------------- 1 | build_with_tflite_lib=false 2 | chrome_pgo_phase=0 3 | clang_use_chrome_plugins=false 4 | disable_fieldtrial_testing_config=true 5 | enable_hangout_services_extension=false 6 | enable_mdns=false 7 | enable_nacl=false 8 | enable_reading_list=false 9 | enable_remoting=false 10 | enable_reporting=false 11 | enable_service_discovery=false 12 | enable_widevine=true 13 | exclude_unwind_tables=true 14 | google_api_key="" 15 | google_default_client_id="" 16 | google_default_client_secret="" 17 | safe_browsing_mode=0 18 | treat_warnings_as_errors=false 19 | use_official_google_api_keys=false 20 | use_unofficial_version_number=false 21 | -------------------------------------------------------------------------------- /patches/core/bromite/disable-fetching-field-trials.patch: -------------------------------------------------------------------------------- 1 | # NOTE: Modified to remove usage of compiler #if macros 2 | From: csagan5 <32685696+csagan5@users.noreply.github.com> 3 | Date: Sun, 8 Jul 2018 18:16:34 +0200 4 | Subject: Disable fetching of all field trials 5 | 6 | --- 7 | .../browser/flags/ChromeFeatureList.java | 19 ++++--------------- 8 | .../variations/service/variations_service.cc | 12 +----------- 9 | 2 files changed, 5 insertions(+), 26 deletions(-) 10 | 11 | --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java 12 | +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java 13 | @@ -59,7 +59,7 @@ public abstract class ChromeFeatureList 14 | * |kFeaturesExposedToJava| in chrome/browser/flags/android/chrome_feature_list.cc 15 | */ 16 | public static String getFieldTrialParamByFeature(String featureName, String paramName) { 17 | - return ChromeFeatureMap.getInstance().getFieldTrialParamByFeature(featureName, paramName); 18 | + return ""; 19 | } 20 | 21 | /** 22 | @@ -71,8 +71,7 @@ public abstract class ChromeFeatureList 23 | */ 24 | public static boolean getFieldTrialParamByFeatureAsBoolean( 25 | String featureName, String paramName, boolean defaultValue) { 26 | - return ChromeFeatureMap.getInstance() 27 | - .getFieldTrialParamByFeatureAsBoolean(featureName, paramName, defaultValue); 28 | + return defaultValue; 29 | } 30 | 31 | /** 32 | @@ -84,8 +83,7 @@ public abstract class ChromeFeatureList 33 | */ 34 | public static int getFieldTrialParamByFeatureAsInt( 35 | String featureName, String paramName, int defaultValue) { 36 | - return ChromeFeatureMap.getInstance() 37 | - .getFieldTrialParamByFeatureAsInt(featureName, paramName, defaultValue); 38 | + return defaultValue; 39 | } 40 | 41 | /** 42 | @@ -97,8 +95,7 @@ public abstract class ChromeFeatureList 43 | */ 44 | public static double getFieldTrialParamByFeatureAsDouble( 45 | String featureName, String paramName, double defaultValue) { 46 | - return ChromeFeatureMap.getInstance() 47 | - .getFieldTrialParamByFeatureAsDouble(featureName, paramName, defaultValue); 48 | + return defaultValue; 49 | } 50 | 51 | /** 52 | --- a/components/variations/service/variations_service.cc 53 | +++ b/components/variations/service/variations_service.cc 54 | @@ -224,22 +224,7 @@ bool GetInstanceManipulations(const net: 55 | // Variations seed fetching is only enabled in official Chrome builds, if a URL 56 | // is specified on the command line, and for testing. 57 | bool IsFetchingEnabled() { 58 | -#if BUILDFLAG(GOOGLE_CHROME_BRANDING) 59 | - if (base::CommandLine::ForCurrentProcess()->HasSwitch( 60 | - switches::kDisableVariationsSeedFetch)) { 61 | return false; 62 | - } 63 | -#else 64 | - if (!base::CommandLine::ForCurrentProcess()->HasSwitch( 65 | - switches::kVariationsServerURL) && 66 | - !g_should_fetch_for_testing) { 67 | - DVLOG(1) 68 | - << "Not performing repeated fetching in unofficial build without --" 69 | - << switches::kVariationsServerURL << " specified."; 70 | - return false; 71 | - } 72 | -#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) 73 | - return true; 74 | } 75 | 76 | // Returns the already downloaded first run seed, and clear the seed from the 77 | -------------------------------------------------------------------------------- /patches/core/inox-patchset/0005-disable-default-extensions.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/extensions/component_extensions_allowlist/allowlist.cc 2 | +++ b/chrome/browser/extensions/component_extensions_allowlist/allowlist.cc 3 | @@ -29,7 +29,6 @@ namespace extensions { 4 | 5 | bool IsComponentExtensionAllowlisted(const std::string& extension_id) { 6 | constexpr auto kAllowed = base::MakeFixedFlatSet({ 7 | - extension_misc::kInAppPaymentsSupportAppId, 8 | extension_misc::kPdfExtensionId, 9 | #if BUILDFLAG(IS_CHROMEOS) 10 | extension_misc::kAssessmentAssistantExtensionId, 11 | --- a/chrome/browser/extensions/component_loader.cc 12 | +++ b/chrome/browser/extensions/component_loader.cc 13 | @@ -418,11 +418,6 @@ void ComponentLoader::AddWebStoreApp() { 14 | return; 15 | } 16 | #endif 17 | - 18 | - AddWithNameAndDescription( 19 | - IDR_WEBSTORE_MANIFEST, base::FilePath(FILE_PATH_LITERAL("web_store")), 20 | - l10n_util::GetStringUTF8(IDS_WEBSTORE_NAME_STORE), 21 | - l10n_util::GetStringUTF8(IDS_WEBSTORE_APP_DESCRIPTION)); 22 | } 23 | 24 | #if BUILDFLAG(IS_CHROMEOS) 25 | --- a/chrome/browser/extensions/external_component_loader.cc 26 | +++ b/chrome/browser/extensions/external_component_loader.cc 27 | @@ -37,9 +37,6 @@ ExternalComponentLoader::~ExternalCompon 28 | 29 | void ExternalComponentLoader::StartLoading() { 30 | auto prefs = base::Value::Dict(); 31 | -#if BUILDFLAG(GOOGLE_CHROME_BRANDING) 32 | - AddExternalExtension(extension_misc::kInAppPaymentsSupportAppId, prefs); 33 | -#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) 34 | 35 | #if BUILDFLAG(IS_CHROMEOS) 36 | { 37 | --- a/chrome/browser/extensions/webstore_installer.cc 38 | +++ b/chrome/browser/extensions/webstore_installer.cc 39 | @@ -485,20 +485,6 @@ void WebstoreInstaller::DownloadNextPend 40 | 41 | void WebstoreInstaller::DownloadCrx(const extensions::ExtensionId& extension_id, 42 | InstallSource source) { 43 | - download_url_ = GetWebstoreInstallURL(extension_id, source); 44 | - MaybeAppendAuthUserParameter(approval_->authuser, &download_url_); 45 | - 46 | - base::FilePath user_data_dir; 47 | - base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); 48 | - base::FilePath download_path = user_data_dir.Append(kWebstoreDownloadFolder); 49 | - 50 | - base::FilePath download_directory(g_download_directory_for_tests ? 51 | - *g_download_directory_for_tests : download_path); 52 | - 53 | - GetExtensionFileTaskRunner()->PostTaskAndReplyWithResult( 54 | - FROM_HERE, 55 | - base::BindOnce(&GetDownloadFilePath, download_directory, extension_id), 56 | - base::BindOnce(&WebstoreInstaller::StartDownload, this, extension_id)); 57 | } 58 | 59 | // http://crbug.com/165634 60 | @@ -653,21 +639,6 @@ void WebstoreInstaller::UpdateDownloadPr 61 | void WebstoreInstaller::StartCrxInstaller(const DownloadItem& download) { 62 | DCHECK_CURRENTLY_ON(BrowserThread::UI); 63 | DCHECK(!crx_installer_.get()); 64 | - 65 | - const InstallApproval* approval = GetAssociatedApproval(download); 66 | - DCHECK(approval); 67 | - 68 | - crx_installer_ = download_crx_util::CreateCrxInstaller(profile_, download); 69 | - 70 | - crx_installer_->set_expected_id(approval->extension_id); 71 | - crx_installer_->set_is_gallery_install(true); 72 | - crx_installer_->set_allow_silent_install(true); 73 | - crx_installer_->AddInstallerCallback(base::BindOnce( 74 | - &WebstoreInstaller::OnInstallerDone, weak_ptr_factory_.GetWeakPtr())); 75 | - if (approval->withhold_permissions) 76 | - crx_installer_->set_withhold_permissions(); 77 | - 78 | - crx_installer_->InstallCrx(download.GetFullPath()); 79 | } 80 | 81 | void WebstoreInstaller::ReportFailure(const std::string& error, 82 | -------------------------------------------------------------------------------- /patches/core/inox-patchset/0015-disable-update-pings.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/updater/configurator.cc 2 | +++ b/chrome/updater/configurator.cc 3 | @@ -115,7 +115,7 @@ base::TimeDelta Configurator::UpdateDela 4 | 5 | std::vector Configurator::UpdateUrl() const { 6 | DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); 7 | - return external_constants_->UpdateURL(); 8 | + return std::vector(); 9 | } 10 | 11 | std::vector Configurator::PingUrl() const { 12 | -------------------------------------------------------------------------------- /patches/core/inox-patchset/0021-disable-rlz.patch: -------------------------------------------------------------------------------- 1 | # Disable rlz 2 | 3 | --- a/BUILD.gn 4 | +++ b/BUILD.gn 5 | @@ -477,14 +477,6 @@ group("gn_all") { 6 | ] 7 | } 8 | 9 | - if (is_chromeos || is_mac || is_win) { 10 | - deps += [ 11 | - "//rlz:rlz_id", 12 | - "//rlz:rlz_lib", 13 | - "//rlz:rlz_unittests", 14 | - ] 15 | - } 16 | - 17 | if (is_linux || is_chromeos) { 18 | # The following are definitely linux-only. 19 | deps += [ 20 | --- a/rlz/buildflags/buildflags.gni 21 | +++ b/rlz/buildflags/buildflags.gni 22 | @@ -6,7 +6,7 @@ import("//build/config/chrome_build.gni" 23 | 24 | # Whether we are using the rlz library or not. Platforms like Android send 25 | # rlz codes for searches but do not use the library. 26 | -enable_rlz_support = is_win || is_apple || is_chromeos 27 | +enable_rlz_support = false 28 | 29 | declare_args() { 30 | enable_rlz = is_chrome_branded && enable_rlz_support 31 | -------------------------------------------------------------------------------- /patches/core/iridium-browser/safe_browsing-disable-incident-reporting.patch: -------------------------------------------------------------------------------- 1 | From 4dfa8ed0814040317cb82d8545502186daa0a204 Mon Sep 17 00:00:00 2001 2 | From: Jan Engelhardt 3 | Date: Tue, 7 Jul 2015 17:02:09 +0200 4 | Subject: [PATCH 62/76] safe_browsing: disable incident reporting 5 | 6 | Disables the safebrowsing incident reporting where you could upload 7 | information about a blocked URL to Google (also added a trk prefix to 8 | the URL so we get notified if this happens again in the future). 9 | --- 10 | .../incident_reporting/incident_report_uploader_impl.cc | 2 +- 11 | .../incident_reporting/incident_reporting_service.cc | 3 +++ 12 | chrome/browser/safe_browsing/safe_browsing_blocking_page.cc | 3 +-- 13 | chrome/browser/safe_browsing/safe_browsing_service.cc | 2 +- 14 | .../security_interstitials/core/safe_browsing_loud_error_ui.cc | 1 + 15 | 5 files changed, 7 insertions(+), 4 deletions(-) 16 | 17 | --- a/chrome/browser/safe_browsing/chrome_safe_browsing_blocking_page_factory.cc 18 | +++ b/chrome/browser/safe_browsing/chrome_safe_browsing_blocking_page_factory.cc 19 | @@ -63,8 +63,7 @@ ChromeSafeBrowsingBlockingPageFactory::C 20 | Profile::FromBrowserContext(web_contents->GetBrowserContext()); 21 | // Create appropriate display options for this blocking page. 22 | PrefService* prefs = profile->GetPrefs(); 23 | - bool is_extended_reporting_opt_in_allowed = 24 | - IsExtendedReportingOptInAllowed(*prefs); 25 | + bool is_extended_reporting_opt_in_allowed = false; 26 | bool is_proceed_anyway_disabled = IsSafeBrowsingProceedAnywayDisabled(*prefs); 27 | 28 | // Determine if any prefs need to be updated prior to showing the security 29 | --- a/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc 30 | +++ b/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc 31 | @@ -27,7 +27,7 @@ namespace safe_browsing { 32 | namespace { 33 | 34 | const char kSbIncidentReportUrl[] = 35 | - "https://sb-ssl.google.com/safebrowsing/clientreport/incident"; 36 | + "trk:268:https://sb-ssl.google.com/safebrowsing/clientreport/incident"; 37 | 38 | constexpr net::NetworkTrafficAnnotationTag 39 | kSafeBrowsingIncidentTrafficAnnotation = 40 | --- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc 41 | +++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc 42 | @@ -304,11 +304,14 @@ IncidentReportingService::UploadContext: 43 | 44 | // static 45 | bool IncidentReportingService::IsEnabledForProfile(Profile* profile) { 46 | + return false; 47 | +#if 0 48 | if (profile->IsOffTheRecord()) 49 | return false; 50 | if (!IsSafeBrowsingEnabled(*profile->GetPrefs())) 51 | return false; 52 | return IsExtendedReportingEnabled(*profile->GetPrefs()); 53 | +#endif 54 | } 55 | 56 | IncidentReportingService::IncidentReportingService( 57 | --- a/chrome/browser/safe_browsing/safe_browsing_service.cc 58 | +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc 59 | @@ -378,7 +378,7 @@ SafeBrowsingUIManager* SafeBrowsingServi 60 | } 61 | 62 | void SafeBrowsingServiceImpl::RegisterAllDelayedAnalysis() { 63 | -#if BUILDFLAG(FULL_SAFE_BROWSING) 64 | +#if 0 65 | RegisterBinaryIntegrityAnalysis(); 66 | #endif 67 | } 68 | --- a/components/security_interstitials/core/safe_browsing_loud_error_ui.cc 69 | +++ b/components/security_interstitials/core/safe_browsing_loud_error_ui.cc 70 | @@ -27,11 +27,11 @@ namespace { 71 | // For malware interstitial pages, we link the problematic URL to Google's 72 | // diagnostic page. 73 | const char kSbDiagnosticUrl[] = 74 | - "https://transparencyreport.google.com/safe-browsing/search?url=%s"; 75 | + "trk:227:https://transparencyreport.google.com/safe-browsing/search?url=%s"; 76 | 77 | // Constants for the V4 phishing string upgrades. 78 | const char kReportPhishingErrorUrl[] = 79 | - "https://safebrowsing.google.com/safebrowsing/report_error/?url=%s"; 80 | + "trk:228:https://safebrowsing.google.com/safebrowsing/report_error/?url=%s"; 81 | 82 | void RecordExtendedReportingPrefChanged(bool report) { 83 | UMA_HISTOGRAM_BOOLEAN("SafeBrowsing.Pref.Extended.SecurityInterstitial", 84 | -------------------------------------------------------------------------------- /patches/core/iridium-browser/safe_browsing-disable-reporting-of-safebrowsing-over.patch: -------------------------------------------------------------------------------- 1 | From c89ce946e5328ca8a7df923d421e904bb6bfe9b6 Mon Sep 17 00:00:00 2001 2 | From: Jan Engelhardt 3 | Date: Tue, 7 Jul 2015 18:28:46 +0200 4 | Subject: [PATCH 63/76] safe_browsing: disable reporting of safebrowsing 5 | override 6 | 7 | Disables reporting of the safebrowsing override, i.e. the report sent 8 | if a user decides to visit a page that was flagged as "insecure". 9 | This prevents trk:148 (phishing) and trk:149 (malware). 10 | --- 11 | components/safe_browsing/content/browser/client_side_detection_service.cc | 5 +++++ 12 | 1 file changed, 5 insertions(+) 13 | 14 | --- a/components/safe_browsing/content/browser/client_side_detection_service.cc 15 | +++ b/components/safe_browsing/content/browser/client_side_detection_service.cc 16 | @@ -342,6 +342,10 @@ void ClientSideDetectionService::StartCl 17 | return; 18 | } 19 | 20 | +#if 1 21 | + if (!callback.is_null()) 22 | + callback.Run(GURL(request->url()), false); 23 | +#else 24 | std::string request_data; 25 | request->SerializeToString(&request_data); 26 | 27 | @@ -424,6 +428,7 @@ void ClientSideDetectionService::StartCl 28 | base::BindOnce(&WebUIInfoSingleton::AddToClientPhishingRequestsSent, 29 | base::Unretained(WebUIInfoSingleton::GetInstance()), 30 | std::move(request), access_token)); 31 | +#endif 32 | } 33 | 34 | void ClientSideDetectionService::HandlePhishingVerdict( 35 | -------------------------------------------------------------------------------- /patches/core/ungoogled-chromium/disable-crash-reporter.patch: -------------------------------------------------------------------------------- 1 | # Disable some background communication with clients2.google.com 2 | 3 | --- a/chrome/browser/chrome_content_browser_client.cc 4 | +++ b/chrome/browser/chrome_content_browser_client.cc 5 | @@ -2752,24 +2752,6 @@ void ChromeContentBrowserClient::AppendE 6 | command_line->AppendSwitchASCII(switches::kMetricsClientID, 7 | client_info->client_id); 8 | } 9 | -#elif BUILDFLAG(IS_POSIX) 10 | -#if !BUILDFLAG(IS_ANDROID) 11 | - pid_t pid; 12 | - if (crash_reporter::GetHandlerSocket(nullptr, &pid)) { 13 | - command_line->AppendSwitchASCII( 14 | - crash_reporter::switches::kCrashpadHandlerPid, 15 | - base::NumberToString(pid)); 16 | - } 17 | -#endif 18 | - std::string switch_value; 19 | - std::unique_ptr client_info = 20 | - GoogleUpdateSettings::LoadMetricsClientInfo(); 21 | - if (client_info) { 22 | - switch_value = client_info->client_id; 23 | - } 24 | - switch_value.push_back(','); 25 | - switch_value.append(chrome::GetChannelName(chrome::WithExtendedStable(true))); 26 | - command_line->AppendSwitchASCII(switches::kEnableCrashReporter, switch_value); 27 | #endif 28 | 29 | if (logging::DialogsAreSuppressed()) 30 | --- a/components/crash/core/app/crashpad.cc 31 | +++ b/components/crash/core/app/crashpad.cc 32 | @@ -72,6 +72,12 @@ void InitializeDatabasePath(const base:: 33 | } 34 | 35 | bool InitializeCrashpadImpl(bool initial_client, 36 | + const std::string& a, const std::string& b, const base::FilePath& c, 37 | + const std::vector& d, bool e) { 38 | + return false; 39 | +} 40 | +[[maybe_unused]] 41 | +bool DeadInitializeCrashpadImpl(bool initial_client, 42 | const std::string& process_type, 43 | const std::string& user_data_dir, 44 | const base::FilePath& exe_path, 45 | --- a/components/gwp_asan/client/gwp_asan.cc 46 | +++ b/components/gwp_asan/client/gwp_asan.cc 47 | @@ -323,6 +323,11 @@ GWP_ASAN_EXPORT std::optional GetAllocatorSettings( 51 | + const base::Feature& a, bool b, std::string_view c) { 52 | + return std::nullopt; 53 | +} 54 | +[[maybe_unused]] 55 | +std::optional DeadGetAllocatorSettings( 56 | const base::Feature& feature, 57 | bool boost_sampling, 58 | std::string_view process_type) { 59 | --- a/third_party/crashpad/crashpad/client/crashpad_client_linux.cc 60 | +++ b/third_party/crashpad/crashpad/client/crashpad_client_linux.cc 61 | @@ -747,8 +747,6 @@ void CrashpadClient::CrashWithoutDump(co 62 | // static 63 | void CrashpadClient::SetFirstChanceExceptionHandler( 64 | FirstChanceHandler handler) { 65 | - DCHECK(SignalHandler::Get()); 66 | - SignalHandler::Get()->SetFirstChanceHandler(handler); 67 | } 68 | 69 | // static 70 | -------------------------------------------------------------------------------- /patches/core/ungoogled-chromium/disable-fonts-googleapis-references.patch: -------------------------------------------------------------------------------- 1 | # Disables references to fonts.googleapis.com 2 | 3 | --- a/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc 4 | +++ b/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc 5 | @@ -291,7 +291,7 @@ bool DomDistillerViewerSource::ShouldSer 6 | std::string DomDistillerViewerSource::GetContentSecurityPolicy( 7 | network::mojom::CSPDirectiveName directive) { 8 | if (directive == network::mojom::CSPDirectiveName::StyleSrc) { 9 | - return "style-src 'self' https://fonts.googleapis.com;"; 10 | + return "style-src 'self';"; 11 | } else if (directive == network::mojom::CSPDirectiveName::ChildSrc) { 12 | return "child-src *;"; 13 | } else if (directive == 14 | --- a/components/dom_distiller/core/html/preview.html 15 | +++ b/components/dom_distiller/core/html/preview.html 16 | @@ -11,7 +11,7 @@ found in the LICENSE file. 17 | 18 | Title goes here and it could be kind of lengthy - Publisher name 19 | 20 | - 21 | + 22 |