sgallagh pushed to fedora-release (rawhide). "Restore the VERSION
substitution in the legal readme (..more)"
by notificationsï¼ fedoraproject.org
Notification time stamped 2021-04-30 19:37:43 UTC
From b25e244a5dd1291e40047ea63656e94e71ec444e Mon Sep 17 00:00:00 2001
From: Ben Cotton <bcotton(a)fedoraproject.org>
Date: Apr 30 2021 19:35:09 +0000
Subject: Restore the VERSION substitution in the legal readme
This doesn't quite work perfectly, in that the the URL for rawhide won't
work. But that's enough of an edge case that it's not a blocker.
Also changed http:// to https:// because it's 2021.
Signed-off-by: Ben Cotton <bcotton(a)fedoraproject.org>
---
diff --git a/Fedora-Legal-README.txt b/Fedora-Legal-README.txt
index 8f61c37..a59ec49 100644
--- a/Fedora-Legal-README.txt
+++ b/Fedora-Legal-README.txt
@@ -10,7 +10,7 @@ https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing.
= Source Availability =
-The accompanying Fedora 31 release includes copyrighted
+The accompanying Fedora Linux @@VERSION@@ release includes copyrighted
software that is licensed under the GNU General Public License and
other licenses. You may obtain the complete machine-readable source
code corresponding to portions of this release by sending a check or
@@ -18,10 +18,10 @@ money order in the amount of US $5.00 to:
VP, Legal - Products & Technologies | Red Hat, Inc. | 100 East Davie Street | Raleigh, NC 27601 USA
-Please write "source for Fedora 31" in the memo line of your payment.
+Please write "source for Fedora Linux @@VERSION@@" in the memo line of your payment.
You may also access a copy of this source code at:
-http://dl.fedoraproject.org/pub/fedora/linux/releases/31/Everything/source/
+https://dl.fedoraproject.org/pub/fedora/linux/releases/@@VERSION@@/Everything/source/
This offer is valid to anyone in receipt of this information and shall
expire three years following the date of the final distribution of
diff --git a/fedora-release.spec b/fedora-release.spec
index 6057c0b..7ace148 100644
--- a/fedora-release.spec
+++ b/fedora-release.spec
@@ -60,7 +60,7 @@
Summary: Fedora release files
Name: fedora-release
Version: 35
-Release: 0.7%{?eln:.eln%{eln}}
+Release: 0.8%{?eln:.eln%{eln}}
License: MIT
URL: https://fedoraproject.org/
@@ -1328,6 +1328,9 @@ ln -s %{_swidtagdir} %{buildroot}%{_sysconfdir}/swid/swidtags.d/fedoraproject.or
%changelog
+* Fri Apr 30 2021 Ben Cotton <bcotton(a)fedoraproject.org> - 35-0.8
+- Automatically set the version in Fedora-Legal-README.txt
+
* Tue Apr 13 2021 Timothée Ravier <travier(a)redhat.com> - 35-0.7
- Add ostree-counting & ostree-desktop subpackages
https://src.fedoraproject.org/rpms/fedora-release/c/b25e244a5dd1291e40047...
1Â year, 11Â months
sgallagh pushed to fedora-release (rawhide). "Change NAME and
PRETTY_NAME to "Fedora Linux" (..more)"
by notificationsï¼ fedoraproject.org
Notification time stamped 2021-04-30 19:37:43 UTC
From b1eda072639e23d7c857f2d6ac7b4f946aa1c28b Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh(a)redhat.com>
Date: Apr 30 2021 19:37:15 +0000
Subject: Change NAME and PRETTY_NAME to "Fedora Linux"
Fixes #181
Signed-off-by: Stephen Gallagher <sgallagh(a)redhat.com>
---
diff --git a/fedora-release.spec b/fedora-release.spec
index 7ace148..a0017d3 100644
--- a/fedora-release.spec
+++ b/fedora-release.spec
@@ -60,7 +60,7 @@
Summary: Fedora release files
Name: fedora-release
Version: 35
-Release: 0.8%{?eln:.eln%{eln}}
+Release: 0.9%{?eln:.eln%{eln}}
License: MIT
URL: https://fedoraproject.org/
@@ -835,13 +835,13 @@ ln -s fedora-release %{buildroot}%{_sysconfdir}/system-release
%endif
cat << EOF >> os-release
-NAME=Fedora
+NAME="Fedora Linux"
VERSION="%{dist_version} (%{release_name}%{?prerelease})"
ID=fedora
VERSION_ID=%{dist_version}
VERSION_CODENAME=""
PLATFORM_ID="platform:f%{dist_version}"
-PRETTY_NAME="Fedora %{dist_version} (%{release_name}%{?prerelease})"
+PRETTY_NAME="Fedora Linux %{dist_version} (%{release_name}%{?prerelease})"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:%{dist_version}"
@@ -1328,6 +1328,9 @@ ln -s %{_swidtagdir} %{buildroot}%{_sysconfdir}/swid/swidtags.d/fedoraproject.or
%changelog
+* Fri Apr 30 2021 Stephen Gallagher <sgallagh(a)redhat.com> - 35-0.9
+- Change PRETTY_NAME to "Fedora Linux"
+
* Fri Apr 30 2021 Ben Cotton <bcotton(a)fedoraproject.org> - 35-0.8
- Automatically set the version in Fedora-Legal-README.txt
https://src.fedoraproject.org/rpms/fedora-release/c/b1eda072639e23d7c857f...
1Â year, 11Â months
catanzaro pushed to wpebackend-fdo (f34). "Update to 1.9.91"
by notificationsï¼ fedoraproject.org
Notification time stamped 2021-04-30 19:33:21 UTC
From 5627979ee00d33d9287c77f6bd0cd5d9af204765 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro(a)gnome.org>
Date: Apr 30 2021 19:33:12 +0000
Subject: Update to 1.9.91
---
diff --git a/.gitignore b/.gitignore
index e279ebd..c944e8a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@
/wpebackend-fdo-1.8.0.tar.xz
/wpebackend-fdo-1.9.1.tar.xz
/wpebackend-fdo-1.9.90.tar.xz
+/wpebackend-fdo-1.9.91.tar.xz
diff --git a/0001-Add-some-checks-to-ensure-we-properly-bind-server-gl.patch b/0001-Add-some-checks-to-ensure-we-properly-bind-server-gl.patch
deleted file mode 100644
index 1678328..0000000
--- a/0001-Add-some-checks-to-ensure-we-properly-bind-server-gl.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 951ce45d4c229a4f6abea39acd4f7dc759d9ef10 Mon Sep 17 00:00:00 2001
-From: Michael Catanzaro <mcatanzaro(a)gnome.org>
-Date: Fri, 9 Apr 2021 13:10:02 -0500
-Subject: [PATCH 01/13] Add some checks to ensure we properly bind server
- globals
-
-If we fail to bind any global objects, we are going to crash. Let's do
-that as nicely as possible using g_error(), rather than dereferencing
-null pointers later on.
-
-Suggested by #145
-
-(cherry picked from commit a4eb79d12fc851ea7cef616afa0d77668e83ea61)
----
- src/extensions/audio.cpp | 3 +++
- src/extensions/video-plane-display-dmabuf.cpp | 3 +++
- src/ws-client.cpp | 8 ++++++++
- 3 files changed, 14 insertions(+)
-
-diff --git a/src/extensions/audio.cpp b/src/extensions/audio.cpp
-index b3043ac..5d2dd91 100644
---- a/src/extensions/audio.cpp
-+++ b/src/extensions/audio.cpp
-@@ -159,6 +159,9 @@ public:
- wl_display_roundtrip_queue(display, eventQueue);
- wl_registry_destroy(registry);
-
-+ if (!m_wl.audio)
-+ g_error("Failed to bind wpe_audio");
-+
- wl_event_queue_destroy(eventQueue);
- }
-
-diff --git a/src/extensions/video-plane-display-dmabuf.cpp b/src/extensions/video-plane-display-dmabuf.cpp
-index 953cb4c..96fabcf 100644
---- a/src/extensions/video-plane-display-dmabuf.cpp
-+++ b/src/extensions/video-plane-display-dmabuf.cpp
-@@ -159,6 +159,9 @@ public:
- wl_display_roundtrip_queue(display, eventQueue);
- wl_registry_destroy(registry);
-
-+ if (!m_wl.videoPlaneDisplayDmaBuf)
-+ g_error("Failed to bind wpe_video_plane_display_dmabuf");
-+
- wl_event_queue_destroy(eventQueue);
- }
-
-diff --git a/src/ws-client.cpp b/src/ws-client.cpp
-index 6dc98ca..4ffa090 100644
---- a/src/ws-client.cpp
-+++ b/src/ws-client.cpp
-@@ -126,6 +126,9 @@ BaseBackend::BaseBackend(int hostFD)
- wl_display_roundtrip(m_wl.display);
- wl_registry_destroy(registry);
-
-+ if (!m_wl.wpeBridge)
-+ g_error("Failed to bind wpe_bridge");
-+
- wpe_bridge_add_listener(m_wl.wpeBridge, &s_bridgeListener, this);
- wpe_bridge_initialize(m_wl.wpeBridge);
- wl_display_roundtrip(m_wl.display);
-@@ -204,6 +207,11 @@ void BaseTarget::initialize(BaseBackend& backend)
- wl_display_roundtrip_queue(display, m_wl.eventQueue);
- wl_registry_destroy(registry);
-
-+ if (!m_wl.compositor)
-+ g_error("Failed to bind wl_compositor");
-+ if (!m_wl.wpeBridge)
-+ g_error("Failed to bind wpe_bridge");
-+
- m_wl.surface = wl_compositor_create_surface(m_wl.compositor);
- wl_proxy_set_queue(reinterpret_cast<struct wl_proxy*>(m_wl.surface), m_wl.eventQueue);
-
---
-2.31.1
-
diff --git a/0002-ws-Remove-unneeded-Surface-id-member.patch b/0002-ws-Remove-unneeded-Surface-id-member.patch
deleted file mode 100644
index 4c43b87..0000000
--- a/0002-ws-Remove-unneeded-Surface-id-member.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 6963a05959d8be52d4b8ee0cafc49da72a04a6dd Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Tue, 13 Apr 2021 00:30:08 +0300
-Subject: [PATCH 02/13] ws: Remove unneeded Surface::id member
-
-The Wayland resource identifier is not used at the moment, and moreover
-if ever needed wl_resource_get_id(surface->bufferResource) can be used
-to retrieve it.
-
-(cherry picked from commit 55d05be5529635b7797f34b3e9871612909859fc)
----
- src/ws.cpp | 6 ++----
- src/ws.h | 9 ++++++---
- 2 files changed, 8 insertions(+), 7 deletions(-)
-
-diff --git a/src/ws.cpp b/src/ws.cpp
-index 5602595..c23e53c 100644
---- a/src/ws.cpp
-+++ b/src/ws.cpp
-@@ -144,9 +144,7 @@ static const struct wl_compositor_interface s_compositorInterface = {
- return;
- }
-
-- auto* surface = new Surface;
-- surface->client = client;
-- surface->id = id;
-+ auto* surface = new Surface {surfaceResource};
- wl_resource_set_implementation(surfaceResource, &s_surfaceInterface, surface,
- [](struct wl_resource* resource)
- {
-@@ -524,7 +522,7 @@ struct wl_client* Instance::registerViewBackend(uint32_t surfaceId, APIClient& a
- g_error("Instance::registerViewBackend(): " "Cannot find surface %" PRIu32 " in view backend map.", surfaceId);
-
- it->second->apiClient = &apiClient;
-- return it->second->client;
-+ return wl_resource_get_client(it->second->resource);
- }
-
- void Instance::unregisterViewBackend(uint32_t surfaceId)
-diff --git a/src/ws.h b/src/ws.h
-index d4376c4..683b679 100644
---- a/src/ws.h
-+++ b/src/ws.h
-@@ -48,10 +48,13 @@ struct APIClient {
- virtual void exportEGLStreamProducer(struct wl_resource*) = 0;
- };
-
--struct Surface;
- struct Surface {
-- uint32_t id { 0 };
-- struct wl_client* client { nullptr };
-+ explicit Surface(struct wl_resource* surfaceResource):
-+ resource {surfaceResource}
-+ {
-+ }
-+
-+ struct wl_resource* resource;
-
- APIClient* apiClient { nullptr };
-
---
-2.31.1
-
diff --git a/0003-ws-Rename-surfaceId-to-bridgeId-where-appropriate.patch b/0003-ws-Rename-surfaceId-to-bridgeId-where-appropriate.patch
deleted file mode 100644
index 1fa9ca3..0000000
--- a/0003-ws-Rename-surfaceId-to-bridgeId-where-appropriate.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From 2722e7369ae746cc71604bcd13e1f4c6dd5816c3 Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Tue, 13 Apr 2021 01:06:41 +0300
-Subject: [PATCH 03/13] ws: Rename surfaceId to bridgeId where appropriate
-
-The fact is that WS::Instance::m_viewBackendMap associated wpe_bridge
-identifiers with a Surface, therefore it is clearer when reading the
-code to name variables accordingly.
-
-(cherry picked from commit 2d58520c94cd1c06d940621acaf409480ef908e8)
----
- src/view-backend-private.cpp | 23 +++++++++++------------
- src/view-backend-private.h | 2 +-
- src/ws.cpp | 10 +++++-----
- src/ws.h | 1 +
- 4 files changed, 18 insertions(+), 18 deletions(-)
-
-diff --git a/src/view-backend-private.cpp b/src/view-backend-private.cpp
-index 78f0e2f..367e6c3 100644
---- a/src/view-backend-private.cpp
-+++ b/src/view-backend-private.cpp
-@@ -41,7 +41,7 @@ ViewBackend::ViewBackend(ClientBundle* clientBundle, struct wpe_view_backend* ba
-
- ViewBackend::~ViewBackend()
- {
-- unregisterSurface(m_surfaceId);
-+ unregisterSurface(m_bridgeId);
- if (m_clientFd != -1)
- close(m_clientFd);
- }
-@@ -131,29 +131,28 @@ void ViewBackend::clientDestroyNotify(struct wl_listener* listener, void*)
- ViewBackend* self = wl_container_of(listener, self, m_clientDestroy);
-
- self->clearFrameCallbacks();
-- WS::Instance::singleton().unregisterViewBackend(self->m_surfaceId);
-+ WS::Instance::singleton().unregisterViewBackend(self->m_bridgeId);
- self->m_client = nullptr;
-- self->m_surfaceId = 0;
-+ self->m_bridgeId = 0;
-
- wl_list_remove(&self->m_clientDestroy.link);
- }
-
--void ViewBackend::registerSurface(uint32_t surfaceId)
-+void ViewBackend::registerSurface(uint32_t bridgeId)
- {
--
-- if (m_surfaceId == surfaceId)
-+ if (m_bridgeId == bridgeId)
- return;
-
-- unregisterSurface(m_surfaceId);
-+ unregisterSurface(m_bridgeId);
-
-- m_surfaceId = surfaceId;
-- m_client = WS::Instance::singleton().registerViewBackend(m_surfaceId, *this);
-+ m_bridgeId = bridgeId;
-+ m_client = WS::Instance::singleton().registerViewBackend(m_bridgeId, *this);
- wl_client_add_destroy_listener(m_client, &m_clientDestroy);
- }
-
--void ViewBackend::unregisterSurface(uint32_t surfaceId)
-+void ViewBackend::unregisterSurface(uint32_t bridgeId)
- {
-- if (!surfaceId || m_surfaceId != surfaceId)
-+ if (!bridgeId || m_bridgeId != bridgeId)
- return;
-
- // If the surfaceId is valid, we cannot have an invalid wl_client.
-@@ -165,7 +164,7 @@ void ViewBackend::unregisterSurface(uint32_t surfaceId)
-
- // After destroying the client, none of these can be valid.
- g_assert(m_client == nullptr);
-- g_assert(m_surfaceId == 0);
-+ g_assert(m_bridgeId == 0);
- }
-
- void ViewBackend::didReceiveMessage(uint32_t messageId, uint32_t messageBody)
-diff --git a/src/view-backend-private.h b/src/view-backend-private.h
-index 918ec0e..9500262 100644
---- a/src/view-backend-private.h
-+++ b/src/view-backend-private.h
-@@ -90,7 +90,7 @@ private:
-
- static gboolean s_socketCallback(GSocket*, GIOCondition, gpointer);
-
-- uint32_t m_surfaceId { 0 };
-+ uint32_t m_bridgeId { 0 };
-
- static void clientDestroyNotify(struct wl_listener*, void*);
- struct wl_listener m_clientDestroy { {}, clientDestroyNotify };
-diff --git a/src/ws.cpp b/src/ws.cpp
-index c23e53c..a044b2e 100644
---- a/src/ws.cpp
-+++ b/src/ws.cpp
-@@ -515,19 +515,19 @@ void Instance::releaseAudioPacketExport(struct wpe_audio_packet_export* packet_e
- wpe_audio_packet_export_send_release(packet_export->exportResource);
- }
-
--struct wl_client* Instance::registerViewBackend(uint32_t surfaceId, APIClient& apiClient)
-+struct wl_client* Instance::registerViewBackend(uint32_t bridgeId, APIClient& apiClient)
- {
-- auto it = m_viewBackendMap.find(surfaceId);
-+ auto it = m_viewBackendMap.find(bridgeId);
- if (it == m_viewBackendMap.end())
-- g_error("Instance::registerViewBackend(): " "Cannot find surface %" PRIu32 " in view backend map.", surfaceId);
-+ g_error("Instance::registerViewBackend(): " "Cannot find surface with bridgeId %" PRIu32 " in view backend map.", bridgeId);
-
- it->second->apiClient = &apiClient;
- return wl_resource_get_client(it->second->resource);
- }
-
--void Instance::unregisterViewBackend(uint32_t surfaceId)
-+void Instance::unregisterViewBackend(uint32_t bridgeId)
- {
-- auto it = m_viewBackendMap.find(surfaceId);
-+ auto it = m_viewBackendMap.find(bridgeId);
- if (it != m_viewBackendMap.end()) {
- it->second->apiClient = nullptr;
- m_viewBackendMap.erase(it);
-diff --git a/src/ws.h b/src/ws.h
-index 683b679..aa0c083 100644
---- a/src/ws.h
-+++ b/src/ws.h
-@@ -128,6 +128,7 @@ private:
- struct wl_global* m_wpeBridge { nullptr };
- GSource* m_source { nullptr };
-
-+ // (bridgeId -> Surface)
- std::unordered_map<uint32_t, Surface*> m_viewBackendMap;
-
- struct {
---
-2.31.1
-
diff --git a/0004-ws-Accumulate-surface-frame-callbacks-until-commit.patch b/0004-ws-Accumulate-surface-frame-callbacks-until-commit.patch
deleted file mode 100644
index efe34bf..0000000
--- a/0004-ws-Accumulate-surface-frame-callbacks-until-commit.patch
+++ /dev/null
@@ -1,262 +0,0 @@
-From 98ad602e5f5d51162ec715a023b87d06a71d627b Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Thu, 8 Apr 2021 00:57:49 +0300
-Subject: [PATCH 04/13] ws: Accumulate surface frame callbacks until commit
-
-Move code around to accumulate surface frame callback additions until
-changes are comitted to the surface, as intended according to the base
-Wayland protocol specification.
-
-As a bonus, remove the auxiliar ViewBackend::FrameCallbackResource
-by passing a destruction callback to wl_resource_set_implementation()
-and using the internal wl_resource list link.
-
-(cherry picked from commit 3ab4a3c9770d333ebbc65ab42a604836c6da57ec)
----
- src/view-backend-private.cpp | 45 ++----------------------------------
- src/view-backend-private.h | 14 -----------
- src/ws.cpp | 19 +++++++++++++--
- src/ws.h | 39 ++++++++++++++++++++++++++++++-
- 4 files changed, 57 insertions(+), 60 deletions(-)
-
-diff --git a/src/view-backend-private.cpp b/src/view-backend-private.cpp
-index 367e6c3..f04a57e 100644
---- a/src/view-backend-private.cpp
-+++ b/src/view-backend-private.cpp
-@@ -35,7 +35,6 @@ ViewBackend::ViewBackend(ClientBundle* clientBundle, struct wpe_view_backend* ba
- {
- m_clientBundle->viewBackend = this;
-
-- wl_list_init(&m_frameCallbacks);
- wl_list_init(&m_clientDestroy.link);
- }
-
-@@ -72,15 +71,6 @@ int ViewBackend::clientFd()
- return dup(m_clientFd);
- }
-
--void ViewBackend::frameCallback(struct wl_resource* callback)
--{
-- auto* resource = new FrameCallbackResource;
-- resource->resource = callback;
-- resource->destroyListener.notify = FrameCallbackResource::destroyNotify;
-- wl_resource_add_destroy_listener(callback, &resource->destroyListener);
-- wl_list_insert(&m_frameCallbacks, &resource->link);
--}
--
- void ViewBackend::exportBufferResource(struct wl_resource* bufferResource)
- {
- m_clientBundle->exportBuffer(bufferResource);
-@@ -103,16 +93,8 @@ void ViewBackend::exportEGLStreamProducer(struct wl_resource* bufferResource)
-
- void ViewBackend::dispatchFrameCallbacks()
- {
-- if (G_UNLIKELY(!m_client))
-- return;
--
-- FrameCallbackResource* resource;
-- wl_list_for_each(resource, &m_frameCallbacks, link) {
-- wl_callback_send_done(resource->resource, 0);
-- }
-- clearFrameCallbacks();
--
-- wl_client_flush(m_client);
-+ if (G_LIKELY(m_bridgeId))
-+ WS::Instance::singleton().dispatchFrameCallbacks(m_bridgeId);
-
- wpe_view_backend_dispatch_frame_displayed(m_backend);
- }
-@@ -130,7 +112,6 @@ void ViewBackend::clientDestroyNotify(struct wl_listener* listener, void*)
- {
- ViewBackend* self = wl_container_of(listener, self, m_clientDestroy);
-
-- self->clearFrameCallbacks();
- WS::Instance::singleton().unregisterViewBackend(self->m_bridgeId);
- self->m_client = nullptr;
- self->m_bridgeId = 0;
-@@ -180,25 +161,3 @@ void ViewBackend::didReceiveMessage(uint32_t messageId, uint32_t messageBody)
- assert(!"WPE fdo received an invalid IPC message");
- }
- }
--
--void ViewBackend::clearFrameCallbacks()
--{
-- FrameCallbackResource* resource;
-- FrameCallbackResource* next;
-- wl_list_for_each_safe(resource, next, &m_frameCallbacks, link) {
-- wl_list_remove(&resource->link);
-- wl_list_remove(&resource->destroyListener.link);
-- wl_resource_destroy(resource->resource);
-- delete resource;
-- }
-- wl_list_init(&m_frameCallbacks);
--}
--
--void ViewBackend::FrameCallbackResource::destroyNotify(struct wl_listener* listener, void*)
--{
-- FrameCallbackResource* resource;
-- resource = wl_container_of(listener, resource, destroyListener);
--
-- wl_list_remove(&resource->link);
-- delete resource;
--}
-diff --git a/src/view-backend-private.h b/src/view-backend-private.h
-index 9500262..a598dee 100644
---- a/src/view-backend-private.h
-+++ b/src/view-backend-private.h
-@@ -63,7 +63,6 @@ public:
-
- void initialize();
- int clientFd();
-- void frameCallback(struct wl_resource* callbackResource) override;
- void exportBufferResource(struct wl_resource* bufferResource) override;
- void exportLinuxDmabuf(const struct linux_dmabuf_buffer *dmabuf_buffer) override;
- void exportShmBuffer(struct wl_resource* bufferResource, struct wl_shm_buffer* shmBuffer) override;
-@@ -72,22 +71,11 @@ public:
- void releaseBuffer(struct wl_resource* buffer_resource);
-
- private:
-- struct FrameCallbackResource {
-- struct wl_resource* resource;
--
-- struct wl_list link;
-- struct wl_listener destroyListener;
--
-- static void destroyNotify(struct wl_listener*, void*);
-- };
--
- void didReceiveMessage(uint32_t messageId, uint32_t messageBody) override;
-
- void registerSurface(uint32_t);
- void unregisterSurface(uint32_t);
-
-- void clearFrameCallbacks();
--
- static gboolean s_socketCallback(GSocket*, GIOCondition, gpointer);
-
- uint32_t m_bridgeId { 0 };
-@@ -99,8 +87,6 @@ private:
- ClientBundle* m_clientBundle;
- struct wpe_view_backend* m_backend;
-
-- struct wl_list m_frameCallbacks;
--
- std::unique_ptr<FdoIPC::Connection> m_socket;
- int m_clientFd { -1 };
- };
-diff --git a/src/ws.cpp b/src/ws.cpp
-index a044b2e..87faaf3 100644
---- a/src/ws.cpp
-+++ b/src/ws.cpp
-@@ -110,8 +110,11 @@ static const struct wl_surface_interface s_surfaceInterface = {
- return;
- }
-
-- wl_resource_set_implementation(callbackResource, nullptr, nullptr, nullptr);
-- surface.apiClient->frameCallback(callbackResource);
-+ wl_resource_set_implementation(callbackResource, nullptr, nullptr,
-+ [](struct wl_resource* resource) {
-+ wl_list_remove(wl_resource_get_link(resource));
-+ });
-+ surface.addFrameCallback(callbackResource);
- },
- // set_opaque_region
- [](struct wl_client*, struct wl_resource*, struct wl_resource*) { },
-@@ -121,6 +124,7 @@ static const struct wl_surface_interface s_surfaceInterface = {
- [](struct wl_client*, struct wl_resource* surfaceResource)
- {
- auto& surface = *static_cast<Surface*>(wl_resource_get_user_data(surfaceResource));
-+ surface.commit();
- WS::Instance::singleton().impl().surfaceCommit(surface);
- },
- // set_buffer_transform
-@@ -534,4 +538,15 @@ void Instance::unregisterViewBackend(uint32_t bridgeId)
- }
- }
-
-+void Instance::dispatchFrameCallbacks(uint32_t bridgeId)
-+{
-+ auto it = m_viewBackendMap.find(bridgeId);
-+ if (it == m_viewBackendMap.end()) {
-+ g_error("Instance::dispatchFrameCallbacks(): "
-+ "Cannot find surface with bridgeId %" PRIu32 " in view backend map.", bridgeId);
-+ }
-+
-+ it->second->dispatchFrameCallbacks();
-+}
-+
- } // namespace WS
-diff --git a/src/ws.h b/src/ws.h
-index aa0c083..30baf8e 100644
---- a/src/ws.h
-+++ b/src/ws.h
-@@ -41,7 +41,6 @@ namespace WS {
- struct APIClient {
- virtual ~APIClient() = default;
-
-- virtual void frameCallback(struct wl_resource*) = 0;
- virtual void exportBufferResource(struct wl_resource*) = 0;
- virtual void exportLinuxDmabuf(const struct linux_dmabuf_buffer *dmabuf_buffer) = 0;
- virtual void exportShmBuffer(struct wl_resource*, struct wl_shm_buffer*) = 0;
-@@ -52,6 +51,18 @@ struct Surface {
- explicit Surface(struct wl_resource* surfaceResource):
- resource {surfaceResource}
- {
-+ wl_list_init(&m_pendingFrameCallbacks);
-+ wl_list_init(&m_currentFrameCallbacks);
-+ }
-+
-+ ~Surface()
-+ {
-+ struct wl_resource* resource;
-+ struct wl_resource* tmp;
-+ wl_resource_for_each_safe(resource, tmp, &m_pendingFrameCallbacks)
-+ wl_resource_destroy(resource);
-+ wl_resource_for_each_safe(resource, tmp, &m_currentFrameCallbacks)
-+ wl_resource_destroy(resource);
- }
-
- struct wl_resource* resource;
-@@ -61,6 +72,31 @@ struct Surface {
- struct wl_resource* bufferResource { nullptr };
- const struct linux_dmabuf_buffer* dmabufBuffer { nullptr };
- struct wl_shm_buffer* shmBuffer { nullptr };
-+
-+ void commit()
-+ {
-+ wl_list_insert_list(&m_currentFrameCallbacks, &m_pendingFrameCallbacks);
-+ wl_list_init(&m_pendingFrameCallbacks);
-+ }
-+
-+ void addFrameCallback(struct wl_resource* resource)
-+ {
-+ wl_list_insert(m_pendingFrameCallbacks.prev, wl_resource_get_link(resource));
-+ }
-+
-+ void dispatchFrameCallbacks()
-+ {
-+ struct wl_resource* resource;
-+ struct wl_resource* tmp;
-+ wl_resource_for_each_safe(resource, tmp, &m_currentFrameCallbacks) {
-+ wl_callback_send_done(resource, 0);
-+ wl_resource_destroy(resource);
-+ }
-+ }
-+
-+private:
-+ struct wl_list m_pendingFrameCallbacks;
-+ struct wl_list m_currentFrameCallbacks;
- };
-
- class Instance {
-@@ -95,6 +131,7 @@ public:
- void registerSurface(uint32_t, Surface*);
- struct wl_client* registerViewBackend(uint32_t, APIClient&);
- void unregisterViewBackend(uint32_t);
-+ void dispatchFrameCallbacks(uint32_t);
-
- using VideoPlaneDisplayDmaBufCallback = std::function<void(struct wpe_video_plane_display_dmabuf_export*, uint32_t, int, int32_t, int32_t, int32_t, int32_t, uint32_t)>;
- using VideoPlaneDisplayDmaBufEndOfStreamCallback = std::function<void(uint32_t)>;
---
-2.31.1
-
diff --git a/0006-meson-Make-scripts-version.py-work-with-older-Python.patch b/0006-meson-Make-scripts-version.py-work-with-older-Python.patch
deleted file mode 100644
index be46355..0000000
--- a/0006-meson-Make-scripts-version.py-work-with-older-Python.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 89e4b1683ad51c1b066fc10c748e5d524fb37cd2 Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Wed, 14 Apr 2021 21:56:12 +0300
-Subject: [PATCH 06/13] meson: Make scripts/version.py work with older Pythons
-
-Older Python versions (3.5, 2.x) do not have a __getitem__ method
-on regex match objects, so use the .group() method instead, which is
-available in all versions.
-
-(cherry picked from commit 8c4b29f973500a9a596e27a2b3042923e4c905f7)
----
- scripts/version.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/scripts/version.py b/scripts/version.py
-index 1dbbdb3..e2af013 100644
---- a/scripts/version.py
-+++ b/scripts/version.py
-@@ -18,6 +18,6 @@ with open(version_file, "r") as f:
- for line in f.readlines():
- m = version_re.match(line)
- if m:
-- version[m[1]] = m[2]
-+ version[m.group(1)] = m.group(2)
-
- print("{}.{}.{}".format(version["MAJOR"], version["MINOR"], version["MICRO"]))
---
-2.31.1
-
diff --git a/0007-Revert-view-backend-Properly-unregister-surfaces.patch b/0007-Revert-view-backend-Properly-unregister-surfaces.patch
deleted file mode 100644
index 348fa09..0000000
--- a/0007-Revert-view-backend-Properly-unregister-surfaces.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-From 4657edaf9f798863d16d94e61a3f467ee656e908 Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Sat, 10 Apr 2021 18:27:42 +0300
-Subject: [PATCH 07/13] Revert "view backend: Properly unregister surfaces"
-
-This reverts commit 99bd04019800f84a722ae99bf1a352f225d93002.
----
- src/view-backend-private.cpp | 52 +++++++++++++-----------------------
- src/view-backend-private.h | 8 +++---
- 2 files changed, 24 insertions(+), 36 deletions(-)
-
-diff --git a/src/view-backend-private.cpp b/src/view-backend-private.cpp
-index f04a57e..4920037 100644
---- a/src/view-backend-private.cpp
-+++ b/src/view-backend-private.cpp
-@@ -34,13 +34,12 @@ ViewBackend::ViewBackend(ClientBundle* clientBundle, struct wpe_view_backend* ba
- , m_backend(backend)
- {
- m_clientBundle->viewBackend = this;
--
-- wl_list_init(&m_clientDestroy.link);
- }
-
- ViewBackend::~ViewBackend()
- {
- unregisterSurface(m_bridgeId);
-+
- if (m_clientFd != -1)
- close(m_clientFd);
- }
-@@ -96,39 +95,24 @@ void ViewBackend::dispatchFrameCallbacks()
- if (G_LIKELY(m_bridgeId))
- WS::Instance::singleton().dispatchFrameCallbacks(m_bridgeId);
-
-+ if (m_client.object)
-+ wl_client_flush(m_client.object);
- wpe_view_backend_dispatch_frame_displayed(m_backend);
- }
-
- void ViewBackend::releaseBuffer(struct wl_resource* buffer_resource)
- {
-- if (G_UNLIKELY(!m_client))
-- return;
--
- wl_buffer_send_release(buffer_resource);
-- wl_client_flush(m_client);
--}
--
--void ViewBackend::clientDestroyNotify(struct wl_listener* listener, void*)
--{
-- ViewBackend* self = wl_container_of(listener, self, m_clientDestroy);
--
-- WS::Instance::singleton().unregisterViewBackend(self->m_bridgeId);
-- self->m_client = nullptr;
-- self->m_bridgeId = 0;
--
-- wl_list_remove(&self->m_clientDestroy.link);
-+ if (m_client.object)
-+ wl_client_flush(m_client.object);
- }
-
- void ViewBackend::registerSurface(uint32_t bridgeId)
- {
-- if (m_bridgeId == bridgeId)
-- return;
--
-- unregisterSurface(m_bridgeId);
--
- m_bridgeId = bridgeId;
-- m_client = WS::Instance::singleton().registerViewBackend(m_bridgeId, *this);
-- wl_client_add_destroy_listener(m_client, &m_clientDestroy);
-+ m_client.object = WS::Instance::singleton().registerViewBackend(m_bridgeId, *this);
-+ m_client.destroyListener.notify = Client::destroyNotify;
-+ wl_client_add_destroy_listener(m_client.object, &m_client.destroyListener);
- }
-
- void ViewBackend::unregisterSurface(uint32_t bridgeId)
-@@ -136,16 +120,10 @@ void ViewBackend::unregisterSurface(uint32_t bridgeId)
- if (!bridgeId || m_bridgeId != bridgeId)
- return;
-
-- // If the surfaceId is valid, we cannot have an invalid wl_client.
-- g_assert(m_client != nullptr);
--
-- // Destroying the client triggers the m_clientDestroy callback,
-- // the rest of the teardown is done from there.
-- wl_client_destroy(m_client);
-+ g_clear_pointer(&m_client.object, wl_client_destroy);
-
-- // After destroying the client, none of these can be valid.
-- g_assert(m_client == nullptr);
-- g_assert(m_bridgeId == 0);
-+ WS::Instance::singleton().unregisterViewBackend(m_bridgeId);
-+ m_bridgeId = 0;
- }
-
- void ViewBackend::didReceiveMessage(uint32_t messageId, uint32_t messageBody)
-@@ -161,3 +139,11 @@ void ViewBackend::didReceiveMessage(uint32_t messageId, uint32_t messageBody)
- assert(!"WPE fdo received an invalid IPC message");
- }
- }
-+
-+void ViewBackend::Client::destroyNotify(struct wl_listener* listener, void*)
-+{
-+ Client* client;
-+ client = wl_container_of(listener, client, destroyListener);
-+
-+ client->object = nullptr;
-+}
-diff --git a/src/view-backend-private.h b/src/view-backend-private.h
-index a598dee..37eab08 100644
---- a/src/view-backend-private.h
-+++ b/src/view-backend-private.h
-@@ -79,10 +79,12 @@ private:
- static gboolean s_socketCallback(GSocket*, GIOCondition, gpointer);
-
- uint32_t m_bridgeId { 0 };
-+ struct Client {
-+ struct wl_client* object { nullptr };
-+ struct wl_listener destroyListener;
-
-- static void clientDestroyNotify(struct wl_listener*, void*);
-- struct wl_listener m_clientDestroy { {}, clientDestroyNotify };
-- struct wl_client* m_client { nullptr };
-+ static void destroyNotify(struct wl_listener*, void*);
-+ } m_client;
-
- ClientBundle* m_clientBundle;
- struct wpe_view_backend* m_backend;
---
-2.31.1
-
diff --git a/0008-Revert-view-backend-private-Move-wl_client_destroy-t.patch b/0008-Revert-view-backend-private-Move-wl_client_destroy-t.patch
deleted file mode 100644
index 0e457fb..0000000
--- a/0008-Revert-view-backend-private-Move-wl_client_destroy-t.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 00a6f6d61cb20af45714360bf458348aeaf08751 Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Sat, 10 Apr 2021 18:27:55 +0300
-Subject: [PATCH 08/13] Revert "view-backend-private: Move wl_client_destroy to
- unregisterSurface()"
-
-This reverts commit f54135e65a6894bdf509153d2f6e96a627352306.
----
- src/view-backend-private.cpp | 2 --
- src/ws.cpp | 1 +
- 2 files changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/src/view-backend-private.cpp b/src/view-backend-private.cpp
-index 4920037..e1554bb 100644
---- a/src/view-backend-private.cpp
-+++ b/src/view-backend-private.cpp
-@@ -120,8 +120,6 @@ void ViewBackend::unregisterSurface(uint32_t bridgeId)
- if (!bridgeId || m_bridgeId != bridgeId)
- return;
-
-- g_clear_pointer(&m_client.object, wl_client_destroy);
--
- WS::Instance::singleton().unregisterViewBackend(m_bridgeId);
- m_bridgeId = 0;
- }
-diff --git a/src/ws.cpp b/src/ws.cpp
-index 87faaf3..80cb39b 100644
---- a/src/ws.cpp
-+++ b/src/ws.cpp
-@@ -534,6 +534,7 @@ void Instance::unregisterViewBackend(uint32_t bridgeId)
- auto it = m_viewBackendMap.find(bridgeId);
- if (it != m_viewBackendMap.end()) {
- it->second->apiClient = nullptr;
-+ wl_client_destroy(wl_resource_get_client(it->second->resource));
- m_viewBackendMap.erase(it);
- }
- }
---
-2.31.1
-
diff --git a/0009-Revert-ws-Call-wl_client_destroy-for-the-created-wl_.patch b/0009-Revert-ws-Call-wl_client_destroy-for-the-created-wl_.patch
deleted file mode 100644
index 53d9982..0000000
--- a/0009-Revert-ws-Call-wl_client_destroy-for-the-created-wl_.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 542587bae6b894bdd1a5cfd38223f8054d166fc3 Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Sat, 10 Apr 2021 18:28:43 +0300
-Subject: [PATCH 09/13] Revert "ws: Call wl_client_destroy for the created
- wl_client in Instance::unregisterViewBackend()"
-
-This reverts commit 9a0e6cb62bfae44ef3496d950899ecb34ddd24a5.
----
- src/ws.cpp | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/src/ws.cpp b/src/ws.cpp
-index 80cb39b..87faaf3 100644
---- a/src/ws.cpp
-+++ b/src/ws.cpp
-@@ -534,7 +534,6 @@ void Instance::unregisterViewBackend(uint32_t bridgeId)
- auto it = m_viewBackendMap.find(bridgeId);
- if (it != m_viewBackendMap.end()) {
- it->second->apiClient = nullptr;
-- wl_client_destroy(wl_resource_get_client(it->second->resource));
- m_viewBackendMap.erase(it);
- }
- }
---
-2.31.1
-
diff --git a/0010-Revert-Cleanups.patch b/0010-Revert-Cleanups.patch
deleted file mode 100644
index 4662e52..0000000
--- a/0010-Revert-Cleanups.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From 18244c702bba27d32a022bd8a2ff9269fcb18cc5 Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Sat, 10 Apr 2021 18:29:05 +0300
-Subject: [PATCH 10/13] Revert "Cleanups."
-
-This reverts commit 9e7dfbe7cbca8bc59c81d1e6421a527a87796880.
----
- src/view-backend-private.cpp | 31 ++++++++++++++++---------------
- src/view-backend-private.h | 12 ++++++------
- 2 files changed, 22 insertions(+), 21 deletions(-)
-
-diff --git a/src/view-backend-private.cpp b/src/view-backend-private.cpp
-index e1554bb..6ba3fcb 100644
---- a/src/view-backend-private.cpp
-+++ b/src/view-backend-private.cpp
-@@ -95,24 +95,33 @@ void ViewBackend::dispatchFrameCallbacks()
- if (G_LIKELY(m_bridgeId))
- WS::Instance::singleton().dispatchFrameCallbacks(m_bridgeId);
-
-- if (m_client.object)
-- wl_client_flush(m_client.object);
-+ if (m_client)
-+ wl_client_flush(m_client);
- wpe_view_backend_dispatch_frame_displayed(m_backend);
- }
-
- void ViewBackend::releaseBuffer(struct wl_resource* buffer_resource)
- {
- wl_buffer_send_release(buffer_resource);
-- if (m_client.object)
-- wl_client_flush(m_client.object);
-+ if (m_client)
-+ wl_client_flush(m_client);
- }
-
- void ViewBackend::registerSurface(uint32_t bridgeId)
- {
- m_bridgeId = bridgeId;
-- m_client.object = WS::Instance::singleton().registerViewBackend(m_bridgeId, *this);
-- m_client.destroyListener.notify = Client::destroyNotify;
-- wl_client_add_destroy_listener(m_client.object, &m_client.destroyListener);
-+ m_client = WS::Instance::singleton().registerViewBackend(m_bridgeId, *this);
-+
-+ struct wl_client_destroy_listener *listener = new wl_client_destroy_listener {this, };
-+ listener->destroyClientListener.notify = (wl_notify_func_t) [](struct wl_listener* listener, void* data)
-+ {
-+ struct wl_client_destroy_listener *container;
-+ container = wl_container_of(listener, container, destroyClientListener);
-+ container->backend->m_client = NULL;
-+ delete container; // Release the wl_client_destroy_listener instance since this is not longer needed.
-+ };
-+ wl_client_add_destroy_listener(m_client,
-+ &listener->destroyClientListener);
- }
-
- void ViewBackend::unregisterSurface(uint32_t bridgeId)
-@@ -137,11 +146,3 @@ void ViewBackend::didReceiveMessage(uint32_t messageId, uint32_t messageBody)
- assert(!"WPE fdo received an invalid IPC message");
- }
- }
--
--void ViewBackend::Client::destroyNotify(struct wl_listener* listener, void*)
--{
-- Client* client;
-- client = wl_container_of(listener, client, destroyListener);
--
-- client->object = nullptr;
--}
-diff --git a/src/view-backend-private.h b/src/view-backend-private.h
-index 37eab08..81b083c 100644
---- a/src/view-backend-private.h
-+++ b/src/view-backend-private.h
-@@ -79,12 +79,7 @@ private:
- static gboolean s_socketCallback(GSocket*, GIOCondition, gpointer);
-
- uint32_t m_bridgeId { 0 };
-- struct Client {
-- struct wl_client* object { nullptr };
-- struct wl_listener destroyListener;
--
-- static void destroyNotify(struct wl_listener*, void*);
-- } m_client;
-+ struct wl_client* m_client { nullptr };
-
- ClientBundle* m_clientBundle;
- struct wpe_view_backend* m_backend;
-@@ -93,6 +88,11 @@ private:
- int m_clientFd { -1 };
- };
-
-+struct wl_client_destroy_listener {
-+ ViewBackend* backend;
-+ struct wl_listener destroyClientListener;
-+};
-+
- struct wpe_view_backend_private {
- wpe_view_backend_private(std::unique_ptr<ClientBundle>&& clientBundle, struct wpe_view_backend* backend)
- : clientBundle(std::move(clientBundle))
---
-2.31.1
-
diff --git a/0011-Revert-view-backend-exportable-private-Move-ViewBack.patch b/0011-Revert-view-backend-exportable-private-Move-ViewBack.patch
deleted file mode 100644
index 6527853..0000000
--- a/0011-Revert-view-backend-exportable-private-Move-ViewBack.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 862764947c6a62e27371d0b31660ff41cd70b674 Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Sat, 10 Apr 2021 18:29:13 +0300
-Subject: [PATCH 11/13] Revert "view-backend-exportable-private: Move
- ViewBackend::m_destroyClientListener"
-
-This reverts commit d7577891d505a3fb037ec14e54568fe59e310941.
----
- src/view-backend-private.cpp | 14 +++++++-------
- src/view-backend-private.h | 6 +-----
- 2 files changed, 8 insertions(+), 12 deletions(-)
-
-diff --git a/src/view-backend-private.cpp b/src/view-backend-private.cpp
-index 6ba3fcb..af5472f 100644
---- a/src/view-backend-private.cpp
-+++ b/src/view-backend-private.cpp
-@@ -112,16 +112,16 @@ void ViewBackend::registerSurface(uint32_t bridgeId)
- m_bridgeId = bridgeId;
- m_client = WS::Instance::singleton().registerViewBackend(m_bridgeId, *this);
-
-- struct wl_client_destroy_listener *listener = new wl_client_destroy_listener {this, };
-- listener->destroyClientListener.notify = (wl_notify_func_t) [](struct wl_listener* listener, void* data)
-+ this->m_destroyClientListener.notify = (wl_notify_func_t) [](struct wl_listener* listener, void* data)
- {
-- struct wl_client_destroy_listener *container;
-- container = wl_container_of(listener, container, destroyClientListener);
-- container->backend->m_client = NULL;
-- delete container; // Release the wl_client_destroy_listener instance since this is not longer needed.
-+ ViewBackend *viewBackend = wl_container_of(listener, viewBackend, m_destroyClientListener);
-+
-+ struct wl_client* client = (struct wl_client*) data;
-+ g_debug("ViewBackend <%p>: wl_client <%p> destroy notification for fd %d", viewBackend, data, wl_client_get_fd(client));
-+ viewBackend->m_client = NULL;
- };
- wl_client_add_destroy_listener(m_client,
-- &listener->destroyClientListener);
-+ &this->m_destroyClientListener);
- }
-
- void ViewBackend::unregisterSurface(uint32_t bridgeId)
-diff --git a/src/view-backend-private.h b/src/view-backend-private.h
-index 81b083c..599382b 100644
---- a/src/view-backend-private.h
-+++ b/src/view-backend-private.h
-@@ -86,11 +86,7 @@ private:
-
- std::unique_ptr<FdoIPC::Connection> m_socket;
- int m_clientFd { -1 };
--};
--
--struct wl_client_destroy_listener {
-- ViewBackend* backend;
-- struct wl_listener destroyClientListener;
-+ struct wl_listener m_destroyClientListener;
- };
-
- struct wpe_view_backend_private {
---
-2.31.1
-
diff --git a/0012-Revert-view-backend-exportable-private-Add-wl_client.patch b/0012-Revert-view-backend-exportable-private-Add-wl_client.patch
deleted file mode 100644
index e3b90dd..0000000
--- a/0012-Revert-view-backend-exportable-private-Add-wl_client.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 229b2601804049d94f09006e8c4a542c78158ab9 Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Sat, 10 Apr 2021 18:29:24 +0300
-Subject: [PATCH 12/13] Revert "view-backend-exportable-private: Add
- wl_client_add_destroy_listener in the ViewBackend"
-
-This reverts commit d688cd2558807c1ed15d67e5b0ecfad52a2bf90b.
----
- src/view-backend-private.cpp | 17 ++---------------
- src/view-backend-private.h | 1 -
- 2 files changed, 2 insertions(+), 16 deletions(-)
-
-diff --git a/src/view-backend-private.cpp b/src/view-backend-private.cpp
-index af5472f..b78831d 100644
---- a/src/view-backend-private.cpp
-+++ b/src/view-backend-private.cpp
-@@ -95,33 +95,20 @@ void ViewBackend::dispatchFrameCallbacks()
- if (G_LIKELY(m_bridgeId))
- WS::Instance::singleton().dispatchFrameCallbacks(m_bridgeId);
-
-- if (m_client)
-- wl_client_flush(m_client);
-+ wl_client_flush(m_client);
- wpe_view_backend_dispatch_frame_displayed(m_backend);
- }
-
- void ViewBackend::releaseBuffer(struct wl_resource* buffer_resource)
- {
- wl_buffer_send_release(buffer_resource);
-- if (m_client)
-- wl_client_flush(m_client);
-+ wl_client_flush(m_client);
- }
-
- void ViewBackend::registerSurface(uint32_t bridgeId)
- {
- m_bridgeId = bridgeId;
- m_client = WS::Instance::singleton().registerViewBackend(m_bridgeId, *this);
--
-- this->m_destroyClientListener.notify = (wl_notify_func_t) [](struct wl_listener* listener, void* data)
-- {
-- ViewBackend *viewBackend = wl_container_of(listener, viewBackend, m_destroyClientListener);
--
-- struct wl_client* client = (struct wl_client*) data;
-- g_debug("ViewBackend <%p>: wl_client <%p> destroy notification for fd %d", viewBackend, data, wl_client_get_fd(client));
-- viewBackend->m_client = NULL;
-- };
-- wl_client_add_destroy_listener(m_client,
-- &this->m_destroyClientListener);
- }
-
- void ViewBackend::unregisterSurface(uint32_t bridgeId)
-diff --git a/src/view-backend-private.h b/src/view-backend-private.h
-index 599382b..15e98e6 100644
---- a/src/view-backend-private.h
-+++ b/src/view-backend-private.h
-@@ -86,7 +86,6 @@ private:
-
- std::unique_ptr<FdoIPC::Connection> m_socket;
- int m_clientFd { -1 };
-- struct wl_listener m_destroyClientListener;
- };
-
- struct wpe_view_backend_private {
---
-2.31.1
-
diff --git a/0013-ws-Remove-wl_client-pointer-that-can-end-up-dangling.patch b/0013-ws-Remove-wl_client-pointer-that-can-end-up-dangling.patch
deleted file mode 100644
index ce09b36..0000000
--- a/0013-ws-Remove-wl_client-pointer-that-can-end-up-dangling.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From 328397f4f4d0e6a3608f6fd8c3ec0abdd5763135 Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Wed, 14 Apr 2021 15:55:59 +0300
-Subject: [PATCH 13/13] ws: Remove wl_client pointer that can end up dangling
-
-Instead of trying to keep track of the destruction of the wl_client
-references from ViewBackend::m_client, completely remove the member
-variable and instead:
-
-- In ViewBackend::releaseBuffer() use wl_resource_get_client() to obtain
- the wl_client from the buffer resource. Given that the buffer resource
- has just been used, it is guaranteed that the wl_client it refers to
- should be still valid.
-
-- In ViewBackend::dispatchFrameCallbacks() remove the flush call, and
- instead do it in WS::Surface::dispatchFrameCallbacks(), and pick the
- wl_client from the callback resource objects, if any callback was
- dispatched at all. Again, if any callback was dispatched their
- associated wl_client should be still valid. Skipping the flush if
- no callbacks are dispatched is fine because in that case there would
- not be any messages pending be sent over the wire anyway to trigger
- dispatching the callbacks in the client side.
----
- src/view-backend-private.cpp | 5 ++---
- src/view-backend-private.h | 1 -
- src/ws.cpp | 3 +--
- src/ws.h | 9 ++++++++-
- 4 files changed, 11 insertions(+), 7 deletions(-)
-
-diff --git a/src/view-backend-private.cpp b/src/view-backend-private.cpp
-index b78831d..7e3a738 100644
---- a/src/view-backend-private.cpp
-+++ b/src/view-backend-private.cpp
-@@ -95,20 +95,19 @@ void ViewBackend::dispatchFrameCallbacks()
- if (G_LIKELY(m_bridgeId))
- WS::Instance::singleton().dispatchFrameCallbacks(m_bridgeId);
-
-- wl_client_flush(m_client);
- wpe_view_backend_dispatch_frame_displayed(m_backend);
- }
-
- void ViewBackend::releaseBuffer(struct wl_resource* buffer_resource)
- {
- wl_buffer_send_release(buffer_resource);
-- wl_client_flush(m_client);
-+ wl_client_flush(wl_resource_get_client(buffer_resource));
- }
-
- void ViewBackend::registerSurface(uint32_t bridgeId)
- {
- m_bridgeId = bridgeId;
-- m_client = WS::Instance::singleton().registerViewBackend(m_bridgeId, *this);
-+ WS::Instance::singleton().registerViewBackend(m_bridgeId, *this);
- }
-
- void ViewBackend::unregisterSurface(uint32_t bridgeId)
-diff --git a/src/view-backend-private.h b/src/view-backend-private.h
-index 15e98e6..363b787 100644
---- a/src/view-backend-private.h
-+++ b/src/view-backend-private.h
-@@ -79,7 +79,6 @@ private:
- static gboolean s_socketCallback(GSocket*, GIOCondition, gpointer);
-
- uint32_t m_bridgeId { 0 };
-- struct wl_client* m_client { nullptr };
-
- ClientBundle* m_clientBundle;
- struct wpe_view_backend* m_backend;
-diff --git a/src/ws.cpp b/src/ws.cpp
-index 87faaf3..622bbf3 100644
---- a/src/ws.cpp
-+++ b/src/ws.cpp
-@@ -519,14 +519,13 @@ void Instance::releaseAudioPacketExport(struct wpe_audio_packet_export* packet_e
- wpe_audio_packet_export_send_release(packet_export->exportResource);
- }
-
--struct wl_client* Instance::registerViewBackend(uint32_t bridgeId, APIClient& apiClient)
-+void Instance::registerViewBackend(uint32_t bridgeId, APIClient& apiClient)
- {
- auto it = m_viewBackendMap.find(bridgeId);
- if (it == m_viewBackendMap.end())
- g_error("Instance::registerViewBackend(): " "Cannot find surface with bridgeId %" PRIu32 " in view backend map.", bridgeId);
-
- it->second->apiClient = &apiClient;
-- return wl_resource_get_client(it->second->resource);
- }
-
- void Instance::unregisterViewBackend(uint32_t bridgeId)
-diff --git a/src/ws.h b/src/ws.h
-index 30baf8e..1bf528e 100644
---- a/src/ws.h
-+++ b/src/ws.h
-@@ -88,10 +88,17 @@ struct Surface {
- {
- struct wl_resource* resource;
- struct wl_resource* tmp;
-+ struct wl_client* client { nullptr };
-+
- wl_resource_for_each_safe(resource, tmp, &m_currentFrameCallbacks) {
-+ g_assert(!client || client == wl_resource_get_client(resource));
-+ client = wl_resource_get_client(resource);
- wl_callback_send_done(resource, 0);
- wl_resource_destroy(resource);
- }
-+
-+ if (client)
-+ wl_client_flush(client);
- }
-
- private:
-@@ -129,7 +136,7 @@ public:
- int createClient();
-
- void registerSurface(uint32_t, Surface*);
-- struct wl_client* registerViewBackend(uint32_t, APIClient&);
-+ void registerViewBackend(uint32_t, APIClient&);
- void unregisterViewBackend(uint32_t);
- void dispatchFrameCallbacks(uint32_t);
-
---
-2.31.1
-
diff --git a/sources b/sources
index 918a7a8..5f4a3f5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (wpebackend-fdo-1.9.90.tar.xz) = 4c3c883fdc4a4245d9dbfc7f1552139f3da9bd82f5b09f8ba1c992e88356575b27fbbd81c36f7f6e1775510535cefb7fe5684c55d656365f827be0f8221e9996
+SHA512 (wpebackend-fdo-1.9.91.tar.xz) = c8c155bd263b5cb4cefd17d6e487b4c7cba732868b07161fc3f3bd13780d82b93894904cd6262e1c32555096aa16108007530743311006a4641b365993cdb682
diff --git a/wpebackend-fdo.spec b/wpebackend-fdo.spec
index 87df1e8..7685b89 100644
--- a/wpebackend-fdo.spec
+++ b/wpebackend-fdo.spec
@@ -1,28 +1,14 @@
%undefine __cmake_in_source_build
Name: wpebackend-fdo
-Version: 1.9.90
-Release: 2%{?dist}
+Version: 1.9.91
+Release: 1%{?dist}
Summary: A WPE backend designed for Linux desktop systems
License: BSD
URL: https://github.com/Igalia/%{name}
Source0: https://github.com/Igalia/%{name}/archive/%{version}/%{name}-%{version}.t...
-# https://github.com/Igalia/WPEBackend-fdo/issues/145
-Patch0: 0001-Add-some-checks-to-ensure-we-properly-bind-server-gl.patch
-Patch1: 0002-ws-Remove-unneeded-Surface-id-member.patch
-Patch2: 0003-ws-Rename-surfaceId-to-bridgeId-where-appropriate.patch
-Patch3: 0004-ws-Accumulate-surface-frame-callbacks-until-commit.patch
-Patch4: 0006-meson-Make-scripts-version.py-work-with-older-Python.patch
-Patch5: 0007-Revert-view-backend-Properly-unregister-surfaces.patch
-Patch6: 0008-Revert-view-backend-private-Move-wl_client_destroy-t.patch
-Patch7: 0009-Revert-ws-Call-wl_client_destroy-for-the-created-wl_.patch
-Patch8: 0010-Revert-Cleanups.patch
-Patch9: 0011-Revert-view-backend-exportable-private-Move-ViewBack.patch
-Patch10: 0012-Revert-view-backend-exportable-private-Add-wl_client.patch
-Patch11: 0013-ws-Remove-wl_client-pointer-that-can-end-up-dangling.patch
-
BuildRequires: gcc-c++
BuildRequires: meson
BuildRequires: pkgconfig(egl)
@@ -67,6 +53,9 @@ files for developing applications that use %{name}.
%{_libdir}/pkgconfig/wpebackend-fdo-1.0.pc
%changelog
+* Fri Apr 30 2021 Michael Catanzaro <mcatanzaro(a)redhat.com> - 1.9.91-1
+- Update to 1.9.91
+
* Sat Apr 17 2021 Michael Catanzaro <mcatanzaro(a)redhat.com> - 1.9.90-2
- Stop crashing after process swap
https://src.fedoraproject.org/rpms/wpebackend-fdo/c/5627979ee00d33d9287c7...
1Â year, 11Â months
catanzaro pushed to wpebackend-fdo (rawhide). "Update to 1.9.91"
by notificationsï¼ fedoraproject.org
Notification time stamped 2021-04-30 19:33:01 UTC
From aa8aa9b8ee147ed93a374bc4a4701d2485eca4db Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro(a)gnome.org>
Date: Apr 30 2021 19:32:56 +0000
Subject: Update to 1.9.91
---
diff --git a/.gitignore b/.gitignore
index e279ebd..c944e8a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@
/wpebackend-fdo-1.8.0.tar.xz
/wpebackend-fdo-1.9.1.tar.xz
/wpebackend-fdo-1.9.90.tar.xz
+/wpebackend-fdo-1.9.91.tar.xz
diff --git a/0001-Add-some-checks-to-ensure-we-properly-bind-server-gl.patch b/0001-Add-some-checks-to-ensure-we-properly-bind-server-gl.patch
deleted file mode 100644
index 1678328..0000000
--- a/0001-Add-some-checks-to-ensure-we-properly-bind-server-gl.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 951ce45d4c229a4f6abea39acd4f7dc759d9ef10 Mon Sep 17 00:00:00 2001
-From: Michael Catanzaro <mcatanzaro(a)gnome.org>
-Date: Fri, 9 Apr 2021 13:10:02 -0500
-Subject: [PATCH 01/13] Add some checks to ensure we properly bind server
- globals
-
-If we fail to bind any global objects, we are going to crash. Let's do
-that as nicely as possible using g_error(), rather than dereferencing
-null pointers later on.
-
-Suggested by #145
-
-(cherry picked from commit a4eb79d12fc851ea7cef616afa0d77668e83ea61)
----
- src/extensions/audio.cpp | 3 +++
- src/extensions/video-plane-display-dmabuf.cpp | 3 +++
- src/ws-client.cpp | 8 ++++++++
- 3 files changed, 14 insertions(+)
-
-diff --git a/src/extensions/audio.cpp b/src/extensions/audio.cpp
-index b3043ac..5d2dd91 100644
---- a/src/extensions/audio.cpp
-+++ b/src/extensions/audio.cpp
-@@ -159,6 +159,9 @@ public:
- wl_display_roundtrip_queue(display, eventQueue);
- wl_registry_destroy(registry);
-
-+ if (!m_wl.audio)
-+ g_error("Failed to bind wpe_audio");
-+
- wl_event_queue_destroy(eventQueue);
- }
-
-diff --git a/src/extensions/video-plane-display-dmabuf.cpp b/src/extensions/video-plane-display-dmabuf.cpp
-index 953cb4c..96fabcf 100644
---- a/src/extensions/video-plane-display-dmabuf.cpp
-+++ b/src/extensions/video-plane-display-dmabuf.cpp
-@@ -159,6 +159,9 @@ public:
- wl_display_roundtrip_queue(display, eventQueue);
- wl_registry_destroy(registry);
-
-+ if (!m_wl.videoPlaneDisplayDmaBuf)
-+ g_error("Failed to bind wpe_video_plane_display_dmabuf");
-+
- wl_event_queue_destroy(eventQueue);
- }
-
-diff --git a/src/ws-client.cpp b/src/ws-client.cpp
-index 6dc98ca..4ffa090 100644
---- a/src/ws-client.cpp
-+++ b/src/ws-client.cpp
-@@ -126,6 +126,9 @@ BaseBackend::BaseBackend(int hostFD)
- wl_display_roundtrip(m_wl.display);
- wl_registry_destroy(registry);
-
-+ if (!m_wl.wpeBridge)
-+ g_error("Failed to bind wpe_bridge");
-+
- wpe_bridge_add_listener(m_wl.wpeBridge, &s_bridgeListener, this);
- wpe_bridge_initialize(m_wl.wpeBridge);
- wl_display_roundtrip(m_wl.display);
-@@ -204,6 +207,11 @@ void BaseTarget::initialize(BaseBackend& backend)
- wl_display_roundtrip_queue(display, m_wl.eventQueue);
- wl_registry_destroy(registry);
-
-+ if (!m_wl.compositor)
-+ g_error("Failed to bind wl_compositor");
-+ if (!m_wl.wpeBridge)
-+ g_error("Failed to bind wpe_bridge");
-+
- m_wl.surface = wl_compositor_create_surface(m_wl.compositor);
- wl_proxy_set_queue(reinterpret_cast<struct wl_proxy*>(m_wl.surface), m_wl.eventQueue);
-
---
-2.31.1
-
diff --git a/0002-ws-Remove-unneeded-Surface-id-member.patch b/0002-ws-Remove-unneeded-Surface-id-member.patch
deleted file mode 100644
index 4c43b87..0000000
--- a/0002-ws-Remove-unneeded-Surface-id-member.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 6963a05959d8be52d4b8ee0cafc49da72a04a6dd Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Tue, 13 Apr 2021 00:30:08 +0300
-Subject: [PATCH 02/13] ws: Remove unneeded Surface::id member
-
-The Wayland resource identifier is not used at the moment, and moreover
-if ever needed wl_resource_get_id(surface->bufferResource) can be used
-to retrieve it.
-
-(cherry picked from commit 55d05be5529635b7797f34b3e9871612909859fc)
----
- src/ws.cpp | 6 ++----
- src/ws.h | 9 ++++++---
- 2 files changed, 8 insertions(+), 7 deletions(-)
-
-diff --git a/src/ws.cpp b/src/ws.cpp
-index 5602595..c23e53c 100644
---- a/src/ws.cpp
-+++ b/src/ws.cpp
-@@ -144,9 +144,7 @@ static const struct wl_compositor_interface s_compositorInterface = {
- return;
- }
-
-- auto* surface = new Surface;
-- surface->client = client;
-- surface->id = id;
-+ auto* surface = new Surface {surfaceResource};
- wl_resource_set_implementation(surfaceResource, &s_surfaceInterface, surface,
- [](struct wl_resource* resource)
- {
-@@ -524,7 +522,7 @@ struct wl_client* Instance::registerViewBackend(uint32_t surfaceId, APIClient& a
- g_error("Instance::registerViewBackend(): " "Cannot find surface %" PRIu32 " in view backend map.", surfaceId);
-
- it->second->apiClient = &apiClient;
-- return it->second->client;
-+ return wl_resource_get_client(it->second->resource);
- }
-
- void Instance::unregisterViewBackend(uint32_t surfaceId)
-diff --git a/src/ws.h b/src/ws.h
-index d4376c4..683b679 100644
---- a/src/ws.h
-+++ b/src/ws.h
-@@ -48,10 +48,13 @@ struct APIClient {
- virtual void exportEGLStreamProducer(struct wl_resource*) = 0;
- };
-
--struct Surface;
- struct Surface {
-- uint32_t id { 0 };
-- struct wl_client* client { nullptr };
-+ explicit Surface(struct wl_resource* surfaceResource):
-+ resource {surfaceResource}
-+ {
-+ }
-+
-+ struct wl_resource* resource;
-
- APIClient* apiClient { nullptr };
-
---
-2.31.1
-
diff --git a/0003-ws-Rename-surfaceId-to-bridgeId-where-appropriate.patch b/0003-ws-Rename-surfaceId-to-bridgeId-where-appropriate.patch
deleted file mode 100644
index 1fa9ca3..0000000
--- a/0003-ws-Rename-surfaceId-to-bridgeId-where-appropriate.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From 2722e7369ae746cc71604bcd13e1f4c6dd5816c3 Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Tue, 13 Apr 2021 01:06:41 +0300
-Subject: [PATCH 03/13] ws: Rename surfaceId to bridgeId where appropriate
-
-The fact is that WS::Instance::m_viewBackendMap associated wpe_bridge
-identifiers with a Surface, therefore it is clearer when reading the
-code to name variables accordingly.
-
-(cherry picked from commit 2d58520c94cd1c06d940621acaf409480ef908e8)
----
- src/view-backend-private.cpp | 23 +++++++++++------------
- src/view-backend-private.h | 2 +-
- src/ws.cpp | 10 +++++-----
- src/ws.h | 1 +
- 4 files changed, 18 insertions(+), 18 deletions(-)
-
-diff --git a/src/view-backend-private.cpp b/src/view-backend-private.cpp
-index 78f0e2f..367e6c3 100644
---- a/src/view-backend-private.cpp
-+++ b/src/view-backend-private.cpp
-@@ -41,7 +41,7 @@ ViewBackend::ViewBackend(ClientBundle* clientBundle, struct wpe_view_backend* ba
-
- ViewBackend::~ViewBackend()
- {
-- unregisterSurface(m_surfaceId);
-+ unregisterSurface(m_bridgeId);
- if (m_clientFd != -1)
- close(m_clientFd);
- }
-@@ -131,29 +131,28 @@ void ViewBackend::clientDestroyNotify(struct wl_listener* listener, void*)
- ViewBackend* self = wl_container_of(listener, self, m_clientDestroy);
-
- self->clearFrameCallbacks();
-- WS::Instance::singleton().unregisterViewBackend(self->m_surfaceId);
-+ WS::Instance::singleton().unregisterViewBackend(self->m_bridgeId);
- self->m_client = nullptr;
-- self->m_surfaceId = 0;
-+ self->m_bridgeId = 0;
-
- wl_list_remove(&self->m_clientDestroy.link);
- }
-
--void ViewBackend::registerSurface(uint32_t surfaceId)
-+void ViewBackend::registerSurface(uint32_t bridgeId)
- {
--
-- if (m_surfaceId == surfaceId)
-+ if (m_bridgeId == bridgeId)
- return;
-
-- unregisterSurface(m_surfaceId);
-+ unregisterSurface(m_bridgeId);
-
-- m_surfaceId = surfaceId;
-- m_client = WS::Instance::singleton().registerViewBackend(m_surfaceId, *this);
-+ m_bridgeId = bridgeId;
-+ m_client = WS::Instance::singleton().registerViewBackend(m_bridgeId, *this);
- wl_client_add_destroy_listener(m_client, &m_clientDestroy);
- }
-
--void ViewBackend::unregisterSurface(uint32_t surfaceId)
-+void ViewBackend::unregisterSurface(uint32_t bridgeId)
- {
-- if (!surfaceId || m_surfaceId != surfaceId)
-+ if (!bridgeId || m_bridgeId != bridgeId)
- return;
-
- // If the surfaceId is valid, we cannot have an invalid wl_client.
-@@ -165,7 +164,7 @@ void ViewBackend::unregisterSurface(uint32_t surfaceId)
-
- // After destroying the client, none of these can be valid.
- g_assert(m_client == nullptr);
-- g_assert(m_surfaceId == 0);
-+ g_assert(m_bridgeId == 0);
- }
-
- void ViewBackend::didReceiveMessage(uint32_t messageId, uint32_t messageBody)
-diff --git a/src/view-backend-private.h b/src/view-backend-private.h
-index 918ec0e..9500262 100644
---- a/src/view-backend-private.h
-+++ b/src/view-backend-private.h
-@@ -90,7 +90,7 @@ private:
-
- static gboolean s_socketCallback(GSocket*, GIOCondition, gpointer);
-
-- uint32_t m_surfaceId { 0 };
-+ uint32_t m_bridgeId { 0 };
-
- static void clientDestroyNotify(struct wl_listener*, void*);
- struct wl_listener m_clientDestroy { {}, clientDestroyNotify };
-diff --git a/src/ws.cpp b/src/ws.cpp
-index c23e53c..a044b2e 100644
---- a/src/ws.cpp
-+++ b/src/ws.cpp
-@@ -515,19 +515,19 @@ void Instance::releaseAudioPacketExport(struct wpe_audio_packet_export* packet_e
- wpe_audio_packet_export_send_release(packet_export->exportResource);
- }
-
--struct wl_client* Instance::registerViewBackend(uint32_t surfaceId, APIClient& apiClient)
-+struct wl_client* Instance::registerViewBackend(uint32_t bridgeId, APIClient& apiClient)
- {
-- auto it = m_viewBackendMap.find(surfaceId);
-+ auto it = m_viewBackendMap.find(bridgeId);
- if (it == m_viewBackendMap.end())
-- g_error("Instance::registerViewBackend(): " "Cannot find surface %" PRIu32 " in view backend map.", surfaceId);
-+ g_error("Instance::registerViewBackend(): " "Cannot find surface with bridgeId %" PRIu32 " in view backend map.", bridgeId);
-
- it->second->apiClient = &apiClient;
- return wl_resource_get_client(it->second->resource);
- }
-
--void Instance::unregisterViewBackend(uint32_t surfaceId)
-+void Instance::unregisterViewBackend(uint32_t bridgeId)
- {
-- auto it = m_viewBackendMap.find(surfaceId);
-+ auto it = m_viewBackendMap.find(bridgeId);
- if (it != m_viewBackendMap.end()) {
- it->second->apiClient = nullptr;
- m_viewBackendMap.erase(it);
-diff --git a/src/ws.h b/src/ws.h
-index 683b679..aa0c083 100644
---- a/src/ws.h
-+++ b/src/ws.h
-@@ -128,6 +128,7 @@ private:
- struct wl_global* m_wpeBridge { nullptr };
- GSource* m_source { nullptr };
-
-+ // (bridgeId -> Surface)
- std::unordered_map<uint32_t, Surface*> m_viewBackendMap;
-
- struct {
---
-2.31.1
-
diff --git a/0004-ws-Accumulate-surface-frame-callbacks-until-commit.patch b/0004-ws-Accumulate-surface-frame-callbacks-until-commit.patch
deleted file mode 100644
index efe34bf..0000000
--- a/0004-ws-Accumulate-surface-frame-callbacks-until-commit.patch
+++ /dev/null
@@ -1,262 +0,0 @@
-From 98ad602e5f5d51162ec715a023b87d06a71d627b Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Thu, 8 Apr 2021 00:57:49 +0300
-Subject: [PATCH 04/13] ws: Accumulate surface frame callbacks until commit
-
-Move code around to accumulate surface frame callback additions until
-changes are comitted to the surface, as intended according to the base
-Wayland protocol specification.
-
-As a bonus, remove the auxiliar ViewBackend::FrameCallbackResource
-by passing a destruction callback to wl_resource_set_implementation()
-and using the internal wl_resource list link.
-
-(cherry picked from commit 3ab4a3c9770d333ebbc65ab42a604836c6da57ec)
----
- src/view-backend-private.cpp | 45 ++----------------------------------
- src/view-backend-private.h | 14 -----------
- src/ws.cpp | 19 +++++++++++++--
- src/ws.h | 39 ++++++++++++++++++++++++++++++-
- 4 files changed, 57 insertions(+), 60 deletions(-)
-
-diff --git a/src/view-backend-private.cpp b/src/view-backend-private.cpp
-index 367e6c3..f04a57e 100644
---- a/src/view-backend-private.cpp
-+++ b/src/view-backend-private.cpp
-@@ -35,7 +35,6 @@ ViewBackend::ViewBackend(ClientBundle* clientBundle, struct wpe_view_backend* ba
- {
- m_clientBundle->viewBackend = this;
-
-- wl_list_init(&m_frameCallbacks);
- wl_list_init(&m_clientDestroy.link);
- }
-
-@@ -72,15 +71,6 @@ int ViewBackend::clientFd()
- return dup(m_clientFd);
- }
-
--void ViewBackend::frameCallback(struct wl_resource* callback)
--{
-- auto* resource = new FrameCallbackResource;
-- resource->resource = callback;
-- resource->destroyListener.notify = FrameCallbackResource::destroyNotify;
-- wl_resource_add_destroy_listener(callback, &resource->destroyListener);
-- wl_list_insert(&m_frameCallbacks, &resource->link);
--}
--
- void ViewBackend::exportBufferResource(struct wl_resource* bufferResource)
- {
- m_clientBundle->exportBuffer(bufferResource);
-@@ -103,16 +93,8 @@ void ViewBackend::exportEGLStreamProducer(struct wl_resource* bufferResource)
-
- void ViewBackend::dispatchFrameCallbacks()
- {
-- if (G_UNLIKELY(!m_client))
-- return;
--
-- FrameCallbackResource* resource;
-- wl_list_for_each(resource, &m_frameCallbacks, link) {
-- wl_callback_send_done(resource->resource, 0);
-- }
-- clearFrameCallbacks();
--
-- wl_client_flush(m_client);
-+ if (G_LIKELY(m_bridgeId))
-+ WS::Instance::singleton().dispatchFrameCallbacks(m_bridgeId);
-
- wpe_view_backend_dispatch_frame_displayed(m_backend);
- }
-@@ -130,7 +112,6 @@ void ViewBackend::clientDestroyNotify(struct wl_listener* listener, void*)
- {
- ViewBackend* self = wl_container_of(listener, self, m_clientDestroy);
-
-- self->clearFrameCallbacks();
- WS::Instance::singleton().unregisterViewBackend(self->m_bridgeId);
- self->m_client = nullptr;
- self->m_bridgeId = 0;
-@@ -180,25 +161,3 @@ void ViewBackend::didReceiveMessage(uint32_t messageId, uint32_t messageBody)
- assert(!"WPE fdo received an invalid IPC message");
- }
- }
--
--void ViewBackend::clearFrameCallbacks()
--{
-- FrameCallbackResource* resource;
-- FrameCallbackResource* next;
-- wl_list_for_each_safe(resource, next, &m_frameCallbacks, link) {
-- wl_list_remove(&resource->link);
-- wl_list_remove(&resource->destroyListener.link);
-- wl_resource_destroy(resource->resource);
-- delete resource;
-- }
-- wl_list_init(&m_frameCallbacks);
--}
--
--void ViewBackend::FrameCallbackResource::destroyNotify(struct wl_listener* listener, void*)
--{
-- FrameCallbackResource* resource;
-- resource = wl_container_of(listener, resource, destroyListener);
--
-- wl_list_remove(&resource->link);
-- delete resource;
--}
-diff --git a/src/view-backend-private.h b/src/view-backend-private.h
-index 9500262..a598dee 100644
---- a/src/view-backend-private.h
-+++ b/src/view-backend-private.h
-@@ -63,7 +63,6 @@ public:
-
- void initialize();
- int clientFd();
-- void frameCallback(struct wl_resource* callbackResource) override;
- void exportBufferResource(struct wl_resource* bufferResource) override;
- void exportLinuxDmabuf(const struct linux_dmabuf_buffer *dmabuf_buffer) override;
- void exportShmBuffer(struct wl_resource* bufferResource, struct wl_shm_buffer* shmBuffer) override;
-@@ -72,22 +71,11 @@ public:
- void releaseBuffer(struct wl_resource* buffer_resource);
-
- private:
-- struct FrameCallbackResource {
-- struct wl_resource* resource;
--
-- struct wl_list link;
-- struct wl_listener destroyListener;
--
-- static void destroyNotify(struct wl_listener*, void*);
-- };
--
- void didReceiveMessage(uint32_t messageId, uint32_t messageBody) override;
-
- void registerSurface(uint32_t);
- void unregisterSurface(uint32_t);
-
-- void clearFrameCallbacks();
--
- static gboolean s_socketCallback(GSocket*, GIOCondition, gpointer);
-
- uint32_t m_bridgeId { 0 };
-@@ -99,8 +87,6 @@ private:
- ClientBundle* m_clientBundle;
- struct wpe_view_backend* m_backend;
-
-- struct wl_list m_frameCallbacks;
--
- std::unique_ptr<FdoIPC::Connection> m_socket;
- int m_clientFd { -1 };
- };
-diff --git a/src/ws.cpp b/src/ws.cpp
-index a044b2e..87faaf3 100644
---- a/src/ws.cpp
-+++ b/src/ws.cpp
-@@ -110,8 +110,11 @@ static const struct wl_surface_interface s_surfaceInterface = {
- return;
- }
-
-- wl_resource_set_implementation(callbackResource, nullptr, nullptr, nullptr);
-- surface.apiClient->frameCallback(callbackResource);
-+ wl_resource_set_implementation(callbackResource, nullptr, nullptr,
-+ [](struct wl_resource* resource) {
-+ wl_list_remove(wl_resource_get_link(resource));
-+ });
-+ surface.addFrameCallback(callbackResource);
- },
- // set_opaque_region
- [](struct wl_client*, struct wl_resource*, struct wl_resource*) { },
-@@ -121,6 +124,7 @@ static const struct wl_surface_interface s_surfaceInterface = {
- [](struct wl_client*, struct wl_resource* surfaceResource)
- {
- auto& surface = *static_cast<Surface*>(wl_resource_get_user_data(surfaceResource));
-+ surface.commit();
- WS::Instance::singleton().impl().surfaceCommit(surface);
- },
- // set_buffer_transform
-@@ -534,4 +538,15 @@ void Instance::unregisterViewBackend(uint32_t bridgeId)
- }
- }
-
-+void Instance::dispatchFrameCallbacks(uint32_t bridgeId)
-+{
-+ auto it = m_viewBackendMap.find(bridgeId);
-+ if (it == m_viewBackendMap.end()) {
-+ g_error("Instance::dispatchFrameCallbacks(): "
-+ "Cannot find surface with bridgeId %" PRIu32 " in view backend map.", bridgeId);
-+ }
-+
-+ it->second->dispatchFrameCallbacks();
-+}
-+
- } // namespace WS
-diff --git a/src/ws.h b/src/ws.h
-index aa0c083..30baf8e 100644
---- a/src/ws.h
-+++ b/src/ws.h
-@@ -41,7 +41,6 @@ namespace WS {
- struct APIClient {
- virtual ~APIClient() = default;
-
-- virtual void frameCallback(struct wl_resource*) = 0;
- virtual void exportBufferResource(struct wl_resource*) = 0;
- virtual void exportLinuxDmabuf(const struct linux_dmabuf_buffer *dmabuf_buffer) = 0;
- virtual void exportShmBuffer(struct wl_resource*, struct wl_shm_buffer*) = 0;
-@@ -52,6 +51,18 @@ struct Surface {
- explicit Surface(struct wl_resource* surfaceResource):
- resource {surfaceResource}
- {
-+ wl_list_init(&m_pendingFrameCallbacks);
-+ wl_list_init(&m_currentFrameCallbacks);
-+ }
-+
-+ ~Surface()
-+ {
-+ struct wl_resource* resource;
-+ struct wl_resource* tmp;
-+ wl_resource_for_each_safe(resource, tmp, &m_pendingFrameCallbacks)
-+ wl_resource_destroy(resource);
-+ wl_resource_for_each_safe(resource, tmp, &m_currentFrameCallbacks)
-+ wl_resource_destroy(resource);
- }
-
- struct wl_resource* resource;
-@@ -61,6 +72,31 @@ struct Surface {
- struct wl_resource* bufferResource { nullptr };
- const struct linux_dmabuf_buffer* dmabufBuffer { nullptr };
- struct wl_shm_buffer* shmBuffer { nullptr };
-+
-+ void commit()
-+ {
-+ wl_list_insert_list(&m_currentFrameCallbacks, &m_pendingFrameCallbacks);
-+ wl_list_init(&m_pendingFrameCallbacks);
-+ }
-+
-+ void addFrameCallback(struct wl_resource* resource)
-+ {
-+ wl_list_insert(m_pendingFrameCallbacks.prev, wl_resource_get_link(resource));
-+ }
-+
-+ void dispatchFrameCallbacks()
-+ {
-+ struct wl_resource* resource;
-+ struct wl_resource* tmp;
-+ wl_resource_for_each_safe(resource, tmp, &m_currentFrameCallbacks) {
-+ wl_callback_send_done(resource, 0);
-+ wl_resource_destroy(resource);
-+ }
-+ }
-+
-+private:
-+ struct wl_list m_pendingFrameCallbacks;
-+ struct wl_list m_currentFrameCallbacks;
- };
-
- class Instance {
-@@ -95,6 +131,7 @@ public:
- void registerSurface(uint32_t, Surface*);
- struct wl_client* registerViewBackend(uint32_t, APIClient&);
- void unregisterViewBackend(uint32_t);
-+ void dispatchFrameCallbacks(uint32_t);
-
- using VideoPlaneDisplayDmaBufCallback = std::function<void(struct wpe_video_plane_display_dmabuf_export*, uint32_t, int, int32_t, int32_t, int32_t, int32_t, uint32_t)>;
- using VideoPlaneDisplayDmaBufEndOfStreamCallback = std::function<void(uint32_t)>;
---
-2.31.1
-
diff --git a/0006-meson-Make-scripts-version.py-work-with-older-Python.patch b/0006-meson-Make-scripts-version.py-work-with-older-Python.patch
deleted file mode 100644
index be46355..0000000
--- a/0006-meson-Make-scripts-version.py-work-with-older-Python.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 89e4b1683ad51c1b066fc10c748e5d524fb37cd2 Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Wed, 14 Apr 2021 21:56:12 +0300
-Subject: [PATCH 06/13] meson: Make scripts/version.py work with older Pythons
-
-Older Python versions (3.5, 2.x) do not have a __getitem__ method
-on regex match objects, so use the .group() method instead, which is
-available in all versions.
-
-(cherry picked from commit 8c4b29f973500a9a596e27a2b3042923e4c905f7)
----
- scripts/version.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/scripts/version.py b/scripts/version.py
-index 1dbbdb3..e2af013 100644
---- a/scripts/version.py
-+++ b/scripts/version.py
-@@ -18,6 +18,6 @@ with open(version_file, "r") as f:
- for line in f.readlines():
- m = version_re.match(line)
- if m:
-- version[m[1]] = m[2]
-+ version[m.group(1)] = m.group(2)
-
- print("{}.{}.{}".format(version["MAJOR"], version["MINOR"], version["MICRO"]))
---
-2.31.1
-
diff --git a/0007-Revert-view-backend-Properly-unregister-surfaces.patch b/0007-Revert-view-backend-Properly-unregister-surfaces.patch
deleted file mode 100644
index 348fa09..0000000
--- a/0007-Revert-view-backend-Properly-unregister-surfaces.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-From 4657edaf9f798863d16d94e61a3f467ee656e908 Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Sat, 10 Apr 2021 18:27:42 +0300
-Subject: [PATCH 07/13] Revert "view backend: Properly unregister surfaces"
-
-This reverts commit 99bd04019800f84a722ae99bf1a352f225d93002.
----
- src/view-backend-private.cpp | 52 +++++++++++++-----------------------
- src/view-backend-private.h | 8 +++---
- 2 files changed, 24 insertions(+), 36 deletions(-)
-
-diff --git a/src/view-backend-private.cpp b/src/view-backend-private.cpp
-index f04a57e..4920037 100644
---- a/src/view-backend-private.cpp
-+++ b/src/view-backend-private.cpp
-@@ -34,13 +34,12 @@ ViewBackend::ViewBackend(ClientBundle* clientBundle, struct wpe_view_backend* ba
- , m_backend(backend)
- {
- m_clientBundle->viewBackend = this;
--
-- wl_list_init(&m_clientDestroy.link);
- }
-
- ViewBackend::~ViewBackend()
- {
- unregisterSurface(m_bridgeId);
-+
- if (m_clientFd != -1)
- close(m_clientFd);
- }
-@@ -96,39 +95,24 @@ void ViewBackend::dispatchFrameCallbacks()
- if (G_LIKELY(m_bridgeId))
- WS::Instance::singleton().dispatchFrameCallbacks(m_bridgeId);
-
-+ if (m_client.object)
-+ wl_client_flush(m_client.object);
- wpe_view_backend_dispatch_frame_displayed(m_backend);
- }
-
- void ViewBackend::releaseBuffer(struct wl_resource* buffer_resource)
- {
-- if (G_UNLIKELY(!m_client))
-- return;
--
- wl_buffer_send_release(buffer_resource);
-- wl_client_flush(m_client);
--}
--
--void ViewBackend::clientDestroyNotify(struct wl_listener* listener, void*)
--{
-- ViewBackend* self = wl_container_of(listener, self, m_clientDestroy);
--
-- WS::Instance::singleton().unregisterViewBackend(self->m_bridgeId);
-- self->m_client = nullptr;
-- self->m_bridgeId = 0;
--
-- wl_list_remove(&self->m_clientDestroy.link);
-+ if (m_client.object)
-+ wl_client_flush(m_client.object);
- }
-
- void ViewBackend::registerSurface(uint32_t bridgeId)
- {
-- if (m_bridgeId == bridgeId)
-- return;
--
-- unregisterSurface(m_bridgeId);
--
- m_bridgeId = bridgeId;
-- m_client = WS::Instance::singleton().registerViewBackend(m_bridgeId, *this);
-- wl_client_add_destroy_listener(m_client, &m_clientDestroy);
-+ m_client.object = WS::Instance::singleton().registerViewBackend(m_bridgeId, *this);
-+ m_client.destroyListener.notify = Client::destroyNotify;
-+ wl_client_add_destroy_listener(m_client.object, &m_client.destroyListener);
- }
-
- void ViewBackend::unregisterSurface(uint32_t bridgeId)
-@@ -136,16 +120,10 @@ void ViewBackend::unregisterSurface(uint32_t bridgeId)
- if (!bridgeId || m_bridgeId != bridgeId)
- return;
-
-- // If the surfaceId is valid, we cannot have an invalid wl_client.
-- g_assert(m_client != nullptr);
--
-- // Destroying the client triggers the m_clientDestroy callback,
-- // the rest of the teardown is done from there.
-- wl_client_destroy(m_client);
-+ g_clear_pointer(&m_client.object, wl_client_destroy);
-
-- // After destroying the client, none of these can be valid.
-- g_assert(m_client == nullptr);
-- g_assert(m_bridgeId == 0);
-+ WS::Instance::singleton().unregisterViewBackend(m_bridgeId);
-+ m_bridgeId = 0;
- }
-
- void ViewBackend::didReceiveMessage(uint32_t messageId, uint32_t messageBody)
-@@ -161,3 +139,11 @@ void ViewBackend::didReceiveMessage(uint32_t messageId, uint32_t messageBody)
- assert(!"WPE fdo received an invalid IPC message");
- }
- }
-+
-+void ViewBackend::Client::destroyNotify(struct wl_listener* listener, void*)
-+{
-+ Client* client;
-+ client = wl_container_of(listener, client, destroyListener);
-+
-+ client->object = nullptr;
-+}
-diff --git a/src/view-backend-private.h b/src/view-backend-private.h
-index a598dee..37eab08 100644
---- a/src/view-backend-private.h
-+++ b/src/view-backend-private.h
-@@ -79,10 +79,12 @@ private:
- static gboolean s_socketCallback(GSocket*, GIOCondition, gpointer);
-
- uint32_t m_bridgeId { 0 };
-+ struct Client {
-+ struct wl_client* object { nullptr };
-+ struct wl_listener destroyListener;
-
-- static void clientDestroyNotify(struct wl_listener*, void*);
-- struct wl_listener m_clientDestroy { {}, clientDestroyNotify };
-- struct wl_client* m_client { nullptr };
-+ static void destroyNotify(struct wl_listener*, void*);
-+ } m_client;
-
- ClientBundle* m_clientBundle;
- struct wpe_view_backend* m_backend;
---
-2.31.1
-
diff --git a/0008-Revert-view-backend-private-Move-wl_client_destroy-t.patch b/0008-Revert-view-backend-private-Move-wl_client_destroy-t.patch
deleted file mode 100644
index 0e457fb..0000000
--- a/0008-Revert-view-backend-private-Move-wl_client_destroy-t.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 00a6f6d61cb20af45714360bf458348aeaf08751 Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Sat, 10 Apr 2021 18:27:55 +0300
-Subject: [PATCH 08/13] Revert "view-backend-private: Move wl_client_destroy to
- unregisterSurface()"
-
-This reverts commit f54135e65a6894bdf509153d2f6e96a627352306.
----
- src/view-backend-private.cpp | 2 --
- src/ws.cpp | 1 +
- 2 files changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/src/view-backend-private.cpp b/src/view-backend-private.cpp
-index 4920037..e1554bb 100644
---- a/src/view-backend-private.cpp
-+++ b/src/view-backend-private.cpp
-@@ -120,8 +120,6 @@ void ViewBackend::unregisterSurface(uint32_t bridgeId)
- if (!bridgeId || m_bridgeId != bridgeId)
- return;
-
-- g_clear_pointer(&m_client.object, wl_client_destroy);
--
- WS::Instance::singleton().unregisterViewBackend(m_bridgeId);
- m_bridgeId = 0;
- }
-diff --git a/src/ws.cpp b/src/ws.cpp
-index 87faaf3..80cb39b 100644
---- a/src/ws.cpp
-+++ b/src/ws.cpp
-@@ -534,6 +534,7 @@ void Instance::unregisterViewBackend(uint32_t bridgeId)
- auto it = m_viewBackendMap.find(bridgeId);
- if (it != m_viewBackendMap.end()) {
- it->second->apiClient = nullptr;
-+ wl_client_destroy(wl_resource_get_client(it->second->resource));
- m_viewBackendMap.erase(it);
- }
- }
---
-2.31.1
-
diff --git a/0009-Revert-ws-Call-wl_client_destroy-for-the-created-wl_.patch b/0009-Revert-ws-Call-wl_client_destroy-for-the-created-wl_.patch
deleted file mode 100644
index 53d9982..0000000
--- a/0009-Revert-ws-Call-wl_client_destroy-for-the-created-wl_.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 542587bae6b894bdd1a5cfd38223f8054d166fc3 Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Sat, 10 Apr 2021 18:28:43 +0300
-Subject: [PATCH 09/13] Revert "ws: Call wl_client_destroy for the created
- wl_client in Instance::unregisterViewBackend()"
-
-This reverts commit 9a0e6cb62bfae44ef3496d950899ecb34ddd24a5.
----
- src/ws.cpp | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/src/ws.cpp b/src/ws.cpp
-index 80cb39b..87faaf3 100644
---- a/src/ws.cpp
-+++ b/src/ws.cpp
-@@ -534,7 +534,6 @@ void Instance::unregisterViewBackend(uint32_t bridgeId)
- auto it = m_viewBackendMap.find(bridgeId);
- if (it != m_viewBackendMap.end()) {
- it->second->apiClient = nullptr;
-- wl_client_destroy(wl_resource_get_client(it->second->resource));
- m_viewBackendMap.erase(it);
- }
- }
---
-2.31.1
-
diff --git a/0010-Revert-Cleanups.patch b/0010-Revert-Cleanups.patch
deleted file mode 100644
index 4662e52..0000000
--- a/0010-Revert-Cleanups.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From 18244c702bba27d32a022bd8a2ff9269fcb18cc5 Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Sat, 10 Apr 2021 18:29:05 +0300
-Subject: [PATCH 10/13] Revert "Cleanups."
-
-This reverts commit 9e7dfbe7cbca8bc59c81d1e6421a527a87796880.
----
- src/view-backend-private.cpp | 31 ++++++++++++++++---------------
- src/view-backend-private.h | 12 ++++++------
- 2 files changed, 22 insertions(+), 21 deletions(-)
-
-diff --git a/src/view-backend-private.cpp b/src/view-backend-private.cpp
-index e1554bb..6ba3fcb 100644
---- a/src/view-backend-private.cpp
-+++ b/src/view-backend-private.cpp
-@@ -95,24 +95,33 @@ void ViewBackend::dispatchFrameCallbacks()
- if (G_LIKELY(m_bridgeId))
- WS::Instance::singleton().dispatchFrameCallbacks(m_bridgeId);
-
-- if (m_client.object)
-- wl_client_flush(m_client.object);
-+ if (m_client)
-+ wl_client_flush(m_client);
- wpe_view_backend_dispatch_frame_displayed(m_backend);
- }
-
- void ViewBackend::releaseBuffer(struct wl_resource* buffer_resource)
- {
- wl_buffer_send_release(buffer_resource);
-- if (m_client.object)
-- wl_client_flush(m_client.object);
-+ if (m_client)
-+ wl_client_flush(m_client);
- }
-
- void ViewBackend::registerSurface(uint32_t bridgeId)
- {
- m_bridgeId = bridgeId;
-- m_client.object = WS::Instance::singleton().registerViewBackend(m_bridgeId, *this);
-- m_client.destroyListener.notify = Client::destroyNotify;
-- wl_client_add_destroy_listener(m_client.object, &m_client.destroyListener);
-+ m_client = WS::Instance::singleton().registerViewBackend(m_bridgeId, *this);
-+
-+ struct wl_client_destroy_listener *listener = new wl_client_destroy_listener {this, };
-+ listener->destroyClientListener.notify = (wl_notify_func_t) [](struct wl_listener* listener, void* data)
-+ {
-+ struct wl_client_destroy_listener *container;
-+ container = wl_container_of(listener, container, destroyClientListener);
-+ container->backend->m_client = NULL;
-+ delete container; // Release the wl_client_destroy_listener instance since this is not longer needed.
-+ };
-+ wl_client_add_destroy_listener(m_client,
-+ &listener->destroyClientListener);
- }
-
- void ViewBackend::unregisterSurface(uint32_t bridgeId)
-@@ -137,11 +146,3 @@ void ViewBackend::didReceiveMessage(uint32_t messageId, uint32_t messageBody)
- assert(!"WPE fdo received an invalid IPC message");
- }
- }
--
--void ViewBackend::Client::destroyNotify(struct wl_listener* listener, void*)
--{
-- Client* client;
-- client = wl_container_of(listener, client, destroyListener);
--
-- client->object = nullptr;
--}
-diff --git a/src/view-backend-private.h b/src/view-backend-private.h
-index 37eab08..81b083c 100644
---- a/src/view-backend-private.h
-+++ b/src/view-backend-private.h
-@@ -79,12 +79,7 @@ private:
- static gboolean s_socketCallback(GSocket*, GIOCondition, gpointer);
-
- uint32_t m_bridgeId { 0 };
-- struct Client {
-- struct wl_client* object { nullptr };
-- struct wl_listener destroyListener;
--
-- static void destroyNotify(struct wl_listener*, void*);
-- } m_client;
-+ struct wl_client* m_client { nullptr };
-
- ClientBundle* m_clientBundle;
- struct wpe_view_backend* m_backend;
-@@ -93,6 +88,11 @@ private:
- int m_clientFd { -1 };
- };
-
-+struct wl_client_destroy_listener {
-+ ViewBackend* backend;
-+ struct wl_listener destroyClientListener;
-+};
-+
- struct wpe_view_backend_private {
- wpe_view_backend_private(std::unique_ptr<ClientBundle>&& clientBundle, struct wpe_view_backend* backend)
- : clientBundle(std::move(clientBundle))
---
-2.31.1
-
diff --git a/0011-Revert-view-backend-exportable-private-Move-ViewBack.patch b/0011-Revert-view-backend-exportable-private-Move-ViewBack.patch
deleted file mode 100644
index 6527853..0000000
--- a/0011-Revert-view-backend-exportable-private-Move-ViewBack.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 862764947c6a62e27371d0b31660ff41cd70b674 Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Sat, 10 Apr 2021 18:29:13 +0300
-Subject: [PATCH 11/13] Revert "view-backend-exportable-private: Move
- ViewBackend::m_destroyClientListener"
-
-This reverts commit d7577891d505a3fb037ec14e54568fe59e310941.
----
- src/view-backend-private.cpp | 14 +++++++-------
- src/view-backend-private.h | 6 +-----
- 2 files changed, 8 insertions(+), 12 deletions(-)
-
-diff --git a/src/view-backend-private.cpp b/src/view-backend-private.cpp
-index 6ba3fcb..af5472f 100644
---- a/src/view-backend-private.cpp
-+++ b/src/view-backend-private.cpp
-@@ -112,16 +112,16 @@ void ViewBackend::registerSurface(uint32_t bridgeId)
- m_bridgeId = bridgeId;
- m_client = WS::Instance::singleton().registerViewBackend(m_bridgeId, *this);
-
-- struct wl_client_destroy_listener *listener = new wl_client_destroy_listener {this, };
-- listener->destroyClientListener.notify = (wl_notify_func_t) [](struct wl_listener* listener, void* data)
-+ this->m_destroyClientListener.notify = (wl_notify_func_t) [](struct wl_listener* listener, void* data)
- {
-- struct wl_client_destroy_listener *container;
-- container = wl_container_of(listener, container, destroyClientListener);
-- container->backend->m_client = NULL;
-- delete container; // Release the wl_client_destroy_listener instance since this is not longer needed.
-+ ViewBackend *viewBackend = wl_container_of(listener, viewBackend, m_destroyClientListener);
-+
-+ struct wl_client* client = (struct wl_client*) data;
-+ g_debug("ViewBackend <%p>: wl_client <%p> destroy notification for fd %d", viewBackend, data, wl_client_get_fd(client));
-+ viewBackend->m_client = NULL;
- };
- wl_client_add_destroy_listener(m_client,
-- &listener->destroyClientListener);
-+ &this->m_destroyClientListener);
- }
-
- void ViewBackend::unregisterSurface(uint32_t bridgeId)
-diff --git a/src/view-backend-private.h b/src/view-backend-private.h
-index 81b083c..599382b 100644
---- a/src/view-backend-private.h
-+++ b/src/view-backend-private.h
-@@ -86,11 +86,7 @@ private:
-
- std::unique_ptr<FdoIPC::Connection> m_socket;
- int m_clientFd { -1 };
--};
--
--struct wl_client_destroy_listener {
-- ViewBackend* backend;
-- struct wl_listener destroyClientListener;
-+ struct wl_listener m_destroyClientListener;
- };
-
- struct wpe_view_backend_private {
---
-2.31.1
-
diff --git a/0012-Revert-view-backend-exportable-private-Add-wl_client.patch b/0012-Revert-view-backend-exportable-private-Add-wl_client.patch
deleted file mode 100644
index e3b90dd..0000000
--- a/0012-Revert-view-backend-exportable-private-Add-wl_client.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 229b2601804049d94f09006e8c4a542c78158ab9 Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Sat, 10 Apr 2021 18:29:24 +0300
-Subject: [PATCH 12/13] Revert "view-backend-exportable-private: Add
- wl_client_add_destroy_listener in the ViewBackend"
-
-This reverts commit d688cd2558807c1ed15d67e5b0ecfad52a2bf90b.
----
- src/view-backend-private.cpp | 17 ++---------------
- src/view-backend-private.h | 1 -
- 2 files changed, 2 insertions(+), 16 deletions(-)
-
-diff --git a/src/view-backend-private.cpp b/src/view-backend-private.cpp
-index af5472f..b78831d 100644
---- a/src/view-backend-private.cpp
-+++ b/src/view-backend-private.cpp
-@@ -95,33 +95,20 @@ void ViewBackend::dispatchFrameCallbacks()
- if (G_LIKELY(m_bridgeId))
- WS::Instance::singleton().dispatchFrameCallbacks(m_bridgeId);
-
-- if (m_client)
-- wl_client_flush(m_client);
-+ wl_client_flush(m_client);
- wpe_view_backend_dispatch_frame_displayed(m_backend);
- }
-
- void ViewBackend::releaseBuffer(struct wl_resource* buffer_resource)
- {
- wl_buffer_send_release(buffer_resource);
-- if (m_client)
-- wl_client_flush(m_client);
-+ wl_client_flush(m_client);
- }
-
- void ViewBackend::registerSurface(uint32_t bridgeId)
- {
- m_bridgeId = bridgeId;
- m_client = WS::Instance::singleton().registerViewBackend(m_bridgeId, *this);
--
-- this->m_destroyClientListener.notify = (wl_notify_func_t) [](struct wl_listener* listener, void* data)
-- {
-- ViewBackend *viewBackend = wl_container_of(listener, viewBackend, m_destroyClientListener);
--
-- struct wl_client* client = (struct wl_client*) data;
-- g_debug("ViewBackend <%p>: wl_client <%p> destroy notification for fd %d", viewBackend, data, wl_client_get_fd(client));
-- viewBackend->m_client = NULL;
-- };
-- wl_client_add_destroy_listener(m_client,
-- &this->m_destroyClientListener);
- }
-
- void ViewBackend::unregisterSurface(uint32_t bridgeId)
-diff --git a/src/view-backend-private.h b/src/view-backend-private.h
-index 599382b..15e98e6 100644
---- a/src/view-backend-private.h
-+++ b/src/view-backend-private.h
-@@ -86,7 +86,6 @@ private:
-
- std::unique_ptr<FdoIPC::Connection> m_socket;
- int m_clientFd { -1 };
-- struct wl_listener m_destroyClientListener;
- };
-
- struct wpe_view_backend_private {
---
-2.31.1
-
diff --git a/0013-ws-Remove-wl_client-pointer-that-can-end-up-dangling.patch b/0013-ws-Remove-wl_client-pointer-that-can-end-up-dangling.patch
deleted file mode 100644
index ce09b36..0000000
--- a/0013-ws-Remove-wl_client-pointer-that-can-end-up-dangling.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From 328397f4f4d0e6a3608f6fd8c3ec0abdd5763135 Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez(a)igalia.com>
-Date: Wed, 14 Apr 2021 15:55:59 +0300
-Subject: [PATCH 13/13] ws: Remove wl_client pointer that can end up dangling
-
-Instead of trying to keep track of the destruction of the wl_client
-references from ViewBackend::m_client, completely remove the member
-variable and instead:
-
-- In ViewBackend::releaseBuffer() use wl_resource_get_client() to obtain
- the wl_client from the buffer resource. Given that the buffer resource
- has just been used, it is guaranteed that the wl_client it refers to
- should be still valid.
-
-- In ViewBackend::dispatchFrameCallbacks() remove the flush call, and
- instead do it in WS::Surface::dispatchFrameCallbacks(), and pick the
- wl_client from the callback resource objects, if any callback was
- dispatched at all. Again, if any callback was dispatched their
- associated wl_client should be still valid. Skipping the flush if
- no callbacks are dispatched is fine because in that case there would
- not be any messages pending be sent over the wire anyway to trigger
- dispatching the callbacks in the client side.
----
- src/view-backend-private.cpp | 5 ++---
- src/view-backend-private.h | 1 -
- src/ws.cpp | 3 +--
- src/ws.h | 9 ++++++++-
- 4 files changed, 11 insertions(+), 7 deletions(-)
-
-diff --git a/src/view-backend-private.cpp b/src/view-backend-private.cpp
-index b78831d..7e3a738 100644
---- a/src/view-backend-private.cpp
-+++ b/src/view-backend-private.cpp
-@@ -95,20 +95,19 @@ void ViewBackend::dispatchFrameCallbacks()
- if (G_LIKELY(m_bridgeId))
- WS::Instance::singleton().dispatchFrameCallbacks(m_bridgeId);
-
-- wl_client_flush(m_client);
- wpe_view_backend_dispatch_frame_displayed(m_backend);
- }
-
- void ViewBackend::releaseBuffer(struct wl_resource* buffer_resource)
- {
- wl_buffer_send_release(buffer_resource);
-- wl_client_flush(m_client);
-+ wl_client_flush(wl_resource_get_client(buffer_resource));
- }
-
- void ViewBackend::registerSurface(uint32_t bridgeId)
- {
- m_bridgeId = bridgeId;
-- m_client = WS::Instance::singleton().registerViewBackend(m_bridgeId, *this);
-+ WS::Instance::singleton().registerViewBackend(m_bridgeId, *this);
- }
-
- void ViewBackend::unregisterSurface(uint32_t bridgeId)
-diff --git a/src/view-backend-private.h b/src/view-backend-private.h
-index 15e98e6..363b787 100644
---- a/src/view-backend-private.h
-+++ b/src/view-backend-private.h
-@@ -79,7 +79,6 @@ private:
- static gboolean s_socketCallback(GSocket*, GIOCondition, gpointer);
-
- uint32_t m_bridgeId { 0 };
-- struct wl_client* m_client { nullptr };
-
- ClientBundle* m_clientBundle;
- struct wpe_view_backend* m_backend;
-diff --git a/src/ws.cpp b/src/ws.cpp
-index 87faaf3..622bbf3 100644
---- a/src/ws.cpp
-+++ b/src/ws.cpp
-@@ -519,14 +519,13 @@ void Instance::releaseAudioPacketExport(struct wpe_audio_packet_export* packet_e
- wpe_audio_packet_export_send_release(packet_export->exportResource);
- }
-
--struct wl_client* Instance::registerViewBackend(uint32_t bridgeId, APIClient& apiClient)
-+void Instance::registerViewBackend(uint32_t bridgeId, APIClient& apiClient)
- {
- auto it = m_viewBackendMap.find(bridgeId);
- if (it == m_viewBackendMap.end())
- g_error("Instance::registerViewBackend(): " "Cannot find surface with bridgeId %" PRIu32 " in view backend map.", bridgeId);
-
- it->second->apiClient = &apiClient;
-- return wl_resource_get_client(it->second->resource);
- }
-
- void Instance::unregisterViewBackend(uint32_t bridgeId)
-diff --git a/src/ws.h b/src/ws.h
-index 30baf8e..1bf528e 100644
---- a/src/ws.h
-+++ b/src/ws.h
-@@ -88,10 +88,17 @@ struct Surface {
- {
- struct wl_resource* resource;
- struct wl_resource* tmp;
-+ struct wl_client* client { nullptr };
-+
- wl_resource_for_each_safe(resource, tmp, &m_currentFrameCallbacks) {
-+ g_assert(!client || client == wl_resource_get_client(resource));
-+ client = wl_resource_get_client(resource);
- wl_callback_send_done(resource, 0);
- wl_resource_destroy(resource);
- }
-+
-+ if (client)
-+ wl_client_flush(client);
- }
-
- private:
-@@ -129,7 +136,7 @@ public:
- int createClient();
-
- void registerSurface(uint32_t, Surface*);
-- struct wl_client* registerViewBackend(uint32_t, APIClient&);
-+ void registerViewBackend(uint32_t, APIClient&);
- void unregisterViewBackend(uint32_t);
- void dispatchFrameCallbacks(uint32_t);
-
---
-2.31.1
-
diff --git a/sources b/sources
index 918a7a8..5f4a3f5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (wpebackend-fdo-1.9.90.tar.xz) = 4c3c883fdc4a4245d9dbfc7f1552139f3da9bd82f5b09f8ba1c992e88356575b27fbbd81c36f7f6e1775510535cefb7fe5684c55d656365f827be0f8221e9996
+SHA512 (wpebackend-fdo-1.9.91.tar.xz) = c8c155bd263b5cb4cefd17d6e487b4c7cba732868b07161fc3f3bd13780d82b93894904cd6262e1c32555096aa16108007530743311006a4641b365993cdb682
diff --git a/wpebackend-fdo.spec b/wpebackend-fdo.spec
index 87df1e8..7685b89 100644
--- a/wpebackend-fdo.spec
+++ b/wpebackend-fdo.spec
@@ -1,28 +1,14 @@
%undefine __cmake_in_source_build
Name: wpebackend-fdo
-Version: 1.9.90
-Release: 2%{?dist}
+Version: 1.9.91
+Release: 1%{?dist}
Summary: A WPE backend designed for Linux desktop systems
License: BSD
URL: https://github.com/Igalia/%{name}
Source0: https://github.com/Igalia/%{name}/archive/%{version}/%{name}-%{version}.t...
-# https://github.com/Igalia/WPEBackend-fdo/issues/145
-Patch0: 0001-Add-some-checks-to-ensure-we-properly-bind-server-gl.patch
-Patch1: 0002-ws-Remove-unneeded-Surface-id-member.patch
-Patch2: 0003-ws-Rename-surfaceId-to-bridgeId-where-appropriate.patch
-Patch3: 0004-ws-Accumulate-surface-frame-callbacks-until-commit.patch
-Patch4: 0006-meson-Make-scripts-version.py-work-with-older-Python.patch
-Patch5: 0007-Revert-view-backend-Properly-unregister-surfaces.patch
-Patch6: 0008-Revert-view-backend-private-Move-wl_client_destroy-t.patch
-Patch7: 0009-Revert-ws-Call-wl_client_destroy-for-the-created-wl_.patch
-Patch8: 0010-Revert-Cleanups.patch
-Patch9: 0011-Revert-view-backend-exportable-private-Move-ViewBack.patch
-Patch10: 0012-Revert-view-backend-exportable-private-Add-wl_client.patch
-Patch11: 0013-ws-Remove-wl_client-pointer-that-can-end-up-dangling.patch
-
BuildRequires: gcc-c++
BuildRequires: meson
BuildRequires: pkgconfig(egl)
@@ -67,6 +53,9 @@ files for developing applications that use %{name}.
%{_libdir}/pkgconfig/wpebackend-fdo-1.0.pc
%changelog
+* Fri Apr 30 2021 Michael Catanzaro <mcatanzaro(a)redhat.com> - 1.9.91-1
+- Update to 1.9.91
+
* Sat Apr 17 2021 Michael Catanzaro <mcatanzaro(a)redhat.com> - 1.9.90-2
- Stop crashing after process swap
https://src.fedoraproject.org/rpms/wpebackend-fdo/c/aa8aa9b8ee147ed93a374...
1Â year, 11Â months
salimma pushed to ocaml-atd (f34). "Temporarily disable tests on i686
(..more)"
by notificationsï¼ fedoraproject.org
Notification time stamped 2021-04-30 19:28:01 UTC
From 48b221d37ac63f98efe25f7796c3b8cd170fef98 Mon Sep 17 00:00:00 2001
From: Michel Alexandre Salim <michel(a)michel-slm.name>
Date: Apr 30 2021 18:28:02 +0000
Subject: Temporarily disable tests on i686
Signed-off-by: Michel Alexandre Salim <michel(a)michel-slm.name>
---
diff --git a/ocaml-atd.spec b/ocaml-atd.spec
index c15e61a..009e079 100644
--- a/ocaml-atd.spec
+++ b/ocaml-atd.spec
@@ -5,7 +5,13 @@
# missing atds/test/argonaut_2.13-6.2.2.jar;
# The tests only work with scala 2.11 or 2.12
%bcond_with scala
+%ifarch i686
+# dune runtest SIGSEGV
+# but the binaries seem to work fine
+%bcond_with tests
+%else
%bcond_without tests
+%endif
Name: ocaml-%{project_name}
Version: 2.2.1
@@ -306,6 +312,9 @@ dune runtest
%changelog
+* Fri Apr 30 2021 Michel Alexandre Salim <salimma(a)fedoraproject.org> - 2.2.1-3
+- Temporarily disable tests on i686
+
* Fri Apr 23 2021 Michel Alexandre Salim <salimma(a)fedoraproject.org> - 2.2.1-2
- Create subpackages per OPAM module
- Optionally compile and test `atds`
https://src.fedoraproject.org/rpms/ocaml-atd/c/48b221d37ac63f98efe25f7796...
1Â year, 11Â months
salimma pushed to ocaml-atd (f34). "Initial import (..more)"
by notificationsï¼ fedoraproject.org
Notification time stamped 2021-04-30 19:28:01 UTC
From b6419ba499dbaa49abacc98ca8afaeae2bf55e81 Mon Sep 17 00:00:00 2001
From: Michel Alexandre Salim <michel(a)michel-slm.name>
Date: Apr 30 2021 18:07:22 +0000
Subject: Initial import
Signed-off-by: Michel Alexandre Salim <michel(a)michel-slm.name>
---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..9c38ac7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/atd-2.2.1.tar.gz
diff --git a/ocaml-atd.spec b/ocaml-atd.spec
new file mode 100644
index 0000000..c15e61a
--- /dev/null
+++ b/ocaml-atd.spec
@@ -0,0 +1,316 @@
+%global project_name atd
+%global forgeurl https://github.com/ahrefs/%{project_name}
+
+# Scala tests are failing
+# missing atds/test/argonaut_2.13-6.2.2.jar;
+# The tests only work with scala 2.11 or 2.12
+%bcond_with scala
+%bcond_without tests
+
+Name: ocaml-%{project_name}
+Version: 2.2.1
+Release: 2%{?dist}
+Summary: Static Types for Json APIs
+
+License: BSD
+URL: %{forgeurl}
+Source0: %{url}/archive/%{version}/%{project_name}-%{version}.tar.gz
+
+BuildRequires: ocaml
+BuildRequires: ocaml-dune
+BuildRequires: ocaml-menhir
+BuildRequires: ocaml-biniou-devel
+BuildRequires: ocaml-easy-format-devel
+BuildRequires: ocaml-re-devel
+BuildRequires: ocaml-yojson-devel
+%if %{with tests}
+BuildRequires: java-11-openjdk-devel
+%if %{with scala}
+BuildRequires: scala
+%endif
+%endif
+
+%description
+ATD stands for Adaptable Type Definitions. It is a syntax for defining
+cross-language data types. It is used as input to generate efficient and
+type-safe serializers, deserializers and validators. The current target
+languages are OCaml and Java.
+
+The following opam packages are provided by the atd project:
+
+* atdgen: executable that generates OCaml code dealing with json and
+ biniou data formats
+* atdj: executable that generates Java code dealing with json
+* atd: library for parsing atd files used by code generators
+
+
+%package devel
+Summary: Development files for %{name}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+The %{name}-devel package contains libraries and signature files for
+developing applications that use %{name}.
+
+
+%package -n ocaml-atdgen
+Summary: Generates efficient JSON serializers, deserializers and validators
+# Requires:
+
+%description -n ocaml-atdgen
+Atdgen is a command-line program that takes as input type definitions in the ATD
+syntax and produces OCaml code suitable for data serialization and
+deserialization. Two data formats are currently supported, these are biniou and
+JSON. Atdgen-biniou and Atdgen-json will refer to Atdgen used in one context or
+the other. Atdgen was designed with efficiency and durability in mind. Software
+authors are encouraged to use Atdgen directly and to write tools that may reuse
+part of Atdgen’s source code.
+
+
+%package -n ocaml-atdgen-devel
+Summary: Development files for ocaml-atdgen
+Requires: ocaml-atdgen%{?_isa} = %{version}-%{release}
+
+%description -n ocaml-atdgen-devel
+The ocaml-atdgen-devel package contains libraries and signature files for
+developing applications that use ocaml-atdgen.
+
+
+%package -n ocaml-atdj
+Summary: Java code generation for ATD
+# Requires:
+
+%description -n ocaml-atdj
+Atdj is a program that generates a Java interface from type definitions. In
+particular, given a set of ATD type definitions, this tool generates a set of
+Java classes representing those types with built-in JSON serializers and
+deserializers.
+
+The primary benefits of using the generated interface, over manually
+manipulating JSON strings from within Java, are safety and ease of use.
+Specifically, the generated interface offers the following features:
+
+- JSON strings are automatically checked for correctness with respect to the ATD
+ specification.
+
+- Details such as optional fields and their associated default values are
+ automatically handled.
+
+
+%if %{with scala}
+%package -n ocaml-atds
+Summary: ATD Code generator for Scala
+# Requires:
+
+%description -n ocaml-atds
+Atdj is a program that generates a Scala interface from type definitions. In
+particular, given a set of ATD type definitions, this tool generates a set of
+Scala classes representing those types with built-in JSON serializers and
+deserializers.
+
+The primary benefits of using the generated interface, over manually
+manipulating JSON strings from within Scala, are safety and ease of use.
+Specifically, the generated interface offers the following features:
+
+- JSON strings are automatically checked for correctness with respect to the ATD
+ specification.
+
+- Details such as optional fields and their associated default values are
+ automatically handled.
+%endif
+
+
+%package -n ocaml-atdgen-codec-runtime
+Summary: Runtime for atdgen generated bucklescript converters
+# Requires:
+
+%description -n ocaml-atdgen-codec-runtime
+This library contains the types that are used by atdgen's bucklescript backend.
+
+
+%package -n ocaml-atdgen-codec-runtime-devel
+Summary: Development files for ocaml-atdgen-codec-runtime
+Requires: ocaml-atdgen-codec-runtime%{?_isa} = %{version}-%{release}
+
+%description -n ocaml-atdgen-codec-runtime-devel
+The ocaml-atdgen-codec-runtime-devel package contains libraries and signature
+files for developing applications that use ocaml-atdgen-codec-runtime.
+
+
+%package -n ocaml-atdgen-runtime
+Summary: Runtime library for code generated by atdgen
+# Requires:
+
+%description -n ocaml-atdgen-runtime
+This package should be used only in conjunction with the stdgen code generator.
+
+
+%package -n ocaml-atdgen-runtime-devel
+Summary: Development files for ocaml-atdgen-runtime
+Requires: ocaml-atdgen-runtime%{?_isa} = %{version}-%{release}
+
+%description -n ocaml-atdgen-runtime-devel
+The ocaml-atdgen-runtime-devel package contains libraries and signature files
+for developing applications that use ocaml-atdgen-runtime.
+
+
+%prep
+%autosetup -p1 -n %{project_name}-%{version}
+%if %{with scala}
+%else
+rm atds.opam
+rm -rf atds
+%endif
+
+
+%build
+dune build %{?_smp_mflags} --verbose
+
+
+%install
+dune install --destdir=%{buildroot} --verbose
+
+# we are already packaging these properly
+rm -rf %{buildroot}%{_usr}/doc
+
+# atdj and atds do not ship libraries
+# dune has a known issue where it generates empty META files
+#
+# we actually don't need to ship devel files at all so remove
+# the directories entirely
+#
+# https://github.com/ocaml/dune/issues/2353
+rm -rf %{buildroot}%{_libdir}/ocaml/atd{j,s}
+
+
+%if %{with tests}
+%check
+dune runtest
+%endif
+
+
+%files
+%license LICENSE.md
+%doc CHANGES.md README.md
+%{_bindir}/atdcat
+%{_bindir}/cppo-json
+%{_libdir}/ocaml/atd
+%exclude %{_libdir}/ocaml/atd/dune-package
+%exclude %{_libdir}/ocaml/atd/opam
+%ifarch %{ocaml_native_compiler}
+%exclude %{_libdir}/ocaml/atd/*.a
+%exclude %{_libdir}/ocaml/atd/*.cmxa
+%exclude %{_libdir}/ocaml/atd/*.cmx
+%endif
+%exclude %{_libdir}/ocaml/atd/*.ml
+%exclude %{_libdir}/ocaml/atd/*.mli
+
+
+%files devel
+%doc CODEOWNERS
+%ifarch %{ocaml_native_compiler}
+%{_libdir}/ocaml/atd/dune-package
+%{_libdir}/ocaml/atd/opam
+%{_libdir}/ocaml/atd/*.a
+%{_libdir}/ocaml/atd/*.cmxa
+%{_libdir}/ocaml/atd/*.cmx
+%endif
+%{_libdir}/ocaml/atd/*.ml
+%{_libdir}/ocaml/atd/*.mli
+
+
+%files -n ocaml-atdgen
+%{_bindir}/atdgen
+%{_bindir}/atdgen-cppo
+%{_libdir}/ocaml/atdgen
+%exclude %{_libdir}/ocaml/atdgen/dune-package
+%exclude %{_libdir}/ocaml/atdgen/opam
+%ifarch %{ocaml_native_compiler}
+%exclude %{_libdir}/ocaml/atdgen/*.a
+%exclude %{_libdir}/ocaml/atdgen/*.cmxa
+%exclude %{_libdir}/ocaml/atdgen/*.cmx
+%endif
+%exclude %{_libdir}/ocaml/atdgen/*.ml
+
+
+%files -n ocaml-atdgen-devel
+%ifarch %{ocaml_native_compiler}
+%{_libdir}/ocaml/atdgen/dune-package
+%{_libdir}/ocaml/atdgen/opam
+%{_libdir}/ocaml/atdgen/*.a
+%{_libdir}/ocaml/atdgen/*.cmxa
+%{_libdir}/ocaml/atdgen/*.cmx
+%endif
+%{_libdir}/ocaml/atdgen/*.ml
+
+
+%files -n ocaml-atdj
+%{_bindir}/atdj
+
+
+%if %{with scala}
+%files -n ocaml-atds
+%{_bindir}/atds
+%{_libdir}/ocaml/atds
+%endif
+
+
+%files -n ocaml-atdgen-codec-runtime
+%{_libdir}/ocaml/atdgen-codec-runtime
+%exclude %{_libdir}/ocaml/atdgen-codec-runtime/dune-package
+%exclude %{_libdir}/ocaml/atdgen-codec-runtime/opam
+%ifarch %{ocaml_native_compiler}
+%exclude %{_libdir}/ocaml/atdgen-codec-runtime/*.a
+%exclude %{_libdir}/ocaml/atdgen-codec-runtime/*.cmxa
+%exclude %{_libdir}/ocaml/atdgen-codec-runtime/*.cmx
+%endif
+%exclude %{_libdir}/ocaml/atdgen-codec-runtime/*.ml
+%exclude %{_libdir}/ocaml/atdgen-codec-runtime/*.mli
+
+
+%files -n ocaml-atdgen-codec-runtime-devel
+%{_libdir}/ocaml/atdgen-codec-runtime/dune-package
+%{_libdir}/ocaml/atdgen-codec-runtime/opam
+%ifarch %{ocaml_native_compiler}
+%{_libdir}/ocaml/atdgen-codec-runtime/*.a
+%{_libdir}/ocaml/atdgen-codec-runtime/*.cmxa
+%{_libdir}/ocaml/atdgen-codec-runtime/*.cmx
+%endif
+%{_libdir}/ocaml/atdgen-codec-runtime/*.ml
+%{_libdir}/ocaml/atdgen-codec-runtime/*.mli
+
+
+%files -n ocaml-atdgen-runtime
+%{_libdir}/ocaml/atdgen-runtime
+%exclude %{_libdir}/ocaml/atdgen-runtime/dune-package
+%exclude %{_libdir}/ocaml/atdgen-runtime/opam
+%ifarch %{ocaml_native_compiler}
+%exclude %{_libdir}/ocaml/atdgen-runtime/*.a
+%exclude %{_libdir}/ocaml/atdgen-runtime/*.cmxa
+%exclude %{_libdir}/ocaml/atdgen-runtime/*.cmx
+%endif
+%exclude %{_libdir}/ocaml/atdgen-runtime/*.ml
+%exclude %{_libdir}/ocaml/atdgen-runtime/*.mli
+
+
+%files -n ocaml-atdgen-runtime-devel
+%{_libdir}/ocaml/atdgen-runtime/dune-package
+%{_libdir}/ocaml/atdgen-runtime/opam
+%ifarch %{ocaml_native_compiler}
+%{_libdir}/ocaml/atdgen-runtime/*.a
+%{_libdir}/ocaml/atdgen-runtime/*.cmxa
+%{_libdir}/ocaml/atdgen-runtime/*.cmx
+%endif
+%{_libdir}/ocaml/atdgen-runtime/*.ml
+%{_libdir}/ocaml/atdgen-runtime/*.mli
+
+
+%changelog
+* Fri Apr 23 2021 Michel Alexandre Salim <salimma(a)fedoraproject.org> - 2.2.1-2
+- Create subpackages per OPAM module
+- Optionally compile and test `atds`
+- Skip shipping empty META files; known Dune issue
+ https://github.com/ocaml/dune/issues/2353
+
+* Wed Apr 07 2021 Michel Alexandre Salim <salimma(a)fedoraproject.org> - 2.2.1-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..e4ab2e1
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (atd-2.2.1.tar.gz) = c59d9ef820339fec3736aab31647bcb06e5520a957e97850bbcbb6b27bc9ce2b8573decb2f4057e9e451583af8b9255cdea221aa51ec2109584256a5f50df04d
https://src.fedoraproject.org/rpms/ocaml-atd/c/b6419ba499dbaa49abacc98ca8...
1Â year, 11Â months
slowrie pushed to ignition (f32). "release: Ignition 2.10.1"
by notificationsï¼ fedoraproject.org
Notification time stamped 2021-04-30 19:24:59 UTC
From 882b9d831a05c80c8f83b3fc07c8ef702d0e0787 Mon Sep 17 00:00:00 2001
From: Stephen Lowrie <slowrie(a)redhat.com>
Date: Apr 30 2021 17:12:18 +0000
Subject: release: Ignition 2.10.1
---
diff --git a/.gitignore b/.gitignore
index 2d860cd..5d442e6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,3 +53,4 @@
/ignition-c733d23.tar.gz
/ignition-1d56dc8.tar.gz
/ignition-2.9.0.tar.gz
+/ignition-2.10.1.tar.gz
diff --git a/ignition.rpmlintrc b/ignition.rpmlintrc
new file mode 100644
index 0000000..de41af1
--- /dev/null
+++ b/ignition.rpmlintrc
@@ -0,0 +1,2 @@
+# Suppress hardcoded library path warning
+addFilter("hardcoded-library-path in %{_prefix}/lib/dracut")
diff --git a/ignition.spec b/ignition.spec
index 6e768a6..4bf342b 100644
--- a/ignition.spec
+++ b/ignition.spec
@@ -58,15 +58,12 @@
%global dracutlibdir %{_prefix}/lib/dracut
Name: ignition
-Version: 2.9.0
-Release: 4%{?dist}
+Version: 2.10.1
+Release: 1%{?dist}
Summary: First boot installer and configuration tool
License: ASL 2.0
URL: https://%{provider_prefix}
Source0: https://%{provider_prefix}/archive/v%{version}/%{repo}-%{version}.tar.gz
-# Fix AWS probing by using the IMDS token URL to ensure that networking is up
-# https://github.com/coreos/ignition/pull/1161
-Patch0: internal-providers-aws-probe-the-IMDS-token-URL.patch
%define gopath %{_datadir}/gocode
ExclusiveArch: %{go_arches}
@@ -171,11 +168,11 @@ Provides: bundled(golang(github.com/coreos/go-semver/semver)) = 0.3.0
Provides: bundled(golang(github.com/coreos/go-systemd/v22/dbus)) = 22.0.0
Provides: bundled(golang(github.com/coreos/go-systemd/v22/journal)) = 22.0.0
Provides: bundled(golang(github.com/coreos/go-systemd/v22/unit)) = 22.0.0
-Provides: bundled(golang(github.com/coreos/vcontext/json)) = 0.0.0-20201120045928.gitb0e13dab675c
-Provides: bundled(golang(github.com/coreos/vcontext/path)) = 0.0.0-20201120045928.gitb0e13dab675c
-Provides: bundled(golang(github.com/coreos/vcontext/report)) = 0.0.0-20201120045928.gitb0e13dab675c
-Provides: bundled(golang(github.com/coreos/vcontext/tree)) = 0.0.0-20201120045928.gitb0e13dab675c
-Provides: bundled(golang(github.com/coreos/vcontext/validate)) = 0.0.0-20201120045928.gitb0e13dab675c
+Provides: bundled(golang(github.com/coreos/vcontext/json)) = 0.0.0-20210407161507.git4ee6c745c8bd
+Provides: bundled(golang(github.com/coreos/vcontext/path)) = 0.0.0-20210407161507.git4ee6c745c8bd
+Provides: bundled(golang(github.com/coreos/vcontext/report)) = 0.0.0-20210407161507.git4ee6c745c8bd
+Provides: bundled(golang(github.com/coreos/vcontext/tree)) = 0.0.0-20210407161507.git4ee6c745c8bd
+Provides: bundled(golang(github.com/coreos/vcontext/validate)) = 0.0.0-20210407161507.git4ee6c745c8bd
Provides: bundled(golang(github.com/google/renameio)) = 0.1.0
Provides: bundled(golang(github.com/google/uuid)) = 1.1.1
Provides: bundled(golang(github.com/pin/tftp)) = 2.1.0
@@ -558,11 +555,17 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
%gotest %{import_path}/config/merge
%gotest %{import_path}/config/translate
%gotest %{import_path}/config/v3_0
+%gotest %{import_path}/config/v3_0/translate
%gotest %{import_path}/config/v3_0/types
%gotest %{import_path}/config/v3_1
+%gotest %{import_path}/config/v3_1/translate
%gotest %{import_path}/config/v3_1/types
%gotest %{import_path}/config/v3_2
+%gotest %{import_path}/config/v3_2/translate
%gotest %{import_path}/config/v3_2/types
+%gotest %{import_path}/config/v3_3_experimental
+%gotest %{import_path}/config/v3_3_experimental/translate
+%gotest %{import_path}/config/v3_3_experimental/types
%gotest %{import_path}/config/validate
%gotest %{import_path}/internal/exec/stages/files
%gotest %{import_path}/internal/exec/util
@@ -605,6 +608,9 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
%endif
%changelog
+* Thu Apr 29 2021 Stephen Lowrie <slowrie(a)redhat.com> - 2.10.1-1
+- New release
+
* Fri Feb 05 2021 Benjamin Gilbert <bgilbert(a)redhat.com> - 2.9.0-4
- Drop Git commit hash from Release
- Correctly enable IMDS patch
diff --git a/internal-providers-aws-probe-the-IMDS-token-URL.patch b/internal-providers-aws-probe-the-IMDS-token-URL.patch
deleted file mode 100644
index d989482..0000000
--- a/internal-providers-aws-probe-the-IMDS-token-URL.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 74ffe3749d70b9d115a9b9790969b8dcb4a76e12 Mon Sep 17 00:00:00 2001
-From: Stephen Lowrie <stephen.lowrie(a)gmail.com>
-Date: Mon, 11 Jan 2021 11:27:12 -0600
-Subject: [PATCH] internal/providers/aws: probe the IMDS token URL
-
-Probing the `/latest` path causes a 401 Unauthorized when running with
-IMDSv2 only. Instead ping the token URL.
----
- internal/providers/aws/aws.go | 37 +++++++++++++++++++----------------
- 1 file changed, 20 insertions(+), 17 deletions(-)
-
-diff --git a/internal/providers/aws/aws.go b/internal/providers/aws/aws.go
-index 54373dbb..4a6655f0 100644
---- a/internal/providers/aws/aws.go
-+++ b/internal/providers/aws/aws.go
-@@ -40,11 +40,6 @@ var (
- Host: "169.254.169.254",
- Path: "2019-10-01/user-data",
- }
-- metadataServiceProbeURL = url.URL{
-- Scheme: "http",
-- Host: "169.254.169.254",
-- Path: "latest",
-- }
- imdsTokenURL = url.URL{
- Scheme: "http",
- Host: "169.254.169.254",
-@@ -78,17 +73,17 @@ func NewFetcher(l *log.Logger) (resource.Fetcher, error) {
- // Init prepares the fetcher for this platform
- func Init(f *resource.Fetcher) error {
- // During the fetch stage we might be running before the networking
-- // is fully ready. Perform an HTTP fetch against the metadata probe
-- // URL to ensure that networking is up before we attempt to fetch
-- // the region hint from ec2metadata.
-+ // is fully ready. Perform an HTTP fetch against the IMDS token URL
-+ // to ensure that networking is up before we attempt to fetch the
-+ // region hint from ec2metadata.
- //
-- // NOTE: the FetchToBuffer call against the metadata service probe
-- // URL is a temporary solution to handle waiting for networking
-- // before fetching from the AWS API. We do this instead of an
-- // infinite retry loop on the API call because, without a clear
-- // understanding of the failure cases, that would risk provisioning
-- // failures due to quirks of the ec2metadata API. Additionally a
-- // finite retry loop would have to time out quickly enough to avoid
-+ // NOTE: the FetchToBuffer call against the IMDS token URL is a
-+ // temporary solution to handle waiting for networking before
-+ // fetching from the AWS API. We do this instead of an infinite
-+ // retry loop on the API call because, without a clear understanding
-+ // of the failure cases, that would risk provisioning failures due
-+ // to quirks of the ec2metadata API. Additionally a finite retry
-+ // loop would have to time out quickly enough to avoid
- // extraordinarily long boots on failure (since this code runs in
- // every stage) but that would risk premature timeouts if the
- // network takes a while to come up.
-@@ -102,8 +97,16 @@ func Init(f *resource.Fetcher) error {
- // NOTE: FetchToBuffer is handling the ErrNeedNet case. If we move
- // to an alternative method, we will need to handle the detection in
- // this function.
-- _, err := f.FetchToBuffer(metadataServiceProbeURL, resource.FetchOptions{})
-- if err != nil {
-+ opts := resource.FetchOptions{
-+ Headers: http.Header{
-+ "x-aws-ec2-metadata-token-ttl-seconds": []string{"21600"},
-+ },
-+ HTTPVerb: "PUT",
-+ }
-+ _, err := f.FetchToBuffer(imdsTokenURL, opts)
-+ // ErrNotFound would just mean that the instance might not have
-+ // IMDSv2 enabled
-+ if err != nil && err != resource.ErrNotFound {
- return err
- }
-
---
-2.29.2
diff --git a/sources b/sources
index 8a36460..21c6ff9 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (ignition-2.9.0.tar.gz) = 714ae90fb32a45e1b21e0b0671e7933ce302cdd943cd02cfc221e8bf88269fb464ff5f740d54b444e5c341a3877bf2943ca6f2c2f1374df904386400d73ebe97
+SHA512 (ignition-2.10.1.tar.gz) = 039ea5ab19c0e2efa6ec2c21534e4a5b93f0fb20576d51563283ede1caa3faa29dbb461632bb01f7549d47677991d17516d94f2cefc5982d23545ace5f196f4f
https://src.fedoraproject.org/rpms/ignition/c/882b9d831a05c80c8f83b3fc07c...
1Â year, 11Â months
slowrie pushed to ignition (f33). "release: Ignition 2.10.1"
by notificationsï¼ fedoraproject.org
Notification time stamped 2021-04-30 19:21:51 UTC
From 882b9d831a05c80c8f83b3fc07c8ef702d0e0787 Mon Sep 17 00:00:00 2001
From: Stephen Lowrie <slowrie(a)redhat.com>
Date: Apr 30 2021 17:12:18 +0000
Subject: release: Ignition 2.10.1
---
diff --git a/.gitignore b/.gitignore
index 2d860cd..5d442e6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,3 +53,4 @@
/ignition-c733d23.tar.gz
/ignition-1d56dc8.tar.gz
/ignition-2.9.0.tar.gz
+/ignition-2.10.1.tar.gz
diff --git a/ignition.rpmlintrc b/ignition.rpmlintrc
new file mode 100644
index 0000000..de41af1
--- /dev/null
+++ b/ignition.rpmlintrc
@@ -0,0 +1,2 @@
+# Suppress hardcoded library path warning
+addFilter("hardcoded-library-path in %{_prefix}/lib/dracut")
diff --git a/ignition.spec b/ignition.spec
index 6e768a6..4bf342b 100644
--- a/ignition.spec
+++ b/ignition.spec
@@ -58,15 +58,12 @@
%global dracutlibdir %{_prefix}/lib/dracut
Name: ignition
-Version: 2.9.0
-Release: 4%{?dist}
+Version: 2.10.1
+Release: 1%{?dist}
Summary: First boot installer and configuration tool
License: ASL 2.0
URL: https://%{provider_prefix}
Source0: https://%{provider_prefix}/archive/v%{version}/%{repo}-%{version}.tar.gz
-# Fix AWS probing by using the IMDS token URL to ensure that networking is up
-# https://github.com/coreos/ignition/pull/1161
-Patch0: internal-providers-aws-probe-the-IMDS-token-URL.patch
%define gopath %{_datadir}/gocode
ExclusiveArch: %{go_arches}
@@ -171,11 +168,11 @@ Provides: bundled(golang(github.com/coreos/go-semver/semver)) = 0.3.0
Provides: bundled(golang(github.com/coreos/go-systemd/v22/dbus)) = 22.0.0
Provides: bundled(golang(github.com/coreos/go-systemd/v22/journal)) = 22.0.0
Provides: bundled(golang(github.com/coreos/go-systemd/v22/unit)) = 22.0.0
-Provides: bundled(golang(github.com/coreos/vcontext/json)) = 0.0.0-20201120045928.gitb0e13dab675c
-Provides: bundled(golang(github.com/coreos/vcontext/path)) = 0.0.0-20201120045928.gitb0e13dab675c
-Provides: bundled(golang(github.com/coreos/vcontext/report)) = 0.0.0-20201120045928.gitb0e13dab675c
-Provides: bundled(golang(github.com/coreos/vcontext/tree)) = 0.0.0-20201120045928.gitb0e13dab675c
-Provides: bundled(golang(github.com/coreos/vcontext/validate)) = 0.0.0-20201120045928.gitb0e13dab675c
+Provides: bundled(golang(github.com/coreos/vcontext/json)) = 0.0.0-20210407161507.git4ee6c745c8bd
+Provides: bundled(golang(github.com/coreos/vcontext/path)) = 0.0.0-20210407161507.git4ee6c745c8bd
+Provides: bundled(golang(github.com/coreos/vcontext/report)) = 0.0.0-20210407161507.git4ee6c745c8bd
+Provides: bundled(golang(github.com/coreos/vcontext/tree)) = 0.0.0-20210407161507.git4ee6c745c8bd
+Provides: bundled(golang(github.com/coreos/vcontext/validate)) = 0.0.0-20210407161507.git4ee6c745c8bd
Provides: bundled(golang(github.com/google/renameio)) = 0.1.0
Provides: bundled(golang(github.com/google/uuid)) = 1.1.1
Provides: bundled(golang(github.com/pin/tftp)) = 2.1.0
@@ -558,11 +555,17 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
%gotest %{import_path}/config/merge
%gotest %{import_path}/config/translate
%gotest %{import_path}/config/v3_0
+%gotest %{import_path}/config/v3_0/translate
%gotest %{import_path}/config/v3_0/types
%gotest %{import_path}/config/v3_1
+%gotest %{import_path}/config/v3_1/translate
%gotest %{import_path}/config/v3_1/types
%gotest %{import_path}/config/v3_2
+%gotest %{import_path}/config/v3_2/translate
%gotest %{import_path}/config/v3_2/types
+%gotest %{import_path}/config/v3_3_experimental
+%gotest %{import_path}/config/v3_3_experimental/translate
+%gotest %{import_path}/config/v3_3_experimental/types
%gotest %{import_path}/config/validate
%gotest %{import_path}/internal/exec/stages/files
%gotest %{import_path}/internal/exec/util
@@ -605,6 +608,9 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
%endif
%changelog
+* Thu Apr 29 2021 Stephen Lowrie <slowrie(a)redhat.com> - 2.10.1-1
+- New release
+
* Fri Feb 05 2021 Benjamin Gilbert <bgilbert(a)redhat.com> - 2.9.0-4
- Drop Git commit hash from Release
- Correctly enable IMDS patch
diff --git a/internal-providers-aws-probe-the-IMDS-token-URL.patch b/internal-providers-aws-probe-the-IMDS-token-URL.patch
deleted file mode 100644
index d989482..0000000
--- a/internal-providers-aws-probe-the-IMDS-token-URL.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 74ffe3749d70b9d115a9b9790969b8dcb4a76e12 Mon Sep 17 00:00:00 2001
-From: Stephen Lowrie <stephen.lowrie(a)gmail.com>
-Date: Mon, 11 Jan 2021 11:27:12 -0600
-Subject: [PATCH] internal/providers/aws: probe the IMDS token URL
-
-Probing the `/latest` path causes a 401 Unauthorized when running with
-IMDSv2 only. Instead ping the token URL.
----
- internal/providers/aws/aws.go | 37 +++++++++++++++++++----------------
- 1 file changed, 20 insertions(+), 17 deletions(-)
-
-diff --git a/internal/providers/aws/aws.go b/internal/providers/aws/aws.go
-index 54373dbb..4a6655f0 100644
---- a/internal/providers/aws/aws.go
-+++ b/internal/providers/aws/aws.go
-@@ -40,11 +40,6 @@ var (
- Host: "169.254.169.254",
- Path: "2019-10-01/user-data",
- }
-- metadataServiceProbeURL = url.URL{
-- Scheme: "http",
-- Host: "169.254.169.254",
-- Path: "latest",
-- }
- imdsTokenURL = url.URL{
- Scheme: "http",
- Host: "169.254.169.254",
-@@ -78,17 +73,17 @@ func NewFetcher(l *log.Logger) (resource.Fetcher, error) {
- // Init prepares the fetcher for this platform
- func Init(f *resource.Fetcher) error {
- // During the fetch stage we might be running before the networking
-- // is fully ready. Perform an HTTP fetch against the metadata probe
-- // URL to ensure that networking is up before we attempt to fetch
-- // the region hint from ec2metadata.
-+ // is fully ready. Perform an HTTP fetch against the IMDS token URL
-+ // to ensure that networking is up before we attempt to fetch the
-+ // region hint from ec2metadata.
- //
-- // NOTE: the FetchToBuffer call against the metadata service probe
-- // URL is a temporary solution to handle waiting for networking
-- // before fetching from the AWS API. We do this instead of an
-- // infinite retry loop on the API call because, without a clear
-- // understanding of the failure cases, that would risk provisioning
-- // failures due to quirks of the ec2metadata API. Additionally a
-- // finite retry loop would have to time out quickly enough to avoid
-+ // NOTE: the FetchToBuffer call against the IMDS token URL is a
-+ // temporary solution to handle waiting for networking before
-+ // fetching from the AWS API. We do this instead of an infinite
-+ // retry loop on the API call because, without a clear understanding
-+ // of the failure cases, that would risk provisioning failures due
-+ // to quirks of the ec2metadata API. Additionally a finite retry
-+ // loop would have to time out quickly enough to avoid
- // extraordinarily long boots on failure (since this code runs in
- // every stage) but that would risk premature timeouts if the
- // network takes a while to come up.
-@@ -102,8 +97,16 @@ func Init(f *resource.Fetcher) error {
- // NOTE: FetchToBuffer is handling the ErrNeedNet case. If we move
- // to an alternative method, we will need to handle the detection in
- // this function.
-- _, err := f.FetchToBuffer(metadataServiceProbeURL, resource.FetchOptions{})
-- if err != nil {
-+ opts := resource.FetchOptions{
-+ Headers: http.Header{
-+ "x-aws-ec2-metadata-token-ttl-seconds": []string{"21600"},
-+ },
-+ HTTPVerb: "PUT",
-+ }
-+ _, err := f.FetchToBuffer(imdsTokenURL, opts)
-+ // ErrNotFound would just mean that the instance might not have
-+ // IMDSv2 enabled
-+ if err != nil && err != resource.ErrNotFound {
- return err
- }
-
---
-2.29.2
diff --git a/sources b/sources
index 8a36460..21c6ff9 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (ignition-2.9.0.tar.gz) = 714ae90fb32a45e1b21e0b0671e7933ce302cdd943cd02cfc221e8bf88269fb464ff5f740d54b444e5c341a3877bf2943ca6f2c2f1374df904386400d73ebe97
+SHA512 (ignition-2.10.1.tar.gz) = 039ea5ab19c0e2efa6ec2c21534e4a5b93f0fb20576d51563283ede1caa3faa29dbb461632bb01f7549d47677991d17516d94f2cefc5982d23545ace5f196f4f
https://src.fedoraproject.org/rpms/ignition/c/882b9d831a05c80c8f83b3fc07c...
1Â year, 11Â months