unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Sören Tempel" <soeren@soeren-tempel.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 68675@debbugs.gnu.org
Subject: [bug#68675] [PATCH v2] services: dhcp: Support the dhcpcd implementation.
Date: Tue, 13 Feb 2024 13:52:15 +0100	[thread overview]
Message-ID: <2W69OW2TSRJI1.2UCT83W2YH8FC@8pit.net> (raw)
In-Reply-To: <87ttmdbbs9.fsf@gnu.org>

Hi Ludovic,

Thanks a lot for the feedback, really truly helpful! More comments below.

Ludovic Courtès <ludo@gnu.org> wrote:
> Instead of calling ‘package-name’, which would prevent the use of
> something other than a <package> record (such as an <inferior-package>)
> or a package with a different name (like “dhcpcd-next”), 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ören

[1]: https://github.com/NetworkConfiguration/dhcpcd/blob/v10.0.6/src/dhcpcd.c#L2144
[2]: https://github.com/nmeum/guix-channel/blob/b1b80697a9d35ca015ce56ccf3031f91f2bf554f/src/nmeum/services/networking.scm#L130-L132




  reply	other threads:[~2024-02-13 13:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23 16:12 [bug#68675] [PATCH] Support dhcpcd in dhcp-client-service-type soeren
2024-01-23 16:14 ` [bug#68675] [PATCH] gnu: Add dhcpcd soeren
2024-01-23 16:14 ` [bug#68675] [PATCH] services: dhcp: Support the dhcpcd implementation soeren
2024-01-23 19:52 ` [bug#68675] [PATCH] Support dhcpcd in dhcp-client-service-type Sergey Trofimov
2024-01-24 19:11   ` Sören Tempel
2024-01-24 19:05 ` [bug#68675] [PATCH v2] gnu: Add dhcpcd soeren
2024-01-24 19:05   ` [bug#68675] [PATCH v2] services: dhcp: Support the dhcpcd implementation soeren
2024-02-12 21:41     ` Ludovic Courtès
2024-02-13 12:52       ` Sören Tempel [this message]
2024-02-28 20:46         ` Ludovic Courtès
2024-02-12 21:32   ` [bug#68675] [PATCH v2] gnu: Add dhcpcd Ludovic Courtès
2024-02-13 12:50 ` [bug#68675] [PATCH v3 1/2] " soeren
2024-02-13 12:50   ` [bug#68675] [PATCH v3 2/2] services: dhcp: Support the dhcpcd implementation soeren
2024-02-28 20:53     ` Ludovic Courtès
2024-03-11  9:10       ` Sören Tempel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2W69OW2TSRJI1.2UCT83W2YH8FC@8pit.net \
    --to=soeren@soeren-tempel.net \
    --cc=68675@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).