summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2015-04-13 01:25:28 -0400
committerMark H Weaver <mhw@netris.org>2015-04-13 01:25:28 -0400
commit1ca8ff285ba0f055fbaf314d8a23fadc25839135 (patch)
tree365145d3f9e5f5009845c5fd9696c5083d734134
parent14fe9488f487e63f965b7ba103a95a38ba236569 (diff)
parent4c9050c63d707222730fc6112415f4324e0c7c37 (diff)
downloadguix-1ca8ff285ba0f055fbaf314d8a23fadc25839135.tar.gz
Merge branch 'master' into core-updates
-rw-r--r--Makefile.am4
-rw-r--r--configure.ac7
-rw-r--r--doc/guix.texi38
-rw-r--r--etc/completion/bash/guix139
-rw-r--r--gnu/build/activation.scm13
-rw-r--r--gnu/packages/bioinformatics.scm160
-rw-r--r--gnu/packages/emacs.scm6
-rw-r--r--gnu/packages/gstreamer.scm39
-rw-r--r--gnu/packages/man.scm6
-rw-r--r--gnu/services/base.scm2
-rw-r--r--gnu/system.scm18
11 files changed, 421 insertions, 11 deletions
diff --git a/Makefile.am b/Makefile.am
index d54e281163..05ce9aa7b4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -51,6 +51,7 @@ MODULES =					\
   guix/build-system/cmake.scm			\
   guix/build-system/glib-or-gtk.scm		\
   guix/build-system/gnu.scm			\
+  guix/build-system/haskell.scm			\
   guix/build-system/perl.scm			\
   guix/build-system/python.scm			\
   guix/build-system/waf.scm			\
@@ -240,6 +241,9 @@ tests/guix-gc.log:							\
 # Public key used to sign substitutes from hydra.gnu.org.
 dist_pkgdata_DATA = hydra.gnu.org.pub
 
+# Bash completion file.
+dist_bashcompletion_DATA = etc/completion/bash/guix
+
 EXTRA_DIST =						\
   HACKING						\
   ROADMAP						\
diff --git a/configure.ac b/configure.ac
index 6f261cdb63..2227c71c1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,13 @@ AC_ARG_WITH(store-dir,
   [storedir="/gnu/store"])
 AC_SUBST(storedir)
 
+AC_ARG_WITH([bash-completion-dir],
+  AC_HELP_STRING([--with-bash-completion-dir=DIR],
+    [name of the Bash completion directory]),
+  [bashcompletiondir="$withval"],
+  [bashcompletiondir='${sysconfdir}/bash_completion.d'])
+AC_SUBST([bashcompletiondir])
+
 dnl Better be verbose.
 AC_MSG_CHECKING([for the store directory])
 AC_MSG_RESULT([$storedir])
diff --git a/doc/guix.texi b/doc/guix.texi
index 35b8cc1b45..97fa3b6548 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -4531,7 +4531,8 @@ the ``message of the day''.
 Return a service that runs libc's name service cache daemon (nscd) with
 the given @var{config}---an @code{<nscd-configuration>} object.
 Optionally, @code{#:name-services} is a list of packages that provide
-name service switch (NSS) modules needed by nscd.
+name service switch (NSS) modules needed by nscd.  @xref{Name Service
+Switch}, for an example.
 @end deffn
 
 @defvr {Scheme Variable} %nscd-default-configuration
@@ -4929,9 +4930,12 @@ next method in the list.  The NSS configuration is given in the
 @code{name-service-switch} field of @code{operating-system} declarations
 (@pxref{operating-system Reference, @code{name-service-switch}}).
 
-@c See <http://0pointer.de/lennart/projects/nss-mdns/>.
+@cindex nss-mdns
+@cindex .local, host name lookup
 As an example, the declaration below configures the NSS to use the
-@code{nss-mdns} back-end for host name lookups:
+@uref{http://0pointer.de/lennart/projects/nss-mdns/, @code{nss-mdns}
+back-end}, which supports host name lookups over multicast DNS (mDNS)
+for host names ending in @code{.local}:
 
 @example
 (name-service-switch
@@ -4957,6 +4961,34 @@ As an example, the declaration below configures the NSS to use the
                   (name "mdns")))))
 @end example
 
