From 3e0dadb346e64108113d6c763a12651b864bacde Mon Sep 17 00:00:00 2001 From: Kenny Ballou Date: Wed, 27 Mar 2019 22:28:00 -0600 Subject: Add debian disable patches for chromium-73 Add the set of patches from the debian project for disalbing certain features and configurations of chromium. Specifically, the `tracing.patch` seems to allow the package to compile. [0]: https://salsa.debian.org/chromium-team/chromium/tree/master/debian/patches/disable Signed-off-by: Kenny Ballou --- .../www-client/chromium-73.0.3683.75/unrar.patch | 87 ++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 patches/www-client/chromium-73.0.3683.75/unrar.patch (limited to 'patches/www-client/chromium-73.0.3683.75/unrar.patch') diff --git a/patches/www-client/chromium-73.0.3683.75/unrar.patch b/patches/www-client/chromium-73.0.3683.75/unrar.patch new file mode 100644 index 0000000..21f8f1a --- /dev/null +++ b/patches/www-client/chromium-73.0.3683.75/unrar.patch @@ -0,0 +1,87 @@ +description: disable support for safe browsing inspection of rar files +author: Michael Gilbert +bug: http://bugs.debian.org/914487 + +--- a/chrome/common/safe_browsing/BUILD.gn ++++ b/chrome/common/safe_browsing/BUILD.gn +@@ -64,41 +64,6 @@ if (safe_browsing_mode == 1) { + ] + } + +- source_set("rar_analyzer") { +- sources = [ +- "rar_analyzer.cc", +- "rar_analyzer.h", +- ] +- +- deps = [ +- ":archive_analyzer_results", +- ":download_type_util", +- ":file_type_policies", +- "//base", +- "//base:i18n", +- "//components/safe_browsing:features", +- "//third_party/unrar:unrar", +- ] +- +- defines = [ +- "_FILE_OFFSET_BITS=64", +- "LARGEFILE_SOURCE", +- "RAR_SMP", +- "SILENT", +- +- # The following is set to disable certain macro definitions in the unrar +- # source code. +- "CHROMIUM_UNRAR", +- +- # Disables exceptions in unrar, replaces them with process termination. +- "UNRAR_NO_EXCEPTIONS", +- ] +- +- public_deps = [ +- "//components/safe_browsing:csd_proto", +- ] +- } +- + source_set("disk_image_type_sniffer_mac") { + sources = [ + "disk_image_type_sniffer_mac.cc", +@@ -167,7 +132,6 @@ source_set("safe_browsing") { + ":archive_analyzer_results", + ":binary_feature_extractor", + ":download_type_util", +- ":rar_analyzer", + "//components/safe_browsing:features", + ] + +--- a/chrome/services/file_util/safe_archive_analyzer.cc ++++ b/chrome/services/file_util/safe_archive_analyzer.cc +@@ -7,7 +7,6 @@ + #include "base/macros.h" + #include "build/build_config.h" + #include "chrome/common/safe_browsing/archive_analyzer_results.h" +-#include "chrome/common/safe_browsing/rar_analyzer.h" + #include "chrome/common/safe_browsing/zip_analyzer.h" + #include "mojo/public/cpp/bindings/strong_binding.h" + +@@ -50,8 +49,7 @@ void SafeArchiveAnalyzer::AnalyzeRarFile + AnalyzeRarFileCallback callback) { + DCHECK(rar_file.IsValid()); + ++ LOG(FATAL) << "AnalyzeRarFile is disabled in this build"; + safe_browsing::ArchiveAnalyzerResults results; +- safe_browsing::rar_analyzer::AnalyzeRarFile( +- std::move(rar_file), std::move(temporary_file), &results); + std::move(callback).Run(results); + } +--- a/chrome/browser/safe_browsing/download_protection/file_analyzer.cc ++++ b/chrome/browser/safe_browsing/download_protection/file_analyzer.cc +@@ -100,7 +100,7 @@ void FileAnalyzer::Start(const base::Fil + if (inspection_type == DownloadFileType::ZIP) { + StartExtractZipFeatures(); + } else if (inspection_type == DownloadFileType::RAR) { +- StartExtractRarFeatures(); ++ LOG(WARNING) << "Safebrowser inspection of rar files is disabled in this build"; + #if defined(OS_MACOSX) + } else if (inspection_type == DownloadFileType::DMG) { + StartExtractDmgFeatures(); -- cgit v1.2.1