GNU bug report logs - #68675
[PATCH] Support dhcpcd in dhcp-client-service-type

Previous Next

Package: guix-patches;

Reported by: soeren <at> soeren-tempel.net

Date: Tue, 23 Jan 2024 16:14:01 UTC

Severity: normal

Tags: patch

Done: Sören Tempel <soeren <at> soeren-tempel.net>

Bug is archived. No further changes may be made.

Full log


Message #32 received at 68675 <at> debbugs.gnu.org (full text, mbox):

From: soeren <at> soeren-tempel.net
To: 68675 <at> debbugs.gnu.org
Subject: [PATCH v3 1/2] gnu: Add dhcpcd.
Date: Tue, 13 Feb 2024 13:50:42 +0100
From: Sören Tempel <soeren <at> soeren-tempel.net>

* gnu/packages/admin.scm (dhcpcd): new procedure.

Signed-off-by: Sören Tempel <soeren <at> soeren-tempel.net>
---
 gnu/packages/admin.scm | 56 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index fcf05992d8..efd374fe5a 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -1608,6 +1608,62 @@ (define-public isc-dhcp
       (license license:mpl2.0)
       (properties '((cpe-name . "dhcp"))))))
 
+(define-public dhcpcd
+  (package
+    (name "dhcpcd")
+    (version "10.0.6")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/NetworkConfiguration/dhcpcd")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "07n7d5wsmy955i6l8rkcmxhgxjygj2cxgpw79id2hx9w41fbkl5l"))
+       (file-name (git-file-name name version))))
+    (inputs (list bash-minimal))
+    (native-inputs (list eudev))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      #:test-target "test"
+      #:configure-flags #~(list "--enable-ipv6"
+                                "--enable-privsep"
+                                "--privsepuser=dhcpcd"
+                                (string-append "--dbdir=" "/var/db/dhcpcd")
+                                (string-append "--rundir=" "/var/run/dhcpcd")
+                                (string-append "CC=" #$(cc-for-target)))
+      #:phases #~(modify-phases %standard-phases
+                   (add-after 'unpack 'do-not-create-dbdir
+                     (lambda _
+                       ;; Make sure that the Makefile doesn't attempt to create
+                       ;; /var/db/dhcpcd for which it doesn't have permissions.
+                       (substitute* "src/Makefile"
+                         (("\\$\\{INSTALL\\} -m \\$\\{DBMODE\\} -d \\$\\{DESTDIR\\}\\$\\{DBDIR\\}")
+                          ""))))
+                   (add-before 'build 'setenv
+                     (lambda _
+                       (setenv "HOST_SH" (which "sh"))))
+                   (add-after 'install 'wrap-hooks
+                     (lambda* (#:key inputs outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (libexec (string-append out "/libexec"))
+                              (sed (search-input-file inputs "/bin/sed"))
+                              (rm (search-input-file inputs "/bin/rm")))
+                         (wrap-program (string-append libexec
+                                                      "/dhcpcd-run-hooks")
+                           `("PATH" ":" suffix
+                             (,(dirname sed)
+                              ,(dirname rm))))))))))
+    (home-page "https://roy.marples.name/projects/dhcpcd")
+    (synopsis "Feature-rich DHCP and DHCPv6 client")
+    (description
+     "Provides a DHCP and a DHCPv6 client.  Additionally,
+dhcpcd is also an IPv4LL (aka ZeroConf) client.  In layperson's terms,
+dhcpcd runs on your machine and silently configures your computer to work
+on the attached networks without trouble and mostly without configuration.")
+    (license license:bsd-2)))
+
 (define-public radvd
   (package
     (name "radvd")

base-commit: 29c26a8d308286cf378ce9cfa3d73e3d1454263d




This bug report was last modified 76 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.