GNU bug report logs -
#73520
[PATCH 0/2] Potential fix for the latest xdg-desktop-portal
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 73520 in the body.
You can then email your comments to 73520 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#73520
; Package
guix-patches
.
(Fri, 27 Sep 2024 21:33:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Rodion Goritskov <rodion.goritskov <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Fri, 27 Sep 2024 21:33:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
rodion.goritskov <at> gmail.com, guix-patches <at> gnu.org
:
bug#73520
; Package
guix-patches
.
(Sat, 28 Sep 2024 07:45:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 73520 <at> debbugs.gnu.org (full text, mbox):
* gnu/local.mk: Add patch.
* gnu/packages/freedesktop.scm (xdg-desktop-portal-next): Add patch.
* gnu/packages/patches/xdg-desktop-portal-disable-configuration-search-exit.patch: New file
Change-Id: Idd637f5613e7d1403fc3a0feeff53a7931e68fc6
---
gnu/local.mk | 1 +
gnu/packages/freedesktop.scm | 5 ++--
...al-disable-configuration-search-exit.patch | 28 +++++++++++++++++++
3 files changed, 32 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/xdg-desktop-portal-disable-configuration-search-exit.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index c2027f9eeb..dc08ff2b82 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2311,6 +2311,7 @@ dist_patch_DATA = \
%D%/packages/patches/wpa-supplicant-dbus-group-policy.patch \
%D%/packages/patches/x265-arm-flags.patch \
%D%/packages/patches/xdg-desktop-portal-disable-portal-tests.patch\
+ %D%/packages/patches/xdg-desktop-portal-disable-configuration-search-exit.patch\
%D%/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch\
%D%/packages/patches/xen-docs-use-predictable-ordering.patch \
%D%/packages/patches/xen-remove-config.gz-timestamp.patch \
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 23ed788689..73bd5c8a3d 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -3086,8 +3086,9 @@ (define-public xdg-desktop-portal-next
(sha256
(base32
"0r8y8qmzcfj7b7brqcxr9lg8pavfds815ffvj0kqc378fhgaln5q"))
- ;; Disable portal tests since they try to use fuse.
- (patches (search-patches "xdg-desktop-portal-disable-portal-tests.patch"))))
+ (patches (search-patches
+ "xdg-desktop-portal-disable-portal-tests.patch"
+ "xdg-desktop-portal-disable-configuration-search-exit.patch"))))
(build-system meson-build-system)
(arguments
(substitute-keyword-arguments (package-arguments xdg-desktop-portal)
diff --git a/gnu/packages/patches/xdg-desktop-portal-disable-configuration-search-exit.patch b/gnu/packages/patches/xdg-desktop-portal-disable-configuration-search-exit.patch
new file mode 100644
index 0000000000..4cb77de806
--- /dev/null
+++ b/gnu/packages/patches/xdg-desktop-portal-disable-configuration-search-exit.patch
@@ -0,0 +1,28 @@
+From 37003d1f99246c88cbe7cf2f83616642e0fdf3fb Mon Sep 17 00:00:00 2001
+From: Rodion Goritskov <rodion.goritskov <at> gmail.com>
+Date: Fri, 27 Sep 2024 00:44:07 +0400
+Subject: [PATCH] portal-impl: Check if there are any configuration files in XDG_DESKTOP_PORTAL_DIR before exiting configuration search
+
+---
+ src/portal-impl.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/src/portal-impl.c b/src/portal-impl.c
+index 8c1fd53..8708409 100644
+--- a/src/portal-impl.c
++++ b/src/portal-impl.c
+@@ -438,9 +438,8 @@ load_portal_configuration (gboolean opt_verbose)
+
+ if (portal_dir != NULL)
+ {
+- load_config_directory (portal_dir, desktops, opt_verbose);
+- /* All other config directories are ignored when this is set */
+- return;
++ if (load_config_directory (portal_dir, desktops, opt_verbose))
++ return;
+ }
+
+ /* $XDG_CONFIG_HOME/xdg-desktop-portal/(DESKTOP-)portals.conf */
+--
+2.46.0
+
--
2.46.0
Information forwarded
to
rodion.goritskov <at> gmail.com, guix-patches <at> gnu.org
:
bug#73520
; Package
guix-patches
.
(Sat, 28 Sep 2024 07:45:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 73520 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/freedesktop.scm (xdg-desktop-portal): Update to 1.18.4.
* gnu/packages/telegram.scm (telegram-desktop): Change native-input to xdg-desktop-portal.
Change-Id: I25ac64ce62f994e1e2cffbdbd8e8a7779a6b9658
---
gnu/packages/freedesktop.scm | 78 ++++++++++++------------------------
gnu/packages/telegram.scm | 2 +-
2 files changed, 26 insertions(+), 54 deletions(-)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 73bd5c8a3d..f86c611c57 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -3012,7 +3012,7 @@ (define-public libportal
(define-public xdg-desktop-portal
(package
(name "xdg-desktop-portal")
- (version "1.16.0")
+ (version "1.18.4")
(source
(origin
(method url-fetch)
@@ -3021,30 +3021,34 @@ (define-public xdg-desktop-portal
version "/xdg-desktop-portal-" version ".tar.xz"))
(sha256
(base32
- "06cczlh39kc41rvav06v37sad827y61rffy3v29i918ibj8sahav"))))
- (build-system gnu-build-system)
+ "0r8y8qmzcfj7b7brqcxr9lg8pavfds815ffvj0kqc378fhgaln5q"))
+ (patches (search-patches
+ "xdg-desktop-portal-disable-portal-tests.patch"
+ "xdg-desktop-portal-disable-configuration-search-exit.patch"))))
+ (build-system meson-build-system)
(native-inputs
- `(("pkg-config" ,pkg-config)
- ("autoconf" ,autoconf)
- ("automake" ,automake)
- ("libtool" ,libtool)
- ("glib:bin" ,glib "bin")
- ("which" ,which)
- ("gettext" ,gettext-minimal)))
+ (list pkg-config
+ `(,glib "bin")
+ gettext-minimal
+ python
+ python-dbusmock
+ python-pytest
+ python-pytest-xdist))
(inputs
- `(("gdk-pixbuf" ,gdk-pixbuf)
- ("glib" ,glib)
- ("flatpak" ,flatpak)
- ("fontconfig" ,fontconfig)
- ("json-glib" ,json-glib)
- ("libportal" ,libportal)
- ("dbus" ,dbus)
- ("geoclue" ,geoclue)
- ("pipewire" ,pipewire)
- ("fuse" ,fuse)))
+ (list bubblewrap
+ gdk-pixbuf
+ glib
+ flatpak
+ fontconfig
+ json-glib
+ libportal
+ dbus
+ geoclue
+ pipewire
+ fuse))
(arguments
`(#:configure-flags
- (list "--with-systemd=no")
+ (list "-Dsystemd=disabled")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'po-chmod
@@ -3073,38 +3077,6 @@ (define-public xdg-desktop-portal
and others.")
(license license:lgpl2.1+)))
-(define-public xdg-desktop-portal-next
- (package
- (inherit xdg-desktop-portal)
- (version "1.18.4")
- (source
- (origin
- (method url-fetch)
- (uri (string-append
- "https://github.com/flatpak/xdg-desktop-portal/releases/download/"
- version "/xdg-desktop-portal-" version ".tar.xz"))
- (sha256
- (base32
- "0r8y8qmzcfj7b7brqcxr9lg8pavfds815ffvj0kqc378fhgaln5q"))
- (patches (search-patches
- "xdg-desktop-portal-disable-portal-tests.patch"
- "xdg-desktop-portal-disable-configuration-search-exit.patch"))))
- (build-system meson-build-system)
- (arguments
- (substitute-keyword-arguments (package-arguments xdg-desktop-portal)
- ((#:configure-flags _ ''())
- #~(list "-Dsystemd=disabled"))))
- (native-inputs
- (list pkg-config
- `(,glib "bin")
- gettext-minimal
- python
- python-dbusmock
- python-pytest
- python-pytest-xdist))
- (inputs (modify-inputs (package-inputs xdg-desktop-portal)
- (prepend bubblewrap)))))
-
(define-public xdg-desktop-portal-gtk
(package
(name "xdg-desktop-portal-gtk")
diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index cfcd92fcbc..c0b2122bf5 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -537,7 +537,7 @@ (define-public telegram-desktop
`(,gtk+ "bin")
pkg-config
python-wrapper
- xdg-desktop-portal-next))
+ xdg-desktop-portal))
(inputs
(list abseil-cpp-cxxstd17
alsa-lib
--
2.46.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73520
; Package
guix-patches
.
(Fri, 17 Jan 2025 06:44:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 73520 <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73520
; Package
guix-patches
.
(Sun, 19 Jan 2025 12:28:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 73520 <at> debbugs.gnu.org (full text, mbox):
Hi Rodion (and John!),
John Kehayias <john.kehayias <at> protonmail.com> writes:
[...]
>> 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?
I'm not Rodion, but I assume that's what they meant!
>> 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?
Is it expected that XDG_DESKTOP_PORTAL_DIR as set by Guix can lack a
any *-portals.conf files? That seems odd.
If there's a good reason for that to happen (a valid use case), then an
issue should be opened upstream to start some conversation about this
change of behavior and the best way it should be addressed.
--
Thanks,
Maxim
Information forwarded
to
rodion.goritskov <at> gmail.com, john.kehayias <at> protonmail.com, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org
:
bug#73520
; Package
guix-patches
.
(Sat, 01 Mar 2025 23:55:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 73520 <at> debbugs.gnu.org (full text, mbox):
From: Rodion Goritskov <rodion.goritskov <at> gmail.com>
* 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
---
Hi,
Coming from discussion in #75676 [1], this is a v2 of Rodion's work rebased on
the gnome-team branch, which has bumped xdg-desktop-portal to 1.18.4.
[1] <https://issues.guix.gnu.org/75676#15>
Cheers,
aurtzy
gnu/local.mk | 1 +
gnu/packages/freedesktop.scm | 6 +++--
...al-disable-configuration-search-exit.patch | 27 +++++++++++++++++++
3 files changed, 32 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/xdg-desktop-portal-disable-configuration-search-exit.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index eb7817ca82..43a5e42097 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2413,6 +2413,7 @@ dist_patch_DATA = \
%D%/packages/patches/wpa-supplicant-dbus-group-policy.patch \
%D%/packages/patches/x265-arm-flags.patch \
%D%/packages/patches/xdg-desktop-portal-disable-portal-tests.patch\
+ %D%/packages/patches/xdg-desktop-portal-disable-configuration-search-exit.patch\
%D%/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch\
%D%/packages/patches/xf86-video-siliconmotion-fix-ftbfs.patch \
%D%/packages/patches/xfig-Enable-error-message-for-missing-libraries.patch \
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index f8e7e198ae..726cd161b2 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -3214,8 +3214,10 @@ (define-public xdg-desktop-portal
(sha256
(base32
"0r8y8qmzcfj7b7brqcxr9lg8pavfds815ffvj0kqc378fhgaln5q"))
- ;; Disable portal tests since they try to use fuse.
- (patches (search-patches "xdg-desktop-portal-disable-portal-tests.patch"))))
+ (patches (search-patches
+ ;; Disable portal tests since they try to use fuse.
+ "xdg-desktop-portal-disable-portal-tests.patch"
+ "xdg-desktop-portal-disable-configuration-search-exit.patch"))))
(build-system meson-build-system)
(arguments
`(#:configure-flags
diff --git a/gnu/packages/patches/xdg-desktop-portal-disable-configuration-search-exit.patch b/gnu/packages/patches/xdg-desktop-portal-disable-configuration-search-exit.patch
new file mode 100644
index 0000000000..eba07f8c35
--- /dev/null
+++ b/gnu/packages/patches/xdg-desktop-portal-disable-configuration-search-exit.patch
@@ -0,0 +1,27 @@
+From 37003d1f99246c88cbe7cf2f83616642e0fdf3fb Mon Sep 17 00:00:00 2001
+From: Rodion Goritskov <rodion.goritskov <at> gmail.com>
+Date: Fri, 27 Sep 2024 00:44:07 +0400
+Subject: [PATCH] portal-impl: Check if there are any configuration files in XDG_DESKTOP_PORTAL_DIR before exiting configuration search
+
+---
+ src/portal-impl.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/src/portal-impl.c b/src/portal-impl.c
+index 8c1fd53..8708409 100644
+--- a/src/portal-impl.c
++++ b/src/portal-impl.c
+@@ -438,9 +438,8 @@ load_portal_configuration (gboolean opt_verbose)
+
+ if (portal_dir != NULL)
+ {
+- load_config_directory (portal_dir, desktops, opt_verbose);
+- /* All other config directories are ignored when this is set */
+- return;
++ if (load_config_directory (portal_dir, desktops, opt_verbose))
++ return;
+ }
+
+ /* $XDG_CONFIG_HOME/xdg-desktop-portal/(DESKTOP-)portals.conf */
+--
+2.46.0
base-commit: 87d0295b308f354ec1c25212f6937b39eb8ae8bf
--
2.48.1
Reply sent
to
Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
:
You have taken responsibility.
(Wed, 05 Mar 2025 05:34:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Rodion Goritskov <rodion.goritskov <at> gmail.com>
:
bug acknowledged by developer.
(Wed, 05 Mar 2025 05:34:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 73520-done <at> debbugs.gnu.org (full text, mbox):
Hi,
aurtzy <aurtzy <at> gmail.com> writes:
> From: Rodion Goritskov <rodion.goritskov <at> gmail.com>
>
> * 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
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 02 Apr 2025 11:24:17 GMT)
Full text and
rfc822 format available.
This bug report was last modified 74 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.