From ec4f8f1cc502df34c17828052107cd8f51a5a4b9 Mon Sep 17 00:00:00 2001 From: Renbo Date: Tue, 8 Oct 2024 11:44:16 +0800 Subject: [PATCH 1/2] update to firefox-128.3.0-1.src.rpm Signed-off-by: Renbo --- download | 8 ++-- ...refs.js => firefox-redhat-default-prefs.js | 4 +- firefox.spec | 42 ++++++++----------- 3 files changed, 24 insertions(+), 30 deletions(-) rename firefox-anolis-default-prefs.js => firefox-redhat-default-prefs.js (93%) diff --git a/download b/download index 37ac467..9fc1edb 100644 --- a/download +++ b/download @@ -1,7 +1,7 @@ fc25f988b87b5187d4e2f006efa699a3 cbindgen-vendor.tar.xz -1f353e99cd531478a7bbd04e74bc837a firefox-128.2.0esr.processed-source.tar.xz -8ee36668678fed8bf3f82d90f6428165 firefox-langpacks-128.2.0esr-20240827.tar.xz +641fb328d629112bf7ca7a110d67b948 firefox-128.3.0esr.processed-source.tar.xz +9b4dc5233089f5466650e3c17b0fcc3f firefox-langpacks-128.3.0esr-20240924.tar.xz b3c1d2ea615cb0195f4f62b005773262 mochitest-python.tar.gz 7b35b9a003996b1f1dbc3cd936a609f2 nspr-4.35.0-1.el8_1.src.rpm -a80dda6d1547e533e0ad64753d862567 nss-3.101.0-6.el8_2.src.rpm -34159eade10e31ddbcb9bebe1e74e05c nss-3.101.0-6.el9_0.src.rpm +ab085bce989de91681f48fdd05be4c0f nss-3.101.0-7.el8_2.src.rpm +dbf6357877e3e1042de1a95cdfb61507 nss-3.101.0-7.el9_2.src.rpm diff --git a/firefox-anolis-default-prefs.js b/firefox-redhat-default-prefs.js similarity index 93% rename from firefox-anolis-default-prefs.js rename to firefox-redhat-default-prefs.js index ad8dbea..4263a3d 100644 --- a/firefox-anolis-default-prefs.js +++ b/firefox-redhat-default-prefs.js @@ -14,8 +14,8 @@ 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("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); diff --git a/firefox.spec b/firefox.spec index a2e9975..fdd6204 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,15 +14,15 @@ %{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 10 end @@ -138,13 +137,11 @@ end} Summary: Mozilla Firefox Web browser Name: firefox -Version: 128.2.0 -Release: 1%{anolis_release}%{?dist} +Version: 128.3.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 @@ -171,12 +168,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}-20240827.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240924.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 @@ -196,8 +193,8 @@ Source37: mochitest-python.tar.gz # Bundled libraries Source401: nss-setup-flags-env.inc Source402: nspr-4.35.0-1.el8_1.src.rpm -Source403: nss-3.101.0-6.el8_2.src.rpm -Source404: nss-3.101.0-6.el9_0.src.rpm +Source403: nss-3.101.0-7.el8_2.src.rpm +Source404: nss-3.101.0-7.el9_2.src.rpm # ---- RHEL specific patches --- # -- Downstream only -- @@ -356,10 +353,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 @@ -413,7 +410,6 @@ BuildRequires: xorg-x11-server-Xvfb BuildRequires: gcc-toolset-13-runtime BuildRequires: gcc-toolset-13-binutils BuildRequires: gcc-toolset-13-gcc -BuildRequires: gcc-toolset-13-gcc-c++ BuildRequires: gcc-toolset-13-gcc-plugin-annobin %endif @@ -1568,10 +1564,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 @@ -1864,10 +1860,8 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog -* Wed Sep 18 2024 Liwei Ge - 128.2.0-1.0.1 -- Add firefox-anolis-default-prefs.js -- Remove bookmarks and loongarch64 -- Add BuildRequires gcc-toolset-13-gcc-c++ +* Tue Sep 24 2024 Jan Horak - 128.3.0-1 +- Update to 128.3.0 * Tue Aug 27 2024 Jan Horak - 128.2.0-1 - Update to 128.2.0 -- Gitee From 25870316a2555b5af6e0e46dac7c161f3c52c64e 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 | 4 +-- firefox.spec | 33 ++++++++++++------- 2 files changed, 23 insertions(+), 14 deletions(-) rename firefox-redhat-default-prefs.js => firefox-anolis-default-prefs.js (93%) diff --git a/firefox-redhat-default-prefs.js b/firefox-anolis-default-prefs.js similarity index 93% rename from firefox-redhat-default-prefs.js rename to firefox-anolis-default-prefs.js index 4263a3d..ad8dbea 100644 --- a/firefox-redhat-default-prefs.js +++ b/firefox-anolis-default-prefs.js @@ -14,8 +14,8 @@ 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("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:///%PREFIX%/share/doc/HTML/index.html"); pref("media.gmp-gmpopenh264.autoupdate",true); pref("media.gmp-gmpopenh264.enabled",false); diff --git a/firefox.spec b/firefox.spec index fdd6204..2096313 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 @@ -138,10 +139,12 @@ end} Summary: Mozilla Firefox Web browser Name: firefox Version: 128.3.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 @@ -173,7 +176,7 @@ Source1: firefox-langpacks-%{version}%{?pre_version}-20240924.tar.xz 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 @@ -353,10 +356,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,6 +413,7 @@ BuildRequires: xorg-x11-server-Xvfb BuildRequires: gcc-toolset-13-runtime BuildRequires: gcc-toolset-13-binutils BuildRequires: gcc-toolset-13-gcc +BuildRequires: gcc-toolset-13-gcc-c++ BuildRequires: gcc-toolset-13-gcc-plugin-annobin %endif @@ -1564,10 +1568,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 @@ -1860,6 +1864,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog +* Tue Oct 08 2024 Liwei Ge - 128.3.0-1.0.1 +- Add firefox-anolis-default-prefs.js +- Remove bookmarks and loongarch64 +- Add BuildRequires gcc-toolset-13-gcc-c++ + * Tue Sep 24 2024 Jan Horak - 128.3.0-1 - Update to 128.3.0 -- Gitee