From 9e2d275b27ee1f34d82cae8a25740169870e76d5 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 5 Feb 2021 17:05:46 -0500 Subject: gnu: services: Fix the NFS service. * gnu/services/nfs.scm (rpcbind-service-type): Adjust for the file name change of the rpcbind command. --- gnu/services/nfs.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/services') diff --git a/gnu/services/nfs.scm b/gnu/services/nfs.scm index 859097e7887..277178c058a 100644 --- a/gnu/services/nfs.scm +++ b/gnu/services/nfs.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 John Darrington ;;; Copyright © 2018, 2019, 2020 Ricardo Wurmus -;;; Copyright © 2020 Maxim Cournoyer +;;; Copyright © 2020, 2021 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -69,7 +69,7 @@ (rpcbind-configuration-rpcbind config)) (define rpcbind-command - #~(list (string-append #$rpcbind "/bin/rpcbind") "-f" + #~(list (string-append #$rpcbind "/sbin/rpcbind") "-f" #$@(if (rpcbind-configuration-warm-start? config) '("-w") '()))) (shepherd-service -- cgit v1.3 From 221985ce6bd8036ceac3d1973be3dc084f52b1de Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 6 Feb 2021 15:18:40 +0100 Subject: services: PostgreSQL: Quote database names. * gnu/services/databases.scm (postgresql-create-roles): Quote the name in the SQL query so that roles/usernames containing hyphens will work. --- gnu/services/databases.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/services') diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm index c11898693f0..d908b86af87 100644 --- a/gnu/services/databases.scm +++ b/gnu/services/databases.scm @@ -396,12 +396,12 @@ and stores the database cluster in @var{data-directory}." rolname = '" ,name "')) as not_exists;\n" "\\gset\n" "\\if :not_exists\n" -"CREATE ROLE " ,name +"CREATE ROLE \"" ,name "\"" " WITH " ,(format-permissions permissions) ";\n" ,@(if create-database? - `("CREATE DATABASE " ,name - " OWNER " ,name ";\n") + `("CREATE DATABASE \"" ,name "\"" + " OWNER \"" ,name "\";\n") '()) "\\endif\n"))) roles))) -- cgit v1.3 From fe7529d71b8d7b09b48679c86e1155895afd92a4 Mon Sep 17 00:00:00 2001 From: raid5atemyhomework Date: Fri, 8 Jan 2021 09:41:25 +0800 Subject: gnu: Remove 'file-systems requirement from kernel-module-loader. * gnu/services/linux.scm (kernel-module-loader-shepherd-service): Remove 'file-systems requirement. Signed-off-by: Danny Milosavljevic --- gnu/services/linux.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnu/services') diff --git a/gnu/services/linux.scm b/gnu/services/linux.scm index 1046a7e0c2d..340b330030f 100644 --- a/gnu/services/linux.scm +++ b/gnu/services/linux.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2020 Maxim Cournoyer ;;; Copyright © 2020 Brice Waegeneire ;;; Copyright © 2020 Efraim Flashner +;;; Copyright © 2021 raid5atemyhomework ;;; ;;; This file is part of GNU Guix. ;;; @@ -150,7 +151,7 @@ representation." (shepherd-service (documentation "Load kernel modules.") (provision '(kernel-module-loader)) - (requirement '(file-systems)) + (requirement '()) (one-shot? #t) (modules `((srfi srfi-1) (srfi srfi-34) -- cgit v1.3 From 703e5c92eeb38d86455c2b1cace5cad9fc08b349 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Mon, 8 Feb 2021 12:30:12 +0100 Subject: services: cuirass: Add Zabbix support. * gnu/services/cuirass.scm ()[zabbix-uri]: New field. (cuirass-shepherd-service): Honor it. --- gnu/services/cuirass.scm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gnu/services') diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm index 2d0bf47b48e..d291d494fcf 100644 --- a/gnu/services/cuirass.scm +++ b/gnu/services/cuirass.scm @@ -109,6 +109,8 @@ (default #f)) (fallback? cuirass-configuration-fallback? ;boolean (default #f)) + (zabbix-uri cuirass-configuration-zabbix-uri ;string + (default #f)) (extra-options cuirass-configuration-extra-options (default '()))) @@ -129,6 +131,7 @@ (use-substitutes? (cuirass-configuration-use-substitutes? config)) (one-shot? (cuirass-configuration-one-shot? config)) (fallback? (cuirass-configuration-fallback? config)) + (zabbix-uri (cuirass-configuration-zabbix-uri config)) (extra-options (cuirass-configuration-extra-options config))) `(,(shepherd-service (documentation "Run Cuirass.") @@ -145,6 +148,11 @@ #$@(if use-substitutes? '("--use-substitutes") '()) #$@(if one-shot? '("--one-shot") '()) #$@(if fallback? '("--fallback") '()) + #$@(if zabbix-uri + (list (string-append + "--zabbix-uri=" + zabbix-uri)) + '()) #$@extra-options) #:environment-variables -- cgit v1.3 From 91911b938208fff582e193f7a2b05584de9f2159 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Tue, 9 Feb 2021 09:20:00 +0100 Subject: services: cuirass: Move zabbix argument to the web process. This is a follow-up of 703e5c92eeb38d86455c2b1cace5cad9fc08b349. * gnu/services/cuirass.scm (cuirass-shepherd-service): Move "zabbix-uri" argument to the web process. --- gnu/services/cuirass.scm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gnu/services') diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm index d291d494fcf..1cebbfcb6e8 100644 --- a/gnu/services/cuirass.scm +++ b/gnu/services/cuirass.scm @@ -148,11 +148,6 @@ #$@(if use-substitutes? '("--use-substitutes") '()) #$@(if one-shot? '("--one-shot") '()) #$@(if fallback? '("--fallback") '()) - #$@(if zabbix-uri - (list (string-append - "--zabbix-uri=" - zabbix-uri)) - '()) #$@extra-options) #:environment-variables @@ -178,6 +173,11 @@ "--interval" #$(number->string interval) #$@(if use-substitutes? '("--use-substitutes") '()) #$@(if fallback? '("--fallback") '()) + #$@(if zabbix-uri + (list (string-append + "--zabbix-uri=" + zabbix-uri)) + '()) #$@extra-options) #:user #$user -- cgit v1.3 From 408f0b4c4dba671b648fe99cd4ef77d26e4486a4 Mon Sep 17 00:00:00 2001 From: Alexey Abramov Date: Sat, 30 Jan 2021 09:19:32 +0100 Subject: services: knot: Fix configuration verification. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/services/dns.scm (verify-knot-key-configuration): Fix the order of memq arguments. (verify-knot-keystore-configuration): Likewise. (verify-knot-acl-configuration): Replace fold with every procedure. Signed-off-by: 宋文武 --- gnu/services/dns.scm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gnu/services') diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm index b339eb0619b..d4aefe62858 100644 --- a/gnu/services/dns.scm +++ b/gnu/services/dns.scm @@ -256,9 +256,9 @@ (let ((id (knot-key-configuration-id key))) (unless (and (string? id) (not (equal? id ""))) (error-out "key id must be a non empty string."))) - (unless (memq '(#f hmac-md5 hmac-sha1 hmac-sha224 hmac-sha256 hmac-sha384 hmac-sha512) - (knot-key-configuration-algorithm key)) - (error-out "algorithm must be one of: #f, 'hmac-md5, 'hmac-sha1, + (unless (memq (knot-key-configuration-algorithm key) + '(#f hmac-md5 hmac-sha1 hmac-sha224 hmac-sha256 hmac-sha384 hmac-sha512)) + (error-out "algorithm must be one of: #f, 'hmac-md5, 'hmac-sha1, 'hmac-sha224, 'hmac-sha256, 'hmac-sha384 or 'hmac-sha512"))) (define (verify-knot-keystore-configuration keystore) @@ -267,9 +267,9 @@ (let ((id (knot-keystore-configuration-id keystore))) (unless (and (string? id) (not (equal? id ""))) (error-out "keystore id must be a non empty string."))) - (unless (memq '(pem pkcs11) - (knot-keystore-configuration-backend keystore)) - (error-out "backend must be one of: 'pem or 'pkcs11"))) + (unless (memq (knot-keystore-configuration-backend keystore) + '(pem pkcs11)) + (error-out "backend must be one of: 'pem or 'pkcs11"))) (define (verify-knot-policy-configuration policy) (unless (knot-policy-configuration? policy) @@ -288,7 +288,7 @@ (unless (and (string? id) (not (equal? id ""))) (error-out "acl id must be a non empty string.")) (unless (and (list? address) - (fold (lambda (x1 x2) (and (string? x1) (string? x2))) "" address)) + (every string? address)) (error-out "acl address must be a list of strings."))) (unless (boolean? (knot-acl-configuration-deny? acl)) (error-out "deny? must be #t or #f."))) -- cgit v1.3 From e429325d37e5752656a03882f60ee56d4f541fd1 Mon Sep 17 00:00:00 2001 From: 宋文武 Date: Fri, 13 Nov 2020 21:57:04 +0800 Subject: services: Add 'xorg-server-service-type'. * gnu/services/xorg.scm (xorg-server-service-type): New service type. (xorg-server-profile-service): New procedure. --- gnu/services/xorg.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'gnu/services') diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 45907091872..60611dc77dd 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -45,6 +45,7 @@ #:use-module (gnu packages admin) #:use-module (gnu packages bash) #:use-module (gnu system shadow) + #:use-module (guix build-system trivial) #:use-module (guix gexp) #:use-module (guix store) #:use-module (guix packages) @@ -70,6 +71,7 @@ xorg-wrapper xorg-start-command xinitrc + xorg-server-service-type %default-slim-theme %default-slim-theme-name @@ -483,6 +485,41 @@ a `service-extension', as used by `set-xorg-configuration'." (xorg-configuration xorg-configuration)) config))))))) +(define (xorg-server-profile-service config) + ;; XXX: profile-service-type only accepts objects. + (list + (package + (name "xorg-wrapper") + (version (package-version xorg-server)) + (source (xorg-wrapper config)) + (build-system trivial-build-system) + (arguments + '(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let* ((source (assoc-ref %build-inputs "source")) + (out (assoc-ref %outputs "out")) + (bin (string-append out "/bin"))) + (mkdir-p bin) + (symlink source (string-append bin "/X")) + (symlink source (string-append bin "/Xorg")) + #t)))) + (home-page (package-home-page xorg-server)) + (synopsis (package-synopsis xorg-server)) + (description (package-description xorg-server)) + (license (package-license xorg-server))))) + +(define xorg-server-service-type + (service-type + (name 'xorg-server) + (extensions + (list (service-extension profile-service-type + xorg-server-profile-service))) + (default-value (xorg-configuration)) + (description "Add @command{X} to the system profile, to be used with +@command{sx} or @command{xinit}."))) + ;;; ;;; SLiM log-in manager. -- cgit v1.3