From 926e892e99ff2a31a32e54456a027ad2874fa9b7 Mon Sep 17 00:00:00 2001 From: Eloston Date: Thu, 21 Jul 2016 21:43:32 -0700 Subject: [PATCH] Reorganize resources into new directories Rename building module to buildlib Refactor buildlib for easier and cleaner platform extensions Update developer utilities to work with buildlib --- building/debian.py | 188 ------------------ {building => buildlib}/__init__.py | 0 buildlib/debian.py | 151 ++++++++++++++ {building => buildlib}/generic.py | 128 ++++++++---- developer_utilities/quilt_patches.py | 14 +- developer_utilities/update_helper.py | 18 +- .../common/cleaning_list | 0 .../common/domain_regex_list | 0 .../common/domain_substitution_list | 0 gn_args.ini => resources/common/gn_args.ini | 0 gyp_flags => resources/common/gyp_flags | 0 .../disable/default-browser-warning.patch | 0 .../debian/disable/external-components.patch | 0 .../debian/disable/google-api-warning.patch | 0 .../patches}/debian/disable/promo.patch | 0 .../common/patches}/debian/gpu-timeout.patch | 0 .../common/patches}/debian/ps-print.patch | 0 .../common/patches}/debian/webui.patch | 0 .../disable-autofill-download-manager.patch | 0 .../disable-default-extensions.patch | 0 .../disable-first-run-behaviour.patch | 0 .../disable-google-url-tracker.patch | 0 .../disable-new-avatar-menu.patch | 0 .../disable-translation-lang-fetch.patch | 0 .../inox-patchset/modify-default-prefs.patch | 0 .../Remove-EV-certificates.patch | 0 ...refixes-to-possibly-evil-connections.patch | 0 ...ll-disable-autofill-download-manager.patch | 0 ...ervice-disable-more-privacy-nightmar.patch | 0 ...ble-profile-auto-import-on-first-run.patch | 0 ...sable-warning-about-missing-API-keys.patch | 0 .../build-build-the-sandbox-with-PIE.patch | 0 .../build-use-Wl-no-keep-memory.patch | 0 ...isable-in-prefs-and-component-loader.patch | 0 ...nnectivity-probes-to-RIPE-DNS-rather.patch | 0 ...s-show-component-extensions-in-the-e.patch | 0 ...rf-if-metrics_reporting-is-activated.patch | 0 ...t_run-deactivate-autoupdate-globally.patch | 0 ...saging-disable-experiment-status-che.patch | 0 .../google_now-disable-this.patch | 0 ...ord-disable-at-build-time-by-default.patch | 0 ...rce-text-x-suse-ymp-to-be-downloaded.patch | 0 ...me-and-help-identify-URLs-being-retr.patch | 0 ...e-default-key-length-for-newly-gener.patch | 0 ...mpt-for-download-directory-by-defaul.patch | 0 ...block-third-party-cookies-by-default.patch | 0 ...e-a-prediction-service-to-help-compl.patch | 0 ...e-a-web-service-to-help-resolve-navi.patch | 0 ...s-disable-background-mode-by-default.patch | 0 .../prefs-disable-hyperlink-auditing.patch | 0 ...prefs-disable-network-DNS-prediction.patch | 0 .../prefs-disable-translation-service.patch | 0 ...fs-do-not-store-passwords-by-default.patch | 0 .../prefs-only-keep-cookies-until-exit.patch | 0 ...-do-not-tick-send-settings-by-defaul.patch | 0 ...mo-disable-Google-promotion-fetching.patch | 0 ...browsing-disable-cookie-transmission.patch | 0 ..._browsing-disable-incident-reporting.patch | 0 ...sable-reporting-of-safebrowsing-over.patch | 0 .../safe_browsing-support-trk-prefix.patch | 0 ...arch-show-blank-tab-for-new-tab-page.patch | 0 ...g-downloading-dictionary-from-Google.patch | 0 ...e-fetching-of-translate-languages-fr.patch | 0 .../updater-disable-auto-update.patch | 0 .../updater-disable-updater-pings.patch | 0 ...webrtc-disable-WebRTC-identity-store.patch | 0 .../webrtc-generate-real-ephemeral-keys.patch | 0 .../common/patches}/patch_order | 0 .../change-trace-infobar-message.patch | 0 .../clear-http-auth-cache-menu-item.patch | 0 .../disable-copresence.patch | 0 .../disable-crash-reporter.patch | 0 .../disable-domain-reliability.patch | 0 .../disable-formatting-in-omnibox.patch | 0 .../ungoogled-chromium/disable-gcm.patch | 0 .../disable-google-host-detection.patch | 0 .../disable-intranet-redirect-detector.patch | 0 .../disable-ipv6-pinging.patch | 0 .../disable-logging-urls-to-stderr.patch | 0 .../disable-omnibox-searching.patch | 0 .../disable-persistent-site-properties.patch | 0 .../disable-profile-avatar-downloading.patch | 0 .../ungoogled-chromium/disable-signin.patch | 0 .../disable-translate.patch | 0 ...disable-unload-javascript-dialog-box.patch | 0 .../disable-untraceable-urls.patch | 0 .../disable-web-resource-service.patch | 0 ...ix-building-without-one-click-signin.patch | 0 .../fix-building-without-safebrowsing.patch | 0 .../intercept-all-modified-domains.patch | 0 .../ungoogled-chromium/popups-to-tabs.patch | 0 .../prevent-trace-url-requests.patch | 0 ...e-disable-setuid-sandbox-as-bad-flag.patch | 0 .../debian/cleaning_list | 0 .../debian/dpkg_dir/changelog.in | 0 .../debian/dpkg_dir/chrome-sandbox.install.in | 0 .../dpkg_dir/chrome-sandbox.lintian-overrides | 0 .../debian/dpkg_dir/chromedriver.install.in | 0 .../debian/dpkg_dir/chromium-l10n.install.in | 0 .../debian/dpkg_dir/chromium.desktop | 0 .../debian/dpkg_dir/chromium.dirs | 0 .../debian/dpkg_dir/chromium.install.in | 0 .../debian/dpkg_dir/chromium.links | 0 .../dpkg_dir/chromium.lintian-overrides | 0 .../debian/dpkg_dir/chromium.manpages.in | 0 .../debian/dpkg_dir/chromium.menu | 0 .../debian/dpkg_dir/chromium.postinst | 0 .../debian/dpkg_dir/chromium.prerm | 0 .../debian/dpkg_dir/chromium.xml | 0 .../debian/dpkg_dir/clean | 0 .../debian/dpkg_dir/compat | 0 .../debian/dpkg_dir/control | 0 .../debian/dpkg_dir/default-flags | 0 .../debian/dpkg_dir/master_preferences | 0 .../debian/dpkg_dir/presubj | 0 .../debian/dpkg_dir/rules.in | 0 .../debian/dpkg_dir/scripts/chromium | 0 .../debian/dpkg_dir/source/format | 0 .../debian/dpkg_dir/source/lintian-overrides | 0 .../debian/gn_args.ini | 0 .../resources => resources}/debian/gyp_flags | 0 .../debian/patches/manpage.patch | 0 .../debian/patches/master-preferences.patch | 0 .../debian/patches/patch_order | 0 .../debian/patches/system/clang.patch | 0 .../debian/patches/system/ffmpeg.patch | 0 .../debian/patches/system/nspr.patch | 0 .../debian/patches/system/speechd.patch | 0 .../resources => resources}/ubuntu/changelog | 0 .../patches/ubuntu_patches/ubuntu_patch_order | 0 .../use-internal-libspeechd.patch | 0 131 files changed, 260 insertions(+), 239 deletions(-) delete mode 100644 building/debian.py rename {building => buildlib}/__init__.py (100%) create mode 100644 buildlib/debian.py rename {building => buildlib}/generic.py (75%) rename cleaning_list => resources/common/cleaning_list (100%) rename domain_regex_list => resources/common/domain_regex_list (100%) rename domain_substitution_list => resources/common/domain_substitution_list (100%) rename gn_args.ini => resources/common/gn_args.ini (100%) rename gyp_flags => resources/common/gyp_flags (100%) rename {patches => resources/common/patches}/debian/disable/default-browser-warning.patch (100%) rename {patches => resources/common/patches}/debian/disable/external-components.patch (100%) rename {patches => resources/common/patches}/debian/disable/google-api-warning.patch (100%) rename {patches => resources/common/patches}/debian/disable/promo.patch (100%) rename {patches => resources/common/patches}/debian/gpu-timeout.patch (100%) rename {patches => resources/common/patches}/debian/ps-print.patch (100%) rename {patches => resources/common/patches}/debian/webui.patch (100%) rename {patches => resources/common/patches}/inox-patchset/disable-autofill-download-manager.patch (100%) rename {patches => resources/common/patches}/inox-patchset/disable-default-extensions.patch (100%) rename {patches => resources/common/patches}/inox-patchset/disable-first-run-behaviour.patch (100%) rename {patches => resources/common/patches}/inox-patchset/disable-google-url-tracker.patch (100%) rename {patches => resources/common/patches}/inox-patchset/disable-new-avatar-menu.patch (100%) rename {patches => resources/common/patches}/inox-patchset/disable-translation-lang-fetch.patch (100%) rename {patches => resources/common/patches}/inox-patchset/modify-default-prefs.patch (100%) rename {patches => resources/common/patches}/iridium-browser/Remove-EV-certificates.patch (100%) rename {patches => resources/common/patches}/iridium-browser/all-add-trk-prefixes-to-possibly-evil-connections.patch (100%) rename {patches => resources/common/patches}/iridium-browser/autofill-disable-autofill-download-manager.patch (100%) rename {patches => resources/common/patches}/iridium-browser/battery_status_service-disable-more-privacy-nightmar.patch (100%) rename {patches => resources/common/patches}/iridium-browser/browser-disable-profile-auto-import-on-first-run.patch (100%) rename {patches => resources/common/patches}/iridium-browser/browser-ui-disable-warning-about-missing-API-keys.patch (100%) rename {patches => resources/common/patches}/iridium-browser/build-build-the-sandbox-with-PIE.patch (100%) rename {patches => resources/common/patches}/iridium-browser/build-use-Wl-no-keep-memory.patch (100%) rename {patches => resources/common/patches}/iridium-browser/cloud-print-disable-in-prefs-and-component-loader.patch (100%) rename {patches => resources/common/patches}/iridium-browser/dns-send-IPv6-connectivity-probes-to-RIPE-DNS-rather.patch (100%) rename {patches => resources/common/patches}/iridium-browser/extensions-always-show-component-extensions-in-the-e.patch (100%) rename {patches => resources/common/patches}/iridium-browser/first_run-barf-if-metrics_reporting-is-activated.patch (100%) rename {patches => resources/common/patches}/iridium-browser/first_run-deactivate-autoupdate-globally.patch (100%) rename {patches => resources/common/patches}/iridium-browser/google-cloud-messaging-disable-experiment-status-che.patch (100%) rename {patches => resources/common/patches}/iridium-browser/google_now-disable-this.patch (100%) rename {patches => resources/common/patches}/iridium-browser/hotword-disable-at-build-time-by-default.patch (100%) rename {patches => resources/common/patches}/iridium-browser/mime_util-force-text-x-suse-ymp-to-be-downloaded.patch (100%) rename {patches => resources/common/patches}/iridium-browser/net-add-trk-scheme-and-help-identify-URLs-being-retr.patch (100%) rename {patches => resources/common/patches}/iridium-browser/net-cert-increase-default-key-length-for-newly-gener.patch (100%) rename {patches => resources/common/patches}/iridium-browser/prefs-always-prompt-for-download-directory-by-defaul.patch (100%) rename {patches => resources/common/patches}/iridium-browser/prefs-block-third-party-cookies-by-default.patch (100%) rename {patches => resources/common/patches}/iridium-browser/prefs-disable-Use-a-prediction-service-to-help-compl.patch (100%) rename {patches => resources/common/patches}/iridium-browser/prefs-disable-Use-a-web-service-to-help-resolve-navi.patch (100%) rename {patches => resources/common/patches}/iridium-browser/prefs-disable-background-mode-by-default.patch (100%) rename {patches => resources/common/patches}/iridium-browser/prefs-disable-hyperlink-auditing.patch (100%) rename {patches => resources/common/patches}/iridium-browser/prefs-disable-network-DNS-prediction.patch (100%) rename {patches => resources/common/patches}/iridium-browser/prefs-disable-translation-service.patch (100%) rename {patches => resources/common/patches}/iridium-browser/prefs-do-not-store-passwords-by-default.patch (100%) rename {patches => resources/common/patches}/iridium-browser/prefs-only-keep-cookies-until-exit.patch (100%) rename {patches => resources/common/patches}/iridium-browser/profile-resetter-do-not-tick-send-settings-by-defaul.patch (100%) rename {patches => resources/common/patches}/iridium-browser/promo-disable-Google-promotion-fetching.patch (100%) rename {patches => resources/common/patches}/iridium-browser/safe_browsing-disable-cookie-transmission.patch (100%) rename {patches => resources/common/patches}/iridium-browser/safe_browsing-disable-incident-reporting.patch (100%) rename {patches => resources/common/patches}/iridium-browser/safe_browsing-disable-reporting-of-safebrowsing-over.patch (100%) rename {patches => resources/common/patches}/iridium-browser/safe_browsing-support-trk-prefix.patch (100%) rename {patches => resources/common/patches}/iridium-browser/search-show-blank-tab-for-new-tab-page.patch (100%) rename {patches => resources/common/patches}/iridium-browser/spellchecker-flag-downloading-dictionary-from-Google.patch (100%) rename {patches => resources/common/patches}/iridium-browser/translate-disable-fetching-of-translate-languages-fr.patch (100%) rename {patches => resources/common/patches}/iridium-browser/updater-disable-auto-update.patch (100%) rename {patches => resources/common/patches}/iridium-browser/updater-disable-updater-pings.patch (100%) rename {patches => resources/common/patches}/iridium-browser/webrtc-disable-WebRTC-identity-store.patch (100%) rename {patches => resources/common/patches}/iridium-browser/webrtc-generate-real-ephemeral-keys.patch (100%) rename {patches => resources/common/patches}/patch_order (100%) rename {patches => resources/common/patches}/ungoogled-chromium/change-trace-infobar-message.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/clear-http-auth-cache-menu-item.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/disable-copresence.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/disable-crash-reporter.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/disable-domain-reliability.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/disable-formatting-in-omnibox.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/disable-gcm.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/disable-google-host-detection.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/disable-intranet-redirect-detector.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/disable-ipv6-pinging.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/disable-logging-urls-to-stderr.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/disable-omnibox-searching.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/disable-persistent-site-properties.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/disable-profile-avatar-downloading.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/disable-signin.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/disable-translate.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/disable-unload-javascript-dialog-box.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/disable-untraceable-urls.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/disable-web-resource-service.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/fix-building-without-one-click-signin.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/fix-building-without-safebrowsing.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/intercept-all-modified-domains.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/popups-to-tabs.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/prevent-trace-url-requests.patch (100%) rename {patches => resources/common/patches}/ungoogled-chromium/remove-disable-setuid-sandbox-as-bad-flag.patch (100%) rename {building/resources => resources}/debian/cleaning_list (100%) rename {building/resources => resources}/debian/dpkg_dir/changelog.in (100%) rename {building/resources => resources}/debian/dpkg_dir/chrome-sandbox.install.in (100%) rename {building/resources => resources}/debian/dpkg_dir/chrome-sandbox.lintian-overrides (100%) rename {building/resources => resources}/debian/dpkg_dir/chromedriver.install.in (100%) rename {building/resources => resources}/debian/dpkg_dir/chromium-l10n.install.in (100%) rename {building/resources => resources}/debian/dpkg_dir/chromium.desktop (100%) rename {building/resources => resources}/debian/dpkg_dir/chromium.dirs (100%) rename {building/resources => resources}/debian/dpkg_dir/chromium.install.in (100%) rename {building/resources => resources}/debian/dpkg_dir/chromium.links (100%) rename {building/resources => resources}/debian/dpkg_dir/chromium.lintian-overrides (100%) rename {building/resources => resources}/debian/dpkg_dir/chromium.manpages.in (100%) rename {building/resources => resources}/debian/dpkg_dir/chromium.menu (100%) rename {building/resources => resources}/debian/dpkg_dir/chromium.postinst (100%) rename {building/resources => resources}/debian/dpkg_dir/chromium.prerm (100%) rename {building/resources => resources}/debian/dpkg_dir/chromium.xml (100%) rename {building/resources => resources}/debian/dpkg_dir/clean (100%) rename {building/resources => resources}/debian/dpkg_dir/compat (100%) rename {building/resources => resources}/debian/dpkg_dir/control (100%) rename {building/resources => resources}/debian/dpkg_dir/default-flags (100%) rename {building/resources => resources}/debian/dpkg_dir/master_preferences (100%) rename {building/resources => resources}/debian/dpkg_dir/presubj (100%) rename {building/resources => resources}/debian/dpkg_dir/rules.in (100%) rename {building/resources => resources}/debian/dpkg_dir/scripts/chromium (100%) rename {building/resources => resources}/debian/dpkg_dir/source/format (100%) rename {building/resources => resources}/debian/dpkg_dir/source/lintian-overrides (100%) rename {building/resources => resources}/debian/gn_args.ini (100%) rename {building/resources => resources}/debian/gyp_flags (100%) rename {building/resources => resources}/debian/patches/manpage.patch (100%) rename {building/resources => resources}/debian/patches/master-preferences.patch (100%) rename building/resources/debian/patches/series => resources/debian/patches/patch_order (100%) rename {building/resources => resources}/debian/patches/system/clang.patch (100%) rename {building/resources => resources}/debian/patches/system/ffmpeg.patch (100%) rename {building/resources => resources}/debian/patches/system/nspr.patch (100%) rename {building/resources => resources}/debian/patches/system/speechd.patch (100%) rename {building/resources => resources}/ubuntu/changelog (100%) rename {building/resources => resources}/ubuntu/patches/ubuntu_patches/ubuntu_patch_order (100%) rename {building/resources => resources}/ubuntu/patches/ubuntu_patches/use-internal-libspeechd.patch (100%) diff --git a/building/debian.py b/building/debian.py deleted file mode 100644 index 1a61cca234..0000000000 --- a/building/debian.py +++ /dev/null @@ -1,188 +0,0 @@ -# ungoogled-chromium: Google Chromium patches for removing Google integration, enhancing privacy, and adding features -# Copyright (C) 2016 Eloston -# -# This file is part of ungoogled-chromium. -# -# ungoogled-chromium is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ungoogled-chromium is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ungoogled-chromium. If not, see . - -'''Code for Debian and its derivatives''' - -import pathlib -import distutils.dir_util -import os -import subprocess -import itertools -import tempfile -import locale -import datetime -import re -import string - -from . import generic - -QUILT_ENV_VARS = { - "QUILT_PATCHES": ".ungoogled/patches", - "QUILT_SERIES": "patch_order" -} - -class DebianPlatform(generic.GenericPlatform): - PLATFORM_RESOURCES = pathlib.Path("building", "resources", "debian") - - def __init__(self, *args, **kwargs): - super(DebianPlatform, self).__init__(*args, **kwargs) - - self.sandbox_patches = self.ungoogled_dir / pathlib.Path("patches") - self._domains_subbed = False - - def generate_orig_tar_xz(self, tar_xz_path): - pass - - def generate_debian_tar_xz(self, tar_xz_path): - pass - - def setup_chromium_source(self, cleaning_list=pathlib.Path("cleaning_list"), debian_cleaning_list=(PLATFORM_RESOURCES / pathlib.Path("cleaning_list")), **kwargs): - tmp = tempfile.SpooledTemporaryFile(mode="w+") - if not cleaning_list is None: - with cleaning_list.open() as f: - tmp.write(f.read()) - if not debian_cleaning_list is None: - with debian_cleaning_list.open() as f: - tmp.write(f.read()) - tmp.seek(0) - tmp.open = lambda: tmp - super(DebianPlatform, self).setup_chromium_source(cleaning_list=tmp, **kwargs) - - def setup_build_sandbox(self, *args, run_domain_substitution=True, domain_regexes=pathlib.Path("domain_regex_list"), **kwargs): - super(DebianPlatform, self).setup_build_sandbox(*args, run_domain_substitution, domain_regexes, **kwargs) - - # Symlink flot libraries - for system_path in itertools.chain(pathlib.Path("/").glob("usr/share/javascript/jquery/*min.js"), pathlib.Path("/").glob("usr/share/javascript/jquery-flot/*min.js")): - symlink_path = self.sandbox_root / pathlib.Path("third_party", "flot", system_path.name) - self.logger.debug("Symlinking flot library {} ...".format(system_path.name)) - if symlink_path.exists(): - symlink_path.unlink() - symlink_path.symlink_to(system_path) - - self._domains_subbed = run_domain_substitution - self._regex_defs_used = domain_regexes - - def apply_patches(self): - self.logger.info("Copying patches to {}...".format(str(self.sandbox_patches))) - - if self.sandbox_patches.exists(): - raise Exception("Sandbox patches directory already exists") - - series_path = self.sandbox_patches / pathlib.Path("series") - patch_order_path = self.sandbox_patches / pathlib.Path("patch_order") - - distutils.dir_util.copy_tree("patches", str(self.sandbox_patches)) - distutils.dir_util.copy_tree(str(self.PLATFORM_RESOURCES / pathlib.Path("patches")), str(self.sandbox_patches)) - - with patch_order_path.open("ab") as patch_order_file: - with series_path.open("rb") as series_file: - patch_order_file.write(series_file.read()) - series_path.unlink() - - if self._domains_subbed: - self.logger.info("Running domain substitution over patches...") - self._domain_substitute(self._regex_defs_used, self.sandbox_patches.rglob("*.patch"), log_warnings=False) - - self.logger.info("Applying patches via quilt...") - new_env = dict(os.environ) - new_env.update(QUILT_ENV_VARS) - result = subprocess.run(["quilt", "push", "-a"], env=new_env, cwd=str(self.sandbox_root)) - if not result.returncode == 0: - raise Exception("Quilt returned non-zero exit code: {}".format(result.returncode)) - - #def generate_build_configuration(self, gn_args=pathlib.Path("gn_args.ini"), build_output=pathlib.Path("out", "Default"), debian_gn_args=(self.PLATFORM_RESOURCES / pathlib.Path("gn_args.ini")): - # (self.sandbox_root / build_output).mkdir(parents=True, exist_ok=True) - # common_config = configparser.ConfigParser() - # common_config.read(str(gn_args)) - # debian_config = configparser.ConfigParser() - # debian_config.read(str(debian_gn_args)) - # combined_dict = dict() - # for section in common_config: - # if not section == "DEFAULT": - # combined_dict[section] = dict() - # for config_key in common_config[section]: - # combined_dict[section][config_key] = common_config[section][config_key] - # for section in debian_config: - # if not section == "DEFAULT": - # if not section in combined_dict: - # combined_dict[section] = dict() - # for config_key in debian_config[section]: - # combined_dict[section][config_key] = debian_config[section][config_key] - # self._gn_write_args(combined_dict, build_output) - # self._gn_generate_ninja(build_output) - - def generate_build_configuration(self, gyp_flags=pathlib.Path("gyp_flags"), build_output=pathlib.Path("out", "Release"), python2_command=None, debian_gyp_flags=(PLATFORM_RESOURCES / pathlib.Path("gyp_flags"))): - self.logger.info("Running gyp command with additional Debian gyp flags...") - gyp_list = list() - with gyp_flags.open() as f: - gyp_list = f.read().splitlines() - with debian_gyp_flags.open() as f: - gyp_list += f.read().splitlines() - self._gyp_generate_ninja(gyp_list, build_output, python2_command) - self.build_output = build_output - - def build(self): - self.logger.info("Running build command...") - self._run_ninja(self.build_output, ["chrome", "chrome_sandbox", "chromedriver"]) - - def generate_package(self): - def get_changelog_date(override_datetime=None): - if override_datetime is None: - current_datetime = datetime.date.today() - else: - current_datetime = override_datetime - current_lc = locale.setlocale(locale.LC_TIME) - try: - locale.setlocale(locale.LC_TIME, "C") - result = current_datetime.strftime("%a, %d %b %Y %H:%M:%S ") - timezone = current_datetime.strftime("%z") - if len(timezone) == 0: - timezone = "+0000" - return result + timezone - finally: - locale.setlocale(locale.LC_TIME, current_lc) - - class CustomTemplate(string.Template): # Inspired by http://stackoverflow.com/questions/12768107/string-substitutions-using-templates-in-python - pattern = r""" - {delim}(?: - (?P{delim}) | - _(?P{id}) | - {{(?P{id})}} | - (?P{delim}((?!_)|(?!{{))) - ) - """.format(delim=re.escape("$ungoog"), id=string.Template.idpattern) - - template_parsing_defs = dict( - changelog_version="{}-{}".format(self.version, self.revision), - changelog_datetime=get_changelog_date(), - build_output=str(self.build_output) - ) - self.logger.info("Building Debian package...") - destination_dpkg_dir = self.sandbox_root / pathlib.Path("debian") - distutils.dir_util.copy_tree(str(self.PLATFORM_RESOURCES / pathlib.Path("dpkg_dir")), str(destination_dpkg_dir)) - for old_path in destination_dpkg_dir.glob("*.in"): - new_path = destination_dpkg_dir / old_path.stem - old_path.replace(new_path) - with new_path.open("r+") as new_file: - content = CustomTemplate(new_file.read()).substitute(**template_parsing_defs) - new_file.seek(0) - new_file.write(content) - new_file.truncate() - result = subprocess.run(["dpkg-buildpackage", "-b", "-uc"], cwd=str(self.sandbox_root)) - if not result.returncode == 0: - raise Exception("dpkg-buildpackage returned non-zero exit code: {}".format(result.returncode)) diff --git a/building/__init__.py b/buildlib/__init__.py similarity index 100% rename from building/__init__.py rename to buildlib/__init__.py diff --git a/buildlib/debian.py b/buildlib/debian.py new file mode 100644 index 0000000000..c82a6c2b8d --- /dev/null +++ b/buildlib/debian.py @@ -0,0 +1,151 @@ +# ungoogled-chromium: Google Chromium patches for removing Google integration, enhancing privacy, and adding features +# Copyright (C) 2016 Eloston +# +# This file is part of ungoogled-chromium. +# +# ungoogled-chromium is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# ungoogled-chromium is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with ungoogled-chromium. If not, see . + +'''Code for Debian and its derivatives''' + +import pathlib +import distutils.dir_util +import os +import subprocess +import itertools +import tempfile +import locale +import datetime +import re +import string + +from . import generic + +class DebianPlatform(generic.GenericPlatform): + PLATFORM_RESOURCES = pathlib.Path("resources", "debian") + DPKG_DIR = PLATFORM_RESOURCES / pathlib.Path("dpkg_dir") + + class BuildFileStringTemplate(string.Template): # Inspired by http://stackoverflow.com/questions/12768107/string-substitutions-using-templates-in-python + pattern = r""" + {delim}(?: + (?P{delim}) | + _(?P{id}) | + {{(?P{id})}} | + (?P{delim}((?!_)|(?!{{))) + ) + """.format(delim=re.escape("$ungoog"), id=string.Template.idpattern) + + def __init__(self, *args, **kwargs): + super(DebianPlatform, self).__init__(*args, **kwargs) + + self.sandbox_patches = self.ungoogled_dir / self.PATCHES + self.sandbox_dpkg_dir = self.sandbox_root / pathlib.Path("debian") + + self.quilt_env_vars = { + "QUILT_PATCHES": str(self.UNGOOGLED_DIR / self.PATCHES), + "QUILT_SERIES": str(self.PATCH_ORDER) + } + + def _get_dpkg_changelog_datetime(self, override_datetime=None): + if override_datetime is None: + current_datetime = datetime.date.today() + else: + current_datetime = override_datetime + current_lc = locale.setlocale(locale.LC_TIME) + try: + locale.setlocale(locale.LC_TIME, "C") + result = current_datetime.strftime("%a, %d %b %Y %H:%M:%S ") + timezone = current_datetime.strftime("%z") + if len(timezone) == 0: + timezone = "+0000" + return result + timezone + finally: + locale.setlocale(locale.LC_TIME, current_lc) + + def generate_orig_tar_xz(self, tar_xz_path): + pass + + def generate_debian_tar_xz(self, tar_xz_path): + pass + + def setup_build_sandbox(self, *args, **kwargs): + super(DebianPlatform, self).setup_build_sandbox(*args, **kwargs) + + # Symlink flot libraries + for system_path in itertools.chain(pathlib.Path("/").glob("usr/share/javascript/jquery/*min.js"), pathlib.Path("/").glob("usr/share/javascript/jquery-flot/*min.js")): + symlink_path = self.sandbox_root / pathlib.Path("third_party", "flot", system_path.name) + self.logger.debug("Symlinking flot library {} ...".format(system_path.name)) + if symlink_path.exists(): + symlink_path.unlink() + symlink_path.symlink_to(system_path) + + def apply_patches(self): + self.logger.debug("Copying patches to {}...".format(str(self.sandbox_patches))) + + if self.sandbox_patches.exists(): + raise Exception("Sandbox patches directory already exists") + + self._generate_patches(self.sandbox_patches, self._ran_domain_substitution) + + self.logger.info("Applying patches via quilt...") + new_env = dict(os.environ) + new_env.update(self.quilt_env_vars) + result = subprocess.run(["quilt", "push", "-a"], env=new_env, cwd=str(self.sandbox_root)) + if not result.returncode == 0: + raise Exception("Quilt returned non-zero exit code: {}".format(result.returncode)) + + #def generate_build_configuration(self, gn_args=pathlib.Path("gn_args.ini"), build_output=pathlib.Path("out", "Default"), debian_gn_args=(self.PLATFORM_RESOURCES / pathlib.Path("gn_args.ini")): + # (self.sandbox_root / build_output).mkdir(parents=True, exist_ok=True) + # common_config = configparser.ConfigParser() + # common_config.read(str(gn_args)) + # debian_config = configparser.ConfigParser() + # debian_config.read(str(debian_gn_args)) + # combined_dict = dict() + # for section in common_config: + # if not section == "DEFAULT": + # combined_dict[section] = dict() + # for config_key in common_config[section]: + # combined_dict[section][config_key] = common_config[section][config_key] + # for section in debian_config: + # if not section == "DEFAULT": + # if not section in combined_dict: + # combined_dict[section] = dict() + # for config_key in debian_config[section]: + # combined_dict[section][config_key] = debian_config[section][config_key] + # self._gn_write_args(combined_dict, build_output) + # self._gn_generate_ninja(build_output) + + def build(self, build_targets=["chrome", "chrome_sandbox", "chromedriver"]): + super(DebianPlatform, self).build(build_targets) + + def generate_package(self): + if self.build_output is None: + raise Exception("build_output member variable is not defined. Run generate_build_configuration() first or set it manually") + build_file_subs = dict( + changelog_version="{}-{}".format(self.version, self.revision), + changelog_datetime=self._get_dpkg_changelog_datetime(), + build_output=str(self.build_output) + ) + self.logger.info("Building Debian package...") + distutils.dir_util.copy_tree(str(self.DPKG_DIR), str(self.sandbox_dpkg_dir)) + for old_path in self.sandbox_dpkg_dir.glob("*.in"): + new_path = self.sandbox_dpkg_dir / old_path.stem + old_path.replace(new_path) + with new_path.open("r+") as new_file: + content = self.BuildFileStringTemplate(new_file.read()).substitute(**build_file_subs) + new_file.seek(0) + new_file.write(content) + new_file.truncate() + result = subprocess.run(["dpkg-buildpackage", "-b", "-uc"], cwd=str(self.sandbox_root)) + if not result.returncode == 0: + raise Exception("dpkg-buildpackage returned non-zero exit code: {}".format(result.returncode)) diff --git a/building/generic.py b/buildlib/generic.py similarity index 75% rename from building/generic.py rename to buildlib/generic.py index f1212e7183..b6e78bfe03 100644 --- a/building/generic.py +++ b/buildlib/generic.py @@ -27,9 +27,24 @@ import subprocess import logging import configparser +import distutils.dir_util class GenericPlatform: - def __init__(self, version, revision, logger=None, sandbox_root=pathlib.Path("build_sandbox")): + # Define default paths and file names. Some may be overridden by the methods + COMMON_RESOURCES = pathlib.Path("resources", "common") + PLATFORM_RESOURCES = None + CLEANING_LIST = pathlib.Path("cleaning_list") + DOMAIN_REGEX_LIST = pathlib.Path("domain_regex_list") + DOMAIN_SUBSTITUTION_LIST = pathlib.Path("domain_substitution_list") + PATCHES = pathlib.Path("patches") + PATCH_ORDER = pathlib.Path("patch_order") + GYP_FLAGS = pathlib.Path("gyp_flags") + GN_ARGS = pathlib.Path("gn_args.ini") + UNGOOGLED_DIR = pathlib.Path(".ungoogled") + SANDBOX_ROOT = pathlib.Path("build_sandbox") + BUILD_OUTPUT = pathlib.Path("out", "Release") # Change this for GN + + def __init__(self, version, revision, logger=None, sandbox_root=None): self.version = version self.revision = revision @@ -46,15 +61,18 @@ def __init__(self, version, revision, logger=None, sandbox_root=pathlib.Path("bu logger.addHandler(console_handler) self.logger = logger - if sandbox_root.exists(): - if not sandbox_root.is_dir(): + if sandbox_root is None: + self.sandbox_root = self.SANDBOX_ROOT + else: + self.sandbox_root = sandbox_root + if self.sandbox_root.exists(): + if not self.sandbox_root.is_dir(): raise Exception("sandbox_root exists, but is not a directory") else: - self.logger.info("sandbox_root does not exist. Creating...") - sandbox_root.mkdir() - self.sandbox_root = sandbox_root + self.logger.info("Sandbox root does not exist. Creating...") + self.sandbox_root.mkdir() - self.ungoogled_dir = self.sandbox_root / pathlib.Path(".ungoogled") + self.ungoogled_dir = self.sandbox_root / self.UNGOOGLED_DIR if self.ungoogled_dir.exists(): if not self.ungoogled_dir.is_dir(): raise Exception("ungoogled_dir exists, but is not a directory") @@ -68,6 +86,25 @@ def __init__(self, version, revision, logger=None, sandbox_root=pathlib.Path("bu self.ninja_command = None self.build_output = None + self._ran_domain_substitution = False + self._domain_regex_cache = None + + def _read_list_resource(self, file_name, is_binary=False): + if is_binary: + file_mode = "rb" + else: + file_mode = "r" + common_path = self.COMMON_RESOURCES / file_name + with common_path.open(file_mode) as f: + tmp_list = f.read().splitlines() + if not self.PLATFORM_RESOURCES is None: + platform_path = self.PLATFORM_RESOURCES / file_name + if platform_path.exists(): + with platform_path.open(file_mode) as f: + tmp_list.extend(f.read().splitlines()) + self.logger.debug("Successfully appended platform list") + return [x for x in tmp_list if len(x) > 0] + def _check_source_archive(self): ''' Runs integrity checks on the source archive @@ -126,16 +163,18 @@ def append(self, obj): self.logger.error("Exception thrown for tar member {}".format(tarinfo.name)) raise e - def _domain_substitute(self, regex_defs, file_list, log_warnings=True): + def _get_parsed_domain_regexes(self): + if self._domain_regex_cache is None: + self._domain_regex_cache = list() + for expression in self._read_list_resource(self.DOMAIN_REGEX_LIST, is_binary=True): + expression = expression.split(b'#') + self._domain_regex_cache.append((re.compile(expression[0]), expression[1])) + return self._domain_regex_cache + + def _domain_substitute(self, regex_list, file_list, log_warnings=True): ''' - Runs domain substitution with regex_strings over files file_list + Runs domain substitution with regex_list over files file_list ''' - regex_list = list() - with regex_defs.open(mode="rb") as f: - for expression in f.read().splitlines(): - if not expression == "": - expression = expression.split(b'#') - regex_list.append((re.compile(expression[0]), expression[1])) for path in file_list: try: with path.open(mode="r+b") as f: @@ -155,6 +194,27 @@ def _domain_substitute(self, regex_defs, file_list, log_warnings=True): self.logger.error("Exception thrown for path {}".format(path)) raise e + def _generate_patches(self, output_dir, run_domain_substitution): + platform_patch_order = self.PLATFORM_RESOURCES / self.PATCHES / self.PATCH_ORDER + platform_patches_exist = (not self.PLATFORM_RESOURCES is None) and platform_patch_order.exists() + with (self.COMMON_RESOURCES / self.PATCHES / self.PATCH_ORDER).open() as f: + new_patch_order = f.read() + if platform_patches_exist: + self.logger.debug("Using platform patches") + with platform_patch_order.open() as f: + new_patch_order += f.read() + + distutils.dir_util.copy_tree(str(self.COMMON_RESOURCES / self.PATCHES), str(output_dir)) + (output_dir / self.PATCH_ORDER).unlink() + distutils.dir_util.copy_tree(str(self.PLATFORM_RESOURCES / self.PATCHES), str(output_dir)) + (output_dir / self.PATCH_ORDER).unlink() + with (output_dir / self.PATCH_ORDER).open("w") as f: + f.write(new_patch_order) + + if run_domain_substitution: + self.logger.debug("Running domain substitution over patches...") + self._domain_substitute(self._get_parsed_domain_regexes(), self.sandbox_patches.rglob("*.patch"), log_warnings=False) + def _gyp_generate_ninja(self, args_list, build_output, python2_command): command_list = list() if not python2_command is None: @@ -226,7 +286,7 @@ def _build_gn(self, python2_command): self._run_ninja(build_output, ["gn"]) return str(build_output / pathlib.Path("gn")) - def setup_chromium_source(self, check_if_exists=True, force_download=False, check_integrity=True, extract_archive=True, destination_dir=pathlib.Path("."), cleaning_list=pathlib.Path("cleaning_list"), archive_path=None, hashes_path=None): + def setup_chromium_source(self, check_if_exists=True, force_download=False, check_integrity=True, extract_archive=True, destination_dir=pathlib.Path("."), use_cleaning_list=True, archive_path=None, hashes_path=None): ''' Sets up the Chromium source code in the build sandbox. It can download the source code in .tar.xz format, integrity check it, and extract it into the build sandbox while excluding any files in the cleaning list. @@ -235,7 +295,7 @@ def setup_chromium_source(self, check_if_exists=True, force_download=False, chec If `check_integrity` is True, then the source archive will be integrity checked. Otherwise no hashes file will be downloaded and no integrity checking is done. If `extract_archive` is True, then the source archive will be extracted into the build sandbox. `destination_dir` specifies the directory for downloading the source archive and the hashes file to. - `cleaning_list` specifies the file containing the list of files to exclude from the source archive during extraction. + `use_cleaning_list` specifies whether to use the cleaning lists or not (common and platform) If `archive_path` is set, it must be a pathlib path instance that specifies the location to an existing source archive. It will cause the skipping of downloading the the source archive. It must be set alongside `hashes_path`. `hashes_path` must be a pathlib path that points to the hashes file. It will be ignored if `archive_path` is set to None. ''' @@ -277,24 +337,25 @@ def setup_chromium_source(self, check_if_exists=True, force_download=False, chec if extract_archive: self.logger.info("Extracting source archive into building sandbox...") - if cleaning_list is None: - self._extract_source_archive(list()) + if use_cleaning_list: + list_obj = self._read_list_resource(self.CLEANING_LIST) + self._extract_source_archive(list_obj) + for i in list_obj: + self.logger.warning("File does not exist in tar file: {}".format(i)) else: - with cleaning_list.open() as f: - self._extract_source_archive([x for x in f.read().splitlines() if x != ""]) + self._extract_source_archive(list()) - def setup_build_sandbox(self, run_domain_substitution=True, domain_regexes=pathlib.Path("domain_regex_list"), domain_sub_list=pathlib.Path("domain_substitution_list")): + def setup_build_sandbox(self, run_domain_substitution=True): ''' Sets up the build sandbox. For now, this function can do domain substitution. ''' if run_domain_substitution: self.logger.info("Running domain substitution over build sandbox...") def file_list_generator(): - with domain_sub_list.open() as f: - for x in f.read().splitlines(): - if x != "": - yield self.sandbox_root / pathlib.Path(*pathlib.PurePosixPath(x).parts) - self._domain_substitute(domain_regexes, file_list_generator()) + for x in self._read_list_resource(self.DOMAIN_SUBSTITUTION_LIST): + yield self.sandbox_root / pathlib.Path(*pathlib.PurePosixPath(x).parts) + self._domain_substitute(self._get_parsed_domain_regexes(), file_list_generator()) + self._ran_domain_substitution = True def apply_patches(self): # TODO: Use Python to apply patches defined in `patch_order` @@ -329,17 +390,16 @@ def setup_build_utilities(self, ninja_command="ninja"): # self._gn_write_args(config, build_output) # self._gn_generate_ninja(build_output) - def generate_build_configuration(self, gyp_flags=pathlib.Path("gyp_flags"), build_output=pathlib.Path("out", "Release"), python2_command=None): + def generate_build_configuration(self, build_output=pathlib.Path("out", "Release"), python2_command=None): self.logger.info("Running gyp command...") - gyp_list = list() - with gyp_flags.open() as f: - gyp_list = f.read().splitlines() - self._gyp_generate_ninja(gyp_list, build_output, python2_command) + self._gyp_generate_ninja(self._read_list_resource(self.GYP_FLAGS), build_output, python2_command) self.build_output = build_output - def build(self): + def build(self, build_targets=["chrome"]): self.logger.info("Running build command...") - self._run_ninja(self.build_output, ["chrome"]) + if self.build_output is None: + raise Exception("build_output member variable is not defined. Run generate_build_configuration() first or set it manually") + self._run_ninja(self.build_output, build_targets) def generate_package(self): # TODO: Create .tar.xz of binaries? diff --git a/developer_utilities/quilt_patches.py b/developer_utilities/quilt_patches.py index 8ee1679be0..134136951d 100755 --- a/developer_utilities/quilt_patches.py +++ b/developer_utilities/quilt_patches.py @@ -33,13 +33,13 @@ import configparser import sys -if not pathlib.Path("building").is_dir(): - print("ERROR: Run this in the same directory as 'building'") +if not pathlib.Path("buildlib").is_dir(): + print("ERROR: Run this in the same directory as 'buildlib'") exit(1) sys.path.insert(1, str(pathlib.Path.cwd().resolve())) -import building.debian +import buildlib.debian def read_version_config(config_location): config = configparser.ConfigParser() @@ -55,10 +55,8 @@ def main(action, patch_name=None): print_help() return 0 - platform = building.debian.DebianPlatform(*read_version_config("version.ini")) - # TODO: Make these configurable - platform._domains_subbed = True - platform._regex_defs_used = pathlib.Path("domain_regex_list") + platform = buildlib.debian.DebianPlatform(*read_version_config("version.ini")) + platform._ran_domain_substitution = True # TODO: Make this configurable if action == "recreate": if platform.sandbox_patches.exists(): @@ -67,7 +65,7 @@ def main(action, patch_name=None): return 0 new_env = dict(os.environ) - new_env.update(building.debian.QUILT_ENV_VARS) + new_env.update(platform.quilt_env_vars) if action == "top": result = subprocess.run(["quilt", "top"], env=new_env, cwd=str(platform.sandbox_root)) print(result) diff --git a/developer_utilities/update_helper.py b/developer_utilities/update_helper.py index 3ffb5f8d79..3dcebe0be4 100755 --- a/developer_utilities/update_helper.py +++ b/developer_utilities/update_helper.py @@ -32,15 +32,15 @@ import configparser import sys -if not pathlib.Path("building").is_dir(): - print("ERROR: Run this in the same directory as 'building'") +if not pathlib.Path("buildlib").is_dir(): + print("ERROR: Run this in the same directory as 'buildlib'") exit(1) sys.path.insert(1, str(pathlib.Path.cwd().resolve())) -import building.debian +import buildlib.debian -def generate_cleaning_list(sandbox_path, list_file=pathlib.Path("cleaning_list")): +def generate_cleaning_list(sandbox_path, list_file): exclude_matches = [ "components/dom_distiller/core/data/distillable_page_model.bin", "components/dom_distiller/core/data/distillable_page_model_new.bin", @@ -123,7 +123,7 @@ def check_regex_match(file_path, parsed_regex_list): return True return False -def generate_domain_substitution_list(sandbox_path, list_file=pathlib.Path("domain_substitution_list"), regex_defs=pathlib.Path("domain_regex_list")): +def generate_domain_substitution_list(sandbox_path, list_file, regex_defs): exclude_left_matches = [ "components/test/", "net/http/transport_security_state_static.json" @@ -211,12 +211,12 @@ def main(): chromium_version, release_revision = read_version_config("version.ini") - platform = building.debian.DebianPlatform(chromium_version, release_revision, logger=logger) + platform = buildlib.debian.DebianPlatform(chromium_version, release_revision, logger=logger) logger.info("Setting up Chromium source in build sandbox...") - platform.setup_chromium_source(cleaning_list=None) + platform.setup_chromium_source(use_cleaning_list=False) logger.info("Generating cleaning list...") - cleaning_list = generate_cleaning_list(platform.sandbox_root) + cleaning_list = generate_cleaning_list(platform.sandbox_root, (platform.COMMON_RESOURCES / platform.CLEANING_LIST)) logger.info("Removing files in cleaning list...") for i in cleaning_list: @@ -226,7 +226,7 @@ def main(): logger.error("File does not exist: {}".format(str(i))) logger.info("Generating domain substitution list...") - generate_domain_substitution_list(platform.sandbox_root) + generate_domain_substitution_list(platform.sandbox_root, (platform.COMMON_RESOURCES / platform.DOMAIN_SUBSTITUTION_LIST), (platform.COMMON_RESOURCES / platform.DOMAIN_REGEX_LIST)) # TODO: Autogenerate platform domain substutition list when platforms have their own domain substitutions logger.info("Running domain substitution...") platform.setup_build_sandbox() diff --git a/cleaning_list b/resources/common/cleaning_list similarity index 100% rename from cleaning_list rename to resources/common/cleaning_list diff --git a/domain_regex_list b/resources/common/domain_regex_list similarity index 100% rename from domain_regex_list rename to resources/common/domain_regex_list diff --git a/domain_substitution_list b/resources/common/domain_substitution_list similarity index 100% rename from domain_substitution_list rename to resources/common/domain_substitution_list diff --git a/gn_args.ini b/resources/common/gn_args.ini similarity index 100% rename from gn_args.ini rename to resources/common/gn_args.ini diff --git a/gyp_flags b/resources/common/gyp_flags similarity index 100% rename from gyp_flags rename to resources/common/gyp_flags diff --git a/patches/debian/disable/default-browser-warning.patch b/resources/common/patches/debian/disable/default-browser-warning.patch similarity index 100% rename from patches/debian/disable/default-browser-warning.patch rename to resources/common/patches/debian/disable/default-browser-warning.patch diff --git a/patches/debian/disable/external-components.patch b/resources/common/patches/debian/disable/external-components.patch similarity index 100% rename from patches/debian/disable/external-components.patch rename to resources/common/patches/debian/disable/external-components.patch diff --git a/patches/debian/disable/google-api-warning.patch b/resources/common/patches/debian/disable/google-api-warning.patch similarity index 100% rename from patches/debian/disable/google-api-warning.patch rename to resources/common/patches/debian/disable/google-api-warning.patch diff --git a/patches/debian/disable/promo.patch b/resources/common/patches/debian/disable/promo.patch similarity index 100% rename from patches/debian/disable/promo.patch rename to resources/common/patches/debian/disable/promo.patch diff --git a/patches/debian/gpu-timeout.patch b/resources/common/patches/debian/gpu-timeout.patch similarity index 100% rename from patches/debian/gpu-timeout.patch rename to resources/common/patches/debian/gpu-timeout.patch diff --git a/patches/debian/ps-print.patch b/resources/common/patches/debian/ps-print.patch similarity index 100% rename from patches/debian/ps-print.patch rename to resources/common/patches/debian/ps-print.patch diff --git a/patches/debian/webui.patch b/resources/common/patches/debian/webui.patch similarity index 100% rename from patches/debian/webui.patch rename to resources/common/patches/debian/webui.patch diff --git a/patches/inox-patchset/disable-autofill-download-manager.patch b/resources/common/patches/inox-patchset/disable-autofill-download-manager.patch similarity index 100% rename from patches/inox-patchset/disable-autofill-download-manager.patch rename to resources/common/patches/inox-patchset/disable-autofill-download-manager.patch diff --git a/patches/inox-patchset/disable-default-extensions.patch b/resources/common/patches/inox-patchset/disable-default-extensions.patch similarity index 100% rename from patches/inox-patchset/disable-default-extensions.patch rename to resources/common/patches/inox-patchset/disable-default-extensions.patch diff --git a/patches/inox-patchset/disable-first-run-behaviour.patch b/resources/common/patches/inox-patchset/disable-first-run-behaviour.patch similarity index 100% rename from patches/inox-patchset/disable-first-run-behaviour.patch rename to resources/common/patches/inox-patchset/disable-first-run-behaviour.patch diff --git a/patches/inox-patchset/disable-google-url-tracker.patch b/resources/common/patches/inox-patchset/disable-google-url-tracker.patch similarity index 100% rename from patches/inox-patchset/disable-google-url-tracker.patch rename to resources/common/patches/inox-patchset/disable-google-url-tracker.patch diff --git a/patches/inox-patchset/disable-new-avatar-menu.patch b/resources/common/patches/inox-patchset/disable-new-avatar-menu.patch similarity index 100% rename from patches/inox-patchset/disable-new-avatar-menu.patch rename to resources/common/patches/inox-patchset/disable-new-avatar-menu.patch diff --git a/patches/inox-patchset/disable-translation-lang-fetch.patch b/resources/common/patches/inox-patchset/disable-translation-lang-fetch.patch similarity index 100% rename from patches/inox-patchset/disable-translation-lang-fetch.patch rename to resources/common/patches/inox-patchset/disable-translation-lang-fetch.patch diff --git a/patches/inox-patchset/modify-default-prefs.patch b/resources/common/patches/inox-patchset/modify-default-prefs.patch similarity index 100% rename from patches/inox-patchset/modify-default-prefs.patch rename to resources/common/patches/inox-patchset/modify-default-prefs.patch diff --git a/patches/iridium-browser/Remove-EV-certificates.patch b/resources/common/patches/iridium-browser/Remove-EV-certificates.patch similarity index 100% rename from patches/iridium-browser/Remove-EV-certificates.patch rename to resources/common/patches/iridium-browser/Remove-EV-certificates.patch diff --git a/patches/iridium-browser/all-add-trk-prefixes-to-possibly-evil-connections.patch b/resources/common/patches/iridium-browser/all-add-trk-prefixes-to-possibly-evil-connections.patch similarity index 100% rename from patches/iridium-browser/all-add-trk-prefixes-to-possibly-evil-connections.patch rename to resources/common/patches/iridium-browser/all-add-trk-prefixes-to-possibly-evil-connections.patch diff --git a/patches/iridium-browser/autofill-disable-autofill-download-manager.patch b/resources/common/patches/iridium-browser/autofill-disable-autofill-download-manager.patch similarity index 100% rename from patches/iridium-browser/autofill-disable-autofill-download-manager.patch rename to resources/common/patches/iridium-browser/autofill-disable-autofill-download-manager.patch diff --git a/patches/iridium-browser/battery_status_service-disable-more-privacy-nightmar.patch b/resources/common/patches/iridium-browser/battery_status_service-disable-more-privacy-nightmar.patch similarity index 100% rename from patches/iridium-browser/battery_status_service-disable-more-privacy-nightmar.patch rename to resources/common/patches/iridium-browser/battery_status_service-disable-more-privacy-nightmar.patch diff --git a/patches/iridium-browser/browser-disable-profile-auto-import-on-first-run.patch b/resources/common/patches/iridium-browser/browser-disable-profile-auto-import-on-first-run.patch similarity index 100% rename from patches/iridium-browser/browser-disable-profile-auto-import-on-first-run.patch rename to resources/common/patches/iridium-browser/browser-disable-profile-auto-import-on-first-run.patch diff --git a/patches/iridium-browser/browser-ui-disable-warning-about-missing-API-keys.patch b/resources/common/patches/iridium-browser/browser-ui-disable-warning-about-missing-API-keys.patch similarity index 100% rename from patches/iridium-browser/browser-ui-disable-warning-about-missing-API-keys.patch rename to resources/common/patches/iridium-browser/browser-ui-disable-warning-about-missing-API-keys.patch diff --git a/patches/iridium-browser/build-build-the-sandbox-with-PIE.patch b/resources/common/patches/iridium-browser/build-build-the-sandbox-with-PIE.patch similarity index 100% rename from patches/iridium-browser/build-build-the-sandbox-with-PIE.patch rename to resources/common/patches/iridium-browser/build-build-the-sandbox-with-PIE.patch diff --git a/patches/iridium-browser/build-use-Wl-no-keep-memory.patch b/resources/common/patches/iridium-browser/build-use-Wl-no-keep-memory.patch similarity index 100% rename from patches/iridium-browser/build-use-Wl-no-keep-memory.patch rename to resources/common/patches/iridium-browser/build-use-Wl-no-keep-memory.patch diff --git a/patches/iridium-browser/cloud-print-disable-in-prefs-and-component-loader.patch b/resources/common/patches/iridium-browser/cloud-print-disable-in-prefs-and-component-loader.patch similarity index 100% rename from patches/iridium-browser/cloud-print-disable-in-prefs-and-component-loader.patch rename to resources/common/patches/iridium-browser/cloud-print-disable-in-prefs-and-component-loader.patch diff --git a/patches/iridium-browser/dns-send-IPv6-connectivity-probes-to-RIPE-DNS-rather.patch b/resources/common/patches/iridium-browser/dns-send-IPv6-connectivity-probes-to-RIPE-DNS-rather.patch similarity index 100% rename from patches/iridium-browser/dns-send-IPv6-connectivity-probes-to-RIPE-DNS-rather.patch rename to resources/common/patches/iridium-browser/dns-send-IPv6-connectivity-probes-to-RIPE-DNS-rather.patch diff --git a/patches/iridium-browser/extensions-always-show-component-extensions-in-the-e.patch b/resources/common/patches/iridium-browser/extensions-always-show-component-extensions-in-the-e.patch similarity index 100% rename from patches/iridium-browser/extensions-always-show-component-extensions-in-the-e.patch rename to resources/common/patches/iridium-browser/extensions-always-show-component-extensions-in-the-e.patch diff --git a/patches/iridium-browser/first_run-barf-if-metrics_reporting-is-activated.patch b/resources/common/patches/iridium-browser/first_run-barf-if-metrics_reporting-is-activated.patch similarity index 100% rename from patches/iridium-browser/first_run-barf-if-metrics_reporting-is-activated.patch rename to resources/common/patches/iridium-browser/first_run-barf-if-metrics_reporting-is-activated.patch diff --git a/patches/iridium-browser/first_run-deactivate-autoupdate-globally.patch b/resources/common/patches/iridium-browser/first_run-deactivate-autoupdate-globally.patch similarity index 100% rename from patches/iridium-browser/first_run-deactivate-autoupdate-globally.patch rename to resources/common/patches/iridium-browser/first_run-deactivate-autoupdate-globally.patch diff --git a/patches/iridium-browser/google-cloud-messaging-disable-experiment-status-che.patch b/resources/common/patches/iridium-browser/google-cloud-messaging-disable-experiment-status-che.patch similarity index 100% rename from patches/iridium-browser/google-cloud-messaging-disable-experiment-status-che.patch rename to resources/common/patches/iridium-browser/google-cloud-messaging-disable-experiment-status-che.patch diff --git a/patches/iridium-browser/google_now-disable-this.patch b/resources/common/patches/iridium-browser/google_now-disable-this.patch similarity index 100% rename from patches/iridium-browser/google_now-disable-this.patch rename to resources/common/patches/iridium-browser/google_now-disable-this.patch diff --git a/patches/iridium-browser/hotword-disable-at-build-time-by-default.patch b/resources/common/patches/iridium-browser/hotword-disable-at-build-time-by-default.patch similarity index 100% rename from patches/iridium-browser/hotword-disable-at-build-time-by-default.patch rename to resources/common/patches/iridium-browser/hotword-disable-at-build-time-by-default.patch diff --git a/patches/iridium-browser/mime_util-force-text-x-suse-ymp-to-be-downloaded.patch b/resources/common/patches/iridium-browser/mime_util-force-text-x-suse-ymp-to-be-downloaded.patch similarity index 100% rename from patches/iridium-browser/mime_util-force-text-x-suse-ymp-to-be-downloaded.patch rename to resources/common/patches/iridium-browser/mime_util-force-text-x-suse-ymp-to-be-downloaded.patch diff --git a/patches/iridium-browser/net-add-trk-scheme-and-help-identify-URLs-being-retr.patch b/resources/common/patches/iridium-browser/net-add-trk-scheme-and-help-identify-URLs-being-retr.patch similarity index 100% rename from patches/iridium-browser/net-add-trk-scheme-and-help-identify-URLs-being-retr.patch rename to resources/common/patches/iridium-browser/net-add-trk-scheme-and-help-identify-URLs-being-retr.patch diff --git a/patches/iridium-browser/net-cert-increase-default-key-length-for-newly-gener.patch b/resources/common/patches/iridium-browser/net-cert-increase-default-key-length-for-newly-gener.patch similarity index 100% rename from patches/iridium-browser/net-cert-increase-default-key-length-for-newly-gener.patch rename to resources/common/patches/iridium-browser/net-cert-increase-default-key-length-for-newly-gener.patch diff --git a/patches/iridium-browser/prefs-always-prompt-for-download-directory-by-defaul.patch b/resources/common/patches/iridium-browser/prefs-always-prompt-for-download-directory-by-defaul.patch similarity index 100% rename from patches/iridium-browser/prefs-always-prompt-for-download-directory-by-defaul.patch rename to resources/common/patches/iridium-browser/prefs-always-prompt-for-download-directory-by-defaul.patch diff --git a/patches/iridium-browser/prefs-block-third-party-cookies-by-default.patch b/resources/common/patches/iridium-browser/prefs-block-third-party-cookies-by-default.patch similarity index 100% rename from patches/iridium-browser/prefs-block-third-party-cookies-by-default.patch rename to resources/common/patches/iridium-browser/prefs-block-third-party-cookies-by-default.patch diff --git a/patches/iridium-browser/prefs-disable-Use-a-prediction-service-to-help-compl.patch b/resources/common/patches/iridium-browser/prefs-disable-Use-a-prediction-service-to-help-compl.patch similarity index 100% rename from patches/iridium-browser/prefs-disable-Use-a-prediction-service-to-help-compl.patch rename to resources/common/patches/iridium-browser/prefs-disable-Use-a-prediction-service-to-help-compl.patch diff --git a/patches/iridium-browser/prefs-disable-Use-a-web-service-to-help-resolve-navi.patch b/resources/common/patches/iridium-browser/prefs-disable-Use-a-web-service-to-help-resolve-navi.patch similarity index 100% rename from patches/iridium-browser/prefs-disable-Use-a-web-service-to-help-resolve-navi.patch rename to resources/common/patches/iridium-browser/prefs-disable-Use-a-web-service-to-help-resolve-navi.patch diff --git a/patches/iridium-browser/prefs-disable-background-mode-by-default.patch b/resources/common/patches/iridium-browser/prefs-disable-background-mode-by-default.patch similarity index 100% rename from patches/iridium-browser/prefs-disable-background-mode-by-default.patch rename to resources/common/patches/iridium-browser/prefs-disable-background-mode-by-default.patch diff --git a/patches/iridium-browser/prefs-disable-hyperlink-auditing.patch b/resources/common/patches/iridium-browser/prefs-disable-hyperlink-auditing.patch similarity index 100% rename from patches/iridium-browser/prefs-disable-hyperlink-auditing.patch rename to resources/common/patches/iridium-browser/prefs-disable-hyperlink-auditing.patch diff --git a/patches/iridium-browser/prefs-disable-network-DNS-prediction.patch b/resources/common/patches/iridium-browser/prefs-disable-network-DNS-prediction.patch similarity index 100% rename from patches/iridium-browser/prefs-disable-network-DNS-prediction.patch rename to resources/common/patches/iridium-browser/prefs-disable-network-DNS-prediction.patch diff --git a/patches/iridium-browser/prefs-disable-translation-service.patch b/resources/common/patches/iridium-browser/prefs-disable-translation-service.patch similarity index 100% rename from patches/iridium-browser/prefs-disable-translation-service.patch rename to resources/common/patches/iridium-browser/prefs-disable-translation-service.patch diff --git a/patches/iridium-browser/prefs-do-not-store-passwords-by-default.patch b/resources/common/patches/iridium-browser/prefs-do-not-store-passwords-by-default.patch similarity index 100% rename from patches/iridium-browser/prefs-do-not-store-passwords-by-default.patch rename to resources/common/patches/iridium-browser/prefs-do-not-store-passwords-by-default.patch diff --git a/patches/iridium-browser/prefs-only-keep-cookies-until-exit.patch b/resources/common/patches/iridium-browser/prefs-only-keep-cookies-until-exit.patch similarity index 100% rename from patches/iridium-browser/prefs-only-keep-cookies-until-exit.patch rename to resources/common/patches/iridium-browser/prefs-only-keep-cookies-until-exit.patch diff --git a/patches/iridium-browser/profile-resetter-do-not-tick-send-settings-by-defaul.patch b/resources/common/patches/iridium-browser/profile-resetter-do-not-tick-send-settings-by-defaul.patch similarity index 100% rename from patches/iridium-browser/profile-resetter-do-not-tick-send-settings-by-defaul.patch rename to resources/common/patches/iridium-browser/profile-resetter-do-not-tick-send-settings-by-defaul.patch diff --git a/patches/iridium-browser/promo-disable-Google-promotion-fetching.patch b/resources/common/patches/iridium-browser/promo-disable-Google-promotion-fetching.patch similarity index 100% rename from patches/iridium-browser/promo-disable-Google-promotion-fetching.patch rename to resources/common/patches/iridium-browser/promo-disable-Google-promotion-fetching.patch diff --git a/patches/iridium-browser/safe_browsing-disable-cookie-transmission.patch b/resources/common/patches/iridium-browser/safe_browsing-disable-cookie-transmission.patch similarity index 100% rename from patches/iridium-browser/safe_browsing-disable-cookie-transmission.patch rename to resources/common/patches/iridium-browser/safe_browsing-disable-cookie-transmission.patch diff --git a/patches/iridium-browser/safe_browsing-disable-incident-reporting.patch b/resources/common/patches/iridium-browser/safe_browsing-disable-incident-reporting.patch similarity index 100% rename from patches/iridium-browser/safe_browsing-disable-incident-reporting.patch rename to resources/common/patches/iridium-browser/safe_browsing-disable-incident-reporting.patch diff --git a/patches/iridium-browser/safe_browsing-disable-reporting-of-safebrowsing-over.patch b/resources/common/patches/iridium-browser/safe_browsing-disable-reporting-of-safebrowsing-over.patch similarity index 100% rename from patches/iridium-browser/safe_browsing-disable-reporting-of-safebrowsing-over.patch rename to resources/common/patches/iridium-browser/safe_browsing-disable-reporting-of-safebrowsing-over.patch diff --git a/patches/iridium-browser/safe_browsing-support-trk-prefix.patch b/resources/common/patches/iridium-browser/safe_browsing-support-trk-prefix.patch similarity index 100% rename from patches/iridium-browser/safe_browsing-support-trk-prefix.patch rename to resources/common/patches/iridium-browser/safe_browsing-support-trk-prefix.patch diff --git a/patches/iridium-browser/search-show-blank-tab-for-new-tab-page.patch b/resources/common/patches/iridium-browser/search-show-blank-tab-for-new-tab-page.patch similarity index 100% rename from patches/iridium-browser/search-show-blank-tab-for-new-tab-page.patch rename to resources/common/patches/iridium-browser/search-show-blank-tab-for-new-tab-page.patch diff --git a/patches/iridium-browser/spellchecker-flag-downloading-dictionary-from-Google.patch b/resources/common/patches/iridium-browser/spellchecker-flag-downloading-dictionary-from-Google.patch similarity index 100% rename from patches/iridium-browser/spellchecker-flag-downloading-dictionary-from-Google.patch rename to resources/common/patches/iridium-browser/spellchecker-flag-downloading-dictionary-from-Google.patch diff --git a/patches/iridium-browser/translate-disable-fetching-of-translate-languages-fr.patch b/resources/common/patches/iridium-browser/translate-disable-fetching-of-translate-languages-fr.patch similarity index 100% rename from patches/iridium-browser/translate-disable-fetching-of-translate-languages-fr.patch rename to resources/common/patches/iridium-browser/translate-disable-fetching-of-translate-languages-fr.patch diff --git a/patches/iridium-browser/updater-disable-auto-update.patch b/resources/common/patches/iridium-browser/updater-disable-auto-update.patch similarity index 100% rename from patches/iridium-browser/updater-disable-auto-update.patch rename to resources/common/patches/iridium-browser/updater-disable-auto-update.patch diff --git a/patches/iridium-browser/updater-disable-updater-pings.patch b/resources/common/patches/iridium-browser/updater-disable-updater-pings.patch similarity index 100% rename from patches/iridium-browser/updater-disable-updater-pings.patch rename to resources/common/patches/iridium-browser/updater-disable-updater-pings.patch diff --git a/patches/iridium-browser/webrtc-disable-WebRTC-identity-store.patch b/resources/common/patches/iridium-browser/webrtc-disable-WebRTC-identity-store.patch similarity index 100% rename from patches/iridium-browser/webrtc-disable-WebRTC-identity-store.patch rename to resources/common/patches/iridium-browser/webrtc-disable-WebRTC-identity-store.patch diff --git a/patches/iridium-browser/webrtc-generate-real-ephemeral-keys.patch b/resources/common/patches/iridium-browser/webrtc-generate-real-ephemeral-keys.patch similarity index 100% rename from patches/iridium-browser/webrtc-generate-real-ephemeral-keys.patch rename to resources/common/patches/iridium-browser/webrtc-generate-real-ephemeral-keys.patch diff --git a/patches/patch_order b/resources/common/patches/patch_order similarity index 100% rename from patches/patch_order rename to resources/common/patches/patch_order diff --git a/patches/ungoogled-chromium/change-trace-infobar-message.patch b/resources/common/patches/ungoogled-chromium/change-trace-infobar-message.patch similarity index 100% rename from patches/ungoogled-chromium/change-trace-infobar-message.patch rename to resources/common/patches/ungoogled-chromium/change-trace-infobar-message.patch diff --git a/patches/ungoogled-chromium/clear-http-auth-cache-menu-item.patch b/resources/common/patches/ungoogled-chromium/clear-http-auth-cache-menu-item.patch similarity index 100% rename from patches/ungoogled-chromium/clear-http-auth-cache-menu-item.patch rename to resources/common/patches/ungoogled-chromium/clear-http-auth-cache-menu-item.patch diff --git a/patches/ungoogled-chromium/disable-copresence.patch b/resources/common/patches/ungoogled-chromium/disable-copresence.patch similarity index 100% rename from patches/ungoogled-chromium/disable-copresence.patch rename to resources/common/patches/ungoogled-chromium/disable-copresence.patch diff --git a/patches/ungoogled-chromium/disable-crash-reporter.patch b/resources/common/patches/ungoogled-chromium/disable-crash-reporter.patch similarity index 100% rename from patches/ungoogled-chromium/disable-crash-reporter.patch rename to resources/common/patches/ungoogled-chromium/disable-crash-reporter.patch diff --git a/patches/ungoogled-chromium/disable-domain-reliability.patch b/resources/common/patches/ungoogled-chromium/disable-domain-reliability.patch similarity index 100% rename from patches/ungoogled-chromium/disable-domain-reliability.patch rename to resources/common/patches/ungoogled-chromium/disable-domain-reliability.patch diff --git a/patches/ungoogled-chromium/disable-formatting-in-omnibox.patch b/resources/common/patches/ungoogled-chromium/disable-formatting-in-omnibox.patch similarity index 100% rename from patches/ungoogled-chromium/disable-formatting-in-omnibox.patch rename to resources/common/patches/ungoogled-chromium/disable-formatting-in-omnibox.patch diff --git a/patches/ungoogled-chromium/disable-gcm.patch b/resources/common/patches/ungoogled-chromium/disable-gcm.patch similarity index 100% rename from patches/ungoogled-chromium/disable-gcm.patch rename to resources/common/patches/ungoogled-chromium/disable-gcm.patch diff --git a/patches/ungoogled-chromium/disable-google-host-detection.patch b/resources/common/patches/ungoogled-chromium/disable-google-host-detection.patch similarity index 100% rename from patches/ungoogled-chromium/disable-google-host-detection.patch rename to resources/common/patches/ungoogled-chromium/disable-google-host-detection.patch diff --git a/patches/ungoogled-chromium/disable-intranet-redirect-detector.patch b/resources/common/patches/ungoogled-chromium/disable-intranet-redirect-detector.patch similarity index 100% rename from patches/ungoogled-chromium/disable-intranet-redirect-detector.patch rename to resources/common/patches/ungoogled-chromium/disable-intranet-redirect-detector.patch diff --git a/patches/ungoogled-chromium/disable-ipv6-pinging.patch b/resources/common/patches/ungoogled-chromium/disable-ipv6-pinging.patch similarity index 100% rename from patches/ungoogled-chromium/disable-ipv6-pinging.patch rename to resources/common/patches/ungoogled-chromium/disable-ipv6-pinging.patch diff --git a/patches/ungoogled-chromium/disable-logging-urls-to-stderr.patch b/resources/common/patches/ungoogled-chromium/disable-logging-urls-to-stderr.patch similarity index 100% rename from patches/ungoogled-chromium/disable-logging-urls-to-stderr.patch rename to resources/common/patches/ungoogled-chromium/disable-logging-urls-to-stderr.patch diff --git a/patches/ungoogled-chromium/disable-omnibox-searching.patch b/resources/common/patches/ungoogled-chromium/disable-omnibox-searching.patch similarity index 100% rename from patches/ungoogled-chromium/disable-omnibox-searching.patch rename to resources/common/patches/ungoogled-chromium/disable-omnibox-searching.patch diff --git a/patches/ungoogled-chromium/disable-persistent-site-properties.patch b/resources/common/patches/ungoogled-chromium/disable-persistent-site-properties.patch similarity index 100% rename from patches/ungoogled-chromium/disable-persistent-site-properties.patch rename to resources/common/patches/ungoogled-chromium/disable-persistent-site-properties.patch diff --git a/patches/ungoogled-chromium/disable-profile-avatar-downloading.patch b/resources/common/patches/ungoogled-chromium/disable-profile-avatar-downloading.patch similarity index 100% rename from patches/ungoogled-chromium/disable-profile-avatar-downloading.patch rename to resources/common/patches/ungoogled-chromium/disable-profile-avatar-downloading.patch diff --git a/patches/ungoogled-chromium/disable-signin.patch b/resources/common/patches/ungoogled-chromium/disable-signin.patch similarity index 100% rename from patches/ungoogled-chromium/disable-signin.patch rename to resources/common/patches/ungoogled-chromium/disable-signin.patch diff --git a/patches/ungoogled-chromium/disable-translate.patch b/resources/common/patches/ungoogled-chromium/disable-translate.patch similarity index 100% rename from patches/ungoogled-chromium/disable-translate.patch rename to resources/common/patches/ungoogled-chromium/disable-translate.patch diff --git a/patches/ungoogled-chromium/disable-unload-javascript-dialog-box.patch b/resources/common/patches/ungoogled-chromium/disable-unload-javascript-dialog-box.patch similarity index 100% rename from patches/ungoogled-chromium/disable-unload-javascript-dialog-box.patch rename to resources/common/patches/ungoogled-chromium/disable-unload-javascript-dialog-box.patch diff --git a/patches/ungoogled-chromium/disable-untraceable-urls.patch b/resources/common/patches/ungoogled-chromium/disable-untraceable-urls.patch similarity index 100% rename from patches/ungoogled-chromium/disable-untraceable-urls.patch rename to resources/common/patches/ungoogled-chromium/disable-untraceable-urls.patch diff --git a/patches/ungoogled-chromium/disable-web-resource-service.patch b/resources/common/patches/ungoogled-chromium/disable-web-resource-service.patch similarity index 100% rename from patches/ungoogled-chromium/disable-web-resource-service.patch rename to resources/common/patches/ungoogled-chromium/disable-web-resource-service.patch diff --git a/patches/ungoogled-chromium/fix-building-without-one-click-signin.patch b/resources/common/patches/ungoogled-chromium/fix-building-without-one-click-signin.patch similarity index 100% rename from patches/ungoogled-chromium/fix-building-without-one-click-signin.patch rename to resources/common/patches/ungoogled-chromium/fix-building-without-one-click-signin.patch diff --git a/patches/ungoogled-chromium/fix-building-without-safebrowsing.patch b/resources/common/patches/ungoogled-chromium/fix-building-without-safebrowsing.patch similarity index 100% rename from patches/ungoogled-chromium/fix-building-without-safebrowsing.patch rename to resources/common/patches/ungoogled-chromium/fix-building-without-safebrowsing.patch diff --git a/patches/ungoogled-chromium/intercept-all-modified-domains.patch b/resources/common/patches/ungoogled-chromium/intercept-all-modified-domains.patch similarity index 100% rename from patches/ungoogled-chromium/intercept-all-modified-domains.patch rename to resources/common/patches/ungoogled-chromium/intercept-all-modified-domains.patch diff --git a/patches/ungoogled-chromium/popups-to-tabs.patch b/resources/common/patches/ungoogled-chromium/popups-to-tabs.patch similarity index 100% rename from patches/ungoogled-chromium/popups-to-tabs.patch rename to resources/common/patches/ungoogled-chromium/popups-to-tabs.patch diff --git a/patches/ungoogled-chromium/prevent-trace-url-requests.patch b/resources/common/patches/ungoogled-chromium/prevent-trace-url-requests.patch similarity index 100% rename from patches/ungoogled-chromium/prevent-trace-url-requests.patch rename to resources/common/patches/ungoogled-chromium/prevent-trace-url-requests.patch diff --git a/patches/ungoogled-chromium/remove-disable-setuid-sandbox-as-bad-flag.patch b/resources/common/patches/ungoogled-chromium/remove-disable-setuid-sandbox-as-bad-flag.patch similarity index 100% rename from patches/ungoogled-chromium/remove-disable-setuid-sandbox-as-bad-flag.patch rename to resources/common/patches/ungoogled-chromium/remove-disable-setuid-sandbox-as-bad-flag.patch diff --git a/building/resources/debian/cleaning_list b/resources/debian/cleaning_list similarity index 100% rename from building/resources/debian/cleaning_list rename to resources/debian/cleaning_list diff --git a/building/resources/debian/dpkg_dir/changelog.in b/resources/debian/dpkg_dir/changelog.in similarity index 100% rename from building/resources/debian/dpkg_dir/changelog.in rename to resources/debian/dpkg_dir/changelog.in diff --git a/building/resources/debian/dpkg_dir/chrome-sandbox.install.in b/resources/debian/dpkg_dir/chrome-sandbox.install.in similarity index 100% rename from building/resources/debian/dpkg_dir/chrome-sandbox.install.in rename to resources/debian/dpkg_dir/chrome-sandbox.install.in diff --git a/building/resources/debian/dpkg_dir/chrome-sandbox.lintian-overrides b/resources/debian/dpkg_dir/chrome-sandbox.lintian-overrides similarity index 100% rename from building/resources/debian/dpkg_dir/chrome-sandbox.lintian-overrides rename to resources/debian/dpkg_dir/chrome-sandbox.lintian-overrides diff --git a/building/resources/debian/dpkg_dir/chromedriver.install.in b/resources/debian/dpkg_dir/chromedriver.install.in similarity index 100% rename from building/resources/debian/dpkg_dir/chromedriver.install.in rename to resources/debian/dpkg_dir/chromedriver.install.in diff --git a/building/resources/debian/dpkg_dir/chromium-l10n.install.in b/resources/debian/dpkg_dir/chromium-l10n.install.in similarity index 100% rename from building/resources/debian/dpkg_dir/chromium-l10n.install.in rename to resources/debian/dpkg_dir/chromium-l10n.install.in diff --git a/building/resources/debian/dpkg_dir/chromium.desktop b/resources/debian/dpkg_dir/chromium.desktop similarity index 100% rename from building/resources/debian/dpkg_dir/chromium.desktop rename to resources/debian/dpkg_dir/chromium.desktop diff --git a/building/resources/debian/dpkg_dir/chromium.dirs b/resources/debian/dpkg_dir/chromium.dirs similarity index 100% rename from building/resources/debian/dpkg_dir/chromium.dirs rename to resources/debian/dpkg_dir/chromium.dirs diff --git a/building/resources/debian/dpkg_dir/chromium.install.in b/resources/debian/dpkg_dir/chromium.install.in similarity index 100% rename from building/resources/debian/dpkg_dir/chromium.install.in rename to resources/debian/dpkg_dir/chromium.install.in diff --git a/building/resources/debian/dpkg_dir/chromium.links b/resources/debian/dpkg_dir/chromium.links similarity index 100% rename from building/resources/debian/dpkg_dir/chromium.links rename to resources/debian/dpkg_dir/chromium.links diff --git a/building/resources/debian/dpkg_dir/chromium.lintian-overrides b/resources/debian/dpkg_dir/chromium.lintian-overrides similarity index 100% rename from building/resources/debian/dpkg_dir/chromium.lintian-overrides rename to resources/debian/dpkg_dir/chromium.lintian-overrides diff --git a/building/resources/debian/dpkg_dir/chromium.manpages.in b/resources/debian/dpkg_dir/chromium.manpages.in similarity index 100% rename from building/resources/debian/dpkg_dir/chromium.manpages.in rename to resources/debian/dpkg_dir/chromium.manpages.in diff --git a/building/resources/debian/dpkg_dir/chromium.menu b/resources/debian/dpkg_dir/chromium.menu similarity index 100% rename from building/resources/debian/dpkg_dir/chromium.menu rename to resources/debian/dpkg_dir/chromium.menu diff --git a/building/resources/debian/dpkg_dir/chromium.postinst b/resources/debian/dpkg_dir/chromium.postinst similarity index 100% rename from building/resources/debian/dpkg_dir/chromium.postinst rename to resources/debian/dpkg_dir/chromium.postinst diff --git a/building/resources/debian/dpkg_dir/chromium.prerm b/resources/debian/dpkg_dir/chromium.prerm similarity index 100% rename from building/resources/debian/dpkg_dir/chromium.prerm rename to resources/debian/dpkg_dir/chromium.prerm diff --git a/building/resources/debian/dpkg_dir/chromium.xml b/resources/debian/dpkg_dir/chromium.xml similarity index 100% rename from building/resources/debian/dpkg_dir/chromium.xml rename to resources/debian/dpkg_dir/chromium.xml diff --git a/building/resources/debian/dpkg_dir/clean b/resources/debian/dpkg_dir/clean similarity index 100% rename from building/resources/debian/dpkg_dir/clean rename to resources/debian/dpkg_dir/clean diff --git a/building/resources/debian/dpkg_dir/compat b/resources/debian/dpkg_dir/compat similarity index 100% rename from building/resources/debian/dpkg_dir/compat rename to resources/debian/dpkg_dir/compat diff --git a/building/resources/debian/dpkg_dir/control b/resources/debian/dpkg_dir/control similarity index 100% rename from building/resources/debian/dpkg_dir/control rename to resources/debian/dpkg_dir/control diff --git a/building/resources/debian/dpkg_dir/default-flags b/resources/debian/dpkg_dir/default-flags similarity index 100% rename from building/resources/debian/dpkg_dir/default-flags rename to resources/debian/dpkg_dir/default-flags diff --git a/building/resources/debian/dpkg_dir/master_preferences b/resources/debian/dpkg_dir/master_preferences similarity index 100% rename from building/resources/debian/dpkg_dir/master_preferences rename to resources/debian/dpkg_dir/master_preferences diff --git a/building/resources/debian/dpkg_dir/presubj b/resources/debian/dpkg_dir/presubj similarity index 100% rename from building/resources/debian/dpkg_dir/presubj rename to resources/debian/dpkg_dir/presubj diff --git a/building/resources/debian/dpkg_dir/rules.in b/resources/debian/dpkg_dir/rules.in similarity index 100% rename from building/resources/debian/dpkg_dir/rules.in rename to resources/debian/dpkg_dir/rules.in diff --git a/building/resources/debian/dpkg_dir/scripts/chromium b/resources/debian/dpkg_dir/scripts/chromium similarity index 100% rename from building/resources/debian/dpkg_dir/scripts/chromium rename to resources/debian/dpkg_dir/scripts/chromium diff --git a/building/resources/debian/dpkg_dir/source/format b/resources/debian/dpkg_dir/source/format similarity index 100% rename from building/resources/debian/dpkg_dir/source/format rename to resources/debian/dpkg_dir/source/format diff --git a/building/resources/debian/dpkg_dir/source/lintian-overrides b/resources/debian/dpkg_dir/source/lintian-overrides similarity index 100% rename from building/resources/debian/dpkg_dir/source/lintian-overrides rename to resources/debian/dpkg_dir/source/lintian-overrides diff --git a/building/resources/debian/gn_args.ini b/resources/debian/gn_args.ini similarity index 100% rename from building/resources/debian/gn_args.ini rename to resources/debian/gn_args.ini diff --git a/building/resources/debian/gyp_flags b/resources/debian/gyp_flags similarity index 100% rename from building/resources/debian/gyp_flags rename to resources/debian/gyp_flags diff --git a/building/resources/debian/patches/manpage.patch b/resources/debian/patches/manpage.patch similarity index 100% rename from building/resources/debian/patches/manpage.patch rename to resources/debian/patches/manpage.patch diff --git a/building/resources/debian/patches/master-preferences.patch b/resources/debian/patches/master-preferences.patch similarity index 100% rename from building/resources/debian/patches/master-preferences.patch rename to resources/debian/patches/master-preferences.patch diff --git a/building/resources/debian/patches/series b/resources/debian/patches/patch_order similarity index 100% rename from building/resources/debian/patches/series rename to resources/debian/patches/patch_order diff --git a/building/resources/debian/patches/system/clang.patch b/resources/debian/patches/system/clang.patch similarity index 100% rename from building/resources/debian/patches/system/clang.patch rename to resources/debian/patches/system/clang.patch diff --git a/building/resources/debian/patches/system/ffmpeg.patch b/resources/debian/patches/system/ffmpeg.patch similarity index 100% rename from building/resources/debian/patches/system/ffmpeg.patch rename to resources/debian/patches/system/ffmpeg.patch diff --git a/building/resources/debian/patches/system/nspr.patch b/resources/debian/patches/system/nspr.patch similarity index 100% rename from building/resources/debian/patches/system/nspr.patch rename to resources/debian/patches/system/nspr.patch diff --git a/building/resources/debian/patches/system/speechd.patch b/resources/debian/patches/system/speechd.patch similarity index 100% rename from building/resources/debian/patches/system/speechd.patch rename to resources/debian/patches/system/speechd.patch diff --git a/building/resources/ubuntu/changelog b/resources/ubuntu/changelog similarity index 100% rename from building/resources/ubuntu/changelog rename to resources/ubuntu/changelog diff --git a/building/resources/ubuntu/patches/ubuntu_patches/ubuntu_patch_order b/resources/ubuntu/patches/ubuntu_patches/ubuntu_patch_order similarity index 100% rename from building/resources/ubuntu/patches/ubuntu_patches/ubuntu_patch_order rename to resources/ubuntu/patches/ubuntu_patches/ubuntu_patch_order diff --git a/building/resources/ubuntu/patches/ubuntu_patches/use-internal-libspeechd.patch b/resources/ubuntu/patches/ubuntu_patches/use-internal-libspeechd.patch similarity index 100% rename from building/resources/ubuntu/patches/ubuntu_patches/use-internal-libspeechd.patch rename to resources/ubuntu/patches/ubuntu_patches/use-internal-libspeechd.patch