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"