+Note that, in this case, in addition to setting the
+@code{name-service-switch} of the @code{operating-system} declaration,
+@code{nscd-service} must be told where to find the @code{nss-mdns}
+shared library (@pxref{Base Services, @code{nscd-service}}).  Since the
+@code{nscd} service is part of @var{%base-services}, you may want to
+customize it by adding this snippet in the operating system
+configuration file:
+
+@example
+(use-modules (guix) (gnu))
+
+(define %my-base-services
+  ;; Replace the default nscd service with one that knows
+  ;; about nss-mdns.
+  (map (lambda (mservice)
+         ;; "Bind" the MSERVICE monadic value to inspect it.
+         (mlet %store-monad ((service mservice))
+           (if (member 'nscd (service-provision service))
+               (nscd-service (nscd-configuration)
+                             #:name-services (list nss-mdns))
+               mservice)))
+       %base-services))
+@end example
+
+@noindent
+@dots{} and then refer to @var{%my-base-services} instead of
+@var{%base-services} in the @code{operating-system} declaration.
+
 The reference for name service switch configuration is given below.  It
 is a direct mapping of the C library's configuration file format, so
 please refer to the C library manual for more information (@pxref{NSS
diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
new file mode 100644
index 0000000000..2a3fa1201e
--- /dev/null
+++ b/etc/completion/bash/guix
@@ -0,0 +1,139 @@
+# GNU Guix --- Functional package management for GNU
+# Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
+#
+# 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/>.
+
+# Bash completion for Guix commands.
+
+_guix_complete_available_package ()
+{
+    local prefix="$1"
+    local packages="$(${COMP_WORDS[0]} package -A "^$prefix" | cut -f1)"
+    COMPREPLY=($(compgen -W "$packages" -- "$prefix"))
+}
+
+_guix_complete_installed_package ()
+{
+    local prefix="$1"
+    local packages="$(${COMP_WORDS[0]} package -I "^$prefix" | cut -f1)"
+    COMPREPLY=($(compgen -W "$packages" -- "$prefix"))
+}
+
+_guix_complete_option ()
+{
+    local options="$(${COMP_WORDS[0]} ${COMP_WORDS[1]} --help \
+                            | grep '^  -' \
+                            | sed -e's/^.*--\([a-zA-Z0-9_-]\+\)\(=\?\).*/--\1\2/g' )"
+    compopt -o nospace
+    COMPREPLY=($(compgen -W "$options" -- "${COMP_WORDS[$word_count - 1]}"))
+}
+
+_guix_is_command ()
+{
+    local word
+    local result="false"
+    for word in ${COMP_WORDS[*]}
+    do
+	if [ "$word" = "$1" ]
+	then
+	    result=true
+	    break
+	fi
+    done
+    $result
+}
+
+_guix_is_removing ()
+{
+    local word
+    local result="false"
+    for word in ${COMP_WORDS[*]}
+    do
+	case "$word" in
+	    --remove|--remove=*|-r)
+		result=true
+		break
+		;;
+	esac
+    done
+    $result
+}
+
+_guix_is_dash_L ()
+{
+    [ "${COMP_WORDS[$COMP_CWORD - 1]}" = "-L" ] \
+	|| { case "${COMP_WORDS[$COMP_CWORD]}" in
+		 --load-path=*) true;;
+		 *)             false;;
+	     esac }
+}
+
+_guix_complete_file ()
+{
+    # Let Readline complete file names.
+    compopt -o default
+    COMPREPLY=()
+}
+
+_guix_complete ()
+{
+    local word_count=${#COMP_WORDS[*]}
+    local word_at_point="${COMP_WORDS[$COMP_CWORD]}"
+
+    if [ "$COMP_CWORD" -gt 1 ]
+    then
+	case "$word_at_point" in
+	    -*)
+		_guix_complete_option "$word_at_point"
+		return
+		;;
+	esac
+    fi
+
+    case $COMP_CWORD in
+	1)
+	    local subcommands="$(guix --help | grep '^  ' | cut -c 2-)"
+	    COMPREPLY=($(compgen -W "$subcommands" -- "$word_at_point"))
+	    ;;
+	*)
+	    if _guix_is_command "package"
+	    then
+		if _guix_is_dash_L
+		then
+		    _guix_complete_file
+		elif _guix_is_removing
+		then
+		    _guix_complete_installed_package "$word_at_point"
+		else
+		    _guix_complete_available_package "$word_at_point"
+		fi
+	    elif _guix_is_command "system"
+	    then
+		_guix_complete_file # TODO: complete sub-commands
+	    elif _guix_is_command "hash"
+	    then
+		 _guix_complete_file
+	    elif _guix_is_command "import" # TODO: complete sub-commands
+	    then
+		 _guix_complete_file
+	    else
+		_guix_complete_available_package "$word_at_point"
+	    fi
+	    ;;
+    esac
+}
+
+complete -F _guix_complete guix
diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm
index 64c3410baf..0c60355a1c 100644
--- a/gnu/build/activation.scm
+++ b/gnu/build/activation.scm
@@ -30,6 +30,7 @@
             activate-/bin/sh
             activate-modprobe
             activate-firmware
