From c35e2eca20ab76889cb8ca374bfd65f4d8780a48 Mon Sep 17 00:00:00 2001 From: hongwei-qin Date: Tue, 21 Feb 2023 10:05:53 +0800 Subject: [PATCH 1/2] update to firefox-102.8.0-2.el8_7 Signed-off-by: hongwei-qin --- download | 4 +- ...refs.js => firefox-redhat-default-prefs.js | 9 ++-- firefox.spec | 46 ++++++++++--------- 3 files changed, 31 insertions(+), 28 deletions(-) rename firefox-anolis-default-prefs.js => firefox-redhat-default-prefs.js (84%) diff --git a/download b/download index f8045c9..f010f45 100644 --- a/download +++ b/download @@ -1,6 +1,6 @@ d60fdae0a720baa240534de94d88c8e2 cbindgen-vendor.tar.xz -dadcb0e8da086543e2a40e306116810a firefox-102.7.0esr.processed-source.tar.xz -15c0e113c5e0b61d161525ccd32b85e7 firefox-langpacks-102.7.0esr-20230110.tar.xz +d1951406d0044ef0329941d2a2be283d firefox-102.8.0esr.b2.processed-source.tar.xz +0e7e843d7d2a00b974be9cd9a6a6f879 firefox-langpacks-102.8.0esr-20230214.tar.xz d41d8cd98f00b204e9800998ecf8427e mochitest-python.tar.gz 75157f5e77e1a4f460645a57ff54e552 nspr-4.34.0-3.el8_1.src.rpm 04f69b8baa7bd8ddc49d786b04307df8 nss-3.79.0-6.el8_1.src.rpm diff --git a/firefox-anolis-default-prefs.js b/firefox-redhat-default-prefs.js similarity index 84% rename from firefox-anolis-default-prefs.js rename to firefox-redhat-default-prefs.js index c0e8ebf..7bf5098 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", "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("media.gmp-gmpopenh264.provider.enabled",false); pref("media.gmp-gmpopenh264.autoupdate",false); pref("media.gmp-gmpopenh264.enabled",false); @@ -37,4 +36,4 @@ pref("browser.gnome-search-provider.enabled",true); /* Enable ffvpx playback for WebRTC */ pref("media.navigator.mediadatadecoder_vpx_enabled", true); /* See https://bugzilla.redhat.com/show_bug.cgi?id=1672424 */ -pref("storage.nfs_filesystem", true); +pref("storage.nfs_filesystem", true); \ No newline at end of file diff --git a/firefox.spec b/firefox.spec index ace0a64..cc1596b 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1,4 +1,3 @@ -%define anolis_release .0.2 %global disable_toolsets 0 # Produce a build suitable for release, i.e. use PGO/LTO. You can turn it off # when building locally to reduce build time. @@ -17,15 +16,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 7 end @@ -201,11 +200,17 @@ end} Summary: Mozilla Firefox Web browser Name: firefox -Version: 102.7.0 -Release: 1%{anolis_release}%{?dist} +Version: 102.8.0 +Release: 2%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ +# Workaround the dreaded "upstream source file changed content" rpminspect failure. +# If set to .b2 or .b3 ... the processed source file needs to be renamed before upload, e.g. +# firefox-102.8.0esr.b2.processed-source.tar.xz +# When unset use processed source file name as is. +%global buildnum .b2 + %if 0%{?rhel} == 9 ExcludeArch: %{ix86} %endif @@ -224,14 +229,14 @@ ExcludeArch: aarch64 s390 ppc # The official tarball has to be always processed by the process-official-tarball # script # 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}.processed-source.tar.xz +Source0: firefox-%{version}%{?pre_version}%{?buildnum}.processed-source.tar.xz %if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20230110.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230214.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 @@ -432,12 +437,12 @@ BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: desktop-file-utils -Requires: anolis-indexhtml +Requires: redhat-indexhtml -#%if !0%{?flatpak} +%if !0%{?flatpak} #TODO -#BuildRequires: system-bookmarks -#%endif +BuildRequires: system-bookmarks +%endif %if %{?system_ffi} BuildRequires: pkgconfig(libffi) %endif @@ -1147,9 +1152,9 @@ mkdir -p test_results %endif # set up our default bookmarks -#%if !0%{?flatpak} -#%{__cp} -p %{default_bookmarks_file} objdir/dist/bin/browser/chrome/browser/content/browser/default-bookmarks.html -#%endif +%if !0%{?flatpak} +%{__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 @@ -1448,12 +1453,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog -* Wed Feb 01 2023 Zhao Hang - 102.7.0-1.0.2 -- Rebuild for Anolis OS +* Tue Feb 14 2023 Eike Rathke - 102.8.0-2 +- Update to 102.8.0 build2 -* Tue Jan 24 2023 Liwei Ge - 102.7.0-1.0.1 -- Add firefox-anolis-default-prefs.js -- Remove bookmarks +* Tue Feb 07 2023 Eike Rathke - 102.8.0-1 +- Update to 102.8.0 build1 * Tue Jan 10 2023 Eike Rathke - 102.7.0-1 - Update to 102.7.0 build1 -- Gitee From aae02d3c87e814191ffaf1449d56572706b2afdc 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 | 9 +++--- firefox.spec | 29 +++++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) rename firefox-redhat-default-prefs.js => firefox-anolis-default-prefs.js (84%) diff --git a/firefox-redhat-default-prefs.js b/firefox-anolis-default-prefs.js similarity index 84% rename from firefox-redhat-default-prefs.js rename to firefox-anolis-default-prefs.js index 7bf5098..c0e8ebf 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", "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("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); pref("media.gmp-gmpopenh264.autoupdate",false); pref("media.gmp-gmpopenh264.enabled",false); @@ -36,4 +37,4 @@ pref("browser.gnome-search-provider.enabled",true); /* Enable ffvpx playback for WebRTC */ pref("media.navigator.mediadatadecoder_vpx_enabled", true); /* See https://bugzilla.redhat.com/show_bug.cgi?id=1672424 */ -pref("storage.nfs_filesystem", true); \ No newline at end of file +pref("storage.nfs_filesystem", true); diff --git a/firefox.spec b/firefox.spec index cc1596b..ff134ba 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 %global disable_toolsets 0 # Produce a build suitable for release, i.e. use PGO/LTO. You can turn it off # when building locally to reduce build time. @@ -16,15 +17,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 @@ -201,7 +202,7 @@ end} Summary: Mozilla Firefox Web browser Name: firefox Version: 102.8.0 -Release: 2%{?dist} +Release: 2%{anolis_release}%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -236,7 +237,7 @@ Source1: firefox-langpacks-%{version}%{?pre_version}-20230214.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 @@ -437,12 +438,12 @@ BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: desktop-file-utils -Requires: redhat-indexhtml +Requires: anolis-indexhtml -%if !0%{?flatpak} +#%if !0%{?flatpak} #TODO -BuildRequires: system-bookmarks -%endif +#BuildRequires: system-bookmarks +#%endif %if %{?system_ffi} BuildRequires: pkgconfig(libffi) %endif @@ -1152,9 +1153,9 @@ mkdir -p test_results %endif # set up our default bookmarks -%if !0%{?flatpak} -%{__cp} -p %{default_bookmarks_file} objdir/dist/bin/browser/chrome/browser/content/browser/default-bookmarks.html -%endif +#%if !0%{?flatpak} +#%{__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 @@ -1453,6 +1454,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog +* Tue Feb 21 2023 Liwei Ge - 102.8.0-2.0.1 +- Add firefox-anolis-default-prefs.js +- Remove bookmarks + * Tue Feb 14 2023 Eike Rathke - 102.8.0-2 - Update to 102.8.0 build2 -- Gitee