From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id eE2pMddny2WcGgAAe85BDQ:P1 (envelope-from ) for ; Tue, 13 Feb 2024 14:00:08 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id eE2pMddny2WcGgAAe85BDQ (envelope-from ) for ; Tue, 13 Feb 2024 14:00:07 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=soeren-tempel.net header.s=opensmtpd header.b=PXOJGKLR; dmarc=fail reason="SPF not aligned (relaxed)" header.from=soeren-tempel.net (policy=none); 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707829207; 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=8MEtZavF1ivjLN7gP9GS6VlJRH6plgDabSOvY8liodQ=; b=LOolJkJZK6Lj1tgvsevTUvuJr16SYmo6bgAJn1nFMOE3Ow/2drGL6c/lyInW0ElsQEQW+R tzzYdCkd4F8e8vb9PSdjpE7cE4XbU9h4fn6zLfEK75C5m/wasSB9T2KRd5eWsc/V2yH07r iCtNhMUTwZaircmYDDEVSHi14x83fPxmZJZfrcu7lI1bKtM/9h4yC2pSjvaGMkJEbYjj8D HdozTS+5J3O5zdMjabc9JyMsU8LtLq6TJKxmeQ8gEXCMupBbd7Xd2aKNcM7aTuLL10yNTb rUPFjB5GHnFGQIStf6SFF2GU/B3Poj9FFjVtTdjWpIfKrS5+m1oFfEq444FzDw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=soeren-tempel.net header.s=opensmtpd header.b=PXOJGKLR; dmarc=fail reason="SPF not aligned (relaxed)" header.from=soeren-tempel.net (policy=none); 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707829207; a=rsa-sha256; cv=none; b=eGEt0QJFGkdhbgRAnSWh1f0boxz2qoJb2OK/fG300QE228WRjgTAWvU8aHBG0bor9FvEcJ /7rQksY1JiS6UJxuJaoz0ULXORPhSW179AwYb2uWtWUhrhx7UnKAxfnnGGcfHtcb92EQOW 1IANYkjM8iBb5dYjUJ6hVE3CId9ocYnSTlLwePZdrDogPpwTC7p2Z6grFTVa+koQBmZYTP nNjmRGCGrWd3NjOUP6sZjswLRLQkRCf/6RqgX+fMM+UDJ7s6ROEF3UVFJGu9PZ5Ny6lm5s 9941mpGysIYsFyg/ixi25LSySxuV4hoKswO6qrErWHgg6iXh5dpTAdoM1G+nmA== 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 A020D19E00 for ; Tue, 13 Feb 2024 14:00:07 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZsO3-00077q-Sf; Tue, 13 Feb 2024 07:59:47 -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 1rZsO1-00077Y-Nl for guix-patches@gnu.org; Tue, 13 Feb 2024 07:59:45 -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 1rZsO1-0004nQ-FZ for guix-patches@gnu.org; Tue, 13 Feb 2024 07:59:45 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZsOI-0005Gv-Kv for guix-patches@gnu.org; Tue, 13 Feb 2024 08:00:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68675] [PATCH v2] services: dhcp: Support the dhcpcd implementation. Resent-From: =?UTF-8?Q?S=C3=B6ren?= Tempel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 13 Feb 2024 13:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68675 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 68675@debbugs.gnu.org Received: via spool by 68675-submit@debbugs.gnu.org id=B68675.170782916120178 (code B ref 68675); Tue, 13 Feb 2024 13:00:02 +0000 Received: (at 68675) by debbugs.gnu.org; 13 Feb 2024 12:59:21 +0000 Received: from localhost ([127.0.0.1]:42944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZsNc-0005FN-TW for submit@debbugs.gnu.org; Tue, 13 Feb 2024 07:59:21 -0500 Received: from magnesium.8pit.net ([45.76.88.171]:43671) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZsNW-0005F8-RT for 68675@debbugs.gnu.org; Tue, 13 Feb 2024 07:59:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=opensmtpd; bh=qmkLtMLaqt +qTUOz9Zzji1Isx/AIiVYLcydn1m8CDlg=; h=in-reply-to:references:from: subject:cc:to:date; d=soeren-tempel.net; b=PXOJGKLRhnXS/XCaKT3i446QnjA 7fakBMP9xYttE+vNhcYGjZOZmBEMspkA+hGHGKfPw6dO7Lh2l1CvrWK949HjfxZ+qPWXvM ZLH2EqJDR1aoMJ2u19TimMeRNyvJC2DV1v3bGAcHz7AJKg2/P05Q+AxEDFOZR6cjstWK5L vgxc= Received: from localhost (dynamic-2a02-3102-49da-001b-df49-33b7-2af2-ff52.310.pool.telefonica.de [2a02:3102:49da:1b:df49:33b7:2af2:ff52]) by magnesium.8pit.net (OpenSMTPD) with ESMTPSA id 13f99a49 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:YES); Tue, 13 Feb 2024 13:52:16 +0100 (CET) Date: Tue, 13 Feb 2024 13:52:15 +0100 From: =?UTF-8?Q?S=C3=B6ren?= Tempel References: <2156325d2caa8d4298c9828d84fa5fff40592da4.1706123111.git.soeren@soeren-tempel.net> <5aff02159575834de675684dfde71d2ec66f4b10.1706123111.git.soeren@soeren-tempel.net> <87ttmdbbs9.fsf@gnu.org> In-Reply-To: <87ttmdbbs9.fsf@gnu.org> Message-Id: <2W69OW2TSRJI1.2UCT83W2YH8FC@8pit.net> 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 4.02 X-Spam-Score: 4.02 X-Migadu-Queue-Id: A020D19E00 X-Migadu-Scanner: mx12.migadu.com X-TUID: HSh/jXU6kW3L Hi Ludovic, Thanks a lot for the feedback, really truly helpful! More comments below. Ludovic Court=C3=A8s wrote: > Instead of calling =E2=80=98package-name=E2=80=99, which would prevent th= e use of > something other than a record (such as an ) > or a package with a different name (like =E2=80=9Cdhcpcd-next=E2=80=9D), = what about > checking in the gexp which of /bin/dhclient and /bin/dhcpcd exists? I think I haven't fully grasped G-Expressions yet. I do understand how this would work inside the shepherd start gexp. However, I am not sure how I would check if /bin/dhclient or /bin/dhcpcd exist in the package within the dhcp-client-account-service since, at least as far as I understand, the dhcp-client-account-service is itself not a gexp. I think one could also argue that it might be preferable to check for the package name as, just because a package provides /bin/dhclient, doesn't necessarily mean that it is command-line compatible with the ISC implementation. However, if you have any hints on updating the account-service I would be willing to look into it. > That sounds quite complex. Surely there must be a way to force the name > of the PID file or to determine its name without running dhcpcd in a > pipe? Unfortunately, I don't think there is any way to force the PID file name. Furthermore, the pidfile path depends on the amount interfaces specified. If there is only one interface, a single dhcpcd instance is spawned and the pidfile refers to that. Otherwise, a management process is started and the pidfile refers to the management process [1]. I think the best solution here would be to spawn dhcpcd as child process of GNU shepherd and have shepherd supervise it that way. I have a service doing that too, but its annoying to integrate with the existing dhclient service [2]. Maybe that's something we can migrate to in the long run. > Or leave it out entirely: I find it useful to have a DHCP client at hand > just in case. Thoughts? I removed it, I agree that this change is best discussed separately. > Could you send updated patches? Apart from the two comments I discussed in greater detail above, I hope I implemented all of your feedback as requested in the v3 revision of this patchset. Please let me know if I missed anything. Greetings S=C3=B6ren [1]: https://github.com/NetworkConfiguration/dhcpcd/blob/v10.0.6/src/dhcpcd= .c#L2144 [2]: https://github.com/nmeum/guix-channel/blob/b1b80697a9d35ca015ce56ccf30= 31f91f2bf554f/src/nmeum/services/networking.scm#L130-L132