Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (fda47172e2c6fd21fe943094a5b12d1a02036507)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Pavel Vinogradov <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (fda47172e2c6fd21fe943094a5b12d1a02036507)
  • Date: Tue, 9 Jan 2024 20:15:50 +0000

GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemage.org>:

http/firefox/DETAILS | 2
http/firefox/HISTORY | 4
http/firefox/patches/0030-bmo-1743144-add-wayland-proxy-cache.patch | 131
+++++-----
3 files changed, 79 insertions(+), 58 deletions(-)

New commits:
commit fda47172e2c6fd21fe943094a5b12d1a02036507
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>

http/firefox: version 121.0.1

diff --git a/http/firefox/DETAILS b/http/firefox/DETAILS
index 20f959e..f8a4b09 100755
--- a/http/firefox/DETAILS
+++ b/http/firefox/DETAILS
@@ -1,5 +1,5 @@
SPELL=firefox
- VERSION=121.0
+ VERSION=121.0.1
SECURITY_PATCH=186
SOURCE="${SPELL}-${VERSION}.source.tar.xz"
# Watch: http://releases.mozilla.org/pub/firefox/releases/
/releases/([0-9.]+)/
diff --git a/http/firefox/HISTORY b/http/firefox/HISTORY
index 5ae86b2..3750883 100644
--- a/http/firefox/HISTORY
+++ b/http/firefox/HISTORY
@@ -1,3 +1,7 @@
+2024-01-09 Pavel Vinogradov <public AT sourcemage.org>
+ * DETAILS: version 121.0.1, quoting++
+ * patches/*: updated
+
2024-01-02 Treeve Jelbert <treeve AT sourcemage.org>
* PRE_BUILD: fix build with python-3.12.1

diff --git
a/http/firefox/patches/0030-bmo-1743144-add-wayland-proxy-cache.patch
b/http/firefox/patches/0030-bmo-1743144-add-wayland-proxy-cache.patch
index 080afe7..aecab87 100644
--- a/http/firefox/patches/0030-bmo-1743144-add-wayland-proxy-cache.patch
+++ b/http/firefox/patches/0030-bmo-1743144-add-wayland-proxy-cache.patch
@@ -1,6 +1,6 @@
diff -Naur a/third_party/wayland-proxy/moz.build
b/third_party/wayland-proxy/moz.build
--- a/third_party/wayland-proxy/moz.build 1970-01-01 00:00:00.000000000
-0000
-+++ b/third_party/wayland-proxy/moz.build 2023-12-27 07:11:03.708390110
-0000
++++ b/third_party/wayland-proxy/moz.build 2024-01-09 07:37:36.629125932
-0000
@@ -0,0 +1,16 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
@@ -20,8 +20,8 @@ diff -Naur a/third_party/wayland-proxy/moz.build
b/third_party/wayland-proxy/moz
+FINAL_LIBRARY = "xul"
diff -Naur a/third_party/wayland-proxy/wayland-proxy.cpp
b/third_party/wayland-proxy/wayland-proxy.cpp
--- a/third_party/wayland-proxy/wayland-proxy.cpp 1970-01-01
00:00:00.000000000 -0000
-+++ b/third_party/wayland-proxy/wayland-proxy.cpp 2023-12-27
07:11:03.708390110 -0000
-@@ -0,0 +1,731 @@
++++ b/third_party/wayland-proxy/wayland-proxy.cpp 2024-01-09
07:37:36.630125950 -0000
+@@ -0,0 +1,742 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -30,6 +30,8 @@ diff -Naur a/third_party/wayland-proxy/wayland-proxy.cpp
b/third_party/wayland-p
+// This code is based on Rust implementation at
+// https://github.com/the8472/weyland-p5000
+
++// Version 1.0
++
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
@@ -118,6 +120,7 @@ diff -Naur a/third_party/wayland-proxy/wayland-proxy.cpp
b/third_party/wayland-p
+class ProxiedConnection {
+ public:
+ bool Init(int aChildSocket);
++ bool IsConnected() { return mCompositorConnected; }
+
+ struct pollfd* AddToPollFd(struct pollfd* aPfds);
+ struct pollfd* LoadPollFd(struct pollfd* aPfds);
@@ -304,7 +307,7 @@ diff -Naur a/third_party/wayland-proxy/wayland-proxy.cpp
b/third_party/wayland-p
+ mCompositorSocket =
+ socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0);
+ if (mCompositorSocket == -1) {
-+ Error("ConnectToCompositor() socket()");
++ Error("ProxiedConnection::Init() socket()");
+ }
+ return mApplicationSocket > 0 && mCompositorSocket > 0;
+}
@@ -455,6 +458,7 @@ diff -Naur a/third_party/wayland-proxy/wayland-proxy.cpp
b/third_party/wayland-p
+ } else {
+ // Try to reconnect to compositor.
+ if (!ConnectToCompositor()) {
++ Info("Failed to connect to compositor\n");
+ return false;
+ }
+ // We're not connected yet but ConnectToCompositor() didn't return
@@ -510,6 +514,7 @@ diff -Naur a/third_party/wayland-proxy/wayland-proxy.cpp
b/third_party/wayland-p
+ return false;
+ }
+
++ Info("WaylandProxy Wayland '%s' proxy '%s'\n", sWaylandDisplay,
sWaylandProxy);
+ return true;
+}
+
@@ -584,14 +589,19 @@ diff -Naur
a/third_party/wayland-proxy/wayland-proxy.cpp b/third_party/wayland-p
+ for (auto const& connection : mConnections) {
+ addedPollfd = connection->AddToPollFd(addedPollfd);
+ }
++ int nfds = (addedPollfd - pollfds);
+
-+ // Add extra listening socket
-+ addedPollfd->fd = mProxyServerSocket;
-+ addedPollfd->events = POLLIN;
++ // If all connections are attached to compositor, add another one
++ // for new potential connection from application.
++ bool addNewConnection = mConnections.empty() ||
++ mConnections.back()->IsConnected();
++ if (addNewConnection) {
++ addedPollfd->fd = mProxyServerSocket;
++ addedPollfd->events = POLLIN;
++ nfds++;
++ }
+ assert(addedPollfd < pollfds + nfds_max);
+
-+ int nfds = (addedPollfd - pollfds) + 1;
-+
+ while (1) {
+ int ret = poll(pollfds, nfds, POLL_TIMEOUT);
+ if (ret == 0) {
@@ -624,7 +634,7 @@ diff -Naur a/third_party/wayland-proxy/wayland-proxy.cpp
b/third_party/wayland-p
+ assert(loadedPollfd < pollfds + nfds_max);
+
+ // Create a new connection if there's a new client waiting
-+ if (loadedPollfd->revents & POLLIN) {
++ if (addNewConnection && (loadedPollfd->revents & POLLIN)) {
+ Info("WaylandProxy: new child connection\n");
+ int applicationSocket = accept4(loadedPollfd->fd, nullptr, nullptr,
+ SOCK_NONBLOCK | SOCK_CLOEXEC);
@@ -683,6 +693,7 @@ diff -Naur a/third_party/wayland-proxy/wayland-proxy.cpp
b/third_party/wayland-p
+ if (mProxyServerSocket != -1) {
+ close(mProxyServerSocket);
+ }
++ SetWaylandDisplay();
+}
+
+void* WaylandProxy::RunProxyThread(WaylandProxy* aProxy) {
@@ -755,8 +766,8 @@ diff -Naur a/third_party/wayland-proxy/wayland-proxy.cpp
b/third_party/wayland-p
+void WaylandProxy::SetVerbose(bool aVerbose) { sPrintInfo = aVerbose; }
diff -Naur a/third_party/wayland-proxy/wayland-proxy.h
b/third_party/wayland-proxy/wayland-proxy.h
--- a/third_party/wayland-proxy/wayland-proxy.h 1970-01-01
00:00:00.000000000 -0000
-+++ b/third_party/wayland-proxy/wayland-proxy.h 2023-12-27
07:11:03.708390110 -0000
-@@ -0,0 +1,54 @@
++++ b/third_party/wayland-proxy/wayland-proxy.h 2024-01-09
07:37:36.630125950 -0000
+@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -769,6 +780,7 @@ diff -Naur a/third_party/wayland-proxy/wayland-proxy.h
b/third_party/wayland-pro
+#include <vector>
+#include <fcntl.h>
+#include <atomic>
++#include <memory>
+
+typedef unsigned char byte;
+
@@ -783,7 +795,7 @@ diff -Naur a/third_party/wayland-proxy/wayland-proxy.h
b/third_party/wayland-pro
+ bool RunThread();
+
+ void SetWaylandDisplay();
-+ void SetVerbose(bool aVerbose);
++ static void SetVerbose(bool aVerbose);
+
+ ~WaylandProxy();
+
@@ -812,8 +824,8 @@ diff -Naur a/third_party/wayland-proxy/wayland-proxy.h
b/third_party/wayland-pro
+
+#endif // _wayland_proxy_h_
diff -Naur a/toolkit/moz.configure b/toolkit/moz.configure
---- a/toolkit/moz.configure 2023-12-11 20:42:21.000000000 -0000
-+++ b/toolkit/moz.configure 2023-12-27 07:11:03.723390573 -0000
+--- a/toolkit/moz.configure 2024-01-08 18:43:07.000000000 -0000
++++ b/toolkit/moz.configure 2024-01-09 07:37:36.644126205 -0000
@@ -534,6 +534,20 @@
set_config("MOZ_WAYLAND", depends_if(wayland_headers)(lambda _: True))
set_define("MOZ_WAYLAND", depends_if(wayland_headers)(lambda _: True))
@@ -836,19 +848,23 @@ diff -Naur a/toolkit/moz.configure
b/toolkit/moz.configure
# Hardware-accelerated video decode with VAAPI and V4L2 on Linux
# ==============================================================
diff -Naur a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
---- a/toolkit/xre/nsAppRunner.cpp 2023-12-11 20:42:21.000000000 -0000
-+++ b/toolkit/xre/nsAppRunner.cpp 2023-12-27 07:11:03.716390357 -0000
-@@ -341,12 +341,20 @@
+--- a/toolkit/xre/nsAppRunner.cpp 2024-01-08 18:43:07.000000000 -0000
++++ b/toolkit/xre/nsAppRunner.cpp 2024-01-09 07:37:36.637126077 -0000
+@@ -340,13 +340,24 @@
+ # ifdef MOZ_WAYLAND
# include <gdk/gdkwayland.h>
# include "mozilla/widget/nsWaylandDisplay.h"
- # endif
-+# ifdef MOZ_WAYLAND_PROXY
+# include "wayland-proxy.h"
-+# endif
+ # endif
# ifdef MOZ_X11
# include <gdk/gdkx.h>
# endif /* MOZ_X11 */
#endif
++
++#if defined(MOZ_WAYLAND)
++std::unique_ptr<WaylandProxy> gWaylandProxy;
++#endif
++
#include "BinaryPath.h"

