From 34dd1addba95caea857cdb8e3d7b3066cc4f0e04 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 9 Feb 2021 09:26:36 +0100 Subject: [PATCH] Related: #1976278 Sync to flatpak branch (cherry picked from commit af202acfd9e370b8746422286e59dbd124808674) Partly from rhel-8.4.0 (cherry picked from commit 8876ba917cb62d22c995e0bac73a2ced67ab03bc) Conflicts: firefox.spec --- firefox-redhat-default-prefs.js | 2 +- firefox.spec | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/firefox-redhat-default-prefs.js b/firefox-redhat-default-prefs.js index 607a132..9ead3a2 100644 --- a/firefox-redhat-default-prefs.js +++ b/firefox-redhat-default-prefs.js @@ -16,7 +16,7 @@ pref("extensions.shownSelectionUI", true); pref("ui.SpellCheckerUnderlineStyle", 1); pref("startup.homepage_override_url", "http://www.redhat.com"); pref("startup.homepage_welcome_url", "http://www.redhat.com"); -pref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=file:///usr/share/doc/HTML/index.html"); +pref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=file:///%PREFIX%/share/doc/HTML/index.html"); pref("geo.wifi.uri", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"); pref("media.gmp-gmpopenh264.provider.enabled",false); pref("media.gmp-gmpopenh264.autoupdate",false); diff --git a/firefox.spec b/firefox.spec index 2b29339..6859440 100644 --- a/firefox.spec +++ b/firefox.spec @@ -124,7 +124,7 @@ #%global default_bookmarks_file %{_datadir}/bookmarks/default-bookmarks.html # need to use full path because of flatpak where datadir is /app/share -%global default_bookmarks_file /usr/share/bookmarks/default-bookmarks.html +%global default_bookmarks_file %{_prefix}/share/bookmarks/default-bookmarks.html %global firefox_app_id \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} # Minimal required versions %global cairo_version 1.13.1 @@ -1418,6 +1418,7 @@ create_default_langpack "zh-TW" "zh" ln -s %{mozappdir}/defaults/preferences $RPM_BUILD_ROOT/%{mozappdir}/browser/defaults/preferences # Default preferences %{__cp} %{SOURCE12} %{buildroot}%{mozappdir}/defaults/preferences/all-redhat.js +sed -i -e 's|%PREFIX%|%{_prefix}|' %{buildroot}%{mozappdir}/defaults/preferences/all-redhat.js # System config dir %{__mkdir_p} %{buildroot}/%{_sysconfdir}/%{name}/pref