Subject: bug#73520: closed (Re: [bug#73520] [PATCH gnome-team v2] gnu: xdg-desktop-portal: Fix configuration file search.)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 05 Mar 2025 05:34:02 +0000

Your bug report

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

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
73520: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73520
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#73520] [PATCH gnome-team v2] gnu: xdg-desktop-portal: Fix configuration file search.
From: Maxim Cournoyer <[email-masked]>
To: aurtzy <[email-masked]>
Cc: John Kehayias <[email-masked]>, [email-masked], Rodion Goritskov <[email-masked]>
Date: Wed, 05 Mar 2025 14:33:02 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

aurtzy <[email-masked]> writes:

> From: Rodion Goritskov <[email-masked]>
>
> * gnu/local.mk: Add patch.
> * gnu/packages/freedesktop.scm (xdg-desktop-portal): Add patch.
> * gnu/packages/patches/xdg-desktop-portal-disable-configuration-search-exit.patch: New file
>
> Change-Id: Idd637f5613e7d1403fc3a0feeff53a7931e68fc6

Applied, thanks to Rodion and you!

-- 
Thanks,
Maxim

Subject: [PATCH 0/2] Potential fix for the latest xdg-desktop-portal
From: Rodion Goritskov <[email-masked]>
To: [email-masked]
Cc: Rodion Goritskov <[email-masked]>
Date: Fri, 27 Sep 2024 23:17:16 +0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello!

The problem with the xdg-desktop-portal is due to the configuration changes introduced in this commit [1].
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).

It's a bit hacky, but works fine.

[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
-- 
2.46.0