GNU bug report logs - #68012
[PATCH] services: Add thinkfan service.

Previous Next

Package: guix-patches;

Reported by: lgcoelho <at> disroot.org

Date: Sun, 24 Dec 2023 18:54:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 68012 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#68012; Package guix-patches. (Sun, 24 Dec 2023 18:54:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to lgcoelho <at> disroot.org:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 24 Dec 2023 18:54:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: lgcoelho <at> disroot.org
To: guix-patches <at> gnu.org
Subject: [PATCH] services: Add thinkfan service.
Date: Sun, 24 Dec 2023 18:53:30 +0000
[Message part 1 (text/plain, inline)]
This patch add thinkfan-service-type to (gnu services pm).
[Message part 2 (text/html, inline)]
[0001-services-Add-thinkfan-service.patch (text/x-diff, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#68012; Package guix-patches. (Tue, 26 Dec 2023 00:01:01 GMT) Full text and rfc822 format available.

Message #8 received at 68012 <at> debbugs.gnu.org (full text, mbox):

From: lgcoelho <at> disroot.org
To: 68012 <at> debbugs.gnu.org
Subject: [PATCH] thinkfan-service-type: Place config-file in
 /etc/thinkfan.conf if file-like
Date: Mon, 25 Dec 2023 23:59:54 +0000
[Message part 1 (text/html, inline)]
[0002-thinkfan-service-type-Place-config-file-in-etc-think.patch (text/x-diff, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#68012; Package guix-patches. (Wed, 27 Dec 2023 17:05:01 GMT) Full text and rfc822 format available.

Message #11 received at 68012 <at> debbugs.gnu.org (full text, mbox):

From: lgcoelho <at> disroot.org
To: 68012 <at> debbugs.gnu.org
Subject: [PATCH] thinkfan-service-type: Add thinkfan entry to
 thinkfan-configuration.
Date: Wed, 27 Dec 2023 17:04:56 +0000
[Message part 1 (text/html, inline)]
[0003-thinkfan-service-type-Add-thinkfan-entry-to-thinkfan.patch (text/x-diff, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#68012; Package guix-patches. (Sat, 13 Jan 2024 16:30:02 GMT) Full text and rfc822 format available.

Message #14 received at 68012 <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: lgcoelho <at> disroot.org, 68012 <at> debbugs.gnu.org
Subject: Re: [bug#68012] [PATCH] services: Add thinkfan service.
Date: Sat, 13 Jan 2024 17:29:08 +0100
[Message part 1 (text/plain, inline)]
Hi Luis,

lgcoelho--- via Guix-patches via <guix-patches <at> gnu.org> writes:

> This patch add thinkfan-service-type to (gnu services pm).
> From 92bf99099f91c0f1dae71b0cf9e5f8e6799a3679 Mon Sep 17 00:00:00 2001
> From: Luis Guilherme Coelho <lgcoelho <at> disroot.org>
> Date: Sun, 24 Dec 2023 15:52:04 -0300
> Subject: [PATCH] services: Add thinkfan service.
>
> ---

Please add a commit message following the ChangeLog convention.  You can
take inspiration from other commits in the repo, and read up on it at [0].

> +  (config-file
> +   (string "/etc/thinkfan.conf")
> +   "Configuration file to use.")

This should not refer to an absolute path.  Please use a file-like
instead, users can still use (local-file ...) to give external files.

[0] https://www.gnu.org/prep/standards/html_node/Change-Logs.html
-- 
Josselin Poiret
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#68012; Package guix-patches. (Sat, 13 Jan 2024 16:31:01 GMT) Full text and rfc822 format available.

Message #17 received at 68012 <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: lgcoelho <at> disroot.org, 68012 <at> debbugs.gnu.org
Subject: Re: [bug#68012] [PATCH] thinkfan-service-type: Place config-file in
 /etc/thinkfan.conf if file-like
Date: Sat, 13 Jan 2024 17:30:23 +0100
[Message part 1 (text/plain, inline)]
lgcoelho--- via Guix-patches via <guix-patches <at> gnu.org> writes:

> +(define thinkfan-activation
> +  (match-record-lambda <thinkfan-configuration>
> +    (config-file)
> +    (when (file-like? config-file)
> +      (with-imported-modules '((guix build utils))
> +        #~(begin
> +            (use-modules (guix build utils))
> +            (copy-file #$config-file "/etc/thinkfan.conf"))))))
> +

This is not needed as you already specify the config file to use to
thinkfan with the -c option.

-- 
Josselin Poiret
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#68012; Package guix-patches. (Sat, 13 Jan 2024 16:33:01 GMT) Full text and rfc822 format available.

Message #20 received at 68012 <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: lgcoelho <at> disroot.org, 68012 <at> debbugs.gnu.org
Subject: Re: [bug#68012] [PATCH] thinkfan-service-type: Add thinkfan entry
 to thinkfan-configuration.
Date: Sat, 13 Jan 2024 17:31:58 +0100
[Message part 1 (text/plain, inline)]
lgcoelho--- via Guix-patches via <guix-patches <at> gnu.org> writes:

>  (define-configuration/no-serialization thinkfan-configuration
> +  (thinkfan
> +   (package thinkfan)
> +   "Thinkfan package to be used.")
>    (pid-file
>     (string "/var/run/thinkfan.pid")
>     "Where to store the PID file.")
> @@ -491,17 +494,16 @@ (define-configuration/no-serialization thinkfan-configuration
>  
>  (define thinkfan-shepherd-service
>    (match-record-lambda <thinkfan-configuration>
> -    (pid-file config-file log-file extra-options)
> +    (thinkfan pid-file config-file log-file extra-options)
>      (list (shepherd-service
>             (provision '(thinkfan))
>             (documentation
>              "Adjust fan level according to configured temperature limits.")
>             (requirement '(user-processes))
>             (start #~(make-forkexec-constructor
> -                      (list (string-append #$thinkfan-next
> -                                           "/sbin/thinkfan")
> -                             "-n" #$@extra-options
> -                             "-c" #$config-file)
> +                      (list (string-append #$thinkfan "/sbin/thinkfan")
> +                                           "-n" #$@extra-options
> +                                           "-c" #$config-file)

That's a good idea, but can you squash this with the first commit?

Best,
-- 
Josselin Poiret
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 1 year and 153 days ago.

Previous Next


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