Subject: Re: [bug#73520] [PATCH 0/2] Potential fix for the latest xdg-desktop-portal

From: John Kehayias <[email-masked]>
Date: Fri, 17 Jan 2025 06:42:54 +0000

Hi,

CC'ing Maxim from 73403 though maybe we should include some Gnome-team
people? Though the actual xdg-desktop-portal stuff is pretty general and
doesn't fall under any particular team.

On Fri, Sep 27, 2024 at 11:17 PM, Rodion Goritskov wrote:

> Hello!
>
> The problem with the xdg-desktop-portal is due to the configuration
> changes introduced in this commit [1].

By problem, do you mean (or also mean) what was reported as breaking in
Gnome in <https://issues.guix.gnu.org/73403#2>? Have been able to test
that this patch fixes that issue?

> Now it relies on using the configuration file to decide which xdg-desktop-portal implementation to use. However, as Guix uses XDG_DESKTOP_PORTAL_DIR to specify the portal (not the xdg-portal-configuration) directory, the newest xdg-desktop-portal skip configuration search at all [2].
> If we patch the process of configuration search a little bit - just to continue searching in case the XDG_DESKTOP_PORTAL_DIR is specified, but doesn't contain any {*}-portals.conf files (our case), we will have the right configuration files (at least for KDE I have tested this changes on) to be read by xdg-desktop-portal according to priorities (XDG_DATA_DIRS in our case) [3] (so they could be even overridden in users' home directory).
>

Thanks for the details! I haven't had a chance to look at this carefully
yet. Has this been reported upstream? Is this something that should be
fixed there or is this too particular to a Guix system?

> It's a bit hacky, but works fine.
>

Works is the important part to start :)

> [1]: https://github.com/flatpak/xdg-desktop-portal/commit/939f0b0fcec6a42c1acdc397986547e9805359ff
> [2]: https://github.com/flatpak/xdg-desktop-portal/blob/1b5a16932493324fa0f21cfb1c3f9c1d16cb6a19/src/portal-impl.c#L441
> [3]: https://github.com/flatpak/xdg-desktop-portal/blob/main/doc/portals.conf.rst.in
>
> Rodion Goritskov (2):
>   gnu: xdg-desktop-portal-next: Fix configuration file search.
>   gnu: xdg-desktop-portal: Update to 1.18.4.
>
>  gnu/local.mk                                  |  1 +
>  gnu/packages/freedesktop.scm                  | 77 ++++++-------------
>  ...al-disable-configuration-search-exit.patch | 28 +++++++
>  gnu/packages/telegram.scm                     |  2 +-
>  4 files changed, 55 insertions(+), 53 deletions(-)
>  create mode 100644 gnu/packages/patches/xdg-desktop-portal-disable-configuration-search-exit.patch
>
>
> base-commit: 9a141b5bd633227ea31776b9ce7ca40928de2442

Thanks!
John