+#ifdef MOZ_LOGGING
@@ -859,49 +875,51 @@ diff -Naur a/toolkit/xre/nsAppRunner.cpp
b/toolkit/xre/nsAppRunner.cpp
#ifdef FUZZING
# include "FuzzerRunner.h"

-@@ -3668,6 +3676,9 @@
- XREMain() = default;
-
- ~XREMain() {
-+#if defined(MOZ_WAYLAND_PROXY)
-+ mWaylandProxy = nullptr;
+@@ -2788,6 +2799,9 @@
+ gRemoteService = nullptr;
+ }
+ #endif
++#if defined(MOZ_WAYLAND)
++ gWaylandProxy = nullptr;
+#endif
- mScopedXPCOM = nullptr;
- mAppData = nullptr;
+ return LaunchChild(false, true);
+ }
+ } else {
+@@ -2902,6 +2916,9 @@
+ gRemoteService = nullptr;
}
-@@ -3687,6 +3698,9 @@
- #if defined(MOZ_HAS_REMOTE)
- RefPtr<nsRemoteService> mRemoteService;
#endif
-+#if defined(MOZ_WAYLAND_PROXY)
-+ std::unique_ptr<WaylandProxy> mWaylandProxy;
++#if defined(MOZ_WAYLAND)
++ gWaylandProxy = nullptr;
+#endif
+ return LaunchChild(false, true);
+ }

