vanilla-wiiu / vanilla

GNU General Public License v2.0
414 stars 18 forks source link

isc-dhcp-client (dhclient) is EOL #77

Open headblockhead opened 1 month ago

headblockhead commented 1 month ago

isc-dhcp-client has been EOL since 2022, are there any plans to use a different library?

I have been attempting to package this software using Nix - and dhcp-client is no longer in the package registry due to its EOL status. Is it reasonable for an alternative to dhcp-client to be used here? It's only getting older haha.

itsmattkc commented 1 month ago

I'm aware it's EOL, though there aren't a lot of compelling alternatives that I've found. Most distros nowadays rely on DHCP integrated into a daemon (e.g. NetworkManager, systemd-networkd, dhcpcd) that aren't as easy to call as dhclient. There was a tentative plan to integrate some DHCP client code directly into Vanilla (since it might be nice to cut down on external process calls), but it hasn't been a high priority since dhclient still works fine.

I have been having success with udhcpc on the RPi, though that seems to be intended for embedded systems and is a part of BusyBox, so it's generally not readily available on standard distros.

applemayexist commented 3 weeks ago

BusyBox is packaged in Arch, Debian, Fedora, nixpkgs, and openSUSE, all of which build it with udhcpc, so that shouldn't be an issue. Also, out of curiosity, what prevents you from using dhcpcd from inside vanilla-pipe?

applemayexist commented 1 week ago

As for libraries, the only maintained one I can find is libkea-dhcp++, which is C++, and apparently rather low level.

The implementation of DHCP in systemd-networkd might also be an option, its API ~is internal however all the symbols are prefixed with sd_ as if they are planning to publicise it.~ It seems it is public in the libsystemd-network library which is used by NetworkManager as well, however they just copy the parts of systemd they need in-tree, which I would want to avoid.

And then there's n-dhcp4, which it seems NetworkManager wants to or is already using for DHCPv4, however it doesn't seem maintained.

sjuut commented 1 week ago

I can highly recommend using the Embedded Linux Library (libell), which is really lightweight and practical for embedded systems, such as the Raspberry Pi. It even includes a dhcp-client as an example: https://git.kernel.org/pub/scm/libs/ell/ell.git/tree/examples/dhcp-client.c