Update to 1.20.0
Add xdg-native-messaging-proxy for webextensions support. Resolves: RHEL-78623
This commit is contained in:
parent
8e99a57a1d
commit
1be4156d10
2
.gitignore
vendored
2
.gitignore
vendored
@ -49,3 +49,5 @@
|
||||
/xdg-desktop-portal-1.18.4.tar.xz
|
||||
/xdg-desktop-portal-1.19.1.tar.xz
|
||||
/xdg-desktop-portal-1.19.2.tar.xz
|
||||
/xdg-desktop-portal-1.20.0.tar.xz
|
||||
/xdg-native-messaging-proxy-0.1.0.tar.xz
|
||||
|
3
sources
3
sources
@ -1 +1,2 @@
|
||||
SHA512 (xdg-desktop-portal-1.19.2.tar.xz) = 747b4788da5eb9db765389d20b70c8bd90e33dea5763888f09c7e031c92640cd4d231b925d61fe62a446040b6bc1ba3c2ca8e11a20e18585ddf0c4ebb8303864
|
||||
SHA512 (xdg-desktop-portal-1.20.0.tar.xz) = aac38476b75a841ce12d7b4036830ef4ce3426914bcaf7ee2bb8a3a34e353089ed5c3521b06f7714d5ef8308d1af4e8297e583d363eba94263f3c062ced0063e
|
||||
SHA512 (xdg-native-messaging-proxy-0.1.0.tar.xz) = 068c23216d581df237c2d78172e78b5f35e2820cb6830633fafaaaf4a9bdda4a6dfdfe31a2056409f85b73a15cfc49492f3da2d64386a22d8a3fab18da32017e
|
||||
|
@ -6,9 +6,10 @@
|
||||
%global libportal_version 0.9.0
|
||||
%global low_memory_monitor_version 2.0
|
||||
%global pipewire_version 0.2.90
|
||||
%global xdg_native_messaging_proxy_version 0.1.0
|
||||
|
||||
Name: xdg-desktop-portal
|
||||
Version: 1.19.2
|
||||
Version: 1.20.0
|
||||
Release: %autorelease
|
||||
Summary: Portal frontend service to flatpak
|
||||
|
||||
@ -16,7 +17,9 @@ Summary: Portal frontend service to flatpak
|
||||
License: LGPL-2.1-or-later
|
||||
URL: https://github.com/flatpak/xdg-desktop-portal/
|
||||
Source0: https://github.com/flatpak/xdg-desktop-portal/releases/download/%{version}/%{name}-%{version}.tar.xz
|
||||
Source1: https://github.com/swick/xdg-native-messaging-proxy/%{xdg_native_messaging_proxy_version}/xdg-native-messaging-proxy-%{xdg_native_messaging_proxy_version}.tar.xz
|
||||
|
||||
Patch0: xdp-make-sure-host-registry-xdpappinfo-updates-become-visible.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gettext
|
||||
@ -31,6 +34,7 @@ BuildRequires: pkgconfig(json-glib-1.0)
|
||||
BuildRequires: pkgconfig(libgeoclue-2.0) >= %{geoclue_version}
|
||||
BuildRequires: pkgconfig(libpipewire-0.3) >= %{pipewire_version}
|
||||
BuildRequires: pkgconfig(libportal) >= %{libportal_version}
|
||||
BuildRequires: pkgconfig(libdex-1)
|
||||
BuildRequires: pkgconfig(libsystemd)
|
||||
BuildRequires: pkgconfig(umockdev-1.0)
|
||||
BuildRequires: python3-dbusmock
|
||||
@ -83,11 +87,17 @@ The pkg-config file for %{name}.
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
# Unpack xdg-native-messaging-proxy
|
||||
tar xJf %{SOURCE1}
|
||||
|
||||
%build
|
||||
%meson %{!?with_docs:-Ddocumentation=disabled}
|
||||
%meson_build
|
||||
|
||||
pushd xdg-native-messaging-proxy
|
||||
%meson
|
||||
%meson_build
|
||||
popd
|
||||
|
||||
%install
|
||||
%meson_install
|
||||
@ -96,6 +106,10 @@ install -pm 644 README.md %{buildroot}/%{_pkgdocdir}
|
||||
# This directory is used by implementations such as xdg-desktop-portal-gtk.
|
||||
install -dm 755 %{buildroot}/%{_datadir}/xdg-desktop-portal/portals
|
||||
|
||||
pushd xdg-native-messaging-proxy
|
||||
%meson_install --destdir=%{buildroot}
|
||||
popd
|
||||
|
||||
%find_lang %{name}
|
||||
|
||||
|
||||
@ -114,6 +128,7 @@ install -dm 755 %{buildroot}/%{_datadir}/xdg-desktop-portal/portals
|
||||
%files -f %{name}.lang
|
||||
%doc %{_pkgdocdir}
|
||||
%license COPYING
|
||||
%{_datadir}/dbus-1/interfaces/org.freedesktop.host.portal.Registry.xml
|
||||
%{_datadir}/dbus-1/interfaces/org.freedesktop.portal.*.xml
|
||||
%{_datadir}/dbus-1/interfaces/org.freedesktop.impl.portal.*.xml
|
||||
%{_datadir}/dbus-1/services/org.freedesktop.portal.Desktop.service
|
||||
@ -131,6 +146,11 @@ install -dm 755 %{buildroot}/%{_datadir}/xdg-desktop-portal/portals
|
||||
%{_userunitdir}/xdg-desktop-portal-rewrite-launchers.service
|
||||
%{_userunitdir}/xdg-document-portal.service
|
||||
%{_userunitdir}/xdg-permission-store.service
|
||||
# xdg-native-messaging-proxy
|
||||
%{_datadir}/dbus-1/interfaces/org.freedesktop.NativeMessagingProxy.xml
|
||||
%{_datadir}/dbus-1/services/org.freedesktop.NativeMessagingProxy.service
|
||||
%{_userunitdir}/xdg-native-messaging-proxy.service
|
||||
%{_libexecdir}/xdg-native-messaging-proxy
|
||||
|
||||
%files devel
|
||||
%{_datadir}/pkgconfig/xdg-desktop-portal.pc
|
||||
|
@ -0,0 +1,43 @@
|
||||
From e71bb95ccbc1d5d73eef3fb4c4e6aa90c3ade08a Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Wick <sebastian.wick@redhat.com>
|
||||
Date: Tue, 25 Feb 2025 14:19:57 +0100
|
||||
Subject: [PATCH] Make sure the Host Registry XdpAppInfo updates become visible
|
||||
|
||||
The invocations are currently delegated to threads which means that the
|
||||
next invocation gets run before the first one finished. This is fine for
|
||||
all the other portals, but because the Registry modifies the identity of
|
||||
the caller for all following calls, we must ensure that it finishes
|
||||
before the next invocation. This means in particular no
|
||||
g-authorize-method and no FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD.
|
||||
---
|
||||
src/xdg-desktop-portal.c | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/xdg-desktop-portal.c b/src/xdg-desktop-portal.c
|
||||
index edaebe1d1..addb06e2d 100644
|
||||
--- a/src/xdg-desktop-portal.c
|
||||
+++ b/src/xdg-desktop-portal.c
|
||||
@@ -192,6 +192,14 @@ static void
|
||||
export_host_portal_implementation (GDBusConnection *connection,
|
||||
GDBusInterfaceSkeleton *skeleton)
|
||||
{
|
||||
+ /* Host portal dbus method invocations run in the main thread without yielding
|
||||
+ * to the main loop. This means that any later method call of any portal will
|
||||
+ * see the effects of the host portal method call.
|
||||
+ *
|
||||
+ * This is important because the Registry modifies the XdpAppInfo and later
|
||||
+ * method calls must see the modified value.
|
||||
+ */
|
||||
+
|
||||
g_autoptr(GError) error = NULL;
|
||||
|
||||
if (skeleton == NULL)
|
||||
@@ -201,7 +209,7 @@ export_host_portal_implementation (GDBusConnection *connection,
|
||||
}
|
||||
|
||||
g_dbus_interface_skeleton_set_flags (skeleton,
|
||||
- G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD);
|
||||
+ G_DBUS_INTERFACE_SKELETON_FLAGS_NONE);
|
||||
|
||||
if (!g_dbus_interface_skeleton_export (skeleton,
|
||||
connection,
|
Loading…
Reference in New Issue
Block a user