Your message dated Wed, 21 May 2025 19:53:11 +0000
with message-id <e1uhpv1-005vzh...@respighi.debian.org>
and subject line unblock xdg-desktop-portal
has caused the Debian Bug report #1106215,
regarding unblock: xdg-desktop-portal/1.20.3+ds-1
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
1106215: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1106215
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
X-Debbugs-Cc: xdg-desktop-por...@packages.debian.org,
debian-desk...@lists.debian.org, sn...@packages.debian.org
Control: affects -1 + src:xdg-desktop-portal
User: release.debian....@packages.debian.org
Usertags: unblock
[ Reason ]
Fix broken functionality in 1.20.0 (#1105889) and regressions in 1.20.1
(#1106091)
[ Impact ]
With 1.20.0, Flatpak apps cannot successfully use the "dynamic launcher"
interface to ask permission to create an app shortcut on the host
(#1105889). I requested and was given an unblock for 1.20.1 in #1105893,
but unfortunately that version contained regressions when used with
a less-common category of Flatpak apps.
Following upstream's stable branch will make it easier to get future
bugfixes into trixie, potentially including security fixes.
[ Tests ]
I was able to reproduce #1106091 with a Flatpak app
(org.gnome.NautilusPreviewer, the Flatpak equivalent of gnome-sushi.deb).
I confirmed that the changes in 1.20.2 fix the x-d-p crash, but leave this
app with reduced functionality (the Open button results in an error). I also
confirmed that the changes in 1.20.3 restore previous functionality for
this app, with the Open button prompting the user to open the previewed
image in an appropriate host app as expected.
(https://github.com/flatpak/xdg-desktop-portal/issues/1718#issuecomment-2891394948,
https://github.com/flatpak/xdg-desktop-portal/issues/1718#issuecomment-2897490441)
As before I haven't tested with Snap (I don't normally use that
framework). It would be helpful if a snapd user/developer could
double-check that this version is still working as expected with Snap,
too.
[ Risks ]
It seems that I was correct to assess the refactoring for app-info
initialization as the highest-risk part of #1105893: that's where these
regressions were found. I asked upstream to avoid this sort of refactoring
on stable-branches whenever possible.
The delta between 1.20.1 and 1.20.3 is minimal and targeted. The larger
diffs in xdp-portal-impl.[ch] are only compiled if using older GLib
(restoring compatibility with bookworm) and should have no effect on
the trixie binary.
I haven't tested with Snap apps, so the Snap-related changes in 1.20.3
are for symmetry with their Flatpak equivalent. They are very narrowly
targeted (2 lines deleted) and could easily be reverted if they somehow
cause a problem.
[ Checklist ]
[x] all changes are documented in the d/changelog
[x] I reviewed all changes and I approve them
[ ] attach debdiff against the package in testing
- the attached debdiff is vs. what was already approved in #1105893
debdiff xdg-desktop-portal_1.20.1+ds-2.dsc xdg-desktop-portal_1.20.3+ds-1.dsc \
| filterdiff -p1 -x'po/*.po'
diff -Nru xdg-desktop-portal-1.20.1+ds/debian/changelog xdg-desktop-portal-1.20.3+ds/debian/changelog
--- xdg-desktop-portal-1.20.1+ds/debian/changelog 2025-05-16 17:21:45.000000000 +0100
+++ xdg-desktop-portal-1.20.3+ds/debian/changelog 2025-05-21 11:05:04.000000000 +0100
@@ -1,3 +1,14 @@
+xdg-desktop-portal (1.20.3+ds-1) unstable; urgency=medium
+
+ * New upstream stable release
+ - Fix a crash when a Flatpak app does not export a .desktop file
+ with the same name as its app-ID (Closes: #1106091)
+ - Allow Flatpak and Snap apps to use portal APIs even if they do not
+ have a .desktop file matching the app-ID
+ - Fix file descriptors being closed too soon, resulting in log noise
+
+ -- Simon McVittie <s...@debian.org> Wed, 21 May 2025 11:05:04 +0100
+
xdg-desktop-portal (1.20.1+ds-2) unstable; urgency=medium
* Release to unstable (Closes: #1105889)
diff -Nru xdg-desktop-portal-1.20.1+ds/meson.build xdg-desktop-portal-1.20.3+ds/meson.build
--- xdg-desktop-portal-1.20.1+ds/meson.build 2025-05-15 15:15:35.000000000 +0100
+++ xdg-desktop-portal-1.20.3+ds/meson.build 2025-05-20 18:07:14.000000000 +0100
@@ -1,7 +1,7 @@
project(
'xdg-desktop-portal',
'c',
- version: '1.20.1',
+ version: '1.20.3',
meson_version: '>= 0.60',
license: 'LGPL-2.0-or-later',
default_options: [
diff -Nru xdg-desktop-portal-1.20.1+ds/NEWS.md xdg-desktop-portal-1.20.3+ds/NEWS.md
--- xdg-desktop-portal-1.20.1+ds/NEWS.md 2025-05-15 15:15:35.000000000 +0100
+++ xdg-desktop-portal-1.20.3+ds/NEWS.md 2025-05-20 18:07:14.000000000 +0100
@@ -1,3 +1,21 @@
+Changes in 1.20.3
+=================
+Released: 2025-05-20
+
+Bug Fixes:
+
+- Add a fallback code path for GLib older than 2.76 (#1728)
+- Don't require a .desktop file for Flatpak and Snap apps (#1729)
+
+Changes in 1.20.2
+=================
+Released: 2025-05-19
+
+Bug Fixes:
+
+- Fix a crash when loading information from Flatpak apps
+- Fix fd handling to prevent EBADF errors
+
Changes in 1.20.1
=================
Released: 2025-05-15
diff -Nru xdg-desktop-portal-1.20.1+ds/po/xdg-desktop-portal.pot xdg-desktop-portal-1.20.3+ds/po/xdg-desktop-portal.pot
--- xdg-desktop-portal-1.20.1+ds/po/xdg-desktop-portal.pot 2025-05-15 15:15:35.000000000 +0100
+++ xdg-desktop-portal-1.20.3+ds/po/xdg-desktop-portal.pot 2025-05-20 18:07:14.000000000 +0100
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: xdg-desktop-portal\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2025-05-15 15:55+0200\n"
+"POT-Creation-Date: 2025-04-23 10:29-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <l...@li.org>\n"
diff -Nru xdg-desktop-portal-1.20.1+ds/src/xdp-app-info-flatpak.c xdg-desktop-portal-1.20.3+ds/src/xdp-app-info-flatpak.c
--- xdg-desktop-portal-1.20.1+ds/src/xdp-app-info-flatpak.c 2025-05-15 15:15:35.000000000 +0100
+++ xdg-desktop-portal-1.20.3+ds/src/xdp-app-info-flatpak.c 2025-05-20 18:07:14.000000000 +0100
@@ -811,7 +811,6 @@
/* TODO: we can use pidfd to make sure we didn't race for sure */
- flags |= XDP_APP_INFO_FLAG_REQUIRE_GAPPINFO;
flags |= XDP_APP_INFO_FLAG_SUPPORTS_OPATH;
if (has_network)
flags |= XDP_APP_INFO_FLAG_HAS_NETWORK;
@@ -823,8 +822,10 @@
"flags", flags,
"id", id,
"instance", instance,
- "pidfd", bwrap_pidfd,
+ "pidfd", g_steal_fd (&bwrap_pidfd),
NULL);
+ if (!app_info_flatpak)
+ return NULL;
app_info_flatpak->flatpak_info = g_steal_pointer (&metadata);
diff -Nru xdg-desktop-portal-1.20.1+ds/src/xdp-app-info-snap.c xdg-desktop-portal-1.20.3+ds/src/xdp-app-info-snap.c
--- xdg-desktop-portal-1.20.1+ds/src/xdp-app-info-snap.c 2025-05-15 15:15:35.000000000 +0100
+++ xdg-desktop-portal-1.20.3+ds/src/xdp-app-info-snap.c 2025-05-20 18:07:14.000000000 +0100
@@ -58,7 +58,6 @@
gappinfo =
G_APP_INFO (g_desktop_app_info_new (app_info_snap->desktop_file));
- g_assert (G_IS_APP_INFO (gappinfo));
return g_steal_pointer (&gappinfo);
}
@@ -310,7 +309,6 @@
SNAP_METADATA_KEY_NETWORK,
NULL);
- flags = XDP_APP_INFO_FLAG_REQUIRE_GAPPINFO;
if (has_network)
flags |= XDP_APP_INFO_FLAG_HAS_NETWORK;
diff -Nru xdg-desktop-portal-1.20.1+ds/src/xdp-app-info-test.c xdg-desktop-portal-1.20.3+ds/src/xdp-app-info-test.c
--- xdg-desktop-portal-1.20.1+ds/src/xdp-app-info-test.c 2025-05-15 15:15:35.000000000 +0100
+++ xdg-desktop-portal-1.20.3+ds/src/xdp-app-info-test.c 2025-05-20 18:07:14.000000000 +0100
@@ -141,6 +141,7 @@
"flags", XDP_APP_INFO_FLAG_HAS_NETWORK |
XDP_APP_INFO_FLAG_SUPPORTS_OPATH,
NULL);
+ g_assert (app_info_test);
app_info_test->usb_queries = parse_usb_queries_string (usb_queries_str);
diff -Nru xdg-desktop-portal-1.20.1+ds/src/xdp-portal-impl.c xdg-desktop-portal-1.20.3+ds/src/xdp-portal-impl.c
--- xdg-desktop-portal-1.20.1+ds/src/xdp-portal-impl.c 2025-05-15 15:15:35.000000000 +0100
+++ xdg-desktop-portal-1.20.3+ds/src/xdp-portal-impl.c 2025-05-20 18:07:14.000000000 +0100
@@ -327,6 +327,31 @@
}
}
+#if !GLIB_CHECK_VERSION(2, 76, 0)
+static gboolean
+steal_portal_impl_foreach (gpointer key,
+ gpointer value,
+ gpointer user_data)
+{
+ GPtrArray *implementations = user_data;
+
+ g_free (key);
+ g_ptr_array_add (implementations, value);
+ /* declare that we took ownership */
+ return TRUE;
+}
+
+static int
+sort_impl_by_use_in_and_name_indirect (gconstpointer a,
+ gconstpointer b)
+{
+ const XdpPortalImplementation * const *left = a;
+ const XdpPortalImplementation * const *right = b;
+
+ return sort_impl_by_use_in_and_name (*left, *right);
+}
+#endif
+
void
load_installed_portals (gboolean opt_verbose)
{
@@ -371,8 +396,16 @@
out:
g_clear_pointer (&implementations, g_ptr_array_unref);
+
+#if GLIB_CHECK_VERSION(2, 76, 0)
implementations = g_hash_table_steal_all_values (portals);
g_ptr_array_sort_values (implementations, sort_impl_by_use_in_and_name);
+#else
+ implementations = g_ptr_array_new_full (g_hash_table_size (portals),
+ (GDestroyNotify) portal_implementation_free);
+ g_hash_table_foreach_steal (portals, steal_portal_impl_foreach, implementations);
+ g_ptr_array_sort (implementations, sort_impl_by_use_in_and_name_indirect);
+#endif
}
static PortalConfig *
--- End Message ---
--- Begin Message ---
Unblocked.
--- End Message ---