From aab322d909c0b4abec132ef7aff31c31a1208841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 4 Dec 2017 23:31:15 +0100 Subject: install: Don't start sshd by default. Reported by Christopher Baines at . * gnu/services/ssh.scm ()[%auto-start?]: New field. (openssh-shepherd-service): Honor it. * gnu/system/install.scm (%installation-services): Set '%auto-start?' to #f for openssh-service-type. --- gnu/services/ssh.scm | 12 ++++++++++-- gnu/system/install.scm | 5 ++++- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'gnu') diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm index b33ec946c6..301ba74041 100644 --- a/gnu/services/ssh.scm +++ b/gnu/services/ssh.scm @@ -304,7 +304,14 @@ The other options should be self-descriptive." ;; list of user-name/file-like tuples (authorized-keys openssh-authorized-keys - (default '()))) + (default '())) + + ;; Boolean + ;; XXX: This should really be handled in an orthogonal way, for instance as + ;; proposed in . Keep it internal/undocumented + ;; for now. + (%auto-start? openssh-auto-start? + (default #t))) (define %openssh-accounts (list (user-group (name "sshd") (system? #t)) @@ -445,7 +452,8 @@ of user-name/file-like tuples." (provision '(ssh-daemon)) (start #~(make-forkexec-constructor #$openssh-command #:pid-file #$pid-file)) - (stop #~(make-kill-destructor))))) + (stop #~(make-kill-destructor)) + (auto-start? (openssh-auto-start? config))))) (define (openssh-pam-services config) "Return a list of for sshd with CONFIG." diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 78f2bf3a13..0dd7688634 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -264,7 +264,10 @@ You have been warned. Thanks for being so brave.\x1b[0m ;; The root account is passwordless, so make sure ;; a password is set before allowing logins. (allow-empty-passwords? #f) - (password-authentication? #t))) + (password-authentication? #t) + + ;; Don't start it upfront. + (%auto-start? #f))) ;; Since this is running on a USB stick with a overlayfs as the root ;; file system, use an appropriate cache configuration. -- cgit v1.2.3 From f00b85ff8d34df0a1879e593d4a85629b8586af7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 5 Dec 2017 11:50:00 +0100 Subject: gnu: commencement: Do not graft early bootstrap packages. By definition, these packages are not depended on at run time by any of the packages we use. Thus it does not make sense to inherit grafts. Furthermore, those grafts would often lead to extra overhead for users who would end up downloading those "-boot0" packages just to build package replacements that are in fact not going to be used. This reverts parts of f1597427f220b0799b9c8847768d2f5a93fe3730 and ce27857f710ff32c05f4ba19a04a695c1cc2ce20. Reported by Christopher Baines at . * gnu/packages/commencement.scm (file-boot0, binutils-boot0): Use plain 'inherit' instead of 'package/inherit'. --- gnu/packages/commencement.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 406a23b21c..c5c00688e4 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -113,7 +113,8 @@ (define file-boot0 (package-with-bootstrap-guile - (package-with-explicit-inputs (package/inherit file + (package-with-explicit-inputs (package + (inherit file) (name "file-boot0")) `(("make" ,gnu-make-boot0) ,@%bootstrap-inputs) @@ -140,7 +141,7 @@ (define binutils-boot0 (package-with-bootstrap-guile - (package/inherit binutils + (package (inherit binutils) (name "binutils-cross-boot0") (arguments `(#:guile ,%bootstrap-guile -- cgit v1.2.3 From 3e442f85fdbb5a0f8b7499010bf1c2c34a27f592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 5 Dec 2017 17:49:48 +0100 Subject: gnu: ghostscript-with-cups: Turn into a public variable. Tris allows Hydra/Cuirass to pick it up and to build its replacement. Failing that, users have to build "ghostscript-with-cups-9.22" from source. * gnu/packages/cups.scm (ghostscript/cups): Move to 'ghostscript.scm'. (cups-filters)[inputs]: Remove 'force'. * gnu/packages/ghostscript.scm (ghostscript/cups): New variable. --- gnu/packages/cups.scm | 10 +--------- gnu/packages/ghostscript.scm | 7 +++++++ 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index bbf2699f00..e3a252bc0c 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -46,14 +46,6 @@ #:use-module (gnu packages pkg-config) #:use-module (gnu packages tls)) -;; Delay to avoid module circularity problems. -(define ghostscript/cups - (delay - (package/inherit ghostscript - (name "ghostscript-with-cups") - (inputs `(("cups" ,cups-minimal) - ,@(package-inputs ghostscript)))))) - (define-public cups-filters (package (name "cups-filters") @@ -146,7 +138,7 @@ ("fontconfig" ,fontconfig) ("freetype" ,freetype) ("font-dejavu" ,font-dejavu) ; also needed by test suite - ("ghostscript" ,(force ghostscript/cups)) + ("ghostscript" ,ghostscript/cups) ("ijs" ,ijs) ("dbus" ,dbus) ("lcms" ,lcms) diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm index 28477b2c42..f0a28d0752 100644 --- a/gnu/packages/ghostscript.scm +++ b/gnu/packages/ghostscript.scm @@ -26,6 +26,7 @@ #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages compression) + #:use-module (gnu packages cups) #:use-module (gnu packages fontutils) #:use-module (gnu packages image) #:use-module (gnu packages perl) @@ -281,6 +282,12 @@ output file formats and printers.") ("libxt" ,libxt) ,@(package-inputs ghostscript))))) +(define-public ghostscript/cups + (package/inherit ghostscript + (name "ghostscript-with-cups") + (inputs `(("cups" ,cups-minimal) + ,@(package-inputs ghostscript))))) + (define-public ijs (package (name "ijs") -- cgit v1.2.3 From 614f8cc1c3e0065bff2de9e7ab625d710a94ffd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 5 Dec 2017 17:57:22 +0100 Subject: gnu: guix: Update snapshot to 91c9b5d. * gnu/packages/package-management.scm (guix): Update to 91c9b5d. --- gnu/packages/package-management.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index a1fb3b9cf7..d496416b19 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -86,8 +86,8 @@ ;; Note: the 'update-guix-package.scm' script expects this definition to ;; start precisely like this. (let ((version "0.13.0") - (commit "3fb6464ba43141b671481ce5ba158b6e6d1badfe") - (revision 13)) + (commit "91c9b5d016ac8bed127557d378c70fbc56cec0e5") + (revision 14)) (package (name "guix") @@ -103,7 +103,7 @@ (commit commit))) (sha256 (base32 - "0nx3nvr3myjhg7zyyrvxfs63ddmb7yv0ndzn1dq4gp2is65n3krr")) + "1cfkk78baj2fkfq8wwmliwpcmnarjnqlj4sk6q9zf03krs95zfl3")) (file-name (string-append "guix-" version "-checkout")))) (build-system gnu-build-system) (arguments -- cgit v1.2.3 From 787e8a80d54d8bd5320d76276dc5f4bafe5b86c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 6 Dec 2017 08:52:31 +0100 Subject: services: console-font: Use 'tcsetattr' instead of invoking 'unicode_start'. This is more robust, faster, and incidentally gets rid of remaining "error in the finalization thread: Bad file descriptor" messages. * gnu/services/base.scm (unicode-start): Rewrite to use 'tcgetattr' and 'tcsetattr'. (console-font-shepherd-services)[start]: Add 'loop' to check whether DEVICE is ready. Tolerate EX_OSERR return from 'setfont'. [modules]: New field. --- gnu/services/base.scm | 56 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 18 deletions(-) (limited to 'gnu') diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 11f55c588c..291dd63256 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -621,21 +621,23 @@ to add @var{device} to the kernel's entropy pool. The service will fail if (define (unicode-start tty) "Return a gexp to start Unicode support on @var{tty}." - - ;; We have to run 'unicode_start' in a pipe so that when it invokes the - ;; 'tty' command, that command returns TTY. - #~(begin - (let ((pid (primitive-fork))) - (case pid - ((0) - (close-fdes 0) - (dup2 (open-fdes #$tty O_RDONLY) 0) - (close-fdes 1) - (dup2 (open-fdes #$tty O_WRONLY) 1) - (execl #$(file-append kbd "/bin/unicode_start") - "unicode_start")) - (else - (zero? (cdr (waitpid pid)))))))) + (with-imported-modules '((guix build syscalls)) + #~(let* ((fd (open-fdes #$tty O_RDWR)) + (termios (tcgetattr fd))) + (define (set-utf8-input termios) + (set-field termios (termios-input-flags) + (logior (input-flags IUTF8) + (termios-input-flags termios)))) + + ;; See console_codes(4). + (display "\x1b%G" (fdes->outport fd)) + + (tcsetattr fd (tcsetattr-action TCSAFLUSH) + (set-utf8-input termios)) + + ;; TODO: ioctl(fd, KDSKBMODE, K_UNICODE); + (close-fdes fd) + #t))) (define console-keymap-service-type (shepherd-service-type @@ -674,11 +676,29 @@ to add @var{device} to the kernel's entropy pool. The service will fail if (requirement (list (symbol-append 'term- (string->symbol tty)))) + (modules '((guix build syscalls) ;for 'tcsetattr' + (srfi srfi-9 gnu))) ;for 'set-field' (start #~(lambda _ + ;; It could be that mingetty is not fully ready yet, + ;; which we check by calling 'ttyname'. + (let loop ((i 10)) + (unless (or (zero? i) + (call-with-input-file #$device + (lambda (port) + (false-if-exception (ttyname port))))) + (usleep 500) + (loop (- i 1)))) + (and #$(unicode-start device) - (zero? - (system* #$(file-append kbd "/bin/setfont") - "-C" #$device #$font))))) + ;; 'setfont' returns EX_OSERR (71) when an + ;; KDFONTOP ioctl fails, for example. Like + ;; systemd's vconsole support, let's not treat + ;; this as an error. + (case (status:exit-val + (system* #$(file-append kbd "/bin/setfont") + "-C" #$device #$font)) + ((0 71) #t) + (else #f))))) (stop #~(const #t)) (respawn? #f))))) tty+font)) -- cgit v1.2.3 From ad4953bc0ec1684c49c0934304c7ec200a0cd280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 6 Dec 2017 10:58:17 +0100 Subject: gnu: guix: Update to 0.14.0. --- gnu/packages/package-management.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index d496416b19..37db83ae09 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -85,9 +85,9 @@ ;; Latest version of Guix, which may or may not correspond to a release. ;; Note: the 'update-guix-package.scm' script expects this definition to ;; start precisely like this. - (let ((version "0.13.0") - (commit "91c9b5d016ac8bed127557d378c70fbc56cec0e5") - (revision 14)) + (let ((version "0.14.0") + (commit "40f5c53d89da266055a1dd6571c380f5c57fe5f9") + (revision 0)) (package (name "guix") @@ -103,7 +103,7 @@ (commit commit))) (sha256 (base32 - "1cfkk78baj2fkfq8wwmliwpcmnarjnqlj4sk6q9zf03krs95zfl3")) + "05d4cwliymipmfxqzz3khq6zw1iblkq0w3fkmj2819xlqjwa5wy5")) (file-name (string-append "guix-" version "-checkout")))) (build-system gnu-build-system) (arguments -- cgit v1.2.3 From 0dd91619a597b52bcb5d6d1bb675a9eb65242c44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 6 Dec 2017 10:58:29 +0100 Subject: gnu: guix: Update to ad4953b. --- gnu/packages/package-management.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 37db83ae09..45119bc708 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -86,8 +86,8 @@ ;; Note: the 'update-guix-package.scm' script expects this definition to ;; start precisely like this. (let ((version "0.14.0") - (commit "40f5c53d89da266055a1dd6571c380f5c57fe5f9") - (revision 0)) + (commit "ad4953bc0ec1684c49c0934304c7ec200a0cd280") + (revision 1)) (package (name "guix") @@ -103,7 +103,7 @@ (commit commit))) (sha256 (base32 - "05d4cwliymipmfxqzz3khq6zw1iblkq0w3fkmj2819xlqjwa5wy5")) + "0ngra4cb1kf3kwccslmhnvlr116drsnbqrsjniq1hrg5mqf6vf1b")) (file-name (string-append "guix-" version "-checkout")))) (build-system gnu-build-system) (arguments -- cgit v1.2.3