aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2014-07-27 20:15:50 -0400
committerMark H Weaver <mhw@netris.org>2014-07-27 20:15:50 -0400
commit33690ffde5af2c516bc6b2dd060ab9cf7ab88eb2 (patch)
treed91daca5084dec6ede304d2c9ff1c376a740e416 /gnu
parent5c47b06b4370e7d6590b0c75404d694a52897293 (diff)
parentb9663471a87916f36b50af2a0f885f6f08dc3ed2 (diff)
downloadguix-33690ffde5af2c516bc6b2dd060ab9cf7ab88eb2.tar
guix-33690ffde5af2c516bc6b2dd060ab9cf7ab88eb2.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages.scm66
-rw-r--r--gnu/packages/admin.scm65
-rw-r--r--gnu/packages/algebra.scm4
-rw-r--r--gnu/packages/boost.scm68
-rw-r--r--gnu/packages/cdrom.scm19
-rw-r--r--gnu/packages/gcc.scm4
-rw-r--r--gnu/packages/gimp.scm1
-rw-r--r--gnu/packages/gnome.scm3
-rw-r--r--gnu/packages/libftdi.scm48
-rw-r--r--gnu/packages/linux.scm13
-rw-r--r--gnu/packages/mail.scm1
-rw-r--r--gnu/packages/nano.scm4
-rw-r--r--gnu/packages/package-management.scm16
-rw-r--r--gnu/packages/parallel.scm4
-rw-r--r--gnu/packages/patches/module-init-tools-moduledir.patch42
-rw-r--r--gnu/packages/texlive.scm5
-rw-r--r--gnu/packages/video.scm1
-rw-r--r--gnu/services/avahi.scm3
-rw-r--r--gnu/services/base.scm35
-rw-r--r--gnu/services/dbus.scm3
-rw-r--r--gnu/services/dmd.scm1
-rw-r--r--gnu/services/networking.scm3
-rw-r--r--gnu/services/xorg.scm20
-rw-r--r--gnu/system.scm9
-rw-r--r--gnu/system/file-systems.scm60
-rw-r--r--gnu/system/install.scm106
-rw-r--r--gnu/system/os-config.tmpl31
-rw-r--r--gnu/system/shadow.scm44
28 files changed, 554 insertions, 125 deletions
diff --git a/gnu/packages.scm b/gnu/packages.scm
index 8365a00051..77d9d3ee82 100644
--- a/gnu/packages.scm
+++ b/gnu/packages.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -31,10 +32,16 @@
search-bootstrap-binary
%patch-directory
%bootstrap-binaries-path
+
fold-packages
+
find-packages-by-name
find-best-packages-by-name
- find-newest-available-packages))
+ find-newest-available-packages
+
+ package-direct-dependents
+ package-transitive-dependents
+ package-covering-dependents))
;;; Commentary:
;;;
@@ -182,3 +189,60 @@ VERSION."
(match (vhash-assoc name (find-newest-available-packages))
((_ version pkgs ...) pkgs)
(#f '()))))
+
+
+(define* (vhash-refq vhash key #:optional (dflt #f))
+ "Look up KEY in the vhash VHASH, and return the value (if any) associated
+with it. If KEY is not found, return DFLT (or `#f' if no DFLT argument is
+supplied). Uses `eq?' for equality testing."
+ (or (and=> (vhash-assq key vhash) cdr)
+ dflt))
+
+(define package-dependencies
+ (memoize
+ (lambda ()
+ "Return a vhash keyed by package, and with associated values that are a
+list of packages that depend on that package."
+ (fold-packages
+ (lambda (package dag)
+ (fold
+ (lambda (in d)
+ ;; Insert a graph edge from each of package's inputs to package.
+ (vhash-consq in
+ (cons package (vhash-refq d in '()))
+ (vhash-delq in d)))
+ dag
+ (match (package-direct-inputs package)
+ (((labels packages . _) ...)
+ packages) )))
+ vlist-null))))
+
+(define (package-direct-dependents packages)
+ "Return a list of packages from the distribution that directly depend on the
+packages in PACKAGES."
+ (delete-duplicates
+ (concatenate
+ (map (lambda (p)
+ (vhash-refq (package-dependencies) p '()))
+ packages))))
+
+(define (package-transitive-dependents packages)
+ "Return the transitive dependent packages of the distribution packages in
+PACKAGES---i.e. the dependents of those packages, plus their dependents,
+recursively."
+ (let ((dependency-dag (package-dependencies)))
+ (fold-tree
+ cons '()
+ (lambda (node) (vhash-refq dependency-dag node))
+ ;; Start with the dependents to avoid including PACKAGES in the result.
+ (package-direct-dependents packages))))
+
+(define (package-covering-dependents packages)
+ "Return a minimal list of packages from the distribution whose dependencies
+include all of PACKAGES and all packages that depend on PACKAGES."
+ (let ((dependency-dag (package-dependencies)))
+ (fold-tree-leaves
+ cons '()
+ (lambda (node) (vhash-refq dependency-dag node))
+ ;; Start with the dependents to avoid including PACKAGES in the result.
+ (package-direct-dependents packages))))
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 8b7a2c0303..4a88fdd76a 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -78,16 +78,16 @@ interface and is based on GNU Guile.")
(define-public dfc
(package
(name "dfc")
- (version "3.0.3")
+ (version "3.0.4")
(source
(origin
(method url-fetch)
(uri (string-append
- "http://projects.gw-computing.net/attachments/download/78/dfc-"
+ "http://projects.gw-computing.net/attachments/download/79/dfc-"
version ".tar.gz"))
(sha256
(base32
- "1b4hfqv23l87cb37fxwzfk2sgspkyxpr3ig2hsd23hr6mm982j7z"))))
+ "0zk1ppx93ijimf4sbgqilxxikpsa2gmpbynknyh41xy7jbdjxp0b"))))
(build-system cmake-build-system)
(arguments '(#:tests? #f)) ; There are no tests.
(native-inputs `(("gettext" ,gnu-gettext)))
@@ -101,14 +101,14 @@ graphs and can export its output to different formats.")
(define-public htop
(package
(name "htop")
- (version "1.0.2")
+ (version "1.0.3")
(source (origin
(method url-fetch)
- (uri (string-append "mirror://sourceforge/htop/"
+ (uri (string-append "http://hisham.hm/htop/releases/"
version "/htop-" version ".tar.gz"))
(sha256
(base32
- "18fqrhvnm7h4c3939av8lpiwrwxbyw6hcly0jvq0vkjf0ixnaq7f"))))
+ "0a8qbpsifzjwc4f45xfwm48jhm59g6q5hlib4bf7z13mgy95fp05"))))
(build-system gnu-build-system)
(inputs
`(("ncurses" ,ncurses)))
@@ -617,7 +617,7 @@ system administrator.")
(define-public sudo
(package
(name "sudo")
- (version "1.8.10p2")
+ (version "1.8.10p3")
(source (origin
(method url-fetch)
(uri
@@ -627,10 +627,10 @@ system administrator.")
version ".tar.gz")))
(sha256
(base32
- "1wbrygz584abmywklq0b4xhqn3s1bjk3rrladslr5nycdpdvhv5s"))))
+ "002l6h27pnhb77b65frhazbhknsxvrsnkpi43j7i0qw1lrgi7nkf"))))
(build-system gnu-build-system)
(arguments
- '(#:configure-flags '("--with-logpath=/var/log/sudo.log")
+ `(#:configure-flags '("--with-logpath=/var/log/sudo.log")
#:phases (alist-cons-before
'configure 'pre-configure
(lambda _
@@ -644,7 +644,18 @@ system administrator.")
"")
(("^install: (.*)install-sudoers(.*)" _ before after)
;; Don't try to create /etc/sudoers.
- (string-append "install: " before after "\n"))))
+ (string-append "install: " before after "\n")))
+
+ ;; XXX FIXME sudo 1.8.10p3 was bootstrapped with a
+ ;; prerelease libtool, which fails on MIPS in the absence
+ ;; of /usr/bin/file. As a temporary workaround, we patch
+ ;; the configure script to hardcode use of the little
+ ;; endian N32 ABI on MIPS.
+ ,@(if (equal? "mips64el-linux" (or (%current-target-system)
+ (%current-system)))
+ '((substitute* "configure"
+ (("\\$emul") "elf32ltsmipn32")))
+ '()))
%standard-phases)
;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
@@ -668,7 +679,7 @@ commands and their arguments.")
(define-public wpa-supplicant
(package
(name "wpa-supplicant")
- (version "2.1")
+ (version "2.2")
(source (origin
(method url-fetch)
(uri (string-append
@@ -677,7 +688,7 @@ commands and their arguments.")
".tar.gz"))
(sha256
(base32
- "0xxjw7lslvql1ykfbwmbhdrnjsjljf59fbwf837418s97dz2wqwi"))))
+ "1vf8jc4yyksbxf86narvsli3vxfbm8nbnim2mdp66nd6d3yvin70"))))
(build-system gnu-build-system)
(arguments
'(#:phases (alist-replace
@@ -762,3 +773,33 @@ This package provides the 'wpa_supplicant' daemon and the 'wpa_cli' command.")
"WakeLan broadcasts a properly formatted UDP packet across the local area
network, which causes enabled computers to power on.")
(license gpl2+)))
+
+(define-public dmidecode
+ (package
+ (name "dmidecode")
+ (version "2.12")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://savannah/dmidecode/dmidecode-"
+ version ".tar.bz2"))
+ (sha256
+ (base32
+ "122hgaw8mpqdfra159lfl6pyk3837giqx6vq42j64fjnbl2z6gwi"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases (alist-delete 'configure %standard-phases)
+ #:tests? #f ; no 'check' target
+ #:make-flags (list (string-append "prefix="
+ (assoc-ref %outputs "out")))))
+ (home-page "http://www.nongnu.org/dmidecode/")
+ (synopsis "Read hardware information from the BIOS")
+ (description
+ "Dmidecode reports information about your system's hardware as described
+in your system BIOS according to the SMBIOS/DMI standard. This typically
+includes system manufacturer, model name, serial number, BIOS version, asset
+tag as well as a lot of other details of varying level of interest and
+reliability depending on the manufacturer. This will often include usage
+status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory
+module slots, and the list of I/O ports (e.g. serial, parallel, USB).")
+ (license gpl2+)))
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 9ed978536d..8c12eb604e 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -84,14 +84,14 @@ solve the shortest vector problem.")
(define-public pari-gp
(package
(name "pari-gp")
- (version "2.7.0")
+ (version "2.7.1")
(source (origin
(method url-fetch)
(uri (string-append
"http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-"
version ".tar.gz"))
(sha256 (base32
- "1hk7lmq09crr9jvia8nxzhvbwf8mw62xk456i96jg8dljh0r9sgz"))))
+ "1gj1rddi22hinzwy7r6hljgbi252wwwyd6gapg4hvcn0ycc7jqyc"))))
(build-system gnu-build-system)
(inputs `(("gmp" ,gmp)
("perl" ,perl)
diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
index 73b377e384..a77f1393d9 100644
--- a/gnu/packages/boost.scm
+++ b/gnu/packages/boost.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 John Darrington <jmd@gnu.org>
+;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -46,39 +47,48 @@
("python" ,python-2)
("tcsh" ,tcsh)))
(arguments
- `(#:phases
- (alist-replace
- 'configure
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (substitute* '("libs/config/configure"
- "libs/spirit/classic/phoenix/test/runtest.sh"
- "tools/build/v2/doc/bjam.qbk"
- "tools/build/v2/engine/execunix.c"
- "tools/build/v2/engine/Jambase"
- "tools/build/v2/engine/jambase.c")
- (("/bin/sh") (which "sh")))
-
- (setenv "SHELL" (which "sh"))
- (setenv "CONFIG_SHELL" (which "sh"))
-
- (zero? (system* "./bootstrap.sh"
- (string-append "--prefix=" out)
- "--with-toolset=gcc"))))
- (alist-replace
- 'build
- (lambda _
- (zero? (system* "./b2" "threading=multi" "link=shared")))
-
+ (let ((build-flags
+ `("threading=multi" "link=shared"
+ ;; Boost's 'context' library is not yet supported on mips64, so
+ ;; we disable it. The 'coroutine' library depends on 'context',
+ ;; so we disable that too.
+ ,@(if (equal? "mips64el-linux" (or (%current-target-system)
+ (%current-system)))
+ '("--without-context" "--without-coroutine")
+ '()))))
+ `(#:phases
(alist-replace
- 'check
- (lambda _ #t)
+ 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* '("libs/config/configure"
+ "libs/spirit/classic/phoenix/test/runtest.sh"
+ "tools/build/v2/doc/bjam.qbk"
+ "tools/build/v2/engine/execunix.c"
+ "tools/build/v2/engine/Jambase"
+ "tools/build/v2/engine/jambase.c")
+ (("/bin/sh") (which "sh")))
+ (setenv "SHELL" (which "sh"))
+ (setenv "CONFIG_SHELL" (which "sh"))
+
+ (zero? (system* "./bootstrap.sh"
+ (string-append "--prefix=" out)
+ "--with-toolset=gcc"))))
(alist-replace
- 'install
+ 'build
(lambda _
- (zero? (system* "./b2" "install" "threading=multi" "link=shared")))
- %standard-phases))))))
+ (zero? (system* "./b2" ,@build-flags)))
+
+ (alist-replace
+ 'check
+ (lambda _ #t)
+
+ (alist-replace
+ 'install
+ (lambda _
+ (zero? (system* "./b2" "install" ,@build-flags)))
+ %standard-phases)))))))
(home-page "http://boost.org")
(synopsis "Peer-reviewed portable C++ source libraries")
diff --git a/gnu/packages/cdrom.scm b/gnu/packages/cdrom.scm
index e520312164..518cfc3c2b 100644
--- a/gnu/packages/cdrom.scm
+++ b/gnu/packages/cdrom.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -98,14 +98,14 @@ extraction from CDs.")
(define-public xorriso
(package
(name "xorriso")
- (version "1.3.6.pl01")
+ (version "1.3.8")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/xorriso/xorriso-"
version ".tar.gz"))
(sha256
(base32
- "07bm20kb4f6q5pbkxhy7w8ggw2gxkrq45cda2kbh6wgphs5z2h7q"))))
+ "0zhhj9lr9z7hnb2alac54mc28w1l0mbanphhpmy3ylsi8rih84lh"))))
(build-system gnu-build-system)
(inputs
`(("acl" ,acl)
@@ -173,14 +173,14 @@ reconstruction capability.")
(define-public dvdisaster
(package
(name "dvdisaster")
- (version "0.72.4")
+ (version "0.72.6")
(source (origin
(method url-fetch)
(uri (string-append "http://dvdisaster.net/downloads/dvdisaster-"
version ".tar.bz2"))
(sha256
(base32
- "0pm039a78h7m9vvjmmjfkl05ii6qdmfhvbypxjbc7j5w82y66is4"))))
+ "0sqrprc5rh3shnfli25m2wy0i5f83db54iv04s5s7bxf77m7sy79"))))
(build-system gnu-build-system)
(inputs
`(("gtk+" ,gtk+-2)))
@@ -192,7 +192,14 @@ reconstruction capability.")
`(;; Parallel builds appear to be unsafe, see
;; <http://hydra.gnu.org/build/49331/nixlog/1/raw>.
#:parallel-build? #f
- #:tests? #f)) ; no check target
+ #:tests? #f ; no check target
+ #:phases
+ (alist-cons-before
+ 'patch-source-shebangs 'sanitise
+ (lambda _
+ ;; delete dangling symlink
+ (delete-file ".#GNUmakefile"))
+ %standard-phases)))
(home-page "http://dvdisaster.net/en/index.html")
(synopsis "error correcting codes for optical media images")
(description "Optical media (CD,DVD,BD) keep their data only for a
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index c927e6e49c..aed2e8925e 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -272,14 +272,14 @@ Go. It also includes runtime support libraries for these languages.")
(define-public gcc-4.9
(package (inherit gcc-4.7)
- (version "4.9.0")
+ (version "4.9.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gcc/gcc-"
version "/gcc-" version ".tar.bz2"))
(sha256
(base32
- "0mqjxpw2klskls00lwx1k24pnyzm3whqxg3hk74c3sddgfllgc5r"))))))
+ "0zki3ngi0gsidnmsp88mjl2868cc7cm5wm1vwqw6znja28d7hd6k"))))))
(define (custom-gcc gcc name languages)
"Return a custom version of GCC that supports LANGUAGES."
diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm
index 9db543199c..399c99bcdf 100644
--- a/gnu/packages/gimp.scm
+++ b/gnu/packages/gimp.scm
@@ -101,6 +101,7 @@ provided as well as the framework to add new color models and data types.")
("libjpeg" ,libjpeg-8)))
(native-inputs
`(("pkg-config" ,pkg-config)
+ ("glib" ,glib "bin") ; for gtester
("intltool" ,intltool)))
(home-page "http://gegl.org")
(synopsis "Graph based image processing framework")
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 893c3e8a6b..f684d24627 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -449,6 +449,7 @@ some form of information without getting in the user's way.")
("pango" ,pango)))
(native-inputs
`(("pkg-config" ,pkg-config)
+ ("glib:bin" ,glib "bin")
("gobject-introspection" ,gobject-introspection)
("intltool" ,intltool)))
(home-page "https://wiki.gnome.org/Libpeas")
@@ -1138,6 +1139,7 @@ controls using the Bonobo component framework.")
("libxml2" ,libxml2)))
(native-inputs
`(("intltool" ,intltool)
+ ("glib" ,glib "bin")
("pkg-config" ,pkg-config)))
(home-page "https://developer.gnome.org/goffice/")
(synopsis "Document-centric objects and utilities")
@@ -1187,6 +1189,7 @@ controls using the Bonobo component framework.")
("zlib" ,zlib)))
(native-inputs
`(("intltool" ,intltool)
+ ("glib:bin" ,glib "bin")
("pkg-config" ,pkg-config)))
(home-page "http://www.gnumeric.org")
(synopsis "Spreadsheet application")
diff --git a/gnu/packages/libftdi.scm b/gnu/packages/libftdi.scm
new file mode 100644
index 0000000000..6e8100ce29
--- /dev/null
+++ b/gnu/packages/libftdi.scm
@@ -0,0 +1,48 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages libftdi)
+ #:use-module (guix licenses)
+ #:use-module (guix download)
+ #:use-module (guix packages)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages libusb)
+ #:use-module (guix build-system cmake))
+
+(define-public libftdi
+ (package
+ (name "libftdi")
+ (version "1.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://www.intra2net.com/en/developer/libftdi/download/libftdi1-"
+ version ".tar.bz2"))
+ (sha256
+ (base32
+ "088yh8pxd6q53ssqndydcw1dkq51cjqyahc03lm6iip22cdazcf0"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("libusb" ,libusb)))
+ (home-page "http://www.intra2net.com")
+ (synopsis "FTDI USB driver with bitbang mode")
+ (description
+ "libFTDI is a library to talk to FTDI chips: FT232BM,
+FT245BM, FT2232C, FT2232D, FT245R and FT232H including the popular
+bitbangmode.")
+ (license lgpl2.1+)))
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 09d123a08d..3ffe2a4cdd 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1273,7 +1273,18 @@ to use Linux' inotify mechanism, which allows file accesses to be monitored.")
("zlib" ,guix:zlib)))
(arguments
`(#:tests? #f ; FIXME: Investigate test failures
- #:configure-flags '("--with-xz" "--with-zlib")))
+ #:configure-flags '("--with-xz" "--with-zlib")
+ #:phases (alist-cons-after
+ 'install 'install-modprobe&co
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (for-each (lambda (tool)
+ (symlink "kmod"
+ (string-append bin "/" tool)))
+ '("insmod" "rmmod" "lsmod" "modprobe"
+ "modinfo" "depmod"))))
+ %standard-phases)))
(home-page "https://www.kernel.org/")
(synopsis "Kernel module tools")
(description "kmod is a set of tools to handle common tasks with Linux
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index d9c847d4ce..7bdd81b4c8 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -301,6 +301,7 @@ repository and Maildir/IMAP as LOCAL repository.")
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)
+ ("glib" ,glib "bin") ; for gtester
("texinfo" ,texinfo)))
;; TODO: Add webkit and gtk to build the mug GUI.
(inputs
diff --git a/gnu/packages/nano.scm b/gnu/packages/nano.scm
index 73053513d5..1bb6fea889 100644
--- a/gnu/packages/nano.scm
+++ b/gnu/packages/nano.scm
@@ -27,7 +27,7 @@
(define-public nano
(package
(name "nano")
- (version "2.3.4")
+ (version "2.3.6")
(source
(origin
(method url-fetch)
@@ -35,7 +35,7 @@
version ".tar.gz"))
(sha256
(base32
- "1hcqv5yam4pkqx1sviigikzvd7n1pz6lwp7lzpdzagck9fgi4x0p"))))
+ "0d4ml0v9yi37pjs211xs38w9whsj6530wz3kmrvwgh8jigqz6jx7"))))
(build-system gnu-build-system)
(inputs
`(("gettext" ,gnu-gettext)
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index cf808970ce..66e71df284 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -34,17 +34,17 @@
#:use-module (gnu packages gettext)
#:use-module (gnu packages texinfo))
-(define-public guix-0.6
+(define guix-0.7
(package
(name "guix")
- (version "0.6")
+ (version "0.7")
(source (origin
(method url-fetch)
(uri (string-append "ftp://alpha.gnu.org/gnu/guix/guix-"
version ".tar.gz"))
(sha256
(base32
- "01xw51wizhsk827w4xp79k2b6dxjaviw04r6rbrb85qdxnwg6k9n"))))
+ "05r7bsjgc0a4m7yy433n3c1dlv2yqlf3qpwlhayn9djhpp2q1ssb"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags (list
@@ -109,10 +109,12 @@ upgrades and roll-backs, per-user profiles, and much more. It is based on the
Nix package manager.")
(license gpl3+)))
-(define-public guix
+(define-public guix guix-0.7)
+
+(define-public guix-devel
;; Development version of Guix.
(let ((commit "0ae8c15"))
- (package (inherit guix-0.6)
+ (package (inherit guix-0.7)
(version (string-append "0.6." commit))
(source (origin
(method git-fetch)
@@ -124,7 +126,7 @@ Nix package manager.")
(base32
"1y6mwzwsjdxbfibqypb55dix371rifhfz0bygfr8k868lcdsawic"))))
(arguments
- (substitute-keyword-arguments (package-arguments guix-0.6)
+ (substitute-keyword-arguments (package-arguments guix-0.7)
((#:phases phases)
`(alist-cons-before
'configure 'bootstrap
@@ -160,4 +162,4 @@ Nix package manager.")
("gettext" ,gnu-gettext)
("texinfo" ,texinfo)
("graphviz" ,graphviz)
- ,@(package-native-inputs guix-0.6))))))
+ ,@(package-native-inputs guix-0.7))))))
diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm
index cf160d07b6..a4755e043d 100644
--- a/gnu/packages/parallel.scm
+++ b/gnu/packages/parallel.scm
@@ -27,7 +27,7 @@
(define-public parallel
(package
(name "parallel")
- (version "20140622")
+ (version "20140722")
(source
(origin
(method url-fetch)
@@ -35,7 +35,7 @@
version ".tar.bz2"))
(sha256
(base32
- "0frlp645yghnwq8x7dk8pdm6id1mqkkh7w48mcbpd04pw225gljq"))))
+ "165vf8hpl47z38aswsll1284l8xa9a8jwx3a3d2rzshm9yzbiq5n"))))
(build-system gnu-build-system)
(inputs `(("perl" ,perl)))
(home-page "http://www.gnu.org/software/parallel/")
diff --git a/gnu/packages/patches/module-init-tools-moduledir.patch b/gnu/packages/patches/module-init-tools-moduledir.patch
index 68d7988f53..08f03d1cc4 100644
--- a/gnu/packages/patches/module-init-tools-moduledir.patch
+++ b/gnu/packages/patches/module-init-tools-moduledir.patch
@@ -2,17 +2,11 @@ This patch changes 'modprobe' & co. so they honor the 'LINUX_MODULE_DIRECTORY'
environment variable, rather than looking for modules exclusively in
/lib/modules.
-Patch by David Guibert, from Nixpkgs; adjusted to use 'LINUX_MODULE_DIRECTORY'
-rather than 'MODULE_DIR' as the variable name.
-
-commit cf2c95edb7918bc658f6cae93793c1949fc9cb6e
-Author: David Guibert <david.guibert@gmail.com>
-Date: Fri Aug 5 14:20:12 2011 +0200
-
- introduce module-dir
+Original patch by David Guibert, from Nixpkgs; adjusted to use
+'LINUX_MODULE_DIRECTORY' rather than 'MODULE_DIR' as the variable name.
diff --git a/depmod.c b/depmod.c
-index a1d2f8c..9362a35 100644
+index a1d2f8c..ff579c7 100644
--- a/depmod.c
+++ b/depmod.c
@@ -48,9 +48,6 @@
@@ -38,26 +32,30 @@ index a1d2f8c..9362a35 100644
}
+ if((module_dir = getenv("LINUX_MODULE_DIRECTORY")) == NULL) {
-+ module_dir = "/lib/modules/";
++ module_dir = "/lib/modules";
+ }
+
while ((line = getline_wrapped(cfile, &linenum)) != NULL) {
char *ptr = line;
char *cmd, *modname;
-@@ -1550,7 +1552,7 @@ static int parse_config_file(const char *filename,
+@@ -1549,8 +1551,8 @@ static int parse_config_file(const char *filename,
+ 0, *search);
continue;
}
- nofail_asprintf(&dirname, "%s%s%s/%s", basedir,
+- nofail_asprintf(&dirname, "%s%s%s/%s", basedir,
- MODULE_DIR, kernelversion, search_path);
++ nofail_asprintf(&dirname, "%s%s/%s/%s", basedir,
+ module_dir, kernelversion, search_path);
len = strlen(dirname);
*search = add_search(dirname, len, *search);
free(dirname);
-@@ -1565,7 +1567,7 @@ static int parse_config_file(const char *filename,
+@@ -1564,8 +1566,8 @@ static int parse_config_file(const char *filename,
+ if (!regex_match(kernelversion, (const char *)version))
continue;
- nofail_asprintf(&pathname, "%s%s%s/%s/%s.ko", basedir,
+- nofail_asprintf(&pathname, "%s%s%s/%s/%s.ko", basedir,
- MODULE_DIR, kernelversion, subdir, modname);
++ nofail_asprintf(&pathname, "%s%s/%s/%s/%s.ko", basedir,
+ module_dir, kernelversion, subdir, modname);
*overrides = add_override(pathname, *overrides);
@@ -76,24 +74,26 @@ index a1d2f8c..9362a35 100644
- nofail_asprintf(&dirname, "%s%s%s", basedir, MODULE_DIR, version);
+ if((module_dir = getenv("LINUX_MODULE_DIRECTORY")) == NULL) {
-+ module_dir = "/lib/modules/";
++ module_dir = "/lib/modules";
+ }
+
-+ nofail_asprintf(&dirname, "%s%s%s", basedir, module_dir, version);
++ nofail_asprintf(&dirname, "%s%s/%s", basedir, module_dir, version);
if (maybe_all) {
if (!doing_stdout && !depfile_out_of_date(dirname))
-@@ -1850,7 +1857,7 @@ int main(int argc, char *argv[])
+@@ -1849,8 +1856,8 @@ int main(int argc, char *argv[])
+ char *dirname;
size_t len;
- nofail_asprintf(&dirname, "%s%s%s/updates", basedir,
+- nofail_asprintf(&dirname, "%s%s%s/updates", basedir,
- MODULE_DIR, version);
++ nofail_asprintf(&dirname, "%s%s/%s/updates", basedir,
+ module_dir, version);
len = strlen(dirname);
search = add_search(dirname, len, search);
}
diff --git a/modinfo.c b/modinfo.c
-index 1dd8469..67b1041 100644
+index 1dd8469..6a1865b 100644
--- a/modinfo.c
+++ b/modinfo.c
@@ -19,9 +19,6 @@
@@ -113,7 +113,7 @@ index 1dd8469..67b1041 100644
+ char *module_dir;
+
+ if((module_dir = getenv("LINUX_MODULE_DIRECTORY")) == NULL) {
-+ module_dir = "/lib/modules/";
++ module_dir = "/lib/modules";
+ }
if (strchr(name, '.') || strchr(name, '/')) {
@@ -131,7 +131,7 @@ index 1dd8469..67b1041 100644
/* Search for it in modules.dep. */
nofail_asprintf(&depname, "%s/%s", moddir, "modules.dep");
diff --git a/modprobe.c b/modprobe.c
-index 5464f45..d9fbf9d 100644
+index 5464f45..cb57917 100644
--- a/modprobe.c
+++ b/modprobe.c
@@ -86,10 +86,6 @@ typedef enum
diff --git a/gnu/packages/texlive.scm b/gnu/packages/texlive.scm
index b136c99979..57a250cba2 100644
--- a/gnu/packages/texlive.scm
+++ b/gnu/packages/texlive.scm
@@ -115,6 +115,11 @@
"--with-system-xpdf"
"--with-system-zlib"
"--with-system-zziplib")
+
+ ;; Disable tests on mips64 to cope with a failure of luajiterr.test.
+ ;; XXX FIXME fix luajit properly on mips64.
+ #:tests? ,(not (equal? "mips64el-linux" (or (%current-target-system)
+ (%current-system))))
#:phases
(alist-cons-after
'install 'postinst
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 075113ca9d..8850543c1d 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -193,7 +193,6 @@
"--disable-armv6t2"
"--disable-vfp"
"--disable-neon"
- "--disable-vis"
"--disable-mips32r2"
"--disable-mipsdspr1"
"--disable-mipsdspr2"
diff --git a/gnu/services/avahi.scm b/gnu/services/avahi.scm
index e8da6be5f5..48a2c75927 100644
--- a/gnu/services/avahi.scm
+++ b/gnu/services/avahi.scm
@@ -96,7 +96,8 @@ sockets."
(mkdir-p "/var/run/avahi-daemon")))
(user-groups (list (user-group
- (name "avahi"))))
+ (name "avahi")
+ (system? #t))))
(user-accounts (list (user-account
(name "avahi")
(group "avahi")
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 55ee5c4b08..e1d247e8d3 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -25,10 +25,12 @@
#:use-module (gnu system linux) ; 'pam-service', etc.
#:use-module (gnu packages admin)
#:use-module ((gnu packages linux)
- #:select (udev kbd))
+ #:select (udev kbd e2fsprogs))
#:use-module ((gnu packages base)
#:select (glibc-final))
#:use-module (gnu packages package-management)
+ #:use-module ((guix build linux-initrd)
+ #:select (mount-flags->bit-mask))
#:use-module (guix gexp)
#:use-module (guix monads)
#:use-module (srfi srfi-1)
@@ -96,11 +98,14 @@ This service must be the root of the service dependency graph so that its
(respawn? #f)))))
(define* (file-system-service device target type
- #:key (check? #t) options (title 'any))
+ #:key (flags '()) (check? #t)
+ create-mount-point? options (title 'any))
"Return a service that mounts DEVICE on TARGET as a file system TYPE with
OPTIONS. TITLE is a symbol specifying what kind of name DEVICE is: 'label for
a partition label, 'device for a device file name, or 'any. When CHECK? is
-true, check the file system before mounting it."
+true, check the file system before mounting it. When CREATE-MOUNT-POINT? is
+true, create TARGET if it does not exist yet. FLAGS is a list of symbols,
+such as 'read-only' etc."
(with-monad %store-monad
(return
(service
@@ -109,10 +114,22 @@ true, check the file system before mounting it."
(documentation "Check, mount, and unmount the given file system.")
(start #~(lambda args
(let ((device (canonicalize-device-spec #$device '#$title)))
+ #$(if create-mount-point?
+ #~(mkdir-p #$target)
+ #~#t)
#$(if check?
- #~(check-file-system device #$type)
+ #~(begin
+ ;; Make sure fsck.ext2 & co. can be found.
+ (setenv "PATH"
+ (string-append
+ #$e2fsprogs "/sbin:"
+ "/run/current-system/profile/sbin:"
+ (getenv "PATH")))
+ (check-file-system device #$type))
#~#t)
- (mount device #$target #$type 0 #$options))
+ (mount device #$target #$type
+ #$(mount-flags->bit-mask flags)
+ #$options))
#t))
(stop #~(lambda args
;; Normally there are no processes left at this point, so
@@ -455,6 +472,7 @@ passed to @command{guix-daemon}."
(user-accounts accounts)
(user-groups (list (user-group
(name builder-group)
+ (system? #t)
;; Use a fixed GID so that we can create the
;; store with the right owner.
@@ -466,8 +484,13 @@ passed to @command{guix-daemon}."
(with-monad %store-monad
(return (service
(provision '(udev))
+
+ ;; Udev needs /dev to be a 'devtmpfs' mount so that new device
+ ;; nodes can be added: see
+ ;; <http://www.linuxfromscratch.org/lfs/view/development/chapter07/udev.html>.
(requirement '(root-file-system))
- (documentation "Populate the /dev directory.")
+
+ (documentation "Populate the /dev directory, dynamically.")
(start #~(lambda ()
(define udevd
(string-append #$udev "/libexec/udev/udevd"))
diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm
index 6076317ee5..5da7f14605 100644
--- a/gnu/services/dbus.scm
+++ b/gnu/services/dbus.scm
@@ -86,7 +86,8 @@ and policy files. For example, to allow avahi-daemon to use the system bus,
(string-append "--config-file=" #$conf "/system.conf"))))
(stop #~(make-kill-destructor))
(user-groups (list (user-group
- (name "messagebus"))))
+ (name "messagebus")
+ (system? #t))))
(user-accounts (list (user-account
(name "messagebus")
(group "messagebus")
diff --git a/gnu/services/dmd.scm b/gnu/services/dmd.scm
index 74adb27885..dfda2708f5 100644
--- a/gnu/services/dmd.scm
+++ b/gnu/services/dmd.scm
@@ -49,6 +49,7 @@
(use-modules (ice-9 ftw)
(guix build syscalls)
+ (guix build utils)
((guix build linux-initrd)
#:select (check-file-system canonicalize-device-spec)))
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 502b0d85f1..6a7d194659 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -107,7 +107,8 @@ policy) as the @code{tor} unprivileged user."
(stop #~(make-kill-destructor))
(user-groups (list (user-group
- (name "tor"))))
+ (name "tor")
+ (system? #t))))
(user-accounts (list (user-account
(name "tor")
(group "tor")
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 7ca0d3f7db..a34129a8ed 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -97,7 +97,12 @@ EndSection
#~(begin
(use-modules (ice-9 match))
- ;; TODO: Check for ~/.xsession.
+ ;; First, try to run ~/.xsession.
+ (let* ((home (getenv "HOME"))
+ (file (string-append home "/.xsession")))
+ (false-if-exception (execl file file)))
+
+ ;; Then try a pre-configured session type.
(match (command-line)
((_ "ratpoison")
(execl (string-append #$ratpoison "/bin/ratpoison")))
@@ -146,10 +151,15 @@ reboot_cmd " dmd "/sbin/reboot
(provision '(xorg-server))
(requirement '(user-processes host-name udev))
(start
- #~(make-forkexec-constructor
- (list (string-append #$slim "/bin/slim") "-nodaemon")
- #:environment-variables
- (list (string-append "SLIM_CFGFILE=" #$slim.cfg))))
+ #~(lambda ()
+ ;; A stale lock file can prevent SLiM from starting, so remove it
+ ;; to be on the safe side.
+ (false-if-exception (delete-file "/var/run/slim.lock"))
+
+ (fork+exec-command
+ (list (string-append #$slim "/bin/slim") "-nodaemon")
+ #:environment-variables
+ (list (string-append "SLIM_CFGFILE=" #$slim.cfg)))))
(stop #~(make-kill-destructor))
(respawn? #t)
(pam-services
diff --git a/gnu/system.scm b/gnu/system.scm
index 20942ec7f0..68f9438693 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -181,11 +181,13 @@ as 'needed-for-boot'."
(sequence %store-monad
(map (match-lambda
(($ <file-system> device title target type flags opts
- #f check?)
+ #f check? create?)
(file-system-service device target type
#:title title
#:check? check?
- #:options opts)))
+ #:create-mount-point? create?
+ #:options opts
+ #:flags flags)))
file-systems)))
(define (essential-services os)
@@ -361,7 +363,8 @@ alias ll='ls -l'
'active-groups'."
#~(list #$(user-group-name group)
#$(user-group-password group)
- #$(user-group-id group)))
+ #$(user-group-id group)
+ #$(user-group-system? group)))
(define (user-account->gexp account)
"Turn ACCOUNT, a <user-account> object, into a list-valued gexp suitable for
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index 7852a6ab26..48c4fc7e77 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -28,9 +28,16 @@
file-system-needed-for-boot?
file-system-flags
file-system-options
+ file-system-check?
+ file-system-create-mount-point?
%fuse-control-file-system
- %binary-format-file-system))
+ %binary-format-file-system
+ %shared-memory-file-system
+ %pseudo-terminal-file-system
+ %devtmpfs-file-system
+
+ %base-file-systems))
;;; Commentary:
;;;
@@ -54,7 +61,9 @@
(needed-for-boot? file-system-needed-for-boot? ; Boolean
(default #f))
(check? file-system-check? ; Boolean
- (default #t)))
+ (default #t))
+ (create-mount-point? file-system-create-mount-point? ; Boolean
+ (default #f)))
(define %fuse-control-file-system
;; Control file system for Linux' file systems in user-space (FUSE).
@@ -72,4 +81,51 @@
(type "binfmt_misc")
(check? #f)))
+(define %devtmpfs-file-system
+ ;; /dev as a 'devtmpfs' file system, needed for udev.
+ (file-system
+ (device "none")
+ (mount-point "/dev")
+ (type "devtmpfs")
+ (check? #f)
+
+ ;; Mount it from the initrd so /dev/pts & co. can then be mounted over it.
+ (needed-for-boot? #t)))
+
+(define %tty-gid
+ ;; ID of the 'tty' group. Allocate it statically to make it easy to refer
+ ;; to it from here and from the 'tty' group definitions.
+ 996)
+
+(define %pseudo-terminal-file-system
+ ;; The pseudo-terminal file system. It needs to be mounted so that
+ ;; statfs(2) returns DEVPTS_SUPER_MAGIC like libc's getpt(3) expects (and
+ ;; thus openpty(3) and its users, such as xterm.)
+ (file-system
+ (device "none")
+ (mount-point "/dev/pts")
+ (type "devpts")
+ (check? #f)
+ (needed-for-boot? #f)
+ (create-mount-point? #t)
+ (options (string-append "gid=" (number->string %tty-gid) ",mode=620"))))
+
+(define %shared-memory-file-system
+ ;; Shared memory.
+ (file-system
+ (device "tmpfs")
+ (mount-point "/dev/shm")
+ (type "tmpfs")
+ (check? #f)
+ (flags '(no-suid no-dev))
+ (options "size=50%") ;TODO: make size configurable
+ (create-mount-point? #t)))
+
+(define %base-file-systems
+ ;; List of basic file systems to be mounted. Note that /proc and /sys are
+ ;; currently mounted by the initrd.
+ (list %devtmpfs-file-system
+ %pseudo-terminal-file-system
+ %shared-memory-file-system))
+
;;; file-systems.scm ends here
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 18fd587ead..567934e4c1 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -20,6 +20,7 @@
#:use-module (gnu)
#:use-module (guix gexp)
#:use-module (guix monads)
+ #:use-module ((guix store) #:select (%store-prefix))
#:use-module (gnu packages linux)
#:use-module (gnu packages package-management)
#:use-module (gnu packages disk)
@@ -42,6 +43,99 @@ manual."
"-f" (string-append #$guix "/share/info/guix.info")
"-n" "System Installation")))
+(define %backing-directory
+ ;; Sub-directory used as the backing store for copy-on-write.
+ "/tmp/guix-inst")
+
+(define (make-cow-store target)
+ "Return a gexp that makes the store copy-on-write, using TARGET as the
+backing store. This is useful when TARGET is on a hard disk, whereas the
+current store is on a RAM disk."
+ (define (unionfs read-only read-write mount-point)
+ ;; Make MOUNT-POINT the union of READ-ONLY and READ-WRITE.
+
+ ;; Note: in the command below, READ-WRITE appears before READ-ONLY so that
+ ;; it is considered a "higher-level branch", as per unionfs-fuse(8),
+ ;; thereby allowing files existing on READ-ONLY to be copied over to
+ ;; READ-WRITE.
+ #~(fork+exec-command
+ (list (string-append #$unionfs-fuse "/bin/unionfs")
+ "-o"
+ "cow,allow_other,use_ino,max_files=65536,nonempty"
+ (string-append #$read-write "=RW:" #$read-only "=RO")
+ #$mount-point)))
+
+ (define (set-store-permissions directory)
+ ;; Set the right perms on DIRECTORY to use it as the store.
+ #~(begin
+ (chown #$directory 0 30000) ;use the fixed 'guixbuild' GID
+ (chmod #$directory #o1775)))
+
+ #~(begin
+ (unless (file-exists? "/.ro-store")
+ (mkdir "/.ro-store")
+ (mount #$(%store-prefix) "/.ro-store" "none"
+ (logior MS_BIND MS_RDONLY)))
+
+ (let ((rw-dir (string-append target #$%backing-directory)))
+ (mkdir-p rw-dir)
+ (mkdir-p "/.rw-store")
+ #$(set-store-permissions #~rw-dir)
+ #$(set-store-permissions "/.rw-store")
+
+ ;; Mount the union, then atomically make it the store.
+ (and #$(unionfs "/.ro-store" #~rw-dir "/.rw-store")
+ (begin
+ (sleep 1) ;XXX: wait for unionfs to be ready
+ (mount "/.rw-store" #$(%store-prefix) "" MS_MOVE)
+ (rmdir "/.rw-store"))))))
+
+(define (cow-store-service)
+ "Return a service that makes the store copy-on-write, such that writes go to
+the user's target storage device rather than on the RAM disk."
+ ;; See <http://bugs.gnu.org/18061> for the initial report.
+ (with-monad %store-monad
+ (return (service
+ (requirement '(root-file-system user-processes))
+ (provision '(cow-store))
+ (documentation
+ "Make the store copy-on-write, with writes going to \
+the given target.")
+ (start #~(case-lambda
+ ((target)
+ #$(make-cow-store #~target)
+ target)
+ (else
+ ;; Do nothing, and mark the service as stopped.
+ #f)))
+ (stop #~(lambda (target)
+ ;; Delete the temporary directory, but leave everything
+ ;; mounted as there may still be processes using it
+ ;; since 'user-processes' doesn't depend on us.
+ (delete-file-recursively
+ (string-append target #$%backing-directory))))))))
+
+(define (configuration-template-service)
+ "Return a dummy service whose purpose is to install an operating system
+configuration template file in the installation system."
+
+ (define local-template
+ "/etc/configuration-template.scm")
+ (define template
+ (search-path %load-path "gnu/system/os-config.tmpl"))
+
+ (mlet %store-monad ((template (interned-file template)))
+ (return (service
+ (requirement '(root-file-system))
+ (provision '(os-config-template))
+ (documentation
+ "This dummy service installs an OS configuration template.")
+ (start #~(const #t))
+ (stop #~(const #f))
+ (activate
+ #~(unless (file-exists? #$local-template)
+ (copy-file #$template #$local-template)))))))
+
(define (installation-services)
"Return the list services for the installation image."
(let ((motd (text-file "motd" "
@@ -71,6 +165,9 @@ You have been warned. Thanks for being so brave.
#:auto-login "guest"
#:login-program (log-to-info))
+ ;; Documentation add-on.
+ (configuration-template-service)
+
;; A bunch of 'root' ttys.
(normal-tty "tty3")
(normal-tty "tty4")
@@ -88,6 +185,10 @@ You have been warned. Thanks for being so brave.
;; Start udev so that useful device nodes are available.
(udev-service)
+ ;; Add the 'cow-store' service, which users have to start manually
+ ;; since it takes the installation directory as an argument.
+ (cow-store-service)
+
;; Install Unicode support and a suitable font.
(console-font-service "tty1")
(console-font-service "tty2")
@@ -117,10 +218,11 @@ Use Alt-F2 for documentation.
(file-systems
;; Note: the disk image build code overrides this root file system with
;; the appropriate one.
- (list (file-system
+ (cons (file-system
(mount-point "/")
(device "gnu-disk-image")
- (type "ext4"))))
+ (type "ext4"))
+ %base-file-systems))
(users (list (user-account
(name "guest")
diff --git a/gnu/system/os-config.tmpl b/gnu/system/os-config.tmpl
new file mode 100644
index 0000000000..ad58606f67
--- /dev/null
+++ b/gnu/system/os-config.tmpl
@@ -0,0 +1,31 @@
+;; This is an operating system configuration template.
+
+(use-modules (gnu))
+
+(operating-system
+ (host-name "antelope")
+ (timezone "Europe/Paris")
+ (locale "en_US.UTF-8")
+
+ ;; Assuming /dev/sdX is the target hard disk, and "root" is
+ ;; the label of the target root file system.
+ (bootloader (grub-configuration (device "/dev/sdX")))
+ (file-systems (cons (file-system
+ (device "root")
+ (title 'label)
+ (mount-point "/")
+ (type "ext4"))
+ %base-file-systems))
+
+ ;; This is where user accounts are specified. The "root"
+ ;; account is implicit, and is initially created with the
+ ;; empty password.
+ (users (list (user-account
+ (name "alice")
+ (comment "Bob's sister")
+ (group "users")
+
+ ;; Adding the account to the "wheel" group
+ ;; makes it a sudoer.
+ (supplementary-groups '("wheel"))
+ (home-directory "/home/alice")))))
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index ae6eac9a5b..5d638398d1 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -20,6 +20,8 @@
#:use-module (guix records)
#:use-module (guix gexp)
#:use-module (guix monads)
+ #:use-module ((gnu system file-systems)
+ #:select (%tty-gid))
#:use-module ((gnu packages admin)
#:select (shadow))
#:use-module (gnu packages bash)
@@ -41,6 +43,7 @@
user-group-name
user-group-password
user-group-id
+ user-group-system?
default-skeletons
skeleton-directory
@@ -73,28 +76,33 @@
user-group?
(name user-group-name)
(password user-group-password (default #f))
- (id user-group-id (default #f)))
+ (id user-group-id (default #f))
+ (system? user-group-system? ; Boolean
+ (default #f)))
(define %base-groups
;; Default set of groups.
- (list (user-group (name "root") (id 0))
- (user-group (name "wheel")) ; root-like users
- (user-group (name "users")) ; normal users
- (user-group (name "nogroup")) ; for daemons etc.
+ (let-syntax ((system-group (syntax-rules ()
+ ((_ args ...)
+ (user-group (system? #t) args ...)))))
+ (list (system-group (name "root") (id 0))
+ (system-group (name "wheel")) ; root-like users
+ (system-group (name "users")) ; normal users
+ (system-group (name "nogroup")) ; for daemons etc.
- ;; The following groups are conventionally used by things like udev to
- ;; control access to hardware devices.
- (user-group (name "tty"))
- (user-group (name "dialout"))
- (user-group (name "kmem"))
- (user-group (name "video"))
- (user-group (name "audio"))
- (user-group (name "netdev")) ; used in avahi-dbus.conf
- (user-group (name "lp"))
- (user-group (name "disk"))
- (user-group (name "floppy"))
- (user-group (name "cdrom"))
- (user-group (name "tape"))))
+ ;; The following groups are conventionally used by things like udev to
+ ;; control access to hardware devices.
+ (system-group (name "tty") (id %tty-gid))
+ (system-group (name "dialout"))
+ (system-group (name "kmem"))
+ (system-group (name "video"))
+ (system-group (name "audio"))
+ (system-group (name "netdev")) ; used in avahi-dbus.conf
+ (system-group (name "lp"))
+ (system-group (name "disk"))
+ (system-group (name "floppy"))
+ (system-group (name "cdrom"))
+ (system-group (name "tape")))))
(define (default-skeletons)
"Return the default skeleton files for /etc/skel. These files are copied by