From 913fd21f8dd816a948e69d1a6cda44ebe6c1f1a0 Mon Sep 17 00:00:00 2001 From: Zhao Hang Date: Tue, 18 Jun 2024 16:18:36 +0800 Subject: [PATCH 1/2] update to firefox-115.12.0-1.src.rpm Signed-off-by: Zhao Hang --- dist | 2 +- download | 4 +- ...refs.js => firefox-redhat-default-prefs.js | 8 ++-- firefox.spec | 47 +++++++++---------- 4 files changed, 31 insertions(+), 30 deletions(-) rename firefox-anolis-default-prefs.js => firefox-redhat-default-prefs.js (87%) diff --git a/dist b/dist index 37a6f9c..1fe92cf 100644 --- a/dist +++ b/dist @@ -1 +1 @@ -an8_9 +an8_10 diff --git a/download b/download index 1a8c952..11674fe 100644 --- a/download +++ b/download @@ -1,6 +1,6 @@ 9b999bdcf031e29a4d8ce2b6f17e778e cbindgen-vendor.tar.xz -bd5c92f18f14e9ea67f04f8269ea2d4d firefox-115.10.0esr.processed-source.tar.xz -241a65f86f6ffb4c83fc41270c5ad2a5 firefox-langpacks-115.10.0esr-20240409.tar.xz +9660760a87290448f4c57dd5ae1948f1 firefox-115.12.0esr.processed-source.tar.xz +d55b9df7998ee24d6743d072dc4bac42 firefox-langpacks-115.12.0esr-20240604.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 87% rename from firefox-anolis-default-prefs.js rename to firefox-redhat-default-prefs.js index c301dbf..441e2b7 100644 --- a/firefox-anolis-default-prefs.js +++ b/firefox-redhat-default-prefs.js @@ -14,16 +14,18 @@ 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:///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.provider.enabled",false); +pref("media.gmp-gmpopenh264.autoupdate",false); pref("media.gmp-gmpopenh264.enabled",false); pref("media.gmp.decoder.enabled", true); 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); diff --git a/firefox.spec b/firefox.spec index d59fdcf..8035603 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 @@ -37,7 +36,7 @@ function dist_to_rhel_minor(str, start) end match = string.match(str, ".el9") if match then - return 4 + return 5 end return -1 end} @@ -133,13 +132,11 @@ end} Summary: Mozilla Firefox Web browser Name: firefox -Version: 115.10.0 -Release: 1%{anolis_release}%{?dist} +Version: 115.12.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 @@ -166,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}-20240409.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20240604.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 @@ -351,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 @@ -413,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} @@ -1125,8 +1122,8 @@ echo "ac_add_options --with-google-location-service-api-keyfile=`pwd`/google-loc 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/c9s. -%if (0%{?rhel} == 8 && %{rhel_minor_version} >= 10) || (0%{?rhel} == 9 && %{rhel_minor_version} >= 4) +# 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 @@ -1452,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 @@ -1743,9 +1740,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog -* Mon Apr 22 2024 Liwei Ge - 115.10.0-1.0.1 -- Add firefox-anolis-default-prefs.js -- Remove bookmarks and loongarch64 +* Tue Jun 04 2024 Eike Rathke - 115.12.0-1 +- Update to 115.12.0 build1 + +* Tue May 07 2024 Eike Rathke - 115.11.0-1 +- Update to 115.11.0 build1 * Tue Apr 09 2024 Eike Rathke - 115.10.0-1 - Update to 115.10.0 build1 -- Gitee From e428bc3026576029b5f6058496ccd828ada9210e 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, 22 insertions(+), 15 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 441e2b7..a80e51f 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:///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.provider.enabled",false); diff --git a/firefox.spec b/firefox.spec index 8035603..1288f61 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.12.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}-20240604.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 @@ -1740,6 +1743,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog +* Tue Jun 18 2024 Liwei Ge - 115.12.0-1.0.1 +- Add firefox-anolis-default-prefs.js +- Remove bookmarks and loongarch64 + * Tue Jun 04 2024 Eike Rathke - 115.12.0-1 - Update to 115.12.0 build1 -- Gitee