From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id KFNnLERFcmd3XgAAqHPOHw:P1 (envelope-from ) for ; Mon, 30 Dec 2024 07:01:24 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id KFNnLERFcmd3XgAAqHPOHw (envelope-from ) for ; Mon, 30 Dec 2024 08:01:24 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=lTYvuKzw; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735542084; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=z5441gedCTxihnFlbAdwlKPkrzDzJQZcDWgOCSZx0yg=; b=PQPqK5vD1g3MyPt3U4UN3vIQ1zhsx3RgVFKGSvHW6O1RGDhNVKJ9JgZOrjGmSf4ZZffruZ 2f0pDAKrEH2X3joP6GQukjlHMp4IioI5rvLkvpKDPR+kjkeLWdsvokysSExc3jJhu9e5xe 3hnhvC4gBqmhFeoEETo8kRgUi+NVl/1OU1wTJyNtmdWibXYIajugD/GIQTtXYRn3yxRvhg SANQJZAEFT6OGt/0GHjDSpWcvBKuzmFmkDSf5L2Y1jNLgQKxo/PDEWnsm5Y7g5ZNwZnLyP rjRhzipFVhmBfP+coJXvXD+eM0AkwVwLp5a8T4JyL2IqFLsgSRhDzuSR41ITsQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=lTYvuKzw; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735542084; a=rsa-sha256; cv=none; b=IOGP9Qh4ba7aSYAPisQ4wok13pOWJreMJEzys3CeeCUkd63gaeo2PvksxUwXWx1fZhgpUs Nc0WkkB7+OU+l3Kdk3+iHLNUlKS4iMnJ66jfua4Remk5qAFyxsq0o85k4zxGPwr/gfspFe ahnKbLEvlQ4LpFTOQ7wblNtsBXSjGTzYfxytJZ1/A9FZDqlUbtW+VKOo41onN2zb54jFbM 3YxgfK3ZRaYbbwpBj54KU2WOkQL38YIppvNukIT7x/WZ2nXiEre+3C/KSPpaqhuNIOZrAm 0xFuCswVXYXGVOI2GMUdog1ExyrTZcpGlT0dAlxwSsuIDj4hIDy3sOXVxWplCQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4AD1218EFF for ; Mon, 30 Dec 2024 08:01:24 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tS9m0-0004Jw-Fk; Mon, 30 Dec 2024 02:01:09 -0500 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 1tS9lv-0004JS-1w for guix-patches@gnu.org; Mon, 30 Dec 2024 02:01:03 -0500 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 1tS9lu-0002zh-PR for guix-patches@gnu.org; Mon, 30 Dec 2024 02:01:02 -0500 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:References:In-Reply-To:From:To:Subject; bh=z5441gedCTxihnFlbAdwlKPkrzDzJQZcDWgOCSZx0yg=; b=lTYvuKzwIkQbd1BbQ5DQCRRdiaM9m3G74hJjoUFkz8/vNbPJrh9zIJXUFiigNzRdi+GvGxxpnd08QK8qa7fm+6Ho6v7O8aUYzwIXMqmSYkyCsmH7Pr0npo9+ay33RR1NjC0lGKBa1wN+grR97oLqZZQyEP9Rd6LLAIartC4R7IlVvnEI68eDgQjUMa2UoWQhyZDjqzBPaU2j2Z2D9W2UZTJHZE4ILXi66zS+cytmgu5c3KTizBwuw7irNyYbeLBM2YIqdhDZ4w2ajOAi+lJyePORY+BLIDKvzIa+Ii69LbElnql62S7WPs6xpqGJpv1BUjCQJCSSXPBMFK4DrkZ0Rw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tS9lu-0007KP-G5 for guix-patches@gnu.org; Mon, 30 Dec 2024 02:01:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75159] [PATCH v1 4/5] services: Add corectrl-helper-service-type. Resent-From: Zheng Junjie Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 30 Dec 2024 07:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75159 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ashvith Shetty Cc: 75159@debbugs.gnu.org Received: via spool by 75159-submit@debbugs.gnu.org id=B75159.173554205728151 (code B ref 75159); Mon, 30 Dec 2024 07:01:02 +0000 Received: (at 75159) by debbugs.gnu.org; 30 Dec 2024 07:00:57 +0000 Received: from localhost ([127.0.0.1]:57132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tS9lo-0007Jy-KJ for submit@debbugs.gnu.org; Mon, 30 Dec 2024 02:00:57 -0500 Received: from smtp81.cstnet.cn ([159.226.251.81]:42440 helo=cstnet.cn) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tS9lk-0007Jf-T7 for 75159@debbugs.gnu.org; Mon, 30 Dec 2024 02:00:55 -0500 Received: from m (unknown [107.174.64.25]) by APP-03 (Coremail) with SMTP id rQCowAA3MzgXRXJndP69BA--.25922S2; Mon, 30 Dec 2024 15:00:43 +0800 (CST) From: Zheng Junjie In-Reply-To: <20241228153020.20233-5-ashvith@noreply.codeberg.org> (Ashvith Shetty's message of "Sat, 28 Dec 2024 21:00:06 +0530") References: <20241228153020.20233-1-ashvith@noreply.codeberg.org> <20241228153020.20233-5-ashvith@noreply.codeberg.org> User-Agent: mu4e 1.12.7; emacs 30.0.92 Date: Mon, 30 Dec 2024 15:00:35 +0800 Message-ID: <877c7hu030.fsf@iscas.ac.cn> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-CM-TRANSID: rQCowAA3MzgXRXJndP69BA--.25922S2 X-Coremail-Antispam: 1UD129KBjvJXoWxCr4ruFWxAw1kCF4UAF1DZFb_yoWrCrykpF 1UWF1ftr1xtF17Wwn3XF17tw43W3s2gF1ruFnrWF17Ar15AFykAr47Kw4a9an7Gr4Fqw4Y qFWftF98ua4kArJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUk0b7Iv0xC_Kw4lb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rw A2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6xII jxv20xvEc7CjxVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwV C2z280aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487M2AExVA0xI80 1c8C04v7Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUGVWUXwAv7V C2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcVAKI48JMxAIw28I cxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2 IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUXVWUAwCIc40Y0x0EwIxGrwCI 42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42 IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280 aVCY1x0267AKxVWUJVW8JbIYCTnIWIevJa73UjIFyTuYvjxUq_b1DUUUU X-Originating-IP: [107.174.64.25] X-CM-SenderInfo: x2kh0wxmxqyx3h6l2u1dvotugofq/ 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -8.97 X-Spam-Score: -8.97 X-Migadu-Queue-Id: 4AD1218EFF X-TUID: VPavahObNMpG --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ashvith Shetty writes: > * gnu/services/pciutils.scm: New file. This service doesn't seem to have anything to do with pciutils. Put it in another module or a separate corectrl module. > (corectrl-helper-service-type): new variable. i think should corectrl-service-type. corectr-helper doesn't mean anything. And use profile-service-type to add corectrl to profile. This allows only one service to use corectrl, rather than requiring the user to add the package. > * gnu/local.mk: Add them. > * doc/guix.texi (Miscellaneous Services): Document it. > > Change-Id: I1dbeb927100a9a488909ff1950ec7e50d3797c29 > --- > doc/guix.texi | 15 ++++++++++++++ > gnu/local.mk | 1 + > gnu/services/pciutils.scm | 43 +++++++++++++++++++++++++++++++++++++++ > 3 files changed, 59 insertions(+) > create mode 100644 gnu/services/pciutils.scm > > diff --git a/doc/guix.texi b/doc/guix.texi > index da4d2f5ebc..a36d3cc0f1 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -42550,6 +42550,21 @@ empty list means that no type is specified. >=20=20 > @end deftp >=20=20 > +@cindex corectrl-helper > +@subsubheading CoreCtrl Helper Service > + > +The @code{(gnu services pciutils)} module provides a DBus service for=20 > +interacting with system hardware resources, such as CPU and GPU,=20 > +enabling advanced control and management through the CoreCtrl applicatio= n. > + > +@defvar corectrl-helper-service-type > +The service type for @command{corectrl}, which provides a helper service. > + > +@lisp > +(service corectrl-helper-service-type) > +@end lisp > +@end defvar > + > @c %end of fragment >=20=20 > @node Privileged Programs > diff --git a/gnu/local.mk b/gnu/local.mk > index 84160f407a..5ebdb72624 100644 > --- a/gnu/local.mk > +++ b/gnu/local.mk > @@ -751,6 +751,7 @@ GNU_SYSTEM_MODULES =3D \ > %D%/services/nix.scm \ > %D%/services/nfs.scm \ > %D%/services/pam-mount.scm \ > + %D%/services/pciutils.scm \ > %D%/services/science.scm \ > %D%/services/security.scm \ > %D%/services/security-token.scm \ > diff --git a/gnu/services/pciutils.scm b/gnu/services/pciutils.scm > new file mode 100644 > index 0000000000..cfd310b584 > --- /dev/null > +++ b/gnu/services/pciutils.scm > @@ -0,0 +1,43 @@ > +;;; GNU Guix --- Functional package management for GNU > +;;; Copyright =C2=A9 2024 Ashvith Shetty > +;;; > +;;; This file is part of GNU Guix. > +;;; > +;;; GNU Guix is free software; you can redistribute it and/or modify it > +;;; under the terms of the GNU General Public License as published by > +;;; the Free Software Foundation; either version 3 of the License, or (at > +;;; your option) any later version. > +;;; > +;;; GNU Guix is distributed in the hope that it will be useful, but > +;;; WITHOUT ANY WARRANTY; without even the implied warranty of > +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +;;; GNU General Public License for more details. > +;;; > +;;; You should have received a copy of the GNU General Public License > +;;; along with GNU Guix. If not, see . > + > +(define-module (gnu services pciutils) > + #:use-module (gnu packages pciutils) > + #:use-module (gnu services) > + #:use-module (gnu services configuration) > + #:use-module (gnu services dbus) > + #:use-module (guix gexp) > + #:export (corectrl-helper-configuration > + corectrl-helper-configuration? > + corectrl-helper-service-type)) > + > +(define-configuration corectrl-helper-configuration > + (corectrl (file-like corectrl) "The corectrl package")) > + > +(define (corectrl-helper-dbus-service config) > + (list (corectrl-helper-configuration-corectrl config))) > + > +(define corectrl-helper-service-type > + (service-type (name 'corectrl-helper) > + (extensions (list (service-extension dbus-root-service-t= ype > + corectrl-helper-dbu= s-service) > + (service-extension polkit-service-type > + corectrl-helper-dbu= s-service))) also add profile-service-type. > + (default-value (corectrl-helper-configuration)) > + ;; TODO: Improve the description. > + (description "Run corectrl-helper, an essential service = for the corectrl application."))) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEfr6klGDOXiwIdX/bO1qpk+Gi3/AFAmdyRRMACgkQO1qpk+Gi 3/CeNQ//QWGMsUDidrFAF1dtLAJCkerg6UqFUindi+9qKxqZIQ/Wjj0Z/i13m8L6 u3OlYQx/cwo0M+qEq6lu45PoeJuDLShvxUj0PKyQkMpzcx4UpBgIlVt0hb88Kz+F rB8/YXjf+//S9i6I7wRG6+GFyMjJ5FGsbx2n6/ldEfN5Ks7uhV8tcc21IBJWKWCU 5VVRsN3un/Fk90iqnzAgEfBlbVptuh2u9KkqxlumEOcOKCXfjrIGEcVdgEm5Ez/7 RcKo9mLnWw2Wx6Iwl8M0JsgiQNk5DMoIqRSKPnK+YOMKcE79eL91RQKQqwwOcok1 ptkra3l7XD3xfn30Jl9mVTH4WmB2Ry4asudwjCPO1q4ks3b+rgiyKqlQM98/PPxg OtyOocFnV2q0qqbtUVX/gkuiCvbnHt2nGSHfkiBy2Hai1t6s48Pai3z85yRci8kY N40BMk4z3iFxPZ6vfsvUC8WEV9M63AJJk63USpOD+rSk4kZSASnCrYdK9i3DGixi 3XNCQ4Lq5dlUo/2+9aIp/csMxKTGIRmyobmxyshFHm88T3SfPy0baPic4Zv+dhf5 JjSZs99JpnyJhlPZ8vsCMm/Xzc+ItnpOJjY3EAHOe40DXnQS0TU9GEnvWUUaVq2K D7dUm6Hwkbl5Yo/y673mmi+RtwUb5nV0901GDDbK5hdfxlEeW5o= =MQ65 -----END PGP SIGNATURE----- --=-=-=--