From ee0de9945438cce41ef20e37144f41a8d40cd1ab Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Thu, 29 Aug 2019 23:02:10 +0200 Subject: services: cups: Add BrowseDNSSDSubTypes directive. * gnu/services/cups.scm (comma-separated-string-list?) (serialize-comma-separated-string-list): New variables. (cups-configuration)[browse-dns-sd-sub-types]: New field. * doc/guix.texi (Printing Services): Document it. --- gnu/services/cups.scm | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'gnu/services') diff --git a/gnu/services/cups.scm b/gnu/services/cups.scm index e77c43bfbf..ace7889fb6 100644 --- a/gnu/services/cups.scm +++ b/gnu/services/cups.scm @@ -83,6 +83,14 @@ (define (serialize-multiline-string-list field-name val) (for-each (lambda (str) (serialize-field field-name str)) val)) +(define (comma-separated-string-list? val) + (and (list? val) + (and-map (lambda (x) + (and (string? x) (not (string-index x #\,)))) + val))) +(define (serialize-comma-separated-string-list field-name val) + (serialize-field field-name (string-join val ","))) + (define (space-separated-string-list? val) (and (list? val) (and-map (lambda (x) @@ -489,6 +497,11 @@ requests.") (boolean #f) "Specifies whether to purge job history data automatically when it is no longer required for quotas.") + (browse-dns-sd-sub-types + (comma-separated-string-list (list "_cups")) + "Specifies a list of DNS-SD sub-types to advertise for each shared printer. +For example, @samp{\"_cups\" \"_print\"} will tell network clients that both +CUPS sharing and IPP Everywhere are supported.") (browse-local-protocols (browse-local-protocols 'dnssd) "Specifies which protocols to use for local printer sharing.") -- cgit v1.2.3 From 70186c24eee7603e1763143ba97ab6abea63f10c Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 27 Aug 2019 19:22:04 +0200 Subject: services: cups: Move SET-ENV to FILES-CONFIGURATION. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/services/cups.scm (cups-configuration): Move SET-ENV from here… (files-configuration): …to here. * doc/guix.texi (Printing Services): Adjust accordingly. --- gnu/services/cups.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gnu/services') diff --git a/gnu/services/cups.scm b/gnu/services/cups.scm index ace7889fb6..2105df6ded 100644 --- a/gnu/services/cups.scm +++ b/gnu/services/cups.scm @@ -458,7 +458,10 @@ or state files.") (user (string "lp") "Specifies the user name or ID that is used when running external -programs.")) +programs.") + (set-env + (string "variable value") + "Set the specified environment variable to be passed to child processes.")) (define (serialize-files-configuration field-name val) #f) @@ -811,9 +814,6 @@ reports @code{CUPS 2.0}. @code{Minimal} reports @code{CUPS 2.0.0}. @code{OS} reports @code{CUPS 2.0.0 (@var{uname})} where @var{uname} is the output of the @code{uname} command. @code{Full} reports @code{CUPS 2.0.0 (@var{uname}) IPP/2.0}.") - (set-env - (string "variable value") - "Set the specified environment variable to be passed to child processes.") (ssl-listen (multiline-string-list '()) "Listens on the specified interfaces for encrypted connections. Valid -- cgit v1.2.3 From 5a097cdd5446587511dbee049ad706366c74e5ad Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 31 Aug 2019 03:23:16 +0200 Subject: =?UTF-8?q?services:=20cups:=20Rename=20=E2=80=98retry-this-job?= =?UTF-8?q?=E2=80=99=20to=20=E2=80=98retry-current-job=E2=80=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/services/cups.scm (error-policy, cups-configuration): Substitute RETRY-CURRENT-JOB for the obsolete RETRY-THIS-JOB name of this policy. * doc/guix.texi (Printing Services): Likewise. --- gnu/services/cups.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/services') diff --git a/gnu/services/cups.scm b/gnu/services/cups.scm index 2105df6ded..c3c6d2f1be 100644 --- a/gnu/services/cups.scm +++ b/gnu/services/cups.scm @@ -139,7 +139,7 @@ (define-enumerated-field-type default-encryption (Never IfRequested Required)) (define-enumerated-field-type error-policy - (abort-job retry-job retry-this-job stop-printer)) + (abort-job retry-job retry-current-job stop-printer)) (define-enumerated-field-type log-level (none emerg alert crit error warn notice info debug debug2)) (define-enumerated-field-type log-time-format @@ -554,7 +554,7 @@ typically within a few milliseconds.") (error-policy 'stop-printer) "Specifies what to do when an error occurs. Possible values are @code{abort-job}, which will discard the failed print job; @code{retry-job}, -which will retry the job at a later time; @code{retry-this-job}, which retries +which will retry the job at a later time; @code{retry-current-job}, which retries the failed job immediately; and @code{stop-printer}, which stops the printer.") (filter-limit -- cgit v1.2.3 From c26f562e5e22b07e61475cab7324e84f6fe70e57 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Sun, 30 Jun 2019 22:56:25 +0200 Subject: services: nginx: Pass run-directory on config test. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . This fixes error logging errors in the activation script. * gnu/services/web.scm (nginx-activation): Add "-p" flag. Signed-off-by: Ludovic Courtès --- gnu/services/web.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnu/services') diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 35efddb0ae..56971238ab 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -682,7 +682,8 @@ of index files." (system* (string-append #$nginx "/sbin/nginx") "-c" #$(or file (default-nginx-config config)) - "-t")))) + "-p" #$run-directory + "-t")))) (define (nginx-shepherd-service config) (match-record config -- cgit v1.2.3 From 3b38bf141a464e1bb370af7d2b2651d1efb29781 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Fri, 6 Sep 2019 12:23:57 +0200 Subject: =?UTF-8?q?services:=20Add=20=E2=80=98/usr/bin/env=E2=80=99=20spec?= =?UTF-8?q?ial=20file.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/services/base.scm (%base-services): Add ‘/usr/bin/env‘ to special-files-service-type. --- gnu/services/base.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'gnu/services') diff --git a/gnu/services/base.scm b/gnu/services/base.scm index dcb7278f0f..a6439568f7 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2016 Ricardo Wurmus ;;; Copyright © 2018 Mathieu Othacehe ;;; Copyright © 2019 Efraim Flashner +;;; Copyright © 2019 Tobias Geerinckx-Rice ;;; Copyright © 2019 John Soo ;;; ;;; This file is part of GNU Guix. @@ -41,9 +42,9 @@ #:use-module (gnu packages admin) #:use-module ((gnu packages linux) #:select (alsa-utils crda eudev e2fsprogs fuse gpm kbd lvm2 rng-tools)) - #:use-module ((gnu packages base) - #:select (canonical-package glibc glibc-utf8-locales)) #:use-module (gnu packages bash) + #:use-module ((gnu packages base) + #:select (canonical-package coreutils glibc glibc-utf8-locales)) #:use-module (gnu packages package-management) #:use-module ((gnu packages gnupg) #:select (guile-gcrypt)) #:use-module (gnu packages linux) @@ -2425,6 +2426,9 @@ to handle." (service special-files-service-type `(("/bin/sh" ,(file-append (canonical-package bash) - "/bin/sh")))))) + "/bin/sh")) + "/bin/sh")) + ("/usr/bin/env" ,(file-append (canonical-package coreutils) + "/usr/bin/env")))))) ;;; base.scm ends here -- cgit v1.2.3 From e15f55208f8d0f93e075f681e36e86c65baa4405 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 6 Sep 2019 13:52:33 +0300 Subject: services: Fix typo. This is a follow-up to 3b38bf141a464e1bb370af7d2b2651d1efb29781. * gnu/services/base.scm (%base-services): Remove duplicated line. --- gnu/services/base.scm | 1 - 1 file changed, 1 deletion(-) (limited to 'gnu/services') diff --git a/gnu/services/base.scm b/gnu/services/base.scm index a6439568f7..97c53eeaf3 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -2427,7 +2427,6 @@ to handle." (service special-files-service-type `(("/bin/sh" ,(file-append (canonical-package bash) "/bin/sh")) - "/bin/sh")) ("/usr/bin/env" ,(file-append (canonical-package coreutils) "/usr/bin/env")))))) -- cgit v1.2.3 From 3fe53f49a718468bc086fa7d41740505d407e3ba Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Fri, 6 Sep 2019 19:35:08 -0400 Subject: =?UTF-8?q?Revert=20"services:=20Add=20=E2=80=98/usr/bin/env?= =?UTF-8?q?=E2=80=99=20special=20file."?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 3b38bf141a464e1bb370af7d2b2651d1efb29781. The Guix project discussed this years ago and decided against including /usr/bin/env. That decision should not be reversed without a wider discussion. --- gnu/services/base.scm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'gnu/services') diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 97c53eeaf3..dcb7278f0f 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -8,7 +8,6 @@ ;;; Copyright © 2016 Ricardo Wurmus ;;; Copyright © 2018 Mathieu Othacehe ;;; Copyright © 2019 Efraim Flashner -;;; Copyright © 2019 Tobias Geerinckx-Rice ;;; Copyright © 2019 John Soo ;;; ;;; This file is part of GNU Guix. @@ -42,9 +41,9 @@ #:use-module (gnu packages admin) #:use-module ((gnu packages linux) #:select (alsa-utils crda eudev e2fsprogs fuse gpm kbd lvm2 rng-tools)) - #:use-module (gnu packages bash) #:use-module ((gnu packages base) - #:select (canonical-package coreutils glibc glibc-utf8-locales)) + #:select (canonical-package glibc glibc-utf8-locales)) + #:use-module (gnu packages bash) #:use-module (gnu packages package-management) #:use-module ((gnu packages gnupg) #:select (guile-gcrypt)) #:use-module (gnu packages linux) @@ -2426,8 +2425,6 @@ to handle." (service special-files-service-type `(("/bin/sh" ,(file-append (canonical-package bash) - "/bin/sh")) - ("/usr/bin/env" ,(file-append (canonical-package coreutils) - "/usr/bin/env")))))) + "/bin/sh")))))) ;;; base.scm ends here -- cgit v1.2.3