[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] gnu: Add GSSD and Pipefs services
From: |
John Darrington |
Subject: |
[PATCH 2/2] gnu: Add GSSD and Pipefs services |
Date: |
Sat, 10 Sep 2016 21:18:03 +0200 |
* gnu/services/nfs.scm (pipefs-service-type): New Variable,
(gss-service-type): New Variable.
---
doc/guix.texi | 48 +++++++++++++++++++++++++++++++++++----
gnu/services/nfs.scm | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 107 insertions(+), 5 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 9f57744..f812a81 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -219,6 +219,7 @@ Services
* Database Services:: SQL databases.
* Mail Services:: IMAP, POP3, SMTP, and all that.
* Web Services:: Web servers.
+* NFS Services:: NFS related services.
* Miscellaneous Services:: Other services.
Defining Services
@@ -7561,6 +7562,7 @@ declaration.
* Database Services:: SQL databases.
* Mail Services:: IMAP, POP3, SMTP, and all that.
* Web Services:: Web servers.
+* NFS Services:: NFS Related Serivices.
* Miscellaneous Services:: Other services.
@end menu
@@ -10091,15 +10093,49 @@ directories are created when the service is activated.
@end deffn
address@hidden Miscellaneous Services
address@hidden Miscellaneous Services
address@hidden NFS Services
address@hidden NFS Services
address@hidden nfs
+
+The @code{(gnu services nfs)} module provides the following services,
+which are most commonly used in relation to mouting or exporting NFS
+filesystems.
+
address@hidden GSS Daemon Service
address@hidden gssd
address@hidden gss
+
address@hidden {Scheme Variable} gss-service-type
+A service type for the RPC Global Security System (GSS) daemon.
address@hidden defvr
+
address@hidden {Data Type} gss-configuration
+Data type representing the configuration of the RPC GSS Daemon service.
+This type has the following parameters:
address@hidden @asis
address@hidden @code{nfs-utils} (default: @code{nfs-utils})
+The package in which the @command{rpc.gssd} command is to be found.
+
address@hidden table
address@hidden deftp
+
+
address@hidden Pipefs Pseudo Filesystem
address@hidden pipefs
address@hidden rpc_pipefs
address@hidden {Scheme Variable} pipefs-service-type
+A service type for the pipefs pseudo filesystem.
address@hidden defvr
+
address@hidden {Data Type} pipefs-configuration
+Data type representing the configuration of the pipefs service.
+There are no configurable parameters to this type.
address@hidden deftp
@subsubheading RPC Bind Service
@cindex rpcbind
-The @code{(gnu services nfs)} module provides the following:
-
@defvr {Scheme Variable} rpcbind-service-type
A service type for the RPC portmapper daemon.
@end defvr
@@ -10119,6 +10155,10 @@ instance.
@end table
@end deftp
address@hidden Miscellaneous Services
address@hidden Miscellaneous Services
+
+
@cindex lirc
@subsubheading Lirc Service
diff --git a/gnu/services/nfs.scm b/gnu/services/nfs.scm
index 82713d8..0fa613a 100644
--- a/gnu/services/nfs.scm
+++ b/gnu/services/nfs.scm
@@ -20,11 +20,22 @@
#:use-module (gnu)
#:use-module (gnu services shepherd)
#:use-module (gnu packages onc-rpc)
+ #:use-module (gnu packages linux)
#:use-module (guix)
#:use-module (guix records)
+ #:use-module (ice-9 match)
+ #:use-module (gnu build file-systems)
#:export (rpcbind-service-type
rpcbind-configuration
- rpcbind-configuration?))
+ rpcbind-configuration?
+
+ pipefs-service-type
+ pipefs-configuration
+ pipefs-configuration?
+
+ gss-service-type
+ gss-configuration
+ gss-configuration?))
(define-record-type* <rpcbind-configuration>
rpcbind-configuration make-rpcbind-configuration
@@ -52,3 +63,54 @@
(start #~(make-forkexec-constructor #$rpcbind-command))
(stop #~(make-kill-destructor))))))
+
+
+
+(define-record-type* <pipefs-configuration>
+ pipefs-configuration make-pipefs-configuration
+ pipefs-configuration?)
+
+(define pipefs-service-type
+ (shepherd-service-type
+ 'pipefs
+ (lambda (config)
+ (with-imported-modules '((gnu build file-systems)
+ (guix build bournish))
+ (define pipefs-dir "/var/lib/nfs/rpc_pipefs")
+
+ (shepherd-service
+ (documentation "Mount the pipefs pseudo filesystem.")
+ (provision '(rpc-pipefs))
+
+ (start #~(lambda ()
+ (mkdir-p #$pipefs-dir)
+ (mount "rpc_pipefs" #$pipefs-dir "rpc_pipefs")))
+ (stop #~(lambda (pid . args)
+ (umount #$pipefs-dir MNT_DETACH))))))))
+
+
+
+(define-record-type* <gss-configuration>
+ gss-configuration make-gss-configuration
+ gss-configuration?
+ (nfs-utils gss-configuration-gss
+ (default nfs-utils)))
+
+(define gss-service-type
+ (shepherd-service-type
+ 'gss
+ (lambda (config)
+ (define pkg
+ (gss-configuration-gss config))
+
+ (define gss-command
+ #~(list (string-append #$pkg "/sbin/rpc.gssd") "-f"))
+
+ (shepherd-service
+ (documentation "Start the RPC GSS daemon.")
+ (requirement '(rpcbind-daemon rpc-pipefs))
+ (provision '(gss-daemon))
+
+ (start #~(make-forkexec-constructor #$gss-command))
+ (stop #~(make-kill-destructor))))))
+
--
2.1.4
- [PATCH 1/2] doc: "Various Services" -> "Miscellaneous Services", John Darrington, 2016/09/10
- [PATCH 2/2] gnu: Add GSSD and Pipefs services,
John Darrington <=
- "filesystem" vs. "file system", John Darrington, 2016/09/15
- Re: "filesystem" vs. "file system", Ludovic Courtès, 2016/09/15
- [PATCH] gnu: Add NFS related services., John Darrington, 2016/09/25
- Re: [PATCH] gnu: Add NFS related services., Ludovic Courtès, 2016/09/30
- Re: [PATCH] gnu: Add NFS related services., John Darrington, 2016/09/30