From patchwork Fri Apr 11 19:54:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rutherther X-Patchwork-Id: 41593 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 F201C27BC4B; Fri, 11 Apr 2025 20:55:17 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5C25827BC49 for ; Fri, 11 Apr 2025 20:55:17 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u3KSw-00074S-W1; Fri, 11 Apr 2025 15:55:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u3KSv-00072e-Ak for guix-patches@gnu.org; Fri, 11 Apr 2025 15:55:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u3KSv-0003Wt-0T for guix-patches@gnu.org; Fri, 11 Apr 2025 15:55:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=YyKCwkJw55m89t/JDrb5V0AqFl+V89MD1VeHT1OyqGg=; b=WT7TuO+VIFWvF+jgPfhnFUBuZ8dDDRxN82EFdvOqp8y8sdAY2oV3gQqo8/m1/Cb31sqUGoYBX78L6wFGcozRmAWXtRM2p/y0VFuLJHsdDi2+xV0ULhjTdyORsjYxY+qlJt73sSKcYp/ZMxB+KiY7Bu7SmqCuptXO8KbLoKLyGck7URePkiKy3/dXQXUiI8fOoqk1OkbQ4Ze8E2IYz/894mGxYPJrsWc79uHu2zuPYfDtJQk9CB8POjN0WYsXTgd3x2ioDn9UjH2f2YT3VD0WfUk0471lNQ4p0CrGWZo0yiyPKs9WYhbO/aAvCqtbUI4goVVDlEMaRHJoqp1XAOjLiw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u3KSs-00062J-9X; Fri, 11 Apr 2025 15:55:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77752] [PATCH v2 1/2] gnu: fwupd: Add elogind input References: In-Reply-To: Resent-From: Rutherther Original-Sender: "Debbugs-submit" Resent-CC: rutherther@ditigal.xyz, efraim@flashner.co.il, vagrant@debian.org, guix-patches@gnu.org Resent-Date: Fri, 11 Apr 2025 19:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77752 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77752@debbugs.gnu.org Cc: Rutherther , Rutherther , Efraim Flashner , Vagrant Cascadian X-Debbugs-Original-Xcc: Rutherther , Efraim Flashner , Vagrant Cascadian Received: via spool by 77752-submit@debbugs.gnu.org id=B77752.174440125723115 (code B ref 77752); Fri, 11 Apr 2025 19:55:02 +0000 Received: (at 77752) by debbugs.gnu.org; 11 Apr 2025 19:54:17 +0000 Received: from localhost ([127.0.0.1]:51857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u3KS9-00060k-BY for submit@debbugs.gnu.org; Fri, 11 Apr 2025 15:54:17 -0400 Received: from ditigal.xyz ([78.46.201.50]:49944 helo=mail.ditigal.xyz) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u3KS7-00060N-Mn for 77752@debbugs.gnu.org; Fri, 11 Apr 2025 15:54:16 -0400 Received: by cerebrum (OpenSMTPD) with ESMTPSA id 5cb893ca (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Fri, 11 Apr 2025 19:54:06 +0000 (UTC) Date: Fri, 11 Apr 2025 21:54:00 +0200 Message-ID: <7e059e76336daf44b6808bda4d87a922553cdb5d.1744401028.git.rutherther@ditigal.xyz> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ditigal.xyz; i=@ditigal.xyz; q=dns/txt; s=20240917; t=1744401246; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : from; bh=ZOBDaz9xml5FuYExtJ6Y+wQptyN6rLFfC29HOWAt/RI=; b=I2NSMWCQLPBLrlWynwGrhFB+cXg/qgWRZsrOzi/CVgM4zcKTp6zu3F2+IaYlItOZ+adbG 5w9Vcm9dWYq4X8CFPY2PnF03PckYJHASsZZRjycP4Nyv2VjmN2oQLLwrRnf1n2r6EIU0OMf L9QbdhEsl5ffNiC6X9LQH+UPg1pK4TY= 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: , Reply-to: Rutherther X-ACL-Warn: , Rutherther via Guix-patches X-Patchwork-Original-From: Rutherther via Guix-patches via From: Rutherther Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches The fwupd package doesn't contain the dbus service in share/dbus-1/system-service, that is because it is installed only conditionally when elogind is available. This will introduce the service in the output, so user's won't have to start fwupd themselves, it will get started by dbus on demand. I don't think this should break anything for systems that do not use elogin, the only places this is used will fall back to error: - https://github.com/fwupd/fwupd/blob/1.8.14/src/fu-util-common.c#L242, - https://github.com/fwupd/fwupd/blob/1.8.14/src/fu-util-common.c#L287 Meaning users without elogind will get error either way, just a different kind of error. * gnu/packages/firmware.scm: (fwupd)[inputs]: Add elogind Change-Id: Id44001de6950bb6b39f1b3bba316a08ce6640fc0 --- gnu/packages/firmware.scm | 2 ++ 1 file changed, 2 insertions(+) base-commit: 13aeb3abf9a8f4a4db1afaacdac275b5b564afdc diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index f04edefafe..5e89edc621 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -65,6 +65,7 @@ (define-module (gnu packages firmware) #:use-module (gnu packages embedded) #:use-module (gnu packages flashing-tools) #:use-module (gnu packages flex) + #:use-module (gnu packages freedesktop) #:use-module (gnu packages gawk) #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) @@ -289,6 +290,7 @@ (define-public fwupd gettext-minimal)) (inputs (append (list bash-completion + elogind libgudev libxmlb sqlite From patchwork Fri Apr 11 19:54:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rutherther X-Patchwork-Id: 41594 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 5110C27BC4B; Fri, 11 Apr 2025 20:55:31 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 087BD27BC49 for ; Fri, 11 Apr 2025 20:55:31 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u3KSu-000729-V2; Fri, 11 Apr 2025 15:55:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u3KSu-00071Q-1f for guix-patches@gnu.org; Fri, 11 Apr 2025 15:55:04 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u3KSt-0003P6-LR for guix-patches@gnu.org; Fri, 11 Apr 2025 15:55:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=6Xhp7lleIXVHhSFandT2xDxJG5E7w6BLjUKQ1CLhzWU=; b=D0eg5elmX91wO/Ytrlf9i6iuWP2Y1TBkvw9JH6wxLZyGjqQhYEhSlxgUEsCDJKsTpTQf2vMzsxFR12PyUvjRPXXjR/VgIRb9uxii024kPFgM4QhL3P2hwsI06F6AYpbrWIqgZfuYmkliODnTxyEKymdikaf7AWC3aviBSc/tlWH5hZdxhkOudTg4KALJ8BFDnuFm2Sd8WFj321qDgiS0ZwXhJZfWx9jMZ+rZxrGcb/vs1yUvw5keRzOrTRjgM/G95o9K7OVIcKTXZHEKMSfnUJTRsUU7mTpf5tEjNaBLkpuIOF6fVMnF72zKvmnl5dCntYKyO8e/tZswSepaYYKyXQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u3KSs-00062R-Pj; Fri, 11 Apr 2025 15:55:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77752] [PATCH v2 2/2] gnu: fwupd: Check polkit actions at correct location Resent-From: Rutherther Original-Sender: "Debbugs-submit" Resent-CC: rutherther@ditigal.xyz, efraim@flashner.co.il, vagrant@debian.org, guix-patches@gnu.org Resent-Date: Fri, 11 Apr 2025 19:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77752 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77752@debbugs.gnu.org Cc: Rutherther , Rutherther , Efraim Flashner , Vagrant Cascadian X-Debbugs-Original-Xcc: Rutherther , Efraim Flashner , Vagrant Cascadian Received: via spool by 77752-submit@debbugs.gnu.org id=B77752.174440126223126 (code B ref 77752); Fri, 11 Apr 2025 19:55:02 +0000 Received: (at 77752) by debbugs.gnu.org; 11 Apr 2025 19:54:22 +0000 Received: from localhost ([127.0.0.1]:51859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u3KSD-00060w-NN for submit@debbugs.gnu.org; Fri, 11 Apr 2025 15:54:21 -0400 Received: from ditigal.xyz ([2a01:4f8:1c1b:6a1c::]:34906 helo=mail.ditigal.xyz) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u3KS8-00060M-9P for 77752@debbugs.gnu.org; Fri, 11 Apr 2025 15:54:16 -0400 Received: by cerebrum (OpenSMTPD) with ESMTPSA id c067db04 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Fri, 11 Apr 2025 19:54:10 +0000 (UTC) Date: Fri, 11 Apr 2025 21:54:01 +0200 Message-ID: <8957beb35218528cc1b4a27c7a29f151a53caccb.1744401028.git.rutherther@ditigal.xyz> X-Mailer: git-send-email 2.49.0 In-Reply-To: <7e059e76336daf44b6808bda4d87a922553cdb5d.1744401028.git.rutherther@ditigal.xyz> References: <7e059e76336daf44b6808bda4d87a922553cdb5d.1744401028.git.rutherther@ditigal.xyz> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ditigal.xyz; i=@ditigal.xyz; q=dns/txt; s=20240917; t=1744401250; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : from; bh=wwYZcu4v0Vqn+mLKV1kDN0hKYSqDBIwHtIRmxrLkats=; b=KWuLo9IYn4goLL3BCmbxcG30iA8LWBXZdQVa5LbKDEC5CLBK39/83eYgsvRH4RWlr3vHM Skr4Q0lj34aDbZIRe88zocFgSfgsvuvUk7hakpWhSqkaG/TpTn3xOlt71mKmQkuM+g/5aT+ pzbEJIWqXbXid6wUAFLwuuyn+tLc4e8= 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: , Reply-to: Rutherther X-ACL-Warn: , Rutherther via Guix-patches X-Patchwork-Original-From: Rutherther via Guix-patches via From: Rutherther Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches The polkit rules check in fwupdmgr doesn't make sense with Guix packaging, as it's checking if there is fwupd policy files in the polkit's store path. This will never be true, and the check will always fail. One fix would be to skip the check completely. But that seems unnecessary as the polkit actions are always in /etc/polkit-1/actions on the Guix system. On foreign distros, it will be necessary to turn the check off manually by FWUPD_POLKIT_NOCHECK=1. But it's important to note that this was the case even till now, there is no new breakage. I think it's unlikely someone will be using fwupd package from Guix on foreign distros anyway. * gnu/packages/firmware.scm (fwupd)[arguments]{phases}: substitute polkit actions directory to point to /etc/polkit-1/actions Change-Id: Ia29d7a32f68a3da7951f45fe823e3ab8059cb670 --- gnu/packages/firmware.scm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 5e89edc621..715b9ab132 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -250,7 +250,19 @@ (define-public fwupd (find-files ".")) (substitute* "src/fu-self-test.c" (("/bin/sh") - (which "sh"))))) + (which "sh"))) + ;; fwupdmgr checks for missing polkit actions, prints + ;; error message and exits if the polkit actions are + ;; not found. + ;; The path points to gnu store path of polkit and + ;; there are no actions there. Point this to the actual + ;; location used on Guix System. This will still fail on + ;; foreign distros as /usr/share/polkit-1 is used mostly. + (substitute* "src/fu-util.c" + (("g_autofree gchar \\*directory = NULL;") + "") + (("directory = fu_path_from_kind\\(FU_PATH_KIND_POLKIT_ACTIONS\\)") + "const gchar* directory = \"/etc/polkit-1/actions\"")))) ;; These two files are zipped by Python, so need a newer timestamp. (add-after 'unpack 'newer-timestamps-for-python-zip (lambda _