- UniquePtr<ScopedXPCOMStartup> mScopedXPCOM;
- UniquePtr<XREAppData> mAppData;
-@@ -4707,6 +4721,21 @@
+@@ -4707,6 +4724,23 @@
const char* display_name = nullptr;
bool saveDisplayArg = false;

+ bool waylandEnabled = IsWaylandEnabled();
-+# ifdef MOZ_WAYLAND_PROXY
++# ifdef MOZ_WAYLAND
+ auto* proxyEnv = getenv("MOZ_DISABLE_WAYLAND_PROXY");
+ bool disableWaylandProxy = proxyEnv && *proxyEnv;
+ if (!disableWaylandProxy && XRE_IsParentProcess() && waylandEnabled) {
-+ mWaylandProxy = WaylandProxy::Create();
-+ mWaylandProxy->RunThread();
+# ifdef MOZ_LOGGING
+ if (MOZ_LOG_TEST(gWidgetWaylandLog, mozilla::LogLevel::Debug)) {
-+ mWaylandProxy->SetVerbose(true);
++ WaylandProxy::SetVerbose(true);
+ }
+# endif
++ gWaylandProxy = WaylandProxy::Create();
++ if (gWaylandProxy) {
++ gWaylandProxy->RunThread();
++ }
+ }
+# endif
+
// display_name is owned by gdk.
display_name = gdk_get_display_arg_name();
// if --display argument is given make sure it's
-@@ -4716,7 +4745,6 @@
+@@ -4716,7 +4750,6 @@
saveDisplayArg = true;
}

