From f7f118908a1df1979fe80b6d4f366467ecfef42a Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Wed, 23 Aug 2023 11:21:34 +0300 Subject: [PATCH] Fix crash Chromium crashed when ~/.config/chromium was empty due to incorrect rediff of the patch (there waas no return from function) Took patch from https://git.altlinux.org/gears/c/chromium.git?p=chromium.git;a=blob;f=.rpm/patches/0001-OPENSUSE-enables-reading-of-the-master-preference.patch;h=ee73ff654a7ff1c2e831f1b5782d399780770e8a;hb=67bb49dda6122ece9f9e79d837595f0dd71dc03d Fixes: 149500f78 ("change the fix master-prefs-path") --- chromium-30.0.1599.66-master-prefs-path.patch | 26 +++++++++---------- chromium-browser-stable.spec | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/chromium-30.0.1599.66-master-prefs-path.patch b/chromium-30.0.1599.66-master-prefs-path.patch index c6d584d..339d1ac 100644 --- a/chromium-30.0.1599.66-master-prefs-path.patch +++ b/chromium-30.0.1599.66-master-prefs-path.patch @@ -1,19 +1,19 @@ diff --git a/chrome/browser/first_run/first_run_internal_linux.cc b/chrome/browser/first_run/first_run_internal_linux.cc index 33fd579..9890694 100644 ---- a/chrome/browser/first_run/first_run_internal_linux.cc -+++ b/chrome/browser/first_run/first_run_internal_linux.cc -@@ -20,12 +20,9 @@ bool IsOrganicFirstRun() { - - base::FilePath InitialPrefsPath() { - // The standard location of the initial prefs is next to the chrome binary. -+ // ...but we patch it to use /etc/chromium - base::FilePath dir_exe; -- if (!base::PathService::Get(base::DIR_EXE, &dir_exe)) { -- return base::FilePath(); +--- a/chrome/installer/util/initial_preferences.cc ++++ b/chrome/installer/util/initial_preferences.cc +@@ -75,12 +75,8 @@ + // static + base::FilePath InitialPreferences::Path(const base::FilePath& dir, + bool for_read) { +- base::FilePath initial_prefs = dir.AppendASCII("initial_preferences"); +- if (!for_read || base::PathIsReadable(initial_prefs)) { +- return initial_prefs; - } - -- return installer::InitialPreferences::Path(dir_exe); -+ dir_exe = base::FilePath("/etc/chromium"); +- return dir.AppendASCII("master_preferences"); ++ base::FilePath initial_prefs = base::FilePath("/etc/chromium"); ++ return initial_prefs.AppendASCII("master_preferences"); } + #endif // !BUILDFLAG(IS_MAC) - } // namespace internal diff --git a/chromium-browser-stable.spec b/chromium-browser-stable.spec index 0602e9a..d3fecdc 100644 --- a/chromium-browser-stable.spec +++ b/chromium-browser-stable.spec @@ -103,7 +103,7 @@ Summary: A fast web browser based on the Blink engine Name: chromium-browser-stable Version: 115.0.5790.170 -Release: 1 +Release: 2 License: BSD, LGPL Group: Networking/WWW Url: https://www.chromium.org/Home