From ed504cafa23c34bfa1823a4d5abf3ad55205484b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 17 Jun 2019 10:51:49 +0200 Subject: vm: 'system-docker-image' builds in a UTF-8 locale. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . Reported by Björn Höfling . This is a followup to 9c941364bfc0120e3ab5c5c4cc71a9a302d59a2b. * gnu/system/vm.scm (system-docker-image)[build]: Set GUIX_LOCPATH and call 'setlocale'. --- gnu/system/vm.scm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gnu/system') diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 0d4ed63eec..e7f7d8ca51 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -535,6 +535,11 @@ system." ;; Set the SQL schema location. (sql-schema #$schema) + ;; Allow non-ASCII file names--e.g., 'nss-certs'--to be decoded. + (setenv "GUIX_LOCPATH" + #+(file-append glibc-utf8-locales "/lib/locale")) + (setlocale LC_ALL "en_US.utf8") + (let* (;; This initializer requires elevated privileges that are ;; not normally available in the build environment (e.g., ;; it needs to create device nodes). In order to obtain -- cgit 1.4.1 From b84c4cda046589658c4d1ba4a9c0b292351fe5ca Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sat, 25 May 2019 11:49:42 +0530 Subject: linux-container: Remove networking service when network is shared with host. * gnu/system/linux-container.scm (dummy-networking-service-type): New variable. (containerized-operating-system): If network is shared with host, replace static-networking-service-type with dummy-networking-service-type. --- gnu/system/linux-container.scm | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'gnu/system') diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm index c1e963d047..61248c62b9 100644 --- a/gnu/system/linux-container.scm +++ b/gnu/system/linux-container.scm @@ -30,6 +30,7 @@ #:use-module (gnu build linux-container) #:use-module (gnu services) #:use-module (gnu services base) + #:use-module (gnu services shepherd) #:use-module (gnu system) #:use-module (gnu system file-systems) #:export (system-container @@ -65,6 +66,16 @@ from OS that are needed on the bare metal and not in a container." files))) base))) +(define dummy-networking-service-type + (shepherd-service-type + 'dummy-networking + (const (shepherd-service + (documentation "Provide loopback and networking without actually +doing anything.") + (provision '(loopback networking)) + (start #~(const #t)))) + #f)) + (define* (containerized-operating-system os mappings #:key shared-network? @@ -96,7 +107,8 @@ containerized OS. EXTRA-FILE-SYSTEMS is a list of file systems to add to OS." agetty-service-type) ;; Remove nscd service if network is shared with the host. (if shared-network? - (list nscd-service-type) + (list nscd-service-type + static-networking-service-type) (list)))) (operating-system @@ -105,10 +117,17 @@ containerized OS. EXTRA-FILE-SYSTEMS is a list of file systems to add to OS." (essential-services (container-essential-services this-operating-system #:shared-network? shared-network?)) - (services (remove (lambda (service) - (memq (service-kind service) - useless-services)) - (operating-system-user-services os))) + (services (append (remove (lambda (service) + (memq (service-kind service) + useless-services)) + (operating-system-user-services os)) + ;; Many Guix services depend on a 'networking' shepherd + ;; service, so make sure to provide a dummy 'networking' + ;; service when we are sure that networking is already set up + ;; in the host and can be used. That prevents double setup. + (if shared-network? + (list (service dummy-networking-service-type)) + '()))) (file-systems (append (map mapping->fs (if shared-network? (append %network-file-mappings mappings) -- cgit 1.4.1