+            activate-ptrace-attach
             activate-current-system))
 
 ;;; Commentary:
@@ -335,6 +336,18 @@ by itself, without having to resort to a \"user helper\"."
     (lambda (port)
       (display directory port))))
 
+(define (activate-ptrace-attach)
+  "Allow users to PTRACE_ATTACH their own processes.
+
+This works around a regression introduced in the default \"security\" policy
+found in Linux 3.4 onward that prevents users from attaching to their own
+processes--see Yama.txt in the Linux source tree for the rationale.  This
+sounds like an unacceptable restriction for little or no security
+improvement."
+  (call-with-output-file "/proc/sys/kernel/yama/ptrace_scope"
+    (lambda (port)
+      (display 0 port))))
+
 
 (define %current-system
   ;; The system that is current (a symlink.)  This is not necessarily the same
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 9813d07e9c..e143fb2c55 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -30,13 +30,17 @@
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages java)
+  #:use-module (gnu packages maths)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages statistics)
+  #:use-module (gnu packages swig)
   #:use-module (gnu packages tbb)
   #:use-module (gnu packages vim)
+  #:use-module (gnu packages xml)
   #:use-module (gnu packages zip))
 
 (define-public bedops
@@ -507,6 +511,57 @@ supports next-generation sequencing data in fasta/q and csfasta/q format from
 Illumina, Roche 454, and the SOLiD platform.")
     (license license:gpl3)))
 
