From patchwork Thu Apr 18 18:31:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dariqq X-Patchwork-Id: 2483 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 C159527BBE9; Thu, 18 Apr 2024 19:35: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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 071A027BBEA for ; Thu, 18 Apr 2024 19:35:12 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rxWaz-0003VH-8K; Thu, 18 Apr 2024 14:34:53 -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 1rxWaw-0003V0-Ku for guix-patches@gnu.org; Thu, 18 Apr 2024 14:34:50 -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 1rxWaw-0006iM-7X for guix-patches@gnu.org; Thu, 18 Apr 2024 14:34:50 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rxWb9-0007UA-LF for guix-patches@gnu.org; Thu, 18 Apr 2024 14:35:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70460] [PATCH 0/4] Update power-profiles-daemon and add a service-type for it. Resent-From: Dariqq Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 18 Apr 2024 18:35:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70460 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70460@debbugs.gnu.org Cc: Dariqq X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.171346524828403 (code B ref -1); Thu, 18 Apr 2024 18:35:03 +0000 Received: (at submit) by debbugs.gnu.org; 18 Apr 2024 18:34:08 +0000 Received: from localhost ([127.0.0.1]:53923 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxWaE-0007Nf-Mi for submit@debbugs.gnu.org; Thu, 18 Apr 2024 14:34:08 -0400 Received: from lists.gnu.org ([2001:470:142::17]:59504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxWaA-0007MH-F8 for submit@debbugs.gnu.org; Thu, 18 Apr 2024 14:34:04 -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 1rxWZr-0003OK-3B for guix-patches@gnu.org; Thu, 18 Apr 2024 14:33:43 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rxWZo-0006Nb-Ls for guix-patches@gnu.org; Thu, 18 Apr 2024 14:33:42 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id DFE8E240027 for ; Thu, 18 Apr 2024 20:33:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1713465216; bh=EjahPK4eniQqFpPWbLfdIPJt4jPQYBN6kp8ZEl7Ji30=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=aEhRy0hzlHx8G+UWtf/V/N8d/2h2CRijSYAf2ZW9rfn6lEnn9T1VnAxIOcdPUUT5I SJN/mW24dnIlU6+oSaoeAnFxkN70SDhlcExOvOcINL9hMbtAmSOwf+hQsRUmE2RqHb x4cO22NIFhFvuhhpQOrjqbrtQvE4B562lMFzIPsiInVePjeGJtqfMGDpatM3TKCBeY 4NunnW6JvxyhkM7pETM//6xZ73zJVUP6YTyO4VBbQ4FCc/lFIsBWP0y2hamQ/dujw8 hFzMDEb0C5NdMsdyZrT6qTuvLV0PtEgNvr35Rz8VQ9iaXrak0dS4hMBs+dVNp/tBUH eAB7jWK+kKySQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VL5y743Fyz9rxM; Thu, 18 Apr 2024 20:33:35 +0200 (CEST) From: Dariqq Date: Thu, 18 Apr 2024 18:31:10 +0000 Message-ID: MIME-Version: 1.0 Received-SPF: pass client-ip=185.67.36.65; envelope-from=dariqq@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hi Guix, Here are a couple of patches that update the power-profiles-daemon to the latest release and add a corresponding service for it which will make changing power-profiles available in DEs like GNOME or via the cli tool. I am not sure if some of the python dependencies should be normal inputs rather than native inputs. The package will now also build the shell completions, manpage, docs and skip installing the systemd unit. Also I was not sure if the gtk-docs should go to a seperate doc output but this corresponds to ~0.2 MB so I didn't bother. The daemon is supposed to be a systemd unit started via dbus but just autostarting a similiar shepherd service seems fine as well and is what other distros without systemd do (i.e gentoo or void linux). I've also tried to patch the dbus service definiton to run the daemon directly and it seems to work as well which would make the shepherd service obsolete. I am not sure what the better solution is. The systemd unit specifies a 'conflict' with other power-management services like tlp but I don't think something similiar can be done for the shepherd right now. The service-type is a rather simple and has the following extensions: shepherd: Run the daemon. dbus: Make the name of the service available. polkit: Allow normal users to change power profile. profile: Make the cli tool available. activation: Create a directory. As this is my first time writing a service-type any feedback would be greatly appreciated. This would fix #69061. Dariqq (4): gnu: power-profiles-daemon: Update to 0.21. gnu: power-profiles-daemon: Build gtk-docs. gnu: power-profiles-daemon: Remove some (native) inputs. gnu: services: Add power-profiles-daemon-service-type. gnu/packages/freedesktop.scm | 45 ++++++++++++++++------------- gnu/services/pm.scm | 56 +++++++++++++++++++++++++++++++++++- 2 files changed, 80 insertions(+), 21 deletions(-) base-commit: 65e8472a4b6fc6f66871ba0dad518b7d4c63595e