From 1d86ce0d55acac653800e5d5e19ec5fad25569ee Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 15 Dec 2022 09:46:54 +0100 Subject: [PATCH 1/3] build fixes --- D162136.diff | 57 ---------------------------------------------------- firefox.spec | 4 +--- 2 files changed, 1 insertion(+), 60 deletions(-) delete mode 100644 D162136.diff diff --git a/D162136.diff b/D162136.diff deleted file mode 100644 index bbd3de1..0000000 --- a/D162136.diff +++ /dev/null @@ -1,57 +0,0 @@ -diff --git a/python/mach/mach/site.py b/python/mach/mach/site.py ---- a/python/mach/mach/site.py -+++ b/python/mach/mach/site.py -@@ -16,14 +16,14 @@ - import shutil - import site - import subprocess - import sys - import sysconfig --from pathlib import Path - import tempfile - from contextlib import contextmanager --from typing import Optional, Callable -+from pathlib import Path -+from typing import Callable, Optional - - from mach.requirements import ( - MachEnvRequirements, - UnexpectedFlexibleRequirementException, - ) -@@ -761,11 +761,11 @@ - self.bin_path = os.path.join(prefix, "Scripts") - self.python_path = os.path.join(self.bin_path, "python.exe") - else: - self.bin_path = os.path.join(prefix, "bin") - self.python_path = os.path.join(self.bin_path, "python") -- self.prefix = prefix -+ self.prefix = os.path.realpath(prefix) - - @functools.lru_cache(maxsize=None) - def resolve_sysconfig_packages_path(self, sysconfig_path): - # macOS uses a different default sysconfig scheme based on whether it's using the - # system Python or running in a virtualenv. -@@ -781,20 +781,16 @@ - data_path = Path(sysconfig_paths["data"]) - path = Path(sysconfig_paths[sysconfig_path]) - relative_path = path.relative_to(data_path) - - # Path to virtualenv's "site-packages" directory for provided sysconfig path -- return os.path.normpath( -- os.path.normcase(os.path.realpath(Path(self.prefix) / relative_path)) -- ) -+ return os.path.normpath(os.path.normcase(Path(self.prefix) / relative_path)) - - def site_packages_dirs(self): - dirs = [] - if sys.platform.startswith("win"): -- dirs.append( -- os.path.normpath(os.path.normcase(os.path.realpath(self.prefix))) -- ) -+ dirs.append(os.path.normpath(os.path.normcase(self.prefix))) - purelib = self.resolve_sysconfig_packages_path("purelib") - platlib = self.resolve_sysconfig_packages_path("platlib") - - dirs.append(purelib) - if platlib != purelib: - diff --git a/firefox.spec b/firefox.spec index 5575c31..95c33c4 100644 --- a/firefox.spec +++ b/firefox.spec @@ -230,7 +230,6 @@ Patch55: firefox-testing.patch Patch61: firefox-glibc-dynstack.patch Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch Patch78: firefox-i686-build.patch -Patch80: D162136.diff # Test patches # Generate without context by @@ -507,7 +506,6 @@ This package contains results of tests executed during build. %patch54 -p1 -b .1669639 %patch71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12 %patch78 -p1 -b .firefox-i686 -%patch80 -p1 -b .D162136 # Test patches #%patch100 -p1 -b .firefox-tests-xpcshell @@ -1132,7 +1130,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog -* Tue Dec 14 2022 Martin Stransky - 108.0-2 +* Wed Dec 14 2022 Martin Stransky - 108.0-2 - Update to 108.0 Build 2 * Tue Dec 6 2022 Martin Stransky - 108.0-1 From 6fa1c4438c477aabba3435c318ffa5040d8c874a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 15 Dec 2022 10:05:22 +0100 Subject: [PATCH 2/3] Added fix for mozbz#1802327 --- D163310.diff | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++ firefox.spec | 2 ++ 2 files changed, 60 insertions(+) create mode 100644 D163310.diff diff --git a/D163310.diff b/D163310.diff new file mode 100644 index 0000000..bad1f17 --- /dev/null +++ b/D163310.diff @@ -0,0 +1,58 @@ +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -3029,11 +3029,11 @@ + #endif + } + + void nsWindow::SetUserTimeAndStartupTokenForActivatedWindow() { + nsGTKToolkit* toolkit = nsGTKToolkit::GetToolkit(); +- if (!toolkit) { ++ if (!toolkit || MOZ_UNLIKELY(mWindowType == eWindowType_invisible)) { + return; + } + + mWindowActivationTokenFromEnv = toolkit->GetStartupToken(); + if (!mWindowActivationTokenFromEnv.IsEmpty()) { +@@ -6614,30 +6614,34 @@ + return; + } + } + } + // Set up usertime/startupID metadata for the created window. +- if (mWindowType != eWindowType_invisible) { ++ // On X11 we use gtk_window_set_startup_id() so we need to call it ++ // before show. ++ if (GdkIsX11Display()) { + SetUserTimeAndStartupTokenForActivatedWindow(); + } + if (GdkIsWaylandDisplay()) { + if (IsWaylandPopup()) { + ShowWaylandPopupWindow(); + } else { + ShowWaylandToplevelWindow(); + } ++ } else { ++ LOG(" calling gtk_widget_show(mShell)\n"); ++ gtk_widget_show(mShell); ++ } ++ if (GdkIsWaylandDisplay()) { ++ SetUserTimeAndStartupTokenForActivatedWindow(); + #ifdef MOZ_WAYLAND + auto token = std::move(mWindowActivationTokenFromEnv); + if (!token.IsEmpty()) { + FocusWaylandWindow(token.get()); + } + #endif +- } else { +- LOG(" calling gtk_widget_show(mShell)\n"); +- gtk_widget_show(mShell); +- } +- ++ } + if (mHiddenPopupPositioned && IsPopup()) { + LOG(" re-position hidden popup window"); + gtk_window_move(GTK_WINDOW(mShell), mPopupPosition.x, mPopupPosition.y); + mHiddenPopupPositioned = false; + } + diff --git a/firefox.spec b/firefox.spec index 95c33c4..6292b72 100644 --- a/firefox.spec +++ b/firefox.spec @@ -230,6 +230,7 @@ Patch55: firefox-testing.patch Patch61: firefox-glibc-dynstack.patch Patch71: 0001-GLIBCXX-fix-for-GCC-12.patch Patch78: firefox-i686-build.patch +Patch79: D163310.diff # Test patches # Generate without context by @@ -506,6 +507,7 @@ This package contains results of tests executed during build. %patch54 -p1 -b .1669639 %patch71 -p1 -b .0001-GLIBCXX-fix-for-GCC-12 %patch78 -p1 -b .firefox-i686 +%patch79 -p1 -b .D163310 # Test patches #%patch100 -p1 -b .firefox-tests-xpcshell From 5c5335d4f77a398e7e4eea75f84ec6aa80100121 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 15 Dec 2022 10:07:09 +0100 Subject: [PATCH 3/3] Changelog update --- firefox.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/firefox.spec b/firefox.spec index 6292b72..e558357 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1134,6 +1134,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog * Wed Dec 14 2022 Martin Stransky - 108.0-2 - Update to 108.0 Build 2 +- Added fix for rhbz#2149821 * Tue Dec 6 2022 Martin Stransky - 108.0-1 - Update to 108.0