From 9cbb6e19aa723c52643019ce752c45e3dac57acf Mon Sep 17 00:00:00 2001 From: Renbo Date: Fri, 1 Dec 2023 13:57:18 +0800 Subject: [PATCH 1/2] update to firefox-115.5.0-1 Signed-off-by: Renbo --- download | 4 +- ...refs.js => firefox-redhat-default-prefs.js | 7 +-- firefox.spec | 56 +++++++++++-------- 3 files changed, 37 insertions(+), 30 deletions(-) rename firefox-anolis-default-prefs.js => firefox-redhat-default-prefs.js (85%) diff --git a/download b/download index 166fffd..8a9b244 100644 --- a/download +++ b/download @@ -1,6 +1,6 @@ 9b999bdcf031e29a4d8ce2b6f17e778e cbindgen-vendor.tar.xz -d5642fea03bb23621bdf2dc15180d2e9 firefox-115.4.0esr.processed-source.tar.xz -128855d07f1b2afa9e1f1da302f07522 firefox-langpacks-115.4.0esr-20231017.tar.xz +26a6d8a9440ba4d7d5e5c85b7453022a firefox-115.5.0esr.processed-source.tar.xz +5dd9d96d19ff3368ab18f3a1ef42bc41 firefox-langpacks-115.5.0esr-20231114.tar.xz b3c1d2ea615cb0195f4f62b005773262 mochitest-python.tar.gz 7b35b9a003996b1f1dbc3cd936a609f2 nspr-4.35.0-1.el8_1.src.rpm 3fdd30cefe44a98c424cb3aeca73f2b3 nss-3.90.0-3.el8_1.src.rpm diff --git a/firefox-anolis-default-prefs.js b/firefox-redhat-default-prefs.js similarity index 85% rename from firefox-anolis-default-prefs.js rename to firefox-redhat-default-prefs.js index c301dbf..cdb98dd 100644 --- a/firefox-anolis-default-prefs.js +++ b/firefox-redhat-default-prefs.js @@ -14,10 +14,9 @@ pref("browser.shell.checkDefaultBrowser", false); pref("network.manage-offline-status", true); pref("extensions.shownSelectionUI", true); pref("ui.SpellCheckerUnderlineStyle", 1); -pref("startup.homepage_override_url", "https://openanolis.cn/"); -pref("startup.homepage_welcome_url", "https://openanolis.cn/"); -pref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=file:///usr/share/doc/HTML/index.html"); -pref("geo.wifi.uri", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"); +pref("startup.homepage_override_url", "%HOMEPAGE%"); +pref("startup.homepage_welcome_url", "%HOMEPAGE%"); +pref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=file:///%PREFIX%/share/doc/HTML/index.html"); pref("media.gmp-gmpopenh264.autoupdate",true); pref("media.gmp-gmpopenh264.enabled",false); pref("media.gmp.decoder.enabled", true); diff --git a/firefox.spec b/firefox.spec index 27ad59d..de1cc4b 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1,4 +1,3 @@ -%define anolis_release .0.1 %define homepage %(grep '^HOME_URL\s*=' /etc/os-release | sed 's/^HOME_URL\s*=//;s/^\s*"//;s/"\s*$//') %global disable_toolsets 0 @@ -15,17 +14,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 8 + return 10 end match = string.match(str, ".module%+el9.%d+") if match then @@ -37,7 +36,7 @@ function dist_to_rhel_minor(str, start) end match = string.match(str, ".el9") if match then - return 3 + return 4 end return -1 end} @@ -133,21 +132,24 @@ end} Summary: Mozilla Firefox Web browser Name: firefox -Version: 115.4.0 -Release: 1%{anolis_release}%{?dist} +Version: 115.5.0 +Release: 1%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ -ExcludeArch: loongarch64 - %if 0%{?rhel} == 9 ExcludeArch: %{ix86} %endif %if 0%{?rhel} == 8 + # Started to ship on aarch64 in RHEL 8.2, on s390x in RHEL 8.3 %if %{rhel_minor_version} == 1 -ExcludeArch: %{ix86} aarch64 s390x +ExcludeArch: %{ix86} s390x aarch64 %else + %if %{rhel_minor_version} == 2 +ExcludeArch: %{ix86} s390x + %else ExcludeArch: %{ix86} + %endif %endif %endif %if 0%{?rhel} == 7 @@ -161,12 +163,12 @@ ExcludeArch: aarch64 s390 ppc # Link to original tarball: https://archive.mozilla.org/pub/firefox/releases/%%{version}%%{?pre_version}/source/firefox-%%{version}%%{?pre_version}.source.tar.xz Source0: firefox-%{version}%{?pre_version}%{?buildnum}.processed-source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20231017.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20231114.tar.xz %endif Source2: cbindgen-vendor.tar.xz Source3: process-official-tarball Source10: firefox-mozconfig -Source12: firefox-anolis-default-prefs.js +Source12: firefox-redhat-default-prefs.js Source20: firefox.desktop Source21: firefox.sh.in Source23: firefox.1 @@ -346,10 +348,10 @@ BuildRequires: xmlto BuildRequires: zlib-devel %endif -#%if !0%{?flatpak} +%if !0%{?flatpak} #TODO -#BuildRequires: system-bookmarks -#%endif +BuildRequires: system-bookmarks +%endif %if 0%{?test_on_wayland} BuildRequires: dbus-x11 @@ -408,7 +410,7 @@ BuildRequires: gcc-toolset-12-gcc-plugin-annobin Requires: mozilla-filesystem Requires: p11-kit-trust Requires: pciutils-libs -Requires: anolis-indexhtml +Requires: redhat-indexhtml %if %{?system_nss} && !0%{?bundle_nss} Requires: nspr >= %{nspr_version} @@ -1119,6 +1121,13 @@ echo "ac_add_options --with-mozilla-api-keyfile=`pwd`/mozilla-api-key" >> .mozco echo "ac_add_options --with-google-location-service-api-keyfile=`pwd`/google-loc-api-key" >> .mozconfig echo "ac_add_options --with-google-safebrowsing-api-keyfile=`pwd`/google-api-key" >> .mozconfig +# May result in empty --with-libclang-path= in earlier versions. +# So far this is needed only for c8s. +%if 0%{?rhel} == 8 && %{rhel_minor_version} >= 10 +# Clang 17 upstream's detection fails, tell it where to look. +echo "ac_add_options --with-libclang-path=`llvm-config --libdir`" >> .mozconfig +%endif + echo 'export NODEJS="%{_buildrootdir}/bin/node-stdout-nonblocking-wrapper"' >> .mozconfig # Remove executable bit to make brp-mangle-shebangs happy. @@ -1440,10 +1449,10 @@ EOF %endif # set up our default bookmarks -#%if !0%{?flatpak} - #%global default_bookmarks_file /usr/share/bookmarks/default-bookmarks.html - #%{__cp} -p %{default_bookmarks_file} objdir/dist/bin/browser/chrome/browser/content/browser/default-bookmarks.html -#%endif +%if !0%{?flatpak} + %global default_bookmarks_file /usr/share/bookmarks/default-bookmarks.html + %{__cp} -p %{default_bookmarks_file} objdir/dist/bin/browser/chrome/browser/content/browser/default-bookmarks.html +%endif # Make sure locale works for langpacks %{__cat} > objdir/dist/bin/browser/defaults/preferences/firefox-l10n.js << EOF @@ -1730,9 +1739,8 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog -* Wed Nov 1 2023 Liwei Ge - 115.4.0-1.0.1 -- Add firefox-anolis-default-prefs.js -- Remove bookmarks and loongarch64 +* Tue Nov 14 2023 Eike Rathke - 115.5.0-1 +- Update to 115.5.0 build1 * Tue Oct 17 2023 Eike Rathke - 115.4.0-1 - Update to 115.4.0 build1 -- Gitee From 26e70942503f7660f13b91713fb1d29ffc2edd13 Mon Sep 17 00:00:00 2001 From: Zhao Hang Date: Thu, 16 Dec 2021 06:12:47 +0000 Subject: [PATCH 2/2] rebrand: add firefox-anolis-default-prefs.js --- ...refs.js => firefox-anolis-default-prefs.js | 7 ++-- firefox.spec | 33 +++++++++++-------- 2 files changed, 24 insertions(+), 16 deletions(-) rename firefox-redhat-default-prefs.js => firefox-anolis-default-prefs.js (85%) diff --git a/firefox-redhat-default-prefs.js b/firefox-anolis-default-prefs.js similarity index 85% rename from firefox-redhat-default-prefs.js rename to firefox-anolis-default-prefs.js index cdb98dd..c301dbf 100644 --- a/firefox-redhat-default-prefs.js +++ b/firefox-anolis-default-prefs.js @@ -14,9 +14,10 @@ pref("browser.shell.checkDefaultBrowser", false); pref("network.manage-offline-status", true); pref("extensions.shownSelectionUI", true); pref("ui.SpellCheckerUnderlineStyle", 1); -pref("startup.homepage_override_url", "%HOMEPAGE%"); -pref("startup.homepage_welcome_url", "%HOMEPAGE%"); -pref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=file:///%PREFIX%/share/doc/HTML/index.html"); +pref("startup.homepage_override_url", "https://openanolis.cn/"); +pref("startup.homepage_welcome_url", "https://openanolis.cn/"); +pref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=file:///usr/share/doc/HTML/index.html"); +pref("geo.wifi.uri", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"); pref("media.gmp-gmpopenh264.autoupdate",true); pref("media.gmp-gmpopenh264.enabled",false); pref("media.gmp.decoder.enabled", true); diff --git a/firefox.spec b/firefox.spec index de1cc4b..ff876f3 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 %define homepage %(grep '^HOME_URL\s*=' /etc/os-release | sed 's/^HOME_URL\s*=//;s/^\s*"//;s/"\s*$//') %global disable_toolsets 0 @@ -14,15 +15,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 10 end @@ -133,10 +134,12 @@ end} Summary: Mozilla Firefox Web browser Name: firefox Version: 115.5.0 -Release: 1%{?dist} +Release: 1%{anolis_release}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ +ExcludeArch: loongarch64 + %if 0%{?rhel} == 9 ExcludeArch: %{ix86} %endif @@ -168,7 +171,7 @@ Source1: firefox-langpacks-%{version}%{?pre_version}-20231114.tar.x Source2: cbindgen-vendor.tar.xz Source3: process-official-tarball Source10: firefox-mozconfig -Source12: firefox-redhat-default-prefs.js +Source12: firefox-anolis-default-prefs.js Source20: firefox.desktop Source21: firefox.sh.in Source23: firefox.1 @@ -348,10 +351,10 @@ BuildRequires: xmlto BuildRequires: zlib-devel %endif -%if !0%{?flatpak} +#%if !0%{?flatpak} #TODO -BuildRequires: system-bookmarks -%endif +#BuildRequires: system-bookmarks +#%endif %if 0%{?test_on_wayland} BuildRequires: dbus-x11 @@ -410,7 +413,7 @@ BuildRequires: gcc-toolset-12-gcc-plugin-annobin Requires: mozilla-filesystem Requires: p11-kit-trust Requires: pciutils-libs -Requires: redhat-indexhtml +Requires: anolis-indexhtml %if %{?system_nss} && !0%{?bundle_nss} Requires: nspr >= %{nspr_version} @@ -1449,10 +1452,10 @@ EOF %endif # set up our default bookmarks -%if !0%{?flatpak} - %global default_bookmarks_file /usr/share/bookmarks/default-bookmarks.html - %{__cp} -p %{default_bookmarks_file} objdir/dist/bin/browser/chrome/browser/content/browser/default-bookmarks.html -%endif +#%if !0%{?flatpak} + #%global default_bookmarks_file /usr/share/bookmarks/default-bookmarks.html + #%{__cp} -p %{default_bookmarks_file} objdir/dist/bin/browser/chrome/browser/content/browser/default-bookmarks.html +#%endif # Make sure locale works for langpacks %{__cat} > objdir/dist/bin/browser/defaults/preferences/firefox-l10n.js << EOF @@ -1739,6 +1742,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog +* Fri Dec 01 2023 Liwei Ge - 115.5.0-1.0.1 +- Add firefox-anolis-default-prefs.js +- Remove bookmarks and loongarch64 + * Tue Nov 14 2023 Eike Rathke - 115.5.0-1 - Update to 115.5.0 build1 -- Gitee