From eeebad3d21698db1517b555c64bfcedbaa0e2a31 Mon Sep 17 00:00:00 2001 From: Zhao Hang Date: Sat, 28 May 2022 09:29:06 +0800 Subject: [PATCH 1/3] update to firefox-91.9.1-1.el8_6 Signed-off-by: Zhao Hang --- download | 10 +++---- firefox-redhat-default-prefs.js | 35 +++++++++++++++++++++++ firefox.spec | 50 ++++++++++++++++++++++----------- 3 files changed, 73 insertions(+), 22 deletions(-) create mode 100644 firefox-redhat-default-prefs.js diff --git a/download b/download index 2b251a4..84ee633 100644 --- a/download +++ b/download @@ -1,5 +1,5 @@ -9030c1f285ee079a4c386e525e57a2b1 cbindgen-vendor.tar.xz -a130eff8558c46cad9d5ad957ec16a7b firefox-91.7.0esr.processed-source.tar.xz -499f3d8cf3e7ca16a61bda6e49cbf4fc firefox-langpacks-91.7.0esr-20220307.tar.xz -5b7e3326f4484ce1ab685e74f8477a26 nspr-4.32.0-1.el8_1.src.rpm -770fbbfb259e656b8f3879934137d10c nss-3.67.0-7.el8_1.src.rpm +9030c1f285ee079a4c386e525e57a2b1 cbindgen-vendor.tar.xz +a135ed443e0a90b552880362975feefa firefox-91.9.1esr.processed-source.tar.xz +e3c6397907f2e5bb1ac5948acf01495c firefox-langpacks-91.9.1esr-20220520.tar.xz +5b7e3326f4484ce1ab685e74f8477a26 nspr-4.32.0-1.el8_1.src.rpm +770fbbfb259e656b8f3879934137d10c nss-3.67.0-7.el8_1.src.rpm diff --git a/firefox-redhat-default-prefs.js b/firefox-redhat-default-prefs.js new file mode 100644 index 0000000..9ead3a2 --- /dev/null +++ b/firefox-redhat-default-prefs.js @@ -0,0 +1,35 @@ +pref("app.update.auto", false); +pref("app.update.enabled", false); +pref("app.update.autoInstallEnabled", false); +pref("general.smoothScroll", true); +pref("intl.locale.matchOS", true); +pref("toolkit.storage.synchronous", 0); +pref("toolkit.networkmanager.disable", false); +pref("offline.autoDetect", true); +pref("browser.backspace_action", 2); +pref("browser.display.use_system_colors", true); +pref("browser.download.folderList", 1); +pref("browser.link.open_external", 3); +pref("browser.shell.checkDefaultBrowser", false); +pref("network.manage-offline-status", true); +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:///%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); +pref("media.gmp-gmpopenh264.enabled",false); +pref("media.gmp-gmpopenh264.enabled",false); +pref("plugins.notifyMissingFlash", false); +/* See https://bugzilla.redhat.com/show_bug.cgi?id=1226489 */ +pref("browser.display.use_system_colors", false); +pref("layers.use-image-offscreen-surfaces", false); +/* Allow sending credetials to all https:// sites */ +pref("network.negotiate-auth.trusted-uris", "https://"); +pref("security.use_sqldb", false); +/* Use OS settings for UI language */ +pref("intl.locale.requested", ""); +/* See https://bugzilla.redhat.com/show_bug.cgi?id=1672424 */ +pref("storage.nfs_filesystem", true); \ No newline at end of file diff --git a/firefox.spec b/firefox.spec index 2c72ead..1389e87 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1,4 +1,3 @@ -%define anolis_release .0.1 %global disable_toolsets 0 %ifarch %{ix86} @@ -9,17 +8,17 @@ %{lua: function dist_to_rhel_minor(str, start) - match = string.match(str, ".module%+an8.%d+") + match = string.match(str, ".module%+el8.%d+") if match then return string.sub(match, 13) end - match = string.match(str, ".an8_%d+") + match = string.match(str, ".el8_%d+") if match then return string.sub(match, 6) end - match = string.match(str, ".an8") + match = string.match(str, ".el8") if match then - return 6 + return 7 end return -1 end} @@ -127,10 +126,17 @@ end} %global official_branding 1 %global build_langpacks 1 +# Workaround the dreaded "upstream source file changed content" rpmdiff failure that only secalert can waive. +# If set to .b2 or .b3 ... the processed source file needs to be renamed before upload, e.g. +# firefox-91.9.0esr.b2.processed-source.tar.xz +# With does_not_exist it's empty and source file name as is. +#global buildnum %{?does_not_exist} +%global buildnum %{?does_not_exist} + Summary: Mozilla Firefox Web browser Name: firefox -Version: 91.7.0 -Release: 3%{anolis_release}%{?dist} +Version: 91.9.1 +Release: 1%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ %if 0%{?rhel} == 9 @@ -152,15 +158,19 @@ ExcludeArch: aarch64 s390 ppc # The official tarball has to be always processed by the process-official-tarball # script. # Link to official tarball: https://hg.mozilla.org/releases/mozilla-release/archive/firefox-%%{version}%%{?pre_version}.source.tar.xz -Source0: firefox-%{version}%{?pre_version}.processed-source.tar.xz +Source0: firefox-%{version}%{?pre_version}%{?buildnum}.processed-source.tar.xz %if %{build_langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20220307.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20220520.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: process-official-tarball Source10: firefox-mozconfig -Source12: firefox-anolis-default-prefs.js +%if 0%{?centos} +Source12: firefox-centos-default-prefs.js +%else +Source12: firefox-redhat-default-prefs.js +%endif Source20: firefox.desktop Source21: firefox.sh.in Source23: firefox.1 @@ -323,7 +333,8 @@ Requires: nss >= %{nss_build_version} %endif BuildRequires: desktop-file-utils -Requires: anolis-indexhtml +BuildRequires: system-bookmarks +Requires: redhat-indexhtml %if %{?run_tests} BuildRequires: xorg-x11-server-Xvfb @@ -430,8 +441,8 @@ echo "use_rustts %{?use_rustts}" %patch219 -p1 -b .rhbz-1173156 %patch224 -p1 -b .1170092 -# the nss changed in 8.6 and later, so addons are working in older releases -%if 0%{?rhel_minor_version} >= 6 +# Enable workaround for RHEL >= 8: rhbz#2043303 +%if 0%{?rhel} == 8 || 0%{?rhel} >= 9 %patch225 -p1 -b .firefox-nss-addon-hack %endif @@ -980,7 +991,7 @@ function install_rpms_to_current_dir() { %endif # set up our default bookmarks -# %{__cp} -p %{default_bookmarks_file} objdir/dist/bin/browser/chrome/en-US/locale/browser/bookmarks.html +%{__cp} -p %{default_bookmarks_file} objdir/dist/bin/browser/chrome/en-US/locale/browser/bookmarks.html # Make sure locale works for langpacks %{__cat} > objdir/dist/bin/browser/defaults/preferences/firefox-l10n.js << EOF @@ -1260,9 +1271,14 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog -* Fri Mar 11 2022 Liwei Ge - 91.7.0-3.0.1 -- Add firefox-anolis-default-prefs.js -- Remove bookmarks +* Fri May 20 2022 Jan Horak - 91.9.1-1 +- Update to 91.9.1 build1 + +* Tue Apr 26 2022 Eike Rathke - 91.9.0-1 +- Update to 91.9.0 + +* Tue Apr 05 2022 Eike Rathke - 91.8.0-1 +- Update to 91.8.0 * Mon Mar 07 2022 Eike Rathke - 91.7.0-3 - Update to 91.7.0 build3 -- Gitee From 3cf4534a640b2c57cf27d5a7b56dca259a4650f9 Mon Sep 17 00:00:00 2001 From: Zhao Hang Date: Thu, 16 Dec 2021 06:12:47 +0000 Subject: [PATCH 2/3] rebrand: add firefox-anolis-default-prefs.js --- firefox-redhat-default-prefs.js | 35 --------------------------------- firefox.spec | 18 ++++++++--------- 2 files changed, 9 insertions(+), 44 deletions(-) delete mode 100644 firefox-redhat-default-prefs.js diff --git a/firefox-redhat-default-prefs.js b/firefox-redhat-default-prefs.js deleted file mode 100644 index 9ead3a2..0000000 --- a/firefox-redhat-default-prefs.js +++ /dev/null @@ -1,35 +0,0 @@ -pref("app.update.auto", false); -pref("app.update.enabled", false); -pref("app.update.autoInstallEnabled", false); -pref("general.smoothScroll", true); -pref("intl.locale.matchOS", true); -pref("toolkit.storage.synchronous", 0); -pref("toolkit.networkmanager.disable", false); -pref("offline.autoDetect", true); -pref("browser.backspace_action", 2); -pref("browser.display.use_system_colors", true); -pref("browser.download.folderList", 1); -pref("browser.link.open_external", 3); -pref("browser.shell.checkDefaultBrowser", false); -pref("network.manage-offline-status", true); -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:///%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); -pref("media.gmp-gmpopenh264.enabled",false); -pref("media.gmp-gmpopenh264.enabled",false); -pref("plugins.notifyMissingFlash", false); -/* See https://bugzilla.redhat.com/show_bug.cgi?id=1226489 */ -pref("browser.display.use_system_colors", false); -pref("layers.use-image-offscreen-surfaces", false); -/* Allow sending credetials to all https:// sites */ -pref("network.negotiate-auth.trusted-uris", "https://"); -pref("security.use_sqldb", false); -/* Use OS settings for UI language */ -pref("intl.locale.requested", ""); -/* See https://bugzilla.redhat.com/show_bug.cgi?id=1672424 */ -pref("storage.nfs_filesystem", true); \ No newline at end of file diff --git a/firefox.spec b/firefox.spec index 1389e87..1dedad3 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 %global disable_toolsets 0 %ifarch %{ix86} @@ -136,7 +137,7 @@ end} Summary: Mozilla Firefox Web browser Name: firefox Version: 91.9.1 -Release: 1%{?dist} +Release: 1%{anolis_release}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ %if 0%{?rhel} == 9 @@ -166,11 +167,7 @@ Source1: firefox-langpacks-%{version}%{?pre_version}-20220520.tar.xz Source2: cbindgen-vendor.tar.xz Source3: process-official-tarball Source10: firefox-mozconfig -%if 0%{?centos} -Source12: firefox-centos-default-prefs.js -%else -Source12: firefox-redhat-default-prefs.js -%endif +Source12: firefox-anolis-default-prefs.js Source20: firefox.desktop Source21: firefox.sh.in Source23: firefox.1 @@ -333,8 +330,7 @@ Requires: nss >= %{nss_build_version} %endif BuildRequires: desktop-file-utils -BuildRequires: system-bookmarks -Requires: redhat-indexhtml +Requires: anolis-indexhtml %if %{?run_tests} BuildRequires: xorg-x11-server-Xvfb @@ -991,7 +987,7 @@ function install_rpms_to_current_dir() { %endif # set up our default bookmarks -%{__cp} -p %{default_bookmarks_file} objdir/dist/bin/browser/chrome/en-US/locale/browser/bookmarks.html +# %{__cp} -p %{default_bookmarks_file} objdir/dist/bin/browser/chrome/en-US/locale/browser/bookmarks.html # Make sure locale works for langpacks %{__cat} > objdir/dist/bin/browser/defaults/preferences/firefox-l10n.js << EOF @@ -1271,6 +1267,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog +* Sat May 28 2022 Liwei Ge - 91.9.1-1.0.1 +- Add firefox-anolis-default-prefs.js +- Remove bookmarks + * Fri May 20 2022 Jan Horak - 91.9.1-1 - Update to 91.9.1 build1 -- Gitee From 1b796867e94ed3b6ed3d3a5ff7f0b839466a7080 Mon Sep 17 00:00:00 2001 From: Liwei Ge Date: Tue, 15 Feb 2022 22:04:20 +0800 Subject: [PATCH 3/3] spec: update dist to get correct minor Signed-off-by: Liwei Ge --- firefox.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/firefox.spec b/firefox.spec index 1dedad3..9ebe5d2 100644 --- a/firefox.spec +++ b/firefox.spec @@ -9,15 +9,15 @@ %{lua: function dist_to_rhel_minor(str, start) - match = string.match(str, ".module%+el8.%d+") + match = string.match(str, ".module%+an8.%d+") if match then return string.sub(match, 13) end - match = string.match(str, ".el8_%d+") + match = string.match(str, ".an8_%d+") if match then return string.sub(match, 6) end - match = string.match(str, ".el8") + match = string.match(str, ".an8") if match then return 7 end -- Gitee