From owner-dev-commits-ports-main@freebsd.org Thu Jul 22 16:09:50 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C19CD65FB83; Thu, 22 Jul 2021 16:09:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GVy8G4zcqz3ngQ; Thu, 22 Jul 2021 16:09:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8978A14BFE; Thu, 22 Jul 2021 16:09:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 16MG9o1T096958; Thu, 22 Jul 2021 16:09:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16MG9oMd096957; Thu, 22 Jul 2021 16:09:50 GMT (envelope-from git) Date: Thu, 22 Jul 2021 16:09:50 GMT Message-Id: <202107221609.16MG9oMd096957@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: "Tobias C. Berner" Subject: git: 15fc57c8377f - main - deskutils/xdg-desktop-portal: disable (broken) support for flatpak and snaps MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tcberner X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 15fc57c8377fad22b338e9e59d40c78fa0813aa2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2021 16:09:50 -0000 The branch main has been updated by tcberner: URL: https://cgit.FreeBSD.org/ports/commit/?id=15fc57c8377fad22b338e9e59d40c78fa0813aa2 commit 15fc57c8377fad22b338e9e59d40c78fa0813aa2 Author: Tobias C. Berner AuthorDate: 2021-07-22 14:36:41 +0000 Commit: Tobias C. Berner CommitDate: 2021-07-22 16:09:07 +0000 deskutils/xdg-desktop-portal: disable (broken) support for flatpak and snaps Make it possible to run firefox with KDE filedialogs. The call for parse_app_info_from_flatpak_info uses the /proc/$PID/root file to access the flatpak information file. We neither have support for /proc/$PID/root nor flatpaks or snaps. With this fix and deskutils/plasma5-xdg-desktop-portal-kde it is now possible to run firefox using the KDE file dialogs. > GTK_USE_PORTAL=1 firefox --- deskutils/xdg-desktop-portal/Makefile | 1 + .../files/patch-zzz-disable_flatpak_and_snap | 34 ++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/deskutils/xdg-desktop-portal/Makefile b/deskutils/xdg-desktop-portal/Makefile index 8619ed9cf75a..31eaac2be18c 100644 --- a/deskutils/xdg-desktop-portal/Makefile +++ b/deskutils/xdg-desktop-portal/Makefile @@ -1,5 +1,6 @@ PORTNAME= xdg-desktop-portal PORTVERSION= 1.8.1 +PORTREVISION= 1 CATEGORIES= deskutils PATCH_SITES= https://patch-diff.githubusercontent.com/raw/flatpak/xdg-desktop-portal/pull/:freebsd_compat diff --git a/deskutils/xdg-desktop-portal/files/patch-zzz-disable_flatpak_and_snap b/deskutils/xdg-desktop-portal/files/patch-zzz-disable_flatpak_and_snap new file mode 100644 index 000000000000..c8289ab96b5b --- /dev/null +++ b/deskutils/xdg-desktop-portal/files/patch-zzz-disable_flatpak_and_snap @@ -0,0 +1,34 @@ +Make it possible to run firefox with KDE filedialogs. + +The call for parse_app_info_from_flatpak_info uses the /proc/$PID/root +file to access the flatpak information file. + +We neither have support for /proc/$PID/root nor flatpaks or snaps. + +With this fix and deskutils/plasma5-xdg-desktop-portal-kde it is now possible +to run firefox using the KDE file dialogs. + +> GTK_USE_PORTAL=1 firefox + +--- src/xdp-utils.c.patched 2021-07-22 16:25:27.756116000 +0200 ++++ src/xdp-utils.c 2021-07-22 16:30:51.814245000 +0200 +@@ -630,6 +630,11 @@ + g_autoptr(XdpAppInfo) app_info = NULL; + g_autoptr(GError) local_error = NULL; + ++// On FreeBSD the main use of the xdg-portal is to be able to use ++// "native" file dialogs, say the KDE file dialogs in firefox. ++// There is no support for the application package mechanisms like ++// flatpak and snap yet. ++#ifndef __FreeBSD__ + app_info = parse_app_info_from_flatpak_info (pid, &local_error); + if (app_info == NULL && local_error) + { +@@ -646,6 +651,7 @@ + return NULL; + } + } ++#endif + + if (app_info == NULL) + app_info = xdp_app_info_new_host ();