@@ -909,28 +927,27 @@ diff -Naur a/toolkit/xre/nsAppRunner.cpp
b/toolkit/xre/nsAppRunner.cpp
// On Wayland disabled builds read X11 DISPLAY env exclusively
// and don't care about different displays.
if (!waylandEnabled && !display_name) {
-@@ -5919,6 +5947,11 @@
+@@ -5918,6 +5951,7 @@
+ if (!gfxPlatform::IsHeadless()) {
# ifdef MOZ_WAYLAND
WaylandDisplayRelease();
++ gWaylandProxy = nullptr;
# endif
-+# ifdef MOZ_WAYLAND_PROXY
-+ if (mWaylandProxy) {
-+ mWaylandProxy = nullptr;
-+ }
-+# endif
}
#endif
-
diff -Naur a/widget/gtk/moz.build b/widget/gtk/moz.build
---- a/widget/gtk/moz.build 2023-12-11 20:42:21.000000000 -0000
-+++ b/widget/gtk/moz.build 2023-12-27 07:11:03.709390141 -0000
-@@ -25,6 +25,9 @@
+--- a/widget/gtk/moz.build 2024-01-08 18:43:07.000000000 -0000
++++ b/widget/gtk/moz.build 2024-01-09 07:37:36.630125950 -0000
+@@ -23,7 +23,11 @@
+ DIRS += ["mozgtk"]
+
if CONFIG["MOZ_WAYLAND"]:
- DIRS += ["wayland", "mozwayland"]
+- DIRS += ["wayland", "mozwayland"]
++ DIRS += [
++ "wayland",
++ "mozwayland",
++ "../../third_party/wayland-proxy"
++ ]

-+if CONFIG["MOZ_WAYLAND_PROXY"]:
-+ DIRS += ["../../third_party/wayland-proxy"]
-+
if CONFIG["MOZ_ENABLE_VAAPI"]:
DIRS += ["vaapitest"]
-



  • [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (fda47172e2c6fd21fe943094a5b12d1a02036507), Pavel Vinogradov, 01/09/2024

Archive powered by MHonArc 2.6.24.

Top of Page