diff options
Diffstat (limited to 'gnu/system')
-rw-r--r-- | gnu/system/install.scm | 8 | ||||
-rw-r--r-- | gnu/system/locale.scm | 32 | ||||
-rw-r--r-- | gnu/system/vm.scm | 10 |
3 files changed, 47 insertions, 3 deletions
diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 0cfc8fa5c9..b380716b69 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -237,7 +237,12 @@ the user's target storage device rather than on the RAM disk." ;; Minimal in-memory caching policy for nscd. (list (nscd-cache (database 'hosts) (positive-time-to-live (* 3600 12)) - (negative-time-to-live 20) + + ;; Do not cache lookup failures at all since they are + ;; quite likely (for instance when someone tries to ping a + ;; host before networking is functional.) + (negative-time-to-live 0) + (persistent? #f) (max-database-size (* 5 (expt 2 20)))))) ;5 MiB @@ -365,6 +370,7 @@ Use Alt-F2 for documentation. parted ddrescue grub ;mostly so xrefs to its manual work cryptsetup + btrfs-progs wireless-tools iw wpa-supplicant-minimal iproute ;; XXX: We used to have GNU fdisk here, but as of version ;; 2.0.0a, that pulls Guile 1.8, which takes unreasonable diff --git a/gnu/system/locale.scm b/gnu/system/locale.scm index e798827a01..f9d713e0cf 100644 --- a/gnu/system/locale.scm +++ b/gnu/system/locale.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,6 +33,7 @@ locale-definition-source locale-definition-charset + locale-name->definition locale-directory %default-locale-libcs @@ -52,6 +53,35 @@ (charset locale-definition-charset ;string--e.g., "UTF-8" (default "UTF-8"))) +(define %not-dot + (char-set-complement (char-set #\.))) + +(define (denormalize-codeset codeset) + "Attempt to guess the \"real\" name of CODESET, a normalized codeset as +defined in (info \"(libc) Using gettextized software\")." + (cond ((string=? codeset "utf8") + "UTF-8") + ((string-prefix? "iso8859" codeset) + (string-append "ISO-8859-" (string-drop codeset 7))) + ((string=? codeset "eucjp") + "EUC-JP") + (else ;cross fingers, hope for the best + codeset))) + +(define (locale-name->definition name) + "Return a <locale-definition> corresponding to NAME, guessing the charset, +or #f on failure." + (match (string-tokenize name %not-dot) + ((source charset) + ;; XXX: NAME is supposed to use the "normalized codeset", such as "utf8", + ;; whereas the actual name used is different. Add a special case to make + ;; the right guess for UTF-8. + (locale-definition (name name) + (source source) + (charset (denormalize-codeset charset)))) + (_ + #f))) + (define* (localedef-command locale #:key (libc (canonical-package glibc))) "Return a gexp that runs 'localedef' from LIBC to build LOCALE." diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index a7c03bda17..58a476a468 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -1,5 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org> +;;; Copyright © 2016 Leo Famulari <leo@famulari.name> ;;; ;;; This file is part of GNU Guix. ;;; @@ -457,7 +459,13 @@ with '-virtfs' options for the host file systems listed in SHARED-FS." "\" ")) #~(string-append - " -enable-kvm -no-reboot -net nic,model=virtio \ + ;; Only enable kvm if we see /dev/kvm exists. + ;; This allows users without hardware virtualization to still use these + ;; commands. + #$(if (file-exists? "/dev/kvm") + " -enable-kvm " + "") + " -no-reboot -net nic,model=virtio \ " #$@(map virtfs-option shared-fs) " \ -net user \ -serial stdio -vga std \ |