From eb6fa731342d197c6678e8a0d74d23134e451a7e Mon Sep 17 00:00:00 2001 From: tectiv3 Date: Tue, 5 Jun 2018 08:29:34 +0900 Subject: [PATCH 01/10] Update safe browsing patches for macOS #414 --- .../config_bundles/macos/patch_order.list | 3 +- .../fix-building-without-safebrowsing.patch | 134 ++++++++++++++++++ .../macos/fix-gn-safe_browsing.patch | 8 +- .../macos/fix-older-sdk-declarations.patch | 11 ++ ...os-fix-building-without-safebrowsing.patch | 23 --- 5 files changed, 151 insertions(+), 28 deletions(-) create mode 100644 resources/patches/ungoogled-chromium/macos/fix-building-without-safebrowsing.patch create mode 100644 resources/patches/ungoogled-chromium/macos/fix-older-sdk-declarations.patch delete mode 100644 resources/patches/ungoogled-chromium/macos/macos-fix-building-without-safebrowsing.patch diff --git a/resources/config_bundles/macos/patch_order.list b/resources/config_bundles/macos/patch_order.list index cf1d104c..c68484d8 100644 --- a/resources/config_bundles/macos/patch_order.list +++ b/resources/config_bundles/macos/patch_order.list @@ -4,4 +4,5 @@ ungoogled-chromium/macos/fix-gn-bootstrap.patch ungoogled-chromium/macos/fix-gn-safe_browsing.patch ungoogled-chromium/macos/fix-mapped_file.patch ungoogled-chromium/macos/fix-visibility.patch -ungoogled-chromium/macos/macos-fix-building-without-safebrowsing.patch +ungoogled-chromium/macos/fix-building-without-safebrowsing.patch +ungoogled-chromium/macos/fix-older-sdk-declarations.patch \ No newline at end of file diff --git a/resources/patches/ungoogled-chromium/macos/fix-building-without-safebrowsing.patch b/resources/patches/ungoogled-chromium/macos/fix-building-without-safebrowsing.patch new file mode 100644 index 00000000..e8ac0c51 --- /dev/null +++ b/resources/patches/ungoogled-chromium/macos/fix-building-without-safebrowsing.patch @@ -0,0 +1,134 @@ +--- a/chrome/browser/chrome_content_browser_client.cc ++++ b/chrome/browser/chrome_content_browser_client.cc +@@ -4328,19 +4328,5 @@ void ChromeContentBrowserClient::SetDefa + safe_browsing::UrlCheckerDelegate* + ChromeContentBrowserClient::GetSafeBrowsingUrlCheckerDelegate( + content::ResourceContext* resource_context) { +- DCHECK_CURRENTLY_ON(BrowserThread::IO); +- +- ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context); +- if (!io_data->safe_browsing_enabled()->GetValue()) +- return nullptr; +- +- // |safe_browsing_service_| may be unavailable in tests. +- if (safe_browsing_service_ && !safe_browsing_url_checker_delegate_) { +- safe_browsing_url_checker_delegate_ = +- base::MakeRefCounted( +- safe_browsing_service_->database_manager(), +- safe_browsing_service_->ui_manager()); +- } +- +- return safe_browsing_url_checker_delegate_.get(); ++ return nullptr; + } +--- a/chrome/browser/ui/cocoa/download/download_item_controller.mm ++++ b/chrome/browser/ui/cocoa/download/download_item_controller.mm +@@ -15,7 +15,6 @@ + #include "chrome/browser/download/download_item_model.h" + #include "chrome/browser/download/download_shelf_context_menu.h" + #include "chrome/browser/profiles/profile.h" +-#include "chrome/browser/safe_browsing/download_protection/download_feedback_service.h" + #import "chrome/browser/themes/theme_properties.h" + #import "chrome/browser/themes/theme_service.h" + #import "chrome/browser/ui/cocoa/download/download_item_button.h" +@@ -358,21 +357,14 @@ + base::Time::Now() - creationTime_); + + DownloadItem* download = bridge_->download_model()->download(); +- if (![self submitDownloadToFeedbackService:download +- withCommand:DownloadCommands::Command::KEEP]) { +- // This will change the state and notify us. +- download->ValidateDangerousDownload(); +- } ++ download->ValidateDangerousDownload(); + } + + - (IBAction)discardDownload:(id)sender { + UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download", + base::Time::Now() - creationTime_); + DownloadItem* download = bridge_->download_model()->download(); +- if (! +- [self submitDownloadToFeedbackService:download +- withCommand:DownloadCommands::Command::DISCARD]) +- download->Remove(); ++ download->Remove(); + // WARNING: we are deleted at this point. Don't access 'this'. + } + +@@ -382,29 +374,4 @@ + [static_cast(progressView_) showContextMenu]; + } + +-- (bool)submitDownloadToFeedbackService:(download::DownloadItem*)download +- withCommand:(DownloadCommands::Command)command { +- safe_browsing::SafeBrowsingService* sb_service = +- g_browser_process->safe_browsing_service(); +- if (!sb_service) +- return false; +- +- safe_browsing::DownloadProtectionService* download_protection_service = +- sb_service->download_protection_service(); +- if (!download_protection_service) +- return false; +- +- DownloadItemModel* download_item_model = bridge_->download_model(); +- const Profile* profile = Profile::FromBrowserContext( +- content::DownloadItemUtils::GetBrowserContext(download)); +- const PrefService* prefs = profile->GetPrefs(); +- if (!download_item_model->ShouldAllowDownloadFeedback() || +- profile->IsOffTheRecord() || +- !safe_browsing::IsExtendedReportingEnabled(*prefs)) +- return false; +- download_protection_service->feedback_service()->BeginFeedbackForDownload( +- download, command); +- return true; +-} +- + @end +--- a/chrome/browser/download/download_item_model.cc ++++ b/chrome/browser/download/download_item_model.cc +@@ -20,8 +20,6 @@ + #include "chrome/browser/download/download_history.h" + #include "chrome/browser/download/download_stats.h" + #include "chrome/browser/profiles/profile.h" +-#include "chrome/browser/safe_browsing/download_protection/download_feedback_service.h" +-#include "chrome/common/safe_browsing/download_file_types.pb.h" + #include "chrome/grit/chromium_strings.h" + #include "chrome/grit/generated_resources.h" + #include "components/download/public/common/download_danger_type.h" +@@ -37,7 +35,6 @@ + + using base::TimeDelta; + using download::DownloadItem; +-using safe_browsing::DownloadFileType; + + namespace { + +@@ -554,14 +551,7 @@ + } + + bool DownloadItemModel::ShouldAllowDownloadFeedback() const { +-#if defined(FULL_SAFE_BROWSING) +- if (!IsDangerous()) +- return false; +- return safe_browsing::DownloadFeedbackService::IsEnabledForDownload( +- *download_); +-#else + return false; +-#endif + } + + bool DownloadItemModel::ShouldRemoveFromShelfWhenComplete() const { +--- a/chrome/browser/ui/views/safe_browsing/password_reuse_modal_warning_dialog.cc ++++ b/chrome/browser/ui/views/safe_browsing/password_reuse_modal_warning_dialog.cc +@@ -60,9 +60,7 @@ + SetLayoutManager(std::make_unique()); + + views::Label* message_body_label = new views::Label( +- service_ +- ? service_->GetWarningDetailText() +- : l10n_util::GetStringUTF16(IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS)); ++ l10n_util::GetStringUTF16(IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS)); + message_body_label->SetMultiLine(true); + message_body_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); + message_body_label->SetHandlesTooltips(false); diff --git a/resources/patches/ungoogled-chromium/macos/fix-gn-safe_browsing.patch b/resources/patches/ungoogled-chromium/macos/fix-gn-safe_browsing.patch index b126886f..20959316 100644 --- a/resources/patches/ungoogled-chromium/macos/fix-gn-safe_browsing.patch +++ b/resources/patches/ungoogled-chromium/macos/fix-gn-safe_browsing.patch @@ -17,10 +17,10 @@ "//chrome/browser/metrics:expired_histograms_array", "//chrome/browser/metrics/variations:chrome_ui_string_overrider_factory", "//chrome/browser/net:probe_message_proto", + "//chrome/browser/profiling_host", - "//chrome/browser/safe_browsing", "//chrome/browser/ssl:proto", "//chrome/browser/ui", - "//chrome/browser/ui/webui/bluetooth_internals", --- a/chrome/browser/extensions/BUILD.gn +++ b/chrome/browser/extensions/BUILD.gn @@ -797,7 +797,6 @@ static_library("extensions") { @@ -33,11 +33,11 @@ "//chrome/common/extensions/api:api_registration", --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn -@@ -927,7 +927,6 @@ split_static_library("ui") { +@@ -931,7 +931,6 @@ split_static_library("ui") { "//chrome/browser/devtools", "//chrome/browser/engagement:mojo_bindings", "//chrome/browser/media:mojo_bindings", + "//chrome/browser/profiling_host", - "//chrome/browser/safe_browsing", + "//chrome/browser/ssl:proto", "//chrome/browser/ui/webui/bluetooth_internals", - "//chrome/browser/ui/webui/interventions_internals:mojo_bindings", - "//chrome/browser/ui/webui/omnibox:mojo_bindings", diff --git a/resources/patches/ungoogled-chromium/macos/fix-older-sdk-declarations.patch b/resources/patches/ungoogled-chromium/macos/fix-older-sdk-declarations.patch new file mode 100644 index 00000000..7855b07c --- /dev/null +++ b/resources/patches/ungoogled-chromium/macos/fix-older-sdk-declarations.patch @@ -0,0 +1,11 @@ +--- a/base/mac/sdk_forward_declarations.h ++++ b/base/mac/sdk_forward_declarations.h +@@ -285,7 +285,7 @@ + @end + + // VNImageRequestHandler forward declarations. +-typedef NSString* VNImageOption NS_STRING_ENUM; ++typedef NSString* VNImageOption; + + @interface VNImageRequestHandler : NSObject + - (instancetype)initWithCIImage:(CIImage*)image diff --git a/resources/patches/ungoogled-chromium/macos/macos-fix-building-without-safebrowsing.patch b/resources/patches/ungoogled-chromium/macos/macos-fix-building-without-safebrowsing.patch deleted file mode 100644 index 99d4721c..00000000 --- a/resources/patches/ungoogled-chromium/macos/macos-fix-building-without-safebrowsing.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/chrome/browser/chrome_content_browser_client.cc -+++ b/chrome/browser/chrome_content_browser_client.cc -@@ -4020,19 +4020,5 @@ void ChromeContentBrowserClient::SetDefa - safe_browsing::UrlCheckerDelegate* - ChromeContentBrowserClient::GetSafeBrowsingUrlCheckerDelegate( - content::ResourceContext* resource_context) { -- DCHECK_CURRENTLY_ON(BrowserThread::IO); -- -- ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context); -- if (!io_data->safe_browsing_enabled()->GetValue()) -- return nullptr; -- -- // |safe_browsing_service_| may be unavailable in tests. -- if (safe_browsing_service_ && !safe_browsing_url_checker_delegate_) { -- safe_browsing_url_checker_delegate_ = -- new safe_browsing::UrlCheckerDelegateImpl( -- safe_browsing_service_->database_manager(), -- safe_browsing_service_->ui_manager(), io_data); -- } -- -- return safe_browsing_url_checker_delegate_.get(); -+ return nullptr; - } From 0649233267c91b3094544f7d61e02bb79f91cd46 Mon Sep 17 00:00:00 2001 From: Eloston Date: Wed, 13 Jun 2018 14:17:04 +0000 Subject: [PATCH 02/10] Update version.ini and existing patches to 67.0.3396.87 --- .../config_bundles/common/patch_order.list | 1 + resources/config_bundles/common/version.ini | 2 +- .../config_bundles/macos/patch_order.list | 3 +- .../config_bundles/windows/patch_order.list | 1 - .../clear-http-auth-cache-menu-item.patch | 4 +- .../fix-building-without-safebrowsing.patch | 35 +++++----- .../disable-symbol-order-verification.patch | 2 +- .../macos/fix-gn-bootstrap.patch | 4 +- .../macos/fix-gn-safe_browsing.patch | 12 ++-- .../macos/fix-older-sdk-declarations.patch | 6 +- .../macos/fix-visibility.patch | 2 +- .../windows/windows-disable-orderfile.patch | 8 +-- .../windows-disable-reorder-fix-linking.patch | 6 +- ...ws-fix-building-without-safebrowsing.patch | 69 +++++++------------ .../windows/windows-fix-enum-conflict.patch | 20 +++--- .../windows/windows-fix-gn-bootstrap.patch | 46 ------------- 16 files changed, 76 insertions(+), 145 deletions(-) rename resources/patches/ungoogled-chromium/{macos => }/fix-building-without-safebrowsing.patch (92%) delete mode 100644 resources/patches/ungoogled-chromium/windows/windows-fix-gn-bootstrap.patch diff --git a/resources/config_bundles/common/patch_order.list b/resources/config_bundles/common/patch_order.list index a0170b91..1d3c49dd 100644 --- a/resources/config_bundles/common/patch_order.list +++ b/resources/config_bundles/common/patch_order.list @@ -98,3 +98,4 @@ ungoogled-chromium/add-flag-to-enable-potentially-annoying-security-features.pat ungoogled-chromium/disable-mei-preload.patch ungoogled-chromium/add-flag-to-force-punycode-hostnames.patch ungoogled-chromium/fingerprinting-flag-client-rects-noise.patch +ungoogled-chromium/fix-building-without-safebrowsing.patch diff --git a/resources/config_bundles/common/version.ini b/resources/config_bundles/common/version.ini index b56ad523..44f78e0c 100644 --- a/resources/config_bundles/common/version.ini +++ b/resources/config_bundles/common/version.ini @@ -1,3 +1,3 @@ [version] -chromium_version = 67.0.3396.62 +chromium_version = 67.0.3396.87 release_revision = 1 diff --git a/resources/config_bundles/macos/patch_order.list b/resources/config_bundles/macos/patch_order.list index c68484d8..6f5330af 100644 --- a/resources/config_bundles/macos/patch_order.list +++ b/resources/config_bundles/macos/patch_order.list @@ -4,5 +4,4 @@ ungoogled-chromium/macos/fix-gn-bootstrap.patch ungoogled-chromium/macos/fix-gn-safe_browsing.patch ungoogled-chromium/macos/fix-mapped_file.patch ungoogled-chromium/macos/fix-visibility.patch -ungoogled-chromium/macos/fix-building-without-safebrowsing.patch -ungoogled-chromium/macos/fix-older-sdk-declarations.patch \ No newline at end of file +ungoogled-chromium/macos/fix-older-sdk-declarations.patch diff --git a/resources/config_bundles/windows/patch_order.list b/resources/config_bundles/windows/patch_order.list index a9c6a21f..57b1857a 100644 --- a/resources/config_bundles/windows/patch_order.list +++ b/resources/config_bundles/windows/patch_order.list @@ -1,6 +1,5 @@ ungoogled-chromium/windows/windows-disable-reorder-fix-linking.patch ungoogled-chromium/windows/windows-fix-missing-include-es_parser_adts-cc.patch -ungoogled-chromium/windows/windows-fix-gn-bootstrap.patch ungoogled-chromium/windows/windows-disable-win-build-output.patch ungoogled-chromium/windows/windows-disable-orderfile.patch ungoogled-chromium/windows/windows-disable-rcpy.patch diff --git a/resources/patches/ungoogled-chromium/clear-http-auth-cache-menu-item.patch b/resources/patches/ungoogled-chromium/clear-http-auth-cache-menu-item.patch index b09b8c0b..0b097167 100644 --- a/resources/patches/ungoogled-chromium/clear-http-auth-cache-menu-item.patch +++ b/resources/patches/ungoogled-chromium/clear-http-auth-cache-menu-item.patch @@ -108,7 +108,7 @@ #else --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml -@@ -118373,6 +118373,7 @@ http://cs/file:chrome/histograms.xml - b +@@ -118412,6 +118412,7 @@ http://cs/file:chrome/histograms.xml - b @@ -142,7 +142,7 @@ --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml -@@ -48308,6 +48308,7 @@ Full version information for the fingerp +@@ -48315,6 +48315,7 @@ Full version information for the fingerp diff --git a/resources/patches/ungoogled-chromium/macos/fix-building-without-safebrowsing.patch b/resources/patches/ungoogled-chromium/fix-building-without-safebrowsing.patch similarity index 92% rename from resources/patches/ungoogled-chromium/macos/fix-building-without-safebrowsing.patch rename to resources/patches/ungoogled-chromium/fix-building-without-safebrowsing.patch index e8ac0c51..16466435 100644 --- a/resources/patches/ungoogled-chromium/macos/fix-building-without-safebrowsing.patch +++ b/resources/patches/ungoogled-chromium/fix-building-without-safebrowsing.patch @@ -1,10 +1,11 @@ +# Additional changes to Inox's fix-building-without-safebrowsing.patch + --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc -@@ -4328,19 +4328,5 @@ void ChromeContentBrowserClient::SetDefa - safe_browsing::UrlCheckerDelegate* +@@ -4328,18 +4328,5 @@ safe_browsing::UrlCheckerDelegate* ChromeContentBrowserClient::GetSafeBrowsingUrlCheckerDelegate( content::ResourceContext* resource_context) { -- DCHECK_CURRENTLY_ON(BrowserThread::IO); + DCHECK_CURRENTLY_ON(BrowserThread::IO); - - ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context); - if (!io_data->safe_browsing_enabled()->GetValue()) @@ -31,9 +32,9 @@ #import "chrome/browser/themes/theme_properties.h" #import "chrome/browser/themes/theme_service.h" #import "chrome/browser/ui/cocoa/download/download_item_button.h" -@@ -358,21 +357,14 @@ +@@ -358,21 +357,14 @@ class DownloadShelfContextMenuMac : publ base::Time::Now() - creationTime_); - + DownloadItem* download = bridge_->download_model()->download(); - if (![self submitDownloadToFeedbackService:download - withCommand:DownloadCommands::Command::KEEP]) { @@ -42,7 +43,7 @@ - } + download->ValidateDangerousDownload(); } - + - (IBAction)discardDownload:(id)sender { UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download", base::Time::Now() - creationTime_); @@ -54,11 +55,11 @@ + download->Remove(); // WARNING: we are deleted at this point. Don't access 'this'. } - -@@ -382,29 +374,4 @@ + +@@ -382,29 +374,4 @@ class DownloadShelfContextMenuMac : publ [static_cast(progressView_) showContextMenu]; } - + -- (bool)submitDownloadToFeedbackService:(download::DownloadItem*)download - withCommand:(DownloadCommands::Command)command { - safe_browsing::SafeBrowsingService* sb_service = @@ -97,16 +98,16 @@ #include "chrome/grit/generated_resources.h" #include "components/download/public/common/download_danger_type.h" @@ -37,7 +35,6 @@ - + using base::TimeDelta; using download::DownloadItem; -using safe_browsing::DownloadFileType; - + namespace { - -@@ -554,14 +551,7 @@ + +@@ -554,14 +551,7 @@ bool DownloadItemModel::HasSupportedImag } - + bool DownloadItemModel::ShouldAllowDownloadFeedback() const { -#if defined(FULL_SAFE_BROWSING) - if (!IsDangerous()) @@ -117,13 +118,13 @@ return false; -#endif } - + bool DownloadItemModel::ShouldRemoveFromShelfWhenComplete() const { --- a/chrome/browser/ui/views/safe_browsing/password_reuse_modal_warning_dialog.cc +++ b/chrome/browser/ui/views/safe_browsing/password_reuse_modal_warning_dialog.cc -@@ -60,9 +60,7 @@ +@@ -60,9 +60,7 @@ PasswordReuseModalWarningDialog::Passwor SetLayoutManager(std::make_unique()); - + views::Label* message_body_label = new views::Label( - service_ - ? service_->GetWarningDetailText() diff --git a/resources/patches/ungoogled-chromium/macos/disable-symbol-order-verification.patch b/resources/patches/ungoogled-chromium/macos/disable-symbol-order-verification.patch index 359b5400..1f83a1d2 100644 --- a/resources/patches/ungoogled-chromium/macos/disable-symbol-order-verification.patch +++ b/resources/patches/ungoogled-chromium/macos/disable-symbol-order-verification.patch @@ -2,7 +2,7 @@ --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1320,7 +1320,7 @@ if (is_win) { +@@ -1326,7 +1326,7 @@ if (is_win) { assert(_framework_binary_path != "", "Ignore configuration-dependent unused variable warning") diff --git a/resources/patches/ungoogled-chromium/macos/fix-gn-bootstrap.patch b/resources/patches/ungoogled-chromium/macos/fix-gn-bootstrap.patch index a7aa78bb..b991dbf0 100644 --- a/resources/patches/ungoogled-chromium/macos/fix-gn-bootstrap.patch +++ b/resources/patches/ungoogled-chromium/macos/fix-gn-bootstrap.patch @@ -2,7 +2,7 @@ --- a/tools/gn/bootstrap/bootstrap.py +++ b/tools/gn/bootstrap/bootstrap.py -@@ -742,6 +742,10 @@ def write_gn_ninja(path, root_gen_dir, o +@@ -793,6 +793,10 @@ def write_gn_ninja(path, root_gen_dir, o 'base/time/time_exploded_posix.cc', 'base/time/time_mac.cc', 'base/threading/platform_thread_mac.mm', @@ -13,7 +13,7 @@ ]) static_libraries['libevent']['include_dirs'].extend([ os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'mac') -@@ -755,6 +759,7 @@ def write_gn_ninja(path, root_gen_dir, o +@@ -806,6 +810,7 @@ def write_gn_ninja(path, root_gen_dir, o '-framework', 'CoreFoundation', '-framework', 'Foundation', '-framework', 'Security', diff --git a/resources/patches/ungoogled-chromium/macos/fix-gn-safe_browsing.patch b/resources/patches/ungoogled-chromium/macos/fix-gn-safe_browsing.patch index 20959316..fdb33ae8 100644 --- a/resources/patches/ungoogled-chromium/macos/fix-gn-safe_browsing.patch +++ b/resources/patches/ungoogled-chromium/macos/fix-gn-safe_browsing.patch @@ -2,7 +2,7 @@ --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn -@@ -1338,7 +1338,7 @@ config("default_warnings") { +@@ -1385,7 +1385,7 @@ config("default_warnings") { "-Wno-user-defined-warnings", # TODO(thakis): https://crbug.com/753973 @@ -13,17 +13,17 @@ "-Wno-null-pointer-arithmetic", --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -1592,7 +1592,6 @@ jumbo_split_static_library("browser") { - "//chrome/browser/metrics:expired_histograms_array", +@@ -1595,7 +1595,6 @@ jumbo_split_static_library("browser") { "//chrome/browser/metrics/variations:chrome_ui_string_overrider_factory", "//chrome/browser/net:probe_message_proto", "//chrome/browser/profiling_host", - "//chrome/browser/safe_browsing", "//chrome/browser/ssl:proto", "//chrome/browser/ui", + "//chrome/browser/ui/webui/bluetooth_internals", --- a/chrome/browser/extensions/BUILD.gn +++ b/chrome/browser/extensions/BUILD.gn -@@ -797,7 +797,6 @@ static_library("extensions") { +@@ -789,7 +789,6 @@ static_library("extensions") { "//chrome/browser/devtools", "//chrome/browser/media/router", "//chrome/browser/media/router/discovery", @@ -33,11 +33,11 @@ "//chrome/common/extensions/api:api_registration", --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn -@@ -931,7 +931,6 @@ split_static_library("ui") { - "//chrome/browser/devtools", +@@ -932,7 +932,6 @@ split_static_library("ui") { "//chrome/browser/engagement:mojo_bindings", "//chrome/browser/media:mojo_bindings", "//chrome/browser/profiling_host", - "//chrome/browser/safe_browsing", "//chrome/browser/ssl:proto", "//chrome/browser/ui/webui/bluetooth_internals", + "//chrome/browser/ui/webui/interventions_internals:mojo_bindings", diff --git a/resources/patches/ungoogled-chromium/macos/fix-older-sdk-declarations.patch b/resources/patches/ungoogled-chromium/macos/fix-older-sdk-declarations.patch index 7855b07c..58ac30f7 100644 --- a/resources/patches/ungoogled-chromium/macos/fix-older-sdk-declarations.patch +++ b/resources/patches/ungoogled-chromium/macos/fix-older-sdk-declarations.patch @@ -1,11 +1,11 @@ --- a/base/mac/sdk_forward_declarations.h +++ b/base/mac/sdk_forward_declarations.h -@@ -285,7 +285,7 @@ +@@ -285,7 +285,7 @@ typedef void (^VNRequestCompletionHandle @end - + // VNImageRequestHandler forward declarations. -typedef NSString* VNImageOption NS_STRING_ENUM; +typedef NSString* VNImageOption; - + @interface VNImageRequestHandler : NSObject - (instancetype)initWithCIImage:(CIImage*)image diff --git a/resources/patches/ungoogled-chromium/macos/fix-visibility.patch b/resources/patches/ungoogled-chromium/macos/fix-visibility.patch index 7de3c12e..bc9c8973 100644 --- a/resources/patches/ungoogled-chromium/macos/fix-visibility.patch +++ b/resources/patches/ungoogled-chromium/macos/fix-visibility.patch @@ -21,7 +21,7 @@ // to is invisible to from, returns false and sets the error. --- a/tools/gn/visibility.cc +++ b/tools/gn/visibility.cc -@@ -84,7 +84,7 @@ std::string Visibility::Describe(int ind +@@ -80,7 +80,7 @@ std::string Visibility::Describe(int ind return result; } diff --git a/resources/patches/ungoogled-chromium/windows/windows-disable-orderfile.patch b/resources/patches/ungoogled-chromium/windows/windows-disable-orderfile.patch index c99aa316..ff6e2012 100644 --- a/resources/patches/ungoogled-chromium/windows/windows-disable-orderfile.patch +++ b/resources/patches/ungoogled-chromium/windows/windows-disable-orderfile.patch @@ -2,12 +2,12 @@ --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -409,22 +409,6 @@ if (is_win) { +@@ -417,22 +417,6 @@ if (is_win) { "//content/public/app:both", ] } - -- if (is_clang && is_official_build && !use_lld) { +- if (is_clang && is_official_build) { - orderfile = "build/chrome.$target_cpu.orderfile" - rebased_orderfile = rebase_path(orderfile, root_build_dir) - inputs = [ @@ -25,11 +25,11 @@ } if (is_multi_dll_chrome) { -@@ -472,22 +456,6 @@ if (is_win) { +@@ -480,22 +464,6 @@ if (is_win) { "/DELAYLOAD:wininet.dll", ] -- if (is_clang && is_official_build && !use_lld) { +- if (is_clang && is_official_build) { - orderfile = "build/chrome_child.$target_cpu.orderfile" - rebased_orderfile = rebase_path(orderfile, root_build_dir) - inputs = [ diff --git a/resources/patches/ungoogled-chromium/windows/windows-disable-reorder-fix-linking.patch b/resources/patches/ungoogled-chromium/windows/windows-disable-reorder-fix-linking.patch index fa715c08..9a2c0f9b 100644 --- a/resources/patches/ungoogled-chromium/windows/windows-disable-reorder-fix-linking.patch +++ b/resources/patches/ungoogled-chromium/windows/windows-disable-reorder-fix-linking.patch @@ -2,7 +2,7 @@ --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -46,35 +46,6 @@ if (enable_resource_whitelist_generation +@@ -48,35 +48,6 @@ if (enable_resource_whitelist_generation chrome_resource_whitelist = "$target_gen_dir/chrome_resource_whitelist.txt" } @@ -38,7 +38,7 @@ # This target exists above chrome and it's main components in the dependency # tree as a central place to put assert_no_deps annotations. Since this depends # on Chrome and the main DLLs it uses, it will transitively assert that those -@@ -109,9 +80,6 @@ if (!is_android && !is_mac) { +@@ -111,9 +82,6 @@ if (!is_android && !is_mac) { data_deps = [ ":chrome_initial", ] @@ -48,7 +48,7 @@ if (use_aura && (is_win || is_linux)) { data_deps += [ "//chrome/app:service_manifests" ] } -@@ -317,11 +285,7 @@ if (!is_android && !is_mac) { +@@ -325,11 +293,7 @@ if (!is_android && !is_mac) { } chrome_binary("chrome_initial") { diff --git a/resources/patches/ungoogled-chromium/windows/windows-fix-building-without-safebrowsing.patch b/resources/patches/ungoogled-chromium/windows/windows-fix-building-without-safebrowsing.patch index 9e8f87bc..415c4880 100644 --- a/resources/patches/ungoogled-chromium/windows/windows-fix-building-without-safebrowsing.patch +++ b/resources/patches/ungoogled-chromium/windows/windows-fix-building-without-safebrowsing.patch @@ -3,7 +3,7 @@ --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -294,8 +294,6 @@ jumbo_split_static_library("browser") { +@@ -298,8 +298,6 @@ jumbo_split_static_library("browser") { "component_updater/subresource_filter_component_installer.h", "component_updater/supervised_user_whitelist_installer.cc", "component_updater/supervised_user_whitelist_installer.h", @@ -12,10 +12,10 @@ "conflicts/enumerate_input_method_editors_win.cc", "conflicts/enumerate_input_method_editors_win.h", "conflicts/enumerate_shell_extensions_win.cc", -@@ -1592,11 +1590,11 @@ jumbo_split_static_library("browser") { - "//chrome/browser/metrics:expired_histograms_array", +@@ -1595,11 +1593,11 @@ jumbo_split_static_library("browser") { "//chrome/browser/metrics/variations:chrome_ui_string_overrider_factory", "//chrome/browser/net:probe_message_proto", + "//chrome/browser/profiling_host", - "//chrome/browser/safe_browsing", "//chrome/browser/ssl:proto", "//chrome/browser/ui", @@ -27,7 +27,7 @@ "//components/app_modal", --- a/chrome/browser/extensions/BUILD.gn +++ b/chrome/browser/extensions/BUILD.gn -@@ -797,7 +797,6 @@ static_library("extensions") { +@@ -789,7 +789,6 @@ static_library("extensions") { "//chrome/browser/devtools", "//chrome/browser/media/router", "//chrome/browser/media/router/discovery", @@ -37,14 +37,14 @@ "//chrome/common/extensions/api:api_registration", --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn -@@ -927,7 +927,6 @@ split_static_library("ui") { - "//chrome/browser/devtools", +@@ -932,7 +932,6 @@ split_static_library("ui") { "//chrome/browser/engagement:mojo_bindings", "//chrome/browser/media:mojo_bindings", + "//chrome/browser/profiling_host", - "//chrome/browser/safe_browsing", + "//chrome/browser/ssl:proto", "//chrome/browser/ui/webui/bluetooth_internals", "//chrome/browser/ui/webui/interventions_internals:mojo_bindings", - "//chrome/browser/ui/webui/omnibox:mojo_bindings", --- a/chrome/browser/chrome_browser_main_win.cc +++ b/chrome/browser/chrome_browser_main_win.cc @@ -44,9 +44,6 @@ @@ -57,7 +57,7 @@ #include "chrome/browser/ui/simple_message_box.h" #include "chrome/browser/ui/uninstall_browser_prompt.h" #include "chrome/browser/win/browser_util.h" -@@ -391,16 +388,6 @@ void ShowCloseBrowserFirstMessageBox() { +@@ -393,16 +390,6 @@ void ShowCloseBrowserFirstMessageBox() { l10n_util::GetStringUTF16(IDS_UNINSTALL_CLOSE_APP)); } @@ -74,7 +74,7 @@ } // namespace int DoUninstallTasks(bool chrome_still_running) { -@@ -538,23 +525,6 @@ void ChromeBrowserMainPartsWin::PostBrow +@@ -540,23 +527,6 @@ void ChromeBrowserMainPartsWin::PostBrow InitializeChromeElf(); @@ -111,8 +111,8 @@ --- a/chrome/browser/ui/webui/settings/md_settings_ui.cc +++ b/chrome/browser/ui/webui/settings/md_settings_ui.cc -@@ -50,9 +50,6 @@ - #include "printing/features/features.h" +@@ -51,9 +51,6 @@ + #include "printing/buildflags/buildflags.h" #if defined(OS_WIN) -#include "chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.h" @@ -121,7 +121,7 @@ #if defined(GOOGLE_CHROME_BUILD) #include "chrome/browser/conflicts/problematic_programs_updater_win.h" #include "chrome/browser/conflicts/token_util_win.h" -@@ -207,13 +204,6 @@ MdSettingsUI::MdSettingsUI(content::WebU +@@ -213,13 +210,6 @@ MdSettingsUI::MdSettingsUI(content::WebU bool chromeCleanupEnabled = false; bool userInitiatedCleanupsEnabled = false; @@ -135,7 +135,7 @@ #if defined(GOOGLE_CHROME_BUILD) html_source->AddResourcePath("partner-logo.svg", IDR_CHROME_CLEANUP_PARTNER); #if BUILDFLAG(OPTIMIZE_WEBUI) -@@ -340,13 +330,6 @@ MdSettingsUI::MdSettingsUI(content::WebU +@@ -349,13 +339,6 @@ MdSettingsUI::MdSettingsUI(content::WebU content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(), html_source); @@ -149,7 +149,7 @@ } MdSettingsUI::~MdSettingsUI() { -@@ -377,17 +360,4 @@ void MdSettingsUI::DocumentOnLoadComplet +@@ -386,17 +369,4 @@ void MdSettingsUI::DocumentOnLoadComplet base::Time::Now() - load_start_time_); } @@ -195,7 +195,7 @@ --- a/chrome/common/safe_browsing/BUILD.gn +++ b/chrome/common/safe_browsing/BUILD.gn -@@ -16,35 +16,10 @@ proto_library("proto") { +@@ -15,35 +15,10 @@ proto_library("proto") { source_set("safe_browsing") { sources = [ @@ -261,7 +261,7 @@ #include "components/search_engines/template_url_prepopulate_data.h" #include "components/signin/core/browser/profile_management_switches.h" #include "components/ssl_config/ssl_config_service_manager.h" -@@ -269,13 +268,10 @@ +@@ -275,13 +274,10 @@ #if defined(OS_WIN) #include "chrome/browser/apps/app_launch_for_metro_restart_win.h" @@ -275,7 +275,7 @@ #include "chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_util.h" #endif -@@ -463,7 +459,6 @@ void RegisterLocalState(PrefRegistrySimp +@@ -470,7 +466,6 @@ void RegisterLocalState(PrefRegistrySimp #if defined(OS_WIN) app_metro_launch::RegisterPrefs(registry); @@ -283,7 +283,7 @@ desktop_ios_promotion::RegisterLocalPrefs(registry); password_manager::PasswordManager::RegisterLocalPrefs(registry); #if defined(GOOGLE_CHROME_BUILD) -@@ -522,7 +517,6 @@ void RegisterProfilePrefs(user_prefs::Pr +@@ -529,7 +524,6 @@ void RegisterProfilePrefs(user_prefs::Pr ProtocolHandlerRegistry::RegisterProfilePrefs(registry); PushMessagingAppIdentifier::RegisterProfilePrefs(registry); RegisterBrowserUserPrefs(registry); @@ -291,7 +291,7 @@ secure_origin_whitelist::RegisterProfilePrefs(registry); SafeBrowsingTriggeredPopupBlocker::RegisterProfilePrefs(registry); SessionStartupPref::RegisterProfilePrefs(registry); -@@ -651,12 +645,8 @@ void RegisterProfilePrefs(user_prefs::Pr +@@ -664,12 +658,8 @@ void RegisterProfilePrefs(user_prefs::Pr #endif #if defined(OS_WIN) @@ -306,7 +306,7 @@ #if defined(TOOLKIT_VIEWS) --- a/chrome/browser/profiles/profile_impl_io_data.cc +++ b/chrome/browser/profiles/profile_impl_io_data.cc -@@ -343,14 +343,6 @@ void ProfileImplIOData::Handle::LazyInit +@@ -358,14 +358,6 @@ void ProfileImplIOData::Handle::LazyInit // below try to get the ResourceContext pointer. initialized_ = true; PrefService* pref_service = profile_->GetPrefs(); @@ -323,7 +323,7 @@ prefs::kPluginsAlwaysOpenPdfExternally, pref_service); --- a/chrome/browser/profiles/off_the_record_profile_io_data.cc +++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc -@@ -162,14 +162,6 @@ void OffTheRecordProfileIOData::Handle:: +@@ -161,14 +161,6 @@ void OffTheRecordProfileIOData::Handle:: // Set initialized_ to true at the beginning in case any of the objects // below try to get the ResourceContext pointer. initialized_ = true; @@ -338,32 +338,9 @@ #if BUILDFLAG(ENABLE_PLUGINS) io_data_->always_open_pdf_externally()->Init( prefs::kPluginsAlwaysOpenPdfExternally, profile_->GetPrefs()); ---- a/chrome/browser/chrome_content_browser_client.cc -+++ b/chrome/browser/chrome_content_browser_client.cc -@@ -4020,19 +4020,5 @@ void ChromeContentBrowserClient::SetDefa - safe_browsing::UrlCheckerDelegate* - ChromeContentBrowserClient::GetSafeBrowsingUrlCheckerDelegate( - content::ResourceContext* resource_context) { -- DCHECK_CURRENTLY_ON(BrowserThread::IO); -- -- ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context); -- if (!io_data->safe_browsing_enabled()->GetValue()) -- return nullptr; -- -- // |safe_browsing_service_| may be unavailable in tests. -- if (safe_browsing_service_ && !safe_browsing_url_checker_delegate_) { -- safe_browsing_url_checker_delegate_ = -- new safe_browsing::UrlCheckerDelegateImpl( -- safe_browsing_service_->database_manager(), -- safe_browsing_service_->ui_manager(), io_data); -- } -- -- return safe_browsing_url_checker_delegate_.get(); -+ return nullptr; - } --- a/chrome/renderer/url_loader_throttle_provider_impl.cc +++ b/chrome/renderer/url_loader_throttle_provider_impl.cc -@@ -51,8 +51,7 @@ URLLoaderThrottleProviderImpl::URLLoader +@@ -54,8 +54,7 @@ URLLoaderThrottleProviderImpl::URLLoader chrome_content_renderer_client_(chrome_content_renderer_client) { DETACH_FROM_THREAD(thread_checker_); @@ -373,7 +350,7 @@ content::RenderThread::Get()->GetConnector()->BindInterface( content::mojom::kBrowserServiceName, mojo::MakeRequest(&safe_browsing_info_)); -@@ -81,10 +80,7 @@ URLLoaderThrottleProviderImpl::CreateThr +@@ -84,10 +83,7 @@ URLLoaderThrottleProviderImpl::CreateThr DCHECK(!is_frame_resource || type_ == content::URLLoaderThrottleProviderType::kFrame); diff --git a/resources/patches/ungoogled-chromium/windows/windows-fix-enum-conflict.patch b/resources/patches/ungoogled-chromium/windows/windows-fix-enum-conflict.patch index 40c90e91..0fec700e 100644 --- a/resources/patches/ungoogled-chromium/windows/windows-fix-enum-conflict.patch +++ b/resources/patches/ungoogled-chromium/windows/windows-fix-enum-conflict.patch @@ -2,15 +2,15 @@ --- a/extensions/browser/api/feedback_private/feedback_private_api.cc +++ b/extensions/browser/api/feedback_private/feedback_private_api.cc -@@ -313,7 +313,7 @@ ExtensionFunction::ResponseAction Feedba - - void FeedbackPrivateSendFeedbackFunction::OnCompleted(bool success) { - Respond(OneArgument(std::make_unique( -- feedback_private::ToString(success ? feedback_private::STATUS_SUCCESS -+ feedback_private::ToString(success ? feedback_private::STATUS_SUCCESS1 - : feedback_private::STATUS_DELAYED)))); +@@ -337,7 +337,7 @@ void FeedbackPrivateSendFeedbackFunction + bool success) { + Respond(TwoArguments( + std::make_unique(feedback_private::ToString( +- success ? feedback_private::STATUS_SUCCESS ++ success ? feedback_private::STATUS_SUCCESS1 + : feedback_private::STATUS_DELAYED)), + std::make_unique(feedback_private::ToString(type)))); if (!success) { - ExtensionsAPIClient::Get() --- a/extensions/common/api/feedback_private.idl +++ b/extensions/common/api/feedback_private.idl @@ -85,7 +85,7 @@ namespace feedbackPrivate { @@ -20,5 +20,5 @@ - enum Status {success, delayed}; + enum Status {success1, delayed}; - // Result of presenting the user with a prompt to download SRT. - enum SrtPromptResult { + // The type of the landing page shown to the user when the feedback report is + // successfully sent. diff --git a/resources/patches/ungoogled-chromium/windows/windows-fix-gn-bootstrap.patch b/resources/patches/ungoogled-chromium/windows/windows-fix-gn-bootstrap.patch deleted file mode 100644 index 9156a091..00000000 --- a/resources/patches/ungoogled-chromium/windows/windows-fix-gn-bootstrap.patch +++ /dev/null @@ -1,46 +0,0 @@ -# Fix GN bootstrap.py on Windows - ---- a/tools/gn/bootstrap/bootstrap.py -+++ b/tools/gn/bootstrap/bootstrap.py -@@ -759,6 +759,9 @@ def write_gn_ninja(path, root_gen_dir, o - - if is_win: - static_libraries['base']['sources'].extend([ -+ 'base/allocator/partition_allocator/address_space_randomization.cc', -+ 'base/allocator/partition_allocator/page_allocator.cc', -+ 'base/allocator/partition_allocator/spin_lock.cc', - 'base/base_paths_win.cc', - 'base/cpu.cc', - 'base/debug/close_handle_hook_win.cc', -@@ -795,17 +798,16 @@ def write_gn_ninja(path, root_gen_dir, o - 'base/sync_socket_win.cc', - 'base/synchronization/condition_variable_win.cc', - 'base/synchronization/lock_impl_win.cc', -- 'base/synchronization/read_write_lock_win.cc', - 'base/synchronization/waitable_event_watcher_win.cc', - 'base/synchronization/waitable_event_win.cc', - 'base/sys_info_win.cc', - 'base/threading/platform_thread_win.cc', - 'base/threading/thread_local_storage_win.cc', -- 'base/threading/worker_pool_win.cc', - 'base/time/time_win.cc', - 'base/timer/hi_res_timer_manager_win.cc', - 'base/trace_event/heap_profiler_allocation_register_win.cc', - 'base/trace_event/trace_event_etw_export_win.cc', -+ 'base/win/core_winrt_util.cc', - 'base/win/enum_variant.cc', - 'base/win/event_trace_controller.cc', - 'base/win/event_trace_provider.cc', -@@ -819,9 +821,12 @@ def write_gn_ninja(path, root_gen_dir, o - 'base/win/registry.cc', - 'base/win/resource_util.cc', - 'base/win/scoped_bstr.cc', -+ 'base/win/scoped_com_initializer.cc', - 'base/win/scoped_handle.cc', -+ 'base/win/scoped_handle_verifier.cc', - 'base/win/scoped_process_information.cc', - 'base/win/scoped_variant.cc', -+ 'base/win/scoped_winrt_initializer.cc', - 'base/win/shortcut.cc', - 'base/win/startup_information.cc', - 'base/win/wait_chain.cc', From e96c4179c38b722ca904791cffa4b89c82ed31fc Mon Sep 17 00:00:00 2001 From: Timothy Vaccarelli Date: Wed, 13 Jun 2018 15:50:56 -0400 Subject: [PATCH 03/10] Update version --- resources/config_bundles/common/version.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/config_bundles/common/version.ini b/resources/config_bundles/common/version.ini index b56ad523..487c16b4 100644 --- a/resources/config_bundles/common/version.ini +++ b/resources/config_bundles/common/version.ini @@ -1,3 +1,3 @@ [version] -chromium_version = 67.0.3396.62 +chromium_version = 67.0.3396.87 release_revision = 1 From 60768783d57e1c3ac09747887805e63e1955ac7b Mon Sep 17 00:00:00 2001 From: Timothy Vaccarelli Date: Thu, 14 Jun 2018 15:00:51 -0400 Subject: [PATCH 04/10] OpenSUSE config: use chromium's bundled ffmpeg instead of system --- resources/packaging/opensuse/ungoogled-chromium.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/packaging/opensuse/ungoogled-chromium.spec.in b/resources/packaging/opensuse/ungoogled-chromium.spec.in index 8612173e..62e79b3e 100644 --- a/resources/packaging/opensuse/ungoogled-chromium.spec.in +++ b/resources/packaging/opensuse/ungoogled-chromium.spec.in @@ -128,7 +128,6 @@ BuildRequires: pkgconfig(nspr) >= 4.9.5 BuildRequires: pkgconfig(nss) >= 3.26 BuildRequires: pkgconfig(ogg) BuildRequires: pkgconfig(openssl) -BuildRequires: pkgconfig(opus) BuildRequires: pkgconfig(python) BuildRequires: pkgconfig(schroedinger-1.0) BuildRequires: pkgconfig(slang) @@ -311,6 +310,7 @@ keeplibs=( third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2 third_party/openh264 third_party/openmax_dl + third_party/opus third_party/ots third_party/pdfium third_party/pdfium/third_party/agg23 @@ -407,6 +407,7 @@ export AR=llvm-ar export NM=llvm-nm export CC=clang export CXX=clang++ +export LD_LIBRARY_PATH=%{_topdir}/BUILD/ungoogled-chromium-%{version}/out/Default # Set system libraries to be used gn_system_libraries=( @@ -417,7 +418,6 @@ gn_system_libraries=( libpng libwebp libxslt - opus re2 snappy zlib From 436429d51508f5ed118f5061726cab820e92104c Mon Sep 17 00:00:00 2001 From: Eloston Date: Sun, 17 Jun 2018 12:13:47 +0000 Subject: [PATCH 05/10] Use bundled FFmpeg for Debian stretch System FFmpeg does not work with Chromium 67, so use the bundled version for now. --- .../debian_stretch/patch_order.list | 1 - resources/packaging/debian/stretch/clean | 2 -- .../packaging/debian/stretch/scripts/unbundle | 2 +- .../debian_stretch/system/ffmpeg.patch | 23 ------------------- 4 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 resources/patches/debian_stretch/system/ffmpeg.patch diff --git a/resources/config_bundles/debian_stretch/patch_order.list b/resources/config_bundles/debian_stretch/patch_order.list index c2e01fd1..16cb42f1 100644 --- a/resources/config_bundles/debian_stretch/patch_order.list +++ b/resources/config_bundles/debian_stretch/patch_order.list @@ -1,7 +1,6 @@ debian/disable/openh264.patch debian_stretch/system/vpx.patch -debian_stretch/system/ffmpeg.patch debian_stretch/system/icu.patch opensuse/system-libdrm.patch diff --git a/resources/packaging/debian/stretch/clean b/resources/packaging/debian/stretch/clean index ac079b7e..3e739d22 100644 --- a/resources/packaging/debian/stretch/clean +++ b/resources/packaging/debian/stretch/clean @@ -10,9 +10,7 @@ third_party/re2/BUILD.gn third_party/icu/BUILD.gn third_party/flac/BUILD.gn third_party/zlib/BUILD.gn -third_party/opus/BUILD.gn third_party/snappy/BUILD.gn -third_party/ffmpeg/BUILD.gn third_party/libxml/BUILD.gn third_party/libdrm/BUILD.gn third_party/libpng/BUILD.gn diff --git a/resources/packaging/debian/stretch/scripts/unbundle b/resources/packaging/debian/stretch/scripts/unbundle index 3c21ad4f..67cc7ce4 100755 --- a/resources/packaging/debian/stretch/scripts/unbundle +++ b/resources/packaging/debian/stretch/scripts/unbundle @@ -23,7 +23,7 @@ def strip(path): else: os.remove(removal) -keepers = ('openh264', 'libjpeg', 'harfbuzz-ng') +keepers = ('openh264', 'libjpeg', 'harfbuzz-ng', 'ffmpeg', 'opus') # strip out regenerating files in each build def remove_file(path): diff --git a/resources/patches/debian_stretch/system/ffmpeg.patch b/resources/patches/debian_stretch/system/ffmpeg.patch deleted file mode 100644 index 4129ddb3..00000000 --- a/resources/patches/debian_stretch/system/ffmpeg.patch +++ /dev/null @@ -1,23 +0,0 @@ -description: changes required to support ffmpeg 3.2 in stretch -author: Michael Gilbert - ---- a/media/ffmpeg/ffmpeg_common.cc -+++ b/media/ffmpeg/ffmpeg_common.cc -@@ -189,8 +189,6 @@ static VideoCodec CodecIDToVideoCodec(AV - return kCodecVP8; - case AV_CODEC_ID_VP9: - return kCodecVP9; -- case AV_CODEC_ID_AV1: -- return kCodecAV1; - default: - DVLOG(1) << "Unknown video CodecID: " << codec_id; - } -@@ -213,8 +211,6 @@ AVCodecID VideoCodecToCodecID(VideoCodec - return AV_CODEC_ID_VP8; - case kCodecVP9: - return AV_CODEC_ID_VP9; -- case kCodecAV1: -- return AV_CODEC_ID_AV1; - default: - DVLOG(1) << "Unknown VideoCodec: " << video_codec; - } From a433a98979960283dc0e3724998f83c35fc7c84f Mon Sep 17 00:00:00 2001 From: Eloston Date: Thu, 21 Jun 2018 06:00:17 +0000 Subject: [PATCH 06/10] macos: Check /var/empty is actually empty in build.sh Fixes #425 --- resources/packaging/macos/build.sh.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/packaging/macos/build.sh.in b/resources/packaging/macos/build.sh.in index dd8624b9..d235de65 100755 --- a/resources/packaging/macos/build.sh.in +++ b/resources/packaging/macos/build.sh.in @@ -6,6 +6,14 @@ set -eux packaging_dir=$(dirname $(greadlink -f $0)) +# Ensure /var/empty is actually empty, otherwise chrome/installer/mac/pkg-dmg +# can fail. See issue https://github.com/Eloston/ungoogled-chromium/issues/425 +if [ -n "$(ls -A /var/empty 2>/dev/null)" ] +then + echo 'ERROR: /var/empty is not empty!' >&2 + exit 1 +fi + rm -rf out || true mkdir out mkdir $ungoog{build_output} From e53a61bbce4de58089153c36e02c82c645f99f77 Mon Sep 17 00:00:00 2001 From: Eloston Date: Thu, 21 Jun 2018 07:40:47 +0000 Subject: [PATCH 07/10] Update Debian buster files to 67.0.3396.79-2 --- .../debian_buster/patch_order.list | 1 - resources/packaging/debian/buster/clean | 1 - resources/packaging/debian/buster/copyright | 126 ++++++++++++++---- .../packaging/debian/buster/scripts/unbundle | 2 +- resources/patches/debian/system/ffmpeg.patch | 25 ---- resources/patches/debian/system/lcms2.patch | 10 +- 6 files changed, 106 insertions(+), 59 deletions(-) delete mode 100644 resources/patches/debian/system/ffmpeg.patch diff --git a/resources/config_bundles/debian_buster/patch_order.list b/resources/config_bundles/debian_buster/patch_order.list index a7b91ce2..7928b358 100644 --- a/resources/config_bundles/debian_buster/patch_order.list +++ b/resources/config_bundles/debian_buster/patch_order.list @@ -1,6 +1,5 @@ debian/disable/openh264.patch -debian/system/ffmpeg.patch debian/system/openjpeg.patch debian/debianization/master-preferences.patch debian/system/lcms2.patch diff --git a/resources/packaging/debian/buster/clean b/resources/packaging/debian/buster/clean index a6421342..d85af834 100644 --- a/resources/packaging/debian/buster/clean +++ b/resources/packaging/debian/buster/clean @@ -12,7 +12,6 @@ third_party/flac/BUILD.gn third_party/zlib/BUILD.gn third_party/opus/BUILD.gn third_party/snappy/BUILD.gn -third_party/ffmpeg/BUILD.gn third_party/libxml/BUILD.gn third_party/libdrm/BUILD.gn third_party/libpng/BUILD.gn diff --git a/resources/packaging/debian/buster/copyright b/resources/packaging/debian/buster/copyright index d699c971..bd2ab388 100644 --- a/resources/packaging/debian/buster/copyright +++ b/resources/packaging/debian/buster/copyright @@ -5,56 +5,134 @@ Files-Excluded: .clang-format *.mk *.so - *.bak *.elf *.swf + *.orig *config.sub *config.guess *jquery*.min.js + buildtools + ui/chromeos + chromeos/third_party + chrome/android + chrome/install_static + chrome/common/extensions/docs + chrome/browser/resources/chromeos + chrome/browser/resources/default_apps + chrome/test/data/android + chrome/test/data/chromeos + chrome/test/data/extensions + chrome/test/data/chromeproxy + chrome/test/data/webui/i18n_process_css_test.html tools/emacs + tools/perf/measurements/test_data + tools/perf/page_sets/maps_perf_test tools/perf/page_sets/tough_scheduling_cases/*.min.js - native_client/NOTICE + native_client* + android_webview + third_party/re2 + third_party/icu + third_party/ink + third_party/opus + third_party/flac + third_party/llvm + third_party/libpng + third_party/libvpx + third_party/libdrm + third_party/WebKit + third_party/snappy + third_party/libjpeg + third_party/libxslt + third_party/libwebp + third_party/eu-strip + third_party/freetype third_party/android* + third_party/chromite + third_party/test_fonts + third_party/fontconfig + third_party/depot_tools third_party/bidichecker + third_party/libjpeg_turbo + third_party/win_build_output third_party/flot/*.js third_party/yasm/source + third_party/zlib/adler* + third_party/zlib/crc32* + third_party/zlib/deflate* + third_party/zlib/gzguts* + third_party/zlib/in* + third_party/zlib/names* + third_party/zlib/trees* + third_party/zlib/x86* + third_party/zlib/z* + third_party/zlib/contrib + third_party/zlib/patches third_party/skia/platform_tools - third_party/skia/resources/icc_profiles/srgb_lab_pcs.icc + third_party/skia/resources/icc_profiles third_party/webgl/src/sdk third_party/webgl/src/other third_party/expat/files - third_party/libxml/src third_party/*rjsmin/bench - third_party/mesa/src/src/gallium/state_trackers/d3d1x/w32api - third_party/libxslt/compile - third_party/libxslt/COPYING - third_party/libxslt/depcomp - third_party/libxslt/install-sh - third_party/libxslt/missing - third_party/libxslt/libexslt - third_party/libxslt/libxslt - third_party/libxslt/mac - third_party/libxslt/win32 - third_party/libxslt/linux + third_party/apache-win32 + third_party/apache-portable-runtime + third_party/snappy/src/testdata third_party/catapult/tracing/test_data + third_party/mesa/src/src/gallium/state_trackers/d3d1x/w32api + third_party/blink/renderer/platform/text_codec_fuzzer_seed_corpus third_party/google_input_tools/src/chrome/os/inputview/_locales/*.js + v8/third_party + v8/benchmarks/regexp.js base/test/data base/third_party/nspr + base/third_party/libevent third_party/binutils - v8/third_party/binutils + third_party/libxml/mac + third_party/libxml/linux + third_party/libxml/win32 + third_party/node + third_party/mocha/mocha.js + third_party/chaijs/chai.js + third_party/swiftshader/third_party/LLVM + third_party/devtools-node-modules + third_party/catapult/third_party/flot + third_party/catapult/third_party/chai + third_party/catapult/third_party/mocha + third_party/webgl/src/conformance-suites + third_party/catapult/third_party/vinn/third_party/v8 + third_party/catapult/tracing/tracing/extras/chrome/cc/layer_tree_host_impl_test_data.js + third_party/accessibility-audit/axs_testing.js + third_party/blanketjs/src/blanket.js + third_party/catapult/experimental/heatmap/power.js + third_party/catapult/experimental/heatmap/smoothness.js + third_party/catapult/experimental/trace_on_tap/third_party/pako/pako_deflate.min.js + third_party/catapult/third_party/Paste/paste/evalexception/media/MochiKit.packed.js + third_party/catapult/third_party/vinn/third_party/parse5/lib/tokenization/named_entity_trie.js + third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/mat3-spec.js + third_party/deqp/src/framework/delibs/coding_guidelines/prettify.js + third_party/dom_distiller_js/dist/js/domdistiller_wrapped.js + third_party/catapult/tracing/third_party/chai/chai.js + ios + tools/android + third_party/webrtc/examples + third_party/catapult/third_party/vinn/third_party/parse5/parse5.js + third_party/libphonenumber/dist/javascript/i18n/phonenumbers/metadata.js + third_party/libphonenumber/dist/javascript/i18n/phonenumbers/metadatalite.js + tools/perf/page_sets/webrtc_cases/adapter.js + third_party/pdfium/third_party/eu-strip + components/test/data/payments # dirs that should be removed, but the jessie package still needs them # third_party/harfbuzz-ng/src +Files: * +Copyright: The Chromium Authors. All rights reserved. +License: BSD-3-clause + Files: debian/* Copyright: 2009-2010 Fabien Tassin 2010-2014 Giuseppe Iuculano - 2012-2017 Michael Gilbert -License: BSD-3-clause - -Files: * -Copyright: The Chromium Authors. All rights reserved. + 2012-2018 Michael Gilbert License: BSD-3-clause Files: PRESUBMIT.py @@ -1454,11 +1532,7 @@ Copyright: Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of License: BSD-3-clause Files: media/ffmpeg/* -Copyright: Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.: -License: BSD-3-clause - -Files: media/ffmpeg/* -Copyright: Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.: +Copyright: Copyright (c) Chromium Authors. All rights reserved. License: BSD-3-clause Files: media/filters/ffmpeg_audio_decoder.hgmedia/filters/ffmpeg_video_decoder.h diff --git a/resources/packaging/debian/buster/scripts/unbundle b/resources/packaging/debian/buster/scripts/unbundle index 36826eac..5ec764c7 100755 --- a/resources/packaging/debian/buster/scripts/unbundle +++ b/resources/packaging/debian/buster/scripts/unbundle @@ -23,7 +23,7 @@ def strip(path): else: os.remove(removal) -keepers = ('openh264', 'libjpeg') +keepers = ('openh264', 'libjpeg', 'ffmpeg') # strip out regenerating files in each build def remove_file(path): diff --git a/resources/patches/debian/system/ffmpeg.patch b/resources/patches/debian/system/ffmpeg.patch deleted file mode 100644 index 58807113..00000000 --- a/resources/patches/debian/system/ffmpeg.patch +++ /dev/null @@ -1,25 +0,0 @@ -description: system ffmpeg build still relies on old ffmpeg_features label -author: chromium 65 authors - ---- a/build/linux/unbundle/ffmpeg.gn -+++ b/build/linux/unbundle/ffmpeg.gn -@@ -14,8 +14,8 @@ pkg_config("system_ffmpeg") { - ] - } - --buildflag_header("ffmpeg_buildflags") { -- header = "ffmpeg_buildflags.h" -+buildflag_header("ffmpeg_features") { -+ header = "ffmpeg_features.h" - flags = [ "USE_SYSTEM_FFMPEG=true" ] - } - -@@ -30,7 +30,7 @@ shim_headers("ffmpeg_shim") { - - source_set("ffmpeg") { - deps = [ -- ":ffmpeg_buildflags", -+ ":ffmpeg_features", - ":ffmpeg_shim", - ] - public_configs = [ ":system_ffmpeg" ] diff --git a/resources/patches/debian/system/lcms2.patch b/resources/patches/debian/system/lcms2.patch index 5bb572f3..8821120e 100644 --- a/resources/patches/debian/system/lcms2.patch +++ b/resources/patches/debian/system/lcms2.patch @@ -4,15 +4,15 @@ bug-debian: http://bugs.debian.org/879153 --- a/third_party/pdfium/BUILD.gn +++ b/third_party/pdfium/BUILD.gn -@@ -194,6 +194,7 @@ jumbo_static_library("pdfium") { +@@ -200,6 +200,7 @@ jumbo_static_library("pdfium") { ":fxge", ":fxjs", ":pwl", + "third_party:lcms2", "third_party:bigint", "third_party:pdfium_base", - ] -@@ -687,6 +688,7 @@ jumbo_static_library("fpdftext") { + "third_party:skia_shared", +@@ -691,6 +692,7 @@ jumbo_static_library("fpdftext") { configs += [ ":pdfium_core_config" ] deps = [ ":fxcrt", @@ -20,11 +20,11 @@ bug-debian: http://bugs.debian.org/879153 ] } -@@ -1081,6 +1083,7 @@ jumbo_static_library("fxge") { +@@ -1078,6 +1080,7 @@ jumbo_static_library("fxge") { deps = [ ":fxcrt", + "third_party:lcms2", ] - defines = [ "DEFINE_PS_TABLES" ] + if (is_component_build || use_system_freetype) { From 5b8494446baed1558908c267719f7aa7e282e4ff Mon Sep 17 00:00:00 2001 From: Eloston Date: Fri, 22 Jun 2018 04:10:34 +0000 Subject: [PATCH 08/10] More explicit credit for client rects noise fingerprinting patch As requested by @csagan5 in https://github.com/Eloston/ungoogled-chromium/commit/71f59c2556bb7d4fe442fa77eaee3f5227ce3cfc#commitcomment-29454423 --- .../fingerprinting-flag-client-rects-noise.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/patches/ungoogled-chromium/fingerprinting-flag-client-rects-noise.patch b/resources/patches/ungoogled-chromium/fingerprinting-flag-client-rects-noise.patch index e503be86..4bb5b9ab 100644 --- a/resources/patches/ungoogled-chromium/fingerprinting-flag-client-rects-noise.patch +++ b/resources/patches/ungoogled-chromium/fingerprinting-flag-client-rects-noise.patch @@ -1,5 +1,5 @@ # Add flag --fingerprinting-client-rects-noise to enable fingerprinting deception for getClientRects and getBoundingClientRect -# Based on https://github.com/Eloston/ungoogled-chromium/pull/377/commits/4151259b3248f0fc5c42fa262a1d1dd43c39fb60 +# Based on patch by csagan5 in https://github.com/Eloston/ungoogled-chromium/pull/377 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc From 3ea744b02afbb4b3dcac93d8d4fa9116d0d6183b Mon Sep 17 00:00:00 2001 From: Eloston Date: Sun, 24 Jun 2018 04:09:25 +0000 Subject: [PATCH 09/10] Add windows-fix-gn-bootstrap.py for Chromium 67 --- .../config_bundles/windows/patch_order.list | 1 + .../windows/windows-fix-gn-bootstrap.patch | 122 ++++++++++++++++++ 2 files changed, 123 insertions(+) create mode 100644 resources/patches/ungoogled-chromium/windows/windows-fix-gn-bootstrap.patch diff --git a/resources/config_bundles/windows/patch_order.list b/resources/config_bundles/windows/patch_order.list index 57b1857a..e733f8bf 100644 --- a/resources/config_bundles/windows/patch_order.list +++ b/resources/config_bundles/windows/patch_order.list @@ -5,3 +5,4 @@ ungoogled-chromium/windows/windows-disable-orderfile.patch ungoogled-chromium/windows/windows-disable-rcpy.patch ungoogled-chromium/windows/windows-fix-building-without-safebrowsing.patch ungoogled-chromium/windows/windows-fix-enum-conflict.patch +ungoogled-chromium/windows/windows-fix-gn-bootstrap.patch diff --git a/resources/patches/ungoogled-chromium/windows/windows-fix-gn-bootstrap.patch b/resources/patches/ungoogled-chromium/windows/windows-fix-gn-bootstrap.patch new file mode 100644 index 00000000..31041e20 --- /dev/null +++ b/resources/patches/ungoogled-chromium/windows/windows-fix-gn-bootstrap.patch @@ -0,0 +1,122 @@ +# Fixes for GN bootstrap on Windows +# Based on Chromium commits: +# 95fe44b3c31cf5e1a668d9ef8853aaf2cf9523a5 +tree 06dfb4ec8be9bdb8d606f6e05803ae8194036f84 +parent fcdb3ef9ea5fb65d0e92cdbcca01fad43fd7db56 +author Yngve N. Pettersen 1523978789 +0000 +committer Commit Bot 1523978789 +0000 + +GN: Fix bootstrap call to setup_toolchain + +The parameters to setup_toolchain changed, adding an OS parameter and a +filename for the environment file. + +Additional fixes: +- Add missing base file to list of files +- vs_toolchain should output Windows paths properly escaped + +Change-Id: I0e05bf34c8b603f16b901e76164e480121ed9d14 +Reviewed-on: https://chromium-review.googlesource.com/1013926 +Reviewed-by: Dirk Pranke +Commit-Queue: Yngve Pettersen +Cr-Commit-Position: refs/heads/master@{#551341} + +# 0d3bbfb6b8ba05af199b49f5dd71d842f6acffda +tree 82fd8aa381d703b290447b3757abe145fe3ce195 +parent 4d4aa99b532b9f5685316b0fa85fd6ca50667216 +author Tom Anderson 1524852455 +0000 +committer Commit Bot 1524852455 +0000 + +Fix gn bootstrap + +BUG=837312 +R=dpranke + +Change-Id: Ia5c57f596388a4ba325208c638fac558984202f0 +Reviewed-on: https://chromium-review.googlesource.com/1030895 +Reviewed-by: Dirk Pranke +Commit-Queue: Dirk Pranke +Cr-Commit-Position: refs/heads/master@{#554419} + +--- a/build/vs_toolchain.py ++++ b/build/vs_toolchain.py +@@ -13,6 +13,7 @@ import shutil + import stat + import subprocess + import sys ++from gn_helpers import ToGNString + + + script_dir = os.path.dirname(os.path.realpath(__file__)) +@@ -448,17 +449,17 @@ def GetToolchainDir(): + runtime_dll_dirs = SetEnvironmentAndGetRuntimeDllDirs() + win_sdk_dir = SetEnvironmentAndGetSDKDir() + +- print '''vs_path = "%s" +-sdk_path = "%s" +-vs_version = "%s" +-wdk_dir = "%s" +-runtime_dirs = "%s" ++ print '''vs_path = %s ++sdk_path = %s ++vs_version = %s ++wdk_dir = %s ++runtime_dirs = %s + ''' % ( +- NormalizePath(os.environ['GYP_MSVS_OVERRIDE_PATH']), +- win_sdk_dir, +- GetVisualStudioVersion(), +- NormalizePath(os.environ.get('WDK_DIR', '')), +- os.path.pathsep.join(runtime_dll_dirs or ['None'])) ++ ToGNString(NormalizePath(os.environ['GYP_MSVS_OVERRIDE_PATH'])), ++ ToGNString(win_sdk_dir), ++ ToGNString(GetVisualStudioVersion()), ++ ToGNString(NormalizePath(os.environ.get('WDK_DIR', ''))), ++ ToGNString(os.path.pathsep.join(runtime_dll_dirs or ['None']))) + + + def main(): +--- a/tools/gn/bootstrap/bootstrap.py ++++ b/tools/gn/bootstrap/bootstrap.py +@@ -129,7 +129,9 @@ def windows_prepare_toolchain(tempdir): + toolchain_paths["vs_path"], + toolchain_paths["sdk_path"], + toolchain_paths["runtime_dirs"], ++ "win", + "x64", ++ "environment.x64", + "true" + ], + cwd=tempdir) +@@ -526,8 +528,11 @@ def write_gn_ninja(path, root_gen_dir, o + 'base/location.cc', + 'base/logging.cc', + 'base/md5.cc', ++ 'base/memory/platform_shared_memory_region.cc', ++ 'base/memory/read_only_shared_memory_region.cc', + 'base/memory/ref_counted.cc', + 'base/memory/ref_counted_memory.cc', ++ 'base/memory/shared_memory_mapping.cc', + 'base/memory/shared_memory_handle.cc', + 'base/memory/shared_memory_tracker.cc', + 'base/memory/weak_ptr.cc', +@@ -664,6 +669,19 @@ def write_gn_ninja(path, root_gen_dir, o + 'base/vlog.cc', + ]) + ++ if is_win: ++ static_libraries['base']['sources'].extend([ ++ 'base/memory/platform_shared_memory_region_win.cc' ++ ]) ++ elif is_mac: ++ static_libraries['base']['sources'].extend([ ++ 'base/memory/platform_shared_memory_region_mac.cc' ++ ]) ++ elif is_posix: ++ static_libraries['base']['sources'].extend([ ++ 'base/memory/platform_shared_memory_region_posix.cc' ++ ]) ++ + if is_posix: + static_libraries['base']['sources'].extend([ + 'base/base_paths_posix.cc', From 6453c2d13a03ee151211a82c06d281209876f688 Mon Sep 17 00:00:00 2001 From: Eloston Date: Sun, 24 Jun 2018 04:10:07 +0000 Subject: [PATCH 10/10] Update validate_config.py to check files without suffix .patch --- developer_utilities/validate_config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/developer_utilities/validate_config.py b/developer_utilities/validate_config.py index 0341bb04..ccdf939d 100755 --- a/developer_utilities/validate_config.py +++ b/developer_utilities/validate_config.py @@ -249,7 +249,8 @@ def main(): dependents=dict(), # patches unused by patch orders unused_patches=set(map( - lambda x: str(x.relative_to(patches_dir)), patches_dir.rglob('*.patch'))) + lambda x: str(x.relative_to(patches_dir)), + filter(lambda x: not x.is_dir(), patches_dir.rglob('*')))) ) try: # Explore and validate base bundles