From nobody Tue Mar 5 07:47:17 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tpnhj4Mwnz5C5PR; Tue, 5 Mar 2024 07:47:17 +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 4Tpnhj2SbPz4H53; Tue, 5 Mar 2024 07:47:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709624837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x1a/kVyUsOI2m47imHHxAIppCWlkLjqcCW9Nzb1uHWI=; b=q1ZPlI9u5UrH0unnE1l3nvTmbGp0rt3kqy2kYE1R3wQHXR6ePOsaGAhefElgLCWkjFKxPL ruNdNj21SXjv1I6ex+kMAyh/UpzlIA2CjtHHnQMKnuwm04BlA/o+7LaFfKZ3/9KOggbR1M tUoxq6MxzBwRO9eHLoU/OvQ1v2KLwwohYzIJ0nK5vUA+c4L1w7MwBkveVd+86Z0oLJV0qL EFNPsGUKy1d2BHWRVio+U5QVoenvQUZNfrKpNCVJVOnir8el7pir1tVh8OvEpmKfWxPYy3 RK+jh5EvRp2aPXMJo+1HV5EzOyKxsBsXmQUf7N6RAGSUGrPLDhsqd3GKG+j1Cw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709624837; a=rsa-sha256; cv=none; b=fWM5gl0xMDzqXunMyAv+YV4ofaOBseXjeM1pcQoMaQABcg0+rSzdVz4YQtOITSizyxliug zbN8e0w4IEFa+pqlJse8uOYXYhcJOGDpQrRtpewNicmJpVdEPgsSEEVG/cTrjzg3PdkHjd L5hVRQsPVToo9nLHWwtKjo/QTHs6cqntVkrAa5vGN5awZq4jkd7f08Srq6BCUD++5lMZGC 3Sy2g0vtObnVGh+kCCz0SCA82ZYx12KoAQfmzi9aWAzQfLlUWthcA1e9zRnSUSlyVTd/Yq zR2a+VQ6ZutdCSyRllN1mbppFZS6DeZxSzQXhhhmcm8LyWErV2Ok2lmVsHKZdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709624837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x1a/kVyUsOI2m47imHHxAIppCWlkLjqcCW9Nzb1uHWI=; b=FPGnZ1J/T6VkRWcJWEC77CktJN1fBmchDgSyyKXy2UmQsFpOwn2zeSu/pU/z5xZ5r9YK5D aU/zY3QNkmcazG6LQydJopaKQ+028gYKbg1tQrPA8jJg9OUvyHwIiBDBhQ05zbXC34KbSS V65kswOGmLnfvciMXZA02/OhEOWiRxv7gzmTTOmz5vwhbjx9qClZVLKu0VlY7nqTDjHQ98 q951QydUEfU3w24lIcSSAeUR/FOhH+CpBu1jZi8qZdO9ERyjcTKQlpqRVJLx3bKasRgaFc aegZuaGPmbuh5V1V+ndlBPGoqiFBmLqGOEMP5b2cZgBfx4JFz8/KJzSf+I+XVg== 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 4Tpnhj20mpzxXJ; Tue, 5 Mar 2024 07:47:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4257lH4A015405; Tue, 5 Mar 2024 07:47:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4257lHKc015402; Tue, 5 Mar 2024 07:47:17 GMT (envelope-from git) Date: Tue, 5 Mar 2024 07:47:17 GMT Message-Id: <202403050747.4257lHKc015402@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Gleb Popov Subject: git: 4fd6cc42434a - main - deskutils/xdg-desktop-portal: Improve the patch a bit. List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arrowd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4fd6cc42434a3945c93ca23ea89d3ac86295ac28 Auto-Submitted: auto-generated The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=4fd6cc42434a3945c93ca23ea89d3ac86295ac28 commit 4fd6cc42434a3945c93ca23ea89d3ac86295ac28 Author: Gleb Popov AuthorDate: 2024-03-04 20:09:31 +0000 Commit: Gleb Popov CommitDate: 2024-03-05 07:46:15 +0000 deskutils/xdg-desktop-portal: Improve the patch a bit. Returning NULL from parse_app_info_from_flatpak_info() makes more sense, as we don't yet have any nothing of a "containerized" applications. Sponsored by: Serenity Cybersecurity, LLC --- deskutils/xdg-desktop-portal/Makefile | 1 + .../xdg-desktop-portal/files/patch-src_xdp-utils.c | 32 ++++++++++++++++++++ .../files/patch-zzz-disable_flatpak_and_snap | 34 ---------------------- 3 files changed, 33 insertions(+), 34 deletions(-) diff --git a/deskutils/xdg-desktop-portal/Makefile b/deskutils/xdg-desktop-portal/Makefile index 726224b9336e..157a17b41d1b 100644 --- a/deskutils/xdg-desktop-portal/Makefile +++ b/deskutils/xdg-desktop-portal/Makefile @@ -1,5 +1,6 @@ PORTNAME= xdg-desktop-portal PORTVERSION= 1.18.2 +PORTREVISION= 1 CATEGORIES= deskutils wayland MAINTAINER= arrowd@FreeBSD.org diff --git a/deskutils/xdg-desktop-portal/files/patch-src_xdp-utils.c b/deskutils/xdg-desktop-portal/files/patch-src_xdp-utils.c new file mode 100644 index 000000000000..30e10ea526a5 --- /dev/null +++ b/deskutils/xdg-desktop-portal/files/patch-src_xdp-utils.c @@ -0,0 +1,32 @@ +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.orig 2023-11-22 21:48:20 UTC ++++ src/xdp-utils.c +@@ -587,6 +587,7 @@ parse_app_info_from_flatpak_info (int pid, GError **er + static XdpAppInfo * + parse_app_info_from_flatpak_info (int pid, GError **error) + { ++#ifndef __FreeBSD__ + g_autofree char *root_path = NULL; + int root_fd = -1; + int info_fd = -1; +@@ -689,6 +690,9 @@ parse_app_info_from_flatpak_info (int pid, GError **er + app_info->u.flatpak.keyfile = g_steal_pointer (&metadata); + + return g_steal_pointer (&app_info); ++#else ++ return NULL; ++#endif // __FreeBSD__ + } + + int 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 deleted file mode 100644 index c8289ab96b5b..000000000000 --- a/deskutils/xdg-desktop-portal/files/patch-zzz-disable_flatpak_and_snap +++ /dev/null @@ -1,34 +0,0 @@ -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 ();