GNU bug report logs - #71064
[PATCH 0/7] Nsncd: Introduce package + nscd service update

Previous Next

Package: guix-patches;

Reported by: picnoir <at> alternativebit.fr

Date: Sun, 19 May 2024 12:42:02 UTC

Severity: normal

Tags: patch

Full log


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

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 71064 <at> debbugs.gnu.org
Cc: picnoir <at> alternativebit.fr, ludo <at> gnu.org
Subject: [PATCH v2 1/2] gnu: services: nscd: Add nsncd optional support.
Date: Sun, 29 Jun 2025 13:52:40 +0200
From: Picnoir <picnoir <at> alternativebit.fr>

Add nsncd optional support for nscd-configuration.

* gnu/services/base.scm (<nscd-configuration>): Add implementation field.
  (nscd-shepherd-service-type)[start]: Update forkexec-constructor
  accordingly.

Change-Id: I73d03bd149ff005130e1ed2532e1b4b0e3d572f5
---
 gnu/services/base.scm | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 88dbcbf72a..a81bdf809c 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -84,6 +84,7 @@ (define-module (gnu services base)
                 #:select (bcachefs-tools exfat-utils jfsutils zfs))
   #:use-module (gnu packages fonts)
   #:use-module (gnu packages terminals)
+  #:use-module (gnu packages nss)
   #:use-module ((gnu packages wm) #:select (sway))
   #:use-module ((gnu build file-systems)
                 #:select (mount-flags->bit-mask
@@ -1365,6 +1366,8 @@ (define-deprecated (mingetty-service config)
 (define-record-type* <nscd-configuration> nscd-configuration
   make-nscd-configuration
   nscd-configuration?
+  (implementation nscd-implementation
+                  (default 'glibc))               ;'glibc or 'nsncd
   (log-file    nscd-configuration-log-file        ;string
                (default #f))
   (debug-level nscd-debug-level                   ;integer
@@ -1543,12 +1546,20 @@ (define (nscd-shepherd-service config)
            (requirement '(user-processes syslogd))
 
            (start #~(make-forkexec-constructor
-                     (list #$nscd "-f" #$nscd.conf "--foreground")
+                     #$(match (nscd-implementation config)
+                         ('glibc
+                          #~(list #$nscd "-f" #$nscd.conf "--foreground"))
+                         ('nsncd
+                          #~(list #$(file-append nsncd "/bin/nsncd"))))
 
-                     ;; Wait for the PID file.  However, the PID file is
-                     ;; written before nscd is actually listening on its
-                     ;; socket (XXX).
-                     #:pid-file "/var/run/nscd/nscd.pid"
+                     #$@(match (nscd-implementation config)
+                          ('glibc
+                           ;; Wait for the PID file.  However, the PID file is
+                           ;; written before nscd is actually listening on its
+                           ;; socket (XXX).
+                           #~(#:pid-file  "/var/run/nscd/nscd.pid"))
+                          ('nsncd
+                           #~()))
 
                      #:environment-variables
                      (list (string-append "LD_LIBRARY_PATH="
-- 
2.49.0





This bug report was last modified 23 days ago.

Previous Next


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