From ccfa741e1501789e3410a87315dd0af5ef7f2949 Mon Sep 17 00:00:00 2001 From: Bfeng Date: Thu, 15 Jun 2023 11:59:19 +0800 Subject: [PATCH 1/2] update to firefox-102.12.0-1.el8_8 Signed-off-by: Bfeng --- dist | 2 +- download | 4 +- ...refs.js => firefox-redhat-default-prefs.js | 10 +- firefox.spec | 45 +- mozilla-1833330.patch | 632 ++++++++++++++++++ 5 files changed, 665 insertions(+), 28 deletions(-) rename firefox-anolis-default-prefs.js => firefox-redhat-default-prefs.js (82%) create mode 100644 mozilla-1833330.patch diff --git a/dist b/dist index 535c690..9c0e36e 100644 --- a/dist +++ b/dist @@ -1 +1 @@ -an8_7 +an8 diff --git a/download b/download index efec3c0..2a4a58d 100644 --- a/download +++ b/download @@ -1,6 +1,6 @@ d60fdae0a720baa240534de94d88c8e2 cbindgen-vendor.tar.xz -43f7514b1ffa8faf3521d8376ed6205f firefox-102.11.0esr.b2.processed-source.tar.xz -2ade4849d4f797efbaf87f8a0b2a4926 firefox-langpacks-102.11.0esr-20230504.tar.xz d41d8cd98f00b204e9800998ecf8427e mochitest-python.tar.gz 75157f5e77e1a4f460645a57ff54e552 nspr-4.34.0-3.el8_1.src.rpm b603172c3f4cbb1d8197328087ca3972 nss-3.79.0-11.el8_1.src.rpm +40adb067fc44be01779ffc52fa43a0b2 firefox-langpacks-102.12.0esr-20230531.tar.xz +e8ee283aeb047929ce30ce12669e682c firefox-102.12.0esr.processed-source.tar.xz diff --git a/firefox-anolis-default-prefs.js b/firefox-redhat-default-prefs.js similarity index 82% rename from firefox-anolis-default-prefs.js rename to firefox-redhat-default-prefs.js index c301dbf..e1013e5 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.autoupdate",true); pref("media.gmp-gmpopenh264.enabled",false); pref("media.gmp.decoder.enabled", true); @@ -37,3 +36,6 @@ pref("browser.gnome-search-provider.enabled",true); pref("media.navigator.mediadatadecoder_vpx_enabled", true); /* See https://bugzilla.redhat.com/show_bug.cgi?id=1672424 */ pref("storage.nfs_filesystem", true); +pref("datareporting.healthreport.uploadEnabled", false); +pref("datareporting.policy.dataSubmissionEnabled", false); +pref("toolkit.telemetry.archive.enabled", false); diff --git a/firefox.spec b/firefox.spec index cbf9555..d9f238f 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1,4 +1,3 @@ -%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. @@ -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 9 end @@ -201,8 +200,8 @@ end} Summary: Mozilla Firefox Web browser Name: firefox -Version: 102.11.0 -Release: 2%{anolis_release}%{?dist} +Version: 102.12.0 +Release: 1%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -210,9 +209,7 @@ License: MPLv1.1 or GPLv2+ or LGPLv2+ # 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 - -ExcludeArch: loongarch64 +#%%global buildnum .b2 %if 0%{?rhel} == 9 ExcludeArch: %{ix86} @@ -234,12 +231,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}-20230504.tar.xz +Source1: firefox-langpacks-%{version}%{?pre_version}-20230531.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 @@ -315,6 +312,7 @@ Patch421: mozilla-s390x-skia-gradient.patch Patch422: one_swizzle_to_rule_them_all.patch Patch423: svg-rendering.patch Patch424: D158770.diff +Patch425: mozilla-1833330.patch # PGO/LTO patches Patch600: pgo.patch @@ -439,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 @@ -690,6 +688,7 @@ echo "use_rustts %{?use_rustts}" %patch422 -p1 -b .one_swizzle_to_rule_them_all %patch423 -p1 -b .svg-rendering %patch424 -p1 -b .D158770.diff +%patch425 -p1 -b .mozilla-1833330 # PGO patches %if %{build_with_pgo} @@ -1153,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 @@ -1454,9 +1453,13 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog -* Thu May 18 2023 Liwei Ge - 102.11.0-2.0.1 -- Add firefox-anolis-default-prefs.js -- Remove bookmarks and loongarch64 +* Wed May 31 2023 Eike Rathke - 102.12.0-1 +- Update to 102.12.0 build1 + +* Tue May 23 2023 Anton Bobrov 102.11.0-2 +- Do not import cert to certdb on override exception: + rhbz#2118991 + mzbz@1833330 * Thu May 04 2023 Eike Rathke - 102.11.0-2 - Update to 102.11.0 build2 diff --git a/mozilla-1833330.patch b/mozilla-1833330.patch new file mode 100644 index 0000000..2c1af64 --- /dev/null +++ b/mozilla-1833330.patch @@ -0,0 +1,632 @@ +diff --git a/security/manager/locales/en-US/security/certificates/certManager.ftl b/security/manager/locales/en-US/security/certificates/certManager.ftl +--- a/security/manager/locales/en-US/security/certificates/certManager.ftl ++++ b/security/manager/locales/en-US/security/certificates/certManager.ftl +@@ -51,9 +51,6 @@ certmgr-cert-name = + certmgr-cert-server = + .label = Server + +-certmgr-override-lifetime = +- .label = Lifetime +- + certmgr-token-name = + .label = Security Device + +@@ -69,6 +66,9 @@ certmgr-email = + certmgr-serial = + .label = Serial Number + ++certmgr-fingerprint-sha-256 = ++ .label = SHA-256 Fingerprint ++ + certmgr-view = + .label = View… + .accesskey = V +diff --git a/security/manager/pki/resources/content/certManager.js b/security/manager/pki/resources/content/certManager.js +--- a/security/manager/pki/resources/content/certManager.js ++++ b/security/manager/pki/resources/content/certManager.js +@@ -64,22 +64,16 @@ var serverRichList = { + + buildRichList() { + let overrides = overrideService.getOverrides().map(item => { +- let cert = null; +- if (item.dbKey !== "") { +- cert = certdb.findCertByDBKey(item.dbKey); +- } + return { + hostPort: item.hostPort, +- dbKey: item.dbKey, + asciiHost: item.asciiHost, + port: item.port, + originAttributes: item.originAttributes, +- isTemporary: item.isTemporary, +- displayName: cert !== null ? cert.displayName : "", ++ fingerprint: item.fingerprint, + }; + }); + overrides.sort((a, b) => { +- let criteria = ["hostPort", "displayName"]; ++ let criteria = ["hostPort", "fingerprint"]; + for (let c of criteria) { + let res = a[c].localeCompare(b[c]); + if (res !== 0) { +@@ -106,10 +100,10 @@ var serverRichList = { + _richBoxAddItem(item) { + let richlistitem = document.createXULElement("richlistitem"); + +- richlistitem.setAttribute("dbKey", item.dbKey); + richlistitem.setAttribute("host", item.asciiHost); + richlistitem.setAttribute("port", item.port); + richlistitem.setAttribute("hostPort", item.hostPort); ++ richlistitem.setAttribute("fingerprint", item.fingerprint); + richlistitem.setAttribute( + "originAttributes", + JSON.stringify(item.originAttributes) +@@ -120,18 +114,7 @@ var serverRichList = { + hbox.setAttribute("equalsize", "always"); + + hbox.appendChild(createRichlistItem({ raw: item.hostPort })); +- hbox.appendChild( +- createRichlistItem( +- item.displayName !== "" +- ? { raw: item.displayName } +- : { l10nid: "no-cert-stored-for-override" } +- ) +- ); +- hbox.appendChild( +- createRichlistItem({ +- l10nid: item.isTemporary ? "temporary-override" : "permanent-override", +- }) +- ); ++ hbox.appendChild(createRichlistItem({ raw: item.fingerprint })); + + richlistitem.appendChild(hbox); + +@@ -170,32 +153,6 @@ var serverRichList = { + } + }, + +- viewSelectedRichListItem() { +- let selectedItem = this.richlist.selectedItem; +- if (!selectedItem) { +- return; +- } +- +- let dbKey = selectedItem.getAttribute("dbKey"); +- if (dbKey) { +- let cert = certdb.findCertByDBKey(dbKey); +- viewCertHelper(window, cert); +- } +- }, +- +- exportSelectedRichListItem() { +- let selectedItem = this.richlist.selectedItem; +- if (!selectedItem) { +- return; +- } +- +- let dbKey = selectedItem.getAttribute("dbKey"); +- if (dbKey) { +- let cert = certdb.findCertByDBKey(dbKey); +- exportToFile(window, cert); +- } +- }, +- + addException() { + let retval = { + exceptionAdded: false, +@@ -212,16 +169,8 @@ var serverRichList = { + }, + + _setButtonState() { +- let websiteViewButton = document.getElementById("websites_viewButton"); +- let websiteExportButton = document.getElementById("websites_exportButton"); + let websiteDeleteButton = document.getElementById("websites_deleteButton"); +- +- let certKey = this.richlist.selectedItem?.getAttribute("dbKey"); +- let cert = certKey && certdb.findCertByDBKey(certKey); +- + websiteDeleteButton.disabled = this.richlist.selectedIndex < 0; +- websiteExportButton.disabled = !cert; +- websiteViewButton.disabled = websiteExportButton.disabled; + }, + }; + /** +diff --git a/security/manager/pki/resources/content/certManager.xhtml b/security/manager/pki/resources/content/certManager.xhtml +--- a/security/manager/pki/resources/content/certManager.xhtml ++++ b/security/manager/pki/resources/content/certManager.xhtml +@@ -157,18 +157,13 @@ + + + +- +- ++ + + + + + + +-