GNU bug report logs - #70845
[PATCH] services: Add fancontrol-service-type

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Adrien 'neox' Bourmault <neox@HIDDEN>; Keywords: patch; dated Thu, 9 May 2024 15:42:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 70845 <at> debbugs.gnu.org:


Received: (at 70845) by debbugs.gnu.org; 13 May 2024 14:07:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 13 10:07:30 2024
Received: from localhost ([127.0.0.1]:32940 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s6WKw-00024T-7r
	for submit <at> debbugs.gnu.org; Mon, 13 May 2024 10:07:30 -0400
Received: from eggs.gnu.org ([209.51.188.92]:51238)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <neox@HIDDEN>) id 1s6WKq-00024N-Nw
 for 70845 <at> debbugs.gnu.org; Mon, 13 May 2024 10:07:28 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <neox@HIDDEN>)
 id 1s6WKj-00066k-CI; Mon, 13 May 2024 10:07:18 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to:
 references; bh=uX0RU2AC0fsfPWwNET6lxAmgFmGuToW45xDxFWvzSXs=; b=I866xYzAPangDR
 qYmZX+934nOp0SUDXl/JUhOfJ0/TsbE4hFtAOMIGRv9TqZruKB5l/fLrx6YT395umHXocmif9/se6
 TVH47oYpAhd4uGnFiggmmljAJlF9UesJHopZlQAZr1h8kkXHQcG7hZnIxjq4gn2eyP/hq+Qq1tHKQ
 /SZwftHx1EFA9WiY6odnpKMLStqcE63UAaGQMXSle7DiebDJ8jRAYlf5jo1Gq5D1ueDvNIfm+bEik
 2SVXWxXExS5is14hU04U4zYl41MIo41zEDW2pCfDU1m8ZRa3v4SJHKcdA7x5uUxcXGHUi68mpRHWO
 RiOITcxF9LlwOS5AoG0Q==;
From: Adrien 'neox' Bourmault <neox@HIDDEN>
To: 70845 <at> debbugs.gnu.org
Subject: [PATCH v2] services: Add fancontrol-service-type.
Date: Mon, 13 May 2024 16:06:27 +0200
Message-ID: <b8ea66dd0b5edd9e8d345a0beda3198049ab6231.1715609187.git.neox@HIDDEN>
X-Mailer: git-send-email 2.41.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70845
Cc: Adrien 'neox' Bourmault <neox@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi! I've created a fancontrol service for my own use on a KGPE-D16
workstation, and wanted to share it with GNU Guix. The configuration
has to be generated upstream with pwmconfig (lm-sensors package)
and you just have to tell the service where it is for it to work.

This is the second version of this patch, fixing the lack of copyright
notice and dot at the end of the commit message.

Change-Id: I120e54cbf849eebd088be2a4d0a0113ffcdfcd84
Signed-off-by: Adrien 'neox' Bourmault <neox@HIDDEN>
---
 gnu/services/pm.scm | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/gnu/services/pm.scm b/gnu/services/pm.scm
