From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id aHqpBXqymWM6JwEAbAwnHQ (envelope-from ) for ; Wed, 14 Dec 2022 12:24:42 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 6JCGBXqymWMaYgAAauVa8A (envelope-from ) for ; Wed, 14 Dec 2022 12:24:42 +0100 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 BCE7712D1B for ; Wed, 14 Dec 2022 12:24:41 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5Prt-0008MW-DA; Wed, 14 Dec 2022 06:24: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 1p5Prm-0008MC-1l for guix-patches@gnu.org; Wed, 14 Dec 2022 06:24:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5Prl-0001rv-NS for guix-patches@gnu.org; Wed, 14 Dec 2022 06:24:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5Prl-0002Bm-Ii for guix-patches@gnu.org; Wed, 14 Dec 2022 06:24:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#49578] [PATCH] Add bolt Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 14 Dec 2022 11:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49578 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: phodina Cc: Sarah Morgensen , 49578@debbugs.gnu.org Received: via spool by 49578-submit@debbugs.gnu.org id=B49578.16710169848406 (code B ref 49578); Wed, 14 Dec 2022 11:24:01 +0000 Received: (at 49578) by debbugs.gnu.org; 14 Dec 2022 11:23:04 +0000 Received: from localhost ([127.0.0.1]:38425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5Pqq-0002BW-A6 for submit@debbugs.gnu.org; Wed, 14 Dec 2022 06:23:04 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5Pqo-0002Au-Jn for 49578@debbugs.gnu.org; Wed, 14 Dec 2022 06:23:03 -0500 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 ) id 1p5Pqh-0001eI-Kn; Wed, 14 Dec 2022 06:22:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Lp3RNzfjA08PtGHTN3dB4Z6bJrnMnUbYmWDAQ26k4Ms=; b=A+wsJLFCp5Z7y3mXYf+5 h+Gef8AnGSkHGfEjq2KtxmdiQjJETl5KHiRj1S4mCIQ60NW7Me8sLKkQXwG8eiBrIJ3beOXnq8823 1+bst/HCvD9yXzxmyJ3Z8DtQEqGWyK2Tak4Ys05+MdmT0xOyMZFm545YY6R/67XMfkjNtj/sIKmc/ 6jjSrRSBzG5a51rFdVhcwK2ouxa/EQ8DjVJcNYMmq+7Xn2Of9w+OmlMFiWoCqMN5hA/uc3/3xYUC+ p/g0UbgGQl0TGxJBHdIuLH8HH7dXa4eL5WQn/WN89+LD6BW6lUpgVcePeKiCDdHYLwkOJXXVzti+f /bHmZr795JsfKA==; Received: from eduroam-111172.grenet.fr ([130.190.111.172] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5Pqc-0003F5-5M; Wed, 14 Dec 2022 06:22:55 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <86mto4w0xw.fsf@mgsn.dev> Date: Wed, 14 Dec 2022 12:22:48 +0100 In-Reply-To: (phodina@protonmail.com's message of "Sun, 14 Aug 2022 22:00:32 +0000") Message-ID: <874jtytek7.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671017081; 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: content-transfer-encoding:content-transfer-encoding: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=Lp3RNzfjA08PtGHTN3dB4Z6bJrnMnUbYmWDAQ26k4Ms=; b=Bj4fCpHA5AGiAZWyfC2SGBzTMtgGaTjIFQ64fNYDpr7P+uCQk7KM/WK+CEouuKNT4AKD13 H3Jsga+SMzCIG4SvGPLnLEM2N2KdFICydKiVTkzWXymYthVvoINsne1EHi3ciiz8OaCm+h pD+OfexMpoJr7vDlpSig0ihiJVNDe8qtvN2S0WOJ1kW8iZgduv0lKu9nDzdmJaBB/5wYpZ sUK4UcFUIvV/x3pmdSoRREpVz/OFJsdde/m6Orwn8Flwj/ZsuFF9X19cRJZRHBWodjmjvK BMkx1Up4/Zq90APsOquxMEyKCCwmkJipodnJ9YUL4sckrD9DcHwjAJxqG2b4jw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=A+wsJLFC; 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=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671017081; a=rsa-sha256; cv=none; b=SpfQRmq86ncL8nWI/1FkyUIGTqkPOJSGvTtrsORbzULBGCc1Hmo2xcW/nJiE4BneoS7kUm J4n71vu2CzJ9QEwY6dn7eKFR9a2A03C8uFNQOAioqCTIFlFK/+o3HB/AvT6Zi18B0AWcI6 j6Bp6K/R3XYSixM0d7Mt1Ugh85hKpZaw1P6dq8V4ourQ8AyNr3IkK2AAbz9hEUa0qtGHYZ sD0RMnAscO0xwdp/Jee4CpPVZ8Ze9IjHnhHgtFzr2tzFAxqx8pkrWh3Rb3vPhkdgPnIQJW svjWZFO3uGaPa3zqwWHQeIKgiFqtYwLIGTlcTn7fjtEo4gFFqljrzO8oQy0HzA== X-Migadu-Spam-Score: -2.37 X-Spam-Score: -2.37 X-Migadu-Queue-Id: BCE7712D1B X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=A+wsJLFC; 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=pass (policy=none) header.from=gnu.org X-TUID: fmDMOg3pn3AF Hi, Thanks a lot, Sarah, for the review work. Somehow it eventually fell through the cracks but it=E2=80=99s never too late. :-) phodina skribis: > From 538eeedf7ee64f98b17507ea11d38512525ef29f Mon Sep 17 00:00:00 2001 > From: Petr Hodina > Date: Sun, 18 Jul 2021 12:11:55 +0200 > Subject: [PATCH v4 1/2] gnu: Add bolt. > > * gnu/packages/linux.scm (bolt): New variable. LGTM! I went ahead and applied it. > From e054c89f9964686670e7716c820ca9ebb9f41543 Mon Sep 17 00:00:00 2001 > From: Petr Hodina > Date: Sat, 18 Sep 2021 13:11:18 +0200 > Subject: [PATCH v4 2/2] services: Add a service for bolt. > > * gnu/services/linux.scm (bolt-service-type) > (bolt-shepherd-service, bolt-dbus-service) > (bolt-configuration, bolt-configuration?): New procedures. [...] > +(define-record-type* > + bolt-configuration make-bolt-configuration bolt-configuration? > + (package bolt-configuration-package ; package > + (default bolt))) > + > +(define bolt-shepherd-service > + (match-lambda > + (($ package) Just call =E2=80=98bolt-configuration-package=E2=80=99 instead of using =E2= =80=98match=E2=80=99 here. > + (with-imported-modules (source-module-closure > + '((gnu build shepherd))) > + (shepherd-service > + (documentation "Thunderbolt daemon") > + (provision '(thunderbolt)) > + (requirement '(networking)) > + (modules '((gnu build shepherd))) > + (start #~(make-forkexec-constructor/container > + (list #$(file-append package "/libexec/boltd")) > + )) Please move the parens to the previous line. :-) > + (stop #~(make-kill-destructor))))))) > + > +(define %bolt-activation > + #~(begin > + (use-modules (guix build utils)) > + (mkdir-p "/var/lib/boltd"))) > + > +(define (bolt-dbus-service config) > + (list (wrapped-dbus-service (bolt-configuration-bolt config) > + "libexec/boltd" > + `(("BOLT_CONF_FILE_NAME" > + '("share/dbus-1/interfaces/org.freedesktop.bolt.xml")))))) > + > +(define %bolt-accounts > + (list (user-group (name "boltd") (system? #t)) > + (user-account > + (name "boltd") > + (group "boltd") > + (system? #t) > + (comment "Boltd daemon user") > + (home-directory "/var/empty") > + (shell "/run/current-system/profile/sbin/nologin")))) This is creating accounts, but =E2=80=98boltd=E2=80=99 is started as root. = Is that expected? Does =E2=80=98boltd=E2=80=99 setuids by itself? If so, please a= dd a comment above the =E2=80=98make-forkexec-constructor=E2=80=99 call. > +(define bolt-udev-rule > + (match-lambda > + (($ package) Same comment as above. > +(define bolt-service-type > + (service-type > + (name 'boltd) > + (description > + "Thunderbolt daemon") Please write full sentences here, giving enough context to make =E2=80=98gu= ix system search=E2=80=99 useful. > + (extensions > + (list (service-extension udev-service-type > + (compose list bolt-udev-rule)) > + (service-extension activation-service-type > + (const %bolt-activation)) > + (service-extension dbus-root-service-type > + (compose list bolt-configuration-package)) > + ; bolt-dbus-service) Maybe remove this line? One last thing: please document it in =E2=80=98doc/guix.texi=E2=80=99. In = particular, make sure to add a paragraph that gives a bit of context andq a configuration example. Could you send an updated patch? Thanks, Ludo=E2=80=99.