From patchwork Sun Apr 18 13:17:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Brendan Tildesley X-Patchwork-Id: 28644 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E275327BC78; Sun, 18 Apr 2021 14:18:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6B27927BC6C for ; Sun, 18 Apr 2021 14:18:10 +0100 (BST) Received: from localhost ([::1]:56400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lY7JR-0004OK-HY for patchwork@mira.cbaines.net; Sun, 18 Apr 2021 09:18:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45072) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lY7JK-0004O1-9X for guix-patches@gnu.org; Sun, 18 Apr 2021 09:18:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34159) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lY7JK-0005jg-2A for guix-patches@gnu.org; Sun, 18 Apr 2021 09:18:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lY7JJ-0008S4-UC for guix-patches@gnu.org; Sun, 18 Apr 2021 09:18:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47870] [PATCH 1/2] gnu: polkit-gnome: Add autostart .desktop file. References: <35342344.77101.1618751631600@office.mailbox.org> In-Reply-To: <35342344.77101.1618751631600@office.mailbox.org> Resent-From: Brendan Tildesley Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 18 Apr 2021 13:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47870 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47870@debbugs.gnu.org Received: via spool by 47870-submit@debbugs.gnu.org id=B47870.161875188032473 (code B ref 47870); Sun, 18 Apr 2021 13:18:01 +0000 Received: (at 47870) by debbugs.gnu.org; 18 Apr 2021 13:18:00 +0000 Received: from localhost ([127.0.0.1]:45704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lY7JE-0008Rd-Cj for submit@debbugs.gnu.org; Sun, 18 Apr 2021 09:18:00 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:13480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lY7JB-0008RB-EH for 47870@debbugs.gnu.org; Sun, 18 Apr 2021 09:17:54 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4FNVqb4PwLzQjwT for <47870@debbugs.gnu.org>; Sun, 18 Apr 2021 15:17:47 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brendan.scot; s=MBO0001; t=1618751863; 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=anvkMcQW4jeNGYqKfqEBfDKk6ZdsiZ3cM5E0eOhIABA=; b=e+L14jIsLD/ajrncMnzW0g5vaiRPtugxuJva2QCkYmeK/dFM9v58TrBexxhtrsMo3uh8PP gVkcK+Rfy8YDzNZwT2411YK0byyxklMjv6y3aiWyR5FToURjheBxbfIRLTVpr7Ln3JnE3b 4KjLvuWzHZGFGtx4n85OmX4o0nTfvj0G1+Yu7kM0BqQUhgizK6Oe1pkNalmPuKkztFc1YX D7wzB3tvQ+6A2ZCqttVW0cNqsHvWeVLlHPNduiVXUZ+e95aqTeikcMUzUhvSfC5mI6LMQg pZhnSM/otV/XFcPqj3hrqxUIvdXJjwf9obYA765qRgtaGdL2B3Vo4hZzk6pEdw== Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de [80.241.56.122]) (amavisd-new, port 10030) with ESMTP id 6CGVPS5wvU7l for <47870@debbugs.gnu.org>; Sun, 18 Apr 2021 15:17:40 +0200 (CEST) From: Brendan Tildesley Date: Sun, 18 Apr 2021 23:17:26 +1000 Message-Id: <20210418131727.6104-1-mail@brendan.scot> MIME-Version: 1.0 X-MBO-SPAM-Probability: X-Rspamd-Score: -11.86 / 15.00 / 15.00 X-Rspamd-Queue-Id: 5EFFE17FD X-Rspamd-UID: d04a33 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/polkit.scm (polkit-gnome): [inputs]: Source a translated .desktop file from Arch Linux. [arguments]: Install the .desktop file into /etc/autostart and set OnlyShowIn to XFCE so it will be autostarted only by XFCE. [description]: Add a note clarifying that this package is currently only used for XFCE, not GNOME. --- gnu/packages/polkit.scm | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/gnu/packages/polkit.scm b/gnu/packages/polkit.scm index d868aceec2..1c5173921c 100644 --- a/gnu/packages/polkit.scm +++ b/gnu/packages/polkit.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2017 Huang Ying ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Ricardo Wurmus +;;; Copyright © 2021 Brendan Tildesley ;;; ;;; This file is part of GNU Guix. ;;; @@ -183,12 +184,42 @@ easily with PolicyKit.") "0sckmcbxyj6sbrnfc5p5lnw27ccghsid6v6wxq09mgxqcd4lk10p")))) (build-system gnu-build-system) (inputs `(("gtk+" ,gtk+) - ("polkit" ,polkit))) + ("polkit" ,polkit) + ("desktop-file" + ,(origin + (method url-fetch) + (uri + (string-append + "https://raw.githubusercontent.com/archlinux/svntogit-community/" + "8963650797cfe0383ef510e9c0492b2cb22a2593/repos/community-x86_64/" + "polkit-gnome-authentication-agent-1.desktop")) + (sha256 + (base32 + "1rqy8jf01idaqnyrzjaapr7pzx8zg2x9kmw70n1p9cpalhiwfx2h")))))) (native-inputs `(("intltool" ,intltool) ("pkg-config" ,pkg-config))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'install 'install-autostart-file + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (autostart-dir (string-append out "/etc/xdg/autostart")) + (desktop (string-append + autostart-dir + "/polkit-gnome-authentication-agent-1.desktop"))) + (mkdir-p autostart-dir) + (copy-file (assoc-ref inputs "desktop-file") desktop) + (substitute* desktop + (("^Exec=.*") + (string-append + "Exec=" out "/libexec/polkit-gnome-authentication-agent-1\n")) + ;; This will mean the agent will only be started in XFCE. + (("^OnlyShowIn=.*") "OnlyShowIn=XFCE;\n")))))))) (synopsis "Legacy polkit authentication agent for GNOME") - (description "PolicyKit-gnome provides a D-Bus session bus service -that is used to bring up authentication dialogs used for obtaining -privileges.") + (description "PolicyKit-gnome provides a D-Bus session bus service that +is used to bring up authentication dialogs used for obtaining privileges. +PolicyKit-gnome is no longer used in GNOME but has become the default agent +for XFCE.") (home-page "https://www.freedesktop.org/wiki/Software/polkit/") (license lgpl2.0+)))