index 3daf484cc1..2196673875 100644
--- a/gnu/services/pm.scm
+++ b/gnu/services/pm.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@HIDDEN>
+;;; Copyright © 2024 Adrien 'neox' Bourmault <neox@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -31,7 +32,9 @@ (define-module (gnu services pm)
             tlp-configuration
 
             thermald-configuration
-            thermald-service-type))
+            thermald-service-type
+            
+            fancontrol-service-type))
 
 (define (uglify-field-name field-name)
   (let ((str (symbol->string field-name)))
@@ -466,3 +469,31 @@ (define thermald-service-type
    (default-value (thermald-configuration))
    (description "Run thermald, a CPU frequency scaling service that helps
 prevent overheating.")))
+
+;;;
+;;; fancontrol
+;;;
+;;; This service implements fan control in conjunction with the tools in the
+;;; lm-sensors package (pwmconfig/fancontrol).
+
+(define (fancontrol-shepherd-service config)
+  (shepherd-service
+   (documentation "Run the fancontrol daemon (fancontrol-daemon)." )
+   (provision '(fancontrol))
+   (requirement '(udev user-processes))
+   (start #~(make-forkexec-constructor
+             (list #$(file-append lm-sensors "/sbin/fancontrol")
+                   #$config)
+             #:user "root" #:group "root"
+             #:log-file "/var/log/fancontrol.log"))
+   (stop #~(make-kill-destructor))))
+
+(define fancontrol-service-type
+  (service-type
+   (name 'fancontrol)
+   (description
+    "Run fancontrol as a daemon.")
+   (extensions
+    (list (service-extension shepherd-root-service-type
+            (compose list fancontrol-shepherd-service))))))
+

base-commit: 7b0f145802f0c2c785014293d748721678fef824
-- 
2.41.0





Information forwarded to guix-patches@HIDDEN:
bug#70845; Package guix-patches. Full text available.

Message received at 70845 <at> debbugs.gnu.org:


Received: (at 70845) by debbugs.gnu.org; 12 May 2024 15:17:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 12 11:17:59 2024
Received: from localhost ([127.0.0.1]:54931 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s6Axb-0001xX-8n
	for submit <at> debbugs.gnu.org; Sun, 12 May 2024 11:17:59 -0400
Received: from cyberdimension.org ([79.143.250.36]:41680
 helo=rockpro64.cyberdimension.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <GNUtoo@HIDDEN>) id 1s6AxZ-0001xR-4T
 for 70845 <at> debbugs.gnu.org; Sun, 12 May 2024 11:17:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=dkim; bh=dM/JO5sOUVDU3aU
 e3jw3kiEC6jEdE5QW8njgpEFlQmU=;
 h=references:in-reply-to:subject:cc:to:
 from:date; d=cyberdimension.org; b=MKcFDA6OXrCgyPr3ruWghB9mIKJcyginDcw
 e6W8Y2tF65nf56nVVsm5+JHcL0vWQVv/rVYfXgSI22fa8enon1QJsjE/VIViRuV3pWi7+p
 5WZV1JscF8etExt0hwGnoUkxWCQKBardT55cjoso3kup/bqLuk2fEaqrC0xZ+zShPRwNCO
 hsxBbp3j5Hhf6U2kuir5rHa7KlZ/OZr/3hlJgG4DqGrTMOeY3oCXEJn+qEtNjmGNAGZGC8
 5ybTKFy38jsTd0f6PGs5V/WpaFDNIUAbIKjOpxobYiA5LHeCcMgandtuGy0pBzevM9WuLY
 +Xo2FviSHsoaNNpWNvhUfqEvRnA==
Received: from primary_laptop (localhost [127.0.0.1])
 by rockpro64.cyberdimension.org (OpenSMTPD) with ESMTP id c2eefa22;
 Sun, 12 May 2024 15:17:56 +0000 (UTC)
Date: Sun, 12 May 2024 17:17:49 +0200
From: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
To: Adrien 'neox' Bourmault <neox@HIDDEN>
Subject: Re: [PATCH] services: Add fancontrol-service-type
Message-ID: <20240512171749.201e713a@primary_laptop>
In-Reply-To: <452c2d78e57c54b313decb40dbfeb59315e63131.camel@HIDDEN>
References: <20240509193942.20e6ec8e@primary_laptop>
 <452c2d78e57c54b313decb40dbfeb59315e63131.camel@HIDDEN>
X-Mailer: Claws Mail 4.1.1 (GTK 3.24.41; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/+SiB0n2vaCi8zkL.H1.n4V3";
 protocol="application/pgp-signature"; micalg=pgp-sha256
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70845
Cc: 70845 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--Sig_/+SiB0n2vaCi8zkL.H1.n4V3
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hi again,

While looking at the patches I interacted with on issues.guix.gnu.org, I
noticed a small issue: the commit message summary lacks a dot at the
end.

Denis.

--Sig_/+SiB0n2vaCi8zkL.H1.n4V3
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAmZA3Z4ACgkQX138wUF3
4mOzNQ/9F9jjSF16u/UKXwCF1xrF19664jw5n7M736CTi9hgE7Hb0XeAWXnfz5oh
ydYFAmKDr8RUKR7YMP+lMCNrYRvIbUCzS8GtxRk9cxJhF774jWeg1qlHp/T4aesc
yf5yAfDSvdBQ1LmH6P0yKN2umSBsc5NRKstkcG1y0nCRS9IBOe0sAV6tp5PwJm5X
ZOPuwl0X+tokqXbAFZdKgPHBP873YeUdPDJUOTUGYE04mSkX+frYl4HlwQ+gg5QK
UEBO1zC8o66aEDJGP+2BHZ/sv7EDWCHSfPcOoj8gPqYxAs6klBb0GYghtdEqTVKS
DTMJaI9HapSWgmGi5AujyBd8Vk0pJlt+0Clk1VwbM2kxVo+dMiZOHXRQK0FrcUeR
X+tDS/1xxLaWr6W9eegqWbUcTHUl/GWefzClm/4bK9agMehznV0RLkwG3AH/BXIQ
RVVypNVM2/MvHusK0jgwMEXZSBdiLgLR71k1s30YHaXQS6xeuBgFA+Iz6be7CLKJ
kmtIhI1rfpJF1pylNODlwQYmeQKMjKlopquffzoK6oeYGl04OScuph3NlKsL6S1D
wwx293qwiMHH5Ttp3ejckwJRwkGry9Q/xltmHr2KCSuzVhZiprrCjZB72yHbADLg
NTxzLbrlTZhAfvoKtnVGimjds3qFXfvzUSIooCD9BauYLpsQUw8=
=NWiu
-----END PGP SIGNATURE-----

--Sig_/+SiB0n2vaCi8zkL.H1.n4V3--




Information forwarded to guix-patches@HIDDEN:
bug#70845; Package guix-patches. Full text available.

Message received at 70845 <at> debbugs.gnu.org:


Received: (at 70845) by debbugs.gnu.org; 9 May 2024 19:32:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 09 15:32:53 2024
Received: from localhost ([127.0.0.1]:40821 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s59Vc-0000iU-RU
	for submit <at> debbugs.gnu.org; Thu, 09 May 2024 15:32:53 -0400
Received: from eggs.gnu.org ([209.51.188.92]:36350)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <neox@HIDDEN>) id 1s59VY-0000iM-Bs
 for 70845 <at> debbugs.gnu.org; Thu, 09 May 2024 15:32:51 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <neox@HIDDEN>)
 id 1s59TO-0000tR-4H; Thu, 09 May 2024 15:30:34 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:To:From:
 Subject; bh=4GWXK46DKkPpfKxVF5e3d8+Anf5i+1a6vW9DraMfkX4=; b=Cn9PJq0hSBAvxML6n
 XpFkqH2TjgTfNa6RMUurae9cIcJn/RNJRp4uSDz7GEA78BxgcI2DOfHeUgeFvJZxa0Zc9ps3pZZwY
 tK4V9XHqOrUcuZ8/liOLir3Rdd4Vm6yMTb0Vxn7T103XbpKjEqQzIwwLmSRW0Kytuv47DbU+/PBi7
 61XJ1ttaiYntOpLKWtlMPt/7tDqA0pnRcqGg880i9hW9BiLHrrGBt2ebl56WItilWsIv84mq83MwH
 7MDuapt3/hdAx7aVqP9vKxM4nmP9GzBttUKJFVZ5HXuoAQ2HC9px33QZezStVVJElurJYm/RN5yRY
 6t/5iL80wdhNRsr1w==;
Message-ID: <452c2d78e57c54b313decb40dbfeb59315e63131.camel@HIDDEN>
Subject: Re: [PATCH] services: Add fancontrol-service-type
From: Adrien 'neox' Bourmault <neox@HIDDEN>
To: 70845 <at> debbugs.gnu.org
In-Reply-To: <20240509193942.20e6ec8e@primary_laptop>
References: <20240509193942.20e6ec8e@primary_laptop>
Content-Type: multipart/signed; micalg="pgp-sha256";
 protocol="application/pgp-signature"; boundary="=-BOpegENNGiY7Hto99fsU"
Date: Thu, 09 May 2024 21:30:10 +0200
MIME-Version: 1.0
User-Agent: Evolution 3.48.4 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70845
Cc: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


--=-BOpegENNGiY7Hto99fsU
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Le jeudi 09 mai 2024 =C3=A0 19:39 +0200, Denis 'GNUtoo' Carikli a =C3=A9cri=
t=C2=A0:
> Hi,
>=20
> Thanks a lot for the patch.
>=20
> For the record I'm not a Guix maintainer / committer, and that I
> didn't look at everything but I spotted something that could be
> improved: the user has no way to override the lm-sensors package being
> used.
>=20
> Most services provide a way to do that kind of override, so it would
> make sense to add that at some point.
>=20
> Denis.

Hi and thanks for you feedback. Not every service I saw allows such overrid=
e,
but it seems indeed a good idea. However, it would complicate a bit this pa=
tch
as it would require to create a proper configuration type for the service a=
nd I
also did not dig into that (did not have much time). Someone else might be =
able
to do it.

Happy hacking!
--=20
Adrien Bourmault
Maintainer, GNU Boot project
Associate member, Free Software Foundation
GPG : 393D4CC68136F39799DA75F295F65F55F682A17A









--=-BOpegENNGiY7Hto99fsU
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQ5PUzGgTbzl5nadfKV9l9V9oKhegUCZj0kQgAKCRCV9l9V9oKh
ei1/AP9xElgZxK2ktrKwcNtCS8z6vMU5qbgzlgxkInkfgJYX5gD/Vn7Vq3dAtRgU
6DTfn76VNp0b6ozu+Bvr2Nd4yRtrjg8=
=lBEY
-----END PGP SIGNATURE-----

--=-BOpegENNGiY7Hto99fsU--




Information forwarded to guix-patches@HIDDEN:
bug#70845; Package guix-patches. Full text available.

Message received at 70845 <at> debbugs.gnu.org:


Received: (at 70845) by debbugs.gnu.org; 9 May 2024 19:28:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 09 15:28:41 2024
Received: from localhost ([127.0.0.1]:40816 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s59RZ-0000ez-6e
	for submit <at> debbugs.gnu.org; Thu, 09 May 2024 15:28:41 -0400
Received: from leparc.libre-en-communs.org ([80.67.176.33]:60024
 helo=a-lec.org) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <neox@HIDDEN>) id 1s59RV-0000et-6Y
 for 70845 <at> debbugs.gnu.org; Thu, 09 May 2024 15:28:39 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=a-lec.org; s=mail;
 t=1715282885; bh=1Nf8Dir+wXrgGgSsNZ/ZwFt4sQBi7DiaWK+z00Hd+F8=;
 h=Subject:From:To:Cc:In-Reply-To:References:Date:From;
 b=RPpsw3Do3PdqqPoWAz6qCKLU6sRiUCEBzlgFgBWtUcne1/X6ooXoUfYBaaggbHo2i
 Szx4xkgv1BWkl6YxWWWzDVW0mdXvC9t3zEiVys3yZhOewtTybzK4hatMVpUzQy1Ima
 LmJpNMzSjsw7pJjP6MpC6ygWE5m5kVqJIUP6GGx7raDqLW6cLNO2cqjYBHmmg9L3EK
 pEkxcVV5wZsWngUQ03Dws7CE/ZXcMQBHXD+5oxXXy7rUWYB07gV6VFmGTNxwGPWicY
 wZf5wkUNWK5FjZh4o9uqs9MOU0VEhb/4YRhYdi5gN7qLr2uA8vWj0IdVWx1jVi3w3j
 fr7jwfV3myxqw==
Received: from n-guix-fix-2.home
 (2a01cb0803b54e0031dab61d4c18e856.ipv6.abo.wanadoo.fr
 [IPv6:2a01:cb08:3b5:4e00:31da:b61d:4c18:e856])
 (Authenticated sender: neox)
 by mail.a-lec.org (Postfix) with ESMTPSA id D40AB8095E;
 Thu,  9 May 2024 21:28:05 +0200 (CEST)
Message-ID: <c299fc11cae331bb3a2b014c6e321390c84bafc9.camel@HIDDEN>
Subject: Re: [PATCH] services: Add fancontrol-service-type
From: Adrien 'neox' Bourmault <neox@HIDDEN>
To: 70845 <at> debbugs.gnu.org
In-Reply-To: <20240509193942.20e6ec8e@primary_laptop>
References: <20240509193942.20e6ec8e@primary_laptop>
Content-Type: multipart/signed; micalg="pgp-sha256";
 protocol="application/pgp-signature"; boundary="=-fgR0EYVxCEf0ZgUh2cvn"
Date: Thu, 09 May 2024 21:28:02 +0200
MIME-Version: 1.0
User-Agent: Evolution 3.48.4 
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 70845
Cc: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


--=-fgR0EYVxCEf0ZgUh2cvn
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Le jeudi 09 mai 2024 =C3=A0 19:39 +0200, Denis 'GNUtoo' Carikli a =C3=A9cri=
t=C2=A0:
> Hi,
>=20
> Thanks a lot for the patch.
>=20
> For the record I'm not a Guix maintainer / committer, and that I
> didn't look at everything but I spotted something that could be
> improved: the user has no way to override the lm-sensors package being
> used.
>=20
> Most services provide a way to do that kind of override, so it would
> make sense to add that at some point.
>=20
> Denis.

Hi and thanks for you feedback. Not every service I saw allows such overrid=
e,
but it seems indeed a good idea. However, it would complicate a bit this pa=
tch
as it would require to create a proper configuration type for the service a=
nd I
also did not dig into that (did not have much time). Someone else might be =
able
to do it.

Happy hacking!
--=20
Adrien Bourmault
Maintainer, GNU Boot project
Associate member, Free Software Foundation
GPG : 393D4CC68136F39799DA75F295F65F55F682A17A









--=-fgR0EYVxCEf0ZgUh2cvn
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQ5PUzGgTbzl5nadfKV9l9V9oKhegUCZj0jvQAKCRCV9l9V9oKh
emnAAQCKZsuPXxvAHUTyOasO6pPsABwyWiIk1oiyrxN5mK4i3wD+OlXilD4SYdjW
yV3V4L+9DyUYsbh+Zmz+EZtelQ5SQwk=
=OUk2
-----END PGP SIGNATURE-----

--=-fgR0EYVxCEf0ZgUh2cvn--




Information forwarded to guix-patches@HIDDEN:
bug#70845; Package guix-patches. Full text available.

Message received at 70845 <at> debbugs.gnu.org:


Received: (at 70845) by debbugs.gnu.org; 9 May 2024 17:40:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 09 13:40:30 2024
Received: from localhost ([127.0.0.1]:56474 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s57ks-0000GK-IA
	for submit <at> debbugs.gnu.org; Thu, 09 May 2024 13:40:30 -0400
Received: from cyberdimension.org ([79.143.250.36]:49136
 helo=rockpro64.cyberdimension.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <GNUtoo@HIDDEN>) id 1s57kp-0000GC-6v
 for 70845 <at> debbugs.gnu.org; Thu, 09 May 2024 13:40:28 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=dkim; bh=5MKbaQ/M+Jgy9y2
 6W8mdtwGFymLF6VqyGS912rY/97c=; h=subject:to:from:date;
 d=cyberdimension.org; b=OcF8h4BDUANRHpuVNHwRiuhcarGR3aEwKvHgjoaL+uKBsC
 datZ9pvPOsDWxkkbJq89/FoTWb6HzN/TUF1IIQ+vgp/xnw8Rm4cPAeEoc2ngBIpZ9AA/hM
 eScOj0OXwGmZ/QjFnJlusByMN5mSBwt7lpQ4lIMmrQAHOrc4mjPkhopP8zZkWNdyFd60wx
 AD8mpR9cym4ZN80+A037v5R5pcLXsmVIKKzfuGr/hbAf5D8evFT8xOasiO7TN1OdB/SJkN
 KF1HwPoQ3CqnSXgcxRtAsu0XaePwrIUkD3fW7uYPzohMt0qaiQr2TqonmIDh9hZtUT4BmA
 CROPiu8AqRaMG1HQ==
Received: from primary_laptop (localhost [127.0.0.1])
 by rockpro64.cyberdimension.org (OpenSMTPD) with ESMTP id 054a9da3
 for <70845 <at> debbugs.gnu.org>; Thu, 9 May 2024 17:39:58 +0000 (UTC)
Date: Thu, 9 May 2024 19:39:56 +0200
From: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
To: 70845 <at> debbugs.gnu.org
Subject: Re: [PATCH] services: Add fancontrol-service-type
Message-ID: <20240509193942.20e6ec8e@primary_laptop>
X-Mailer: Claws Mail 4.1.1 (GTK 3.24.41; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/uP=3_L6HHKkZBlroZNp3DU9";
 protocol="application/pgp-signature"; micalg=pgp-sha256
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70845
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--Sig_/uP=3_L6HHKkZBlroZNp3DU9
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hi,

Thanks a lot for the patch.

For the record I'm not a Guix maintainer / committer, and that I
didn't look at everything but I spotted something that could be
improved: the user has no way to override the lm-sensors package being
used.

Most services provide a way to do that kind of override, so it would
make sense to add that at some point.

Denis.

--Sig_/uP=3_L6HHKkZBlroZNp3DU9
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAmY9CmwACgkQX138wUF3
4mNhFA/7BI7Ov0pp9eAdAJ/Vd/6ulxUFrqRrpuJI5pPNBKl+9sA7NA88MCET6ERh
ZKLy4liq25djLrAbWuKGOU5QAuz6+/2gvasKlGifFfQqSgI0MisOTOEXpyvrXdyA
QyPEL3Etcccb4ZzRAIUZTMKbcYX9NYp2xwhYpOM0ewae5MTpHYLHxsnDbefwo8xJ
8dgUeqM4lc1xIfrgbTVM0yIFJbfA3vTNGCb/ufqx3hH5fiy3gU/Xki/zWwzIhRhJ
qxMMqXSmGTWAhHLSJJ8SLa64UDb5mfK1rVeXkFztaLJXm63Yov370b+zBTMk9W/T
iMWVf38mJurgwFx2rB1tZMU9Q6vLzC/xf+eYkHH0YFyoYtI53aLsiKfiUWUYigzC
qadluO65cmhRZWMl/u91KZo80dGY51jFSPMagE9vAjN3PPceV2vIEfaFEjBq48F1
P1xGTdO1jreY2M6ynphLro1VgxZgkYTp8OU/oA4VAyOqih5GqA6Ms+6+ZzpWiNJg
Fqg5ah8SQHkwzW5qfclh2f8czXHWGsEDrwqGXhDBMwNKa6hvrqfnUM1zpJ1XcGk2
g+0XGBONp8dJv2615mhRRBpnGwq6t18i78zMaogsbiLh3gfd4jOCO6FKv388OkrP
KtemqUtwxHWHH8B4dLd5QaZiBuL3wvLxnvWaEGy3U2iwAHZ+bho=
=3FAO
-----END PGP SIGNATURE-----

--Sig_/uP=3_L6HHKkZBlroZNp3DU9--




Information forwarded to guix-patches@HIDDEN:
bug#70845; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 9 May 2024 15:41:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 09 11:41:29 2024
Received: from localhost ([127.0.0.1]:55952 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s55th-0004Vz-4U
	for submit <at> debbugs.gnu.org; Thu, 09 May 2024 11:41:29 -0400
Received: from lists.gnu.org ([2001:470:142::17]:33030)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <neox@HIDDEN>) id 1s55te-0004Vm-8I
 for submit <at> debbugs.gnu.org; Thu, 09 May 2024 11:41:27 -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 <neox@HIDDEN>) id 1s55t6-0006Hy-D7
 for guix-patches@HIDDEN; Thu, 09 May 2024 11:40:52 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <neox@HIDDEN>)
 id 1s55t5-0002Sh-EC; Thu, 09 May 2024 11:40:51 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to:
 references; bh=X3fpXJ/fDqZn4Z++RYpYtFhJ8wkuCFx37wWclyQH2gk=; b=KAtNhYkUQC+OKL
 F0rYLyazhaV+ESDqysGSGYpkpkSPmfC06+ADFtPfHHpVcruZwAu01zcjTTggrU0tYsvfM1LFCuwst
 7xUcg9Afa8N7KuIhYYCUvQAl1nO4pqlKlDmU9LTiHVLDejvwO1khgu+YKvcTozGDi/nZGFOIDzfRA
 hQF26rtLxuDcQC/xZs9gxVyeMsWpDmLHYoM9mjeNbMirwtHJkLMEWoFdjUzsylIKzlGeDnbyGw2N4
 gHXH44xITxgwvSQLWMHE5N9ZSWdLpXVynjnkfW8erIgxOH+RYZM7ra92z1UzXLSyp6nkYYC6rlDKz
 KrfySagyw7cehyJugVLA==;
From: Adrien 'neox' Bourmault <neox@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] services: Add fancontrol-service-type
Date: Thu,  9 May 2024 17:37:43 +0200
Message-ID: <20240509154032.5047-1-neox@HIDDEN>
X-Mailer: git-send-email 2.41.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: submit
Cc: Adrien 'neox' Bourmault <neox@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi! I've created a fancontrol service for my own use on a KGPE-D16
workstation, and wanted to share it with GNU Guix. The configuration
has to be generated upstream with pwmconfig (lm-sensors package)
and you just have to tell the service where it is for it to work.

Change-Id: I120e54cbf849eebd088be2a4d0a0113ffcdfcd84
Signed-off-by: Adrien 'neox' Bourmault <neox@HIDDEN>
---
 gnu/services/pm.scm | 32 +++++++++++++++++++++++++++++++-
 1 file changed, 31 insertions(+), 1 deletion(-)

diff --git a/gnu/services/pm.scm b/gnu/services/pm.scm
index 3daf484cc1..1b305e76a6 100644
--- a/gnu/services/pm.scm
+++ b/gnu/services/pm.scm
@@ -31,7 +31,9 @@ (define-module (gnu services pm)
             tlp-configuration
 
             thermald-configuration
-            thermald-service-type))
+            thermald-service-type
+            
+            fancontrol-service-type))
 
 (define (uglify-field-name field-name)
   (let ((str (symbol->string field-name)))
@@ -466,3 +468,31 @@ (define thermald-service-type
    (default-value (thermald-configuration))
    (description "Run thermald, a CPU frequency scaling service that helps
 prevent overheating.")))
+
+;;;
+;;; fancontrol
+;;;
+;;; This service implements fan control in conjunction with the tools in the
+;;; lm-sensors package (pwmconfig/fancontrol).
+
+(define (fancontrol-shepherd-service config)
+  (shepherd-service
+   (documentation "Run the fancontrol daemon (fancontrol-daemon)." )
+   (provision '(fancontrol))
+   (requirement '(udev user-processes))
+   (start #~(make-forkexec-constructor
+             (list #$(file-append lm-sensors "/sbin/fancontrol")
+                   #$config)
+             #:user "root" #:group "root"
+             #:log-file "/var/log/fancontrol.log"))
+   (stop #~(make-kill-destructor))))
+
+(define fancontrol-service-type
+  (service-type
+   (name 'fancontrol)
+   (description
+    "Run fancontrol as a daemon.")
+   (extensions
+    (list (service-extension shepherd-root-service-type
+            (compose list fancontrol-shepherd-service))))))
+
-- 
2.41.0





Acknowledgement sent to Adrien 'neox' Bourmault <neox@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#70845; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 13 May 2024 14:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.