+(define-public grit
+  (package
+    (name "grit")
+    (version "2.0.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/nboley/grit/archive/"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "157in84dj70wimbind3x7sy1whs3h57qfgcnj2s6lrd38fbrb7mj"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2
+       #:phases
+       (alist-cons-after
+        'unpack 'generate-from-cython-sources
+        (lambda* (#:key inputs outputs #:allow-other-keys)
+          ;; Delete these C files to force fresh generation from pyx sources.
+          (delete-file "grit/sparsify_support_fns.c")
+          (delete-file "grit/call_peaks_support_fns.c")
+          (substitute* "setup.py"
+            (("Cython.Setup") "Cython.Build")
+            ;; Add numpy include path to fix compilation
+            (("pyx\", \\]")
+             (string-append "pyx\", ], include_dirs = ['"
+                            (assoc-ref inputs "python-numpy")
+                            "/lib/python2.7/site-packages/numpy/core/include/"
+                            "']"))) #t)
+        %standard-phases)))
+    (inputs
+     `(("python-scipy" ,python2-scipy)
+       ("python-numpy" ,python2-numpy)
+       ("python-pysam" ,python2-pysam)
+       ("python-networkx" ,python2-networkx)))
+    (native-inputs
+     `(("python-cython" ,python2-cython)
+       ("python-setuptools" ,python2-setuptools)))
+    (home-page "http://grit-bio.org")
+    (synopsis "Tool for integrative analysis of RNA-seq type assays")
+    (description
+     "GRIT is designed to use RNA-seq, TES, and TSS data to build and quantify
+full length transcript models.  When none of these data sources are available,
+GRIT can be run by providing a candidate set of TES or TSS sites.  In
+addition, GRIT can merge in reference junctions and gene boundaries.  GRIT can
+also be run in quantification mode, where it uses a provided GTF file and just
+estimates transcript expression.")
+    (license license:gpl3+)))
+
 (define-public hisat
   (package
     (name "hisat")
@@ -1001,6 +1056,111 @@ sequences.")
     ;; STAR is licensed under GPLv3 or later; htslib is MIT-licensed.
     (license license:gpl3+)))
 
+(define-public shogun
+  (package
+    (name "shogun")
+    (version "4.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "ftp://shogun-toolbox.org/shogun/releases/"
+             (version-major+minor version)
+             "/sources/shogun-" version ".tar.bz2"))
+       (sha256
+        (base32
+         "159nlijnb7mnrv9za80wnm1shwvy45hgrqzn51hxy7gw4z6d6fdb"))))
+    (build-system cmake-build-system)
+    (arguments
+     '(#:tests? #f ;no check target
+       #:phases
+       (alist-cons-after
+        'unpack 'delete-broken-symlinks
+        (lambda _
+          (for-each delete-file '("applications/arts/data"
+                                  "applications/asp/data"
+                                  "applications/easysvm/data"
+                                  "applications/msplicer/data"
+                                  "applications/ocr/data"
+                                  "examples/documented/data"
+                                  "examples/documented/matlab_static"
+                                  "examples/documented/octave_static"
+                                  "examples/undocumented/data"
+                                  "examples/undocumented/matlab_static"
+                                  "examples/undocumented/octave_static"
+                                  "tests/integration/data"
+                                  "tests/integration/matlab_static"
+                                  "tests/integration/octave_static"
+                                  "tests/integration/python_modular/tests"))
+          #t)
+        (alist-cons-after
+         'unpack 'change-R-target-path
+         (lambda* (#:key outputs #:allow-other-keys)
+           (substitute* '("src/interfaces/r_modular/CMakeLists.txt"
+                          "src/interfaces/r_static/CMakeLists.txt"
+                          "examples/undocumented/r_modular/CMakeLists.txt")
+             (("\\$\\{R_COMPONENT_LIB_PATH\\}")
+              (string-append (assoc-ref outputs "out")
+                             "/lib/R/library/")))
+           #t)
+         (alist-cons-after
+          'unpack 'fix-octave-modules
+          (lambda* (#:key outputs #:allow-other-keys)
+            (substitute* '("src/interfaces/octave_modular/CMakeLists.txt"
+                           "src/interfaces/octave_static/CMakeLists.txt")
+              (("^include_directories\\(\\$\\{OCTAVE_INCLUDE_DIRS\\}")
+               "include_directories(${OCTAVE_INCLUDE_DIRS} ${OCTAVE_INCLUDE_DIRS}/octave"))
+
+            ;; change target directory
+            (substitute* "src/interfaces/octave_modular/CMakeLists.txt"
+              (("\\$\\{OCTAVE_OCT_LOCAL_API_FILE_DIR\\}")
+               (string-append (assoc-ref outputs "out")
+                              "/share/octave/packages")))
+            #t)
+          (alist-cons-before
+           'build 'set-HOME
+           ;; $HOME needs to be set at some point during the build phase
+           (lambda _ (setenv "HOME" "/tmp") #t)
+           %standard-phases))))
+       #:configure-flags
+       (list "-DUSE_SVMLIGHT=OFF" ;disable proprietary SVMLIGHT
+             ;;"-DJavaModular=ON" ;requires unpackaged jblas
+             ;;"-DRubyModular=ON" ;requires unpackaged ruby-narray
+             ;;"-DPerlModular=ON" ;"FindPerlLibs" does not exist
+             ;;"-DLuaModular=ON"  ;fails because lua doesn't build pkgconfig file
+             "-DOctaveModular=ON"
+             "-DOctaveStatic=ON"
+             "-DPythonModular=ON"
+             "-DPythonStatic=ON"
+             "-DRModular=ON"
+             "-DRStatic=ON"
+             "-DCmdLineStatic=ON")))
+    (inputs
+     `(("python" ,python)
+       ("numpy" ,python-numpy)
+       ("r" ,r)
+       ("octave" ,octave)
+       ("swig" ,swig)
+       ("hdf5" ,hdf5)
+       ("atlas" ,atlas)
+       ("arpack" ,arpack-ng)
+       ("lapack" ,lapack)
+       ("glpk" ,glpk)
+       ("libxml2" ,libxml2)
+       ("lzo" ,lzo)
+       ("zlib" ,zlib)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "http://shogun-toolbox.org/")
+    (synopsis "Machine learning toolbox")
+    (description
+     "The Shogun Machine learning toolbox provides a wide range of unified and
+efficient Machine Learning (ML) methods.  The toolbox seamlessly allows to
+combine multiple data representations, algorithm classes, and general purpose
+tools.  This enables both rapid prototyping of data pipelines and extensibility
+in terms of new algorithms.")
+    (license license:gpl3+)))
+
 (define-public vcftools
   (package
     (name "vcftools")
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 73246ab3b9..5eb9c4b44a 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com>
 ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -57,14 +57,14 @@
 (define-public emacs
   (package
     (name "emacs")
-    (version "24.4")
+    (version "24.5")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnu/emacs/emacs-"
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1zflm6ac34s6v166p58ilxrxbxjm0q2wfc25f8y0mjml1lbr3qs7"))))
+               "0kn3rzm91qiswi0cql89kbv6mqn27rwsyjfb8xmwy9m5s8fxfiyx"))))
     (build-system glib-or-gtk-build-system)
     (arguments
      '(#:phases (alist-cons-before
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index ad0cfccca9..9758806cc5 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -20,7 +20,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages gstreamer)
-  #:use-module ((guix licenses) #:select (lgpl2.0+ bsd-2 bsd-3))
+  #:use-module ((guix licenses) #:select (lgpl2.0+ bsd-2 bsd-3 gpl2+))
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
@@ -39,6 +39,7 @@
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages yasm)
   #:use-module (gnu packages xml))
 
 (define-public orc
@@ -247,6 +248,42 @@ GStreamer multimedia library.  This set contains those plug-ins which the
 developers consider to have good quality code and correct functionality.")
     (license lgpl2.0+)))
 
+(define-public gst-libav
+  (package
+    (name "gst-libav")
+    (version "1.4.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://gstreamer.freedesktop.org/src/" name "/"
+                    name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "1g7vg9amh3cc3nmc415h6g2rqxqi4wgwqi08hxfbpwq48ri64p30"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-before configure patch-/bin/sh
+                     (lambda _
+                       (substitute* "gst-libs/ext/libav/configure"
+                         (("#! /bin/sh")
+                          (string-append "#! "(which "sh")))))))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("python" ,python)
+       ("yasm" ,yasm)))
+    (inputs
+     `(("gst-plugins-base" ,gst-plugins-base)
+       ("orc" ,orc)
+       ("zlib" ,zlib)))
+    (home-page "http://gstreamer.freedesktop.org/")
+    (synopsis "Plugins for the GStreamer multimedia library")
+    (description
+     "This GStreamer plugin supports a large number of audio and video
+compression formats through the use of the libav library.")
+    (license gpl2+)))
+
 (define-public gst-plugins-base-0.10
   (package (inherit gst-plugins-base)
     (version "0.10.36")
diff --git a/gnu/packages/man.scm b/gnu/packages/man.scm
index f5bd339100..a92c6dd132 100644
--- a/gnu/packages/man.scm
+++ b/gnu/packages/man.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2014 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014 David Thompson <dthompson2@worcester.edu>
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 ;;;
@@ -119,7 +119,7 @@ the traditional flat-text whatis databases.")
 (define-public man-pages
   (package
     (name "man-pages")
-    (version "3.69")
+    (version "3.82")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -127,7 +127,7 @@ the traditional flat-text whatis databases.")
                     version ".tar.xz"))
               (sha256
                (base32
-                "18zzmdzjihdnyg4vamk0jp6v6826vrsgal3kqqxvfq9bzyrh8xm2"))))
+                "1c8q618shf469nfp55qrwjv9630fgq5abfk946xya9hw1bfp6wjl"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases (alist-delete 'configure %standard-phases)
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index cd1ba0b7b9..956fa7efa0 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -499,7 +499,7 @@ the ``message of the day''."
   "Return a service that runs libc's name service cache daemon (nscd) with the
 given @var{config}---an @code{<nscd-configuration>} object.  Optionally,
 @code{#:name-services} is a list of packages that provide name service switch
- (NSS) modules needed by nscd."
+ (NSS) modules needed by nscd.  @xref{Name Service Switch}, for an example."
   (mlet %store-monad ((nscd.conf (nscd.conf-file config)))
     (return (service
              (documentation "Run libc's name service cache daemon (nscd).")
diff --git a/gnu/system.scm b/gnu/system.scm
index ece61adb2b..6cf12df604 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -680,6 +681,9 @@ etc."
                     (activate-firmware
                      (string-append #$firmware "/lib/firmware"))
 
+                    ;; Let users debug their own processes!
+                    (activate-ptrace-attach)
+
                     ;; Run the services' activation snippets.
                     ;; TODO: Use 'load-compiled'.
                     (for-each primitive-load '#$actions)
@@ -695,6 +699,20 @@ we're running in the final root."
                        (dmd-conf (dmd-configuration-file services)))
     (gexp->file "boot"
                 #~(begin
+                    (use-modules (guix build utils))
+
+                    ;; Clean out /tmp and /var/run.
+                    ;;
+                    ;; XXX This needs to happen before service activations, so
+                    ;; it has to be here, but this also implicitly assumes
+                    ;; that /tmp and /var/run are on the root partition.
+                    (false-if-exception (delete-file-recursively "/tmp"))
+                    (false-if-exception (delete-file-recursively "/var/run"))
+                    (false-if-exception (mkdir "/tmp"))
+                    (false-if-exception (chmod "/tmp" #o1777))
+                    (false-if-exception (mkdir "/var/run"))
+                    (false-if-exception (chmod "/var/run" #o755))
+
                     ;; Activate the system.
                     ;; TODO: Use 'load-compiled'.
                     (primitive-load #$activate)