Package: chromium Severity: minor Version: 90.0.4430.212-1 Tags: patch
For some customer project I did some research on the Chromium preferences and policy system recently. (Note, that this bug report does not have a patch attached, but points to a usable patch in openSUSE's packaging Git, see below).
While looking at parts of the chromium source code, I found that chromium renamed "master_preferences" to "initial_preferences" [1].
The "master_preferences" file is still legacy supported by chromium's code base, but might be removed later.
Chromium on Windows and openSUSE (and likely other distros) honours both files (initial_preferences, master_preferences) and initial_preferences takes precendence (I assume, haven't tested it).
Chromium upstream expects the initial_preferences (and master_preferences) file(s) next to the chromium executable [2]. In Linux distros, this does not work, distro maintainers patch in some /etc/chromium path here.
In Debian, Chromium simply honours /etc/chromium/master_preferences as the only possible file location, the path is hard-coded [3].
In openSUSE, for example, they ship a slightly more elegant patch [4] that I'd like to recommend for Debian's chromium, too:
```Index: chromium-91.0.4472.57/chrome/browser/first_run/first_run_internal_linux.cc
===================================================================--- chromium-91.0.4472.57.orig/chrome/browser/first_run/first_run_internal_linux.cc
+++ chromium-91.0.4472.57/chrome/browser/first_run/first_run_internal_linux.cc @@ -21,9 +21,7 @@ bool IsOrganicFirstRun() { base::FilePath InitialPrefsPath() { // The standard location of the initial prefs is next to the chrome binary. base::FilePath initial_prefs; - if (!base::PathService::Get(base::DIR_EXE, &initial_prefs)) - return base::FilePath(); - + initial_prefs = base::FilePath("/etc/chromium");base::FilePath new_path = initial_prefs.AppendASCII(installer::kInitialPrefs);
if (base::PathIsReadable(new_path)) return new_path; ``` Greets, Mike[1] https://github.com/chromium/chromium/commit/119506a6d70f0932c3808aea7327a4439c931667 [2] https://github.com/chromium/chromium/blob/d7da0240cae77824d1eda25745c4022757499131/chrome/browser/first_run/first_run_internal_linux.cc#L24 [3] https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/debianization/master-preferences.patch [4] https://build.opensuse.org/package/view_file/network:chromium/chromium/chromium-master-prefs-path.patch?expand=1
-- DAS-NETZWERKTEAM c\o Technik- und Ökologiezentrum Eckernförde Mike Gabriel, Marienthaler Str. 17, 24340 Eckernförde mobile: +49 (1520) 1976 148 landline: +49 (4351) 850 8940 GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22 0782 9AF4 6B30 2577 1B31 mail: mike.gabr...@das-netzwerkteam.de, http://das-netzwerkteam.de
pgpCb__ztXmej.pgp
Description: Digitale PGP-Signatur