File disable-catapult.patch of Package nodejs-electron

description: remove dependencies on third_party catapult
author: Michael Gilbert <mgilbert@debian.org>

--- a/BUILD.gn
+++ b/BUILD.gn
@@ -242,7 +242,6 @@ group("gn_all") {
     if (!is_ios) {
       deps += [
         "//google_apis/gcm:mcs_probe",
-        "//third_party/catapult/telemetry:bitmaptools($host_toolchain)",
       ]
       if (!is_android) {
         if (!is_castos && !is_fuchsia) {
@@   -379,7 +378,6 @@ group("gn_all") {
         "//testing/android/junit:junit_unit_tests",
         "//third_party/android_build_tools/lint:custom_lint_java",
         "//third_party/androidx_javascriptengine",
-        "//third_party/catapult/devil",
         "//third_party/r8:custom_d8_java",
         "//tools/android:android_tools",
         "//tools/android:memconsumer",
@@ -1104,7 +1101,6 @@ if (!is_ios) {
         "//chrome:chrome",
         "//chrome/test/chromedriver:chromedriver_server",
         "//testing:test_scripts_shared",
-        "//third_party/catapult/third_party/typ",
       ]
       if (is_win) {
         data_deps += [ "//build/win:copy_cdb_to_output" ]
@@ -1146,7 +1142,6 @@ if (!is_ios) {
       "//third_party/blink/public:blink_devtools_inspector_resources",
       "//third_party/blink/public/mojom:mojom_platform_js_data_deps",
       "//third_party/blink/renderer/core:js_files_for_form_controls_web_tests",
-      "//third_party/catapult/third_party/typ",
       "//third_party/hyphenation-patterns:test_data",
       "//third_party/mesa_headers",
       "//tools/imagediff",
@@ -1227,7 +1222,6 @@ if (!is_ios) {
 
     if (is_android) {
       data += [
-        "//third_party/catapult/",
         "//build/android/",
       ]
     }
@@ -1521,10 +1515,6 @@ if (!is_ios) {
       "//third_party/blink/web_tests/TestExpectations",
       "//third_party/blink/web_tests/VirtualTestSuites",
       "//third_party/blink/web_tests/W3CImportExpectations",
-      "//third_party/catapult/common/py_utils/",
-      "//third_party/catapult/devil/",
-      "//third_party/catapult/dependency_manager/",
-      "//third_party/catapult/third_party/typ/",
       "//third_party/depot_tools/pylint-1.5",
       "//third_party/depot_tools/pylint_main.py",
       "//third_party/depot_tools/pylintrc",
--- a/tools/binary_size/BUILD.gn
+++ b/tools/binary_size/BUILD.gn
@@ -20,7 +20,6 @@ python_library("sizes_py") {
   pydeps_file = "sizes.pydeps"
   data_deps = [
     "//build/util:test_results",
-    "//third_party/catapult/tracing:convert_chart_json",
   ]
 }
 
--- a/v8/tools/BUILD.gn
+++ b/v8/tools/BUILD.gn
@@ -31,10 +31,6 @@ group("v8_android_test_runner_deps") {
 
   if (is_android && !build_with_chromium) {
     data_deps = [ "//build/android:test_runner_py" ]
-    data = [
-      # This is used by android.py, but not included by test_runner_py above.
-      "//third_party/catapult/devil/devil/android/perf/",
-    ]
   }
 }
 
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -9960,8 +9960,6 @@ if (!is_android && !is_fuchsia) {
       "//chrome/test/data/password/captured_sites/",
       "//chrome/test/data/web_page_replay_go_helper_scripts/automation_helper.js",
       "//components/test/data/autofill/web_page_replay_support_files/",
-      "//third_party/catapult/telemetry/telemetry/bin/",
-      "//third_party/catapult/web_page_replay_go/deterministic.js",
     ]
 
     if (is_linux || is_chromeos || is_win) {
@@ -10174,7 +10172,6 @@ if (!is_android) {
     deps = [ "//tools/perf/chrome_telemetry_build:telemetry_chrome_test" ]
 
     data = [
-      "//third_party/catapult/telemetry/telemetry/internal/bin/",
       "//tools/perf/run_telemetry_tests",
       "//testing/scripts/run_telemetry_as_googletest.py",
     ]
--- a/tools/grit/BUILD.gn
+++ b/tools/grit/BUILD.gn
@@ -33,7 +33,6 @@ group("grit_python_unittests") {
   data = [
     "//testing/scripts/run_isolated_script_test.py",
     "//tools/grit/",
-    "//third_party/catapult/third_party/typ/",
     "//third_party/node/",
   ]
 }
--- a/tools/metrics/BUILD.gn
+++ b/tools/metrics/BUILD.gn
@@ -45,7 +45,6 @@ group("metrics_python_tests") {
     # The run_isolated_script_test.py script and its dependencies.
     "//testing/scripts/run_isolated_script_test.py",
     "//testing/scripts/common.py",
-    "//third_party/catapult/third_party/typ/",
 
     # Scripts we depend on. Their unit tests are also included.
     "//tools/json_comment_eater/json_comment_eater.py",
--- a/tools/perf/chrome_telemetry_build/BUILD.gn
+++ b/tools/perf/chrome_telemetry_build/BUILD.gn
@@ -207,7 +207,6 @@ group("telemetry_chrome_test_without_chr
   ]
   data_deps = [
     "//testing:test_scripts_shared",
-    "//third_party/catapult:telemetry_chrome_test_support",
     "//tools/metrics:metrics_python_tests",
   ]
 
@@ -251,7 +250,5 @@ group("telemetry_chrome_test_without_chr
       "//build/android:devil_chromium_py",
       "//build/android:stack_tools",
     ]
-  } else if (!is_fuchsia) {
-    data_deps += [ "//third_party/catapult/telemetry:bitmaptools" ]
   }
 }
--- a/tools/polymer/BUILD.gn
+++ b/tools/polymer/BUILD.gn
@@ -8,7 +8,6 @@ group("polymer_tools_python_unittests")
   data = [
     "//testing/scripts/run_isolated_script_test.py",
     "//tools/polymer/",
-    "//third_party/catapult/third_party/typ/",
   ]
   data_deps = [ "//testing:test_scripts_shared" ]
 }
--- a/tools/gritsettings/resource_ids.spec
+++ b/tools/gritsettings/resource_ids.spec
@@ -755,12 +755,6 @@
   "content/test/web_ui_mojo_test_resources.grd": {
     "includes": [7340],
   },
-
-  # This file is generated during the build.
-  "<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.grd": {
-    "META": {"sizes": {"includes": [20],}},
-    "includes": [7360],
-  },
   # END content/ section.
 
   # START "everything else" section.
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -2530,7 +2530,6 @@ source_set("browser") {
       "//components/speech:speech",
       "//components/vector_icons",
       "//components/webauthn/json",
-      "//content/browser/tracing:resources",
     ]
   }
 
--- a/chrome/chrome_paks.gni
+++ b/chrome/chrome_paks.gni
@@ -190,8 +190,6 @@ template("chrome_extra_paks") {
         "$root_gen_dir/chrome/webui_gallery_resources.pak",
         "$root_gen_dir/chrome/whats_new_resources.pak",
         "$root_gen_dir/content/browser/devtools/devtools_resources.pak",
-        "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
-        "$root_gen_dir/content/traces_internals_resources.pak",
       ]
       deps += [
         "//chrome/browser/resources:component_extension_resources",
@@ -199,7 +197,6 @@ template("chrome_extra_paks") {
         "//chrome/browser/resources:dev_ui_paks",
         "//chrome/browser/resources/search_engine_choice:resources",
         "//content/browser/devtools:devtools_resources",
-        "//content/browser/tracing:resources",
       ]
       if (is_chrome_branded) {
         sources += [
--- a/content/shell/BUILD.gn
+++ b/content/shell/BUILD.gn
@@ -535,13 +535,6 @@ repack("pak") {
     sources += [ "$root_gen_dir/content/webxr_internals_resources.pak" ]
   }
 
-  if (!is_android && !is_ios) {
-    deps += [ "//content/browser/tracing:resources" ]
-    sources += [
-      "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
-      "$root_gen_dir/content/traces_internals_resources.pak",
-    ]
-  }
 
   if (is_ios) {
     sources += [
--- a/content/browser/tracing/BUILD.gn
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 2014 The Chromium Authors
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import("//tools/grit/grit_rule.gni")
-import("//ui/webui/resources/tools/generate_grd.gni")
-
-assert(!is_android)
-
-# The script just writes filename with no dirs to the .grd, so we always need
-# this file to be in the same directory as the inputs.
-tracing_grd = "$target_gen_dir/tracing_resources.grd"
-
-generate_grd("build_grd") {
-  grd_prefix = "tracing"
-  out_grd = tracing_grd
-  input_files = [
-    "about_tracing.html",
-    "about_tracing.js",
-  ]
-  input_files_base_dir = rebase_path(target_gen_dir, root_build_dir)
-  deps = [ "//third_party/catapult/tracing:generate_about_tracing" ]
-}
-
-grit("resources") {
-  source = tracing_grd
-
-  # Required because the .grd is generated.
-  enable_input_discovery_for_gn_analyze = false
-
-  outputs = [
-    "grit/tracing_resources.h",
-    "grit/tracing_resources_map.cc",
-    "grit/tracing_resources_map.h",
-    "tracing_resources.pak",
-  ]
-
-  deps = [ ":build_grd" ]
-}
--- a/content/browser/tracing/tracing_ui.cc
+++ b/content/browser/tracing/tracing_ui.cc
@@ -25,7 +25,6 @@
 #include "base/strings/string_util.h"
 #include "base/trace_event/trace_event.h"
 #include "base/values.h"
-#include "content/browser/tracing/grit/tracing_resources.h"
 #include "content/browser/tracing/tracing_controller_impl.h"
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/browser_thread.h"
@@ -240,8 +239,6 @@ TracingUI::TracingUI(WebUI* web_ui)
       web_ui->GetWebContents()->GetBrowserContext(), kChromeUITracingHost);
   source->DisableTrustedTypesCSP();
   source->UseStringsJs();
-  source->SetDefaultResource(IDR_TRACING_ABOUT_TRACING_HTML);
-  source->AddResourcePath("tracing.js", IDR_TRACING_ABOUT_TRACING_JS);
 
   source->SetRequestFilter(base::BindRepeating(OnShouldHandleRequest),
                            base::BindRepeating(OnTracingRequest));
--- a/testing/BUILD.gn
+++ b/testing/BUILD.gn
@@ -45,7 +45,6 @@ group("run_perf_test") {
 
   data_deps = [
     ":test_scripts_shared",
-    "//third_party/catapult/tracing:convert_chart_json",
   ]
 
   if (is_android) {
--- a/mojo/public/tools/BUILD.gn
+++ b/mojo/public/tools/BUILD.gn
@@ -13,6 +13,5 @@ group("mojo_python_unittests") {
   ]
   data_deps = [
     "//testing:test_scripts_shared",
-    "//third_party/catapult/third_party/typ/",
   ]
 }
--- a/third_party/webrtc/test/BUILD.gn
+++ b/third_party/webrtc/test/BUILD.gn
@@ -286,10 +286,6 @@ rtc_library("perf_test") {
   ]
   if (rtc_enable_protobuf) {
     sources += [ "testsupport/perf_test_histogram_writer.cc" ]
-    deps += [
-      "//third_party/catapult/tracing/tracing:histogram",
-      "//third_party/catapult/tracing/tracing:reserved_infos",
-    ]
   } else {
     sources += [ "testsupport/perf_test_histogram_writer_no_protobuf.cc" ]
   }
@@ -607,7 +603,6 @@ if (rtc_include_tests && !build_with_chr
 
       if (rtc_enable_protobuf) {
         sources += [ "testsupport/perf_test_histogram_writer_unittest.cc" ]
-        deps += [ "//third_party/catapult/tracing/tracing:histogram" ]
       }
 
       data = test_support_unittests_resources
--- a/tools/perf/core/perfetto_binary_roller/BUILD.gn
+++ b/tools/perf/core/perfetto_binary_roller/BUILD.gn
@@ -7,7 +7,6 @@ import("//build/util/generate_wrapper.gn
 generate_wrapper("upload_trace_processor") {
   testonly = true
   data_deps = [
-    "//third_party/catapult:telemetry_chrome_test_support",
     "//third_party/perfetto/src/trace_processor:trace_processor_shell",
   ]
   data = [
--- a/electron/electron_paks.gni
+++ b/electron/electron_paks.gni
@@ -57,7 +57,6 @@
       "$root_gen_dir/chrome/dev_ui_browser_resources.pak",
       "$root_gen_dir/components/components_resources.pak",
       "$root_gen_dir/content/browser/resources/media/media_internals_resources.pak",
-      "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
       "$root_gen_dir/content/browser/webrtc/resources/webrtc_internals_resources.pak",
       "$root_gen_dir/content/content_resources.pak",
       "$root_gen_dir/content/gpu_resources.pak",
@@ -73,7 +72,6 @@
       "//content/browser/resources/gpu:resources",
       "//content/browser/resources/media:resources",
       "//content/browser/resources/process:resources",
-      "//content/browser/tracing:resources",
       "//content/browser/webrtc/resources",
       "//electron:resources",
       "//mojo/public/js:resources",
openSUSE Build Service is sponsored by