diff --git a/0002-Yandex-as-default-search-engine.patch b/0002-Yandex-as-default-search-engine.patch new file mode 100644 index 0000000..c5d93ff --- /dev/null +++ b/0002-Yandex-as-default-search-engine.patch @@ -0,0 +1,135 @@ +From b6bcaa2f6f16d65e0fffaefc6de2e94ad5780f76 Mon Sep 17 00:00:00 2001 +From: Mikhail Novosyolov +Date: Sun, 29 May 2022 22:31:21 +0300 +Subject: [PATCH] Yandex as default search engine + +Unfortunately, Google has commercially gone away from Russia, where most users of ROSA Linux are located. +Quality of google.ru search results seems to be degradating a bit. + +I understand that Google develops Chromium, and so it would be fair if they got some money from adverstisment, +but, firstly, they have themselves stopped all ads in Russia, +secondly, influnce of Google is a bad thing because they take part in the information war. + +The patch "Functional new tab page with non-Google search engines" makes chrome://new-tab-page work. +Yandex's URL which is patched here does not allow to add new items in to the quick access list +and shows advertisment of the proprietary Yandex browser. I do not want users to install it. +--- + components/search_engines/prepopulated_engines.json | 9 +++++---- + .../search_engines/template_url_prepopulate_data.cc | 11 ++++++----- + 2 files changed, 11 insertions(+), 9 deletions(-) + +diff --git a/components/search_engines/prepopulated_engines.json b/components/search_engines/prepopulated_engines.json +index 13572d4355..cc449a1ccb 100644 +--- a/components/search_engines/prepopulated_engines.json ++++ b/components/search_engines/prepopulated_engines.json +@@ -553,7 +553,7 @@ + "suggest_url": "https://suggest.yandex.by/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}", + "image_url": "https://yandex.by/images/search/?rpt=imageview", + "image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1", +- "new_tab_url": "https://www.yandex.by/chrome/newtab", ++ "new_tab_url": "chrome://new-tab-page", + "type": "SEARCH_ENGINE_YANDEX", + "id": 15 + }, +@@ -566,6 +566,7 @@ + "suggest_url": "https://suggest.yandex.com/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}&uil=en&v=3&sn=5", + "image_url": "https://yandex.com/images/search?rpt=imageview", + "image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1", ++ "new_tab_url": "chrome://new-tab-page", + "type": "SEARCH_ENGINE_YANDEX", + "id": 15 + }, +@@ -579,7 +580,7 @@ + "suggest_url": "https://suggest.yandex.kz/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}", + "image_url": "https://yandex.kz/images/search/?rpt=imageview", + "image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1", +- "new_tab_url": "https://www.yandex.kz/chrome/newtab", ++ "new_tab_url": "chrome://new-tab-page", + "type": "SEARCH_ENGINE_YANDEX", + "id": 15 + }, +@@ -593,7 +594,7 @@ + "suggest_url": "https://suggest.yandex.ru/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}", + "image_url": "https://yandex.ru/images/search/?rpt=imageview", + "image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1", +- "new_tab_url": "https://www.yandex.ru/chrome/newtab", ++ "new_tab_url": "chrome://new-tab-page", + "type": "SEARCH_ENGINE_YANDEX", + "id": 15 + }, +@@ -606,7 +607,7 @@ + "suggest_url": "https://suggest.yandex.com.tr/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}", + "image_url": "https://yandex.com.tr/gorsel/search?rpt=imageview", + "image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1", +- "new_tab_url": "https://www.yandex.com.tr/chrome/newtab", ++ "new_tab_url": "chrome://new-tab-page", + "type": "SEARCH_ENGINE_YANDEX", + "id": 15 + }, +diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc +index e38343c221..8efd6fd2c5 100644 +--- a/components/search_engines/template_url_prepopulate_data.cc ++++ b/components/search_engines/template_url_prepopulate_data.cc +@@ -28,6 +28,7 @@ namespace { + + // Default (for countries with no better engine set) + const PrepopulatedEngine* const engines_default[] = { ++ &yandex_com, + &google, + &bing, + &yahoo, +@@ -155,8 +156,8 @@ const PrepopulatedEngine* const engines_BR[] = { + + // Belarus + const PrepopulatedEngine* const engines_BY[] = { +- &google, + &yandex_by, ++ &google, + &mail_ru, + &bing, + &duckduckgo, +@@ -434,10 +435,10 @@ const PrepopulatedEngine* const engines_IN[] = { + + // Iraq + const PrepopulatedEngine* const engines_IQ[] = { ++ &yandex_tr, + &google, + &bing, + &yahoo, +- &yandex_tr, + &duckduckgo, + }; + +@@ -524,8 +525,8 @@ const PrepopulatedEngine* const engines_KW[] = { + + // Kazakhstan + const PrepopulatedEngine* const engines_KZ[] = { +- &google, + &yandex_kz, ++ &google, + &mail_ru, + &bing, + &duckduckgo, +@@ -794,8 +795,8 @@ const PrepopulatedEngine* const engines_RS[] = { + + // Russia + const PrepopulatedEngine* const engines_RU[] = { +- &google, + &yandex_ru, ++ &google, + &mail_ru, + &bing, + &duckduckgo, +@@ -893,8 +894,8 @@ const PrepopulatedEngine* const engines_TN[] = { + + // Turkey + const PrepopulatedEngine* const engines_TR[] = { +- &google, + &yandex_tr, ++ &google, + &yahoo_tr, + &bing, + &duckduckgo, +-- +2.35.2 + diff --git a/chromium-browser-stable.spec b/chromium-browser-stable.spec index 09ed282..e45692c 100644 --- a/chromium-browser-stable.spec +++ b/chromium-browser-stable.spec @@ -81,7 +81,7 @@ Summary: A fast web browser based on the Blink engine Name: chromium-browser-stable Version: 102.0.5005.61 -Release: 1 +Release: 2 License: BSD, LGPL Group: Networking/WWW Url: https://www.chromium.org/Home @@ -123,7 +123,8 @@ Patch647: ALT-allow-to-override-clang-through-env-variables.patch # XXX This patch is not enough to fully fix debuginfo and debugsource subpackages Patch648: fix-debugsource.patch # chrome://new-tab-page-third-party -> chrome://new-tab-page -Patch649: 0001-Functional-new-tab-page-with-non-Google-search-engin.patch +Patch649: 0001-Functional-new-tab-page-with-non-Google-search-engin.patch +Patch650: 0002-Yandex-as-default-search-engine.patch BuildRequires: bison BuildRequires: llvm15