services: dhcp-client: Deprecate 'dhcp-client-service' procedure.
* gnu/services/networking.scm (dhcp-client-service-type): Add default value. * gnu/system/examples/bare-bones.tmpl: Use (service dhcp-client-service-type) instead of (dhcp-client-service). * gnu/system/examples/beaglebone-black.tmpl: Likewise. * gnu/tests/base.scm (%avahi-os): Likewise. * gnu/tests/databases.scm (%memcached-os): Likewise. (%mongodb-os): Likewise. * gnu/tests/dict.scm (%dicod-os): Likewise. * gnu/tests/mail.scm (%opensmtpd-os): Likewise. (%exim-os): Likewise. (%dovecot-os): Likewise. * gnu/tests/messaging.scm (run-xmpp-test): Likewise. (run-bitlbee-test): Likewise. * gnu/tests/monitoring.scm (%prometheus-node-exporter-os): Likewise. * gnu/tests/networking.scm (%inetd-os): Likewise. (run-iptables-test): Likewise. * gnu/tests/nfs.scm (%base-os): Likewise. * gnu/tests/rsync.scm (%rsync-os): Likewise. * gnu/tests/ssh.scm (run-ssh-test): Likewise. * gnu/tests/version-control.scm (%cgit-os): Likewise. (%git-http-os): Likewise. (%gitolite-os): Likewise. * gnu/tests/virtualization.scm (%libvirt-os): Likewise. * gnu/tests/web.scm (%httpd-os): Likewise. (%nginx-os): Likewise. (%varnish-os): Likewise. (%php-fpm-os): Likewise. (%hpcguix-web-os): Likewise. (%tailon-os): Likewise. * tests/guix-system.sh: Likewise. * doc/guix.texi (Networking Services): Document 'dhcp-client-service-type' and remove 'dhcp-client-service'.
This commit is contained in:
parent
03fd37b4eb
commit
39d7fdce45
@ -11546,10 +11546,11 @@ The @code{(gnu services networking)} module provides services to configure
|
|||||||
the network interface.
|
the network interface.
|
||||||
|
|
||||||
@cindex DHCP, networking service
|
@cindex DHCP, networking service
|
||||||
@deffn {Scheme Procedure} dhcp-client-service [#:dhcp @var{isc-dhcp}]
|
@defvr {Scheme Variable} dhcp-client-service-type
|
||||||
Return a service that runs @var{dhcp}, a Dynamic Host Configuration
|
This is the type of services that run @var{dhcp}, a Dynamic Host Configuration
|
||||||
Protocol (DHCP) client, on all the non-loopback network interfaces.
|
Protocol (DHCP) client, on all the non-loopback network interfaces. Its value
|
||||||
@end deffn
|
is the DHCP client package to use, @code{isc-dhcp} by default.
|
||||||
|
@end defvr
|
||||||
|
|
||||||
@deffn {Scheme Procedure} dhcpd-service-type
|
@deffn {Scheme Procedure} dhcpd-service-type
|
||||||
This type defines a service that runs a DHCP daemon. To create a
|
This type defines a service that runs a DHCP daemon. To create a
|
||||||
@ -17168,7 +17169,7 @@ A helper function to quickly add php to an @code{nginx-server-configuration}.
|
|||||||
|
|
||||||
A simple services setup for nginx with php can look like this:
|
A simple services setup for nginx with php can look like this:
|
||||||
@example
|
@example
|
||||||
(services (cons* (dhcp-client-service)
|
(services (cons* (service dhcp-client-service-type)
|
||||||
(service php-fpm-service-type)
|
(service php-fpm-service-type)
|
||||||
(service nginx-service-type
|
(service nginx-service-type
|
||||||
(nginx-server-configuration
|
(nginx-server-configuration
|
||||||
|
@ -53,6 +53,7 @@
|
|||||||
static-networking-service-type)
|
static-networking-service-type)
|
||||||
#:export (%facebook-host-aliases
|
#:export (%facebook-host-aliases
|
||||||
dhcp-client-service
|
dhcp-client-service
|
||||||
|
dhcp-client-service-type
|
||||||
|
|
||||||
dhcpd-service-type
|
dhcpd-service-type
|
||||||
dhcpd-configuration
|
dhcpd-configuration
|
||||||
@ -202,9 +203,10 @@ fe80::1%lo0 apps.facebook.com\n")
|
|||||||
"-pf" #$pid-file ifaces))))
|
"-pf" #$pid-file ifaces))))
|
||||||
(and (zero? (cdr (waitpid pid)))
|
(and (zero? (cdr (waitpid pid)))
|
||||||
(read-pid-file #$pid-file)))))
|
(read-pid-file #$pid-file)))))
|
||||||
(stop #~(make-kill-destructor))))))
|
(stop #~(make-kill-destructor))))
|
||||||
|
isc-dhcp))
|
||||||
|
|
||||||
(define* (dhcp-client-service #:key (dhcp isc-dhcp))
|
(define* (dhcp-client-service #:key (dhcp isc-dhcp)) ;deprecated
|
||||||
"Return a service that runs @var{dhcp}, a Dynamic Host Configuration
|
"Return a service that runs @var{dhcp}, a Dynamic Host Configuration
|
||||||
Protocol (DHCP) client, on all the non-loopback network interfaces."
|
Protocol (DHCP) client, on all the non-loopback network interfaces."
|
||||||
(service dhcp-client-service-type dhcp))
|
(service dhcp-client-service-type dhcp))
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
;; Add services to the baseline: a DHCP client and
|
;; Add services to the baseline: a DHCP client and
|
||||||
;; an SSH server.
|
;; an SSH server.
|
||||||
(services (cons* (dhcp-client-service)
|
(services (cons* (service dhcp-client-service-type)
|
||||||
(service openssh-service-type
|
(service openssh-service-type
|
||||||
(openssh-configuration
|
(openssh-configuration
|
||||||
(port-number 2222)))
|
(port-number 2222)))
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
;; Globally-installed packages.
|
;; Globally-installed packages.
|
||||||
(packages (cons* screen openssh %base-packages))
|
(packages (cons* screen openssh %base-packages))
|
||||||
|
|
||||||
(services (cons* (dhcp-client-service)
|
(services (cons* (service dhcp-client-service-type)
|
||||||
;; mingetty does not work on serial lines.
|
;; mingetty does not work on serial lines.
|
||||||
;; Use agetty with board-specific serial parameters.
|
;; Use agetty with board-specific serial parameters.
|
||||||
(agetty-service
|
(agetty-service
|
||||||
|
@ -673,7 +673,7 @@ non-ASCII names from /tmp.")
|
|||||||
(name-service-switch %mdns-host-lookup-nss)
|
(name-service-switch %mdns-host-lookup-nss)
|
||||||
(services (cons* (avahi-service #:debug? #t)
|
(services (cons* (avahi-service #:debug? #t)
|
||||||
(dbus-service)
|
(dbus-service)
|
||||||
(dhcp-client-service) ;needed for multicast
|
(service dhcp-client-service-type) ;needed for multicast
|
||||||
|
|
||||||
;; Enable heavyweight debugging output.
|
;; Enable heavyweight debugging output.
|
||||||
(modify-services (operating-system-user-services
|
(modify-services (operating-system-user-services
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
(define %memcached-os
|
(define %memcached-os
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(dhcp-client-service)
|
(service dhcp-client-service-type)
|
||||||
(service memcached-service-type)))
|
(service memcached-service-type)))
|
||||||
|
|
||||||
(define* (run-memcached-test #:optional (port 11211))
|
(define* (run-memcached-test #:optional (port 11211))
|
||||||
@ -130,7 +130,7 @@
|
|||||||
(operating-system
|
(operating-system
|
||||||
(inherit
|
(inherit
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(dhcp-client-service)
|
(service dhcp-client-service-type)
|
||||||
(service mongodb-service-type)))
|
(service mongodb-service-type)))
|
||||||
(packages (cons* mongodb
|
(packages (cons* mongodb
|
||||||
%base-packages))))
|
%base-packages))))
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
(define %dicod-os
|
(define %dicod-os
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(dhcp-client-service)
|
(service dhcp-client-service-type)
|
||||||
(service dicod-service-type
|
(service dicod-service-type
|
||||||
(dicod-configuration
|
(dicod-configuration
|
||||||
(interfaces '("0.0.0.0"))
|
(interfaces '("0.0.0.0"))
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
(define %opensmtpd-os
|
(define %opensmtpd-os
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(dhcp-client-service)
|
(service dhcp-client-service-type)
|
||||||
(service opensmtpd-service-type
|
(service opensmtpd-service-type
|
||||||
(opensmtpd-configuration
|
(opensmtpd-configuration
|
||||||
(config-file
|
(config-file
|
||||||
@ -155,7 +155,7 @@ accept from any for local deliver to mbox
|
|||||||
|
|
||||||
(define %exim-os
|
(define %exim-os
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(dhcp-client-service)
|
(service dhcp-client-service-type)
|
||||||
(service mail-aliases-service-type '())
|
(service mail-aliases-service-type '())
|
||||||
(service exim-service-type
|
(service exim-service-type
|
||||||
(exim-configuration
|
(exim-configuration
|
||||||
@ -283,7 +283,7 @@ acl_check_data:
|
|||||||
|
|
||||||
(define %dovecot-os
|
(define %dovecot-os
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(dhcp-client-service)
|
(service dhcp-client-service-type)
|
||||||
(dovecot-service #:config
|
(dovecot-service #:config
|
||||||
(dovecot-configuration
|
(dovecot-configuration
|
||||||
(disable-plaintext-auth? #f)
|
(disable-plaintext-auth? #f)
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
"Run a test of an OS running XMPP-SERVICE, which writes its PID to PID-FILE."
|
"Run a test of an OS running XMPP-SERVICE, which writes its PID to PID-FILE."
|
||||||
(define os
|
(define os
|
||||||
(marionette-operating-system
|
(marionette-operating-system
|
||||||
(simple-operating-system (dhcp-client-service)
|
(simple-operating-system (service dhcp-client-service-type)
|
||||||
xmpp-service)
|
xmpp-service)
|
||||||
#:imported-modules '((gnu services herd))))
|
#:imported-modules '((gnu services herd))))
|
||||||
|
|
||||||
@ -167,7 +167,7 @@
|
|||||||
(define (run-bitlbee-test)
|
(define (run-bitlbee-test)
|
||||||
(define os
|
(define os
|
||||||
(marionette-operating-system
|
(marionette-operating-system
|
||||||
(simple-operating-system (dhcp-client-service)
|
(simple-operating-system (service dhcp-client-service-type)
|
||||||
(service bitlbee-service-type
|
(service bitlbee-service-type
|
||||||
(bitlbee-configuration
|
(bitlbee-configuration
|
||||||
(interface "0.0.0.0"))))
|
(interface "0.0.0.0"))))
|
||||||
|
@ -85,7 +85,7 @@
|
|||||||
|
|
||||||
(define %prometheus-node-exporter-os
|
(define %prometheus-node-exporter-os
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(dhcp-client-service)
|
(service dhcp-client-service-type)
|
||||||
(service prometheus-node-exporter-service-type
|
(service prometheus-node-exporter-service-type
|
||||||
(prometheus-node-exporter-configuration))))
|
(prometheus-node-exporter-configuration))))
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
(define %inetd-os
|
(define %inetd-os
|
||||||
;; Operating system with 2 inetd services.
|
;; Operating system with 2 inetd services.
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(dhcp-client-service)
|
(service dhcp-client-service-type)
|
||||||
(service inetd-service-type
|
(service inetd-service-type
|
||||||
(inetd-configuration
|
(inetd-configuration
|
||||||
(entries (list
|
(entries (list
|
||||||
@ -463,7 +463,7 @@ COMMIT
|
|||||||
(define os
|
(define os
|
||||||
(marionette-operating-system
|
(marionette-operating-system
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(dhcp-client-service)
|
(service dhcp-client-service-type)
|
||||||
(service inetd-service-type
|
(service inetd-service-type
|
||||||
(inetd-configuration
|
(inetd-configuration
|
||||||
(entries (list
|
(entries (list
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
(services (cons*
|
(services (cons*
|
||||||
(service rpcbind-service-type
|
(service rpcbind-service-type
|
||||||
(rpcbind-configuration))
|
(rpcbind-configuration))
|
||||||
(dhcp-client-service)
|
(service dhcp-client-service-type)
|
||||||
%base-services))))
|
%base-services))))
|
||||||
|
|
||||||
(define (run-nfs-test name socket)
|
(define (run-nfs-test name socket)
|
||||||
|
@ -111,7 +111,7 @@ PORT."
|
|||||||
;; Return operating system under test.
|
;; Return operating system under test.
|
||||||
(let ((base-os
|
(let ((base-os
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(dhcp-client-service)
|
(service dhcp-client-service-type)
|
||||||
(service rsync-service-type))))
|
(service rsync-service-type))))
|
||||||
(operating-system
|
(operating-system
|
||||||
(inherit base-os)
|
(inherit base-os)
|
||||||
|
@ -39,7 +39,7 @@ empty-password logins.
|
|||||||
When SFTP? is true, run an SFTP server test."
|
When SFTP? is true, run an SFTP server test."
|
||||||
(define os
|
(define os
|
||||||
(marionette-operating-system
|
(marionette-operating-system
|
||||||
(simple-operating-system (dhcp-client-service) ssh-service)
|
(simple-operating-system (service dhcp-client-service-type) ssh-service)
|
||||||
#:imported-modules '((gnu services herd)
|
#:imported-modules '((gnu services herd)
|
||||||
(guix combinators))))
|
(guix combinators))))
|
||||||
(define vm
|
(define vm
|
||||||
|
@ -92,7 +92,7 @@
|
|||||||
;; Operating system under test.
|
;; Operating system under test.
|
||||||
(let ((base-os
|
(let ((base-os
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(dhcp-client-service)
|
(service dhcp-client-service-type)
|
||||||
(service cgit-service-type
|
(service cgit-service-type
|
||||||
(cgit-configuration
|
(cgit-configuration
|
||||||
(nginx %cgit-configuration-nginx)))
|
(nginx %cgit-configuration-nginx)))
|
||||||
@ -237,7 +237,7 @@ HTTP-PORT."
|
|||||||
|
|
||||||
(define %git-http-os
|
(define %git-http-os
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(dhcp-client-service)
|
(service dhcp-client-service-type)
|
||||||
(service fcgiwrap-service-type)
|
(service fcgiwrap-service-type)
|
||||||
(service nginx-service-type %git-nginx-configuration)
|
(service nginx-service-type %git-nginx-configuration)
|
||||||
%test-repository-service))
|
%test-repository-service))
|
||||||
@ -328,7 +328,7 @@ HTTP-PORT."
|
|||||||
|
|
||||||
(define %gitolite-os
|
(define %gitolite-os
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(dhcp-client-service)
|
(service dhcp-client-service-type)
|
||||||
(service openssh-service-type)
|
(service openssh-service-type)
|
||||||
(service gitolite-service-type
|
(service gitolite-service-type
|
||||||
(gitolite-configuration
|
(gitolite-configuration
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
(define %libvirt-os
|
(define %libvirt-os
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(dhcp-client-service)
|
(service dhcp-client-service-type)
|
||||||
(dbus-service)
|
(dbus-service)
|
||||||
(polkit-service)
|
(polkit-service)
|
||||||
(service libvirt-service-type)))
|
(service libvirt-service-type)))
|
||||||
|
@ -125,7 +125,7 @@ HTTP-PORT."
|
|||||||
|
|
||||||
(define %httpd-os
|
(define %httpd-os
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(dhcp-client-service)
|
(service dhcp-client-service-type)
|
||||||
(service httpd-service-type
|
(service httpd-service-type
|
||||||
(httpd-configuration
|
(httpd-configuration
|
||||||
(config
|
(config
|
||||||
@ -154,7 +154,7 @@ HTTP-PORT."
|
|||||||
(define %nginx-os
|
(define %nginx-os
|
||||||
;; Operating system under test.
|
;; Operating system under test.
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(dhcp-client-service)
|
(service dhcp-client-service-type)
|
||||||
(service nginx-service-type
|
(service nginx-service-type
|
||||||
(nginx-configuration
|
(nginx-configuration
|
||||||
(log-directory "/var/log/nginx")
|
(log-directory "/var/log/nginx")
|
||||||
@ -188,7 +188,7 @@ sub vcl_synth {
|
|||||||
|
|
||||||
(define %varnish-os
|
(define %varnish-os
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(dhcp-client-service)
|
(service dhcp-client-service-type)
|
||||||
;; Pretend to be a web server that serves %index.html-contents.
|
;; Pretend to be a web server that serves %index.html-contents.
|
||||||
(service varnish-service-type
|
(service varnish-service-type
|
||||||
(varnish-configuration
|
(varnish-configuration
|
||||||
@ -237,7 +237,7 @@ echo(\"Computed by php:\".((string)(2+3)));
|
|||||||
(define %php-fpm-os
|
(define %php-fpm-os
|
||||||
;; Operating system under test.
|
;; Operating system under test.
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(dhcp-client-service)
|
(service dhcp-client-service-type)
|
||||||
(service php-fpm-service-type)
|
(service php-fpm-service-type)
|
||||||
(service nginx-service-type
|
(service nginx-service-type
|
||||||
(nginx-configuration
|
(nginx-configuration
|
||||||
@ -392,7 +392,7 @@ HTTP-PORT, along with php-fpm."
|
|||||||
|
|
||||||
(define %hpcguix-web-os
|
(define %hpcguix-web-os
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(dhcp-client-service)
|
(service dhcp-client-service-type)
|
||||||
(service hpcguix-web-service-type
|
(service hpcguix-web-service-type
|
||||||
(hpcguix-web-configuration
|
(hpcguix-web-configuration
|
||||||
(specs %hpcguix-web-specs)))))
|
(specs %hpcguix-web-specs)))))
|
||||||
@ -407,7 +407,7 @@ HTTP-PORT, along with php-fpm."
|
|||||||
(define %tailon-os
|
(define %tailon-os
|
||||||
;; Operating system under test.
|
;; Operating system under test.
|
||||||
(simple-operating-system
|
(simple-operating-system
|
||||||
(dhcp-client-service)
|
(service dhcp-client-service-type)
|
||||||
(service tailon-service-type
|
(service tailon-service-type
|
||||||
(tailon-configuration
|
(tailon-configuration
|
||||||
(config-file
|
(config-file
|
||||||
|
@ -438,6 +438,14 @@ This is the declarative counterpart of 'gexp->file'."
|
|||||||
(base file-append-base) ;<package> | <derivation> | ...
|
(base file-append-base) ;<package> | <derivation> | ...
|
||||||
(suffix file-append-suffix)) ;list of strings
|
(suffix file-append-suffix)) ;list of strings
|
||||||
|
|
||||||
|
(define (write-file-append file port)
|
||||||
|
(match file
|
||||||
|
(($ <file-append> base suffix)
|
||||||
|
(format port "#<file-append ~s ~s>" base
|
||||||
|
(string-join suffix)))))
|
||||||
|
|
||||||
|
(set-record-type-printer! <file-append> write-file-append)
|
||||||
|
|
||||||
(define (file-append base . suffix)
|
(define (file-append base . suffix)
|
||||||
"Return a <file-append> object that expands to the concatenation of BASE and
|
"Return a <file-append> object that expands to the concatenation of BASE and
|
||||||
SUFFIX."
|
SUFFIX."
|
||||||
|
@ -153,8 +153,8 @@ cat > "$tmpfile" <<EOF
|
|||||||
|
|
||||||
(operating-system
|
(operating-system
|
||||||
$OS_BASE
|
$OS_BASE
|
||||||
(services (cons* (dhcp-client-service)
|
(services (cons* (service dhcp-client-service-type)
|
||||||
(dhcp-client-service) ;twice!
|
(service dhcp-client-service-type) ;twice!
|
||||||
%base-services)))
|
%base-services)))
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user