summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/build/cross-toolchain.scm178
-rw-r--r--gnu/build/file-systems.scm153
-rw-r--r--gnu/build/vm.scm16
-rw-r--r--gnu/local.mk78
-rw-r--r--gnu/packages/admin.scm36
-rw-r--r--gnu/packages/algebra.scm22
-rw-r--r--gnu/packages/aspell.scm53
-rw-r--r--gnu/packages/assembly.scm23
-rw-r--r--gnu/packages/audio.scm62
-rw-r--r--gnu/packages/backup.scm102
-rw-r--r--gnu/packages/base.scm32
-rw-r--r--gnu/packages/bioinformatics.scm604
-rw-r--r--gnu/packages/bittorrent.scm83
-rw-r--r--gnu/packages/boost.scm2
-rw-r--r--gnu/packages/bootstrap.scm4
-rw-r--r--gnu/packages/busybox.scm12
-rw-r--r--gnu/packages/calendar.scm8
-rw-r--r--gnu/packages/cdrom.scm101
-rw-r--r--gnu/packages/check.scm4
-rw-r--r--gnu/packages/ci.scm61
-rw-r--r--gnu/packages/code.scm4
-rw-r--r--gnu/packages/commencement.scm5
-rw-r--r--gnu/packages/connman.scm83
-rw-r--r--gnu/packages/cross-base.scm292
-rw-r--r--gnu/packages/crypto.scm4
-rw-r--r--gnu/packages/cups.scm2
-rw-r--r--gnu/packages/curl.scm10
-rw-r--r--gnu/packages/databases.scm36
-rw-r--r--gnu/packages/dav.scm19
-rw-r--r--gnu/packages/debug.scm22
-rw-r--r--gnu/packages/disk.scm36
-rw-r--r--gnu/packages/display-managers.scm2
-rw-r--r--gnu/packages/django.scm27
-rw-r--r--gnu/packages/dns.scm114
-rw-r--r--gnu/packages/docbook.scm20
-rw-r--r--gnu/packages/docker.scm2
-rw-r--r--gnu/packages/ebook.scm14
-rw-r--r--gnu/packages/emacs.scm182
-rw-r--r--gnu/packages/embedded.scm352
-rw-r--r--gnu/packages/enlightenment.scm39
-rw-r--r--gnu/packages/feh.scm67
-rw-r--r--gnu/packages/flashing-tools.scm36
-rw-r--r--gnu/packages/fonts.scm46
-rw-r--r--gnu/packages/fpga.scm18
-rw-r--r--gnu/packages/freedesktop.scm37
-rw-r--r--gnu/packages/ftp.scm17
-rw-r--r--gnu/packages/game-development.scm6
-rw-r--r--gnu/packages/games.scm18
-rw-r--r--gnu/packages/gcc.scm35
-rw-r--r--gnu/packages/geeqie.scm108
-rw-r--r--gnu/packages/ghostscript.scm2
-rw-r--r--gnu/packages/gimp.scm2
-rw-r--r--gnu/packages/gl.scm36
-rw-r--r--gnu/packages/glib.scm24
-rw-r--r--gnu/packages/gnome.scm99
-rw-r--r--gnu/packages/gnunet.scm36
-rw-r--r--gnu/packages/gnupg.scm132
-rw-r--r--gnu/packages/gnustep.scm8
-rw-r--r--gnu/packages/gnuzilla.scm124
-rw-r--r--gnu/packages/golang.scm6
-rw-r--r--gnu/packages/gps.scm2
-rw-r--r--gnu/packages/graphviz.scm50
-rw-r--r--gnu/packages/groff.scm41
-rw-r--r--gnu/packages/grub.scm61
-rw-r--r--gnu/packages/gstreamer.scm32
-rw-r--r--gnu/packages/gtk.scm28
-rw-r--r--gnu/packages/guile.scm120
-rw-r--r--gnu/packages/gv.scm23
-rw-r--r--gnu/packages/haskell.scm302
-rw-r--r--gnu/packages/hurd.scm19
-rw-r--r--gnu/packages/idris.scm256
-rw-r--r--gnu/packages/image-viewers.scm207
-rw-r--r--gnu/packages/image.scm184
-rw-r--r--gnu/packages/imagemagick.scm4
-rw-r--r--gnu/packages/inkscape.scm32
-rw-r--r--gnu/packages/irc.scm113
-rw-r--r--gnu/packages/java.scm44
-rw-r--r--gnu/packages/kde-frameworks.scm360
-rw-r--r--gnu/packages/kde.scm219
-rw-r--r--gnu/packages/key-mon.scm2
-rw-r--r--gnu/packages/libevent.scm4
-rw-r--r--gnu/packages/libreoffice.scm38
-rw-r--r--gnu/packages/libunistring.scm6
-rw-r--r--gnu/packages/libupnp.scm3
-rw-r--r--gnu/packages/links.scm4
-rw-r--r--gnu/packages/linux.scm201
-rw-r--r--gnu/packages/lirc.scm3
-rw-r--r--gnu/packages/lisp.scm42
-rw-r--r--gnu/packages/llvm.scm6
-rw-r--r--gnu/packages/lua.scm36
-rw-r--r--gnu/packages/lynx.scm4
-rw-r--r--gnu/packages/machine-learning.scm22
-rw-r--r--gnu/packages/mail.scm239
-rw-r--r--gnu/packages/make-bootstrap.scm63
-rw-r--r--gnu/packages/man.scm4
-rw-r--r--gnu/packages/maths.scm109
-rw-r--r--gnu/packages/mc.scm14
-rw-r--r--gnu/packages/messaging.scm82
-rw-r--r--gnu/packages/mingw.scm84
-rw-r--r--gnu/packages/monitoring.scm125
-rw-r--r--gnu/packages/moreutils.scm60
-rw-r--r--gnu/packages/mp3.scm9
-rw-r--r--gnu/packages/mpd.scm24
-rw-r--r--gnu/packages/mtools.scm7
-rw-r--r--gnu/packages/multiprecision.scm9
-rw-r--r--gnu/packages/music.scm421
-rw-r--r--gnu/packages/nano.scm4
-rw-r--r--gnu/packages/ncurses.scm256
-rw-r--r--gnu/packages/networking.scm44
-rw-r--r--gnu/packages/ntp.scm55
-rw-r--r--gnu/packages/nutrition.scm6
-rw-r--r--gnu/packages/ocaml.scm751
-rw-r--r--gnu/packages/onc-rpc.scm10
-rw-r--r--gnu/packages/openstack.scm95
-rw-r--r--gnu/packages/package-management.scm66
-rw-r--r--gnu/packages/parallel.scm4
-rw-r--r--gnu/packages/password-utils.scm44
-rw-r--r--gnu/packages/patches/awesome-reproducible-png.patch4
-rw-r--r--gnu/packages/patches/cairo-CVE-2016-9082.patch122
-rw-r--r--gnu/packages/patches/chicken-CVE-2016-6830+CVE-2016-6831.patch81
-rw-r--r--gnu/packages/patches/cssc-gets-undeclared.patch17
-rw-r--r--gnu/packages/patches/cssc-missing-include.patch12
-rw-r--r--gnu/packages/patches/fcgi-2.4.0-gcc44-fixes.patch14
-rw-r--r--gnu/packages/patches/fcgi-2.4.0-poll.patch89
-rw-r--r--gnu/packages/patches/gcc-4.9.3-mingw-gthr-default.patch11
-rw-r--r--gnu/packages/patches/gcj-arm-mode.patch36
-rw-r--r--gnu/packages/patches/gnupg-test-segfault-on-32bit-arch.patch40
-rw-r--r--gnu/packages/patches/gst-plugins-good-fix-crashes.patch1047
-rw-r--r--gnu/packages/patches/gst-plugins-good-fix-invalid-read.patch37
-rw-r--r--gnu/packages/patches/gst-plugins-good-fix-signedness.patch58
-rw-r--r--gnu/packages/patches/gst-plugins-good-flic-bounds-check.patch319
-rw-r--r--gnu/packages/patches/httpd-CVE-2016-8740.patch36
-rw-r--r--gnu/packages/patches/icecat-CVE-2016-9064.patch996
-rw-r--r--gnu/packages/patches/inkscape-drop-wait-for-targets.patch68
-rw-r--r--gnu/packages/patches/kdbusaddons-kinit-file-name.patch15
-rw-r--r--gnu/packages/patches/khal-disable-failing-tests.patch33
-rw-r--r--gnu/packages/patches/libepoxy-gl-null-checks.patch54
-rw-r--r--gnu/packages/patches/libpng-CVE-2016-10087.patch37
-rw-r--r--gnu/packages/patches/libupnp-CVE-2016-8863.patch72
-rw-r--r--gnu/packages/patches/libxml2-CVE-2016-4658.patch257
-rw-r--r--gnu/packages/patches/libxml2-CVE-2016-5131.patch218
-rw-r--r--gnu/packages/patches/mcrypt-CVE-2012-4409.patch35
-rw-r--r--gnu/packages/patches/mcrypt-CVE-2012-4527.patch198
-rw-r--r--gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch218
-rw-r--r--gnu/packages/patches/multiqc-fix-git-subprocess-error.patch16
-rw-r--r--gnu/packages/patches/mupdf-CVE-2016-6265.patch30
-rw-r--r--gnu/packages/patches/mupdf-CVE-2016-6525.patch21
-rw-r--r--gnu/packages/patches/mupdf-CVE-2016-7504.patch99
-rw-r--r--gnu/packages/patches/mupdf-CVE-2016-7505.patch32
-rw-r--r--gnu/packages/patches/mupdf-CVE-2016-7506.patch42
-rw-r--r--gnu/packages/patches/mupdf-CVE-2016-7563.patch37
-rw-r--r--gnu/packages/patches/mupdf-CVE-2016-7564.patch34
-rw-r--r--gnu/packages/patches/mupdf-CVE-2016-8674.patch165
-rw-r--r--gnu/packages/patches/mupdf-CVE-2016-9017.patch46
-rw-r--r--gnu/packages/patches/mupdf-CVE-2016-9136.patch32
-rw-r--r--gnu/packages/patches/mupdf-build-with-openjpeg-2.1.patch9
-rw-r--r--gnu/packages/patches/nasm-no-ps-pdf.patch20
-rw-r--r--gnu/packages/patches/netcdf-config-date.patch47
-rw-r--r--gnu/packages/patches/netcdf-date-time.patch11
-rw-r--r--gnu/packages/patches/netcdf-tst_h_par.patch21
-rw-r--r--gnu/packages/patches/ocaml-Add-a-.file-directive.patch96
-rw-r--r--gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch125
-rw-r--r--gnu/packages/patches/ocaml-bitstring-fix-configure.patch53
-rw-r--r--gnu/packages/patches/onionshare-fix-install-paths.patch39
-rw-r--r--gnu/packages/patches/openjpeg-CVE-2015-6581.patch47
-rw-r--r--gnu/packages/patches/openjpeg-CVE-2016-9850-CVE-2016-9851.patch245
-rw-r--r--gnu/packages/patches/openssh-memory-exhaustion.patch39
-rw-r--r--gnu/packages/patches/python-2.7-site-prefixes.patch26
-rw-r--r--gnu/packages/patches/python-dendropy-exclude-failing-tests.patch21
-rw-r--r--gnu/packages/patches/python-pycrypto-CVE-2013-7459.patch97
-rw-r--r--gnu/packages/patches/python-rarfile-fix-tests.patch14
-rw-r--r--gnu/packages/patches/qemu-CVE-2016-8576.patch62
-rw-r--r--gnu/packages/patches/qemu-CVE-2016-8577.patch36
-rw-r--r--gnu/packages/patches/qemu-CVE-2016-8578.patch27
-rw-r--r--gnu/packages/patches/readline-7.0-mingw.patch28
-rw-r--r--gnu/packages/patches/ruby-symlinkfix.patch53
-rw-r--r--gnu/packages/patches/seq24-rename-mutex.patch124
-rw-r--r--gnu/packages/patches/slock-CVE-2016-6866.patch51
-rw-r--r--gnu/packages/patches/tcsh-fix-out-of-bounds-read.patch31
-rw-r--r--gnu/packages/patches/unrtf-CVE-2016-10091.patch189
-rw-r--r--gnu/packages/patches/vtk-mesa-10.patch36
-rw-r--r--gnu/packages/pciutils.scm4
-rw-r--r--gnu/packages/pdf.scm31
-rw-r--r--gnu/packages/perl-web.scm47
-rw-r--r--gnu/packages/perl.scm542
-rw-r--r--gnu/packages/photo.scm15
-rw-r--r--gnu/packages/php.scm4
-rw-r--r--gnu/packages/pretty-print.scm46
-rw-r--r--gnu/packages/protobuf.scm9
-rw-r--r--gnu/packages/python.scm2779
-rw-r--r--gnu/packages/qemu.scm21
-rw-r--r--gnu/packages/qt.scm224
-rw-r--r--gnu/packages/rdf.scm5
-rw-r--r--gnu/packages/readline.scm14
-rw-r--r--gnu/packages/ruby.scm61
-rw-r--r--gnu/packages/rust.scm322
-rw-r--r--gnu/packages/samba.scm14
-rw-r--r--gnu/packages/scanner.scm64
-rw-r--r--gnu/packages/scheme.scm31
-rw-r--r--gnu/packages/sdl.scm15
-rw-r--r--gnu/packages/security-token.scm6
-rw-r--r--gnu/packages/serialization.scm6
-rw-r--r--gnu/packages/shells.scm23
-rw-r--r--gnu/packages/shellutils.scm10
-rw-r--r--gnu/packages/speech.scm34
-rw-r--r--gnu/packages/spice.scm2
-rw-r--r--gnu/packages/ssh.scm5
-rw-r--r--gnu/packages/statistics.scm748
-rw-r--r--gnu/packages/suckless.scm30
-rw-r--r--gnu/packages/swig.scm4
-rw-r--r--gnu/packages/sxiv.scm62
-rw-r--r--gnu/packages/sync.scm (renamed from gnu/packages/owncloud.scm)57
-rw-r--r--gnu/packages/telephony.scm27
-rw-r--r--gnu/packages/terminals.scm70
-rw-r--r--gnu/packages/tex.scm152
-rw-r--r--gnu/packages/text-editors.scm77
-rw-r--r--gnu/packages/tls.scm68
-rw-r--r--gnu/packages/tor.scm58
-rw-r--r--gnu/packages/unrtf.scm2
-rw-r--r--gnu/packages/version-control.scm36
-rw-r--r--gnu/packages/video.scm61
-rw-r--r--gnu/packages/vim.scm4
-rw-r--r--gnu/packages/vpn.scm71
-rw-r--r--gnu/packages/vtk.scm50
-rw-r--r--gnu/packages/web.scm217
-rw-r--r--gnu/packages/wget.scm34
-rw-r--r--gnu/packages/wicd.scm3
-rw-r--r--gnu/packages/wine.scm31
-rw-r--r--gnu/packages/wm.scm52
-rw-r--r--gnu/packages/wxwidgets.scm6
-rw-r--r--gnu/packages/xdisorg.scm29
-rw-r--r--gnu/packages/xml.scm66
-rw-r--r--gnu/packages/xorg.scm110
-rw-r--r--gnu/packages/zile.scm82
-rw-r--r--gnu/packages/zip.scm4
-rw-r--r--gnu/services.scm10
-rw-r--r--gnu/services/admin.scm7
-rw-r--r--gnu/services/avahi.scm2
-rw-r--r--gnu/services/base.scm100
-rw-r--r--gnu/services/configuration.scm2
-rw-r--r--gnu/services/cuirass.scm141
-rw-r--r--gnu/services/cups.scm2
-rw-r--r--gnu/services/databases.scm35
-rw-r--r--gnu/services/desktop.scm5
-rw-r--r--gnu/services/kerberos.scm378
-rw-r--r--gnu/services/networking.scm3
-rw-r--r--gnu/services/sddm.scm2
-rw-r--r--gnu/services/shepherd.scm2
-rw-r--r--gnu/services/web.scm100
-rw-r--r--gnu/system/examples/desktop.tmpl3
-rw-r--r--gnu/system/grub.scm17
-rw-r--r--gnu/system/install.scm8
-rw-r--r--gnu/system/linux-initrd.scm9
-rw-r--r--gnu/tests/install.scm11
-rw-r--r--gnu/tests/mail.scm159
-rw-r--r--gnu/tests/nfs.scm131
256 files changed, 14251 insertions, 8455 deletions
diff --git a/gnu/build/cross-toolchain.scm b/gnu/build/cross-toolchain.scm
new file mode 100644
index 0000000000..450443ca63
--- /dev/null
+++ b/gnu/build/cross-toolchain.scm
@@ -0,0 +1,178 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2016 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 build cross-toolchain)
+  #:use-module (guix build utils)
+  #:use-module (guix build gnu-build-system)
+  #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-26)
+  #:use-module (ice-9 match)
+  #:use-module (ice-9 ftw)
+  #:export (cross-gcc-build-phases))
+
+;;; Commentary:
+;;;
+;;; This module provides tools to build a cross-compiler.
+;;;
+;;; Code:
+
+(define %gcc-include-paths
+  ;; Environment variables for header search paths.
+  ;; Note: See <http://bugs.gnu.org/22186> for why not 'CPATH'.
+  '("C_INCLUDE_PATH"
+    "CPLUS_INCLUDE_PATH"
+    "OBJC_INCLUDE_PATH"
+    "OBJCPLUS_INCLUDE_PATH"))
+
+(define %gcc-cross-include-paths
+  ;; Search path for target headers when cross-compiling.
+  (map (cut string-append "CROSS_" <>) %gcc-include-paths))
+
+(define* (make-cross-binutils-visible #:key outputs inputs target
+                                      #:allow-other-keys)
+  "Create symlinks for 'as', 'nm', and 'ld' in the \"out\" output, under
+libexec/gcc, so that the cross-GCC can find them."
+  (let* ((out      (assoc-ref outputs "out"))
+         (libexec  (string-append out "/libexec/gcc/" target))
+         (binutils (string-append (assoc-ref inputs "binutils-cross")
+                                  "/bin/" target "-"))
+         (wrapper  (string-append (assoc-ref inputs "ld-wrapper-cross")
+                                  "/bin/" target "-ld")))
+    (for-each (lambda (file)
+                (symlink (string-append binutils file)
+                         (string-append libexec "/" file)))
+              '("as" "nm"))
+    (symlink wrapper (string-append libexec "/ld"))
+    #t))
+
+(define* (set-cross-path #:key inputs #:allow-other-keys)
+  "Add the cross kernel headers to CROSS_CPATH, and remove them from
+C_INCLUDE_PATH et al."
+  (match (assoc-ref inputs "libc")
+    ((? string? libc)
+     (let ((kernel (assoc-ref inputs "xkernel-headers")))
+       (define (cross? x)
+         ;; Return #t if X is a cross-libc or cross Linux.
+         (or (string-prefix? libc x)
+             (string-prefix? kernel x)))
+
+       (let ((cpath (string-append libc "/include"
+                                   ":" kernel "/include")))
+         (for-each (cut setenv <> cpath)
+                   %gcc-cross-include-paths))
+
+       (setenv "CROSS_LIBRARY_PATH"
+               (string-append libc "/lib:" kernel "/lib")) ;for Hurd's libihash
+
+       (for-each (lambda (var)
+                   (and=> (getenv var)
+                          (lambda (value)
+                            (let* ((path (search-path-as-string->list value))
+                                   (native-path (list->search-path-as-string
+                                                 (remove cross? path) ":")))
+                              (setenv var native-path)))))
+                 (cons "LIBRARY_PATH" %gcc-include-paths))
+       #t))
+    (#f
+     ;; We're building the sans-libc cross-compiler, so nothing to do.
+     #t)))
+
+(define* (set-cross-path/mingw #:key inputs #:allow-other-keys)
+  "Add the cross MinGW headers to CROSS_C_*_INCLUDE_PATH, and remove them from
+C_*INCLUDE_PATH."
+  (let ((libc (assoc-ref inputs "libc"))
+        (gcc (assoc-ref inputs "gcc")))
+    (define (cross? x)
+      (and libc (string-prefix? libc x)))
+
+    (define (unpacked-mingw-dir)
+      (match (scandir "." (lambda (name)
+                            (string-contains name "mingw-w64")))
+        ((mingw-dir)
+         (string-append
+          (getcwd) "/" mingw-dir "/mingw-w64-headers"))))
+
+    (if libc
+        (let ((cpath (string-append libc "/include"
+                                    ":" libc "/i686-w64-mingw32/include")))
+          (for-each (cut setenv <> cpath)
+                    %gcc-cross-include-paths))
+
+        ;; libc is false, so we are building xgcc-sans-libc.
+        ;; Add essential headers from mingw-w64.
+        (let ((mingw-source (assoc-ref inputs "mingw-source")))
+          (system* "tar" "xvf" mingw-source)
+          (let ((mingw-headers (unpacked-mingw-dir)))
+            ;; We need _mingw.h which will gets built from _mingw.h.in by
+            ;; mingw-w64's configure.  We cannot configure mingw-w64 until we
+            ;; have xgcc-sans-libc; substitute to the rescue.
+            (copy-file (string-append mingw-headers "/crt/_mingw.h.in")
+                       (string-append mingw-headers "/crt/_mingw.h"))
+
+            (substitute* (string-append mingw-headers "/crt/_mingw.h")
+              (("@MINGW_HAS_SECURE_API@")
+               "#define MINGW_HAS_SECURE_API 1"))
+
+            (let ((cpath (string-append mingw-headers "/include"
+                                        ":" mingw-headers "/crt"
+                                        ":" mingw-headers
+                                        "/defaults/include")))
+              (for-each (cut setenv <> cpath)
+                        (cons "CROSS_LIBRARY_PATH"
+                              %gcc-cross-include-paths))))))
+
+    (when libc
+      (setenv "CROSS_LIBRARY_PATH"
+              (string-append libc "/lib"
+                             ":" libc "/i686-w64-mingw32/lib")))
+
+    (setenv "CPP" (string-append gcc "/bin/cpp"))
+    (for-each (lambda (var)
+                (and=> (getenv var)
+                       (lambda (value)
+                         (let* ((path (search-path-as-string->list
+                                       value))
+                                (native-path (list->search-path-as-string
+                                              (remove cross? path) ":")))
+                           (setenv var native-path)))))
+              (cons "LIBRARY_PATH" %gcc-include-paths))
+    #t))
+
+(define (install-strip . _)
+  "Install a stripped GCC."
+  ;; Unlike our 'strip' phase, this will do the right thing for
+  ;; cross-compilers.
+  (zero? (system* "make" "install-strip")))
+
+(define* (cross-gcc-build-phases target
+                                 #:optional (phases %standard-phases))
+  "Modify PHASES to include everything needed to build a cross-GCC for TARGET,
+a target triplet."
+  (modify-phases phases
+    (add-before 'configure 'set-cross-path
+      (if (string-contains target "mingw")
+          set-cross-path/mingw
+          set-cross-path))
+    (add-after 'install 'make-cross-binutils-visible
+      (cut make-cross-binutils-visible #:target target <...>))
+    (replace 'install install-strip)))
+
+;;; cross-toolchain.scm ends here
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index 0d55e91978..c121ca5f8b 100644
--- a/gnu/build/file-systems.scm
+++ b/gnu/build/file-systems.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -71,67 +72,69 @@
   "Bind-mount SOURCE at TARGET."
   (mount source target "" MS_BIND))
 
+(define (read-superblock device offset size magic?)
+  "Read a superblock of SIZE from OFFSET and DEVICE.  Return the raw
+superblock on success, and #f if no valid superblock was found.  MAGIC?
+takes a bytevector and returns #t when it's a valid superblock."
+  (call-with-input-file device
+    (lambda (port)
+      (seek port offset SEEK_SET)
+
+      (let ((block (make-bytevector size)))
+        (match (get-bytevector-n! port block 0 (bytevector-length block))
+          ((? eof-object?)
+           #f)
+          ((? number? len)
+           (and (= len (bytevector-length block))
+                (and (magic? block)
+                     block))))))))
+
+(define (sub-bytevector bv start size)
+  "Return a copy of the SIZE bytes of BV starting from offset START."
+  (let ((result (make-bytevector size)))
+    (bytevector-copy! bv start result 0 size)
+    result))
+
+(define (null-terminated-latin1->string bv)
+  "Return the volume name of SBLOCK as a string of at most 256 characters, or
+#f if SBLOCK has no volume name."
+    ;; This is a Latin-1, nul-terminated string.
+    (let ((bytes (take-while (negate zero?) (bytevector->u8-list bv))))
+      (if (null? bytes)
+          #f
+          (list->string (map integer->char bytes)))))
+
 
 ;;;
 ;;; Ext2 file systems.
 ;;;
 
+;; <http://www.nongnu.org/ext2-doc/ext2.html#DEF-SUPERBLOCK>.
+;; TODO: Use "packed structs" from Guile-OpenGL or similar.
+
 (define-syntax %ext2-endianness
   ;; Endianness of ext2 file systems.
   (identifier-syntax (endianness little)))
 
-;; Offset in bytes of interesting parts of an ext2 superblock.  See
-;; <http://www.nongnu.org/ext2-doc/ext2.html#DEF-SUPERBLOCK>.
-;; TODO: Use "packed structs" from Guile-OpenGL or similar.
-(define-syntax %ext2-sblock-magic       (identifier-syntax 56))
-(define-syntax %ext2-sblock-creator-os  (identifier-syntax 72))
-(define-syntax %ext2-sblock-uuid        (identifier-syntax 104))
-(define-syntax %ext2-sblock-volume-name (identifier-syntax 120))
+(define (ext2-superblock? sblock)
+  "Return #t when SBLOCK is an ext2 superblock."
+  (let ((magic (bytevector-u16-ref sblock 56 %ext2-endianness)))
+    (= magic #xef53)))
 
 (define (read-ext2-superblock device)
   "Return the raw contents of DEVICE's ext2 superblock as a bytevector, or #f
 if DEVICE does not contain an ext2 file system."
-  (define %ext2-magic
-    ;; The magic bytes that identify an ext2 file system.
-    #xef53)
-
-  (define superblock-size
-    ;; Size of the interesting part of an ext2 superblock.
-    264)
-
-  (define block
-    ;; The superblock contents.
-    (make-bytevector superblock-size))
-
-  (call-with-input-file device
-    (lambda (port)
-      (seek port 1024 SEEK_SET)
-
-      ;; Note: work around <http://bugs.gnu.org/17466>.
-      (and (eqv? superblock-size (get-bytevector-n! port block 0
-                                                    superblock-size))
-           (let ((magic (bytevector-u16-ref block %ext2-sblock-magic
-                                            %ext2-endianness)))
-             (and (= magic %ext2-magic)
-                  block))))))
+  (read-superblock device 1024 264 ext2-superblock?))
 
 (define (ext2-superblock-uuid sblock)
   "Return the UUID of ext2 superblock SBLOCK as a 16-byte bytevector."
-  (let ((uuid (make-bytevector 16)))
-    (bytevector-copy! sblock %ext2-sblock-uuid uuid 0 16)
-    uuid))
+  (sub-bytevector sblock 104 16))
 
 (define (ext2-superblock-volume-name sblock)
   "Return the volume name of SBLOCK as a string of at most 16 characters, or
 #f if SBLOCK has no volume name."
-  (let ((bv (make-bytevector 16)))
-    (bytevector-copy! sblock %ext2-sblock-volume-name bv 0 16)
+  (null-terminated-latin1->string (sub-bytevector sblock 120 16)))
 
-    ;; This is a Latin-1, nul-terminated string.
-    (let ((bytes (take-while (negate zero?) (bytevector->u8-list bv))))
-      (if (null? bytes)
-          #f
-          (list->string (map integer->char bytes))))))
 
 
 ;;;
@@ -146,37 +149,22 @@ if DEVICE does not contain an ext2 file system."
   ;; Endianness of LUKS headers.
   (identifier-syntax (endianness big)))
 
-(define-syntax %luks-header-size
-  ;; Size in bytes of the LUKS header, including key slots.
-  (identifier-syntax 592))
-
-(define %luks-magic
-  ;; The 'LUKS_MAGIC' constant.
-  (u8-list->bytevector (append (map char->integer (string->list "LUKS"))
-                               (list #xba #xbe))))
-
-(define (sub-bytevector bv start size)
-  "Return a copy of the SIZE bytes of BV starting from offset START."
-  (let ((result (make-bytevector size)))
-    (bytevector-copy! bv start result 0 size)
-    result))
+(define (luks-superblock? sblock)
+  "Return #t when SBLOCK is a luks superblock."
+  (define %luks-magic
+    ;; The 'LUKS_MAGIC' constant.
+    (u8-list->bytevector (append (map char->integer (string->list "LUKS"))
+                                 (list #xba #xbe))))
+  (let ((magic   (sub-bytevector sblock 0 6))
+        (version (bytevector-u16-ref sblock 6 %luks-endianness)))
+    (and (bytevector=? magic %luks-magic)
+         (= version 1))))
 
 (define (read-luks-header file)
   "Read a LUKS header from FILE.  Return the raw header on success, and #f if
 not valid header was found."
-  (call-with-input-file file
-    (lambda (port)
-      (let ((header (make-bytevector %luks-header-size)))
-        (match (get-bytevector-n! port header 0 (bytevector-length header))
-          ((? eof-object?)
-           #f)
-          ((? number? len)
-           (and (= len (bytevector-length header))
-                (let ((magic   (sub-bytevector header 0 6)) ;XXX: inefficient
-                      (version (bytevector-u16-ref header 6 %luks-endianness)))
-                  (and (bytevector=? magic %luks-magic)
-                       (= version 1)
-                       header)))))))))
+  ;; Size in bytes of the LUKS header, including key slots.
+  (read-superblock file 0 592 luks-superblock?))
 
 (define (luks-header-uuid header)
   "Return the LUKS UUID from HEADER, as a 16-byte bytevector."
@@ -267,7 +255,7 @@ returns #t if that partition's volume name is LABEL."
                        ext2-superblock-uuid
                        bytevector=?))
 
-(define partition-luks-uuid-predicate
+(define luks-partition-uuid-predicate
   (partition-predicate read-luks-header
                        luks-header-uuid
                        bytevector=?))
@@ -289,7 +277,7 @@ or #f if none was found."
 (define (find-partition-by-luks-uuid uuid)
   "Return the first LUKS partition whose unique identifier is UUID (a bytevector),
 or #f if none was found."
-  (and=> (find (partition-luks-uuid-predicate uuid)
+  (and=> (find (luks-partition-uuid-predicate uuid)
                (disk-partitions))
          (cut string-append "/dev/" <>)))
 
@@ -464,6 +452,27 @@ form:
 DEVICE, MOUNT-POINT, and TYPE must be strings; OPTIONS can be a string or #f;
 FLAGS must be a list of symbols.  CHECK? is a Boolean indicating whether to
 run a file system check."
+
+  (define (mount-nfs source mount-point type flags options)
+    (let* ((idx (string-rindex source #\:))
+           (host-part (string-take source idx))
+           ;; Strip [] from around host if present
+           (host (match (string-split host-part (string->char-set "[]"))
+                 (("" h "") h)
+                 ((h) h)))
+           (aa (match (getaddrinfo host "nfs") ((x . _) x)))
+           (sa (addrinfo:addr aa))
+           (inet-addr (inet-ntop (sockaddr:fam sa)
+                                 (sockaddr:addr sa))))
+
+      ;; Mounting an NFS file system requires passing the address
+      ;; of the server in the addr= option
+      (mount source mount-point type flags
+             (string-append "addr="
+                            inet-addr
+                            (if options
+                                (string-append "," options)
+                                "")))))
   (match spec
     ((source title mount-point type (flags ...) options check?)
      (let ((source      (canonicalize-device-spec source title))
@@ -481,7 +490,11 @@ run a file system check."
              (call-with-output-file mount-point (const #t)))
            (mkdir-p mount-point))
 
-       (mount source mount-point type flags options)
+       (cond
+        ((string-prefix? "nfs" type)
+         (mount-nfs source mount-point type flags options))
+        (else
+         (mount source mount-point type flags options)))
 
        ;; For read-only bind mounts, an extra remount is needed, as per
        ;; <http://lwn.net/Articles/281157/>, which still applies to Linux 4.0.
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index cc5cf45362..60ee18ebe0 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -79,12 +79,9 @@ it via /dev/hda.
 
 REFERENCES-GRAPHS can specify a list of reference-graph files as produced by
 the #:references-graphs parameter of 'derivation'."
-  (define image-file
-    (string-append "image." disk-image-format))
-
   (when make-disk-image?
     (unless (zero? (system* "qemu-img" "create" "-f" disk-image-format
-                            image-file
+                            output
                             (number->string disk-image-size)))
       (error "qemu-img failed")))
 
@@ -115,7 +112,7 @@ the #:references-graphs parameter of 'derivation'."
                                            builder)
                   (append
                    (if make-disk-image?
-                       `("-drive" ,(string-append "file=" image-file
+                       `("-drive" ,(string-append "file=" output
                                                   ",if=virtio"))
                        '())
                    ;; Only enable kvm if we see /dev/kvm exists.
@@ -126,11 +123,10 @@ the #:references-graphs parameter of 'derivation'."
                        '()))))
     (error "qemu failed" qemu))
 
-  (if make-disk-image?
-      (copy-file image-file output)
-      (begin
-        (mkdir output)
-        (copy-recursively "xchg" output))))
+  ;; When MAKE-DISK-IMAGE? is true, the image is in OUTPUT already.
+  (unless make-disk-image?
+    (mkdir output)
+    (copy-recursively "xchg" output)))
 
 
 ;;;
diff --git a/gnu/local.mk b/gnu/local.mk
index 55d56e1852..6dcd174bc3 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -7,7 +7,7 @@
 # Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
 # Copyright © 2016 Rene Saavedra <rennes@openmailbox.org>
 # Copyright © 2016 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
-# Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
+# Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
 # Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
 #
 # This file is part of GNU Guix.
@@ -123,7 +123,6 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/entr.scm				\
   %D%/packages/erlang.scm			\
   %D%/packages/fcitx.scm			\
-  %D%/packages/feh.scm                          \
   %D%/packages/figlet.scm			\
   %D%/packages/file.scm				\
   %D%/packages/finance.scm			\
@@ -147,7 +146,6 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/gd.scm				\
   %D%/packages/gdb.scm				\
   %D%/packages/geo.scm				\
-  %D%/packages/geeqie.scm			\
   %D%/packages/gettext.scm			\
   %D%/packages/gforth.scm			\
   %D%/packages/ghostscript.scm			\
@@ -185,8 +183,10 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/hurd.scm				\
   %D%/packages/ibus.scm				\
   %D%/packages/icu4c.scm			\
+  %D%/packages/idris.scm			\
   %D%/packages/idutils.scm			\
   %D%/packages/image.scm			\
+  %D%/packages/image-viewers.scm	\
   %D%/packages/imagemagick.scm			\
   %D%/packages/indent.scm			\
   %D%/packages/inklingreader.scm		\
@@ -249,10 +249,12 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/mc.scm				\
   %D%/packages/mcrypt.scm			\
   %D%/packages/messaging.scm			\
+  %D%/packages/mingw.scm			\
   %D%/packages/mg.scm				\
   %D%/packages/microcom.scm			\
   %D%/packages/mit-krb5.scm			\
   %D%/packages/moe.scm				\
+  %D%/packages/monitoring.scm			\
   %D%/packages/mono.scm				\
   %D%/packages/moreutils.scm			\
   %D%/packages/mpd.scm				\
@@ -284,7 +286,6 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/openstack.scm			\
   %D%/packages/orpheus.scm			\
   %D%/packages/ots.scm				\
-  %D%/packages/owncloud.scm			\
   %D%/packages/package-management.scm		\
   %D%/packages/parallel.scm			\
   %D%/packages/password-utils.scm		\
@@ -294,6 +295,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/pdf.scm				\
   %D%/packages/pem.scm				\
   %D%/packages/perl.scm				\
+  %D%/packages/perl-web.scm			\
   %D%/packages/photo.scm			\
   %D%/packages/php.scm				\
   %D%/packages/pkg-config.scm			\
@@ -320,6 +322,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/rsync.scm			\
   %D%/packages/ruby.scm				\
   %D%/packages/rush.scm				\
+  %D%/packages/rust.scm				\
   %D%/packages/samba.scm			\
   %D%/packages/sawfish.scm			\
   %D%/packages/scanner.scm			\
@@ -347,7 +350,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/statistics.scm			\
   %D%/packages/suckless.scm			\
   %D%/packages/swig.scm				\
-  %D%/packages/sxiv.scm				\
+  %D%/packages/sync.scm			\
   %D%/packages/synergy.scm			\
   %D%/packages/syndication.scm			\
   %D%/packages/task-management.scm		\
@@ -358,6 +361,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/texinfo.scm			\
   %D%/packages/tex.scm				\
   %D%/packages/textutils.scm			\
+  %D%/packages/text-editors.scm			\
   %D%/packages/time.scm				\
   %D%/packages/tls.scm				\
   %D%/packages/tmux.scm				\
@@ -400,6 +404,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/services/avahi.scm			\
   %D%/services/base.scm				\
   %D%/services/configuration.scm		\
+  %D%/services/cuirass.scm			\
   %D%/services/cups.scm				\
   %D%/services/databases.scm			\
   %D%/services/dbus.scm				\
@@ -434,6 +439,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/system/vm.scm				\
 						\
   %D%/build/activation.scm			\
+  %D%/build/cross-toolchain.scm			\
   %D%/build/file-systems.scm			\
   %D%/build/install.scm				\
   %D%/build/linux-boot.scm			\
@@ -446,7 +452,9 @@ GNU_SYSTEM_MODULES =				\
 						\
   %D%/tests.scm					\
   %D%/tests/base.scm				\
+  %D%/tests/nfs.scm				\
   %D%/tests/install.scm				\
+  %D%/tests/mail.scm				\
   %D%/tests/ssh.scm
 
 
@@ -486,9 +494,11 @@ dist_patch_DATA =						\
   %D%/packages/patches/binutils-loongson-workaround.patch	\
   %D%/packages/patches/binutils-mips-bash-bug.patch		\
   %D%/packages/patches/byobu-writable-status.patch		\
+  %D%/packages/patches/cairo-CVE-2016-9082.patch			\
   %D%/packages/patches/calibre-drop-unrar.patch			\
   %D%/packages/patches/calibre-no-updates-dialog.patch		\
   %D%/packages/patches/cdparanoia-fpic.patch			\
+  %D%/packages/patches/chicken-CVE-2016-6830+CVE-2016-6831.patch	\
   %D%/packages/patches/chmlib-inttypes.patch			\
   %D%/packages/patches/clang-libc-search-path.patch		\
   %D%/packages/patches/clang-3.8-libc-search-path.patch		\
@@ -502,8 +512,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/crda-optional-gcrypt.patch		\
   %D%/packages/patches/crossmap-allow-system-pysam.patch	\
   %D%/packages/patches/csound-header-ordering.patch		\
-  %D%/packages/patches/cssc-gets-undeclared.patch               \
-  %D%/packages/patches/cssc-missing-include.patch               \
   %D%/packages/patches/clucene-contribs-lib.patch               \
   %D%/packages/patches/cursynth-wave-rand.patch			\
   %D%/packages/patches/cyrus-sasl-CVE-2013-4122.patch		\
@@ -534,6 +542,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/fasthenry-spUtils.patch			\
   %D%/packages/patches/fasthenry-spSolve.patch			\
   %D%/packages/patches/fasthenry-spFactor.patch			\
+  %D%/packages/patches/fcgi-2.4.0-gcc44-fixes.patch		\
+  %D%/packages/patches/fcgi-2.4.0-poll.patch			\
   %D%/packages/patches/findutils-localstatedir.patch		\
   %D%/packages/patches/findutils-test-xargs.patch		\
   %D%/packages/patches/flint-ldconfig.patch			\
@@ -549,9 +559,11 @@ dist_patch_DATA =						\
   %D%/packages/patches/gcc-libiberty-printf-decl.patch		\
   %D%/packages/patches/gcc-libvtv-runpath.patch			\
   %D%/packages/patches/gcc-strmov-store-file-names.patch	\
+  %D%/packages/patches/gcc-4.9.3-mingw-gthr-default.patch	\
   %D%/packages/patches/gcc-5.0-libvtv-runpath.patch		\
   %D%/packages/patches/gcc-6-arm-none-eabi-multilib.patch	\
   %D%/packages/patches/gcc-6-cross-environment-variables.patch	\
+  %D%/packages/patches/gcj-arm-mode.patch			\
   %D%/packages/patches/gd-CVE-2016-7568.patch			\
   %D%/packages/patches/gd-CVE-2016-8670.patch			\
   %D%/packages/patches/gd-fix-chunk-size-on-boundaries.patch	\
@@ -578,6 +590,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gmp-faulty-test.patch			\
   %D%/packages/patches/gnome-tweak-tool-search-paths.patch	\
   %D%/packages/patches/gnucash-price-quotes-perl.patch		\
+  %D%/packages/patches/gnupg-test-segfault-on-32bit-arch.patch	\
   %D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \
   %D%/packages/patches/gobject-introspection-cc.patch		\
   %D%/packages/patches/gobject-introspection-girepository.patch	\
@@ -586,10 +599,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/grub-gets-undeclared.patch		\
   %D%/packages/patches/grub-freetype.patch			\
   %D%/packages/patches/gsl-test-i686.patch			\
-  %D%/packages/patches/gst-plugins-good-fix-crashes.patch	\
-  %D%/packages/patches/gst-plugins-good-fix-invalid-read.patch	\
-  %D%/packages/patches/gst-plugins-good-fix-signedness.patch	\
-  %D%/packages/patches/gst-plugins-good-flic-bounds-check.patch	\
   %D%/packages/patches/guile-1.8-cpp-4.5.patch			\
   %D%/packages/patches/guile-arm-fixes.patch			\
   %D%/packages/patches/guile-default-utf8.patch			\
@@ -618,21 +627,22 @@ dist_patch_DATA =						\
   %D%/packages/patches/hdf-eos5-fortrantests.patch		\
   %D%/packages/patches/higan-remove-march-native-flag.patch	\
   %D%/packages/patches/hop-linker-flags.patch			\
+  %D%/packages/patches/httpd-CVE-2016-8740.patch			\
   %D%/packages/patches/hydra-disable-darcs-test.patch		\
   %D%/packages/patches/hypre-doc-tables.patch			\
   %D%/packages/patches/hypre-ldflags.patch			\
   %D%/packages/patches/icecat-avoid-bundled-libraries.patch	\
   %D%/packages/patches/icecat-binutils.patch			\
-  %D%/packages/patches/icecat-CVE-2016-9064.patch		\
   %D%/packages/patches/icu4c-CVE-2014-6585.patch		\
   %D%/packages/patches/icu4c-CVE-2015-1270.patch		\
   %D%/packages/patches/icu4c-CVE-2015-4760.patch		\
   %D%/packages/patches/id3lib-CVE-2007-4460.patch			\
   %D%/packages/patches/ilmbase-fix-tests.patch			\
-  %D%/packages/patches/inkscape-drop-wait-for-targets.patch	\
   %D%/packages/patches/isl-0.11.1-aarch64-support.patch	\
   %D%/packages/patches/jbig2dec-ignore-testtest.patch		\
   %D%/packages/patches/jq-CVE-2015-8863.patch			\
+  %D%/packages/patches/kdbusaddons-kinit-file-name.patch	\
+  %D%/packages/patches/khal-disable-failing-tests.patch		\
   %D%/packages/patches/khmer-use-libraries.patch                \
   %D%/packages/patches/kmod-module-directory.patch		\
   %D%/packages/patches/kobodeluxe-paths.patch			\
@@ -651,6 +661,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/libcanberra-sound-theme-freedesktop.patch \
   %D%/packages/patches/libcmis-fix-test-onedrive.patch		\
   %D%/packages/patches/libdrm-symbol-check.patch		\
+  %D%/packages/patches/libepoxy-gl-null-checks.patch		\
   %D%/packages/patches/libevent-dns-tests.patch			\
   %D%/packages/patches/libextractor-ffmpeg-3.patch		\
   %D%/packages/patches/libjxr-fix-function-signature.patch	\
@@ -662,12 +673,14 @@ dist_patch_DATA =						\
   %D%/packages/patches/libmad-armv7-thumb-pt2.patch		\
   %D%/packages/patches/libmad-frame-length.patch		\
   %D%/packages/patches/libmad-mips-newgcc.patch			\
+  %D%/packages/patches/libpng-CVE-2016-10087.patch		\
   %D%/packages/patches/libssh-0.6.5-CVE-2016-0739.patch		\
   %D%/packages/patches/libtar-CVE-2013-4420.patch \
   %D%/packages/patches/libtheora-config-guess.patch		\
   %D%/packages/patches/libtool-skip-tests2.patch		\
   %D%/packages/patches/libunwind-CVE-2015-3239.patch		\
   %D%/packages/patches/libupnp-CVE-2016-6255.patch		\
+  %D%/packages/patches/libupnp-CVE-2016-8863.patch		\
   %D%/packages/patches/libvpx-CVE-2016-2818.patch		\
   %D%/packages/patches/libwebp-CVE-2016-9085.patch		\
   %D%/packages/patches/libwmf-CAN-2004-0941.patch		\
@@ -682,6 +695,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/libwmf-CVE-2015-0848+CVE-2015-4588.patch	\
   %D%/packages/patches/libwmf-CVE-2015-4695.patch		\
   %D%/packages/patches/libwmf-CVE-2015-4696.patch		\
+  %D%/packages/patches/libxml2-CVE-2016-4658.patch		\
+  %D%/packages/patches/libxml2-CVE-2016-5131.patch		\
   %D%/packages/patches/libxslt-generated-ids.patch		\
   %D%/packages/patches/libxslt-CVE-2016-4738.patch		\
   %D%/packages/patches/linux-pam-no-setfsuid.patch		\
@@ -709,27 +724,19 @@ dist_patch_DATA =						\
   %D%/packages/patches/mesa-wayland-egl-symbols-check-mips.patch	\
   %D%/packages/patches/metabat-remove-compilation-date.patch	\
   %D%/packages/patches/mhash-keygen-test-segfault.patch		\
+  %D%/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch		\
   %D%/packages/patches/mpc123-initialize-ao.patch		\
   %D%/packages/patches/mplayer2-theora-fix.patch		\
   %D%/packages/patches/module-init-tools-moduledir.patch	\
+  %D%/packages/patches/multiqc-fix-git-subprocess-error.patch	\
   %D%/packages/patches/mumps-build-parallelism.patch		\
   %D%/packages/patches/mupdf-build-with-openjpeg-2.1.patch	\
-  %D%/packages/patches/mupdf-CVE-2016-6265.patch		\
-  %D%/packages/patches/mupdf-CVE-2016-6525.patch		\
-  %D%/packages/patches/mupdf-CVE-2016-7504.patch		\
-  %D%/packages/patches/mupdf-CVE-2016-7505.patch		\
-  %D%/packages/patches/mupdf-CVE-2016-7506.patch		\
-  %D%/packages/patches/mupdf-CVE-2016-7563.patch		\
-  %D%/packages/patches/mupdf-CVE-2016-7564.patch		\
-  %D%/packages/patches/mupdf-CVE-2016-8674.patch		\
-  %D%/packages/patches/mupdf-CVE-2016-9017.patch		\
-  %D%/packages/patches/mupdf-CVE-2016-9136.patch		\
   %D%/packages/patches/mupen64plus-ui-console-notice.patch	\
   %D%/packages/patches/musl-CVE-2016-8859.patch			\
   %D%/packages/patches/mutt-store-references.patch		\
-  %D%/packages/patches/nasm-no-ps-pdf.patch			\
   %D%/packages/patches/net-tools-bitrot.patch			\
-  %D%/packages/patches/netcdf-config-date.patch			\
+  %D%/packages/patches/netcdf-date-time.patch			\
+  %D%/packages/patches/netcdf-tst_h_par.patch			\
   %D%/packages/patches/netsurf-about.patch			\
   %D%/packages/patches/ngircd-handle-zombies.patch		\
   %D%/packages/patches/ngircd-no-dns-in-tests.patch		\
@@ -740,17 +747,18 @@ dist_patch_DATA =						\
   %D%/packages/patches/nvi-assume-preserve-path.patch		\
   %D%/packages/patches/nvi-dbpagesize-binpower.patch		\
   %D%/packages/patches/nvi-db4.patch				\
+  %D%/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch	\
+  %D%/packages/patches/ocaml-bitstring-fix-configure.patch \
   %D%/packages/patches/ocaml-CVE-2015-8869.patch		\
+  %D%/packages/patches/ocaml-Add-a-.file-directive.patch	\
   %D%/packages/patches/ocaml-findlib-make-install.patch	\
   %D%/packages/patches/ola-readdir-r.patch			\
-  %D%/packages/patches/onionshare-fix-install-paths.patch		\
   %D%/packages/patches/openexr-missing-samples.patch		\
-  %D%/packages/patches/openjpeg-CVE-2015-6581.patch		\
   %D%/packages/patches/openjpeg-CVE-2016-5157.patch		\
   %D%/packages/patches/openjpeg-CVE-2016-7163.patch		\
+  %D%/packages/patches/openjpeg-CVE-2016-9850-CVE-2016-9851.patch		\
   %D%/packages/patches/openjpeg-use-after-free-fix.patch	\
   %D%/packages/patches/openocd-nrf52.patch			\
-  %D%/packages/patches/openssh-memory-exhaustion.patch		\
   %D%/packages/patches/openssl-runpath.patch			\
   %D%/packages/patches/openssl-1.1.0-c-rehash-in.patch		\
   %D%/packages/patches/openssl-c-rehash-in.patch		\
@@ -801,43 +809,41 @@ dist_patch_DATA =						\
   %D%/packages/patches/pyqt-configure.patch			\
   %D%/packages/patches/python-2-deterministic-build-info.patch	\
   %D%/packages/patches/python-2.7-search-paths.patch		\
+  %D%/packages/patches/python-2.7-site-prefixes.patch		\
   %D%/packages/patches/python-2.7-source-date-epoch.patch	\
   %D%/packages/patches/python-3-deterministic-build-info.patch	\
   %D%/packages/patches/python-3-search-paths.patch		\
   %D%/packages/patches/python-3.4-fix-tests.patch		\
   %D%/packages/patches/python-3.5-fix-tests.patch		\
-  %D%/packages/patches/python-dendropy-exclude-failing-tests.patch \
   %D%/packages/patches/python-file-double-encoding-bug.patch	\
   %D%/packages/patches/python-fix-tests.patch			\
   %D%/packages/patches/python-parse-too-many-fields.patch	\
-  %D%/packages/patches/python-rarfile-fix-tests.patch		\
   %D%/packages/patches/python2-rdflib-drop-sparqlwrapper.patch	\
   %D%/packages/patches/python-statsmodels-fix-tests.patch	\
   %D%/packages/patches/python-configobj-setuptools.patch	\
   %D%/packages/patches/python-paste-remove-website-test.patch	\
   %D%/packages/patches/python-paste-remove-timing-test.patch	\
+  %D%/packages/patches/python-pycrypto-CVE-2013-7459.patch	\
   %D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \
-  %D%/packages/patches/qemu-CVE-2016-8576.patch			\
-  %D%/packages/patches/qemu-CVE-2016-8577.patch			\
-  %D%/packages/patches/qemu-CVE-2016-8578.patch			\
   %D%/packages/patches/qt4-ldflags.patch			\
   %D%/packages/patches/quickswitch-fix-dmenu-check.patch	\
   %D%/packages/patches/rapicorn-isnan.patch			\
   %D%/packages/patches/ratpoison-shell.patch			\
   %D%/packages/patches/readline-link-ncurses.patch		\
   %D%/packages/patches/readline-6.2-CVE-2014-2524.patch		\
+  %D%/packages/patches/readline-7.0-mingw.patch			\
   %D%/packages/patches/ripperx-missing-file.patch		\
   %D%/packages/patches/rpm-CVE-2014-8118.patch			\
   %D%/packages/patches/rsem-makefile.patch			\
   %D%/packages/patches/ruby-concurrent-ignore-broken-test.patch	\
   %D%/packages/patches/ruby-puma-ignore-broken-test.patch       \
   %D%/packages/patches/ruby-rack-ignore-failing-test.patch      \
-  %D%/packages/patches/ruby-symlinkfix.patch                    \
   %D%/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch\
   %D%/packages/patches/ruby-yard-fix-skip-of-markdown-tests.patch \
   %D%/packages/patches/scheme48-tests.patch			\
   %D%/packages/patches/scotch-test-threading.patch		\
   %D%/packages/patches/sdl-libx11-1.6.patch			\
+  %D%/packages/patches/seq24-rename-mutex.patch			\
   %D%/packages/patches/serf-comment-style-fix.patch		\
   %D%/packages/patches/serf-deflate-buckets-test-fix.patch	\
   %D%/packages/patches/slim-session.patch			\
@@ -845,7 +851,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/slim-sigusr1.patch			\
   %D%/packages/patches/slim-reset.patch				\
   %D%/packages/patches/slim-login.patch				\
-  %D%/packages/patches/slock-CVE-2016-6866.patch		\
   %D%/packages/patches/slurm-configure-remove-nonfree-contribs.patch \
   %D%/packages/patches/soprano-find-clucene.patch		\
   %D%/packages/patches/steghide-fixes.patch			\
@@ -862,6 +867,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/tclxml-3.2-install.patch			\
   %D%/packages/patches/tcsh-do-not-define-BSDWAIT.patch		\
   %D%/packages/patches/tcsh-fix-autotest.patch			\
+  %D%/packages/patches/tcsh-fix-out-of-bounds-read.patch	\
   %D%/packages/patches/teensy-loader-cli-help.patch		\
   %D%/packages/patches/texi2html-document-encoding.patch	\
   %D%/packages/patches/texi2html-i18n.patch			\
@@ -873,6 +879,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/tophat-build-with-later-seqan.patch	\
   %D%/packages/patches/totem-debug-format-fix.patch		\
   %D%/packages/patches/tuxpaint-stamps-path.patch		\
+  %D%/packages/patches/unrtf-CVE-2016-10091.patch		\
   %D%/packages/patches/unzip-CVE-2014-8139.patch		\
   %D%/packages/patches/unzip-CVE-2014-8140.patch		\
   %D%/packages/patches/unzip-CVE-2014-8141.patch		\
@@ -895,7 +902,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/vpnc-script.patch			\
   %D%/packages/patches/vte-CVE-2012-2738-pt1.patch			\
   %D%/packages/patches/vte-CVE-2012-2738-pt2.patch			\
-  %D%/packages/patches/vtk-mesa-10.patch			\
   %D%/packages/patches/weechat-python.patch			\
   %D%/packages/patches/wicd-bitrate-none-fix.patch		\
   %D%/packages/patches/wicd-get-selected-profile-fix.patch	\
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 88d9cdc21b..9e912a9543 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -9,7 +9,7 @@
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016 Pjotr Prins <pjotr.guix@thebird.nl>
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Peter Feigl <peter.feigl@nexoid.at>
 ;;; Copyright © 2016 John J. Foerch <jjfoerch@earthlink.net>
 ;;; Coypright © 2016 ng0 <ng0@we.make.ritual.n0.is>
@@ -144,14 +144,14 @@ and provides a \"top-like\" mode (monitoring).")
 (define-public shepherd
   (package
     (name "shepherd")
-    (version "0.3.1")
+    (version "0.3.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "ftp://alpha.gnu.org/gnu/dmd/shepherd-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0f3yi3n4sl9myiay95yhv2a9an338qddfjrbv7da753ip66dkfz6"))))
+                "174q1qg7yg6w1hfvlfv720hr6hid4h5xzw15y3ycfpspllzldhcb"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags '("--localstatedir=/var")))
@@ -164,7 +164,8 @@ the execution of system services, replacing similar functionality found in
 typical init systems.  It provides dependency-handling through a convenient
 interface and is based on GNU Guile.")
     (license license:gpl3+)
-    (home-page "http://www.gnu.org/software/shepherd/")))
+    (home-page "https://www.gnu.org/software/shepherd/")
+    (properties '((ftp-server . "alpha.gnu.org")))))
 
 (define-public dfc
   (package
@@ -364,7 +365,7 @@ login, passwd, su, groupadd, and useradd.")
        #:tests? #f))                              ; no tests
     (inputs `(("shadow" ,shadow)))
 
-    (home-page "http://sourceforge.net/projects/mingetty")
+    (home-page "https://sourceforge.net/projects/mingetty")
     (synopsis "Getty for the text console")
     (description
      "Small console getty that is started on the Linux text console,
@@ -719,7 +720,7 @@ by bandwidth they use.")
              `("PERL5LIB" ":" prefix (,x11-inc ,tk-inc)))))
         %standard-phases)))
     ;; The clusterssh.sourceforge.net address requires login to view
-    (home-page "http://sourceforge.net/projects/clusterssh/")
+    (home-page "https://sourceforge.net/projects/clusterssh/")
     (synopsis "Secure concurrent multi-server terminal control")
     (description
      "ClusterSSH controls a number of xterm windows via a single graphical
@@ -792,7 +793,7 @@ system administrator.")
 (define-public sudo
   (package
     (name "sudo")
-    (version "1.8.17p1")
+    (version "1.8.19p1")
     (source (origin
               (method url-fetch)
               (uri
@@ -802,7 +803,7 @@ system administrator.")
                                     version ".tar.gz")))
               (sha256
                (base32
-                "1k2mn65l1kmsxm8wh0gjxy496xhbpiimbpm6yv6kw6snzc3xg466"))))
+                "14pwdwl03kdbbyjkvxrfx409x3c1fjqz8aqz2wgwddinhz7v3bxq"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags
@@ -1335,8 +1336,6 @@ specified directories.")
                 (("/usr") out)
                 (("distro_ver = .*") "distro_ver = ''"))
               #t))))))
-   (inputs
-    `(("python-setuptools" ,python2-setuptools)))
    (home-page "https://github.com/shawn-sterling/graphios")
    (synopsis "Emit Nagios metrics to Graphite, Statsd, and Librato")
    (description
@@ -1359,8 +1358,7 @@ of supported upstream metrics systems simultaneously.")
          "1bfc2xiplpad6f2nwi48y0kps7xqnsll85dlz63cy8k5bysl6d20"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python2-setuptools" ,python2-setuptools)
-       ("python2-pycrypto" ,python2-pycrypto)
+     `(("python2-pycrypto" ,python2-pycrypto)
        ("python2-httplib2" ,python2-httplib2)
        ("python2-passlib" ,python2-passlib)
        ("python2-nose" ,python2-nose)
@@ -1573,14 +1571,14 @@ done with the @code{auditctl} utility.")
 (define-public nmap
   (package
     (name "nmap")
-    (version "7.31")
+    (version "7.40")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://nmap.org/dist/nmap-" version
                                   ".tar.bz2"))
               (sha256
                (base32
-                "0hiqb28950kn4bjsmw0ksfyss7j2qdmgrj3xsjf7073pq01lx7yb"))
+                "121i9mgyc28ra2825akd0ix5qyssv4xc2qlx296mam6hzxgnc54y"))
               (modules '((guix build utils)))
               (snippet
                '(map delete-file-recursively
@@ -1702,13 +1700,15 @@ throughput (in the same interval).")
                (base32
                 "04q2cn8c83f6z6wn1scla1ilrpi5ssjc64987hvmwfvwvb82bvkp"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (inputs
      `(("python-colorama" ,python-colorama)
        ("python-decorator" ,python-decorator)
        ("python-psutil" ,python-psutil)
        ("python-six" ,python-six)))
+    (inputs
+     ;; Requires setuptools >= 17.1 due to some features used, while our
+     ;; python currently only includes 12.0. TODO: Remove this input.
+     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/nvbn/thefuck")
     (synopsis "Correct mistyped console command")
     (description
@@ -1868,14 +1868,14 @@ Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.")
 (define-public sunxi-tools
   (package
     (name "sunxi-tools")
-    (version "1.4.1")
+    (version "1.4.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/linux-sunxi/"
                            "sunxi-tools/archive/v" version ".tar.gz"))
        (sha256
-        (base32 "06qd2b4dlzbmzfy4q9n8v5rkkbmgcfdbv4nkkcp4nysi10k7cpfs"))
+        (base32 "08iqwj95qw2s7ilhrdi2lkbc8dx64zk5lzz1qk587jr0lla81x41"))
        (modules '((guix build utils)))
        (snippet
         ;; Remove binaries contained in the tarball which are only for the
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 76f385e340..d09e2e83b2 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
@@ -544,7 +544,8 @@ a C program.")
                "1kwbx92ps0r7s2mqy7lxbxanslxdzj7dp7r7gmdkzv1j8yqf3kwf"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:configure-flags '("--enable-shared" "--enable-openmp")
+     '(#:configure-flags
+       '("--enable-shared" "--enable-openmp" "--enable-threads")
        #:phases (alist-cons-before
                  'build 'no-native
                  (lambda _
@@ -576,6 +577,23 @@ cosine/ sine transforms or DCT/DST).")
      (string-append (package-description fftw)
                     "  Single-precision version."))))
 
+(define (pthread-variant p)
+  (package
+    (inherit p)
+    (name (string-append (package-name p) "-pthreads"))
+    (arguments
+     (substitute-keyword-arguments (package-arguments fftw)
+       ((#:configure-flags flags)
+        `(cons "--enable-threads" ,flags))))))
+
+;; FIXME: These packages are used temporarily by packages like Ardour until
+;; "--enable-flags" is added to the fftw and fftwf packages.
+(define-public fftw-with-threads
+  (pthread-variant fftw))
+
+(define-public fftwf-with-threads
+  (pthread-variant fftwf))
+
 (define-public fftw-openmpi
   (package (inherit fftw)
     (name "fftw-openmpi")
diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm
index b3ca380533..188e91d1e1 100644
--- a/gnu/packages/aspell.scm
+++ b/gnu/packages/aspell.scm
@@ -3,6 +3,8 @@
 ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Christopher Andersson <christopher@8bits.nu>
+;;; Copyright © 2016 Theodoros Foradis <theodoros.for@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -64,7 +66,8 @@ dictionaries, including personal ones.")
 ;;;
 ;;; Dictionaries.
 ;;;
-;;; Use 'export ASPELL_CONF="dict-dir $HOME/.guix-profile/lib/aspell"' to use them.
+;;; Use 'export ASPELL_CONF="dict-dir $HOME/.guix-profile/lib/aspell"' to use
+;;; them.
 ;;;
 
 (define* (aspell-dictionary dict-name full-name
@@ -80,16 +83,17 @@ dictionaries, including personal ones.")
               (sha256 sha256)))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases (alist-replace
-                 'configure
-                 (lambda* (#:key outputs #:allow-other-keys)
-                   (let ((out (assoc-ref outputs "out")))
-                     (zero? (system* "./configure"))))
-                 %standard-phases)
-                #:make-flags (let ((out (assoc-ref %outputs "out")))
-                               (list (string-append "dictdir=" out "/lib/aspell")
-                                     (string-append "datadir=" out "/lib/aspell")))
-                #:tests? #f))
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (zero? (system* "./configure"))))))
+       #:make-flags
+       (let ((out (assoc-ref %outputs "out")))
+         (list (string-append "dictdir=" out "/lib/aspell")
+               (string-append "datadir=" out "/lib/aspell")))
+       #:tests? #f))
     (native-inputs `(("aspell" ,aspell)
                      ("which" ,which)))
     (synopsis (string-append full-name " dictionary for GNU Aspell")) ; XXX: i18n
@@ -108,10 +112,10 @@ dictionaries, including personal ones.")
 
 (define-public aspell-dict-en
   (aspell-dictionary "en" "English"
-                     #:version "2016.01.19-0"
+                     #:version "2016.11.20-0"
                      #:sha256
                      (base32
-                      "01h4cl4lngp6mcfbyb47cjrc2gspyg2519dvknd97ki896nx7vcn")))
+                      "1496jnhh2jvhkzcj0p4vy89bcs4g5wz6a76m33vw4dhchn5xm9jw")))
 
 (define-public aspell-dict-eo
   (aspell-dictionary "eo" "Esperanto"
@@ -163,3 +167,26 @@ dictionaries, including personal ones.")
                      #:sha256
                      (base32
                       "13bhbghx5b8g0119g3wxd4n8mlf707y41vlf59irxjj0kynankfn")))
+
+(define-public aspell-dict-sv
+  (aspell-dictionary "sv" "Swedish"
+                     #:version "0.51-0"
+                     #:prefix "aspell-"
+                     #:sha256
+                     (base32
+                      "02jwkjhr32kvyibnyzgx3smbnm576jwdzg3avdf6zxwckhy5fw4v")))
+
+(define-public aspell-dict-el
+  (aspell-dictionary "el" "Greek"
+                     #:version "0.08-0"
+                     #:prefix "aspell6-"
+                     #:sha256
+                     (base32
+                      "1ljcc30zg2v2h3w5h5jr5im41mw8jbsgvvhdd2cii2yzi8d0zxja")))
+
+(define-public aspell-dict-grc
+  (aspell-dictionary "grc" "Ancient Greek"
+                     #:version "0.02-0"
+                     #:sha256
+                     (base32
+                      "1zxr8958v37v260fkqd4pg37ns5h5kyqm54hn1hg70wq5cz8h512")))
diff --git a/gnu/packages/assembly.scm b/gnu/packages/assembly.scm
index 29ccf1f08a..fbc5cdd16f 100644
--- a/gnu/packages/assembly.scm
+++ b/gnu/packages/assembly.scm
@@ -34,24 +34,32 @@
 (define-public nasm
   (package
     (name "nasm")
-    (version "2.12.01")
+    (version "2.12.02")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://www.nasm.us/pub/nasm/releasebuilds/"
                                   version "/" name "-" version ".tar.xz"))
               (sha256
                (base32
-                "12bl6vc5sjp9nnhf0iwy6l27vq783y0rxrjpp8sy84h5cb7a3fwx"))
-              (patches (search-patches "nasm-no-ps-pdf.patch"))))
+                "08a3ah791cl7xdyrlz33mwv4xzs08rxh0p902p3ypi5iq1h6p1jc"))))
     (build-system gnu-build-system)
     (native-inputs `(("perl" ,perl)  ;for doc and test target
                      ("texinfo" ,texinfo)))
     (arguments
      `(#:test-target "test"
-       #:phases (modify-phases %standard-phases
-                  (add-after 'install 'install-info
-                    (lambda _
-                      (zero? (system* "make" "install_doc")))))))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'dont-build-ps-pdf-outputs
+           (lambda _
+             (substitute* "doc/Makefile.in"
+               (("info html nasmdoc.txt nasmdoc.ps nasmdoc.pdf")
+                "info html nasmdoc.txt")
+               (("nasmdoc.ps nasmdoc.pdf nasmdoc.txt \\$\\(INSTALLROOT\\)\\$\\(docdir\\)")
+                "nasmdoc.txt $(INSTALLROOT)$(docdir)"))
+             #t))
+         (add-after 'install 'install-info
+           (lambda _
+             (zero? (system* "make" "install_doc")))))))
     (home-page "http://www.nasm.us/")
     (synopsis "80x86 and x86-64 assembler")
     (description
@@ -62,7 +70,6 @@ Windows32 and Windows64.  It will also output plain binary files.  Its syntax
 is designed to be simple and easy to understand, similar to Intel's but less
 complex.  It supports all currently known x86 architectural extensions, and
 has strong support for macros.")
-    (supported-systems '("x86_64-linux" "i686-linux"))
     (license license:bsd-3)))
 
 (define-public yasm
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index b535448af1..f0a6a54de7 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -5,7 +5,7 @@
 ;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2015, 2016 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
+;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -186,7 +186,7 @@ streams from live audio.")
 (define-public ardour
   (package
     (name "ardour")
-    (version "5.4")
+    (version "5.5")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -196,14 +196,14 @@ streams from live audio.")
                ;; Ardour expects this file to exist at build time.  The revision
                ;; is the output of
                ;;    git describe HEAD | sed 's/^[A-Za-z]*+//'
-               '(call-with-output-file
+               `(call-with-output-file
                     "libs/ardour/revision.cc"
                   (lambda (port)
-                    (format port "#include \"ardour/revision.h\"
-namespace ARDOUR { const char* revision = \"5.4\" ; }"))))
+                    (format port ,(string-append "#include \"ardour/revision.h\"
+namespace ARDOUR { const char* revision = \"" version "\" ; }")))))
               (sha256
                (base32
-                "1yrg0d86k9fqw7lmzjglilbadb4cjqxqkf6ii4bjs6rihj6b0qrf"))
+                "1a3whv2dhl073pkd803hcp53rdmm31adjwn40qi06lkjb7rgwrlh"))
               (file-name (string-append name "-" version))))
     (build-system waf-build-system)
     (arguments
@@ -238,8 +238,8 @@ namespace ARDOUR { const char* revision = \"5.4\" ; }"))))
        ("lv2" ,lv2)
        ("vamp" ,vamp)
        ("curl" ,curl)
-       ("fftw" ,fftw)
-       ("fftwf" ,fftwf)
+       ("fftw" ,fftw-with-threads)
+       ("fftwf" ,fftwf-with-threads)
        ("jack" ,jack-1)
        ("serd" ,serd)
        ("sord" ,sord)
@@ -1448,7 +1448,7 @@ connections between them.")
     (build-system gnu-build-system)
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs `(("libsndfile" ,libsndfile)))
-    (home-page "http://sourceforge.net/projects/bs2b/")
+    (home-page "https://sourceforge.net/projects/bs2b/")
     (synopsis "Bauer stereophonic-to-binaural DSP")
     (description
      "The Bauer stereophonic-to-binaural DSP (bs2b) library and plugins is
@@ -1493,9 +1493,10 @@ implementation of the Open Sound Control (OSC) protocol.")
                "13vry6xhxm7adnbyj28w1kpwrh0kf7nw83cz1yq74wl21faz2rzw"))))
     (build-system python-build-system)
     (arguments `(#:tests? #f)) ;no tests
+    (native-inputs
+     `(("python-cython" ,python-cython)))
     (inputs
-     `(("python-cython" ,python-cython)
-       ("liblo" ,liblo)))
+     `(("liblo" ,liblo)))
     (home-page "http://das.nasophon.de/pyliblo/")
     (synopsis "Python bindings for liblo")
     (description
@@ -1551,15 +1552,14 @@ significantly faster and have minimal dependencies.")
 (define-public lv2
   (package
     (name "lv2")
-    (version "1.12.0")
+    (version "1.14.0")
     (source (origin
              (method url-fetch)
              (uri (string-append "http://lv2plug.in/spec/lv2-"
-                                 version
-                                 ".tar.bz2"))
+                                 version ".tar.bz2"))
              (sha256
               (base32
-               "1saq0vwqy5zjdkgc5ahs8kcabxfmff2mmg68fiqrkv8hiw9m6jks"))))
+               "0chxwys3vnn3nxc9x2vchm74s9sx0vfra6y893byy12ci61jc1dq"))))
     (build-system waf-build-system)
     (arguments
      `(#:tests? #f  ; no check target
@@ -1653,9 +1653,16 @@ software.")
                      (setenv "LDFLAGS"
                              (string-append
                               "-L" (assoc-ref inputs "boost") "/lib "
-                              "-lboost_system")))))))
+                              "-lboost_system"))
+                     ;; Needed for gtkmm
+                     (substitute* '("src/wscript_build"
+                                    "examples/wscript_build")
+                       (("cxxflags.*= \\[" line)
+                        (string-append line "\"-std=c++11\", ")))
+                     #t)))))
     (inputs
      `(("boost" ,boost)
+       ("gtkmm" ,gtkmm-2)
        ("lv2" ,lv2)))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -1798,6 +1805,23 @@ and ALSA.")
 aimed at audio/musical applications.")
     (license license:gpl2+)))
 
+(define-public raul-devel
+  (let ((commit "f8bf77d3c3b77830aedafb9ebb5cdadfea7ed07a")
+        (revision "1"))
+    (package (inherit raul)
+      (name "raul")
+      (version (string-append "0.8.4-" revision "."
+                              (string-take commit 9)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "http://git.drobilla.net/raul.git")
+                      (commit commit)))
+                (file-name (string-append name "-" version "-checkout"))
+                (sha256
+                 (base32
+                  "1lby508fb0n8ks6iz959sh18fc37br39d6pbapwvbcw5nckdrxwj")))))))
+
 (define-public rubberband
   (package
     (name "rubberband")
@@ -2255,7 +2279,7 @@ can play and record audio files.")
         (base32 "1hmadwqfpg15vhwq9pa1sl5xslibrjpk6hpq2s9hfmx1s5l6ihfw"))))
     (build-system cmake-build-system)
     (arguments '(#:tests? #f))          ;no 'check' target
-    (home-page "http://sourceforge.net/p/soxr/wiki/Home/")
+    (home-page "https://sourceforge.net/p/soxr/wiki/Home/")
     (synopsis "One-dimensional sample-rate conversion library")
     (description
      "The SoX Resampler library (libsoxr) performs one-dimensional sample-rate
@@ -2675,7 +2699,7 @@ with support for HD extensions.")
 (define-public bs1770gain
   (package
     (name "bs1770gain")
-    (version "0.4.11")
+    (version "0.4.12")
     (source
      (origin
        (method url-fetch)
@@ -2683,7 +2707,7 @@ with support for HD extensions.")
                            version "/bs1770gain-" version ".tar.gz"))
        (sha256
         (base32
-         "0j765drdb7h3y5ipjv9sg1a0if6zh8cksbv3rdk5ppd7kxcrjnlb"))))
+         "0n9skdap1vnl6w52fx0gsrjlk7w3xgdwi62ycyf96h29rx059z6a"))))
     (build-system gnu-build-system)
     (inputs `(("ffmpeg" ,ffmpeg)
               ("sox" ,sox)))
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index d127769986..8308616a1f 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
 ;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -66,8 +67,7 @@
                                "duplicity-test_selection-tmp.patch"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python2-setuptools" ,python2-setuptools)
-       ("util-linux" ,util-linux)))     ;setsid command, for the tests
+     `(("util-linux" ,util-linux)))     ;setsid command, for the tests
     (inputs
      `(("python" ,python-2)
        ("librsync" ,librsync)
@@ -79,16 +79,17 @@
     (arguments
      `(#:python ,python-2               ;setup assumes Python 2
        #:test-target "test"
-       #:phases (alist-cons-before
-                 'check 'check-setup
-                 (lambda* (#:key inputs #:allow-other-keys)
-                   (substitute* "testing/functional/__init__.py"
-                     (("/bin/sh") (which "sh")))
-                   (setenv "HOME" (getcwd)) ;gpg needs to write to $HOME
-                   (setenv "TZDIR"          ;some timestamp checks need TZDIR
-                           (string-append (assoc-ref inputs "tzdata")
-                                          "/share/zoneinfo")))
-                 %standard-phases)))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'check-setup
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "testing/functional/__init__.py"
+               (("/bin/sh") (which "sh")))
+             (setenv "HOME" (getcwd)) ;gpg needs to write to $HOME
+             (setenv "TZDIR"          ;some timestamp checks need TZDIR
+                     (string-append (assoc-ref inputs "tzdata")
+                                    "/share/zoneinfo"))
+             #t)))))
     (home-page "http://duplicity.nongnu.org/index.html")
     (synopsis "Encrypted backup using rsync algorithm")
     (description
@@ -334,8 +335,6 @@ errors.")
         (base32
          "1nwmmh816f96h0ff1jxk95ad38ilbhbdl5dgibx1d4cl81dsi48d"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python2-setuptools" ,python2-setuptools)))
     (inputs
      `(("python" ,python-2)
        ("librsync" ,librsync)))
@@ -401,13 +400,13 @@ detection, and lossless compression.")
 (define-public borg
   (package
     (name "borg")
-    (version "1.0.8")
+    (version "1.0.9")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "borgbackup" version))
               (sha256
                (base32
-                "1fdfi0yzzdrrlml6780n4fh61sqm7pw6fcd1y67kfkvw8hy5c0k9"))
+                "1ciwp9yilcibk0x82y5nn8ps95jrm8rxvff8mjrlp7a2w100i1im"))
               (modules '((guix build utils)))
               (snippet
                '(for-each
@@ -433,20 +432,29 @@ detection, and lossless compression.")
          ;; The tests need to be run after Borg is installed.
          (delete 'check)
          (add-after 'install 'check
-           (lambda _
-             (zero?
-               (system* "py.test" "-v" "--pyargs" "borg.testsuite" "-k"
-                        (string-append
-                          ;; These tests need to write to '/var'.
-                          "not test_get_cache_dir "
-                          "and not test_get_keys_dir "
-                          ;; These tests assume there is a root user in
-                          ;; '/etc/passwd'.
-                          "and not test_access_acl "
-                          "and not test_default_acl "
-                          "and not test_non_ascii_acl "
-                          ;; This test needs the unpackaged pytest-benchmark.
-                          "and not benchmark")))))
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             ;; Make the installed package available for the test suite.
+             (add-installed-pythonpath inputs outputs)
+             ;; The tests should be run in an empty directory.
+             (mkdir-p "tests")
+             (with-directory-excursion "tests"
+               (zero?
+                 (system* "py.test" "-v" "--pyargs" "borg.testsuite" "-k"
+                          (string-append
+                            ;; These tests need to write to '/var'.
+                            "not test_get_cache_dir "
+                            "and not test_get_keys_dir "
+                            "and not test_get_security_dir "
+                            ;; These tests assume there is a root user in
+                            ;; '/etc/passwd'.
+                            "and not test_access_acl "
+                            "and not test_default_acl "
+                            "and not test_non_ascii_acl "
+                            ;; This test needs the unpackaged pytest-benchmark.
+                            "and not benchmark "
+                            ;; These tests assume the kernel supports FUSE.
+                            "and not test_fuse "
+                            "and not test_fuse_allow_damaged_files"))))))
          (add-after 'install 'install-doc
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
@@ -532,3 +540,37 @@ changes are stored.")
     (home-page "https://attic-backup.org/")
     (license license:bsd-3)
     (properties `((superseded . ,borg)))))
+
+(define-public wimlib
+  (package
+    (name "wimlib")
+    (version "1.10.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://wimlib.net/downloads/"
+                                  name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0mbz03smlc054i2m9q2sbqymml9m897kfs84q7g81i26y811p6wq"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("fuse" ,fuse)
+       ("libxml2" ,libxml2)
+       ("ntfs-3g" ,ntfs-3g)
+       ("openssl" ,openssl)))
+    (arguments
+     `(#:configure-flags (list "--enable-test-support")))
+    (home-page "https://wimlib.net/")
+    (synopsis "WIM file manipulation library and utilities")
+    (description "wimlib is a C library and set of command-line utilities for
+creating, modifying, extracting, and mounting archives in the Windows Imaging
+Format (@dfn{WIM files}).  It can capture and apply WIMs directly from and to
+NTFS volumes using @code{ntfs-3g}, preserving NTFS-specific attributes.")
+    ;; wimlib is dual-licenced under version 3 or later of either the GPL or
+    ;; LGPL, except those files explicitly marked as being released into the
+    ;; public domain (CC0) in their headers.
+    (license (list license:gpl3+
+                   license:lgpl3+
+                   license:cc0))))
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 66c5e0cdcb..93b598f808 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -46,7 +46,8 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (ice-9 match)
-  #:export (glibc))
+  #:export (glibc
+            libiconv-if-needed))
 
 ;;; Commentary:
 ;;;
@@ -681,14 +682,14 @@ with the Linux kernel.")
   ;; The Hurd's libc variant.
   (package (inherit glibc/linux)
     (name "glibc-hurd")
-    (version "2.19")
+    (version "2.23")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://alpha.gnu.org/gnu/hurd/glibc-"
-                                  version "-hurd+libpthread-20160518" ".tar.gz"))
+                                  version "-hurd+libpthread-20161218" ".tar.gz"))
               (sha256
                (base32
-                "12zmdjviybpsdb2kq4cg98rds7909f0cc96fzdahdfrzlxx1q0px"))))
+                "0vpdv05j6j3ria5bw8gp468i64gij94cslxkxj9xkfgi6p615b8p"))))
 
     ;; Libc provides <hurd.h>, which includes a bunch of Hurd and Mach headers,
     ;; so both should be propagated.
@@ -738,6 +739,9 @@ with the Linux kernel.")
                        ;; We need this to get a working openpty() function.
                        "--enable-pt_chown"
 
+                       ;; <https://lists.gnu.org/archive/html/bug-hurd/2016-10/msg00033.html>
+                       "--disable-werror"
+
                        ;; nscd fails to build for GNU/Hurd:
                        ;; <https://lists.gnu.org/archive/html/bug-hurd/2014-07/msg00006.html>.
                        ;; Disable it.
@@ -956,15 +960,15 @@ command.")
 (define-public tzdata
   (package
     (name "tzdata")
-    (version "2016g")
+    (version "2016j")
     (source (origin
              (method url-fetch)
              (uri (string-append
-                   "http://www.iana.org/time-zones/repository/releases/tzdata"
+                   "https://www.iana.org/time-zones/repository/releases/tzdata"
                    version ".tar.gz"))
              (sha256
               (base32
-               "1lgbh49bsbysibzr7imjsh1xa7pqmimphxvvwh6kncj7pjr3fw9w"))))
+               "1j4xycpwhs57qnkcxwh3np8wnf3km69n3cf4w6p2yv2z247lxvpm"))))
     (build-system gnu-build-system)
     (arguments
      '(#:tests? #f
@@ -1012,8 +1016,8 @@ command.")
                                 version ".tar.gz"))
                           (sha256
                            (base32
-                            "0azsz436vd65bkdkdmjgsh7zhh0whnqqfliva45191krmm3hpy8z"))))))
-    (home-page "http://www.iana.org/time-zones")
+                            "1dxhrk4z0n2di8p0yd6q00pa6bwyz5xqbrfbasiz8785ni7zrvxr"))))))
+    (home-page "https://www.iana.org/time-zones")
     (synopsis "Database of current and historical time zones")
     (description "The Time Zone Database (often called tz or zoneinfo)
 contains code and data that represent the history of local time for many
@@ -1049,6 +1053,16 @@ program.  It supports a wide variety of different encodings.")
     (home-page "http://www.gnu.org/software/libiconv/")
     (license lgpl3+)))
 
+(define* (libiconv-if-needed #:optional (target (%current-target-system)))
+  "Return either a libiconv package specification to include in a dependency
+list for platforms that have an incomplete libc, or the empty list.  If a
+package needs iconv ,@(libiconv-if-needed) should be added."
+  ;; POSIX C libraries provide iconv.  Platforms with an incomplete libc
+  ;; without iconv, such as MinGW, must return the then clause.
+  (if (target-mingw? target)
+      `(("libiconv" ,libiconv))
+      '()))
+
 (define-public (canonical-package package)
   ;; Avoid circular dependency by lazily resolving 'commencement'.
   (let* ((iface (resolve-interface '(gnu packages commencement)))
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 8d2cb93c7c..14daf59c92 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -1,11 +1,12 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2014, 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015, 2016 Ben Woodcroft <donttrustben@gmail.com>
 ;;; Copyright © 2015, 2016 Pjotr Prins <pjotr.guix@thebird.nl>
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2016 Raoul Bonnal <ilpuccio.febo@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -50,6 +51,7 @@
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages datastructures)
   #:use-module (gnu packages file)
+  #:use-module (gnu packages flex)
   #:use-module (gnu packages gawk)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gd)
@@ -96,7 +98,7 @@
 (define-public aragorn
   (package
     (name "aragorn")
-    (version "1.2.37")
+    (version "1.2.38")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -104,7 +106,7 @@
                     version ".tgz"))
               (sha256
                (base32
-                "1c7zxk0h8wsjbix82fmmfyywcq6zn3q9h5y67kcl5y3qal2bv2xr"))))
+                "09i1rg716smlbnixfm7q1ml2mfpaa2fpn3hwjg625ysmfwwy712b"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ; there are no tests
@@ -215,8 +217,7 @@ structure of the predicted RNA.")
        ("libtool" ,libtool)
        ("zlib" ,zlib)
        ("python-nose" ,python2-nose)
-       ("python-pysam" ,python2-pysam)
-       ("python-setuptools" ,python2-setuptools)))
+       ("python-pysam" ,python2-pysam)))
     (inputs
      `(("htslib" ,htslib)
        ("samtools" ,samtools)
@@ -523,15 +524,14 @@ intended to behave exactly the same as the original BWK awk.")
     (build-system python-build-system)
     (arguments `(#:python ,python-2)) ; no Python 3 support
     (inputs
-     `(("python-cython" ,python2-cython)
-       ("python-matplotlib" ,python2-matplotlib)))
+     `(("python-matplotlib" ,python2-matplotlib)))
     (propagated-inputs
      `(("bedtools" ,bedtools)
        ("samtools" ,samtools)))
     (native-inputs
-     `(("python-pyyaml" ,python2-pyyaml)
-       ("python-nose" ,python2-nose)
-       ("python-setuptools" ,python2-setuptools)))
+     `(("python-cython" ,python2-cython)
+       ("python-pyyaml" ,python2-pyyaml)
+       ("python-nose" ,python2-nose)))
     (home-page "https://pythonhosted.org/pybedtools/")
     (synopsis "Python wrapper for BEDtools programs")
     (description
@@ -586,9 +586,7 @@ e.g. microbiome samples, genomes, metagenomes.")
                (substitute* "setup.py"
                  (("install_requires.append\\(\"pyqi\"\\)") "pass"))
                #t)))
-         ,@(package-arguments base)))
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs base))))))
+         ,@(package-arguments base))))))
 
 (define-public bioperl-minimal
   (let* ((inputs `(("perl-module-build" ,perl-module-build)
@@ -673,7 +671,7 @@ provide a coordinated and extensible framework to do computational biology.")
          (add-before 'check 'set-home
            ;; Some tests require a home directory to be set.
            (lambda _ (setenv "HOME" "/tmp") #t)))))
-    (inputs
+    (propagated-inputs
      `(("python-numpy" ,python-numpy)))
     (home-page "http://biopython.org/")
     (synopsis "Tools for biological computation in Python")
@@ -684,15 +682,10 @@ bioinformatics programs; a standard sequence class and tools for performing
 common operations on them; code to perform data classification; code for
 dealing with alignments; code making it easy to split up parallelizable tasks
 into separate processes; and more.")
-    (license (license:non-copyleft "http://www.biopython.org/DIST/LICENSE"))
-    (properties `((python2-variant . ,(delay python2-biopython))))))
+    (license (license:non-copyleft "http://www.biopython.org/DIST/LICENSE"))))
 
 (define-public python2-biopython
-  (let ((base (package-with-python2 (strip-python2-variant python-biopython))))
-    (package
-      (inherit base)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs base))))))
+  (package-with-python2 python-biopython))
 
 ;; An outdated version of biopython is required for seqmagick, see
 ;; https://github.com/fhcrc/seqmagick/issues/59
@@ -1104,7 +1097,7 @@ confidence to have in an alignment.")
        ("pigz" ,pigz)
        ("zlib" ,zlib)))
     (supported-systems '("x86_64-linux"))
-    (home-page "http://sourceforge.net/p/bless-ec/wiki/Home/")
+    (home-page "https://sourceforge.net/p/bless-ec/wiki/Home/")
     (synopsis "Bloom-filter-based error correction tool for NGS reads")
     (description
      "@dfn{Bloom-filter-based error correction solution for high-throughput
@@ -1339,8 +1332,7 @@ well as many of the command line options.")
      `(("python-numpy" ,python2-numpy)
        ("zlib" ,zlib)))
     (native-inputs
-     `(("python-nose" ,python2-nose)
-       ("python-setuptools" ,python2-setuptools)))
+     `(("python-nose" ,python2-nose)))
     (home-page "http://bitbucket.org/james_taylor/bx-python/")
     (synopsis "Tools for manipulating biological data")
     (description
@@ -1404,7 +1396,6 @@ multiple sequence alignments.")
        ("zlib"              ,zlib)))
     (native-inputs
      `(("python-cython"     ,python-cython)
-       ("python-setuptools" ,python-setuptools)
        ;; Dependencies below are are for tests only.
        ("samtools"          ,samtools)
        ("bcftools"          ,bcftools)
@@ -1430,7 +1421,6 @@ also includes an interface for tabix.")
               (sha256
                (base32
                 "1q8wnj2kga9nz1lwc4w7qv52smfm536hp6mc8w6s53lhyj0mpi22"))))
-    (properties `((python2-variant . ,(delay python2-twobitreader))))
     (build-system python-build-system)
     (arguments
      '(;; Tests are not distributed in the PyPi release.
@@ -1447,11 +1437,7 @@ UCSC genome browser.")
     (license license:artistic2.0)))
 
 (define-public python2-twobitreader
-  (let ((base (package-with-python2 (strip-python2-variant python-twobitreader))))
-    (package
-      (inherit base)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs base))))))
+  (package-with-python2 python-twobitreader))
 
 (define-public python-plastid
   (package
@@ -1463,7 +1449,6 @@ UCSC genome browser.")
               (sha256
                (base32
                 "1sqkz5d3b9kf688mp7k771c87ins42j7j0whmkb49cb3fsg8s8lj"))))
-    (properties `((python2-variant . ,(delay python2-plastid))))
     (build-system python-build-system)
     (arguments
      ;; Some test files are not included.
@@ -1488,25 +1473,20 @@ high-throughput sequencing data – with an emphasis on simplicity.")
     (license license:bsd-3)))
 
 (define-public python2-plastid
-  (let ((base (package-with-python2 (strip-python2-variant python-plastid))))
-    (package
-      (inherit base)
-      ;; setuptools is required at runtime
-      (propagated-inputs `(("python2-setuptools" ,python2-setuptools)
-                           ,@(package-propagated-inputs base))))))
+  (package-with-python2 python-plastid))
 
 (define-public cd-hit
   (package
     (name "cd-hit")
-    (version "4.6.5")
+    (version "4.6.6")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/weizhongli/cdhit"
                                   "/releases/download/V" version
-                                  "/cd-hit-v" version "-2016-0304.tar.gz"))
+                                  "/cd-hit-v" version "-2016-0711.tar.gz"))
               (sha256
                (base32
-                "15db0hq38yyifwqx9b6l34z14jcq576dmjavhj8a426c18lvnhp3"))))
+                "1w8hd4fszgg29nqiz569fldwy012la77nljcmlhglgicws56z54p"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ; there are no tests
@@ -1580,9 +1560,8 @@ databases.")
        ("python-numpy" ,python2-numpy)
        ("python-scipy" ,python2-scipy)))
     (native-inputs
-     `(("python-mock" ,python2-mock) ; for tests
-       ("python-pytz" ,python2-pytz) ; for tests
-       ("python-setuptools" ,python2-setuptools)))
+     `(("python-mock" ,python2-mock)   ; for tests
+       ("python-pytz" ,python2-pytz))) ; for tests
     (home-page "https://github.com/YeoLab/clipper")
     (synopsis "CLIP peak enrichment recognition")
     (description
@@ -1755,8 +1734,7 @@ time.")
        ("zlib" ,zlib)))
     (native-inputs
      `(("python-cython" ,python2-cython)
-       ("python-nose" ,python2-nose)
-       ("python-setuptools" ,python2-setuptools)))
+       ("python-nose" ,python2-nose)))
     (home-page "http://crossmap.sourceforge.net/")
     (synopsis "Convert genome coordinates between assemblies")
     (description
@@ -1826,7 +1804,7 @@ preparation protocols.")
 (define-public cutadapt
   (package
     (name "cutadapt")
-    (version "1.8")
+    (version "1.12")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1835,28 +1813,30 @@ preparation protocols.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "161bp87y6gd6r5bmvjpn2b1k942i3fizfpa139f0jn6jv1wcp5h5"))))
+                "19smhh6444ikn4jlmyhvffw4m5aw7yg07rqsk7arg8dkwyga1i4v"))))
     (build-system python-build-system)
     (arguments
-     ;; tests must be run after install
-     `(#:phases (alist-cons-after
-                 'install 'check
-                 (lambda* (#:key inputs outputs #:allow-other-keys)
-                   (setenv "PYTHONPATH"
-                           (string-append
-                            (getenv "PYTHONPATH")
-                            ":" (assoc-ref outputs "out")
-                            "/lib/python"
-                            (string-take (string-take-right
-                                          (assoc-ref inputs "python") 5) 3)
-                            "/site-packages"))
-                   (zero? (system* "nosetests" "-P" "tests")))
-                 (alist-delete 'check %standard-phases))))
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; The tests must be run after installation.
+         (delete 'check)
+         (add-after 'install 'check
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (setenv "PYTHONPATH"
+                     (string-append
+                      (getenv "PYTHONPATH")
+                      ":" (assoc-ref outputs "out")
+                      "/lib/python"
+                      (string-take (string-take-right
+                                    (assoc-ref inputs "python") 5) 3)
+                      "/site-packages"))
+             (zero? (system* "nosetests" "-P" "tests")))))))
+    (inputs
+     `(("python-xopen" ,python-xopen)))
     (native-inputs
      `(("python-cython" ,python-cython)
-       ("python-nose" ,python-nose)
-       ("python-setuptools" ,python-setuptools)))
-    (home-page "https://code.google.com/p/cutadapt/")
+       ("python-nose" ,python-nose)))
+    (home-page "https://cutadapt.readthedocs.io/en/stable/")
     (synopsis "Remove adapter sequences from nucleotide sequencing reads")
     (description
      "Cutadapt finds and removes adapter sequences, primers, poly-A tails and
@@ -1945,27 +1925,19 @@ accessing bigWig files.")
     (license license:expat)))
 
 (define-public python2-pybigwig
-  (let ((pybigwig (package-with-python2 python-pybigwig)))
-    (package (inherit pybigwig)
-      (native-inputs
-       `(("python-setuptools" ,python2-setuptools))))))
+  (package-with-python2 python-pybigwig))
 
 (define-public python-dendropy
   (package
     (name "python-dendropy")
-    (version "4.1.0")
+    (version "4.2.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "DendroPy" version))
        (sha256
         (base32
-         "1jfz7gp18wph311w1yygbvjanb3n5mdqal439bb6myw41dwb5m63"))
-       ;; There are two known test failures that will be fixed in the next
-       ;; release after 4.1.0.
-       ;; https://github.com/jeetsukumaran/DendroPy/issues/48
-       (patches (search-patches
-                 "python-dendropy-exclude-failing-tests.patch"))))
+         "15c7s3d5gf19ljsxvq5advaa752wfi7pwrdjyhzmg85hccyvp47p"))))
     (build-system python-build-system)
     (home-page "http://packages.python.org/DendroPy/")
     (synopsis "Library for phylogenetics and phylogenetic computing")
@@ -1980,15 +1952,6 @@ trees (phylogenies) and characters.")
   (let ((base (package-with-python2 (strip-python2-variant python-dendropy))))
     (package
       (inherit base)
-      ;; Do not use same source as 'python-dendropy' because the patched
-      ;; failing tests do not occur on Python 2.
-      (source
-       (origin
-         (method url-fetch)
-         (uri (pypi-uri "DendroPy" (package-version base)))
-         (sha256
-          (base32
-           "1jfz7gp18wph311w1yygbvjanb3n5mdqal439bb6myw41dwb5m63"))))
       (arguments
        `(#:python ,python-2
          #:phases
@@ -1997,8 +1960,7 @@ trees (phylogenies) and characters.")
                ;; There is currently a test failure that only happens on some
                ;; systems, and only using "setup.py test"
                (lambda _ (zero? (system* "nosetests")))))))
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ("python2-nose" ,python2-nose)
+      (native-inputs `(("python2-nose" ,python2-nose)
                        ,@(package-native-inputs base))))))
 
 
@@ -2026,9 +1988,8 @@ trees (phylogenies) and characters.")
        ("python-pysam" ,python2-pysam)
        ("python-pybigwig" ,python2-pybigwig)))
     (native-inputs
-     `(("python-mock" ,python2-mock) ;for tests
-       ("python-pytz" ,python2-pytz) ;for tests
-       ("python-setuptools" ,python2-setuptools)))
+     `(("python-mock" ,python2-mock)   ;for tests
+       ("python-pytz" ,python2-pytz))) ;for tests
     (home-page "https://github.com/fidelram/deepTools")
     (synopsis "Tools for normalizing and visualizing deep-sequencing data")
     (description
@@ -2045,7 +2006,7 @@ identify enrichments with functional annotations of the genome.")
 (define-public diamond
   (package
     (name "diamond")
-    (version "0.8.27")
+    (version "0.8.31")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2054,7 +2015,7 @@ identify enrichments with functional annotations of the genome.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "0g0zdyfnri9v7nfbh8f7zqs4af1xydqkiw8m0cx4jc2ql4chpf6a"))))
+                "0nh79f4rpgq8vmlga743r7vd0z0ik6spy34f7vfq0v9lcmvfr7xq"))))
     (build-system cmake-build-system)
     (arguments
      '(#:tests? #f ; no "check" target
@@ -2683,8 +2644,7 @@ comment or quality sections.")
        ("python-pysam" ,python2-pysam)
        ("python-networkx" ,python2-networkx)))
     (native-inputs
-     `(("python-cython" ,python2-cython)
-       ("python-setuptools" ,python2-setuptools)))
+     `(("python-cython" ,python2-cython)))
     (home-page "http://grit-bio.org")
     (synopsis "Tool for integrative analysis of RNA-seq type assays")
     (description
@@ -2810,8 +2770,6 @@ HMMs).")
      `(("python-numpy" ,python2-numpy)))
     (inputs
      `(("python-pysam" ,python2-pysam)))
-    (native-inputs
-     `(("python-setuptools" ,python2-setuptools)))
     (home-page "http://www-huber.embl.de/users/anders/HTSeq/")
     (synopsis "Analysing high-throughput sequencing data with Python")
     (description
@@ -2932,8 +2890,7 @@ data.  It also provides the bgzip, htsfile, and tabix utilities.")
        ("python-numpy" ,python-numpy)
        ("python-matplotlib" ,python-matplotlib)))
     (native-inputs
-     `(("python-cython" ,python-cython)
-       ("python-setuptools" ,python-setuptools)))
+     `(("python-cython" ,python-cython)))
     (home-page "https://github.com/nboley/idr")
     (synopsis "Tool to measure the irreproducible discovery rate (IDR)")
     (description
@@ -3090,8 +3047,6 @@ data.")
        #:tests? #f)) ; no test target
     (inputs
      `(("python-numpy" ,python2-numpy)))
-    (native-inputs
-     `(("python-setuptools" ,python2-setuptools)))
     (home-page "http://github.com/taoliu/MACS/")
     (synopsis "Model based analysis for ChIP-Seq data")
     (description
@@ -3423,9 +3378,8 @@ linker_so='gcc -shared'); defines")))))
        ("python-scipy" ,python2-scipy)
        ("python-matplotlib" ,python2-matplotlib)))
     (native-inputs
-     `(("python-mock" ,python2-mock) ;for tests
-       ("python-pytz" ,python2-pytz) ;for tests
-       ("python-setuptools" ,python2-setuptools)))
+     `(("python-mock" ,python2-mock)   ;for tests
+       ("python-pytz" ,python2-pytz))) ;for tests
     (home-page "http://genes.mit.edu/burgelab/miso/index.html")
     (synopsis "Mixture of Isoforms model for RNA-Seq isoform quantitation")
     (description
@@ -3472,10 +3426,49 @@ program for nucleotide and protein sequences.")
     ;; License information found in 'muscle -h' and usage.cpp.
     (license license:public-domain)))
 
+(define-public newick-utils
+  ;; There are no recent releases so we package from git.
+  (let ((commit "da121155a977197cab9fbb15953ca1b40b11eb87"))
+    (package
+      (name "newick-utils")
+      (version (string-append "1.6-1." (string-take commit 8)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/tjunier/newick_utils.git")
+                      (commit commit)))
+                (file-name (string-append name "-" version "-checkout"))
+                (sha256
+                 (base32
+                  "1hkw21rq1mwf7xp0rmbb2gqc0i6p11108m69i7mr7xcjl268pxnb"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'autoconf
+           (lambda _ (zero? (system* "autoreconf" "-vif")))))))
+    (inputs
+     ;; XXX: TODO: Enable Lua and Guile bindings.
+     ;; https://github.com/tjunier/newick_utils/issues/13
+     `(("libxml2" ,libxml2)
+       ("flex" ,flex)
+       ("bison" ,bison)))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)))
+    (synopsis "Programs for working with newick format phylogenetic trees")
+    (description
+     "Newick-utils is a suite of utilities for processing phylogenetic trees
+in Newick format.  Functions include re-rooting, extracting subtrees,
+trimming, pruning, condensing, drawing (ASCII graphics or SVG).")
+    (home-page "https://github.com/tjunier/newick_utils")
+    (license license:bsd-3))))
+
 (define-public orfm
   (package
     (name "orfm")
-    (version "0.5.3")
+    (version "0.6.1")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -3483,7 +3476,7 @@ program for nucleotide and protein sequences.")
                     version "/orfm-" version ".tar.gz"))
               (sha256
                (base32
-                "0vb6d771gl4mix8bwx919x5ayy9pkj44n7ki336nz3rz2rx4c7gk"))))
+                "19hwp13n82isdvk16710l9m35cmzf0q3fsrcn3r8c5r67biiz39s"))))
     (build-system gnu-build-system)
     (inputs `(("zlib" ,zlib)))
     (native-inputs
@@ -3509,18 +3502,15 @@ interrupted by stop codons.  OrfM finds and prints these ORFs.")
                 "1kjmv891d6qbpp4shhhvkl02ff4q5xlpnls2513sm2cjcrs52f1i"))))
     (build-system python-build-system)
     (arguments `(#:python ,python-2)) ; pbcore requires Python 2.7
-    (inputs
+    (propagated-inputs
      `(("python-cython" ,python2-cython)
        ("python-numpy" ,python2-numpy)
        ("python-pysam" ,python2-pysam)
        ("python-h5py" ,python2-h5py)))
     (native-inputs
-     `(("python-docutils" ,python2-docutils)
-       ("python-nose" ,python2-nose)
-       ("python-setuptools" ,python2-setuptools)
-       ("python-sphinx" ,python2-sphinx)))
-    (propagated-inputs
-     `(("python-pyxb" ,python2-pyxb)))
+     `(("python-nose" ,python2-nose)
+       ("python-sphinx" ,python2-sphinx)
+       ("python-pyxb" ,python2-pyxb)))
     (home-page "http://pacificbiosciences.github.io/pbcore/")
     (synopsis "Library for reading and writing PacBio data files")
     (description
@@ -3543,18 +3533,7 @@ files and writing bioinformatics applications.")
          "1agfz6zqa8nc6cw47yh0s3y14gkpa9wqazwcj7mwwj3ffnw39p3j"))))
     (build-system python-build-system)
     (arguments
-     `(#:python ,python-2  ; requires Python 2.7
-       #:phases
-       (modify-phases %standard-phases
-         (add-after
-          'install 'remove-bin-directory
-          (lambda* (#:key outputs #:allow-other-keys)
-            ;; The "bin" directory only contains wrappers for running
-            ;; the module tests.  They are not needed after the
-            ;; "check" phase.
-            (delete-file-recursively
-             (string-append (assoc-ref outputs "out") "/bin"))
-            #t)))))
+     `(#:python ,python-2))  ; requires Python 2.7
     (propagated-inputs
      `(("python-scipy" ,python2-scipy)
        ("python-numpy" ,python2-numpy)
@@ -3563,8 +3542,7 @@ files and writing bioinformatics applications.")
        ("python-pandas" ,python2-pandas)
        ("python-pysnptools" ,python2-pysnptools)))
     (native-inputs
-     `(("python-setuptools" ,python2-setuptools)
-       ("python-mock" ,python2-mock)
+     `(("python-mock" ,python2-mock)
        ("python-nose" ,python2-nose)
        ("unzip" ,unzip)))
     (home-page "https://github.com/PMBio/warpedLMM")
@@ -3598,11 +3576,6 @@ the phenotype as it models the data.")
       (build-system python-build-system)
       (arguments
        `(#:python ,python-2
-         ;; With standard flags, the install phase attempts to create a zip'd
-         ;; egg file, and fails with an error: 'ZIP does not support timestamps
-         ;; before 1980'
-         #:configure-flags '("--single-version-externally-managed"
-                             "--record=pbtranscript-tofu.txt")
          #:phases
          (modify-phases %standard-phases
            (add-after 'unpack 'enter-directory
@@ -3626,8 +3599,7 @@ the phenotype as it models the data.")
          ("python-h5py" ,python2-h5py)))
       (native-inputs
        `(("python-cython" ,python2-cython)
-         ("python-nose" ,python2-nose)
-         ("python-setuptools" ,python2-setuptools)))
+         ("python-nose" ,python2-nose)))
       (home-page "https://github.com/PacificBiosciences/cDNA_primer")
       (synopsis "Analyze transcriptome data generated with the Iso-Seq protocol")
       (description
@@ -4076,7 +4048,6 @@ BAM and Wiggle files in both transcript-coordinate and genomic-coordinate.")
      `(("python-cython" ,python2-cython)
        ("python-pysam" ,python2-pysam)
        ("python-numpy" ,python2-numpy)
-       ("python-setuptools" ,python2-setuptools)
        ("zlib" ,zlib)))
     (native-inputs
      `(("python-nose" ,python2-nose)))
@@ -4282,7 +4253,7 @@ viewer.")
        `(("perl" ,perl)
          ("zlib" ,zlib)))
       (supported-systems '("x86_64-linux"))
-      (home-page "https://code.google.com/p/mosaik-aligner/")
+      (home-page "https://github.com/wanpinglee/MOSAIK")
       (synopsis "Map nucleotide sequence reads to reference genomes")
       (description
        "MOSAIK is a program for mapping second and third-generation sequencing
@@ -4638,11 +4609,7 @@ sequence itself can be retrieved from these databases.")
     (license license:bsd-3)))
 
 (define-public python2-screed
-  (let ((base (package-with-python2 (strip-python2-variant python-screed))))
-    (package
-      (inherit base)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs base))))))
+  (package-with-python2 python-screed))
 
 (define-public sra-tools
   (package
@@ -4804,8 +4771,7 @@ bioinformatics file formats, sequence alignment, and more.")
      ;; should be removed.
      `(("python-biopython" ,python2-biopython-1.66)))
     (native-inputs
-     `(("python-setuptools" ,python2-setuptools)
-       ("python-nose" ,python2-nose)))
+     `(("python-nose" ,python2-nose)))
     (home-page "http://github.com/fhcrc/seqmagick")
     (synopsis "Tools for converting and modifying sequence files")
     (description
@@ -4948,7 +4914,7 @@ application of SortMeRNA is filtering rRNA from metatranscriptomic data.")
 (define-public star
   (package
     (name "star")
-    (version "2.5.2a")
+    (version "2.5.2b")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/alexdobin/STAR/archive/"
@@ -4956,7 +4922,7 @@ application of SortMeRNA is filtering rRNA from metatranscriptomic data.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "0xjlsm4p9flln111hv4xx7xy94c2nl53zvdvbk9winmiradjsdra"))
+                "1na6np880r1zaamiy00hy8bid5anpy0kgf63587v2yl080krk2zq"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -4965,6 +4931,7 @@ application of SortMeRNA is filtering rRNA from metatranscriptomic data.")
                   ;; Remove pre-built binaries and bundled htslib sources.
                   (delete-file-recursively "bin/MacOSX_x86_64")
                   (delete-file-recursively "bin/Linux_x86_64")
+                  (delete-file-recursively "bin/Linux_x86_64_static")
                   (delete-file-recursively "source/htslib")
                   #t))))
     (build-system gnu-build-system)
@@ -5246,20 +5213,21 @@ data types as well.")
 (define-public r-annotate
   (package
     (name "r-annotate")
-    (version "1.52.0")
+    (version "1.52.1")
     (source
      (origin
        (method url-fetch)
        (uri (bioconductor-uri "annotate" version))
        (sha256
         (base32
-         "1fd2csq7dcs2gwndgwdx2nwkymz8gsmlnqqzv3p0vjjsvvq5n2a8"))))
+         "0yymz8qxgnbybvfhqrgkd1hh9dhwxdii1yxkhr1zicjgb35xixxb"))))
     (build-system r-build-system)
     (propagated-inputs
      `(("r-annotationdbi" ,r-annotationdbi)
        ("r-biobase" ,r-biobase)
        ("r-biocgenerics" ,r-biocgenerics)
        ("r-dbi" ,r-dbi)
+       ("r-rcurl" ,r-rcurl)
        ("r-xml" ,r-xml)
        ("r-xtable" ,r-xtable)))
     (home-page
@@ -5323,14 +5291,14 @@ high-throughput sequencing experiments.")
 (define-public r-deseq2
   (package
     (name "r-deseq2")
-    (version "1.14.0")
+    (version "1.14.1")
     (source
      (origin
        (method url-fetch)
        (uri (bioconductor-uri "DESeq2" version))
        (sha256
         (base32
-         "0kq06jy4xg5ii3a9l62f17kirsfx0gsiwq6mhiy985cqzpdn893g"))))
+         "1walwkqryn1gnwz7zryr5764a0p6ia7ag4w6w9n8fskg8dkg0fqs"))))
     (properties `((upstream-name . "DESeq2")))
     (build-system r-build-system)
     (arguments
@@ -5653,7 +5621,7 @@ track.  The database is exposed as a @code{TxDb} object.")
 (define-public vsearch
   (package
     (name "vsearch")
-    (version "2.3.0")
+    (version "2.3.4")
     (source
      (origin
        (method url-fetch)
@@ -5663,7 +5631,7 @@ track.  The database is exposed as a @code{TxDb} object.")
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "1r8fk3whkil348y5hfsd4r56qjmchhq4nxm6s7ra5rlisw0mf9fy"))
+         "1xyraxmhyx62mxx8z7c8waygvcijwkh48ms1ar60w2cv2y2sn4al"))
        (modules '((guix build utils)))
        (snippet
         '(begin
@@ -5723,15 +5691,16 @@ Needleman-Wunsch).")
 (define-public pardre
   (package
     (name "pardre")
-    (version "1.1.5")
+    ;; The source of 1.1.5 changed in place, so we append "-1" to the version.
+    (version "1.1.5-1")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://sourceforge/pardre/ParDRe-rel"
-                           version ".tar.gz"))
+                           "1.1.5" ".tar.gz"))
        (sha256
         (base32
-         "0zkyjzv4s8q2h5npalhirbk17r5b1h0n2a42mh7njzlf047h9bhy"))))
+         "17j73nc0viq4f6qj50nrndsrif5d6b71q8fl87m54psiv0ilns2b"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ; no tests included
@@ -5839,14 +5808,14 @@ generate FASTA, JSON, YAML, RDF, JSON-LD, HTML, CSV, tabular output etc.")
 (define-public bioruby
   (package
     (name "bioruby")
-    (version "1.5.0")
+    (version "1.5.1")
     (source
      (origin
        (method url-fetch)
        (uri (rubygems-uri "bio" version))
        (sha256
         (base32
-         "01k2fyjl5fpx4zn8g6gqiqvsg2j1fgixrs9p03vzxckynxdq3wmc"))))
+         "0hdl0789c9n4mprnx5pgd46bfwl8d000rqpamj5h6kkjgspijv49"))))
     (build-system ruby-build-system)
     (propagated-inputs
      `(("ruby-libxml" ,ruby-libxml)))
@@ -5975,13 +5944,13 @@ also known as views, in a controlled vocabulary.")
 (define-public r-biocstyle
   (package
    (name "r-biocstyle")
-   (version "2.2.0")
+   (version "2.2.1")
     (source (origin
               (method url-fetch)
               (uri (bioconductor-uri "BiocStyle" version))
               (sha256
                (base32
-                "0qbk23fz8cn260isd9xlh9lxfj4adar6iqzai01c4kz0p31f45za"))))
+                "0sl99xw940ixrm6v24lgaw3ljh56g59a6rdz7g160hx84z9f8n2n"))))
     (properties
      `((upstream-name . "BiocStyle")))
     (build-system r-build-system)
@@ -6110,13 +6079,13 @@ abnormal copy number.")
 (define-public r-s4vectors
   (package
     (name "r-s4vectors")
-    (version "0.12.0")
+    (version "0.12.1")
     (source (origin
               (method url-fetch)
               (uri (bioconductor-uri "S4Vectors" version))
               (sha256
                (base32
-                "0m0npc0vhmcwcxws7v2f8k4hvvrjvnlrsr94klxf4a8m4xw2xzzk"))))
+                "0i36y3w36h3d8rmazxcrip4gvn54rd9av1wz4lygsprrjmylfhcc"))))
     (properties
      `((upstream-name . "S4Vectors")))
     (build-system r-build-system)
@@ -6162,13 +6131,13 @@ utilities for sequence data management under the ACNUC system.")
 (define-public r-iranges
   (package
     (name "r-iranges")
-    (version "2.8.0")
+    (version "2.8.1")
     (source (origin
               (method url-fetch)
               (uri (bioconductor-uri "IRanges" version))
               (sha256
                (base32
-                "0cdl1sfd3cvf93lnz91fdk64fbg1mnd5g958dwh1il8r358hqq3f"))))
+                "0cryqnpqb3p6l9jjw27hyqd550sxlljls3ka7b9rb38hkji7b5hw"))))
     (properties
      `((upstream-name . "IRanges")))
     (build-system r-build-system)
@@ -6191,13 +6160,13 @@ possible.")
 (define-public r-genomeinfodb
   (package
     (name "r-genomeinfodb")
-    (version "1.10.0")
+    (version "1.10.2")
     (source (origin
               (method url-fetch)
               (uri (bioconductor-uri "GenomeInfoDb" version))
               (sha256
                (base32
-                "0nhg4bk38gzvf3mvnbqgisbbhfv1kzjld27z1z9knnlkplkiyyyv"))))
+                "0zh894qd1sgpjbn0wfvq6hs2dzn7y1pyicvzk2aa48y3zbidanv7"))))
     (properties
      `((upstream-name . "GenomeInfoDb")))
     (build-system r-build-system)
@@ -6217,13 +6186,13 @@ names in their natural, rather than lexicographic, order.")
 (define-public r-edger
   (package
     (name "r-edger")
-    (version "3.16.1")
+    (version "3.16.5")
     (source (origin
               (method url-fetch)
               (uri (bioconductor-uri "edgeR" version))
               (sha256
                (base32
-                "1r6hhwkqp13m022hjajzr1lnjsbai0yjhykwn0kp1f0la990a808"))))
+                "04vpa0a6dkkjyvvfbkmfjyaxf2ldkagi66g028qpaszd8jsk8yiv"))))
     (properties `((upstream-name . "edgeR")))
     (build-system r-build-system)
     (propagated-inputs
@@ -6243,13 +6212,13 @@ CAGE.")
 (define-public r-variantannotation
   (package
     (name "r-variantannotation")
-    (version "1.20.0")
+    (version "1.20.2")
     (source (origin
               (method url-fetch)
               (uri (bioconductor-uri "VariantAnnotation" version))
               (sha256
                (base32
-                "1lwzfgahz8ipwli73kcfqb18y6adi129hap1gnycnj3980m54i8q"))))
+                "165wda1d2jagd907pnra4m3sla66icyqxvd60xpv09jl5agd5mn9"))))
     (properties
      `((upstream-name . "VariantAnnotation")))
     (inputs
@@ -6281,13 +6250,13 @@ coding changes and predict coding outcomes.")
 (define-public r-limma
   (package
     (name "r-limma")
-    (version "3.30.2")
+    (version "3.30.7")
     (source (origin
               (method url-fetch)
               (uri (bioconductor-uri "limma" version))
               (sha256
                (base32
-                "04jris7wk2lxksrrvrjsysznsdb2k04lfgrnp18ic49sazva0hfy"))))
+                "1xg9w4lmn9n4hwyflxiwi6g969lcy569cg4z1x47crwwg7z7qdka"))))
     (build-system r-build-system)
     (home-page "http://bioinf.wehi.edu.au/limma")
     (synopsis "Package for linear models for microarray and RNA-seq data")
@@ -6336,13 +6305,13 @@ different technologies, including microarrays, RNA-seq, and quantitative PCR.")
 (define-public r-genomicranges
   (package
     (name "r-genomicranges")
-    (version "1.26.1")
+    (version "1.26.2")
     (source (origin
               (method url-fetch)
               (uri (bioconductor-uri "GenomicRanges" version))
               (sha256
                (base32
-                "039nxccg9i2an8q2wni79x8dr9p1fcfcqvih9hg9w243pczg2g3c"))))
+                "0if5dswkp77lyqppd0z2iyvnwag9h1gsr03707s8npcx13mzpsia"))))
     (properties
      `((upstream-name . "GenomicRanges")))
     (build-system r-build-system)
@@ -6468,13 +6437,13 @@ objects.")
 (define-public r-biostrings
   (package
     (name "r-biostrings")
-    (version "2.42.0")
+    (version "2.42.1")
     (source (origin
               (method url-fetch)
               (uri (bioconductor-uri "Biostrings" version))
               (sha256
                (base32
-                "08z8lkz3axa94wkf144a931ry6vf6cc25avi1ywr84ln2k5czz9f"))))
+                "0vqgd9i6y3wj4zviqwgvwgd4qj6033fg01rmx1cw9bw5i8ans42d"))))
     (properties
      `((upstream-name . "Biostrings")))
     (build-system r-build-system)
@@ -6645,13 +6614,13 @@ as well as query and modify the browser state, such as the current viewport.")
 (define-public r-genomicfeatures
   (package
     (name "r-genomicfeatures")
-    (version "1.26.0")
+    (version "1.26.2")
     (source (origin
               (method url-fetch)
               (uri (bioconductor-uri "GenomicFeatures" version))
               (sha256
                (base32
-                "0z8spi2knwzwi10c38vr7xlvi3ah9faj7m1lka880mmxkl9cai4k"))))
+                "1ybi6r3bax07wlv2qcd34y5qjdvcqcfayfvlrjc39ifrkk65wv4f"))))
     (properties
      `((upstream-name . "GenomicFeatures")))
     (build-system r-build-system)
@@ -7257,7 +7226,7 @@ throughput genetic sequencing data sets using regression methods.")
 (define-public r-qtl
  (package
   (name "r-qtl")
-  (version "1.39-5")
+  (version "1.40-8")
   (source
    (origin
     (method url-fetch)
@@ -7265,7 +7234,7 @@ throughput genetic sequencing data sets using regression methods.")
                         version ".tar.gz"))
     (sha256
      (base32
-      "1grwgvyv7x0dgay1858bg7qf4wk47gpnq7qkqpcda9cn0h970d6f"))))
+      "05bj1x2ry0i7yqiydlswb3d2h4pxg70z8w1072az1mrv1m54k8sp"))))
   (build-system r-build-system)
   (home-page "http://rqtl.org/")
   (synopsis "R package for analyzing QTL experiments in genetics")
@@ -7298,6 +7267,29 @@ two-dimensional genome scans.")
 libraries for systems that do not have these available via other means.")
     (license license:artistic2.0)))
 
+(define-public r-r4rna
+  (package
+    (name "r-r4rna")
+    (version "0.1.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://www.e-rna.org/r-chie/files/R4RNA_"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "1p0i78wh76jfgmn9jphbwwaz6yy6pipzfg08xs54cxavxg2j81p5"))))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-optparse" ,r-optparse)
+       ("r-rcolorbrewer" ,r-rcolorbrewer)))
+    (home-page "http://www.e-rna.org/r-chie/index.cgi")
+    (synopsis "Analysis framework for RNA secondary structure")
+    (description
+     "The R4RNA package aims to be a general framework for the analysis of RNA
+secondary structure and comparative analysis in R.")
+    (license license:gpl3+)))
+
 (define-public r-rhtslib
   (package
     (name "r-rhtslib")
@@ -7358,7 +7350,7 @@ paired-end data.")
 (define-public r-rcas
   (package
     (name "r-rcas")
-    (version "1.0.0")
+    (version "1.1.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/BIMSBbioinfo/RCAS/archive/v"
@@ -7366,7 +7358,7 @@ paired-end data.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "1h7di822ihgkhmmmlfbfz3c2dkjyjxl307i6mx8w0cwjqbna1kp6"))))
+                "1hd0r66556bxbdd82ksjklq7nfli36l4k6y88ic7kkg9873wa1nw"))))
     (build-system r-build-system)
     (native-inputs
      `(("r-knitr" ,r-knitr)
@@ -7388,6 +7380,7 @@ paired-end data.")
        ("r-topgo" ,r-topgo)
        ("r-dt" ,r-dt)
        ("r-plotly" ,r-plotly)
+       ("r-plotrix" ,r-plotrix)
        ("r-motifrg" ,r-motifrg)
        ("r-genomation" ,r-genomation)
        ("r-genomicfeatures" ,r-genomicfeatures)
@@ -7478,6 +7471,141 @@ characterization and visualization of a wide range of mutational patterns
 in SNV base substitution data.")
     (license license:expat)))
 
+(define-public r-wgcna
+  (package
+    (name "r-wgcna")
+    (version "1.51")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "WGCNA" version))
+       (sha256
+        (base32
+         "0hzvnhw76vwg8bl8x368f0c5szpwb8323bmrb3bir93i5bmfjsxx"))))
+    (properties `((upstream-name . "WGCNA")))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-annotationdbi" ,r-annotationdbi)
+       ("r-doparallel" ,r-doparallel)
+       ("r-dynamictreecut" ,r-dynamictreecut)
+       ("r-fastcluster" ,r-fastcluster)
+       ("r-foreach" ,r-foreach)
+       ("r-go-db" ,r-go-db)
+       ("r-hmisc" ,r-hmisc)
+       ("r-impute" ,r-impute)
+       ("r-matrixstats" ,r-matrixstats)
+       ("r-preprocesscore" ,r-preprocesscore)))
+    (home-page
+     "http://www.genetics.ucla.edu/labs/horvath/CoexpressionNetwork/Rpackages/WGCNA/")
+    (synopsis "Weighted correlation network analysis")
+    (description
+     "This package provides functions necessary to perform Weighted
+Correlation Network Analysis on high-dimensional data.  It includes functions
+for rudimentary data cleaning, construction and summarization of correlation
+networks, module identification and functions for relating both variables and
+modules to sample traits.  It also includes a number of utility functions for
+data manipulation and visualization.")
+    (license license:gpl2+)))
+
+(define-public r-chipkernels
+  (let ((commit "c9cfcacb626b1221094fb3490ea7bac0fd625372")
+        (revision "1"))
+    (package
+      (name "r-chipkernels")
+      (version (string-append "1.1-" revision "." (string-take commit 9)))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/ManuSetty/ChIPKernels.git")
+               (commit commit)))
+         (file-name (string-append name "-" version))
+         (sha256
+          (base32
+           "14bj5qhjm1hsm9ay561nfbqi9wxsa7y487df2idsaaf6z10nw4v0"))))
+      (build-system r-build-system)
+      (propagated-inputs
+       `(("r-iranges" ,r-iranges)
+         ("r-xvector" ,r-xvector)
+         ("r-biostrings" ,r-biostrings)
+         ("r-bsgenome" ,r-bsgenome)
+         ("r-gtools" ,r-gtools)
+         ("r-genomicranges" ,r-genomicranges)
+         ("r-sfsmisc" ,r-sfsmisc)
+         ("r-kernlab" ,r-kernlab)
+         ("r-s4vectors" ,r-s4vectors)
+         ("r-biocgenerics" ,r-biocgenerics)))
+      (home-page "https://github.com/ManuSetty/ChIPKernels")
+      (synopsis "Build string kernels for DNA Sequence analysis")
+      (description "ChIPKernels is an R package for building different string
+kernels used for DNA Sequence analysis.  A dictionary of the desired kernel
+must be built and this dictionary can be used for determining kernels for DNA
+Sequences.")
+      (license license:gpl2+))))
+
+(define-public r-seqgl
+  (package
+    (name "r-seqgl")
+    (version "1.1.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/ManuSetty/SeqGL/"
+                           "archive/" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0pnk1p3sci5yipyc8xnb6jbmydpl80fld927xgnbcv104hy8h8yh"))))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-biostrings" ,r-biostrings)
+       ("r-chipkernels" ,r-chipkernels)
+       ("r-genomicranges" ,r-genomicranges)
+       ("r-spams" ,r-spams)
+       ("r-wgcna" ,r-wgcna)
+       ("r-fastcluster" ,r-fastcluster)))
+    (home-page "https://github.com/ManuSetty/SeqGL")
+    (synopsis "Group lasso for Dnase/ChIP-seq data")
+    (description "SeqGL is a group lasso based algorithm to extract
+transcription factor sequence signals from ChIP, DNase and ATAC-seq profiles.
+This package presents a method which uses group lasso to discriminate between
+bound and non bound genomic regions to accurately identify transcription
+factors bound at the specific regions.")
+    (license license:gpl2+)))
+
+(define-public r-gkmsvm
+  (package
+    (name "r-gkmsvm")
+    (version "0.71.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "gkmSVM" version))
+       (sha256
+        (base32
+         "1zpxgxmf2nd5j5wn00ps6kfxr8wxh7d1swr1rr4spq7sj5z5z0k0"))))
+    (properties `((upstream-name . "gkmSVM")))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-biocgenerics" ,r-biocgenerics)
+       ("r-biostrings" ,r-biostrings)
+       ("r-genomeinfodb" ,r-genomeinfodb)
+       ("r-genomicranges" ,r-genomicranges)
+       ("r-iranges" ,r-iranges)
+       ("r-kernlab" ,r-kernlab)
+       ("r-rcpp" ,r-rcpp)
+       ("r-rocr" ,r-rocr)
+       ("r-rtracklayer" ,r-rtracklayer)
+       ("r-s4vectors" ,r-s4vectors)
+       ("r-seqinr" ,r-seqinr)))
+    (home-page "http://cran.r-project.org/web/packages/gkmSVM")
+    (synopsis "Gapped-kmer support vector machine")
+    (description
+     "This R package provides tools for training gapped-kmer SVM classifiers
+for DNA and protein sequences.  This package supports several sequence
+kernels, including: gkmSVM, kmer-SVM, mismatch kernel and wildcard kernel.")
+    (license license:gpl2+)))
+
 (define-public emboss
   (package
     (name "emboss")
@@ -7667,24 +7795,12 @@ may optionally be provided to further inform the peak-calling process.")
     (build-system python-build-system)
     (arguments
      `(#:python ,python-2 ; python2 only
-       #:tests? #f ; no tests included
-       #:phases
-       (modify-phases %standard-phases
-         ;; When setuptools is used a ".egg" archive is generated and
-         ;; installed.  This makes it hard to actually run PePr.  This issue
-         ;; has been reported upstream:
-         ;; https://github.com/shawnzhangyx/PePr/issues/9
-         (add-after 'unpack 'disable-egg-generation
-           (lambda _
-             (substitute* "setup.py"
-               (("from setuptools import setup")
-                "from distutils.core import setup"))
-             #t)))))
+       #:tests? #f)) ; no tests included
     (propagated-inputs
      `(("python2-numpy" ,python2-numpy)
        ("python2-scipy" ,python2-scipy)
        ("python2-pysam" ,python2-pysam)))
-    (home-page "https://code.google.com/p/pepr-chip-seq/")
+    (home-page "https://github.com/shawnzhangyx/PePr")
     (synopsis "Peak-calling and prioritization pipeline for ChIP-Seq data")
     (description
      "PePr is a ChIP-Seq peak calling or differential binding analysis tool
@@ -7725,15 +7841,20 @@ replacement for strverscmp.")
 (define-public multiqc
   (package
     (name "multiqc")
-    (version "0.6")
+    (version "0.9")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "multiqc" version))
        (sha256
         (base32
-         "0avw11h63ldpxy5pizc3wl1wa01ha7q10wb240nggsjz3jaqvyiy"))))
+         "12gs1jw2jrxrij529rnl5kaqxfcqn15yzcsggxkfhdx634ml0cny"))
+       (patches (search-patches "multiqc-fix-git-subprocess-error.patch"))))
     (build-system python-build-system)
+    (arguments
+     ;; Tests are to be introduced in the next version, see
+     ;; https://github.com/ewels/MultiQC/issues/376
+     `(#:tests? #f))
     (propagated-inputs
      `(("python-jinja2" ,python-jinja2)
        ("python-simplejson" ,python-simplejson)
@@ -7741,8 +7862,6 @@ replacement for strverscmp.")
        ("python-click" ,python-click)
        ("python-matplotlib" ,python-matplotlib)
        ("python-numpy" ,python-numpy)))
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://multiqc.info")
     (synopsis "Aggregate bioinformatics analysis reports")
     (description
@@ -7750,3 +7869,94 @@ replacement for strverscmp.")
 samples into a single report.  It contains modules for a large number of
 common bioinformatics tools.")
     (license license:gpl3)))
+
+(define-public r-chipseq
+  (package
+    (name "r-chipseq")
+    (version "1.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (bioconductor-uri "chipseq" version))
+       (sha256
+        (base32
+         "115ayp82rs99iaswrx45skw1i5iacgwzz5k8rzijbp5qic0554n0"))))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-biocgenerics" ,r-biocgenerics)
+       ("r-genomicranges" ,r-genomicranges)
+       ("r-iranges" ,r-iranges)
+       ("r-s4vectors" ,r-s4vectors)
+       ("r-shortread" ,r-shortread)))
+    (home-page "http://bioconductor.org/packages/chipseq")
+    (synopsis "Package for analyzing ChIPseq data")
+    (description
+     "This package provides tools for processing short read data from ChIPseq
+experiments.")
+    (license license:artistic2.0)))
+
+(define-public r-copyhelper
+  (package
+    (name "r-copyhelper")
+    (version "1.6.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://bioconductor.org/packages/release/"
+                           "data/experiment/src/contrib/CopyhelpeR_"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "0x7cyynjmxls9as2gg0iyp9x5fpalxmdjq914ss7i84i9zyk5bhq"))))
+    (properties `((upstream-name . "CopyhelpeR")))
+    (build-system r-build-system)
+    (home-page "http://bioconductor.org/packages/CopyhelpeR/")
+    (synopsis "Helper files for CopywriteR")
+    (description
+     "This package contains the helper files that are required to run the
+Bioconductor package CopywriteR.  It contains pre-assembled 1kb bin GC-content
+and mappability files for the reference genomes hg18, hg19, hg38, mm9 and
+mm10.  In addition, it contains a blacklist filter to remove regions that
+display copy number variation.  Files are stored as GRanges objects from the
+GenomicRanges Bioconductor package.")
+    (license license:gpl2)))
+
+(define-public r-copywriter
+  (package
+    (name "r-copywriter")
+    (version "2.6.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (bioconductor-uri "CopywriteR" version))
+       (sha256
+        (base32
+         "1bwwnsyk7cpgwkagsnn5mv6fv233b0rkhjvbadrh70h8m4anawfj"))))
+    (properties `((upstream-name . "CopywriteR")))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-biocparallel" ,r-biocparallel)
+       ("r-chipseq" ,r-chipseq)
+       ("r-copyhelper" ,r-copyhelper)
+       ("r-data-table" ,r-data-table)
+       ("r-dnacopy" ,r-dnacopy)
+       ("r-futile-logger" ,r-futile-logger)
+       ("r-genomeinfodb" ,r-genomeinfodb)
+       ("r-genomicalignments" ,r-genomicalignments)
+       ("r-genomicranges" ,r-genomicranges)
+       ("r-gtools" ,r-gtools)
+       ("r-iranges" ,r-iranges)
+       ("r-matrixstats" ,r-matrixstats)
+       ("r-rsamtools" ,r-rsamtools)
+       ("r-s4vectors" ,r-s4vectors)))
+    (home-page "https://github.com/PeeperLab/CopywriteR")
+    (synopsis "Copy number information from targeted sequencing")
+    (description
+     "CopywriteR extracts DNA copy number information from targeted sequencing
+by utilizing off-target reads.  It allows for extracting uniformly distributed
+copy number information, can be used without reference, and can be applied to
+sequencing data obtained from various techniques including chromatin
+immunoprecipitation and target enrichment on small gene panels.  Thereby,
+CopywriteR constitutes a widely applicable alternative to available copy
+number detection tools.")
+    (license license:gpl2)))
diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index eff1b5a1c4..43ec087bf5 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -2,7 +2,9 @@
 ;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com>
 ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Tomáš Čech <sleep_walker@gnu.org>
+;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29,11 +31,15 @@
   #:use-module (gnu packages adns)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages crypto)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages cyrus-sasl)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages file)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages linux)
@@ -208,7 +214,7 @@ interface, for the Transmission BitTorrent daemon.")
 (define-public aria2
   (package
     (name "aria2")
-    (version "1.29.0")
+    (version "1.30.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/tatsuhiro-t/aria2/"
@@ -216,7 +222,7 @@ interface, for the Transmission BitTorrent daemon.")
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0bn8j6yhjnsxlxr1cdxw39gphvsrk3qhvvq92rsirxjvwwix0r0s"))))
+                "1xiiqk4yiqr0c4hf05zkma9if13lp3wh37z1r0w60ahxs5k56v5z"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags (list "--enable-libaria2"
@@ -231,7 +237,8 @@ interface, for the Transmission BitTorrent daemon.")
                 (string-append "// " text)))
              (substitute* "test/LpdMessageReceiverTest.cc"
                (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageReceiverTest\\);" text)
-                (string-append "// " text))))))))
+                (string-append "// " text)))
+             #t)))))
     (native-inputs
      `(("cppunit" ,cppunit) ; for the tests
        ("pkg-config" ,pkg-config)))
@@ -251,3 +258,71 @@ interface, for the Transmission BitTorrent daemon.")
 download utility.  It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
 Aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.")
     (license l:gpl2+)))
+
+(define-public uget
+  (package
+    (name "uget")
+    (version "2.0.8")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/urlget/"
+                                  "uget%20%28stable%29/" version "/uget-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "0919cf7lfk1djdl003cahqjvafdliv7v2l8r5wg95n4isqggdk75"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("intltool" ,intltool)))
+    (inputs
+     `(("curl" ,curl)
+       ("gtk+" ,gtk+)
+       ("glib" ,glib)
+       ("gnutls" ,gnutls)
+       ("gstreamer" ,gstreamer)
+       ("libgcrypt" ,libgcrypt)
+       ("libnotify" ,libnotify)
+       ("openssl" ,openssl)))
+    (native-inputs
+     `(("intltool" ,intltool)
+       ("pkg-config" ,pkg-config)))
+    (home-page "http://ugetdm.com/")
+    (synopsis "Universal download manager with GTK+ interface")
+    (description
+     "uGet is portable download manager with GTK+ interface supporting
+HTTP, HTTPS, BitTorrent and Metalink, supporting multi-connection
+downloads, download scheduling, download rate limiting.")
+    (license l:lgpl2.1+)))
+
+(define-public mktorrent
+  (package
+    (name "mktorrent")
+    (version "1.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/mktorrent/mktorrent/"
+                                  version "/" name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "17qi3nfky240pq6qcmf5qg324mxm83vk9r3nvsdhsvinyqm5d3kg"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (delete 'configure))          ; no configure script
+       #:make-flags (list "CC=gcc"
+                          (string-append "PREFIX=" (assoc-ref %outputs "out"))
+                          "NO_HASH_CHECK=1"
+                          "USE_LARGE_FILES=1"
+                          "USE_LONG_OPTIONS=1"
+                          "USE_PTHREADS=1")
+       #:tests? #f))                            ; no tests
+    (home-page "http://mktorrent.sourceforge.net/")
+    (synopsis "Utility to create BitTorrent metainfo files")
+    (description "mktorrent is a simple command-line utility to create
+BitTorrent @dfn{metainfo} files, often known simply as @dfn{torrents}, from
+both single files and whole directories.  It can add multiple trackers and web
+seed URLs, and set the @code{private} flag to disallow advertisement through
+the distributed hash table (DHT) and Peer Exchange.  Hashing is multi-threaded
+and will take advantage of multiple processor cores where possible.")
+    (license (list l:public-domain      ; sha1.*, used to build without OpenSSL
+                   l:gpl2+))))          ; with permission to link with OpenSSL
diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
index ab31fa8c5c..e6abf4d5e3 100644
--- a/gnu/packages/boost.scm
+++ b/gnu/packages/boost.scm
@@ -120,7 +120,7 @@ across a broad spectrum of applications.")
     (build-system gnu-build-system)
     (propagated-inputs
       `(("boost" ,boost))) ; inclusion of header files
-    (home-page "https://code.google.com/p/multidimalgorithm/")
+    (home-page "https://gitlab.com/mdds/mdds")
     (synopsis "Multi-dimensional C++ data structures and indexing algorithms")
     (description "Mdds (multi-dimensional data structure) provides a
 collection of multi-dimensional data structures and indexing algorithms
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 64a82393af..c4a3fc3e7c 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -175,6 +175,7 @@ successful, or false to signal an error."
         ((string=? system "arm-eabi") "no-ld.so")
         ((string=? system "xtensa-elf") "no-ld.so")
         ((string=? system "avr") "no-ld.so")
+        ((string=? system "propeller-elf") "no-ld.so")
         ((string=? system "i686-mingw") "no-ld.so")
 
         (else (error "dynamic linker name not known for this system"
@@ -288,7 +289,8 @@ $out/bin/guile --version~%"
 
 (define %bootstrap-base-urls
   ;; This is where the initial binaries come from.
-  '("http://alpha.gnu.org/gnu/guix/bootstrap"
+  '("ftp://alpha.gnu.org/gnu/guix/bootstrap"
+    "http://alpha.gnu.org/gnu/guix/bootstrap"
     "http://www.fdn.fr/~lcourtes/software/guix/packages"))
 
 (define %bootstrap-coreutils&co
diff --git a/gnu/packages/busybox.scm b/gnu/packages/busybox.scm
index ecbdd6f939..988154eed4 100644
--- a/gnu/packages/busybox.scm
+++ b/gnu/packages/busybox.scm
@@ -30,7 +30,7 @@
 (define-public busybox
   (package
     (name "busybox")
-    (version "1.25.0")
+    (version "1.26.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -38,7 +38,7 @@
                     version ".tar.bz2"))
               (sha256
                (base32
-                "1z52mh6prhd6v47qryz4rvng5r1z0am6masrnigq06zfhmlf03ss"))))
+                "0k0g3hk58m99c2sfq97ngnixb2rv2wzyhv3z00lxaw78bqvjglis"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -65,14 +65,6 @@
            (substitute* "testsuite/pidof.tests"
                (("-s init") "-s $(cat /proc/1/comm)"))
 
-           (substitute* "testsuite/grep.tests"
-               ;; The subject of this test is buggy.  It is known by upstream (fixed in git)
-               ;; So mark it with SKIP_KNOWN_BUGS like the others.
-               ;; Presumably it wasn't known at the time of release ...
-               ;; (It is strange that they release software which they know to have bugs)
-               (("testing \"grep -w \\^str doesn't match str not at the beginning\"")
-               "test x\"$SKIP_KNOWN_BUGS\" = x\"\" && testing \"grep -w ^str doesn't match str not at the beginning\""))
-
            ;; This test cannot possibly pass.
            ;; It is trying to test that "which ls" returns "/bin/ls" when PATH is not set.
            ;; However, this relies on /bin/ls existing.  Which it does not in guix.
diff --git a/gnu/packages/calendar.scm b/gnu/packages/calendar.scm
index 306c949066..70bf8f9573 100644
--- a/gnu/packages/calendar.scm
+++ b/gnu/packages/calendar.scm
@@ -88,6 +88,7 @@ data units.")
     (source (origin
              (method url-fetch)
              (uri (pypi-uri "khal" version))
+             (patches (search-patches "khal-disable-failing-tests.patch"))
              (sha256
               (base32
                "03vy4dp9n43w51mwqjjy08dr5nj7wxqnb085visz3j43vzm42p1f"))))
@@ -96,10 +97,9 @@ data units.")
      `(#:phases (modify-phases %standard-phases
         ;; Building the manpage requires khal to be installed.
         (add-after 'install 'manpage
-          (lambda* (#:key outputs #:allow-other-keys)
-            (setenv "PYTHONPATH"
-                    (string-append
-                      (getenv "PYTHONPATH") ":" (assoc-ref outputs "out")))
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            ;; Make installed package available for running the tests
+            (add-installed-pythonpath inputs outputs)
             (zero? (system* "make" "--directory=doc/" "man"))
             (install-file
               "doc/build/man/khal.1"
diff --git a/gnu/packages/cdrom.scm b/gnu/packages/cdrom.scm
index 829156a7c8..44f4eb035a 100644
--- a/gnu/packages/cdrom.scm
+++ b/gnu/packages/cdrom.scm
@@ -28,14 +28,19 @@
   #:use-module ((guix licenses) #:select (lgpl2.1+ gpl2 gpl2+ gpl3+))
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix gexp)
   #:use-module (gnu packages)
   #:use-module (gnu packages acl)
+  #:use-module (gnu packages audio)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages glib)
   #:use-module (gnu packages man)
+  #:use-module (gnu packages mp3)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages pkg-config)
@@ -328,12 +333,14 @@ from an audio CD.")
                    (parano (assoc-ref inputs "cdparanoia"))
                    (which  (assoc-ref inputs "which"))
                    (discid (assoc-ref inputs "cd-discid"))
+                   (flac   (assoc-ref inputs "flac"))
                    (out    (assoc-ref outputs "out")))
                (define (wrap file)
                  (wrap-program file
                                `("PATH" ":" prefix
                                  (,(string-append out "/bin:"
                                                   wget "/bin:"
+                                                  flac "/bin:"
                                                   which "/bin:"
                                                   vorbis "/bin:"
                                                   discid "/bin:"
@@ -349,6 +356,7 @@ from an audio CD.")
               ("cdparanoia" ,cdparanoia)
               ("cd-discid" ,cd-discid)
               ("vorbis-tools" ,vorbis-tools)
+              ("flac" ,flac)
 
               ;; A couple of Python and Perl scripts are included.
               ("python" ,python)
@@ -395,3 +403,96 @@ for bootable CD-ROMs.
 Image data is written to standard output by default and all other
 information is written to standard error.")
     (license gpl2+)))
+
+(define-public asunder
+  (package
+    (name "asunder")
+    (version "2.8")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "http://www.littlesvr.ca/asunder/releases/asunder-"
+                              version
+                              ".tar.bz2"))
+              (sha256
+               (base32
+                "1nq9kd4rd4k2kibf57gdbm0zw2gxa234vvvdhxkm8g5bhx5h3iyq"))))
+    (build-system glib-or-gtk-build-system)
+    (arguments
+     '(#:out-of-source? #f
+       #:phases (modify-phases %standard-phases
+                  (add-after 'install 'wrap
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      (let ((program (string-append (assoc-ref outputs "out")
+                                                    "/bin/asunder")))
+                        (define (bin-directory input-name)
+                          (string-append (assoc-ref inputs input-name) "/bin"))
+                        (wrap-program program
+                          `("PATH" ":" prefix
+                            ,(map bin-directory (list "cdparanoia"
+                                                      "lame"
+                                                      "vorbis-tools"
+                                                      "flac"
+                                                      "opus-tools"
+                                                      "wavpack"))))))))))
+    (native-inputs `(("intltool" ,intltool)
+                     ("pkg-config" ,pkg-config)))
+    ;; TODO: Add the necessary packages for Musepack encoding.
+    (inputs `(("gtk+-2" ,gtk+-2)
+              ("glib" ,glib)
+              ("libcddb" ,libcddb)
+              ("cdparanoia" ,cdparanoia)
+              ("lame" ,lame)
+              ("vorbis-tools" ,vorbis-tools)
+              ("flac" ,flac)
+              ("opus-tools" ,opus-tools)
+              ("wavpack" ,wavpack)))
+    (home-page "http://www.littlesvr.ca/asunder/")
+    (synopsis "Graphical audio CD ripper and encoder")
+    (description
+     "Asunder is a graphical audio CD ripper and encoder.  It can save audio
+tracks as WAV, MP3, Ogg Vorbis, FLAC, Opus, Wavpack, and Musepack.  It can use
+CDDB to name and tag each track automatically, and it allows for each track to
+be by a different artist.  Asunder can encode to multiple formats in one
+session, and it can create M3U playlists.")
+    (license gpl2)))
+
+(define-public ripit
+  (package
+    (name "ripit")
+    (version "3.9.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://www.suwald.com/ripit/ripit-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "0ap71x477jy9c4jiqazb3y45hxdxm3jbq24x05g3vjyqzigi4x1b"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; No test suite.
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-after 'unpack 'patch-usr-bin-install
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (substitute* "Makefile"
+               (("/usr/bin/install") (string-append
+                                      (assoc-ref inputs "coreutils")
+                                      "/bin/install"))
+               (("\\$\\(DESTDIR\\)/usr/local") (assoc-ref outputs "out"))
+               (("../../etc") "etc")))))))
+    (native-inputs
+     `(("coreutils" ,coreutils)))
+    (inputs
+     `(("perl" ,perl)))
+    (propagated-inputs
+     `(("cdparanoia" ,cdparanoia)
+       ("flac" ,flac)
+       ("vorbis-tools" ,vorbis-tools)
+       ("wavpack" ,wavpack)
+       ("perl-cddb-get" ,perl-cddb-get)))
+    (home-page "http://www.suwald.com/ripit/about.php")
+    (synopsis "Command-line program to extract audio CDs")
+    (description "RipIT is used to extract audio from CDs.")
+    (license gpl2)))
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index b394571d6f..f0a6ff4d1c 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -180,13 +180,13 @@ format.")
 (define-public cppcheck
   (package
     (name "cppcheck")
-    (version "1.76")
+    (version "1.76.1")
     (source (origin
       (method url-fetch)
       (uri (string-append "https://github.com/danmar/cppcheck/archive/"
                           version ".tar.gz"))
       (sha256
-       (base32 "14d0ikcmq1xcqy9f1vq1jbn5ifl0jiy3rycqdcg7v8hil48m59z8"))
+       (base32 "08pcawg36h850n4i794b2158jcv49f8a54dg3dikdkc1cwknwgjz"))
       (file-name (string-append name "-" version ".tar.gz"))))
     (build-system cmake-build-system)
     (home-page "http://cppcheck.sourceforge.net")
diff --git a/gnu/packages/ci.scm b/gnu/packages/ci.scm
index 3f54ff1298..05c51bbc4d 100644
--- a/gnu/packages/ci.scm
+++ b/gnu/packages/ci.scm
@@ -1,5 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -32,6 +34,7 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages texinfo)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
@@ -181,3 +184,61 @@
 release that uses a purely functional language to describe build jobs and
 their dependencies.")
       (license l:gpl3+))))
+
+(define-public cuirass
+  (let ((commit "cbdb59af8e7a1b40d687f80e62c5892686d384d2")
+        (revision "2"))
+    (package
+      (name "cuirass")
+      (version (string-append "0.0.1-" revision "." (string-take commit 7)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://notabug.org/mthl/cuirass")
+                      (commit commit)))
+                (file-name (string-append name "-" version))
+                (sha256
+                 (base32
+                  "0qmhchazg8wyrfn6d2im4jg7d52gb0xp8afjan5szl3bpphi4s28"))))
+      (build-system gnu-build-system)
+      (arguments
+       '(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'bootstrap
+             (lambda _ (zero? (system* "sh" "bootstrap"))))
+           (add-after 'install 'wrap-program
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               ;; Wrap the 'cuirass' command to refer to the right modules.
+               (let* ((out    (assoc-ref outputs "out"))
+                      (json   (assoc-ref inputs "guile-json"))
+                      (sqlite (assoc-ref inputs "guile-sqlite3"))
+                      (git    (assoc-ref inputs "git"))
+                      (guix   (assoc-ref inputs "guix"))
+                      (mods   (string-append json "/share/guile/site/2.0:"
+                                             sqlite "/share/guile/site/2.0:"
+                                             guix "/share/guile/site/2.0")))
+                 ;; Make sure 'cuirass' can find the 'git' and 'evaluate'
+                 ;; commands, as well as the relevant Guile modules.
+                 (wrap-program (string-append out "/bin/cuirass")
+                   `("PATH" ":" prefix (,(string-append out "/bin")
+                                        ,(string-append git "/bin")))
+                   `("GUILE_LOAD_PATH" ":" prefix (,mods))
+                   `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,mods)))
+                 #t))))))
+      (inputs
+       `(("guile" ,guile-2.0)
+         ("guile-json" ,guile-json)
+         ("guile-sqlite3" ,guile-sqlite3)
+         ("guix" ,guix)
+         ("git" ,git)))
+      (native-inputs
+       `(("autoconf" ,autoconf)
+         ("automake" ,automake)
+         ("pkg-config" ,pkg-config)
+         ("texinfo" ,texinfo)))
+      (synopsis "Continuous integration system")
+      (description
+       "Cuirass is a continuous integration tool using GNU Guix.  It is
+intended as a replacement for Hydra.")
+      (home-page "https://notabug.org/mthl/cuirass")
+      (license l:gpl3+))))
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index baa9861622..f5aa7f4faf 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -92,14 +92,14 @@ highlighting your own code that seemed comprehensible when you wrote it.")
 (define-public global                             ; a global variable
   (package
     (name "global")
-    (version "6.5.5")
+    (version "6.5.6")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnu/global/global-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "0yyg91qw8399lnxfai4bxkh9yq71qdwp9kvadgzp05cdqni44nxw"))))
+               "018m536k5y6lks1a6gqn3bsp7r8zk017znqj9kva1nm8d7x9lbqj"))))
     (build-system gnu-build-system)
     (inputs `(("ncurses" ,ncurses)
               ("libltdl" ,libltdl)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 1238f5cf5b..273e3ca808 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -497,7 +497,7 @@ the bootstrap environment."
                  (unsetenv "CPATH")
 
                  ;; Tell 'libpthread' where to find 'libihash' on Hurd systems.
-                 ,@(if (string-match "i586-gnu" (%current-system))
+                 ,@(if (hurd-triplet? (%current-system))
                        `((substitute* "libpthread/Makefile"
                            (("LDLIBS-pthread.so =.*")
                             (string-append "LDLIBS-pthread.so = "
@@ -522,7 +522,7 @@ the bootstrap environment."
         ,@%boot1-inputs
 
         ;; A native MiG is needed to build Glibc on Hurd.
-        ,@(if (string-match "i586-gnu" (%current-system))
+        ,@(if (hurd-triplet? (%current-system))
               `(("mig" ,mig-boot0))
               '())
 
@@ -806,6 +806,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
 (define bash-final
   ;; Link with `-static-libgcc' to make sure we don't retain a reference
   ;; to the bootstrap GCC.
+  ;; FIXME: This depends on 'bootstrap-binaries' via Makefile.in.
   (package-with-bootstrap-guile
    (package-with-explicit-inputs (static-libgcc-package bash)
                                  %boot3-inputs
diff --git a/gnu/packages/connman.scm b/gnu/packages/connman.scm
index 65214271b5..870001237d 100644
--- a/gnu/packages/connman.scm
+++ b/gnu/packages/connman.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017 Mathieu OTHACEHE <m.othacehe@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24,10 +25,13 @@
   #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages admin)
+  #:use-module (gnu packages enlightenment)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages polkit)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages qt)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages samba)
   #:use-module (gnu packages tls)
@@ -49,7 +53,7 @@
     (arguments
      `(#:configure-flags
        (list "--enable-nmcompat"
-             ;; "--enable-polkit"
+             "--enable-polkit"
              "--enable-openconnect"
              "--enable-openvpn"
              "--enable-vpnc"
@@ -70,7 +74,7 @@
        ("glib" ,glib)
        ("gnutls" ,gnutls)
        ("iptables" ,iptables)
-       ;; ("polkit" ,polkit) ; pkg-config cannot find polkit.pc
+       ("polkit" ,polkit)        ;so connman can be used by unprivileged users
        ("readline" ,readline)
        ;; These inputs are needed for connman to include the interface to
        ;; these technologies so IF they are installed they can be used.
@@ -90,3 +94,78 @@ cases.  Connman implements DNS resolving and caching, DHCP clients for both
 IPv4 and IPv6, link-local IPv4 address handling and tethering (IP connection
 sharing) to clients via USB, ethernet, WiFi, cellular and Bluetooth.")
     (license gpl2)))
+
+(define-public econnman
+  (package
+    (name "econnman")
+    (version "1.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "https://download.enlightenment.org/rel/apps/"
+                            "econnman/econnman-" version ".tar.gz"))
+        (sha256
+         (base32
+          "057pwwavlvrrq26bncqnfrf449zzaim0zq717xv86av4n940gwv0"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags '("--localstatedir=/var")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'wrap-binary
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin/econnman-bin")))
+               (wrap-program bin
+                 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
+               #t))))))
+    (native-inputs `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("efl" ,efl)
+       ("python-2" ,python-2)
+       ("python2-efl" ,python2-efl)))
+    (home-page "https://www.enlightenment.org")
+    (synopsis "Connman User Interface written using the EFL")
+    (description
+     "An EFL user interface for the @code{connman} connection manager.")
+    (license lgpl3)))
+
+(define-public cmst
+  (package
+    (name "cmst")
+    (version "2016.10.03")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://github.com/andrew-bibb/cmst/releases/download/cmst-"
+             version "/cmst-" version ".tar.gz"))
+       (sha256
+        (base32 "1xpn4sqnxzpsjjwh9hva9sn55xlryiz2f2mwpyj2l31janj7a082"))))
+    (inputs
+     `(("qt" ,qt)))
+    (native-inputs
+     `(("qmake" ,qt)))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (zero?
+              (system* "qmake"
+                       (string-append "PREFIX="
+                                      (assoc-ref outputs "out"))))))
+         (add-before 'install 'fix-Makefiles
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (substitute* (find-files "." "Makefile")
+                 (("INSTALL_ROOT)")
+                  (string-append "INSTALL_ROOT)" out))
+                 (("/usr/bin") "/bin"))))))))
+    (home-page "https://github.com/andrew-bibb/cmst")
+    (synopsis "Qt frontend for Connman")
+    (description
+     "Cmst is a Qt based frontend for the @code{connman} connection manager.
+This package also provides a systemtray icon.")
+    (license x11)))
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index da2efc3642..47e0958193 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -20,12 +20,12 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages cross-base)
-  #:use-module (guix licenses)
   #:use-module (gnu packages)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages base)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages hurd)
+  #:use-module (gnu packages mingw)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
@@ -37,13 +37,26 @@
   #:use-module (ice-9 regex)
   #:export (cross-binutils
             cross-libc
-            cross-gcc))
+            cross-gcc
+            cross-newlib?))
 
 (define %xgcc
   ;; GCC package used as the basis for cross-compilation.  It doesn't have to
   ;; be 'gcc' and can be a specific variant such as 'gcc-4.8'.
   gcc)
 
+(define %gcc-include-paths
+  ;; Environment variables for header search paths.
+  ;; Note: See <http://bugs.gnu.org/22186> for why not 'CPATH'.
+  '("C_INCLUDE_PATH"
+    "CPLUS_INCLUDE_PATH"
+    "OBJC_INCLUDE_PATH"
+    "OBJCPLUS_INCLUDE_PATH"))
+
+(define %gcc-cross-include-paths
+  ;; Search path for target headers when cross-compiling.
+  (map (cut string-append "CROSS_" <>) %gcc-include-paths))
+
 (define (cross p target)
   (package (inherit p)
     (name (string-append (package-name p) "-cross-" target))
@@ -104,7 +117,7 @@ may be either a libc package or #f.)"
         `(append (list ,(string-append "--target=" target)
                        ,@(if libc
                              `( ;; Disable libcilkrts because it is not
-                                ;; ported to GNU/Hurd. 
+                                ;; ported to GNU/Hurd.
                                "--disable-libcilkrts")
                              `( ;; Disable features not needed at this stage.
                                "--disable-shared" "--enable-static"
@@ -131,7 +144,12 @@ may be either a libc package or #f.)"
                                "--disable-libitm"
                                "--disable-libvtv"
                                "--disable-libsanitizer"
-                               )))
+                                ))
+
+                       ;; For a newlib (non-glibc) target
+                       ,@(if (cross-newlib? target)
+                             '("--with-newlib")
+                             '()))
 
                  ,(if libc
                       flags
@@ -146,80 +164,24 @@ may be either a libc package or #f.)"
                      ,flags))
             flags))
        ((#:phases phases)
-        (let ((phases
-               `(alist-cons-after
-                 'install 'make-cross-binutils-visible
-                 (lambda* (#:key outputs inputs #:allow-other-keys)
-                   (let* ((out      (assoc-ref outputs "out"))
-                          (libexec  (string-append out "/libexec/gcc/"
-                                                   ,target))
-                          (binutils (string-append
-                                     (assoc-ref inputs "binutils-cross")
-                                     "/bin/" ,target "-"))
-                          (wrapper  (string-append
-                                     (assoc-ref inputs "ld-wrapper-cross")
-                                     "/bin/" ,target "-ld")))
-                     (for-each (lambda (file)
-                                 (symlink (string-append binutils file)
-                                          (string-append libexec "/"
-                                                         file)))
-                               '("as" "nm"))
-                     (symlink wrapper (string-append libexec "/ld"))
-                     #t))
-                 (alist-replace
-                  'install
-                  (lambda _
-                    ;; Unlike our 'strip' phase, this will do the right thing
-                    ;; for cross-compilers.
-                    (zero? (system* "make" "install-strip")))
-                  ,phases))))
-          (if libc
-              `(alist-cons-before
-                'configure 'set-cross-path
-                (lambda* (#:key inputs #:allow-other-keys)
-                  ;; Add the cross kernel headers to CROSS_CPATH, and remove them
-                  ;; from CPATH.
-                  (let ((libc  (assoc-ref inputs "libc"))
-                        (kernel (assoc-ref inputs "xkernel-headers")))
-                    (define (cross? x)
-                      ;; Return #t if X is a cross-libc or cross Linux.
-                      (or (string-prefix? libc x)
-                          (string-prefix? kernel x)))
-                    (let ((cpath (string-append
-                                  libc "/include"
-                                  ":" kernel "/include")))
-                      (for-each (cut setenv <> cpath)
-                                '("CROSS_C_INCLUDE_PATH"
-                                  "CROSS_CPLUS_INCLUDE_PATH"
-                                  "CROSS_OBJC_INCLUDE_PATH"
-                                  "CROSS_OBJCPLUS_INCLUDE_PATH")))
-                    (setenv "CROSS_LIBRARY_PATH"
-                            (string-append libc "/lib:"
-                                           kernel "/lib")) ;for Hurd's libihash
-                    (for-each
-                     (lambda (var)
-                       (and=> (getenv var)
-                              (lambda (value)
-                                (let* ((path (search-path-as-string->list value))
-                                       (native-path (list->search-path-as-string
-                                                     (remove cross? path) ":")))
-                                  (setenv var native-path)))))
-                              '("C_INCLUDE_PATH"
-                                "CPLUS_INCLUDE_PATH"
-                                "OBJC_INCLUDE_PATH"
-                                "OBJCPLUS_INCLUDE_PATH"
-                                "LIBRARY_PATH"))
-                    #t))
-                ,phases)
-              phases)))))))
+        `(cross-gcc-build-phases ,target ,phases))))))
 
 (define (cross-gcc-patches target)
   "Return GCC patches needed for TARGET."
   (cond ((string-prefix? "xtensa-" target)
          ;; Patch by Qualcomm needed to build the ath9k-htc firmware.
          (search-patches "ath9k-htc-firmware-gcc.patch"))
+        ((target-mingw? target)
+         (search-patches "gcc-4.9.3-mingw-gthr-default.patch"))
         (else '())))
 
+(define (cross-gcc-snippet target)
+  "Return GCC snippet needed for TARGET."
+  (cond ((target-mingw? target)
+         '(copy-recursively "libstdc++-v3/config/os/mingw32-w64"
+                            "libstdc++-v3/config/os/newlib"))
+        (else #f)))
+
 (define* (cross-gcc target
                     #:optional (xbinutils (cross-binutils target)) libc)
   "Return a cross-compiler for TARGET, where TARGET is a GNU triplet.  Use
@@ -234,7 +196,10 @@ GCC that does not target a libc; otherwise, target that libc."
                (append
                 (origin-patches (package-source %xgcc))
                 (cons (search-patch "gcc-cross-environment-variables.patch")
-                      (cross-gcc-patches target))))))
+                      (cross-gcc-patches target))))
+              (modules '((guix build utils)))
+              (snippet
+               (cross-gcc-snippet target))))
 
     ;; For simplicity, use a single output.  Otherwise libgcc_s & co. are not
     ;; found by default, etc.
@@ -242,11 +207,14 @@ GCC that does not target a libc; otherwise, target that libc."
 
     (arguments
      `(#:implicit-inputs? #f
+       #:imported-modules ((gnu build cross-toolchain)
+                           ,@%gnu-build-system-modules)
        #:modules ((guix build gnu-build-system)
                   (guix build utils)
-                  (ice-9 regex)
+                  (gnu build cross-toolchain)
                   (srfi srfi-1)
-                  (srfi srfi-26))
+                  (srfi srfi-26)
+                  (ice-9 regex))
 
        ,@(cross-gcc-arguments target libc)))
 
@@ -264,34 +232,32 @@ GCC that does not target a libc; otherwise, target that libc."
        ;; Remaining inputs.
        ,@(let ((inputs (append (package-inputs %xgcc)
                                (alist-delete "libc" (%final-inputs)))))
-           (if libc
-               `(("libc" ,libc)
-                 ("xkernel-headers"                ;the target headers
-                  ,@(assoc-ref (package-propagated-inputs libc)
-                               "kernel-headers"))
-                 ,@inputs)
-               inputs))))
+           (cond
+            ((target-mingw? target)
+             (if libc
+                 `(("libc" ,mingw-w64)
+                   ,@inputs)
+                 `(("mingw-source" ,(package-source mingw-w64))
+                   ,@inputs)))
+            (libc
+             `(("libc" ,libc)
+               ("xkernel-headers"                ;the target headers
+                ,@(assoc-ref (package-propagated-inputs libc)
+                             "kernel-headers"))
+               ,@inputs))
+            (else inputs)))))
 
     (inputs '())
 
     ;; Only search target inputs, not host inputs.
-    ;; Note: See <http://bugs.gnu.org/22186> for why not 'CPATH'.
-    (search-paths
-     (list (search-path-specification
-            (variable "CROSS_C_INCLUDE_PATH")
-            (files '("include")))
-           (search-path-specification
-            (variable "CROSS_CPLUS_INCLUDE_PATH")
-            (files '("include")))
-           (search-path-specification
-            (variable "CROSS_OBJC_INCLUDE_PATH")
-            (files '("include")))
-           (search-path-specification
-            (variable "CROSS_OBJCPLUS_INCLUDE_PATH")
-            (files '("include")))
-           (search-path-specification
-            (variable "CROSS_LIBRARY_PATH")
-            (files '("lib" "lib64")))))
+    (search-paths (cons (search-path-specification
+                         (variable "CROSS_LIBRARY_PATH")
+                         (files '("lib" "lib64")))
+                        (map (lambda (variable)
+                               (search-path-specification
+                                (variable variable)
+                                (files '("include"))))
+                             %gcc-cross-include-paths)))
     (native-search-paths '())))
 
 (define* (cross-kernel-headers target
@@ -344,10 +310,7 @@ GCC that does not target a libc; otherwise, target that libc."
                      (let* ((mach (assoc-ref inputs "cross-gnumach-headers"))
                             (cpath (string-append mach "/include")))
                        (for-each (cut setenv <> cpath)
-                                 '("CROSS_C_INCLUDE_PATH"
-                                   "CROSS_CPLUS_INCLUDE_PATH"
-                                   "CROSS_OBJC_INCLUDE_PATH"
-                                   "CROSS_OBJCPLUS_INCLUDE_PATH"))))
+                                 ',%gcc-cross-include-paths)))
                    %standard-phases)
          #:configure-flags (list ,(string-append "--target=" target))
          ,@(package-arguments mig)))
@@ -362,7 +325,6 @@ GCC that does not target a libc; otherwise, target that libc."
       (name (string-append (package-name hurd-headers)
                            "-cross-" target))
 
-      (propagated-inputs `(("cross-mig" ,xmig)))
       (native-inputs `(("cross-gcc" ,xgcc)
                        ("cross-binutils" ,xbinutils)
                        ("cross-mig" ,xmig)
@@ -388,10 +350,7 @@ GCC that does not target a libc; otherwise, target that libc."
                      (cpath (string-append mach "/include:"
                                            hurd "/include")))
                 (for-each (cut setenv <> cpath)
-                          '("CROSS_C_INCLUDE_PATH"
-                            "CROSS_CPLUS_INCLUDE_PATH"
-                            "CROSS_OBJC_INCLUDE_PATH"
-                            "CROSS_OBJCPLUS_INCLUDE_PATH"))))
+                          ',%gcc-cross-include-paths)))
             ,phases))))
 
       (propagated-inputs `(("gnumach-headers" ,xgnumach-headers)
@@ -419,10 +378,7 @@ GCC that does not target a libc; otherwise, target that libc."
               (let* ((glibc-headers (assoc-ref inputs "cross-glibc-hurd-headers"))
                     (cpath (string-append glibc-headers "/include")))
                 (for-each (cut setenv <> cpath)
-                          '("CROSS_C_INCLUDE_PATH"
-                            "CROSS_CPLUS_INCLUDE_PATH"
-                            "CROSS_OBJC_INCLUDE_PATH"
-                            "CROSS_OBJCPLUS_INCLUDE_PATH"))))
+                          ',%gcc-cross-include-paths)))
             ,phases))))
 
       (inputs `(("cross-glibc-hurd-headers" ,xglibc/hurd-headers)))
@@ -464,61 +420,69 @@ XBINUTILS and the cross tool chain."
       (_ glibc/linux)))
 
   ;; Use (cross-libc-for-target ...) to determine the correct libc to use.
-  (let ((libc (cross-libc-for-target target)))
-    (package (inherit libc)
-      (name (string-append "glibc-cross-" target))
-      (arguments
-       (substitute-keyword-arguments
-           `(;; Disable stripping (see above.)
-             #:strip-binaries? #f
-
-             ;; This package is used as a target input, but it should not have
-             ;; the usual cross-compilation inputs since that would include
-             ;; itself.
-             #:implicit-cross-inputs? #f
-
-             ;; We need SRFI 26.
-             #:modules ((guix build gnu-build-system)
-                        (guix build utils)
-                        (srfi srfi-26))
 
-             ,@(package-arguments libc))
-         ((#:configure-flags flags)
-          `(cons ,(string-append "--host=" target)
-               ,flags))
-         ((#:phases phases)
-          `(alist-cons-before
-            'configure 'set-cross-kernel-headers-path
-            (lambda* (#:key inputs #:allow-other-keys)
-              (let* ((kernel (assoc-ref inputs "kernel-headers"))
-                     (cpath (string-append kernel "/include")))
-                (for-each (cut setenv <> cpath)
-                          '("CROSS_C_INCLUDE_PATH"
-                            "CROSS_CPLUS_INCLUDE_PATH"
-                            "CROSS_OBJC_INCLUDE_PATH"
-                            "CROSS_OBJCPLUS_INCLUDE_PATH"))
-                (setenv "CROSS_LIBRARY_PATH"
-                        (string-append kernel "/lib")) ;for Hurd's libihash
-                #t))
-            ,phases))))
-
-      ;; Shadow the native "kernel-headers" because glibc's recipe expects the
-      ;; "kernel-headers" input to point to the right thing.
-      (propagated-inputs `(("kernel-headers" ,xheaders)))
-
-      ;; FIXME: 'static-bash' should really be an input, not a native input, but
-      ;; to do that will require building an intermediate cross libc.
-      (inputs '())
-
-      (native-inputs `(("cross-gcc" ,xgcc)
-                       ("cross-binutils" ,xbinutils)
-                       ,@(if (string-match (or "i586-pc-gnu" "i586-gnu") target)
-                             `(("cross-mig"
-                                ,@(assoc-ref (package-native-inputs xheaders)
-                                             "cross-mig")))
-                             '())
-                       ,@(package-inputs libc)     ;FIXME: static-bash
-                       ,@(package-native-inputs libc))))))
+  (if (cross-newlib? target)
+      (native-libc target)
+      (let ((libc (cross-libc-for-target target)))
+        (package (inherit libc)
+          (name (string-append "glibc-cross-" target))
+          (arguments
+           (substitute-keyword-arguments
+               `(;; Disable stripping (see above.)
+                 #:strip-binaries? #f
+
+                 ;; This package is used as a target input, but it should not have
+                 ;; the usual cross-compilation inputs since that would include
+                 ;; itself.
+                 #:implicit-cross-inputs? #f
+
+                 ;; We need SRFI 26.
+                 #:modules ((guix build gnu-build-system)
+                            (guix build utils)
+                            (srfi srfi-26))
+
+                 ,@(package-arguments libc))
+             ((#:configure-flags flags)
+              `(cons ,(string-append "--host=" target)
+                   ,flags))
+             ((#:phases phases)
+              `(alist-cons-before
+                'configure 'set-cross-kernel-headers-path
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let* ((kernel (assoc-ref inputs "kernel-headers"))
+                         (cpath (string-append kernel "/include")))
+                    (for-each (cut setenv <> cpath)
+                              ',%gcc-cross-include-paths)
+                    (setenv "CROSS_LIBRARY_PATH"
+                            (string-append kernel "/lib")) ;for Hurd's libihash
+                    #t))
+                ,phases))))
+
+          ;; Shadow the native "kernel-headers" because glibc's recipe expects the
+          ;; "kernel-headers" input to point to the right thing.
+          (propagated-inputs `(("kernel-headers" ,xheaders)))
+
+          ;; FIXME: 'static-bash' should really be an input, not a native input, but
+          ;; to do that will require building an intermediate cross libc.
+          (inputs '())
+
+          (native-inputs `(("cross-gcc" ,xgcc)
+                           ("cross-binutils" ,xbinutils)
+                           ,@(if (hurd-triplet? target)
+                                 `(("cross-mig"
+                                    ,@(assoc-ref (package-native-inputs xheaders)
+                                                 "cross-mig")))
+                                 '())
+                           ,@(package-inputs libc)     ;FIXME: static-bash
+                           ,@(package-native-inputs libc)))))))
+
+(define (native-libc target)
+  (if (target-mingw? target)
+      mingw-w64
+      glibc))
+
+(define (cross-newlib? target)
+  (not (eq? (native-libc target) glibc)))
 
 
 ;;; Concrete cross tool chains are instantiated like this:
diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index c7445a1eba..e4a8a4bd54 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -56,7 +56,7 @@
 (define-public libsodium
   (package
     (name "libsodium")
-    (version "1.0.10")
+    (version "1.0.11")
     (source (origin
             (method url-fetch)
             (uri (list (string-append
@@ -67,7 +67,7 @@
                         "releases/old/libsodium-" version ".tar.gz")))
             (sha256
              (base32
-              "1gn45g956lyz8l6iq187yc6l627vyivyp8qc5dkr6dnhdnlqddvi"))))
+              "0rf7z6bgpnf8lyz8sph4h43fbb28pmj4dgybf0hsxxj97kdljid1"))))
     (build-system gnu-build-system)
     (synopsis "Portable NaCl-based crypto library")
     (description
diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index 0a8a10ecb4..baa77f7aac 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -416,7 +416,7 @@ device-specific programs to convert and print many types of files.")
     (inputs `(("libjpeg" ,libjpeg)
               ("cups-minimal" ,cups-minimal)
               ("libusb" ,libusb)
-              ("sane-backends" ,sane-backends)
+              ("sane-backends" ,sane-backends-minimal)
               ("dbus" ,dbus)
               ("python-wrapper" ,python-wrapper)
               ("python" ,python)
diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm
index 790f542a52..7329d870de 100644
--- a/gnu/packages/curl.scm
+++ b/gnu/packages/curl.scm
@@ -40,7 +40,7 @@
 (define-public curl
   (package
    (name "curl")
-   (replacement curl-7.51.0)
+   (replacement curl-7.52.1)
    (version "7.50.3")
    (source (origin
             (method url-fetch)
@@ -119,17 +119,17 @@ authentication (Basic, Digest, NTLM, Negotiate, kerberos...), proxy
 tunneling, and so on.")
    (license (license:non-copyleft "file://COPYING"
                                   "See COPYING in the distribution."))
-   (home-page "http://curl.haxx.se/")))
+   (home-page "https://curl.haxx.se/")))
 
-(define curl-7.51.0
+(define curl-7.52.1
   (package
     (inherit curl)
     (source
-      (let ((version "7.51.0"))
+      (let ((version "7.52.1"))
         (origin
           (method url-fetch)
           (uri (string-append "https://curl.haxx.se/download/curl-"
                               version ".tar.lzma"))
           (sha256
            (base32
-            "0605f28m2kxjcxrcfcv1ja353gv167lwyxjc3xizqbwppdmmzvwy")))))))
+            "0r937wplchjxifxqqcjxd9rzp6l9rqqdfjn41x1y4djrh95nsa24")))))))
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 2f46c2a4ec..c5e8599028 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -210,7 +210,7 @@ SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
 (define-public mysql
   (package
     (name "mysql")
-    (version "5.7.16")
+    (version "5.7.17")
     (source (origin
              (method url-fetch)
              (uri (list (string-append
@@ -222,7 +222,7 @@ SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
                           name "-" version ".tar.gz")))
              (sha256
               (base32
-               "198qhd9bdm0fnpp307mgby2aar92yzya0937kxi7bcpdfjcvada9"))))
+               "0lcn9cm36n14g22bcppq5vf4nxbrl3khvlsp9hsixqdfb3l27gyf"))))
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags
@@ -285,7 +285,7 @@ Language.")
 (define-public mariadb
   (package
     (name "mariadb")
-    (version "10.1.19")
+    (version "10.1.20")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://downloads.mariadb.org/f/"
@@ -293,7 +293,7 @@ Language.")
                                   name "-" version ".tar.gz"))
               (sha256
                (base32
-                "108s4mimdbmgmmn5pcr9a405j70cyny9adzv49s75lg22krp74sv"))))
+                "1fd0kfw94iyprf0466kjw5mwmj4ky0i997lz6499jkb79pr86kn2"))))
     (build-system cmake-build-system)
     (arguments
      '(#:configure-flags
@@ -601,7 +601,7 @@ extremely small.")
 (define-public perl-dbix-class
   (package
     (name "perl-dbix-class")
-    (version "0.082810")
+    (version "0.082840")
     (source
      (origin
        (method url-fetch)
@@ -609,7 +609,7 @@ extremely small.")
                            "DBIx-Class-" version ".tar.gz"))
        (sha256
         (base32
-         "1zlsswk8j2k024gwhdhia8ksrmb8065n98dahkk8c0r69wv85n04"))))
+         "1vw1f756g8m5hq11nqf5dk2cw2y4mqq91ca5p75fn5g3fp8syja0"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
@@ -655,7 +655,7 @@ single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
 (define-public perl-dbix-class-cursor-cached
   (package
     (name "perl-dbix-class-cursor-cached")
-    (version "1.001002")
+    (version "1.001004")
     (source
      (origin
        (method url-fetch)
@@ -663,7 +663,7 @@ single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
                            "DBIx-Class-Cursor-Cached-" version ".tar.gz"))
        (sha256
         (base32
-         "19r7jr6pknxiirrybq0cd0lnr76xiw05arnfqgk9nrhp6c7vvil0"))))
+         "09b2jahn2x12qm4f7qm1jzsxbz7qn1czp6a3fnl5l2i3l4r5421p"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-cache-cache" ,perl-cache-cache)
@@ -680,15 +680,15 @@ built-in caching support.")
 (define-public perl-dbix-class-introspectablem2m
   (package
     (name "perl-dbix-class-introspectablem2m")
-    (version "0.001001")
+    (version "0.001002")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "mirror://cpan/authors/id/G/GR/GRODITI/"
+       (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
                            "DBIx-Class-IntrospectableM2M-" version ".tar.gz"))
        (sha256
         (base32
-         "0p9zx1yc1f6jg583l206wilsni2v8mlngc2vf2q8yn10pmy4y6wm"))))
+         "1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
     (build-system perl-build-system)
     (propagated-inputs
      `(("perl-dbix-class" ,perl-dbix-class)))
@@ -705,7 +705,7 @@ introspected and examined.")
 (define-public perl-dbix-class-schema-loader
   (package
     (name "perl-dbix-class-schema-loader")
-    (version "0.07042")
+    (version "0.07046")
     (source
      (origin
        (method url-fetch)
@@ -713,7 +713,7 @@ introspected and examined.")
                            "DBIx-Class-Schema-Loader-" version ".tar.gz"))
        (sha256
         (base32
-         "0sb48as7azmj6s4acxh98wcvcik7lxm7dcjz1c3wdrkrbmbbz0jf"))))
+         "08cgn0dx42y9xsxas9np7s55a7qmy4kf6sfmx0jmk4hryvbapml3"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-config-any" ,perl-config-any)
@@ -784,15 +784,15 @@ columns, primary keys, unique constraints and relationships.")
 (define-public perl-dbd-mysql
   (package
     (name "perl-dbd-mysql")
-    (version "4.039")
+    (version "4.041")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "mirror://cpan/authors/id/C/CA/CAPTTOFU/"
+       (uri (string-append "mirror://cpan/authors/id/M/MI/MICHIELB/"
                            "DBD-mysql-" version ".tar.gz"))
        (sha256
         (base32
-         "0k4p3bjdbmxm2amb0qiiwmn8v83zrjkz5qp84xdjrg8k5v9aj0hn"))))
+         "0h4h6zwzj8fwh9ljb8svnsa0a3ch4p10hp59kpdibdb4qh8xwxs7"))))
     (build-system perl-build-system)
     ;; Tests require running MySQL server
     (arguments `(#:tests? #f))
@@ -808,7 +808,7 @@ columns, primary keys, unique constraints and relationships.")
 (define-public perl-dbd-sqlite
   (package
     (name "perl-dbd-sqlite")
-    (version "1.42")
+    (version "1.52")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -816,7 +816,7 @@ columns, primary keys, unique constraints and relationships.")
                     version ".tar.gz"))
               (sha256
                (base32
-                "14x9cjsc8dz8ad1nad0bqiq9cbk1rjfb8h5y0rpk3pdl38y6afxb"))))
+                "0kimb2qr1rh07yylbbfybwcizpmy61ck667amypn4clmkfg0knm6"))))
     (build-system perl-build-system)
     (inputs `(("sqlite" ,sqlite)))
     (propagated-inputs `(("perl-dbi" ,perl-dbi)))
diff --git a/gnu/packages/dav.scm b/gnu/packages/dav.scm
index 835b8fcf39..dd03d8964b 100644
--- a/gnu/packages/dav.scm
+++ b/gnu/packages/dav.scm
@@ -35,13 +35,7 @@
                "1c5lv8qca21mndkx350wxv34qypqh6gb4rhzms4anr642clq3jg2"))))
     (build-system python-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (replace 'check
-           (lambda _
-             (zero? (system* "py.test")))))))
-    (native-inputs
-     `(("python-pytest" ,python-pytest)))
+     '(#:tests? #f)) ; The tests are not distributed in the PyPi release.
     (propagated-inputs
       ;; TODO: Add python-pam
      `(("python-requests" ,python-requests)))
@@ -60,24 +54,21 @@ clients.")
 (define-public vdirsyncer
   (package
     (name "vdirsyncer")
-    (version "0.14.0")
+    (version "0.14.1")
     (source (origin
              (method url-fetch)
              (uri (pypi-uri name version))
              (sha256
               (base32
-               "1mbh2gykx9sqsnyfa962ifxksx4afl2lb9rcsbd6rsh3gj2il898"))))
+               "044f01fjd8dpz4y9dm3qcc1a8cihcxxbr1sz6y6fkvglpb6k85y5"))))
     (build-system python-build-system)
     (arguments
       `(#:phases (modify-phases %standard-phases
          ;; vdirsyncer requires itself to be installed in order to build
          ;; the manpage.
          (add-after 'install 'manpage
-           (lambda* (#:key outputs #:allow-other-keys)
-             (setenv "PYTHONPATH"
-                     (string-append
-                       (getenv "PYTHONPATH")
-                       ":" (assoc-ref outputs "out")))
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (add-installed-pythonpath inputs outputs)
              (zero? (system* "make" "--directory=docs/" "man"))
              (install-file
                "docs/_build/man/vdirsyncer.1"
diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index 54ed5cd36a..b7d6bbc0eb 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -314,3 +314,25 @@ no race conditions.")
       ;; and patched GNU Make is under its own license.
       (license (list (non-copyleft "COPYING.md")
                      (package-license gnu-make))))))
+
+(define-public zzuf
+  (package
+    (name "zzuf")
+    (version "0.15")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://github.com/samhocevar/zzuf/releases/download/v"
+             version "/" name "-" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1mpzjaksc2qg2hzqflf39pl06p53qam2dn3hkhkcv6p00d2n4kx3"))))
+    (build-system gnu-build-system)
+    (home-page "https://github.com/samhocevar/zzuf")
+    (synopsis "Transparent application input fuzzer")
+    (description "Zzuf is a transparent application input fuzzer.  It works by
+intercepting file operations and changing random bits in the program's
+input.  Zzuf's behaviour is deterministic, making it easy to reproduce bugs.")
+    (license (non-copyleft "http://www.wtfpl.net/txt/copying/"))))
diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index 4afd2c2df3..a4bb0be134 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
+;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27,6 +28,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
   #:use-module (gnu packages docbook)
@@ -197,6 +199,40 @@ to recover data more efficiently by only reading the necessary blocks.")
 which respectively make and check MS-DOS FAT file systems.")
     (license license:gpl3+)))
 
+(define dosfstools/static
+  (static-package
+   (package (inherit dosfstools))))
+
+(define-public fatfsck/static
+  (package
+    (name "fatfsck-static")
+    (version (package-version dosfstools))
+    (build-system trivial-build-system)
+    (source #f)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (let ((src (string-append (assoc-ref %build-inputs "dosfstools")
+                                   "/sbin"))
+               (exe "fsck.fat")
+               (bin (string-append (assoc-ref %outputs "out") "/sbin")))
+           (mkdir-p bin)
+           (with-directory-excursion bin
+             (copy-file (string-append src "/" exe) exe)
+             (remove-store-references exe)
+             (chmod exe #o555)
+             ;; Add fsck.vfat symlink to match the Linux driver name.
+             (symlink exe "fsck.vfat")
+             #t)))))
+    (inputs `(("dosfstools" ,dosfstools/static)))
+    (home-page (package-home-page dosfstools))
+    (synopsis "Statically linked fsck.fat from dosfstools")
+    (description "This package provides a statically-linked @command{fsck.fat}
+and a @command{fsck.vfat} compatibility symlink for use in an initrd.")
+    (license (package-license dosfstools))))
+
 (define-public sdparm
   (package
     (name "sdparm")
diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm
index 0eca94550b..80b45af103 100644
--- a/gnu/packages/display-managers.scm
+++ b/gnu/packages/display-managers.scm
@@ -235,7 +235,7 @@ create smooth, animated user interfaces.")
        #:tests? #f))
 
     ;; This used to be at <http://slim.berlios.de/>.
-    (home-page "http://sourceforge.net/projects/slim.berlios/")
+    (home-page "https://sourceforge.net/projects/slim.berlios/")
     (synopsis "Desktop-independent graphical login manager for X11")
     (description
      "SLiM is a Desktop-independent graphical login manager for X11, derived
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index f56ed58363..bbb2d71db1 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -54,10 +54,6 @@
                      (string-append ".:" (getenv "PYTHONPATH")))
              (zero? (system* "python" "tests/runtests.py")))))))
     ;; TODO: Install extras/django_bash_completion.
-    (propagated-inputs
-     ;; Django uses 'pkg_resources' (part of setuptools) to locate templates
-     ;; at run-time.
-     `(("python-setuptools" ,python-setuptools)))
     (native-inputs
      `(("tzdata", tzdata)
        ;; bcrypt and argon2-cffi are extra requirements not yet in guix
@@ -112,8 +108,6 @@ to the @dfn{don't repeat yourself} (DRY) principle.")
     (build-system python-build-system)
     (propagated-inputs
      `(("python-django" ,python-django)))
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/alsoicode/django-simple-math-captcha")
     (synopsis "Easy-to-use math field/widget captcha for Django forms")
     (description
@@ -147,23 +141,16 @@ with arguments to the field constructor.")
     (native-inputs
      `(("python-django" ,python-django)
        ("python-setuptools-scm" ,python-setuptools-scm)))
-    (inputs
-     `(("python-py" ,python-py)
-       ("python-pytest" ,python-pytest)))
+    (propagated-inputs
+     `(("python-pytest" ,python-pytest)))
     (home-page "http://pytest-django.readthedocs.org/")
     (synopsis "Django plugin for py.test")
     (description "Pytest-django is a plugin for py.test that provides a set of
 useful tools for testing Django applications and projects.")
-    (properties `((python2-variant . ,(delay python2-pytest-django))))
     (license license:bsd-3)))
 
 (define-public python2-pytest-django
-  (let ((base (package-with-python2
-                (strip-python2-variant python-pytest-django))))
-    (package (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-pytest-django))
 
 (define-public python-django-filter
   (package
@@ -186,13 +173,7 @@ useful tools for testing Django applications and projects.")
 some of the more mundane bits of view code.  Specifically, it allows users to
 filter down a queryset based on a model’s fields, displaying the form to let
 them do this.")
-    (properties `((python2-variant . ,(delay python2-django-filter))))
     (license license:bsd-3)))
 
 (define-public python2-django-filter
-  (let ((base (package-with-python2
-                (strip-python2-variant python-django-filter))))
-    (package (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-django-filter))
diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index b49a0b7392..55cfc02e95 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -26,7 +27,9 @@
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages databases)
+  #:use-module (gnu packages crypto)
   #:use-module (gnu packages groff)
+  #:use-module (gnu packages libevent)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
@@ -134,6 +137,97 @@ high-volume and high-reliability applications. The name BIND stands for
     (home-page "https://www.isc.org/downloads/bind")
     (license (list license:isc))))
 
+(define-public dnscrypt-proxy
+  (package
+    (name "dnscrypt-proxy")
+    (version "1.8.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://download.dnscrypt.org/dnscrypt-proxy/"
+                    "dnscrypt-proxy-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1dz0knslf7ysc2xx33ljrdlqyr4b0fpm9ifrwvwgcjaxgh94l7m8"))
+              (modules '((guix build utils)))
+              (snippet
+               ;; Delete bundled libltdl. XXX: This package also bundles
+               ;; a modified libevent that cannot currently be removed.
+               '(delete-file-recursively "libltdl"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'autoreconf
+           (lambda _
+             ;; Re-generate build files due to unbundling ltdl.
+             ;; TODO: Prevent generating new libltdl and building it.
+             ;; The system version is still favored and referenced.
+             (zero? (system* "autoreconf" "-vif")))))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("automake" ,automake)
+       ("autoconf" ,autoconf)
+       ("libtool" ,libtool)))
+    (inputs
+     `(("libltdl" ,libltdl)
+       ("libsodium" ,libsodium)))
+    (home-page "https://www.dnscrypt.org/")
+    (synopsis "Securely send DNS requests to a remote server")
+    (description
+     "@command{dnscrypt-proxy} is a tool for securing communications
+between a client and a DNS resolver.  It verifies that responses you get
+from a DNS provider was actually sent by that provider, and haven't been
+tampered with.  For optimal performance it is recommended to use this as
+a forwarder for a caching DNS resolver such as @command{dnsmasq}, but it
+can also be used as a normal DNS \"server\".  A list of public dnscrypt
+servers is included, and an up-to-date version is available at
+@url{https://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-resolvers.csv}.")
+    (license (list license:isc
+                   ;; Libevent and src/ext/queue.h is 3-clause BSD.
+                   license:bsd-3))))
+
+(define-public dnscrypt-wrapper
+  (package
+    (name "dnscrypt-wrapper")
+    (version "0.2.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/cofyc/dnscrypt-wrapper/releases"
+                    "/download/v" version "/" name "-v" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1vhg4g0r687f51wcdn7z9w1hxapazx6vyh5rsr8wa48sljzd583g"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags '("CC=gcc")
+       ;; TODO: Tests require ruby-cucumber and ruby-aruba.
+       #:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'create-configure
+           (lambda _
+             (zero? (system* "make" "configure")))))))
+    (native-inputs
+     `(("autoconf" ,autoconf)))
+    (inputs
+     `(("libevent" ,libevent)
+       ("libsodium" ,libsodium)))
+    (home-page "https://github.com/Cofyc/dnscrypt-wrapper")
+    (synopsis "Server-side dnscrypt proxy")
+    (description
+     "@command{dnscrypt-wrapper} is a tool to expose a name server over
+the @code{dnscrypt} protocol.  It can be used as an endpoint for the
+@command{dnscrypt-proxy} client to securely tunnel DNS requests between
+the two.")
+    (license (list license:isc
+                   ;; Bundled argparse is MIT. TODO: package and unbundle.
+                   license:expat
+                   ;; dns-protocol.h and rfc1035.{c,h} is gpl2 or gpl3 (either).
+                   license:gpl2
+                   license:gpl3))))
+
 (define-public libasr
   (package
     (name "libasr")
@@ -167,15 +261,17 @@ asynchronous fashion.")
 (define-public yadifa
   (package
     (name "yadifa")
-    (version "2.2.1-6281")
+    (version "2.2.3")
     (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "http://cdn.yadifa.eu/sites/default/files/releases/"
-                           name "-" version ".tar.gz"))
-       (sha256
-        (base32
-         "0vj71z7i9lfbnp93k28aplwldp5mfli0kvrbwmha6fjha6kcr910"))))
+     (let ((revision "6711"))
+       (origin
+         (method url-fetch)
+         (uri
+          (string-append "http://cdn.yadifa.eu/sites/default/files/releases/"
+                         name "-" version "-" revision ".tar.gz"))
+         (sha256
+          (base32
+           "0ikfm40gx0zjw3gnxsw3rn1k4wb8jacgklja3ygcj1knq6hy2zaa")))))
     (build-system gnu-build-system)
     (native-inputs
      `(("which" ,which)))
@@ -189,6 +285,8 @@ asynchronous fashion.")
        #:configure-flags (list "--sysconfdir=/etc"      "--localstatedir=/var"
                                "--enable-shared"        "--disable-static"
                                "--enable-messages"      "--enable-ctrl"
+                               "--enable-nsec"          "--enable-nsec3"
+                               "--enable-tsig"          "--enable-caching"
                                ;; NSID is a rarely-used debugging aid, that also
                                ;; causes the build to fail. Just disable it.
                                "--disable-nsid")))
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 3d18d459bd..067ad1c3b0 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -132,14 +132,14 @@ by no means limited to these applications.)  This package provides XML DTDs.")
 (define-public docbook-xsl
   (package
     (name "docbook-xsl")
-    (version "1.78.1")
+    (version "1.79.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/docbook/docbook-xsl/"
                                   version "/docbook-xsl-" version ".tar.bz2"))
               (sha256
                (base32
-                "0rxl013ncmz1n6ymk2idvx3hix9pdabk8xn01cpcv32wmfb753y9"))))
+                "0s59lihif2fr7rznckxr2kfyrvkirv76r1zvidp9b5mj28p4apvj"))))
     (build-system trivial-build-system)
     (arguments
      `(#:builder (let ((name-version (string-append ,name "-" ,version)))
@@ -173,7 +173,7 @@ by no means limited to these applications.)  This package provides XML DTDs.")
 (define-public dblatex
   (package
     (name "dblatex")
-    (version "0.3.5")
+    (version "0.3.9")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/dblatex/dblatex/"
@@ -181,18 +181,26 @@ by no means limited to these applications.)  This package provides XML DTDs.")
                                   version ".tar.bz2"))
               (sha256
                (base32
-                "0h3472n33pabrn8qwggsahkrjx8lybpwlc3zprby3w3w3x5i830f"))))
+                "0pdizc5rjywwzxa1qqhdmba5zr35pbmdwbysalsid7xw87w3kq06"))))
     (build-system python-build-system)
     ;; TODO: Add xfig/transfig for fig2dev utility
     (inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("texlive" ,texlive)
+     `(("texlive" ,texlive)
        ("imagemagick" ,imagemagick)     ;for convert
        ("inkscape" ,inkscape)           ;for svg conversion
        ("docbook" ,docbook-xml)
        ("libxslt" ,libxslt)))           ;for xsltproc
     (arguments
      `(#:python ,python-2               ;'print' syntax
+       ;; Using setuptools causes an invalid "package_base" path in
+       ;; out/bin/.dblatex-real due to a missing leading '/'.  This is caused
+       ;; by dblatex's setup.py stripping the root path when creating the
+       ;; script.  (dblatex's setup.py still uses distutils and thus has to
+       ;; create the script by itself. The feature for creating scripts is one
+       ;; of setuptools' features.)
+       ;; See this thread for details:
+       ;; https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00030.html
+       #:use-setuptools? #f
        #:tests? #f                      ;no 'test' command
        #:phases
        (alist-cons-after
diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm
index 0760001da7..3cfdb7ef55 100644
--- a/gnu/packages/docker.scm
+++ b/gnu/packages/docker.scm
@@ -42,7 +42,6 @@
     (arguments '(#:tests? #f))
     (inputs
      `(("python-requests" ,python-requests)
-       ("python-setuptools" ,python-setuptools)
        ("python-six" ,python-six)
        ("python-websocket-client" ,python-websocket-client)))
     (home-page "https://github.com/docker/docker-py/")
@@ -93,7 +92,6 @@ client.")
        ("python-jsonschema" ,python-jsonschema)
        ("python-pyyaml" ,python-pyyaml)
        ("python-requests" ,python-requests-2.7)
-       ("python-setuptools" ,python-setuptools)
        ("python-six" ,python-six)
        ("python-texttable" ,python-texttable)
        ("python-websocket-client" ,python-websocket-client)))
diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm
index ad1871688e..0a53e6ca99 100644
--- a/gnu/packages/ebook.scm
+++ b/gnu/packages/ebook.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015, 2016 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
+;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -61,7 +61,7 @@
 (define-public calibre
   (package
     (name "calibre")
-    (version "2.63.0")
+    (version "2.76.0")
     (source
       (origin
         (method url-fetch)
@@ -70,7 +70,7 @@
                             version ".tar.xz"))
         (sha256
          (base32
-          "1rwgv6rsmy3ljfwcpv42w203ghngw86s5kzb0yjm1zgsxmas2wh6"))
+          "1xfm586n6gm44mkyn25mbiyhj6w9ji9yl6fvmnr4zk1q6qcga3v8"))
         ;; Remove non-free or doubtful code, see
         ;; https://lists.gnu.org/archive/html/guix-devel/2015-02/msg00478.html
         (modules '((guix build utils)))
@@ -83,7 +83,7 @@
     (build-system python-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
-       ("qt" ,qt) ; for qmake
+       ("qtbase" ,qtbase) ; for qmake
        ;; xdg-utils is supposed to be used for desktop integration, but it
        ;; also creates lots of messages
        ;; mkdir: cannot create directory '/homeless-shelter': Permission denied
@@ -118,14 +118,16 @@
        ("python2-mechanize" ,python2-mechanize)
        ("python2-netifaces" ,python2-netifaces)
        ("python2-pillow" ,python2-pillow)
-       ("python2-pyqt" ,python2-pyqt-5.5)
+       ("python2-pyqt" ,python2-pyqt)
        ("python2-sip" ,python2-sip)
-       ("qt" ,qt)
        ("sqlite" ,sqlite)))
     (arguments
      `(#:python ,python-2
        #:test-target "check"
        #:tests? #f ; FIXME: enable once flake8 is packaged
+       ;; Calibre is using setuptools by itself, but the setup.py is not
+       ;; compatible with the shim wrapper (taken from pip) we are using.
+       #:use-setuptools? #f
        #:phases
        (modify-phases %standard-phases
          (add-before 'build 'configure
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index c1f12667a3..7b476e1a0a 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com>
 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2014, 2015, 2016 Alex Kost <alezost@gmail.com>
+;;; Copyright © 2014, 2015, 2016, 2017 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
 ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
@@ -273,7 +273,7 @@ editor (without an X toolkit)" )
                                  "/geiser-" version ".tar.gz"))
              (sha256
               (base32
-               "1n772ysl1dmn0vy3gk230ymyjm14h93zw99y6h2rqp1ixy7v43dm"))))
+               "0phz9d8wjk4p13vqannv0003fwh8qqrp0gfzcs2hgq1mrmv1srss"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases (alist-cons-after
@@ -298,36 +298,8 @@ metadata.")
     (license license:bsd-3)))
 
 (define-public geiser-next
-  ;; Geiser's upcoming version supports Chibi and Chez, while it was forgot to
-  ;; include some required files in 0.9.  When the next Geiser release comes
-  ;; out, we can remove this.
-  (let ((commit "16035b9fa475496f7f89a57fa81455057af749a0")
-        (revision "1"))
-    (package
-      (inherit geiser)
-      (name "geiser-next")
-      (version (string-append "0.9-" revision "." (string-take commit 7)))
-      (source (origin
-                (method git-fetch)
-                (file-name (string-append name "-" version ".tar.gz"))
-                (uri (git-reference
-                      (url "git://git.sv.gnu.org/geiser.git")
-                      (commit commit)))
-                (sha256
-                 (base32
-                  "1rrafizrhjkai0msryjiz4c5dcdyihf0i2wmgiy8br74rwbxpyl5"))))
-      (native-inputs
-       `(("autoconf" ,autoconf)
-         ("automake" ,automake)
-         ("texinfo" ,texinfo)
-         ,@(package-native-inputs geiser)))
-      (arguments
-       (substitute-keyword-arguments (package-arguments geiser)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'autogen
-               (lambda _
-                 (zero? (system* "sh" "autogen.sh")))))))))))
+  ;; This has become "geiser".
+  (deprecated-package "geiser-next" geiser))
 
 (define-public paredit
   (package
@@ -426,7 +398,7 @@ configuration files, such as .gitattributes, .gitignore, and .git/config.")
 (define-public emacs-with-editor
   (package
     (name "emacs-with-editor")
-    (version "2.5.6")
+    (version "2.5.9")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -435,7 +407,7 @@ configuration files, such as .gitattributes, .gitignore, and .git/config.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "14vypqj3wqym5yd0nggfm1xdgq5hv1kwxkg6i8ymlpxcdfxj45w7"))))
+                "0znfznyqr360ryi7za9szbz1l5236v2cig25s4k7kkw0w8828xzh"))))
     (build-system emacs-build-system)
     (propagated-inputs
      `(("emacs-dash" ,emacs-dash)))
@@ -451,7 +423,7 @@ on stdout instead of using a socket as the Emacsclient does.")
 (define-public magit
   (package
     (name "magit")
-    (version "2.8.0")
+    (version "2.10.0")
     (source (origin
              (method url-fetch)
              (uri (string-append
@@ -459,7 +431,7 @@ on stdout instead of using a socket as the Emacsclient does.")
                    version "/" name "-" version ".tar.gz"))
              (sha256
               (base32
-               "1znvb7inwinrhifqzwp4lp9j6yp1l25j7riczc0zmvcjbpl5yhfq"))))
+               "1w74vy46z922kfs7gjkrng7wjpi481calpasqmjzpn3hqvgsd5d1"))))
     (build-system gnu-build-system)
     (native-inputs `(("texinfo" ,texinfo)
                      ("emacs" ,emacs-minimal)))
@@ -587,7 +559,7 @@ support for Git-SVN.")
               (file-name (string-append "magit-popup-" version ".el"))
               (sha256
                (base32
-                "0lmw824zp8c0vhikfkiay9wn4nmaksz6mfy0fldvy4wlx5c26yh3"))))
+                "0s04jnskmggwn69ln05qfwwa32va0q5ri7dwx917wkqz17w5zi62"))))
     (build-system emacs-build-system)
     (propagated-inputs
      `(("emacs-dash" ,emacs-dash)))
@@ -897,14 +869,14 @@ provides an optional IDE-like error list.")
 (define-public emms
   (package
     (name "emacs-emms")
-    (version "4.1")
+    (version "4.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/emms/emms-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0ay6631p3dr6xnhkm7skwn0gp317r1mxbip28m126w4zqf05cbh3"))
+                "1xa9y64g5z8gfnxk1c2rf3plfjhqn4r6j8dpiygnfs6w4giysn22"))
               (modules '((guix build utils)))
               (snippet
                '(substitute* "Makefile"
@@ -974,22 +946,19 @@ provides an optional IDE-like error list.")
                     (string-append "\"" mp3info "/bin/mp3info\"")))))))
          (add-before 'install 'pre-install
            (lambda* (#:key outputs #:allow-other-keys)
-             ;; The 'install' rule expects the target directory to exist.
+             ;; The 'install' rule expects the target directories to exist.
              (let* ((out  (assoc-ref outputs "out"))
+                    (bin  (string-append out "/bin"))
                     (man1 (string-append out "/share/man/man1")))
+               (mkdir-p bin)
                (mkdir-p man1)
                #t)))
          (add-after 'install 'post-install
            (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out    (assoc-ref outputs "out"))
-                    (target (string-append
-                             out "/bin/emms-print-metadata")))
+             (let ((out (assoc-ref outputs "out")))
                (symlink "emms-auto.el"
                         (string-append out "/share/emacs/site-lisp/"
-                                       "emms-autoloads.el"))
-               (mkdir-p (dirname target))
-               (copy-file "src/emms-print-metadata" target)
-               (chmod target #o555)))))
+                                       "emms-autoloads.el"))))))
        #:tests? #f))
     (native-inputs `(("emacs" ,emacs-minimal)    ;for (guix build emacs-utils)
                      ("texinfo" ,texinfo)))
@@ -1276,6 +1245,83 @@ and stored in memory.")
     (description "This package provides a modern list API library for Emacs.")
     (license license:gpl3+)))
 
+(define-public emacs-bui
+  (package
+    (name "emacs-bui")
+    (version "1.0.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/alezost/bui.el/archive/v"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0vsh1v99xxm6hhqp0vg9fbs230kawa7xb5dnd8fidf3vwm622aqh"))))
+    (build-system emacs-build-system)
+    (propagated-inputs
+     `(("dash" ,emacs-dash)))
+    (home-page "https://github.com/alezost/bui.el")
+    (synopsis "Buffer interface library for Emacs")
+    (description
+     "BUI (Buffer User Interface) is a library for making @code{list} and
+@code{info} interfaces to display an arbitrary data of the same
+type, for example: packages, buffers, files, etc.")
+    (license license:gpl3+)))
+
+(define-public emacs-guix
+  (package
+    (name "emacs-guix")
+    (version "0.2.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/alezost/guix.el"
+                                  "/releases/download/v" version
+                                  "/emacs-guix-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0nhx0c3xc16frpyqikaml73hjyn8a0jijq5ibq8a4zrjiw1pqxwy"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (let ((guix        (assoc-ref %build-inputs "guix"))
+             (geiser      (assoc-ref %build-inputs "geiser"))
+             (dash        (assoc-ref %build-inputs "dash"))
+             (bui         (assoc-ref %build-inputs "bui"))
+             (magit-popup (assoc-ref %build-inputs "magit-popup"))
+             (site-lisp   "/share/emacs/site-lisp"))
+         (list (string-append "--with-guix-site-dir="
+                              guix "/share/guile/site/2.0")
+               (string-append "--with-geiser-lispdir=" geiser site-lisp)
+               (string-append "--with-dash-lispdir="
+                              dash site-lisp "/guix.d/dash-"
+                              ,(package-version emacs-dash))
+               (string-append "--with-bui-lispdir="
+                              bui site-lisp "/guix.d/bui-"
+                              ,(package-version emacs-bui))
+               (string-append "--with-popup-lispdir="
+                              magit-popup site-lisp "/guix.d/magit-popup-"
+                              ,(package-version emacs-magit-popup))))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("emacs" ,emacs-minimal)))
+    (inputs
+     `(("guile" ,guile-2.0)
+       ("guix" ,guix)))
+    (propagated-inputs
+     `(("geiser" ,geiser)
+       ("dash" ,emacs-dash)
+       ("bui" ,emacs-bui)
+       ("magit-popup" ,emacs-magit-popup)))
+    (home-page "https://github.com/alezost/guix.el")
+    (synopsis "Emacs interface for GNU Guix")
+    (description
+     "Emacs-Guix provides a visual interface, tools and features for the GNU
+Guix package manager.  Particularly, it allows you to do various package
+management tasks from Emacs.  To begin with, run @code{M-x guix-about} or
+@code{M-x guix-help} command.")
+    (license license:gpl3+)))
+
 (define-public emacs-d-mode
   (package
     (name "emacs-d-mode")
@@ -1368,6 +1414,32 @@ strings.")
 files and directories.")
     (license license:gpl3+)))
 
+(define-public emacs-git-gutter
+  (package
+    (name "emacs-git-gutter")
+    (version "0.90")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append
+                   "https://github.com/syohex/" name "/archive/"
+                   version ".tar.gz"))
+             (file-name (string-append name "-" version ".tar.gz"))
+             (sha256
+              (base32
+               "1nmhvhpq1l56mj2yq3ag23rw3x4xgnsy8szp30s26l0yjnkhc4qg"))))
+    (build-system emacs-build-system)
+    (home-page "https://github.com/syohex/emacs-git-gutter")
+    (synopsis "See and manage hunks of text in a version control system")
+    (description
+     "This package is an Emacs minor mode for displaying and interacting with
+hunks of text managed in a version control system.  Added modified and deleted
+areas can be indicated with symbols on the edge of the buffer, and commands
+can be used to move between and perform actions on these hunks.
+
+Git, Mercurial, Subversion and Bazaar are supported, and many parts of the
+display and behaviour is easily customisable.")
+    (license license:gpl3+)))
+
 (define-public emacs-el-mock
   (package
     (name "emacs-el-mock")
@@ -1445,7 +1517,7 @@ mode, which displays information about Elasticsearch clusters.")
 (define-public emacs-expand-region
   (package
     (name "emacs-expand-region")
-    (version "0.10.0")
+    (version "0.11.0")
     (source
      (origin
        (method url-fetch)
@@ -1454,7 +1526,7 @@ mode, which displays information about Elasticsearch clusters.")
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "1zfiaqyb3zqiyqjkpqsjw660j09805nqsg25q6ars2h8gs0rnvxb"))))
+         "08dy1f411sh9wwww53rjw80idcf3vpki6ba2arl4hl5jcw9651g0"))))
     (build-system emacs-build-system)
     (home-page "https://github.com/magnars/expand-region.el")
     (synopsis "Increase selected region by semantic units")
@@ -2257,7 +2329,7 @@ dark background.")
 (define-public emacs-smartparens
   (package
     (name "emacs-smartparens")
-    (version "1.8.0")
+    (version "1.9.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2266,7 +2338,7 @@ dark background.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "0xsqiklg0q4w6gj0js1hvsz4lkypvcx6c9kzb1mz232gwlqx1azw"))))
+                "12065r7h1s9v8lnq5mk3654dkw4cq60ky8aniqq5n2ivv6qd2d4q"))))
     (build-system emacs-build-system)
     (propagated-inputs `(("emacs-dash" ,emacs-dash)))
     (home-page "https://github.com/Fuco1/smartparens")
@@ -2286,7 +2358,7 @@ well as completely new features.")
 (define-public emacs-hl-todo
   (package
     (name "emacs-hl-todo")
-    (version "1.7.1")
+    (version "1.7.4")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2295,7 +2367,7 @@ well as completely new features.")
               (file-name (string-append "hl-todo-" version ".el"))
               (sha256
                (base32
-                "0flhz9vy8w1vvwwji92pi5k4659hl368bakj2qf2zfd26z8x583h"))))
+                "016ivl4s0ysrm1xbfi86j5xcs759fcb0mkspxw81x8mpi3yb46ya"))))
     (build-system emacs-build-system)
     (home-page "https://github.com/tarsius/hl-todo")
     (synopsis "Emacs mode to highlight TODO and similar keywords")
@@ -3220,14 +3292,14 @@ passive voice.")
 (define-public emacs-org
   (package
     (name "emacs-org")
-    (version "20161118")
+    (version "20161224")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://elpa.gnu.org/packages/org-"
                                   version ".tar"))
               (sha256
                (base32
-                "1w9g8r08kaiw9f4fjsj0hbffzq85rj734j5lxvbaafbnz7dbklk1"))))
+                "0b10bjypn0w5ja776f8sxl1qpvb61iyz1n3c74jx6fqwypv7dmgi"))))
     (build-system emacs-build-system)
     (home-page "http://orgmode.org/")
     (synopsis "Outline-based notes management and organizer")
diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index bd064e618f..70de5e53b8 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 Theodoros Foradis <theodoros.for@openmailbox.org>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;;
@@ -30,7 +30,9 @@
   #:use-module (guix build utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages bison)
   #:use-module (gnu packages cross-base)
+  #:use-module (gnu packages dejagnu)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gdb)
@@ -369,3 +371,351 @@ language.")
       (description "OpenOCD provides on-chip programming and debugging support
 with a layered architecture of JTAG interface and TAP support.")
       (license license:gpl2+))))
+
+;; The commits for all propeller tools are the latest versions as published
+;; here: https://github.com/dbetz/propeller-gcc
+
+(define propeller-binutils
+  (let ((xbinutils (cross-binutils "propeller-elf"))
+        (commit "3bfba30076f8ce160a2f42914fdb68f24445fd44")
+        (revision "1"))
+    (package
+      (inherit xbinutils)
+      (name "propeller-binutils")
+      (version (string-append "0.0.0-" revision "." (string-take commit 9)))
+      (source (origin (inherit (package-source xbinutils))
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/totalspectrum/binutils-propeller.git")
+                      (commit commit)))
+                (file-name (string-append name "-" commit "-checkout"))
+                (sha256
+                 (base32
+                  "1v3rgxwj7b8817wy5ccf8621v75qcxvcxygk4acr3hbc6yqybr8h"))))
+      (arguments
+       `(;; FIXME: For some reason there are many test failures.  Some of them
+         ;; appear to be due to regular expression mismatch, but it's not
+         ;; obvious how to fix the failures.
+         #:tests? #f
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'patch-/bin/sh-in-tests
+             (lambda _
+               (substitute* '("sim/testsuite/Makefile.in"
+                              "sim/testsuite/mips64el-elf/Makefile.in"
+                              "sim/testsuite/d10v-elf/Makefile.in"
+                              "sim/testsuite/sim/cris/asm/badarch1.ms")
+                 (("/bin/sh") (which "sh")))
+               #t)))
+         ,@(package-arguments xbinutils)))
+      (native-inputs
+       `(("bison" ,bison)
+         ("flex" ,flex)
+         ("texinfo" ,texinfo)
+         ("dejagnu" ,dejagnu)
+         ,@(package-native-inputs xbinutils))))))
+
+(define-public propeller-gcc
+  (let ((xgcc (cross-gcc "propeller-elf"
+                         propeller-binutils))
+        (commit "b4f45a4725e0b6d0af59e594c4e3e35ca4105867")
+        (revision "1"))
+    (package (inherit xgcc)
+      (name "propeller-gcc")
+      (version (string-append "6.0.0-" revision "." (string-take commit 9)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/totalspectrum/gcc-propeller.git")
+                      (commit commit)))
+                (file-name (string-append name "-" commit "-checkout"))
+                (sha256
+                 (base32
+                  "0d9kdxm2fzanjqa7q5850kzbsfl0fqyaahxn74h6nkxxacwa11zb"))
+                (patches
+                 (append
+                  (origin-patches (package-source gcc-6))
+                  (search-patches "gcc-cross-environment-variables.patch")))))
+      (native-inputs
+       `(("flex" ,flex)
+         ,@(package-native-inputs xgcc)))
+      ;; All headers and cross libraries of the propeller toolchain are
+      ;; installed under the "propeller-elf" prefix.
+      (native-search-paths
+       (list (search-path-specification
+              (variable "CROSS_C_INCLUDE_PATH")
+              (files '("propeller-elf/include")))
+             (search-path-specification
+              (variable "CROSS_LIBRARY_PATH")
+              (files '("propeller-elf/lib")))))
+      (home-page "https://github.com/totalspectrum/gcc-propeller")
+      (synopsis "GCC for the Parallax Propeller"))))
+
+;; There is no release, so we take the latest version as referenced from here:
+;; https://github.com/dbetz/propeller-gcc
+(define-public proplib
+  (let ((commit "844741fe0ceb140ab2fdf9d0667f68c1c39c31da")
+        (revision "1"))
+    (package
+      (name "proplib")
+      (version (string-append "0.0.0-" revision "." (string-take commit 9)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/totalspectrum/proplib.git")
+                      (commit commit)))
+                (file-name (string-append name "-" commit "-checkout"))
+                (sha256
+                 (base32
+                  "0q7irf1x8iqx07n7lzksax9armrdkizs49swsz76nbks0mw67wiv"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f ; no tests
+         #:make-flags
+         (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+               (string-append "BUILD="  (getcwd) "/build"))
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (add-after 'unpack 'fix-Makefile
+             (lambda _
+               (substitute* "Makefile"
+                 ;; The GCC sources are not part of this package, so we cannot
+                 ;; install the out-of-tree license file.
+                 (("cp \\.\\..*") "")
+                 ;; Control the installation time of the headers.
+                 ((" install-includes") ""))
+               #t))
+           ;; The Makefile does not separate building from installation, so we
+           ;; have to create the target directories at build time.
+           (add-before 'build 'create-target-directories
+             (lambda* (#:key make-flags #:allow-other-keys)
+               (zero? (apply system* "make" "install-dirs" make-flags))))
+           (add-before 'build 'set-cross-environment-variables
+             (lambda* (#:key outputs #:allow-other-keys)
+               (setenv "CROSS_LIBRARY_PATH"
+                       (string-append (assoc-ref outputs "out")
+                                      "/propeller-elf/lib:"
+                                      (or (getenv "CROSS_LIBRARY_PATH") "")))
+               (setenv "CROSS_C_INCLUDE_PATH"
+                       (string-append (assoc-ref outputs "out")
+                                      "/propeller-elf/include:"
+                                      (or (getenv "CROSS_C_INCLUDE_PATH") "")))
+               #t))
+           (add-after 'build 'build-tiny
+             (lambda* (#:key make-flags #:allow-other-keys)
+               (zero? (apply system* "make" "tiny" make-flags))))
+           ;; The build of the tiny libraries depends on the includes to be
+           ;; available.  Since we set CROSS_C_INCLUDE_PATH to the output
+           ;; directory, we have to install the includes first.
+           (add-before 'build-tiny 'install-includes
+             (lambda* (#:key make-flags #:allow-other-keys)
+               (zero? (apply system* "make" "install-includes" make-flags))))
+           (add-after 'install 'install-tiny
+             (lambda* (#:key make-flags #:allow-other-keys)
+               (zero? (apply system* "make" "install-tiny" make-flags)))))))
+      (native-inputs
+       `(("propeller-gcc" ,propeller-gcc)
+         ("propeller-binutils" ,propeller-binutils)
+         ("perl" ,perl)))
+      (home-page "https://github.com/totalspectrum/proplib")
+      (synopsis "C library for the Parallax Propeller")
+      (description "This is a C library for the Parallax Propeller
+micro-controller.")
+      ;; Most of the code is released under the Expat license.  Some of the
+      ;; included code is public domain and some changes are BSD licensed.
+      (license license:expat))))
+
+(define-public propeller-toolchain
+  (package
+    (name "propeller-toolchain")
+    (version (package-version propeller-gcc))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments '(#:builder (mkdir %output)))
+    (propagated-inputs
+     `(("binutils" ,propeller-binutils)
+       ("libc" ,proplib)
+       ("gcc" ,propeller-gcc)))
+    (synopsis "Complete GCC tool chain for Propeller micro-controllers")
+    (description "This package provides a complete GCC tool chain for
+Propeller micro-controller development.")
+    (home-page (package-home-page propeller-gcc))
+    (license (package-license propeller-gcc))))
+
+(define-public openspin
+  (package
+    (name "openspin")
+    (version "1.00.78")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/parallaxinc/"
+                                  "OpenSpin/archive/" version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1k2dbz1v604g4r2d9qhckg2m8dnhiya760mbsqfsg4waxal87yb7"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-after 'unpack 'remove-timestamp
+           (lambda _
+             (substitute* "SpinSource/openspin.cpp"
+               ((" Compiled on.*$") "\\n\");"))
+             #t))
+         ;; Makefile does not include "install" target
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((bin (string-append (assoc-ref outputs "out")
+                                       "/bin")))
+               (mkdir-p bin)
+               (install-file "build/openspin" bin)
+               #t))))))
+    (home-page "https://github.com/parallaxinc/OpenSpin")
+    (synopsis "Spin/PASM compiler for the Parallax Propeller")
+    (description "OpenSpin is a compiler for the Spin/PASM language of the
+Parallax Propeller.  It was ported from Chip Gracey's original x86 assembler
+code.")
+    (license license:expat)))
+
+(define-public propeller-load
+  (let ((commit "ba9c0a7251cf751d8d292ae19ffa03132097c0c0")
+        (revision "1"))
+    (package
+      (name "propeller-load")
+      (version "3.4.0")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/dbetz/propeller-load.git")
+                      (commit commit)))
+                (file-name (string-append name "-" commit "-checkout"))
+                (sha256
+                 (base32
+                  "1qv3xaapl9fmj3zn58b60sprp4rnvnlpci8ci0pdrzkw6fhvx3pg"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f ; no tests
+         #:make-flags
+         (list "OS=linux"
+               (string-append "TARGET=" (assoc-ref %outputs "out")))
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure))))
+      (native-inputs
+       `(("openspin" ,openspin)
+         ("propeller-toolchain" ,propeller-toolchain)))
+      (home-page "https://github.com/dbetz/propeller-load")
+      (synopsis "Loader for Parallax Propeller micro-controllers")
+      (description "This package provides the tool @code{propeller-load} to
+upload binaries to a Parallax Propeller micro-controller.")
+      (license license:expat))))
+
+(define-public spin2cpp
+  (package
+    (name "spin2cpp")
+    (version "3.4.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/totalspectrum/spin2cpp/"
+                                  "archive/v" version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "00i8i0dspd5115ggkv5vx2xqb21l6y38wz0bakgby8n3b4k9xnk0"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ;; The tests assume that a micro-controller is connected.
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-before 'build 'set-cross-environment-variables
+           (lambda* (#:key inputs #:allow-other-keys)
+             (setenv "CROSS_LIBRARY_PATH"
+                     (string-append (assoc-ref inputs "propeller-toolchain")
+                                    "/propeller-elf/lib"))
+             (setenv "CROSS_C_INCLUDE_PATH"
+                     (string-append (assoc-ref inputs "propeller-toolchain")
+                                    "/propeller-elf/include"))
+             #t))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((bin (string-append (assoc-ref outputs "out")
+                                       "/bin")))
+               (for-each (lambda (file)
+                           (install-file (string-append "build/" file)
+                                         bin))
+                         '("testlex" "spin2cpp" "fastspin")))
+             #t)))))
+    (native-inputs
+     `(("bison" ,bison)
+       ("propeller-load" ,propeller-load)
+       ("propeller-toolchain" ,propeller-toolchain)))
+    (home-page "https://github.com/totalspectrum/spin2cpp")
+    (synopsis "Convert Spin code to C, C++, or PASM code")
+    (description "This is a set of tools for converting the Spin language for
+the Parallax Propeller micro-controller into C or C++ code, into PASM, or even
+directly into an executable binary.  The binaries produced use LMM PASM, so
+they are much faster than regular Spin bytecodes (but also quite a bit
+larger).")
+    (license license:expat)))
+
+(define-public spinsim
+  (let ((commit "66915a7ad1a3a2cf990a725bb341fab8d11eb620")
+        (revision "1"))
+    (package
+      (name "spinsim")
+      (version (string-append "0.75-" revision "." (string-take commit 9)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/parallaxinc/spinsim.git")
+                      (commit commit)))
+                (file-name (string-append name "-" commit "-checkout"))
+                (sha256
+                 (base32
+                  "1n9kdhlxsdx7bz6c80w8dhi96zp633gd6qs0x9i4ii8qv4i7sj5k"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f ; no tests
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((bin (string-append (assoc-ref outputs "out")
+                                         "/bin")))
+                 (install-file "build/spinsim" bin))
+               #t)))))
+      (home-page "https://github.com/parallaxinc/spinsim")
+      (synopsis "Spin simulator")
+      (description "This package provides the tool @code{spinsim}, a simulator
+and simple debugger for Spin programs written for a Parallax Propeller
+micro-controller.  Spinsim supports execution from cog memory and hub
+execution, but it does not support multi-tasking.  It supports about
+two-thirds of the opcodes in the P2 instruction set.")
+      (license license:expat))))
+
+(define-public propeller-development-suite
+  (package
+    (name "propeller-development-suite")
+    (version (package-version propeller-gcc))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments '(#:builder (mkdir %output)))
+    (propagated-inputs
+     `(("toolchain" ,propeller-toolchain)
+       ("openspin" ,openspin)
+       ("propeller-load" ,propeller-load)
+       ("spin2cpp" ,spin2cpp)
+       ("spinsim" ,spinsim)))
+    (synopsis "Complete development suite for Propeller micro-controllers")
+    (description "This meta-package provides a complete environment for the
+development with Parallax Propeller micro-controllers.  It includes the GCC
+toolchain, the loader, the Openspin compiler, the Spin2cpp tool, and the Spin
+simulator.")
+    (home-page (package-home-page propeller-gcc))
+    (license (package-license propeller-gcc))))
diff --git a/gnu/packages/enlightenment.scm b/gnu/packages/enlightenment.scm
index 25b8caf306..ca97104958 100644
--- a/gnu/packages/enlightenment.scm
+++ b/gnu/packages/enlightenment.scm
@@ -31,6 +31,7 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages fribidi)
   #:use-module (gnu packages game-development)
   #:use-module (gnu packages gettext)
@@ -56,7 +57,7 @@
 (define-public efl
   (package
     (name "efl")
-    (version "1.18.2")
+    (version "1.18.4")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -64,7 +65,7 @@
                     version ".tar.xz"))
               (sha256
                (base32
-                "1vbvsrrpkvvrmvjavwnp5q77kw5i7vmbaj2vq5mnmrbzamvaybr9"))))
+                "09c0ajszjarcs6d62zlgnf1aha2f921mfr0gxg6nwza36xzc1srr"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -196,7 +197,7 @@ Libraries with some extra bells and whistles.")
 (define-public enlightenment
   (package
     (name "enlightenment")
-    (version "0.21.3")
+    (version "0.21.5")
     (source (origin
               (method url-fetch)
               (uri
@@ -204,7 +205,7 @@ Libraries with some extra bells and whistles.")
                               name "/" name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1ljzcq775njhbcaj8vdnypf2rgc6yqqdwfkf7c22603qvv9if1dr"))))
+                "1fslq70z4s6v9ipahnk8s5fgqnqq4njv4rlqv951r1bh1xk5lx7h"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags '("--enable-mount-eeze")))
@@ -298,3 +299,33 @@ that tries to lower the barrier to getting involved in Enlightenment development
 and in creating applications based on the Enlightenment Foundation Library suite.")
     (license (list license:public-domain ; data/extra/skeleton
                    license:gpl2))))      ; edi
+
+(define-public lekha
+  (package
+    (name "lekha")
+    (version "0.2.1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "Lekha" version))
+              (sha256
+               (base32
+                "0zr6i74ik58pbzrd7r9l7sawqbdv0r2c1a9927qkqzwga27x8j15"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f ; no test target
+       #:python ,python-2
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-data-location
+           (lambda _ (substitute* "setup.py"
+                       (("'/usr/")"'"))
+             #t)))))
+    (propagated-inputs
+     `(("python2-efl" ,python2-efl)
+       ("python2-pypdf2" ,python2-pypdf2)
+       ("python2-pyxdg" ,python2-pyxdg)))
+    (synopsis "Simple PDF viewer")
+    (description
+     "Simple PDF viewer based on the Enlightenment Foundation Libraries.")
+    (home-page "https://github.com/kaihu/lekha")
+    (license license:gpl3+)))
diff --git a/gnu/packages/feh.scm b/gnu/packages/feh.scm
deleted file mode 100644
index 6b998aa983..0000000000
--- a/gnu/packages/feh.scm
+++ /dev/null
@@ -1,67 +0,0 @@
-;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
-;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
-;;;
-;;; 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 feh)
-  #:use-module (gnu packages)
-  #:use-module (gnu packages image)
-  #:use-module (gnu packages curl)
-  #:use-module (gnu packages xorg)
-  #:use-module (guix packages)
-  #:use-module (guix download)
-  #:use-module (guix build-system gnu)
-  #:use-module ((guix licenses) #:prefix license:))
-
-(define-public feh
-  (package
-    (name "feh")
-    (version "2.14.1")
-    (home-page "https://feh.finalrewind.org/")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append home-page
-                                  name "-" version ".tar.bz2"))
-              (sha256
-               (base32
-                "1hlzgr0masgbm1vdn085vz81s9kpnah8kjkb1w1xfsxr1b99x8f0"))))
-    (build-system gnu-build-system)
-    (arguments
-      '(#:phases (alist-delete 'configure %standard-phases)
-        #:tests? #f
-        #:make-flags
-          (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")))))
-    (inputs `(("imlib2" ,imlib2)
-              ("curl" ,curl)
-              ("libpng" ,libpng)
-              ("libxt" ,libxt)
-              ("libx11" ,libx11)
-              ("libxinerama" ,libxinerama)))
-    (synopsis "Fast and light imlib2-based image viewer")
-    (description
-      "feh is an X11 image viewer aimed mostly at console users.
-Unlike most other viewers, it does not have a fancy GUI, but simply
-displays images.  It can also be used to set the desktop wallpaper.
-It is controlled via commandline arguments and configurable key/mouse
-actions.")
-
-    ;; The license is really the Expat license, with additional wording in the
-    ;; 2nd paragraph: "acknowledgment shall be given in the documentation and
-    ;; software packages that this Software was used."
-    (license (license:x11-style
-              "file://COPYING"
-              "See 'COPYING' in the distribution."))))
diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm
index a55ed96edd..f25c25fbfb 100644
--- a/gnu/packages/flashing-tools.scm
+++ b/gnu/packages/flashing-tools.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -22,6 +23,7 @@
 (define-module (gnu packages flashing-tools)
   #:use-module (guix licenses)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix packages)
   #:use-module (gnu packages)
   #:use-module (guix build-system gnu)
@@ -211,3 +213,37 @@ You need to add the udev rules to make the Teensy update available for
 non-root users.")
       (home-page "https://www.pjrc.com/teensy/loader_cli.html")
       (license gpl3))))
+
+(define-public rkflashtool
+  (let ((commit "094bd6410cb016e487e2ccb1050c59eeac2e6dd1")
+        (revision "1"))
+    (package
+      (name "rkflashtool")
+      (version (string-append "0.0.0-" revision "." (string-take commit 7)))
+      (source
+        (origin
+          (method git-fetch)
+          (uri (git-reference
+                (url "https://github.com/linux-rockchip/rkflashtool.git")
+                (commit commit)))
+          (file-name (string-append name "-" version "-checkout"))
+          (sha256
+           (base32
+            "1zkd8zxir3rfg3sy9r20bcnxclnplryn583gqpcr3iad0k3xbah7"))))
+      (build-system gnu-build-system)
+      (arguments
+       '(#:phases
+         (modify-phases %standard-phases
+           (delete 'configure)) ; no configure
+         #:make-flags (list (string-append "PREFIX=" %output))
+         #:tests? #f)) ; no tests
+      (native-inputs
+       `(("pkg-config" ,pkg-config)))
+      (inputs
+       `(("libusb" ,libusb)))
+      (home-page "https://github.com/linux-rockchip/rkflashtool")
+      (synopsis "Tools for flashing Rockchip devices")
+      (description "Allows flashing of Rockchip based embedded linux devices.
+The list of currently supported devices is: RK2818, RK2918, RK2928, RK3026,
+RK3036, RK3066, RK312X, RK3168, RK3188, RK3288, RK3368.")
+      (license bsd-2))))
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 009efd2955..f01b831559 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2016 Toni Reina <areina@riseup.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -604,7 +605,7 @@ languages, plus Greek and Cyrillic.")
 (define-public font-gnu-unifont
   (package
     (name "font-gnu-unifont")
-    (version "9.0.02")
+    (version "9.0.06")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -612,7 +613,7 @@ languages, plus Greek and Cyrillic.")
                     version ".tar.gz"))
               (sha256
                (base32
-                "1ss6cp2bs8mzz3jqjbmmi877jfdb1jjcd29dvyk3i8qy7r0d44qm"))))
+                "0ybyraxi8pngibazfq4zlsqmg8kn5xlhvaiwnxb11znhfi61vi87"))))
     (build-system gnu-build-system)
     (outputs '("out" ; TrueType version
                "pcf" ; PCF (bitmap) version
@@ -624,9 +625,9 @@ languages, plus Greek and Cyrillic.")
        #:tests? #f          ; no check target
        #:phases
        (modify-phases %standard-phases
-         (replace 'configure
-                  (lambda _
-                    (setenv "CC" "gcc")))
+         (replace
+          'configure
+          (lambda _ (setenv "CC" "gcc") #t))
          (replace
           'install
           (lambda* (#:key outputs #:allow-other-keys)
@@ -898,3 +899,38 @@ powerline support.")
      "Source Code Pro is a set of monospaced OpenType fonts that have been
 designed to work well in user interface environments.")
     (license license:silofl1.1)))
+
+(define-public font-fira-mono
+  (package
+    (name "font-fira-mono")
+    (version "3.206")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://carrois.com/downloads/fira_mono_3_2/"
+                                  "FiraMonoFonts"
+                                  (string-replace-substring version "." "")
+                                  ".zip"))
+              (sha256
+               (base32
+                "1z65x0dw5dq6rs6p9wyfrir50rlh95vgzsxr8jcd40nqazw4jhpi"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
+                                     "/bin/unzip"))
+               (font-dir (string-append %output "/share/fonts/opentype")))
+           (mkdir-p font-dir)
+           (system* unzip
+                    "-j"
+                    (assoc-ref %build-inputs "source")
+                    "*.otf"
+                    "-d" font-dir)))))
+    (native-inputs
+     `(("unzip" ,unzip)))
+    (home-page "http://mozilla.github.io/Fira/")
+    (synopsis "Mozilla's monospace font")
+    (description "This is the typeface used by Mozilla in Firefox OS.")
+    (license license:silofl1.1)))
diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm
index bb199096dc..f65eae8673 100644
--- a/gnu/packages/fpga.scm
+++ b/gnu/packages/fpga.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
+;;; Copyright © 2016 Theodoros Foradis <theodoros.for@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -31,7 +32,9 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages libffi)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages zip)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages ghostscript)
@@ -114,7 +117,7 @@ For synthesis, the compiler generates netlists in the desired format.")
 (define-public yosys
   (package
     (name "yosys")
-    (version "0.6")
+    (version "0.7")
     (source (origin
               (method url-fetch)
               (uri
@@ -122,7 +125,7 @@ For synthesis, the compiler generates netlists in the desired format.")
                               name "-" version ".tar.gz"))
               (sha256
                 (base32
-                   "02j0c0m9dfyjccynalf0aggj6gy20k7iphpkg5cn6sdirlkv8gmx"))
+                   "0vkfdn4phvkjqlnpqlr6q5f97bgjc3312vj5jf0vf85zqv88dy9x"))
               (file-name (string-append name "-" version "-checkout.tar.gz"))
               (modules '((guix build utils)))
               (snippet
@@ -136,6 +139,13 @@ For synthesis, the compiler generates netlists in the desired format.")
                           (string-append "PREFIX=" %output))
        #:phases
        (modify-phases %standard-phases
+         (add-before 'configure 'fix-paths
+           (lambda _
+             (substitute* "./passes/cmds/show.cc"
+               (("exec xdot") (string-append "exec " (which "xdot")))
+               (("dot -") (string-append (which "dot") " -"))
+               (("fuser") (which "fuser")))
+             #t))
          (replace 'configure
            (lambda* (#:key inputs (make-flags '()) #:allow-other-keys)
              (zero? (apply system* "make" "config-gcc" make-flags))))
@@ -172,7 +182,6 @@ For synthesis, the compiler generates netlists in the desired format.")
                         (("iverilog_bin=\".*\"") (string-append "iverilog_bin=\""
                                                                 iverilog "\"")))
                      #t))))))
-    ;; TODO add xdot [patch the path to it here] as soon as I find out where it is.
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("python" ,python)
@@ -185,6 +194,9 @@ For synthesis, the compiler generates netlists in the desired format.")
      `(("tcl" ,tcl)
        ("readline" ,readline)
        ("libffi" ,libffi)
+       ("graphviz" ,graphviz)
+       ("psmisc" ,psmisc)
+       ("xdot" ,xdot)
        ("abc" ,abc)))
     (home-page "http://www.clifford.at/yosys/")
     (synopsis "FPGA Verilog RTL synthesizer")
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 456d569063..18e609751f 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -85,14 +85,14 @@ freedesktop.org project.")
 (define-public libinput
   (package
     (name "libinput")
-    (version "1.5.1")
+    (version "1.5.3")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://freedesktop.org/software/libinput/"
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1n1dispg63z1qiy8c1af3l9c4a9dks8y7xasff8xcywnn0rkkxnl"))))
+                "1qx623nyr49sxv49ilb0j85skgk1dhkr82vd577ywyjf7d96q84i"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("cairo" ,cairo)
@@ -211,7 +211,8 @@ the freedesktop.org XDG Base Directory specification.")
        ("shepherd" ,shepherd)                ;for 'halt' and 'reboot', invoked
                                              ;when pressing the power button
        ("dbus" ,dbus)
-       ("eudev" ,eudev)))
+       ("eudev" ,eudev)
+       ("acl" ,acl)))           ;to add individual users to ACLs on /dev nodes
     (home-page "https://github.com/wingo/elogind")
     (synopsis "User, seat, and session management service")
     (description "Elogind is the systemd project's \"logind\" service,
@@ -256,8 +257,7 @@ of a the system to know what users are logged in, and where.")
     (native-inputs
      `(("shared-mime-info" ,shared-mime-info) ;for tests
        ("hicolor-icon-theme" ,hicolor-icon-theme) ;for tests
-       ("python-nose" ,python-nose)
-       ("python-setuptools" ,python-setuptools)))
+       ("python-nose" ,python-nose)))
     (home-page "http://freedesktop.org/wiki/Software/pyxdg")
     (synopsis "Implementations of freedesktop.org standards in Python")
     (description
@@ -451,17 +451,19 @@ Analysis and Reporting Technology) functionality.")
 (define-public udisks
   (package
     (name "udisks")
-    (version "2.1.7")
+    (version "2.1.8")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://udisks.freedesktop.org/releases/"
                                   name "-" version ".tar.bz2"))
               (sha256
                (base32
-                "119pr2zbff8vkwlhghim7d7ir24c1dil9hp4q49wm4f6pnrjpbmb"))))
+                "1nkxhnqh39c9pzvm4zfj50rgv6apqawdx09bv3sfaxrah4a6jhfs"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(("glib:bin" ,glib "bin") ; for glib-mkenums
+     `(("docbook-xml" ,docbook-xml-4.3) ; to build the manpages
+       ("docbook-xsl" ,docbook-xsl)
+       ("glib:bin" ,glib "bin") ; for glib-mkenums
        ("gobject-introspection" ,gobject-introspection)
        ("intltool" ,intltool)
        ("pkg-config" ,pkg-config)
@@ -480,13 +482,28 @@ Analysis and Reporting Technology) functionality.")
      `(#:tests? #f ; requiring system message dbus
        #:disallowed-references ("doc")            ;enforce separation of "doc"
        #:configure-flags
-       (list "--disable-man"
+       (list "--enable-man"
              "--localstatedir=/var"
              "--enable-fhs-media"     ;mount devices in /media, not /run/media
              (string-append "--with-html-dir="
                             (assoc-ref %outputs "doc")
                             "/share/doc/udisks/html")
              (string-append "--with-udevdir=" %output "/lib/udev"))
+       #:make-flags
+       (let*  ((docbook-xsl-name-version ,(string-append
+                                           (package-name docbook-xsl) "-"
+                                           (package-version  docbook-xsl)))
+               (docbook-xsl-catalog-file (string-append
+                                          (assoc-ref %build-inputs "docbook-xsl")
+                                          "/xml/xsl/"
+                                          docbook-xsl-name-version
+                                          "/catalog.xml"))
+               (docbook-xml-catalog-file (string-append
+                                          (assoc-ref %build-inputs "docbook-xml")
+                                          "/xml/dtd/docbook/catalog.xml")))
+         ;; Reference the catalog files required to build the manpages.
+         (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file " "
+                              docbook-xml-catalog-file)))
        #:phases
        (modify-phases %standard-phases
          (add-before
@@ -509,7 +526,7 @@ Analysis and Reporting Technology) functionality.")
                     "/run/current-system/profile/bin"
                     "/run/current-system/profile/sbin")))
                #t))))))
-    (home-page "http://www.freedesktop.org/wiki/Software/udisks/")
+    (home-page "https://www.freedesktop.org/wiki/Software/udisks/")
     (synopsis "Disk manager service")
     (description
      "UDisks provides interfaces to enumerate and perform operations on disks
diff --git a/gnu/packages/ftp.scm b/gnu/packages/ftp.scm
index 7d3cae626a..5ff56d7eae 100644
--- a/gnu/packages/ftp.scm
+++ b/gnu/packages/ftp.scm
@@ -36,16 +36,23 @@
 (define-public lftp
   (package
     (name "lftp")
-    (version "4.7.3")
+    (version "4.7.4")
     (source (origin
               (method url-fetch)
-              (uri (list (string-append "https://lftp.yar.ru/ftp/lftp-"
+              ;; XXX: Downloads from main site redirects to 'get.html' and
+              ;; returns HTTP 200, leading Guix to download that instead.
+              ;; Try official mirror first. See:
+              ;; https://github.com/lavv17/lftp/issues/299 and
+              ;; https://lftp.tech/get.html (mirror list)
+              (uri (list (string-append "ftp://ftp.st.ryukoku.ac.jp/pub/network/"
+                                        "ftp/lftp/lftp-" version ".tar.xz")
+                         (string-append "https://lftp.tech/ftp/lftp-"
                                         version ".tar.xz")
-                         (string-append "https://lftp.yar.ru/ftp/old/lftp-"
+                         (string-append "https://lftp.tech/ftp/old/lftp-"
                                         version ".tar.xz")))
               (sha256
                (base32
-                "0z4flhqvq9w9md1348jdw0lnk0dlljyicz8597inl6jcvjf2a8iv"))))
+                "0b6r1gbpazvml1hvfjm2ccsfxibrjrm3fir912j6kxxn538w8rxz"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -65,7 +72,7 @@
        #:configure-flags
        (list (string-append "--with-readline="
                             (assoc-ref %build-inputs "readline")))))
-    (home-page "https://lftp.yar.ru/")
+    (home-page "https://lftp.tech/")
     (synopsis "Command-line file transfer program")
     (description
      "LFTP is a sophisticated FTP/HTTP client, and a file transfer program
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 76c06ecc72..619c2f1bc2 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -140,7 +140,7 @@ provide connectivity for client applications written in any language.")
 (define-public tiled
   (package
     (name "tiled")
-    (version "0.17.0")
+    (version "0.18.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/bjorn/tiled/archive/v"
@@ -148,7 +148,7 @@ provide connectivity for client applications written in any language.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "0c9gykxmq0sk0yyfdq81g9psd922scqzn5asskjydj84d80f5z7p"))))
+                "0csrwf7k3fxv6bv580w6wxjk1q2j9mj9k0xba3nb1ms6jiz1bvzk"))))
     (build-system gnu-build-system)
     (inputs `(("qt" ,qt)
               ("zlib" ,zlib)))
@@ -591,8 +591,6 @@ interface (API).")
                         (string-append v4l-ref "/include/libv4l1-videodev.h")
                         "linux/videodev.h")
                (system* "ln" "--symbolic" "Setup.in" "Setup")))))))
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (inputs
      `(("sdl" ,sdl)
        ("sdl-image" ,sdl-image)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 8b1d80dda7..c449f59549 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -649,7 +649,7 @@ match, cannon keep, and grave-itation pit.")
 (define minetest-data
   (package
     (name "minetest-data")
-    (version "0.4.14")
+    (version "0.4.15")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -658,7 +658,7 @@ match, cannon keep, and grave-itation pit.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "11fzdh4icx2yvjfz1skdql0d0wxpzdr006k993v33x72s0q2ig7f"))))
+                "12kxklcd1b5n0f369zf3xxhvkrizxj4d9xv0dh8crfqiymaym0zm"))))
     (build-system trivial-build-system)
     (native-inputs
      `(("source" ,source)
@@ -690,7 +690,7 @@ match, cannon keep, and grave-itation pit.")
 (define-public minetest
   (package
     (name "minetest")
-    (version "0.4.14")
+    (version "0.4.15")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -699,7 +699,7 @@ match, cannon keep, and grave-itation pit.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "0m3hhk5icx4y4gd970z7ya2013fq4vvqbjljmck62ik03baf8g90"))))
+                "1ag3jcj7kpq3ph12zirk1c0mj9i0g50wmw932f8gi11liq8yd12n"))))
     (build-system cmake-build-system)
     (arguments
      '(#:configure-flags
@@ -968,7 +968,7 @@ Collect herrings and other goodies while sliding down the hill, but avoid fish
 bones.
 
 This game is based on the GPL version of the famous game TuxRacer.")
-    (home-page "http://sourceforge.net/projects/extremetuxracer/")
+    (home-page "https://sourceforge.net/projects/extremetuxracer/")
     (license license:gpl2+)))
 
 (define-public supertuxkart
@@ -1254,7 +1254,7 @@ is programmed in Haskell.")
 (define-public manaplus
   (package
     (name "manaplus")
-    (version "1.6.8.14")
+    (version "1.6.12.24")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1262,7 +1262,7 @@ is programmed in Haskell.")
                     version "/manaplus-" version ".tar.xz"))
               (sha256
                (base32
-                "1mah4w6ng0j76cjzbw8y9m2ds5f1w5ka9b1k3gzgvxh4yaphqnff"))))
+                "1g64pid26vcv1ay002bzz6ymabwrmy3wmklywpcgpvrhynm6f2cq"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags
@@ -2753,7 +2753,7 @@ with the \"Stamp\" tool within Tux Paint.")
 (define-public supertux
   (package
    (name "supertux")
-   (version "0.5.0")
+   (version "0.5.1")
    (source (origin
             (method url-fetch)
             (uri (string-append "https://github.com/SuperTux/supertux/"
@@ -2761,7 +2761,7 @@ with the \"Stamp\" tool within Tux Paint.")
                                 version "-Source.tar.gz"))
             (sha256
              (base32
-              "0fx7c7m6mfanqy7kln7yf6abb5l3r68picf32js2yls11jj0vbng"))))
+              "1i8avad7w7ikj870z519j383ldy29r6f956bs38cbr8wk513pp69"))))
    (arguments
     '(#:tests? #f
       #:configure-flags '("-DINSTALL_SUBDIR_BIN=bin"
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 8381392ba4..206c67ed99 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014, 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
@@ -380,14 +380,14 @@ Go.  It also includes runtime support libraries for these languages.")
 (define-public gcc-6
   (package
     (inherit gcc-5)
-    (version "6.2.0")
+    (version "6.3.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/gcc/gcc-"
                                   version "/gcc-" version ".tar.bz2"))
               (sha256
                (base32
-                "1idpf43988v1a6i8lw9ak1r7igcfg1bm5kn011iydlr2qygmhi4r"))
+                "17xjz30jb65hcf714vn9gcxvrrji8j20xm7n33qg1ywhyzryfsph"))
               (patches (search-patches "gcc-strmov-store-file-names.patch"
                                        "gcc-5.0-libvtv-runpath.patch"))))))
 
@@ -510,8 +510,11 @@ as the 'native-search-paths' field."
               %generic-search-paths))
 
 (define-public gfortran
-  (custom-gcc gcc "gfortran" '("fortran")
-              %generic-search-paths))
+  ;; Note: Update this when GCC changes!  We cannot use
+  ;; (custom-gcc gcc "fortran" …) because that would lead to a package object
+  ;; that is not 'eq?' with GFORTRAN-4.9, and thus 'fold-packages' would
+  ;; report two gfortran@4.9 that are in fact identical.
+  gfortran-4.9)
 
 (define-public gfortran-5
   (custom-gcc gcc-5 "gfortran" '("fortran")
@@ -537,6 +540,7 @@ as the 'native-search-paths' field."
 (define-public gcj
   (package (inherit gcc)
     (name "gcj")
+    (version (package-version gcc))
     (inputs
      `(("fastjar" ,fastjar)
        ("perl" ,perl)
@@ -545,6 +549,15 @@ as the 'native-search-paths' field."
        ,@(package-inputs gcc)))
     (native-inputs
      `(("dejagnu" ,dejagnu)
+       ,@(if (string-prefix? "armhf" (or (%current-system)
+                                         (%current-target-system)))
+             `(("arm-patch" ,(origin
+                               (method url-fetch)
+                               (uri (search-patch "gcj-arm-mode.patch"))
+                               (sha256
+                                (base32
+                                 "1z15xs5yx6qinnb572swzxrn9f668sw7ga5280q3gznj1jyrynfn")))))
+             '())
        ,@(package-native-inputs gcc)))
     (native-search-paths %generic-search-paths)
 
@@ -572,6 +585,14 @@ as the 'native-search-paths' field."
                        ,flags))))
        ((#:phases phases)
         `(modify-phases ,phases
+           ;; Conditionally add phase to apply patch
+           ,@(if (string-prefix? "armhf" (or (%current-system)
+                                             (%current-target-system)))
+                 `((add-after 'unpack 'apply-arm-patch
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       (zero? (system* "patch" "-p1"
+                                       "-i" (assoc-ref inputs "arm-patch"))))))
+                 '())
            (add-after
             'unpack 'add-lib-output-to-rpath
             (lambda _
@@ -584,6 +605,10 @@ as the 'native-search-paths' field."
             'unpack 'patch-testsuite
             ;; dejagnu-1.6 removes the 'absolute' command
             (lambda _
+              ;; This test fails on armhf.  It seems harmless enough to disable it.
+              (for-each delete-file '("libjava/testsuite/libjava.lang/Throw_2.java"
+                                      "libjava/testsuite/libjava.lang/Throw_2.out"
+                                      "libjava/testsuite/libjava.lang/Throw_2.jar"))
               (substitute* "libjava/testsuite/lib/libjava.exp"
                 (("absolute") "file normalize"))
               #t))
diff --git a/gnu/packages/geeqie.scm b/gnu/packages/geeqie.scm
deleted file mode 100644
index 509819e780..0000000000
--- a/gnu/packages/geeqie.scm
+++ /dev/null
@@ -1,108 +0,0 @@
-;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
-;;;
-;;; 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 geeqie)
-  #:use-module (guix packages)
-  #:use-module (guix download)
-  #:use-module ((guix licenses) #:prefix l:)
-  #:use-module (guix build-system gnu)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages ghostscript)
-  #:use-module (gnu packages glib)
-  #:use-module (gnu packages gtk)
-  #:use-module (gnu packages image)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages xml))
-
-(define-public exiv2                              ; XXX: move elsewhere?
-  (package
-    (name "exiv2")
-    (version "0.25")
-    (source (origin
-             (method url-fetch)
-             (uri (list (string-append "http://www.exiv2.org/exiv2-"
-                                       version ".tar.gz")
-                        (string-append "https://fossies.org/linux/misc/exiv2-"
-                                       version ".tar.gz")))
-             (sha256
-              (base32
-               "197g6vgcpyf9p2cwn5p5hb1r714xsk1v4p96f5pv1z8mi9vzq2y8"))))
-    (build-system gnu-build-system)
-    (arguments '(#:tests? #f))                    ; no `check' target
-    (propagated-inputs
-     `(("expat" ,expat)
-       ("zlib" ,zlib)))
-    (native-inputs
-     `(("intltool" ,intltool)))
-    (home-page "http://www.exiv2.org/")
-    (synopsis "Library and command-line utility to manage image metadata")
-    (description
-     "Exiv2 is a C++ library and a command line utility to manage image
-metadata.  It provides fast and easy read and write access to the Exif, IPTC
-and XMP metadata of images in various formats.")
-
-    ;; Files under `xmpsdk' are a copy of Adobe's XMP SDK, licensed under the
-    ;; 3-clause BSD license: <http://www.adobe.com/devnet/xmp/sdk/eula.html>.
-    ;; The core is GPLv2+:
-    ;;   <https://launchpad.net/ubuntu/precise/+source/exiv2/+copyright>.
-    (license l:gpl2+)))
-
-(define-public geeqie
-  (package
-    (name "geeqie")
-    (version "1.3")
-    (source (origin
-             (method url-fetch)
-             (uri (string-append "https://github.com/BestImageViewer/geeqie/"
-                                 "releases/download/v" version "/geeqie-"
-                                 version ".tar.xz"))
-             (sha256
-              (base32
-               "0gzc82sy66pbsmq7lnmq4y37zqad1zfwfls3ik3dmfm8s5nmcvsb"))))
-    (build-system gnu-build-system)
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'autogen
-           (lambda _
-             (setenv "NOCONFIGURE" "true")
-             (zero? (system* "sh" "autogen.sh")))))))
-    (inputs
-     `(;; ("libchamplain" ,libchamplain)
-       ("lcms" ,lcms)
-       ("exiv2" ,exiv2)
-       ("libpng" ,libpng)
-       ("gtk+" ,gtk+-2)))
-    (native-inputs
-     `(("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("glib" ,glib "bin") ; glib-gettextize
-       ("intltool" ,intltool)
-       ("pkg-config" ,pkg-config)))
-    (home-page "http://www.geeqie.org/")
-    (synopsis "Lightweight GTK+ based image viewer")
-    (description
-     "Geeqie is a lightweight GTK+ based image viewer for Unix like operating
-systems.  It features: EXIF, IPTC and XMP metadata browsing and editing
-interoperability; easy integration with other software; geeqie works on files
-and directories, there is no need to import images; fast preview for many raw
-image formats; tools for image comparison, sorting and managing photo
-collection.  Geeqie was initially based on GQview.")
-    (license l:gpl2+)))
diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm
index b254b80782..46b8c51299 100644
--- a/gnu/packages/ghostscript.scm
+++ b/gnu/packages/ghostscript.scm
@@ -293,7 +293,7 @@ architecture.")
     "Ghostscript fonts provides fonts and font metrics customarily distributed with
 Ghostscript.  It currently includes the 35 standard PostScript fonts.")
    (license license:gpl2)
-   (home-page "http://sourceforge.net/projects/gs-fonts/")))
+   (home-page "https://sourceforge.net/projects/gs-fonts/")))
 
 (define-public libspectre
   (package
diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm
index 6540990b36..169183db62 100644
--- a/gnu/packages/gimp.scm
+++ b/gnu/packages/gimp.scm
@@ -35,6 +35,7 @@
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages xml)
+  #:use-module (gnu packages pdf)
   #:use-module (gnu packages photo)
   #:use-module (gnu packages python)
   #:use-module (gnu packages xorg)
@@ -168,6 +169,7 @@ buffers.")
        ("exif" ,libexif)                         ;optional, EXIF + XMP support
        ("lcms" ,lcms)                            ;optional, color management
        ("librsvg" ,librsvg)                      ;optional, SVG support
+       ("poppler", poppler)             ; optional, PDF support
        ("python" ,python-2)                      ;optional, Python support
        ("python2-pygtk" ,python2-pygtk)          ;optional, Python support
        ("gegl" ,gegl)))
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 50b474c623..0e9b5ddb5f 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -196,7 +196,7 @@ also known as DXTn or DXTC) for Mesa.")
 (define-public mesa
   (package
     (name "mesa")
-    (version "12.0.1")
+    (version "13.0.2")
     (source
       (origin
         (method url-fetch)
@@ -204,7 +204,9 @@ also known as DXTn or DXTC) for Mesa.")
                             version "/mesa-" version ".tar.xz"))
         (sha256
          (base32
-          "12b3i59xdn2in2hchrkgh4fwij8zhznibx976l3pdj3qkyvlzcms"))))
+          "1m8n8kd8kcs5ddyvldiw09wvpi5wwpfmmxlb87d63vgl8lk65vd6"))
+        (patches
+         (search-patches "mesa-wayland-egl-symbols-check-mips.patch"))))
     (build-system gnu-build-system)
     (propagated-inputs
       `(("glproto" ,glproto)
@@ -227,20 +229,10 @@ also known as DXTn or DXTC) for Mesa.")
         ("makedepend" ,makedepend)
         ("presentproto" ,presentproto)
         ("s2tc" ,s2tc)
-        ("udev" ,eudev)
         ("wayland" ,wayland)))
     (native-inputs
       `(("pkg-config" ,pkg-config)
-        ("python" ,python-2)
-
-         ;; XXX To prevent a large number of rebuilds on other systems,
-         ;; apply the following patch on MIPS systems only.  In the next
-         ;; core-updates cycle, this patch could be applied on all platforms.
-        ,@(if (string-prefix? "mips" (or (%current-target-system)
-                                         (%current-system)))
-              `(("mips-patch"
-                 ,(search-patch "mesa-wayland-egl-symbols-check-mips.patch")))
-              '())))
+        ("python" ,python-2)))
     (arguments
      `(#:configure-flags
        '(;; drop r300 from default gallium drivers, as it requires llvm
@@ -267,16 +259,6 @@ also known as DXTn or DXTC) for Mesa.")
               '("--with-dri-drivers=nouveau,r200,radeon,swrast"))))
        #:phases
        (modify-phases %standard-phases
-         ;; Add an 'apply-mips-patch' phase conditionally (see above.)
-         ,@(if (string-prefix? "mips" (or (%current-target-system)
-                                          (%current-system)))
-               `((add-after 'unpack 'apply-mips-patch
-                   (lambda* (#:key inputs #:allow-other-keys)
-                     (let ((patch (assoc-ref inputs "mips-patch")))
-                       (zero? (system* "patch" "-p1" "--force"
-                                       "--input" patch))))))
-               '())
-
          (add-after
            'unpack 'patch-create_test_cases
            (lambda _
@@ -288,7 +270,6 @@ also known as DXTn or DXTC) for Mesa.")
            'build 'fix-dlopen-libnames
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((s2tc (assoc-ref inputs "s2tc"))
-                   (udev (assoc-ref inputs "udev"))
                    (out (assoc-ref outputs "out")))
                ;; Remain agnostic to .so.X.Y.Z versions while doing
                ;; the substitutions so we're future-safe.
@@ -297,10 +278,6 @@ also known as DXTn or DXTC) for Mesa.")
                      "src/mesa/main/texcompress_s3tc.c")
                  (("\"libtxc_dxtn\\.so")
                   (string-append "\"" s2tc "/lib/libtxc_dxtn.so")))
-               (substitute* "src/loader/loader.c"
-                 (("udev_handle = dlopen\\(name")
-                  (string-append "udev_handle = dlopen(\""
-                                 udev "/lib/libudev.so\"")))
                (substitute* "src/glx/dri_common.c"
                  (("dlopen\\(\"libGL\\.so")
                   (string-append "dlopen(\"" out "/lib/libGL.so")))
@@ -485,7 +462,8 @@ OpenGL graphics API.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "1d1brhwfmlzgnphmdwlvn5wbcrxsdyzf1qfcf8nb89xqzznxs037"))))
+                "1d1brhwfmlzgnphmdwlvn5wbcrxsdyzf1qfcf8nb89xqzznxs037"))
+              (patches (search-patches "libepoxy-gl-null-checks.patch"))))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 2b57f85d75..a78b188af0 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -64,8 +64,7 @@
 (define dbus
   (package
     (name "dbus")
-    (replacement dbus-1.10.12)
-    (version "1.10.10")
+    (version "1.10.14")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -73,7 +72,7 @@
                     version ".tar.gz"))
               (sha256
                (base32
-                "0hwsfczhx2djmc9116vj5v230i7gpjihwh3vbljs1ldlk831v3wx"))
+                "10x0wvv2ly4lyyfd42k4xw0ar5qdbi9cksw3l5fcwf1y6mq8y8r3"))
               (patches (search-patches "dbus-helper-search-path.patch"))))
     (build-system gnu-build-system)
     (arguments
@@ -132,21 +131,6 @@ or through unencrypted TCP/IP suitable for use behind a firewall with
 shared NFS home directories.")
     (license license:gpl2+)))                     ; or Academic Free License 2.1
 
-(define dbus-1.10.12
-  (package
-    (inherit dbus)
-    (name "dbus")
-    (source
-      (let ((version "1.10.12"))
-        (origin
-          (inherit (package-source dbus))
-          (uri (string-append
-                "https://dbus.freedesktop.org/releases/dbus/dbus-"
-                version ".tar.gz"))
-          (sha256
-           (base32
-            "0pa71vf5c0d7k3gni06iascmplj0j5g70wbc833ayvi71d1pj2i1")))))))
-
 (define glib
   (package
    (name "glib")
@@ -471,7 +455,7 @@ by GDBus included in Glib.")
 (define libsigc++
   (package
     (name "libsigc++")
-    (version "2.8.0")
+    (version "2.10.0")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnome/sources/libsigc++/"
@@ -479,7 +463,7 @@ by GDBus included in Glib.")
                                  name "-" version ".tar.xz"))
              (sha256
               (base32
-               "0lcnzzdq6718znfshs1hflpwqq6awbzwdyp4kv5lfaf54z880jbp"))))
+               "10cd54l4zihss9qxfhd2iip2k7mr292k37i54r2cpgv0c8sdchzq"))))
     (build-system gnu-build-system)
     (native-inputs `(("pkg-config" ,pkg-config)
                      ("m4" ,m4)))
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 3aa0f567fd..2d97f228f1 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -97,7 +97,6 @@
   #:use-module (gnu packages scanner)
   #:use-module (gnu packages ssh)
   #:use-module (gnu packages xml)
-  #:use-module (gnu packages geeqie)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages tex)
@@ -682,14 +681,14 @@ update-desktop-database: updates the database containing a cache of MIME types
 (define-public shared-mime-info
   (package
     (name "shared-mime-info")
-    (version "1.6")
+    (version "1.7")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://freedesktop.org/~hadess/"
                                  "shared-mime-info-" version ".tar.xz"))
              (sha256
               (base32
-               "0k637g047gci8g69bg4g19akylpfraxm40hd30j3i4v7cidziy5j"))))
+               "0bjd2j1rqrj150mr04j7ib71lfdlgbf235fg8d70g8mszqf7ik7a"))))
     (build-system gnu-build-system)
     (arguments
      ;; The build system appears not to be parallel-safe.
@@ -2141,7 +2140,7 @@ libxml to ease remote use of the RESTful API.")
 (define-public libsoup
   (package
     (name "libsoup")
-    (version "2.54.1")
+    (version "2.56.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnome/sources/libsoup/"
@@ -2149,7 +2148,7 @@ libxml to ease remote use of the RESTful API.")
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0cyn5pq4xl1gb8413h2p4d5wrn558dc054zhwmk4swrl40ijrd27"))))
+                "1r8zz270qdg92gbsvy61d51y1cj7hp059h2f4xpvqiw2vrqnn8fq"))))
     (build-system gnu-build-system)
     (outputs '("out" "doc"))
     (arguments
@@ -2649,9 +2648,7 @@ services for numerous locations.")
          "1rvqisrh3lridsb8rvm7spvncyq206ly0245zgpbm8swi5fhfjp8"))))
     (build-system glib-or-gtk-build-system)
     (arguments
-     `(;; Network manager not yet packaged.
-       #:configure-flags '("--disable-network-manager")
-       ;; Color management test can't reach the colord system service.
+     `(;; Color management test can't reach the colord system service.
        #:tests? #f))
     (native-inputs
      `(("pkg-config" ,pkg-config)
@@ -2680,7 +2677,8 @@ services for numerous locations.")
        ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
        ("libwacom" ,libwacom)
        ("librsvg" ,librsvg)
-       ("xf86-input-wacom" ,xf86-input-wacom)))
+       ("xf86-input-wacom" ,xf86-input-wacom)
+       ("network-manager" ,network-manager)))
     (home-page "http://www.gnome.org")
     (synopsis "GNOME settings daemon")
     (description
@@ -3868,7 +3866,7 @@ metadata in photo and video files of various formats.")
 (define-public shotwell
   (package
     (name "shotwell")
-    (version "0.25.0.1")
+    (version "0.25.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnome/sources/" name "/"
@@ -3876,7 +3874,7 @@ metadata in photo and video files of various formats.")
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "19h0ckrgv0c6sj85m6ankyqkmy453ph9kq6zhf7ys2k5xsrrd776"))))
+                "1bih5hr3pvpkx3fck55bnhngn4fl92ryjizc34wb8pwigbkxnaj1"))))
     (build-system glib-or-gtk-build-system)
     (propagated-inputs
      `(("dconf" ,dconf)))
@@ -4400,7 +4398,19 @@ users.")
                                   "NetworkManager-" version ".tar.xz"))
               (sha256
                (base32
-                "016jc21mwjxvnfiblp5lji55sr8aq6w8a08fsjmqvnpnvm3y6r58"))))
+                "016jc21mwjxvnfiblp5lji55sr8aq6w8a08fsjmqvnpnvm3y6r58"))
+              (snippet
+              '(begin
+                 (use-modules (guix build utils))
+                 (substitute* "configure"
+                   ;; Replace libsystemd-login with libelogind.
+                   (("libsystemd-login") "libelogind"))
+                 (substitute* "src/devices/wwan/nm-modem-manager.c"
+                   (("systemd") "elogind"))
+                 (substitute* "src/nm-session-monitor.c"
+                   (("systemd") "elogind"))
+                 (substitute* "./src/nm-logging.c"
+                   (("systemd") "elogind"))))))
     (build-system gnu-build-system)
     (outputs '("out"
                "doc")) ; 8 MiB of gtk-doc HTML
@@ -4410,7 +4420,9 @@ users.")
              (doc      (assoc-ref %outputs "doc"))
              (dhclient (string-append (assoc-ref %build-inputs "isc-dhcp")
                                       "/sbin/dhclient")))
-         (list "--with-crypto=gnutls"
+         (list "--with-systemd-logind=yes" ;In GuixSD, this is provided by elogind.
+               "--with-consolekit=no"
+               "--with-crypto=gnutls"
                "--disable-config-plugin-ibft"
                "--sysconfdir=/etc"
                "--localstatedir=/var"
@@ -4475,7 +4487,8 @@ users.")
        ("polkit" ,polkit)
        ("ppp" ,ppp)
        ("readline" ,readline)
-       ("util-linux" ,util-linux)))
+       ("util-linux" ,util-linux)
+       ("elogind" ,elogind)))
     (synopsis "Network connection manager")
     (home-page "http://www.gnome.org/projects/NetworkManager/")
     (description
@@ -5275,13 +5288,20 @@ existing databases over the internet.")
               (sha256
                (base32
                 "1fj6wjvnjygzm9br3sw9gya6d18yly1rm69yaiar9spfbkvv4wai"))))
-    (build-system gnu-build-system)
+    (build-system glib-or-gtk-build-system)
     (arguments
      `(#:configure-flags '("--localstatedir=/tmp"
                            "--sysconfdir=/tmp")
        #:imported-modules ((guix build python-build-system)
-                           ,@%gnu-build-system-modules)
+                           ,@%glib-or-gtk-build-system-modules)
        #:phases (modify-phases %standard-phases
+                  (add-after 'install 'wrap-program
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let ((out               (assoc-ref outputs "out"))
+                            (gi-typelib-path   (getenv "GI_TYPELIB_PATH")))
+                        (wrap-program (string-append out "/bin/gnome-tweak-tool")
+                          `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
+                      #t))
                   (add-after 'install 'wrap
                     (@@ (guix build python-build-system) wrap)))))
     (native-inputs
@@ -5289,9 +5309,10 @@ existing databases over the internet.")
        ("pkg-config" ,pkg-config)))
     (inputs
      `(("python" ,python-2)
-       ("python2-pygobject" ,python2-pygobject)))
-    (propagated-inputs
-     `(("libnotify" ,libnotify)
+       ("python2-pygobject" ,python2-pygobject)
+       ("gnome-desktop" ,gnome-desktop)
+       ("libsoup" ,libsoup)
+       ("libnotify" ,libnotify)
        ("gobject-introspection" ,gobject-introspection)
        ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
        ("gtk+" ,gtk+)))
@@ -5334,7 +5355,7 @@ functionality and behavior.")
 (define-public arc-theme
   (package
     (name "arc-theme")
-    (version "20160605")
+    (version "20161119")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/horst3180/arc-theme"
@@ -5342,7 +5363,7 @@ functionality and behavior.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "0sq2031xda8jn2ws0x2bvhq77jfh7xy0c3kg86v6vm2kbrrss7y6"))))
+                "1kbhaxmydyip3vdw4kf8rk776jcd9wf0w7z6h2i4naxdn4rsnw54"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases
@@ -5689,3 +5710,39 @@ only know by its Unicode name or code point.")
 with many options to write web sites, scripts and other code.
 Bluefish supports many programming and markup languages.")
     (license license:gpl3+)))
+
+(define-public gnome-system-monitor
+  (package
+    (name "gnome-system-monitor")
+    (version "3.20.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://gnome/sources/" name "/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1ya41b58syf8g5pc12gw1xm6jhdx3crap803bjwm086r7x2an8wv"))))
+    (build-system glib-or-gtk-build-system)
+    (native-inputs
+     `(("glib:bin" ,glib "bin") ; for glib-mkenums.
+       ("intltool" ,intltool)
+       ("itstool" ,itstool)
+       ("libgtop" ,libgtop)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("gdk-pixbuf" ,gdk-pixbuf) ; for loading SVG files.
+       ("gtk+" ,gtk+)
+       ("gtkmm" ,gtkmm)
+       ("librsvg" ,librsvg)
+       ("libxml2" ,libxml2)))
+    (home-page "https://wiki.gnome.org/Apps/SystemMonitor")
+    (synopsis "Process viewer and system resource monitor for GNOME")
+    (description
+     "GNOME System Monitor is a GNOME process viewer and system monitor with
+an attractive, easy-to-use interface.  It has features, such as a tree view
+for process dependencies, icons for processes, the ability to hide processes,
+graphical time histories of CPU/memory/swap usage and the ability to
+kill/reinice processes.")
+    (license license:gpl2+)))
diff --git a/gnu/packages/gnunet.scm b/gnu/packages/gnunet.scm
index 1eb2670743..27e1ffb4e0 100644
--- a/gnu/packages/gnunet.scm
+++ b/gnu/packages/gnunet.scm
@@ -5,7 +5,7 @@
 ;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
+;;; Copyright © 2016 ng0 <ng0@libertad.pw>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29,7 +29,6 @@
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
-  #:use-module (gnu packages geeqie)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
@@ -163,7 +162,7 @@ and support for SSL3 and TLS.")
 (define-public gnurl
   (package
    (name "gnurl")
-   (version "7.51.0")
+   (version "7.52.1")
    (source (origin
             (method url-fetch)
             (uri (let ((version-with-underscores
@@ -172,13 +171,18 @@ and support for SSL3 and TLS.")
                                   name "-" version-with-underscores ".tar.bz2")))
             (sha256
              (base32
-              "1rgl4agrzghvyfz1afk1p5ryq4b9cz28lavx8ikrav6aiv9h00ig"))))
+              "1gn6mvab2vhfj9637ykg1zjzb23fngfnyd24wlgxmjhf49pn334h"))))
    (build-system gnu-build-system)
+   (outputs '("out"
+              "doc"))                             ; 1.5 MiB of man3 pages
    (inputs `(("gnutls" ,gnutls)
              ("libidn" ,libidn)
              ("zlib" ,zlib)))
    (native-inputs
-    `(("groff" ,groff)
+    `(("autoconf" ,autoconf)
+      ("automake" ,automake)
+      ("libtool" ,libtool)
+      ("groff" ,groff)
       ("perl" ,perl)
       ("pkg-config" ,pkg-config)
       ("python" ,python-2)))
@@ -199,10 +203,30 @@ and support for SSL3 and TLS.")
       #:phases
       ;; We have to patch runtests.pl in tests/ directory
       (modify-phases %standard-phases
-        (add-before 'check 'patch-runtests
+        (add-after 'install 'move-man3-pages
+          (lambda* (#:key outputs #:allow-other-keys)
+            ;; Move section 3 man pages to "doc".
+            (let ((out (assoc-ref outputs "out"))
+                  (doc (assoc-ref outputs "doc")))
+              (mkdir-p (string-append doc "/share/man"))
+              (rename-file (string-append out "/share/man/man3")
+                           (string-append doc "/share/man/man3"))
+              #t)))
+        (add-before 'configure 'autoconf
+          ;; Clear artifacts left (shebangs) from release preparation.
+          (lambda _
+            (zero? (system* "./buildconf"))))
+        (replace 'check
           (lambda _
+            ;; It is unclear why test1026 fails, however the content of it
+            ;; suggests that it is not vital for gnurl.
+            (delete-file "tests/data/test1026")
+
             (substitute* "tests/runtests.pl"
               (("/bin/sh") (which "sh")))
+
+            ;; Make test output more verbose.
+            (zero? (system* "make" "-C" "tests" "test"))
             #t)))))
    (synopsis "Microfork of cURL with support for the HTTP/HTTPS/GnuTLS subset of cURL")
    (description
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index e7c2e2739f..151952663b 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -10,6 +10,8 @@
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;; Copyright © 2016 Christopher Baines <mail@cbaines.net>
 ;;; Copyright © 2016 Mike Gerwitz <mtg@gnu.org>
+;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
+;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -45,9 +47,11 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages security-token)
+  #:use-module (gnu packages swig)
   #:use-module (gnu packages tls)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python))
 
@@ -188,7 +192,7 @@ specifications are building blocks of S/MIME and TLS.")
 (define-public npth
   (package
     (name "npth")
-    (version "1.2")
+    (version "1.3")
     (source
      (origin
       (method url-fetch)
@@ -197,7 +201,7 @@ specifications are building blocks of S/MIME and TLS.")
             version ".tar.bz2"))
       (sha256
        (base32
-        "12n0nvhw4fzwp0k7gjv3rc6pdml0qiinbbfiz4ilg6pl5kdxvnvd"))))
+        "0am86vblapwz84254qpmhz0chk70g6qzh3wdxcs0gvba8d01ka5w"))))
     (build-system gnu-build-system)
     (home-page "https://www.gnupg.org")
     (synopsis "Non-preemptive thread library")
@@ -213,20 +217,23 @@ compatible to GNU Pth.")
 (define-public gnupg
   (package
     (name "gnupg")
-    (version "2.1.16")
+    (version "2.1.17")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
                                   ".tar.bz2"))
               (sha256
                (base32
-                "0i483m9q032a0s50f1izb213g4h5i7pcgn395m6hvl3sg2kadfa9"))))
+                "1js308b46ifx1gim0c9nivr5yxhans7iq1yvkf7zl2928gdm9p65"))
+              (patches
+               ;; This fixes a test failure on 32bit. Remove for next version.
+               ;; https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00869.html
+               (search-patches "gnupg-test-segfault-on-32bit-arch.patch"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
-     `(("adns" ,adns)
-       ("bzip2" ,bzip2)
+     `(("bzip2" ,bzip2)
        ("curl" ,curl)
        ("gnutls" ,gnutls)
        ("libassuan" ,libassuan)
@@ -347,7 +354,7 @@ libskba (working with X.509 certificates and CMS data).")
 (define-public gpgme
   (package
     (name "gpgme")
-    (version "1.6.0")
+    (version "1.8.0")
     (source
      (origin
       (method url-fetch)
@@ -355,7 +362,7 @@ libskba (working with X.509 certificates and CMS data).")
                           ".tar.bz2"))
       (sha256
        (base32
-        "17892sclz3yg45wbyqqrzzpq3l0icbnfl28f101b3062g8cy97dh"))))
+        "0csx3qnycwm0n90ql6gs65if5xi4gqyzzy21fxs2xqicghjrfq2r"))))
     (build-system gnu-build-system)
     (propagated-inputs
      ;; Needs to be propagated because gpgme.h includes gpg-error.h.
@@ -363,7 +370,6 @@ libskba (working with X.509 certificates and CMS data).")
     (inputs
      `(("gnupg" ,gnupg-2.0)
        ("libassuan" ,libassuan)))
-    (arguments '(#:make-flags '("GPG=gpg2")))
     (home-page "https://www.gnupg.org/related_software/gpgme/")
     (synopsis "Library providing simplified access to GnuPG functionality")
     (description
@@ -378,6 +384,33 @@ instead.  This way bug fixes or improvements can be done at a central place
 and every application benefits from this.")
     (license license:lgpl2.1+)))
 
+(define-public python-gpg
+  (package
+    (name "python-gpg")
+    (version (package-version gpgme))
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "gpg" version))
+              (sha256
+               (base32
+                "1x74i6q713c0bckls7rdm8kgsmllf9qvy9x62jghszlhgjkyh9nd"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:tests? #f)) ; No test suite.
+    (inputs
+     `(("gpgme" ,gpgme)))
+    (native-inputs
+     `(("swig" ,swig)))
+    (home-page (package-home-page gpgme))
+    (synopsis "Python bindings for GPGME GnuPG cryptography library")
+    (description "This package provides Python bindings to the GPGME GnuPG
+cryptographic library.  It is developed in the GPGME source code, and then
+distributed separately.")
+    (license license:lgpl2.1+)))
+
+(define-public python2-gpg
+  (package-with-python2 python-gpg))
+
 (define-public python-pygpgme
   (package
     (name "python-pygpgme")
@@ -414,12 +447,7 @@ decrypt messages using the OpenPGP format by making use of GPGME.")
     (license license:lgpl2.1+)))
 
 (define-public python2-pygpgme
-  (let ((base (package-with-python2 python-pygpgme)))
-    (package
-      (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-pygpgme))
 
 (define-public python-gnupg
   (package
@@ -462,35 +490,43 @@ and signature functionality from Python programs.")
   (package-with-python2 python-gnupg))
 
 (define-public pius
-  (package
-   (name "pius")
-   (version "2.2.2")
-   (source (origin
-            (method url-fetch)
-            (uri (string-append
-                  "https://github.com/jaymzh/pius/releases/download/v"
-                  version "/pius-" version ".tar.bz2"))
-            (sha256
-             (base32
-              "0k94mlr7l12mplph7pdgjbampqha47d8mfjq69n4xm80qwbn1rq1"))))
-   (build-system python-build-system)
-   (inputs `(("perl" ,perl)                ;for 'pius-party-worksheet'
-             ("gpg" ,gnupg-2.0)))          ;2.1 fails to talk to gpg-agent 2.0
-   (arguments
-    `(#:tests? #f
-      #:python ,python-2                     ;uses the Python 2 'print' syntax
-      #:phases
-      (modify-phases %standard-phases
-        (add-before
-         'build 'set-gpg-file-name
-         (lambda* (#:key inputs outputs #:allow-other-keys)
-           (let* ((gpg (string-append (assoc-ref inputs "gpg")
-                                      "/bin/gpg")))
-             (substitute* "libpius/constants.py"
-               (("/usr/bin/gpg2") gpg))))))))
-   (synopsis "Programs to simplify GnuPG key signing")
-   (description
-    "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
+  ;; pius 2.2.2 does not work with gpg-agent 2.1, so we take a newer
+  ;; commit.  When a new pius (> 2.2.2) is released, update this package
+  ;; and delete this message.
+  ;; More info: https://github.com/jaymzh/pius/issues/46
+  (let ((commit "891687ccb3d232a1fc0e7da7d22572c0318644cb")
+        (base-version "2.2.2"))     ; i.e. there were no releases
+                                    ; between BASE-VERSION and COMMIT
+    (package
+     (name "pius")
+     (version (string-append base-version "-0."
+                             (string-take commit 7)))
+     (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/jaymzh/pius.git")
+                    (commit commit)))
+              (sha256
+               (base32
+                "0m2na4bnf1rv0zpf404l9ga6pwyf7ijldp4lw5irgh7gkmpllxr3"))))
+     (build-system python-build-system)
+     (inputs `(("perl" ,perl)                ;for 'pius-party-worksheet'
+               ("gpg" ,gnupg)))
+     (arguments
+      `(#:tests? #f
+        #:python ,python-2                     ;uses the Python 2 'print' syntax
+        #:phases
+        (modify-phases %standard-phases
+          (add-before
+           'build 'set-gpg-file-name
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((gpg (string-append (assoc-ref inputs "gpg")
+                                        "/bin/gpg")))
+               (substitute* "libpius/constants.py"
+                 (("/usr/bin/gpg2") gpg))))))))
+     (synopsis "Programs to simplify GnuPG key signing")
+     (description
+      "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
 parties.  It is the main utility and makes it possible to quickly and easily
 sign each UID on a set of PGP keys.  It is designed to take the pain out of
 the sign-all-the-keys part of PGP Keysigning Party while adding security
@@ -498,8 +534,8 @@ to the process.
 
 pius-keyring-mgr and pius-party-worksheet help organisers of
 PGP keysigning parties.")
-   (license license:gpl2)
-   (home-page "https://www.phildev.net/pius/index.shtml")))
+     (license license:gpl2)
+     (home-page "https://www.phildev.net/pius/index.shtml"))))
 
 (define-public signing-party
   (package
@@ -590,14 +626,14 @@ including tools for signing keys, keyring analysis, and party preparation.
 (define-public pinentry-tty
   (package
     (name "pinentry-tty")
-    (version "0.9.7")
+    (version "1.0.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnupg/pinentry/pinentry-"
                                   version ".tar.bz2"))
               (sha256
                (base32
-                "1cp7wjqr6nx31mdclr61s2h84ijqjl0ph99kgj4vyawpjj1j1633"))))
+                "0ni7g4plq6x78p32al7m8h2zsakvg1rhfz0qbc3kdc7yq7nw4whn"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags '("--enable-pinentry-tty")))
diff --git a/gnu/packages/gnustep.scm b/gnu/packages/gnustep.scm
index 6c365cbbc4..8f72bb3253 100644
--- a/gnu/packages/gnustep.scm
+++ b/gnu/packages/gnustep.scm
@@ -60,7 +60,13 @@
                         (string-append "\"" bin "/wmaker.inst")))
                      (substitute* '("src/defaults.c" "WPrefs.app/Menu.c")
                        (("\"wmsetbg")
-                        (string-append "\"" bin "/wmsetbg")))))
+                        (string-append "\"" bin "/wmsetbg")))
+                     ;; Add enough cells to the command character array to
+                     ;; allow passing our large path to the wmsetbg binary.
+                     ;; The path to wmsetbg in Guix requires 67 extra characters.
+                     (substitute* "src/defaults.c"
+                       (("len = strlen\\(text\\) \\+ 40;")
+                        (string-append "len = strlen(text) + 107;")))))
                  (alist-cons-after
                   'install 'wrap
                   (lambda* (#:key outputs #:allow-other-keys)
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 3b00d3c717..d87d592b4d 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -152,7 +152,7 @@ in C/C++.")
 (define-public nspr
   (package
     (name "nspr")
-    (version "4.12")
+    (version "4.13.1")
     (source (origin
              (method url-fetch)
              (uri (string-append
@@ -160,7 +160,7 @@ in C/C++.")
                    version "/src/nspr-" version ".tar.gz"))
              (sha256
               (base32
-               "1pk98bmc5xzbl62q5wf2d6mryf0v95z6rsmxz27nclwiaqg0mcg0"))))
+               "1arkg08l6zlp8v44shqbk2c8qzwd913lgh60fb3yfxls6d8ifk2y"))))
     (build-system gnu-build-system)
     (native-inputs
       `(("perl" ,perl)))
@@ -186,6 +186,10 @@ in the Mozilla clients.")
 (define-public nss
   (package
     (name "nss")
+    ;; FIXME: NSS 3.27.2 fails its tests on armhf. At least some of the test
+    ;; failures appear to be caused by test certificates that have expired.
+    ;; Search the test suite output for 'PayPalEE.cert' for an example:
+    ;; <https://hydra.gnu.org/build/1712083>
     (version "3.27.1")
     (source (origin
               (method url-fetch)
@@ -303,71 +307,49 @@ standards.")
 (define-public icecat
   (package
     (name "icecat")
-    (version "45.3.0-gnu1-beta")
+    (version "45.5.1-gnu1")
     (source
      (origin
       (method url-fetch)
-      (uri (list (string-append "mirror://gnu/gnuzilla/" version "/"
-                                name "-" version ".tar.bz2")
-                 ;; XXX Temporary URI for 45.3 beta release.
-                 ;;     Remove when no longer needed.
-                 (string-append "http://jenkins.trisquel.info/icecat/binaries/"
-                                "icecat-45.3.0-gnu1.tar.bz2")))
+      (uri (string-append "mirror://gnu/gnuzilla/"
+                          (first (string-split version #\-))
+                          "/" name "-" version ".tar.bz2"))
       (sha256
        (base32
-        "1hk5lwaqm8nkfm43sq521mzyrx0x3iiwvlcy62m7cq7grz9wixp6"))
+        "1sbfgsibmb8wfmb2g40gmqwq3nikmrgzksf51ydrz7gnafyfaqw1"))
       (patches
-       `(,(search-patch "icecat-avoid-bundled-libraries.patch")
-         ,(search-patch "icecat-binutils.patch")
-         ,(mozilla-patch "icecat-CVE-2016-5250.patch"     "6711ccb0184e" "1p0s91rw1j7ib6hy9gh5p0l33rja32rfgygh29jw4wq1hxfql8rk")
-         ,(mozilla-patch "icecat-CVE-2016-5257-pt1.patch" "b08f28db372e" "0fmifimavawbff700rzjibsnr16am6902gp965scvi1iy78754ia")
-         ,(mozilla-patch "icecat-CVE-2016-5257-pt2.patch" "a49fd7eb57ba" "1dyh0pjdmf64sjbj1x0mdjwfispacx9yny1kx9nzpf85myryr640")
-         ,(mozilla-patch "icecat-CVE-2016-5257-pt3.patch" "9707c3423a1e" "12nn8av0akza4ml1is9mfy8f7368mrkxsl32ly97r4irzh0iryh1")
-         ,(mozilla-patch "icecat-CVE-2016-5257-pt4.patch" "9d632865560a" "1msp1wqv0c317wqkm82hd9ajbg4a5mcr8pld5j8cx37ccv7f21g3")
-         ,(mozilla-patch "icecat-CVE-2016-5257-pt5.patch" "90697781ec9f" "1h6gcrw5ykf7r59phxqkhpfs7jsgzqn509qm43sj7mbpcvqvk5mg")
-         ,(mozilla-patch "icecat-CVE-2016-5257-pt6.patch" "dd9eb81853b9" "1lyqnn40sayziych8gqd5aj7il3zajf318y8ddj8dzz3c8id5dzc")
-         ,(mozilla-patch "icecat-CVE-2016-5257-pt7.patch" "d91fc76079e0" "022lhixa8dxa6ny9a4bh2di282i0lhyq0glqr9n4q3r8msfmf0ba")
-         ,(mozilla-patch "icecat-CVE-2016-5257-pt8.patch" "3e37ba5e0867" "1w8lncxaayq4xndhyp1hwlv00zggbayljq6rlypb8kdwgzfpi77w")
-         ,(mozilla-patch "icecat-CVE-2016-5257-pt9.patch" "3c4958a98908" "16bc6ai5qddnpm3yw24lry5s7i05xs0ycixzxiir4wmcgwcaayiy")
-         ,(mozilla-patch "icecat-CVE-2016-5261.patch"     "bc2f5467b33d" "0i4b8ydmqg4blx541f56g9qrlm7gp6ih4cs7ixbds724cwk83b9f")
-         ,(mozilla-patch "icecat-CVE-2016-5270.patch"     "7cd50d56bb61" "15nbp5axr59mczxgf37nli37jbw0jdknmxz7z71772pzjd2z07r9")
-         ,(mozilla-patch "icecat-CVE-2016-5272.patch"     "6e43a01fee3c" "025xp1wdnz1gc5l2rsgbrwsh1pbysjiyfgz0g6rvr390r7ag1n74")
-         ,(mozilla-patch "icecat-CVE-2016-5274.patch"     "10c9453407de" "1wqh6hj0dpa7r3hhlyrflcv3r3cg0xq4rb0zvhysi6l7lwb8q51r")
-         ,(mozilla-patch "icecat-CVE-2016-5276.patch"     "fc818ab03f15" "1q64ipl172dcmyy9p8p3l3ljpdh1q1jg48lai0qn2xgknl7sdpks")
-         ,(mozilla-patch "icecat-CVE-2016-5277.patch"     "7b668c5cec92" "1qmchn6qifgjakzac6i4hgnivy062pzgz9p1l11c1m3an1rh0isg")
-         ,(mozilla-patch "icecat-CVE-2016-5278.patch"     "fd5052e343df" "1nzmzlnsz61w9aw4mjvgmlkz88aqv1w858rr0mbv07hwyrljfi84")
-         ,(mozilla-patch "icecat-CVE-2016-5280.patch"     "30673bc9730b" "1qz1684v1rp86ngadcaqd68iqf472flnrnk971ryg4fbsyy8g1za")
-         ,(mozilla-patch "icecat-CVE-2016-5281-pt1.patch" "61405f1fd1df" "1fgmq67arwsl1nrl133fcb5cz6jbbcfjvbv8cd8cadhapin971a7")
-         ,(mozilla-patch "icecat-CVE-2016-5281-pt2.patch" "7776b6ec7b92" "1f7k8f4lk7nyghwajsxf6nb7yvzsaw3jwpa3316znsva12m548mn")
-         ,(mozilla-patch "icecat-CVE-2016-5284-pt1.patch" "55e768767416" "1gg7m12njbkn1jqf2gp2y7zd9ik3xhqkjb7znczna4l438h7ki83")
-         ,(mozilla-patch "icecat-CVE-2016-5284-pt2.patch" "3c42249975a5" "0gnanndkmhsp49rldv4kh0smkdcs7616v46hn567kfw8yfwqvnli")
-         ,(mozilla-patch "icecat-CVE-2016-5284-pt3.patch" "126e5d574811" "13gr08bzqy23adz0ciihb7cy9wdnkcn71i77a3y5b5apm6k54mwi")
-         ,(mozilla-patch "icecat-CVE-2016-5284-pt4.patch" "7b8bd7aae1a8" "0mq5gpq6ni8czfcs1rif4is0igh0054aw41ga0jqkq58g7lavkrf")
-         ,(mozilla-patch "icecat-CVE-2016-5284-pt5.patch" "0799490f4e6f" "1ypv6i48nabbhcqbach8fbgz9bmnhm7q5z9dnfid44z8g54l3f33")
-         ,(mozilla-patch "icecat-CVE-2016-5284-pt6.patch" "fc990e4ae8bc" "1s2cj505ajwwiy4xvn5zlmyzqpgahxmqqvis0a6xm6mjbjh02gm4")
-         ,(mozilla-patch "icecat-bug-1251088.patch"       "5ffa912ed83e" "0v5lpv3c89c2d4y5acn0kyijv096axdnrvaj5ya5yypzfcaqxv24")
-         ,(mozilla-patch "icecat-CVE-2016-5290-pt1.patch" "d4b5b8f3e373" "0w8cxn6ryhgxryy8k8i06yw4mknv509ns9ff1avd0hmgxa83mcdp")
-         ,(mozilla-patch "icecat-CVE-2016-5290-pt2.patch" "adce603ae36d" "0mgs85cwx61bk17r7npl311l4m8yn4667wyhgjmm2ajiys6nn0yl")
-         ,(mozilla-patch "icecat-CVE-2016-5290-pt3.patch" "97268426bb6f" "1z7hg796cgag025gm9pp2szz7w870s7naagdri1dlsilj797v8hr")
-         ,(mozilla-patch "icecat-CVE-2016-5290-pt4.patch" "fc055950b6b8" "05iml5k3rzc653jk4imd111sh18625jxfxkcj12kjdihl0gdr4x4")
-         ,(mozilla-patch "icecat-CVE-2016-5290-pt5.patch" "6f845c23565b" "01dlbnmpsnwr448fajs276y62gl03r74k1hxnwsg6ihwhnfdvn5a")
-         ,(mozilla-patch "icecat-CVE-2016-5290-pt6.patch" "e5d51ca7a3c0" "0hshcz24hc6pkz5pcqxhajm17ibwrlfn1s00frfnpjjy56vacfz0")
-         ,(mozilla-patch "icecat-CVE-2016-5290-pt7.patch" "61d1463acd04" "1iig4a79dxmfcr6w82mdhyl88wy7d36g5n4p24632kbabgl9j9sz")
-         ,(mozilla-patch "icecat-CVE-2016-5290-pt8.patch" "8e0bab4216de" "1knq8h5ni8crfndi3p78b2pyj5lzchqw67vk0yx061r76mq4wp4r")
-         ,(mozilla-patch "icecat-CVE-2016-5290-pt9.patch" "bb10104dc89e" "1flvagckrzfk7hs2xzb5j3s5i0ck57ygyskh5494xmpa2a1nnsqj")
-         ,(mozilla-patch "icecat-CVE-2016-5290-pt10.patch" "7006b275b829" "0sqagm247wx94mf51fyhdkn0vf1a1qy9i829shjnhssd79srxmnn")
-         ,(mozilla-patch "icecat-CVE-2016-5290-pt11.patch" "32ce7be98543" "1y2r9i4p1qpqi75mlwmibr51whz5h1vj28c6mh6ik57dxkqxbclb")
-         ,(mozilla-patch "icecat-CVE-2016-5291.patch"     "3ff0c89f3b26" "1prn74aglshaj27jfrpd2s2i4slpljw4rbzjxc1qgwjvkq4m6j6f")
-         ,(mozilla-patch "icecat-CVE-2016-5297.patch"     "46b07bdbf8b2" "1n8y1c5l0ms81dra7jsx8mp633ak5qvx105drvlg9hn3m0fwv1lj")
-         ,(search-patch  "icecat-CVE-2016-9064.patch") ; adapted for icecat based on:
-                                        ;                 "00c2b7baaa0b" "0y02yb7r62656nq9dji9dnwils2lxqasjz5byv62j1xa87r7f9hp"
-         ,(mozilla-patch "icecat-CVE-2016-9066.patch"     "576f1725a57e" "1lic9d3r8r1vcniw1g3ca71390lw3dmwjsw55dp6z96hyjbcq3fd")
-         ,(mozilla-patch "icecat-bug-1212939.patch"       "4a0e851f83e4" "182vx1qxrr7r2175jjf0bcixwwm1khdj4sq0c8wnsyry7p9waq5q")
-         ,(mozilla-patch "icecat-bug-1168743.patch"       "a1e06af61ab3" "07llk1ba6axjasiv30vicz96k55ff4mybxy21vjxk6j0asgyjz23")
-         ,(mozilla-patch "icecat-bug-1287176.patch"       "0569d5dce9db" "1d41sqbq6jc3af73dz9w19win7v7c12kw1mp7j7b1gkadq46c4y7")
-         ,(mozilla-patch "icecat-bug-1263665.patch"       "a79cafee93f4" "0bn7hpm8mh8qmkpz5wiridr792irrs5sjxyvryazy2i0p4pjh62p")
-         ,(mozilla-patch "icecat-bug-1304962.patch"       "f61049d5f373" "04d1na31qqq7yq4jjvhq6vzqq3f23rwac8c6fw4h5fx1pdb3l997")
-         ,(mozilla-patch "icecat-bug-1314574.patch"       "46b2558ca469" "00q8676xg4wb7p371wgi04nl05j7idkb2kna9a0l08k6lks9wdhh")))
+       (list
+        (search-patch "icecat-avoid-bundled-libraries.patch")
+        (search-patch "icecat-binutils.patch")
+        (mozilla-patch "icecat-bug-1301381.patch"       "2e5438a92617" "0pyjbzyy04759ldpcar8q8cccv67j1jkxsg46rkq7a3rbhmwmw4p") ;CVE-2016-9897
+        (mozilla-patch "icecat-bug-1317409.patch"       "7391f60fb790" "1hydggpmmm2cs9lb15micnkxn4wl4cda9g74hkn3zmks805vjz3h") ;CVE-2016-9899
+        (mozilla-patch "icecat-bug-1309834.patch"       "744e01001e6e" "0z2fq765kap3ll9as5rvjpnbj3pw26074alw7df0zi215qz47nxr") ;CVE-2016-9893-pt1
+        (mozilla-patch "icecat-bug-1317936-pt1.patch"   "8ae673f34a5b" "1rlbihckl9afa0y91lqs7gpnv6a7zxzrmxjv95y3yrl03kibqp76") ;CVE-2016-9904-pt1
+        (mozilla-patch "icecat-bug-1317936-pt2.patch"   "409c23c144fe" "05kgs16y8s5pxmg2dxp93247zagnj6zgj3209qpm5hz3an7gr13h") ;CVE-2016-9904-pt2
+        (mozilla-patch "icecat-bug-1319122.patch"       "994d9bd0e28d" "007wifyx3b2ln4fwv1i8n24yz5ngjf4mkzd7sqr5bpd3q88ff293") ;CVE-2016-9900
+        (mozilla-patch "icecat-bug-1312609.patch"       "0fc43af8982e" "0pc8q9knzq2knj723mwkay1lnzbzysb07ygxnc16mcb6f7vl2mw8") ;CVE-2016-9893-pt2
+        (mozilla-patch "icecat-bug-1319524.patch"       "19f9a4643d77" "0w5yxj1l0hvs66q9agjp4m5sfby7fj05lx33gaqf899bw4hn4vcf") ;CVE-2016-9893-pt3
+        (mozilla-patch "icecat-bug-1312548.patch"       "c58442c414f5" "1z1w1v8xagkhrwgp51ij1k2gx0ripslia09vm78812n7gcwddaas") ;CVE-2016-9893-pt4
+        (mozilla-patch "icecat-bug-1314442.patch"       "5054047b7328" "0xlw8irymfp3bcaa5jpf7clf7bq6qxp3i8zapp8jya8lzr1nf868") ;CVE-2016-9898
+        (mozilla-patch "icecat-bug-881832-pt1.patch"    "1123263318a3" "1qkxwva3zrcs1zhga8ncmndq03988dx75i896g53gbvpskj06915")
+        (mozilla-patch "icecat-bug-881832-pt2.patch"    "dc87c0a39adf" "01rapf14f3r2wk0cjd16dn1rll4ipgs33cnjmjck48nvk67ikz6h")
+        (mozilla-patch "icecat-bug-881832-pt3.patch"    "f20e5f488368" "15ql9ywifb3gm2g1057k63f821dbs3wqsh3zhndprzf3dn6aha4i")
+        (mozilla-patch "icecat-bug-881832-pt4.patch"    "7950c4d5bd7c" "0jhkg5hq5yfy7rh21k1mpbsbr81ql85aazym30zy3n2cf28xxhd7")
+        (mozilla-patch "icecat-bug-881832-pt5.patch"    "972734ec21b6" "073i4v1f1ydy49i57pvzscz95sjr5bbk9s5sajxvmmcsmwhpjdfy")
+        (mozilla-patch "icecat-bug-1293985-pt1.patch"   "aebd3687e05e" "1qz6hdgflcrqyg7fv66cbg23v4b7q5bc2yxzrgjxs4j1d7jy1s0s") ;CVE-2016-9905-pt1
+        (mozilla-patch "icecat-bug-1293985-pt2.patch"   "63d8e5cd27cb" "11fsgyngy7v59ma30xdbmycwf4izwikzvaljngm3ks4534inpl4a") ;CVE-2016-9905-pt2
+        (mozilla-patch "icecat-bug-1279202.patch"       "e560997291af" "1hn35slasfcj3ryka4fsarx4l9r99z0iwj67fmbv6zxz4z133kks")
+        (mozilla-patch "icecat-bug-1320039.patch"       "21c615b65048" "0ibgsxa36x9ajn2jqbhxxvrfvj6x6iyspsmzzn4brdz11n93skhr") ;CVE-2016-9902
+        (mozilla-patch "icecat-bug-1320057.patch"       "c15e5afc0430" "17gj32agqs94548z8lvz0l6zz3kbwajn8as0y4iw5nb6jsll4c66") ;CVE-2016-9901
+        (mozilla-patch "icecat-bug-1163212.patch"       "46163fb1cb34" "1yikayczfgfla3aka0159apq3149d52sgvlca0sivx4myd0lvjm7") ;CVE-2016-9893-pt5
+        (mozilla-patch "icecat-bug-1317805.patch"       "cde2a37100f5" "100abggnhwyw84almxrkxqfpyfkd4pqkcrh5y9g4d3jd2h16asvl") ;CVE-2016-9893-pt6
+        (mozilla-patch "icecat-bug-1298773-pt1.patch"   "9b78ab1e6d07" "19ib6bp96xk000ll40b8qxvizkncyzclz2rsb9w5fa42qs9978ff") ;CVE-2016-9893-pt7
+        (mozilla-patch "icecat-bug-1298773-pt2.patch"   "78ebf9c9dfb0" "1shgr4rk6r2zxr1qqk1j3qnnqzqxnbi093qhlrfh8q5q1ivqf6k1") ;CVE-2016-9893-pt8
+        (mozilla-patch "icecat-bug-1299098.patch"       "a46a9f16823c" "0dwkyz3kcqnfcbhbfh2lss7s0yh87rgzb871qxx3x4ynyqph9mnz") ;CVE-2016-9893-pt9
+        (mozilla-patch "icecat-bug-1311687.patch"       "6bc7cc7a33a6" "1wggcqv84n8mp7xps7hy4rwy61fkh45imfqzc0b46s3w5hyhypn2")
+        (mozilla-patch "icecat-bug-1287912.patch"       "778f65148b40" "0j2a153sk0654vv2lnxjib4lwml3mlqn6vs46c2pp82iba8nyfrm") ;CVE-2016-9893-pt10
+        (mozilla-patch "icecat-bug-1312272.patch"       "94bd2b43c766" "10h0qpr6m9cqyqxxnkbb6mzb3cagavzlynkxgd7a4izyq1bv28rk") ;CVE-2016-9895
+        (mozilla-patch "icecat-bug-1315631.patch"       "893de7431d51" "11gyik8mwipl6ipypkvdq519pw7ccbg0g0bnvxb7271n44cqqcq5"))) ;CVE-2016-9893-pt11
       (modules '((guix build utils)))
       (snippet
        '(begin
@@ -403,6 +385,7 @@ standards.")
                       "modules/zlib"
                       "modules/libbz2"
                       "ipc/chromium/src/third_party/libevent"
+                      "media/libjpeg"
                       "media/libvpx"
                       "security/nss"
                       "gfx/cairo"
@@ -410,7 +393,7 @@ standards.")
                       "db/sqlite3"))
           ;; Delete .pyc files, typically present in icecat source tarballs
           (for-each delete-file (find-files "." "\\.pyc$"))
-          ;; Delete obj-* directories, found in icecat-45.3.0-gnu1-beta
+          ;; Delete obj-* directories, sometimes present in icecat tarballs
           (for-each delete-file-recursively
                     (scandir "." (lambda (name)
                                    (string-prefix? "obj-" name))))
@@ -432,6 +415,7 @@ standards.")
        ("hunspell" ,hunspell)
        ("libcanberra" ,libcanberra)
        ("libgnome" ,libgnome)
+       ("libjpeg-turbo" ,libjpeg-turbo)
        ("libxft" ,libxft)
        ("libevent" ,libevent)
        ("libxinerama" ,libxinerama)
@@ -489,14 +473,14 @@ standards.")
                            "--disable-debug"
                            "--disable-debug-symbols"
 
-                           ;; Temporary hack to work around missing
-                           ;; "unofficial" branding in
-                           ;; icecat-45.3.0-gnu1-beta.
+                           ;; Hack to work around missing
+                           ;; "unofficial" branding in icecat.
                            "--enable-official-branding"
 
                            ;; Avoid bundled libraries.
                            "--with-system-zlib"
                            "--with-system-bz2"
+                           "--with-system-jpeg"        ; must be libjpeg-turbo
                            "--with-system-libevent"
                            "--with-system-libvpx"
                            "--with-system-icu"
@@ -517,16 +501,6 @@ standards.")
                            ;; Network Graphics (PNG) format";
                            ;; we probably do not wish to support it.
                            ;; "--with-system-png"
-
-                           ;; Fails with "libjpeg-turbo JCS_EXTENSIONS
-                           ;; required".
-                           ;; According to
-                           ;; http://sourceforge.net/projects/libjpeg-turbo/ ,
-                           ;; "libjpeg-turbo is a derivative of libjpeg that
-                           ;; uses MMX, SSE, SSE2, and NEON SIMD instructions
-                           ;; to accelerate baseline JPEG compression/
-                           ;; decompression", so we had better not use it
-                           ;; "--with-system-jpeg"
                            )
 
        #:modules ((ice-9 ftw)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index c38270afcb..9d8dcda545 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2016 Petter <petter@mykolab.ch>
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
 ;;;
-;;; This file is an addendum GNU Guix.
+;;; 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
@@ -200,7 +200,7 @@ sequential processes (CSP) concurrent programming features added.")
   (package
     (inherit go-1.4)
     (name "go")
-    (version "1.7.3")
+    (version "1.7.4")
     (source
      (origin
        (method url-fetch)
@@ -208,7 +208,7 @@ sequential processes (CSP) concurrent programming features added.")
                            name version ".src.tar.gz"))
        (sha256
         (base32
-         "0i7gy5d8j6186a6x07cnj3r7mpfg3964q8byslx0p6x04w00lhvr"))))
+         "1k0lnsk5i9swi209wh535lpnpczsh6l8m1pfncmilrdsx48r262c"))))
     (arguments
      (substitute-keyword-arguments (package-arguments go-1.4)
        ((#:phases phases)
diff --git a/gnu/packages/gps.scm b/gnu/packages/gps.scm
index da5485e6ee..bc0f3ed115 100644
--- a/gnu/packages/gps.scm
+++ b/gnu/packages/gps.scm
@@ -27,7 +27,7 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages docbook)
-  #:use-module (gnu packages geeqie)              ;exiv2
+  #:use-module (gnu packages image)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages qt))
diff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scm
index 610bd16beb..d47d45e527 100644
--- a/gnu/packages/graphviz.scm
+++ b/gnu/packages/graphviz.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Theodoros Foradis <theodoros.for@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20,6 +21,7 @@
 (define-module (gnu packages graphviz)
   #:use-module (guix packages)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system python)
   #:use-module (guix download)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages gtk)
@@ -30,11 +32,14 @@
   #:use-module (gnu packages image)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages gd)
   #:use-module (gnu packages swig)
-  #:use-module ((guix licenses) #:select (lgpl2.0+ epl1.0)))
+  #:use-module ((guix licenses) #:select (lgpl2.0+ epl1.0 lgpl3+)))
 
 (define-public graphviz
   (package
@@ -148,3 +153,46 @@ interfaces for other technical domains.")
      "Library intended to provide a set of useful functions to deal with
 3D surfaces meshed with interconnected triangles.")
     (license lgpl2.0+)))
+
+(define-public xdot
+  (package
+    (name "xdot")
+    (version "0.7")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (pypi-uri "xdot" version))
+      (sha256
+       (base32
+        "1q0f3pskb09saw1qkd2s6vmk80rq5zjhq8l93dfr2x6r04r0q46j"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; We wrap xdot, so that we don't propagate gtk+ and graphviz
+         (add-after 'install 'wrap
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (wrap-program (string-append (assoc-ref outputs "out") "/bin/xdot")
+               `("GI_TYPELIB_PATH" ":" prefix
+                 (,(string-append
+                    (assoc-ref inputs "gtk+") "/lib/girepository-1.0"
+                    ":" (assoc-ref inputs "pango") "/lib/girepository-1.0"
+                    ":" (assoc-ref inputs "gdk-pixbuf") "/lib/girepository-1.0"
+                    ":" (assoc-ref inputs "atk") "/lib/girepository-1.0")))
+               `("PATH" ":" prefix
+                 (,(string-append (assoc-ref inputs "graphviz") "/bin"))))
+             #t)))))
+    (inputs
+     `(("atk" ,atk)
+       ("gdk-pixbuf" ,gdk-pixbuf+svg)
+       ("graphviz" ,graphviz)
+       ("gtk+" ,gtk+)
+       ("python-pycairo" ,python-pycairo)
+       ("python-pygobject" ,python-pygobject)))
+    (home-page "https://pypi.python.org/pypi/xdot")
+    (synopsis "Interactive viewer for graphviz dot files")
+    (description "Xdot is an interactive viewer for graphs written in
+@code{graphviz}’s dot language.  Internally, it uses the xdot output format as
+an intermediate format,and @code{gtk} and @code{cairo} for rendering.  Xdot can
+be used either as a standalone application, or as a python library.")
+    (license lgpl3+)))
diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm
index 93d0380595..e7a6fbda15 100644
--- a/gnu/packages/groff.scm
+++ b/gnu/packages/groff.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -21,6 +22,7 @@
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
   #:use-module (gnu packages bison)
@@ -56,3 +58,42 @@ formatted output based on formatting commands contained within the text.  It
 is usually the formatter of \"man\" documentation pages.")
    (license gpl3+)
    (home-page "http://www.gnu.org/software/groff/")))
+
+;; There are no releases, so we take the latest commit.
+(define-public roffit
+  (let ((commit "e5228388e3faf2b7f1ae5bd048ad46ed565304c6")
+        (revision "1"))
+    (package
+      (name "roffit")
+      (version (string-append "0.11-" revision "." (string-take commit 9)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/bagder/roffit.git")
+                      (commit commit)))
+                (file-name (string-append "roffit-" commit "-checkout"))
+                (sha256
+                 (base32
+                  "1y7ndbqciy7h0khlpi1bv4v1614vhybnmm4jysj6fwxkw9cwv1nc"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:test-target "test"
+         #:make-flags
+         (list (string-append "INSTALLDIR="
+                              (assoc-ref %outputs "out") "/bin"))
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (add-before 'install 'pre-install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (mkdir-p (string-append (assoc-ref outputs "out")
+                                       "/bin"))
+               #t)))))
+      (inputs
+       `(("perl" ,perl)))
+      (home-page "https://daniel.haxx.se/projects/roffit/")
+      (synopsis "Convert nroff files to HTML")
+      (description
+       "Roffit is a program that reads an nroff file and outputs an HTML file.
+It is typically used to display man pages on a web site.")
+      (license expat))))
diff --git a/gnu/packages/grub.scm b/gnu/packages/grub.scm
index ef7395e95e..3658f221ce 100644
--- a/gnu/packages/grub.scm
+++ b/gnu/packages/grub.scm
@@ -36,38 +36,7 @@
   #:use-module (gnu packages man)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages ncurses)
-  #:use-module (gnu packages cdrom)
-  #:use-module (srfi srfi-1))
-
-(define qemu-for-tests
-  ;; Newer QEMU versions, such as 1.5.1, no longer support the 'shutdown'
-  ;; instruction.  This leads to test hangs, as reported at
-  ;; <https://bugs.launchpad.net/bugs/947597> and fixed at
-  ;; <http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/4828>.
-  ;; Work around it by using an older QEMU.
-  (package (inherit qemu-minimal)
-    (version "1.3.1")
-    (source (origin
-             (method url-fetch)
-             (uri (string-append "http://wiki.qemu-project.org/download/qemu-"
-                                 version ".tar.bz2"))
-             (sha256
-              (base32
-               "1bqfrb5dlsxm8gxhkksz8qzi5fhj3xqhxyfwbqcphhcv1kpyfwip"))))
-
-    ;; With recent GLib versions, we get a test failure:
-    ;;   ERROR:tests/rtc-test.c:176:check_time: assertion failed (ABS(t - s) <= wiggle): (382597824 <= 2)
-    ;; Simply disable the tests.
-    (arguments `(#:tests? #f
-                 ,@(substitute-keyword-arguments (package-arguments qemu-minimal)
-                     ((#:phases phases)
-                      ;; We disable the tests so we also skip the phase disabling
-                      ;; the qga test, which fails due to changes in QEMU
-                      `(modify-phases ,phases
-                         (delete 'disable-test-qga))))))
-
-    ;; The manual fails to build with Texinfo 5.x.
-    (native-inputs (alist-delete "texinfo" (package-native-inputs qemu)))))
+  #:use-module (gnu packages cdrom))
 
 (define unifont
   ;; GNU Unifont, <http://gnu.org/s/unifont>.
@@ -151,7 +120,7 @@
        ;; Dependencies for the test suite.  The "real" QEMU is needed here,
        ;; because several targets are used.
        ("parted" ,parted)
-       ("qemu" ,qemu-for-tests)
+       ("qemu" ,qemu-minimal)
        ("xorriso" ,xorriso)))
     (home-page "https://www.gnu.org/software/grub/")
     (synopsis "GRand Unified Boot loader")
@@ -164,3 +133,29 @@ on the same computer; upon booting the computer, the user is presented with a
 menu to select one of the installed operating systems.")
     (license gpl3+)
     (properties '((cpe-name . "grub2")))))
+
+(define-public grub-efi
+  (package
+    (inherit grub)
+    (name "grub-efi")
+    (synopsis "GRand Unified Boot loader (UEFI version)")
+    (inputs
+     `(("efibootmgr" ,efibootmgr)
+       ,@(package-inputs grub)))
+    (arguments
+     `(;; TODO: Tests need a UEFI firmware for qemu. There is one at
+       ;; https://github.com/tianocore/edk2/tree/master/OvmfPkg .
+       ;; Search for 'OVMF' in "tests/util/grub-shell.in".
+       #:tests? #f
+       ,@(substitute-keyword-arguments (package-arguments grub)
+           ((#:configure-flags flags) `(cons* "--with-platform=efi"
+                                              ,flags))
+           ((#:phases phases)
+            `(modify-phases ,phases
+               (add-after 'patch-stuff 'use-absolute-efibootmgr-path
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (substitute* "grub-core/osdep/unix/platform.c"
+                     (("efibootmgr")
+                      (string-append (assoc-ref inputs "efibootmgr")
+                                     "/sbin/efibootmgr")))
+                   #t)))))))))
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index 86ea690e8b..54f1529de4 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -98,7 +98,7 @@ arrays of data.")
 (define-public gstreamer
   (package
     (name "gstreamer")
-    (version "1.10.1")
+    (version "1.10.2")
     (source
      (origin
       (method url-fetch)
@@ -107,7 +107,7 @@ arrays of data.")
             version ".tar.xz"))
       (sha256
        (base32
-        "1npnpyrw8603ivi5g3ziglvh3hq2shypid2vjcmki6g6w2bgk3gn"))))
+        "0rcd4ya4k99x6ngm9v78as7ql0rqibkwshc13lb4rjdszs0qw3hm"))))
     (build-system gnu-build-system)
     (outputs '("out" "doc"))
     (arguments
@@ -146,7 +146,7 @@ This package provides the core library and elements.")
 (define-public gst-plugins-base
   (package
     (name "gst-plugins-base")
-    (version "1.10.1")
+    (version "1.10.2")
     (source
      (origin
       (method url-fetch)
@@ -154,7 +154,7 @@ This package provides the core library and elements.")
                           name "-" version ".tar.xz"))
       (sha256
        (base32
-        "1jbnr6vbklzli493xdd8y5sflm32r90lifpacxw9vbvs9hlyxkv6"))))
+        "086yjwmp4fykcqkj6zqhwrk2z49981kl8x545vz2wvblrc7x9h7v"))))
     (build-system gnu-build-system)
     (outputs '("out" "doc"))
     (propagated-inputs
@@ -201,20 +201,16 @@ for the GStreamer multimedia library.")
 (define-public gst-plugins-good
   (package
     (name "gst-plugins-good")
-    (version "1.10.1")
+    (version "1.10.2")
     (source
      (origin
       (method url-fetch)
       (uri (string-append
             "https://gstreamer.freedesktop.org/src/" name "/"
             name "-" version ".tar.xz"))
-      (patches (search-patches "gst-plugins-good-flic-bounds-check.patch"
-                               "gst-plugins-good-fix-signedness.patch"
-                               "gst-plugins-good-fix-invalid-read.patch"
-                               "gst-plugins-good-fix-crashes.patch"))
       (sha256
        (base32
-        "1hkcap9l2603266gyi6jgvx7frbvfmb7xhfhjizbczy1wykjwr57"))))
+        "04rksbhjj2yz32g523cfabwqn2s3byd94dpbxghxr0p9ridk53qr"))))
     (build-system gnu-build-system)
     (inputs
      `(("aalib" ,aalib)
@@ -270,14 +266,14 @@ developers consider to have good quality code and correct functionality.")
 (define-public gst-plugins-bad
   (package
     (name "gst-plugins-bad")
-    (version "1.10.1")
+    (version "1.10.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://gstreamer.freedesktop.org/src/"
                                   name "/" name "-" version ".tar.xz"))
               (sha256
                (base32
-                "07cjra4fclrk6lpdm5hrsgp79aqpklx3v3l9scain091zvchwghk"))))
+                "0fisnnfpp3s8pbm6hjrfi4wjpq2da8c6w3ns9pjcg7590f9wm587"))))
     (outputs '("out" "doc"))
     (build-system gnu-build-system)
     (arguments
@@ -347,7 +343,7 @@ par compared to the rest.")
 (define-public gst-plugins-ugly
   (package
     (name "gst-plugins-ugly")
-    (version "1.10.1")
+    (version "1.10.2")
     (source
      (origin
        (method url-fetch)
@@ -355,7 +351,7 @@ par compared to the rest.")
                            name "/" name "-" version ".tar.xz"))
        (sha256
         (base32
-         "1hl385fys7hfx5ffipavvhciq6hwm731rs4d6r9fn7h9qagxbv55"))))
+         "17gc2zd3v6spmm2d6912sqfcyyv5f2ghdhq31f5kx5mw5r6ds0zk"))))
     (build-system gnu-build-system)
     (inputs
      `(("gst-plugins-base" ,gst-plugins-base)
@@ -386,7 +382,7 @@ distribution problems in some jurisdictions, e.g. due to patent threats.")
 (define-public gst-libav
   (package
     (name "gst-libav")
-    (version "1.10.1")
+    (version "1.10.2")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -394,7 +390,7 @@ distribution problems in some jurisdictions, e.g. due to patent threats.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1ivjbh5g0l5ykfpc16kq5x2jz8d4ignyha14jpiz3pz6w26qpci7"))))
+                "0g778j7w4vpbhwjzyrzpajvr26nxm6vqby84v8g1w1hz44v71pd3"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags '("--with-system-libav")
@@ -424,7 +420,7 @@ compression formats through the use of the libav library.")
 (define-public python-gst
   (package
     (name "python-gst")
-    (version "1.10.1")
+    (version "1.10.2")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -432,7 +428,7 @@ compression formats through the use of the libav library.")
                     "gst-python-" version ".tar.xz"))
               (sha256
                (base32
-                "04xhh0z0c0s6aq7kvmfs4r6yl1pjnqz0krp05pbjy62ayx5b61ak"))))
+                "1sljnqkxf2ix6yzghrapw5irl0rbp8aa8w2hggk7i6d9js10ls71"))))
     (build-system gnu-build-system)
     (arguments
      ;; XXX: Factorize python-sitedir with python-build-system.
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 17bd9c9b00..fc4677c247 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
+;;; Coypright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Fabian Harfert <fhmgufs@web.de>
 ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
@@ -34,6 +35,7 @@
   #:use-module (guix utils)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (guix build-system waf)
@@ -107,7 +109,8 @@ tools have full access to view and control running applications.")
                                 version ".tar.xz"))
             (sha256
              (base32
-              "0lmjlzmghmr27y615px9hkm552x7ap6pmq9mfbzr6smp8y2b6g31"))))
+              "0lmjlzmghmr27y615px9hkm552x7ap6pmq9mfbzr6smp8y2b6g31"))
+            (patches (search-patches "cairo-CVE-2016-9082.patch"))))
    (build-system gnu-build-system)
    (propagated-inputs
     `(("fontconfig" ,fontconfig)
@@ -165,7 +168,7 @@ affine transformation (scale, rotation, shear, etc.).")
 (define-public harfbuzz
   (package
    (name "harfbuzz")
-   (version "1.2.4")
+   (version "1.3.3")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://www.freedesktop.org/software/"
@@ -173,7 +176,7 @@ affine transformation (scale, rotation, shear, etc.).")
                                  version ".tar.bz2"))
              (sha256
               (base32
-               "14g4kpph8hgplkm954daxiymxx0vicfq7b7svvdsx54g5bqvv7a4"))))
+               "1jdkdjvci5d6r26vimsz24hz3xqqrk5xq40n693jn4m42mqrh816"))))
    (build-system gnu-build-system)
    (outputs '("out"
               "bin")) ; 160K, only hb-view depend on cairo
@@ -198,7 +201,7 @@ affine transformation (scale, rotation, shear, etc.).")
     "HarfBuzz is an OpenType text shaping engine.")
    (license (license:x11-style "file://COPYING"
                        "See 'COPYING' in the distribution."))
-   (home-page "http://www.freedesktop.org/wiki/Software/HarfBuzz/")))
+   (home-page "https://www.freedesktop.org/wiki/Software/HarfBuzz/")))
 
 (define-public pango
   (package
@@ -298,6 +301,23 @@ graph-like environments, e.g. modular synths or finite state machine
 diagrams.")
     (license license:gpl3+)))
 
+(define-public ganv-devel
+  (let ((commit "31685d283e9b811b61014f820c42807f4effa071")
+        (revision "1"))
+    (package
+      (inherit ganv)
+      (name "ganv")
+      (version (string-append "1.4.2-" revision "."
+                              (string-take commit 9)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "http://git.drobilla.net/ganv.git")
+                      (commit commit)))
+                (sha256
+                 (base32
+                  "0xmbykdl42jn9cgzrqrys5lng67d26nk5xq10wkkvjqldiwdck56")))))))
+
 (define-public gtksourceview-2
   (package
     (name "gtksourceview")
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index dffa1258d2..a408f8f9aa 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org>
 ;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co>
@@ -146,8 +146,8 @@ without requiring the source code to be rewritten.")
    (native-inputs `(("pkgconfig" ,pkg-config)))
    (inputs `(("libffi" ,libffi)
              ("readline" ,readline)
-             ("bash" ,bash)))
-
+             ,@(libiconv-if-needed)
+             ,@(if (target-mingw?) '() `(("bash" ,bash)))))
    (propagated-inputs
     `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
        ;; reads `-lltdl -lunistring', adding them here will add the needed
@@ -176,8 +176,15 @@ without requiring the source code to be rewritten.")
                   ;; Tell (ice-9 popen) the file name of Bash.
                   (let ((bash (assoc-ref inputs "bash")))
                     (substitute* "module/ice-9/popen.scm"
+                      ;; If bash is #f allow fallback for user to provide
+                      ;; "bash" in PATH.  This happens when cross-building to
+                      ;; MinGW for which we do not have Bash yet.
                       (("/bin/sh")
-                       (string-append bash "/bin/bash")))))
+                       ,@(if (target-mingw?)
+                             '((if bash
+                                   (string-append bash "/bin/bash")
+                                   "bash"))
+                             '((string-append bash "/bin/bash")))))))
                 %standard-phases)))
 
    (native-search-paths
@@ -210,7 +217,7 @@ without requiring the source code to be rewritten.")
 (define-public guile-next
   (package (inherit guile-2.0)
     (name "guile-next")
-    (version "2.1.4")
+    (version "2.1.5")
     (replacement #f)
     (source (origin
               (method url-fetch)
@@ -218,7 +225,7 @@ without requiring the source code to be rewritten.")
                                   version ".tar.xz"))
               (sha256
                (base32
-                "1w8kyy8nz6489d092fix6lvgjrk0bww7i0c2k67ym4hq0kjl0r1j"))
+                "0r9y4hw17dlxahik4zsccfb2f3p2a07wqndfm251bgmam9hln6gi"))
               (modules '((guix build utils)))
 
               ;; Remove the pre-built object files.  Instead, build everything
@@ -227,7 +234,10 @@ without requiring the source code to be rewritten.")
               (snippet '(for-each delete-file
                                   (find-files "prebuilt" "\\.go$")))))
     (synopsis "Snapshot of what will become version 2.2 of GNU Guile")
-    (properties '((timeout . 72000)))  ; 20 hours
+    (properties '((timeout . 72000)               ;20 hours
+                  (upstream-name . "guile")
+                  (ftp-server . "alpha.gnu.org")
+                  (ftp-directory . "/gnu/guile")))
     (native-search-paths
      (list (search-path-specification
             (variable "GUILE_LOAD_PATH")
@@ -408,16 +418,20 @@ many readers as needed).")
                                "--with-gnu-filesystem-hierarchy")
        #:phases
        (modify-phases %standard-phases
-         (add-after 'install 'post-install
+         (add-before 'build 'fix-libguile-ncurses-file-name
            (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out   (assoc-ref outputs "out"))
-                    (dir   (string-append out "/share/guile/site/"))
-                    (files (find-files dir ".scm")))
-               (substitute* files
-                 (("\"libguile-ncurses\"")
-                  (format #f "\"~a/lib/guile/2.0/libguile-ncurses\""
-                          out)))
-               #t))))))
+             (and (zero? (system* "make" "install"
+                                  "-C" "src/ncurses"
+                                  "-j" (number->string
+                                        (parallel-job-count))))
+                  (let* ((out   (assoc-ref outputs "out"))
+                         (dir   "src/ncurses")
+                         (files (find-files dir ".scm")))
+                    (substitute* files
+                      (("\"libguile-ncurses\"")
+                       (format #f "\"~a/lib/guile/2.0/libguile-ncurses\""
+                               out)))
+                    #t)))))))
     (home-page "https://www.gnu.org/software/guile-ncurses/")
     (synopsis "Guile bindings to ncurses")
     (description
@@ -669,7 +683,7 @@ See http://minikanren.org/ for more on miniKanren generally.")
 (define-public guile-irregex
   (package
     (name "guile-irregex")
-    (version "0.9.4")
+    (version "0.9.6")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -677,7 +691,7 @@ See http://minikanren.org/ for more on miniKanren generally.")
                     version ".tar.gz"))
               (sha256
                (base32
-                "0cmaqvqvyarcnnsyrl2p6vwyv1r3k1q7qw8p9zrlnz1vpbj7vb90"))))
+                "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
     (build-system gnu-build-system)
     (arguments
      `(#:modules ((guix build utils)
@@ -1399,4 +1413,74 @@ type system, elevating types to first-class status.")
 dictionary and suggesting spelling corrections.")
     (license gpl3+)))
 
+(define-public guile-bash
+  ;; This project is currently retired.  It was initially announced here:
+  ;; <https://lists.gnu.org/archive/html/guile-user/2015-02/msg00003.html>.
+  (let ((commit "1eabc563ca5692b3e08d84f1f0e6fd2283284469")
+        (revision "0"))
+    (package
+      (name "guile-bash")
+      (version (string-append "0.1.6-" revision "." (string-take commit 7)))
+      (home-page
+       "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (commit commit)
+                      (url home-page)))
+                (sha256
+                 (base32
+                  "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p"))
+                (file-name (string-append name "-" version "-checkout"))))
+      (build-system gnu-build-system)
+      (arguments
+       '(#:phases (modify-phases %standard-phases
+                    (add-after 'unpack 'bootstrap
+                      (lambda _
+                        (zero? (system* "sh" "bootstrap")))))
+
+         #:configure-flags
+         ;; Add -I to match 'bash.pc' of Bash 4.4.
+         (list (string-append "CPPFLAGS=-I"
+                              (assoc-ref %build-inputs "bash:include")
+                              "/include/bash/include")
+
+               ;; The '.a' file is useless.
+               "--disable-static"
+
+               ;; Install 'lib/bash' as Bash 4.4 expects.
+               (string-append "--libdir=" (assoc-ref %outputs "out")
+                              "/lib/bash"))))
+      (native-inputs `(("pkg-config" ,pkg-config)
+                       ("autoconf" ,(autoconf-wrapper))
+                       ("automake" ,automake)
+                       ("libtool" ,libtool)
+                       ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
+                       ("gettext" ,gettext-minimal)))
+      (inputs `(("guile" ,guile-2.0)
+                ("bash:include" ,bash "include")))
+      (synopsis "Extend Bash using Guile")
+      (description
+       "Guile-Bash provides a shared library and set of Guile modules,
+allowing you to extend Bash in Scheme.  Scheme interfaces allow you to access
+the following aspects of Bash:
+
+@itemize
+@item aliases;
+@item setting and getting Bash variables;
+@item creating dynamic variables;
+@item creating Bash functions with a Scheme implementation;
+@item reader macro for output capturing;
+@item reader macro for evaluating raw Bash commands.
+@end itemize
+
+To enable it, run:
+
+@example
+enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm
+@end example
+
+and then run @command{scm example.scm}.")
+      (license gpl3+))))
+
 ;;; guile.scm ends here
diff --git a/gnu/packages/gv.scm b/gnu/packages/gv.scm
index e1e86a83a6..446b2946b5 100644
--- a/gnu/packages/gv.scm
+++ b/gnu/packages/gv.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2013, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -40,8 +40,25 @@
             (sha256 (base32
                      "0q8s43z14vxm41pfa8s5h9kyyzk1fkwjhkiwbf2x70alm6rv6qi1"))))
    (build-system gnu-build-system)
-   (propagated-inputs `(("ghostscript" ,ghostscript/x)))
-   (inputs `(("libx11" ,libx11)
+   (arguments
+    '(#:phases (modify-phases %standard-phases
+                 (add-before 'configure 'set-gs-file-name
+                   (lambda* (#:key inputs #:allow-other-keys)
+                     ;; Set the value of 'GV.gsInterpreter' in the generated
+                     ;; 'gv_system.ad' file.
+                     (let ((gs (assoc-ref inputs "ghostscript")))
+                       (with-fluids ((%default-port-encoding "ISO-8859-1"))
+                        (substitute* "src/Makefile.in"
+                          (("GV\\.gsInterpreter:([[:blank:]]+)gs" _ blank)
+                           (string-append "GV.gsInterpreter:" blank
+                                          gs "/bin/gs"))
+                          (("GV\\.gsCmd([[:alpha:]]+):([[:blank:]]+)gs" _
+                            command blank)
+                           (string-append "GV.gsCmd" command ":"
+                                          blank gs "/bin/gs"))))
+                       #t))))))
+   (inputs `(("ghostscript" ,ghostscript/x)
+             ("libx11" ,libx11)
              ("libxaw3d" ,libxaw3d)
              ("libxinerama" ,libxinerama)
              ("libxpm" ,libxpm)
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 7a7d6bab87..ac0eac3fe8 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2016, 2017 David Craven <david@craven.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24,33 +25,33 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages haskell)
-  #:use-module (ice-9 regex)
-  #:use-module ((guix licenses) #:prefix license:)
-  #:use-module (guix packages)
-  #:use-module (guix download)
-  #:use-module (guix utils)
-  #:use-module (guix build-system gnu)
-  #:use-module (guix build-system haskell)
-  #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages perl)
+  #:use-module (gnu packages bootstrap)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages elf)
-  #:use-module (gnu packages gl)
-  #:use-module (gnu packages sdl)
-  #:use-module (gnu packages bootstrap)
-  #:use-module (gnu packages zip)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages ghostscript)
-  #:use-module (gnu packages libffi)
+  #:use-module (gnu packages gl)
   #:use-module (gnu packages libedit)
+  #:use-module (gnu packages libffi)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
-  #:use-module (gnu packages python)
   #:use-module (gnu packages pcre)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages sdl)
   #:use-module (gnu packages xml)
-  #:use-module (gnu packages xorg))
+  #:use-module (gnu packages xorg)
+  #:use-module (gnu packages zip)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system haskell)
+  #:use-module (guix download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix utils)
+  #:use-module (ice-9 regex))
 
 (define ghc-bootstrap-x86_64-7.8.4
   (origin
@@ -2199,7 +2200,7 @@ removed.  Both IPv4 and IPv6 are supported.")
     (inputs
      `(("ghc-mtl" ,ghc-mtl)))
     (home-page
-     "http://sourceforge.net/projects/lazy-regex")
+     "https://sourceforge.net/projects/lazy-regex")
     (synopsis "Replaces/Enhances Text.Regex")
     (description "@code{Text.Regex.Base} provides the interface API for
 regex-posix, regex-pcre, regex-parsec, regex-tdfa, regex-dfa.")
@@ -2222,7 +2223,7 @@ regex-posix, regex-pcre, regex-parsec, regex-tdfa, regex-dfa.")
     (build-system haskell-build-system)
     (inputs
      `(("ghc-regex-base" ,ghc-regex-base)))
-    (home-page "http://sourceforge.net/projects/lazy-regex")
+    (home-page "https://sourceforge.net/projects/lazy-regex")
     (synopsis "POSIX regular expressions for Haskell")
     (description "This library provides the POSIX regex backend used by the
 Haskell library @code{regex-base}.")
@@ -2246,7 +2247,7 @@ Haskell library @code{regex-base}.")
     (inputs
      `(("ghc-regex-base" ,ghc-regex-base)
        ("ghc-regex-posix" ,ghc-regex-posix)))
-    (home-page "http://sourceforge.net/projects/lazy-regex")
+    (home-page "https://sourceforge.net/projects/lazy-regex")
     (synopsis "Replaces/Enhances Text.Regex")
     (description "This library provides one module layer over
 @code{regex-posix} to replace @code{Text.Regex}.")
@@ -2315,36 +2316,34 @@ the parsers provided by @code{parsec}, @code{attoparsec} and @code{base}'s
 (define-public ghc-trifecta
   (package
     (name "ghc-trifecta")
-    (version "1.5.2")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append
-             "https://hackage.haskell.org/package/trifecta/trifecta-"
-             version
-             ".tar.gz"))
-       (sha256
-        (base32
-         "0fjhnsbafl3yw34pyhcsvrqy6a2mnhyqys6gna3rrlygs8ck7hpb"))))
+    (version "1.6")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://hackage.haskell.org/package/trifecta/"
+                    "trifecta-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0rbhv9m17k7l1zr70i0yw5da0qjgxmfh1da8brj0zdzwjn9ac0mk"))))
     (build-system haskell-build-system)
-    (arguments `(#:tests? #f)) ; FIXME: Test fails with "cannot satisfy
-                               ; -package ansi-terminal-0.6.2.3"
     (inputs
-     `(("ghc-charset" ,ghc-charset)
-       ("ghc-comonad" ,ghc-comonad)
-       ("ghc-lens" ,ghc-lens)
-       ("ghc-profunctors" ,ghc-profunctors)
-       ("ghc-reducers" ,ghc-reducers)
+     `(("ghc-reducers" ,ghc-reducers)
        ("ghc-semigroups" ,ghc-semigroups)
        ("ghc-ansi-wl-pprint" ,ghc-ansi-wl-pprint)
        ("ghc-ansi-terminal" ,ghc-ansi-terminal)
        ("ghc-blaze-builder" ,ghc-blaze-builder)
        ("ghc-blaze-html" ,ghc-blaze-html)
        ("ghc-blaze-markup" ,ghc-blaze-markup)
+       ("ghc-charset" ,ghc-charset)
+       ("ghc-comonad" ,ghc-comonad)
+       ("ghc-doctest" ,ghc-doctest)
        ("ghc-fingertree" ,ghc-fingertree)
        ("ghc-hashable" ,ghc-hashable)
+       ("ghc-lens" ,ghc-lens)
        ("ghc-mtl" ,ghc-mtl)
        ("ghc-parsers" ,ghc-parsers)
+       ("ghc-profunctors" ,ghc-profunctors)
+       ("ghc-quickcheck" ,ghc-quickcheck)
        ("ghc-unordered-containers" ,ghc-unordered-containers)
        ("ghc-utf8-string" ,ghc-utf8-string)))
     (home-page "https://github.com/ekmett/trifecta/")
@@ -6670,67 +6669,6 @@ constant-time:
 @end enumerate\n")
     (license license:bsd-3)))
 
-(define-public idris
-  (package
-    (name "idris")
-    (version "0.9.19.1")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://hackage.haskell.org/package/idris-"
-                           version "/idris-" version ".tar.gz"))
-       (sha256
-        (base32
-         "10641svdsjlxbxmbvylpia04cz5nn9486lpiay8ibqcrc1792qgc"))
-       (modules '((guix build utils)))
-       (snippet
-        '(substitute* "idris.cabal"
-           ;; Package description file has a too-tight version restriction,
-           ;; rendering it incompatible with GHC 7.10.2.  This is fixed
-           ;; upstream.  See
-           ;; <https://github.com/idris-lang/Idris-dev/issues/2734>.
-           (("vector < 0.11") "vector < 0.12")))))
-    (build-system haskell-build-system)
-    (arguments
-     `(#:phases (modify-phases %standard-phases
-                  (add-before 'configure 'patch-cc-command
-                              (lambda _
-                                (setenv "CC" "gcc"))))))
-    (inputs
-     `(("gmp" ,gmp)
-       ("ncurses" ,ncurses)
-       ("ghc-annotated-wl-pprint" ,ghc-annotated-wl-pprint)
-       ("ghc-ansi-terminal" ,ghc-ansi-terminal)
-       ("ghc-ansi-wl-pprint" ,ghc-ansi-wl-pprint)
-       ("ghc-base64-bytestring" ,ghc-base64-bytestring)
-       ("ghc-blaze-html" ,ghc-blaze-html)
-       ("ghc-blaze-markup" ,ghc-blaze-markup)
-       ("ghc-cheapskate" ,ghc-cheapskate)
-       ("ghc-fingertree" ,ghc-fingertree)
-       ("ghc-mtl" ,ghc-mtl)
-       ("ghc-network" ,ghc-network)
-       ("ghc-optparse-applicative" ,ghc-optparse-applicative)
-       ("ghc-parsers" ,ghc-parsers)
-       ("ghc-safe" ,ghc-safe)
-       ("ghc-split" ,ghc-split)
-       ("ghc-text" ,ghc-text)
-       ("ghc-trifecta" ,ghc-trifecta)
-       ("ghc-uniplate" ,ghc-uniplate)
-       ("ghc-unordered-containers" ,ghc-unordered-containers)
-       ("ghc-utf8-string" ,ghc-utf8-string)
-       ("ghc-vector-binary-instances" ,ghc-vector-binary-instances)
-       ("ghc-vector" ,ghc-vector)
-       ("ghc-zip-archive" ,ghc-zip-archive)
-       ("ghc-zlib" ,ghc-zlib)))
-    (home-page "http://www.idris-lang.org")
-    (synopsis "General purpose language with full dependent types")
-    (description "Idris is a general purpose language with full dependent
-types.  It is compiled, with eager evaluation.  Dependent types allow types to
-be predicated on values, meaning that some aspects of a program's behaviour
-can be specified precisely in the type.  The language is closely related to
-Epigram and Agda.")
-    (license license:bsd-3)))
-
 (define-public ghc-base16-bytestring
   (package
     (name "ghc-base16-bytestring")
@@ -7994,4 +7932,172 @@ helper functions for Lists, Maybes, Tuples, Functions.")
 3D plots using gnuplot.")
     (license license:bsd-3)))
 
+(define-public ghc-hinotify
+  (package
+    (name "ghc-hinotify")
+    (version "0.3.8.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://hackage.haskell.org/package/hinotify/"
+                    "hinotify-" version ".tar.gz"))
+              (sha256
+               (base32
+                "03c1f4d7x805zdiq2w26kl09xrfjw19saycdkhnixzv2qcr6xm1p"))))
+    (build-system haskell-build-system)
+    (home-page "https://github.com/kolmodin/hinotify.git")
+    (synopsis "Haskell binding to inotify")
+    (description "This library provides a wrapper to the Linux kernel's inotify
+feature, allowing applications to subscribe to notifications when a file is
+accessed or modified.")
+    (license license:bsd-3)))
+
+(define-public ghc-fsnotify
+  (package
+    (name "ghc-fsnotify")
+    (version "0.2.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://hackage.haskell.org/package/fsnotify/"
+                    "fsnotify-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0asl313a52qx2w6dw25g845683xsl840bwjh118nkwi5v1xipkzb"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-text" ,ghc-text)
+       ("ghc-async" ,ghc-async)
+       ("ghc-unix-compat" ,ghc-unix-compat)
+       ("ghc-hinotify" ,ghc-hinotify)
+       ("ghc-tasty" ,ghc-tasty)
+       ("ghc-tasty-hunit" ,ghc-tasty-hunit)
+       ("ghc-temporary-rc" ,ghc-temporary-rc)))
+    (home-page "https://github.com/haskell-fswatch/hfsnotify")
+    (synopsis "Cross platform library for file change notification.")
+    (description "Cross platform library for file creation, modification, and
+deletion notification. This library builds upon existing libraries for platform
+specific Windows, Mac, and Linux filesystem event notification.")
+    (license license:bsd-3)))
+
+(define-public ghc-tasty-rerun
+  (package
+    (name "ghc-tasty-rerun")
+    (version "1.1.6")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://hackage.haskell.org/package/tasty-rerun/"
+                    "tasty-rerun-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0ycxg7whabgcxyzy6gr536x8ykzx45whh1wrbsc7c58zi862fczd"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-mtl" ,ghc-mtl)
+       ("ghc-optparse-applicative" ,ghc-optparse-applicative)
+       ("ghc-reducers" ,ghc-reducers)
+       ("ghc-split" ,ghc-split)
+       ("ghc-stm" ,ghc-stm)
+       ("ghc-tagged" ,ghc-tagged)
+       ("ghc-tasty" ,ghc-tasty)))
+    (home-page "http://github.com/ocharles/tasty-rerun")
+    (synopsis "Run tests by filtering the test tree")
+    (description "This package adds the ability to run tests by filtering the
+test tree based on the result of a previous test run.  You can use this to run
+only those tests that failed in the last run, or to only run the tests that have
+been added since previous test run.")
+  (license license:bsd-3)))
+
+(define-public ghc-ieee754
+  (package
+    (name "ghc-ieee754")
+    (version "0.7.8")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://hackage.haskell.org/package/ieee754/"
+                    "ieee754-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1zvfnnd5nm5kgr60214cdyks0kqdqyzpwk5sdh0s60yr8b7fyjny"))))
+    (build-system haskell-build-system)
+    (home-page "http://github.com/patperry/hs-ieee754")
+    (synopsis "Utilities for dealing with IEEE floating point numbers")
+    (description "Utilities for dealing with IEEE floating point numbers,
+ported from the Tango math library; approximate and exact equality comparisons
+for general types.")
+    (license license:bsd-3)))
+
+(define-public ghc-terminal-size
+  (package
+    (name "ghc-terminal-size")
+    (version "0.3.2.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://hackage.haskell.org/package/terminal-size/"
+                    "terminal-size-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0n4nvj3dbj9gxfnprgish45asn9z4dipv9j98s8i7g2n8yb3xhmm"))))
+    (build-system haskell-build-system)
+    (home-page "http://hackage.haskell.org/package/terminal-size")
+    (synopsis "Get terminal window height and width")
+    (description "Get terminal window height and width without ncurses
+dependency.")
+    (license license:bsd-3)))
+
+(define-public ghc-language-c
+  (package
+    (name "ghc-language-c")
+    (version "0.5.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://hackage.haskell.org/package/"
+                           "language-c/language-c-" version ".tar.gz"))
+       (sha256
+        (base32
+         "08i2bl7jmmymn2sldzlbz6ig7lx3wfwhlpadzibs3fx72z08pmc6"))))
+    (build-system haskell-build-system)
+    (inputs `(("ghc-syb" ,ghc-syb)))
+    (native-inputs
+     `(("ghc-happy" ,ghc-happy)
+       ("ghc-alex" ,ghc-alex)))
+    (home-page "http://visq.github.io/language-c/")
+    (synopsis "Analysis and generation of C code")
+    (description
+     "Language C is a Haskell library for the analysis and generation of C code.
+It features a complete, well-tested parser and pretty printer for all of C99
+and a large set of GNU extensions.")
+    (license license:bsd-3)))
+
+(define-public ghc-markdown-unlit
+  (package
+    (name "ghc-markdown-unlit")
+    (version "0.4.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://hackage/package/markdown-unlit/"
+                    "markdown-unlit-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1kj2bffl7ndd8ygwwa3r1mbpwbxbfhyfgnbla8k8g9i6ffp0qrbw"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-base-compat" ,ghc-base-compat)
+       ("ghc-hspec" ,ghc-hspec)
+       ("ghc-quickcheck" ,ghc-quickcheck)
+       ("ghc-silently" ,ghc-silently)
+       ("ghc-stringbuilder" ,ghc-stringbuilder)
+       ("ghc-temporary" ,ghc-temporary)
+       ("hspec-discover" ,hspec-discover)))
+    (home-page "https://github.com/sol/markdown-unlit#readme")
+    (synopsis "Literate Haskell support for Markdown")
+    (description "This package allows you to have a README.md that at the
+same time is a literate Haskell program.")
+    (license license:expat)))
+
 ;;; haskell.scm ends here
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index a4c0296b04..557091d055 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -28,12 +28,17 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages base)
-  #:use-module (guix git-download))
+  #:use-module (guix git-download)
+  #:export (hurd-triplet?))
+
+(define (hurd-triplet? triplet)
+  (and (string-suffix? "-gnu" triplet)
+       (not (string-contains triplet "linux"))))
 
 (define-public gnumach-headers
   (package
     (name "gnumach-headers")
-    (version "1.7")
+    (version "1.8")
     (source
      (origin
       (method url-fetch)
@@ -41,7 +46,7 @@
                           version ".tar.gz"))
       (sha256
        (base32
-        "1vd0bykshf6ilr55792b5lf6yd5ywlkp1wqz00dcsx7fq3rfadz2"))))
+        "02hygsfpd2dljl5lg1vjjg9pizi9jyxd4aiiqzjshz6jax62jm9f"))))
     (build-system gnu-build-system)
     (arguments
     `(#:phases (alist-replace
@@ -71,7 +76,7 @@
 (define-public mig
   (package
     (name "mig")
-    (version "1.7")
+    (version "1.8")
     (source
      (origin
       (method url-fetch)
@@ -79,7 +84,7 @@
                           version ".tar.gz"))
       (sha256
        (base32
-        "1hxqd8p14pgamgavmbmziswvd1zvwqx7lgc9qga805q9jrs93q2b"))))
+        "1gyda8sq6b379nx01hkpbd85lz39irdvz2b9wbr63gicicx8i706"))))
     (build-system gnu-build-system)
     ;; Flex is needed both at build and run time.
     (inputs `(("gnumach-headers" ,gnumach-headers)
@@ -102,14 +107,14 @@ communication.")
 (define-public hurd-headers
   (package
     (name "hurd-headers")
-    (version "0.8")
+    (version "0.9")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/hurd/hurd-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1pbc4aqgzxvkgivw80ghp3w755cl0fwxmg357vq7chimj64jk78d"))))
+                "1nw9gly0n7pyv3cpfm4mmxy4yccrx4g0lyrvd3vk2vil26jpbggw"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("mig" ,mig)))
diff --git a/gnu/packages/idris.scm b/gnu/packages/idris.scm
new file mode 100644
index 0000000000..02198a5a7d
--- /dev/null
+++ b/gnu/packages/idris.scm
@@ -0,0 +1,256 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
+;;; Copyright © 2016, 2017 David Craven <david@craven.ch>
+;;;
+;;; 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 idris)
+  #:use-module (gnu packages haskell)
+  #:use-module (gnu packages multiprecision)
+  #:use-module (gnu packages ncurses)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system haskell)
+  #:use-module (guix download)
+  #:use-module (guix git-download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages))
+
+(define-public idris
+  (package
+    (name "idris")
+    (version "0.99")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://hackage.haskell.org/package/"
+                    "idris-" version "/idris-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1sd4vy5rx0mp32xj99qijhknkgw4d2rxvz6wiy3pym6kaqmc497i"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("gmp" ,gmp)
+       ("ncurses" ,ncurses)
+       ("ghc-aeson" ,ghc-aeson)
+       ("ghc-async" ,ghc-async)
+       ("ghc-annotated-wl-pprint" ,ghc-annotated-wl-pprint)
+       ("ghc-ansi-terminal" ,ghc-ansi-terminal)
+       ("ghc-ansi-wl-pprint" ,ghc-ansi-wl-pprint)
+       ("ghc-base64-bytestring" ,ghc-base64-bytestring)
+       ("ghc-blaze-html" ,ghc-blaze-html)
+       ("ghc-blaze-markup" ,ghc-blaze-markup)
+       ("ghc-cheapskate" ,ghc-cheapskate)
+       ("ghc-fingertree" ,ghc-fingertree)
+       ("ghc-fsnotify" ,ghc-fsnotify)
+       ("ghc-ieee754" ,ghc-ieee754)
+       ("ghc-mtl" ,ghc-mtl)
+       ("ghc-network" ,ghc-network)
+       ("ghc-optparse-applicative" ,ghc-optparse-applicative)
+       ("ghc-parsers" ,ghc-parsers)
+       ("ghc-regex-tdfa" ,ghc-regex-tdfa)
+       ("ghc-safe" ,ghc-safe)
+       ("ghc-split" ,ghc-split)
+       ("ghc-tasty" ,ghc-tasty)
+       ("ghc-tasty-golden" ,ghc-tasty-golden)
+       ("ghc-tasty-rerun" ,ghc-tasty-rerun)
+       ("ghc-terminal-size" ,ghc-terminal-size)
+       ("ghc-text" ,ghc-text)
+       ("ghc-trifecta" ,ghc-trifecta)
+       ("ghc-uniplate" ,ghc-uniplate)
+       ("ghc-unordered-containers" ,ghc-unordered-containers)
+       ("ghc-utf8-string" ,ghc-utf8-string)
+       ("ghc-vector-binary-instances" ,ghc-vector-binary-instances)
+       ("ghc-vector" ,ghc-vector)
+       ("ghc-zip-archive" ,ghc-zip-archive)
+       ("ghc-zlib" ,ghc-zlib)))
+    (arguments
+     `(#:tests? #f ; FIXME: Test suite doesn't run in a sandbox.
+       #:configure-flags
+       (list (string-append "--datasubdir="
+                            (assoc-ref %outputs "out") "/lib/idris"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'set-cc-command
+           (lambda _
+             (setenv "CC" "gcc")
+             #t))
+         (add-after 'install 'fix-libs-install-location
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (lib (string-append out "/lib/idris"))
+                    (modules (string-append lib "/libs")))
+               (for-each
+                (lambda (module)
+                  (symlink (string-append modules "/" module)
+                           (string-append lib "/" module)))
+                '("prelude" "base" "contrib" "effects" "pruviloj"))))))))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "IDRIS_LIBRARY_PATH")
+            (files '("lib/idris")))))
+    (home-page "http://www.idris-lang.org")
+    (synopsis "General purpose language with full dependent types")
+    (description "Idris is a general purpose language with full dependent
+types.  It is compiled, with eager evaluation.  Dependent types allow types to
+be predicated on values, meaning that some aspects of a program's behaviour
+can be specified precisely in the type.  The language is closely related to
+Epigram and Agda.")
+    (license license:bsd-3)))
+
+;; Idris modules use the gnu-build-system so that the IDRIS_LIBRARY_PATH is set.
+(define (idris-default-arguments name)
+  `(#:modules ((guix build gnu-build-system)
+               (guix build utils)
+               (ice-9 ftw)
+               (ice-9 match))
+    #:phases
+    (modify-phases %standard-phases
+      (delete 'configure)
+      (delete 'build)
+      (delete 'check)
+      (replace 'install
+        (lambda* (#:key inputs outputs #:allow-other-keys)
+          (let* ((out (assoc-ref outputs "out"))
+                 (idris (assoc-ref inputs "idris"))
+                 (idris-bin (string-append idris "/bin/idris"))
+                 (idris-libs (string-append idris "/lib/idris/libs"))
+                 (module-name (and (string-prefix? "idris-" ,name)
+                                   (substring ,name 6)))
+                 (ibcsubdir (string-append out "/lib/idris/" module-name))
+                 (ipkg (string-append module-name ".ipkg"))
+                 (idris-library-path (getenv "IDRIS_LIBRARY_PATH"))
+                 (idris-path (string-split idris-library-path #\:))
+                 (idris-path-files (apply append
+                                          (map (lambda (path)
+                                                 (map (lambda (dir)
+                                                        (string-append path "/" dir))
+                                                      (scandir path))) idris-path)))
+                 (idris-path-subdirs (filter (lambda (path)
+                                               (and path (match (stat:type (stat path))
+                                                           ('directory #t)
+                                                           (_ #f))))
+                                                    idris-path-files))
+                 (install-cmd (cons* idris-bin
+                                     "--ibcsubdir" ibcsubdir
+                                     "--install" ipkg
+                                     (apply append (map (lambda (path)
+                                                          (list "--idrispath"
+                                                                path))
+                                                        idris-path-subdirs)))))
+            (setenv "IDRIS_LIBRARY_PATH" idris-libs)
+            ;; FIXME: Seems to be a bug in idris that causes a dubious failure.
+            (apply system* install-cmd)
+            #t))))))
+
+(define-public idris-lightyear
+  (let ((commit "6d65ad111b4bed2bc131396f8385528fc6b3678a"))
+    (package
+      (name "idris-lightyear")
+      (version (git-version "0.1" "1" commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/ziman/lightyear")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1pkxnn3ryr0v0cin4nasw7kgkc9dnnpja1nfbj466mf3qv5s98af"))))
+      (build-system gnu-build-system)
+      (native-inputs
+       `(("idris" ,idris)))
+      (arguments (idris-default-arguments name))
+      (home-page "https://github.com/ziman/lightyear")
+      (synopsis "Lightweight parser combinator library for Idris")
+      (description "Lightweight parser combinator library for Idris, inspired
+by Parsec.  This package is used (almost) the same way as Parsec, except for one
+difference: backtracking.")
+      (license license:bsd-2))))
+
+(define-public idris-wl-pprint
+  (let ((commit "1d365fcf4ba075859844dbc5eb96a90f57b9f338"))
+    (package
+      (name "idris-wl-pprint")
+      (version (git-version "0.1" "1" commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/shayan-najd/wl-pprint")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0g7c3y9smifdz4sivi3qmvymhdr7v9kfq45fmfmmvkqcrix0spzn"))))
+      (build-system gnu-build-system)
+      (native-inputs
+       `(("idris" ,idris)))
+      (arguments (idris-default-arguments name))
+      (home-page "https://github.com/shayan-najd/wl-pprint")
+      (synopsis "Pretty printing library")
+      (description "A pretty printing library for Idris based on Phil Wadler's
+paper A Prettier Printer and on Daan Leijen's extensions in the Haskell
+wl-pprint library.")
+      (license license:bsd-2))))
+
+(define-public idris-bifunctors
+  (let ((commit "53d06a6ccfe70c49c9ae8c8a4135981dd2173202"))
+    (package
+      (name "idris-bifunctors")
+      (version (git-version "0.1" "1" commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/HuwCampbell/Idris-Bifunctors")
+                      (commit commit)))
+                (file-name (string-append name "-" version "-checkout"))
+                (sha256
+                 (base32
+                  "02vbsd3rmgnj0l1qq787709qcxjbr9890cbad4ykn27f77jk81h4"))))
+      (build-system gnu-build-system)
+      (native-inputs
+       `(("idris" ,idris)))
+      (arguments (idris-default-arguments name))
+      (home-page "https://github.com/HuwCampbell/Idris-Bifunctors")
+      (synopsis "Bifunctor library")
+      (description "This is a bifunctor library for Idris based off the
+excellent Haskell Bifunctors package from Edward Kmett.")
+      (license license:bsd-3))))
+
+(define-public idris-lens
+  (let ((commit "26f012005f6849806cea630afe317e42cae97f29"))
+    (package
+      (name "idris-lens")
+      (version (git-version "0.1" "1" commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/HuwCampbell/idris-lens")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "06jzfj6rad08rk92w8jk5byi79svmyg0mrcqhibgx8rkjjy6vmai"))))
+      (build-system gnu-build-system)
+      (native-inputs
+       `(("idris" ,idris)))
+      (propagated-inputs
+       `(("idris-bifunctors" ,idris-bifunctors)))
+      (arguments (idris-default-arguments name))
+      (home-page "https://github.com/HuwCampbell/idris-lens")
+      (synopsis "Van Laarhoven lenses for Idris")
+      (description "Lenses are composable functional references.  They allow
+accessing and modifying data within a structure.")
+      (license license:bsd-3))))
diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm
new file mode 100644
index 0000000000..bc56041f84
--- /dev/null
+++ b/gnu/packages/image-viewers.scm
@@ -0,0 +1,207 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
+;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
+;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017 Alex Griffin <a@ajgrf.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 image-viewers)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix download)
+  #:use-module (guix packages)
+  #:use-module (guix build-system gnu)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages curl)
+  #:use-module (gnu packages ghostscript)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages image)
+  #:use-module (gnu packages photo)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages xorg))
+
+(define-public feh
+  (package
+    (name "feh")
+    (version "2.18")
+    (home-page "https://feh.finalrewind.org/")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append home-page
+                                  name "-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "036lgv81d0vmrnmh1z1x360nr5avb2sk5jb1h3g5n6jijm8vzblx"))))
+    (build-system gnu-build-system)
+    (arguments
+      '(#:phases (alist-delete 'configure %standard-phases)
+        #:tests? #f
+        #:make-flags
+          (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")))))
+    (inputs `(("imlib2" ,imlib2)
+              ("curl" ,curl)
+              ("libpng" ,libpng)
+              ("libxt" ,libxt)
+              ("libx11" ,libx11)
+              ("libxinerama" ,libxinerama)))
+    (synopsis "Fast and light imlib2-based image viewer")
+    (description
+      "feh is an X11 image viewer aimed mostly at console users.
+Unlike most other viewers, it does not have a fancy GUI, but simply
+displays images.  It can also be used to set the desktop wallpaper.
+It is controlled via commandline arguments and configurable key/mouse
+actions.")
+
+    ;; The license is really the Expat license, with additional wording in the
+    ;; 2nd paragraph: "acknowledgment shall be given in the documentation and
+    ;; software packages that this Software was used."
+    (license (license:x11-style
+              "file://COPYING"
+              "See 'COPYING' in the distribution."))))
+
+(define-public geeqie
+  (package
+    (name "geeqie")
+    (version "1.3")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://github.com/BestImageViewer/geeqie/"
+                                 "releases/download/v" version "/geeqie-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "0gzc82sy66pbsmq7lnmq4y37zqad1zfwfls3ik3dmfm8s5nmcvsb"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'autogen
+           (lambda _
+             (setenv "NOCONFIGURE" "true")
+             (zero? (system* "sh" "autogen.sh")))))))
+    (inputs
+     `(;; ("libchamplain" ,libchamplain)
+       ("lcms" ,lcms)
+       ("exiv2" ,exiv2)
+       ("libpng" ,libpng)
+       ("gtk+" ,gtk+-2)))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("glib" ,glib "bin") ; glib-gettextize
+       ("intltool" ,intltool)
+       ("pkg-config" ,pkg-config)))
+    (home-page "http://www.geeqie.org/")
+    (synopsis "Lightweight GTK+ based image viewer")
+    (description
+     "Geeqie is a lightweight GTK+ based image viewer for Unix like operating
+systems.  It features: EXIF, IPTC and XMP metadata browsing and editing
+interoperability; easy integration with other software; geeqie works on files
+and directories, there is no need to import images; fast preview for many raw
+image formats; tools for image comparison, sorting and managing photo
+collection.  Geeqie was initially based on GQview.")
+    (license license:gpl2+)))
+
+(define-public sxiv
+  (package
+    (name "sxiv")
+    (version "1.3.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/muennich/sxiv/archive/v"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0lxnd33gaw4drhdwbkk94wzrjyhh64d57jq2ps7ffmqgizg6hlwz"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f                      ; no check target
+       #:make-flags (list (string-append "PREFIX=" %output)
+                          "CC=gcc")
+       #:phases (alist-delete
+                 'configure             ; no configure phase
+                 %standard-phases)))
+    (inputs
+     `(("libx11" ,libx11)
+       ("imlib2" ,imlib2)
+       ("giflib" ,giflib)
+       ("libexif" ,libexif)))
+    (home-page "https://github.com/muennich/sxiv")
+    (synopsis "Simple X Image Viewer")
+    (description
+     "sxiv is an alternative to feh and qiv.  Its primary goal is to
+provide the most basic features required for fast image viewing.  It has
+vi key bindings and works nicely with tiling window managers.  Its code
+base should be kept small and clean to make it easy for you to dig into
+it and customize it for your needs.")
+    (license license:gpl2+)))
+
+(define-public viewnior
+  (package
+    (name "viewnior")
+    (version "1.6")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "https://github.com/xsisqox/Viewnior/archive/"
+                            name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "18309qjgwak3kn228z3p3nx7yxasqgzx69v3rgc23hf161nky0c9"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'autogen
+           (lambda _
+             (zero? (system* "sh" "autogen.sh")))))))
+    (native-inputs
+     `(("automake" ,automake)
+       ("autoconf" ,autoconf)
+       ("intltool" ,intltool)
+       ("glib" ,glib "bin") ; glib-genmarshal
+       ("gnome-common" ,gnome-common)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)
+       ("shared-mime-info" ,shared-mime-info)
+       ("which" ,which)))
+    (inputs
+     `(("exiv2" ,exiv2)
+       ("gdk-pixbuf" ,gdk-pixbuf)
+       ("gtk+-2" ,gtk+-2)))
+    (home-page "http://siyanpanayotov.com/project/viewnior/")
+    (synopsis "Simple, fast and elegant image viewer")
+    (description "Viewnior is an image viewer program.  Created to be simple,
+fast and elegant.  Its minimalistic interface provides more screenspace for
+your images.  Among its features are:
+@enumerate
+@item Fullscreen & Slideshow
+@item Rotate, flip, crop, save, delete images
+@item Animation support
+@item Browse only selected images
+@item Navigation window
+@item Set image as wallpaper (Gnome 2, Gnome 3, XFCE, LXDE, FluxBox, Nitrogen)
+@item Simple interface
+@item EXIF and IPTC metadata
+@item Configurable mouse actions
+@end enumerate\n")
+    (license license:gpl3+)))
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 0003ca0c67..4e40533a21 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -1,4 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2013, 2015, 2016 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
@@ -7,7 +8,7 @@
 ;;; Copyright © 2015 Amirouche Boubekki <amirouche@hypermove.net>
 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
@@ -31,14 +32,18 @@
 (define-module (gnu packages image)
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
+  #:use-module (gnu packages assembly)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages fontutils)
+  ;; To provide gcc@5 and gcc@6, to work around <http://bugs.gnu.org/24703>.
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages gl)
+  #:use-module (gnu packages glib)
   #:use-module (gnu packages graphics)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages mcrypt)
@@ -59,6 +64,7 @@
 (define-public libpng
   (package
    (name "libpng")
+   (replacement libpng/fixed)
    (version "1.6.25")
    (source (origin
             (method url-fetch)
@@ -83,10 +89,19 @@ library.  It supports almost all PNG features and is extensible.")
    (license license:zlib)
    (home-page "http://www.libpng.org/pub/png/libpng.html")))
 
+(define libpng/fixed
+  (package
+    (inherit libpng)
+    (source
+      (origin
+        (inherit (package-source libpng))
+        (patches (search-patches "libpng-CVE-2016-10087.patch"))))))
+
 (define-public libpng-1.2
   (package
     (inherit libpng)
-    (version "1.2.56")
+    (replacement #f)
+    (version "1.2.57")
     (source
      (origin
        (method url-fetch)
@@ -97,7 +112,7 @@ library.  It supports almost all PNG features and is extensible.")
                    "ftp://ftp.simplesystems.org/pub/libpng/png/src"
                    "/libpng12/libpng-" version ".tar.xz")))
        (sha256
-        (base32 "1ghd03p353x0vi4dk83n1nlldg11w7vqdk3f99rkgfb82ic59ki4"))))))
+        (base32 "1n2lrzjkm5jhfg2bs10q398lkwbbx742fi27zgdgx0x23zhj0ihg"))))))
 
 (define-public libjpeg
   (package
@@ -260,6 +275,9 @@ extracting icontainer icon files.")
                                              (assoc-ref %outputs "doc")
                                              "/share/doc/"
                                              ,name "-" ,version))))
+   ;; Build with a patched GCC to work around <http://bugs.gnu.org/24703>.
+   (native-inputs
+    `(("gcc@5" ,gcc-5)))
    (inputs `(("zlib" ,zlib)
              ("libjpeg" ,libjpeg)))
    (synopsis "Library for handling TIFF files")
@@ -321,28 +339,23 @@ the W3C's XML-based Scaleable Vector Graphic (SVG) format.")
 (define-public leptonica
   (package
     (name "leptonica")
-    (version "1.72")
+    (version "1.74.0")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "http://www.leptonica.com/source/leptonica-"
-                           version ".tar.gz"))
+       (uri (string-append
+             "https://github.com/DanBloomberg/leptonica/archive/" version
+             ".tar.gz"))
+       (file-name (string-append "leptonica-" version ".tar.gz"))
        (sha256
-        (base32 "0mhzvqs0im04y1cpcc1yma70hgdac1frf33h73m9z3356bfymmbr"))
-       (modules '((guix build utils)))
-       ;; zlib and openjpg should be under Libs, not Libs.private.  See:
-       ;; https://code.google.com/p/tesseract-ocr/issues/detail?id=1436
-       (snippet
-        '(substitute* "lept.pc.in"
-           (("^(Libs\\.private: .*)@ZLIB_LIBS@(.*)" all pre post)
-            (string-append pre post))
-           (("^(Libs\\.private: .*)@JPEG_LIBS@(.*)" all pre post)
-            (string-append pre post))
-           (("^Libs: .*" all)
-            (string-append all " @ZLIB_LIBS@ @JPEG_LIBS@"))))))
+        (base32 "0i2a4vx9gizki0wgmv03xjz8j9d8agkvbag1a8m4kcw4asd4p87g"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(("gnuplot" ,gnuplot)))           ;needed for test suite
+     `(("gnuplot" ,gnuplot)             ;needed for test suite
+       ("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
     (inputs
      `(("giflib" ,giflib)
        ("libjpeg" ,libjpeg)
@@ -350,31 +363,22 @@ the W3C's XML-based Scaleable Vector Graphic (SVG) format.")
        ("libtiff" ,libtiff)
        ("libwebp" ,libwebp)))
     (propagated-inputs
+     ;; Linking a program with leptonica also requires these.
      `(("openjpeg" ,openjpeg)
        ("zlib" ,zlib)))
     (arguments
-     '(#:parallel-tests? #f ; XXX: cause fpix1_reg to fail
-       #:phases
+     '(#:phases
        (modify-phases %standard-phases
-         ;; Prevent make from trying to regenerate config.h.in.
-         (add-after
-          'unpack 'set-config-h-in-file-time
-          (lambda _
-            (set-file-time "config/config.h.in" (stat "configure"))))
-         (add-after
-          'unpack 'patch-reg-wrapper
-          (lambda _
-            (substitute* "prog/reg_wrapper.sh"
-              ((" /bin/sh ")
-               (string-append " " (which "sh") " "))
-              (("which gnuplot") (which "gnuplot")))))
-         (add-before
-          'check 'disable-failing-tests
-          ;; XXX: 2 of 9 tests from webpio_reg fails.
-          (lambda _
-            (substitute* "prog/webpio_reg.c"
-              ((".*DoWebpTest2.* 90.*") "")
-              ((".*DoWebpTest2.* 100.*") "")))))))
+         (add-after 'unpack 'autogen
+           (lambda _
+             (zero? (system* "sh" "autobuild"))))
+         (add-after 'unpack 'patch-reg-wrapper
+           (lambda _
+             (substitute* "prog/reg_wrapper.sh"
+               ((" /bin/sh ")
+                (string-append " " (which "sh") " "))
+               (("which gnuplot")
+                "true")))))))
     (home-page "http://www.leptonica.com/")
     (synopsis "Library and tools for image processing and analysis")
     (description
@@ -417,6 +421,7 @@ work.")
 (define-public openjpeg
   (package
     (name "openjpeg")
+    (replacement openjpeg-2.1.2)
     (version "2.1.1")
     (source
       (origin
@@ -453,9 +458,27 @@ error-resilience, a Java-viewer for j2k-images, ...")
     (home-page "https://github.com/uclouvain/openjpeg")
     (license license:bsd-2)))
 
+(define openjpeg-2.1.2
+  (package
+    (inherit openjpeg)
+    (name "openjpeg")
+    (version "2.1.2")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "https://github.com/uclouvain/openjpeg/archive/v"
+                            version ".tar.gz"))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "19yz4g0c45sm8y1z01j9djsrl1mkz3pmw7fykc6hkvrqymp7prsc"))
+        (patches
+          (search-patches "openjpeg-CVE-2016-9850-CVE-2016-9851.patch"))))))
+
 (define-public openjpeg-1
   (package (inherit openjpeg)
     (name "openjpeg")
+    (replacement #f)
     (version "1.5.2")
     (source
      (origin
@@ -557,7 +580,7 @@ compose, and analyze GIF images.")
        ("libtiff" ,libtiff)
        ("giflib" ,giflib)
        ("bzip2" ,bzip2)))
-    (home-page "http://sourceforge.net/projects/enlightenment/")
+    (home-page "https://sourceforge.net/projects/enlightenment/")
     (synopsis
      "Loading, saving, rendering and manipulating image files")
     (description
@@ -763,6 +786,39 @@ channels.")
      "Libmng is the MNG (Multiple-image Network Graphics) reference library.")
     (license license:bsd-3)))
 
+(define-public exiv2
+  (package
+    (name "exiv2")
+    (version "0.25")
+    (source (origin
+             (method url-fetch)
+             (uri (list (string-append "http://www.exiv2.org/exiv2-"
+                                       version ".tar.gz")
+                        (string-append "https://fossies.org/linux/misc/exiv2-"
+                                       version ".tar.gz")))
+             (sha256
+              (base32
+               "197g6vgcpyf9p2cwn5p5hb1r714xsk1v4p96f5pv1z8mi9vzq2y8"))))
+    (build-system gnu-build-system)
+    (arguments '(#:tests? #f))                    ; no `check' target
+    (propagated-inputs
+     `(("expat" ,expat)
+       ("zlib" ,zlib)))
+    (native-inputs
+     `(("intltool" ,intltool)))
+    (home-page "http://www.exiv2.org/")
+    (synopsis "Library and command-line utility to manage image metadata")
+    (description
+     "Exiv2 is a C++ library and a command line utility to manage image
+metadata.  It provides fast and easy read and write access to the Exif, IPTC
+and XMP metadata of images in various formats.")
+
+    ;; Files under `xmpsdk' are a copy of Adobe's XMP SDK, licensed under the
+    ;; 3-clause BSD license: <http://www.adobe.com/devnet/xmp/sdk/eula.html>.
+    ;; The core is GPLv2+:
+    ;;   <https://launchpad.net/ubuntu/precise/+source/exiv2/+copyright>.
+    (license license:gpl2+)))
+
 (define-public devil
   (package
     (name "devil")
@@ -819,15 +875,15 @@ convert, manipulate, filter and display a wide variety of image formats.")
 (define-public jasper
   (package
     (name "jasper")
-    (version "1.900.29")
+    (version "2.0.10")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://www.ece.uvic.ca/~frodo/jasper"
                                   "/software/jasper-" version ".tar.gz"))
               (sha256
                (base32
-                "1h1575wdzq1p7y2xvy1gbiypai1iils5awhy4gadr78qpb9ykrra"))))
-    (build-system gnu-build-system)
+                "1s022mfxyw8jw60fgyj60lbm9h6bc4nk2751b0in8qsjwcl59n2l"))))
+    (build-system cmake-build-system)
     (inputs `(("libjpeg" ,libjpeg)))
     (synopsis "JPEG-2000 library")
     (description "The JasPer Project is an initiative to provide a reference
@@ -992,3 +1048,43 @@ also converts external formats (BMP, GIF, PNM and TIFF) to optimized
 PNG, and performs PNG integrity checks and corrections.")
     (home-page "http://optipng.sourceforge.net/")
     (license license:zlib)))
+
+(define-public libjpeg-turbo
+  (package
+    (name "libjpeg-turbo")
+    (version "1.5.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/" name "/" version "/"
+                                  name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0v365hm6z6lddcqagjj15wflk66rqyw75m73cqzl65rh4lyrshj1"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("nasm" ,nasm)))
+    (arguments
+     '(#:test-target "test"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'set-env-on-MIPS
+           ;; This is borrowed from Debian's patchset for libjpeg
+           ;; https://sources.debian.net/data/main/libj/libjpeg-turbo/1:1.5.1-2/debian/patches/0001-Declare-env-on-MIPS-on-first-use-Courtesy-of-Aurelie.patch
+           (lambda _
+             (substitute* "simd/jsimd_mips.c"
+               (("env = getenv\\(\"JSIMD_FORCEDSPR2")
+                "char *env = getenv(\"JSIMD_FORCEDSPR2"))
+             #t)))))
+    (home-page "http://www.libjpeg-turbo.org/")
+    (synopsis "SIMD-accelerated JPEG image handling library")
+    (description "libjpeg-turbo is a JPEG image codec that accelerates baseline
+JPEG compression and decompression using SIMD instructions: MMX on x86, SSE2 on
+x86-64, NEON on ARM, and AltiVec on PowerPC processors.  Even on other systems,
+its highly-optimized Huffman coding routines allow it to outperform libjpeg by
+a significant amount.
+libjpeg-turbo implements both the traditional libjpeg API and the less powerful
+but more straightforward TurboJPEG API, and provides a full-featured Java
+interface.  It supports color space extensions that allow it to compress from
+and decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.).")
+    (license (list license:bsd-3        ; jsimd*.[ch] and most of simd/
+                   license:ijg))))      ; the rest
diff --git a/gnu/packages/imagemagick.scm b/gnu/packages/imagemagick.scm
index 4e70212133..48d468734b 100644
--- a/gnu/packages/imagemagick.scm
+++ b/gnu/packages/imagemagick.scm
@@ -43,14 +43,14 @@
 (define-public imagemagick
   (package
     (name "imagemagick")
-    (version "6.9.6-6")
+    (version "6.9.7-0")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://imagemagick/ImageMagick-"
                                  version ".tar.xz"))
              (sha256
               (base32
-               "02hd0xvpm99wrix2didg8xnra4fla04y9vaks2vnijry3l0gxlcw"))))
+               "0c6ff1am2mhc0dc26h50l78yx6acwqymwpwgkxgx69cb6jfpwrdx"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags '("--with-frozenpaths" "--without-gcc-arch")
diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scm
index d98a4cd7a9..e20ca666bd 100644
--- a/gnu/packages/inkscape.scm
+++ b/gnu/packages/inkscape.scm
@@ -23,7 +23,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
-  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system cmake)
   #:use-module (gnu packages)
   #:use-module (gnu packages aspell)
   #:use-module (gnu packages bdw-gc)
@@ -44,20 +44,16 @@
 (define-public inkscape
   (package
     (name "inkscape")
-    (version "0.91")
+    (version "0.92.0")
     (source (origin
               (method url-fetch)
-              (uri (string-append "https://launchpad.net/inkscape/"
-                                  (version-major+minor version) ".x/"
-                                  version "/+download/inkscape-"
-                                  version ".tar.gz"))
+              (uri (string-append "https://media.inkscape.org/dl/"
+                                  "resources/file/"
+                                  "inkscape-" version ".tar.bz2"))
               (sha256
                (base32
-                "086v01jy896dj86bq7plrf6si4p6gh6ga2v5417llgmminycz8rc"))
-              (patch-flags '("-p0"))
-              (patches
-               (search-patches "inkscape-drop-wait-for-targets.patch"))))
-    (build-system gnu-build-system)
+                "0mmssxnxsvb3bpm7ck5pqvwyacrz1nkyacs571jx8j04l1cw3d5q"))))
+    (build-system cmake-build-system)
     (inputs
      `(("aspell" ,aspell)
        ("gtkmm" ,gtkmm-2)
@@ -75,19 +71,11 @@
        ("boost" ,boost)))
     (native-inputs
      `(("intltool" ,intltool)
+       ("glib" ,glib "bin")
        ("perl" ,perl)
        ("pkg-config" ,pkg-config)))
-    (arguments
-     `(;; Add '-std=c++11', required by recent versions of GLibmm & co.
-       ;; Use '-g0' to reduce disk usage during the build.
-       #:configure-flags '("CXXFLAGS=-g0 -O2 -fopenmp -std=c++11")
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'fix-test-includes
-           (lambda _
-             (substitute* "src/cxxtests.cpp"
-               (("\\.\\./\\.\\./src") "../src"))
-             #t)))))
+    ;; FIXME: tests require gmock
+    (arguments `(#:tests? #f))
     (home-page "http://inkscape.org/")
     (synopsis "Vector graphics editor")
     (description "Inkscape is a vector graphics editor.  What sets Inkscape
diff --git a/gnu/packages/irc.scm b/gnu/packages/irc.scm
index 3b63c899eb..44e21af7d6 100644
--- a/gnu/packages/irc.scm
+++ b/gnu/packages/irc.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2014 Kevin Lemonnier <lemonnierk@ulrar.net>
 ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
+;;; Copyright © 2016 ng0 <ng0@libertad.pw>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -32,9 +32,11 @@
   #:use-module (gnu packages autogen)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages backup)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages cyrus-sasl)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages file)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
@@ -47,6 +49,7 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages ruby)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages tcl)
   #:use-module (gnu packages tls)
@@ -97,7 +100,7 @@ irssi, but graphical.")
 (define-public irssi
   (package
     (name "irssi")
-    (version "0.8.20")
+    (version "1.0.0")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://github.com/irssi/irssi/"
@@ -105,31 +108,29 @@ irssi, but graphical.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0njh43xmpad9h5g6fp1805hrix1mwbbnk7p6qmlw9apm47lc90kq"))))
+               "1f2gmr5nynagwi4wx3yprhzfpg4ww6r7ff395b0a48d0qqgkr2ka"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
          (replace 'configure
            (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (ncurses (assoc-ref inputs "ncurses")))
+             (let ((out (assoc-ref outputs "out")))
                (setenv "CONFIG_SHELL" (which "bash"))
                (zero?
                 (system* "./configure"
                          (string-append "--prefix=" out)
-                         (string-append "--with-ncurses=" ncurses)
                          (string-append "--with-proxy")
                          (string-append "--with-socks")
                          (string-append "--with-bot")))))))))
     (inputs
      `(("glib" ,glib)
        ("ncurses" ,ncurses)
-       ("openssl" ,openssl)))
-    (native-inputs
-     `(("pkg-config" ,pkg-config)
+       ("openssl" ,openssl)
        ("perl" ,perl)))
-    (home-page "http://www.irssi.org/")
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "https://irssi.org/")
     (synopsis "Terminal-based IRC client")
     (description
      "Irssi is a terminal based IRC client for UNIX systems.  It also supports
@@ -143,10 +144,10 @@ SILC and ICB protocols via plugins.")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://weechat.org/files/src/weechat-"
-                                  version ".tar.gz"))
+                                  version ".tar.xz"))
               (sha256
                (base32
-                "0lyqrymdjdvkzg8510l46c4zw8mjagnmri2i6m9y9qz0c1sfaq9h"))
+                "1qqnb9bdi15l30378rnmhf26ndacwi5hmq5vpz4lfyihk17xnryn"))
               (patches (search-patches "weechat-python.patch"))))
     (build-system gnu-build-system)
     (native-inputs `(("autoconf" ,autoconf)
@@ -329,3 +330,91 @@ and extensible with plugins and scripts.")
 embedded web server, translations (fr, fi, it, hu, de), and many
 other enhancements and bug fixes.")
     (license license:bsd-3)))
+
+(define-public epic5
+  (package
+    (name "epic5")
+    (version "2.0.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://ftp.epicsol.org/pub/"
+                                  "epic/EPIC5-PRODUCTION/"
+                                  name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "1ap73d5f4vccxjaaq249zh981z85106vvqmxfm4plvy76b40y9jm"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:test-target "test"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-perl
+           (lambda _
+             (substitute* "regress/crash-irc"
+               (("perl5") (which "perl")))
+             #t))
+         (add-after 'unpack 'patch-bsdinstall
+           ;; If we just remove /bin/ some part of the bsdinstall breaks.
+           ;; Furthermore bsdinstalls has a reference to /etc/chmod here, which
+           ;; means if we leave /etc/ in, install fails.
+           (lambda _
+             (substitute* "bsdinstall"
+               (("/bin/strip") "strip")
+               (("/bin/cp") "cp")
+               (("/bin/chmod") "chmod")
+               (("/bin/chgrp") "chgrp")
+               (("/bin/mkdir") "mkdir")
+               (("/bin/rm") "rm")
+               (("/bin/mv") "mv")
+               (("/etc/") ""))
+             #t))
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; The tarball uses a very old version of autconf. It does not
+             ;; understand extra flags like `--enable-fast-install', so
+             ;; we need to invoke it with just what it understands.
+             (let ((out (assoc-ref outputs "out")))
+               ;; 'configure' doesn't understand '--host'.
+               ,@(if (%current-target-system)
+                     `((setenv "CHOST" ,(%current-target-system)))
+                     '())
+               (setenv "CONFIG_SHELL" (which "bash"))
+               (setenv "SHELL" (which "bash"))
+               (zero?
+                (system* "./configure"
+                         (string-append "--prefix=" out)
+                         "--with-ipv6" "--with-libarchive"
+                         ;; We use libressl because openssl does not come
+                         ;; with the lib/libssl.a which is needed for epic5.
+                         ;; XXX: No matter which implementation is chosen,
+                         ;; epic5 fails to connect to tls ports of roundrobin
+                         ;; irc networks. This however is believed to be an
+                         ;; protocol issue at epic5 related to ircd.
+                         (string-append "--with-ssl="
+                                        (assoc-ref %build-inputs "libressl"))
+                         (string-append "--with-tcl="
+                                        (assoc-ref %build-inputs "tcl")
+                                        "/lib/tclConfig.sh")))))))))
+    (inputs
+     `(("libressl" ,libressl)
+       ("ncurses" ,ncurses)
+       ("libarchive" ,libarchive) ; CHANGELOG: "Support for loading zip files"
+       ("perl" ,perl)
+       ("tcl" ,tcl)
+       ("ruby" ,ruby)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "http://epicsol.org")
+    (synopsis "Epic5 IRC Client")
+    (description
+     "EPIC is a IRC client that has been under active development for
+over 20 years.  It is stable and mature, and offers an excellent ircII
+interface for those who are accustomed to the ircII way of doing things.")
+    (license (list license:bsd-3
+                   license:isc
+                   license:bsd-4
+                   ;; The epic license is equal to the standard three-clause
+                   ;; BSD license except that you are not permitted to remove the
+                   ;; "Redistribution is permitted" clause of the license if you
+                   ;; distribute binaries.
+                   (license:non-copyleft "http://epicsol.org/copyright")))))
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index df8a970e0c..3a08fd83a8 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -783,7 +783,7 @@ build process and its dependencies, whereas Make uses Makefile format.")
     (license license:gpl2+)))
 
 (define-public icedtea-7
-  (let* ((version "2.6.7")
+  (let* ((version "2.6.8")
          (drop (lambda (name hash)
                  (origin
                    (method url-fetch)
@@ -800,7 +800,7 @@ build process and its dependencies, whereas Make uses Makefile format.")
                       version ".tar.xz"))
                 (sha256
                  (base32
-                  "1r4y1afjdm72j4lkd1jsim595zy5s3hvc3dnl13f5a7wrxp2v4nh"))
+                  "0p95402viz6dnfkhhn18hrvm7wqfvij0xnxvp9nqj3aq3gzk0h45"))
                 (modules '((guix build utils)))
                 (snippet
                  '(substitute* "Makefile.in"
@@ -927,25 +927,25 @@ build process and its dependencies, whereas Make uses Makefile format.")
       (native-inputs
        `(("openjdk-src"
           ,(drop "openjdk"
-                 "0y38vgvzw2xggfg0nlalv42amy5sv6vzvjxik8bvkm1sajzazb2w"))
+                 "1qscircx5z9rnyx4k6lzxbrl5q6f9shag962zl0f52cyrcma5gp6"))
          ("corba-drop"
           ,(drop "corba"
-                 "0r778nhmzcnf6jkl50f6f279vbzh96rcwr74vb0930wgl2g46j80"))
+                 "0f25l1db5v9ib4v5wb32wjblb2zzx8f8qgr2g84yg26aq2m8swig"))
          ("jaxp-drop"
           ,(drop "jaxp"
-                 "02y7zaw4irjvbihpr4pbrl64pxjx5anfxms3i24rp1q6aj2n1gcz"))
+                 "1z4i404i3rrf5zmch8z2rslqm7vs1wzjhvjf6kgkdvnrka7a86xs"))
          ("jaxws-drop"
           ,(drop "jaxws"
-                 "1xrhdgykpi7amyyirzchp4mjrx2j3xm6nqg4bbfy2kxv7daw3z69"))
+                 "06h49jgf76408j1qhhkksly8fbyw1wisyvgi1csvj2f63bkr6c3m"))
          ("jdk-drop"
           ,(drop "jdk"
-                 "108d560iabk334lcifr5xf1w075a6c918smpbcaccsrln8qd6g79"))
+                 "0qg76gjlnyrjskzz019fi47vqdxpa51sdhcyx4lsa25j5vsih4gc"))
          ("langtools-drop"
           ,(drop "langtools"
-                 "1r5llvhxzdihyz6rmr6ri9wz8zvbw4gmlllhb340p86liqqh1rqk"))
+                 "04w82l34z83n8cd901bvmlrdk825nw5ijgny5cn1idnhplzcckh0"))
          ("hotspot-drop"
           ,(drop "hotspot"
-                 "0p3arg01jfdnbx856qfhhzp7s9yzmqwa1fspk5spmmxb9m7mj4h4"))
+                 "153i1panv3mzwh39dc8rxr9hj5920y86a4m8djxsk6qnyd4gamfa"))
          ,@(fold alist-delete (package-native-inputs icedtea-6)
                  '("openjdk6-src"))))
       (inputs
@@ -953,7 +953,7 @@ build process and its dependencies, whereas Make uses Makefile format.")
          ,@(package-inputs icedtea-6))))))
 
 (define-public icedtea-8
-  (let* ((version "3.1.0")
+  (let* ((version "3.2.0")
          (drop (lambda (name hash)
                  (origin
                    (method url-fetch)
@@ -962,7 +962,7 @@ build process and its dependencies, whereas Make uses Makefile format.")
                          "/icedtea8/" version "/" name ".tar.xz"))
                    (sha256 (base32 hash))))))
     (package (inherit icedtea-7)
-      (version "3.1.0")
+      (version "3.2.0")
       (source (origin
                 (method url-fetch)
                 (uri (string-append
@@ -970,7 +970,7 @@ build process and its dependencies, whereas Make uses Makefile format.")
                       version ".tar.xz"))
                 (sha256
                  (base32
-                  "1d1kj8a6jbvcbzhmfrx2pca7pinsvpxd7zij9h93g13dmm0ncqbm"))
+                  "104g2x5nhnqqvx6x29phx5vlrhlqy7qax83b9bqj1y619irrg8gj"))
                 (modules '((guix build utils)))
                 (snippet
                  '(substitute* "Makefile.am"
@@ -985,6 +985,8 @@ build process and its dependencies, whereas Make uses Makefile format.")
                "--enable-bootstrap"
                "--enable-nss"
                "--disable-downloading"
+               "--disable-system-pcsc"
+               "--disable-system-sctp"
                "--disable-tests"      ;they are run in the check phase instead
                "--with-openjdk-src-dir=./openjdk.src"
                ,(string-append "--with-jdk-home=" jdk))))
@@ -1038,31 +1040,31 @@ build process and its dependencies, whereas Make uses Makefile format.")
        `(("jdk" ,icedtea-7 "jdk")
          ("openjdk-src"
           ,(drop "openjdk"
-                 "1p6xgf00w754y3xdrccs67gjhb0181q49dk67h5v43aixkx7z7y1"))
+                 "093r3vlmbdx78w9s6d8lv4q65i0s9wq6an6i2g2d1zaf0js4043c"))
          ("corba-drop"
           ,(drop "corba"
-                 "088wnyfdhqkvc41pl3swnynbxx7x5lha6qg7q0biai6ya114scsy"))
+                 "11r3h9snnj7m5bqnzc5ryd85igdv7xlwzs0zy24p9ii6gsc0f9lh"))
          ("jaxp-drop"
           ,(drop "jaxp"
-                 "18xc4sib85z2zhz4k5lvi5b4vn88zqjpa3wi8gav81vz5gyysn3d"))
+                 "1mp6ps15jk8v4nnvkmbvkk7g35icdjv7892q2a4f7b268yjcgmk1"))
          ("jaxws-drop"
           ,(drop "jaxws"
-                 "1my72q2zjly4imn834zgf4rysn48gbr8i81rxzrfdqgzzinxf6l1"))
+                 "1fb5hikzzx8292nhdbp0snqn66fwnnv4rkjsk1zsjvrv4z5vk18j"))
          ("jdk-drop"
           ,(drop "jdk"
-                 "1ab2h7pppph82h3xhh1m5dha77j3wnhksq7c7f8yfcsyhr5hm243"))
+                 "1if9c5grp0km7pyn4mhfwi2ynh3ix20l1fqbfcy68sl2py7psmcj"))
          ("langtools-drop"
           ,(drop "langtools"
-                 "07bzcw2ml4apjfd0ydc3v44fnnwinwri114fig2mdcn1n388szra"))
+                 "0kbah4h4pllk0gf50mp5f6720f5ci0ixqylccppb484hp95pblcl"))
          ("hotspot-drop"
           ,(drop "hotspot"
-                 "0x5ic8cz3w9s8m8ynh31qlf47c6nwc512bp8ddwgmvsdxyiiwn1k"))
+                 "1gqz9qqsi61838dj08s01sa51zlnkvrk3hy721211dhnmkvlzmwx"))
          ("nashorn-drop"
           ,(drop "nashorn"
-                 "0zyd8pyv1il8c9npw7wz1mwxhlq510ill20nhc7i8fq7gignzcsn"))
+                 "04697l95g6y6n5dvy55k2040c6qp5hfz16qaibwzs594m3gzwwjz"))
          ("shenandoah-drop"
           ,(drop "shenandoah"
-                 "1shisljn60zw9j4nahh07vw85gj25gfiy7z196fdw0pi95va6qwk"))
+                 "0k6h7jk5i98jnld2ivy4bhydmkzrp25c3l6gwhvczvrhn7mlbnfx"))
          ,@(fold alist-delete (package-native-inputs icedtea-7)
                  '("gcj" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
                    "jdk-drop" "langtools-drop" "hotspot-drop")))))))
diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm
index d285faecb1..a7f2cabbc4 100644
--- a/gnu/packages/kde-frameworks.scm
+++ b/gnu/packages/kde-frameworks.scm
@@ -25,6 +25,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils)
+  #:use-module (gnu packages)
   #:use-module (gnu packages acl)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages attr)
@@ -50,12 +51,13 @@
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
-  #:use-module (gnu packages xorg))
+  #:use-module (gnu packages xorg)
+  #:use-module (srfi srfi-1))
 
 (define-public extra-cmake-modules
   (package
     (name "extra-cmake-modules")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -64,13 +66,18 @@
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0n7vw2a4kxdgpsc1wn9f1d0y01p6qfk8ac360rq329bvdpigxmnj"))))
+                "0yi60qd08x5093wb8dv9cx370iaabn44hzcang92g9ssfmz0zd2h"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("qtbase" ,qtbase))) ; For tests (needs qmake)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'fix-lib-path
+           (lambda _
+             ;; Always install into /lib and not into /lib64.
+             (substitute* "kde-modules/KDEInstallDirs.cmake"
+               (("\"lib64\"") "\"lib\""))))
          ;; install and check phase are swapped to prevent install from failing
          ;; after testsuire has run
          (add-after 'install 'check-post-install
@@ -185,7 +192,7 @@ common build settings used in software produced by the KDE community.")
 (define-public attica
   (package
     (name "attica")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -194,7 +201,7 @@ common build settings used in software produced by the KDE community.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0w6dwq83vj70m8rf52x60a64f6s6h0y7c948j3hddfql7s3ghha7"))))
+                "14v6vi8awk1m58l9svpjd54ckd6milzavgfbkdspsz0km1cpqlks"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -217,7 +224,7 @@ http://freedesktop.org/wiki/Specifications/open-collaboration-services/")
 (define-public bluez-qt
   (package
     (name "bluez-qt")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -226,7 +233,7 @@ http://freedesktop.org/wiki/Specifications/open-collaboration-services/")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "111gqxw1bvazdhxk5rcfhi438i6bd92r3wvlkxsdqrp7ypcqdpig"))))
+                "1rfzwrvvkc5f4l943f4r235gdniqc7njyw4fx36v00daj2r4aqi9"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("dbus" ,dbus)
@@ -251,7 +258,7 @@ Bluetooth stack.  It is used by the KDE Bluetooth stack, BlueDevil.")
 (define-public breeze-icons
   (package
     (name "breeze-icons")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -260,7 +267,7 @@ Bluetooth stack.  It is used by the KDE Bluetooth stack, BlueDevil.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "12awfvka9sgdgh7dyg7cw7myw7fxrx1w93s1gyhdq2drjsdbghgz"))))
+                "06zwg2g0157ac6xsgxs5f8s1sk8rh2j3y057iqmfg2ng2sh9byh2"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -285,7 +292,7 @@ It is the default icon theme for the KDE Plasma 5 desktop.")
 (define-public kapidox
   (package
     (name "kapidox")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -294,7 +301,7 @@ It is the default icon theme for the KDE Plasma 5 desktop.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "193m0qpcqdkspdcwc8cwabjjcqyd9d0m5kl53mycyiv1m220x11l"))))
+                "1whkl9rzhjnnmpj532d23mlrwhp5wcfxfvq4z4bxyr64g9plbzyq"))))
     (build-system cmake-build-system)
     (arguments
      `(#:tests? #f)) ; has no test target
@@ -327,7 +334,7 @@ documentation.")
 (define-public karchive
   (package
     (name "karchive")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -336,7 +343,7 @@ documentation.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1c7bifmzyr398p1qx9qfxp893wbr44sjn3sda9q0hdpmw2i7yf3z"))))
+                "1s068z0ih6qk3m4lm10wm28y0nq5qwn4gpnx9vckar51xbrl4bb7"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -361,7 +368,7 @@ GZip format, via a subclass of QIODevice.")
 (define-public kcodecs
   (package
     (name "kcodecs")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -370,7 +377,7 @@ GZip format, via a subclass of QIODevice.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0f4k276sm0svh5y8yyq8hfc5vy60cpsrwany7kswyh22m57v5j8a"))))
+                "0r01raiva4iddiz5qqshmbmidgkf4q6illanz6zwmc4n66c6s3q3"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -396,7 +403,7 @@ Internet).")
 (define-public kconfig
   (package
     (name "kconfig")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -405,7 +412,7 @@ Internet).")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "18dpm0r4nnvmxrask6rv5dkniwna9hh72ffdnvjgrh8p5djs9szi"))))
+                "0kdsaqv880wihxv6il8wailmymh0rh0jrbhg8iz2ljf3ir7g56zy"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -463,7 +470,7 @@ propagate their changes to their respective configuration files.")
 (define-public kcoreaddons
   (package
     (name "kcoreaddons")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -472,7 +479,7 @@ propagate their changes to their respective configuration files.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0rzpxajv041kdbk92rwxq1qnvzyrxfjy154d8257yj2fj76w1gnw"))))
+                "10x2sgd1acsg1kmb741zk8sbss1j9nncfr1ac2pq0fc236ivkiyb"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -502,7 +509,7 @@ many more.")
 (define-public kdbusaddons
   (package
     (name "kdbusaddons")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -511,7 +518,8 @@ many more.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1vgdl9z5xyfr2b5z7n2vdh0s6zab6ccxp30p1cy8hhhrsf04663m"))))
+                "07mzb1xr8wyiid25p8kg6mjp6vq8ngvv1ikhq75zvd2cbax530c8"))
+              (patches (search-patches "kdbusaddons-kinit-file-name.patch"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -519,10 +527,18 @@ many more.")
        ("qttools" ,qttools)))
     (inputs
      `(("qtbase" ,qtbase)
-       ("qtx11extras" ,qtx11extras)))
+       ("qtx11extras" ,qtx11extras)
+       ("kinit" ,kinit-bootstrap))) ;; kinit-bootstrap: kinit package which does not depend on kdbusaddons.
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         (add-before
+          'configure 'patch-source
+          (lambda* (#:key inputs #:allow-other-keys)
+            ;; look for the kdeinit5 executable in kinit's store directory,
+            ;; instead of the current application's directory:
+            (substitute* "src/kdeinitinterface.cpp"
+              (("@SUBSTITUTEME@") (assoc-ref inputs "kinit")))))
          (replace 'check
            (lambda _
              (setenv "DBUS_FATAL_WARNINGS" "0")
@@ -538,7 +554,7 @@ as well as an API to create KDED modules.")
 (define-public kdnssd
   (package
     (name "kdnssd")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -547,7 +563,7 @@ as well as an API to create KDED modules.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0dq2i4f4ny5cwgd41mjw5i7cf23ns55s2m13cjvxvy90nwhlymqp"))))
+                "1gkqfcz8glfa6krbayaay4kyq3zazcyr21zjg78la76vfnranh0r"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -565,7 +581,7 @@ infrastructure.")
 (define-public kguiaddons
   (package
     (name "kguiaddons")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -574,7 +590,7 @@ infrastructure.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1skvlcj0fgb4am02vlm4fyd52f9yn4y0aj5arcfz3qps5cjzr6xg"))))
+                "1f3k6g8cqgq49ka9wsfflp0vnqgk81nlp012lb5v875yil6f9m3f"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -597,7 +613,7 @@ interfaces in the areas of colors, fonts, text, images, keyboard input.")
 (define-public ki18n
   (package
     (name "ki18n")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -606,7 +622,7 @@ interfaces in the areas of colors, fonts, text, images, keyboard input.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0a66z325bvdv7g6ysml2bf8559nkjhv2fxwj1ja6vsxkn95d54ff"))))
+                "0ymg8mnpvas101war3pgm3wv8ssf1wxa6mxg9ym1xx24mx7xzhzw"))))
     (build-system cmake-build-system)
     (propagated-inputs
      `(("gettext" ,gettext-minimal)
@@ -640,7 +656,7 @@ translation scripting.")
 (define-public kidletime
   (package
     (name "kidletime")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -649,7 +665,7 @@ translation scripting.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1cv6d2vylz7vymn4v0brv2jp1kzscvm9wh1ylp3wyi1jqyblgjfw"))))
+                "0cwq8jvsimxriiazivls8yix9jyglk2giqwv34a1ic1cnackhwq7"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -667,7 +683,7 @@ or user activity.")
 (define-public kitemmodels
   (package
     (name "kitemmodels")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -676,7 +692,7 @@ or user activity.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "00qgp5i35r7k9gy43wypn9fa7zxiqqip89dzbw8r6rabinihqzy2"))))
+                "0zi7wsqcmjd7fms8r2vqvwwvzw75p275qyn6whpgblb09l0pn78z"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -728,7 +744,7 @@ model to observers
 (define-public kitemviews
   (package
     (name "kitemviews")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -737,7 +753,7 @@ model to observers
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1469i10y2c3i1pdhzl9nk177y4n1mlc7p5w7kivdcrvf9ilxvbkx"))))
+                "0wrlwawgnz1yjav4hfirc3lcki0hqy0cgr8bwhr9nhm27ndgv28p"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -769,7 +785,7 @@ to flat and hierarchical lists.")
 (define-public kplotting
   (package
     (name "kplotting")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -778,7 +794,7 @@ to flat and hierarchical lists.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1qp9q8g9yxy359bylyqyqxjq9wjismajrg4xhxx5xn4s6znyrxny"))))
+                "1vmwxj03qhrfnz3jg30ka28afpqg0hlgm46dbzyg86kg8hc2hgb2"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -804,10 +820,61 @@ data being plotted.  KPlotWidget automatically converts everything to screen
 pixel units.")
     (license license:lgpl2.1+)))
 
+(define-public ksyntaxhighlighting
+  (package
+    (name "ksyntaxhighlighting")
+    (version "5.28.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://kde/stable/frameworks/"
+                    (version-major+minor version) "/"
+                    "syntax-highlighting-" version ".tar.xz"))
+              (sha256
+               (base32
+                "0gf1ldlk4gav6bg5b1231hphaal4simyngirvr1yizcb1rrlygdy"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)
+       ("perl" ,perl)
+       ;; Optional, for compile-time validation of syntax definition files:
+       ("qtxmlpatterns" ,qtxmlpatterns)))
+    (inputs
+     `(("qtbase" ,qtbase)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'patch-source-shebangs 'unpatch-source-shebang
+           (lambda _
+             ;; revert the patch-shebang phase on scripts which are
+             ;; in fact test data
+             (substitute* '("autotests/input/test.bash"
+                            "autotests/folding/test.bash.fold")
+               (((which "bash")) "/bin/bash"))
+             (substitute* '("autotests/input/highlight.sh"
+                            "autotests/folding/highlight.sh.fold")
+               (((which "sh")) " /bin/sh")) ;; space in front!
+             (substitute* '("autotests/input/highlight.pl"
+                            "autotests/folding/highlight.pl.fold")
+               (((which "perl")) "/usr/bin/perl"))
+             #t))
+         (add-before 'check 'check-setup
+           (lambda _
+             (setenv "CTEST_OUTPUT_ON_FAILURE" "1") ; enable debug info
+             #t)))))
+    (home-page "https://community.kde.org/Frameworks")
+    (synopsis "Syntax highlighting engine for Kate syntax definitions")
+    (description "This is a stand-alone implementation of the Kate syntax
+highlighting engine.  It's meant as a building block for text editors as well
+as for simple highlighted text rendering (e.g. as HTML), supporting both
+integration with a custom editor as well as a ready-to-use
+@code{QSyntaxHighlighter} sub-class.")
+    (license license:lgpl2.1+)))
+
 (define-public kwayland
   (package
     (name "kwayland")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -816,7 +883,7 @@ pixel units.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0va1kmki2xr4mx2918h333mfkqs5v1mhbzyf71hq190izdz0jdss"))))
+                "0xm4agsv8hyx8aaiv4zpa121s08ayhbps3pbfbds2ckk57k6ba8k"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -846,7 +913,7 @@ represented by a QPoint or a QSize.")
 (define-public kwidgetsaddons
   (package
     (name "kwidgetsaddons")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -855,7 +922,7 @@ represented by a QPoint or a QSize.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0p9gxna7y7nigpi0ri7k45g4pf1svq0kxrhk4wf7rj58rilhcfrl"))))
+                "1p22s1cbwpwbm03qxs0wqb1i7w1s19b119diwkmb8xl90cqfdwnn"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -894,7 +961,7 @@ configuration pages, message boxes, and password requests.")
 (define-public kwindowsystem
   (package
     (name "kwindowsystem")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -903,7 +970,7 @@ configuration pages, message boxes, and password requests.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0w49lpwicl71gyyf2aisvmfjpvjl3w1rqpx4a42ph0aywjihjmhx"))))
+                "0lzafiwj58gg5vccnvwrhiwjq67y8cn3gllirgw13vz3f69sbr3i"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -934,7 +1001,7 @@ lower level classes for interaction with the X Windowing System.")
 (define-public modemmanager-qt
   (package
     (name "modemmanager-qt")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -943,7 +1010,7 @@ lower level classes for interaction with the X Windowing System.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1zw5frscvbsp0jpb071ssqgvm097ylw3zy69y7f0dybhps6lv2jv"))))
+                "1yfqqp596srvsi0yqrkpm5gzlwjf4szk6hy0wszr12gjjzqprilq"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -972,7 +1039,7 @@ messages.")
 (define-public networkmanager-qt
   (package
     (name "networkmanager-qt")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -981,7 +1048,7 @@ messages.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0fnj0b2j4v51f12b3v59psdza2krdkidj22b9a9jwn224lg4852y"))))
+                "1iq8xrw55k2k9af57l4lfrw72gjxgk7pp7k3m7amjfp0hdqw8602"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -1011,7 +1078,7 @@ which are used in DBus communication.")
 (define-public oxygen-icons
   (package
     (name "oxygen-icons")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1020,7 +1087,7 @@ which are used in DBus communication.")
                     name "5" "-" version ".tar.xz"))
               (sha256
                (base32
-                "1lb09ykj5ayj5lv7w2k2pqis7z61clr3gkinf6n7jghnlc96222g"))))
+                "05bypc4k86lsjp7d4lpbpsnms7k1gnjyahdbks420585ca0v4qkp"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -1030,12 +1097,13 @@ which are used in DBus communication.")
     (home-page "https://community.kde.org/Frameworks")
     (synopsis "Oxygen provides the standard icon theme for the KDE desktop")
     (description "Oxygen icon theme for the KDE desktop")
-    (license license:lgpl3+)))
+    (license license:lgpl3+)
+    (properties '((upstream-name . "oxygen-icons5")))))
 
 (define-public solid
   (package
     (name "solid")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1044,7 +1112,7 @@ which are used in DBus communication.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "01qlfj30n8sr8xd8l8fimg7hs7h70ynhalk2m9l8dz2qay2pdl27"))))
+                "0g6frc7hckbkvzgq40qrymllgp56a3v39l5d2ajqipwb4kabhdpy"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("bison" ,bison)
@@ -1064,7 +1132,7 @@ system.")
 (define-public sonnet
   (package
     (name "sonnet")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1073,7 +1141,7 @@ system.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "07i3gng309vsf5kp5dlwca0lpi3iqc0lp0ixdvx75q832gk8ivrv"))))
+                "1vzn3kvi126jnkq2s5110yii8946kaxp452735fx0l0jqjn92dy8"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -1090,7 +1158,7 @@ ASpell and HUNSPELL.")
 (define-public threadweaver
   (package
     (name "threadweaver")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1099,7 +1167,7 @@ ASpell and HUNSPELL.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0mg5i125b008x6162a5h2q14fg81m17md00017n09xljw3099kqy"))))
+                "10hy4pvw84l2z8778gsfv5i8pqrfjidvlgd5rc8xffx65s3f28b5"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -1120,7 +1188,7 @@ uses a job-based interface to queue tasks and execute them in an efficient way."
 (define-public kauth
   (package
     (name "kauth")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1129,7 +1197,7 @@ uses a job-based interface to queue tasks and execute them in an efficient way."
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "17z6dh1qdpd490z84g6ynl8bcrr9naalvh34ybnpipvx3qs50kwl"))))
+                "09m7dipkykw75dbka6mhsvrikbniwshl1l0qxcny3ywc0fkzgf40"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("dbus" ,dbus)
@@ -1142,6 +1210,17 @@ uses a job-based interface to queue tasks and execute them in an efficient way."
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'fix-cmake-install-directories
+           (lambda _
+             ;; Make packages using kauth put their policy files and helpers
+             ;; into their own prefix.
+             (substitute* "KF5AuthConfig.cmake.in"
+               (("@KAUTH_POLICY_FILES_INSTALL_DIR@")
+                "${KDE_INSTALL_DATADIR}/polkit-1/actions")
+               (("@KAUTH_HELPER_INSTALL_DIR@")
+                "${KDE_INSTALL_LIBEXECDIR}")
+               (("@KAUTH_HELPER_INSTALL_ABSOLUTE_DIR@")
+                "${KDE_INSTALL_LIBEXECDIR}"))))
          (replace 'check
            (lambda _
              (setenv "DBUS_FATAL_WARNINGS" "0")
@@ -1156,7 +1235,7 @@ utilities.")
 (define-public kcompletion
   (package
     (name "kcompletion")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1165,7 +1244,7 @@ utilities.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1mb64ii4ilhqhy9p6cl3phs17bg3lr4b60jkkm71yn2wnd4wl47s"))))
+                "1yrlhf6n7xlkid3xbpirf8n6kybc3sqp5fnb01kr1rcl89qs273f"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -1192,7 +1271,7 @@ integrated it into your application's other widgets.")
 (define-public kcrash
   (package
     (name "kcrash")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1201,7 +1280,7 @@ integrated it into your application's other widgets.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "09wf4dzckc9l8dyl8qs1wc54h4rm38i2blzyyicm4iazi420lysk"))))
+                "0gsly5wvyh0d6yfk5yyv1pgaazwlwvahz245y9sliwzrbxhgj1yv"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -1230,7 +1309,7 @@ application crashes.")
 (define-public kdoctools
   (package
     (name "kdoctools")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1239,7 +1318,7 @@ application crashes.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1hgg19da0918mx8z2614qljvj9j8bny78mwlyljf42814f3ycpam"))))
+                "1mndmxy7vgdkii8axzkzclqqimg0ksn2dmwiqsljcjcik0zfx47c"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -1278,7 +1357,7 @@ from DocBook files.")
 (define-public kfilemetadata
   (package
     (name "kfilemetadata")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1287,7 +1366,7 @@ from DocBook files.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1la6h05izgnps10py2gcn4xnwz3fm7dyswib57flc8phzipxbg5q"))))
+                "0sxifxzyqq0haxfira8ldq9gwali7p5vbbh8jslj8wlxm0dczyw6"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -1308,7 +1387,7 @@ by applications to write metadata.")
 (define-public kimageformats
   (package
     (name "kimageformats")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1317,7 +1396,7 @@ by applications to write metadata.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0ijy7di9p37l6fjrmsday402vq4zibq1m37jghkvdymawxcrd22h"))))
+                "1h17jm55r9ijmng5mb1w9nqk2hw6h965j9c2nrd8wl9dzy616kra"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -1345,7 +1424,7 @@ formats.")
 (define-public kjobwidgets
   (package
     (name "kjobwidgets")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1354,7 +1433,7 @@ formats.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "05c6jzl2a37bfz5i7hzsjmrhh8ajx1gbz7j05wgal811m5m4ww8l"))))
+                "0xh62bjd6qqbmx1jbv9qac1ng0h056mwrs8rkdqd8k10ghmsfx6a"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -1373,7 +1452,7 @@ asynchronous jobs.")
 (define-public knotifications
   (package
     (name "knotifications")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1382,7 +1461,7 @@ asynchronous jobs.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "09v122nxfgqjzr2azfn2nh4q9l22i5wnsz9prs0i7s3m7y0d7pxn"))))
+                "1a55c0abs9yg7qaajgidj8bmfbwkysf24300532lnia71n1ms25s"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -1416,7 +1495,7 @@ covers feedback and persistent events.")
 (define-public kpackage
   (package
     (name "kpackage")
-    (version "5.27.0")
+    (version "5.28.1")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1425,7 +1504,7 @@ covers feedback and persistent events.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0y07zh8ryibm69ljp9f169qfal6r4lngz1ljxgrr6qw15cjkjygk"))))
+                "0ym5fhhigp7argk7c1zyn2fvfjykgxh3miipidf142c8y3d98vbp"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -1454,7 +1533,7 @@ were traditional plugins.")
 (define-public kpty
   (package
     (name "kpty")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1463,7 +1542,7 @@ were traditional plugins.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "06pka8cbw6a9rk2j5pkz34rfy10bv6il3wqyf7ala32ynv5rcgc3"))))
+                "1q22wzx5xpmbj56xg4miiscb1xqqk2lfkljfdi87zl05vwmnc7hn"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -1491,7 +1570,7 @@ and communicating with them using a pty.")
 (define-public kunitconversion
   (package
     (name "kunitconversion")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1500,7 +1579,7 @@ and communicating with them using a pty.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "11rn6813jz7clb6fjp9nbdg1c350zh0yiprbr053wkdjrb3aca7c"))))
+                "0n6ndy1yarilnk2l09h92qk32v02hknafif1i9mmwcibldvc963q"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -1524,7 +1603,7 @@ gallons).")
 (define-public baloo
   (package
     (name "baloo")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1533,7 +1612,7 @@ gallons).")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0dqa5sxz2z440h6zry7s1x0r1d919qky69i5fv2nir7y844xx2cc"))))
+                "071in785y1qplm59fmsmifzbmczvlvkf5gxdb6d0iw93pb36r7h5"))))
     (build-system cmake-build-system)
     (propagated-inputs
      `(("kcoreaddons" ,kcoreaddons)
@@ -1581,7 +1660,7 @@ maintaining an index of the contents of your files.")
 (define-public kactivities
   (package
     (name "kactivities")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1590,7 +1669,7 @@ maintaining an index of the contents of your files.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "08x07rlf2gff1j9jahznz2838919vab1ay8jppz3bp5kywx104yk"))))
+                "162ilqcfp8b3lb3gpzbw94ppsdqzn6i6ymiwh12xy5nrxixdpagb"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -1628,7 +1707,7 @@ with other frameworks.")
 (define-public kactivities-stats
   (package
     (name "kactivities-stats")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1637,7 +1716,7 @@ with other frameworks.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "134a3zgasza9wghp1lkiaar3sakag7vn82pm2kcrmr420a0jigsw"))))
+                "0pjgjl5bwmq0n23nwcqjp3b412fsibnvwsr3s3l67k9scmdpbm4v"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -1658,7 +1737,7 @@ by which applications, and what documents have been linked to which activity.")
 (define-public kbookmarks
   (package
     (name "kbookmarks")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1667,7 +1746,7 @@ by which applications, and what documents have been linked to which activity.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1lb20yn8s27h0965yf6w4v4wwlm80bl24mpsksp01z9f0711j8vm"))))
+                "1lfvps0xzpzn42n7rpsdcmsiryclykz6h1hk8sp6nsbhqwzd0r65"))))
     (build-system cmake-build-system)
     (propagated-inputs
      `(("kwidgetsaddons" ,kwidgetsaddons)))
@@ -1700,7 +1779,7 @@ using the XBEL format.")
 (define-public kcmutils
   (package
     (name "kcmutils")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1709,7 +1788,7 @@ using the XBEL format.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "04nbd0836azs2i0pq8hq8ljnmfc45mqs022zdn84xd2q3npl3hfx"))))
+                "0wj3f5ykzb7q9536y9wk8mnfcb6zay2mmc25dg67mdznzwdy36aa"))))
     (build-system cmake-build-system)
     (propagated-inputs
      `(("kconfigwidgets" ,kconfigwidgets)
@@ -1739,7 +1818,7 @@ KCModules can be created with the KConfigWidgets framework.")
 (define-public kconfigwidgets
   (package
     (name "kconfigwidgets")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1748,7 +1827,7 @@ KCModules can be created with the KConfigWidgets framework.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0sbhirfsjmsxiwaqqh5jh85bhwmij93gj5knnb0bs0al4hy29918"))))
+                "0cy53jaq15n8hw2m67l0y6x722ywg0ijfz5ak5vq3fjjhc9fmq8d"))))
     (build-system cmake-build-system)
     (propagated-inputs
      `(("kauth" ,kauth)
@@ -1780,7 +1859,7 @@ their settings.")
 (define-public kdeclarative
   (package
     (name "kdeclarative")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1789,7 +1868,7 @@ their settings.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1a8pqwrwgmzarinhr9xxviqh9417p8icj8lwqg9ly0q0j3yv20dh"))))
+                "1g7bf3smdiwgfhdzwskp3l7l4bn838q1cdy4hp9mzqdssz956wmn"))))
     (build-system cmake-build-system)
     (propagated-inputs
      `(("kconfig" ,kconfig)
@@ -1840,7 +1919,7 @@ that offer bindings to some of the Frameworks.")
 (define-public kded
   (package
     (name "kded")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1849,7 +1928,7 @@ that offer bindings to some of the Frameworks.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "14f4qxia9p3vynv2ch9rs67zaxn9kpbas0fn0vwag1ikxb8qz0c2"))))
+                "115ywk3vdyhwzna59bpiqfffcc128vafl823yh5fzkwbp8w7qdn5"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -1873,7 +1952,7 @@ started on demand.")
 (define-public kdesignerplugin
   (package
     (name "kdesignerplugin")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1882,7 +1961,7 @@ started on demand.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "157lny5v8js63nvw2iyc9j4cinqmyj75a389s46n8wqyygrz5v0v"))))
+                "12v9pbfniljp23bllxxq6hfv6qnp2q8yjsix6fy6hwf8yrsq42m3"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -1910,7 +1989,7 @@ ini-style description files.")
 (define-public kdesu
   (package
     (name "kdesu")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1919,7 +1998,7 @@ ini-style description files.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1l501z102ygibz4000jnngm0cggh2kaf6hzra1ngv5nxqxzkh31a"))))
+                "1f6awbnqs14si13n1ryibb0z3mj90bg0vk320hgabd2zxma00vwp"))))
     (build-system cmake-build-system)
     (propagated-inputs
      `(("kpty" ,kpty)))
@@ -1941,7 +2020,7 @@ with su and ssh respectively.")
 (define-public kemoticons
   (package
     (name "kemoticons")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1950,7 +2029,7 @@ with su and ssh respectively.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0rjw2g3lfdxiy56x61d0sdcmcs8rml6h29a05fp6xww2bqcvr9wq"))))
+                "10qxm9q7bsbbg419f8d0703mikd8w99a8fh501fpm3sgh6k7pbyv"))))
     (build-system cmake-build-system)
     (propagated-inputs
      `(("kservice" ,kservice)))
@@ -1982,7 +2061,7 @@ emoticons coming from different providers.")
 (define-public kglobalaccel
   (package
     (name "kglobalaccel")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1991,7 +2070,7 @@ emoticons coming from different providers.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1z2knfxcla1f191cifij1fzw88b076yx6qjxraqfsmkc6g6i2bmj"))))
+                "0a60f2bs7dhx0rsrgva2p97dcala6jrjfg4z2nv0m4bv82i4kchc"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -2024,7 +2103,7 @@ window does not need focus for them to be activated.")
 (define-public kiconthemes
   (package
     (name "kiconthemes")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2033,7 +2112,7 @@ window does not need focus for them to be activated.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0m70vcrxp0vvqw5grlsn19d2hgdhky8iv2pr0xwzw8v5yrnl1hh2"))))
+                "1i5cpsqfn1vcch8izbrgig2km580gdxf02qmib4ynbwzcfvrnbqc"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)
@@ -2072,7 +2151,7 @@ in applications using the KDE Frameworks.")
 (define-public kinit
   (package
     (name "kinit")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2081,7 +2160,7 @@ in applications using the KDE Frameworks.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0sbpl1sp1ajarjmnvx2l3dr09afsay28kp2sf4yacrm4lrmhwzip"))))
+                "0hwa4anljh5v53gswziacwr6ryvhp136k6y85d10074lrckdr912"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -2116,7 +2195,7 @@ makes starting KDE applications faster and reduces memory consumption.")
 (define-public kio
   (package
     (name "kio")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2125,7 +2204,7 @@ makes starting KDE applications faster and reduces memory consumption.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "129sglaw1480v3i1xdyv6k1w3spbj8s00rkdr5mzlcdaqiig69rn"))))
+                "1hqc88c2idi9fkb7jy82csb0i740lghv0p2fg1gaglcarjdz7nia"))))
     (build-system cmake-build-system)
     (propagated-inputs
      `(("kbookmarks" ,kbookmarks)
@@ -2189,7 +2268,7 @@ KIO enabled infrastructure.")
 (define-public knewstuff
   (package
     (name "knewstuff")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2198,7 +2277,7 @@ KIO enabled infrastructure.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "05ikb7cvyx3cmrrjh2ss6439a49vmzbi3chjj23ffdz2nd2k7r2f"))))
+                "0p5a6zprqfnhiim0l0qigjy7kky0m4w2nykhllwvr6lda1rg8qs3"))))
     (build-system cmake-build-system)
     (propagated-inputs
      `(("attica" ,attica)
@@ -2245,7 +2324,7 @@ specification.")
 (define-public knotifyconfig
   (package
     (name "knotifyconfig")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2254,7 +2333,7 @@ specification.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "088p19ynjs79zf7mq3gkds93dg72jj8pfya53xyhzdg8s6vyns9n"))))
+                "0riia9lvp33lqh8ld5r1r0adnfnxikbvmdi4k7kfc4pzra93h10f"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -2287,7 +2366,7 @@ notifications which can be embedded in your application.")
 (define-public kparts
   (package
     (name "kparts")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2296,7 +2375,7 @@ notifications which can be embedded in your application.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0rfsyr96s59ljp3jgmcwlvwzbgmlx7fvr62xswwmsnb8ah14k5rh"))))
+                "1jghgddgz0ghq6n51l1i6jc1s10g0ckda5nlwh4myziv229g9pik"))))
     (build-system cmake-build-system)
     (propagated-inputs
      `(("kio" ,kio)
@@ -2337,7 +2416,7 @@ widgets with a user-interface defined in terms of actions.")
 (define-public kpeople
   (package
     (name "kpeople")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2346,7 +2425,7 @@ widgets with a user-interface defined in terms of actions.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1w6sbd6djcpv36m9my4drqkrs1l3cryshpz1dx9z8p7afr296n8j"))))
+                "0dqz6varz3nrnp8jfysdsp2r2mm46hn3vfcqcyyqk3nmv6sd9mpp"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -2380,7 +2459,7 @@ to easily extend the contacts collection.")
 (define-public krunner
   (package
     (name "krunner")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2389,7 +2468,7 @@ to easily extend the contacts collection.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1yyxyippmn0d9ycj1hdjvhl1zd31yxwg89a9zwmj8v8gdfr9flj9"))))
+                "1mmbrpgw090z41l2vg350hmm3ya2qkfkjmq7v5d90jpb7z7y6pr9"))))
     (build-system cmake-build-system)
     (propagated-inputs
      `(("plasma-framework" ,plasma-framework)))
@@ -2435,7 +2514,7 @@ typed.")
 (define-public kservice
   (package
     (name "kservice")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2444,7 +2523,7 @@ typed.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "129bjdr272qkz2inmagy8jnxasifrl4d82x8rp9akfar29qsj6x6"))))
+                "0mlc3vw0vq1rwcg803dsybzlwxj1n6hg13z9sg0h28wsbyss3l4l"))))
     (build-system cmake-build-system)
     (propagated-inputs
      `(("kconfig" ,kconfig)
@@ -2480,7 +2559,7 @@ types or handled by application specific code.")
 (define-public ktexteditor
   (package
     (name "ktexteditor")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2489,7 +2568,7 @@ types or handled by application specific code.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "127wp4dg72skd6abn2vqffxg91bn59z8yxwy6lxyzvck2pc5v1ss"))))
+                "1sl152xasbhgpph4f6apkc54b26smgxbd3cxbvch2hfi5cxgb8fq"))))
     (build-system cmake-build-system)
     (propagated-inputs
      `(("kparts" ,kparts)))
@@ -2547,7 +2626,7 @@ library.")
 (define-public ktextwidgets
   (package
     (name "ktextwidgets")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2556,7 +2635,7 @@ library.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0aq2qx64wylxj5q5sr0dxv9h8bmn725llxyi7iwz31dg2ngfr7m4"))))
+                "0gwjb0isjfrqd15lvln6bwql1lpk2r1vp5f72zxygz2ay8ar1wxp"))))
     (build-system cmake-build-system)
     (propagated-inputs
      `(("ki18n" ,ki18n)
@@ -2592,7 +2671,7 @@ It supports rich text as well as plain text.")
 (define-public kwallet
   (package
     (name "kwallet")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2601,7 +2680,7 @@ It supports rich text as well as plain text.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1mlrkzvbqk6r43yqrvv6jsc66brzjd321fp7mg7g3ny47va7hbc2"))))
+                "0n25mvjwy3sv5bg2x75psz6d6f8yl53j3wfmx9ayh57jk4rq24rm"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("extra-cmake-modules" ,extra-cmake-modules)))
@@ -2633,7 +2712,7 @@ the passwords on KDE work spaces.")
 (define-public kxmlgui
   (package
     (name "kxmlgui")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2642,7 +2721,7 @@ the passwords on KDE work spaces.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0hf55ip2irbsbg59r36njgb0h5ygpaspa4x6jfyi4bxj852c3hw1"))))
+                "0plw6fckpssgwf18f5i4vhfp55jmdvfh2rc5lg8fwmlqgqkvrbac"))))
     (build-system cmake-build-system)
     (propagated-inputs
      `(("kconfig" ,kconfig)
@@ -2685,7 +2764,7 @@ descriptions for integrating actions from plugins.")
 (define-public kxmlrpcclient
   (package
     (name "kxmlrpcclient")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2694,7 +2773,7 @@ descriptions for integrating actions from plugins.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "17bavm8qj4r1kc67x5g20v1pl8arjqpn69hg7icp2b1b0vnfvav1"))))
+                "1xrdh5ipldahcv0pxp7dnzjz1ihnkg4r2hpylg6bwvq81clw8xd1"))))
     (build-system cmake-build-system)
     (propagated-inputs
      `(("kio" ,kio)))
@@ -2728,7 +2807,7 @@ setUrl, setUserAgent and call.")
 (define-public plasma-framework
   (package
     (name "plasma-framework")
-    (version "5.27.0")
+    (version "5.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2737,7 +2816,7 @@ setUrl, setUserAgent and call.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "11apg7h636dshswikjpz0qkapv8izqjjz47k7vs49x0byp802s5i"))))
+                "0j4mfd8wzrspvyy281lww981fly2rkbhnixb9b0pj5k9i8gvkh7q"))))
     (build-system cmake-build-system)
     (propagated-inputs
      `(("kpackage" ,kpackage)
@@ -2790,3 +2869,22 @@ setUrl, setUserAgent and call.")
 script engines.")
     ;; dual licensed
     (license (list license:gpl2+ license:lgpl2.1+))))
+
+;; This version of kdbusaddons does not use kinit as an input, and is used to
+;; build kinit-bootstrap, as well as bootstrap versions of all kinit
+;; dependencies which also rely on kdbusaddons.
+(define kdbusaddons-bootstrap
+  (package
+    (inherit kdbusaddons)
+    (source (origin
+              (inherit (package-source kdbusaddons))
+              (patches '())))
+    (inputs (alist-delete "kinit" (package-inputs kdbusaddons)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments kdbusaddons)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (delete 'patch-source)))))))
+
+(define kinit-bootstrap
+  ((package-input-rewriting `((,kdbusaddons . ,kdbusaddons-bootstrap))) kinit))
diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm
index 82e7ed2cc7..db8609a645 100644
--- a/gnu/packages/kde.scm
+++ b/gnu/packages/kde.scm
@@ -23,10 +23,101 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils)
+  #:use-module (gnu packages apr)
+  #:use-module (gnu packages boost)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages documentation)
+  #:use-module (gnu packages gl)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages kde-frameworks)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages tls)
-  #:use-module (gnu packages qt))
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages version-control))
+
+(define-public kdevelop
+  (package
+    (name "kdevelop")
+    (version "5.0.2")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "mirror://kde/stable/kdevelop"
+                            "/" version "/src/kdevelop-"
+                            version ".tar.xz"))
+        (sha256
+         (base32
+          "0rl6csmzf14gf0r0mk7z2lj7cq8fggf5qmlbxq6j68vp2q0pj0cv"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)
+       ("pkg-config" ,pkg-config)
+       ("qttools" ,qttools)))
+    (inputs
+     `(("kdevplatform" ,kdevplatform)
+       ("kdevelop-pg-qt" ,kdevelop-pg-qt)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtquickcontrols" ,qtquickcontrols)
+       ("qtwebkit" ,qtwebkit)
+       ("karchive" ,karchive)
+       ("kcmutils" ,kcmutils)
+       ("kconfig" ,kconfig)
+       ("kdeclarative" ,kdeclarative)
+       ("kdoctools" ,kdoctools)
+       ("kguiaddons" ,kguiaddons)
+       ("ki18n" ,ki18n)
+       ("kio" ,kio)
+       ("kiconthemes" ,kiconthemes)
+       ("kitemmodels" ,kitemmodels)
+       ("kitemviews" ,kitemviews)
+       ("kjobwidgets" ,kjobwidgets)
+       ("knotifyconfig" ,knotifyconfig)
+       ("knotifications" ,knotifications)
+       ("kparts" ,kparts)
+       ("kcrash" ,kcrash)
+       ("knewstuff" ,knewstuff)
+       ("krunner" ,krunner)
+       ("kxmlgui" ,kxmlgui)
+       ("libksysguard" ,libksysguard)
+       ("threadweaver" ,threadweaver)
+       ("ktexteditor" ,ktexteditor)
+       ("kwindowsystem" ,kwindowsystem)
+       ("plasma" ,plasma-framework)
+       ("grantlee" ,grantlee)
+       ("libepoxy" ,libepoxy)
+       ("clang" ,clang)
+       ("shared-mime-info" ,shared-mime-info)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'check) ;; there are some issues with the test suite
+         (add-after 'install 'wrap-executable
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out  (assoc-ref outputs "out"))
+                    (kdevplatform (assoc-ref inputs "kdevplatform"))
+                    (kio (assoc-ref inputs "kio"))
+                    (qtquickcontrols (assoc-ref inputs "qtquickcontrols"))
+                    (qtdeclarative (assoc-ref inputs "qtdeclarative"))
+                    (plugins "/lib/plugins")
+                    (qml "/qml"))
+               (wrap-program (string-append out "/bin/kdevelop")
+                 `("QT_PLUGIN_PATH" ":" prefix
+                   (,(string-append out plugins)
+                    ,(string-append kdevplatform plugins)
+                    ,(string-append kio plugins)))
+                 `("QML2_IMPORT_PATH" ":" prefix
+                   (,(string-append qtquickcontrols qml)
+                    ,(string-append qtdeclarative qml))))))))))
+    (home-page "https://kdevelop.org")
+    (synopsis "IDE for C, C++, Python, Javascript and PHP")
+    (description "The KDevelop IDE provides semantic syntax highlighting, as
+well as code navigation and completion for C, C++ (using Clang/LLVM), QML,
+JavaScript, Python and PHP.  It also integrates with a debugger, different
+build systems (CMake, QMake, custom Makefiles) and version control
+software (Git, Subversion, Mercurial, CVS and Bazaar).")
+    (license license:lgpl2.1+)))
 
 (define-public kdevelop-pg-qt
   (package
@@ -51,6 +142,79 @@
 for some KDevelop language plugins (Ruby, PHP, CSS...).")
     (license license:lgpl2.0+)))
 
+(define-public kdevplatform
+  (package
+    (name "kdevplatform")
+    (version "5.0.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/KDE/kdevplatform/archive/v"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1m8c0ixv91diyy9bvq53d4jik4zrnf7bix7clad4ywxnlpcs4ahr"))
+              (file-name (string-append name "-" version ".tar.gz"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("apr" ,apr)
+       ("apr-util" ,apr-util)
+       ("boost" ,boost)
+       ("karchive" ,karchive)
+       ("kconfigwidgets" ,kconfigwidgets)
+       ("kcmutils" ,kcmutils)
+       ("kiconthemes" ,kiconthemes)
+       ("kdeclarative" ,kdeclarative)
+       ("kdoctools" ,kdoctools)
+       ("kguiaddons" ,kguiaddons)
+       ("kinit" ,kinit)
+       ("kitemmodels" ,kitemmodels)
+       ("knewstuff" ,knewstuff)
+       ("knotifications" ,knotifications)
+       ("knotifyconfig" ,knotifyconfig)
+       ("kwindowsystem" ,kwindowsystem)
+       ("kio" ,kio)
+       ("ki18n" ,ki18n)
+       ("kparts" ,kparts)
+       ("kservice" ,kservice)
+       ("grantlee" ,grantlee)
+       ("libkomparediff2" ,libkomparediff2)
+       ("sonnet" ,sonnet)
+       ("threadweaver" ,threadweaver)
+       ("ktexteditor" ,ktexteditor)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtscript" ,qtscript)
+       ("qtwebkit" ,qtwebkit)
+       ("qtx11extras" ,qtx11extras)
+       ("plasma" ,plasma-framework)
+       ("subversion" ,subversion)
+       ("zlib" ,zlib)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'check)
+         (add-after 'install 'check ;; add-after 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
+               (setenv "QT_PLUGIN_PATH"
+                       (string-append out "/lib/plugins:"
+                                      (getenv "QT_PLUGIN_PATH")))
+               (setenv "XDG_DATA_DIRS"
+                       (string-append out "/share:"
+                                      (getenv "XDG_DATA_DIRS")))
+               (zero?
+                (system* "ctest" "-R" ;; almost all tests require a display
+                         "filteringstrategy|kdevvarlengtharray|kdevhash"))))))))
+    (home-page "https://github.com/KDE/kdevplatform")
+    (synopsis "Framework to build integrated development environments (IDEs)")
+    (description "KDevPlatform is the basis of KDevelop and contains some
+plugins, as well as code to create plugins, or complete applications.")
+    (license license:gpl3+)))
+
 (define-public libkomparediff2
   (package
     (name "libkomparediff2")
@@ -85,6 +249,59 @@ used in KDE development tools Kompare and KDevelop.")
     ;; source archive
     (license (list license:gpl2+ license:lgpl2.0+ license:bsd-3))))
 
+(define-public libksysguard
+  (package
+    (name "libksysguard")
+    (version "5.8.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://kde//stable/plasma/" version
+                           "/libksysguard-" version ".tar.xz"))
+       (sha256
+        (base32
+         "158n30wbpsgbw3axhhsc58hnwhwdd02j3zc9hhcybmnbkfl5c96l"))))
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("kconfigwidgets" ,kconfigwidgets)
+       ("kiconthemes" ,kiconthemes)
+       ("kwindowsystem" ,kwindowsystem)
+       ("ki18n" ,ki18n)
+       ("kauth" ,kauth)
+       ("kcompletion" ,kcompletion)
+       ("kconfig" ,kconfig)
+       ("kcoreaddons" ,kcoreaddons)
+       ("kwidgetsaddons" ,kwidgetsaddons)
+       ("kservice" ,kservice)
+       ("qtbase" ,qtbase)
+       ("qtscript" ,qtscript)
+       ("qtwebkit" ,qtwebkit)
+       ("qtx11extras" ,qtx11extras)
+       ("plasma" ,plasma-framework)
+       ("zlib" ,zlib)))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       `(,(string-append "-DKDE_INSTALL_DATADIR="
+                         (assoc-ref %outputs "out") "/share"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-cmakelists
+           (lambda _
+             (substitute* "processcore/CMakeLists.txt"
+               (("KAUTH_HELPER_INSTALL_DIR") "KDE_INSTALL_LIBEXECDIR"))))
+         (replace 'check
+           (lambda _         ;other tests require a display and therefore fail
+             (zero? (system* "ctest" "-R" "chronotest")))))))
+    (home-page "https://www.kde.org/info/plasma-5.8.2.php")
+    (synopsis "Network enabled task and system monitoring")
+    (description "KSysGuard can obtain information on system load and
+manage running processes.  It obtains this information by interacting
+with a ksysguardd daemon, which may also run on a remote system.")
+    (license license:gpl3+)))
+
 (define-public qca
   (package
     (name "qca")
diff --git a/gnu/packages/key-mon.scm b/gnu/packages/key-mon.scm
index c76360ce08..6237a1765a 100644
--- a/gnu/packages/key-mon.scm
+++ b/gnu/packages/key-mon.scm
@@ -42,8 +42,6 @@
     (arguments
      `(#:python ,python-2                    ;uses the Python 2 'print' syntax
        #:tests? #f))                         ;no tests
-    (native-inputs
-     `(("python2-setuptools" ,python2-setuptools)))
     (inputs
      `(("python2-xlib" ,python2-xlib)
        ("python2-pygtk" ,python2-pygtk)
diff --git a/gnu/packages/libevent.scm b/gnu/packages/libevent.scm
index c9e57d6331..cb76915ef7 100644
--- a/gnu/packages/libevent.scm
+++ b/gnu/packages/libevent.scm
@@ -65,7 +65,7 @@ loop.")
 (define-public libev
   (package
     (name "libev")
-    (version "4.20")
+    (version "4.23")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://dist.schmorp.de/libev/Attic/libev-"
@@ -73,7 +73,7 @@ loop.")
                                   ".tar.gz"))
               (sha256
                (base32
-                "17j47pbkr65a18mfvy2861p5k7w4pxmdgiw723ryfqd9gx636w7q"))))
+                "0ynxxm7giy4hg3qp9q8wshqw1jla9sxbsbi2pwsdsl1v1hz79zn7"))))
     (build-system gnu-build-system)
     (home-page "http://software.schmorp.de/pkg/libev.html")
     (synopsis "Event loop loosely modelled after libevent")
diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index e02e4f4cdc..a962d9a301 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -144,7 +145,7 @@ CSV, CSS and XML.")
      `(#:configure-flags '("--disable-werror"
                            ;; Avoid undefined library references
                            "LDFLAGS=-lboost_system")))
-    (home-page "http://sourceforge.net/p/libwpd/wiki/librevenge/")
+    (home-page "https://sourceforge.net/p/libwpd/wiki/librevenge/")
     (synopsis "Document importer for office suites")
     (description "Librevenge is a base library for writing document import
 filters.  It has interfaces for text documents, vector graphics,
@@ -275,7 +276,7 @@ working with graphics in the WPG (WordPerfect Graphics) format.")
           ;; fails without the following flag.
           (string-append "--with-boost="
                          (assoc-ref %build-inputs "boost")))))
-    (home-page "http://sourceforge.net/projects/libcmis/")
+    (home-page "https://sourceforge.net/projects/libcmis/")
     (synopsis "CMIS client library")
     (description "LibCMIS is a C++ client library for the CMIS interface.  It
 allows C++ applications to connect to any ECM behaving as a CMIS server such
@@ -561,7 +562,7 @@ Microsoft Visio documents of all versions.")
     (arguments
      ;; avoid triggering configure errors by simple inclusion of boost headers
      `(#:configure-flags '("--disable-werror")))
-    (home-page "http://sourceforge.net/p/libwpd/wiki/libodfgen/")
+    (home-page "https://sourceforge.net/p/libwpd/wiki/libodfgen/")
     (synopsis "ODF (Open Document Format) library")
     (description "Libodfgen is a library for generating documents in the
 Open Document Format (ODF).  It provides generator implementations for all
@@ -592,7 +593,7 @@ text documents, vector drawings, presentations and spreadsheets.")
     (arguments
      ;; avoid triggering configure errors by simple inclusion of boost headers
      `(#:configure-flags '("--disable-werror")))
-    (home-page "http://sourceforge.net/p/libmwaw/wiki/Home/")
+    (home-page "https://sourceforge.net/p/libmwaw/wiki/Home/")
     (synopsis "Import library for some old Macintosh text documents")
     (description "Libmwaw contains some import filters for old Macintosh
 text documents (MacWrite, ClarisWorks, ... ) and for some graphics and
@@ -631,21 +632,24 @@ Works word processor file format.")
 (define-public hunspell
   (package
     (name "hunspell")
-    (version "1.3.3")
+    (version "1.5.4")
     (source
      (origin
       (method url-fetch)
-      (uri (string-append "mirror://sourceforge/" name "/Hunspell/" version "/"
-                          name "-" version ".tar.gz"))
+      (uri (string-append "https://github.com/hunspell/hunspell/archive/v"
+                          version ".tar.gz"))
       (sha256 (base32
-               "0v14ff9s37vkh45diaddndcrj0hmn67arh8xh8k79q9c1vgc1cm7"))))
+               "0ngwk18dwd8p5a5f20h2jlgrz9wbc1k189mmmprb2zmqwfi02b45"))
+      (file-name (string-append name "-" version ".tar.gz"))))
     (build-system gnu-build-system)
+    (inputs
+     `(("perl" ,perl)))
     (home-page "http://hunspell.sourceforge.net/")
     (synopsis "Spell checker")
     (description "Hunspell is a spell checker and morphological analyzer
 library and program designed for languages with rich morphology and complex
 word compounding or character encoding.")
-    ;; triple license, including "mpl1.1 or later"
+    ;; Triple license, including "mpl1.1 or later".
     (license (list mpl1.1 gpl2+ lgpl2.1+))))
 
 (define-public hyphen
@@ -710,7 +714,7 @@ and to return information on pronunciations, meanings and synonyms.")
 (define-public libreoffice
   (package
     (name "libreoffice")
-    (version "5.1.5.2")
+    (version "5.1.6.2")
     (source
      (origin
       (method url-fetch)
@@ -719,7 +723,7 @@ and to return information on pronunciations, meanings and synonyms.")
           "http://download.documentfoundation.org/libreoffice/src/"
           (version-prefix version 3) "/libreoffice-" version ".tar.xz"))
       (sha256 (base32
-               "1qg0dj0zwh5ifhmvv4k771nmyqddz4ifn75s9mr1p0nyix8zks8x"))))
+               "150xb76pc3889gfy4jrnq8sidymm1aihkm5pzy8b1fdy51zip804"))))
     (build-system gnu-build-system)
     (native-inputs
      `(;; autoreconf is run by the LibreOffice build system, since after
@@ -820,14 +824,16 @@ and to return information on pronunciations, meanings and synonyms.")
                    (("./configure") "$(CONFIG_SHELL) ./configure" ))
                  #t)))
            (add-after 'install 'bin-install
-             ;; Create a symlink bin/soffice to the executable script.
+             ;; Create 'soffice' and 'libreoffice' symlinks to the executable
+             ;; script.
              (lambda* (#:key outputs #:allow-other-keys)
                (let* ((out (assoc-ref outputs "out"))
-                      (bin (string-append out "/bin")))
+                      (bin (string-append out "/bin"))
+                      (soffice (string-append
+                                out "/lib/libreoffice/program/soffice")))
                  (mkdir bin)
-                 (symlink
-                   (string-append out "/lib/libreoffice/program/soffice")
-                   (string-append bin "/soffice")))
+                 (symlink soffice (string-append bin "/soffice"))
+                 (symlink soffice (string-append bin "/libreoffice")))
                #t)))
        #:configure-flags
         (list
diff --git a/gnu/packages/libunistring.scm b/gnu/packages/libunistring.scm
index 5df7be67cf..212bec4b49 100644
--- a/gnu/packages/libunistring.scm
+++ b/gnu/packages/libunistring.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -22,7 +23,8 @@
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module (guix build-system gnu))
+  #:use-module (guix build-system gnu)
+  #:use-module (gnu packages base))
 
 (define-public libunistring
   (package
@@ -36,7 +38,7 @@
             (sha256
              (base32
               "15z76qrmrvkc3c6hfq2lzzqysgd21s682f2smycfab5g598n8drf"))))
-   (propagated-inputs '())                  ; FIXME: add libiconv when !glibc
+   (propagated-inputs (libiconv-if-needed))
    (build-system gnu-build-system)
    (arguments
     ;; Work around parallel build issue whereby C files may be compiled before
diff --git a/gnu/packages/libupnp.scm b/gnu/packages/libupnp.scm
index b9209bf04b..ea4d1bd25e 100644
--- a/gnu/packages/libupnp.scm
+++ b/gnu/packages/libupnp.scm
@@ -32,7 +32,8 @@
       (method url-fetch)
       (uri (string-append "mirror://sourceforge/pupnp/pupnp/libUPnP%20"
                           version "/" name "-" version ".tar.bz2"))
-      (patches (search-patches "libupnp-CVE-2016-6255.patch"))
+      (patches (search-patches "libupnp-CVE-2016-6255.patch"
+                               "libupnp-CVE-2016-8863.patch"))
       (sha256
        (base32
         "0qrsdsb1qm85hc4jy04qph895613d148f0x1mmk6z99y3q43fdgf"))))
diff --git a/gnu/packages/links.scm b/gnu/packages/links.scm
index 2f0c12a786..145ed761ee 100644
--- a/gnu/packages/links.scm
+++ b/gnu/packages/links.scm
@@ -33,13 +33,13 @@
 (define-public links
   (package
     (name "links")
-    (version "2.13")
+    (version "2.14")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://links.twibright.com/download/"
                                   name "-" version ".tar.bz2"))
               (sha256
-               (base32 "01a4mbpvf7450ymqarjkpmzrm0z2zyd9lvqwg7x9kcd36i9hjln2"))))
+               (base32 "1f24y83wa1vzzjq5kp857gjqdpnmf8pb29yw7fam0m8wxxw0c3gp"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index a0d86bb40e..5e450a72a7 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -18,6 +18,7 @@
 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2016 Rene Saavedra <rennes@openmailbox.org>
 ;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
+;;; Copyright © 2016 ng0 <ng0@libertad.pw>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -73,6 +74,8 @@
   #:use-module (gnu packages slang)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages video)
+  #:use-module (gnu packages xiph)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg)
@@ -252,13 +255,15 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
        ("bc" ,bc)
        ("openssl" ,openssl)
        ("kmod" ,kmod)
-       ,@(if configuration-file
-             `(("kconfig" ,(configuration-file
-                            (system->linux-architecture
-                             (or (%current-target-system)
-                                 (%current-system)))
-                            #:variant (version-major+minor version))))
-             '())))
+       ,@(match (and configuration-file
+                     (configuration-file
+                      (system->linux-architecture
+                       (or (%current-target-system) (%current-system)))
+                      #:variant (version-major+minor version)))
+           (#f                                    ;no config for this platform
+            '())
+           ((? string? config)
+            `(("kconfig" ,config))))))
     (arguments
      `(#:modules ((guix build gnu-build-system)
                   (guix build utils)
@@ -337,26 +342,26 @@ It has been modified to remove all non-free binary blobs.")
 (define %intel-compatible-systems '("x86_64-linux" "i686-linux"))
 
 (define-public linux-libre
-  (make-linux-libre "4.8.10"
-                    "04kwarmpz5adz64wwy0xpwzxsri7jrjkhbmjlwxsac69x9a26bkl"
+  (make-linux-libre "4.8.15"
+                    "0msgi44mh1ighfawysrzrljikwrapkvk418d6h0v45vj2i5rwln9"
                     %intel-compatible-systems
                     #:configuration-file kernel-config))
 
 (define-public linux-libre-4.4
-  (make-linux-libre "4.4.34"
-                    "04ng40l2av34bcfwjs5vliv15f0m8bl0sfw08imspiplxvajd6ca"
+  (make-linux-libre "4.4.39"
+                    "0aqi44xshib7lx9zjc0kj2v172ywa0iy2kb6z0whbiw3f841hv43"
                     %intel-compatible-systems
                     #:configuration-file kernel-config))
 
 (define-public linux-libre-4.1
-  (make-linux-libre "4.1.35"
-                    "05zvrld1digqwf9kqf5pxx0mxqmwpr5kamhnks6y4yfy7x7jynyk"
+  (make-linux-libre "4.1.37"
+                    "0q79cxmrz0j5wh7z1dc103q6q6qf7rqgjl7ka8lvn4vl32pr0kq1"
                     %intel-compatible-systems
                     #:configuration-file kernel-config))
 
 ;; Avoid rebuilding kernel variants when there is a minor version bump.
-(define %linux-libre-version "4.8.10")
-(define %linux-libre-hash "04kwarmpz5adz64wwy0xpwzxsri7jrjkhbmjlwxsac69x9a26bkl")
+(define %linux-libre-version "4.8.15")
+(define %linux-libre-hash "0msgi44mh1ighfawysrzrljikwrapkvk418d6h0v45vj2i5rwln9")
 
 (define-public linux-libre-arm-generic
   (make-linux-libre %linux-libre-version
@@ -589,7 +594,7 @@ slabtop, and skill.")
 (define-public usbutils
   (package
     (name "usbutils")
-    (version "006")
+    (version "008")
     (source
      (origin
       (method url-fetch)
@@ -597,10 +602,11 @@ slabtop, and skill.")
                           "usbutils-" version ".tar.xz"))
       (sha256
        (base32
-        "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
+        "132clk14j4nm8crln2jymdbbc2vhzar2j2hnxyh05m79pbq1lx24"))))
     (build-system gnu-build-system)
     (inputs
-     `(("libusb" ,libusb)))
+     `(("libusb" ,libusb)
+       ("eudev" ,eudev)))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (home-page "http://www.linux-usb.org/")
@@ -860,14 +866,14 @@ MIDI functionality to the Linux-based operating system.")
 (define-public alsa-utils
   (package
     (name "alsa-utils")
-    (version "1.1.2")
+    (version "1.1.3")
     (source (origin
              (method url-fetch)
              (uri (string-append "ftp://ftp.alsa-project.org/pub/utils/"
                                  name "-" version ".tar.bz2"))
              (sha256
               (base32
-               "0wcha78c2sm8qqk5r3w83cvm8fp6fb1zpd35kmcm24kxhz007xks"))))
+               "0z0nnqp1707bm02dys2d16m88lsg5nd26bqaf14rl3za9sjifwhj"))))
     (build-system gnu-build-system)
     (arguments
      ;; XXX: Disable man page creation until we have DocBook.
@@ -886,7 +892,8 @@ MIDI functionality to the Linux-based operating system.")
              ;; Don't try to mkdir /var/lib/alsa.
              (substitute* "Makefile"
                (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
-                "true\n")))))))
+                "true\n"))
+             #t)))))
     (inputs
      `(("libsamplerate" ,libsamplerate)
        ("ncurses" ,ncurses)
@@ -903,6 +910,68 @@ MIDI functionality to the Linux-based operating system.")
     ;; GPLv2-only.
     (license license:gpl2)))
 
+(define-public alsa-plugins
+  (package
+    (name "alsa-plugins")
+    (version "1.1.1")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "ftp://ftp.alsa-project.org/pub/plugins/"
+                                 name "-" version ".tar.bz2"))
+             (sha256
+              (base32
+               "1w81z5jlwqhd1l2m7qrq69lc4k9dnrg1wn52jsl2hrf3hbhd394f"))))
+    (build-system gnu-build-system)
+    ;; TODO: Split libavcodec and speex if possible. It looks like they can not
+    ;; be split, there are references to both in files.
+    ;; TODO: Remove OSS related plugins, they add support to run native
+    ;; ALSA applications on OSS however we do not offer OSS and OSS is
+    ;; obsolete.
+    (outputs '("out" "pulseaudio"))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'split
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             ;; Distribute the binaries to the various outputs.
+             (let* ((out (assoc-ref outputs "out"))
+                    (pua (assoc-ref outputs "pulseaudio"))
+                    (pualib (string-append pua "/lib/alsa-lib"))
+                    (puaconf (string-append pua "/share/alsa/alsa.conf.d")))
+               (mkdir-p puaconf)
+               (mkdir-p pualib)
+               (chdir (string-append out "/share"))
+               (for-each (lambda (file)
+                           (rename-file file (string-append puaconf "/" (basename file))))
+                         (find-files out "\\.(conf|example)"))
+               (for-each (lambda (file)
+                           (rename-file file (string-append pualib "/" (basename file))))
+                         (find-files out ".*pulse\\.(la|so)"))
+               (chdir "..")
+               ;; We have moved the files to output pulsaudio, the
+               ;; directory is now empty.
+               (delete-file-recursively (string-append out "/share"))
+               #t))))))
+    (inputs
+     `(("alsa-lib" ,alsa-lib)
+       ("speex" ,speex) ; libspeexdsp resampling plugin
+       ("libsamplerate" ,libsamplerate) ; libsamplerate resampling plugin
+       ("ffmpeg" ,ffmpeg) ; libavcodec resampling plugin, a52 plugin
+       ("pulseaudio" ,pulseaudio))) ; PulseAudio plugin
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "http://www.alsa-project.org/")
+    (synopsis "Plugins for the Advanced Linux Sound Architecture (ALSA)")
+    (description
+     "The Advanced Linux Sound Architecture (ALSA) provides audio and
+MIDI functionality to the Linux-based operating system.  This package enhances ALSA
+by providing additional plugins which include: upmixing, downmixing, jackd and
+pulseaudio support for native alsa applications, format conversion (s16 to a52), and
+external rate conversion.")
+    (license (list license:gpl2+
+                   ;; `rate/rate_samplerate.c': LGPL v2.1 or later.
+                   license:lgpl2.1+))))
+
 (define-public iptables
   (package
     (name "iptables")
@@ -934,7 +1003,7 @@ packet filter.")
 (define-public iproute
   (package
     (name "iproute2")
-    (version "4.8.0")
+    (version "4.9.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -942,7 +1011,7 @@ packet filter.")
                     version ".tar.xz"))
               (sha256
                (base32
-                "12dk5hn1zlraqk2p0z8dv2xgsz0x9v8l3vcvf51fzj0v8b45j2d3"))))
+                "1i0n071hiqxw1gisngw2jln3kcp9sh47n6fj5hdwqrvp7w20zwy0"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f                                ; no test suite
@@ -970,7 +1039,7 @@ packet filter.")
        ("flex" ,flex)
        ("bison" ,bison)))
     (home-page
-     "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
+     "https://wiki.linuxfoundation.org/networking/iproute2")
     (synopsis
      "Utilities for controlling TCP/IP networking and traffic in Linux")
     (description
@@ -1208,7 +1277,7 @@ configuration and monitoring interfaces.")
 (define-public iw
   (package
     (name "iw")
-    (version "4.3")
+    (version "4.9")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1216,7 +1285,7 @@ configuration and monitoring interfaces.")
                     version ".tar.xz"))
               (sha256
                (base32
-                "085jyvrxzarvn5jl0fk618jjxy50nqx7ifngszc4jxk6a4ddibd6"))))
+                "1klpvv98bnx1zm6aqalnri2vd7w80scmdaxr2qnblb6mz82whk1j"))))
     (build-system gnu-build-system)
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs `(("libnl" ,libnl)))
@@ -1876,7 +1945,7 @@ compliance.")
 (define-public wireless-regdb
   (package
     (name "wireless-regdb")
-    (version "2016.05.02")
+    (version "2016.06.10")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1884,7 +1953,7 @@ compliance.")
                     "wireless-regdb-" version ".tar.xz"))
               (sha256
                (base32
-                "07n6gcwfbddz3awbdflv3dhxjszsqq2lrdwih0a0ahcliac4qry9"))
+                "1dxqy7a7zpzya30ff00s8k1qgrlndrwys99gc0r8yg0vab1z3vfg"))
 
               ;; We're building 'regulatory.bin' by ourselves.
               (snippet '(delete-file "regulatory.bin"))))
@@ -2157,7 +2226,7 @@ thanks to the use of namespaces.")
                             "CC=gcc"))
        #:phases (alist-delete 'configure %standard-phases)
        #:tests? #f))  ; no test suite
-    (home-page "http://sourceforge.net/projects/hdparm/")
+    (home-page "https://sourceforge.net/projects/hdparm/")
     (synopsis "Tune hard disk parameters for high performance")
     (description
      "Get/set device parameters for Linux SATA/IDE drives.  It's primary use
@@ -2223,7 +2292,7 @@ about ACPI devices.")
                (base32
                 "1vl7c6vc724v4jwki17czgj6lnrknnj1a6llm8gkl32i2gnam5j3"))))
     (build-system gnu-build-system)
-    (home-page "http://sourceforge.net/projects/acpid2/")
+    (home-page "https://sourceforge.net/projects/acpid2/")
     (synopsis "Daemon for delivering ACPI events to user-space programs")
     (description
      "acpid is designed to notify user-space programs of Advanced
@@ -2312,7 +2381,7 @@ capabilities of the Linux kernel.")
 (define-public libraw1394
   (package
     (name "libraw1394")
-    (version "2.1.0")
+    (version "2.1.2")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2320,7 +2389,7 @@ capabilities of the Linux kernel.")
                     name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0kwnf4ha45c04mhc4yla672aqmvqqihxix1gvblns5cd2pc2cc8b"))))
+                "0pm5b415j1qdzyw38wdv8h7ff4yx20831z1727mpsb6jc6bwdk03"))))
     (build-system gnu-build-system)
     (home-page "https://ieee1394.wiki.kernel.org/index.php/Main_Page")
     (synopsis "Interface library for the Linux IEEE1394 drivers")
@@ -2348,7 +2417,7 @@ protocol in question.")
      `(("pkg-config" ,pkg-config)))
     (propagated-inputs
      `(("libraw1394" ,libraw1394))) ; required by libavc1394.pc
-    (home-page "http://sourceforge.net/projects/libavc1394/")
+    (home-page "https://sourceforge.net/projects/libavc1394/")
     (synopsis "AV/C protocol library for IEEE 1394")
     (description
      "Libavc1394 is a programming interface to the AV/C specification from
@@ -2513,7 +2582,7 @@ Bluetooth audio output devices like headphones or loudspeakers.")
 (define-public bluez
   (package
     (name "bluez")
-    (version "5.40")
+    (version "5.43")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2521,7 +2590,7 @@ Bluetooth audio output devices like headphones or loudspeakers.")
                     version ".tar.xz"))
               (sha256
                (base32
-                "09ywk3lvgis0nbi0d5z8d4qp5r33lzwnd6bdakacmbsm420qpnns"))))
+                "05cdnpz0w2lwq2x5ba87q1h2wgb4lfnpbnbh6p7499hx59fw1j8n"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags
@@ -2573,55 +2642,21 @@ is flexible, efficient and uses a modular implementation.")
 (define-public fuse-exfat
   (package
     (name "fuse-exfat")
-    (version "1.1.0")
+    (version "1.2.5")
     (source (origin
               (method url-fetch)
-              (uri "https://docs.google.com/uc?export=download&\
-id=0B7CLI-REKbE3VTdaa0EzTkhYdU0")
+              (uri (string-append
+                    "https://github.com/relan/exfat/releases/download/v"
+                    version "/" name "-" version ".tar.gz"))
               (sha256
                (base32
-                "0glmgwrf0nv09am54i6s35ksbvrywrwc51w6q32mv5by8475530r"))
-              (file-name (string-append name "-" version ".tar.gz"))))
+                "1i0sh0s6wnm4dqxli3drva871wgbbm57qjf592vnswna9hc6bvim"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(("scons" ,scons)
-       ("pkg-config" ,pkg-config)))
+     `(("pkg-config" ,pkg-config)))
     (inputs
      `(("fuse" ,fuse)))
-    (arguments
-     '(#:tests? #f                                ;no test suite
-
-       ;; XXX: Factorize with 'exfat-utils'.
-       #:phases (modify-phases %standard-phases
-                  (delete 'configure)
-                  (add-after 'unpack 'scons-propagate-environment
-                             (lambda _
-                               ;; Modify the SConstruct file to arrange for
-                               ;; environment variables to be propagated.
-                               (substitute* "SConstruct"
-                                 (("^env = Environment\\(")
-                                  "env = Environment(ENV=os.environ, "))))
-                  (replace 'build
-                           (lambda _
-                             (zero? (system* "scons"))))
-                  (replace 'install
-                           (lambda* (#:key outputs #:allow-other-keys)
-                             (let* ((out  (assoc-ref outputs "out"))
-                                    (bin  (string-append out "/bin"))
-                                    (man8 (string-append out
-                                                         "/share/man/man8")))
-                               (mkdir-p bin)
-                               (mkdir-p man8)
-                               (for-each (lambda (file)
-                                           (copy-file
-                                            file
-                                            (string-append man8 "/"
-                                                           (basename file))))
-                                         (find-files "." "\\.8$"))
-                               (zero? (system* "scons" "install"
-                                               (string-append "DESTDIR="
-                                                              bin)))))))))
-    (home-page "http://code.google.com/p/exfat/")
+    (home-page "https://github.com/relan/exfat")
     (synopsis "Mount exFAT file systems")
     (description
      "This package provides a FUSE-based file system that provides read and
@@ -2674,7 +2709,7 @@ and copy/paste text in the console and in xterm.")
 (define-public btrfs-progs
   (package
     (name "btrfs-progs")
-    (version "4.8.4")
+    (version "4.9")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://kernel.org/linux/kernel/"
@@ -2682,7 +2717,7 @@ and copy/paste text in the console and in xterm.")
                                   "btrfs-progs-v" version ".tar.xz"))
               (sha256
                (base32
-                "1ib1ybpjhcymcycjiraz1vk01qlyvpwcg7mwfhmacdy3cvbfl9mz"))))
+                "18y88avadn4wb3xmczd6pfcjr7ik62dw4phk6fmkms2j8vmvl9z2"))))
     (build-system gnu-build-system)
     (outputs '("out"
                "static"))      ; static versions of binaries in "out" (~16MiB!)
@@ -2709,11 +2744,11 @@ and copy/paste text in the console and in xterm.")
     (native-inputs `(("pkg-config" ,pkg-config)
                      ("asciidoc" ,asciidoc)
                      ("xmlto" ,xmlto)
-                     ;; For building documentation
+                     ;; For building documentation.
                      ("libxml2" ,libxml2)
                      ("docbook-xml" ,docbook-xml)
                      ("docbook-xsl" ,docbook-xsl)
-                     ;; For tests
+                     ;; For tests.
                      ("which" ,which)))
     (home-page "https://btrfs.wiki.kernel.org/")
     (synopsis "Create and manage btrfs copy-on-write file systems")
@@ -2863,7 +2898,7 @@ The package provides additional NTFS tools.")
     (description
      "Monitor a hardware random number generator, and supply entropy
 from that to the system kernel's @file{/dev/random} machinery.")
-    (home-page "http://sourceforge.net/projects/gkernel")
+    (home-page "https://sourceforge.net/projects/gkernel")
     ;; The source package is offered under the GPL2+, but the files
     ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2.
     (license (list license:gpl2 license:gpl2+))))
@@ -3037,14 +3072,14 @@ the default @code{nsswitch} and the experimental @code{umich_ldap}.")
 (define-public mcelog
   (package
     (name "mcelog")
-    (version "144")
+    (version "146")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/"
                                   "mcelog.git/snapshot/v" version ".tar.gz"))
               (sha256
                (base32
-                "03jyhsl0s59sfqykj5p6gkb03k4w1h9ay31yxym1dnzis5sq99pa"))
+                "0jjx4q1mfa380319cqz86nw5wv6jnbpvq2r8n0dyh87mhvrgb4wi"))
               (file-name (string-append name "-" version ".tar.gz"))
               (modules '((guix build utils)))
               (snippet
diff --git a/gnu/packages/lirc.scm b/gnu/packages/lirc.scm
index b8fbeb61ba..d4c2d18ccc 100644
--- a/gnu/packages/lirc.scm
+++ b/gnu/packages/lirc.scm
@@ -134,5 +134,4 @@ on just one button press.")
                (lambda _
                  (zero? (system* "make" "py2")))))))
         (native-inputs
-         `(("python2-setuptools" ,python2-setuptools)
-           ("python2-cython" ,python2-cython))))))
+         `(("python2-cython" ,python2-cython))))))
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index ec0bdaaa53..e226443626 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch>
 ;;; Copyright © 2016 ng0 <ngillmann@runbox.com>
 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
+;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -207,24 +208,29 @@ supporting ASDF, Sockets, Gray streams, MOP, and other useful components.")
        ;; --build=<triplet>.
        #:build #f
        #:phases
-       (alist-cons-after
-        'unpack 'patch-sh-and-pwd
-        (lambda _
-          ;; The package is very messy with its references to "/bin/sh" and
-          ;; some other absolute paths to traditional tools.  These appear in
-          ;; many places where our automatic patching misses them.  Therefore
-          ;; we do the following, in this early (post-unpack) phase, to solve
-          ;; the problem from its root.
-          (substitute* (find-files "." "configure|Makefile")
-            (("/bin/sh") "sh"))
-          (substitute* '("src/clisp-link.in")
-            (("/bin/pwd") "pwd")))
-        (alist-cons-before
-         'build 'chdir-to-source
-         (lambda _
-           ;; We are supposed to call make under the src sub-directory.
-           (chdir "src"))
-         %standard-phases))
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-sh-and-pwd
+           (lambda _
+             ;; The package is very messy with its references to "/bin/sh" and
+             ;; some other absolute paths to traditional tools.  These appear in
+             ;; many places where our automatic patching misses them.  Therefore
+             ;; we do the following, in this early (post-unpack) phase, to solve
+             ;; the problem from its root.
+             (substitute* (find-files "." "configure|Makefile")
+               (("/bin/sh") "sh"))
+             (substitute* '("src/clisp-link.in")
+               (("/bin/pwd") "pwd"))
+             #t))
+         (add-after 'unpack 'remove-timestamps
+           (lambda _
+             (substitute* "src/constobj.d"
+               (("__DATE__ __TIME__") "\"1\""))
+             #t))
+         (add-before 'build 'chdir-to-source
+           (lambda _
+             ;; We are supposed to call make under the src sub-directory.
+             (chdir "src")
+             #t)))
        ;; Makefiles seem to have race conditions.
        #:parallel-build? #f))
     (home-page "http://www.clisp.org/")
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 96679bf97b..04a2b39af9 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014, 2016 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2017 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 Dennis Mungai <dmngaie@gmail.com>
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;;
@@ -60,7 +60,8 @@
      `(#:configure-flags '("-DCMAKE_SKIP_BUILD_RPATH=FALSE"
                            "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"
                            "-DBUILD_SHARED_LIBS:BOOL=TRUE"
-                           "-DLLVM_ENABLE_FFI:BOOL=TRUE")
+                           "-DLLVM_ENABLE_FFI:BOOL=TRUE"
+                           "-DLLVM_INSTALL_UTILS=ON") ; Needed for rustc.
 
        ;; Don't use '-g' during the build, to save space.
        #:build-type "Release"
@@ -282,6 +283,7 @@ code analysis tools.")
 
 (define-public llvm-for-extempore
   (package (inherit llvm-3.7)
+    (name "llvm-for-extempore")
     (source
      (origin
        (inherit (package-source llvm-3.7))
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index f95da3587d..65c335d373 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 doncatnip <gnopap@gmail.com>
 ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
+;;; Copyright © 2016 José Miguel Sánchez García <jmi2k@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27,6 +28,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
   #:use-module (gnu packages readline)
@@ -365,3 +367,37 @@ secure session between the peers.")
 based libraries.  It allows using GObject-based libraries directly from Lua.
 Notable examples are GTK+, GStreamer and Webkit.")
     (license license:expat)))
+
+(define-public lua-lpeg
+  (package
+    (name "lua-lpeg")
+    (version "1.0.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32 "13mz18s359wlkwm9d9iqlyyrrwjc6iqfpa99ai0icam2b3khl68h"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         ;; `make install` isn't available, so we have to do it manually
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (lua-version ,(version-major+minor (package-version lua))))
+               (install-file "lpeg.so"
+                             (string-append out "/lib/lua/" lua-version))
+               (install-file "re.lua"
+                             (string-append out "/share/lua/" lua-version))
+               #t))))
+       #:test-target "test"))
+    (inputs `(("lua", lua)))
+    (synopsis "Pattern-matching library for Lua")
+    (description
+     "LPeg is a pattern-matching library for Lua, based on Parsing Expression
+Grammars (PEGs).")
+    (home-page "http://www.inf.puc-rio.br/~roberto/lpeg")
+    (license license:expat)))
diff --git a/gnu/packages/lynx.scm b/gnu/packages/lynx.scm
index 6e4ed6cd13..b212dca388 100644
--- a/gnu/packages/lynx.scm
+++ b/gnu/packages/lynx.scm
@@ -34,7 +34,7 @@
 (define-public lynx
   (package
     (name "lynx")
-    (version "2.8.9dev.9")
+    (version "2.8.9dev.11")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -42,7 +42,7 @@
                     "/lynx" version ".tar.bz2"))
               (sha256
                (base32
-                "1m72ga89hywm097kazcm8w6sqrfjnl83gh31pkbhk4zhzhfpzxgh"))))
+                "1cqm1i7d209brkrpzaqqf2x951ra3l67dw8x9yg10vz7rpr9441a"))))
     (build-system gnu-build-system)
     (native-inputs `(("pkg-config" ,pkg-config)
                      ("perl" ,perl)))
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index c239c4f00f..8f1f8ee53b 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -479,6 +479,28 @@ geometric models.")
 single hidden layer, and for multinomial log-linear models.")
     (license (list license:gpl2+ license:gpl3+))))
 
+(define-public r-kernlab
+  (package
+    (name "r-kernlab")
+    (version "0.9-25")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "kernlab" version))
+       (sha256
+        (base32
+         "0qnaq9x3j2xc6jrmmd98wc6hkzch487s4p3a9lnc00xvahkhgpmr"))))
+    (build-system r-build-system)
+    (home-page "http://cran.r-project.org/web/packages/kernlab")
+    (synopsis "Kernel-based machine learning tools")
+    (description
+     "This package provides kernel-based machine learning methods for
+classification, regression, clustering, novelty detection, quantile regression
+and dimensionality reduction.  Among other methods @code{kernlab} includes
+Support Vector Machines, Spectral Clustering, Kernel PCA, Gaussian Processes
+and a QP solver.")
+    (license license:gpl2)))
+
 (define-public dlib
   (package
     (name "dlib")
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 9dcaea364c..70d9b4eee2 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -103,53 +103,54 @@
 (define-public mailutils
   (package
     (name "mailutils")
-    (version "3.0")
+    (version "3.1.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnu/mailutils/mailutils-"
                                  version ".tar.bz2"))
              (sha256
               (base32
-               "0h7cx4cd3niycx7pl0p2358cx2smwm5sb3l9bpb8czkdl6v115c8"))))
+               "1dpylyg79avi7brpkcmzaq7bqqkz45flp0ws6f2c8b1gyz4hdnzm"))))
     (build-system gnu-build-system)
     (arguments
-     '(;; TODO: Add `--with-sql'.
-       #:phases (alist-cons-before
-                 'build 'pre-build
-                 (lambda _
-                   ;; Use the right file name for `cat'.
-                   (substitute* "testsuite/lib/mailutils.exp"
-                     (("/bin/cat")
-                      (which "cat")))
-
-                   ;; Tests try to invoke 'maidag' such that it looks up the
-                   ;; 'root' user, which does not exist in the build
-                   ;; environment.
-                   (substitute* "maidag/tests/testsuite"
-                     (("root <")         "nobody <")
-                     (("spool/root")     "spool/nobody")
-                     (("root@localhost") "nobody@localhost"))
-
-                   ;; The 'pipeact.at' tests generate a shell script; make
-                   ;; sure it uses the right shell.
-                   (substitute* '("sieve/tests/testsuite"
-                                  "mh/tests/testsuite")
-                     (("#! /bin/sh")
-                      (string-append "#!" (which "sh"))))
-
-                   (substitute* "mh/tests/testsuite"
-                     (("moreproc: /bin/cat")
-                      (string-append "moreproc: " (which "cat"))))
-
-                   ;; XXX: The comsatd tests rely on being able to open
-                   ;; /dev/tty, but that gives ENODEV in the build
-                   ;; environment.  Thus, ignore test failures here.
-                   (substitute* "comsat/tests/Makefile.in"
-                     (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
-                      (string-append "-" all)))
-
-                   #t)
-                 %standard-phases)
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'pre-build
+           (lambda _
+             ;; Use the right file name for `cat'.
+             (substitute* "testsuite/lib/mailutils.exp"
+               (("/bin/cat")
+                (which "cat")))
+
+             ;; Tests try to invoke 'maidag' such that it looks up the
+             ;; 'root' user, which does not exist in the build
+             ;; environment.
+             (substitute* "maidag/tests/testsuite"
+               (("root <")         "nobody <")
+               (("spool/root")     "spool/nobody")
+               (("root@localhost") "nobody@localhost"))
+
+             ;; The 'pipeact.at' tests generate a shell script; make
+             ;; sure it uses the right shell.
+             (substitute* '("sieve/tests/testsuite"
+                            "mh/tests/testsuite")
+               (("#! /bin/sh")
+                (string-append "#!" (which "sh"))))
+
+             (substitute* "mh/tests/testsuite"
+               (("moreproc: /bin/cat")
+                (string-append "moreproc: " (which "cat"))))
+
+             ;; XXX: The comsatd tests rely on being able to open
+             ;; /dev/tty, but that gives ENODEV in the build
+             ;; environment.  Thus, ignore test failures here.
+             (substitute* "comsat/tests/Makefile.in"
+               (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
+                (string-append "-" all)))
+
+             #t)))
+       ;; TODO: Add `--with-sql'.
+       #:configure-flags '("--sysconfdir=/etc")
        #:parallel-tests? #f))
     (inputs
      `(("dejagnu" ,dejagnu)
@@ -158,15 +159,11 @@
        ("guile" ,guile-2.0)
        ("gnutls" ,gnutls)
        ("ncurses" ,ncurses)
-
-       ;; With Readline 6.3, examples/pop3client.c fails to build because it
-       ;; uses the now undefined 'CPPFunction' type.
-       ("readline" ,readline-6.2)
-
+       ("readline" ,readline)
        ("linux-pam" ,linux-pam)
        ("libltdl" ,libltdl)
        ("gdbm" ,gdbm)))
-    (home-page "http://www.gnu.org/software/mailutils/")
+    (home-page "https://www.gnu.org/software/mailutils/")
     (synopsis "Utilities and library for reading and serving mail")
     (description
      "GNU Mailutils is a collection of programs for managing, viewing and
@@ -214,14 +211,14 @@ aliasing facilities to work just as they would on normal mail.")
 (define-public mutt
   (package
     (name "mutt")
-    (version "1.7.1")
+    (version "1.7.2")
     (source (origin
              (method url-fetch)
              (uri (string-append "ftp://ftp.mutt.org/pub/mutt/mutt-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "1pyns0xw52s4yma1a93pdcl4dirs55q2m1hd7w1r11nlhf7giip9"))
+               "1yazrl82s9fxmamnlvwmsxhwrxnwv6kwakgfmawda8ndhwb50lqm"))
              (patches (search-patches "mutt-store-references.patch"))))
     (build-system gnu-build-system)
     (inputs
@@ -308,13 +305,14 @@ Extension (MIME).")
                 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:phases (alist-cons-before
-                 'check 'pre-check
-                 (lambda _
-                   (substitute* "src/tests/t.frame"
-                     (("GREP=/bin/grep")
-                      (string-append "GREP=" (which "grep") "\n"))))
-                 %standard-phases)))
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'pre-check
+           (lambda _
+             (substitute* "src/tests/t.frame"
+               (("GREP=/bin/grep")
+                (string-append "GREP=" (which "grep") "\n")))
+             #t)))))
     (native-inputs `(("flex" ,flex)))
     (inputs `(("bdb" ,bdb)))
     (home-page "http://bogofilter.sourceforge.net/")
@@ -329,7 +327,7 @@ and corrections.  It is based on a Bayesian filter.")
 (define-public offlineimap
   (package
     (name "offlineimap")
-    (version "7.0.9")
+    (version "7.0.12")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/OfflineIMAP/offlineimap/"
@@ -337,7 +335,7 @@ and corrections.  It is based on a Bayesian filter.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "04kapx0ddz7ccwhcjshkml2y916wcan3rl28mpmq25p4gywlkhxf"))))
+                "1m1lp7wxnra8k7lsqc8xlm5giy3i89wvmp35jjb1gf4yslpddnkz"))))
     (build-system python-build-system)
     (native-inputs
      `(("asciidoc" ,asciidoc)
@@ -382,24 +380,20 @@ repository and Maildir/IMAP as LOCAL repository.")
 (define-public mu
   (package
     (name "mu")
-    (version "0.9.16")
+    (version "0.9.18")
     (source (origin
               (method url-fetch)
-              (uri (string-append "https://github.com/djcb/mu/archive/v"
+              (uri (string-append "https://github.com/djcb/mu/releases/"
+                                  "download/" version "/mu-"
                                   version ".tar.gz"))
-              (file-name (string-append "mu-" version ".tar.gz"))
               (sha256
                (base32
-                "0p7hqri1r1x6750x138cc29mh81kdav2dcim26y58s8an206h25g"))))
+                "02g82zvxfgn17wzy846bfxj0izjj7yklhwdnhwxy1y2kin4fqnb5"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("glib" ,glib "bin")             ; for gtester
-       ("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("emacs" ,emacs-minimal)
-       ("libtool" ,libtool)
-       ("texinfo" ,texinfo)))
+       ("emacs" ,emacs-minimal)))
     ;; TODO: Add webkit and gtk to build the mug GUI.
     (inputs
      `(("xapian" ,xapian)
@@ -415,18 +409,15 @@ repository and Maildir/IMAP as LOCAL repository.")
                            (guix build emacs-utils))
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'patch-configure.ac
+         (add-after 'unpack 'patch-configure
            ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
            ;; so our Emacs package can't find it.  Setting "--with-lispdir"
            ;; configure flag doesn't help because "mu4e" will be added to
            ;; the lispdir anyway, so we have to modify "configure.ac".
            (lambda _
-             (substitute* "configure.ac"
-               (("^ +lispdir=.*") ""))
+             (substitute* "configure"
+               (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") ""))
              #t))
-         (add-after 'patch-configure.ac 'autoreconf
-           (lambda _
-             (zero? (system* "autoreconf" "-vi"))))
          (add-before 'check 'check-tz-setup
            (lambda* (#:key inputs #:allow-other-keys)
              ;; For mu/test/test-mu-query.c
@@ -453,7 +444,7 @@ attachments, create new maildirs, and so on.")
 (define-public alot
   (package
     (name "alot")
-    (version "0.3.7")
+    (version "0.4")
     (source (origin
               (method url-fetch)
               ;; package author intends on distributing via github rather
@@ -464,12 +455,12 @@ attachments, create new maildirs, and so on.")
               (file-name (string-append "alot-" version ".tar.gz"))
               (sha256
                (base32
-                "09md9llg38r6xby8l0y0zf8nhlh91cr4xs0r15b294hhp8hl2bgx"))))
+                "0sl1kl2fhkv208llnbny4blcvrfdk4vx6bcw5pnyh9ylwb0pipi2"))))
     (build-system python-build-system)
     (arguments
      `(#:tests? #f ; no tests
-       ;; python 3 is unsupported, more info:
-       ;; https://github.com/pazz/alot/blob/0.3.7/docs/source/faq.rst
+       ;; python 3 is currently unsupported, more info:
+       ;; https://github.com/pazz/alot/blob/master/docs/source/faq.rst
        #:python ,python-2))
     (inputs
      `(("python2-magic" ,python2-magic)
@@ -537,14 +528,14 @@ invoking @command{notifymuch} from the post-new hook.")
 (define-public notmuch
   (package
     (name "notmuch")
-    (version "0.23.2")
+    (version "0.23.4")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://notmuchmail.org/releases/notmuch-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1g4p5hsrqqbqk6s2w756als60wppvjgpyq104smy3w9vshl7bzgd"))))
+                "0fs5crf8v3jghc8jnm61cv7wxhclcg88hi5894d8fma9kkixcv8h"))))
     (build-system gnu-build-system)
     (arguments
      '(#:make-flags (list "V=1") ; Verbose test output.
@@ -568,11 +559,6 @@ invoking @command{notifymuch} from the post-new hook.")
                       ;; Patch various inline shell invocations.
                       (substitute* (find-files "test" "\\.sh$")
                         (("/bin/sh") (which "sh")))
-                      ;; XXX: Some signature verification tests fail with
-                      ;; gnupg-2.1.16, so we skip them. See this thread:
-                      ;; https://notmuchmail.org/pipermail/notmuch/2016/023688.html
-                      (setenv "NOTMUCH_SKIP_TESTS"
-                              "T350-crypto.2 T350-crypto.3 T350-crypto.4 T350-crypto.15")
                       #t)))))
     (native-inputs
      `(("bash-completion" ,bash-completion)
@@ -680,7 +666,7 @@ and search library.")
 (define-public getmail
   (package
     (name "getmail")
-    (version "4.49.0")
+    (version "4.52.0")
     (source
      (origin
        (method url-fetch)
@@ -688,7 +674,7 @@ and search library.")
                            name "-" version ".tar.gz"))
        (sha256
         (base32
-         "1m0yzxd05fklwbmjj1n2q4sx397c1j5qi9a0r5fv3h8pplz4lv0w"))))
+         "0pzplrlxwbxydvfw4kkwn60l40hk1h5sxawaa6pi0k75c220k4ni"))))
     (build-system python-build-system)
     (arguments
      `(#:tests? #f ; no tests
@@ -804,7 +790,7 @@ which can add many functionalities to the base client.")
 (define-public msmtp
   (package
     (name "msmtp")
-    (version "1.6.5")
+    (version "1.6.6")
     (source
      (origin
        (method url-fetch)
@@ -812,7 +798,7 @@ which can add many functionalities to the base client.")
                            "/msmtp-" version ".tar.xz"))
        (sha256
         (base32
-         "01jh9ba49bih8zsh40myw6qq1ll210q1vw0jg865vrn7jc3dd83n"))))
+         "0ppvww0sb09bnsrpqnvlrn8vx231r24xn2iiwpy020mxc8gxn5fs"))))
     (build-system gnu-build-system)
     (inputs
      `(("libidn" ,libidn)
@@ -850,7 +836,7 @@ delivery.")
 (define-public exim
   (package
     (name "exim")
-    (version "4.87")
+    (version "4.87.1")
     (source
      (origin
        (method url-fetch)
@@ -860,7 +846,7 @@ delivery.")
                                  version ".tar.bz2")))
        (sha256
         (base32
-         "1jbxn13shq90kpn0s73qpjnx5xm8jrpwhcwwgqw5s6sdzw6iwsbl"))))
+         "050m2gjzpc6vyik458h1j0vi8bxplkzjsyndkyd2y394i569kdyl"))))
     (build-system gnu-build-system)
     (inputs
      `(("bdb" ,bdb)
@@ -938,15 +924,15 @@ facilities for checking incoming mail.")
 (define-public dovecot
   (package
     (name "dovecot")
-    (version "2.2.25")
+    (version "2.2.27")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "http://www.dovecot.org/releases/"
+       (uri (string-append "https://www.dovecot.org/releases/"
                            (version-major+minor version) "/"
                            name "-" version ".tar.gz"))
        (sha256 (base32
-                "0rwn5wc5b8j9fzqcjggdgpzmb77myrf4ra294z1gg5v3hhng7nfq"))))
+                "1s8qvr6fa9d0n179kdwgpsi72zkvpbh9q57q8fr2fjysgjl94zw9"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -968,8 +954,17 @@ facilities for checking incoming mail.")
                                     "doc/example-config/Makefile.in")
                        (("pkgsysconfdir = .*")
                         "pkgsysconfdir = /tmp/etc"))
+                     #t))
+                  (add-after
+                   'unpack 'patch-other-shebangs
+                   (lambda _
+                     (substitute*
+                       "src/lib-program-client/test-program-client-local.c"
+                       (("/bin/echo") (which "echo"))
+                       (("/bin/cat") (which "cat"))
+                       (("/bin/false") (which "false")))
                      #t)))))
-    (home-page "http://www.dovecot.org")
+    (home-page "https://www.dovecot.org")
     (synopsis "Secure POP3/IMAP server")
     (description
      "Dovecot is a mail server whose major goals are security and reliability.
@@ -1027,7 +1022,7 @@ write simple, representation-independent mail handling code.")
 (define-public perl-email-address
   (package
     (name "perl-email-address")
-    (version "1.907")
+    (version "1.908")
     (source
      (origin
        (method url-fetch)
@@ -1035,7 +1030,7 @@ write simple, representation-independent mail handling code.")
                            "Email-Address-" version ".tar.gz"))
        (sha256
         (base32
-         "1ai4r149pzjv9dc2vddir8zylj0z1pii93rm4g591lx7avim71hx"))))
+         "0i6ljdvpy279hpbqf6lgv4figr376rb2sh4yphj86xkdzsyn1y75"))))
     (build-system perl-build-system)
     (home-page "http://search.cpan.org/dist/Email-Address")
     (synopsis "Email address parsing and creation")
@@ -1066,7 +1061,7 @@ objects found.  Alternatively you may construct objects manually.")
 (define-public perl-email-messageid
   (package
     (name "perl-email-messageid")
-    (version "1.405")
+    (version "1.406")
     (source
      (origin
        (method url-fetch)
@@ -1074,7 +1069,7 @@ objects found.  Alternatively you may construct objects manually.")
                            "Email-MessageID-" version ".tar.gz"))
        (sha256
         (base32
-         "09216naz21x99ff33wdm3j3zq1zhdbxhrsmx8bvavjrw3gjsvrq3"))))
+         "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
     (build-system perl-build-system)
     (home-page "http://search.cpan.org/dist/Email-MessageID")
     (synopsis "Generate world unique message-ids")
@@ -1085,7 +1080,7 @@ identify a message uniquely.")
 (define-public perl-email-mime
   (package
     (name "perl-email-mime")
-    (version "1.929")
+    (version "1.937")
     (source
      (origin
        (method url-fetch)
@@ -1093,7 +1088,7 @@ identify a message uniquely.")
                            "Email-MIME-" version ".tar.gz"))
        (sha256
         (base32
-         "1sf7dldg4dvicyw6dl1vx6s1gjq3fcppi0103ikl0vi6v5xjdjdh"))))
+         "0s50i3nxi9dr81p4rn017nrarc40yrwz0qcw34q8k3pvdf46fr9n"))))
     (build-system perl-build-system)
     (propagated-inputs
      `(("perl-email-address" ,perl-email-address)
@@ -1113,7 +1108,7 @@ message.  Headers are decoded from MIME encoding.")
 (define-public perl-email-mime-contenttype
   (package
     (name "perl-email-mime-contenttype")
-    (version "1.017")
+    (version "1.018")
     (source
      (origin
        (method url-fetch)
@@ -1121,7 +1116,7 @@ message.  Headers are decoded from MIME encoding.")
                            "Email-MIME-ContentType-" version ".tar.gz"))
        (sha256
         (base32
-         "1cl1l97lg690dh7i704hqi7yhxalq1chy7ylld5yc5v38jqa6gcn"))))
+         "1y8hpwm7p5a9y2azy0cgvlv2i2d0nj66ajfa0fj51wdq4w9cs23m"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-capture-tiny" ,perl-capture-tiny)))
@@ -1154,7 +1149,7 @@ header.")
 (define-public perl-email-sender
   (package
     (name "perl-email-sender")
-    (version "1.300016")
+    (version "1.300028")
     (source
      (origin
        (method url-fetch)
@@ -1162,7 +1157,7 @@ header.")
                            "Email-Sender-" version ".tar.gz"))
        (sha256
         (base32
-         "18x26fjh399q3s2g8dajb9r10633c46jrnbvycpnpclgnzhjs100"))))
+         "0c5dv1x9856nryj5mcbgb67a4irmadz80g0qnf4van3bd8wbj72a"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-capture-tiny" ,perl-capture-tiny)))
@@ -1186,7 +1181,7 @@ Email::Send library.")
 (define-public perl-email-simple
   (package
     (name "perl-email-simple")
-    (version "2.206")
+    (version "2.211")
     (source
      (origin
        (method url-fetch)
@@ -1194,7 +1189,7 @@ Email::Send library.")
                            "Email-Simple-" version ".tar.gz"))
        (sha256
         (base32
-         "19dpy3j5na2k9qw1jcpc8ia25038068r9j1bn34f9yyrisz7s522"))))
+         "1if4a2wh4iwlcycqrd2fhkx04ngmd75q444gh43w0r9p15ym5f8w"))))
     (build-system perl-build-system)
     (propagated-inputs
      `(("perl-email-date-format" ,perl-email-date-format)))
@@ -1256,7 +1251,7 @@ program's primary purpose.")
        ("libtool" ,libtool)))
     (inputs
      `(("libesmtp" ,libesmtp)))
-    (home-page "http://sourceforge.net/projects/esmtp/")
+    (home-page "https://sourceforge.net/projects/esmtp/")
     (synopsis "Relay-only mail transfer agent (MTA)")
     (description "Esmtp is a simple relay-only mail transfer agent built using
 libESMTP.  It sends e-mail via a remote SMTP server using credentials from the
@@ -1347,38 +1342,27 @@ maintained.")
 (define-public khard
   (package
     (name "khard")
-    (version "0.9.0")
+    (version "0.11.3")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri name version))
               (sha256
                (base32
-                "0y83rji4f270hbb41m4jpr0z3yzvpvbsl32mpg9d38hlydw8fk1s"))))
+                "1v66khq5w17xdbkpb00pf9xbl84dlzx4lq286fvzskb949b3y4yn"))))
     (build-system python-build-system)
     (arguments
-      `(#:python ,python-2 ; only python-2 is supported.
-        #:phases
+      `(#:phases
         (modify-phases %standard-phases
-          (add-before 'build 'disable-egg-compression
-            ;; Do not compress the egg.
-            (lambda _
-              (let ((port (open-file "setup.cfg" "a")))
-                (display "\n[easy_install]\nzip_ok = 0\n"
-                         port)
-                (close-port port)
-                #t)))
           (add-after 'install 'install-doc
             (lambda* (#:key outputs #:allow-other-keys)
               (let* ((out (assoc-ref outputs "out"))
                      (doc (string-append out "/share/doc/khard")))
                 (copy-recursively "misc/khard" doc)))))))
-    (native-inputs
-     `(("python2-setuptools" ,python2-setuptools)))
     (propagated-inputs
-     `(("python2-vobject" ,python2-vobject)
-       ("python2-pyyaml" ,python2-pyyaml)
-       ("python2-atomicwrites" ,python2-atomicwrites)
-       ("python2-configobj" ,python2-configobj)))
+     `(("python-vobject" ,python-vobject)
+       ("python-pyyaml" ,python-pyyaml)
+       ("python-atomicwrites" ,python-atomicwrites)
+       ("python-configobj" ,python-configobj)))
     (synopsis "Console address book using CardDAV")
     (description "Khard is an address book for the console.  It creates, reads,
 modifies and removes CardDAV address book entries at your local machine.  For
@@ -1744,7 +1728,7 @@ for OpenSMTPD to extend its functionality.")
     (build-system python-build-system)
     (arguments
      `(#:tests? #f)) ; Requires mailman running
-    (inputs
+    (propagated-inputs
      `(("python-six" ,python-six)
        ("python-httplib2" ,python-httplib2)))
     (home-page "https://launchpad.net/mailman.client")
@@ -1752,12 +1736,7 @@ for OpenSMTPD to extend its functionality.")
     (description
      "The mailmanclient library provides official Python bindings for
 the GNU Mailman 3 REST API.")
-    (properties `((python2-variant . ,(delay python2-mailmanclient))))
     (license lgpl3+)))
 
 (define-public python2-mailmanclient
-  (let ((base (package-with-python2
-               (strip-python2-variant python-mailmanclient))))
-    (package (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools))))))
+  (package-with-python2 python-mailmanclient))
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index fcd22ee68b..d2a559c084 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -32,6 +32,7 @@
   #:use-module (gnu packages guile)
   #:use-module (gnu packages bdw-gc)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages hurd)
   #:use-module (gnu packages multiprecision)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
@@ -332,7 +333,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
            #t))))
     (inputs `(("binutils" ,%binutils-static)))))
 
-(define %glibc-stripped
+(define (%glibc-stripped)
   ;; GNU libc's essential shared libraries, dynamic linker, and headers,
   ;; with all references to store directories stripped.  As a result,
   ;; libc.so is unusable and need to be patched for proper relocation.
@@ -341,52 +342,26 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
       (name "glibc-stripped")
       (build-system trivial-build-system)
       (arguments
-       `(#:modules ((guix build utils))
+       `(#:modules ((guix build utils)
+                    (guix build make-bootstrap))
          #:builder
          (begin
-           (use-modules (guix build utils))
-
-           (setvbuf (current-output-port) _IOLBF)
-           (let* ((out    (assoc-ref %outputs "out"))
-                  (libdir (string-append out "/lib"))
-                  (incdir (string-append out "/include"))
-                  (libc   (assoc-ref %build-inputs "libc"))
-                  (linux  (assoc-ref %build-inputs "kernel-headers")))
-             (mkdir-p libdir)
-             (for-each (lambda (file)
-                         (let ((target (string-append libdir "/"
-                                                      (basename file))))
-                           (copy-file file target)
-                           (remove-store-references target)))
-                       (find-files (string-append libc "/lib")
-                                   "^(crt.*|ld.*|lib(c|m|dl|rt|pthread|nsl|util).*\\.so(\\..*)?|libc_nonshared\\.a)$"))
-
-             (copy-recursively (string-append libc "/include") incdir)
-
-             ;; Copy some of the Linux-Libre headers that glibc headers
-             ;; refer to.
-             (mkdir (string-append incdir "/linux"))
-             (for-each (lambda (file)
-                         (copy-file (string-append linux "/include/linux/" file)
-                                    (string-append incdir "/linux/"
-                                                   (basename file))))
-                       '("limits.h" "errno.h" "socket.h" "kernel.h"
-                         "sysctl.h" "param.h" "ioctl.h" "types.h"
-                         "posix_types.h" "stddef.h"))
-
-             (copy-recursively (string-append linux "/include/asm")
-                               (string-append incdir "/asm"))
-             (copy-recursively (string-append linux "/include/asm-generic")
-                               (string-append incdir "/asm-generic"))
-
-             #t))))
-      (inputs `(("libc" ,(let ((target (%current-target-system)))
+           (use-modules (guix build make-bootstrap))
+           (make-stripped-libc (assoc-ref %outputs "out")
+                               (assoc-ref %build-inputs "libc")
+                               (assoc-ref %build-inputs "kernel-headers")))))
+      (inputs `(("kernel-headers"
+                 ,(if (or (and (%current-target-system)
+                               (hurd-triplet? (%current-target-system)))
+                          (string-suffix? "-hurd" (%current-system)))
+                      gnumach-headers
+                      linux-libre-headers))
+                ("libc" ,(let ((target (%current-target-system)))
                            (if target
                                (glibc-for-bootstrap
                                 (parameterize ((%current-target-system #f))
                                   (cross-libc target)))
-                               glibc)))
-                ("kernel-headers" ,linux-libre-headers)))
+                               glibc)))))
 
       ;; Only one output.
       (outputs '("out")))))
@@ -648,9 +623,9 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
   ;; A tarball with the statically-linked Binutils programs.
   (tarball-package %binutils-static-stripped))
 
-(define %glibc-bootstrap-tarball
+(define (%glibc-bootstrap-tarball)
   ;; A tarball with GNU libc's shared libraries, dynamic linker, and headers.
-  (tarball-package %glibc-stripped))
+  (tarball-package (%glibc-stripped)))
 
 (define %gcc-bootstrap-tarball
   ;; A tarball with a dynamic-linked GCC and its headers.
@@ -690,7 +665,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
     (inputs `(("guile-tarball" ,%guile-bootstrap-tarball)
               ("gcc-tarball" ,%gcc-bootstrap-tarball)
               ("binutils-tarball" ,%binutils-bootstrap-tarball)
-              ("glibc-tarball" ,%glibc-bootstrap-tarball)
+              ("glibc-tarball" ,(%glibc-bootstrap-tarball))
               ("coreutils&co-tarball" ,%bootstrap-binaries-tarball)))
     (synopsis "Tarballs containing all the bootstrap binaries")
     (description synopsis)
diff --git a/gnu/packages/man.scm b/gnu/packages/man.scm
index 2d99438420..69c560c1b0 100644
--- a/gnu/packages/man.scm
+++ b/gnu/packages/man.scm
@@ -134,7 +134,7 @@ the traditional flat-text whatis databases.")
 (define-public man-pages
   (package
     (name "man-pages")
-    (version "4.08")
+    (version "4.09")
     (source (origin
               (method url-fetch)
               (uri
@@ -147,7 +147,7 @@ the traditional flat-text whatis databases.")
                     "man-pages-" version ".tar.xz")))
               (sha256
                (base32
-                "1d32ki8nkwd2xiln619jihqn7s15ydrg7386n4hxq530sys7svic"))))
+                "1740gq9sq28dp5a5sjn1ya7cvrv8mbky6knb7734v8k29a7a0x55"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases (alist-delete 'configure %standard-phases)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index e432ed5c05..18b06e7765 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -227,14 +227,14 @@ semiconductors.")
 (define-public gsl
   (package
     (name "gsl")
-    (version "2.2.1")
+    (version "2.3")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/gsl/gsl-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "095hp01d8lkqdvv0p1k25kvbisgfdmvx1rzpyc2i8kl2n33kvlhk"))
+                "1yxdzqjwmi2aid650fa9zyr8llw069x7lm489wx9nnfdi6vh09an"))
               (patches (search-patches "gsl-test-i686.patch"))))
     (build-system gnu-build-system)
     (arguments
@@ -425,40 +425,35 @@ singular value problems.")
                                 "See LICENSE in the distribution."))))
 
 (define-public gnuplot
-  ;; Gnuplot version 5.0.4 was updated in-place, resulting in a hash mismatch.
-  ;; This can be removed at the next version update.
-  (let ((upstream-version "5.0.4")
-        (guix-revision "1"))
-    (package
-      (name "gnuplot")
-      (version (string-append upstream-version "-" guix-revision))
-      (source
-       (origin
-        (method url-fetch)
-        (uri (string-append "mirror://sourceforge/gnuplot/gnuplot/"
-                            upstream-version "/gnuplot-"
-                            upstream-version ".tar.gz"))
-        (sha256
-         (base32
-          "07n3w12dkcxjnhsvsliaqnkhajhi818v6q8mkpmpbplbf92vh70m"))))
-      (build-system gnu-build-system)
-      (inputs `(("readline" ,readline)
-                ("cairo" ,cairo)
-                ("pango" ,pango)
-                ("gd" ,gd)))
-      (native-inputs `(("pkg-config" ,pkg-config)
-                       ("texlive" ,texlive-minimal)))
-      (home-page "http://www.gnuplot.info")
-      (synopsis "Command-line driven graphing utility")
-      (description "Gnuplot is a portable command-line driven graphing
+  (package
+    (name "gnuplot")
+    (version "5.0.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/gnuplot/gnuplot/"
+                                  version "/gnuplot-"
+                                  version ".tar.gz"))
+       (sha256
+        (base32
+         "0lr065qdlgss8lmy31l7hkmnk9fp4lvqq9qgb1f1209f36zy1wr5"))))
+    (build-system gnu-build-system)
+    (inputs `(("readline" ,readline)
+              ("cairo" ,cairo)
+              ("pango" ,pango)
+              ("gd" ,gd)))
+    (native-inputs `(("pkg-config" ,pkg-config)
+                     ("texlive" ,texlive-minimal)))
+    (home-page "http://www.gnuplot.info")
+    (synopsis "Command-line driven graphing utility")
+    (description "Gnuplot is a portable command-line driven graphing
 utility.  It was originally created to allow scientists and students to
 visualize mathematical functions and data interactively, but has grown to
 support many non-interactive uses such as web scripting.  It is also used as a
 plotting engine by third-party applications like Octave.")
-      ;;  X11 Style with the additional restriction that derived works may only be
-      ;;  distributed as patches to the original.
-      (license (license:fsf-free
-                "http://gnuplot.cvs.sourceforge.net/gnuplot/gnuplot/Copyright")))))
+    ;;  X11 Style with the additional restriction that derived works may only be
+    ;;  distributed as patches to the original.
+    (license (license:fsf-free
+              "http://gnuplot.cvs.sourceforge.net/gnuplot/gnuplot/Copyright"))))
 
 (define-public gctp
   (package
@@ -549,15 +544,20 @@ incompatible with HDF5.")
 (define-public hdf5
   (package
     (name "hdf5")
-    (version "1.8.17")
+    (version "1.8.18")
     (source
      (origin
       (method url-fetch)
-      (uri (string-append "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-"
-                          version "/src/hdf5-"
-                          version ".tar.bz2"))
+      (uri (list (string-append "http://www.hdfgroup.org/ftp/HDF5/releases/"
+                                "hdf5-" version "/src/hdf5-"
+                                version ".tar.bz2")
+                 (string-append "https://support.hdfgroup.org/ftp/HDF5/"
+                                "current"
+                                (apply string-append
+                                       (take (string-split version #\.) 2))
+                                "/src/hdf5-" version ".tar.bz2")))
       (sha256
-       (base32 "0sj8x0gfs5fb28gipnynb9wpkz113h8wq9sva9mxx66kv27xsdgw"))
+       (base32 "13542vrnl1p35n8vbq0wzk40vddmm33q5nh04j98c7r1yjnxxih1"))
       (patches (list (search-patch "hdf5-config-date.patch")))))
     (build-system gnu-build-system)
     (inputs
@@ -709,7 +709,7 @@ HDF5 file is encoded according to the HDF File Format Specification.")
 (define-public netcdf
   (package
     (name "netcdf")
-    (version "4.4.0")
+    (version "4.4.1.1")
     (source
      (origin
        (method url-fetch)
@@ -717,18 +717,21 @@ HDF5 file is encoded according to the HDF File Format Specification.")
                            "netcdf-" version ".tar.gz"))
        (sha256
         (base32
-         "0y6gdcplarwqqnrav2xg1xd6ih732rzzbmdw78v3rl5b8mwcnh0d"))
-       (patches (list (search-patch "netcdf-config-date.patch")))))
+         "1blc7ik5yin7i0ls2kag0a9xjk12m0dzx6v1x88az3ras3scci2d"))
+       (patches (search-patches "netcdf-date-time.patch"
+                                "netcdf-tst_h_par.patch"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("m4" ,m4)
        ("doxygen" ,doxygen)
        ("graphviz" ,graphviz)))
     (inputs
-     `(("hdf5" ,hdf5)
-       ("zlib" ,zlib)))
+     `(("hdf4" ,hdf4-alt)
+       ("hdf5" ,hdf5)
+       ("zlib" ,zlib)
+       ("libjpeg" ,libjpeg)))
     (arguments
-     `(#:configure-flags '("--enable-doxygen" "--enable-dot")
+     `(#:configure-flags '("--enable-doxygen" "--enable-dot" "--enable-hdf4")
        #:parallel-tests? #f))           ;various race conditions
     (home-page "http://www.unidata.ucar.edu/software/netcdf/")
     (synopsis "Library for scientific data")
@@ -953,14 +956,14 @@ script files.")
 (define-public gmsh
   (package
     (name "gmsh")
-    (version "2.14.1")
+    (version "2.15.0")
     (source
      (origin
       (method url-fetch)
       (uri (string-append "http://gmsh.info/src/gmsh-"
                           version "-source.tgz"))
       (sha256
-       (base32 "1vsxp47j6srmy8kqb3p1z9pmlm42whhhz7r0vzpa2a86gga4zx17"))
+       (base32 "02h7fk4vv8qwnq3ymm409c5sp4nksd0m9h2vkxqmy42l0ic4nalr"))
       (modules '((guix build utils)))
       (snippet
        ;; Remove non-free METIS code
@@ -1851,7 +1854,7 @@ to BMP, JPEG or PNG image formats.")
 (define-public maxima
   (package
     (name "maxima")
-    (version "5.38.1")
+    (version "5.39.0")
     (source
      (origin
        (method url-fetch)
@@ -1859,7 +1862,7 @@ to BMP, JPEG or PNG image formats.")
                            version "-source/" name "-" version ".tar.gz"))
        (sha256
         (base32
-         "1p6646rvq43hk09msyp0dk50cqpkh07mf4x0bc2fqisqmcv6b1hf"))
+         "1cvignn5y6qzrby6qb885yc8zdcdqdr1d50vcvc3gapw2f0gk3zm"))
        (patches (search-patches "maxima-defsystem-mkdir.patch"))))
     (build-system gnu-build-system)
     (inputs
@@ -1931,7 +1934,7 @@ point numbers.")
 (define-public wxmaxima
   (package
     (name "wxmaxima")
-    (version "16.04.2")
+    (version "16.12.0")
     (source
      (origin
        (method url-fetch)
@@ -1939,7 +1942,7 @@ point numbers.")
                            version "/" name "-" version ".tar.gz"))
        (sha256
         (base32
-         "1fpqzk1921isiqrpgpf433ldq41924qs9sy99fl1zn5661b2l73n"))))
+         "01kas9viqabw5id6crbhz8ahjimmv78gqzizs5hgnj9kngrgrm1h"))))
     (build-system gnu-build-system)
     (inputs
      `(("wxwidgets" ,wxwidgets)
@@ -1989,14 +1992,14 @@ full text searching.")
 (define-public armadillo
   (package
     (name "armadillo")
-    (version "7.500.0")
+    (version "7.600.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/arma/armadillo-"
                                   version ".tar.xz"))
               (sha256
                (base32
-                "1x98d32cgxbzbbma2ak6c37wnbpq13xxyxyd6jjvflv748mzi9ks"))))
+                "0bac9y46m61zxinj51l82w06v01ra9vw7a9j6rrwdjhznkkdb437"))))
     (build-system cmake-build-system)
     (arguments `(#:tests? #f)) ;no test target
     (inputs
@@ -2017,14 +2020,14 @@ associated functions (eg. contiguous and non-contiguous submatrix views).")
 
 (define-public armadillo-for-rcpparmadillo
   (package (inherit armadillo)
-    (version "7.500.0")
+    (version "7.600.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/arma/armadillo-"
                                   version ".tar.xz"))
               (sha256
                (base32
-                "1x98d32cgxbzbbma2ak6c37wnbpq13xxyxyd6jjvflv748mzi9ks"))))))
+                "1dxgfd2r9lbh24nszvqm2lag439s0srxaf1l86f6ww6waqm5r8zk"))))))
 
 (define-public muparser
   ;; When switching download sites, muparser re-issued a 2.2.5 release with a
diff --git a/gnu/packages/mc.scm b/gnu/packages/mc.scm
index 43dab8ff41..3cdc542157 100644
--- a/gnu/packages/mc.scm
+++ b/gnu/packages/mc.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 ng0 <ng0@libertad.pw>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -53,7 +54,18 @@
               ("check" ,check)))
     (arguments
      `(#:configure-flags
-       '("--with-screen=ncurses" "--enable-aspell")))
+       '("--with-screen=ncurses" "--enable-aspell")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'patch-source-shebangs 'fix-absolutism
+           (lambda _
+             ;; Modify files that contain absolute file names.
+             (substitute* "misc/mcedit.menu.in"
+               (("#! /bin/sh") (string-append "#!" (which "sh")))
+               (("/bin/bash") (which "bash")))
+             (substitute* "misc/ext.d/misc.sh.in"
+               (("/bin/cat") "cat"))
+             #t)))))
     (home-page "http://www.midnight-commander.org")
     (synopsis "Graphical file manager")
     (description
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 8660915bb0..95c265b987 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -34,6 +34,7 @@
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system python)
   #:use-module (guix build-system perl)
+  #:use-module (guix build-system cmake)
   #:use-module (gnu packages)
   #:use-module (gnu packages aidc)
   #:use-module (gnu packages autotools)
@@ -399,14 +400,14 @@ compromised.")
 (define-public znc
   (package
     (name "znc")
-    (version "1.6.3")
+    (version "1.6.4")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://znc.in/releases/archive/znc-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "09xqi5fs40x6nj9gq99bnw1a7saq96bvqxknxx0ilq7yfvg4c733"))))
+                "070d6b1i3jy66m4ci4ypxkg4pbwqbzbzss1y1ycgq2w62zmrf423"))))
     (build-system gnu-build-system)
     (arguments
      '(#:tests? #f ; tries to download GoogleTest with wget
@@ -622,49 +623,98 @@ protocols.")
       (license license:gpl3+)
       (home-page "https://tox.chat"))))
 
+;; Some tox clients move to c-toxcore, which seems to be where all the
+;; recent development happens. It is run by the same developers as toxcore,
+;; forked into a group namespace.
+(define-public c-toxcore
+  (package
+    (name "c-toxcore")
+    (version "0.1.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/TokTok/c-toxcore/archive/v"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0dybpz44pi0zm8djppjna0r8yh5wvl3l885dv2f1wp5366bk59n3"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("check" ,check)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("libsodium" ,libsodium)
+       ("opus" ,opus)
+       ("libvpx" ,libvpx)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'autoconf
+           ;; The tarball source is not bootstrapped.
+           (lambda _
+             (zero? (system* "autoreconf" "-vfi")))))
+       #:tests? #f)) ; FIXME: Testsuite fails, needs internet connection.
+    (synopsis "Library for the Tox encrypted messenger protocol")
+    (description
+     "Official fork of the C library implementation of the Tox
+encrypted messenger protocol.")
+    (license license:gpl3+)
+    (home-page "https://tox.chat")))
+
 (define-public utox
   (package
    (name "utox")
-   (version "0.9.8")
+   (version "0.11.0")
    (source
     (origin
      (method url-fetch)
-     (uri (string-append "https://github.com/GrayHatter/uTox/archive/v"
+     (uri (string-append "https://github.com/uTox/uTox/archive/v"
                          version ".tar.gz"))
      (file-name (string-append name "-" version ".tar.gz"))
      (sha256
       (base32
-       "13hfqbwzcgvfbvf9yjm62aqsvxnpqppb50c88sys43m7022yqcsy"))))
-   (build-system gnu-build-system)
+       "15s4iwjk1s0kihjqn0f07c9618clbphpr827mds3xddkiwnjz37v"))))
+   (build-system cmake-build-system)
    (arguments
-    '(#:make-flags (list (string-append "PREFIX=" %output)
-                         "CC=gcc")
-      #:tests? #f ; No tests
+    '(#:tests? #f ; No test phase.
       #:phases
       (modify-phases %standard-phases
-        ;; No configure script
-        (delete 'configure))))
+        (add-after 'unpack 'fix-freetype-include
+          (lambda _
+            (substitute* "CMakeLists.txt"
+              (("/usr/include/freetype2")
+               (string-append (assoc-ref %build-inputs "freetype")
+                              "/include/freetype2")))))
+        (add-before 'install 'patch-cmake-find-utox
+          (lambda _
+            (substitute* "../build/cmake_install.cmake"
+              (("/uTox-0.11.0/utox")
+               "/build/utox")))))))
    (inputs
+    ;; TODO: Fix the file chooser dialog; which input does it need?
     `(("dbus" ,dbus)
       ("filteraudio" ,filteraudio)
       ("fontconfig" ,fontconfig)
       ("freetype" ,freetype)
       ("libsodium" ,libsodium)
-      ("libtoxcore" ,libtoxcore)
+      ("c-toxcore" ,c-toxcore)
       ("libvpx" ,libvpx)
       ("libx11" ,libx11)
       ("libxext" ,libxext)
       ("libxrender" ,libxrender)
       ("openal" ,openal)
       ("v4l-utils" ,v4l-utils)))
-   (native-inputs
-    `(("pkg-config" ,pkg-config)))
    (synopsis "Lightweight Tox client")
-   (description "A  lightweight Tox client.  Tox is a distributed and secure
+   (description
+    "Utox is a lightweight Tox client.  Tox is a distributed and secure
 instant messenger with audio and video chat capabilities.")
    (home-page "http://utox.org/")
    (license license:gpl3)))
- 
+
 (define-public qtox
   (package
     (name "qtox")
diff --git a/gnu/packages/mingw.scm b/gnu/packages/mingw.scm
new file mode 100644
index 0000000000..6a348da611
--- /dev/null
+++ b/gnu/packages/mingw.scm
@@ -0,0 +1,84 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@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/>.
+
+(define-module (gnu packages mingw)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages cross-base)
+  #:use-module (gnu packages gcc)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages multiprecision)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix utils)
+  #:use-module (ice-9 match))
+
+(define %mingw-triplet
+  "i686-w64-mingw32")
+
+(define-public mingw-w64
+  (package
+    (name "mingw-w64")
+    (version "5.0-rc2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://sourceforge.net/projects/mingw-w64/files/mingw-w64/"
+                    "mingw-w64-release/mingw-w64-v" version ".tar.bz2"))
+              (sha256
+               (base32 "0imdary8j07if8ih73pfgxiclpf2ax8h3mz8mxln07i8sbbd30c9"))
+              (patches (search-patches "mingw-w64-5.0rc2-gcc-4.9.3.patch"))))
+    (native-inputs `(("xgcc-core" ,(cross-gcc %mingw-triplet))
+                     ("xbinutils" ,(cross-binutils %mingw-triplet))))
+    (build-system gnu-build-system)
+    (search-paths
+     (list (search-path-specification
+            (variable "CROSS_C_INCLUDE_PATH")
+            (files '("include" "i686-w64-mingw32/include")))
+           (search-path-specification
+            (variable "CROSS_LIBRARY_PATH")
+            (files
+             '("lib" "lib64" "i686-w64-mingw32/lib" "i686-w64-mingw32/lib64")))))
+    (arguments
+     `(#:configure-flags '("--host=i686-w64-mingw32")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'setenv
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((xgcc-core (assoc-ref inputs "xgcc-core"))
+                   (mingw-headers (string-append (getcwd) "/mingw-w64-headers")))
+               (setenv "CPP"
+                       (string-append xgcc-core "/bin/i686-w64-mingw32-cpp"))
+               (setenv "CROSS_C_INCLUDE_PATH"
+                       (string-append
+                        mingw-headers
+                        ":" mingw-headers "/include"
+                        ":" mingw-headers "/crt"
+                        ":" mingw-headers "/defaults/include"
+                        ":" mingw-headers "/direct-x/include"))))))
+       #:make-flags (list "DEFS=-DHAVE_CONFIG_H -D__MINGW_HAS_DXSDK=1")
+       #:tests? #f ; compiles and includes glibc headers
+       #:strip-binaries? #f))
+    (home-page "http://mingw.org")
+    (synopsis "Minimalist GNU for Windows")
+    (description "MinGW provides a complete Open Source programming tool set
+which is suitable for the development of native MS-Windows applications, and
+which does not depend on any 3rd-party C-Runtime dlls.")
+    (license license:fdl1.3+)))
diff --git a/gnu/packages/monitoring.scm b/gnu/packages/monitoring.scm
new file mode 100644
index 0000000000..ac80a6bb9d
--- /dev/null
+++ b/gnu/packages/monitoring.scm
@@ -0,0 +1,125 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 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/>.
+
+(define-module (gnu packages monitoring)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix build-system perl)
+  #:use-module (guix build-system gnu)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages gd)
+  #:use-module (gnu packages image)
+  #:use-module (gnu packages mail)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages zip))
+
+(define-public nagios
+  (package
+    (name "nagios")
+    (version "4.2.4")
+    ;; XXX: Nagios 4.2.x and later bundle a copy of AngularJS.
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://sourceforge/nagios/nagios-4.x/nagios-"
+                    version "/nagios-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0w0blbwiw0ps04b7gkyyk89qkgwsxh6gydhmggbm1kl3ar3mq1dh"))
+              (modules '((guix build utils)))
+              (snippet
+               ;; Ensure reproducibility.
+               '(substitute* (find-files "cgi" "\\.c$")
+                  (("__DATE__") "\"1970-01-01\"")
+                  (("__TIME__") "\"00:00:00\"")))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("unzip" ,unzip)))
+    (inputs
+     `(("zlib" ,zlib)
+       ("libpng-apng" ,libpng)
+       ("gd" ,gd)
+       ("perl" ,perl)
+       ("mailutils" ,mailutils)))
+    (arguments
+     '(#:configure-flags (list "--sysconfdir=/etc"
+
+                               ;; 'include/locations.h.in' defines file
+                               ;; locations, and many things go directly under
+                               ;; LOCALSTATEDIR, hence the extra '/nagios'.
+                               "--localstatedir=/var/nagios"
+
+                               (string-append
+                                "--with-mail="
+                                (assoc-ref %build-inputs "mailutils")
+                                "/bin/mail"))
+       #:make-flags '("all")
+       #:phases (modify-phases %standard-phases
+                  (add-before 'build 'do-not-chown-to-nagios
+                    (lambda _
+                      ;; Makefiles do 'install -o nagios -g nagios', which
+                      ;; doesn't work for us.
+                      (substitute* (find-files "." "^Makefile$")
+                        (("-o nagios -g nagios")
+                         ""))
+                      #t))
+                  (add-before 'build 'do-not-create-sysconfdir
+                    (lambda _
+                      ;; Don't try to create /var upon 'make install'.
+                      (substitute* "Makefile"
+                        (("\\$\\(INSTALL\\).*\\$\\(LOGDIR\\).*$" all)
+                         (string-append "# " all))
+                        (("\\$\\(INSTALL\\).*\\$\\(CHECKRESULTDIR\\).*$" all)
+                         (string-append "# " all))
+                        (("chmod g\\+s.*" all)
+                         (string-append "# " all)))
+                      #t))
+                  (add-before 'build 'set-html/php-directory
+                    (lambda _
+                      ;; Install HTML and PHP files under 'share/nagios/html'
+                      ;; instead of just 'share/'.
+                      (substitute* '("html/Makefile" "Makefile")
+                        (("HTMLDIR=.*$")
+                         "HTMLDIR = $(datarootdir)/nagios/html\n"))
+                      #t)))
+       #:tests? #f))                             ;no 'check' target or similar
+    (home-page "https://www.nagios.org/")
+    (synopsis "Host, service, and network monitoring program")
+    (description
+     "Nagios is a host, service, and network monitoring program written in C.
+CGI programs are included to allow you to view the current status, history,
+etc. via a Web interface.  Features include:
+
+@itemize
+@item Monitoring of network services (via SMTP, POP3, HTTP, PING, etc).
+@item Monitoring of host resources (processor load, disk usage, etc.).
+@item A plugin interface to allow for user-developed service monitoring
+  methods.
+@item Ability to define network host hierarchy using \"parent\" hosts,
+  allowing detection of and distinction between hosts that are down
+  and those that are unreachable.
+@item Notifications when problems occur and get resolved (via email,
+  pager, or user-defined method).
+@item Ability to define event handlers for proactive problem resolution.
+@item Automatic log file rotation/archiving.
+@item Optional web interface for viewing current network status,
+  notification and problem history, log file, etc.
+@end itemize\n")
+    (license license:gpl2)))
diff --git a/gnu/packages/moreutils.scm b/gnu/packages/moreutils.scm
index 79ab9bbc9a..965876b971 100644
--- a/gnu/packages/moreutils.scm
+++ b/gnu/packages/moreutils.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29,43 +30,42 @@
 (define-public moreutils
   (package
     (name "moreutils")
-    (version "0.58")
-    (source (origin
-              (method url-fetch)
-              (uri (list
-                     (string-append
-                       "mirror://debian/pool/main/m/moreutils/moreutils_"
-                       version ".orig.tar.gz")
-                     ;; The main Debian mirrors only hold the current packages
-                     (string-append
-                       "http://snapshot.debian.org/archive/debian/20160304T165744Z"
-                       "/pool/main/m/moreutils/moreutils_0.58.orig.tar.gz")))
-              (sha256
-               (base32
-                "02n00vqp6jxbxr5v3rdjxmzp6kxxjdkjgcclam6wrw8qamsbljww"))))
+    (version "0.59")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (list
+             (string-append
+              "mirror://debian/pool/main/m/moreutils/moreutils_"
+              version ".orig.tar.gz")
+             ;; The main Debian mirrors only hold the current packages.
+             (string-append
+              "http://snapshot.debian.org/archive/debian/20161223T212806Z"
+              "/pool/main/m/moreutils/moreutils_0.59.orig.tar.gz")))
+       (sha256
+        (base32
+         "1d6ik3j4lwp90vb93p7yv60k6vk2chz448d1z9xrmxvv371i33m4"))))
     (build-system gnu-build-system)
-    (inputs `(("perl" ,perl)
-              ("libxml2" ,libxml2)
-              ("libxslt" ,libxslt)
-              ("docbook-xml" ,docbook-xml-4.4)
-              ("docbook-xsl" ,docbook-xsl)))
+    ;; For building the manual pages.
+    (native-inputs
+     `(("docbook-xml" ,docbook-xml-4.4)
+       ("docbook-xsl" ,docbook-xsl)
+       ("libxml2" ,libxml2)
+       ("libxslt" ,libxslt)))
+    (inputs
+     `(("perl" ,perl)))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (replace 'configure
-           (lambda* (#:key inputs #:allow-other-keys)
-             (use-modules (srfi srfi-1))
-             (substitute* "Makefile"
-               (("/usr/share/xml/.*/docbook.xsl")
-                (let* ((docbook-xsl (assoc-ref inputs "docbook-xsl"))
-                       (files (find-files docbook-xsl "^docbook\\.xsl$")))
-                  (find (lambda (file)
-                          (string-suffix? "/manpages/docbook.xsl" file))
-                        files)))))))
+         (delete 'configure))           ; no configure script
        #:make-flags
        (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+             (string-append "DOCBOOKXSL="
+                            (assoc-ref %build-inputs "docbook-xsl") "/xml/xsl/"
+                            ,(package-name docbook-xsl) "-"
+                            ,(package-version docbook-xsl))
              "CC=gcc")))
-    (home-page "http://joeyh.name/code/moreutils/")
+    (home-page "https://joeyh.name/code/moreutils/")
     (synopsis "Miscellaneous general-purpose command-line tools")
     (description
      "Moreutils is a collection of general-purpose command-line tools to
diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index 7f0099ee6d..4f799bd200 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -145,14 +145,14 @@ a highly stable and efficient implementation.")
 (define-public taglib
   (package
     (name "taglib")
-    (version "1.9.1")
+    (version "1.10")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://taglib.github.io/releases/taglib-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "06n7gnbcqa3r6c9gv00y0y1r48dyyazm6yj403i7ma0r2k6p3lvj"))))
+                "1alv6vp72p0x9i9yscmz2a71anjwqy53y9pbcbqxvc1c0i82vhr4"))))
     (build-system cmake-build-system)
     (arguments '(#:tests? #f))                    ;no 'test' target
     (inputs `(("zlib" ,zlib)))
@@ -392,7 +392,7 @@ Ogg, MP3, or FLAC formats.  Its goal is to be easy to use, requiring only
 a few mouse clicks to convert an entire album.  It supports CDDB lookups
 for album and track information.")
    (license license:gpl2)
-   (home-page "http://sourceforge.net/projects/ripperx/")))
+   (home-page "https://sourceforge.net/projects/ripperx/")))
 
 (define-public libmpcdec
   (package
@@ -471,8 +471,7 @@ compression format (.mpc files).")
     (arguments
      `(#:python ,python-2))
     (native-inputs
-     `(("python2-setuptools" ,python2-setuptools)
-       ("python2-nose" ,python2-nose)
+     `(("python2-nose" ,python2-nose)
        ("python2-sphinx" ,python2-sphinx)
        ("python2-coverage" ,python2-coverage)))
     (synopsis "MP3 tag ID3 metadata editor")
diff --git a/gnu/packages/mpd.scm b/gnu/packages/mpd.scm
index d3da5f5daa..5231c3f7f7 100644
--- a/gnu/packages/mpd.scm
+++ b/gnu/packages/mpd.scm
@@ -74,7 +74,7 @@ interfacing MPD in the C, C++ & Objective C languages.")
 (define-public mpd
   (package
     (name "mpd")
-    (version "0.19.19")
+    (version "0.19.21")
     (source (origin
               (method url-fetch)
               (uri
@@ -83,8 +83,19 @@ interfacing MPD in the C, C++ & Objective C languages.")
                               "/mpd-" version ".tar.xz"))
               (sha256
                (base32
-                "07af1m2lgblyiq0gcs26zv8n22wrhrpmf49xsm338h1n87d6r1dw"))))
+                "0c0p61p3jfh89pnqwd9nrw55krfvvnzhkpdq53g6njvg0aybh1c3"))))
     (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'install-service-files
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (systemd (string-append out "/etc/systemd/system"))
+                    (systemd-user (string-append out "/etc/systemd/user")))
+               (install-file "systemd/system/mpd.service" systemd)
+               (install-file "systemd/user/mpd.service" systemd-user)
+               #t))))))
     (inputs `(("ao" ,ao)
               ("alsa-lib" ,alsa-lib)
               ("avahi" ,avahi)
@@ -257,15 +268,10 @@ information about tracks being played to a scrobbler, such as Libre.FM.")
     (synopsis "Python MPD client library")
     (description "Python-mpd2 is a Python library which provides a client
 interface for the Music Player Daemon.")
-    (license license:lgpl3+)
-    (properties `((python2-variant . ,(delay python2-mpd2))))))
+    (license license:lgpl3+)))
 
 (define-public python2-mpd2
-  (let ((mpd2 (package-with-python2
-               (strip-python2-variant python-mpd2))))
-    (package (inherit mpd2)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs mpd2))))))
+  (package-with-python2 python-mpd2))
 
 (define-public sonata
   (package
diff --git a/gnu/packages/mtools.scm b/gnu/packages/mtools.scm
index a95b8ef5e9..34bcb5d803 100644
--- a/gnu/packages/mtools.scm
+++ b/gnu/packages/mtools.scm
@@ -21,8 +21,7 @@
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module (guix build-system gnu)
-  #:use-module (gnu packages python))
+  #:use-module (guix build-system gnu))
 
 (define-public mtools
   (package
@@ -49,7 +48,7 @@ FAT-specific file attributes.")
 (define-public exfat-utils
   (package
     (name "exfat-utils")
-    (version "1.2.4")
+    (version "1.2.5")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -57,7 +56,7 @@ FAT-specific file attributes.")
                     version "/" name "-" version ".tar.gz"))
               (sha256
                (base32
-                "04dvrdmwmj9ggad8aq6inbjcq2yi9i62z42nnivhk7bb84k1k9ba"))))
+                "1qhvjd6dmzhxjdnm4cklajbr03wsjjvkxrsjij517a33napcl93s"))))
     (build-system gnu-build-system)
     (home-page "https://github.com/relan/exfat")
     (synopsis "Utilities to manipulate exFAT file systems")
diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm
index 80fb11ac93..b6d2d7f4af 100644
--- a/gnu/packages/multiprecision.scm
+++ b/gnu/packages/multiprecision.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -49,7 +50,13 @@
                 '(;; Build a "fat binary", with routines for several
                   ;; sub-architectures.
                   "--enable-fat"
-                  "--enable-cxx")))
+                  "--enable-cxx"
+                  ,@(cond ((target-mingw?)
+                           ;; Static and shared cannot be built in one go:
+                           ;; they produce different headers.  We need shared.
+                           `("--disable-static"
+                             "--enable-shared"))
+                          (else '())))))
    (synopsis "Multiple-precision arithmetic library")
    (description
     "GMP is a library for arbitrary precision arithmetic, operating on
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 78ca558b2d..59fd508f62 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -231,6 +231,85 @@ score, keyboard, guitar, drum and controller views.")
 many input formats and provides a customisable Vi-style user interface.")
      (license license:gpl2+)))
 
+(define-public denemo
+  (package
+    (name "denemo")
+    (version "2.0.14")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/denemo/denemo-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1a7g38695g7jjypx25qp0dx0asrh72xwdj0mdhmb9pfyzlppq0wh"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           ;; Denemo's documentation says to use this command to run its
+           ;; testsuite.
+           (lambda _
+             (zero? (system* "make" "-C" "tests" "check"))))
+         (add-before 'build 'set-lilypond
+           ;; This phase sets the default path for lilypond to its current
+           ;; location in the store.
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((lilypond (string-append (assoc-ref inputs "lilypond")
+                                             "/bin/lilypond")))
+               (substitute* "src/core/prefops.c"
+                 (("g_string_new \\(\"lilypond\"\\);")
+                  (string-append "g_string_new (\""
+                                 lilypond
+                                 "\");"))))
+             #t))
+         (add-after 'install 'correct-filename
+           ;; "graft-derivation/shallow" from the (guix grafts) module runs in
+           ;; the C locale, expecting file names to be ASCII encoded. This
+           ;; phase renames a filename with a Unicode character in it to meet
+           ;; the aforementioned condition.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out")))
+               (chdir (string-append
+                       out
+                       "/share/denemo/templates/instruments/woodwind"))
+               (rename-file "Clarinet in B♭.denemo"
+                            "Clarinet in Bb.denemo"))
+             #t)))))
+    (native-inputs
+     `(("glib:bin", glib "bin")   ; for gtester
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("alsa-lib" ,alsa-lib)
+       ("aubio" ,aubio)
+       ("evince" ,evince)
+       ("fftw" ,fftw)
+       ("fluidsynth" ,fluidsynth)
+       ("glib" ,glib)
+       ("gtk+" ,gtk+)
+       ("gtk-doc" ,gtk-doc)
+       ("gtksourceview" ,gtksourceview)
+       ("guile" ,guile-2.0)
+       ("intltool" ,intltool)
+       ("librsvg" ,librsvg)
+       ("libsndfile" ,libsndfile)
+       ("libtool" ,libtool)
+       ("libxml2" ,libxml2)
+       ("lilypond", lilypond)
+       ("portaudio" ,portaudio)
+       ("portmidi" ,portmidi)
+       ("rubberband" ,rubberband)))
+    (synopsis "Graphical music notation, front-end to GNU Lilypond")
+    (description
+     "GNU Denemo is a music notation editor that provides a convenient
+interface to the powerful music engraving program Lilypond.  Music can be
+typed in using the computer keyboard, played in using a MIDI keyboard, or
+even input via a microphone connected to the sound card.  The final product
+is publication-quality music notation that is continuously generated in the
+background while you work.")
+    (home-page "http://www.denemo.org")
+    (license license:gpl3+)))
+
 (define-public hydrogen
   (package
     (name "hydrogen")
@@ -588,11 +667,12 @@ Guile.")
 
 (define-public non-sequencer
   ;; The latest tagged release is three years old and uses a custom build
-  ;; system, so we take the last commit affecting the "sequencer" directory.
-  (let ((commit "1d9bd576f6bf7ea240af5f7a60260592750af0dd"))
+  ;; system, so we take the last commit.
+  (let ((commit "a22f33f486a5c6f75b60e36f66504c036c0f6f8c")
+        (revision "2"))
     (package
       (name "non-sequencer")
-      (version (string-append "1.9.5-" (string-take commit 7)))
+      (version (string-append "1.9.5-" revision "." (string-take commit 7)))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -600,7 +680,7 @@ Guile.")
                       (commit commit)))
                 (sha256
                  (base32
-                  "0pkkw8q6d55j38xm7r4rwpdv1wy00a44h8c4wrn7vbgpq9nij46y"))
+                  "09q5x8i4f8mqnl8w6xnsq5zriy4bzdl4x2vq9n34a433rfrk84bg"))
                 (file-name (string-append name "-" version "-checkout"))))
       (build-system waf-build-system)
       (arguments
@@ -638,6 +718,28 @@ Sequencer happens on-line, in real-time.  Music can be composed live, while the
 transport is rolling.")
       (license license:gpl2+))))
 
+(define-public non-session-manager
+  (package (inherit non-sequencer)
+    (name "non-session-manager")
+    (arguments
+     (substitute-keyword-arguments (package-arguments non-sequencer)
+       ((#:configure-flags flags)
+        `(cons "--project=session-manager"
+               (delete "--project=sequencer" ,flags)))))
+    (inputs
+     `(("jack" ,jack-1)
+       ("liblo" ,liblo)
+       ("ntk" ,ntk)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "http://non.tuxfamily.org/nsm/")
+    (synopsis "Audio session management")
+    (description
+     "The Non Session Manager is an API and an implementation for audio
+session management.  NSM clients use a well-specified OSC protocol to
+communicate with the session management daemon.")
+    (license license:gpl2+)))
+
 (define-public solfege
   (package
     (name "solfege")
@@ -1090,7 +1192,6 @@ Laurens Hammond and Don Leslie.")
      `(("rapicorn" ,rapicorn)
        ("guile" ,guile-1.8)
        ("python" ,python-2)
-       ("cython" ,python2-cython)
        ("libgnomecanvas" ,libgnomecanvas)
        ("libogg" ,libogg)
        ("libmad" ,libmad)
@@ -1101,6 +1202,7 @@ Laurens Hammond and Don Leslie.")
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("glib:bin" ,glib "bin")
+       ("cython" ,python2-cython)
        ("perl" ,perl)
        ("perl-xml-parser" ,perl-xml-parser)))
     (home-page "https://testbit.eu/wiki/Beast_Home")
@@ -1382,10 +1484,10 @@ using a system-independent interface.")
              #t)))))
     (inputs
      `(("portmidi" ,portmidi)
-       ("alsa-lib" ,alsa-lib)
-       ("python-cython" ,python-cython)))
+       ("alsa-lib" ,alsa-lib)))
     (native-inputs
-     `(("unzip" ,unzip)))
+     `(("python-cython" ,python-cython)
+       ("unzip" ,unzip)))
     (home-page "http://portmedia.sourceforge.net/portmidi/")
     (synopsis "Python bindings to PortMidi")
     (description
@@ -1405,6 +1507,7 @@ using a system-independent interface.")
                (base32
                 "1rnk8i8dlshzx16n2qxcsqcs7kywgyazzyzw2vy4vp2gsm9vs9ml"))))
     (build-system python-build-system)
+    (arguments `(#:tests? #f)) ; no tests included
     (inputs
      `(("lilypond" ,lilypond)
        ("portmidi" ,portmidi)
@@ -1474,7 +1577,7 @@ backends, including ALSA, OSS, Network and FluidSynth.")
 (define-public zynaddsubfx
   (package
     (name "zynaddsubfx")
-    (version "3.0.0")
+    (version "3.0.1")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1482,7 +1585,7 @@ backends, including ALSA, OSS, Network and FluidSynth.")
                     version "/zynaddsubfx-" version ".tar.bz2"))
               (sha256
                (base32
-                "0p640hlw28264nzrnd2lm4bi5snas4fvh80p8lpxvph2hjw3sncl"))))
+                "1qijvlbv41lnqaqbp6gh1i42xzf1syviyxz8wr39xbz55cw7y0d8"))))
     (build-system cmake-build-system)
     (arguments
      `(#:phases
@@ -1520,7 +1623,7 @@ capabilities, custom envelopes, effects, etc.")
 (define-public yoshimi
   (package
     (name "yoshimi")
-    (version "1.4.1")
+    (version "1.5.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/yoshimi/"
@@ -1528,7 +1631,7 @@ capabilities, custom envelopes, effects, etc.")
                                   "/yoshimi-" version ".tar.bz2"))
               (sha256
                (base32
-                "133sx42wb66g803pcrgdwph40wh94knvab3yfqkgm0001jv4v14y"))))
+                "10s1i18xlmvqfrnr0zn2mj2b28i7p62dlqzzzkmpaapqj1gsgpz5"))))
     (build-system cmake-build-system)
     (arguments
      `(#:tests? #f ; there are no tests
@@ -1673,6 +1776,48 @@ JACK for audio and ALSA sequencer for MIDI as multimedia infrastructures and
 follows a traditional multi-track tape recorder control paradigm.")
     (license license:gpl2+)))
 
+(define-public ams-lv2
+  (package
+    (name "ams-lv2")
+    (version "1.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/blablack/ams-lv2/"
+                           "archive/" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1392spswkhfd38fggf584wb3m8aqpg7csfrs9zxnzyvhgmp0fgqk"))))
+    (build-system waf-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-sse-flags
+           (lambda* (#:key system #:allow-other-keys)
+             (when (not (or (string-prefix? "x86_64" system)
+                            (string-prefix? "i686" system)))
+               (substitute* "wscript"
+                 (("'-msse', '-mfpmath=sse', ") ""))
+             #t))))
+       #:tests? #f)) ; no tests
+    (inputs
+     `(("lv2" ,lv2)
+       ("lvtk" ,lvtk)
+       ("gtkmm" ,gtkmm-2)
+       ("gtk" ,gtk+-2)
+       ("cairo" ,cairo)
+       ("fftw" ,fftw)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "https://objectivewave.wordpress.com/ams-lv2/")
+    (synopsis "Port of Alsa Modular Synth internal modules into LV2")
+    (description "This set of LV2 plugins is a port of the internal modules
+found in Alsa Modular Synth.  These plugins are used to create modular
+synthesizers and contain: VCO, VCF, VCA, LFO, slew limiter, envelopes, sample
+and hold, etc.")
+    (license license:gpl2)))
+
 (define-public gxtuner
   (package
     (name "gxtuner")
@@ -1744,8 +1889,8 @@ analogue-like user interface.")
                #t)))))
       (inputs
        `(("lilv" ,lilv)
-         ("fftw" ,fftw)
-         ("fftwf" ,fftwf)
+         ("fftw" ,fftw-with-threads)
+         ("fftwf" ,fftwf-with-threads)
          ("lv2" ,lv2)
          ("jack" ,jack-1)
          ("readline" ,readline)))
@@ -1796,14 +1941,16 @@ event-based scripts for scrobbling, notifications, etc.")
 (define-public python-mutagen
   (package
     (name "python-mutagen")
-    (version "1.31")
+    (version "1.35.1")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "mutagen" version))
               (sha256
                (base32
-                "16fnnhspniac2i7qswxafawsh2x2a803hmc6bn9k1zl5fxq1380a"))))
+                "0klk68c1n3285vvm2xzk8ii7mlqp1dxii04askan0gi1wlpagka9"))))
     (build-system python-build-system)
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
     (home-page "https://bitbucket.org/lazka/mutagen")
     (synopsis "Read and write audio tags")
     (description "Mutagen is a Python module to handle audio metadata.  It
@@ -1821,14 +1968,18 @@ streams on an individual packet/page level.")
 (define-public python-musicbrainzngs
   (package
     (name "python-musicbrainzngs")
-    (version "0.5")
+    (version "0.6")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "musicbrainzngs" version))
               (sha256
                (base32
-                "12f48llmdf5rkiqxcb70k2k1dmhm8byq0ifazvlrca8dfnmqh4r8"))))
+                "1dddarpjawryll2wss65xq3v9q8ln8dan7984l5dxzqx88d2dvr8"))))
     (build-system python-build-system)
+    (arguments
+     '(;; The tests fail suffer from race conditions:
+       ;; https://github.com/alastair/python-musicbrainzngs/issues/211
+       #:tests? #f))
     (home-page "https://python-musicbrainzngs.readthedocs.org/")
     (synopsis "Python bindings for MusicBrainz NGS webservice")
     (description "Musicbrainzngs implements Python bindings of the MusicBrainz
@@ -1855,7 +2006,6 @@ MusicBrainz database.")
      `(;; Python 3 is not supported:
        ;; https://github.com/echonest/pyechonest/issues/42
        #:python ,python-2))
-    (native-inputs `(("python2-setuptools" ,python2-setuptools)))
     (home-page "https://github.com/echonest/pyechonest")
     (synopsis "Python interface to The Echo Nest APIs")
     (description "Pyechonest is a Python library for the Echo Nest API.  With
@@ -1877,13 +2027,13 @@ detailed track info including timbre, pitch, rhythm and loudness information.
 (define-public python-pylast
   (package
     (name "python-pylast")
-    (version "1.5.1")
+    (version "1.6.0")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "pylast" version))
               (sha256
                (base32
-                "10znd9xr1vs2ix519jkz3ccm90zciaddcdr2w2wrrh2jyy3bc59a"))))
+                "0bml11gfkxqd3i2jxkn5k2xllc4rvxjcyhs8an05gcyy1zp2bwvb"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-coverage" ,python-coverage)
@@ -1898,58 +2048,50 @@ detailed track info including timbre, pitch, rhythm and loudness information.
     (synopsis "Python interface to Last.fm and Libre.fm")
     (description "A Python interface to Last.fm and other API-compatible
 websites such as Libre.fm.")
-    (license license:asl2.0)
-    (properties `((python2-variant . ,(delay python2-pylast))))))
+    (license license:asl2.0)))
 
 (define-public python2-pylast
-  (let ((pylast (package-with-python2
-                 (strip-python2-variant python-pylast))))
-    (package (inherit pylast)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs pylast))))))
+  (package-with-python2 python-pylast))
 
 (define-public beets
   (package
     (name "beets")
-    (version "1.3.19")
+    (version "1.4.2")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "beets" version))
               (sha256
                (base32
-                "1vi1dh3fr554bnm8y9pjy09hblw18v6cl2jppzwlp72afri1w93b"))))
+                "0sna2hx8sdaa36jnvw5a7m31wzfm717lw2ixh906fsfp43i74k5m"))))
     (build-system python-build-system)
     (arguments
-     `(#:python ,python-2 ; only Python 2 is supported
-       #:phases
+     `(#:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'set-HOME
            (lambda _ (setenv "HOME" (string-append (getcwd) "/tmp"))))
          (replace 'check
            (lambda _ (zero? (system* "nosetests" "-v")))))))
     (native-inputs
-     `(("python2-beautifulsoup4" ,python2-beautifulsoup4)
-       ("python2-flask" ,python2-flask)
-       ("python2-setuptools" ,python2-setuptools)
-       ("python2-mock" ,python2-mock)
-       ("python2-mpd2" ,python2-mpd2)
-       ("python2-nose" ,python2-nose)
-       ("python2-pathlib" ,python2-pathlib)
-       ("python2-pyxdg" ,python2-pyxdg)
-       ("python2-pyechonest" ,python2-pyechonest)
-       ("python2-pylast" ,python2-pylast)
-       ("python2-rarfile" ,python2-rarfile)
-       ("python2-responses" ,python2-responses)))
+     `(("python-beautifulsoup4" ,python-beautifulsoup4)
+       ("python-flask" ,python-flask)
+       ("python-mock" ,python-mock)
+       ("python-mpd2" ,python-mpd2)
+       ("python-nose" ,python-nose)
+       ("python-pathlib" ,python-pathlib)
+       ("python-pyxdg" ,python-pyxdg)
+       ("python-pylast" ,python-pylast)
+       ("python-rarfile" ,python-rarfile)
+       ("python-responses" ,python-responses)))
     ;; TODO: Install optional plugins and dependencies.
     (inputs
-     `(("python2-enum34" ,python2-enum34)
-       ("python2-jellyfish" ,python2-jellyfish)
-       ("python2-munkres" ,python2-munkres)
-       ("python2-musicbrainzngs" ,python2-musicbrainzngs)
-       ("python2-mutagen" ,python2-mutagen)
-       ("python2-pyyaml" ,python2-pyyaml)
-       ("python2-unidecode" ,python2-unidecode)))
+     `(("python-discogs-client" ,python-discogs-client)
+       ("python-enum34" ,python-enum34)
+       ("python-jellyfish" ,python-jellyfish)
+       ("python-munkres" ,python-munkres)
+       ("python-musicbrainzngs" ,python-musicbrainzngs)
+       ("python-mutagen" ,python-mutagen)
+       ("python-pyyaml" ,python-pyyaml)
+       ("python-unidecode" ,python-unidecode)))
     (home-page "http://beets.io")
     (synopsis "Music organizer")
     (description "The purpose of beets is to get your music collection right
@@ -2421,3 +2563,178 @@ a simulation of an analog Wah pedal with switchless activation."))))
 filters, crossovers, simple gain plugins without zipper noise, switch box
 plugins, a switch trigger, a toggle switch, and a peakmeter.")
       (license license:gpl2+))))
+
+(define-public ingen
+  (let ((commit "fd147d0b888090bfb897505852c1f25dbdf77e18")
+        (revision "1"))
+    (package
+      (name "ingen")
+      (version (string-append "0.0.0-" revision "."
+                              (string-take commit 9)))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "http://git.drobilla.net/ingen.git")
+               (commit commit)))
+         (file-name (string-append name "-" version "-checkout"))
+         (sha256
+          (base32
+           "1qmg79962my82c43vyrv5sxbqci9c7gc2s9bwaaqd0fcf08xcz1z"))))
+      (build-system waf-build-system)
+      (arguments
+       `(#:tests? #f ; no "check" target
+         #:configure-flags (list "--no-webkit")
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'patch-wscript
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out")))
+                 (substitute* "wscript"
+                   ;; FIXME: Our version of lv2specgen.py does not behave as
+                   ;; expected.  Maybe this requires a development version of
+                   ;; LV2.
+                   (("lv2specgen.py") "touch ingen.lv2/ingen.html; echo")
+                   ;; Add libraries to RUNPATH.
+                   (("^(.+)target.*= 'src/ingen/ingen'," line prefix)
+                    (string-append prefix
+                                   "linkflags=[\"-Wl,-rpath="
+                                   out "/lib" "\"]," line)))
+                 (substitute* '("src/wscript"
+                                "src/server/wscript")
+                   ;; Add libraries to RUNPATH.
+                   (("bld.env.PTHREAD_LINKFLAGS" line)
+                    (string-append line
+                                   " + [\"-Wl,-rpath=" out "/lib" "\"]")))
+                 (substitute* "src/client/wscript"
+                   ;; Add libraries to RUNPATH.
+                   (("^(.+)target.*= 'ingen_client'," line prefix)
+                    (string-append prefix
+                                   "linkflags=[\"-Wl,-rpath="
+                                   out "/lib" "\"]," line)))
+                 (substitute* "src/gui/wscript"
+                   ;; Add libraries to RUNPATH.
+                   (("^(.+)target.* = 'ingen_gui.*" line prefix)
+                    (string-append prefix
+                                   "linkflags=[\"-Wl,-rpath="
+                                   out "/lib" "\"]," line))))
+               #t)))))
+      (inputs
+       `(("boost" ,boost)
+         ("python-rdflib" ,python-rdflib)
+         ("python" ,python)
+         ("jack" ,jack-1)
+         ("lv2" ,lv2)
+         ("lilv" ,lilv)
+         ("raul" ,raul-devel)
+         ("ganv" ,ganv-devel)
+         ("suil" ,suil)
+         ("serd" ,serd)
+         ("sord" ,sord)
+         ("sratom" ,sratom)
+         ("gtkmm" ,gtkmm-2)))
+      (native-inputs
+       `(("pkg-config" ,pkg-config)
+         ("python-pygments" ,python-pygments)))
+      (home-page "http://drobilla.net/software/ingen")
+      (synopsis "Modular audio processing system")
+      (description "Ingen is a modular audio processing system for JACK and
+LV2 based systems.  Ingen is built around LV2 technology and a strict
+separation of engine from user interface.  The engine is controlled
+exclusively through a protocol, and can execute as a headless process, with an
+in-process GUI, or as an LV2 plugin.  The GUI can run as a program which
+communicates over a Unix or TCP/IP socket, or as an embeddable LV2 GUI which
+communicates via LV2 ports.  Any saved Ingen graph can be loaded as an LV2
+plugin on any system where Ingen is installed.  This allows users to visually
+develop custom plugins for use in other applications without programming.")
+      (license license:agpl3+))))
+
+(define-public qmidiarp
+  (package
+    (name "qmidiarp")
+    (version "0.6.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/qmidiarp/qmidiarp/"
+                                  version "/qmidiarp-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1gkfv8ajgf86kbn6j5ilfc1zlz17gdi9yxzywqd6jwff4xlm75hx"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (list "--enable-qt5"
+             "CXXFLAGS=-std=gnu++11")))
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("alsa-lib" ,alsa-lib)
+       ("jack" ,jack-1)
+       ("liblo" ,liblo)
+       ("lv2" ,lv2)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("qttools" ,qttools)))
+    (home-page "http://qmidiarp.sourceforge.net/")
+    (synopsis "MIDI arpeggiator")
+    (description "QMidiArp is an advanced MIDI arpeggiator, programmable step
+sequencer and LFO.  It can hold any number of arpeggiator, sequencer, or LFO
+modules running in parallel.")
+    (license license:gpl2+)))
+
+(define-public seq24
+  (package
+    (name "seq24")
+    (version "0.9.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://launchpad.net/seq24/trunk/"
+                                  version "/+download/seq24-"
+                                  version ".tar.bz2"))
+              (sha256
+               (base32
+                "12dphdhnvfk1k0vmagi1v2lhyxjyj1j3cz6ksjw0ydcvid1x8ap2"))
+              (patches (search-patches "seq24-rename-mutex.patch"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (list "CXXFLAGS=-std=gnu++11")))
+    (inputs
+     `(("gtkmm" ,gtkmm-2)
+       ("alsa-lib" ,alsa-lib)
+       ("jack" ,jack-1)
+       ("lash" ,lash)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "https://edge.launchpad.net/seq24/")
+    (synopsis "Real-time MIDI sequencer")
+    (description "Seq24 is a real-time MIDI sequencer.  It was created to
+provide a very simple interface for editing and playing MIDI loops.")
+    (license license:gpl2+)))
+
+(define-public python-discogs-client
+  (package
+    (name "python-discogs-client")
+    (version "2.2.1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "discogs-client" version))
+              (sha256
+               (base32
+                "053ld2psh0yj3z0kg6z5bn4y3cr562m727494n0ayhgzbkjbacly"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-oauthlib" ,python-oauthlib)
+       ("python-requests" ,python-requests)))
+    (native-inputs
+     `(("python-six" ,python-six)))
+    (home-page "https://github.com/discogs/discogs_client")
+    (synopsis "Official Python client for the Discogs API")
+    (description "This is the official Discogs API client for Python. It enables
+you to query the Discogs database for information on artists, releases, labels,
+users, Marketplace listings, and more.  It also supports OAuth 1.0a
+authorization, which allows you to change user data such as profile information,
+collections and wantlists, inventory, and orders.")
+    (license license:bsd-2)))
+
+(define-public python2-discogs-client
+  (package-with-python2 python-discogs-client))
diff --git a/gnu/packages/nano.scm b/gnu/packages/nano.scm
index e1830d291b..68444771a0 100644
--- a/gnu/packages/nano.scm
+++ b/gnu/packages/nano.scm
@@ -29,7 +29,7 @@
 (define-public nano
   (package
     (name "nano")
-    (version "2.7.1")
+    (version "2.7.3")
     (source
      (origin
       (method url-fetch)
@@ -37,7 +37,7 @@
                           version ".tar.gz"))
       (sha256
        (base32
-        "06715a39hmp2dl0qz0979cyv8brpb91z5hn94q224ymbsc876m41"))))
+        "123si2acvfhnl2kip08bqm413yv36zy3pmj75ibkn7q59mcx8x1m"))))
     (build-system gnu-build-system)
     (inputs
      `(("gettext" ,gettext-minimal)
diff --git a/gnu/packages/ncurses.scm b/gnu/packages/ncurses.scm
index 81da864413..d725a71c0d 100644
--- a/gnu/packages/ncurses.scm
+++ b/gnu/packages/ncurses.scm
@@ -1,9 +1,10 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2014, 2016 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -21,6 +22,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages ncurses)
+  #:use-module (gnu packages)
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -29,136 +31,162 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages swig))
+  #:use-module (gnu packages swig)
+  #:use-module (guix utils))
 
 (define-public ncurses
-  (let ((patch-makefile-phase
-         '(lambda _
-            (for-each patch-makefile-SHELL
-                      (find-files "." "Makefile.in"))))
-        (configure-phase
-         ;; The 'configure' script does not understand '--docdir', so we must
-         ;; override that and use '--mandir' instead.
-         '(lambda* (#:key build target outputs configure-flags
-                    #:allow-other-keys)
-            (let ((out (assoc-ref outputs "out"))
-                  (doc (assoc-ref outputs "doc")))
-              (zero? (apply system* "./configure"
-                            (string-append "SHELL=" (which "sh"))
-                            (string-append "--build=" build)
-                            (string-append "--prefix=" out)
-                            (string-append "--mandir=" doc "/share/man")
-                            (if target
-                                (cons (string-append "--host=" target)
-                                      configure-flags)
-                                configure-flags))))))
-        (remove-shebang-phase
-         '(lambda _
-            ;; To avoid retaining a reference to the bootstrap Bash via the
-            ;; shebang of the 'ncursesw6-config' script, simply remove that
-            ;; shebang: it'll work just as well without it.  Likewise, do not
-            ;; retain a reference to the "doc" output.
-            (substitute* "misc/ncurses-config.in"
-              (("#!@SHELL@")
-               "# No shebang here, use /bin/sh!\n")
-              (("@SHELL@ \\$0")
-               "$0")
-              (("mandir=.*$")
-               "mandir=share/man"))
-            #t))
-        (post-install-phase
-         '(lambda* (#:key outputs #:allow-other-keys)
-            (let ((out (assoc-ref outputs "out")))
-              ;; When building a wide-character (Unicode) build, create backward
-              ;; compatibility links from the the "normal" libraries to the
-              ;; wide-character ones (e.g. libncurses.so to libncursesw.so).
-              (with-directory-excursion (string-append out "/lib")
-                (for-each (lambda (lib)
-                            (define libw.a
-                              (string-append "lib" lib "w.a"))
-                            (define lib.a
-                              (string-append "lib" lib ".a"))
-                            (define libw.so.x
-                              (string-append "lib" lib "w.so.6"))
-                            (define lib.so.x
-                              (string-append "lib" lib ".so.6"))
-                            (define lib.so
-                              (string-append "lib" lib ".so"))
-                            (define packagew.pc
-                              (string-append lib "w.pc"))
-                            (define package.pc
-                              (string-append lib ".pc"))
-
-                            (when (file-exists? libw.a)
-                              (format #t "creating symlinks for `lib~a'~%" lib)
-                              (symlink libw.a lib.a)
-                              (symlink libw.so.x lib.so.x)
-                              (false-if-exception (delete-file lib.so))
-                              (call-with-output-file lib.so
-                                (lambda (p)
-                                  (format p "INPUT (-l~aw)~%" lib))))
-                            (with-directory-excursion "pkgconfig"
-                              (format #t "creating symlink for `~a'~%" package.pc)
-                              (when (file-exists? packagew.pc)
-                                (symlink packagew.pc package.pc))))
-                          '("curses" "ncurses" "form" "panel" "menu")))))))
-    (package
-     (name "ncurses")
-     (version "6.0")
-     (source (origin
+  (package
+    (name "ncurses")
+    (version "6.0")
+    (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/ncurses/ncurses-"
                                   version ".tar.gz"))
               (sha256
                (base32
                 "0q3jck7lna77z5r42f13c4xglc7azd19pxfrjrpgp2yf615w4lgm"))))
-     (build-system gnu-build-system)
-     (outputs '("out"
-                "doc"))                          ;1 MiB of man pages
-     (arguments
-      `(#:configure-flags
-        `("--with-shared" "--without-debug" "--enable-widec"
+    (build-system gnu-build-system)
+    (outputs '("out"
+               "doc"))                ;1 MiB of man pages
+    (arguments
+     (let ((patch-makefile-phase
+            '(lambda _
+               (for-each patch-makefile-SHELL
+                         (find-files "." "Makefile.in"))))
+           (configure-phase
+            ;; The 'configure' script does not understand '--docdir', so we must
+            ;; override that and use '--mandir' instead.
+            '(lambda* (#:key build target outputs configure-flags
+                       #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out"))
+                     (doc (assoc-ref outputs "doc")))
+                 (zero? (apply system* "./configure"
+                               (string-append "SHELL=" (which "sh"))
+                               (string-append "--build=" build)
+                               (string-append "--prefix=" out)
+                               (string-append "--mandir=" doc "/share/man")
+                               (if target
+                                   (cons (string-append "--host=" target)
+                                         configure-flags)
+                                   configure-flags))))))
+           (remove-shebang-phase
+            '(lambda _
+               ;; To avoid retaining a reference to the bootstrap Bash via the
+               ;; shebang of the 'ncursesw6-config' script, simply remove that
+               ;; shebang: it'll work just as well without it.  Likewise, do not
+               ;; retain a reference to the "doc" output.
+               (substitute* "misc/ncurses-config.in"
+                 (("#!@SHELL@")
+                  "# No shebang here, use /bin/sh!\n")
+                 (("@SHELL@ \\$0")
+                  "$0")
+                 (("mandir=.*$")
+                  "mandir=share/man"))
+               #t))
+           (post-install-phase
+            `(lambda* (#:key outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out")))
+                 ;; When building a wide-character (Unicode) build, create backward
+                 ;; compatibility links from the the "normal" libraries to the
+                 ;; wide-character ones (e.g. libncurses.so to libncursesw.so).
+                 ,@(if (target-mingw?)
+                       '( ;; TODO: create .la files to link to the .dll?
+                         (with-directory-excursion (string-append out "/bin")
+                           (for-each
+                            (lambda (lib)
+                              (define lib.dll
+                                (string-append "lib" lib ".dll"))
+                              (define libw6.dll
+                                (string-append "lib" lib "w6.dll"))
+
+                              (when (file-exists? libw6.dll)
+                                (format #t "creating symlinks for `lib~a'~%" lib)
+                                (symlink libw6.dll lib.dll)))
+                            '("curses" "ncurses" "form" "panel" "menu"))))
+                       '())
+                 (with-directory-excursion (string-append out "/lib")
+                   (for-each (lambda (lib)
+                               (define libw.a
+                                 (string-append "lib" lib "w.a"))
+                               (define lib.a
+                                 (string-append "lib" lib ".a"))
 
-          "--enable-pc-files"
-          ,(string-append "--with-pkg-config-libdir="
-                          (assoc-ref %outputs "out")
-                          "/lib/pkgconfig")
+                               ,@(if (not (target-mingw?))
+                                     '((define libw.so.x
+                                         (string-append "lib" lib "w.so.6"))
+                                       (define lib.so.x
+                                         (string-append "lib" lib ".so.6"))
+                                       (define lib.so
+                                         (string-append "lib" lib ".so"))
+                                       (define packagew.pc
+                                         (string-append lib "w.pc"))
+                                       (define package.pc
+                                         (string-append lib ".pc")))
+                                     '())
 
-          ;; By default headers land in an `ncursesw' subdir, which is not
-          ;; what users expect.
-          ,(string-append "--includedir=" (assoc-ref %outputs "out")
-                          "/include")
-          "--enable-overwrite"                    ;really honor --includedir
+                               (when (file-exists? libw.a)
+                                 (format #t "creating symlinks for `lib~a'~%" lib)
+                                 (symlink libw.a lib.a)
+                                 ,@(if (not (target-mingw?))
+                                       '((symlink libw.so.x lib.so.x)
+                                         (false-if-exception (delete-file lib.so))
+                                         (call-with-output-file lib.so
+                                           (lambda (p)
+                                             (format p "INPUT (-l~aw)~%" lib)))
+                                         (with-directory-excursion "pkgconfig"
+                                           (format #t "creating symlink for `~a'~%"
+                                                   package.pc)
+                                           (when (file-exists? packagew.pc)
+                                             (symlink packagew.pc package.pc))))
+                                       '())))
+                             '("curses" "ncurses" "form" "panel" "menu")))))))
+       `(#:configure-flags
+         ,(cons*
+           'quasiquote
+           `(("--with-shared" "--without-debug" "--enable-widec"
+              
+              "--enable-pc-files"
+              ,(list 'unquote '(string-append "--with-pkg-config-libdir="
+                                              (assoc-ref %outputs "out")
+                                              "/lib/pkgconfig"))
 
-          ;; Make sure programs like 'tic', 'reset', and 'clear' have a
-          ;; correct RUNPATH.
-          ,(string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out")
-                          "/lib"))
-        #:tests? #f                               ; no "check" target
-        #:phases (modify-phases %standard-phases
-                   (replace 'configure ,configure-phase)
-                   (add-after 'install 'post-install
-                     ,post-install-phase)
-                   (add-before 'configure 'patch-makefile-SHELL
-                     ,patch-makefile-phase)
-                   (add-after 'unpack 'remove-unneeded-shebang
-                     ,remove-shebang-phase))))
-     (self-native-input? #t)                      ; for `tic'
+              ;; By default headers land in an `ncursesw' subdir, which is not
+              ;; what users expect.
+              ,(list 'unquote '(string-append "--includedir=" (assoc-ref %outputs "out")
+                                              "/include"))
+              "--enable-overwrite"      ;really honor --includedir
+
+              ;; Make sure programs like 'tic', 'reset', and 'clear' have a
+              ;; correct RUNPATH.
+              ,(list 'unquote '(string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out")
+                                              "/lib"))
+              ;; MinGW: Use term-driver created for the MinGW port.
+              ,@(if (target-mingw?) '("--enable-term-driver") '()))))
+         #:tests? #f                  ; no "check" target
+         #:phases (modify-phases %standard-phases
+                    (replace 'configure ,configure-phase)
+                    (add-after 'install 'post-install
+                      ,post-install-phase)
+                    (add-before 'configure 'patch-makefile-SHELL
+                      ,patch-makefile-phase)
+                    (add-after 'unpack 'remove-unneeded-shebang
+                      ,remove-shebang-phase)))))
+    (self-native-input? #t)           ; for `tic'
      (native-inputs
       `(("pkg-config" ,pkg-config)))
-     (native-search-paths
-      (list (search-path-specification
-             (variable "TERMINFO_DIRS")
-             (files '("share/terminfo")))))
-     (synopsis "Terminal emulation (termcap, terminfo) library")
-     (description
-      "GNU Ncurses is a library which provides capabilities to write text to
+    (native-search-paths
+     (list (search-path-specification
+            (variable "TERMINFO_DIRS")
+            (files '("share/terminfo")))))
+    (synopsis "Terminal emulation (termcap, terminfo) library")
+    (description
+     "GNU Ncurses is a library which provides capabilities to write text to
 a terminal in a terminal-independent manner.  It supports pads and color as
 well as multiple highlights and forms characters.  It is typically used to
 implement user interfaces for command-line applications.  The accompanying
 ncursesw library provides wide character support.")
-     (license x11)
-     (home-page "http://www.gnu.org/software/ncurses/"))))
+    (license x11)
+    (home-page "http://www.gnu.org/software/ncurses/")))
 
 (define-public dialog
   (package
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index de7aaf0680..3c7c073497 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2015 Stefan Reichör <stefan@xsteve.at>
+;;; Copyright © 2015, 2016 Stefan Reichör <stefan@xsteve.at>
 ;;; Copyright © 2016 Raimon Grau <raimonster@gmail.com>
 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
@@ -34,6 +34,7 @@
   #:use-module (guix download)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system python)
   #:use-module (gnu packages)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages adns)
@@ -43,6 +44,7 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages code)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages curl)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages gettext)
@@ -301,14 +303,14 @@ receiving NDP messages.")
 (define-public ethtool
   (package
     (name "ethtool")
-    (version "4.0")
+    (version "4.8")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://kernel.org/software/network/"
                                   name "/" name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1zzcwn6pk8qfasalqkxg8vrhacksfa50xsq4xifw7yfjqyn8fj4h"))))
+                "0hsaxcka0ks76k23sb65c46i53hjm465sgxyn3m3301diqlgwga0"))))
     (build-system gnu-build-system)
     (home-page "https://www.kernel.org/pub/software/network/ethtool/")
     (synopsis "Display or change Ethernet device settings")
@@ -467,7 +469,7 @@ which can be used to encrypt a password with @code{crypt(3)}.")
 (define-public wireshark
   (package
     (name "wireshark")
-    (version "2.2.2")
+    (version "2.2.3")
     (synopsis "Network traffic analyzer")
     (source
      (origin
@@ -476,7 +478,7 @@ which can be used to encrypt a password with @code{crypt(3)}.")
                            version ".tar.bz2"))
        (sha256
         (base32
-         "1csm035ayfzn1xzzsmzcjk2ixx39d70aykr4nh0a88chk9gfzb7r"))))
+         "0fsrvl6sp772g2q2j24h10h9lfda6q67x7wahjjm8849i2gciflp"))))
     (build-system glib-or-gtk-build-system)
     (inputs `(("bison" ,bison)
               ("c-ares" ,c-ares)
@@ -549,6 +551,38 @@ by firewalls or when you want to monitor the response time of the actual web
 application stack itself.")
     (license license:gpl2)))        ; with permission to link with OpenSSL
 
+(define-public httpstat
+  (package
+    (name "httpstat")
+    (version "1.2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "httpstat" version))
+       (sha256
+        (base32
+         "1chw2nk56vaq87aba012a270k9na06hfx1pfbsrc3jfvlc2kb9hb"))))
+    (build-system python-build-system)
+    (inputs `(("curl" ,curl)))
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'fix-curl-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "httpstat.py"
+               (("ENV_CURL_BIN.get\\('curl'\\)")
+                (string-append "ENV_CURL_BIN.get('"
+                               (assoc-ref inputs "curl")
+                               "/bin/curl')"))))))))
+    (home-page "https://github.com/reorx/httpstat")
+    (synopsis "Visualize curl statistics")
+    (description
+     "@command{httpstat} is a tool to visualize statistics from the
+@command{curl} HTTP client.  It acts as a wrapper for @command{curl} and
+prints timing information for each step of the HTTP request (DNS lookup,
+TCP connection, TLS handshake and so on) in the terminal.")
+    (license license:expat)))
+
 (define-public bwm-ng
   (package
     (name "bwm-ng")
diff --git a/gnu/packages/ntp.scm b/gnu/packages/ntp.scm
index 177eb8946a..13781fbdad 100644
--- a/gnu/packages/ntp.scm
+++ b/gnu/packages/ntp.scm
@@ -39,33 +39,34 @@
 (define-public ntp
   (package
    (name "ntp")
-   (version "4.2.8p8")
-   (source (origin
-	    (method url-fetch)
-	    (uri (list (string-append
-                         "http://archive.ntp.org/ntp4/ntp-"
-                         (version-major+minor version)
-                         "/ntp-" version ".tar.gz")
-                       (string-append
-                         "https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-"
-                         (version-major+minor version)
-                         "/ntp-" version ".tar.gz")))
-	    (sha256
-	     (base32
-              "1vlpgd0dk2wkpmmf869sfxi8f46sfnmjgk51vl8n6vj5y2sx1cra"))
-            (modules '((guix build utils)))
-            (snippet
-             '(begin
-                ;; Remove the bundled copy of libevent, but we must keep
-                ;; sntp/libevent/build-aux since configure.ac contains
-                ;; AC_CONFIG_AUX_DIR([sntp/libevent/build-aux])
-                (rename-file "sntp/libevent/build-aux"
-                             "sntp/libevent:build-aux")
-                (delete-file-recursively "sntp/libevent")
-                (mkdir "sntp/libevent")
-                (rename-file "sntp/libevent:build-aux"
-                             "sntp/libevent/build-aux")
-                #t))))
+   (version "4.2.8p9")
+   (source
+     (origin
+       (method url-fetch)
+       (uri (list (string-append
+                    "http://archive.ntp.org/ntp4/ntp-"
+                    (version-major+minor version)
+                    "/ntp-" version ".tar.gz")
+                  (string-append
+                    "https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-"
+                    (version-major+minor version)
+                    "/ntp-" version ".tar.gz")))
+       (sha256
+        (base32
+         "0whbyf82lrczbri4adbsa4hg1ppfa6c7qcj7nhjwdfp1g1vjh95p"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; Remove the bundled copy of libevent, but we must keep
+           ;; sntp/libevent/build-aux since configure.ac contains
+           ;; AC_CONFIG_AUX_DIR([sntp/libevent/build-aux])
+           (rename-file "sntp/libevent/build-aux"
+                        "sntp/libevent:build-aux")
+           (delete-file-recursively "sntp/libevent")
+           (mkdir "sntp/libevent")
+           (rename-file "sntp/libevent:build-aux"
+                        "sntp/libevent/build-aux")
+           #t))))
    (native-inputs `(("which" ,which)
                     ("pkg-config" ,pkg-config)))
    (inputs
diff --git a/gnu/packages/nutrition.scm b/gnu/packages/nutrition.scm
index 636379806c..9e0430b20a 100644
--- a/gnu/packages/nutrition.scm
+++ b/gnu/packages/nutrition.scm
@@ -52,11 +52,7 @@
      `(("pygtk"             ,python2-pygtk)
        ("sqlalchemy"        ,python2-sqlalchemy)
        ("python-pillow"     ,python2-pillow)
-       ("elib.intl"         ,python2-elib.intl)
-       ;; XXX: This really isn't an input for gourmet but of pillow.  Making
-       ;; it a propagated input in pillow doesn't seem to get its site path
-       ;; into gourmet's wrapper's PYTHONPATH however...
-       ("python-setuptools" ,python2-setuptools)))
+       ("elib.intl"         ,python2-elib.intl)))
     (arguments
      `(#:python ,python-2               ;exception and print syntax
        #:tests? #f))                    ;tests look bitrotted
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index f1b4bdbf6f..93020f1c06 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,31 +24,43 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages ocaml)
-  #:use-module ((guix licenses) #:hide (zlib))
-  #:use-module (guix packages)
-  #:use-module (guix download)
-  #:use-module (guix svn-download)
-  #:use-module (guix utils)
-  #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
-  #:use-module (gnu packages gcc)
-  #:use-module (gnu packages gnome)
-  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
-  #:use-module (gnu packages emacs)
-  #:use-module (gnu packages texinfo)
-  #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages compression)
-  #:use-module (gnu packages xorg)
-  #:use-module (gnu packages tex)
+  #:use-module (gnu packages curl)
+  #:use-module (gnu packages emacs)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages ghostscript)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gtk)
   #:use-module (gnu packages lynx)
-  #:use-module (gnu packages perl)
-  #:use-module (gnu packages python)
   #:use-module (gnu packages m4)
+  #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages tex)
+  #:use-module (gnu packages texinfo)
+  #:use-module (gnu packages time)
   #:use-module (gnu packages version-control)
-  #:use-module (gnu packages curl))
+  #:use-module (gnu packages xml)
+  #:use-module (gnu packages xorg)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system ocaml)
+  #:use-module (guix download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix svn-download)
+  #:use-module (guix utils))
+
+;; A shortcut for files from ocaml forge. Downloaded files are computed from
+;; their number, not their name.
+(define (ocaml-forge-uri name version file-number)
+  (string-append "https://forge.ocamlcore.org/frs/download.php/"
+                 (number->string file-number) "/" name "-" version
+                 ".tar.gz"))
 
 (define-public ocaml
   (package
@@ -62,12 +75,18 @@
               (sha256
                (base32
                 "1qwwvy8nzd87hk8rd9sm667nppakiapnx4ypdwcrlnav2dz6kil3"))
-              (patches (search-patches "ocaml-CVE-2015-8869.patch"))))
+              (patches
+               (search-patches
+                "ocaml-CVE-2015-8869.patch"
+                "ocaml-Add-a-.file-directive.patch"))))
     (build-system gnu-build-system)
     (native-search-paths
      (list (search-path-specification
             (variable "OCAMLPATH")
-            (files (list (string-append "lib/ocaml"))))))
+            (files (list "lib/ocaml" "lib/ocaml/site-lib")))
+           (search-path-specification
+            (variable "CAML_LD_LIBRARY_PATH")
+            (files (list "lib/ocaml/site-lib/stubslibs")))))
     (native-inputs
      `(("perl" ,perl)
        ("pkg-config" ,pkg-config)))
@@ -83,58 +102,59 @@
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-/bin/sh-references
-                    (lambda* (#:key inputs #:allow-other-keys)
-                      (let* ((sh (string-append (assoc-ref inputs "bash")
-                                                "/bin/sh"))
-                             (quoted-sh (string-append "\"" sh "\"")))
-                        (with-fluids ((%default-port-encoding #f))
-                          (for-each (lambda (file)
-                                      (substitute* file
-                                        (("\"/bin/sh\"")
-                                         (begin
-                                           (format (current-error-port) "\
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((sh (string-append (assoc-ref inputs "bash")
+                                       "/bin/sh"))
+                    (quoted-sh (string-append "\"" sh "\"")))
+               (with-fluids ((%default-port-encoding #f))
+                 (for-each
+                  (lambda (file)
+                    (substitute* file
+                      (("\"/bin/sh\"")
+                       (begin
+                         (format (current-error-port) "\
 patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
-                                                   file quoted-sh)
-                                           quoted-sh))))
-                                    (find-files "." "\\.ml$"))
-                          #t))))
+                                 file quoted-sh)
+                         quoted-sh))))
+                  (find-files "." "\\.ml$"))
+                 #t))))
          (replace 'configure
-                  (lambda* (#:key outputs #:allow-other-keys)
-                    (let* ((out (assoc-ref outputs "out"))
-                           (mandir (string-append out "/share/man")))
-                      ;; Custom configure script doesn't recognize
-                      ;; --prefix=<PREFIX> syntax (with equals sign).
-                      (zero? (system* "./configure"
-                                      "--prefix" out
-                                      "--mandir" mandir)))))
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (mandir (string-append out "/share/man")))
+               ;; Custom configure script doesn't recognize
+               ;; --prefix=<PREFIX> syntax (with equals sign).
+               (zero? (system* "./configure"
+                               "--prefix" out
+                               "--mandir" mandir)))))
          (replace 'build
-                  (lambda _
-                    (zero? (system* "make" "-j" (number->string
-                                                 (parallel-job-count))
-                                    "world.opt"))))
+           (lambda _
+             (zero? (system* "make" "-j" (number->string
+                                          (parallel-job-count))
+                             "world.opt"))))
          (delete 'check)
          (add-after 'install 'check
-                    (lambda _
-                      (with-directory-excursion "testsuite"
-                        (zero? (system* "make" "all")))))
+           (lambda _
+             (with-directory-excursion "testsuite"
+               (zero? (system* "make" "all")))))
          (add-before 'check 'prepare-socket-test
-                     (lambda _
-                       (format (current-error-port)
-                               "Spawning local test web server on port 8080~%")
-                       (when (zero? (primitive-fork))
-                         (run-server (lambda (request request-body)
-                                       (values '((content-type . (text/plain)))
-                                               "Hello!"))
-                                     'http '(#:port 8080)))
-                       (let ((file "testsuite/tests/lib-threads/testsocket.ml"))
-                         (format (current-error-port)
-                                 "Patching ~a to use localhost port 8080~%"
-                                 file)
-                         (substitute* file
-                           (("caml.inria.fr") "localhost")
-                           (("80") "8080")
-                           (("HTTP1.0") "HTTP/1.0"))
-                         #t))))))
+           (lambda _
+             (format (current-error-port)
+                     "Spawning local test web server on port 8080~%")
+             (when (zero? (primitive-fork))
+               (run-server (lambda (request request-body)
+                             (values '((content-type . (text/plain)))
+                                     "Hello!"))
+                           'http '(#:port 8080)))
+             (let ((file "testsuite/tests/lib-threads/testsocket.ml"))
+               (format (current-error-port)
+                       "Patching ~a to use localhost port 8080~%"
+                       file)
+               (substitute* file
+                 (("caml.inria.fr") "localhost")
+                 (("80") "8080")
+                 (("HTTP1.0") "HTTP/1.0"))
+               #t))))))
     (home-page "https://ocaml.org/")
     (synopsis "The OCaml programming language")
     (description
@@ -145,7 +165,7 @@ functional, imperative and object-oriented styles of programming.")
     ;; The compiler is distributed under qpl1.0 with a change to choice of
     ;; law: the license is governed by the laws of France.  The library is
     ;; distributed under lgpl2.0.
-    (license (list qpl lgpl2.0))))
+    (license (list license:qpl license:lgpl2.0))))
 
 (define-public opam
   (package
@@ -210,7 +230,7 @@ simultaneous compiler installations, flexible package constraints, and a
 Git-friendly development workflow.")
 
     ;; The 'LICENSE' file waives some requirements compared to LGPLv3.
-    (license lgpl3)))
+    (license license:lgpl3)))
 
 (define-public camlp4
   (package
@@ -230,6 +250,10 @@ Git-friendly development workflow.")
     (inputs `(("ocaml" ,ocaml)))
     (arguments
      '(#:tests? #f                                ;no documented test target
+       ;; a race-condition will lead byte and native targets to  mkdir _build
+       ;; which  fails on the second attempt.
+       #:parallel-build? #f
+       #:make-flags '("all")
        #:phases (modify-phases %standard-phases
                   (replace
                    'configure
@@ -237,9 +261,19 @@ Git-friendly development workflow.")
                      ;; This is a home-made 'configure' script.
                      (let ((out (assoc-ref outputs "out")))
                        (zero? (system* "./configure"
-                                       (string-append "--libdir=" out "/lib")
+                                       (string-append "--libdir=" out
+                                                      "/lib/ocaml/site-lib")
                                        (string-append "--bindir=" out "/bin")
-                                       (string-append "--pkgdir=" out)))))))))
+                                       (string-append "--pkgdir=" out
+                                                      "/lib/ocaml/site-lib"))))))
+                  (add-after 'install 'install-meta
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out")))
+                        (substitute* "camlp4/META.in"
+                          (("directory = .*")
+                            (string-append "directory = \"" out
+                                           "/lib/ocaml/site-lib/camlp4\"\n")))
+                        (zero? (system* "make" "install-META"))))))))
     (home-page "https://github.com/ocaml/camlp4")
     (synopsis "Write parsers in OCaml")
     (description
@@ -252,7 +286,7 @@ syntax of OCaml.")
 
     ;; This is LGPLv2 with an exception that allows packages statically-linked
     ;; against the library to be released under any terms.
-    (license lgpl2.0)))
+    (license license:lgpl2.0)))
 
 (define-public camlp5
   (package
@@ -293,7 +327,7 @@ syntax of OCaml.")
 tools for syntax (Stream Parsers and Grammars) and the ability to modify the
 concrete syntax of the language (Quotations, Syntax Extensions).")
     ;; Most files are distributed under bsd-3, but ocaml_stuff/* is under qpl.
-    (license (list bsd-3 qpl))))
+    (license (list license:bsd-3 license:qpl))))
 
 (define-public hevea
   (package
@@ -324,48 +358,51 @@ concrete syntax of the language (Quotations, Syntax Extensions).")
     (description
      "HeVeA is a LaTeX to HTML translator that generates modern HTML 5.  It is
 written in Objective Caml.")
-    (license qpl)))
+    (license license:qpl)))
 
 (define-public coq
   (package
     (name "coq")
-    (version "8.4pl6")
+    (version "8.5pl2")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://coq.inria.fr/distrib/V" version
                                   "/files/" name "-" version ".tar.gz"))
               (sha256
                (base32
-                "1mpbj4yf36kpjg2v2sln12i8dzqn8rag6fd07hslj2lpm4qs4h55"))))
+                "0wyywia0darak2zmc5v0ra9rn0b9whwdfiahralm8v5za499s8w3"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("texlive" ,texlive)
+       ("findlib" ,ocaml-findlib)
        ("hevea" ,hevea)))
     (inputs
      `(("ocaml" ,ocaml)
+       ("lablgtk" ,lablgtk)
        ("camlp5" ,camlp5)))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
          (replace 'configure
-                  (lambda* (#:key outputs #:allow-other-keys)
-                    (let* ((out (assoc-ref outputs "out"))
-                           (mandir (string-append out "/share/man"))
-                           (browser "icecat -remote \"OpenURL(%s,new-tab)\""))
-                      (zero? (system* "./configure"
-                                      "--prefix" out
-                                      "--mandir" mandir
-                                      "--browser" browser)))))
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (mandir (string-append out "/share/man"))
+                    (browser "icecat -remote \"OpenURL(%s,new-tab)\""))
+               (zero? (system* "./configure"
+                               "-prefix" out
+                               "-mandir" mandir
+                               "-browser" browser
+                               "-coqide" "opt")))))
          (replace 'build
-                  (lambda _
-                    (zero? (system* "make" "-j" (number->string
-                                                 (parallel-job-count))
-                                    "world"))))
+           (lambda _
+             (zero? (system* "make" "-j" (number->string
+                                          (parallel-job-count))
+                             "world"))))
          (delete 'check)
          (add-after 'install 'check
-                    (lambda _
-                      (with-directory-excursion "test-suite"
-                        (zero? (system* "make"))))))))
+           (lambda _
+             (with-directory-excursion "test-suite"
+               (zero? (system* "make"))))))))
     (home-page "https://coq.inria.fr")
     (synopsis "Proof assistant for higher-order logic")
     (description
@@ -374,7 +411,7 @@ development of computer programs consistent with their formal specification.
 It is developed using Objective Caml and Camlp5.")
     ;; The code is distributed under lgpl2.1.
     ;; Some of the documentation is distributed under opl1.0+.
-    (license (list lgpl2.1 opl1.0+))))
+    (license (list license:lgpl2.1 license:opl1.0+))))
 
 (define-public proof-general
   (package
@@ -452,24 +489,59 @@ It is developed using Objective Caml and Camlp5.")
      "Proof General is a major mode to turn Emacs into an interactive proof
 assistant to write formal mathematical proofs using a variety of theorem
 provers.")
-    (license gpl2+)))
+    (license license:gpl2+)))
+
+(define-public ocaml-menhir
+  (package
+    (name "ocaml-menhir")
+    (version "20161115")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://gallium.inria.fr/~fpottier/menhir/"
+                    "menhir-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1j8nmcj2gq6hyyi16z27amiahplgrnk4ppchpm0v4qy80kwkf47k"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("ocaml" ,ocaml)))
+    (arguments
+     `(#:parallel-build? #f ; Parallel build causes failure
+       #:tests? #f ; No check target
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (setenv "PREFIX" out))
+             #t)))))
+    (home-page "http://gallium.inria.fr/~fpottier/menhir")
+    (synopsis "Parser generator")
+    (description "Menhir is a parser generator.  It turns high-level grammar
+specifications, decorated with semantic actions expressed in the OCaml
+programming language into parsers, again expressed in OCaml. It is based on
+Knuth’s LR(1) parser construction technique.")
+    ;; The file src/standard.mly and all files listed in src/mnehirLib.mlpack
+    ;; that have an *.ml or *.mli extension are GPL licensed. All other files
+    ;; are QPL licensed.
+    (license (list license:gpl2+ license:qpl))))
 
 (define-public lablgtk
   (package
     (name "lablgtk")
-    (version "2.18.3")
-    (source
-      (origin
-        (method url-fetch)
-          (uri (string-append "https://forge.ocamlcore.org/frs/download.php/"
-                              "1479/lablgtk-2.18.3.tar.gz"))
-          (sha256
-            (base32
-              "1bybn3jafxf4cx25zvn8h2xj9agn1xjbn7j3ywxxqx6az7rfnnwp"))))
+    (version "2.18.5")
+    (source (origin
+              (method url-fetch)
+              (uri (ocaml-forge-uri name version 1627))
+              (sha256
+               (base32
+                "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("camlp4" ,camlp4)
        ("ocaml" ,ocaml)
+       ("findlib" ,ocaml-findlib)
        ("pkg-config" ,pkg-config)))
     ;; FIXME: Add inputs gtkgl-2.0, libpanelapplet-2.0, gtkspell-2.0,
     ;; and gtk+-quartz-2.0 once available.
@@ -484,21 +556,24 @@ provers.")
      `(#:tests? #f ; no check target
 
        ;; opt: also install cmxa files
-       #:make-flags (list "all" "opt")
+       #:make-flags (list "all" "opt"
+                          (string-append "FINDLIBDIR="
+                                         (assoc-ref %outputs "out")
+                                         "/lib/ocaml"))
        ;; Occasionally we would get "Error: Unbound module GtkThread" when
        ;; compiling 'gtkThInit.ml', with 'make -j'.  So build sequentially.
        #:parallel-build? #f
 
        #:phases
          (modify-phases %standard-phases
-           (replace 'install
+           (add-before 'install 'prepare-install
              (lambda* (#:key inputs outputs #:allow-other-keys)
                (let ((out (assoc-ref outputs "out"))
                      (ocaml (assoc-ref inputs "ocaml")))
                  ;; Install into the output and not the ocaml directory.
+                 (mkdir-p (string-append out "/lib/ocaml"))
                  (substitute* "config.make"
                    ((ocaml) out))
-                 (system* "make" "old-install")
                  #t))))))
     (home-page "http://lablgtk.forge.ocamlcore.org/")
     (synopsis "GTK+ bindings for OCaml")
@@ -511,7 +586,7 @@ gdk-pixbuf, the GLArea widget (in combination with LablGL), gnomecanvas,
 gnomeui, gtksourceview, gtkspell,
 libglade (and it an generate OCaml code from .glade files),
 libpanel, librsvg and quartz.")
-    (license lgpl2.1)))
+    (license license:lgpl2.1)))
 
 (define-public unison
   (package
@@ -632,7 +707,7 @@ a collection of files and directories to be stored on different hosts
 (or different disks on the same host), modified separately, and then
 brought up to date by propagating the changes in each replica
 to the other.")
-    (license gpl3+)))
+    (license license:gpl3+)))
 
 (define-public ocaml-findlib
   (package
@@ -666,7 +741,12 @@ to the other.")
                         "-config" (string-append out "/etc/ocamfind.conf")
                         "-mandir" (string-append out "/share/man")
                         "-sitelib" (string-append out "/lib/ocaml/site-lib")
-                        "-with-toolbox")))))))
+                        "-with-toolbox"))))
+                  (add-after 'install 'remove-camlp4
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out")))
+                        (delete-file-recursively
+                          (string-append out "/lib/ocaml/site-lib/camlp4"))))))))
     (home-page "http://projects.camlcity.org/projects/findlib.html")
     (synopsis "Management tool for OCaml libraries")
     (description
@@ -680,4 +760,461 @@ dependency information about multiple packages.  There is also a tool that
 allows the user to enter queries on the command-line.  In order to simplify
 compilation and linkage, there are new frontends of the various OCaml
 compilers that can directly deal with packages.")
-    (license x11)))
+    (license license:x11)))
+
+;; note that some tests may hang for no obvious reason.
+(define-public ocaml-ounit
+  (package
+    (name "ocaml-ounit")
+    (version "2.0.0")
+    (source (origin
+              (method url-fetch)
+              (uri (ocaml-forge-uri "ounit" version 1258))
+              (sha256
+               (base32
+                "118xsadrx84pif9vaq13hv4yh22w9kmr0ypvhrs0viir1jr0ajjd"))))
+    (build-system ocaml-build-system)
+    (native-inputs
+     `(("libxml2" ,libxml2))) ; for xmllint
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; Tests are done during build.
+         (delete 'check))))
+    (home-page "http://ounit.forge.ocamlcore.org")
+    (synopsis "Unit testing framework for OCaml")
+    (description "Unit testing framework for OCaml.  It is similar to JUnit and
+other XUnit testing frameworks.")
+    (license license:expat)))
+
+(define-public camlzip
+  (package
+    (name "camlzip")
+    (version "1.0.6")
+    (source (origin
+              (method url-fetch)
+              (uri (ocaml-forge-uri name version 1616))
+              (sha256
+               (base32
+                "0m6gyjw46w3qnhxfsyqyag42znl5lwargks7w7rfchr9jzwpff68"))))
+    (build-system ocaml-build-system)
+    (inputs
+     `(("zlib" ,zlib)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-before 'install 'fix-install-name
+           (lambda* (#:key #:allow-other-keys)
+             (substitute* "Makefile"
+               (("install zip") "install camlzip")))))
+       #:install-target "install-findlib"
+       #:make-flags
+       (list "all" "allopt"
+             (string-append "INSTALLDIR=" (assoc-ref %outputs "out")
+                            "/lib/ocaml"))))
+    (home-page "http://forge.ocamlcore.org/projects/camlzip")
+    (synopsis "Provides easy access to compressed files")
+    (description "Provides easy access to compressed files in ZIP, GZIP and
+JAR format.  It provides functions for reading from and writing to compressed
+files in these formats.")
+    (license license:lgpl2.1+)))
+
+(define-public ocamlmod
+  (package
+    (name "ocamlmod")
+    (version "0.0.8")
+    (source (origin
+              (method url-fetch)
+              (uri (ocaml-forge-uri name version 1544))
+              (sha256
+               (base32
+                "1w0w8lfyymvk300dv13gvhrddpcyknvyp4g2yvq2vaw7khkhjs9g"))))
+    (build-system ocaml-build-system)
+    (native-inputs
+     `(("ounit" ,ocaml-ounit)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; Tests are done during build.
+         (delete 'check))))
+    (home-page "https://forge.ocamlcore.org/projects/ocamlmod")
+    (synopsis "Generate modules from OCaml source files")
+    (description "Generate modules from OCaml source files.")
+    (license license:lgpl2.1+))) ; with an exception
+
+(define-public ocaml-zarith
+  (package
+    (name "ocaml-zarith")
+    (version "1.4.1")
+    (source (origin
+              (method url-fetch)
+              (uri (ocaml-forge-uri "zarith" version 1574))
+              (sha256
+               (base32
+                "0l36hzmfbvdai2kcgynh13vfdim5x2grnaw61fxqalyjm90c3di3"))))
+    (build-system ocaml-build-system)
+    (native-inputs
+     `(("perl" ,perl)))
+    (inputs
+     `(("gmp" ,gmp)))
+    (arguments
+     `(#:tests? #f ; no test target
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key #:allow-other-keys)
+             (zero? (system* "./configure")))))))
+    (home-page "https://forge.ocamlcore.org/projects/zarith/")
+    (synopsis "Implements arbitrary-precision integers")
+    (description "Implements arithmetic and logical operations over
+arbitrary-precision integers.  It uses GMP to efficiently implement arithmetic
+over big integers. Small integers are represented as Caml unboxed integers,
+for speed and space economy.")
+    (license license:lgpl2.1+))) ; with an exception
+
+(define-public ocaml-frontc
+  (package
+    (name "ocaml-frontc")
+    (version "3.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://www.irit.fr/recherches/ARCHI/MARCH/"
+                                  "frontc/Frontc-" version ".tgz"))
+              (sha256
+               (base32
+                "16dz153s92dgbw1rrfwbhscy73did87kfmjwyh3qpvs748h1sc4g"))))
+    (build-system ocaml-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-after 'install 'install-meta
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (with-output-to-file
+                   (string-append out "/lib/ocaml/frontc/META")
+                 (lambda _
+                   (display
+                    (string-append
+                     "description = \"Parser for the C language\"
+version = \"" ,version "\"
+requires = \"unix\"
+archive(byte) = \"frontc.cma\"
+archive(native) = \"frontc.cmxa\""))))
+               (symlink (string-append out "/lib/ocaml/frontc")
+                        (string-append out "/lib/ocaml/FrontC"))))))
+       #:make-flags (list (string-append "PREFIX="
+                                         (assoc-ref %outputs "out"))
+                          "OCAML_SITE=$(LIB_DIR)/ocaml/")))
+    (home-page "https://www.irit.fr/FrontC")
+    (synopsis "C parser and lexer library")
+    (description "FrontC is an OCAML library providing a C parser and lexer.
+The result is a syntactic tree easy to process with usual OCAML tree management.
+It provides support for ANSI C syntax, old-C K&R style syntax and the standard
+GNU CC attributes.  It provides also a C pretty printer as an example of use.")
+    (license license:lgpl2.1)))
+
+(define-public ocaml-qtest
+  (package
+    (name "ocaml-qtest")
+    (version "2.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/vincent-hugot/iTeML/"
+                                  "archive/v" version ".tar.gz"))
+              (sha256
+               (base32
+                "1n7x5l6h4j44f75wzgzjsjkq349i4gj707w1hr7fx84igxxfr6vl"))))
+    (build-system ocaml-build-system)
+    (native-inputs
+     `(("findlib" ,ocaml-findlib)))
+    (propagated-inputs
+     `(("ounit" ,ocaml-ounit)))
+    (arguments
+     `(#:tests? #f ; No test target.
+       #:make-flags
+       (list (string-append "BIN=" (assoc-ref %outputs "out") "/bin"))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (home-page "https://github.com/vincent-hugot/iTeML")
+    (synopsis "Inline (Unit) Tests for OCaml")
+    (description "Qtest extracts inline unit tests written using a special
+syntax in comments.  Those tests are then run using the oUnit framework and the
+qcheck library.  The possibilities range from trivial tests -- extremely simple
+to use -- to sophisticated random generation of test cases.")
+    (license license:lgpl3+)))
+
+(define-public ocaml-stringext
+  (package
+    (name "ocaml-stringext")
+    (version "1.4.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/rgrinberg/stringext"
+                                  "/archive/v" version ".tar.gz"))
+              (sha256
+               (base32
+                "19g6lfn03iki9f8h91hi0yiqn0b3wkxyq08b3y23wgv6jw6mssfh"))))
+    (build-system ocaml-build-system)
+    (native-inputs
+     `(("qtest" ,ocaml-qtest)))
+    (home-page "https://github.com/rgrinberg/stringext")
+    (synopsis "Extra string functions for OCaml")
+    (description "Provides a single module named Stringext that provides a grab
+bag of often used but missing string functions from the stdlib.  E.g, split,
+full_split, cut, rcut, etc..")
+    ;; the only mention of a license in this project is in its `opam' file
+    ;; where it says `mit'.
+    (license license:expat)))
+
+
+(define-public ocaml-bisect
+  (package
+    (name "ocaml-bisect")
+    (version "1.3")
+    (source (origin
+              (method url-fetch)
+              (uri (ocaml-forge-uri "bisect" version 1051))
+              (sha256
+               (base32
+                "0kcg2rh0qlkfpbv3nhcb75n62b04gbrz0zasq15ynln91zd5qrg0"))
+              (patches
+               (search-patches
+                "ocaml-bisect-fix-camlp4-in-another-directory.patch"))))
+    (build-system ocaml-build-system)
+    (native-inputs
+     `(("camlp4" ,camlp4)
+       ("libxml2" ,libxml2)
+       ("which" ,which)))
+    (propagated-inputs
+     `(("camlp4" ,camlp4)))
+    (arguments
+     `(#:test-target "tests"
+       #:make-flags
+       (list "all" (string-append "CAMLP4_LIBDIR="
+                                  (assoc-ref %build-inputs "camlp4")
+                                  "/lib/ocaml/site-lib/camlp4"))
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (zero? (system* "./configure" "-prefix"
+                             (assoc-ref outputs "out"))))))))
+    (home-page "http://bisect.x9c.fr")
+    (synopsis "Code coverage tool for the OCaml language")
+    (description "Bisect is a code coverage tool for the OCaml language.  It is
+a camlp4-based tool that allows to instrument your application before running
+tests.  After application execution, it is possible to generate a report in HTML
+format that is the replica of the application source code annotated with code
+coverage information.")
+    (license license:gpl3+)))
+
+(define-public ocaml-bitstring
+  (package
+    (name "ocaml-bitstring")
+    (version "2.1.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/xguerin/bitstring"
+                                  "/archive/v" version ".tar.gz"))
+              (sha256
+               (base32
+                "0miw4banfpmx4kxrckpqr57b1fcmsqdmspyjx6gqjd4kghm4l7xj"))
+              (patches (search-patches "ocaml-bitstring-fix-configure.patch"))))
+    (build-system ocaml-build-system)
+    (native-inputs
+     `(("camlp4" ,camlp4)
+       ("time" ,time)
+       ("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("bisect" ,ocaml-bisect)))
+    (propagated-inputs
+     `(("camlp4" ,camlp4)))
+    (arguments
+     `(#:configure-flags
+       (list "CAMLP4OF=camlp4of" "--enable-coverage")
+       #:make-flags
+       (list (string-append "BISECTLIB="
+                            (assoc-ref %build-inputs "bisect")
+                            "/lib/ocaml/site-lib")
+             (string-append "OCAMLCFLAGS=-g -I "
+                            (assoc-ref %build-inputs "camlp4")
+                            "/lib/ocaml/site-lib/camlp4 -I "
+                            "$(BISECTLIB)/bisect")
+             (string-append "OCAMLOPTFLAGS=-g -I "
+                            (assoc-ref %build-inputs "camlp4")
+                            "/lib/ocaml/site-lib/camlp4 -I "
+                            "$(BISECTLIB)/bisect"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'fix-configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "Makefile.in"
+               (("@abs_top_builddir@")
+                (string-append "@abs_top_builddir@:" (getenv "LIBRARY_PATH"))))
+             (substitute* "configure"
+               (("-/bin/sh") (string-append "-" (assoc-ref inputs "bash")
+                                            "/bin/sh")))))
+         (add-after 'install 'link-lib
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (stubs (string-append out
+                                          "/lib/ocaml/site-lib/stubslibs"))
+                    (lib (string-append out
+                                        "/lib/ocaml/site-lib/bitstring")))
+               (mkdir-p stubs)
+               (symlink (string-append lib "/dllbitstring.so")
+                        (string-append stubs "/dllbitstring.so"))))))))
+    (home-page "https://github.com/xguerin/bitstring")
+    (synopsis "Bitstrings and bitstring matching for OCaml")
+    (description "Adds Erlang-style bitstrings and matching over bitstrings as
+a syntax extension and library for OCaml.  You can use this module to both parse
+and generate binary formats, files and protocols.  Bitstring handling is added
+as primitives to the language, making it exceptionally simple to use and very
+powerful.")
+    (license license:isc)))
+
+(define-public ocaml-result
+  (package
+    (name "ocaml-result")
+    (version "1.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/janestreet/result"
+                                  "/archive/" version ".tar.gz"))
+              (sha256
+               (base32
+                "1pgpfsgvhxnh0i37fkvp9j8nadns9hz9iqgabj4dr519j2gr1xvw"))))
+    (build-system ocaml-build-system)
+    (arguments
+     `(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (home-page "https://github.com/janestreet/result")
+    (synopsis "Compatibility Result module")
+    (description "Uses the new result type defined in OCaml >= 4.03 while
+staying compatible with older version of OCaml should use the Result module
+defined in this library.")
+    (license license:bsd-3)))
+
+(define-public ocaml-topkg
+  (package
+    (name "ocaml-topkg")
+    (version "0.8.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://erratique.ch/software/topkg/releases/"
+                                  "topkg-" version ".tbz"))
+              (sha256
+               (base32
+                "18rrh6fmf708z7dd30amljmcgaypj3kk49jrmrj68r4wnw8004j8"))))
+    (build-system ocaml-build-system)
+    (native-inputs
+     `(("opam" ,opam)))
+    (propagated-inputs
+     `(("result" ,ocaml-result)))
+    (arguments
+     `(#:tests? #f
+       #:build-flags '("build")
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (home-page "http://erratique.ch/software/topkg")
+    (synopsis "Transitory OCaml software packager")
+    (description "Topkg is a packager for distributing OCaml software. It
+provides an API to describe the files a package installs in a given build
+configuration and to specify information about the package's distribution,
+creation and publication procedures.")
+    (license license:isc)))
+
+(define-public ocaml-rresult
+  (package
+    (name "ocaml-rresult")
+    (version "0.5.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://erratique.ch/software/rresult/releases/"
+                                  "rresult-" version ".tbz"))
+              (sha256
+               (base32
+                "1xxycxhdhaq8p9vhwi93s2mlxjwgm44fcxybx5vghzgbankz9yhm"))))
+    (build-system ocaml-build-system)
+    (native-inputs
+     `(("opam" ,opam)))
+    (propagated-inputs
+     `(("topkg" ,ocaml-topkg)))
+    (arguments
+     `(#:tests? #f
+       #:build-flags '("build")
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (home-page "http://erratique.ch/software/rresult")
+    (synopsis "Result value combinators for OCaml")
+    (description "Handle computation results and errors in an explicit and
+declarative manner, without resorting to exceptions.  It defines combinators
+to operate on the result type available from OCaml 4.03 in the standard
+library.")
+    (license license:isc)))
+
+(define-public ocaml-mtime
+  (package
+    (name "ocaml-mtime")
+    (version "0.8.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://erratique.ch/software/mtime/releases/"
+                                  "mtime-" version ".tbz"))
+              (sha256
+               (base32
+                "1hfx4ny2dkw6jf3jppz0640dafl5xgn8r2si9kpwzhmibal8qrah"))))
+    (build-system ocaml-build-system)
+    (native-inputs
+     `(("opam" ,opam)))
+    (propagated-inputs
+     `(("topkg" ,ocaml-topkg)))
+    (arguments
+     `(#:tests? #f
+       #:build-flags
+       '("native=true" "native-dynlink=true" "jsoo=false")
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (home-page "http://erratique.ch/software/mtime")
+    (synopsis "Monotonic wall-clock time for OCaml")
+    (description "Access monotonic wall-clock time.  It allows to measure time
+spans without being subject to operating system calendar time adjustments.")
+    (license license:isc)))
+
+(define-public ocaml-cmdliner
+  (package
+    (name "ocaml-cmdliner")
+    (version "0.9.8")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://erratique.ch/software/cmdliner/releases/"
+                                  "cmdliner-" version ".tbz"))
+              (sha256
+               (base32
+                "0hdxlkgiwjml9dpaa80282a8350if7mc1m6yz2mrd7gci3fszykx"))))
+    (build-system ocaml-build-system)
+    (native-inputs
+     `(("opam" ,opam)))
+    (arguments
+     `(#:tests? #f
+       #:build-flags '("native=true" "native-dynlink=true")
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (home-page "http://erratique.ch/software/cmdliner")
+    (synopsis "Declarative definition of command line interfaces for OCaml")
+    (description "Cmdliner is a module for the declarative definition of command
+line interfaces.  It provides a simple and compositional mechanism to convert
+command line arguments to OCaml values and pass them to your functions.  The
+module automatically handles syntax errors, help messages and UNIX man page
+generation. It supports programs with single or multiple commands and respects
+most of the POSIX and GNU conventions.")
+    (license license:bsd-3)))
diff --git a/gnu/packages/onc-rpc.scm b/gnu/packages/onc-rpc.scm
index 0bcc885c39..5353846ece 100644
--- a/gnu/packages/onc-rpc.scm
+++ b/gnu/packages/onc-rpc.scm
@@ -43,11 +43,19 @@
        (modify-phases %standard-phases
          (add-after 'unpack 'remote-dangling-symlink
            (lambda _
+             (substitute* '("man/netconfig.5"
+                            "man/getnetconfig.3t"
+                            "man/getnetpath.3t"
+                            "man/rpc.3t"
+                            "src/getnetconfig.c"
+                            "tirpc/netconfig.h")
+               (("/etc/netconfig") (string-append %output "/etc/netconfig")))
+
              ;; Remove the dangling symlinks since it breaks the
              ;; 'patch-source-shebangs' file tree traversal.
              (delete-file "INSTALL"))))))
     (inputs `(("mit-krb5" ,mit-krb5)))
-    (home-page "http://sourceforge.net/projects/libtirpc/")
+    (home-page "https://sourceforge.net/projects/libtirpc/")
     (synopsis "Transport-independent Sun/ONC RPC implementation")
     (description
      "This package provides a library that implements the Sun/ONC RPC (remote
diff --git a/gnu/packages/openstack.scm b/gnu/packages/openstack.scm
index 43a6490b22..e2672668d8 100644
--- a/gnu/packages/openstack.scm
+++ b/gnu/packages/openstack.scm
@@ -49,9 +49,8 @@
         ("python-pyyaml" ,python-pyyaml)
         ("python-six" ,python-six)
         ("python-stevedore" ,python-stevedore)))
-    (inputs
+    (native-inputs
       `(("python-pbr" ,python-pbr)
-        ("python-setuptools" ,python-setuptools)
         ;; Tests
         ("python-fixtures" ,python-fixtures)
         ("python-mock" ,python-mock)
@@ -85,10 +84,9 @@ all the files it generates a report.")
     (propagated-inputs
      `(("python-six" ,python-six)
        ("python-wrapt" ,python-wrapt)))
-    (inputs
+    (native-inputs
       `(("python-babel" ,python-babel)
         ("python-pbr" ,python-pbr)
-        ("python-setuptools" ,python-setuptools)
         ;; Tests.
         ("python-oslotest" ,python-oslotest)))
     (home-page "http://www.openstack.org/")
@@ -122,9 +120,8 @@ manner.")
         ("python-pep8-1.5.7" ,python-pep8-1.5.7)
         ("python-pyflakes-0.8.1" ,python-pyflakes-0.8.1)
         ("python-six" ,python-six)))
-    (inputs
-      `(("python-setuptools" ,python-setuptools)
-        ;; Tests
+    (native-inputs
+      `(;; Tests
         ("python-testscenarios" ,python-testscenarios)))
     (home-page "http://github.com/openstack-dev/hacking")
     (synopsis "OpenStack hacking guideline enforcement")
@@ -152,8 +149,6 @@ guidelines}.")
     (native-inputs
       `(("python-fixtures" ,python-fixtures)
         ("python-pbr" ,python-pbr)
-        ("python-setuptools" ,python-setuptools)
-        ("python-six" ,python-six)
         ("python-testtools" ,python-testtools)))
     (home-page "http://www.openstack.org/")
     (synopsis "Mock object framework for Python")
@@ -181,14 +176,14 @@ tested on Python version 3.2, 2.7 and 2.6.")
     (build-system python-build-system)
     (arguments
      `(#:tests? #f)) ;; Circular dependency with python-oslotest
-    (inputs
+    (propagated-inputs
       `(("python-appdirs" ,python-appdirs)
+        ("python-pyyaml" ,python-pyyaml)))
+    (native-inputs
+      `(("python-pbr" ,python-pbr)
         ("python-fixtures" ,python-fixtures)
         ("python-mimeparse" ,python-mimeparse)
-        ("python-pbr" ,python-pbr)
-        ("python-pyyaml" ,python-pyyaml)
         ("python-testrepository" ,python-testrepository)
-        ("python-setuptools" ,python-setuptools)
         ("python-testscenarios" ,python-testscenarios)
         ("python-testtools" ,python-testtools)))
     (home-page "http://www.openstack.org/")
@@ -221,12 +216,11 @@ tested on Python version 3.2, 2.7 and 2.6.")
      ;; when building the package. Skip the tests for now.
      `(#:tests? #f))
     (propagated-inputs
+     `(("python-subunit" ,python-subunit)))
+    (native-inputs
      `(("python-pbr" ,python-pbr)
-       ("python-subunit" ,python-subunit)
-       ("python-testtools" ,python-testtools)))
-    (inputs
-      `(("python-babel" ,python-babel)
-        ("python-setuptools" ,python-setuptools)))
+       ("python-testtools" ,python-testtools)
+       ("python-babel" ,python-babel)))
     (home-page "https://www.openstack.org/")
     (synopsis "Testr wrapper to provide functionality for OpenStack projects")
     (description
@@ -252,10 +246,9 @@ tested on Python version 3.2, 2.7 and 2.6.")
     (propagated-inputs
      `(("python-requests" ,python-requests)
        ("python-six" ,python-six)))
-    (inputs
-     `(("python-pbr" ,python-pbr)))
     (native-inputs
-     `(("python-discover" ,python-discover)
+     `(("python-pbr" ,python-pbr)
+       ("python-discover" ,python-discover)
        ("python-docutils" ,python-docutils)
        ("python-fixtures" ,python-fixtures)
        ("python-mock" ,python-mock)
@@ -267,16 +260,10 @@ tested on Python version 3.2, 2.7 and 2.6.")
     (description
       "This module provides a building block to stub out the HTTP requests
 portions of your testing code.")
-    (license asl2.0)
-    (properties `((python2-variant . ,(delay python2-requests-mock))))))
+    (license asl2.0)))
 
 (define-public python2-requests-mock
-  (let ((base (package-with-python2
-                (strip-python2-variant python-requests-mock))))
-    (package (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-requests-mock))
 
 (define-public python-stevedore
   (package
@@ -292,10 +279,8 @@ portions of your testing code.")
     (build-system python-build-system)
     (propagated-inputs
       `(("python-six" ,python-six)))
-    (inputs
-      `(("python-pbr" ,python-pbr)))
     (native-inputs
-      `(("python-setuptools" ,python-setuptools)
+      `(("python-pbr" ,python-pbr)
         ;; Tests
         ("python-docutils" ,python-docutils)
         ("python-mock" ,python-mock)
@@ -346,12 +331,11 @@ extensions.")
         ("python-paramiko" ,python-paramiko)
         ("python-pbr" ,python-pbr)
         ("python-six" ,python-six)))
-    (inputs
+    (native-inputs
       `(("python-babel" ,python-babel)
         ("python-mock" ,python-mock)
         ("python-os-testr" ,python-os-testr)
-        ("python-oslotest" ,python-oslotest)
-        ("python-setuptools" ,python-setuptools)))
+        ("python-oslotest" ,python-oslotest)))
     (home-page "https://www.openstack.org/")
     (synopsis "OpenStack functional testing library")
     (description
@@ -382,9 +366,8 @@ common features used in Tempest.")
       `(("python-netaddr" ,python-netaddr)
         ("python-six" ,python-six)
         ("python-stevedore" ,python-stevedore)))
-    (inputs
+    (native-inputs
       `(("python-pbr" ,python-pbr)
-        ("python-setuptools" ,python-setuptools)
         ;; Tests
         ("python-oslo.i18n" ,python-oslo.i18n)
         ("python-mock" ,python-mock)
@@ -412,10 +395,9 @@ common features used in Tempest.")
         (base32
          "0kvha0rs9295njyl2z6n6zm5dapi5mrl5zwjm0m6ldqrvccyf8c3"))))
     (build-system python-build-system)
-    (inputs
+    (native-inputs
       `(("python-babel" ,python-babel)
         ("python-pbr" ,python-pbr)
-        ("python-setuptools" ,python-setuptools)
         ;; Tests.
         ("python-oslotest" ,python-oslotest)))
     (home-page "http://launchpad.net/oslo")
@@ -444,9 +426,8 @@ pipeline and used by various modules such as logging.")
     (propagated-inputs
       `(("python-babel" ,python-babel)
         ("python-six" ,python-six)))
-    (inputs
+    (native-inputs
       `(("python-pbr" ,python-pbr)
-        ("python-setuptools" ,python-setuptools)
         ;; Tests
         ("python-mock" ,python-mock)
         ("python-mox3" ,python-mox3)
@@ -486,13 +467,12 @@ in an application or library.")
      ("python-oslo.utils" ,python-oslo.utils)
      ("python-oslo.serialization" ,python-oslo.serialization)
      ("python-six" ,python-six)))
-  (inputs
+  (native-inputs
     `(("python-babel" ,python-babel)
       ("python-iso8601" ,python-iso8601)
       ("python-mock" ,python-mock)
       ("python-oslotest" ,python-oslotest)
-      ("python-pbr" ,python-pbr)
-      ("python-setuptools" ,python-setuptools)))
+      ("python-pbr" ,python-pbr)))
   (home-page "http://launchpad.net/oslo")
   (synopsis "Python logging library of the Oslo project")
   (description
@@ -523,10 +503,9 @@ handlers and support for context specific logging (like resource id’s etc).")
         ("python-simplejson" ,python-simplejson)
         ("python-six" ,python-six)
         ("python-pytz" ,python-pytz)))
-    (inputs
+    (native-inputs
       `(("python-babel" ,python-babel)
         ("python-pbr" ,python-pbr)
-        ("python-setuptools" ,python-setuptools)
         ;; Tests.
         ("python-mock" ,python-mock)
         ("python-oslo.i18n" ,python-oslo.i18n)
@@ -555,11 +534,10 @@ in transmittable and storable formats, such as JSON and MessagePack.")
     (build-system python-build-system)
     (propagated-inputs
       `(("python-requests" ,python-requests)))
-    (inputs
+    (native-inputs
       `(("python-pbr" ,python-pbr)
         ("python-docutils" ,python-docutils)
         ("python-hacking" ,python-hacking)
-        ("python-setuptools" ,python-setuptools)
         ("python-sphinx" ,python-sphinx)))
     (home-page "http://www.openstack.org/")
     (synopsis "OpenStack sphinx extensions and theme")
@@ -591,10 +569,9 @@ from the OpenStack project.")
         ("python-mock" ,python-mock)
         ("python-mox3" ,python-mox3)
         ("python-six" ,python-six)))
-    (inputs
+    (native-inputs
       `(("python-pbr" ,python-pbr)
         ("python-os-client-config" ,python-os-client-config)
-        ("python-setuptools" ,python-setuptools)
         ("python-subunit" ,python-subunit)
         ("python-testrepository" ,python-testrepository)
         ("python-testscenarios" ,python-testscenarios)
@@ -635,10 +612,9 @@ and better support for mocking results.")
         ("python-netifaces" ,python-netifaces)
         ("python-pytz" ,python-pytz)
         ("python-six" ,python-six)))
-    (inputs
+    (native-inputs
       `(("python-babel" ,python-babel)
         ("python-pbr" ,python-pbr)
-        ("python-setuptools" ,python-setuptools)
         ;; Tests.
         ("python-oslotest" ,python-oslotest)
         ("python-mock" ,python-mock)
@@ -668,8 +644,7 @@ handling.")
           "1w4csvkah67rfpxylxnvs2s3594i0f9isy8pf4gnsqs5zirvjaa4"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-sphinx" ,python-sphinx)
+     `(("python-sphinx" ,python-sphinx)
        ;; and some packages for the tests
        ("openssl" ,openssl)
        ("python-coverage" ,python-coverage)
@@ -744,7 +719,6 @@ LDAP.")
     (build-system python-build-system)
     (native-inputs
      `(("python-pbr" ,python-pbr)
-       ("python-setuptools" ,python-setuptools)
        ("python-sphinx" ,python-sphinx)
        ;; The folloing packages are needed for the tests.
        ("python-coverage" ,python-coverage)
@@ -814,9 +788,10 @@ permanence.")
                          (list git openssh))))))))))
     (native-inputs
      `(("python-pbr" ,python-pbr)))
+    (propagated-inputs
+     `(("python-requests" ,python-requests)))
     (inputs
-     `(("python-requests" ,python-requests)
-       ("git" ,git)
+     `(("git" ,git)
        ("openssh" ,openssh)))
     (home-page "http://docs.openstack.org/infra/git-review/")
     (synopsis "Command-line tool for Gerrit")
@@ -826,8 +801,4 @@ Gerrit for review, or fetching existing ones.")
     (license asl2.0)))
 
 (define-public python2-git-review
-  (let ((base (package-with-python2 (strip-python2-variant python-git-review))))
-    (package (inherit base)
-             (native-inputs
-              `(("python2-setuptools" ,python2-setuptools)
-                ,@(package-native-inputs base))))))
+  (package-with-python2 python-git-review))
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 051dff34b7..23f34cd306 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -44,13 +44,15 @@
   #:use-module (gnu packages curl)
   #:use-module (gnu packages web)
   #:use-module (gnu packages man)
-  #:use-module (gnu packages emacs)
   #:use-module (gnu packages bdw-gc)
+  #:use-module (gnu packages patchutils)
   #:use-module (gnu packages python)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages gnuzilla)
   #:use-module (gnu packages cpio)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages ssh)
+  #:use-module (gnu packages vim)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
   #:use-module (ice-9 popen)
@@ -67,17 +69,17 @@
                      arch "-linux"
                      "/20131110/guile-2.0.9.tar.xz")))
 
-(define-public guix-0.11.0
+(define-public guix-0.12.0
   (package
     (name "guix")
-    (version "0.11.0")
+    (version "0.12.0")
     (source (origin
              (method url-fetch)
              (uri (string-append "ftp://alpha.gnu.org/gnu/guix/guix-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "1cwrbpv4dq7aczwksmcfw9w8r2bzrb5ld9zvjcr90i804hjpcb93"))))
+               "1jgy5mlygmhxdqhrp6vr8w83ndcm5mk64xfravr8l2d7hq8y40b2"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags (list
@@ -120,7 +122,7 @@
                    ;; XXX FIXME: These tests fail within the build container.
                    (lambda _
                      (substitute* "tests/syscalls.scm"
-                       (("^\\(test-assert \"(clone|setns|pivot-root)\"" all)
+                       (("^\\(test-(assert|equal) \"(clone|setns|pivot-root)\"" all)
                         (string-append "(test-skip 1)\n" all)))
                      (substitute* "tests/containers.scm"
                        (("^\\(test-(assert|equal)" all)
@@ -143,9 +145,11 @@
                      ;; Guile-JSON automatically.
                      (let* ((out    (assoc-ref outputs "out"))
                             (json   (assoc-ref inputs "guile-json"))
+                            (ssh    (assoc-ref inputs "guile-ssh"))
                             (gnutls (assoc-ref inputs "gnutls"))
                             (path   (string-append
                                      json "/share/guile/site/2.0:"
+                                     ssh "/share/guile/site/2.0:"
                                      gnutls "/share/guile/site/2.0")))
 
                        ;; Ignore user settings so that a bogus
@@ -159,7 +163,6 @@
 
                        #t))))))
     (native-inputs `(("pkg-config" ,pkg-config)
-                     ("emacs" ,emacs-minimal)     ;for guix.el
 
                      ;; XXX: Keep the development inputs here even though
                      ;; they're unnecessary, just so that 'guix environment
@@ -203,8 +206,7 @@
     (propagated-inputs
      `(("gnutls" ,gnutls)                         ;for 'guix download' & co.
        ("guile-json" ,guile-json)
-       ("geiser" ,geiser)                         ;for guix.el
-       ("emacs-magit-popup" ,emacs-magit-popup))) ;for "M-x guix" command
+       ("guile-ssh" ,guile-ssh)))
 
     (home-page "http://www.gnu.org/software/guix")
     (synopsis "Functional package manager for installed software packages and versions")
@@ -222,9 +224,9 @@ the Nix package manager.")
   ;;
   ;; Note: use a very short commit id; with a longer one, the limit on
   ;; hash-bang lines would be exceeded while running the tests.
-  (let ((commit "1f410017ff91458feda8c5788223d17696b71e36"))
-    (package (inherit guix-0.11.0)
-      (version (string-append "0.11.0-4." (string-take commit 4)))
+  (let ((commit "b291b3271a025dfe41e1a7fdfadd393373b0128d"))
+    (package (inherit guix-0.12.0)
+      (version (string-append "0.12.0-2." (string-take commit 4)))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
@@ -234,10 +236,10 @@ the Nix package manager.")
                       (commit commit)))
                 (sha256
                  (base32
-                  "1mgzcbf1mry39wvvjflj76zggsshsip2pngxpaf2479yr3ri6v50"))
+                  "1hris387xn2wk4lcl20x1zyhiz96060w34xs1x13b4vmvkkvcpg4"))
                 (file-name (string-append "guix-" version "-checkout"))))
       (arguments
-       (substitute-keyword-arguments (package-arguments guix-0.11.0)
+       (substitute-keyword-arguments (package-arguments guix-0.12.0)
          ((#:configure-flags flags)
           ;; Set 'DOT_USER_PROGRAM' to the empty string so we don't keep a
           ;; reference to Graphviz, whose closure is pretty big (too big for
@@ -478,13 +480,13 @@ transactions from C or Python.")
 (define-public diffoscope
   (package
     (name "diffoscope")
-    (version "62")
+    (version "63")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri name version))
               (sha256
                (base32
-                "127b4gsw11hjbha5jpz5i42pc142h52pwzs1p792047y0j1yjg8z"))))
+                "12q5d2nszql1g4jf2ss863v0wpvvhrkaivqzhy6af9m9zwvw0p0k"))))
     (build-system python-build-system)
     (arguments
      `(#:phases (modify-phases %standard-phases
@@ -495,26 +497,28 @@ transactions from C or Python.")
                     (lambda _
                       (substitute* "setup.py"
                         (("'python-magic',") ""))))
-                  ;; The test suite assumes we have pytest >= 2.9.0.
-                  ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=841146
-                  (add-after 'unpack 'disable-failing-test
-                    (lambda _
-                      (substitute* "tests/comparators/utils.py"
-                        (("skip\\(reason\\=\\\"requires \\{\\}\\\"\\.format\\(tool\\)\\)")
-                          "skipif(True, reason=\"Requires pytest >= 2.9\")"))))
-                  (add-before 'build 'disable-egg-zipping
-                    (lambda _
-                      ;; Leave the .egg file uncompressed.
-                      (let ((port (open-file "setup.cfg" "a")))
-                        (display "\n[easy_install]\nzip_ok = 0\n"
-                                 port)
-                        (close-port port)
-                        #t))))))
+                  (add-after 'unpack 'embed-tool-references
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (substitute* "diffoscope/difference.py"
+                        (("@tool_required\\('colordiff'\\)") "")
+                        (("\\[\"colordiff\"")
+                         (string-append "[\"" (which "colordiff") "\"")))
+                      (substitute* "diffoscope/comparators/utils.py"
+                        (("@tool_required\\('xxd'\\)") "")
+                        (("\\['xxd',")
+                         (string-append "['" (which "xxd") "',")))
+                      (substitute* "diffoscope/comparators/elf.py"
+                        (("@tool_required\\('readelf'\\)") "")
+                        (("\\['readelf',")
+                         (string-append "['" (which "readelf") "',")))
+                      #t)))))
     (inputs `(("rpm" ,rpm)                        ;for rpm-python
               ("python-file" ,python-file)
               ("python-debian" ,python-debian)
               ("python-libarchive-c" ,python-libarchive-c)
               ("python-tlsh" ,python-tlsh)
+              ("colordiff" ,colordiff)
+              ("xxd" ,vim)
 
               ;; Below are modules used for tests.
               ("python-pytest" ,python-pytest)
diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm
index 89195f31c2..097e4e182b 100644
--- a/gnu/packages/parallel.scm
+++ b/gnu/packages/parallel.scm
@@ -45,7 +45,7 @@
 (define-public parallel
   (package
     (name "parallel")
-    (version "20161022")
+    (version "20161222")
     (source
      (origin
       (method url-fetch)
@@ -53,7 +53,7 @@
                           version ".tar.bz2"))
       (sha256
        (base32
-        "1mz82chm5qav6h64rcckxzabr7w4ma0sjx61xav85x0swgcbjdsr"))))
+        "1chgr3csyc7hbq2wq4jnwnbsr3ix8rzsk2lf4vdnvkjpd6dvw517"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 55c14762e9..f8111b2abf 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
+;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,8 +34,8 @@
   #:use-module (gnu packages admin)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages glib)
   #:use-module (gnu packages gnupg)
-  #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages man)
@@ -216,7 +217,7 @@ random passwords that pass the checks.")
 (define-public assword
   (package
     (name "assword")
-    (version "0.8")
+    (version "0.10")
     (source (origin
               (method url-fetch)
               (uri (list
@@ -225,10 +226,9 @@ random passwords that pass the checks.")
                      "assword_" version ".orig.tar.gz")))
               (sha256
                (base32
-                "0dl4wizbi0r21wxzykm8s445xbvqim5nabi799dmpkdnnh8i546i"))))
+                "0l6170y6my1gprqkazvzabgjkrkr9v2q7z48vjflna4r323yqira"))))
     (arguments
-     `(#:python ,python-2
-       ;; irritatingly, tests do run but not there are two problems:
+     `(;; irritatingly, tests do run but not there are two problems:
        ;;  - "import gtk" fails for unknown reasons here despite it the
        ;;    program working (indeed, I've found I have to do a logout and log
        ;;    back in in after an install order for some mumbo jumbo environment
@@ -242,18 +242,21 @@ random passwords that pass the checks.")
          (add-after 'install 'manpage
            (lambda* (#:key outputs #:allow-other-keys)
              (and
+              ;; Without this substitution, it fails with
+              ;; ImportError: No module named 'gpg'
+              (substitute* "Makefile"
+                (("PYTHONPATH=.") ""))
               (zero? (system* "make" "assword.1"))
               (install-file
                "assword.1"
                (string-append (assoc-ref outputs "out") "/share/man/man1"))))))))
     (build-system python-build-system)
     (native-inputs
-     `(("help2man" ,help2man)))
+     `(("txt2man" ,txt2man)))
     (inputs
-     `(("python-setuptools" ,python2-setuptools)
-       ("python2-xdo" ,python2-xdo)
-       ("python2-pygpgme" ,python2-pygpgme)
-       ("python2-pygtk" ,python2-pygtk)))
+     `(("python-xdo" ,python-xdo)
+       ("python-gpg" ,python-gpg)
+       ("python-pygobject" ,python-pygobject)))
     (propagated-inputs
      `(("xclip" ,xclip)))
     (home-page "https://finestructure.net/assword/")
@@ -281,6 +284,7 @@ any X11 window.")
      '(#:phases
        (modify-phases %standard-phases
          (delete 'configure)
+         (delete 'build)
          (add-after 'install 'wrap-path
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out"))
@@ -291,6 +295,9 @@ any X11 window.")
                (wrap-program (string-append out "/bin/pass")
                  `("PATH" ":" prefix (,(string-join path ":"))))))))
        #:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
+       ;; Parallel tests may cause a race condition leading to a
+       ;; timeout in some circumstances.
+       #:parallel-tests? #f
        #:test-target "test"))
     (inputs
      `(("getopt" ,util-linux)
@@ -314,18 +321,17 @@ through the pass command.")
 (define-public argon2
   (package
     (name "argon2")
-    (version "20160406")
+    (version "20161029")
     (source
      (origin
        (method url-fetch)
        (uri
-        (string-append
-         "https://codeload.github.com/P-H-C/phc-winner-"
-         name "/tar.gz/" version))
+        (string-append "https://github.com/P-H-C/phc-winner-argon2/archive/"
+                       version ".tar.gz"))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "0g6wa94sh639xl1qc8z21q43r1mp8y77r1zf8nwx5pfsxd8fmyzv"))))
+         "1rymikbysasdadm325jx69i0q19d9srqkny69jwmhswlidr4j07y"))))
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
@@ -362,7 +368,7 @@ winner of the 2015 Password Hashing Competition.")
     (native-inputs
      `(("python-pycparser" ,python-pycparser)
        ("python-pytest" ,python-pytest)))
-    (inputs
+    (propagated-inputs
      `(("python-cffi" ,python-cffi)
        ("python-six" ,python-six)))
     (home-page "https://github.com/pyca/bcrypt/")
@@ -376,8 +382,4 @@ Password Scheme\"} by Niels Provos and David Mazieres.")
     (license license:asl2.0)))
 
 (define-public python2-bcrypt
-  (let ((bcrypt (package-with-python2 python-bcrypt)))
-    (package (inherit bcrypt)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs bcrypt))))))
+  (package-with-python2 python-bcrypt))
diff --git a/gnu/packages/patches/awesome-reproducible-png.patch b/gnu/packages/patches/awesome-reproducible-png.patch
index 0fae65bc71..d8e92c70f9 100644
--- a/gnu/packages/patches/awesome-reproducible-png.patch
+++ b/gnu/packages/patches/awesome-reproducible-png.patch
@@ -7,8 +7,8 @@ See <https://wiki.debian.org/ReproducibleBuilds/TimestampsInPNG>.
          set(ALL_ICONS ${ALL_ICONS} ${output})
  
          add_custom_command(
--            COMMAND ${CONVERT_EXECUTABLE} ${input} ${ARGN} ${output}
-+            COMMAND ${CONVERT_EXECUTABLE} +set date:create +set date:modify -define png:exclude-chunk=time ${input} ${ARGN} ${output}
+-            COMMAND ${CONVERT_EXECUTABLE} ${input} -strip ${ARGN} ${output}
++            COMMAND ${CONVERT_EXECUTABLE} +set date:create +set date:modify -define png:exclude-chunk=time ${input} -strip ${ARGN} ${output}
              OUTPUT  ${output}
              DEPENDS ${input}
              VERBATIM)
diff --git a/gnu/packages/patches/cairo-CVE-2016-9082.patch b/gnu/packages/patches/cairo-CVE-2016-9082.patch
new file mode 100644
index 0000000000..ad83404194
--- /dev/null
+++ b/gnu/packages/patches/cairo-CVE-2016-9082.patch
@@ -0,0 +1,122 @@
+From: Adrian Johnson <ajohnson@redneon.com>
+Date: Thu, 20 Oct 2016 21:12:30 +1030
+Subject: [PATCH] image: prevent invalid ptr access for > 4GB images
+
+Image data is often accessed using:
+
+  image->data + y * image->stride
+
+On 64-bit achitectures if the image data is > 4GB, this computation
+will overflow since both y and stride are 32-bit types.
+
+bug report: https://bugs.freedesktop.org/show_bug.cgi?id=98165
+patch: https://bugs.freedesktop.org/attachment.cgi?id=127421
+---
+ boilerplate/cairo-boilerplate.c     | 4 +++-
+ src/cairo-image-compositor.c        | 4 ++--
+ src/cairo-image-surface-private.h   | 2 +-
+ src/cairo-mesh-pattern-rasterizer.c | 2 +-
+ src/cairo-png.c                     | 2 +-
+ src/cairo-script-surface.c          | 3 ++-
+ 6 files changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/boilerplate/cairo-boilerplate.c b/boilerplate/cairo-boilerplate.c
+index 7fdbf79..4804dea 100644
+--- a/boilerplate/cairo-boilerplate.c
++++ b/boilerplate/cairo-boilerplate.c
+@@ -42,6 +42,7 @@
+ #undef CAIRO_VERSION_H
+ #include "../cairo-version.h"
+ 
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <ctype.h>
+ #include <assert.h>
+@@ -976,7 +977,8 @@ cairo_surface_t *
+ cairo_boilerplate_image_surface_create_from_ppm_stream (FILE *file)
+ {
+     char format;
+-    int width, height, stride;
++    int width, height;
++    ptrdiff_t stride;
+     int x, y;
+     unsigned char *data;
+     cairo_surface_t *image = NULL;
+diff --git a/src/cairo-image-compositor.c b/src/cairo-image-compositor.c
+index 48072f8..3ca0006 100644
+--- a/src/cairo-image-compositor.c
++++ b/src/cairo-image-compositor.c
+@@ -1575,7 +1575,7 @@ typedef struct _cairo_image_span_renderer {
+     pixman_image_t *src, *mask;
+     union {
+ 	struct fill {
+-	    int stride;
++	    ptrdiff_t stride;
+ 	    uint8_t *data;
+ 	    uint32_t pixel;
+ 	} fill;
+@@ -1594,7 +1594,7 @@ typedef struct _cairo_image_span_renderer {
+ 	struct finish {
+ 	    cairo_rectangle_int_t extents;
+ 	    int src_x, src_y;
+-	    int stride;
++	    ptrdiff_t stride;
+ 	    uint8_t *data;
+ 	} mask;
+     } u;
+diff --git a/src/cairo-image-surface-private.h b/src/cairo-image-surface-private.h
+index 8ca694c..7e78d61 100644
+--- a/src/cairo-image-surface-private.h
++++ b/src/cairo-image-surface-private.h
+@@ -71,7 +71,7 @@ struct _cairo_image_surface {
+ 
+     int width;
+     int height;
+-    int stride;
++    ptrdiff_t stride;
+     int depth;
+ 
+     unsigned owns_data : 1;
+diff --git a/src/cairo-mesh-pattern-rasterizer.c b/src/cairo-mesh-pattern-rasterizer.c
+index 1b63ca8..e7f0db6 100644
+--- a/src/cairo-mesh-pattern-rasterizer.c
++++ b/src/cairo-mesh-pattern-rasterizer.c
+@@ -470,7 +470,7 @@ draw_pixel (unsigned char *data, int width, int height, int stride,
+ 	tg += tg >> 16;
+ 	tb += tb >> 16;
+ 
+-	*((uint32_t*) (data + y*stride + 4*x)) = ((ta << 16) & 0xff000000) |
++	*((uint32_t*) (data + y*(ptrdiff_t)stride + 4*x)) = ((ta << 16) & 0xff000000) |
+ 	    ((tr >> 8) & 0xff0000) | ((tg >> 16) & 0xff00) | (tb >> 24);
+     }
+ }
+diff --git a/src/cairo-png.c b/src/cairo-png.c
+index 562b743..aa8c227 100644
+--- a/src/cairo-png.c
++++ b/src/cairo-png.c
+@@ -673,7 +673,7 @@ read_png (struct png_read_closure_t *png_closure)
+     }
+ 
+     for (i = 0; i < png_height; i++)
+-        row_pointers[i] = &data[i * stride];
++        row_pointers[i] = &data[i * (ptrdiff_t)stride];
+ 
+     png_read_image (png, row_pointers);
+     png_read_end (png, info);
+diff --git a/src/cairo-script-surface.c b/src/cairo-script-surface.c
+index ea0117d..91e4baa 100644
+--- a/src/cairo-script-surface.c
++++ b/src/cairo-script-surface.c
+@@ -1202,7 +1202,8 @@ static cairo_status_t
+ _write_image_surface (cairo_output_stream_t *output,
+ 		      const cairo_image_surface_t *image)
+ {
+-    int stride, row, width;
++    int row, width;
++    ptrdiff_t stride;
+     uint8_t row_stack[CAIRO_STACK_BUFFER_SIZE];
+     uint8_t *rowdata;
+     uint8_t *data;
+-- 
+2.1.4
+
diff --git a/gnu/packages/patches/chicken-CVE-2016-6830+CVE-2016-6831.patch b/gnu/packages/patches/chicken-CVE-2016-6830+CVE-2016-6831.patch
new file mode 100644
index 0000000000..59decde0e9
--- /dev/null
+++ b/gnu/packages/patches/chicken-CVE-2016-6830+CVE-2016-6831.patch
@@ -0,0 +1,81 @@
+diff -ur a/irregex-core.scm b/irregex-core.scm
+--- a/irregex-core.scm	2016-09-11 19:03:00.000000000 -0400
++++ b/irregex-core.scm	2017-01-01 22:24:08.000000000 -0500
+@@ -30,6 +30,8 @@
+ 
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;;; History
++;; 0.9.6: 2016/12/05 - fixed exponential memory use of + in compilation
++;;                     of backtracking matcher.
+ ;; 0.9.5: 2016/09/10 - fixed a bug in irregex-fold handling of bow
+ ;; 0.9.4: 2015/12/14 - performance improvement for {n,m} matches
+ ;; 0.9.3: 2014/07/01 - R7RS library
+@@ -3170,16 +3172,7 @@
+               ((sre-empty? (sre-sequence (cdr sre)))
+                (error "invalid sre: empty *" sre))
+               (else
+-               (letrec
+-                   ((body
+-                     (lp (sre-sequence (cdr sre))
+-                         n
+-                         flags
+-                         (lambda (cnk init src str i end matches fail)
+-                           (body cnk init src str i end matches
+-                                 (lambda ()
+-                                   (next cnk init src str i end matches fail)
+-                                   ))))))
++               (let ((body (rec (list '+ (sre-sequence (cdr sre))))))
+                  (lambda (cnk init src str i end matches fail)
+                    (body cnk init src str i end matches
+                          (lambda ()
+@@ -3204,10 +3197,21 @@
+                          (lambda ()
+                            (body cnk init src str i end matches fail))))))))
+             ((+)
+-             (lp (sre-sequence (cdr sre))
+-                 n
+-                 flags
+-                 (rec (list '* (sre-sequence (cdr sre))))))
++             (cond
++              ((sre-empty? (sre-sequence (cdr sre)))
++               (error "invalid sre: empty +" sre))
++              (else
++               (letrec
++                   ((body
++                     (lp (sre-sequence (cdr sre))
++                         n
++                         flags
++                         (lambda (cnk init src str i end matches fail)
++                           (body cnk init src str i end matches
++                                 (lambda ()
++                                   (next cnk init src str i end matches fail)
++                                   ))))))
++                 body))))
+             ((=)
+              (rec `(** ,(cadr sre) ,(cadr sre) ,@(cddr sre))))
+             ((>=)
+diff -ur a/irregex-utils.scm b/irregex-utils.scm
+--- a/irregex-utils.scm	2016-09-11 19:03:00.000000000 -0400
++++ b/irregex-utils.scm	2017-01-01 22:25:25.000000000 -0500
+@@ -89,7 +89,7 @@
+         (case (car x)
+           ((: seq)
+            (cond
+-            ((and (pair? (cddr x)) (pair? (cddr x)) (not (eq? x obj)))
++            ((and (pair? (cdr x)) (pair? (cddr x)) (not (eq? x obj)))
+              (display "(?:" out) (for-each lp (cdr x)) (display ")" out))
+             (else (for-each lp (cdr x)))))
+           ((submatch)
+diff -ur "a/manual-html/Unit irregex.html" "b/manual-html/Unit irregex.html"
+--- "a/manual-html/Unit irregex.html"	2016-09-11 19:10:47.000000000 -0400
++++ "b/manual-html/Unit irregex.html"	2017-01-01 22:26:05.000000000 -0500
+@@ -353,6 +353,6 @@
+ <dd class="defsig"><p>Returns an optimized SRE matching any of the literal strings in the list, like Emacs' <tt>regexp-opt</tt>.  Note this optimization doesn't help when irregex is able to build a DFA.</p></dd>
+ </dl>
+ <h5 id="sec:sre-.3estring"><a href="#sec:sre-.3estring">sre-&gt;string</a></h5><dl class="defsig"><dt class="defsig" id="def:sre-.3estring"><span class="sig"><tt>(sre-&gt;string &lt;sre&gt;)</tt></span> <span class="type">procedure</span></dt>
+-<dd class="defsig"><p>Convert an SRE to a POSIX-style regular expression string, if possible.</p></dd>
++<dd class="defsig"><p>Convert an SRE to a PCRE-style regular expression string, if possible.</p></dd>
+ </dl>
+-<hr /><p>Previous: <a href="Unit%20extras.html">Unit extras</a></p><p>Next: <a href="Unit%20srfi-1.html">Unit srfi-1</a></p></div></div></body>
+\ No newline at end of file
++<hr /><p>Previous: <a href="Unit%20extras.html">Unit extras</a></p><p>Next: <a href="Unit%20srfi-1.html">Unit srfi-1</a></p></div></div></body>
diff --git a/gnu/packages/patches/cssc-gets-undeclared.patch b/gnu/packages/patches/cssc-gets-undeclared.patch
deleted file mode 100644
index 68c607cf58..0000000000
--- a/gnu/packages/patches/cssc-gets-undeclared.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-CSSC uses a gets in a couple of places.  For security reasons, modern gnulib
-does not allow this.  This patch allows it again.
---- CSSC-1.3.0/gl/lib/stdio.in.h	2010-05-15 00:15:35.000000000 +0200
-+++ CSSC-1.3.0/gl/lib/stdio.in.h	2014-02-03 21:27:10.000000000 +0100
-@@ -135,12 +135,6 @@
-                  "use gnulib module fflush for portable POSIX compliance");
- #endif
- 
--/* It is very rare that the developer ever has full control of stdin,
--   so any use of gets warrants an unconditional warning.  Assume it is
--   always declared, since it is required by C89.  */
--#undef gets
--_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
--
- #if @GNULIB_FOPEN@
- # if @REPLACE_FOPEN@
- #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
diff --git a/gnu/packages/patches/cssc-missing-include.patch b/gnu/packages/patches/cssc-missing-include.patch
deleted file mode 100644
index 3cef9c15f1..0000000000
--- a/gnu/packages/patches/cssc-missing-include.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Added a missing include file (necessary for gid_t and others).
-So far as I am aware, this has not been added upstream yet.
---- CSSC-1.3.0/src/file.h	2010-05-16 19:31:33.000000000 +0200
-+++ CSSC-1.3.0/src/file.h	2014-02-03 21:48:30.000000000 +0100
-@@ -30,6 +30,7 @@
- #ifndef CSSC__FILE_H__
- #define CSSC__FILE_H__
- 
-+#include <sys/types.h>
- #include "filelock.h"
- 
- enum create_mode {
diff --git a/gnu/packages/patches/fcgi-2.4.0-gcc44-fixes.patch b/gnu/packages/patches/fcgi-2.4.0-gcc44-fixes.patch
new file mode 100644
index 0000000000..0f921b120b
--- /dev/null
+++ b/gnu/packages/patches/fcgi-2.4.0-gcc44-fixes.patch
@@ -0,0 +1,14 @@
+Taken from http://pkgs.fedoraproject.org/cgit/rpms/fcgi.git/plain/fcgi-2.4.0-gcc44_fixes.patch.
+Fixes compilation with GCC 4.4 and later.
+
+diff -up fcgi-2.4.0/libfcgi/fcgio.cpp.gcc44_fixes fcgi-2.4.0/libfcgi/fcgio.cpp
+--- fcgi-2.4.0/libfcgi/fcgio.cpp.gcc44_fixes	2002-02-24 21:12:22.000000000 +0100
++++ fcgi-2.4.0/libfcgi/fcgio.cpp	2009-02-15 11:35:18.000000000 +0100
+@@ -23,6 +23,7 @@
+ #endif
+ 
+ #include <limits.h>
++#include <cstdio>
+ #include "fcgio.h"
+ 
+ using std::streambuf;
diff --git a/gnu/packages/patches/fcgi-2.4.0-poll.patch b/gnu/packages/patches/fcgi-2.4.0-poll.patch
new file mode 100644
index 0000000000..73be6a0a08
--- /dev/null
+++ b/gnu/packages/patches/fcgi-2.4.0-poll.patch
@@ -0,0 +1,89 @@
+Taken from http://pkgs.fedoraproject.org/cgit/rpms/fcgi.git/plain/fcgi-2.4.0-poll.patch
+Fixes CVE-2012-6687.
+
+Author: Anton Kortunov <toshic.toshic@gmail.com>
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libfcgi/+bug/933417
+Description: use poll in os_unix.c instead of select to avoid problem with > 1024 connections
+Forwarded: yes, fastcgi-developers@mailman.fastcgi.com
+
+diff --git a/libfcgi/os_unix.c b/libfcgi/os_unix.c
+index 73e6a7f..af35aee 100755
+--- a/libfcgi/os_unix.c
++++ b/libfcgi/os_unix.c
+@@ -42,6 +42,7 @@ static const char rcsid[] = "$Id: os_unix.c,v 1.37 2002/03/05 19:14:49 robs Exp
+ #include <sys/time.h>
+ #include <sys/un.h>
+ #include <signal.h>
++#include <poll.h>
+ 
+ #ifdef HAVE_NETDB_H
+ #include <netdb.h>
+@@ -103,6 +104,9 @@ static int volatile maxFd = -1;
+ static int shutdownPending = FALSE;
+ static int shutdownNow = FALSE;
+ 
++static int libfcgiOsClosePollTimeout = 2000;
++static int libfcgiIsAfUnixKeeperPollTimeout = 2000;
++
+ void OS_ShutdownPending()
+ {
+     shutdownPending = TRUE;
+@@ -168,6 +172,16 @@ int OS_LibInit(int stdioFds[3])
+     if(libInitialized)
+         return 0;
+ 
++    char *libfcgiOsClosePollTimeoutStr = getenv( "LIBFCGI_OS_CLOSE_POLL_TIMEOUT" );
++    if(libfcgiOsClosePollTimeoutStr) {
++        libfcgiOsClosePollTimeout = atoi(libfcgiOsClosePollTimeoutStr);
++    }
++
++    char *libfcgiIsAfUnixKeeperPollTimeoutStr = getenv( "LIBFCGI_IS_AF_UNIX_KEEPER_POLL_TIMEOUT" );
++    if(libfcgiIsAfUnixKeeperPollTimeoutStr) {
++        libfcgiIsAfUnixKeeperPollTimeout = atoi(libfcgiIsAfUnixKeeperPollTimeoutStr);
++    }
++
+     asyncIoTable = (AioInfo *)malloc(asyncIoTableSize * sizeof(AioInfo));
+     if(asyncIoTable == NULL) {
+         errno = ENOMEM;
+@@ -755,19 +769,16 @@ int OS_Close(int fd)
+ 
+     if (shutdown(fd, 1) == 0)
+     {
+-        struct timeval tv;
+-        fd_set rfds;
++        struct pollfd pfd;
+         int rv;
+         char trash[1024];
+ 
+-        FD_ZERO(&rfds);
++        pfd.fd = fd;
++        pfd.events = POLLIN;
+ 
+         do 
+         {
+-            FD_SET(fd, &rfds);
+-            tv.tv_sec = 2;
+-            tv.tv_usec = 0;
+-            rv = select(fd + 1, &rfds, NULL, NULL, &tv);
++            rv = poll(&pfd, 1, libfcgiOsClosePollTimeout);
+         }
+         while (rv > 0 && read(fd, trash, sizeof(trash)) > 0);
+     }
+@@ -1116,13 +1127,11 @@ static int is_reasonable_accept_errno (const int error)
+  */
+ static int is_af_unix_keeper(const int fd)
+ {
+-    struct timeval tval = { READABLE_UNIX_FD_DROP_DEAD_TIMEVAL };
+-    fd_set read_fds;
+-
+-    FD_ZERO(&read_fds);
+-    FD_SET(fd, &read_fds);
++    struct pollfd pfd;
++    pfd.fd = fd;
++    pfd.events = POLLIN;
+ 
+-    return select(fd + 1, &read_fds, NULL, NULL, &tval) >= 0 && FD_ISSET(fd, &read_fds);
++    return poll(&pfd, 1, libfcgiIsAfUnixKeeperPollTimeout) >= 0 && (pfd.revents & POLLIN);
+ }
+ 
+ /*
diff --git a/gnu/packages/patches/gcc-4.9.3-mingw-gthr-default.patch b/gnu/packages/patches/gcc-4.9.3-mingw-gthr-default.patch
new file mode 100644
index 0000000000..0ea008a7cb
--- /dev/null
+++ b/gnu/packages/patches/gcc-4.9.3-mingw-gthr-default.patch
@@ -0,0 +1,11 @@
+--- a/libgcc/config/i386/gthr-win32.h	2016-03-30 07:45:33.388684463 +0200
++++ b/libgcc/config/i386/gthr-win32.h	2016-03-30 15:51:24.123896436 +0200
+@@ -30,7 +30,7 @@
+
+ /* Make sure CONST_CAST2 (origin in system.h) is declared.  */
+ #ifndef CONST_CAST2
+-#define CONST_CAST2(TOTYPE,FROMTYPE,X) ((__extension__(union {FROMTYPE _q; TOTYPE _nq;})(X))._nq)
++#define CONST_CAST2(TOTYPE,FROMTYPE,X) ((TOTYPE)X)
+ #endif
+
+ /* Windows32 threads specific definitions. The windows32 threading model
diff --git a/gnu/packages/patches/gcj-arm-mode.patch b/gnu/packages/patches/gcj-arm-mode.patch
new file mode 100644
index 0000000000..a3f999f7e9
--- /dev/null
+++ b/gnu/packages/patches/gcj-arm-mode.patch
@@ -0,0 +1,36 @@
+Taken from
+https://sources.debian.net/data/main/g/gcc-4.9/4.9.2-10/debian/patches/gcj-arm-mode.diff
+
+# DP: For armhf, force arm mode instead of thumb mode
+
+--- a/libjava/configure.host
++++ b/libjava/configure.host
+@@ -66,6 +66,9 @@
+     ;;
+ esac
+ 
++# on armhf force arm mode
++libgcj_flags="${libgcj_flags} -marm"
++
+ AM_RUNTESTFLAGS= 
+ 
+ # Set any host dependent compiler flags.
+--- a/gcc/java/lang-specs.h
++++ b/gcc/java/lang-specs.h
+@@ -47,7 +47,7 @@
+     %{.class|.zip|.jar|!fsyntax-only:jc1				\
+       %{.java|fsaw-java-file:%U.jar -fsource-filename=%i %<ffilelist-file} \
+       %{.class|.zip|.jar|ffilelist-file|fcompile-resource*:%i}		\
+-      %(jc1) %(cc1_options) %{I*} %{!findirect-dispatch:-faux-classpath %U.zip} \
++      %(jc1) %(cc1_options) -marm %{I*} %{!findirect-dispatch:-faux-classpath %U.zip} \
+       %{MD:-MD_} %{MMD:-MMD_} %{M} %{MM} %{MA} %{MT*} %{MF*}\
+       %(invoke_as)}",
+       0, 0, 0},
+--- a/libjava/libgcj.spec.in
++++ b/libjava/libgcj.spec.in
+@@ -9,4 +9,4 @@
+ %rename lib liborig
+ *lib: @LD_START_STATIC_SPEC@ @LIBGCJ_SPEC@ @LD_FINISH_STATIC_SPEC@ @LIBMATHSPEC@ @LDLIBICONV@ @GCSPEC@ @THREADSPEC@ @ZLIBSPEC@ @SYSTEMSPEC@ %(libgcc) @LIBSTDCXXSPEC@ %(liborig)
+ 
+-*jc1: @HASH_SYNC_SPEC@ @DIVIDESPEC@ @CHECKREFSPEC@ @JC1GCSPEC@ @EXCEPTIONSPEC@ @BACKTRACESPEC@ @IEEESPEC@ @ATOMICSPEC@ @LIBGCJ_BC_SPEC@ -fkeep-inline-functions
++*jc1: @HASH_SYNC_SPEC@ @DIVIDESPEC@ @CHECKREFSPEC@ @JC1GCSPEC@ @EXCEPTIONSPEC@ @BACKTRACESPEC@ @IEEESPEC@ @ATOMICSPEC@ @LIBGCJ_BC_SPEC@ -fkeep-inline-functions -marm
diff --git a/gnu/packages/patches/gnupg-test-segfault-on-32bit-arch.patch b/gnu/packages/patches/gnupg-test-segfault-on-32bit-arch.patch
new file mode 100644
index 0000000000..79bb41caaa
--- /dev/null
+++ b/gnu/packages/patches/gnupg-test-segfault-on-32bit-arch.patch
@@ -0,0 +1,40 @@
+This fixes a segfault on 32-bit architectures. Upstream discussion:
+
+https://lists.gnupg.org/pipermail/gnupg-devel/2016-December/032364.html
+
+Guix thread: https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00631.html
+
+Patch copied from upstream source repository:
+
+https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commitdiff;h=6e96cdd41a0e55b672309431062f37c4a4a9f485
+
+From 6e96cdd41a0e55b672309431062f37c4a4a9f485 Mon Sep 17 00:00:00 2001
+From: Justus Winter <justus@g10code.com>
+Date: Wed, 21 Dec 2016 16:14:45 +0100
+Subject: [PATCH] gpgscm: Guard use of union member.
+
+* tests/gpgscm/scheme.c (opexe_5): Check that we have a file port
+before accessing filename.  Fixes a crash on 32-bit architectures.
+
+Fixes-commit: e7429b1ced0c69fa7901f888f8dc25f00fc346a4
+Signed-off-by: Justus Winter <justus@g10code.com>
+---
+ tests/gpgscm/scheme.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
+index a5b7691..2844545 100644
+--- a/tests/gpgscm/scheme.c
++++ b/tests/gpgscm/scheme.c
+@@ -4838,7 +4838,7 @@ static pointer opexe_5(scheme *sc, enum scheme_opcodes op) {
+                } else {
+                     sc->nesting_stack[sc->file_i]++;
+ #if USE_TAGS && SHOW_ERROR_LINE
+-		    {
++		    if (sc->load_stack[sc->file_i].kind & port_file) {
+ 		      const char *filename =
+ 			sc->load_stack[sc->file_i].rep.stdio.filename;
+ 		      int lineno =
+-- 
+2.8.0.rc3
+
diff --git a/gnu/packages/patches/gst-plugins-good-fix-crashes.patch b/gnu/packages/patches/gst-plugins-good-fix-crashes.patch
deleted file mode 100644
index c36a595608..0000000000
--- a/gnu/packages/patches/gst-plugins-good-fix-crashes.patch
+++ /dev/null
@@ -1,1047 +0,0 @@
-Fixes upstream bug #774859 (flic decoder: Invalid memory read in
-flx_decode_chunks):
-
-https://bugzilla.gnome.org/show_bug.cgi?id=774859
-
-Patch copied from upstream source repository:
-
-https://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=be670f0daf67304fb92c76aa09c30cae0bfd1fe4
-
-From be670f0daf67304fb92c76aa09c30cae0bfd1fe4 Mon Sep 17 00:00:00 2001
-From: Matthew Waters <matthew@centricular.com>
-Date: Wed, 23 Nov 2016 07:09:06 +1100
-Subject: [PATCH] flxdec: rewrite logic based on GstByteReader/Writer
-
-Solves overreading/writing the given arrays and will error out if the
-streams asks to do that.
-
-Also does more error checking that the stream is valid and won't
-overrun any allocated arrays.  Also mitigate integer overflow errors
-calculating allocation sizes.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=774859
----
- gst/flx/flx_color.c |   1 -
- gst/flx/flx_fmt.h   |  72 -------
- gst/flx/gstflxdec.c | 610 ++++++++++++++++++++++++++++++++++++----------------
- gst/flx/gstflxdec.h |   4 +-
- 4 files changed, 427 insertions(+), 260 deletions(-)
-
-diff --git a/gst/flx/flx_color.c b/gst/flx/flx_color.c
-index 047bfdf..3a58135 100644
---- a/gst/flx/flx_color.c
-+++ b/gst/flx/flx_color.c
-@@ -101,7 +101,6 @@ flx_set_palette_vector (FlxColorSpaceConverter * flxpal, guint start, guint num,
-   } else {
-     memcpy (&flxpal->palvec[start * 3], newpal, grab * 3);
-   }
--
- }
- 
- void
-diff --git a/gst/flx/flx_fmt.h b/gst/flx/flx_fmt.h
-index 9ab31ba..abff200 100644
---- a/gst/flx/flx_fmt.h
-+++ b/gst/flx/flx_fmt.h
-@@ -123,78 +123,6 @@ typedef struct _FlxFrameType
- } FlxFrameType;
- #define FlxFrameTypeSize 10
- 
--#if G_BYTE_ORDER == G_BIG_ENDIAN 
--#define LE_TO_BE_16(i16) ((guint16) (((i16) << 8) | ((i16) >> 8)))
--#define LE_TO_BE_32(i32) \
--    (((guint32) (LE_TO_BE_16((guint16) (i32))) << 16) | (LE_TO_BE_16((i32) >> 16)))
--
--#define FLX_FRAME_TYPE_FIX_ENDIANNESS(frm_type_p) \
--    do { \
--     (frm_type_p)->chunks = LE_TO_BE_16((frm_type_p)->chunks); \
--     (frm_type_p)->delay = LE_TO_BE_16((frm_type_p)->delay); \
--    } while(0)
--
--#define FLX_HUFFMAN_TABLE_FIX_ENDIANNESS(hffmn_table_p) \
--    do { \
--     (hffmn_table_p)->codelength = \
--	LE_TO_BE_16((hffmn_table_p)->codelength); \
--     (hffmn_table_p)->numcodes = LE_TO_BE_16((hffmn_table_p)->numcodes); \
--    } while(0)
--
--#define FLX_SEGMENT_TABLE_FIX_ENDIANNESS(sgmnt_table_p) \
--     ((sgmnt_table_p)->segments = LE_TO_BE_16((sgmnt_table_p)->segments))
--
--#define FLX_PREFIX_CHUNK_FIX_ENDIANNESS(prfx_chnk_p) \
--    do { \
--     (prfx_chnk_p)->chunks = LE_TO_BE_16((prfx_chnk_p)->chunks); \
--    } while(0)
--
--#define FLX_FRAME_CHUNK_FIX_ENDIANNESS(frm_chnk_p) \
--    do { \
--     (frm_chnk_p)->size = LE_TO_BE_32((frm_chnk_p)->size); \
--     (frm_chnk_p)->id = LE_TO_BE_16((frm_chnk_p)->id); \
--    } while(0)
--
--#define FLX_HDR_FIX_ENDIANNESS(hdr_p) \
--    do { \
--     (hdr_p)->size = LE_TO_BE_32((hdr_p)->size); \
--     (hdr_p)->type = LE_TO_BE_16((hdr_p)->type); \
--     (hdr_p)->frames = LE_TO_BE_16((hdr_p)->frames); \
--     (hdr_p)->width = LE_TO_BE_16((hdr_p)->width); \
--     (hdr_p)->height = LE_TO_BE_16((hdr_p)->height); \
--     (hdr_p)->depth = LE_TO_BE_16((hdr_p)->depth); \
--     (hdr_p)->flags = LE_TO_BE_16((hdr_p)->flags); \
--     (hdr_p)->speed = LE_TO_BE_32((hdr_p)->speed); \
--     (hdr_p)->reserved1 = LE_TO_BE_16((hdr_p)->reserved1); \
--     (hdr_p)->created = LE_TO_BE_32((hdr_p)->created); \
--     (hdr_p)->creator = LE_TO_BE_32((hdr_p)->creator); \
--     (hdr_p)->updated = LE_TO_BE_32((hdr_p)->updated); \
--     (hdr_p)->updater = LE_TO_BE_32((hdr_p)->updater); \
--     (hdr_p)->aspect_dx = LE_TO_BE_16((hdr_p)->aspect_dx); \
--     (hdr_p)->aspect_dy = LE_TO_BE_16((hdr_p)->aspect_dy); \
--     (hdr_p)->ext_flags = LE_TO_BE_16((hdr_p)->ext_flags); \
--     (hdr_p)->keyframes = LE_TO_BE_16((hdr_p)->keyframes); \
--     (hdr_p)->totalframes = LE_TO_BE_16((hdr_p)->totalframes); \
--     (hdr_p)->req_memory = LE_TO_BE_32((hdr_p)->req_memory); \
--     (hdr_p)->max_regions = LE_TO_BE_16((hdr_p)->max_regions); \
--     (hdr_p)->transp_num = LE_TO_BE_16((hdr_p)->transp_num); \
--     (hdr_p)->oframe1 = LE_TO_BE_32((hdr_p)->oframe1); \
--     (hdr_p)->oframe2 = LE_TO_BE_32((hdr_p)->oframe2); \
--    } while(0)
--#else
--
--#define LE_TO_BE_16(i16) ((i16))
--#define LE_TO_BE_32(i32) ((i32))
--
--#define FLX_FRAME_TYPE_FIX_ENDIANNESS(frm_type_p)
--#define FLX_HUFFMAN_TABLE_FIX_ENDIANNESS(hffmn_table_p)
--#define FLX_SEGMENT_TABLE_FIX_ENDIANNESS(sgmnt_table_p)
--#define FLX_PREFIX_CHUNK_FIX_ENDIANNESS(prfx_chnk_p)
--#define FLX_FRAME_CHUNK_FIX_ENDIANNESS(frm_chnk_p)
--#define FLX_HDR_FIX_ENDIANNESS(hdr_p)
--
--#endif /* G_BYTE_ORDER == G_BIG_ENDIAN */
--
- G_END_DECLS
- 
- #endif /* __GST_FLX_FMT_H__ */
-diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c
-index a237976..aa1bed5 100644
---- a/gst/flx/gstflxdec.c
-+++ b/gst/flx/gstflxdec.c
-@@ -1,5 +1,6 @@
- /* GStreamer
-  * Copyright (C) <1999> Erik Walthinsen <omega@temple-baptist.com>
-+ * Copyright (C) <2016> Matthew Waters <matthew@centricular.com>
-  *
-  * This library is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU Library General Public
-@@ -24,6 +25,7 @@
- /*
-  * http://www.coolutils.com/Formats/FLI
-  * http://woodshole.er.usgs.gov/operations/modeling/flc.html
-+ * http://www.compuphase.com/flic.htm
-  */
- 
- #ifdef HAVE_CONFIG_H
-@@ -73,10 +75,14 @@ static GstStateChangeReturn gst_flxdec_change_state (GstElement * element,
- static gboolean gst_flxdec_src_query_handler (GstPad * pad, GstObject * parent,
-     GstQuery * query);
- 
--static void flx_decode_color (GstFlxDec *, guchar *, guchar *, gint);
--static gboolean flx_decode_brun (GstFlxDec *, guchar *, guchar *);
--static gboolean flx_decode_delta_fli (GstFlxDec *, guchar *, guchar *);
--static gboolean flx_decode_delta_flc (GstFlxDec *, guchar *, guchar *);
-+static gboolean flx_decode_color (GstFlxDec * flxdec, GstByteReader * reader,
-+    GstByteWriter * writer, gint scale);
-+static gboolean flx_decode_brun (GstFlxDec * flxdec,
-+    GstByteReader * reader, GstByteWriter * writer);
-+static gboolean flx_decode_delta_fli (GstFlxDec * flxdec,
-+    GstByteReader * reader, GstByteWriter * writer);
-+static gboolean flx_decode_delta_flc (GstFlxDec * flxdec,
-+    GstByteReader * reader, GstByteWriter * writer);
- 
- #define rndalign(off) ((off) + ((off) & 1))
- 
-@@ -204,57 +210,59 @@ gst_flxdec_sink_event_handler (GstPad * pad, GstObject * parent,
- }
- 
- static gboolean
--flx_decode_chunks (GstFlxDec * flxdec, gulong count, guchar * data,
--    guchar * dest)
-+flx_decode_chunks (GstFlxDec * flxdec, gulong n_chunks, GstByteReader * reader,
-+    GstByteWriter * writer)
- {
--  FlxFrameChunk *hdr;
-   gboolean ret = TRUE;
- 
--  g_return_val_if_fail (data != NULL, FALSE);
--
--  while (count--) {
--    hdr = (FlxFrameChunk *) data;
--    FLX_FRAME_CHUNK_FIX_ENDIANNESS (hdr);
--    data += FlxFrameChunkSize;
-+  while (n_chunks--) {
-+    GstByteReader chunk;
-+    guint32 size;
-+    guint16 type;
-+
-+    if (!gst_byte_reader_get_uint32_le (reader, &size))
-+      goto parse_error;
-+    if (!gst_byte_reader_get_uint16_le (reader, &type))
-+      goto parse_error;
-+    GST_LOG_OBJECT (flxdec, "chunk has type 0x%02x size %d", type, size);
-+
-+    if (!gst_byte_reader_get_sub_reader (reader, &chunk,
-+            size - FlxFrameChunkSize)) {
-+      GST_ERROR_OBJECT (flxdec, "Incorrect size in the chunk header");
-+      goto error;
-+    }
- 
--    switch (hdr->id) {
-+    switch (type) {
-       case FLX_COLOR64:
--        flx_decode_color (flxdec, data, dest, 2);
--        data += rndalign (hdr->size) - FlxFrameChunkSize;
-+        ret = flx_decode_color (flxdec, &chunk, writer, 2);
-         break;
- 
-       case FLX_COLOR256:
--        flx_decode_color (flxdec, data, dest, 0);
--        data += rndalign (hdr->size) - FlxFrameChunkSize;
-+        ret = flx_decode_color (flxdec, &chunk, writer, 0);
-         break;
- 
-       case FLX_BRUN:
--        ret = flx_decode_brun (flxdec, data, dest);
--        data += rndalign (hdr->size) - FlxFrameChunkSize;
-+        ret = flx_decode_brun (flxdec, &chunk, writer);
-         break;
- 
-       case FLX_LC:
--        ret = flx_decode_delta_fli (flxdec, data, dest);
--        data += rndalign (hdr->size) - FlxFrameChunkSize;
-+        ret = flx_decode_delta_fli (flxdec, &chunk, writer);
-         break;
- 
-       case FLX_SS2:
--        ret = flx_decode_delta_flc (flxdec, data, dest);
--        data += rndalign (hdr->size) - FlxFrameChunkSize;
-+        ret = flx_decode_delta_flc (flxdec, &chunk, writer);
-         break;
- 
-       case FLX_BLACK:
--        memset (dest, 0, flxdec->size);
-+        ret = gst_byte_writer_fill (writer, 0, flxdec->size);
-         break;
- 
-       case FLX_MINI:
--        data += rndalign (hdr->size) - FlxFrameChunkSize;
-         break;
- 
-       default:
--        GST_WARNING ("Unimplented chunk type: 0x%02x size: %d - skipping",
--            hdr->id, hdr->size);
--        data += rndalign (hdr->size) - FlxFrameChunkSize;
-+        GST_WARNING ("Unimplemented chunk type: 0x%02x size: %d - skipping",
-+            type, size);
-         break;
-     }
- 
-@@ -263,43 +271,60 @@ flx_decode_chunks (GstFlxDec * flxdec, gulong count, guchar * data,
-   }
- 
-   return ret;
-+
-+parse_error:
-+  GST_ERROR_OBJECT (flxdec, "Failed to decode chunk");
-+error:
-+  return FALSE;
- }
- 
- 
--static void
--flx_decode_color (GstFlxDec * flxdec, guchar * data, guchar * dest, gint scale)
-+static gboolean
-+flx_decode_color (GstFlxDec * flxdec, GstByteReader * reader,
-+    GstByteWriter * writer, gint scale)
- {
--  guint packs, count, indx;
-+  guint8 count, indx;
-+  guint16 packs;
- 
--  g_return_if_fail (flxdec != NULL);
--
--  packs = (data[0] + (data[1] << 8));
--
--  data += 2;
-+  if (!gst_byte_reader_get_uint16_le (reader, &packs))
-+    goto error;
-   indx = 0;
- 
--  GST_LOG ("GstFlxDec: cmap packs: %d", packs);
-+  GST_LOG ("GstFlxDec: cmap packs: %d", (guint) packs);
-   while (packs--) {
-+    const guint8 *data;
-+    guint16 actual_count;
-+
-     /* color map index + skip count */
--    indx += *data++;
-+    if (!gst_byte_reader_get_uint8 (reader, &indx))
-+      goto error;
- 
-     /* number of rgb triplets */
--    count = *data++ & 0xff;
--    if (count == 0)
--      count = 256;
-+    if (!gst_byte_reader_get_uint8 (reader, &count))
-+      goto error;
- 
--    GST_LOG ("GstFlxDec: cmap count: %d (indx: %d)", count, indx);
--    flx_set_palette_vector (flxdec->converter, indx, count, data, scale);
-+    actual_count = count == 0 ? 256 : count;
- 
--    data += (count * 3);
-+    if (!gst_byte_reader_get_data (reader, count * 3, &data))
-+      goto error;
-+
-+    GST_LOG_OBJECT (flxdec, "cmap count: %d (indx: %d)", actual_count, indx);
-+    flx_set_palette_vector (flxdec->converter, indx, actual_count,
-+        (guchar *) data, scale);
-   }
-+
-+  return TRUE;
-+
-+error:
-+  GST_ERROR_OBJECT (flxdec, "Error decoding color palette");
-+  return FALSE;
- }
- 
- static gboolean
--flx_decode_brun (GstFlxDec * flxdec, guchar * data, guchar * dest)
-+flx_decode_brun (GstFlxDec * flxdec, GstByteReader * reader,
-+    GstByteWriter * writer)
- {
--  gulong count, lines, row;
--  guchar x;
-+  gulong lines, row;
- 
-   g_return_val_if_fail (flxdec != NULL, FALSE);
- 
-@@ -310,82 +335,125 @@ flx_decode_brun (GstFlxDec * flxdec, guchar * data, guchar * dest)
-      * contain more then 255 RLE packets. we use the frame 
-      * width instead. 
-      */
--    data++;
-+    if (!gst_byte_reader_skip (reader, 1))
-+      goto error;
- 
-     row = flxdec->hdr.width;
-     while (row) {
--      count = *data++;
-+      gint8 count;
-+
-+      if (!gst_byte_reader_get_int8 (reader, &count))
-+        goto error;
-+
-+      if (count <= 0) {
-+        const guint8 *data;
- 
--      if (count > 0x7f) {
-         /* literal run */
--        count = 0x100 - count;
--        if ((glong) row - (glong) count < 0) {
--          GST_ERROR_OBJECT (flxdec, "Invalid BRUN packet detected.");
-+        count = ABS (count);
-+
-+        GST_LOG_OBJECT (flxdec, "have literal run of size %d", count);
-+
-+        if (count > row) {
-+          GST_ERROR_OBJECT (flxdec, "Invalid BRUN line detected. "
-+              "bytes to write exceeds the end of the row");
-           return FALSE;
-         }
-         row -= count;
- 
--        while (count--)
--          *dest++ = *data++;
--
-+        if (!gst_byte_reader_get_data (reader, count, &data))
-+          goto error;
-+        if (!gst_byte_writer_put_data (writer, data, count))
-+          goto error;
-       } else {
--        if ((glong) row - (glong) count < 0) {
--          GST_ERROR_OBJECT (flxdec, "Invalid BRUN packet detected.");
-+        guint8 x;
-+
-+        GST_LOG_OBJECT (flxdec, "have replicate run of size %d", count);
-+
-+        if (count > row) {
-+          GST_ERROR_OBJECT (flxdec, "Invalid BRUN packet detected."
-+              "bytes to write exceeds the end of the row");
-           return FALSE;
-         }
- 
-         /* replicate run */
-         row -= count;
--        x = *data++;
- 
--        while (count--)
--          *dest++ = x;
-+        if (!gst_byte_reader_get_uint8 (reader, &x))
-+          goto error;
-+        if (!gst_byte_writer_fill (writer, x, count))
-+          goto error;
-       }
-     }
-   }
- 
-   return TRUE;
-+
-+error:
-+  GST_ERROR_OBJECT (flxdec, "Failed to decode BRUN packet");
-+  return FALSE;
- }
- 
- static gboolean
--flx_decode_delta_fli (GstFlxDec * flxdec, guchar * data, guchar * dest)
-+flx_decode_delta_fli (GstFlxDec * flxdec, GstByteReader * reader,
-+    GstByteWriter * writer)
- {
--  gulong count, packets, lines, start_line;
--  guchar *start_p, x;
-+  guint16 start_line, lines;
-+  guint line_start_i;
- 
-   g_return_val_if_fail (flxdec != NULL, FALSE);
-   g_return_val_if_fail (flxdec->delta_data != NULL, FALSE);
- 
-   /* use last frame for delta */
--  memcpy (dest, flxdec->delta_data, flxdec->size);
-+  if (!gst_byte_writer_put_data (writer, flxdec->delta_data, flxdec->size))
-+    goto error;
-+
-+  if (!gst_byte_reader_get_uint16_le (reader, &start_line))
-+    goto error;
-+  if (!gst_byte_reader_get_uint16_le (reader, &lines))
-+    goto error;
-+  GST_LOG_OBJECT (flxdec, "height %d start line %d line count %d",
-+      flxdec->hdr.height, start_line, lines);
- 
--  start_line = (data[0] + (data[1] << 8));
--  lines = (data[2] + (data[3] << 8));
-   if (start_line + lines > flxdec->hdr.height) {
-     GST_ERROR_OBJECT (flxdec, "Invalid FLI packet detected. too many lines.");
-     return FALSE;
-   }
--  data += 4;
- 
--  /* start position of delta */
--  dest += (flxdec->hdr.width * start_line);
--  start_p = dest;
-+  line_start_i = flxdec->hdr.width * start_line;
-+  if (!gst_byte_writer_set_pos (writer, line_start_i))
-+    goto error;
- 
-   while (lines--) {
-+    guint8 packets;
-+
-     /* packet count */
--    packets = *data++;
-+    if (!gst_byte_reader_get_uint8 (reader, &packets))
-+      goto error;
-+    GST_LOG_OBJECT (flxdec, "have %d packets", packets);
- 
-     while (packets--) {
-       /* skip count */
--      guchar skip = *data++;
--      dest += skip;
-+      guint8 skip;
-+      gint8 count;
-+      if (!gst_byte_reader_get_uint8 (reader, &skip))
-+        goto error;
-+
-+      /* skip bytes */
-+      if (!gst_byte_writer_set_pos (writer,
-+              gst_byte_writer_get_pos (writer) + skip))
-+        goto error;
- 
-       /* RLE count */
--      count = *data++;
-+      if (!gst_byte_reader_get_int8 (reader, &count))
-+        goto error;
-+
-+      if (count < 0) {
-+        guint8 x;
- 
--      if (count > 0x7f) {
-         /* literal run */
--        count = 0x100 - count;
-+        count = ABS (count);
-+        GST_LOG_OBJECT (flxdec, "have literal run of size %d at offset %d",
-+            count, skip);
- 
-         if (skip + count > flxdec->hdr.width) {
-           GST_ERROR_OBJECT (flxdec, "Invalid FLI packet detected. "
-@@ -393,11 +461,16 @@ flx_decode_delta_fli (GstFlxDec * flxdec, guchar * data, guchar * dest)
-           return FALSE;
-         }
- 
--        x = *data++;
--        while (count--)
--          *dest++ = x;
--
-+        if (!gst_byte_reader_get_uint8 (reader, &x))
-+          goto error;
-+        if (!gst_byte_writer_fill (writer, x, count))
-+          goto error;
-       } else {
-+        const guint8 *data;
-+
-+        GST_LOG_OBJECT (flxdec, "have replicate run of size %d at offset %d",
-+            count, skip);
-+
-         if (skip + count > flxdec->hdr.width) {
-           GST_ERROR_OBJECT (flxdec, "Invalid FLI packet detected. "
-               "line too long.");
-@@ -405,45 +478,60 @@ flx_decode_delta_fli (GstFlxDec * flxdec, guchar * data, guchar * dest)
-         }
- 
-         /* replicate run */
--        while (count--)
--          *dest++ = *data++;
-+        if (!gst_byte_reader_get_data (reader, count, &data))
-+          goto error;
-+        if (!gst_byte_writer_put_data (writer, data, count))
-+          goto error;
-       }
-     }
--    start_p += flxdec->hdr.width;
--    dest = start_p;
-+    line_start_i += flxdec->hdr.width;
-+    if (!gst_byte_writer_set_pos (writer, line_start_i))
-+      goto error;
-   }
- 
-   return TRUE;
-+
-+error:
-+  GST_ERROR_OBJECT (flxdec, "Failed to decode FLI packet");
-+  return FALSE;
- }
- 
- static gboolean
--flx_decode_delta_flc (GstFlxDec * flxdec, guchar * data, guchar * dest)
-+flx_decode_delta_flc (GstFlxDec * flxdec, GstByteReader * reader,
-+    GstByteWriter * writer)
- {
--  gulong count, lines, start_l, opcode;
--  guchar *start_p;
-+  guint16 lines, start_l;
- 
-   g_return_val_if_fail (flxdec != NULL, FALSE);
-   g_return_val_if_fail (flxdec->delta_data != NULL, FALSE);
- 
-   /* use last frame for delta */
--  memcpy (dest, flxdec->delta_data, flxdec->size);
-+  if (!gst_byte_writer_put_data (writer, flxdec->delta_data, flxdec->size))
-+    goto error;
-+  if (!gst_byte_reader_get_uint16_le (reader, &lines))
-+    goto error;
- 
--  lines = (data[0] + (data[1] << 8));
-   if (lines > flxdec->hdr.height) {
-     GST_ERROR_OBJECT (flxdec, "Invalid FLC packet detected. too many lines.");
-     return FALSE;
-   }
--  data += 2;
- 
--  start_p = dest;
-   start_l = lines;
- 
-   while (lines) {
--    dest = start_p + (flxdec->hdr.width * (start_l - lines));
-+    guint16 opcode;
-+
-+    if (!gst_byte_writer_set_pos (writer,
-+            flxdec->hdr.width * (start_l - lines)))
-+      goto error;
- 
-     /* process opcode(s) */
--    while ((opcode = (data[0] + (data[1] << 8))) & 0xc000) {
--      data += 2;
-+    while (TRUE) {
-+      if (!gst_byte_reader_get_uint16_le (reader, &opcode))
-+        goto error;
-+      if ((opcode & 0xc000) == 0)
-+        break;
-+
-       if ((opcode & 0xc000) == 0xc000) {
-         /* line skip count */
-         gulong skip = (0x10000 - opcode);
-@@ -453,27 +541,44 @@ flx_decode_delta_flc (GstFlxDec * flxdec, guchar * data, guchar * dest)
-           return FALSE;
-         }
-         start_l += skip;
--        dest += flxdec->hdr.width * skip;
-+        if (!gst_byte_writer_set_pos (writer,
-+                gst_byte_writer_get_pos (writer) + flxdec->hdr.width * skip))
-+          goto error;
-       } else {
-         /* last pixel */
--        dest += flxdec->hdr.width;
--        *dest++ = (opcode & 0xff);
-+        if (!gst_byte_writer_set_pos (writer,
-+                gst_byte_writer_get_pos (writer) + flxdec->hdr.width))
-+          goto error;
-+        if (!gst_byte_writer_put_uint8 (writer, opcode & 0xff))
-+          goto error;
-       }
-     }
--    data += 2;
- 
-     /* last opcode is the packet count */
-+    GST_LOG_OBJECT (flxdec, "have %d packets", opcode);
-     while (opcode--) {
-       /* skip count */
--      guchar skip = *data++;
--      dest += skip;
-+      guint8 skip;
-+      gint8 count;
-+
-+      if (!gst_byte_reader_get_uint8 (reader, &skip))
-+        goto error;
-+      if (!gst_byte_writer_set_pos (writer,
-+              gst_byte_writer_get_pos (writer) + skip))
-+        goto error;
- 
-       /* RLE count */
--      count = *data++;
-+      if (!gst_byte_reader_get_int8 (reader, &count))
-+        goto error;
-+
-+      if (count < 0) {
-+        guint16 x;
- 
--      if (count > 0x7f) {
-         /* replicate word run */
--        count = 0x100 - count;
-+        count = ABS (count);
-+
-+        GST_LOG_OBJECT (flxdec, "have replicate run of size %d at offset %d",
-+            count, skip);
- 
-         if (skip + count > flxdec->hdr.width) {
-           GST_ERROR_OBJECT (flxdec, "Invalid FLC packet detected. "
-@@ -481,22 +586,31 @@ flx_decode_delta_flc (GstFlxDec * flxdec, guchar * data, guchar * dest)
-           return FALSE;
-         }
- 
-+        if (!gst_byte_reader_get_uint16_le (reader, &x))
-+          goto error;
-+
-         while (count--) {
--          *dest++ = data[0];
--          *dest++ = data[1];
-+          if (!gst_byte_writer_put_uint16_le (writer, x)) {
-+            goto error;
-+          }
-         }
--        data += 2;
-       } else {
-+        GST_LOG_OBJECT (flxdec, "have literal run of size %d at offset %d",
-+            count, skip);
-+
-         if (skip + count > flxdec->hdr.width) {
-           GST_ERROR_OBJECT (flxdec, "Invalid FLC packet detected. "
-               "line too long.");
-           return FALSE;
-         }
- 
--        /* literal word run */
-         while (count--) {
--          *dest++ = *data++;
--          *dest++ = *data++;
-+          guint16 x;
-+
-+          if (!gst_byte_reader_get_uint16_le (reader, &x))
-+            goto error;
-+          if (!gst_byte_writer_put_uint16_le (writer, x))
-+            goto error;
-         }
-       }
-     }
-@@ -504,13 +618,91 @@ flx_decode_delta_flc (GstFlxDec * flxdec, guchar * data, guchar * dest)
-   }
- 
-   return TRUE;
-+
-+error:
-+  GST_ERROR_OBJECT (flxdec, "Failed to decode FLI packet");
-+  return FALSE;
-+}
-+
-+static gboolean
-+_read_flx_header (GstFlxDec * flxdec, GstByteReader * reader, FlxHeader * flxh)
-+{
-+  memset (flxh, 0, sizeof (*flxh));
-+
-+  if (!gst_byte_reader_get_uint32_le (reader, &flxh->size))
-+    goto error;
-+  if (flxh->size < FlxHeaderSize) {
-+    GST_ERROR_OBJECT (flxdec, "Invalid file size in the header");
-+    return FALSE;
-+  }
-+
-+  if (!gst_byte_reader_get_uint16_le (reader, &flxh->type))
-+    goto error;
-+  if (!gst_byte_reader_get_uint16_le (reader, &flxh->frames))
-+    goto error;
-+  if (!gst_byte_reader_get_uint16_le (reader, &flxh->width))
-+    goto error;
-+  if (!gst_byte_reader_get_uint16_le (reader, &flxh->height))
-+    goto error;
-+  if (!gst_byte_reader_get_uint16_le (reader, &flxh->depth))
-+    goto error;
-+  if (!gst_byte_reader_get_uint16_le (reader, &flxh->flags))
-+    goto error;
-+  if (!gst_byte_reader_get_uint32_le (reader, &flxh->speed))
-+    goto error;
-+  if (!gst_byte_reader_skip (reader, 2))        /* reserved */
-+    goto error;
-+  /* FLC */
-+  if (!gst_byte_reader_get_uint32_le (reader, &flxh->created))
-+    goto error;
-+  if (!gst_byte_reader_get_uint32_le (reader, &flxh->creator))
-+    goto error;
-+  if (!gst_byte_reader_get_uint32_le (reader, &flxh->updated))
-+    goto error;
-+  if (!gst_byte_reader_get_uint32_le (reader, &flxh->updater))
-+    goto error;
-+  if (!gst_byte_reader_get_uint16_le (reader, &flxh->aspect_dx))
-+    goto error;
-+  if (!gst_byte_reader_get_uint16_le (reader, &flxh->aspect_dy))
-+    goto error;
-+  /* EGI */
-+  if (!gst_byte_reader_get_uint16_le (reader, &flxh->ext_flags))
-+    goto error;
-+  if (!gst_byte_reader_get_uint16_le (reader, &flxh->keyframes))
-+    goto error;
-+  if (!gst_byte_reader_get_uint16_le (reader, &flxh->totalframes))
-+    goto error;
-+  if (!gst_byte_reader_get_uint32_le (reader, &flxh->req_memory))
-+    goto error;
-+  if (!gst_byte_reader_get_uint16_le (reader, &flxh->max_regions))
-+    goto error;
-+  if (!gst_byte_reader_get_uint16_le (reader, &flxh->transp_num))
-+    goto error;
-+  if (!gst_byte_reader_skip (reader, 24))       /* reserved */
-+    goto error;
-+  /* FLC */
-+  if (!gst_byte_reader_get_uint32_le (reader, &flxh->oframe1))
-+    goto error;
-+  if (!gst_byte_reader_get_uint32_le (reader, &flxh->oframe2))
-+    goto error;
-+  if (!gst_byte_reader_skip (reader, 40))       /* reserved */
-+    goto error;
-+
-+  return TRUE;
-+
-+error:
-+  GST_ERROR_OBJECT (flxdec, "Error reading file header");
-+  return FALSE;
- }
- 
- static GstFlowReturn
- gst_flxdec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
- {
-+  GstByteReader reader;
-+  GstBuffer *input;
-+  GstMapInfo map_info;
-   GstCaps *caps;
--  guint avail;
-+  guint available;
-   GstFlowReturn res = GST_FLOW_OK;
- 
-   GstFlxDec *flxdec;
-@@ -521,31 +713,50 @@ gst_flxdec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
-   g_return_val_if_fail (flxdec != NULL, GST_FLOW_ERROR);
- 
-   gst_adapter_push (flxdec->adapter, buf);
--  avail = gst_adapter_available (flxdec->adapter);
-+  available = gst_adapter_available (flxdec->adapter);
-+  input = gst_adapter_get_buffer (flxdec->adapter, available);
-+  if (!gst_buffer_map (input, &map_info, GST_MAP_READ)) {
-+    GST_ELEMENT_ERROR (flxdec, STREAM, DECODE,
-+        ("%s", "Failed to map buffer"), (NULL));
-+    goto error;
-+  }
-+  gst_byte_reader_init (&reader, map_info.data, map_info.size);
- 
-   if (flxdec->state == GST_FLXDEC_READ_HEADER) {
--    if (avail >= FlxHeaderSize) {
--      const guint8 *data = gst_adapter_map (flxdec->adapter, FlxHeaderSize);
-+    if (available >= FlxHeaderSize) {
-+      GstByteReader header;
-       GstCaps *templ;
- 
--      memcpy ((gchar *) & flxdec->hdr, data, FlxHeaderSize);
--      FLX_HDR_FIX_ENDIANNESS (&(flxdec->hdr));
--      gst_adapter_unmap (flxdec->adapter);
-+      if (!gst_byte_reader_get_sub_reader (&reader, &header, FlxHeaderSize)) {
-+        GST_ELEMENT_ERROR (flxdec, STREAM, DECODE,
-+            ("%s", "Could not read header"), (NULL));
-+        goto unmap_input_error;
-+      }
-       gst_adapter_flush (flxdec->adapter, FlxHeaderSize);
-+      available -= FlxHeaderSize;
-+
-+      if (!_read_flx_header (flxdec, &header, &flxdec->hdr)) {
-+        GST_ELEMENT_ERROR (flxdec, STREAM, DECODE,
-+            ("%s", "Failed to parse header"), (NULL));
-+        goto unmap_input_error;
-+      }
- 
-       flxh = &flxdec->hdr;
- 
-       /* check header */
-       if (flxh->type != FLX_MAGICHDR_FLI &&
--          flxh->type != FLX_MAGICHDR_FLC && flxh->type != FLX_MAGICHDR_FLX)
--        goto wrong_type;
-+          flxh->type != FLX_MAGICHDR_FLC && flxh->type != FLX_MAGICHDR_FLX) {
-+        GST_ELEMENT_ERROR (flxdec, STREAM, WRONG_TYPE, (NULL),
-+            ("not a flx file (type %x)", flxh->type));
-+        goto unmap_input_error;
-+      }
- 
--      GST_LOG ("size      :  %d", flxh->size);
--      GST_LOG ("frames    :  %d", flxh->frames);
--      GST_LOG ("width     :  %d", flxh->width);
--      GST_LOG ("height    :  %d", flxh->height);
--      GST_LOG ("depth     :  %d", flxh->depth);
--      GST_LOG ("speed     :  %d", flxh->speed);
-+      GST_INFO_OBJECT (flxdec, "size      :  %d", flxh->size);
-+      GST_INFO_OBJECT (flxdec, "frames    :  %d", flxh->frames);
-+      GST_INFO_OBJECT (flxdec, "width     :  %d", flxh->width);
-+      GST_INFO_OBJECT (flxdec, "height    :  %d", flxh->height);
-+      GST_INFO_OBJECT (flxdec, "depth     :  %d", flxh->depth);
-+      GST_INFO_OBJECT (flxdec, "speed     :  %d", flxh->speed);
- 
-       flxdec->next_time = 0;
- 
-@@ -573,18 +784,32 @@ gst_flxdec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
-       gst_pad_set_caps (flxdec->srcpad, caps);
-       gst_caps_unref (caps);
- 
--      if (flxh->depth <= 8)
--        flxdec->converter =
--            flx_colorspace_converter_new (flxh->width, flxh->height);
-+      /* zero means 8 */
-+      if (flxh->depth == 0)
-+        flxh->depth = 8;
-+
-+      if (flxh->depth != 8) {
-+        GST_ELEMENT_ERROR (flxdec, STREAM, WRONG_TYPE,
-+            ("%s", "Don't know how to decode non 8 bit depth streams"), (NULL));
-+        goto unmap_input_error;
-+      }
-+
-+      flxdec->converter =
-+          flx_colorspace_converter_new (flxh->width, flxh->height);
- 
-       if (flxh->type == FLX_MAGICHDR_FLC || flxh->type == FLX_MAGICHDR_FLX) {
--        GST_LOG ("(FLC) aspect_dx :  %d", flxh->aspect_dx);
--        GST_LOG ("(FLC) aspect_dy :  %d", flxh->aspect_dy);
--        GST_LOG ("(FLC) oframe1   :  0x%08x", flxh->oframe1);
--        GST_LOG ("(FLC) oframe2   :  0x%08x", flxh->oframe2);
-+        GST_INFO_OBJECT (flxdec, "(FLC) aspect_dx :  %d", flxh->aspect_dx);
-+        GST_INFO_OBJECT (flxdec, "(FLC) aspect_dy :  %d", flxh->aspect_dy);
-+        GST_INFO_OBJECT (flxdec, "(FLC) oframe1   :  0x%08x", flxh->oframe1);
-+        GST_INFO_OBJECT (flxdec, "(FLC) oframe2   :  0x%08x", flxh->oframe2);
-       }
- 
-       flxdec->size = ((guint) flxh->width * (guint) flxh->height);
-+      if (flxdec->size >= G_MAXSIZE / 4) {
-+        GST_ELEMENT_ERROR (flxdec, STREAM, DECODE,
-+            ("%s", "Cannot allocate required memory"), (NULL));
-+        goto unmap_input_error;
-+      }
- 
-       /* create delta and output frame */
-       flxdec->frame_data = g_malloc (flxdec->size);
-@@ -596,55 +821,66 @@ gst_flxdec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
-     GstBuffer *out;
- 
-     /* while we have enough data in the adapter */
--    while (avail >= FlxFrameChunkSize && res == GST_FLOW_OK) {
--      FlxFrameChunk flxfh;
--      guchar *chunk;
--      const guint8 *data;
--      GstMapInfo map;
--
--      chunk = NULL;
--      data = gst_adapter_map (flxdec->adapter, FlxFrameChunkSize);
--      memcpy (&flxfh, data, FlxFrameChunkSize);
--      FLX_FRAME_CHUNK_FIX_ENDIANNESS (&flxfh);
--      gst_adapter_unmap (flxdec->adapter);
--
--      switch (flxfh.id) {
--        case FLX_FRAME_TYPE:
--          /* check if we have the complete frame */
--          if (avail < flxfh.size)
--            goto need_more_data;
--
--          /* flush header */
--          gst_adapter_flush (flxdec->adapter, FlxFrameChunkSize);
--
--          chunk = gst_adapter_take (flxdec->adapter,
--              flxfh.size - FlxFrameChunkSize);
--          FLX_FRAME_TYPE_FIX_ENDIANNESS ((FlxFrameType *) chunk);
--          if (((FlxFrameType *) chunk)->chunks == 0)
--            break;
-+    while (available >= FlxFrameChunkSize && res == GST_FLOW_OK) {
-+      guint32 size;
-+      guint16 type;
- 
--          /* create 32 bits output frame */
--//          res = gst_pad_alloc_buffer_and_set_caps (flxdec->srcpad,
--//              GST_BUFFER_OFFSET_NONE,
--//              flxdec->size * 4, GST_PAD_CAPS (flxdec->srcpad), &out);
--//          if (res != GST_FLOW_OK)
--//            break;
-+      if (!gst_byte_reader_get_uint32_le (&reader, &size))
-+        goto parse_error;
-+      if (available < size)
-+        goto need_more_data;
- 
--          out = gst_buffer_new_and_alloc (flxdec->size * 4);
-+      available -= size;
-+      gst_adapter_flush (flxdec->adapter, size);
-+
-+      if (!gst_byte_reader_get_uint16_le (&reader, &type))
-+        goto parse_error;
-+
-+      switch (type) {
-+        case FLX_FRAME_TYPE:{
-+          GstByteReader chunks;
-+          GstByteWriter writer;
-+          guint16 n_chunks;
-+          GstMapInfo map;
-+
-+          GST_LOG_OBJECT (flxdec, "Have frame type 0x%02x of size %d", type,
-+              size);
-+
-+          if (!gst_byte_reader_get_sub_reader (&reader, &chunks,
-+                  size - FlxFrameChunkSize))
-+            goto parse_error;
-+
-+          if (!gst_byte_reader_get_uint16_le (&chunks, &n_chunks))
-+            goto parse_error;
-+          GST_LOG_OBJECT (flxdec, "Have %d chunks", n_chunks);
-+
-+          if (n_chunks == 0)
-+            break;
-+          if (!gst_byte_reader_skip (&chunks, 8))       /* reserved */
-+            goto parse_error;
-+
-+          gst_byte_writer_init_with_data (&writer, flxdec->frame_data,
-+              flxdec->size, TRUE);
- 
-           /* decode chunks */
--          if (!flx_decode_chunks (flxdec,
--                  ((FlxFrameType *) chunk)->chunks,
--                  chunk + FlxFrameTypeSize, flxdec->frame_data)) {
-+          if (!flx_decode_chunks (flxdec, n_chunks, &chunks, &writer)) {
-             GST_ELEMENT_ERROR (flxdec, STREAM, DECODE,
-                 ("%s", "Could not decode chunk"), NULL);
--            return GST_FLOW_ERROR;
-+            goto unmap_input_error;
-           }
-+          gst_byte_writer_reset (&writer);
- 
-           /* save copy of the current frame for possible delta. */
-           memcpy (flxdec->delta_data, flxdec->frame_data, flxdec->size);
- 
--          gst_buffer_map (out, &map, GST_MAP_WRITE);
-+          out = gst_buffer_new_and_alloc (flxdec->size * 4);
-+          if (!gst_buffer_map (out, &map, GST_MAP_WRITE)) {
-+            GST_ELEMENT_ERROR (flxdec, STREAM, DECODE,
-+                ("%s", "Could not map output buffer"), NULL);
-+            gst_buffer_unref (out);
-+            goto unmap_input_error;
-+          }
-+
-           /* convert current frame. */
-           flx_colorspace_convert (flxdec->converter, flxdec->frame_data,
-               map.data);
-@@ -655,30 +891,32 @@ gst_flxdec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
- 
-           res = gst_pad_push (flxdec->srcpad, out);
-           break;
-+        }
-         default:
--          /* check if we have the complete frame */
--          if (avail < flxfh.size)
--            goto need_more_data;
--
--          gst_adapter_flush (flxdec->adapter, flxfh.size);
-+          GST_DEBUG_OBJECT (flxdec, "Unknown frame type 0x%02x, skipping %d",
-+              type, size);
-+          if (!gst_byte_reader_skip (&reader, size - FlxFrameChunkSize))
-+            goto parse_error;
-           break;
-       }
--
--      g_free (chunk);
--
--      avail = gst_adapter_available (flxdec->adapter);
-     }
-   }
-+
-+  gst_buffer_unmap (input, &map_info);
-+  gst_buffer_unref (input);
-+
- need_more_data:
-   return res;
- 
-   /* ERRORS */
--wrong_type:
--  {
--    GST_ELEMENT_ERROR (flxdec, STREAM, WRONG_TYPE, (NULL),
--        ("not a flx file (type %x)", flxh->type));
--    return GST_FLOW_ERROR;
--  }
-+parse_error:
-+  GST_ELEMENT_ERROR (flxdec, STREAM, DECODE,
-+      ("%s", "Failed to parse stream"), (NULL));
-+unmap_input_error:
-+  gst_buffer_unmap (input, &map_info);
-+  gst_buffer_unref (input);
-+error:
-+  return GST_FLOW_ERROR;
- }
- 
- static GstStateChangeReturn
-diff --git a/gst/flx/gstflxdec.h b/gst/flx/gstflxdec.h
-index 3f9a0aa..4fd8dfd 100644
---- a/gst/flx/gstflxdec.h
-+++ b/gst/flx/gstflxdec.h
-@@ -23,6 +23,8 @@
- #include <gst/gst.h>
- 
- #include <gst/base/gstadapter.h>
-+#include <gst/base/gstbytereader.h>
-+#include <gst/base/gstbytewriter.h>
- #include "flx_color.h"
- 
- G_BEGIN_DECLS
-@@ -45,7 +47,7 @@ struct _GstFlxDec {
- 
-   guint8 *delta_data, *frame_data;
-   GstAdapter *adapter;
--  gulong size;
-+  gsize size;
-   GstFlxDecState state;
-   gint64 frame_time;
-   gint64 next_time;
--- 
-2.10.2
-
diff --git a/gnu/packages/patches/gst-plugins-good-fix-invalid-read.patch b/gnu/packages/patches/gst-plugins-good-fix-invalid-read.patch
deleted file mode 100644
index 1daaa2ae15..0000000000
--- a/gnu/packages/patches/gst-plugins-good-fix-invalid-read.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Fixes upstream bug #774897 (flxdec: Unreferences itself one time too many on
-invalid files):
-
-https://bugzilla.gnome.org/show_bug.cgi?id=774897
-
-Patch copied from upstream source repository:
-
-https://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=b31c504645a814c59d91d49e4fe218acaf93f4ca
-
-From b31c504645a814c59d91d49e4fe218acaf93f4ca Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
-Date: Wed, 23 Nov 2016 11:20:49 +0200
-Subject: [PATCH] flxdec: Don't unref() parent in the chain function
-
-We don't own the reference here, it is owned by the caller and given to
-us for the scope of this function. Leftover mistake from 0.10 porting.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=774897
----
- gst/flx/gstflxdec.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c
-index e675c99..a237976 100644
---- a/gst/flx/gstflxdec.c
-+++ b/gst/flx/gstflxdec.c
-@@ -677,7 +677,6 @@ wrong_type:
-   {
-     GST_ELEMENT_ERROR (flxdec, STREAM, WRONG_TYPE, (NULL),
-         ("not a flx file (type %x)", flxh->type));
--    gst_object_unref (flxdec);
-     return GST_FLOW_ERROR;
-   }
- }
--- 
-2.10.2
-
diff --git a/gnu/packages/patches/gst-plugins-good-fix-signedness.patch b/gnu/packages/patches/gst-plugins-good-fix-signedness.patch
deleted file mode 100644
index a3e20e19dd..0000000000
--- a/gnu/packages/patches/gst-plugins-good-fix-signedness.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-This is a followup fix for upstream bug #774834 (flic decoder: Buffer overflow
-in flx_decode_delta_fli):
-
-https://bugzilla.gnome.org/show_bug.cgi?id=774834#c2
-
-Patch copied from upstream source repository:
-
-https://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=1ab2b26193861b124426e2f8eb62b75b59ec5488
-
-From 1ab2b26193861b124426e2f8eb62b75b59ec5488 Mon Sep 17 00:00:00 2001
-From: Matthew Waters <matthew@centricular.com>
-Date: Tue, 22 Nov 2016 23:46:00 +1100
-Subject: [PATCH] flxdec: fix some warnings comparing unsigned < 0
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-bf43f44fcfada5ec4a3ce60cb374340486fe9fac was comparing an unsigned
-expression to be < 0 which was always false.
-
-gstflxdec.c: In function ‘flx_decode_brun’:
-gstflxdec.c:322:33: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
-         if ((glong) row - count < 0) {
-                                 ^
-gstflxdec.c:332:33: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
-         if ((glong) row - count < 0) {
-                                 ^
-
-https://bugzilla.gnome.org/show_bug.cgi?id=774834
----
- gst/flx/gstflxdec.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c
-index d51a8e6..e675c99 100644
---- a/gst/flx/gstflxdec.c
-+++ b/gst/flx/gstflxdec.c
-@@ -319,7 +319,7 @@ flx_decode_brun (GstFlxDec * flxdec, guchar * data, guchar * dest)
-       if (count > 0x7f) {
-         /* literal run */
-         count = 0x100 - count;
--        if ((glong) row - count < 0) {
-+        if ((glong) row - (glong) count < 0) {
-           GST_ERROR_OBJECT (flxdec, "Invalid BRUN packet detected.");
-           return FALSE;
-         }
-@@ -329,7 +329,7 @@ flx_decode_brun (GstFlxDec * flxdec, guchar * data, guchar * dest)
-           *dest++ = *data++;
- 
-       } else {
--        if ((glong) row - count < 0) {
-+        if ((glong) row - (glong) count < 0) {
-           GST_ERROR_OBJECT (flxdec, "Invalid BRUN packet detected.");
-           return FALSE;
-         }
--- 
-2.10.2
-
diff --git a/gnu/packages/patches/gst-plugins-good-flic-bounds-check.patch b/gnu/packages/patches/gst-plugins-good-flic-bounds-check.patch
deleted file mode 100644
index f77dca2cd6..0000000000
--- a/gnu/packages/patches/gst-plugins-good-flic-bounds-check.patch
+++ /dev/null
@@ -1,319 +0,0 @@
-Fix CVE-2016-{9634,9635,9636}.
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-9634
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-9635
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-9636
-
-This fixes upstream bug #774834 (flic decoder: Buffer overflow in
-flx_decode_delta_fli):
-
-https://bugzilla.gnome.org/show_bug.cgi?id=774834
-
-Patch copied from upstream source repository:
-
-https://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=2e203a79b7d9af4029307c1a845b3c148d5f5e62
-
-From 2e203a79b7d9af4029307c1a845b3c148d5f5e62 Mon Sep 17 00:00:00 2001
-From: Matthew Waters <matthew@centricular.com>
-Date: Tue, 22 Nov 2016 19:05:00 +1100
-Subject: [PATCH] flxdec: add some write bounds checking
-
-Without checking the bounds of the frame we are writing into, we can
-write off the end of the destination buffer.
-
-https://scarybeastsecurity.blogspot.dk/2016/11/0day-exploit-advancing-exploitation.html
-
-https://bugzilla.gnome.org/show_bug.cgi?id=774834
----
- gst/flx/gstflxdec.c | 116 +++++++++++++++++++++++++++++++++++++++++-----------
- 1 file changed, 91 insertions(+), 25 deletions(-)
-
-diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c
-index 604be2f..d51a8e6 100644
---- a/gst/flx/gstflxdec.c
-+++ b/gst/flx/gstflxdec.c
-@@ -74,9 +74,9 @@ static gboolean gst_flxdec_src_query_handler (GstPad * pad, GstObject * parent,
-     GstQuery * query);
- 
- static void flx_decode_color (GstFlxDec *, guchar *, guchar *, gint);
--static void flx_decode_brun (GstFlxDec *, guchar *, guchar *);
--static void flx_decode_delta_fli (GstFlxDec *, guchar *, guchar *);
--static void flx_decode_delta_flc (GstFlxDec *, guchar *, guchar *);
-+static gboolean flx_decode_brun (GstFlxDec *, guchar *, guchar *);
-+static gboolean flx_decode_delta_fli (GstFlxDec *, guchar *, guchar *);
-+static gboolean flx_decode_delta_flc (GstFlxDec *, guchar *, guchar *);
- 
- #define rndalign(off) ((off) + ((off) & 1))
- 
-@@ -203,13 +203,14 @@ gst_flxdec_sink_event_handler (GstPad * pad, GstObject * parent,
-   return ret;
- }
- 
--static void
-+static gboolean
- flx_decode_chunks (GstFlxDec * flxdec, gulong count, guchar * data,
-     guchar * dest)
- {
-   FlxFrameChunk *hdr;
-+  gboolean ret = TRUE;
- 
--  g_return_if_fail (data != NULL);
-+  g_return_val_if_fail (data != NULL, FALSE);
- 
-   while (count--) {
-     hdr = (FlxFrameChunk *) data;
-@@ -228,17 +229,17 @@ flx_decode_chunks (GstFlxDec * flxdec, gulong count, guchar * data,
-         break;
- 
-       case FLX_BRUN:
--        flx_decode_brun (flxdec, data, dest);
-+        ret = flx_decode_brun (flxdec, data, dest);
-         data += rndalign (hdr->size) - FlxFrameChunkSize;
-         break;
- 
-       case FLX_LC:
--        flx_decode_delta_fli (flxdec, data, dest);
-+        ret = flx_decode_delta_fli (flxdec, data, dest);
-         data += rndalign (hdr->size) - FlxFrameChunkSize;
-         break;
- 
-       case FLX_SS2:
--        flx_decode_delta_flc (flxdec, data, dest);
-+        ret = flx_decode_delta_flc (flxdec, data, dest);
-         data += rndalign (hdr->size) - FlxFrameChunkSize;
-         break;
- 
-@@ -256,7 +257,12 @@ flx_decode_chunks (GstFlxDec * flxdec, gulong count, guchar * data,
-         data += rndalign (hdr->size) - FlxFrameChunkSize;
-         break;
-     }
-+
-+    if (!ret)
-+      break;
-   }
-+
-+  return ret;
- }
- 
- 
-@@ -289,13 +295,13 @@ flx_decode_color (GstFlxDec * flxdec, guchar * data, guchar * dest, gint scale)
-   }
- }
- 
--static void
-+static gboolean
- flx_decode_brun (GstFlxDec * flxdec, guchar * data, guchar * dest)
- {
-   gulong count, lines, row;
-   guchar x;
- 
--  g_return_if_fail (flxdec != NULL);
-+  g_return_val_if_fail (flxdec != NULL, FALSE);
- 
-   lines = flxdec->hdr.height;
-   while (lines--) {
-@@ -313,12 +319,21 @@ flx_decode_brun (GstFlxDec * flxdec, guchar * data, guchar * dest)
-       if (count > 0x7f) {
-         /* literal run */
-         count = 0x100 - count;
-+        if ((glong) row - count < 0) {
-+          GST_ERROR_OBJECT (flxdec, "Invalid BRUN packet detected.");
-+          return FALSE;
-+        }
-         row -= count;
- 
-         while (count--)
-           *dest++ = *data++;
- 
-       } else {
-+        if ((glong) row - count < 0) {
-+          GST_ERROR_OBJECT (flxdec, "Invalid BRUN packet detected.");
-+          return FALSE;
-+        }
-+
-         /* replicate run */
-         row -= count;
-         x = *data++;
-@@ -328,22 +343,28 @@ flx_decode_brun (GstFlxDec * flxdec, guchar * data, guchar * dest)
-       }
-     }
-   }
-+
-+  return TRUE;
- }
- 
--static void
-+static gboolean
- flx_decode_delta_fli (GstFlxDec * flxdec, guchar * data, guchar * dest)
- {
-   gulong count, packets, lines, start_line;
-   guchar *start_p, x;
- 
--  g_return_if_fail (flxdec != NULL);
--  g_return_if_fail (flxdec->delta_data != NULL);
-+  g_return_val_if_fail (flxdec != NULL, FALSE);
-+  g_return_val_if_fail (flxdec->delta_data != NULL, FALSE);
- 
-   /* use last frame for delta */
-   memcpy (dest, flxdec->delta_data, flxdec->size);
- 
-   start_line = (data[0] + (data[1] << 8));
-   lines = (data[2] + (data[3] << 8));
-+  if (start_line + lines > flxdec->hdr.height) {
-+    GST_ERROR_OBJECT (flxdec, "Invalid FLI packet detected. too many lines.");
-+    return FALSE;
-+  }
-   data += 4;
- 
-   /* start position of delta */
-@@ -356,7 +377,8 @@ flx_decode_delta_fli (GstFlxDec * flxdec, guchar * data, guchar * dest)
- 
-     while (packets--) {
-       /* skip count */
--      dest += *data++;
-+      guchar skip = *data++;
-+      dest += skip;
- 
-       /* RLE count */
-       count = *data++;
-@@ -364,12 +386,24 @@ flx_decode_delta_fli (GstFlxDec * flxdec, guchar * data, guchar * dest)
-       if (count > 0x7f) {
-         /* literal run */
-         count = 0x100 - count;
--        x = *data++;
- 
-+        if (skip + count > flxdec->hdr.width) {
-+          GST_ERROR_OBJECT (flxdec, "Invalid FLI packet detected. "
-+              "line too long.");
-+          return FALSE;
-+        }
-+
-+        x = *data++;
-         while (count--)
-           *dest++ = x;
- 
-       } else {
-+        if (skip + count > flxdec->hdr.width) {
-+          GST_ERROR_OBJECT (flxdec, "Invalid FLI packet detected. "
-+              "line too long.");
-+          return FALSE;
-+        }
-+
-         /* replicate run */
-         while (count--)
-           *dest++ = *data++;
-@@ -378,21 +412,27 @@ flx_decode_delta_fli (GstFlxDec * flxdec, guchar * data, guchar * dest)
-     start_p += flxdec->hdr.width;
-     dest = start_p;
-   }
-+
-+  return TRUE;
- }
- 
--static void
-+static gboolean
- flx_decode_delta_flc (GstFlxDec * flxdec, guchar * data, guchar * dest)
- {
-   gulong count, lines, start_l, opcode;
-   guchar *start_p;
- 
--  g_return_if_fail (flxdec != NULL);
--  g_return_if_fail (flxdec->delta_data != NULL);
-+  g_return_val_if_fail (flxdec != NULL, FALSE);
-+  g_return_val_if_fail (flxdec->delta_data != NULL, FALSE);
- 
-   /* use last frame for delta */
-   memcpy (dest, flxdec->delta_data, flxdec->size);
- 
-   lines = (data[0] + (data[1] << 8));
-+  if (lines > flxdec->hdr.height) {
-+    GST_ERROR_OBJECT (flxdec, "Invalid FLC packet detected. too many lines.");
-+    return FALSE;
-+  }
-   data += 2;
- 
-   start_p = dest;
-@@ -405,9 +445,15 @@ flx_decode_delta_flc (GstFlxDec * flxdec, guchar * data, guchar * dest)
-     while ((opcode = (data[0] + (data[1] << 8))) & 0xc000) {
-       data += 2;
-       if ((opcode & 0xc000) == 0xc000) {
--        /* skip count */
--        start_l += (0x10000 - opcode);
--        dest += flxdec->hdr.width * (0x10000 - opcode);
-+        /* line skip count */
-+        gulong skip = (0x10000 - opcode);
-+        if (skip > flxdec->hdr.height) {
-+          GST_ERROR_OBJECT (flxdec, "Invalid FLC packet detected. "
-+              "skip line count too big.");
-+          return FALSE;
-+        }
-+        start_l += skip;
-+        dest += flxdec->hdr.width * skip;
-       } else {
-         /* last pixel */
-         dest += flxdec->hdr.width;
-@@ -419,7 +465,8 @@ flx_decode_delta_flc (GstFlxDec * flxdec, guchar * data, guchar * dest)
-     /* last opcode is the packet count */
-     while (opcode--) {
-       /* skip count */
--      dest += *data++;
-+      guchar skip = *data++;
-+      dest += skip;
- 
-       /* RLE count */
-       count = *data++;
-@@ -427,12 +474,25 @@ flx_decode_delta_flc (GstFlxDec * flxdec, guchar * data, guchar * dest)
-       if (count > 0x7f) {
-         /* replicate word run */
-         count = 0x100 - count;
-+
-+        if (skip + count > flxdec->hdr.width) {
-+          GST_ERROR_OBJECT (flxdec, "Invalid FLC packet detected. "
-+              "line too long.");
-+          return FALSE;
-+        }
-+
-         while (count--) {
-           *dest++ = data[0];
-           *dest++ = data[1];
-         }
-         data += 2;
-       } else {
-+        if (skip + count > flxdec->hdr.width) {
-+          GST_ERROR_OBJECT (flxdec, "Invalid FLC packet detected. "
-+              "line too long.");
-+          return FALSE;
-+        }
-+
-         /* literal word run */
-         while (count--) {
-           *dest++ = *data++;
-@@ -442,6 +502,8 @@ flx_decode_delta_flc (GstFlxDec * flxdec, guchar * data, guchar * dest)
-     }
-     lines--;
-   }
-+
-+  return TRUE;
- }
- 
- static GstFlowReturn
-@@ -571,9 +633,13 @@ gst_flxdec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
-           out = gst_buffer_new_and_alloc (flxdec->size * 4);
- 
-           /* decode chunks */
--          flx_decode_chunks (flxdec,
--              ((FlxFrameType *) chunk)->chunks,
--              chunk + FlxFrameTypeSize, flxdec->frame_data);
-+          if (!flx_decode_chunks (flxdec,
-+                  ((FlxFrameType *) chunk)->chunks,
-+                  chunk + FlxFrameTypeSize, flxdec->frame_data)) {
-+            GST_ELEMENT_ERROR (flxdec, STREAM, DECODE,
-+                ("%s", "Could not decode chunk"), NULL);
-+            return GST_FLOW_ERROR;
-+          }
- 
-           /* save copy of the current frame for possible delta. */
-           memcpy (flxdec->delta_data, flxdec->frame_data, flxdec->size);
--- 
-2.10.2
-
diff --git a/gnu/packages/patches/httpd-CVE-2016-8740.patch b/gnu/packages/patches/httpd-CVE-2016-8740.patch
new file mode 100644
index 0000000000..17ba323ccf
--- /dev/null
+++ b/gnu/packages/patches/httpd-CVE-2016-8740.patch
@@ -0,0 +1,36 @@
+This patch applies against httpd-2.4.23 and shouldn't be needed in later releases
+http://openwall.com/lists/oss-security/2016/12/05/17
+Index: modules/http2/h2_stream.c
+===================================================================
+--- modules/http2/h2_stream.c	(revision 1771866)
++++ modules/http2/h2_stream.c	(working copy)
+@@ -322,18 +322,18 @@
+                                            HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE);
+             }
+         }
+-    }
+-    
+-    if (h2_stream_is_scheduled(stream)) {
+-        return h2_request_add_trailer(stream->request, stream->pool,
+-                                      name, nlen, value, vlen);
+-    }
+-    else {
+-        if (!input_open(stream)) {
+-            return APR_ECONNRESET;
++        
++        if (h2_stream_is_scheduled(stream)) {
++            return h2_request_add_trailer(stream->request, stream->pool,
++                                          name, nlen, value, vlen);
+         }
+-        return h2_request_add_header(stream->request, stream->pool,
+-                                     name, nlen, value, vlen);
++        else {
++            if (!input_open(stream)) {
++                return APR_ECONNRESET;
++            }
++            return h2_request_add_header(stream->request, stream->pool,
++                                         name, nlen, value, vlen);
++        }
+     }
+ }
+ 
diff --git a/gnu/packages/patches/icecat-CVE-2016-9064.patch b/gnu/packages/patches/icecat-CVE-2016-9064.patch
deleted file mode 100644
index a5393815e0..0000000000
--- a/gnu/packages/patches/icecat-CVE-2016-9064.patch
+++ /dev/null
@@ -1,996 +0,0 @@
-Copied from
-<https://hg.mozilla.org/releases/mozilla-esr45/raw-rev/00c2b7baaa0b>
-but with one hunk omitted: the git binary patch for
-toolkit/mozapps/extensions/test/addons/test_update_multi2/addon.xpi
-which is not present in the IceCat sources.
-
-# HG changeset patch
-# User Andrew Swan <aswan@mozilla.com>
-# Date 1474063218 25200
-# Node ID 00c2b7baaa0b4bfb7d5f1aac31c094ea6b255e1f
-# Parent  46b07bdbf8b20cf3fdc28104add57ff58a55832b
-Bug 1303418 - Don't allow upgrades that change the addon ID. r=mossop, a=lizzard
-
-MozReview-Commit-ID: JHINo8ShmeI
-
-diff --git a/toolkit/mozapps/extensions/AddonManager.jsm b/toolkit/mozapps/extensions/AddonManager.jsm
---- a/toolkit/mozapps/extensions/AddonManager.jsm
-+++ b/toolkit/mozapps/extensions/AddonManager.jsm
-@@ -2956,16 +2956,18 @@ this.AddonManager = {
-   // The downloaded file seems to be corrupted in some way.
-   ERROR_CORRUPT_FILE: -3,
-   // An error occured trying to write to the filesystem.
-   ERROR_FILE_ACCESS: -4,
-   // The add-on must be signed and isn't.
-   ERROR_SIGNEDSTATE_REQUIRED: -5,
-   // The downloaded add-on had a different type than expected.
-   ERROR_UNEXPECTED_ADDON_TYPE: -6,
-+  // The addon did not have the expected ID
-+  ERROR_INCORRECT_ID: -7,
- 
-   // These must be kept in sync with AddonUpdateChecker.
-   // No error was encountered.
-   UPDATE_STATUS_NO_ERROR: 0,
-   // The update check timed out
-   UPDATE_STATUS_TIMEOUT: -1,
-   // There was an error while downloading the update information.
-   UPDATE_STATUS_DOWNLOAD_ERROR: -2,
-diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
---- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
-+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
-@@ -5473,16 +5473,37 @@ AddonInstall.prototype = {
-       // loadManifestFromZipReader performs the certificate verification for us
-       this.addon = yield loadManifestFromZipReader(zipreader, this.installLocation);
-     }
-     catch (e) {
-       zipreader.close();
-       return Promise.reject([AddonManager.ERROR_CORRUPT_FILE, e]);
-     }
- 
-+    if (this.existingAddon) {
-+      // Check various conditions related to upgrades
-+      if (this.addon.id != this.existingAddon.id) {
-+        zipreader.close();
-+        return Promise.reject([AddonManager.ERROR_INCORRECT_ID,
-+                               `Refusing to upgrade addon ${this.existingAddon.id} to different ID ${this.addon.id}`]);
-+      }
-+
-+      if (this.addon.type == "multipackage") {
-+        zipreader.close();
-+        return Promise.reject([AddonManager.ERROR_UNEXPECTED_ADDON_TYPE,
-+                               `Refusing to upgrade addon ${this.existingAddon.id} to a multi-package xpi`]);
-+      }
-+
-+      if (this.existingAddon.type == "webextension" && this.addon.type != "webextension") {
-+        zipreader.close();
-+        return Promise.reject([AddonManager.ERROR_UNEXPECTED_ADDON_TYPE,
-+                               "Webextensions may not be updated to other extension types"]);
-+      }
-+    }
-+
-     if (mustSign(this.addon.type)) {
-       if (this.addon.signedState <= AddonManager.SIGNEDSTATE_MISSING) {
-         // This add-on isn't properly signed by a signature that chains to the
-         // trusted root.
-         let state = this.addon.signedState;
-         this.addon = null;
-         zipreader.close();
- 
-@@ -5510,23 +5531,16 @@ AddonInstall.prototype = {
-         } else {
-           zipreader.close();
-           return Promise.reject([AddonManager.ERROR_CORRUPT_FILE,
-                                  "XPI is incorrectly signed"]);
-         }
-       }
-     }
- 
--    if (this.existingAddon && this.existingAddon.type == "webextension" &&
--        this.addon.type != "webextension") {
--      zipreader.close();
--      return Promise.reject([AddonManager.ERROR_UNEXPECTED_ADDON_TYPE,
--                             "WebExtensions may not be upated to other extension types"]);
--    }
--
-     if (this.addon.type == "multipackage")
-       return this._loadMultipackageManifests(zipreader);
- 
-     zipreader.close();
- 
-     this.updateAddonURIs();
- 
-     this.addon._install = this;
-@@ -5791,16 +5805,17 @@ AddonInstall.prototype = {
-           else {
-             // TODO Should we send some event here (bug 557716)?
-             this.state = AddonManager.STATE_CHECKING;
-             new UpdateChecker(this.addon, {
-               onUpdateFinished: aAddon => this.downloadCompleted(),
-             }, AddonManager.UPDATE_WHEN_ADDON_INSTALLED);
-           }
-         }, ([error, message]) => {
-+          this.removeTemporaryFile();
-           this.downloadFailed(error, message);
-         });
-       }
-       else {
-         if (aRequest instanceof Ci.nsIHttpChannel)
-           this.downloadFailed(AddonManager.ERROR_NETWORK_FAILURE,
-                               aRequest.responseStatus + " " +
-                               aRequest.responseStatusText);
-diff --git a/toolkit/mozapps/extensions/test/addons/test_update_multi1/bootstrap.js b/toolkit/mozapps/extensions/test/addons/test_update_multi1/bootstrap.js
-new file mode 100644
---- /dev/null
-+++ b/toolkit/mozapps/extensions/test/addons/test_update_multi1/bootstrap.js
-@@ -0,0 +1,5 @@
-+
-+function install(data, reason) {}
-+function startup(data, reason) {}
-+function shutdown(data, reason) {}
-+function uninstall(data, reason) {}
-diff --git a/toolkit/mozapps/extensions/test/addons/test_update_multi1/install.rdf b/toolkit/mozapps/extensions/test/addons/test_update_multi1/install.rdf
-new file mode 100644
---- /dev/null
-+++ b/toolkit/mozapps/extensions/test/addons/test_update_multi1/install.rdf
-@@ -0,0 +1,16 @@
-+<?xml version="1.0"?>
-+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-+     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-+<Description about="urn:mozilla:install-manifest">
-+  <em:id>updatemulti@tests.mozilla.org</em:id>
-+  <em:version>1.0</em:version>
-+  <em:updateURL>http://localhost:4444/data/test_update_multi.rdf</em:updateURL>
-+  <em:bootstrap>true</em:bootstrap>
-+  <em:name>Test Addon 1</em:name>
-+<em:targetApplication><Description>
-+  <em:id>xpcshell@tests.mozilla.org</em:id>
-+  <em:minVersion>1</em:minVersion>
-+  <em:maxVersion>1</em:maxVersion>
-+</Description></em:targetApplication>
-+</Description>
-+</RDF>
-diff --git a/toolkit/mozapps/extensions/test/addons/test_update_multi2/install.rdf b/toolkit/mozapps/extensions/test/addons/test_update_multi2/install.rdf
-new file mode 100644
---- /dev/null
-+++ b/toolkit/mozapps/extensions/test/addons/test_update_multi2/install.rdf
-@@ -0,0 +1,9 @@
-+<?xml version="1.0"?>
-+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-+     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-+<Description about="urn:mozilla:install-manifest">
-+  <em:id>updatemulti@tests.mozilla.org</em:id>
-+  <em:type>32</em:type>
-+  <em:version>2.0</em:version>
-+</Description>
-+</RDF>
-diff --git a/toolkit/mozapps/extensions/test/addons/test_updateid1/bootstrap.js b/toolkit/mozapps/extensions/test/addons/test_updateid1/bootstrap.js
-new file mode 100644
---- /dev/null
-+++ b/toolkit/mozapps/extensions/test/addons/test_updateid1/bootstrap.js
-@@ -0,0 +1,5 @@
-+
-+function install(data, reason) {}
-+function startup(data, reason) {}
-+function shutdown(data, reason) {}
-+function uninstall(data, reason) {}
-diff --git a/toolkit/mozapps/extensions/test/addons/test_updateid1/install.rdf b/toolkit/mozapps/extensions/test/addons/test_updateid1/install.rdf
-new file mode 100644
---- /dev/null
-+++ b/toolkit/mozapps/extensions/test/addons/test_updateid1/install.rdf
-@@ -0,0 +1,16 @@
-+<?xml version="1.0"?>
-+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-+     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-+<Description about="urn:mozilla:install-manifest">
-+  <em:id>addon1@tests.mozilla.org</em:id>
-+  <em:version>1.0</em:version>
-+  <em:updateURL>http://localhost:4444/data/test_updateid.rdf</em:updateURL>
-+  <em:bootstrap>true</em:bootstrap>
-+  <em:name>Test Addon 1</em:name>
-+<em:targetApplication><Description>
-+  <em:id>xpcshell@tests.mozilla.org</em:id>
-+  <em:minVersion>1</em:minVersion>
-+  <em:maxVersion>1</em:maxVersion>
-+</Description></em:targetApplication>
-+</Description>
-+</RDF>
-diff --git a/toolkit/mozapps/extensions/test/addons/test_updateid2/bootstrap.js b/toolkit/mozapps/extensions/test/addons/test_updateid2/bootstrap.js
-new file mode 100644
---- /dev/null
-+++ b/toolkit/mozapps/extensions/test/addons/test_updateid2/bootstrap.js
-@@ -0,0 +1,5 @@
-+
-+function install(data, reason) {}
-+function startup(data, reason) {}
-+function shutdown(data, reason) {}
-+function uninstall(data, reason) {}
-diff --git a/toolkit/mozapps/extensions/test/addons/test_updateid2/install.rdf b/toolkit/mozapps/extensions/test/addons/test_updateid2/install.rdf
-new file mode 100644
---- /dev/null
-+++ b/toolkit/mozapps/extensions/test/addons/test_updateid2/install.rdf
-@@ -0,0 +1,16 @@
-+<?xml version="1.0"?>
-+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-+     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-+<Description about="urn:mozilla:install-manifest">
-+  <em:id>addon1.changed@tests.mozilla.org</em:id>
-+  <em:version>2.0</em:version>
-+  <em:updateURL>http://localhost:4444/data/test_updateid.rdf</em:updateURL>
-+  <em:bootstrap>true</em:bootstrap>
-+  <em:name>Test Addon 1</em:name>
-+<em:targetApplication><Description>
-+  <em:id>xpcshell@tests.mozilla.org</em:id>
-+  <em:minVersion>1</em:minVersion>
-+  <em:maxVersion>1</em:maxVersion>
-+</Description></em:targetApplication>
-+</Description>
-+</RDF>
-diff --git a/toolkit/mozapps/extensions/test/addons/test_updateid2_2/install.rdf b/toolkit/mozapps/extensions/test/addons/test_updateid2_2/install.rdf
-deleted file mode 100644
---- a/toolkit/mozapps/extensions/test/addons/test_updateid2_2/install.rdf
-+++ /dev/null
-@@ -1,24 +0,0 @@
--<?xml version="1.0"?>
--
--<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
--     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
--
--  <Description about="urn:mozilla:install-manifest">
--    <em:id>addon2@tests.mozilla.org</em:id>
--    <em:version>2.0</em:version>
--    <em:updateURL>http://localhost:4444/data/test_updateid.rdf</em:updateURL>
--
--    <!-- Front End MetaData -->
--    <em:name>Test 2</em:name>
--    <em:description>Test Description</em:description>
--
--    <em:targetApplication>
--      <Description>
--        <em:id>xpcshell@tests.mozilla.org</em:id>
--        <em:minVersion>1</em:minVersion>
--        <em:maxVersion>1</em:maxVersion>
--      </Description>
--    </em:targetApplication>
--
--  </Description>
--</RDF>
-diff --git a/toolkit/mozapps/extensions/test/addons/test_updateid2_5/install.rdf b/toolkit/mozapps/extensions/test/addons/test_updateid2_5/install.rdf
-deleted file mode 100644
---- a/toolkit/mozapps/extensions/test/addons/test_updateid2_5/install.rdf
-+++ /dev/null
-@@ -1,24 +0,0 @@
--<?xml version="1.0"?>
--
--<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
--     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
--
--  <Description about="urn:mozilla:install-manifest">
--    <em:id>addon2@tests.mozilla.org</em:id>
--    <em:version>5.0</em:version>
--    <em:updateURL>http://localhost:4444/data/test_updateid.rdf</em:updateURL>
--
--    <!-- Front End MetaData -->
--    <em:name>Test 2</em:name>
--    <em:description>Test Description</em:description>
--
--    <em:targetApplication>
--      <Description>
--        <em:id>xpcshell@tests.mozilla.org</em:id>
--        <em:minVersion>1</em:minVersion>
--        <em:maxVersion>1</em:maxVersion>
--      </Description>
--    </em:targetApplication>
--
--  </Description>
--</RDF>
-diff --git a/toolkit/mozapps/extensions/test/addons/test_updateid3_3/bootstrap.js b/toolkit/mozapps/extensions/test/addons/test_updateid3_3/bootstrap.js
-deleted file mode 100644
---- a/toolkit/mozapps/extensions/test/addons/test_updateid3_3/bootstrap.js
-+++ /dev/null
-@@ -1,21 +0,0 @@
--Components.utils.import("resource://gre/modules/Services.jsm");
--
--function install(data, reason) {
--  Services.prefs.setIntPref("bootstraptest.installed_version", 3);
--  Services.prefs.setIntPref("bootstraptest.install_reason", reason);
--}
--
--function startup(data, reason) {
--  Services.prefs.setIntPref("bootstraptest.active_version", 3);
--  Services.prefs.setIntPref("bootstraptest.startup_reason", reason);
--}
--
--function shutdown(data, reason) {
--  Services.prefs.setIntPref("bootstraptest.active_version", 0);
--  Services.prefs.setIntPref("bootstraptest.shutdown_reason", reason);
--}
--
--function uninstall(data, reason) {
--  Services.prefs.setIntPref("bootstraptest.installed_version", 0);
--  Services.prefs.setIntPref("bootstraptest.uninstall_reason", reason);
--}
-diff --git a/toolkit/mozapps/extensions/test/addons/test_updateid3_3/install.rdf b/toolkit/mozapps/extensions/test/addons/test_updateid3_3/install.rdf
-deleted file mode 100644
---- a/toolkit/mozapps/extensions/test/addons/test_updateid3_3/install.rdf
-+++ /dev/null
-@@ -1,25 +0,0 @@
--<?xml version="1.0"?>
--
--<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
--     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
--
--  <Description about="urn:mozilla:install-manifest">
--    <em:id>addon3@tests.mozilla.org</em:id>
--    <em:version>3.0</em:version>
--    <em:updateURL>http://localhost:4444/data/test_updateid.rdf</em:updateURL>
--    <em:bootstrap>true</em:bootstrap>
--
--    <!-- Front End MetaData -->
--    <em:name>Test 3</em:name>
--    <em:description>Test Description</em:description>
--
--    <em:targetApplication>
--      <Description>
--        <em:id>xpcshell@tests.mozilla.org</em:id>
--        <em:minVersion>1</em:minVersion>
--        <em:maxVersion>1</em:maxVersion>
--      </Description>
--    </em:targetApplication>
--
--  </Description>
--</RDF>
-diff --git a/toolkit/mozapps/extensions/test/addons/test_updateid4_4/bootstrap.js b/toolkit/mozapps/extensions/test/addons/test_updateid4_4/bootstrap.js
-deleted file mode 100644
---- a/toolkit/mozapps/extensions/test/addons/test_updateid4_4/bootstrap.js
-+++ /dev/null
-@@ -1,21 +0,0 @@
--Components.utils.import("resource://gre/modules/Services.jsm");
--
--function install(data, reason) {
--  Services.prefs.setIntPref("bootstraptest.installed_version", 4);
--  Services.prefs.setIntPref("bootstraptest.install_reason", reason);
--}
--
--function startup(data, reason) {
--  Services.prefs.setIntPref("bootstraptest.active_version", 4);
--  Services.prefs.setIntPref("bootstraptest.startup_reason", reason);
--}
--
--function shutdown(data, reason) {
--  Services.prefs.setIntPref("bootstraptest.active_version", 0);
--  Services.prefs.setIntPref("bootstraptest.shutdown_reason", reason);
--}
--
--function uninstall(data, reason) {
--  Services.prefs.setIntPref("bootstraptest.installed_version", 0);
--  Services.prefs.setIntPref("bootstraptest.uninstall_reason", reason);
--}
-diff --git a/toolkit/mozapps/extensions/test/addons/test_updateid4_4/install.rdf b/toolkit/mozapps/extensions/test/addons/test_updateid4_4/install.rdf
-deleted file mode 100644
---- a/toolkit/mozapps/extensions/test/addons/test_updateid4_4/install.rdf
-+++ /dev/null
-@@ -1,25 +0,0 @@
--<?xml version="1.0"?>
--
--<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
--     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
--
--  <Description about="urn:mozilla:install-manifest">
--    <em:id>addon4@tests.mozilla.org</em:id>
--    <em:version>4.0</em:version>
--    <em:updateURL>http://localhost:4444/data/test_updateid.rdf</em:updateURL>
--    <em:bootstrap>true</em:bootstrap>
--
--    <!-- Front End MetaData -->
--    <em:name>Test 4</em:name>
--    <em:description>Test Description</em:description>
--
--    <em:targetApplication>
--      <Description>
--        <em:id>xpcshell@tests.mozilla.org</em:id>
--        <em:minVersion>1</em:minVersion>
--        <em:maxVersion>1</em:maxVersion>
--      </Description>
--    </em:targetApplication>
--
--  </Description>
--</RDF>
-diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_update_multi.rdf b/toolkit/mozapps/extensions/test/xpcshell/data/test_update_multi.rdf
-new file mode 100644
---- /dev/null
-+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_update_multi.rdf
-@@ -0,0 +1,26 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+
-+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-+     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-+
-+  <Description about="urn:mozilla:extension:updatemulti@tests.mozilla.org">
-+    <em:updates>
-+      <Seq>
-+        <li>
-+          <Description>
-+            <em:version>2.0</em:version>
-+            <em:targetApplication>
-+              <Description>
-+                <em:id>xpcshell@tests.mozilla.org</em:id>
-+                <em:minVersion>1</em:minVersion>
-+                <em:maxVersion>1</em:maxVersion>
-+                <em:updateLink>http://localhost:4444/addons/test_update_multi2.xpi</em:updateLink>
-+              </Description>
-+            </em:targetApplication>
-+          </Description>
-+        </li>
-+      </Seq>
-+    </em:updates>
-+  </Description>
-+
-+</RDF>
-diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_updateid.rdf b/toolkit/mozapps/extensions/test/xpcshell/data/test_updateid.rdf
---- a/toolkit/mozapps/extensions/test/xpcshell/data/test_updateid.rdf
-+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_updateid.rdf
-@@ -9,77 +9,17 @@
-         <li>
-           <Description>
-             <em:version>2.0</em:version>
-             <em:targetApplication>
-               <Description>
-                 <em:id>xpcshell@tests.mozilla.org</em:id>
-                 <em:minVersion>1</em:minVersion>
-                 <em:maxVersion>1</em:maxVersion>
--                <em:updateLink>http://localhost:4444/addons/test_updateid2_2.xpi</em:updateLink>
--              </Description>
--            </em:targetApplication>
--          </Description>
--        </li>
--      </Seq>
--    </em:updates>
--  </Description>
--
--  <Description about="urn:mozilla:extension:addon2@tests.mozilla.org">
--    <em:updates>
--      <Seq>
--        <li>
--          <Description>
--            <em:version>3.0</em:version>
--            <em:targetApplication>
--              <Description>
--                <em:id>xpcshell@tests.mozilla.org</em:id>
--                <em:minVersion>1</em:minVersion>
--                <em:maxVersion>1</em:maxVersion>
--                <em:updateLink>http://localhost:4444/addons/test_updateid3_3.xpi</em:updateLink>
--              </Description>
--            </em:targetApplication>
--          </Description>
--        </li>
--      </Seq>
--    </em:updates>
--  </Description>
--
--  <Description about="urn:mozilla:extension:addon3@tests.mozilla.org">
--    <em:updates>
--      <Seq>
--        <li>
--          <Description>
--            <em:version>4.0</em:version>
--            <em:targetApplication>
--              <Description>
--                <em:id>xpcshell@tests.mozilla.org</em:id>
--                <em:minVersion>1</em:minVersion>
--                <em:maxVersion>1</em:maxVersion>
--                <em:updateLink>http://localhost:4444/addons/test_updateid4_4.xpi</em:updateLink>
--              </Description>
--            </em:targetApplication>
--          </Description>
--        </li>
--      </Seq>
--    </em:updates>
--  </Description>
--
--  <Description about="urn:mozilla:extension:addon4@tests.mozilla.org">
--    <em:updates>
--      <Seq>
--        <li>
--          <Description>
--            <em:version>5.0</em:version>
--            <em:targetApplication>
--              <Description>
--                <em:id>xpcshell@tests.mozilla.org</em:id>
--                <em:minVersion>1</em:minVersion>
--                <em:maxVersion>1</em:maxVersion>
--                <em:updateLink>http://localhost:4444/addons/test_updateid2_5.xpi</em:updateLink>
-+                <em:updateLink>http://localhost:4444/addons/test_updateid2.xpi</em:updateLink>
-               </Description>
-             </em:targetApplication>
-           </Description>
-         </li>
-       </Seq>
-     </em:updates>
-   </Description>
- 
-diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_updateid.js b/toolkit/mozapps/extensions/test/xpcshell/test_updateid.js
---- a/toolkit/mozapps/extensions/test/xpcshell/test_updateid.js
-+++ b/toolkit/mozapps/extensions/test/xpcshell/test_updateid.js
-@@ -2,421 +2,85 @@
-  * http://creativecommons.org/publicdomain/zero/1.0/
-  */
- 
- // This verifies that updating an add-on to a new ID works
- 
- // The test extension uses an insecure update url.
- Services.prefs.setBoolPref("extensions.checkUpdateSecurity", false);
- 
--Components.utils.import("resource://testing-common/httpd.js");
--var testserver;
- const profileDir = gProfD.clone();
- profileDir.append("extensions");
- 
--function resetPrefs() {
--  Services.prefs.setIntPref("bootstraptest.active_version", -1);
--  Services.prefs.setIntPref("bootstraptest.installed_version", -1);
--  Services.prefs.setIntPref("bootstraptest.startup_reason", -1);
--  Services.prefs.setIntPref("bootstraptest.shutdown_reason", -1);
--  Services.prefs.setIntPref("bootstraptest.install_reason", -1);
--  Services.prefs.setIntPref("bootstraptest.uninstall_reason", -1);
--}
--
--function getActiveVersion() {
--  return Services.prefs.getIntPref("bootstraptest.active_version");
--}
--
--function getInstalledVersion() {
--  return Services.prefs.getIntPref("bootstraptest.installed_version");
--}
--
--function run_test() {
--  createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
--
--  // Create and configure the HTTP server.
--  testserver = new HttpServer();
--  testserver.registerDirectory("/data/", do_get_file("data"));
--  testserver.registerDirectory("/addons/", do_get_file("addons"));
--  testserver.start(4444);
--
--  do_test_pending();
--  run_test_1();
--}
--
--function end_test() {
--  testserver.stop(do_test_finished);
--}
--
--function installUpdate(aInstall, aCallback) {
--  aInstall.addListener({
--    onInstallEnded: function(aInstall) {
--      // give the startup time to run
--      do_execute_soon(function() {
--        aCallback(aInstall);
--      });
--    }
--  });
--
--  aInstall.install();
--}
--
--// Verify that an update to an add-on with a new ID uninstalls the old add-on
--function run_test_1() {
--  writeInstallRDFForExtension({
--    id: "addon1@tests.mozilla.org",
--    version: "1.0",
--    updateURL: "http://localhost:4444/data/test_updateid.rdf",
--    targetApplications: [{
--      id: "xpcshell@tests.mozilla.org",
--      minVersion: "1",
--      maxVersion: "1"
--    }],
--    name: "Test Addon 1",
--  }, profileDir);
--
--  startupManager();
--
--  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(a1) {
--    do_check_neq(a1, null);
--    do_check_eq(a1.version, "1.0");
-+function promiseInstallUpdate(install) {
-+  return new Promise((resolve, reject) => {
-+    install.addListener({
-+      onDownloadFailed: () => {
-+        let err = new Error("download error");
-+        err.code = install.error;
-+        reject(err);
-+      },
-+      onInstallFailed: () => {
-+        let err = new Error("install error");
-+        err.code = install.error;
-+        reject(err);
-+      },
-+      onInstallEnded: resolve,
-+    });
- 
--    a1.findUpdates({
--      onUpdateAvailable: function(addon, install) {
--        do_check_eq(install.name, addon.name);
--        do_check_eq(install.version, "2.0");
--        do_check_eq(install.state, AddonManager.STATE_AVAILABLE);
--        do_check_eq(install.existingAddon, a1);
--
--        installUpdate(install, check_test_1);
--      }
--    }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
--  });
--}
--
--function check_test_1(install) {
--  AddonManager.getAddonByID("addon1@tests.mozilla.org", callback_soon(function(a1) {
--    // Existing add-on should have a pending upgrade
--    do_check_neq(a1.pendingUpgrade, null);
--    do_check_eq(a1.pendingUpgrade.id, "addon2@tests.mozilla.org");
--    do_check_eq(a1.pendingUpgrade.install.existingAddon, a1);
--    do_check_neq(a1.syncGUID);
--
--    let a1SyncGUID = a1.syncGUID;
--
--    restartManager();
--
--    AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
--                                 "addon2@tests.mozilla.org"], function([a1, a2]) {
--      // Should have uninstalled the old and installed the new
--      do_check_eq(a1, null);
--      do_check_neq(a2, null);
--      do_check_neq(a2.syncGUID, null);
--
--      // The Sync GUID should change when the ID changes
--      do_check_neq(a1SyncGUID, a2.syncGUID);
--
--      a2.uninstall();
--
--      do_execute_soon(run_test_2);
--    });
--  }));
--}
--
--// Test that when the new add-on already exists we just upgrade that
--function run_test_2() {
--  restartManager();
--  shutdownManager();
--
--  writeInstallRDFForExtension({
--    id: "addon1@tests.mozilla.org",
--    version: "1.0",
--    updateURL: "http://localhost:4444/data/test_updateid.rdf",
--    targetApplications: [{
--      id: "xpcshell@tests.mozilla.org",
--      minVersion: "1",
--      maxVersion: "1"
--    }],
--    name: "Test Addon 1",
--  }, profileDir);
--  writeInstallRDFForExtension({
--    id: "addon2@tests.mozilla.org",
--    version: "1.0",
--    targetApplications: [{
--      id: "xpcshell@tests.mozilla.org",
--      minVersion: "1",
--      maxVersion: "1"
--    }],
--    name: "Test Addon 2",
--  }, profileDir);
--
--  startupManager();
--
--  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(a1) {
--    do_check_neq(a1, null);
--    do_check_eq(a1.version, "1.0");
--
--    a1.findUpdates({
--      onUpdateAvailable: function(addon, install) {
--        installUpdate(install, check_test_2);
--      }
--    }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
-+    install.install();
-   });
- }
- 
--function check_test_2(install) {
--  AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
--                               "addon2@tests.mozilla.org"],
--                               callback_soon(function([a1, a2]) {
--    do_check_eq(a1.pendingUpgrade, null);
--    // Existing add-on should have a pending upgrade
--    do_check_neq(a2.pendingUpgrade, null);
--    do_check_eq(a2.pendingUpgrade.id, "addon2@tests.mozilla.org");
--    do_check_eq(a2.pendingUpgrade.install.existingAddon, a2);
--
--    restartManager();
--
--    AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
--                                 "addon2@tests.mozilla.org"], function([a1, a2]) {
--      // Should have uninstalled the old and installed the new
--      do_check_neq(a1, null);
--      do_check_neq(a2, null);
--
--      a1.uninstall();
--      a2.uninstall();
--
--      do_execute_soon(run_test_3);
--    });
--  }));
--}
--
--// Test that we rollback correctly when removing the old add-on fails
--function run_test_3() {
--  restartManager();
--  shutdownManager();
--
--  // This test only works on Windows
--  if (!("nsIWindowsRegKey" in AM_Ci)) {
--    run_test_4();
--    return;
--  }
--
--  writeInstallRDFForExtension({
--    id: "addon1@tests.mozilla.org",
--    version: "1.0",
--    updateURL: "http://localhost:4444/data/test_updateid.rdf",
--    targetApplications: [{
--      id: "xpcshell@tests.mozilla.org",
--      minVersion: "1",
--      maxVersion: "1"
--    }],
--    name: "Test Addon 1",
--  }, profileDir);
--
--  startupManager();
-+// Create and configure the HTTP server.
-+let testserver = createHttpServer(4444);
-+testserver.registerDirectory("/data/", do_get_file("data"));
-+testserver.registerDirectory("/addons/", do_get_file("addons"));
- 
--  AddonManager.getAddonByID("addon1@tests.mozilla.org", function(a1) {
--    do_check_neq(a1, null);
--    do_check_eq(a1.version, "1.0");
--
--    a1.findUpdates({
--      onUpdateAvailable: function(addon, install) {
--        installUpdate(install, check_test_3);
--      }
--    }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
--  });
--}
--
--function check_test_3(install) {
--  AddonManager.getAddonByID("addon1@tests.mozilla.org", callback_soon(function(a1) {
--    // Existing add-on should have a pending upgrade
--    do_check_neq(a1.pendingUpgrade, null);
--    do_check_eq(a1.pendingUpgrade.id, "addon2@tests.mozilla.org");
--    do_check_eq(a1.pendingUpgrade.install.existingAddon, a1);
--
--    // Lock the old add-on open so it can't be uninstalled
--    var file = profileDir.clone();
--    file.append("addon1@tests.mozilla.org");
--    if (!file.exists())
--      file.leafName += ".xpi";
--    else
--      file.append("install.rdf");
--
--    var fstream = AM_Cc["@mozilla.org/network/file-output-stream;1"].
--                  createInstance(AM_Ci.nsIFileOutputStream);
--    fstream.init(file, FileUtils.MODE_APPEND | FileUtils.MODE_WRONLY, FileUtils.PERMS_FILE, 0);
--
--    restartManager();
--
--    fstream.close();
--
--    AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
--                                 "addon2@tests.mozilla.org"],
--                                 callback_soon(function([a1, a2]) {
--      // Should not have installed the new add-on but it should still be
--      // pending install
--      do_check_neq(a1, null);
--      do_check_eq(a2, null);
--
--      restartManager();
--
--      AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
--                                   "addon2@tests.mozilla.org"], function([a1, a2]) {
--        // Should have installed the new add-on
--        do_check_eq(a1, null);
--        do_check_neq(a2, null);
--
--        a2.uninstall();
--
--        do_execute_soon(run_test_4);
--      });
--    }));
--  }));
-+function run_test() {
-+  createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
-+  startupManager();
-+  run_next_test();
- }
- 
--// Tests that upgrading to a bootstrapped add-on works but requires a restart
--function run_test_4() {
--  restartManager();
--  shutdownManager();
--
--  writeInstallRDFForExtension({
--    id: "addon2@tests.mozilla.org",
--    version: "2.0",
--    updateURL: "http://localhost:4444/data/test_updateid.rdf",
--    targetApplications: [{
--      id: "xpcshell@tests.mozilla.org",
--      minVersion: "1",
--      maxVersion: "1"
--    }],
--    name: "Test Addon 2",
--  }, profileDir);
--
--  startupManager();
--
--  resetPrefs();
--
--  AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
--    do_check_neq(a2, null);
--    do_check_neq(a2.syncGUID, null);
--    do_check_eq(a2.version, "2.0");
--
--    a2.findUpdates({
--      onUpdateAvailable: function(addon, install) {
--        installUpdate(install, check_test_4);
--      }
--    }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
--  });
--}
--
--function check_test_4() {
--  AddonManager.getAddonsByIDs(["addon2@tests.mozilla.org",
--                               "addon3@tests.mozilla.org"],
--                               callback_soon(function([a2, a3]) {
--    // Should still be pending install even though the new add-on is restartless
--    do_check_neq(a2, null);
--    do_check_eq(a3, null);
--
--    do_check_neq(a2.pendingUpgrade, null);
--    do_check_eq(a2.pendingUpgrade.id, "addon3@tests.mozilla.org");
--
--    do_check_eq(getInstalledVersion(), -1);
--    do_check_eq(getActiveVersion(), -1);
--
--    restartManager();
--
--    AddonManager.getAddonsByIDs(["addon2@tests.mozilla.org",
--                                 "addon3@tests.mozilla.org"], function([a2, a3]) {
--      // Should have updated
--      do_check_eq(a2, null);
--      do_check_neq(a3, null);
--
--      do_check_eq(getInstalledVersion(), 3);
--      do_check_eq(getActiveVersion(), 3);
--
--      do_execute_soon(run_test_5);
--    });
--  }));
--}
--
--// Tests that upgrading to another bootstrapped add-on works without a restart
--function run_test_5() {
--  AddonManager.getAddonByID("addon3@tests.mozilla.org", function(a3) {
--    do_check_neq(a3, null);
--    do_check_eq(a3.version, "3.0");
-+// Verify that an update to an add-on with a new ID fails
-+add_task(function* test_update_new_id() {
-+  yield promiseInstallAllFiles([do_get_addon("test_updateid1")]);
- 
--    a3.findUpdates({
--      onUpdateAvailable: function(addon, install) {
--        installUpdate(install, check_test_5);
--      }
--    }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
--  });
--}
--
--function check_test_5() {
--  AddonManager.getAddonsByIDs(["addon3@tests.mozilla.org",
--                               "addon4@tests.mozilla.org"],
--                               callback_soon(function([a3, a4]) {
--    // Should have updated
--    do_check_eq(a3, null);
--    do_check_neq(a4, null);
--
--    do_check_eq(getInstalledVersion(), 4);
--    do_check_eq(getActiveVersion(), 4);
--
--    restartManager();
--
--    AddonManager.getAddonsByIDs(["addon3@tests.mozilla.org",
--                                 "addon4@tests.mozilla.org"], function([a3, a4]) {
--      // Should still be gone
--      do_check_eq(a3, null);
--      do_check_neq(a4, null);
--
--      do_check_eq(getInstalledVersion(), 4);
--      do_check_eq(getActiveVersion(), 4);
--
--      run_test_6();
--    });
--  }));
--}
-+  let addon = yield promiseAddonByID("addon1@tests.mozilla.org");
-+  do_check_neq(addon, null);
-+  do_check_eq(addon.version, "1.0");
- 
--// Tests that upgrading to a non-bootstrapped add-on works but requires a restart
--function run_test_6() {
--  AddonManager.getAddonByID("addon4@tests.mozilla.org", function(a4) {
--    do_check_neq(a4, null);
--    do_check_eq(a4.version, "4.0");
--
--    a4.findUpdates({
--      onUpdateAvailable: function(addon, install) {
--        installUpdate(install, check_test_6);
--      }
--    }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
--  });
--}
-+  let update = yield promiseFindAddonUpdates(addon, AddonManager.UPDATE_WHEN_USER_REQUESTED);
-+  let install = update.updateAvailable;
-+  do_check_eq(install.name, addon.name);
-+  do_check_eq(install.version, "2.0");
-+  do_check_eq(install.state, AddonManager.STATE_AVAILABLE);
-+  do_check_eq(install.existingAddon, addon);
- 
--function check_test_6() {
--  AddonManager.getAddonsByIDs(["addon4@tests.mozilla.org",
--                               "addon2@tests.mozilla.org"],
--                               callback_soon(function([a4, a2]) {
--    // Should still be pending install even though the old add-on is restartless
--    do_check_neq(a4, null);
--    do_check_eq(a2, null);
--
--    do_check_neq(a4.pendingUpgrade, null);
--    do_check_eq(a4.pendingUpgrade.id, "addon2@tests.mozilla.org");
--
--    do_check_eq(getInstalledVersion(), 4);
--    do_check_eq(getActiveVersion(), 4);
-+  yield Assert.rejects(promiseInstallUpdate(install),
-+                       function(err) { return err.code == AddonManager.ERROR_INCORRECT_ID },
-+                       "Upgrade to a different ID fails");
- 
--    restartManager();
-+  addon.uninstall();
-+});
- 
--    AddonManager.getAddonsByIDs(["addon4@tests.mozilla.org",
--                                 "addon2@tests.mozilla.org"], function([a4, a2]) {
--      // Should have updated
--      do_check_eq(a4, null);
--      do_check_neq(a2, null);
-+// Verify that an update to a multi-package xpi fails
-+add_task(function* test_update_new_id() {
-+  yield promiseInstallAllFiles([do_get_addon("test_update_multi1")]);
- 
--      do_check_eq(getInstalledVersion(), 0);
--      do_check_eq(getActiveVersion(), 0);
-+  let addon = yield promiseAddonByID("updatemulti@tests.mozilla.org");
-+  do_check_neq(addon, null);
-+  do_check_eq(addon.version, "1.0");
- 
--      end_test();
--    });
--  }));
--}
-+  let update = yield promiseFindAddonUpdates(addon, AddonManager.UPDATE_WHEN_USER_REQUESTED);
-+  let install = update.updateAvailable;
-+  do_check_eq(install.name, addon.name);
-+  do_check_eq(install.version, "2.0");
-+  do_check_eq(install.state, AddonManager.STATE_AVAILABLE);
-+  do_check_eq(install.existingAddon, addon);
-+
-+  yield Assert.rejects(promiseInstallUpdate(install),
-+                       function(err) { return err.code == AddonManager.ERROR_UNEXPECTED_ADDON_TYPE },
-+                       "Upgrade to a multipackage xpi fails");
-+
-+  addon.uninstall();
-+});
-
diff --git a/gnu/packages/patches/inkscape-drop-wait-for-targets.patch b/gnu/packages/patches/inkscape-drop-wait-for-targets.patch
deleted file mode 100644
index 3dbe6641e2..0000000000
--- a/gnu/packages/patches/inkscape-drop-wait-for-targets.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-Copied from Fedora.
-
-http://pkgs.fedoraproject.org/cgit/rpms/inkscape.git/plain/inkscape-0.91-drop-wait-for-targets.patch?id=eb5340800b563d6b05aa5f11a2f24f2cc0d8c80e
-
-=== modified file 'src/ui/clipboard.cpp'
---- src/ui/clipboard.cpp	2016-04-02 15:15:43 +0000
-+++ src/ui/clipboard.cpp	2016-04-07 16:30:32 +0000
-@@ -146,8 +146,6 @@
-     void _setClipboardColor(guint32);
-     void _userWarn(SPDesktop *, char const *);
- 
--    void _inkscape_wait_for_targets(std::list<Glib::ustring> &);
--
-     // private properites
-     SPDocument *_clipboardSPDoc; ///< Document that stores the clipboard until someone requests it
-     Inkscape::XML::Node *_defs; ///< Reference to the clipboard document's defs node
-@@ -1302,9 +1300,7 @@
-  */
- Glib::ustring ClipboardManagerImpl::_getBestTarget()
- {
--    // GTKmm's wait_for_targets() is broken, see the comment in _inkscape_wait_for_targets()
--    std::list<Glib::ustring> targets; // = _clipboard->wait_for_targets();
--    _inkscape_wait_for_targets(targets);
-+    std::list<Glib::ustring> targets = _clipboard->wait_for_targets();
- 
-     // clipboard target debugging snippet
-     /*
-@@ -1456,39 +1452,6 @@
-     desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, msg);
- }
- 
--
--// GTKMM's clipboard::wait_for_targets is buggy and might return bogus, see
--//
--// https://bugs.launchpad.net/inkscape/+bug/296778
--// http://mail.gnome.org/archives/gtk-devel-list/2009-June/msg00062.html
--//
--// for details. Until this has been fixed upstream we will use our own implementation
--// of this method, as copied from /gtkmm-2.16.0/gtk/gtkmm/clipboard.cc.
--void ClipboardManagerImpl::_inkscape_wait_for_targets(std::list<Glib::ustring> &listTargets)
--{
--    //Get a newly-allocated array of atoms:
--    GdkAtom* targets = NULL;
--    gint n_targets = 0;
--    gboolean test = gtk_clipboard_wait_for_targets( gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), &targets, &n_targets );
--    if (!test || (targets == NULL)) {
--        return;
--    }
--
--    //Add the targets to the C++ container:
--    for (int i = 0; i < n_targets; i++)
--    {
--        //Convert the atom to a string:
--        gchar* const atom_name = gdk_atom_name(targets[i]);
--
--        Glib::ustring target;
--        if (atom_name) {
--            target = Glib::ScopedPtr<char>(atom_name).get(); //This frees the gchar*.
--        }
--
--        listTargets.push_back(target);
--    }
--}
--
- /* #######################################
-           ClipboardManager class
-    ####################################### */
-
diff --git a/gnu/packages/patches/kdbusaddons-kinit-file-name.patch b/gnu/packages/patches/kdbusaddons-kinit-file-name.patch
new file mode 100644
index 0000000000..ffed88e043
--- /dev/null
+++ b/gnu/packages/patches/kdbusaddons-kinit-file-name.patch
@@ -0,0 +1,15 @@
+Add placeholder for kinit's store file name.
+
+diff --git a/src/kdeinitinterface.cpp b/src/kdeinitinterface.cpp
+index 22fa5e5..3d40937 100644
+--- a/src/kdeinitinterface.cpp
++++ b/src/kdeinitinterface.cpp
+@@ -52,7 +52,7 @@ void KDEInitInterface::ensureKdeinitRunning()
+     // If not found in system paths, search other paths
+     if (srv.isEmpty()) {
+         const QStringList searchPaths = QStringList()
+-            << QCoreApplication::applicationDirPath() // then look where our application binary is located
++            << QString::fromUtf8("@SUBSTITUTEME@/bin") // using QStringLiteral would be more efficient, but breaks guix store reference detection.
+             << QLibraryInfo::location(QLibraryInfo::BinariesPath); // look where exec path is (can be set in qt.conf)
+         srv = QStandardPaths::findExecutable(QStringLiteral("kdeinit5"), searchPaths);
+         if (srv.isEmpty()) {
diff --git a/gnu/packages/patches/khal-disable-failing-tests.patch b/gnu/packages/patches/khal-disable-failing-tests.patch
new file mode 100644
index 0000000000..e2c65df8ce
--- /dev/null
+++ b/gnu/packages/patches/khal-disable-failing-tests.patch
@@ -0,0 +1,33 @@
+Disable some tests that are known to fail:
+
+https://github.com/pimutils/khal/issues/546
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=844081
+
+diff --git a/tests/khalendar_test.py b/tests/khalendar_test.py
+index fd8dcc6..17732bf 100644
+--- a/tests/khalendar_test.py
++++ b/tests/khalendar_test.py
+@@ -65,6 +65,7 @@ class TestCalendar(object):
+                 else:
+                     mtimes[cal] = mtime
+ 
++    @pytest.mark.xfail
+     def test_db_needs_update(self, coll_vdirs):
+         coll, vdirs = coll_vdirs
+ 
+@@ -321,6 +322,7 @@ class TestDbCreation(object):
+             CalendarCollection(calendars, dbpath=dbpath, locale=aux.locale)
+ 
+ 
++@pytest.mark.xfail
+ def test_default_calendar(coll_vdirs):
+     """test if an update to the vdir is detected by the CalendarCollection"""
+     coll, vdirs = coll_vdirs
+@@ -341,6 +343,7 @@ def test_default_calendar(coll_vdirs):
+     assert len(list(coll.get_events_on(today))) == 0
+ 
+ 
++@pytest.mark.xfail
+ def test_only_update_old_event(coll_vdirs, monkeypatch):
+     coll, vdirs = coll_vdirs
+ 
diff --git a/gnu/packages/patches/libepoxy-gl-null-checks.patch b/gnu/packages/patches/libepoxy-gl-null-checks.patch
new file mode 100644
index 0000000000..bdc4b05989
--- /dev/null
+++ b/gnu/packages/patches/libepoxy-gl-null-checks.patch
@@ -0,0 +1,54 @@
+This patch from <https://bugzilla.redhat.com/show_bug.cgi?id=1395366> adds NULL
+checks to avoid crashes when GL support is missing, as is the case when running
+Xvfb.
+
+Upstream issue: <https://github.com/anholt/libepoxy/issues/72>.
+
+diff -ur libepoxy-1.3.1/src/dispatch_common.c libepoxy-1.3.1/src/dispatch_common.c
+--- libepoxy-1.3.1/src/dispatch_common.c	2015-07-15 19:46:36.000000000 -0400
++++ libepoxy-1.3.1/src/dispatch_common.c	2016-11-16 09:03:52.809066247 -0500
+@@ -348,6 +348,8 @@
+ epoxy_extension_in_string(const char *extension_list, const char *ext)
+ {
+     const char *ptr = extension_list;
++    if (! ptr) return false;
++    if (! ext) return false;
+     int len = strlen(ext);
+ 
+     /* Make sure that don't just find an extension with our name as a prefix. */
+@@ -380,6 +382,7 @@
+ 
+         for (i = 0; i < num_extensions; i++) {
+             const char *gl_ext = (const char *)glGetStringi(GL_EXTENSIONS, i);
++            if (! gl_ext) return false;
+             if (strcmp(ext, gl_ext) == 0)
+                 return true;
+         }
+diff -ur libepoxy-1.3.1/src/dispatch_egl.c libepoxy-1.3.1/src/dispatch_egl.c
+--- libepoxy-1.3.1/src/dispatch_egl.c	2015-07-15 19:46:36.000000000 -0400
++++ libepoxy-1.3.1/src/dispatch_egl.c	2016-11-16 08:40:34.069358709 -0500
+@@ -46,6 +46,7 @@
+     int ret;
+ 
+     version_string = eglQueryString(dpy, EGL_VERSION);
++    if (! version_string) return 0;
+     ret = sscanf(version_string, "%d.%d", &major, &minor);
+     assert(ret == 2);
+     return major * 10 + minor;
+diff -ur libepoxy-1.3.1/src/dispatch_glx.c libepoxy-1.3.1/src/dispatch_glx.c
+--- libepoxy-1.3.1/src/dispatch_glx.c	2015-07-15 19:46:36.000000000 -0400
++++ libepoxy-1.3.1/src/dispatch_glx.c	2016-11-16 08:41:03.065730370 -0500
+@@ -57,11 +57,13 @@
+     int ret;
+ 
+     version_string = glXQueryServerString(dpy, screen, GLX_VERSION);
++    if (! version_string) return 0;
+     ret = sscanf(version_string, "%d.%d", &server_major, &server_minor);
+     assert(ret == 2);
+     server = server_major * 10 + server_minor;
+ 
+     version_string = glXGetClientString(dpy, GLX_VERSION);
++    if (! version_string) return 0;
+     ret = sscanf(version_string, "%d.%d", &client_major, &client_minor);
+     assert(ret == 2);
+     client = client_major * 10 + client_minor;
diff --git a/gnu/packages/patches/libpng-CVE-2016-10087.patch b/gnu/packages/patches/libpng-CVE-2016-10087.patch
new file mode 100644
index 0000000000..8093b3e448
--- /dev/null
+++ b/gnu/packages/patches/libpng-CVE-2016-10087.patch
@@ -0,0 +1,37 @@
+Fix CVE-2016-10087, a null pointer dereference in png_set_text_2():
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10087
+http://seclists.org/oss-sec/2016/q4/777
+
+Patch adapted from upstream source repository:
+
+https://sourceforge.net/p/libpng/code/ci/812768d7a9c973452222d454634496b25ed415eb/
+
+From 812768d7a9c973452222d454634496b25ed415eb Mon Sep 17 00:00:00 2001
+From: Glenn Randers-Pehrson <glennrp at users.sourceforge.net>
+Date: Thu, 29 Dec 2016 07:51:33 -0600
+Subject: [PATCH] [libpng16] Fixed a potential null pointer dereference in
+ png_set_text_2()
+
+(bug report and patch by Patrick Keshishian).
+---
+ ANNOUNCE | 2 ++
+ CHANGES  | 2 ++
+ png.c    | 1 +
+ 3 files changed, 5 insertions(+)
+
+diff --git a/png.c b/png.c
+index 8afc28fc2..2e05de159 100644
+--- a/png.c
++++ b/png.c
+@@ -477,6 +477,7 @@ png_free_data(png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 mask,
+          png_free(png_ptr, info_ptr->text);
+          info_ptr->text = NULL;
+          info_ptr->num_text = 0;
++         info_ptr->max_text = 0;
+       }
+    }
+ #endif
+-- 
+2.11.0
+
diff --git a/gnu/packages/patches/libupnp-CVE-2016-8863.patch b/gnu/packages/patches/libupnp-CVE-2016-8863.patch
new file mode 100644
index 0000000000..9978b39487
--- /dev/null
+++ b/gnu/packages/patches/libupnp-CVE-2016-8863.patch
@@ -0,0 +1,72 @@
+Fix CVE-2016-8863:
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-8863
+https://sourceforge.net/p/pupnp/bugs/133/
+
+Patch copied from upstream source repository:
+
+https://sourceforge.net/p/pupnp/code/ci/9c099c2923ab4d98530ab5204af1738be5bddba7/
+
+From 9c099c2923ab4d98530ab5204af1738be5bddba7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <ukleinek@debian.org>
+Date: Thu, 8 Dec 2016 17:11:53 +0100
+Subject: [PATCH] Fix out-of-bound access in create_url_list() (CVE-2016-8863)
+
+If there is an invalid URL in URLS->buf after a valid one, uri_parse is
+called with out pointing after the allocated memory. As uri_parse writes
+to *out before returning an error the loop in create_url_list must be
+stopped early to prevent an out-of-bound access
+
+Bug: https://sourceforge.net/p/pupnp/bugs/133/
+Bug-CVE: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-8863
+Bug-Debian: https://bugs.debian.org/842093
+Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=1388771
+(cherry picked from commit a0f6e719bc03c4d2fe6a4a42ef6b8761446f520b)
+---
+ upnp/src/gena/gena_device.c | 17 ++++++++++++-----
+ 1 file changed, 12 insertions(+), 5 deletions(-)
+
+diff --git a/upnp/src/gena/gena_device.c b/upnp/src/gena/gena_device.c
+index fb04a29..245c56b 100644
+--- a/upnp/src/gena/gena_device.c
++++ b/upnp/src/gena/gena_device.c
+@@ -1113,7 +1113,7 @@ static int create_url_list(
+ 	/*! [out] . */
+ 	URL_list *out)
+ {
+-    size_t URLcount = 0;
++    size_t URLcount = 0, URLcount2 = 0;
+     size_t i;
+     int return_code = 0;
+     uri_type temp;
+@@ -1155,16 +1155,23 @@ static int create_url_list(
+         }
+         memcpy( out->URLs, URLS->buff, URLS->size );
+         out->URLs[URLS->size] = 0;
+-        URLcount = 0;
+         for( i = 0; i < URLS->size; i++ ) {
+             if( ( URLS->buff[i] == '<' ) && ( i + 1 < URLS->size ) ) {
+                 if( ( ( return_code =
+                         parse_uri( &out->URLs[i + 1], URLS->size - i + 1,
+-                                   &out->parsedURLs[URLcount] ) ) ==
++                                   &out->parsedURLs[URLcount2] ) ) ==
+                       HTTP_SUCCESS )
+-                    && ( out->parsedURLs[URLcount].hostport.text.size !=
++                    && ( out->parsedURLs[URLcount2].hostport.text.size !=
+                          0 ) ) {
+-                    URLcount++;
++                    URLcount2++;
++                    if (URLcount2 >= URLcount)
++                        /*
++                         * break early here in case there is a bogus URL that
++                         * was skipped above. This prevents to access
++                         * out->parsedURLs[URLcount] which is beyond the
++                         * allocation.
++                         */
++                        break;
+                 } else {
+                     if( return_code == UPNP_E_OUTOF_MEMORY ) {
+                         free( out->URLs );
+-- 
+2.11.0
+
diff --git a/gnu/packages/patches/libxml2-CVE-2016-4658.patch b/gnu/packages/patches/libxml2-CVE-2016-4658.patch
new file mode 100644
index 0000000000..a4e1f31fae
--- /dev/null
+++ b/gnu/packages/patches/libxml2-CVE-2016-4658.patch
@@ -0,0 +1,257 @@
+Fix CVE-2016-4658:
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-4658
+
+Patch copied from upstream source repository:
+
+https://git.gnome.org/browse/libxml2/commit/?id=c1d1f7121194036608bf555f08d3062a36fd344b
+
+From c1d1f7121194036608bf555f08d3062a36fd344b Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Tue, 28 Jun 2016 18:34:52 +0200
+Subject: [PATCH] Disallow namespace nodes in XPointer ranges
+
+Namespace nodes must be copied to avoid use-after-free errors.
+But they don't necessarily have a physical representation in a
+document, so simply disallow them in XPointer ranges.
+
+Found with afl-fuzz.
+
+Fixes CVE-2016-4658.
+---
+ xpointer.c | 149 +++++++++++++++++++++++--------------------------------------
+ 1 file changed, 56 insertions(+), 93 deletions(-)
+
+diff --git a/xpointer.c b/xpointer.c
+index a7b03fbd..694d120e 100644
+--- a/xpointer.c
++++ b/xpointer.c
+@@ -320,6 +320,45 @@ xmlXPtrRangesEqual(xmlXPathObjectPtr range1, xmlXPathObjectPtr range2) {
+ }
+ 
+ /**
++ * xmlXPtrNewRangeInternal:
++ * @start:  the starting node
++ * @startindex:  the start index
++ * @end:  the ending point
++ * @endindex:  the ending index
++ *
++ * Internal function to create a new xmlXPathObjectPtr of type range
++ *
++ * Returns the newly created object.
++ */
++static xmlXPathObjectPtr
++xmlXPtrNewRangeInternal(xmlNodePtr start, int startindex,
++                        xmlNodePtr end, int endindex) {
++    xmlXPathObjectPtr ret;
++
++    /*
++     * Namespace nodes must be copied (see xmlXPathNodeSetDupNs).
++     * Disallow them for now.
++     */
++    if ((start != NULL) && (start->type == XML_NAMESPACE_DECL))
++	return(NULL);
++    if ((end != NULL) && (end->type == XML_NAMESPACE_DECL))
++	return(NULL);
++
++    ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
++    if (ret == NULL) {
++        xmlXPtrErrMemory("allocating range");
++	return(NULL);
++    }
++    memset(ret, 0, sizeof(xmlXPathObject));
++    ret->type = XPATH_RANGE;
++    ret->user = start;
++    ret->index = startindex;
++    ret->user2 = end;
++    ret->index2 = endindex;
++    return(ret);
++}
++
++/**
+  * xmlXPtrNewRange:
+  * @start:  the starting node
+  * @startindex:  the start index
+@@ -344,17 +383,7 @@ xmlXPtrNewRange(xmlNodePtr start, int startindex,
+     if (endindex < 0)
+ 	return(NULL);
+ 
+-    ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+-    if (ret == NULL) {
+-        xmlXPtrErrMemory("allocating range");
+-	return(NULL);
+-    }
+-    memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+-    ret->type = XPATH_RANGE;
+-    ret->user = start;
+-    ret->index = startindex;
+-    ret->user2 = end;
+-    ret->index2 = endindex;
++    ret = xmlXPtrNewRangeInternal(start, startindex, end, endindex);
+     xmlXPtrRangeCheckOrder(ret);
+     return(ret);
+ }
+@@ -381,17 +410,8 @@ xmlXPtrNewRangePoints(xmlXPathObjectPtr start, xmlXPathObjectPtr end) {
+     if (end->type != XPATH_POINT)
+ 	return(NULL);
+ 
+-    ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+-    if (ret == NULL) {
+-        xmlXPtrErrMemory("allocating range");
+-	return(NULL);
+-    }
+-    memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+-    ret->type = XPATH_RANGE;
+-    ret->user = start->user;
+-    ret->index = start->index;
+-    ret->user2 = end->user;
+-    ret->index2 = end->index;
++    ret = xmlXPtrNewRangeInternal(start->user, start->index, end->user,
++                                  end->index);
+     xmlXPtrRangeCheckOrder(ret);
+     return(ret);
+ }
+@@ -416,17 +436,7 @@ xmlXPtrNewRangePointNode(xmlXPathObjectPtr start, xmlNodePtr end) {
+     if (start->type != XPATH_POINT)
+ 	return(NULL);
+ 
+-    ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+-    if (ret == NULL) {
+-        xmlXPtrErrMemory("allocating range");
+-	return(NULL);
+-    }
+-    memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+-    ret->type = XPATH_RANGE;
+-    ret->user = start->user;
+-    ret->index = start->index;
+-    ret->user2 = end;
+-    ret->index2 = -1;
++    ret = xmlXPtrNewRangeInternal(start->user, start->index, end, -1);
+     xmlXPtrRangeCheckOrder(ret);
+     return(ret);
+ }
+@@ -453,17 +463,7 @@ xmlXPtrNewRangeNodePoint(xmlNodePtr start, xmlXPathObjectPtr end) {
+     if (end->type != XPATH_POINT)
+ 	return(NULL);
+ 
+-    ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+-    if (ret == NULL) {
+-        xmlXPtrErrMemory("allocating range");
+-	return(NULL);
+-    }
+-    memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+-    ret->type = XPATH_RANGE;
+-    ret->user = start;
+-    ret->index = -1;
+-    ret->user2 = end->user;
+-    ret->index2 = end->index;
++    ret = xmlXPtrNewRangeInternal(start, -1, end->user, end->index);
+     xmlXPtrRangeCheckOrder(ret);
+     return(ret);
+ }
+@@ -486,17 +486,7 @@ xmlXPtrNewRangeNodes(xmlNodePtr start, xmlNodePtr end) {
+     if (end == NULL)
+ 	return(NULL);
+ 
+-    ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+-    if (ret == NULL) {
+-        xmlXPtrErrMemory("allocating range");
+-	return(NULL);
+-    }
+-    memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+-    ret->type = XPATH_RANGE;
+-    ret->user = start;
+-    ret->index = -1;
+-    ret->user2 = end;
+-    ret->index2 = -1;
++    ret = xmlXPtrNewRangeInternal(start, -1, end, -1);
+     xmlXPtrRangeCheckOrder(ret);
+     return(ret);
+ }
+@@ -516,17 +506,7 @@ xmlXPtrNewCollapsedRange(xmlNodePtr start) {
+     if (start == NULL)
+ 	return(NULL);
+ 
+-    ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+-    if (ret == NULL) {
+-        xmlXPtrErrMemory("allocating range");
+-	return(NULL);
+-    }
+-    memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+-    ret->type = XPATH_RANGE;
+-    ret->user = start;
+-    ret->index = -1;
+-    ret->user2 = NULL;
+-    ret->index2 = -1;
++    ret = xmlXPtrNewRangeInternal(start, -1, NULL, -1);
+     return(ret);
+ }
+ 
+@@ -541,6 +521,8 @@ xmlXPtrNewCollapsedRange(xmlNodePtr start) {
+  */
+ xmlXPathObjectPtr
+ xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) {
++    xmlNodePtr endNode;
++    int endIndex;
+     xmlXPathObjectPtr ret;
+ 
+     if (start == NULL)
+@@ -549,7 +531,12 @@ xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) {
+ 	return(NULL);
+     switch (end->type) {
+ 	case XPATH_POINT:
++	    endNode = end->user;
++	    endIndex = end->index;
++	    break;
+ 	case XPATH_RANGE:
++	    endNode = end->user2;
++	    endIndex = end->index2;
+ 	    break;
+ 	case XPATH_NODESET:
+ 	    /*
+@@ -557,39 +544,15 @@ xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) {
+ 	     */
+ 	    if (end->nodesetval->nodeNr <= 0)
+ 		return(NULL);
++	    endNode = end->nodesetval->nodeTab[end->nodesetval->nodeNr - 1];
++	    endIndex = -1;
+ 	    break;
+ 	default:
+ 	    /* TODO */
+ 	    return(NULL);
+     }
+ 
+-    ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+-    if (ret == NULL) {
+-        xmlXPtrErrMemory("allocating range");
+-	return(NULL);
+-    }
+-    memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+-    ret->type = XPATH_RANGE;
+-    ret->user = start;
+-    ret->index = -1;
+-    switch (end->type) {
+-	case XPATH_POINT:
+-	    ret->user2 = end->user;
+-	    ret->index2 = end->index;
+-	    break;
+-	case XPATH_RANGE:
+-	    ret->user2 = end->user2;
+-	    ret->index2 = end->index2;
+-	    break;
+-	case XPATH_NODESET: {
+-	    ret->user2 = end->nodesetval->nodeTab[end->nodesetval->nodeNr - 1];
+-	    ret->index2 = -1;
+-	    break;
+-	}
+-	default:
+-	    STRANGE
+-	    return(NULL);
+-    }
++    ret = xmlXPtrNewRangeInternal(start, -1, endNode, endIndex);
+     xmlXPtrRangeCheckOrder(ret);
+     return(ret);
+ }
+-- 
+2.11.0
+
diff --git a/gnu/packages/patches/libxml2-CVE-2016-5131.patch b/gnu/packages/patches/libxml2-CVE-2016-5131.patch
new file mode 100644
index 0000000000..38938c8e3e
--- /dev/null
+++ b/gnu/packages/patches/libxml2-CVE-2016-5131.patch
@@ -0,0 +1,218 @@
+Fix CVE-2016-5131:
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-5131
+
+Patches copied from upstream source repository (the test suite fails
+without the 2nd patch):
+
+https://git.gnome.org/browse/libxml2/commit/?id=9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e
+https://git.gnome.org/browse/libxml2/commit/?id=a005199330b86dada19d162cae15ef9bdcb6baa8
+
+From 9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Tue, 28 Jun 2016 14:22:23 +0200
+Subject: [PATCH] Fix XPointer paths beginning with range-to
+
+The old code would invoke the broken xmlXPtrRangeToFunction. range-to
+isn't really a function but a special kind of location step. Remove
+this function and always handle range-to in the XPath code.
+
+The old xmlXPtrRangeToFunction could also be abused to trigger a
+use-after-free error with the potential for remote code execution.
+
+Found with afl-fuzz.
+
+Fixes CVE-2016-5131.
+---
+ result/XPath/xptr/vidbase | 13 ++++++++
+ test/XPath/xptr/vidbase   |  1 +
+ xpath.c                   |  7 ++++-
+ xpointer.c                | 76 ++++-------------------------------------------
+ 4 files changed, 26 insertions(+), 71 deletions(-)
+
+diff --git a/result/XPath/xptr/vidbase b/result/XPath/xptr/vidbase
+index 8b9e92d6..f19193e7 100644
+--- a/result/XPath/xptr/vidbase
++++ b/result/XPath/xptr/vidbase
+@@ -17,3 +17,16 @@ Object is a Location Set:
+   To node
+     ELEMENT p
+ 
++
++========================
++Expression: xpointer(range-to(id('chapter2')))
++Object is a Location Set:
++1 :   Object is a range :
++  From node
++     /
++  To node
++    ELEMENT chapter
++      ATTRIBUTE id
++        TEXT
++          content=chapter2
++
+diff --git a/test/XPath/xptr/vidbase b/test/XPath/xptr/vidbase
+index b1463830..884b1065 100644
+--- a/test/XPath/xptr/vidbase
++++ b/test/XPath/xptr/vidbase
+@@ -1,2 +1,3 @@
+ xpointer(id('chapter1')/p)
+ xpointer(id('chapter1')/p[1]/range-to(following-sibling::p[2]))
++xpointer(range-to(id('chapter2')))
+diff --git a/xpath.c b/xpath.c
+index d992841e..5a01b1b3 100644
+--- a/xpath.c
++++ b/xpath.c
+@@ -10691,13 +10691,18 @@ xmlXPathCompPathExpr(xmlXPathParserContextPtr ctxt) {
+ 		    lc = 1;
+ 		    break;
+ 		} else if ((NXT(len) == '(')) {
+-		    /* Note Type or Function */
++		    /* Node Type or Function */
+ 		    if (xmlXPathIsNodeType(name)) {
+ #ifdef DEBUG_STEP
+ 		        xmlGenericError(xmlGenericErrorContext,
+ 				"PathExpr: Type search\n");
+ #endif
+ 			lc = 1;
++#ifdef LIBXML_XPTR_ENABLED
++                    } else if (ctxt->xptr &&
++                               xmlStrEqual(name, BAD_CAST "range-to")) {
++                        lc = 1;
++#endif
+ 		    } else {
+ #ifdef DEBUG_STEP
+ 		        xmlGenericError(xmlGenericErrorContext,
+diff --git a/xpointer.c b/xpointer.c
+index 676c5105..d74174a3 100644
+--- a/xpointer.c
++++ b/xpointer.c
+@@ -1332,8 +1332,6 @@ xmlXPtrNewContext(xmlDocPtr doc, xmlNodePtr here, xmlNodePtr origin) {
+     ret->here = here;
+     ret->origin = origin;
+ 
+-    xmlXPathRegisterFunc(ret, (xmlChar *)"range-to",
+-	                 xmlXPtrRangeToFunction);
+     xmlXPathRegisterFunc(ret, (xmlChar *)"range",
+ 	                 xmlXPtrRangeFunction);
+     xmlXPathRegisterFunc(ret, (xmlChar *)"range-inside",
+@@ -2243,76 +2241,14 @@ xmlXPtrRangeInsideFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+  * @nargs:  the number of args
+  *
+  * Implement the range-to() XPointer function
++ *
++ * Obsolete. range-to is not a real function but a special type of location
++ * step which is handled in xpath.c.
+  */
+ void
+-xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+-    xmlXPathObjectPtr range;
+-    const xmlChar *cur;
+-    xmlXPathObjectPtr res, obj;
+-    xmlXPathObjectPtr tmp;
+-    xmlLocationSetPtr newset = NULL;
+-    xmlNodeSetPtr oldset;
+-    int i;
+-
+-    if (ctxt == NULL) return;
+-    CHECK_ARITY(1);
+-    /*
+-     * Save the expression pointer since we will have to evaluate
+-     * it multiple times. Initialize the new set.
+-     */
+-    CHECK_TYPE(XPATH_NODESET);
+-    obj = valuePop(ctxt);
+-    oldset = obj->nodesetval;
+-    ctxt->context->node = NULL;
+-
+-    cur = ctxt->cur;
+-    newset = xmlXPtrLocationSetCreate(NULL);
+-
+-    for (i = 0; i < oldset->nodeNr; i++) {
+-	ctxt->cur = cur;
+-
+-	/*
+-	 * Run the evaluation with a node list made of a single item
+-	 * in the nodeset.
+-	 */
+-	ctxt->context->node = oldset->nodeTab[i];
+-	tmp = xmlXPathNewNodeSet(ctxt->context->node);
+-	valuePush(ctxt, tmp);
+-
+-	xmlXPathEvalExpr(ctxt);
+-	CHECK_ERROR;
+-
+-	/*
+-	 * The result of the evaluation need to be tested to
+-	 * decided whether the filter succeeded or not
+-	 */
+-	res = valuePop(ctxt);
+-	range = xmlXPtrNewRangeNodeObject(oldset->nodeTab[i], res);
+-	if (range != NULL) {
+-	    xmlXPtrLocationSetAdd(newset, range);
+-	}
+-
+-	/*
+-	 * Cleanup
+-	 */
+-	if (res != NULL)
+-	    xmlXPathFreeObject(res);
+-	if (ctxt->value == tmp) {
+-	    res = valuePop(ctxt);
+-	    xmlXPathFreeObject(res);
+-	}
+-
+-	ctxt->context->node = NULL;
+-    }
+-
+-    /*
+-     * The result is used as the new evaluation set.
+-     */
+-    xmlXPathFreeObject(obj);
+-    ctxt->context->node = NULL;
+-    ctxt->context->contextSize = -1;
+-    ctxt->context->proximityPosition = -1;
+-    valuePush(ctxt, xmlXPtrWrapLocationSet(newset));
++xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt,
++                       int nargs ATTRIBUTE_UNUSED) {
++    XP_ERROR(XPATH_EXPR_ERROR);
+ }
+ 
+ /**
+-- 
+2.11.0
+
+From a005199330b86dada19d162cae15ef9bdcb6baa8 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Tue, 28 Jun 2016 14:19:58 +0200
+Subject: [PATCH] Fix comparison with root node in xmlXPathCmpNodes
+
+This change has already been made in xmlXPathCmpNodesExt but not in
+xmlXPathCmpNodes.
+---
+ xpath.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/xpath.c b/xpath.c
+index 751665b8..d992841e 100644
+--- a/xpath.c
++++ b/xpath.c
+@@ -3342,13 +3342,13 @@ xmlXPathCmpNodes(xmlNodePtr node1, xmlNodePtr node2) {
+      * compute depth to root
+      */
+     for (depth2 = 0, cur = node2;cur->parent != NULL;cur = cur->parent) {
+-	if (cur == node1)
++	if (cur->parent == node1)
+ 	    return(1);
+ 	depth2++;
+     }
+     root = cur;
+     for (depth1 = 0, cur = node1;cur->parent != NULL;cur = cur->parent) {
+-	if (cur == node2)
++	if (cur->parent == node2)
+ 	    return(-1);
+ 	depth1++;
+     }
+-- 
+2.11.0
+
diff --git a/gnu/packages/patches/mcrypt-CVE-2012-4409.patch b/gnu/packages/patches/mcrypt-CVE-2012-4409.patch
index 60cf8e0430..3089f962f7 100644
--- a/gnu/packages/patches/mcrypt-CVE-2012-4409.patch
+++ b/gnu/packages/patches/mcrypt-CVE-2012-4409.patch
@@ -3,30 +3,17 @@ From: Tom Callaway <spot@fedoraproject.org>
 Date: Fri, 7 Sep 2012 11:39:29 -0400
 Subject: apply fix for CVE-2012-4409 (thanks to Raphael Geissert)
 
----
- mcrypt-CVE-2012-4409.patch | 12 ++++++++++++
- mcrypt.spec                | 10 +++++++++-
- 2 files changed, 21 insertions(+), 1 deletion(-)
- create mode 100644 mcrypt-CVE-2012-4409.patch
-
-diff --git a/mcrypt-CVE-2012-4409.patch b/mcrypt-CVE-2012-4409.patch
-new file mode 100644
-index 0000000..747f428
---- /dev/null
-+++ b/mcrypt-CVE-2012-4409.patch
-@@ -0,0 +1,12 @@
-+diff -up mcrypt-2.6.8/src/extra.c.CVE-2012-4409 mcrypt-2.6.8/src/extra.c
-+--- mcrypt-2.6.8/src/extra.c.CVE-2012-4409	2012-09-07 11:00:55.906870746 -0400
-++++ mcrypt-2.6.8/src/extra.c	2012-09-07 11:00:27.967858365 -0400
-+@@ -242,6 +242,8 @@ int check_file_head(FILE * fstream, char
-+ 			if (m_getbit(0, sflag) != 0) { /* if the first bit is set */
-+ 				*salt_size = m_setbit(0, sflag, 0);
-+ 				if (*salt_size > 0) {
-++					if (*salt_size > sizeof(tmp_buf))
-++						err_quit(_("Salt is too long\n"));
-+ 					fread(tmp_buf, 1, *salt_size,
-+ 					      fstream);
-+ 					memmove(salt, tmp_buf, *salt_size);
+--- mcrypt-2.6.8/src/extra.c.CVE-2012-4409	2012-09-07 11:00:55.906870746 -0400
++++ mcrypt-2.6.8/src/extra.c	2012-09-07 11:00:27.967858365 -0400
+@@ -242,6 +242,8 @@ int check_file_head(FILE * fstream, char
+ 			if (m_getbit(0, sflag) != 0) { /* if the first bit is set */
+ 				*salt_size = m_setbit(0, sflag, 0);
+ 				if (*salt_size > 0) {
++					if (*salt_size > sizeof(tmp_buf))
++						err_quit(_("Salt is too long\n"));
+ 					fread(tmp_buf, 1, *salt_size,
+ 					      fstream);
+ 					memmove(salt, tmp_buf, *salt_size);
  
 -- 
 cgit v0.12
diff --git a/gnu/packages/patches/mcrypt-CVE-2012-4527.patch b/gnu/packages/patches/mcrypt-CVE-2012-4527.patch
index d931dd174b..dfbf048583 100644
--- a/gnu/packages/patches/mcrypt-CVE-2012-4527.patch
+++ b/gnu/packages/patches/mcrypt-CVE-2012-4527.patch
@@ -3,109 +3,97 @@ From: Tom Callaway <spot@fedoraproject.org>
 Date: Tue, 30 Oct 2012 15:39:24 -0400
 Subject: apply workaround to CVE-2012-4527
 
----
- mcrypt-CVE-2012-4527-80-width-patch | 91 +++++++++++++++++++++++++++++++++++++
- mcrypt.spec                         | 10 +++-
- 2 files changed, 100 insertions(+), 1 deletion(-)
- create mode 100644 mcrypt-CVE-2012-4527-80-width-patch
-
-diff --git a/mcrypt-CVE-2012-4527-80-width-patch b/mcrypt-CVE-2012-4527-80-width-patch
-new file mode 100644
-index 0000000..0eb94d8
---- /dev/null
-+++ b/mcrypt-CVE-2012-4527-80-width-patch
-@@ -0,0 +1,91 @@
-+--- mcrypt-2.6.8.orig/src/mcrypt.c
-++++ mcrypt-2.6.8/src/mcrypt.c
-+@@ -41,6 +41,8 @@
-+ # include <time.h>
-+ #endif
-+ 
-++#define WIDTH 80
-++
-+ static char rcsid[] =
-+     "$Id: mcrypt.c,v 1.2 2007/11/07 17:10:21 nmav Exp $";
-+ 
-+@@ -482,7 +484,7 @@
-+ #ifdef HAVE_STAT
-+       if (stream_flag == FALSE) {
-+ 	 if (is_normal_file(file[i]) == FALSE) {
-+-	    sprintf(tmperr,
-++	    snprintf(tmperr, WIDTH,
-+ 		    _
-+ 		    ("%s: %s is not a regular file. Skipping...\n"),
-+ 		    program_name, file[i]);
-+@@ -501,7 +503,7 @@
-+ 	    dinfile = file[i];
-+ 	 if ((isatty(fileno((FILE *) (stdin))) == 1)
-+ 	     && (stream_flag == TRUE) && (force == 0)) {	/* not a tty */
-+-	    sprintf(tmperr,
-++	    snprintf(tmperr, WIDTH,
-+ 		    _
-+ 		    ("%s: Encrypted data will not be read from a terminal.\n"),
-+ 		    program_name);
-+@@ -520,7 +522,7 @@
-+ 	    einfile = file[i];
-+ 	 if ((isatty(fileno((FILE *) (stdout))) == 1)
-+ 	     && (stream_flag == TRUE) && (force == 0)) {	/* not a tty */
-+-	    sprintf(tmperr,
-++	    snprintf(tmperr, WIDTH,
-+ 		    _
-+ 		    ("%s: Encrypted data will not be written to a terminal.\n"),
-+ 		    program_name);
-+@@ -544,7 +546,7 @@
-+ 	    strcpy(outfile, einfile);
-+ 	    /* if file has already the .nc ignore it */
-+ 	    if (strstr(outfile, ".nc") != NULL) {
-+-	       sprintf(tmperr,
-++	       snprintf(tmperr, WIDTH,
-+ 		       _
-+ 		       ("%s: file %s has the .nc suffix... skipping...\n"),
-+ 		       program_name, outfile);
-+@@ -590,10 +592,10 @@
-+ 
-+ 	 if (x == 0) {
-+ 	    if (stream_flag == FALSE) {
-+-	       sprintf(tmperr, _("File %s was decrypted.\n"), dinfile);
-++	       snprintf(tmperr, WIDTH, _("File %s was decrypted.\n"), dinfile);
-+ 	       err_warn(tmperr);
-+ 	    } else {
-+-	       sprintf(tmperr, _("Stdin was decrypted.\n"));
-++	       snprintf(tmperr, WIDTH, _("Stdin was decrypted.\n"));
-+ 	       err_warn(tmperr);
-+ 	    }
-+ #ifdef HAVE_STAT
-+@@ -610,7 +612,7 @@
-+ 
-+ 	 } else {
-+ 	    if (stream_flag == FALSE) {
-+-	       sprintf(tmperr,
-++	       snprintf(tmperr, WIDTH,
-+ 		       _
-+ 		       ("File %s was NOT decrypted successfully.\n"),
-+ 		       dinfile);
-+@@ -636,10 +638,10 @@
-+ 
-+ 	 if (x == 0) {
-+ 	    if (stream_flag == FALSE) {
-+-	       sprintf(tmperr, _("File %s was encrypted.\n"), einfile);
-++	       snprintf(tmperr, WIDTH, _("File %s was encrypted.\n"), einfile);
-+ 	       err_warn(tmperr);
-+ 	    } else {
-+-	       sprintf(tmperr, _("Stdin was encrypted.\n"));
-++	       snprintf(tmperr, WIDTH, _("Stdin was encrypted.\n"));
-+ 	       err_warn(tmperr);
-+ 	    }
-+ #ifdef HAVE_STAT
-+@@ -655,7 +657,7 @@
-+ 
-+ 	 } else {
-+ 	    if (stream_flag == FALSE) {
-+-	       sprintf(tmperr,
-++	       snprintf(tmperr, WIDTH,
-+ 		       _
-+ 		       ("File %s was NOT encrypted successfully.\n"),
-+ 		       einfile);
--- 
-cgit v0.12
+--- mcrypt-2.6.8.orig/src/mcrypt.c
++++ mcrypt-2.6.8/src/mcrypt.c
+@@ -41,6 +41,8 @@
+ # include <time.h>
+ #endif
+ 
++#define WIDTH 80
++
+ static char rcsid[] =
+     "$Id: mcrypt.c,v 1.2 2007/11/07 17:10:21 nmav Exp $";
+ 
+@@ -482,7 +484,7 @@
+ #ifdef HAVE_STAT
+       if (stream_flag == FALSE) {
+ 	 if (is_normal_file(file[i]) == FALSE) {
+-	    sprintf(tmperr,
++	    snprintf(tmperr, WIDTH,
+ 		    _
+ 		    ("%s: %s is not a regular file. Skipping...\n"),
+ 		    program_name, file[i]);
+@@ -501,7 +503,7 @@
+ 	    dinfile = file[i];
+ 	 if ((isatty(fileno((FILE *) (stdin))) == 1)
+ 	     && (stream_flag == TRUE) && (force == 0)) {	/* not a tty */
+-	    sprintf(tmperr,
++	    snprintf(tmperr, WIDTH,
+ 		    _
+ 		    ("%s: Encrypted data will not be read from a terminal.\n"),
+ 		    program_name);
+@@ -520,7 +522,7 @@
+ 	    einfile = file[i];
+ 	 if ((isatty(fileno((FILE *) (stdout))) == 1)
+ 	     && (stream_flag == TRUE) && (force == 0)) {	/* not a tty */
+-	    sprintf(tmperr,
++	    snprintf(tmperr, WIDTH,
+ 		    _
+ 		    ("%s: Encrypted data will not be written to a terminal.\n"),
+ 		    program_name);
+@@ -544,7 +546,7 @@
+ 	    strcpy(outfile, einfile);
+ 	    /* if file has already the .nc ignore it */
+ 	    if (strstr(outfile, ".nc") != NULL) {
+-	       sprintf(tmperr,
++	       snprintf(tmperr, WIDTH,
+ 		       _
+ 		       ("%s: file %s has the .nc suffix... skipping...\n"),
+ 		       program_name, outfile);
+@@ -590,10 +592,10 @@
+ 
+ 	 if (x == 0) {
+ 	    if (stream_flag == FALSE) {
+-	       sprintf(tmperr, _("File %s was decrypted.\n"), dinfile);
++	       snprintf(tmperr, WIDTH, _("File %s was decrypted.\n"), dinfile);
+ 	       err_warn(tmperr);
+ 	    } else {
+-	       sprintf(tmperr, _("Stdin was decrypted.\n"));
++	       snprintf(tmperr, WIDTH, _("Stdin was decrypted.\n"));
+ 	       err_warn(tmperr);
+ 	    }
+ #ifdef HAVE_STAT
+@@ -610,7 +612,7 @@
+ 
+ 	 } else {
+ 	    if (stream_flag == FALSE) {
+-	       sprintf(tmperr,
++	       snprintf(tmperr, WIDTH,
+ 		       _
+ 		       ("File %s was NOT decrypted successfully.\n"),
+ 		       dinfile);
+@@ -636,10 +638,10 @@
+ 
+ 	 if (x == 0) {
+ 	    if (stream_flag == FALSE) {
+-	       sprintf(tmperr, _("File %s was encrypted.\n"), einfile);
++	       snprintf(tmperr, WIDTH, _("File %s was encrypted.\n"), einfile);
+ 	       err_warn(tmperr);
+ 	    } else {
+-	       sprintf(tmperr, _("Stdin was encrypted.\n"));
++	       snprintf(tmperr, WIDTH, _("Stdin was encrypted.\n"));
+ 	       err_warn(tmperr);
+ 	    }
+ #ifdef HAVE_STAT
+@@ -655,7 +657,7 @@
+ 
+ 	 } else {
+ 	    if (stream_flag == FALSE) {
+-	       sprintf(tmperr,
++	       snprintf(tmperr, WIDTH,
+ 		       _
+ 		       ("File %s was NOT encrypted successfully.\n"),
+ 		       einfile);
+- 
+git v0.12
 
diff --git a/gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch b/gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch
new file mode 100644
index 0000000000..e8f841c4fd
--- /dev/null
+++ b/gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch
@@ -0,0 +1,218 @@
+This patch includes
+
+   * mingw-w64-headers/include/winnt.h: compile fixes for1 gcc-4.9.3
+   * mingw-w64-headers/crt/math.h: Likewise
+   * mingw-w64-headers/crt/float.h (FLT_EPSILON,DBL_EPSILON,LDBL_EPSILON): Add
+   symbols.
+   * mingw-w64-headers/crt/stat.h (S_ISLNK,S_ISSOCK,S_ISUID,S_ISGID,S_ISLINK):
+   Add symbols.
+   (lstat): Add function.
+   * mingw-w64-headers/crt/_mingw_stat64.h: Likewise
+   * mingw-w64-headers/crt/stdlib.h (realpath): Add function.
+
+Needed for building with gcc-4.9.3 and using with cross-libtool-2.4.6.
+
+Upstream status: not yet presented upstream.
+
+index 9c5cf87..74a8541 100644
+--- a/mingw-w64-crt/misc/dirname.c
++++ b/mingw-w64-crt/misc/dirname.c
+@@ -29,6 +29,12 @@
+ #define __cdecl  /* this may not be defined.                   */
+ #endif
+ 
++char *__cdecl
++realpath(const char *name, char *resolved)
++{
++  return resolved ? strcpy (resolved, name) : strdup (name);
++}
++
+ char * __cdecl
+ dirname(char *path)
+ {
+diff --git a/mingw-w64-headers/crt/_mingw_stat64.h b/mingw-w64-headers/crt/_mingw_stat64.h
+index 17e754c..7d2339b 100644
+--- a/mingw-w64-headers/crt/_mingw_stat64.h
++++ b/mingw-w64-headers/crt/_mingw_stat64.h
+@@ -2,13 +2,17 @@
+ 
+ #ifdef _USE_32BIT_TIME_T
+ #define _fstat32 _fstat
++#define _lstat32 _lstat
+ #define _stat32 _stat
+ #define _wstat32 _wstat
+ #define _fstat32i64 _fstati64
++#define _lstat32i64 _lstati64
+ #define _stat32i64 _stati64
+ #define _wstat32i64 _wstati64
+ #else
+ #define _fstat _fstat64i32
++#define _lstat _lstat64i32
++#define _lstati64 _lstat64
+ #define _fstati64 _fstat64
+ #define _stat _stat64i32
+ #define _stati64 _stat64
+diff --git a/mingw-w64-headers/crt/float.h b/mingw-w64-headers/crt/float.h
+index 5874f4e..bdf4ead 100644
+--- a/mingw-w64-headers/crt/float.h
++++ b/mingw-w64-headers/crt/float.h
+@@ -22,6 +22,15 @@
+ #if (__GNUC__ < 4)
+ #error Corrupt install of gcc-s internal headers, or search order was changed.
+ #else
++
++        /* From gcc-4.9.3 float.h.  */
++        #undef FLT_EPSILON
++        #undef DBL_EPSILON
++        #undef LDBL_EPSILON
++        #define FLT_EPSILON	__FLT_EPSILON__
++        #define DBL_EPSILON	__DBL_EPSILON__
++        #define LDBL_EPSILON	__LDBL_EPSILON__
++
+ 	/* #include_next <float_ginclude.h> */
+ 	
+    	/* Number of decimal digits, q, such that any floating-point number with q
+diff --git a/mingw-w64-headers/crt/math.h b/mingw-w64-headers/crt/math.h
+index 1e970f4..99a332f 100644
+--- a/mingw-w64-headers/crt/math.h
++++ b/mingw-w64-headers/crt/math.h
+@@ -216,6 +216,7 @@ extern "C" {
+ #endif
+   }
+ 
++#if 0
+   __CRT_INLINE long double __cdecl fabsl (long double x)
+   {
+ #ifdef __arm__
+@@ -226,6 +227,7 @@ extern "C" {
+     return res;
+ #endif
+   }
++#endif
+ 
+   __CRT_INLINE double __cdecl fabs (double x)
+   {
+@@ -905,7 +907,7 @@ __mingw_choose_expr (                                         \
+ /* 7.12.7.3  */
+   extern double __cdecl hypot (double, double) __MINGW_ATTRIB_DEPRECATED_MSVC2005; /* in libmoldname.a */
+   extern float __cdecl hypotf (float x, float y);
+-#ifndef __CRT__NO_INLINE
++#if 0 //ndef __CRT__NO_INLINE
+   __CRT_INLINE float __cdecl hypotf (float x, float y) { return (float) hypot ((double)x, (double)y);}
+ #endif
+   extern long double __cdecl hypotl (long double, long double);
+diff --git a/mingw-w64-headers/crt/stdlib.h b/mingw-w64-headers/crt/stdlib.h
+index dfc5ae4..6f0fee3 100644
+--- a/mingw-w64-headers/crt/stdlib.h
++++ b/mingw-w64-headers/crt/stdlib.h
+@@ -8,6 +8,7 @@
+ 
+ #include <crtdefs.h>
+ #include <limits.h>
++#include <string.h>
+ 
+ #if defined (__USE_MINGW_ANSI_STDIO) && ((__USE_MINGW_ANSI_STDIO + 0) != 0) && !defined (__USE_MINGW_STRTOX)
+ #define __USE_MINGW_STRTOX 1
+@@ -676,6 +677,8 @@ unsigned long __cdecl _lrotr(unsigned long,int);
+ 
+ #endif /* !__NO_ISOCEXT */
+ 
++char *__cdecl realpath (const char *name, char *resolved);
++
+ #ifdef __cplusplus
+ }
+ #endif
+diff --git a/mingw-w64-headers/crt/sys/stat.h b/mingw-w64-headers/crt/sys/stat.h
+index ed60219..d88b4f1 100644
+--- a/mingw-w64-headers/crt/sys/stat.h
++++ b/mingw-w64-headers/crt/sys/stat.h
+@@ -58,16 +58,21 @@ extern "C" {
+ #include <_mingw_stat64.h>
+ 
+ #define _S_IFMT 0xF000
++#define _S_IFLNK 0xA000
++#define _S_IFSOCK 0xC000
+ #define _S_IFDIR 0x4000
+ #define _S_IFCHR 0x2000
+ #define _S_IFIFO 0x1000
+ #define _S_IFREG 0x8000
++#define _S_ISUID 0x0400
++#define _S_ISGID 0x0200
+ #define _S_IREAD 0x0100
+ #define _S_IWRITE 0x0080
+ #define _S_IEXEC 0x0040
+ 
+   _CRTIMP int __cdecl _fstat32(int _FileDes,struct _stat32 *_Stat);
+   _CRTIMP int __cdecl _stat32(const char *_Name,struct _stat32 *_Stat);
++  static inline int __cdecl _lstat32(const char *_Name,struct _stat32 *_Stat) {return _stat32(_Name, _Stat);}
+   _CRTIMP int __cdecl _fstat64(int _FileDes,struct _stat64 *_Stat);
+   _CRTIMP int __cdecl _fstat32i64(int _FileDes,struct _stat32i64 *_Stat);
+   int __cdecl _fstat64i32(int _FileDes,struct _stat64i32 *_Stat);
+@@ -97,6 +102,9 @@ extern "C" {
+   _CRTIMP int __cdecl _stat64(const char *_Name,struct _stat64 *_Stat);
+   _CRTIMP int __cdecl _stat32i64(const char *_Name,struct _stat32i64 *_Stat);
+   int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat);
++  static inline int __cdecl _lstat64(const char *_Name,struct _stat64 *_Stat) {return _stat64(_Name, _Stat);}
++  static inline int __cdecl _lstat32i64(const char *_Name,struct _stat32i64 *_Stat) {return _stat32i64(_Name, _Stat);}
++  static inline int __cdecl _lstat64i32(const char *_Name,struct _stat64i32 *_Stat) {return _stat64i32(_Name, _Stat);}
+ #ifndef __CRT__NO_INLINE
+   __CRT_INLINE int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat)
+   {
+@@ -132,6 +140,8 @@ extern "C" {
+ #ifndef	NO_OLDNAMES
+ #define	_S_IFBLK	0x3000	/* Block: Is this ever set under w32? */
+ 
++#define S_IFLNK _S_IFLNK
++#define S_IFSOCK _S_IFSOCK
+ #define S_IFMT _S_IFMT
+ #define S_IFDIR _S_IFDIR
+ #define S_IFCHR _S_IFCHR
+@@ -162,6 +172,11 @@ extern "C" {
+ #define S_IXOTH    (S_IXGRP >> 3)
+ #define S_IRWXO    (S_IRWXG >> 3)
+ 
++#define S_ISUID _S_ISUID
++#define S_ISGID _S_ISGID
++
++#define S_ISLNK(m)	(((m) & S_IFMT) == S_IFLNK)
++#define S_ISSOCK(m)	(((m) & S_IFMT) == S_IFSOCK)
+ #define	S_ISDIR(m)	(((m) & S_IFMT) == S_IFDIR)
+ #define	S_ISFIFO(m)	(((m) & S_IFMT) == S_IFIFO)
+ #define	S_ISCHR(m)	(((m) & S_IFMT) == S_IFCHR)
+@@ -174,6 +189,7 @@ extern "C" {
+ int __cdecl stat(const char *_Filename,struct stat *_Stat);
+ int __cdecl fstat(int _Desc,struct stat *_Stat);
+ int __cdecl wstat(const wchar_t *_Filename,struct stat *_Stat);
++static inline int __cdecl lstat(const char *_Filename,struct stat *_Stat){return stat(_Filename, _Stat);}
+ 
+ #ifndef __CRT__NO_INLINE
+ #ifdef _USE_32BIT_TIME_T
+@@ -262,9 +278,11 @@ __CRT_INLINE int __cdecl
+ 
+ #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
+ #ifdef _USE_32BIT_TIME_T
++#define lstat _lstat32i64
+ #define stat _stat32i64
+ #define fstat _fstat32i64
+ #else
++#define lstat _lstat64
+ #define stat _stat64
+ #define fstat _fstat64
+ #endif
+diff --git a/mingw-w64-headers/include/winnt.h b/mingw-w64-headers/include/winnt.h
+index 52af29b..8626396 100644
+--- a/mingw-w64-headers/include/winnt.h
++++ b/mingw-w64-headers/include/winnt.h
+@@ -6895,7 +6895,12 @@ __buildmemorybarrier()
+ 	  DWORD Reg : 3;
+ 	  DWORD R : 1;
+ 	  DWORD L : 1;
++/* C is used as a const specifier */
++#define save_C C
++#undef C
+ 	  DWORD C : 1;
++#define C save_C
++#undef save_C
+ 	  DWORD StackAdjust : 10;
+ 	} DUMMYSTRUCTNAME;
+       } DUMMYUNIONNAME;
diff --git a/gnu/packages/patches/multiqc-fix-git-subprocess-error.patch b/gnu/packages/patches/multiqc-fix-git-subprocess-error.patch
new file mode 100644
index 0000000000..87be6142f4
--- /dev/null
+++ b/gnu/packages/patches/multiqc-fix-git-subprocess-error.patch
@@ -0,0 +1,16 @@
+Without this patch, the incorrect exception is caught when 'git' is not in
+PATH.  See https://github.com/ewels/MultiQC/pull/377.
+
+diff --git a/multiqc/utils/config.py b/multiqc/utils/config.py
+index 01fa554..4a11793 100755
+--- a/multiqc/utils/config.py
++++ b/multiqc/utils/config.py
+@@ -28,7 +28,7 @@ try:
+     git_hash = subprocess.check_output(['git', 'rev-parse', 'HEAD'], stderr=subprocess.STDOUT)
+     git_hash_short = git_hash[:7]
+     version = '{} ({})'.format(version, git_hash_short)
+-except subprocess.CalledProcessError:
++except (subprocess.CalledProcessError, FileNotFoundError):
+     pass
+ os.chdir(cwd)
+ 
diff --git a/gnu/packages/patches/mupdf-CVE-2016-6265.patch b/gnu/packages/patches/mupdf-CVE-2016-6265.patch
deleted file mode 100644
index 58f5c3726c..0000000000
--- a/gnu/packages/patches/mupdf-CVE-2016-6265.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Fix CVE-2016-6265 (use after free in pdf_load_xref()).
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-6265
-https://security-tracker.debian.org/tracker/CVE-2016-6265
-
-Patch copied from upstream source repository:
-
-http://git.ghostscript.com/?p=mupdf.git;h=fa1936405b6a84e5c9bb440912c23d532772f958
-
-diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
-index 576c315..3222599 100644
---- a/source/pdf/pdf-xref.c
-+++ b/source/pdf/pdf-xref.c
-@@ -1184,8 +1184,14 @@ pdf_load_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf)
- 				fz_throw(ctx, FZ_ERROR_GENERIC, "object offset out of range: %d (%d 0 R)", (int)entry->ofs, i);
- 		}
- 		if (entry->type == 'o')
--			if (entry->ofs <= 0 || entry->ofs >= xref_len || pdf_get_xref_entry(ctx, doc, entry->ofs)->type != 'n')
--				fz_throw(ctx, FZ_ERROR_GENERIC, "invalid reference to an objstm that does not exist: %d (%d 0 R)", (int)entry->ofs, i);
-+		{
-+			/* Read this into a local variable here, because pdf_get_xref_entry
-+			 * may solidify the xref, hence invalidating "entry", meaning we
-+			 * need a stashed value for the throw. */
-+			fz_off_t ofs = entry->ofs;
-+			if (ofs <= 0 || ofs >= xref_len || pdf_get_xref_entry(ctx, doc, ofs)->type != 'n')
-+				fz_throw(ctx, FZ_ERROR_GENERIC, "invalid reference to an objstm that does not exist: %d (%d 0 R)", (int)ofs, i);
-+		}
- 	}
- }
- 
diff --git a/gnu/packages/patches/mupdf-CVE-2016-6525.patch b/gnu/packages/patches/mupdf-CVE-2016-6525.patch
deleted file mode 100644
index 370af5ade6..0000000000
--- a/gnu/packages/patches/mupdf-CVE-2016-6525.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Fix CVE-2016-6525 (heap overflow in pdf_load_mesh_params()).
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-6525
-https://security-tracker.debian.org/tracker/CVE-2016-6525
-
-Patch copied from upstream source repository:
-http://git.ghostscript.com/?p=mupdf.git;h=39b0f07dd960f34e7e6bf230ffc3d87c41ef0f2e
-
-diff --git a/source/pdf/pdf-shade.c b/source/pdf/pdf-shade.c
-index 7815b3c..6e25efa 100644
---- a/source/pdf/pdf-shade.c
-+++ b/source/pdf/pdf-shade.c
-@@ -206,7 +206,7 @@ pdf_load_mesh_params(fz_context *ctx, pdf_document *doc, fz_shade *shade, pdf_ob
- 	obj = pdf_dict_get(ctx, dict, PDF_NAME_Decode);
- 	if (pdf_array_len(ctx, obj) >= 6)
- 	{
--		n = (pdf_array_len(ctx, obj) - 4) / 2;
-+		n = fz_mini(FZ_MAX_COLORS, (pdf_array_len(ctx, obj) - 4) / 2);
- 		shade->u.m.x0 = pdf_to_real(ctx, pdf_array_get(ctx, obj, 0));
- 		shade->u.m.x1 = pdf_to_real(ctx, pdf_array_get(ctx, obj, 1));
- 		shade->u.m.y0 = pdf_to_real(ctx, pdf_array_get(ctx, obj, 2));
diff --git a/gnu/packages/patches/mupdf-CVE-2016-7504.patch b/gnu/packages/patches/mupdf-CVE-2016-7504.patch
deleted file mode 100644
index 4bbb4411c0..0000000000
--- a/gnu/packages/patches/mupdf-CVE-2016-7504.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-Fix CVE-2016-7504:
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-7504
-http://bugs.ghostscript.com/show_bug.cgi?id=697142
-
-Patch copied from upstream source repository:
-http://git.ghostscript.com/?p=mujs.git;a=commitdiff;h=5c337af4b3df80cf967e4f9f6a21522de84b392a
-
-From 5c337af4b3df80cf967e4f9f6a21522de84b392a Mon Sep 17 00:00:00 2001
-From: Tor Andersson <tor.andersson@artifex.com>
-Date: Wed, 21 Sep 2016 16:01:08 +0200
-Subject: [PATCH] Fix bug 697142: Stale string pointer stored in regexp object.
-
-Make sure to make a copy of the source pattern string.
-A case we missed when adding short and memory strings to the runtime.
-The code assumed all strings passed to it were either literal or interned.
----
- jsgc.c     | 4 +++-
- jsi.h      | 1 +
- jsregexp.c | 2 +-
- jsrun.c    | 8 ++++++++
- jsvalue.h  | 2 +-
- 5 files changed, 14 insertions(+), 3 deletions(-)
-
-diff --git a/jsgc.c b/jsgc.c
-index 9bd6482..4f7e7dc 100644
---- a/thirdparty/mujs/jsgc.c
-+++ b/thirdparty/mujs/jsgc.c
-@@ -44,8 +44,10 @@ static void jsG_freeobject(js_State *J, js_Object *obj)
- {
- 	if (obj->head)
- 		jsG_freeproperty(J, obj->head);
--	if (obj->type == JS_CREGEXP)
-+	if (obj->type == JS_CREGEXP) {
-+		js_free(J, obj->u.r.source);
- 		js_regfree(obj->u.r.prog);
-+	}
- 	if (obj->type == JS_CITERATOR)
- 		jsG_freeiterator(J, obj->u.iter.head);
- 	if (obj->type == JS_CUSERDATA && obj->u.user.finalize)
-diff --git a/jsi.h b/jsi.h
-index 7d9f7c7..e855045 100644
---- a/thirdparty/mujs/jsi.h
-+++ b/thirdparty/mujs/jsi.h
-@@ -79,6 +79,7 @@ typedef unsigned short js_Instruction;
- 
- /* String interning */
- 
-+char *js_strdup(js_State *J, const char *s);
- const char *js_intern(js_State *J, const char *s);
- void jsS_dumpstrings(js_State *J);
- void jsS_freestrings(js_State *J);
-diff --git a/jsregexp.c b/jsregexp.c
-index 2a056b7..a2d5156 100644
---- a/thirdparty/mujs/jsregexp.c
-+++ b/thirdparty/mujs/jsregexp.c
-@@ -21,7 +21,7 @@ void js_newregexp(js_State *J, const char *pattern, int flags)
- 		js_syntaxerror(J, "regular expression: %s", error);
- 
- 	obj->u.r.prog = prog;
--	obj->u.r.source = pattern;
-+	obj->u.r.source = js_strdup(J, pattern);
- 	obj->u.r.flags = flags;
- 	obj->u.r.last = 0;
- 	js_pushobject(J, obj);
-diff --git a/jsrun.c b/jsrun.c
-index 2648c4c..ee80845 100644
---- a/thirdparty/mujs/jsrun.c
-+++ b/thirdparty/mujs/jsrun.c
-@@ -45,6 +45,14 @@ void *js_realloc(js_State *J, void *ptr, int size)
- 	return ptr;
- }
- 
-+char *js_strdup(js_State *J, const char *s)
-+{
-+	int n = strlen(s) + 1;
-+	char *p = js_malloc(J, n);
-+	memcpy(p, s, n);
-+	return p;
-+}
-+
- void js_free(js_State *J, void *ptr)
- {
- 	J->alloc(J->actx, ptr, 0);
-diff --git a/jsvalue.h b/jsvalue.h
-index 6cfbd89..8fb5016 100644
---- a/thirdparty/mujs/jsvalue.h
-+++ b/thirdparty/mujs/jsvalue.h
-@@ -71,7 +71,7 @@ struct js_String
- struct js_Regexp
- {
- 	void *prog;
--	const char *source;
-+	char *source;
- 	unsigned short flags;
- 	unsigned short last;
- };
--- 
-2.10.2
-
diff --git a/gnu/packages/patches/mupdf-CVE-2016-7505.patch b/gnu/packages/patches/mupdf-CVE-2016-7505.patch
deleted file mode 100644
index 15e4f374d6..0000000000
--- a/gnu/packages/patches/mupdf-CVE-2016-7505.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Fix CVE-2016-7505:
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-7505
-http://bugs.ghostscript.com/show_bug.cgi?id=697140
-
-Patch copied from upstream source repository:
-http://git.ghostscript.com/?p=mujs.git;a=commitdiff;h=8c805b4eb19cf2af689c860b77e6111d2ee439d5
-
-From 8c805b4eb19cf2af689c860b77e6111d2ee439d5 Mon Sep 17 00:00:00 2001
-From: Tor Andersson <tor.andersson@artifex.com>
-Date: Wed, 21 Sep 2016 15:21:04 +0200
-Subject: [PATCH] Fix bug 697140: Overflow check in ascii division in strtod.
-
----
- jsdtoa.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/jsdtoa.c b/jsdtoa.c
-index 2e52368..920c1a7 100644
---- a/thirdparty/mujs/jsdtoa.c
-+++ b/thirdparty/mujs/jsdtoa.c
-@@ -735,6 +735,7 @@ xx:
- 		n -= c<<b;
- 		*p++ = c + '0';
- 		(*na)++;
-+		if (*na >= Ndig) break; /* abort if overflowing */
- 	}
- 	*p = 0;
- }
--- 
-2.10.2
-
diff --git a/gnu/packages/patches/mupdf-CVE-2016-7506.patch b/gnu/packages/patches/mupdf-CVE-2016-7506.patch
deleted file mode 100644
index 733249acaa..0000000000
--- a/gnu/packages/patches/mupdf-CVE-2016-7506.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Fix CVE-2016-7506:
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-7506
-http://bugs.ghostscript.com/show_bug.cgi?id=697141
-
-Patch copied from upstream source repository:
-http://git.ghostscript.com/?p=mujs.git;a=commitdiff;h=5000749f5afe3b956fc916e407309de840997f4a
-
-From 5000749f5afe3b956fc916e407309de840997f4a Mon Sep 17 00:00:00 2001
-From: Tor Andersson <tor.andersson@artifex.com>
-Date: Wed, 21 Sep 2016 16:02:11 +0200
-Subject: [PATCH] Fix bug 697141: buffer overrun in regexp string substitution.
-
-A '$' escape at the end of the string would read past the zero terminator
-when looking for the escaped character.
----
- jsstring.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/jsstring.c b/jsstring.c
-index 66f6a89..0209a8e 100644
---- a/thirdparty/mujs/jsstring.c
-+++ b/thirdparty/mujs/jsstring.c
-@@ -421,6 +421,7 @@ loop:
- 		while (*r) {
- 			if (*r == '$') {
- 				switch (*(++r)) {
-+				case 0: --r; /* end of string; back up and fall through */
- 				case '$': js_putc(J, &sb, '$'); break;
- 				case '`': js_putm(J, &sb, source, s); break;
- 				case '\'': js_puts(J, &sb, s + n); break;
-@@ -516,6 +517,7 @@ static void Sp_replace_string(js_State *J)
- 		while (*r) {
- 			if (*r == '$') {
- 				switch (*(++r)) {
-+				case 0: --r; /* end of string; back up and fall through */
- 				case '$': js_putc(J, &sb, '$'); break;
- 				case '&': js_putm(J, &sb, s, s + n); break;
- 				case '`': js_putm(J, &sb, source, s); break;
--- 
-2.10.2
-
diff --git a/gnu/packages/patches/mupdf-CVE-2016-7563.patch b/gnu/packages/patches/mupdf-CVE-2016-7563.patch
deleted file mode 100644
index 288c9ab2df..0000000000
--- a/gnu/packages/patches/mupdf-CVE-2016-7563.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Fix CVE-2016-7563:
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-7563
-http://bugs.ghostscript.com/show_bug.cgi?id=697136
-
-Patch copied from upstream source repository:
-http://git.ghostscript.com/?p=mujs.git;a=commitdiff;h=f8234d830e17fc5e8fe09eb76d86dad3f6233c59
-
-From f8234d830e17fc5e8fe09eb76d86dad3f6233c59 Mon Sep 17 00:00:00 2001
-From: Tor Andersson <tor.andersson@artifex.com>
-Date: Tue, 20 Sep 2016 17:11:32 +0200
-Subject: [PATCH] Fix bug 697136.
-
-We were unconditionally reading the next character if we encountered
-a '*' in a multi-line comment; possibly reading past the end of
-the input.
----
- jslex.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/jslex.c b/jslex.c
-index 7b80800..cbd0eeb 100644
---- a/thirdparty/mujs/jslex.c
-+++ b/thirdparty/mujs/jslex.c
-@@ -225,7 +225,8 @@ static int lexcomment(js_State *J)
- 			if (jsY_accept(J, '/'))
- 				return 0;
- 		}
--		jsY_next(J);
-+		else
-+			jsY_next(J);
- 	}
- 	return -1;
- }
--- 
-2.10.2
-
diff --git a/gnu/packages/patches/mupdf-CVE-2016-7564.patch b/gnu/packages/patches/mupdf-CVE-2016-7564.patch
deleted file mode 100644
index c2ce33d1df..0000000000
--- a/gnu/packages/patches/mupdf-CVE-2016-7564.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Fix CVE-2016-7564:
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-7564
-http://bugs.ghostscript.com/show_bug.cgi?id=697137
-
-Patch copied from upstream source repository:
-http://git.ghostscript.com/?p=mujs.git;a=commitdiff;h=a3a4fe840b80706c706e86160352af5936f292d8
-
-From a3a4fe840b80706c706e86160352af5936f292d8 Mon Sep 17 00:00:00 2001
-From: Tor Andersson <tor.andersson@artifex.com>
-Date: Tue, 20 Sep 2016 17:19:06 +0200
-Subject: [PATCH] Fix bug 697137: off by one in string length calculation.
-
-We were not allocating space for the terminating zero byte.
----
- jsfunction.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/jsfunction.c b/jsfunction.c
-index 8b5b18e..28f7aa7 100644
---- a/thirdparty/mujs/jsfunction.c
-+++ b/thirdparty/mujs/jsfunction.c
-@@ -61,7 +61,7 @@ static void Fp_toString(js_State *J)
- 		n += strlen(F->name);
- 		for (i = 0; i < F->numparams; ++i)
- 			n += strlen(F->vartab[i]) + 1;
--		s = js_malloc(J, n);
-+		s = js_malloc(J, n + 1);
- 		strcpy(s, "function ");
- 		strcat(s, F->name);
- 		strcat(s, "(");
--- 
-2.10.2
-
diff --git a/gnu/packages/patches/mupdf-CVE-2016-8674.patch b/gnu/packages/patches/mupdf-CVE-2016-8674.patch
deleted file mode 100644
index 2a35619761..0000000000
--- a/gnu/packages/patches/mupdf-CVE-2016-8674.patch
+++ /dev/null
@@ -1,165 +0,0 @@
-Fix CVE-2016-8674 (use-after-free in pdf_to_num()).
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-8674
-https://security-tracker.debian.org/tracker/CVE-2016-8674
-
-Patch adapted from upstream source repository:
-http://git.ghostscript.com/?p=mupdf.git;h=1e03c06456d997435019fb3526fa2d4be7dbc6ec
-
-diff --git a/include/mupdf/pdf/document.h b/include/mupdf/pdf/document.h
-index f8ef0cd..e8345b7 100644
---- a/include/mupdf/pdf/document.h
-+++ b/include/mupdf/pdf/document.h
-@@ -258,6 +258,10 @@ struct pdf_document_s
-	fz_font **type3_fonts;
-
-	pdf_resource_tables *resources;
-+
-+	int orphans_max;
-+	int orphans_count;
-+	pdf_obj **orphans;
- };
- 
- /*
-diff --git a/include/mupdf/pdf/object.h b/include/mupdf/pdf/object.h
-index 346a2f1..02d4119 100644
---- a/include/mupdf/pdf/object.h
-+++ b/include/mupdf/pdf/object.h
-@@ -109,6 +109,7 @@ pdf_obj *pdf_dict_gets(fz_context *ctx, pdf_obj *dict, const char *key);
- pdf_obj *pdf_dict_getsa(fz_context *ctx, pdf_obj *dict, const char *key, const char *abbrev);
- void pdf_dict_put(fz_context *ctx, pdf_obj *dict, pdf_obj *key, pdf_obj *val);
- void pdf_dict_put_drop(fz_context *ctx, pdf_obj *dict, pdf_obj *key, pdf_obj *val);
-+void pdf_dict_get_put_drop(fz_context *ctx, pdf_obj *dict, pdf_obj *key, pdf_obj *val, pdf_obj **old_val);
- void pdf_dict_puts(fz_context *ctx, pdf_obj *dict, const char *key, pdf_obj *val);
- void pdf_dict_puts_drop(fz_context *ctx, pdf_obj *dict, const char *key, pdf_obj *val);
- void pdf_dict_putp(fz_context *ctx, pdf_obj *dict, const char *path, pdf_obj *val);
-diff --git a/source/pdf/pdf-object.c b/source/pdf/pdf-object.c
-index f2e4551..a0d0d8e 100644
---- a/source/pdf/pdf-object.c
-+++ b/source/pdf/pdf-object.c
-@@ -1240,9 +1240,13 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev)
- 	return pdf_dict_get(ctx, obj, abbrev);
- }
- 
--void
--pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val)
-+static void
-+pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val, pdf_obj **old_val)
- {
-+
-+	if (old_val)
-+		*old_val = NULL;
-+
- 	RESOLVE(obj);
-	if (obj >= PDF_OBJ__LIMIT)
-	{
-@@ -1282,7 +1286,10 @@ pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val)
-			{
-				pdf_obj *d = DICT(obj)->items[i].v;
-				DICT(obj)->items[i].v = pdf_keep_obj(ctx, val);
--				pdf_drop_obj(ctx, d);
-+				if (old_val)
-+					*old_val = d;
-+				else
-+					pdf_drop_obj(ctx, d);
-			}
- 		}
-		else
-@@ -1305,10 +1312,27 @@ pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val)
- }
- 
- void
-+pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val)
-+{
-+	pdf_dict_get_put(ctx, obj, key, val, NULL);
-+}
-+
-+void
- pdf_dict_put_drop(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val)
- {
- 	fz_try(ctx)
--		pdf_dict_put(ctx, obj, key, val);
-+		pdf_dict_get_put(ctx, obj, key, val, NULL);
-+	fz_always(ctx)
-+		pdf_drop_obj(ctx, val);
-+	fz_catch(ctx)
-+		fz_rethrow(ctx);
-+}
-+
-+void
-+pdf_dict_get_put_drop(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val, pdf_obj **old_val)
-+{
-+	fz_try(ctx)
-+		pdf_dict_get_put(ctx, obj, key, val, old_val);
- 	fz_always(ctx)
- 		pdf_drop_obj(ctx, val);
- 	fz_catch(ctx)
-diff --git a/source/pdf/pdf-repair.c b/source/pdf/pdf-repair.c
-index fdd4648..212c8b7 100644
---- a/source/pdf/pdf-repair.c
-+++ b/source/pdf/pdf-repair.c
-@@ -259,6 +259,27 @@ pdf_repair_obj_stm(fz_context *ctx, pdf_document *doc, int num, int gen)
- 	}
- }
- 
-+static void
-+orphan_object(fz_context *ctx, pdf_document *doc, pdf_obj *obj)
-+{
-+	if (doc->orphans_count == doc->orphans_max)
-+	{
-+		int new_max = (doc->orphans_max ? doc->orphans_max*2 : 32);
-+
-+		fz_try(ctx)
-+		{
-+			doc->orphans = fz_resize_array(ctx, doc->orphans, new_max, sizeof(*doc->orphans));
-+			doc->orphans_max = new_max;
-+		}
-+		fz_catch(ctx)
-+		{
-+			pdf_drop_obj(ctx, obj);
-+			fz_rethrow(ctx);
-+		}
-+	}
-+	doc->orphans[doc->orphans_count++] = obj;
-+}
-+
- void
- pdf_repair_xref(fz_context *ctx, pdf_document *doc)
- {
-@@ -520,12 +541,13 @@ pdf_repair_xref(fz_context *ctx, pdf_document *doc)
- 			/* correct stream length for unencrypted documents */
- 			if (!encrypt && list[i].stm_len >= 0)
- 			{
-+				pdf_obj *old_obj = NULL;
-				dict = pdf_load_object(ctx, doc, list[i].num, list[i].gen);
- 
- 				length = pdf_new_int(ctx, doc, list[i].stm_len);
--				pdf_dict_put(ctx, dict, PDF_NAME_Length, length);
--				pdf_drop_obj(ctx, length);
--
-+				pdf_dict_get_put_drop(ctx, dict, PDF_NAME_Length, length, &old_obj);
-+				if (old_obj)
-+					orphan_object(ctx, doc, old_obj);
- 				pdf_drop_obj(ctx, dict);
- 			}
- 		}
-diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
-index 3de1cd2..6682741 100644
---- a/source/pdf/pdf-xref.c
-+++ b/source/pdf/pdf-xref.c
-@@ -1626,6 +1626,12 @@ pdf_close_document(fz_context *ctx, pdf_document *doc)
- 
-	pdf_drop_resource_tables(ctx, doc);
- 
-+	for (i = 0; i < doc->orphans_count; i++)
-+	{
-+		pdf_drop_obj(ctx, doc->orphans[i]);
-+	}
-+	fz_free(ctx, doc->orphans);
-+
-	fz_free(ctx, doc);
- }
-
--- 
-2.10.1
-
diff --git a/gnu/packages/patches/mupdf-CVE-2016-9017.patch b/gnu/packages/patches/mupdf-CVE-2016-9017.patch
deleted file mode 100644
index 1e2b7c3258..0000000000
--- a/gnu/packages/patches/mupdf-CVE-2016-9017.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Fix CVE-2016-9017:
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-9107
-http://bugs.ghostscript.com/show_bug.cgi?id=697171
-
-Patch copied from upstream source repository:
-http://git.ghostscript.com/?p=mujs.git;a=commitdiff;h=a5c747f1d40e8d6659a37a8d25f13fb5acf8e767
-
-From a5c747f1d40e8d6659a37a8d25f13fb5acf8e767 Mon Sep 17 00:00:00 2001
-From: Tor Andersson <tor.andersson@artifex.com>
-Date: Tue, 25 Oct 2016 14:08:27 +0200
-Subject: [PATCH] Fix 697171: missed an operand in the bytecode debugger dump.
-
----
- jscompile.h | 2 +-
- jsdump.c    | 1 +
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/jscompile.h b/jscompile.h
-index 802cc9e..3054d13 100644
---- a/thirdparty/mujs/jscompile.h
-+++ b/thirdparty/mujs/jscompile.h
-@@ -21,7 +21,7 @@ enum js_OpCode
- 
- 	OP_NEWARRAY,
- 	OP_NEWOBJECT,
--	OP_NEWREGEXP,
-+	OP_NEWREGEXP,	/* -S,opts- <regexp> */
- 
- 	OP_UNDEF,
- 	OP_NULL,
-diff --git a/jsdump.c b/jsdump.c
-index 1c51c29..37ad88c 100644
---- a/thirdparty/mujs/jsdump.c
-+++ b/thirdparty/mujs/jsdump.c
-@@ -750,6 +750,7 @@ void jsC_dumpfunction(js_State *J, js_Function *F)
- 		case OP_INITVAR:
- 		case OP_DEFVAR:
- 		case OP_GETVAR:
-+		case OP_HASVAR:
- 		case OP_SETVAR:
- 		case OP_DELVAR:
- 		case OP_GETPROP_S:
--- 
-2.10.2
-
diff --git a/gnu/packages/patches/mupdf-CVE-2016-9136.patch b/gnu/packages/patches/mupdf-CVE-2016-9136.patch
deleted file mode 100644
index 1f68839a52..0000000000
--- a/gnu/packages/patches/mupdf-CVE-2016-9136.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Fix CVE-2016-9136:
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-9136
-http://bugs.ghostscript.com/show_bug.cgi?id=697244
-
-Patch copied from upstream source repository:
-http://git.ghostscript.com/?p=mujs.git;a=commitdiff;h=a0ceaf5050faf419401fe1b83acfa950ec8a8a89
-From a0ceaf5050faf419401fe1b83acfa950ec8a8a89 Mon Sep 17 00:00:00 2001
-From: Tor Andersson <tor.andersson@artifex.com>
-Date: Mon, 31 Oct 2016 13:05:37 +0100
-Subject: [PATCH] Fix 697244: Check for incomplete escape sequence at end of
- input.
-
----
- jslex.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/jslex.c b/jslex.c
-index cbd0eeb..aaafdac 100644
---- a/thirdparty/mujs/jslex.c
-+++ b/thirdparty/mujs/jslex.c
-@@ -377,6 +377,7 @@ static int lexescape(js_State *J)
- 		return 0;
- 
- 	switch (J->lexchar) {
-+	case 0: jsY_error(J, "unterminated escape sequence");
- 	case 'u':
- 		jsY_next(J);
- 		if (!jsY_ishex(J->lexchar)) return 1; else { x |= jsY_tohex(J->lexchar) << 12; jsY_next(J); }
--- 
-2.10.2
-
diff --git a/gnu/packages/patches/mupdf-build-with-openjpeg-2.1.patch b/gnu/packages/patches/mupdf-build-with-openjpeg-2.1.patch
index cd8136b701..d97c1cb348 100644
--- a/gnu/packages/patches/mupdf-build-with-openjpeg-2.1.patch
+++ b/gnu/packages/patches/mupdf-build-with-openjpeg-2.1.patch
@@ -27,12 +27,3 @@ index 6b92e5c..72dea50 100644
  #include <openjpeg.h>
  
  static void fz_opj_error_callback(const char *msg, void *client_data)
-@@ -117,7 +109,7 @@ fz_load_jpx(fz_context *ctx, unsigned char *data, int size, fz_colorspace *defcs
- 	opj_stream_set_read_function(stream, fz_opj_stream_read);
- 	opj_stream_set_skip_function(stream, fz_opj_stream_skip);
- 	opj_stream_set_seek_function(stream, fz_opj_stream_seek);
--	opj_stream_set_user_data(stream, &sb);
-+	opj_stream_set_user_data(stream, &sb, NULL);
- 	/* Set the length to avoid an assert */
- 	opj_stream_set_user_data_length(stream, size);
- 
diff --git a/gnu/packages/patches/nasm-no-ps-pdf.patch b/gnu/packages/patches/nasm-no-ps-pdf.patch
deleted file mode 100644
index b03b57a6ed..0000000000
--- a/gnu/packages/patches/nasm-no-ps-pdf.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Avoid building PS and PDF docs, which do not build bit-reproducible.  NASM
-already installs doc in info and html.
-
---- nasm-2.12.01/doc/Makefile.in.orig	2016-06-21 18:02:59.483484829 +0200
-+++ nasm-2.12.01/doc/Makefile.in	2016-06-21 18:03:46.700151410 +0200
-@@ -27,7 +27,7 @@
- PS2PDF          = @PS2PDF@		# Part of GhostScript
- 
- SRCS		= nasmdoc.src inslist.src changes.src
--OUT		= info html nasmdoc.txt nasmdoc.ps nasmdoc.pdf
-+OUT		= info html nasmdoc.txt
- 
- # exports
- export srcdir
-@@ -100,4 +100,4 @@
- 	$(INSTALL_DATA) info/* $(INSTALLROOT)$(infodir)
- 	mkdir -p $(INSTALLROOT)$(docdir)/html
- 	$(INSTALL_DATA) html/* $(INSTALLROOT)$(docdir)/html
--	$(INSTALL_DATA) nasmdoc.ps nasmdoc.pdf nasmdoc.txt $(INSTALLROOT)$(docdir)
-+	$(INSTALL_DATA) nasmdoc.txt $(INSTALLROOT)$(docdir)
diff --git a/gnu/packages/patches/netcdf-config-date.patch b/gnu/packages/patches/netcdf-config-date.patch
deleted file mode 100644
index 5054612e95..0000000000
--- a/gnu/packages/patches/netcdf-config-date.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Honor SOURCE_DATE_EPOCH when exporting configuration date.
-Autoconf-level patch submitted upstream on Fri Apr 15 23:07:42 UTC 2016
-
---- a/configure
-+++ b/configure
-@@ -2866,7 +2866,17 @@
- 
- 
- # Configuration Date
-- CONFIG_DATE="`date`"
-+ CONFIG_DATE="`date -u`"
-+if test -n "$SOURCE_DATE_EPOCH"; then
-+  CONFIG_DATE=`date -u -d "@$SOURCE_DATE_EPOCH" 2>/dev/null \
-+               || date -u -r "$SOURCE_DATE_EPOCH" 2>/dev/null`
-+  if test -z "$CONFIG_DATE"; then
-+    as_fn_error $? "malformed SOURCE_DATE_EPOCH" "$LINENO" 5
-+  fi
-+fi
-+cat >>confdefs.h <<_ACEOF
-+#define CONFIG_DATE "$CONFIG_DATE"
-+_ACEOF
- 
- # Find out about the host we're building on.
- ac_aux_dir=
---- a/libdispatch/derror.c
-+++ b/libdispatch/derror.c
-@@ -13,7 +13,7 @@
- #endif
- 
- /* Tell the user the version of netCDF. */
--static const char nc_libvers[] = PACKAGE_VERSION " of "__DATE__" "__TIME__" $";
-+static const char nc_libvers[] = PACKAGE_VERSION " of "CONFIG_DATE" $";
- 
- /**
- \defgroup lib_version Library Version
---- a/config.h.in
-+++ b/config.h.in
-@@ -393,6 +393,9 @@
- /* Define to the version of this package. */
- #undef PACKAGE_VERSION
- 
-+/* Define to the configuration date */
-+#undef CONFIG_DATE
-+
- /* The size of `double', as computed by sizeof. */
- #undef SIZEOF_DOUBLE
- 
diff --git a/gnu/packages/patches/netcdf-date-time.patch b/gnu/packages/patches/netcdf-date-time.patch
new file mode 100644
index 0000000000..a4e7925aa1
--- /dev/null
+++ b/gnu/packages/patches/netcdf-date-time.patch
@@ -0,0 +1,11 @@
+--- a/libdispatch/derror.c
++++ b/libdispatch/derror.c
+@@ -13,7 +13,7 @@
+ #endif
+ 
+ /* Tell the user the version of netCDF. */
+-static const char nc_libvers[] = PACKAGE_VERSION " of "__DATE__" "__TIME__" $";
++static const char nc_libvers[] = PACKAGE_VERSION" $";
+ 
+ /**
+ \defgroup lib_version Library Version
diff --git a/gnu/packages/patches/netcdf-tst_h_par.patch b/gnu/packages/patches/netcdf-tst_h_par.patch
new file mode 100644
index 0000000000..ac14a4c0a2
--- /dev/null
+++ b/gnu/packages/patches/netcdf-tst_h_par.patch
@@ -0,0 +1,21 @@
+From a83702834938b23cc2e843589aa223e2024a7e6f Mon Sep 17 00:00:00 2001
+From: Orion Poplawski <orion@cora.nwra.com>
+Date: Tue, 29 Nov 2016 11:48:01 -0700
+Subject: [PATCH] Add missing #include "err_macros.h" to tst_h_par.c
+
+---
+ h5_test/tst_h_par.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/h5_test/tst_h_par.c b/h5_test/tst_h_par.c
+index c3da7f4..a419d55 100644
+--- a/h5_test/tst_h_par.c
++++ b/h5_test/tst_h_par.c
+@@ -11,6 +11,7 @@
+    $Id: tst_h_par.c,v 1.15 2010/05/25 13:53:04 ed Exp $
+ */
+ #include <nc_tests.h>
++#include "err_macros.h"
+ #include <hdf5.h>
+ 
+ /* Defining USE_MPE causes the MPE trace library to be used (and you
diff --git a/gnu/packages/patches/ocaml-Add-a-.file-directive.patch b/gnu/packages/patches/ocaml-Add-a-.file-directive.patch
new file mode 100644
index 0000000000..07842e9c32
--- /dev/null
+++ b/gnu/packages/patches/ocaml-Add-a-.file-directive.patch
@@ -0,0 +1,96 @@
+From: Stephane Glondu <steph@glondu.net>
+Date: Sun, 16 Aug 2015 20:59:14 +0200
+Subject: Add a .file directive to generated .s files
+
+When no .file directive is given, the toolchain records the filename
+of the .o file, which is sometimes random, making generated objects
+non-deterministic.
+
+We use Location.input_name for adding .file directives to assembly
+files. Note: when the file is preprocessed, this reference holds the
+name of the temporary file. Hence, files compiled with -pp are still
+not deterministic.
+
+Bug-Debian: https://bugs.debian.org/795784
+Bug-Debian: https://bugs.debian.org/796336
+---
+ asmcomp/amd64/emit.mlp | 1 +
+ asmcomp/arm/emit.mlp   | 1 +
+ asmcomp/arm64/emit.mlp | 1 +
+ asmcomp/i386/emit.mlp  | 1 +
+ asmcomp/power/emit.mlp | 1 +
+ asmcomp/sparc/emit.mlp | 1 +
+ 6 files changed, 6 insertions(+)
+
+diff --git a/asmcomp/amd64/emit.mlp b/asmcomp/amd64/emit.mlp
+index d56d0f5..4d7aa30 100644
+--- a/asmcomp/amd64/emit.mlp
++++ b/asmcomp/amd64/emit.mlp
+@@ -794,6 +794,7 @@ let data l =
+ let begin_assembly() =
+   reset_debug_info();                   (* PR#5603 *)
+   float_constants := [];
++  `	.file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   if !Clflags.dlcode then begin
+     (* from amd64.S; could emit these constants on demand *)
+     if macosx then
+diff --git a/asmcomp/arm/emit.mlp b/asmcomp/arm/emit.mlp
+index 4948fb2..6f30fba 100644
+--- a/asmcomp/arm/emit.mlp
++++ b/asmcomp/arm/emit.mlp
+@@ -892,6 +892,7 @@ let data l =
+
+ let begin_assembly() =
+   reset_debug_info();
++  `	.file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   `	.syntax	unified\n`;
+   begin match !arch with
+   | ARMv4   -> `	.arch	armv4t\n`
+diff --git a/asmcomp/arm64/emit.mlp b/asmcomp/arm64/emit.mlp
+index 750c2b2..5afbb8a 100644
+--- a/asmcomp/arm64/emit.mlp
++++ b/asmcomp/arm64/emit.mlp
+@@ -942,6 +942,7 @@ let data l =
+
+ let begin_assembly() =
+   reset_debug_info();
++  `	.file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
+   `	.data\n`;
+   `	.globl	{emit_symbol lbl_begin}\n`;
+diff --git a/asmcomp/i386/emit.mlp b/asmcomp/i386/emit.mlp
+index 98df5f9..531150f 100644
+--- a/asmcomp/i386/emit.mlp
++++ b/asmcomp/i386/emit.mlp
+@@ -986,6 +986,7 @@ let data l =
+ let begin_assembly() =
+   reset_debug_info();                   (* PR#5603 *)
+   float_constants := [];
++  `	.file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
+   `	.data\n`;
+   `	.globl	{emit_symbol lbl_begin}\n`;
+diff --git a/asmcomp/power/emit.mlp b/asmcomp/power/emit.mlp
+index 4344085..343132b 100644
+--- a/asmcomp/power/emit.mlp
++++ b/asmcomp/power/emit.mlp
+@@ -887,6 +887,7 @@ let data l =
+ let begin_assembly() =
+   defined_functions := StringSet.empty;
+   external_functions := StringSet.empty;
++  `	.file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   (* Emit the beginning of the segments *)
+   let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
+   emit_string data_space;
+diff --git a/asmcomp/sparc/emit.mlp b/asmcomp/sparc/emit.mlp
+index 877a3d5..7b041e9 100644
+--- a/asmcomp/sparc/emit.mlp
++++ b/asmcomp/sparc/emit.mlp
+@@ -727,6 +727,7 @@ let data l =
+ (* Beginning / end of an assembly file *)
+
+ let begin_assembly() =
++  `	.file \"{emit_string (String.escaped !Location.input_name)}\"\n`;
+   let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
+   `	.data\n`;
+   `	.global	{emit_symbol lbl_begin}\n`;
diff --git a/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch b/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch
new file mode 100644
index 0000000000..2056b42356
--- /dev/null
+++ b/gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch
@@ -0,0 +1,125 @@
+From 26cac62fe0154cf65c06faaee10805531e9dade8 Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Wed, 14 Dec 2016 14:14:59 +0100
+Subject: [PATCH] fix camlp4 in another directory
+
+---
+ Makefile        | 11 ++++++-----
+ configure       | 13 ++++++++++++-
+ myocamlbuild.ml |  2 +-
+ 3 files changed, 19 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 4a8ce17..d94a6d5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -25,7 +25,7 @@ PATH_BUILD=$(PATH_BASE)/_build
+ PATH_OCAMLDOC=$(PATH_BASE)/ocamldoc
+ PATH_SRC=$(PATH_BASE)/src
+ PATH_TESTS=$(PATH_BASE)/tests
+-PATH_INSTALL=$(PATH_OCAML_PREFIX)/lib/ocaml/bisect
++PATH_INSTALL=$(PREFIX)/lib/ocaml/bisect
+
+
+ # DEFINITIONS
+@@ -33,7 +33,8 @@ PATH_INSTALL=$(PATH_OCAML_PREFIX)/lib/ocaml/bisect
+ PROJECT_NAME=bisect
+ OCAMLBUILD=$(PATH_OCAML_PREFIX)/bin/ocamlbuild
+ OCAMLBUILD_ENV=WARNINGS=$(WARNINGS) PATH_OCAML_PREFIX=$(PATH_OCAML_PREFIX)
+-OCAMLBUILD_FLAGS=-classic-display -no-links
++CAMLP4_INCLUDE=$(shell test -z $(CAMLP4_LIBDIR) || echo "-cflags -I,$(CAMLP4_LIBDIR)")
++OCAMLBUILD_FLAGS=-classic-display -no-links $(CAMLP4_INCLUDE)
+ MODULES_ODOCL=$(PROJECT_NAME).odocl
+ MODULES_MLPACK=$(PROJECT_NAME).mlpack
+ MODULES_MLPACK_PP=$(PROJECT_NAME)_pp.mlpack
+@@ -80,11 +81,11 @@ veryclean: clean
+	rm -f $(PATH_OCAMLDOC)/*.html $(PATH_OCAMLDOC)/*.css
+
+ install: FORCE
+-	cp $(PATH_BUILD)/src/report/report.byte $(PATH_OCAML_PREFIX)/bin/bisect-report; \
++	cp $(PATH_BUILD)/src/report/report.byte $(PREFIX)/bin/bisect-report; \
+	if [ "$(PPX)" = "TRUE" ]; then \
+-	  cp $(PATH_BUILD)/src/syntax/bisect_ppx.byte $(PATH_OCAML_PREFIX)/bin; \
++	  cp $(PATH_BUILD)/src/syntax/bisect_ppx.byte $(PREFIX)/bin; \
+	fi; \
+-	(test -x $(PATH_OCAML_PREFIX)/bin/ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PATH_OCAML_PREFIX)/bin/bisect-report.opt || true); \
++	(test -x $(PATH_OCAML_PREFIX)/bin/ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PREFIX)/bin/bisect-report.opt || true); \
+	if [ -x "$(PATH_OCAMLFIND)" ]; then \
+	  $(PATH_OCAMLFIND) query $(PROJECT_NAME) && $(PATH_OCAMLFIND) remove $(PROJECT_NAME) || true; \
+	  $(PATH_OCAMLFIND) install $(PROJECT_NAME) META -optional \
+diff --git a/configure b/configure
+index bb7ebf4..61a3095 100755
+--- a/configure
++++ b/configure
+@@ -21,7 +21,9 @@
+ # default values
+ ocamlbuild=`which ocamlbuild || echo '/usr/local/bin/ocamlbuild'`
+ bin_path=`dirname $ocamlbuild`
++prefix=''
+ ocaml_prefix=`dirname $bin_path`
++camlp4_prefix=`dirname $(dirname $(which camlp4of))`
+ ocamlfind=`which ocamlfind 2> /dev/null || echo ''`
+ native_dynlink='TRUE'
+ devel='FALSE'
+@@ -32,8 +34,12 @@ ppx='FALSE'
+ while [ $# -gt 0 ]
+ do
+     case "$1" in
++        -prefix)
++            prefix="$2"; shift;;
+         -ocaml-prefix)
+             ocaml_prefix="$2"; shift;;
++        -camlp4-prefix)
++            camlp4_prefix="$2"; shift;;
+         -ocamlfind)
+             ocamlfind="$2"; shift;;
+         -no-native-dynlink)
+@@ -45,7 +51,7 @@ do
+         -ppx)
+             ppx='TRUE';;
+         *)
+-            echo "usage: $0 [-ocaml-prefix <path>] [-ocamlfind <path>] [-no-native-dynlink] [-devel]";
++            echo "usage: $0 [-prefix <path>] [-ocaml-prefix <path>] [-ocamlfind <path>] [-no-native-dynlink] [-devel]";
+             exit 1;;
+         esac
+         shift
+@@ -57,6 +63,9 @@ if [ "$no_camlp4" = "TRUE" -a "$ppx" = "FALSE" ]; then
+   exit 1
+ fi
+
++# prefix default value
++test -z $prefix && prefix=$ocaml_prefix
++
+ # make options
+ make_quiet=`make -f - <<EOF
+ default: gnumake
+@@ -67,11 +76,13 @@ EOF`
+ # file creation
+ echo "# timestamp: `date`" > Makefile.config
+ echo "PATH_OCAML_PREFIX=$ocaml_prefix" >> Makefile.config
++echo "PATH_CAMLP4_PREFIX=$camlp4_prefix" >> Makefile.config
+ echo "PATH_OCAMLFIND=$ocamlfind" >> Makefile.config
+ echo "NATIVE_DYNLINK=$native_dynlink" >> Makefile.config
+ echo "WARNINGS=$devel" >> Makefile.config
+ echo "NO_CAMLP4=$no_camlp4" >> Makefile.config
+ echo "PPX=$ppx" >> Makefile.config
+ echo "MAKE_QUIET=$make_quiet" >> Makefile.config
++echo "PREFIX=$prefix" >> Makefile.config
+ echo "" >> Makefile.config
+ echo 'Makefile.config successfully created'
+diff --git a/myocamlbuild.ml b/myocamlbuild.ml
+index 8aa25fd..09a7d48 100644
+--- a/myocamlbuild.ml
++++ b/myocamlbuild.ml
+@@ -70,7 +70,7 @@ let () =
+     | After_rules ->
+         let camlp4of =
+           try
+-            let path_bin = Filename.concat (Sys.getenv "PATH_OCAML_PREFIX") "bin" in
++            let path_bin = Filename.concat (Sys.getenv "PATH_CAMLP4_PREFIX") "bin" in
+             Filename.concat path_bin "camlp4of"
+           with _ -> "camlp4of" in
+         flag ["ocaml"; "compile"; "pp_camlp4of"] (S[A"-pp"; A camlp4of]);
+--
+2.7.4
+
diff --git a/gnu/packages/patches/ocaml-bitstring-fix-configure.patch b/gnu/packages/patches/ocaml-bitstring-fix-configure.patch
new file mode 100644
index 0000000000..c358bf3d6b
--- /dev/null
+++ b/gnu/packages/patches/ocaml-bitstring-fix-configure.patch
@@ -0,0 +1,53 @@
+From 0aaddfceeea3e89df196ab1846da54d09713a512 Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Thu, 15 Dec 2016 21:17:31 +0100
+Subject: [PATCH] fix configure
+
+---
+ Makefile.in | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index d040f4c..85e0b38 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -32,6 +32,7 @@ BISECT_REPORT	= @BISECT_REPORT@
+ BYTESWAP_H	= @BYTESWAP_H@
+
+ OCAMLLIB	= @OCAMLLIB@
++BISECTLIB	= $(shell if test -z $${BISECTLIB}; then echo $(OCAMLLIB); else echo $${BISECTLIB}; fi)
+ top_srcdir	= @top_srcdir@
+
+ pkg_cil		= @OCAML_PKG_cil@
+@@ -47,9 +48,9 @@ OCAMLOPTPACKAGES = $(OCAMLCPACKAGES)
+ OCAMLOPTLIBS	= -linkpkg
+
+ ifneq ($(enable_coverage),no)
+-OCAMLCFLAGS     += -I +bisect -pp 'camlp4o $(OCAMLLIB)/bisect/instrument.cma'
++OCAMLCFLAGS     += -I +bisect -pp 'camlp4o $(BISECTLIB)/bisect/instrument.cma'
+ OCAMLCLIBS	+= -I +bisect bisect.cma
+-OCAMLOPTFLAGS   += -I +bisect -pp 'camlp4o $(OCAMLLIB)/bisect/instrument.cma'
++OCAMLOPTFLAGS   += -I +bisect -pp 'camlp4o $(BISECTLIB)/bisect/instrument.cma'
+ OCAMLOPTLIBS	+= -I +bisect bisect.cmxa
+ endif
+
+@@ -110,7 +111,7 @@ bitstring_persistent.cmi: bitstring_persistent.mli
+	  -I +camlp4 -pp camlp4of -c $<
+
+ pa_bitstring.cmo: pa_bitstring.ml bitstring.cma bitstring_persistent.cma
+-	$(OCAMLFIND) ocamlc bitstring.cma -I +camlp4 dynlink.cma camlp4lib.cma \
++	$(OCAMLFIND) ocamlc $(OCAMLCFLAGS) bitstring.cma -I +camlp4 dynlink.cma camlp4lib.cma \
+	  -pp camlp4of -c $< -o $@
+
+ bitstring-objinfo: bitstring_objinfo.cmo bitstring.cma bitstring_persistent.cma
+@@ -133,7 +134,7 @@ byteswap.h: byteswap.in.h
+ ifeq ($(enable_coverage),no)
+ PP	= -pp 'camlp4o bitstring.cma bitstring_persistent.cma pa_bitstring.cmo'
+ else
+-PP	= -pp 'camlp4o $(OCAMLLIB)/bisect/bisect.cma bitstring.cma bitstring_persistent.cma pa_bitstring.cmo'
++PP	= -pp 'camlp4o $(BISECTLIB)/bisect/bisect.cma bitstring.cma bitstring_persistent.cma pa_bitstring.cmo'
+ endif
+
+ check: test
+--
+2.11.0
diff --git a/gnu/packages/patches/onionshare-fix-install-paths.patch b/gnu/packages/patches/onionshare-fix-install-paths.patch
deleted file mode 100644
index 721b89f04b..0000000000
--- a/gnu/packages/patches/onionshare-fix-install-paths.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 7afdd3366711a0c508bfb9323af8f4268ab77c9b Mon Sep 17 00:00:00 2001
-From: Efraim Flashner <efraim@flashner.co.il>
-Date: Thu, 21 Jul 2016 13:22:45 +0300
-Subject: [PATCH] patch
-
----
- setup.py | 14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index 8ae56fe..8b245c9 100644
---- a/setup.py
-+++ b/setup.py
-@@ -91,15 +91,15 @@ setup(
-     include_package_data=True,
-     scripts=['install/scripts/onionshare', 'install/scripts/onionshare-gui'],
-     data_files=[
--        (os.path.join(sys.prefix, 'share/applications'), ['install/onionshare.desktop']),
--        (os.path.join(sys.prefix, 'share/appdata'), ['install/onionshare.appdata.xml']),
--        (os.path.join(sys.prefix, 'share/pixmaps'), ['install/onionshare80.xpm']),
--        (os.path.join(sys.prefix, 'share/onionshare'), [
-+        ('share/applications', ['install/onionshare.desktop']),
-+        ('share/appdata', ['install/onionshare.appdata.xml']),
-+        ('share/pixmaps', ['install/onionshare80.xpm']),
-+        ('share/onionshare', [
-             'resources/version.txt',
-             'resources/wordlist.txt'
-         ]),
--        (os.path.join(sys.prefix, 'share/onionshare/images'), images),
--        (os.path.join(sys.prefix, 'share/onionshare/locale'), locale),
--        (os.path.join(sys.prefix, 'share/onionshare/html'), html)
-+        ('share/onionshare/images', images),
-+        ('share/onionshare/locale', locale),
-+        ('share/onionshare/html', html)
-     ]
- )
--- 
-2.9.1
-
diff --git a/gnu/packages/patches/openjpeg-CVE-2015-6581.patch b/gnu/packages/patches/openjpeg-CVE-2015-6581.patch
deleted file mode 100644
index 7ce03501f4..0000000000
--- a/gnu/packages/patches/openjpeg-CVE-2015-6581.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 0fa5a17c98c4b8f9ee2286f4f0a50cf52a5fccb0 Mon Sep 17 00:00:00 2001
-From: Matthieu Darbois <mayeut@users.noreply.github.com>
-Date: Tue, 19 May 2015 21:57:27 +0000
-Subject: [PATCH] [trunk] Correct potential double free on malloc failure in
- opj_j2k_copy_default_tcp_and_create_tcp (fixes issue 492)
-
----
- src/lib/openjp2/j2k.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/src/lib/openjp2/j2k.c b/src/lib/openjp2/j2k.c
-index 8c62a39..cbdd368 100644
---- a/src/lib/openjp2/j2k.c
-+++ b/src/lib/openjp2/j2k.c
-@@ -7365,6 +7365,12 @@ static OPJ_BOOL opj_j2k_copy_default_tcp_and_create_tcd (       opj_j2k_t * p_j2
-                 l_tcp->cod = 0;
-                 l_tcp->ppt = 0;
-                 l_tcp->ppt_data = 00;
-+                /* Remove memory not owned by this tile in case of early error return. */
-+                l_tcp->m_mct_decoding_matrix = 00;
-+                l_tcp->m_nb_max_mct_records = 0;
-+                l_tcp->m_mct_records = 00;
-+                l_tcp->m_nb_max_mcc_records = 0;
-+                l_tcp->m_mcc_records = 00;
-                 /* Reconnect the tile-compo coding parameters pointer to the current tile coding parameters*/
-                 l_tcp->tccps = l_current_tccp;
- 
-@@ -7402,6 +7408,8 @@ static OPJ_BOOL opj_j2k_copy_default_tcp_and_create_tcd (       opj_j2k_t * p_j2
- 
-                         ++l_src_mct_rec;
-                         ++l_dest_mct_rec;
-+                        /* Update with each pass to free exactly what has been allocated on early return. */
-+                        l_tcp->m_nb_max_mct_records += 1;
-                 }
- 
-                 /* Get the mcc_record of the dflt_tile_cp and copy them into the current tile cp*/
-@@ -7411,6 +7419,7 @@ static OPJ_BOOL opj_j2k_copy_default_tcp_and_create_tcd (       opj_j2k_t * p_j2
-                         return OPJ_FALSE;
-                 }
-                 memcpy(l_tcp->m_mcc_records,l_default_tcp->m_mcc_records,l_mcc_records_size);
-+                l_tcp->m_nb_max_mcc_records = l_default_tcp->m_nb_max_mcc_records;
- 
-                 /* Copy the mcc record data from dflt_tile_cp to the current tile*/
-                 l_src_mcc_rec = l_default_tcp->m_mcc_records;
--- 
-2.5.0
-
diff --git a/gnu/packages/patches/openjpeg-CVE-2016-9850-CVE-2016-9851.patch b/gnu/packages/patches/openjpeg-CVE-2016-9850-CVE-2016-9851.patch
new file mode 100644
index 0000000000..3f637fa88b
--- /dev/null
+++ b/gnu/packages/patches/openjpeg-CVE-2016-9850-CVE-2016-9851.patch
@@ -0,0 +1,245 @@
+From cadff5fb6e73398de26a92e96d3d7cac893af255 Mon Sep 17 00:00:00 2001
+From: szukw000 <szukw000@arcor.de>
+Date: Fri, 9 Dec 2016 08:29:55 +0100
+Subject: [PATCH] These changes repair bugs of #871 and #872
+
+email from http://openwall.com/lists/oss-security/2016/12/09/4
+patch is against openjpeg-2.1.2, applies cleanly to 2.1.1.
+
+---
+ src/bin/jp2/converttif.c | 107 +++++++++++++++++++++++++++++++----------------
+ 1 file changed, 70 insertions(+), 37 deletions(-)
+
+diff --git a/src/bin/jp2/converttif.c b/src/bin/jp2/converttif.c
+index 143d3be..c690f8b 100644
+--- a/src/bin/jp2/converttif.c
++++ b/src/bin/jp2/converttif.c
+@@ -553,20 +553,18 @@ static void tif_32sto16u(const OPJ_INT32* pSrc, OPJ_UINT16* pDst, OPJ_SIZE_T len
+ 
+ int imagetotif(opj_image_t * image, const char *outfile)
+ {
+-	int width, height;
+-	int bps,adjust, sgnd;
+-	int tiPhoto;
++	uint32 width, height, bps, tiPhoto;
++	int adjust, sgnd;
+ 	TIFF *tif;
+ 	tdata_t buf;
+-	tsize_t strip_size;
++	tmsize_t strip_size, rowStride;
+ 	OPJ_UINT32 i, numcomps;
+-	OPJ_SIZE_T rowStride;
+ 	OPJ_INT32* buffer32s = NULL;
+ 	OPJ_INT32 const* planes[4];
+ 	convert_32s_PXCX cvtPxToCx = NULL;
+ 	convert_32sXXx_C1R cvt32sToTif = NULL;
+ 
+-	bps = (int)image->comps[0].prec;
++	bps = (uint32)image->comps[0].prec;
+ 	planes[0] = image->comps[0].data;
+ 	
+ 	numcomps = image->numcomps;
+@@ -674,13 +672,13 @@ int imagetotif(opj_image_t * image, const char *outfile)
+ 			break;
+ 	}
+ 	sgnd = (int)image->comps[0].sgnd;
+-	adjust = sgnd ? 1 << (image->comps[0].prec - 1) : 0;
+-	width   = (int)image->comps[0].w;
+-	height  = (int)image->comps[0].h;
++	adjust = sgnd ? (int)(1 << (image->comps[0].prec - 1)) : 0;
++	width   = (uint32)image->comps[0].w;
++	height  = (uint32)image->comps[0].h;
+ 	
+ 	TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width);
+ 	TIFFSetField(tif, TIFFTAG_IMAGELENGTH, height);
+-	TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, numcomps);
++	TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, (uint32)numcomps);
+ 	TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps);
+ 	TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
+ 	TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
+@@ -688,8 +686,8 @@ int imagetotif(opj_image_t * image, const char *outfile)
+ 	TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
+ 	
+ 	strip_size = TIFFStripSize(tif);
+-	rowStride = ((OPJ_SIZE_T)width * numcomps * (OPJ_SIZE_T)bps + 7U) / 8U;
+-	if (rowStride != (OPJ_SIZE_T)strip_size) {
++	rowStride = (width * numcomps * bps + 7U) / 8U;
++	if (rowStride != strip_size) {
+ 		fprintf(stderr, "Invalid TIFF strip size\n");
+ 		TIFFClose(tif);
+ 		return 1;
+@@ -699,7 +697,7 @@ int imagetotif(opj_image_t * image, const char *outfile)
+ 		TIFFClose(tif);
+ 		return 1;
+ 	}
+-	buffer32s = (OPJ_INT32 *)malloc((OPJ_SIZE_T)width * numcomps * sizeof(OPJ_INT32));
++	buffer32s = (OPJ_INT32 *)malloc((OPJ_SIZE_T)(width * numcomps * sizeof(OPJ_INT32)));
+ 	if (buffer32s == NULL) {
+ 		_TIFFfree(buf);
+ 		TIFFClose(tif);
+@@ -1211,20 +1209,19 @@ opj_image_t* tiftoimage(const char *filename, opj_cparameters_t *parameters)
+ 	TIFF *tif;
+ 	tdata_t buf;
+ 	tstrip_t strip;
+-	tsize_t strip_size;
++	tmsize_t strip_size;
+ 	int j, currentPlane, numcomps = 0, w, h;
+ 	OPJ_COLOR_SPACE color_space = OPJ_CLRSPC_UNKNOWN;
+ 	opj_image_cmptparm_t cmptparm[4]; /* RGBA */
+ 	opj_image_t *image = NULL;
+ 	int has_alpha = 0;
+-	unsigned short tiBps, tiPhoto, tiSf, tiSpp, tiPC;
+-	unsigned int tiWidth, tiHeight;
++	uint32 tiBps, tiPhoto, tiSf, tiSpp, tiPC, tiWidth, tiHeight;
+ 	OPJ_BOOL is_cinema = OPJ_IS_CINEMA(parameters->rsiz);
+ 	convert_XXx32s_C1R cvtTifTo32s = NULL;
+ 	convert_32s_CXPX cvtCxToPx = NULL;
+ 	OPJ_INT32* buffer32s = NULL;
+ 	OPJ_INT32* planes[4];
+-	OPJ_SIZE_T rowStride;
++	tmsize_t rowStride;
+ 	
+ 	tif = TIFFOpen(filename, "r");
+ 	
+@@ -1243,22 +1240,35 @@ opj_image_t* tiftoimage(const char *filename, opj_cparameters_t *parameters)
+ 	TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &tiSpp);
+ 	TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &tiPhoto);
+ 	TIFFGetField(tif, TIFFTAG_PLANARCONFIG, &tiPC);
+-	w= (int)tiWidth;
+-	h= (int)tiHeight;
+-	
+-	if(tiBps > 16U) {
+-		fprintf(stderr,"tiftoimage: Bits=%d, Only 1 to 16 bits implemented\n",tiBps);
+-		fprintf(stderr,"\tAborting\n");
++
++	if(tiSpp == 0 || tiSpp > 4) { /* should be 1 ... 4 */
++		fprintf(stderr,"tiftoimage: Bad value for samples per pixel == %hu.\n"
++		 "\tAborting.\n", tiSpp);
++		TIFFClose(tif);
++		return NULL;
++	}
++	if(tiBps > 16U || tiBps == 0) {
++		fprintf(stderr,"tiftoimage: Bad values for Bits == %d.\n"
++		 "\tMax. 16 Bits are allowed here.\n\tAborting.\n",tiBps);
+ 		TIFFClose(tif);
+ 		return NULL;
+ 	}
+ 	if(tiPhoto != PHOTOMETRIC_MINISBLACK && tiPhoto != PHOTOMETRIC_RGB) {
+-		fprintf(stderr,"tiftoimage: Bad color format %d.\n\tOnly RGB(A) and GRAY(A) has been implemented\n",(int) tiPhoto);
++		fprintf(stderr,"tiftoimage: Bad color format %d.\n"
++		 "\tOnly RGB(A) and GRAY(A) has been implemented\n",(int) tiPhoto);
+ 		fprintf(stderr,"\tAborting\n");
+ 		TIFFClose(tif);
+ 		return NULL;
+ 	}
+-	
++	if(tiWidth == 0 || tiHeight == 0) {
++		fprintf(stderr,"tiftoimage: Bad values for width(%u) "
++		 "and/or height(%u)\n\tAborting.\n",tiWidth,tiHeight);
++		TIFFClose(tif);
++		return NULL;
++	}
++	w= (int)tiWidth;
++	h= (int)tiHeight;
++
+ 	switch (tiBps) {
+ 		case 1:
+ 		case 2:
+@@ -1312,7 +1322,7 @@ opj_image_t* tiftoimage(const char *filename, opj_cparameters_t *parameters)
+ 		
+ 		TIFFGetFieldDefaulted(tif, TIFFTAG_EXTRASAMPLES,
+ 													&extrasamples, &sampleinfo);
+-		
++
+ 		if(extrasamples >= 1)
+ 		{
+ 			switch(sampleinfo[0])
+@@ -1333,7 +1343,7 @@ opj_image_t* tiftoimage(const char *filename, opj_cparameters_t *parameters)
+ 		else /* extrasamples == 0 */
+ 			if(tiSpp == 4 || tiSpp == 2) has_alpha = 1;
+ 	}
+-	
++
+ 	/* initialize image components */
+ 	memset(&cmptparm[0], 0, 4 * sizeof(opj_image_cmptparm_t));
+ 	
+@@ -1346,7 +1356,7 @@ opj_image_t* tiftoimage(const char *filename, opj_cparameters_t *parameters)
+ 	} else {
+ 		is_cinema = 0U;
+ 	}
+-	
++
+ 	if(tiPhoto == PHOTOMETRIC_RGB) /* RGB(A) */
+ 	{
+ 		numcomps = 3 + has_alpha;
+@@ -1384,10 +1394,24 @@ opj_image_t* tiftoimage(const char *filename, opj_cparameters_t *parameters)
+ 	image->x0 = (OPJ_UINT32)parameters->image_offset_x0;
+ 	image->y0 = (OPJ_UINT32)parameters->image_offset_y0;
+ 	image->x1 =	!image->x0 ? (OPJ_UINT32)(w - 1) * (OPJ_UINT32)subsampling_dx + 1 :
+-	image->x0 + (OPJ_UINT32)(w - 1) * (OPJ_UINT32)subsampling_dx + 1;
++	 image->x0 + (OPJ_UINT32)(w - 1) * (OPJ_UINT32)subsampling_dx + 1;
++	if(image->x1 <= image->x0) {
++		fprintf(stderr,"tiftoimage: Bad value for image->x1(%d) vs. "
++		 "image->x0(%d)\n\tAborting.\n",image->x1,image->x0);
++		TIFFClose(tif);
++		opj_image_destroy(image);
++		return NULL;
++	}
+ 	image->y1 =	!image->y0 ? (OPJ_UINT32)(h - 1) * (OPJ_UINT32)subsampling_dy + 1 :
+-	image->y0 + (OPJ_UINT32)(h - 1) * (OPJ_UINT32)subsampling_dy + 1;
+-
++	 image->y0 + (OPJ_UINT32)(h - 1) * (OPJ_UINT32)subsampling_dy + 1;
++	if(image->y1 <= image->y0) {
++		fprintf(stderr,"tiftoimage: Bad value for image->y1(%d) vs. "
++		 "image->y0(%d)\n\tAborting.\n",image->y1,image->y0);
++		TIFFClose(tif);
++		opj_image_destroy(image);
++		return NULL;
++	}
++	
+ 	for(j = 0; j < numcomps; j++)
+ 	{
+ 		planes[j] = image->comps[j].data;
+@@ -1395,15 +1419,15 @@ opj_image_t* tiftoimage(const char *filename, opj_cparameters_t *parameters)
+ 	image->comps[numcomps - 1].alpha = (OPJ_UINT16)(1 - (numcomps & 1));
+ 		
+ 	strip_size = TIFFStripSize(tif);
+-	
++
+ 	buf = _TIFFmalloc(strip_size);
+ 	if (buf == NULL) {
+ 		TIFFClose(tif);
+ 		opj_image_destroy(image);
+ 		return NULL;
+ 	}
+-	rowStride = ((OPJ_SIZE_T)w * tiSpp * tiBps + 7U) / 8U;
+-	buffer32s = (OPJ_INT32 *)malloc((OPJ_SIZE_T)w * tiSpp * sizeof(OPJ_INT32));
++	rowStride = (w * tiSpp * tiBps + 7U) / 8U;
++	buffer32s = (OPJ_INT32 *)malloc((OPJ_SIZE_T)(w * tiSpp * sizeof(OPJ_INT32)));
+ 	if (buffer32s == NULL) {
+ 		_TIFFfree(buf);
+ 		TIFFClose(tif);
+@@ -1421,11 +1445,20 @@ opj_image_t* tiftoimage(const char *filename, opj_cparameters_t *parameters)
+ 		for(; (h > 0) && (strip < TIFFNumberOfStrips(tif)); strip++)
+ 		{
+ 				const OPJ_UINT8 *dat8;
+-				OPJ_SIZE_T ssize;
++				tmsize_t ssize;
+ 				
+-				ssize = (OPJ_SIZE_T)TIFFReadEncodedStrip(tif, strip, buf, strip_size);
++				ssize = TIFFReadEncodedStrip(tif, strip, buf, strip_size);
++				if(ssize < 1 || ssize > strip_size) {
++					fprintf(stderr,"tiftoimage: Bad value for ssize(%ld) "
++                     "vs. strip_size(%ld).\n\tAborting.\n",ssize,strip_size);
++					_TIFFfree(buf);
++					_TIFFfree(buffer32s);
++					TIFFClose(tif);
++					opj_image_destroy(image);
++					return NULL;
++				}
+ 				dat8 = (const OPJ_UINT8*)buf;
+-				
++
+ 				while (ssize >= rowStride) {
+ 					cvtTifTo32s(dat8, buffer32s, (OPJ_SIZE_T)w * tiSpp);
+ 					cvtCxToPx(buffer32s, planes, (OPJ_SIZE_T)w);
diff --git a/gnu/packages/patches/openssh-memory-exhaustion.patch b/gnu/packages/patches/openssh-memory-exhaustion.patch
deleted file mode 100644
index 91fe294ca4..0000000000
--- a/gnu/packages/patches/openssh-memory-exhaustion.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Fix a memory exhaustion bug in the key exchange, whereby an unauthenticated user
-could potentially consume 38400 MB of memory on the server:
-
-http://seclists.org/oss-sec/2016/q4/185
-
-Patch adapted from upstream source repository:
-
-https://github.com/openssh/openssh-portable/commit/ec165c392ca54317dbe3064a8c200de6531e89ad
-
-From ec165c392ca54317dbe3064a8c200de6531e89ad Mon Sep 17 00:00:00 2001
-From: "markus@openbsd.org" <markus@openbsd.org>
-Date: Mon, 10 Oct 2016 19:28:48 +0000
-Subject: [PATCH] upstream commit
-
-Unregister the KEXINIT handler after message has been
-received. Otherwise an unauthenticated peer can repeat the KEXINIT and cause
-allocation of up to 128MB -- until the connection is closed. Reported by
-shilei-c at 360.cn
-
-Upstream-ID: 43649ae12a27ef94290db16d1a98294588b75c05
----
- kex.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/kex.c b/kex.c
-index 3f97f8c..6a94bc5 100644
---- a/kex.c
-+++ b/kex.c
-@@ -481,6 +481,7 @@ kex_input_kexinit(int type, u_int32_t seq, void *ctxt)
- 	if (kex == NULL)
- 		return SSH_ERR_INVALID_ARGUMENT;
- 
-+	ssh_dispatch_set(ssh, SSH2_MSG_KEXINIT, NULL);
- 	ptr = sshpkt_ptr(ssh, &dlen);
- 	if ((r = sshbuf_put(kex->peer, ptr, dlen)) != 0)
- 		return r;
--- 
-2.10.1
-
diff --git a/gnu/packages/patches/python-2.7-site-prefixes.patch b/gnu/packages/patches/python-2.7-site-prefixes.patch
new file mode 100644
index 0000000000..9e3066508f
--- /dev/null
+++ b/gnu/packages/patches/python-2.7-site-prefixes.patch
@@ -0,0 +1,26 @@
+Add all /gnu/store/ prefixes found in PYTHONPATH to the prefixes where
+site-packages (and .pth files) are searched.
+
+*** Python-2.7.11/Lib/site.py.orig	2016-10-17 23:27:23.746149690 +0200
+--- Python-2.7.11/Lib/site.py	2016-10-17 23:44:51.930871644 +0200
+***************
+*** 65,70 ****
+--- 65,82 ----
+  
+  # Prefixes for site-packages; add additional prefixes like /usr/local here
+  PREFIXES = [sys.prefix, sys.exec_prefix]
++ # Guix: Add all /gnu/store-paths in PYTHONPATH--these are all
++ # "prefixes".  This is required to search .pth files in all python
++ # packages contained in /gnu/store which is required to make
++ # .pth-defined namespace packages work.
++ # This is necessary if the packages are not merged into a single
++ # `site-packages` directory (like when using `guix environment`) but
++ # listed in PYTHONPATH (like when running `guix build`).
++ for p in sys.path:
++     if p.startswith('/gnu/store/'):
++         PREFIXES.append(p[:p.find('/', 44)]) # find first pathsep after hash
++ del p
++ 
+  # Enable per user site-packages directory
+  # set it to False to disable the feature or True to force the feature
+  ENABLE_USER_SITE = None
diff --git a/gnu/packages/patches/python-dendropy-exclude-failing-tests.patch b/gnu/packages/patches/python-dendropy-exclude-failing-tests.patch
deleted file mode 100644
index 288a58b06f..0000000000
--- a/gnu/packages/patches/python-dendropy-exclude-failing-tests.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/dendropy/test/test_phylogenetic_distance_matrix.py b/dendropy/test/test_phylogenetic_distance_matrix.py
-index 10c05f5..a18ba52 100644
---- a/dendropy/test/test_phylogenetic_distance_matrix.py
-+++ b/dendropy/test/test_phylogenetic_distance_matrix.py
-@@ -793,7 +793,7 @@ class PdmUpgmaTree(PdmTreeChecker, unittest.TestCase):
-                     expected_tree=expected_tree)
- 
- class NodeToNodeDistancesTest(unittest.TestCase):
--
-+    @unittest.expectedFailure
-     def test_distances(self):
-         ## get distances from ape
-         # library(ape)
-@@ -825,6 +825,7 @@ class NodeToNodeDistancesTest(unittest.TestCase):
-                     e = reference_table[nd1.label, nd2.label]
-                     self.assertAlmostEqual(d, e)
- 
-+    @unittest.expectedFailure
-     def test_mrca(self):
-         test_runs = [
-                 "hiv1.newick",
diff --git a/gnu/packages/patches/python-pycrypto-CVE-2013-7459.patch b/gnu/packages/patches/python-pycrypto-CVE-2013-7459.patch
new file mode 100644
index 0000000000..3570b94e9b
--- /dev/null
+++ b/gnu/packages/patches/python-pycrypto-CVE-2013-7459.patch
@@ -0,0 +1,97 @@
+Fix CVE-2013-7459:
+
+https://github.com/dlitz/pycrypto/issues/176
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-7459
+
+Copied from Debian:
+
+https://anonscm.debian.org/cgit/collab-maint/python-crypto.git/commit/?id=0de2243837ed369a086f15c50cca2be85bdfab9d
+
+Debian adapts this upstream commit:
+
+https://github.com/dlitz/pycrypto/commit/8dbe0dc3eea5c689d4f76b37b93fe216cf1f00d4
+
+From 8dbe0dc3eea5c689d4f76b37b93fe216cf1f00d4 Mon Sep 17 00:00:00 2001
+From: Legrandin <helderijs@gmail.com>
+Date: Sun, 22 Dec 2013 22:24:46 +0100
+Subject: [PATCH] Throw exception when IV is used with ECB or CTR
+
+The IV parameter is currently ignored when initializing
+a cipher in ECB or CTR mode.
+
+For CTR mode, it is confusing: it takes some time to see
+that a different parameter is needed (the counter).
+
+For ECB mode, it is outright dangerous.
+
+This patch forces an exception to be raised.
+---
+ lib/Crypto/SelfTest/Cipher/common.py | 31 +++++++++++++++++++++++--------
+ src/block_template.c                 | 11 +++++++++++
+ 2 files changed, 34 insertions(+), 8 deletions(-)
+
+--- a/lib/Crypto/SelfTest/Cipher/common.py
++++ b/lib/Crypto/SelfTest/Cipher/common.py
+@@ -239,19 +239,34 @@ class RoundtripTest(unittest.TestCase):
+         return """%s .decrypt() output of .encrypt() should not be garbled""" % (self.module_name,)
+ 
+     def runTest(self):
+-        for mode in (self.module.MODE_ECB, self.module.MODE_CBC, self.module.MODE_CFB, self.module.MODE_OFB, self.module.MODE_OPENPGP):
++
++        ## ECB mode
++        mode = self.module.MODE_ECB
++        encryption_cipher = self.module.new(a2b_hex(self.key), mode)
++        ciphertext = encryption_cipher.encrypt(self.plaintext)
++        decryption_cipher = self.module.new(a2b_hex(self.key), mode)
++        decrypted_plaintext = decryption_cipher.decrypt(ciphertext)
++        self.assertEqual(self.plaintext, decrypted_plaintext)
++
++        ## OPENPGP mode
++        mode = self.module.MODE_OPENPGP
++        encryption_cipher = self.module.new(a2b_hex(self.key), mode, self.iv)
++        eiv_ciphertext = encryption_cipher.encrypt(self.plaintext)
++        eiv = eiv_ciphertext[:self.module.block_size+2]
++        ciphertext = eiv_ciphertext[self.module.block_size+2:]
++        decryption_cipher = self.module.new(a2b_hex(self.key), mode, eiv)
++        decrypted_plaintext = decryption_cipher.decrypt(ciphertext)
++        self.assertEqual(self.plaintext, decrypted_plaintext)
++
++        ## All other non-AEAD modes (but CTR)
++        for mode in (self.module.MODE_CBC, self.module.MODE_CFB, self.module.MODE_OFB):
+             encryption_cipher = self.module.new(a2b_hex(self.key), mode, self.iv)
+             ciphertext = encryption_cipher.encrypt(self.plaintext)
+-            
+-            if mode != self.module.MODE_OPENPGP:
+-                decryption_cipher = self.module.new(a2b_hex(self.key), mode, self.iv)
+-            else:
+-                eiv = ciphertext[:self.module.block_size+2]
+-                ciphertext = ciphertext[self.module.block_size+2:]
+-                decryption_cipher = self.module.new(a2b_hex(self.key), mode, eiv)
++            decryption_cipher = self.module.new(a2b_hex(self.key), mode, self.iv)
+             decrypted_plaintext = decryption_cipher.decrypt(ciphertext)
+             self.assertEqual(self.plaintext, decrypted_plaintext)
+ 
++
+ class PGPTest(unittest.TestCase):
+     def __init__(self, module, params):
+         unittest.TestCase.__init__(self)
+--- a/src/block_template.c
++++ b/src/block_template.c
+@@ -170,6 +170,17 @@ ALGnew(PyObject *self, PyObject *args, P
+ 				"Key cannot be the null string");
+ 		return NULL;
+ 	}
++	if (IVlen != 0 && mode == MODE_ECB)
++	{
++		PyErr_Format(PyExc_ValueError, "ECB mode does not use IV");
++		return NULL;
++	}
++	if (IVlen != 0 && mode == MODE_CTR)
++	{
++		PyErr_Format(PyExc_ValueError,
++			"CTR mode needs counter parameter, not IV");
++		return NULL;
++	}
+ 	if (IVlen != BLOCK_SIZE && mode != MODE_ECB && mode != MODE_CTR)
+ 	{
+ 		PyErr_Format(PyExc_ValueError,
diff --git a/gnu/packages/patches/python-rarfile-fix-tests.patch b/gnu/packages/patches/python-rarfile-fix-tests.patch
deleted file mode 100644
index 8ae8894009..0000000000
--- a/gnu/packages/patches/python-rarfile-fix-tests.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-There is no test.sh, but there are test1.sh and test2.sh.
-
-diff --git a/test/Makefile b/test/Makefile
-index 027bc5f..5383db3 100644
---- a/test/Makefile
-+++ b/test/Makefile
-@@ -1,5 +1,6 @@
- test:
--	./test.sh
-+	./test1.sh
-+	./test2.sh
- 
- clean:
- 	rm -rf __pycache__
diff --git a/gnu/packages/patches/qemu-CVE-2016-8576.patch b/gnu/packages/patches/qemu-CVE-2016-8576.patch
deleted file mode 100644
index 5031b59d81..0000000000
--- a/gnu/packages/patches/qemu-CVE-2016-8576.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 20009bdaf95d10bf748fa69b104672d3cfaceddf Mon Sep 17 00:00:00 2001
-From: Gerd Hoffmann <kraxel@redhat.com>
-Date: Fri, 7 Oct 2016 10:15:29 +0200
-Subject: [PATCH] xhci: limit the number of link trbs we are willing to process
-
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
----
- hw/usb/hcd-xhci.c | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
-index 726435c..ee4fa48 100644
---- a/hw/usb/hcd-xhci.c
-+++ b/hw/usb/hcd-xhci.c
-@@ -54,6 +54,8 @@
-  * to the specs when it gets them */
- #define ER_FULL_HACK
- 
-+#define TRB_LINK_LIMIT  4
-+
- #define LEN_CAP         0x40
- #define LEN_OPER        (0x400 + 0x10 * MAXPORTS)
- #define LEN_RUNTIME     ((MAXINTRS + 1) * 0x20)
-@@ -1000,6 +1002,7 @@ static TRBType xhci_ring_fetch(XHCIState *xhci, XHCIRing *ring, XHCITRB *trb,
-                                dma_addr_t *addr)
- {
-     PCIDevice *pci_dev = PCI_DEVICE(xhci);
-+    uint32_t link_cnt = 0;
- 
-     while (1) {
-         TRBType type;
-@@ -1026,6 +1029,9 @@ static TRBType xhci_ring_fetch(XHCIState *xhci, XHCIRing *ring, XHCITRB *trb,
-             ring->dequeue += TRB_SIZE;
-             return type;
-         } else {
-+            if (++link_cnt > TRB_LINK_LIMIT) {
-+                return 0;
-+            }
-             ring->dequeue = xhci_mask64(trb->parameter);
-             if (trb->control & TRB_LK_TC) {
-                 ring->ccs = !ring->ccs;
-@@ -1043,6 +1049,7 @@ static int xhci_ring_chain_length(XHCIState *xhci, const XHCIRing *ring)
-     bool ccs = ring->ccs;
-     /* hack to bundle together the two/three TDs that make a setup transfer */
-     bool control_td_set = 0;
-+    uint32_t link_cnt = 0;
- 
-     while (1) {
-         TRBType type;
-@@ -1058,6 +1065,9 @@ static int xhci_ring_chain_length(XHCIState *xhci, const XHCIRing *ring)
-         type = TRB_TYPE(trb);
- 
-         if (type == TR_LINK) {
-+            if (++link_cnt > TRB_LINK_LIMIT) {
-+                return -length;
-+            }
-             dequeue = xhci_mask64(trb.parameter);
-             if (trb.control & TRB_LK_TC) {
-                 ccs = !ccs;
--- 
-1.8.3.1
-
diff --git a/gnu/packages/patches/qemu-CVE-2016-8577.patch b/gnu/packages/patches/qemu-CVE-2016-8577.patch
deleted file mode 100644
index c4132d2fb1..0000000000
--- a/gnu/packages/patches/qemu-CVE-2016-8577.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Subject: [Qemu-devel] [PATCH] 9pfs: fix potential host memory leak in v9fs_read
-From: Li Qiang <liq3ea@gmail.com>
-
-In 9pfs read dispatch function, it doesn't free two QEMUIOVector
-object thus causing potential memory leak. This patch avoid this.
-
-Signed-off-by: Li Qiang <liq3ea@gmail.com>
----
- hw/9pfs/9p.c | 5 +++--
-  1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
-index 119ee58..543a791 100644
---- a/hw/9pfs/9p.c
-+++ b/hw/9pfs/9p.c
-@@ -1826,14 +1826,15 @@ static void v9fs_read(void *opaque)
-             if (len < 0) {
-                 /* IO error return the error */
-                 err = len;
--                goto out;
-+                goto out_free_iovec;
-             }
-         } while (count < max_count && len > 0);
-         err = pdu_marshal(pdu, offset, "d", count);
-         if (err < 0) {
--            goto out;
-+            goto out_free_iovec;
-         }
-         err += offset + count;
-+out_free_iovec:
-         qemu_iovec_destroy(&qiov);
-         qemu_iovec_destroy(&qiov_full);
-     } else if (fidp->fid_type == P9_FID_XATTR) {
--- 
-1.8.3.1
-
diff --git a/gnu/packages/patches/qemu-CVE-2016-8578.patch b/gnu/packages/patches/qemu-CVE-2016-8578.patch
deleted file mode 100644
index 92ba365727..0000000000
--- a/gnu/packages/patches/qemu-CVE-2016-8578.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From: Li Qiang <liq3ea@gmail.com>
-
-In 9pfs function v9fs_iov_vunmarshal, it will not allocate space
-for empty string. This will cause several NULL pointer dereference
-issues. this patch fix this issue.
-
-Signed-off-by: Li Qiang <liq3ea@gmail.com>
----
- fsdev/9p-iov-marshal.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/fsdev/9p-iov-marshal.c b/fsdev/9p-iov-marshal.c
-index 663cad5..1d16f8d 100644
---- a/fsdev/9p-iov-marshal.c
-+++ b/fsdev/9p-iov-marshal.c
-@@ -125,7 +125,7 @@ ssize_t v9fs_iov_vunmarshal(struct iovec *out_sg, int out_num, size_t offset,
-                 str->data = g_malloc(str->size + 1);
-                 copied = v9fs_unpack(str->data, out_sg, out_num, offset,
-                                      str->size);
--                if (copied > 0) {
-+                if (copied >= 0) {
-                     str->data[str->size] = 0;
-                 } else {
-                     v9fs_string_free(str);
--- 
-1.8.3.1
-
diff --git a/gnu/packages/patches/readline-7.0-mingw.patch b/gnu/packages/patches/readline-7.0-mingw.patch
new file mode 100644
index 0000000000..1dc491d556
--- /dev/null
+++ b/gnu/packages/patches/readline-7.0-mingw.patch
@@ -0,0 +1,28 @@
+Configure checks for chown; add missing shields in code.
+
+Upstream status: not yet presented upstream.
+
+--- readline-7.0/histfile.c.orig	2016-12-06 20:04:10.058901731 +0100
++++ readline-7.0/histfile.c	2016-12-06 20:05:09.220083801 +0100
+@@ -610,8 +610,10 @@
+      user is running this, it's a no-op.  If the shell is running after sudo
+      with a shared history file, we don't want to leave the history file
+      owned by root. */
++#if HAVE_CHOWN
+   if (rv == 0 && exists)
+     r = chown (filename, finfo.st_uid, finfo.st_gid);
++#endif
+ 
+   xfree (filename);
+   FREE (tempname);
+@@ -757,8 +759,10 @@
+      user is running this, it's a no-op.  If the shell is running after sudo
+      with a shared history file, we don't want to leave the history file
+      owned by root. */
++#if HAVE_CHOWN
+   if (rv == 0 && exists)
+     mode = chown (histname, finfo.st_uid, finfo.st_gid);
++#endif
+ 
+   FREE (histname);
+   FREE (tempname);
diff --git a/gnu/packages/patches/ruby-symlinkfix.patch b/gnu/packages/patches/ruby-symlinkfix.patch
deleted file mode 100644
index 16beecc97a..0000000000
--- a/gnu/packages/patches/ruby-symlinkfix.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Fix symlinks to '..' to fix rubygems improperly expanding symlinked
-paths. Without this fix, some gems fail to install. This patch is applied in
-rubygems 2.5.2, but ruby version 2.3.1 bundles an older version of rubygems
-(2.5.1).
-
---- a/lib/rubygems/package.rb
-+++ b/lib/rubygems/package.rb
-@@ -383,7 +383,7 @@ def extract_tar_gz io, destination_dir, pattern = "*" # :nodoc:
-           FileUtils.chmod entry.header.mode, destination
-         end if entry.file?
-
--        File.symlink(install_location(entry.header.linkname, destination_dir), destination) if entry.symlink?
-+        File.symlink(entry.header.linkname, destination) if entry.symlink?
-
-         verbose destination
-       end
-diff --git a/test/rubygems/test_gem_package.rb b/test/rubygems/test_gem_package.rb
-index 7848bc2..f287bd3 100644
---- a/test/rubygems/test_gem_package.rb
-+++ b/test/rubygems/test_gem_package.rb
-@@ -428,19 +428,25 @@ def test_extract_tar_gz_absolute
-                  "#{@destination} is not allowed", e.message)
-   end
-
--  def test_extract_tar_gz_symlink_absolute
-+  def test_extract_tar_gz_symlink_relative_path
-+    skip 'symlink not supported' if Gem.win_platform?
-+
-     package = Gem::Package.new @gem
-
-     tgz_io = util_tar_gz do |tar|
--      tar.add_symlink 'code.rb', '/absolute.rb', 0644
-+      tar.add_file    'relative.rb', 0644 do |io| io.write 'hi' end
-+      tar.mkdir       'lib',         0755
-+      tar.add_symlink 'lib/foo.rb', '../relative.rb', 0644
-     end
-
--    e = assert_raises Gem::Package::PathError do
--      package.extract_tar_gz tgz_io, @destination
--    end
-+    package.extract_tar_gz tgz_io, @destination
-
--    assert_equal("installing into parent path /absolute.rb of " +
--                 "#{@destination} is not allowed", e.message)
-+    extracted = File.join @destination, 'lib/foo.rb'
-+    assert_path_exists extracted
-+    assert_equal '../relative.rb',
-+                 File.readlink(extracted)
-+    assert_equal 'hi',
-+                 File.read(extracted)
-   end
-
-   def test_extract_tar_gz_directory
diff --git a/gnu/packages/patches/seq24-rename-mutex.patch b/gnu/packages/patches/seq24-rename-mutex.patch
new file mode 100644
index 0000000000..ddc5910119
--- /dev/null
+++ b/gnu/packages/patches/seq24-rename-mutex.patch
@@ -0,0 +1,124 @@
+The custom mutex definition in Seq24 clashes with the mutex defined in gtkmm.
+This patch renames the custom definition.
+
+See https://bugs.launchpad.net/seq24/+bug/1647614 for upstream bug report.
+
+diff --git a/src/midibus.h b/src/midibus.h
+index 2cdf8e8..1bb02bd 100644
+--- a/src/midibus.h
++++ b/src/midibus.h
+@@ -90,7 +90,7 @@ class midibus
+ 
+ 
+     /* locking */
+-    mutex m_mutex;
++    seq24mutex m_mutex;
+ 
+     /* mutex */
+     void lock();
+@@ -208,7 +208,7 @@ class mastermidibus
+     sequence *m_seq;
+ 
+     /* locking */
+-    mutex m_mutex;
++    seq24mutex m_mutex;
+ 
+     /* mutex */
+     void lock();
+diff --git a/src/midibus_portmidi.h b/src/midibus_portmidi.h
+index 0119e9c..8c6a27a 100644
+--- a/src/midibus_portmidi.h
++++ b/src/midibus_portmidi.h
+@@ -65,7 +65,7 @@ class midibus
+     long m_lasttick;
+ 
+     /* locking */
+-    mutex m_mutex;
++    seq24mutex m_mutex;
+ 
+     /* mutex */
+     void lock();
+@@ -164,7 +164,7 @@ class mastermidibus
+     sequence *m_seq;
+ 
+     /* locking */
+-    mutex m_mutex;
++    seq24mutex m_mutex;
+ 
+     /* mutex */
+     void lock();
+diff --git a/src/mutex.cpp b/src/mutex.cpp
+index b3f23fd..914114f 100644
+--- a/src/mutex.cpp
++++ b/src/mutex.cpp
+@@ -20,23 +20,23 @@
+ 
+ #include "mutex.h"
+ 
+-const pthread_mutex_t mutex::recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
++const pthread_mutex_t seq24mutex::recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+ const pthread_cond_t condition_var::cond  = PTHREAD_COND_INITIALIZER;
+ 
+-mutex::mutex( )
++seq24mutex::seq24mutex( )
+ {
+     m_mutex_lock = recmutex;
+ }
+ 
+ void
+-mutex::lock( )
++seq24mutex::lock( )
+ {
+     pthread_mutex_lock( &m_mutex_lock );
+ }
+ 
+ 
+ void
+-mutex::unlock( )
++seq24mutex::unlock( )
+ {
+     pthread_mutex_unlock( &m_mutex_lock );
+ }
+diff --git a/src/mutex.h b/src/mutex.h
+index 399f8a3..4f1b867 100644
+--- a/src/mutex.h
++++ b/src/mutex.h
+@@ -24,7 +24,7 @@
+ 
+ #include <pthread.h>
+ 
+-class mutex {
++class seq24mutex {
+ 
+ private:
+ 
+@@ -37,14 +37,14 @@ protected:
+ 
+ public:
+ 
+-    mutex();
++    seq24mutex();
+ 
+     void lock();
+     void unlock();
+ 
+ };
+ 
+-class condition_var : public mutex {
++class condition_var : public seq24mutex {
+ 
+ private:
+ 
+diff --git a/src/sequence.h b/src/sequence.h
+index 2943946..9da8700 100644
+--- a/src/sequence.h
++++ b/src/sequence.h
+@@ -153,7 +153,7 @@ class sequence
+     long m_rec_vol;
+ 
+     /* locking */
+-    mutex m_mutex;
++    seq24mutex m_mutex;
+ 
+     /* used to idenfity which events are ours in the out queue */
+     //unsigned char m_tag;
diff --git a/gnu/packages/patches/slock-CVE-2016-6866.patch b/gnu/packages/patches/slock-CVE-2016-6866.patch
deleted file mode 100644
index 2f94b8c1a9..0000000000
--- a/gnu/packages/patches/slock-CVE-2016-6866.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-Fix CVE-2016-6866.
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-6866
-https://security-tracker.debian.org/tracker/CVE-2016-6866
-
-Copied from upstream source repository:
-http://git.suckless.org/slock/commit/?id=d8bec0f6fdc8a246d78cb488a0068954b46fcb29
-
-From d8bec0f6fdc8a246d78cb488a0068954b46fcb29 Mon Sep 17 00:00:00 2001
-From: Markus Teich <markus.teich@stusta.mhn.de>
-Date: Tue, 30 Aug 2016 22:59:06 +0000
-Subject: fix CVE-2016-6866
-
----
-diff --git a/slock.c b/slock.c
-index 847b328..8ed59ca 100644
---- a/slock.c
-+++ b/slock.c
-@@ -123,7 +123,7 @@ readpw(Display *dpy)
- readpw(Display *dpy, const char *pws)
- #endif
- {
--	char buf[32], passwd[256];
-+	char buf[32], passwd[256], *encrypted;
- 	int num, screen;
- 	unsigned int len, color;
- 	KeySym ksym;
-@@ -159,7 +159,11 @@ readpw(Display *dpy, const char *pws)
- #ifdef HAVE_BSD_AUTH
- 				running = !auth_userokay(getlogin(), NULL, "auth-slock", passwd);
- #else
--				running = !!strcmp(crypt(passwd, pws), pws);
-+				errno = 0;
-+				if (!(encrypted = crypt(passwd, pws)))
-+					fprintf(stderr, "slock: crypt: %s\n", strerror(errno));
-+				else
-+					running = !!strcmp(encrypted, pws);
- #endif
- 				if (running) {
- 					XBell(dpy, 100);
-@@ -312,6 +316,8 @@ main(int argc, char **argv) {
- 
- #ifndef HAVE_BSD_AUTH
- 	pws = getpw();
-+	if (strlen(pws) < 2)
-+		die("slock: failed to get user password hash.\n");
- #endif
- 
- 	if (!(dpy = XOpenDisplay(NULL)))
---
-cgit v0.9.0.3-65-g4555
diff --git a/gnu/packages/patches/tcsh-fix-out-of-bounds-read.patch b/gnu/packages/patches/tcsh-fix-out-of-bounds-read.patch
new file mode 100644
index 0000000000..48c294f78e
--- /dev/null
+++ b/gnu/packages/patches/tcsh-fix-out-of-bounds-read.patch
@@ -0,0 +1,31 @@
+Fix out-of-bounds read in c_substitute():
+
+http://seclists.org/oss-sec/2016/q4/612
+
+Patch copied from upstream source repository:
+
+https://github.com/tcsh-org/tcsh/commit/6a542dc4fb2ba26518a47e9b3a9bcd6a91b94596
+
+From 6a542dc4fb2ba26518a47e9b3a9bcd6a91b94596 Mon Sep 17 00:00:00 2001
+From: christos <christos>
+Date: Fri, 2 Dec 2016 16:59:28 +0000
+Subject: [PATCH] Fix out of bounds read (Brooks Davis) (reproduce by starting
+ tcsh and hitting tab at the prompt)
+
+---
+ ed.chared.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ed.chared.c b/ed.chared.c
+index 1277e53..310393e 100644
+--- ed.chared.c
++++ ed.chared.c
+@@ -750,7 +750,7 @@ c_substitute(void)
+     /*
+      * If we found a history character, go expand it.
+      */
+-    if (HIST != '\0' && *p == HIST)
++    if (p >= InputBuf && HIST != '\0' && *p == HIST)
+ 	nr_exp = c_excl(p);
+     else
+         nr_exp = 0;
diff --git a/gnu/packages/patches/unrtf-CVE-2016-10091.patch b/gnu/packages/patches/unrtf-CVE-2016-10091.patch
new file mode 100644
index 0000000000..badd1b8ed6
--- /dev/null
+++ b/gnu/packages/patches/unrtf-CVE-2016-10091.patch
@@ -0,0 +1,189 @@
+Fix CVE-2016-10091 (stack-based buffer overflows in cmd_* functions):
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10091
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=849705
+http://seclists.org/oss-sec/2016/q4/787
+
+Patch adapted from Debian:
+
+https://anonscm.debian.org/cgit/collab-maint/unrtf.git/commit/?h=jessie&id=7500a48fb0fbad3ab963fb17560b2f90a8a485c8
+
+The Debian patch adapts this upstream commit so that it can be applied
+to the 0.21.9 release tarball:
+
+http://hg.savannah.gnu.org/hgweb/unrtf/rev/3b16893a6406
+
+From 7dd568ed8a6a5acb6c04f2b40f457d63a00435f3 Mon Sep 17 00:00:00 2001
+From: Willi Mann <willi@debian.org>
+Date: Sat, 31 Dec 2016 20:31:38 +0100
+Subject: [PATCH] Add patch from upstream to fix CVE-2016-10091 (buffer
+ overflow in various cmd_ functions)
+
+diff --git a/src/attr.c b/src/attr.c
+index 02b5c81..e2951ea 100644
+--- a/src/attr.c
++++ b/src/attr.c
+@@ -746,7 +746,7 @@ char *
+ assemble_string(char *string, int nr)
+ {
+ 
+-	char *s, tmp[12];/* Number of characters that can be in int type (including '\0') - AF */
++	char *s, tmp[20];
+ 	int i = 0, j = 0;
+ 
+ 	if (string == NULL)
+@@ -762,7 +762,7 @@ assemble_string(char *string, int nr)
+ 		}
+ 
+ 		if (string[i] != '\0') {
+-			sprintf(tmp, "%d", nr);
++			snprintf(tmp, 20, "%d", nr);
+ 			strcpy(&s[j], tmp);
+ 			j = j + strlen(tmp);
+ 		}
+diff --git a/src/convert.c b/src/convert.c
+index c76d7d6..8eacdcb 100644
+--- a/src/convert.c
++++ b/src/convert.c
+@@ -472,7 +472,7 @@ static const int fcharsetparmtocp(int parm)
+ }
+ 
+ // Translate code page to encoding name hopefully suitable as iconv input
+-static char *cptoencoding(parm)
++static char *cptoencoding(int parm)
+ {
+     // Note that CP0 is supposed to mean current system default, which does
+     // not make any sense as a stored value, we don't handle it.
+@@ -964,7 +964,7 @@ cmd_cf (Word *w, int align, char has_param, int num)
+ 	}
+ 	else
+ 	{
+-		sprintf(str,"#%02x%02x%02x",
++		snprintf(str, 40, "#%02x%02x%02x",
+ 			color_table[num].r,
+ 			color_table[num].g,
+ 			color_table[num].b);
+@@ -993,7 +993,7 @@ cmd_cb (Word *w, int align, char has_param, int num)
+ 	}
+ 	else
+ 	{
+-		sprintf(str,"#%02x%02x%02x",
++		snprintf(str, 40, "#%02x%02x%02x",
+ 			color_table[num].r,
+ 			color_table[num].g,
+ 			color_table[num].b);
+@@ -1018,7 +1018,7 @@ cmd_fs (Word *w, int align, char has_param, int points) {
+ 	/* Note, fs20 means 10pt */
+ 	points /= 2;
+ 
+-	sprintf(str,"%d",points);
++	snprintf(str, 20, "%d", points);
+ 	attr_push(ATTR_FONTSIZE,str);
+ 
+ 	return FALSE;
+@@ -1166,7 +1166,7 @@ cmd_f (Word *w, int align, char has_param, int num)
+         {
+             // TOBEDONE: WHAT'S THIS ???
+             name = my_malloc(12);
+-            sprintf(name, "%d", num);
++			snprintf(name, 12, "%d", num);
+         }
+ 
+         /* we are going to output entities, so should not output font */
+@@ -1218,7 +1218,7 @@ cmd_highlight (Word *w, int align, char has_param, int num)
+ 	}
+ 	else
+ 	{
+-		sprintf(str,"#%02x%02x%02x",
++		snprintf(str, 40, "#%02x%02x%02x",
+ 			color_table[num].r,
+ 			color_table[num].g,
+ 			color_table[num].b);
+@@ -1373,9 +1373,9 @@ cmd_ftech (Word *w, int align, char has_param, int param) {
+ 
+ static int 
+ cmd_expand (Word *w, int align, char has_param, int param) {
+-	char str[10];
++	char str[20];
+ 	if (has_param) {
+-		sprintf(str, "%d", param/4);
++		snprintf(str, 20, "%d", param / 4);
+ 		if (!param) 
+ 			attr_pop(ATTR_EXPAND);
+ 		else 
+@@ -1394,7 +1394,7 @@ cmd_expand (Word *w, int align, char has_param, int param) {
+ 
+ static int 
+ cmd_emboss (Word *w, int align, char has_param, int param) {
+-	char str[10];
++	char str[20];
+ 	if (has_param && !param)
+ #ifdef SUPPORT_UNNESTED
+ 		attr_find_pop(ATTR_EMBOSS);
+@@ -1403,7 +1403,7 @@ cmd_emboss (Word *w, int align, char has_param, int param) {
+ #endif
+ 	else
+ 	{
+-		sprintf(str, "%d", param);
++		snprintf(str, 20, "%d", param);
+ 		attr_push(ATTR_EMBOSS, str);
+ 	}
+ 	return FALSE;
+@@ -1419,12 +1419,12 @@ cmd_emboss (Word *w, int align, char has_param, int param) {
+ 
+ static int 
+ cmd_engrave (Word *w, int align, char has_param, int param) {
+-	char str[10];
++	char str[20];
+ 	if (has_param && !param) 
+ 		attr_pop(ATTR_ENGRAVE);
+ 	else
+ 	{
+-		sprintf(str, "%d", param);
++		snprintf(str, 20, "%d", param);
+ 		attr_push(ATTR_ENGRAVE, str);
+ 	}
+ 	return FALSE;
+@@ -1976,7 +1976,7 @@ static int cmd_u (Word *w, int align, char has_param, int param) {
+ 
+ 	short	done=0;
+ 	long unicode_number = (long) param; /* On 16bit architectures int is too small to store unicode characters. - AF */
+-	char tmp[12]; /* Number of characters that can be in int type (including '\0'). If int size is greater than 4 bytes change this value. - AF */
++	char tmp[20]; /* Number of characters that can be in int type (including '\0'). If int size is greater than 4 bytes change this value. - AF */
+ 	const char *alias;
+ #define DEBUG 0
+ #if DEBUG
+@@ -2006,7 +2006,7 @@ static int cmd_u (Word *w, int align, char has_param, int param) {
+                             /* RTF spec: Unicode values beyond 32767 are represented by negative numbers */
+ 				unicode_number += 65536;
+ 			}
+-			sprintf(tmp, "%ld", unicode_number);
++			snprintf(tmp, 20, "%ld", unicode_number);
+ 
+ 			if (safe_printf(1, op->unisymbol_print, tmp)) fprintf(stderr, TOO_MANY_ARGS, "unisymbol_print");
+ 			done++;
+diff --git a/src/output.c b/src/output.c
+index 86d8b5c..4cdbfa6 100644
+--- a/src/output.c
++++ b/src/output.c
+@@ -320,7 +320,7 @@ op_begin_std_fontsize (OutputPersonality *op, int size)
+ 	if (!found_std_expr) {
+ 		if (op->fontsize_begin) {
+ 			char expr[16];
+-			sprintf (expr, "%d", size);
++			snprintf(expr, 16, "%d", size);
+ 			if (safe_printf (1, op->fontsize_begin, expr)) fprintf(stderr, TOO_MANY_ARGS, "fontsize_begin");
+ 		} else {
+ 			/* If we cannot write out a change for the exact
+@@ -440,7 +440,7 @@ op_end_std_fontsize (OutputPersonality *op, int size)
+ 	if (!found_std_expr) {
+ 		if (op->fontsize_end) {
+ 			char expr[16];
+-			sprintf (expr, "%d", size);
++			snprintf(expr, 16, "%d", size);
+ 			if (safe_printf(1, op->fontsize_end, expr)) fprintf(stderr, TOO_MANY_ARGS, "fontsize_end");
+ 		} else {
+ 			/* If we cannot write out a change for the exact
+- 
+.11.0
+
diff --git a/gnu/packages/patches/vtk-mesa-10.patch b/gnu/packages/patches/vtk-mesa-10.patch
deleted file mode 100644
index bc60af68c4..0000000000
--- a/gnu/packages/patches/vtk-mesa-10.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Fix build against new mesa.  See:
-
-  https://bugs.freedesktop.org/show_bug.cgi?id=83631
-  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765938
-
-Description: fixes FTBFS against new libjpeg-turbo
-Author: Ondřej Surý <ondrej@debian.org>
-Bug-Debian: https://bugs.debian.org/765938
-Reviewed-By: Anton Gladky <gladk@debian.org>
-Last-Update: 2014-10-22
-
-Index: vtk6-6.1.0+dfsg2/Rendering/OpenGL/vtkOpenGL.h
-===================================================================
---- vtk6-6.1.0+dfsg2.orig/Rendering/OpenGL/vtkOpenGL.h
-+++ vtk6-6.1.0+dfsg2/Rendering/OpenGL/vtkOpenGL.h
-@@ -20,6 +20,7 @@
- 
- // To prevent gl.h to include glext.h provided by the system
- #define GL_GLEXT_LEGACY
-+#define GLX_GLEXT_LEGACY
- #if defined(__APPLE__) && (defined(VTK_USE_CARBON) || defined(VTK_USE_COCOA))
- # include <OpenGL/gl.h> // Include OpenGL API.
- #else
-Index: vtk6-6.1.0+dfsg2/Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx
-===================================================================
---- vtk6-6.1.0+dfsg2.orig/Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx
-+++ vtk6-6.1.0+dfsg2/Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx
-@@ -27,7 +27,7 @@
- 
- // define GLX_GLXEXT_LEGACY to prevent glx.h to include glxext.h provided by
- // the system
--//#define GLX_GLXEXT_LEGACY
-+#define GLX_GLXEXT_LEGACY
- #include "GL/glx.h"
- 
- #include "vtkgl.h"
diff --git a/gnu/packages/pciutils.scm b/gnu/packages/pciutils.scm
index 553e3f8cac..8422a5c574 100644
--- a/gnu/packages/pciutils.scm
+++ b/gnu/packages/pciutils.scm
@@ -30,7 +30,7 @@
 (define-public pciutils
   (package
     (name "pciutils")
-    (version "3.5.1")
+    (version "3.5.2")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -38,7 +38,7 @@
                     version ".tar.xz"))
               (sha256
                (base32
-                "0byl2f897w5lhs4bvr6p7qwcz9bllj2zyfv7nywbcbsnb9ha9wrb"))))
+                "1z2y4f3cyvm7a0dyan0n6jpb3p9pvh35lrim0058slj0kwd1969s"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 39f4d021de..3f329c5426 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -479,7 +479,7 @@ extracting content or merging files.")
 (define-public mupdf
   (package
     (name "mupdf")
-    (version "1.9a")
+    (version "1.10a")
     (source
       (origin
         (method url-fetch)
@@ -487,18 +487,8 @@ extracting content or merging files.")
                             name "-" version "-source.tar.gz"))
         (sha256
          (base32
-          "1k64pdapyj8a336jw3j61fhn0rp4q6az7d0dqp9r5n3d9rgwa5c0"))
-        (patches (search-patches "mupdf-build-with-openjpeg-2.1.patch"
-                                 "mupdf-CVE-2016-6265.patch"
-                                 "mupdf-CVE-2016-6525.patch"
-                                 "mupdf-CVE-2016-7504.patch"
-                                 "mupdf-CVE-2016-7505.patch"
-                                 "mupdf-CVE-2016-7506.patch"
-                                 "mupdf-CVE-2016-7563.patch"
-                                 "mupdf-CVE-2016-7564.patch"
-                                 "mupdf-CVE-2016-8674.patch"
-                                 "mupdf-CVE-2016-9017.patch"
-                                 "mupdf-CVE-2016-9136.patch"))
+          "0dm8wcs8i29aibzkqkrn8kcnk4q0kd1v66pg48h5c3qqp4v1zk5a"))
+        (patches (search-patches "mupdf-build-with-openjpeg-2.1.patch"))
         (modules '((guix build utils)))
         (snippet
             ;; Delete all the bundled libraries except for mujs, which is
@@ -638,11 +628,6 @@ using a stylus.")
                (base32
                 "0rz2pg04wnzjjm2f5a8ik9v8s54mv4xrjhv5liqjijqv6awh12gl"))))
     (build-system python-build-system)
-    (arguments
-     ;; Prevent creation of the egg. Without this flag, various artifacts
-     ;; from the build inputs end up in the final python3 output. It also
-     ;; works around https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
-     `(#:configure-flags '("--single-version-externally-managed" "--root=/")))
     (propagated-inputs
      `(("python-pillow" ,python-pillow)))
     (home-page "http://www.reportlab.com")
@@ -650,14 +635,10 @@ using a stylus.")
     (description "This is the ReportLab PDF Toolkit.  It allows rapid creation
 of rich PDF documents, and also creation of charts in a variety of bitmap and
 vector formats.")
-    (license license:bsd-3)
-    (properties `((python2-variant . ,(delay python2-reportlab))))))
+    (license license:bsd-3)))
 
 (define-public python2-reportlab
-  (package
-    (inherit (package-with-python2
-              (strip-python2-variant python-reportlab)))
-    (native-inputs `(("python2-pip" ,python2-pip)))))
+  (package-with-python2 python-reportlab))
 
 (define-public impressive
   (package
@@ -873,8 +854,6 @@ python-pypdf2 instead.")
     (inputs
      ;; pdfposter 0.6.0 still uses the old pyPdf
      `(("python2-pypdf" ,python2-pypdf)))
-    (native-inputs
-     `(("python2-setuptools" ,python2-setuptools)))
     (home-page "https://pythonhosted.org/pdftools.pdfposter/")
     (synopsis "Scale and tile PDF images/pages to print on multiple pages")
     (description "@command{pdfposter} can be used to create a large poster by
diff --git a/gnu/packages/perl-web.scm b/gnu/packages/perl-web.scm
new file mode 100644
index 0000000000..9c92a95dad
--- /dev/null
+++ b/gnu/packages/perl-web.scm
@@ -0,0 +1,47 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
+;;;
+;;; 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 perl-web)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system perl))
+
+(define-public perl-mojolicious
+  (package
+    (name "perl-mojolicious")
+    (version "7.10")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/S/SR/SRI/Mojolicious-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "0811f3wajgf71y02dr2khqnaswjh582pcvhv93k101qpg61syihn"))))
+    (build-system perl-build-system)
+    (home-page "http://mojolicious.org/")
+    (synopsis "Real-time web framework")
+    (description "Back in the early days of the web, many people learned Perl
+because of a wonderful Perl library called @code{CGI}.  It was simple enough
+to get started without knowing much about the language and powerful enough to
+keep you going, learning by doing was much fun.  While most of the techniques
+used are outdated now, the idea behind it is not.  Mojolicious is a new
+endeavor to implement this idea using modern technologies.")
+    (license license:artistic2.0)))
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index e9f3dca15a..8f103ec6d7 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -34,7 +34,8 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
-  #:use-module (guix build-system perl))
+  #:use-module (guix build-system perl)
+  #:use-module (gnu packages perl-web))
 
 ;;;
 ;;; Please: Try to add new module packages in alphabetic order.
@@ -266,6 +267,33 @@ manipulate, read, and write Zip archive files.")
 list manipulation routines.")
     (license (package-license perl))))
 
+(define-public perl-autovivification
+  (package
+    (name "perl-autovivification")
+    (version "0.16")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/V/VP/VPIT/"
+                           "autovivification-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1422kw9fknv7rbjkgdfflg1q3mb69d3yryszp38dn0bgzkqhwkc1"))))
+    (build-system perl-build-system)
+    (home-page "http://search.cpan.org/dist/autovivification")
+    (synopsis "Lexically disable autovivification")
+    (description "When an undefined variable is dereferenced, it gets silently
+upgraded to an array or hash reference (depending of the type of the
+dereferencing).  This behaviour is called autovivification and usually does
+what you mean but it may be unnatural or surprising because your variables get
+populated behind your back.  This is especially true when several levels of
+dereferencing are involved, in which case all levels are vivified up to the
+last, or when it happens in intuitively read-only constructs like
+@code{exists}.  The pragma provided by this package lets you disable
+autovivification for some constructs and optionally throws a warning or an
+error when it would have happened.")
+    (license (package-license perl))))
+
 (define-public perl-base
   (package
     (name "perl-base")
@@ -380,6 +408,88 @@ library can nevertheless be used stand-alone, without Perl.")
 special objects: true and false.")
     (license (package-license perl))))
 
+(define-public perl-business-isbn-data
+  (package
+    (name "perl-business-isbn-data")
+    (version "20140910.003")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/B/BD/BDFOY/"
+                           "Business-ISBN-Data-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1jc5jrjwkr6pqga7998zkgw0yrxgb5n1y7lzgddawxibkf608mn7"))))
+    (build-system perl-build-system)
+    (home-page "http://search.cpan.org/dist/Business-ISBN-Data")
+    (synopsis "Data files for Business::ISBN")
+    (description "This package provides a data pack for @code{Business::ISBN}.
+These data are generated from the RangeMessage.xml file provided by the ISBN
+Agency.")
+    (license (package-license perl))))
+
+(define-public perl-business-isbn
+  (package
+    (name "perl-business-isbn")
+    (version "3.003")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/B/BD/BDFOY/"
+                           "Business-ISBN-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1i2bxzqkki257rqbswa4ryj1grmwa5s47wrxln2ff5mha1ry31gm"))))
+    (build-system perl-build-system)
+    (propagated-inputs
+     `(("perl-business-isbn-data" ,perl-business-isbn-data)
+       ("perl-mojolicious" ,perl-mojolicious)))
+    (home-page "http://search.cpan.org/dist/Business-ISBN")
+    (synopsis "Work with International Standard Book Numbers")
+    (description "This modules provides tools to deal with International
+Standard Book Numbers, including ISBN-10 and ISBN-13.")
+    (license artistic2.0)))
+
+(define-public perl-business-issn
+  (package
+    (name "perl-business-issn")
+    (version "0.91")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/B/BD/BDFOY/"
+                           "Business-ISSN-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1dfnm7h7lbqj356700ldlmgbr51v6hyjn1qig2bb4ysl1wn1jnzi"))))
+    (build-system perl-build-system)
+    (home-page "http://search.cpan.org/dist/Business-ISSN")
+    (synopsis "Work with International Standard Serial Numbers")
+    (description "This modules provides tools to deal with International
+Standard Serial Numbers.")
+    (license (package-license perl))))
+
+(define-public perl-business-ismn
+  (package
+    (name "perl-business-ismn")
+    (version "1.13")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/B/BD/BDFOY/"
+                           "Business-ISMN-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0cm1v75axg4gp6cnbyavmnqqjscsxh7nc60vcbw34rqivvf9idc9"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("perl-tie-cycle" ,perl-tie-cycle)))
+    (home-page "http://search.cpan.org/dist/Business-ISMN")
+    (synopsis "Work with International Standard Music Numbers")
+    (description "This modules provides tools to deal with International
+Standard Music Numbers.")
+    (license (package-license perl))))
+
 (define-public perl-cache-cache
   (package
     (name "perl-cache-cache")
@@ -516,6 +626,25 @@ cases where the clan modules are not classes derived from each other, and thus
 the Carp.pm module doesn't help.")
     (license (package-license perl))))
 
+(define-public perl-cddb-get
+  (package
+    (name "perl-cddb-get")
+    (version "2.28")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://cpan/authors/id/F/FO/FONKIE/CDDB_get-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "1jfrwvfasylcafbvb0jjm94ad4v6k99a7rf5i4qwzhg4m0gvmk5x"))))
+    (build-system perl-build-system)
+    (home-page "http://search.cpan.org/dist/CDDB_get")
+    (synopsis "Read the CDDB entry for an audio CD in your drive")
+    (description "This module can retrieve information from the CDDB.")
+    ;; Either GPLv2 or the "Artistic" license.
+    (license (list gpl2 artistic2.0))))
+
 (define-public perl-class-accessor
   (package
     (name "perl-class-accessor")
@@ -836,7 +965,7 @@ write accessor methods for your objects that perform standard tasks.")
 (define-public perl-class-method-modifiers
   (package
     (name "perl-class-method-modifiers")
-    (version "2.11")
+    (version "2.12")
     (source
      (origin
        (method url-fetch)
@@ -844,7 +973,7 @@ write accessor methods for your objects that perform standard tasks.")
                            "Class-Method-Modifiers-" version ".tar.gz"))
        (sha256
         (base32
-         "14nk2gin9cjwpysakli7f0gs4q1w220sn73xzv35rhlspngrggyy"))))
+         "1j3swa212wh14dq5r6zjarm2lzpx6mrdfplpjy65px8b09ri0k74"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-test-fatal" ,perl-test-fatal)
@@ -1193,13 +1322,54 @@ Password Generator\".")
                                              ,(package-version perl)
                                              "/czplib/"))
             #t)))))
-    (home-page "http://sourceforge.net/projects/czplib/")
+    (home-page "https://sourceforge.net/projects/czplib/")
     (synopsis "Library for genomic analysis")
     (description "Chaolin Zhang's Perl Library (czplib) contains assorted
 functions and data structures for processing and analysing genomic and
 bioinformatics data.")
     (license gpl3+)))
 
+(define-public perl-data-compare
+  (package
+    (name "perl-data-compare")
+    (version "1.25")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/D/DC/DCANTRELL/"
+                           "Data-Compare-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0wzasidg9yjcfsi2gdiaw6726ikqda7n24n0v2ngpaazakdkcjqx"))))
+    (build-system perl-build-system)
+    (propagated-inputs
+     `(("perl-file-find-rule" ,perl-file-find-rule)))
+    (home-page "http://search.cpan.org/dist/Data-Compare")
+    (synopsis "Compare Perl data structures")
+    (description "This module compares arbitrary data structures to see if
+they are copies of each other.")
+    (license (package-license perl))))
+
+(define-public perl-data-uniqid
+  (package
+    (name "perl-data-uniqid")
+    (version "0.12")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/M/MW/MWX/Data-Uniqid-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "1jsc6acmv97pzsvx1fqywz4qvxxpp7kwmb78ygyqpsczkfj9p4dn"))))
+    (build-system perl-build-system)
+    (home-page "http://search.cpan.org/dist/Data-Uniqid")
+    (synopsis "Perl extension for generating unique identifiers")
+    (description "@code{Data::Uniqid} provides three simple routines for
+generating unique ids.  These ids are coded with a Base62 systen to make them
+short and handy (e.g. to use it as part of a URL).")
+    (license (package-license perl))))
+
 (define-public perl-data-dump
   (package
     (name "perl-data-dump")
@@ -1468,6 +1638,28 @@ operations, such as comparing two times, determining a date a given amount of
 time from another, or parsing international times.")
     (license (package-license perl))))
 
+(define-public perl-date-simple
+  (package
+    (name "perl-date-simple")
+    (version "3.03")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/I/IZ/IZUT/"
+                           "Date-Simple-" version ".tar.gz"))
+       (sha256
+        (base32
+         "016x17r9wi6ffdc4idwirzd1sxqcb4lmq5fn2aiq25nf2iir5899"))))
+    (build-system perl-build-system)
+    (home-page "http://search.cpan.org/dist/Date-Simple")
+    (synopsis "Simple date handling")
+    (description "Dates are complex enough without times and timezones.  This
+module may be used to create simple date objects.  It handles validation,
+interval arithmetic, and day-of-week calculation.  It does not deal with
+hours, minutes, seconds, and time zones.")
+    ;; Can be used with either license.
+    (license (list (package-license perl) gpl2+))))
+
 (define-public perl-datetime
   (package
     (name "perl-datetime")
@@ -1497,6 +1689,30 @@ combinations.  It represents the Gregorian calendar, extended backwards in
 time before its creation (in 1582).")
     (license artistic2.0)))
 
+(define-public perl-datetime-calendar-julian
+  (package
+    (name "perl-datetime-calendar-julian")
+    (version "0.04")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/P/PI/PIJLL/"
+                           "DateTime-Calendar-Julian-" version ".tar.gz"))
+       (sha256
+        (base32
+         "03h0llkwsiw2d2ci1ah5x9sp8xrvnbgd471i5hnpgl5w32nnhndv"))))
+    (build-system perl-build-system)
+    ;; Only needed for tests
+    (native-inputs
+     `(("perl-datetime" ,perl-datetime)))
+    (home-page "http://search.cpan.org/dist/DateTime-Calendar-Julian")
+    (synopsis "Dates in the Julian calendar")
+    (description "This package is a companion module to @code{DateTime.pm}.
+It implements the Julian calendar.  It supports everything that
+@code{DateTime.pm} supports and more: about one day per century more, to be
+precise.")
+    (license (package-license perl))))
+
 (define-public perl-datetime-set
   (package
     (name "perl-datetime-set")
@@ -2125,6 +2341,86 @@ SHA-1 message digest algorithm for use by Perl programs.")
 modules separately and deal with them after the module is done installing.")
     (license (package-license perl))))
 
+(define-public perl-encode-detect
+  (package
+    (name "perl-encode-detect")
+    (version "1.01")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/J/JG/JGMYERS/"
+                           "Encode-Detect-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1wdv9ffgs4xyfh5dnh09dqkmmlbf5m1hxgdgb3qy6v6vlwx8jkc3"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("perl-module-build" ,perl-module-build)))
+    (home-page "http://search.cpan.org/dist/Encode-Detect")
+    (synopsis "Detect the encoding of data")
+    (description "This package provides a class @code{Encode::Detect} to detect
+the encoding of data.")
+    (license mpl1.1)))
+
+(define-public perl-encode-eucjpascii
+  (package
+    (name "perl-encode-eucjpascii")
+    (version "0.03")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/N/NE/NEZUMI/"
+                           "Encode-EUCJPASCII-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0qg8kmi7r9jcf8326b4fyq5sdpqyim2a11h7j77q577xam6x767r"))))
+    (build-system perl-build-system)
+    (home-page "http://search.cpan.org/dist/Encode-EUCJPASCII")
+    (synopsis "ASCII mapping for eucJP encoding")
+    (description "This package provides an ASCII mapping for the eucJP
+encoding.")
+    (license (package-license perl))))
+
+(define-public perl-encode-jis2k
+  (package
+    (name "perl-encode-jis2k")
+    (version "0.03")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/D/DA/DANKOGAI/"
+                           "Encode-JIS2K-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1k1mdj4rd9m1z4h7qd2dl92ky0r1rk7mmagwsvdb9pirvdr4vj0y"))))
+    (build-system perl-build-system)
+    (home-page "http://search.cpan.org/dist/Encode-JIS2K")
+    (synopsis "JIS X 0212 (aka JIS 2000) encodings")
+    (description "This package provides encodings for JIS X 0212, which is
+also known as JIS 2000.")
+    (license (package-license perl))))
+
+(define-public perl-encode-hanextra
+  (package
+    (name "perl-encode-hanextra")
+    (version "0.23")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/A/AU/AUDREYT/"
+                           "Encode-HanExtra-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0fj4vd8iva2i0j6s2fyhwgr9afrvhr6gjlzi7805h257mmnb1m0z"))))
+    (build-system perl-build-system)
+    (home-page "http://search.cpan.org/dist/Encode-HanExtra")
+    (synopsis "Additional Chinese encodings")
+    (description "This Perl module provides Chinese encodings that are not
+part of Perl by default, including \"BIG5-1984\", \"BIG5-2003\", \"BIG5PLUS\",
+\"BIG5EXT\", \"CCCII\", \"EUC-TW\", \"CNS11643-*\", \"GB18030\", and
+\"UNISYS\".")
+    (license expat)))
+
 (define-public perl-env-path
   (package
     (name "perl-env-path")
@@ -2325,6 +2621,29 @@ it ties together a family of modern toolchain modules.")
 module building modules.")
     (license (package-license perl))))
 
+(define-public perl-extutils-libbuilder
+  (package
+    (name "perl-extutils-libbuilder")
+    (version "0.08")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/A/AM/AMBS/"
+                           "ExtUtils-LibBuilder-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1lmmfcjxvsvhn4f3v2lyylgr8dzcf5j7mnd1pkq3jc75dph724f5"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("perl-module-build" ,perl-module-build)))
+    (home-page "http://search.cpan.org/dist/ExtUtils-LibBuilder")
+    (synopsis "Tool to build C libraries")
+    (description "Some Perl modules need to ship C libraries together with
+their Perl code.  Although there are mechanisms to compile and link (or glue)
+C code in your Perl programs, there isn't a clear method to compile standard,
+self-contained C libraries.  This module main goal is to help in that task.")
+    (license (package-license perl))))
+
 (define-public perl-file-changenotify
   (package
     (name "perl-file-changenotify")
@@ -3023,6 +3342,26 @@ filehandles; in particular, IO::Scalar, IO::ScalarArray, and IO::Lines.")
 pseudo ttys.")
     (license (package-license perl))))
 
+(define-public perl-ipc-cmd
+  (package
+    (name "perl-ipc-cmd")
+    (version "0.96")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/B/BI/BINGOS/IPC-Cmd-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "0a2v44x70gj9fd5wa8i08f9z6n14qppj1j49m1hc333wh72mzk6i"))))
+    (build-system perl-build-system)
+    (home-page "http://search.cpan.org/dist/IPC-Cmd")
+    (synopsis "Run interactive command-line programs")
+    (description "@code{IPC::Cmd} allows for the searching and execution of
+any binary on your system.  It adheres to verbosity settings and is able to
+run interactively.  It also has an option to capture output/error buffers.")
+    (license (package-license perl))))
+
 (define-public perl-ipc-run
   (package
     (name "perl-ipc-run")
@@ -3345,6 +3684,26 @@ version.")
 one: logging, exceptions, and translations.")
     (license (package-license perl))))
 
+(define-public perl-lingua-translit
+  (package
+    (name "perl-lingua-translit")
+    (version "0.26")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/A/AL/ALINKE/"
+                           "Lingua-Translit-" version ".tar.gz"))
+       (sha256
+        (base32
+         "161589h08kzliga17i2g0hb0yn4cjmb8rdiyadq5bw97974bac14"))))
+    (build-system perl-build-system)
+    (home-page "http://search.cpan.org/dist/Lingua-Translit")
+    (synopsis "Transliterate text between writing systems")
+    (description "@code{Lingua::Translit} can be used to convert text from one
+writing system to another, based on national or international transliteration
+tables.  Where possible a reverse transliteration is supported.")
+    (license (package-license perl))))
+
 (define-public perl-list-allutils
   (package
     (name "perl-list-allutils")
@@ -4372,6 +4731,26 @@ own set of Moose-like types.  These custom types can then be used to describe
 fields in Moo-based classes.")
     (license (package-license perl))))
 
+(define-public perl-mozilla-ca
+  (package
+    (name "perl-mozilla-ca")
+    (version "20160104")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/A/AB/ABH/Mozilla-CA-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "0aizn08lrdrgjz9vagkjmw2c7sxn46fzz521v9dbcqii4jd0d9r7"))))
+    (build-system perl-build-system)
+    (home-page "http://search.cpan.org/dist/Mozilla-CA")
+    (synopsis "Mozilla's CA cert bundle in PEM format")
+    (description "@code{Mozilla::CA} provides a copy of Mozilla's bundle of
+Certificate Authority certificates in a form that can be consumed by modules
+and libraries based on OpenSSL.")
+    (license mpl2.0)))
+
 (define-public perl-mro-compat
   (package
     (name "perl-mro-compat")
@@ -4396,7 +4775,7 @@ Perl (back to 5.6.0).")
 (define-public perl-namespace-autoclean
   (package
     (name "perl-namespace-autoclean")
-    (version "0.24")
+    (version "0.28")
     (source
      (origin
        (method url-fetch)
@@ -4404,7 +4783,7 @@ Perl (back to 5.6.0).")
                            "namespace-autoclean-" version ".tar.gz"))
        (sha256
         (base32
-         "0msggbg2zbixxjq1fda19h0yygavxndfzc4j4pq11nfghmawjsb0"))))
+         "0fbcq99yaix1aa99jl3v811dbw24il9jxnh5i2i23mddh4b0lhfd"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-module-build" ,perl-module-build)
@@ -5045,6 +5424,25 @@ designed to be slow or big, neither has it been designed to be fast or
 compact.")
     (license (package-license perl))))
 
+(define-public perl-sort-key
+  (package
+    (name "perl-sort-key")
+    (version "1.33")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/S/SA/SALVA/Sort-Key-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "1kqs10s2plj6c96srk0j8d7xj8dxk1704r7mck8rqk09mg7lqspd"))))
+    (build-system perl-build-system)
+    (home-page "http://search.cpan.org/dist/Sort-Key")
+    (synopsis "Sort arrays by one or multiple calculated keys")
+    (description "This Perl module provides various functions to quickly sort
+arrays by one or multiple calculated keys.")
+    (license (package-license perl))))
+
 (define-public perl-spiffy
   (package
     (name "perl-spiffy")
@@ -6389,6 +6787,29 @@ decomposition of comma-separated values.  An instance of the Text::CSV class
 can combine fields into a CSV string and parse a CSV string into fields.")
     (license (package-license perl))))
 
+(define-public perl-text-csv-xs
+  (package
+    (name "perl-text-csv-xs")
+    (version "1.25")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/H/HM/HMBRAND/"
+                           "Text-CSV_XS-" version ".tgz"))
+       (sha256
+        (base32
+         "06zlfbqrwbl0g2g3bhk6046yy5pf2rz80fzcp8aj47rnswz2yx5k"))))
+    (build-system perl-build-system)
+    (home-page "http://search.cpan.org/dist/Text-CSV_XS")
+    (synopsis "Rountines for manipulating CSV files")
+    (description "@code{Text::CSV_XS} provides facilities for the composition
+and decomposition of comma-separated values.  An instance of the
+@code{Text::CSV_XS} class will combine fields into a CSV string and parse a
+CSV string into fields.  The module accepts either strings or files as input
+and support the use of user-specified characters for delimiters, separators,
+and escapes.")
+    (license (package-license perl))))
+
 (define-public perl-text-diff
   (package
     (name "perl-text-diff")
@@ -6459,6 +6880,27 @@ template engine, for when you need speed rather than complex features,
 yet need more features than simple variable substitution.")
     (license (package-license perl))))
 
+(define-public perl-text-roman
+  (package
+    (name "perl-text-roman")
+    (version "3.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/S/SY/SYP/Text-Roman-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "0sh47svzz0wm993ywfgpn0fvhajl2sj5hcnf5zxjz02in6ihhjnb"))))
+    (build-system perl-build-system)
+    (home-page "http://search.cpan.org/dist/Text-Roman")
+    (synopsis "Convert between Roman and Arabic algorisms")
+    (description "This package provides functions to convert between Roman and
+Arabic algorisms.  It supports both conventional Roman algorisms (which range
+from 1 to 3999) and Milhar Romans, a variation which uses a bar across the
+algorism to indicate multiplication by 1000.")
+    (license (package-license perl))))
+
 (define-public perl-text-simpletable
   (package
     (name "perl-text-simpletable")
@@ -6567,6 +7009,25 @@ controlled with command line parameters.  The default parameter settings
 approximately follow the suggestions in the Perl Style Guide.")
     (license gpl2+)))
 
+(define-public perl-tie-cycle
+  (package
+    (name "perl-tie-cycle")
+    (version "1.221")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/B/BD/BDFOY/Tie-Cycle-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "10g6kirf6jfaldckg98y4pl87vrm7grqlg6ymb7a9vhrznyn7qn6"))))
+    (build-system perl-build-system)
+    (home-page "http://search.cpan.org/dist/Tie-Cycle")
+    (synopsis "Cycle through a list of values")
+    (description "You use @code{Tie::Cycle} to go through a list over and over
+again.  Once you get to the end of the list, you go back to the beginning.")
+    (license (package-license perl))))
+
 (define-public perl-tie-ixhash
   (package
   (name "perl-tie-ixhash")
@@ -6810,17 +7271,58 @@ else.")
 common serialisation formats such as JSON or CBOR.")
     (license (package-license perl))))
 
+(define-public perl-unicode-normalize
+  (package
+    (name "perl-unicode-normalize")
+    (version "1.25")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/K/KH/KHW/"
+                           "Unicode-Normalize-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0v04bcyjfcfap4kfpc8q3ikq3j7s68nym4ckw3iasmmksdskmcq0"))))
+    (build-system perl-build-system)
+    (home-page "http://search.cpan.org/dist/Unicode-Normalize")
+    (synopsis "Unicode normalization forms")
+    (description "This Perl module provides Unicode normalization forms.")
+    (license (package-license perl))))
+
+(define-public perl-unicode-collate
+  (package
+    (name "perl-unicode-collate")
+    (version "1.18")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/S/SA/SADAHIRO/"
+                           "Unicode-Collate-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1lq4p3mqqljhhy8wyiyahris33j4m5qfzpi6iacmcqjzw5g4afbm"))))
+    (build-system perl-build-system)
+    (propagated-inputs
+     `(("perl-unicode-normalize" ,perl-unicode-normalize)))
+    (home-page "http://search.cpan.org/dist/Unicode-Collate")
+    (synopsis "Unicode collation algorithm")
+    (description "This package provides tools for sorting and comparing
+Unicode data.")
+    ;; The file Unicode/Collate/allkeys.txt is released under the Expat
+    ;; license.
+    (license (list (package-license perl) expat))))
+
 (define-public perl-unicode-linebreak
   (package
     (name "perl-unicode-linebreak")
-    (version "2015.12")
+    (version "2016.003")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://cpan/authors/id/N/NE/NEZUMI/"
                                   "Unicode-LineBreak-" version ".tar.gz"))
               (sha256
                (base32
-                "1d0nnc97irfpab4d3b2lvq22hac118k7zbfrj0lnxkbfwx7122cm"))))
+                "096wf5x99swx7l7yd8pm2aw50g596nf50rkq7250zjcc1acjskp6"))))
     (build-system perl-build-system)
     (propagated-inputs
      `(("perl-mime-charset" ,perl-mime-charset)))
@@ -7268,27 +7770,3 @@ interface to File::Find::Object.")
   (description "Test::TrailingSpace tests for trailing spaces
 in Perl source files.")
   (license x11)))
-
-(define-public perl-encode-detect
- (package
-  (name "perl-encode-detect")
-  (version "1.01")
-  (source
-    (origin
-      (method url-fetch)
-      (uri (string-append
-             "mirror://cpan/authors/id/J/JG/JGMYERS/Encode-Detect-"
-             version
-             ".tar.gz"))
-      (sha256
-        (base32
-          "1wdv9ffgs4xyfh5dnh09dqkmmlbf5m1hxgdgb3qy6v6vlwx8jkc3"))))
-  (build-system perl-build-system)
-  (inputs
-    `(("perl-module-build" ,perl-module-build)))
-  (home-page
-    "http://search.cpan.org/dist/Encode-Detect")
-  (synopsis
-    "Perl Encode::Encoding subclass that detects the encoding of data")
-  (description "Encode::Detect detects the encoding of data for Perl.")
-  (license mpl1.1)))
diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm
index f4d110edbc..8e823cfc21 100644
--- a/gnu/packages/photo.scm
+++ b/gnu/packages/photo.scm
@@ -89,20 +89,21 @@ data as produced by digital cameras.")
 (define-public libgphoto2
   (package
     (name "libgphoto2")
-    (version "2.5.2")
+    (version "2.5.11")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/gphoto/libgphoto/"
                                   version "/libgphoto2-" version ".tar.bz2"))
               (sha256
                (base32
-                "0f1818l1vs5fbmrihzyv3qasddbqi3r01jik5crrxddwalsi2bd3"))))
+                "1ap070zz6l4kn2mbyxb1yj4x5ar8hpdbmf2pvjxgnly1ss319dkz"))))
     (build-system gnu-build-system)
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs
-     `(;; ("libjpeg-turbo" ,libjpeg-turbo)
+     `(("libjpeg-turbo" ,libjpeg-turbo)
        ("libltdl" ,libltdl)
-       ("libusb" ,libusb)))
+       ("libusb" ,libusb)
+       ("libxml2" ,libxml2)))
     (propagated-inputs
      `(;; The .pc refers to libexif.
        ("libexif" ,libexif)))
@@ -119,20 +120,20 @@ from digital cameras.")
 (define-public gphoto2
   (package
     (name "gphoto2")
-    (version "2.5.2")
+    (version "2.5.11")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/gphoto/gphoto/" version
                                   "/gphoto2-" version ".tar.bz2"))
               (sha256
                (base32
-                "16c8k1cxfypg7v5h8xi87grclw7a5ayaamn548ys3zkj727r5fcf"))))
+                "1sgr6rsvzzagcwhc8fxbnvz3k02wr2hab0vrbvcb04k5l3b48a1r"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
      `(("readline" ,readline)
-       ;; ("libjpeg-turbo" ,libjpeg-turbo)
+       ("libjpeg-turbo" ,libjpeg-turbo)
        ("popt" ,popt)
        ("libexif" ,libexif)
        ("libgphoto2" ,libgphoto2)))
diff --git a/gnu/packages/php.scm b/gnu/packages/php.scm
index 245892f6e8..16b098517a 100644
--- a/gnu/packages/php.scm
+++ b/gnu/packages/php.scm
@@ -64,7 +64,7 @@
 (define-public php
   (package
     (name "php")
-    (version "7.0.13")
+    (version "7.0.14")
     (home-page "https://secure.php.net/")
     (source (origin
               (method url-fetch)
@@ -72,7 +72,7 @@
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1gzihbpcp51jc587gs1ryn59hsnr7vf5427dmcvdimvm77wsfyrm"))
+                "12ccgbrfchgvmcfb88rcknq7xmrf19c5ysdr4v8jxk51j9izy78g"))
               (modules '((guix build utils)))
               (snippet
                '(with-directory-excursion "ext"
diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm
index 8ba9780685..8819b8adaf 100644
--- a/gnu/packages/pretty-print.scm
+++ b/gnu/packages/pretty-print.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -31,7 +32,9 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages gperf)
-  #:use-module (gnu packages perl))
+  #:use-module (gnu packages lua)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config))
 
 (define-public a2ps
   (package
@@ -197,6 +200,47 @@ seen in a terminal.")
     (license gpl3+)
     (properties '((ftp-directory . "/gnu/src-highlite")))))
 
+(define-public highlight
+  (package
+    (name "highlight")
+    (version "3.33")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://www.andre-simon.de/zip/highlight-"
+                           version ".tar.bz2"))
+       (sha256
+        (base32
+         "0g2whi6pxl640795vymikm82a1my841jmh7fiqzbrjpc9wsk1db4"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; no tests
+       #:make-flags
+       (let ((confdir (string-append %output "/share/highlight/config/")))
+         (list (string-append "PREFIX=" %output)
+               (string-append "HL_CONFIG_DIR=" confdir)
+               (string-append "conf_dir=" confdir)))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-after 'unpack 'fix-search-for-lua
+           (lambda _
+             (substitute* "src/makefile"
+               (("(pkg-config.*)lua" _ prefix)
+                (string-append prefix "lua-5.3")))
+             #t)))))
+    (inputs
+     `(("lua" ,lua)
+       ("boost" ,boost)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "http://www.andre-simon.de/doku/highlight/en/highlight.php")
+    (synopsis "Convert code to documents with syntax highlighting")
+    (description "Highlight converts source code to HTML, XHTML, RTF, LaTeX,
+TeX, SVG, BBCode and terminal escape sequences with colored syntax
+highlighting.  Language definitions and color themes are customizable.")
+    (license gpl3+)))
+
 (define-public astyle
   (package
     (name "astyle")
diff --git a/gnu/packages/protobuf.scm b/gnu/packages/protobuf.scm
index 586e532746..12f6f70521 100644
--- a/gnu/packages/protobuf.scm
+++ b/gnu/packages/protobuf.scm
@@ -63,17 +63,14 @@ internal RPC protocols and file formats.")
         (base32
          "1xbgbfg4g43bihkyw1a2giqa2gxmqc5wkh0fzqcb90qi1z1hpi7c"))))
     (build-system python-build-system)
-    (inputs
+    (propagated-inputs
      `(("python-six" ,python-six)))
     (home-page "https://github.com/google/protobuf")
     (synopsis "Protocol buffers is a data interchange format")
     (description
      "Protocol buffers are a language-neutral, platform-neutral extensible
 mechanism for serializing structured data.")
-    (license bsd-3)
-    (properties `((python2-variant . ,(delay python2-protobuf))))))
+    (license bsd-3)))
 
 (define-public python2-protobuf
-  (package (inherit (package-with-python2
-                     (strip-python2-variant python-protobuf)))
-           (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
+  (package-with-python2 python-protobuf))
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 497da52264..d8ca83d810 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -11,7 +11,7 @@
 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
-;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
@@ -32,6 +32,8 @@
 ;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -123,6 +125,7 @@
         "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
       (patches (search-patches "python-2.7-search-paths.patch"
                                "python-2-deterministic-build-info.patch"
+                               "python-2.7-site-prefixes.patch"
                                "python-2.7-source-date-epoch.patch"))
       (modules '((guix build utils)))
       ;; suboptimal to delete failing tests here, but if we delete them in the
@@ -163,6 +166,7 @@
        #:configure-flags
        (list "--enable-shared"                    ;allow embedding
              "--with-system-ffi"                  ;build ctypes
+             "--with-ensurepip=install"           ;install pip and setuptools
              (string-append "LDFLAGS=-Wl,-rpath="
                             (assoc-ref %outputs "out") "/lib"))
 
@@ -434,8 +438,6 @@ instead of @command{python3}.")))
         (base32
          "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://www.github.com/giampaolo/psutil")
     (synopsis "Library for retrieving information on running processes")
     (description
@@ -464,9 +466,8 @@ pidof, tty, taskset, pmap.")
          "1vdbqsa1a31s98fxkinl052q8nnpvbxnb83qanxfpi2p6c2zdr0b"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-nose" ,python-nose)
-       ("python-setuptools" ,python-setuptools)))
-    (inputs
+     `(("python-nose" ,python-nose)))
+    (propagated-inputs
      `(("python-py-bcrypt" ,python-py-bcrypt)))
     (arguments
      `(#:phases
@@ -504,8 +505,6 @@ to providing full-strength password hashing for multi-user application.")
         (base32
          "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://code.google.com/p/py-bcrypt")
     (synopsis
      "Bcrypt password hashing and key derivation")
@@ -539,12 +538,9 @@ John the Ripper).")
         (base32
          "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (propagated-inputs
-     `(("python-pycrypto" ,python-pycrypto)))
-    (inputs
-     `(("python-ecdsa" ,python-ecdsa)))
+     `(("python-pycrypto" ,python-pycrypto)
+       ("python-ecdsa" ,python-ecdsa)))
     (home-page "http://www.paramiko.org/")
     (synopsis "SSHv2 protocol library")
     (description "Paramiko is a python implementation of the SSHv2 protocol,
@@ -569,8 +565,6 @@ Python interface around SSH networking concepts.")
         (base32
          "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/jcgregorio/httplib2")
     (synopsis "Comprehensive HTTP client library")
     (description
@@ -596,8 +590,6 @@ other HTTP libraries.")
         (base32
          "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (inputs
      `(("openssl" ,openssl)))
     (home-page
@@ -627,15 +619,18 @@ making them easy to handle and incorporate into other protocols.")
         (base32
          "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
-    (inputs
+    (propagated-inputs
      `(("python-pyyaml" ,python-pyyaml)
+       ;; Not listed in setup.py, but used in ccmlib/node.py for full
+       ;; functionality
+       ("python-psutil" ,python-psutil)
        ("python-six" ,python-six)))
     (home-page "https://github.com/pcmanus/ccm")
-    (synopsis "Cassandra Cluster Manager")
-    (description "A script/library to create, launch and remove an Apache
-Cassandra cluster on localhost.")
+    (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
+localhost")
+    (description "Cassandra Cluster Manager is a development tool for testing
+local Cassandra clusters. It creates, launches and removes Cassandra clusters
+on localhost.")
     (license license:asl2.0)))
 
 (define-public python2-ccm
@@ -644,14 +639,14 @@ Cassandra cluster on localhost.")
 (define-public python-pytz
   (package
     (name "python-pytz")
-    (version "2016.3")
+    (version "2016.10")
     (source
      (origin
       (method url-fetch)
       (uri (pypi-uri "pytz" version ".tar.bz2"))
       (sha256
        (base32
-        "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
+        "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
     (build-system python-build-system)
     (arguments `(#:tests? #f)) ; no test target
     (home-page "http://pythonhosted.org/pytz")
@@ -668,18 +663,17 @@ using Python 2.4 or higher and provides access to the Olson timezone database.")
 (define-public python-babel
   (package
     (name "python-babel")
-    (version "2.3.2")
+    (version "2.3.4")
     (source
      (origin
       (method url-fetch)
       (uri (pypi-uri "Babel" version))
       (sha256
        (base32
-        "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
+        "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-pytz" ,python-pytz)
-       ("python-setuptools" ,python-setuptools)))
+    (propagated-inputs
+     `(("python-pytz" ,python-pytz)))
     (arguments `(#:tests? #f)) ; no test target
     (home-page "http://babel.pocoo.org/")
     (synopsis
@@ -713,8 +707,6 @@ etc. ")
     (arguments
      `(#:python ,python-2
        #:tests? #f)) ; no test target
-    (inputs
-     `(("python2-setuptools" ,python2-setuptools)))
     (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
     (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
     (description
@@ -724,6 +716,51 @@ certificate returned by the server to which a connection has been established,
 and verifies that it matches the intended target hostname.")
     (license license:psfl)))
 
+(define-public python-hdf4
+  (package
+   (name "python-hdf4")
+   (version "0.9")
+   (source
+    (origin
+      (method url-fetch)
+      (uri (pypi-uri name version))
+      (sha256
+       (base32
+        "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
+   (build-system python-build-system)
+   (native-inputs `(("nose" ,python-nose)))
+   (propagated-inputs `(("numpy" ,python-numpy)))
+   (inputs
+    `(("hdf4" ,hdf4)
+      ("libjpeg" ,libjpeg)
+      ("zlib" ,zlib)))
+   (arguments
+    `(#:phases
+      (modify-phases %standard-phases
+        (replace 'check
+          (lambda _
+            ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
+            ;; on to import numpy. Somehow this works on their CI system.
+            ;; Let's just manage PYTHONPATH here instead.
+            (substitute* "runexamples.sh"
+              (("export PYTHONPATH=.*") ""))
+            (setenv "PYTHONPATH"
+                    (string-append (getcwd) ":"
+                                   (getenv "PYTHONPATH")))
+            (and (zero? (system* "./runexamples.sh"))
+                 (zero? (system* "nosetests" "-v"))))))))
+   (home-page "https://github.com/fhs/python-hdf4")
+   (synopsis "Python interface to the NCSA HDF4 library")
+   (description
+    "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
+which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
+NetCDF files can also be read and modified.  Python-HDF4 is a fork of
+@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
+   (license license:expat)))
+
+(define-public python2-hdf4
+  (package-with-python2 python-hdf4))
+
 (define-public python-h5py
   (package
     (name "python-h5py")
@@ -753,10 +790,10 @@ and verifies that it matches the intended target hostname.")
                  (string-append "['" prefix "/lib" "']")))
               #t))))))
     (propagated-inputs
-     `(("python-numpy" ,python-numpy)))
+     `(("python-six" ,python-six)
+       ("python-numpy" ,python-numpy)))
     (inputs
-     `(("hdf5" ,hdf5)
-       ("python-six" ,python-six)))
+     `(("hdf5" ,hdf5)))
     (native-inputs
      `(("python-cython" ,python-cython)
        ("python-pkgconfig" ,python-pkgconfig)))
@@ -768,11 +805,61 @@ HDF5 library from Python.  The low-level interface is intended to be a
 complete wrapping of the HDF5 API, while the high-level component supports
 access to HDF5 files, datasets and groups using established Python and NumPy
 concepts.")
-    (license license:bsd-3)
-    (properties `((python2-variant . ,(delay python2-h5py))))))
+    (license license:bsd-3)))
 
 (define-public python2-h5py
-  (package-with-python2 (strip-python2-variant python-h5py)))
+  (package-with-python2 python-h5py))
+
+(define-public python-netcdf4
+  (package
+    (name "python-netcdf4")
+    (version "1.2.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "netCDF4" version))
+       (sha256
+        (base32
+         "1qcymsfxsdfr4sx0vl7ih5d14z66k6c9sjy4gb6rjaksk5387zvg"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-cython" ,python-cython)))
+    (propagated-inputs
+     `(("python-numpy" ,python-numpy)))
+    (inputs
+     `(("netcdf" ,netcdf)
+       ("hdf4" ,hdf4)
+       ("hdf5" ,hdf5)))
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (setenv "NO_NET" "1") ; disable opendap tests
+             (with-directory-excursion "test"
+               (setenv "PYTHONPATH" ; find and add the library we just built
+                       (string-append
+                        (car (find-files "../build" "lib.*"
+                                         #:directories? #:t
+                                         #:fail-on-error? #:t))
+                        ":" (getenv "PYTHONPATH")))
+               (zero? (system* "python" "run_all.py"))))))))
+    (home-page
+     "https://github.com/Unidata/netcdf4-python")
+    (synopsis "Python/numpy interface to the netCDF library")
+    (description "Netcdf4-python is a Python interface to the netCDF C
+library.  netCDF version 4 has many features not found in earlier
+versions of the library and is implemented on top of HDF5.  This module
+can read and write files in both the new netCDF 4 and the old netCDF 3
+format, and can create files that are readable by HDF5 clients.  The
+API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
+to users of that module.")
+    ;; The software is mainly ISC, but includes some files covered
+    ;; by the Expat license.
+    (license (list license:isc license:expat))))
+
+(define-public python2-netcdf4
+  (package-with-python2 python-netcdf4))
 
 (define-public python-lockfile
   (package
@@ -795,15 +882,10 @@ concepts.")
     (description
      "The lockfile package exports a LockFile class which provides a simple
 API for locking files.")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-lockfile))))))
+    (license license:expat)))
 
 (define-public python2-lockfile
-  (let ((base (package-with-python2 (strip-python2-variant python-lockfile))))
-    (package
-      (inherit base)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs base))))))
+  (package-with-python2 python-lockfile))
 
 (define-public python-mock
   (package
@@ -812,14 +894,13 @@ API for locking files.")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
-                           "mock-" version ".tar.gz"))
+       (uri (pypi-uri "mock" version))
        (sha256
         (base32
          "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
     (build-system python-build-system)
     (arguments '(#:test-target "check"))
-    (home-page "http://code.google.com/p/mock/")
+    (home-page "https://github.com/testing-cabal/mock")
     (synopsis "Python mocking and patching library for testing")
     (description
      "Mock is a library for testing in Python.  It allows you to replace parts
@@ -834,15 +915,22 @@ have been used.")
 (define-public python-setuptools
   (package
     (name "python-setuptools")
-    (version "18.3.1")
+    (version "31.0.0")
     (source
      (origin
       (method url-fetch)
-      (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
-                          version ".tar.gz"))
+      (uri (pypi-uri "setuptools" version))
       (sha256
        (base32
-        "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
+        "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
+      (modules '((guix build utils)))
+      (snippet
+       '(begin
+          ;; Remove included binaries which are used to build self-extracting
+          ;; installers for Windows.
+          ;; TODO: Find some way to build them ourself so we can include them.
+          (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
+          #t))))
     (build-system python-build-system)
     ;; FIXME: Tests require pytest, which itself relies on setuptools.
     ;; One could bootstrap with an internal untested setuptools.
@@ -860,12 +948,21 @@ test hooks,
 project installation,
 platform-specific details,
 Python 3 support.")
-    (license license:psfl)))
+    ;; TODO: setuptools now bundles the following libraries:
+    ;; packaging, pyparsing, six and appdirs. How to unbundle?
+    (license (list license:psfl        ; setuptools itself
+                   license:expat       ; six, appdirs, pyparsing
+                   license:asl2.0      ; packaging is dual ASL2/BSD-2
+                   license:bsd-2))))
 
 (define-public python2-setuptools
   (package-with-python2 python-setuptools))
 
-
+;;; Pycrypto is abandoned upstream:
+;;;
+;;; https://github.com/dlitz/pycrypto/issues/173
+;;;
+;;; TODO Remove this package from GNU Guix.
 (define-public python-pycrypto
   (package
     (name "python-pycrypto")
@@ -873,14 +970,12 @@ Python 3 support.")
     (source
      (origin
       (method url-fetch)
-      (uri (string-append "https://pypi.python.org/packages/source/p/"
-                          "pycrypto/pycrypto-" version ".tar.gz"))
+      (uri (pypi-uri "pycrypto" version))
+      (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
       (sha256
        (base32
         "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (inputs
      `(("python" ,python)
        ("gmp" ,gmp)))
@@ -923,7 +1018,7 @@ etc.).  The package is structured to make adding new modules easy.")
     (build-system python-build-system)
     (native-inputs
      `(("python-setuptools-scm" ,python-setuptools-scm)))
-    (inputs
+    (propagated-inputs
      `(("python-pycrypto" ,python-pycrypto)))
     (arguments
      `(#:tests? #f))                      ;TODO: tests require pytest
@@ -934,15 +1029,10 @@ etc.).  The package is structured to make adding new modules easy.")
 service from python.  It can be used in any application that needs safe
 password storage.")
     ;; "MIT" and PSF dual license
-    (license license:x11)
-    (properties `((python2-variant . ,(delay python2-keyring))))))
+    (license license:x11)))
 
 (define-public python2-keyring
-  (let ((base (package-with-python2 (strip-python2-variant python-keyring))))
-    (package
-      (inherit base)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs base))))))
+  (package-with-python2 python-keyring))
 
 (define-public python-six
   (package
@@ -956,8 +1046,6 @@ password storage.")
        (base32
         "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://pypi.python.org/pypi/six/")
     (synopsis "Python 2 and 3 compatibility utilities")
     (description
@@ -983,22 +1071,17 @@ Python file, so it can be easily copied into your project.")
        (base32
         "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
     (build-system python-build-system)
-    (inputs
+    (propagated-inputs
      `(("python-six" ,python-six)))
     (home-page "https://dateutil.readthedocs.io/en/stable/")
     (synopsis "Extensions to the standard datetime module")
     (description
      "The dateutil module provides powerful extensions to the standard
 datetime module, available in Python 2.3+.")
-    (license license:bsd-3)
-    (properties `((python2-variant . ,(delay python2-dateutil-2))))))
+    (license license:bsd-3)))
 
 (define-public python2-dateutil-2
-  (let ((base (package-with-python2 (strip-python2-variant python-dateutil-2))))
-    (package
-      (inherit base)
-      (inputs `(("python2-setuptools" ,python2-setuptools)
-                ,@(package-inputs base))))))
+  (package-with-python2 python-dateutil-2))
 
 (define-public python-dateutil
   (package
@@ -1013,8 +1096,6 @@ datetime module, available in Python 2.3+.")
        (base32
         "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://dateutil.readthedocs.io/en/stable/")
     (synopsis "Extensions to the standard datetime module")
     (description
@@ -1045,15 +1126,10 @@ datetime module, available in Python 2.3+.")
      "Parse human-readable date/time text")
     (description
      "Parse human-readable date/time text.")
-    (license license:asl2.0)
-    (properties `((python2-variant . ,(delay python2-parsedatetime))))))
+    (license license:asl2.0)))
 
 (define-public python2-parsedatetime
-  (let ((base (package-with-python2 (strip-python2-variant python-parsedatetime))))
-    (package
-      (inherit base)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs base))))))
+  (package-with-python2 python-parsedatetime))
 
 (define-public python-pandas
   (package
@@ -1070,12 +1146,12 @@ datetime module, available in Python 2.3+.")
         (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
     (build-system python-build-system)
     (propagated-inputs
-     `(("python-numpy" ,python-numpy)))
-    (inputs
-     `(("python-pytz" ,python-pytz)
+     `(("python-numpy" ,python-numpy)
+       ("python-pytz" ,python-pytz)
        ("python-dateutil" ,python-dateutil-2)))
     (native-inputs
-     `(("python-nose" ,python-nose)))
+     `(("python-nose" ,python-nose)
+       ("python-cython" ,python-cython)))
     (home-page "http://pandas.pydata.org")
     (synopsis "Data structures for data analysis, time series, and statistics")
     (description
@@ -1084,15 +1160,10 @@ structures designed to make working with structured (tabular,
 multidimensional, potentially heterogeneous) and time series data both easy
 and intuitive.  It aims to be the fundamental high-level building block for
 doing practical, real world data analysis in Python.")
-    (license license:bsd-3)
-    (properties `((python2-variant . ,(delay python2-pandas))))))
+    (license license:bsd-3)))
 
 (define-public python2-pandas
-  (let ((base (package-with-python2 (strip-python2-variant python-pandas))))
-    (package
-      (inherit base)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs base))))))
+  (package-with-python2 python-pandas))
 
 (define-public python-tzlocal
   (package
@@ -1106,7 +1177,8 @@ doing practical, real world data analysis in Python.")
        (base32
         "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
     (build-system python-build-system)
-    (inputs `(("python-pytz" ,python-pytz)))
+    (propagated-inputs
+     `(("python-pytz" ,python-pytz)))
     (home-page "https://github.com/regebro/tzlocal")
     (synopsis
      "Local timezone information for Python")
@@ -1155,8 +1227,6 @@ Database API 2.0T.")
        (base32
         "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
     (build-system python-build-system)
-    (inputs
-     `(("python2-setuptools" ,python2-setuptools)))
     (arguments
      `(#:python ,python-2 ; apparently incompatible with Python 3
        #:tests? #f))
@@ -1213,15 +1283,14 @@ Python 3.3+.")
 (define-public python-pyicu
   (package
     (name "python-pyicu")
-    (version "1.9.2")
+    (version "1.9.5")
     (source
      (origin
       (method url-fetch)
-      (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
-                          version ".tar.gz"))
+      (uri (pypi-uri "PyICU" version))
       (sha256
        (base32
-        "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
+        "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
     (build-system python-build-system)
     (inputs
      `(("icu4c" ,icu4c)))
@@ -1229,14 +1298,10 @@ Python 3.3+.")
     (synopsis "Python extension wrapping the ICU C++ API")
     (description
      "PyICU is a python extension wrapping the ICU C++ API.")
-    (license license:x11)
-    (properties `((python2-variant . ,(delay python2-pyicu))))))
+    (license license:x11)))
 
 (define-public python2-pyicu
-  (package
-    (inherit (package-with-python2
-              (strip-python2-variant python-pyicu)))
-    (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
+  (package-with-python2 python-pyicu))
 
 (define-public python2-dogtail
   ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
@@ -1341,7 +1406,8 @@ commands.")
     (arguments
      `(#:python ,python-2                         ; SyntaxError with Python 3
        #:tests? #f))                              ; no 'test' sub-command
-    (inputs `(("element-tree" ,python2-element-tree)))
+    (propagated-inputs
+     `(("element-tree" ,python2-element-tree)))
     (synopsis "Python and command-line interface to Bugzilla")
     (description
      "PyBugz is a Python library and command-line tool to query the Bugzilla
@@ -1391,9 +1457,8 @@ backported for previous versions of Python from 2.4 to 3.3.")
        (base32
         "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-six" ,python-six)
+    (propagated-inputs
+     `(("python-six" ,python-six)
        ("python-parse" ,python-parse)))
     (arguments '(#:tests? #f))            ;TODO: tests require pytest
     (home-page "https://github.com/jenisys/parse_type")
@@ -1468,6 +1533,7 @@ existing ones.")
     (arguments
      ;; With Python 3.x, fails to build with a syntax error.
      `(#:python ,python-2
+       #:use-setuptools? #f                ; still relies on distutils
        #:tests? #f))                       ; no 'python setup.py test' command
     (home-page "http://scons.org/")
     (synopsis "Software construction tool written in Python")
@@ -1493,8 +1559,6 @@ software.")
         (base32
          "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (arguments
      ;; error in setup.cfg: command 'test' has no such option 'buffer'
      '(#:tests? #f))
@@ -1521,8 +1585,6 @@ software.")
         (base32
          "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (arguments
      '(#:tests? #f)) ; no setup.py test command
     (home-page
@@ -1548,8 +1610,6 @@ matching them against a list of media-ranges.")
           (base32
             "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (arguments
      '(#:tests? #f)) ; FIXME: test suite fails
     (home-page "http://readthedocs.org/docs/nose/")
@@ -1574,9 +1634,7 @@ matching them against a list of media-ranges.")
             "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
     (build-system python-build-system)
     (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
-    (inputs
+    (propagated-inputs
      `(("python-cov-core" ,python-cov-core)
        ("python-pytest-cov" ,python-pytest-cov)
        ("python-six" ,python-six)))
@@ -1606,8 +1664,6 @@ interfaces and processes.")
         (base32
          "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://pypi.python.org/pypi/unittest2")
     (synopsis "Python unit testing library")
     (description
@@ -1628,8 +1684,6 @@ standard library.")
        (sha256
         (base32
          "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
-    (inputs
-     `(("python2-setuptools" ,python2-setuptools)))
     (arguments
      `(#:python ,python-2
        #:tests? #f)))) ; no setup.py test command
@@ -1670,8 +1724,6 @@ standard library.")
         (base32
          "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://pylib.readthedocs.org/")
     (synopsis "Python library for parsing, I/O, instrospection, and logging")
     (description
@@ -1702,10 +1754,10 @@ code introspection, and logging.")
            (("def test_remove_dir_prefix\\(self\\):")
             "@pytest.mark.xfail\n    def test_remove_dir_prefix(self):")))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-py" ,python-py)
-       ("python-nose" ,python-nose)
+    (propagated-inputs
+     `(("python-py" ,python-py)))
+    (native-inputs
+     `(("python-nose" ,python-nose)
        ("python-mock" ,python-mock)))
     (home-page "http://pytest.org")
     (synopsis "Python testing library")
@@ -1755,7 +1807,17 @@ and many external plugins.")
          (base32
           "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
     (build-system python-build-system)
-    (inputs
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+          (lambda _
+            ;; options taken from tox.ini
+            ;; TODO: make "--restructuredtext" tests pass. They currently fail
+            ;; with "Duplicate implicit target name"
+            (zero? (system* "python" "./setup.py" "check"
+                            "--strict" "--metadata")))))))
+    (propagated-inputs
      `(("python-coverage" ,python-coverage)
        ("python-pytest" ,python-pytest)))
     (home-page "https://github.com/pytest-dev/pytest-cov")
@@ -1764,15 +1826,10 @@ and many external plugins.")
      "Pytest-cov produces coverage reports.  It supports centralised testing and
 distributed testing in both @code{load} and @code{each} modes.  It also
 supports coverage of subprocesses.")
-  (license license:expat)
-  (properties `((python2-variant . ,(delay python2-pytest-cov))))))
+  (license license:expat)))
 
 (define-public python2-pytest-cov
-  (let ((base (package-with-python2 (strip-python2-variant python-pytest-cov))))
-    (package
-      (inherit base)
-      (inputs `(("python2-setuptools" ,python2-setuptools)
-                ,@(package-inputs base))))))
+  (package-with-python2 python-pytest-cov))
 
 (define-public python-pytest-runner
   (package
@@ -1805,16 +1862,10 @@ supports coverage of subprocesses.")
     (description
      "This package provides a @command{pytest-runner} command that
 @file{setup.py} files can use to run tests.")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-pytest-runner))))))
+    (license license:expat)))
 
 (define-public python2-pytest-runner
-  (let ((base (package-with-python2
-                (strip-python2-variant python-pytest-runner))))
-    (package
-      (inherit base)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs base))))))
+  (package-with-python2 python-pytest-runner))
 
 (define-public python-pytest-mock
   (package
@@ -1830,9 +1881,8 @@ supports coverage of subprocesses.")
     (build-system python-build-system)
     (native-inputs
      `(("unzip" ,unzip)))
-    (inputs
-     `(("python-py" ,python-py)
-       ("python-pytest" ,python-pytest)))
+    (propagated-inputs
+     `(("python-pytest" ,python-pytest)))
     (home-page "https://github.com/pytest-dev/pytest-mock/")
     (synopsis "Thin-wrapper around the mock package for easier use with py.test")
     (description
@@ -1848,12 +1898,9 @@ same arguments.")
   (let ((base (package-with-python2
                 (strip-python2-variant python-pytest-mock))))
     (package (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base)))
-      (inputs
+      (propagated-inputs
        `(("python2-mock" ,python2-mock)
-         ,@(package-inputs base))))))
+         ,@(package-propagated-inputs base))))))
 
 (define-public python-pytest-xdist
   (package
@@ -1878,9 +1925,8 @@ same arguments.")
     (native-inputs
      `(("unzip" ,unzip)
        ("python-setuptools-scm" ,python-setuptools-scm)))
-    (inputs
-     `(("python-apipkg" ,python-apipkg)
-       ("python-execnet" ,python-execnet)
+    (propagated-inputs
+     `(("python-execnet" ,python-execnet)
        ("python-pytest" ,python-pytest)
        ("python-py" ,python-py)))
     (home-page
@@ -1894,16 +1940,10 @@ to run tests repeatedly when failed, and the ability to run tests on multiple
 Python interpreters or platforms.  It uses rsync to copy the existing
 program code to a remote location, executes there, and then syncs the
 result back.")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-pytest-xdist))))))
+    (license license:expat)))
 
 (define-public python2-pytest-xdist
-  (let ((base (package-with-python2
-                (strip-python2-variant python-pytest-xdist))))
-    (package
-      (inherit base)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs base))))))
+  (package-with-python2 python-pytest-xdist))
 
 (define-public python-scripttest
   (package
@@ -1919,9 +1959,8 @@ result back.")
         (base32
          "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-pytest" ,python-pytest)))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
     (home-page "http://pythonpaste.org/scripttest/")
     (synopsis "Python library to test command-line scripts")
     (description "Scripttest is a Python helper library for testing
@@ -1947,9 +1986,7 @@ subprocess and see the output as well as any file modifications.")
          "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
     (build-system python-build-system)
     (propagated-inputs
-     `(("python-mimeparse" ,python-mimeparse)))
-    (inputs
-     `(("python-setuptools" ,python-setuptools)
+     `(("python-mimeparse" ,python-mimeparse)
        ("python-extras" ,python-extras)))
     (home-page "https://github.com/testing-cabal/testtools")
     (synopsis
@@ -1977,10 +2014,8 @@ compatibility.")
         (base32
          "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-testtools" ,python-testtools)
-       ("python-mimeparse" ,python-mimeparse)))
+    (propagated-inputs
+     `(("python-testtools" ,python-testtools)))
     (home-page "https://launchpad.net/testscenarios")
     (synopsis "Pyunit extension for dependency injection")
     (description
@@ -2005,8 +2040,6 @@ style tests.")
         (base32
          "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://launchpad.net/testresources")
     (synopsis
      "Pyunit extension for managing test resources")
@@ -2032,11 +2065,11 @@ use of resources by test cases.")
         (base32
          "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-testtools" ,python-testtools)
-       ("python-mimeparse" ,python-mimeparse)
-       ("python-testscenarios" ,python-testscenarios)))
+    (propagated-inputs
+     `(("python-extras" ,python-extras)
+       ("python-mimeparse" ,python-mimeparse)))
+    (native-inputs
+     `(("python-testscenarios" ,python-testscenarios)))
     (home-page "http://launchpad.net/subunit")
     (synopsis "Python implementation of the subunit protocol")
     (description
@@ -2047,96 +2080,51 @@ protocol.")
 (define-public python2-subunit
   (package-with-python2 python-subunit))
 
-;; Recent versions of python-fixtures need a recent version of python-pbr,
-;; which needs a recent version of python-fixtures. To fix this circular
-;; dependency, we keep old versions of python-fixtures and python-pbr to
-;; bootstrap the whole thing:
-;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
-;; - python-pbr-0.11 is used to build python-fixtures
-;; - python-fixtures is used to build python-pbr
-(define-public python-fixtures-0.3.16
-  (package
-    (name "python-fixtures")
-    (version "0.3.16")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append
-             "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
-             version ".tar.gz"))
-       (sha256
-        (base32
-         "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
-    (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
-    (arguments
-     '(#:tests? #f)) ; no setup.py test command
-    (home-page "https://launchpad.net/python-fixtures")
-    (synopsis "Python test fixture library")
-    (description
-     "Fixtures provides a way to create reusable state, useful when writing
-Python tests.")
-    (license (list license:bsd-3 license:asl2.0)))) ; at user's option
-
-(define-public python2-fixtures-0.3.16
-  (package-with-python2 python-fixtures-0.3.16))
-
-(define-public python-pbr-0.11
-  (package
-    (name "python-pbr")
-    (version "0.11.0")
+;; Recent versions of python-fixtures and python-testrepository need
+;; python-pbr for packaging, which itself needs these two packages for
+;; testing.
+;; To fix this circular dependency, we use a build of python-pbr, based on the
+;; same source, just without any test dependencies and with tests disabled.
+;; python-pbr-minmal is then used to package python-fixtures and
+;; python-testrepository.
+;; Strictly speaking we currently could remove the test-requirements from the
+;; normal python-pbr package (and save this package) since test are disabled
+;; there anyway. But this may change in future.
+(define python-pbr-minimal
+  (package
+    (name "python-pbr-minimal")
+    (version "1.8.1")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append
-             "https://pypi.python.org/packages/source/p/pbr/pbr-"
-             version ".tar.gz"))
+       (uri (pypi-uri "pbr" version))
        (sha256
         (base32
-         "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
+         "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
     (build-system python-build-system)
     (arguments
-     `(#:tests? #f)) ;; Most tests seem to use the Internet.
-    (inputs
-      `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
-        ("python-pip" ,python-pip)
-        ("python-setuptools" ,python-setuptools)))
-    (home-page "https://launchpad.net/pbr")
-    (synopsis "Change the default behavior of Python’s setuptools")
+     `(#:tests? #f))
+    (home-page "http://docs.openstack.org/developer/pbr/")
+    (synopsis "Minimal build of python-pbr used for bootstrapping")
     (description
-      "Python Build Reasonableness (PBR) is a library that injects some useful
-and sensible default behaviors into your setuptools run.")
+     "Used only for bootstrapping python2-pbr, you should not need this.")
     (license license:asl2.0)))
 
-(define-public python2-pbr-0.11
-  (package-with-python2 python-pbr-0.11))
+(define python2-pbr-minimal
+  (package-with-python2 python-pbr-minimal))
 
 (define-public python-pbr
   (package
+    (inherit python-pbr-minimal)
     (name "python-pbr")
-    (version "1.8.1")
-    (source
-      (origin
-        (method url-fetch)
-        (uri (string-append
-               "https://pypi.python.org/packages/source/p/pbr/pbr-"
-               version
-               ".tar.gz"))
-        (sha256
-          (base32
-            "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
-    (build-system python-build-system)
     (arguments
      `(#:tests? #f)) ;; Most tests seem to use the Internet.
     (propagated-inputs
-      `(("python-testrepository" ,python-testrepository)
-        ("git" ,git))) ;; pbr actually uses the "git" binary.
-    (inputs
+      `(("git" ,git))) ;; pbr actually uses the "git" binary.
+    (native-inputs
       `(("python-fixtures" ,python-fixtures)
-        ("python-mimeparse" ,python-mimeparse)
+        ;; discover, coverage, hacking, subunit
         ("python-mock" ,python-mock)
-        ("python-setuptools" ,python-setuptools)
         ("python-six" ,python-six)
         ("python-sphinx" ,python-sphinx)
         ("python-testrepository" ,python-testrepository)
@@ -2144,12 +2132,13 @@ and sensible default behaviors into your setuptools run.")
         ("python-testscenarios" ,python-testscenarios)
         ("python-testtools" ,python-testtools)
         ("python-virtualenv" ,python-virtualenv)))
-    (home-page "https://launchpad.net/pbr")
-    (synopsis "Change the default behavior of Python’s setuptools")
+    (synopsis "Enhance the default behavior of Python’s setuptools")
     (description
       "Python Build Reasonableness (PBR) is a library that injects some useful
-and sensible default behaviors into your setuptools run.")
-    (license license:asl2.0)))
+and sensible default behaviors into your setuptools run.  It will set
+versions, process requirements files and generate AUTHORS and ChangeLog file
+from git information.
+")))
 
 (define-public python2-pbr
   (package-with-python2 python-pbr))
@@ -2167,15 +2156,10 @@ and sensible default behaviors into your setuptools run.")
          "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
     (build-system python-build-system)
     (propagated-inputs
-     `(("python-six" ,python-six)
-       ("python-pbr-0.11" ,python-pbr-0.11)))
-    (inputs
-     `(("python-pip" ,python-pip)
-       ("python-setuptools" ,python-setuptools)
-       ;; Tests
+     `(("python-six" ,python-six)))
+    (native-inputs
+     `(("python-pbr-minimal" ,python-pbr-minimal)
        ("python-testtools" ,python-testtools)))
-    (arguments
-     '(#:tests? #f)) ; no setup.py test command
     (home-page "https://launchpad.net/python-fixtures")
     (synopsis "Python test fixture library")
     (description
@@ -2201,11 +2185,11 @@ Python tests.")
          "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
     (build-system python-build-system)
     (propagated-inputs
-     `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
-       ("python-testtools" ,python-testtools)))
-    (inputs
-     `(("python-setuptools" ,python-setuptools)
+     `(("python-fixtures" ,python-fixtures)
        ("python-subunit" ,python-subunit)
+       ("python-testtools" ,python-testtools)))
+    (native-inputs
+     `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
        ("python-mimeparse" ,python-mimeparse)))
     (home-page "https://launchpad.net/testrepository")
     (synopsis "Database for Python test results")
@@ -2229,8 +2213,6 @@ have failed since the last commit or what tests are currently failing.")
         (base32
          "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://nedbatchelder.com/code/coverage")
     (synopsis "Code coverage measurement for Python")
     (description
@@ -2255,22 +2237,17 @@ executed.")
          (base32
           "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
     (build-system python-build-system)
-    (native-inputs
+    (propagated-inputs
      `(("python-coverage" ,python-coverage)))
     (home-page "https://github.com/schlamar/cov-core")
     (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
     (description
      "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
 It is useful for developing coverage plugins for these testing frameworks.")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-cov-core))))))
+    (license license:expat)))
 
 (define-public python2-cov-core
-  (let ((cov-core (package-with-python2 (strip-python2-variant python-cov-core))))
-    (package (inherit cov-core)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs cov-core))))))
+ (package-with-python2 python-cov-core))
 
 (define-public python-discover
   (package
@@ -2286,8 +2263,6 @@ It is useful for developing coverage plugins for these testing frameworks.")
         (base32
          "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://pypi.python.org/pypi/discover/")
     (synopsis
      "Python test discovery for unittest")
@@ -2310,9 +2285,8 @@ backported from Python 2.7 for Python 2.4+.")
               (base32
                "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-six" ,python-six)
+    (propagated-inputs
+     `(("python-six" ,python-six)
        ("python-parse" ,python-parse)
        ("python-parse-type" ,python-parse-type)))
     (arguments `(#:tests? #f))          ;TODO: tests require nose>=1.3 and
@@ -2338,8 +2312,6 @@ tests written in a natural language style, backed up by Python code.")
                (base32
                 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (arguments `(#:tests? #f)) ; no tests
     (home-page "https://github.com/ianare/exif-py")
     (synopsis "Python library to extract EXIF data from image files")
@@ -2362,8 +2334,6 @@ files.")
                (base32
                 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (arguments `(#:tests? #f)) ; no tests
     (home-page "http://github.com/digitalbazaar/pyld")
     (synopsis "Python implementation of the JSON-LD specification")
@@ -2385,8 +2355,6 @@ files.")
                (base32
                 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (arguments `(#:tests? #f)) ; no tests
     (home-page "http://python-requests.org/")
     (synopsis "Python CA certificate bundle")
@@ -2421,8 +2389,6 @@ is used by the Requests library to verify HTTPS requests.")
                  (("'locale'")
                   (string-append "'" glibc "/bin/locale'"))))
              #t)))))
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://click.pocoo.org")
     (synopsis "Command line library for Python")
     (description
@@ -2448,8 +2414,7 @@ with sensible defaults out of the box.")
           "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-jsonschema" ,python-jsonschema)
+     `(("python-jsonschema" ,python-jsonschema)
        ("python-pytest-cov" ,python-pytest-cov)))
     (home-page "https://bitbucket.org/pypa/wheel/")
     (synopsis "Format for built Python packages")
@@ -2484,8 +2449,7 @@ installed with a newer @code{pip} or with wheel's own command line utility.")
                "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-py" ,python-py)
+     `(("python-py" ,python-py)
        ("python-pytest" ,python-pytest)
        ("python-pytest-cov" ,python-pytest-cov)
        ("python-wheel" ,python-wheel)))
@@ -2528,15 +2492,10 @@ than Python’s urllib2 library.")
 information in a variety of version control systems in order to discover
 version numbers.")
     (home-page "https://github.com/habnabit/vcversioner")
-    (license license:isc)
-    (properties `((python2-variant . ,(delay python2-vcversioner))))))
+    (license license:isc)))
 
 (define-public python2-vcversioner
-  (let ((vcversioner (package-with-python2
-                       (strip-python2-variant python-vcversioner))))
-    (package (inherit vcversioner)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                        ,@(package-native-inputs vcversioner))))))
+  (package-with-python2 python-vcversioner))
 
 (define-public python-jsonschema
   (package
@@ -2572,11 +2531,38 @@ version numbers.")
     (package (inherit jsonschema)
              (native-inputs
               `(("python2-mock" ,python2-mock)
-                ("python2-setuptools" ,python2-setuptools)
                 ,@(package-native-inputs jsonschema)))
              (propagated-inputs
               `(("python2-functools32" ,python2-functools32))))))
 
+(define-public python-kitchen
+  (package
+    (name "python-kitchen")
+    (version "1.2.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "kitchen" version))
+       (sha256
+        (base32
+         "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-chardet" ,python-chardet)))
+    (home-page "https://fedorahosted.org/kitchen")
+    (synopsis "Python API for snippets")
+    (description "@code{kitchen} module provides a python API for all sorts of
+little useful snippets of code that everybody ends up writing for their projects
+but never seem big enough to build an independent release.  Use kitchen and stop
+cutting and pasting that code over and over.")
+    (license (list license:lgpl2.1+
+                   ;; subprocess.py, test_subprocess.py,
+                   ;; kitchen/pycompat25/defaultdict.py:
+                   license:psfl))))
+
+(define-public python2-kitchen
+  (package-with-python2 python-kitchen))
+
 (define-public python-unidecode
   (package
     (name "python-unidecode")
@@ -2588,8 +2574,6 @@ version numbers.")
               (base32
                "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://pypi.python.org/pypi/Unidecode")
     (synopsis "ASCII transliterations of Unicode text")
     (description
@@ -2616,10 +2600,9 @@ somewhat intelligeble.")
          "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)
+     `(("python-pytest" ,python-pytest)
+       ("python-pytest-cov" ,python-pytest-cov)
        ("python-pytest-runner" ,python-pytest-runner)))
-    (arguments
-     '(#:tests? #f)) ; test suite doesn't work
     (home-page "http://github.com/progrium/pyjwt")
     (synopsis "JSON Web Token implementation in Python")
     (description
@@ -2641,13 +2624,10 @@ somewhat intelligeble.")
                 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-coverage" ,python-coverage)
-       ("python-nose" ,python-nose)
-       ("python-mock" ,python-mock)))
-    (inputs
-     `(("python-blinker" ,python-blinker)
+     `(("python-nose" ,python-nose)
        ("python-cryptography" ,python-cryptography)
-       ("python-pyjwt" ,python-pyjwt)))
+       ("python-pyjwt" ,python-pyjwt)
+       ("python-blinker" ,python-blinker)))
     (home-page "https://github.com/idan/oauthlib")
     (synopsis "OAuth implementation for Python")
     (description
@@ -2660,8 +2640,8 @@ OAuth request-signing logic.")
   (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
     (package
       (inherit base)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ("python2-unittest2" ,python2-unittest2)
+      (native-inputs `(("python2-unittest2" ,python2-unittest2)
+                       ("python2-mock" ,python2-mock)
                        ,@(package-native-inputs base))))))
 
 (define-public python-itsdangerous
@@ -2683,35 +2663,25 @@ OAuth request-signing logic.")
     (description
      "Itsdangerous provides various helpers to pass trusted data to untrusted
 environments and back.")
-    (license license:bsd-3)
-    (properties `((python2-variant . ,(delay python2-itsdangerous))))))
+    (license license:bsd-3)))
 
 (define-public python2-itsdangerous
-  (let ((base (package-with-python2
-                (strip-python2-variant python-itsdangerous))))
-    (package
-      (inherit base)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs base))))))
+  (package-with-python2 python-itsdangerous))
 
 (define-public python-pyyaml
   (package
     (name "python-pyyaml")
-    (version "3.11")
+    (version "3.12")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append
-             "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
-             version ".tar.gz"))
+       (uri (pypi-uri "PyYAML" version))
        (sha256
         (base32
-         "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
+         "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
     (build-system python-build-system)
     (inputs
      `(("libyaml" ,libyaml)))
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://pyyaml.org/wiki/PyYAML")
     (synopsis "YAML parser and emitter for Python")
     (description
@@ -2747,9 +2717,8 @@ object.")
              (substitute* "tests/test_virtualenv.py"
                (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
              (zero? (system* "py.test")))))))
-    (inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-mock" ,python-mock)
+    (native-inputs
+     `(("python-mock" ,python-mock)
        ("python-pytest" ,python-pytest)))
     (home-page "https://virtualenv.pypa.io/")
     (synopsis "Virtual Python environment builder")
@@ -2774,8 +2743,6 @@ object.")
         (base32
          "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://github.com/mitsuhiko/markupsafe")
     (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
     (description
@@ -2798,9 +2765,8 @@ for Python.")
         (base32
          "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-markupsafe" ,python-markupsafe)))
+    (propagated-inputs
+     `(("python-markupsafe" ,python-markupsafe)))
     (home-page "http://jinja.pocoo.org/")
     (synopsis "Python template engine")
     (description
@@ -2822,8 +2788,6 @@ written in pure Python.")
                (base32
                 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://defunkt.io/pystache/")
     (synopsis "Python logic-less template engine")
     (description
@@ -2843,7 +2807,15 @@ logic-free templating system Mustache.")
               (uri (pypi-uri "joblib" version))
               (sha256
                (base32
-                "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))))
+                "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; Remove pre-compiled .pyc files from source.
+           (for-each delete-file-recursively
+                     (find-files "." "__pycache__" #:directories? #t))
+           (for-each delete-file (find-files "." "\\.pyc$"))
+           #t))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -2864,9 +2836,9 @@ logic-free templating system Mustache.")
                (("def test_parallel_with_interactively_defined_functions" line)
                 (string-append "@SkipTest\n" line)))
              #t)))))
+    ;; Provide nose to enable tests command
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-nose"       ,python-nose)
+     `(("python-nose"       ,python-nose)
        ("python-sphinx"     ,python-sphinx)
        ("python-docutils"   ,python-docutils)
        ("python-numpydoc"   ,python-numpydoc)))
@@ -2885,19 +2857,15 @@ logging and tracing of the execution.")
 (define-public python-docutils
   (package
     (name "python-docutils")
-    (version "0.12")
+    (version "0.13.1")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append
-             "https://pypi.python.org/packages/source/d/docutils/docutils-"
-             version ".tar.gz"))
+       (uri (pypi-uri "docutils" version))
        (sha256
         (base32
-         "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
+         "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (arguments
      '(#:tests? #f)) ; no setup.py test command
     (home-page "http://docutils.sourceforge.net/")
@@ -2916,17 +2884,15 @@ reStructuredText.")
 (define-public python-pygments
   (package
     (name "python-pygments")
-    (version "2.0.2")
+    (version "2.1.3")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "Pygments" version))
        (sha256
         (base32
-         "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
+         "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://pygments.org/")
     (synopsis "Syntax highlighting")
     (description
@@ -2950,9 +2916,8 @@ reStructuredText.")
         (base32
          "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-jinja2" ,python-jinja2)
+    (propagated-inputs
+     `(("python-jinja2" ,python-jinja2)
        ("python-docutils" ,python-docutils)
        ("python-pygments" ,python-pygments)))
     (home-page "http://sphinx-doc.org/")
@@ -2979,17 +2944,6 @@ sources.")
         (base32
          "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
     (build-system python-build-system)
-    (arguments
-     `(;; With standard flags, the install phase attempts to create a zip'd
-       ;; egg file, and fails with an error: 'ZIP does not support timestamps
-       ;; before 1980'
-       #:configure-flags '("--single-version-externally-managed"
-                           "--record=sphinx-rtd-theme.txt")))
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
-    (inputs
-     `(("python-docutils" ,python-docutils)
-       ("python-sphinx" ,python-sphinx)))
     (home-page "https://github.com/snide/sphinx_rtd_theme/")
     (synopsis "ReadTheDocs.org theme for Sphinx")
     (description "A theme for Sphinx used by ReadTheDocs.org.")
@@ -2998,6 +2952,36 @@ sources.")
 (define-public python2-sphinx-rtd-theme
   (package-with-python2 python-sphinx-rtd-theme))
 
+(define-public python-rst.linker
+  (package
+    (name "python-rst.linker")
+    (version "1.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "rst.linker" version))
+       (sha256
+        (base32
+         "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-dateutil" ,python-dateutil-2)
+       ("python-six" ,python-six)))
+    (native-inputs
+     `(("python-setuptools-scm" ,python-setuptools-scm)))
+    ;; Test would require path.py, which would introduce a cyclic dependence.
+    (arguments `(#:tests? #f))
+    ;; Note: As of version 1.7 the documentation is not worth building.
+    (home-page "https://github.com/jaraco/rst.linker")
+    (synopsis "Sphinx plugin to add links and timestamps")
+    (description "rst.linker allows to automatically replace text by a
+reStructuredText external reference or timestamps.  It's primary purpose is to
+augment the changelog, but it can be used for other documents, too.")
+    (license license:expat)))
+
+(define-public python2-rst.linker
+  (package-with-python2 python-rst.linker))
+
 (define-public python-feedgenerator
   (package
     (name "python-feedgenerator")
@@ -3008,11 +2992,18 @@ sources.")
        (uri (pypi-uri "feedgenerator" version))
        (sha256
         (base32
-         "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
+         "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; Remove pre-compiled .pyc files from source.
+           (for-each delete-file-recursively
+                     (find-files "." "__pycache__" #:directories? #t))
+           (for-each delete-file (find-files "." "\\.pyc$"))
+           #t))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-pytz" ,python-pytz)
+    (propagated-inputs
+     `(("python-pytz" ,python-pytz)
        ("python-six" ,python-six)))
     (home-page "https://github.com/getpelican/feedgenerator")
     (synopsis
@@ -3037,11 +3028,6 @@ which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
         (base32
          "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
-    ;; No "test" command supplied to setuptools, so unless there's another way
-    ;; to run tests, we're skipping them!
-    (arguments '(#:tests? #f))
     (home-page "http://pythonhosted.org/blinker/")
     (synopsis "Fast, simple object-to-object and broadcast signaling")
     (description
@@ -3064,7 +3050,7 @@ interested parties to subscribe to events, or \"signals\".")
         (base32
          "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
     (build-system python-build-system)
-    (inputs
+    (propagated-inputs
      `(("python-feedgenerator" ,python-feedgenerator)
        ("python-jinja2" ,python-jinja2)
        ("python-pygments" ,python-pygments)
@@ -3100,7 +3086,7 @@ and is very extensible.")
 (define-public python-scikit-learn
   (package
     (name "python-scikit-learn")
-    (version "0.16.1")
+    (version "0.18.1")
     (source
      (origin
        (method url-fetch)
@@ -3110,7 +3096,7 @@ and is very extensible.")
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
+         "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -3118,20 +3104,12 @@ and is very extensible.")
         'check 'set-HOME
         ;; some tests require access to "$HOME"
         (lambda _ (setenv "HOME" "/tmp"))
-        ;; Tests can only be run after the library has been installed and not
-        ;; within the source directory.
-        (alist-cons-after
-         'install 'check
-         (lambda _
-           (with-directory-excursion "/tmp"
-             ;; With Python 3 one test of 3334 fails
-             ;; (sklearn.tests.test_common.test_transformers); see
-             ;; https://github.com/scikit-learn/scikit-learn/issues/3693
-             (system* "nosetests" "-v" "sklearn")))
-         (alist-delete 'check %standard-phases)))))
+        %standard-phases)))
     (inputs
-     `(("openblas" ,openblas)
-       ("python-nose" ,python-nose)))
+     `(("openblas" ,openblas)))
+    (native-inputs
+     `(("python-nose" ,python-nose)
+       ("python-cython" ,python-cython)))
     (propagated-inputs
      `(("python-numpy" ,python-numpy)
        ("python-scipy" ,python-scipy)))
@@ -3140,11 +3118,10 @@ and is very extensible.")
     (description
      "Scikit-learn provides simple and efficient tools for data
 mining and data analysis.")
-    (license license:bsd-3)
-    (properties `((python2-variant . ,(delay python2-scikit-learn))))))
+    (license license:bsd-3)))
 
 (define-public python2-scikit-learn
-  (package-with-python2 (strip-python2-variant python-scikit-learn)))
+  (package-with-python2 python-scikit-learn))
 
 (define-public python-scikit-image
   (package
@@ -3159,33 +3136,24 @@ mining and data analysis.")
        (sha256
         (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
     (build-system python-build-system)
+    ;; See DEPENDS.txt for the list of build and run time requiremnts
     (propagated-inputs
      `(("python-matplotlib" ,python-matplotlib)
        ("python-networkx" ,python-networkx)
-       ("python-numpy" ,python-numpy)
        ("python-scipy" ,python-scipy)
-       ("python-six" ,python-six)
        ("python-pillow" ,python-pillow)))
     (native-inputs
-     `(("python-cython" ,python-cython)
-       ("python-setuptools" ,python-setuptools)))
+     `(("python-numpy" ,python-numpy)
+       ("python-cython" ,python-cython)
+       ("python-six" ,python-six)))
     (home-page "http://scikit-image.org/")
     (synopsis "Image processing in Python")
     (description
      "Scikit-image is a collection of algorithms for image processing.")
-    (license license:bsd-3)
-    (properties `((python2-variant . ,(delay python2-scikit-image))))))
+    (license license:bsd-3)))
 
 (define-public python2-scikit-image
-  (let ((scikit-image (package-with-python2
-                        (strip-python2-variant python-scikit-image))))
-    (package (inherit scikit-image)
-      (native-inputs
-       `(("python2-mock" ,python2-mock)
-         ,@(package-native-inputs scikit-image)))
-      (propagated-inputs
-       `(("python2-pytz" ,python2-pytz)
-         ,@(package-propagated-inputs scikit-image))))))
+  (package-with-python2 python-scikit-image))
 
 (define-public python-redis
   (package
@@ -3202,9 +3170,9 @@ mining and data analysis.")
     (build-system python-build-system)
     ;; Tests require a running Redis server
     (arguments '(#:tests? #f))
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-pytest" ,python-pytest)))
+    ;; As long as we are not running test, we do not need this input :-)
+    ;;(native-inputs
+    ;; `(("python-pytest" ,python-pytest)))
     (home-page "https://github.com/andymccurdy/redis-py")
     (synopsis "Redis Python client")
     (description
@@ -3230,8 +3198,6 @@ mining and data analysis.")
     (propagated-inputs
      `(("python-click" ,python-click)
        ("python-redis" ,python-redis)))
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://python-rq.org/")
     (synopsis "Simple job queues for Python")
     (description
@@ -3297,8 +3263,7 @@ writing C extensions for Python as easy as Python itself.")
     (build-system python-build-system)
     (arguments `(#:python ,python-2))
     (native-inputs
-     `(("python2-pytest" ,python2-pytest) ; needed for running tests
-       ("python2-setuptools" ,python2-setuptools)))
+     `(("python2-pytest" ,python2-pytest))) ; needed for running tests
     (home-page "https://rpython.readthedocs.org")
     (synopsis "Framework for implementing interpreters and virtual machines")
     (description "RPython is a translation and support framework for
@@ -3322,16 +3287,16 @@ between language specification and implementation aspects.")
          "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
     (build-system python-build-system)
     (inputs
-     `(("python-nose" ,python-nose)
-       ("openblas" ,openblas)
+     `(("openblas" ,openblas)
        ("lapack" ,lapack)))
     (native-inputs
-     `(("gfortran" ,gfortran)))
+     `(("python-nose" ,python-nose)
+       ("gfortran" ,gfortran)))
     (arguments
      `(#:phases
-       (alist-cons-before
-        'build 'set-environment-variables
-        (lambda* (#:key inputs #:allow-other-keys)
+       (modify-phases %standard-phases
+        (add-before 'build 'set-environment-variables
+         (lambda* (#:key inputs #:allow-other-keys)
           (call-with-output-file "site.cfg"
             (lambda (port)
               (format port
@@ -3340,7 +3305,8 @@ libraries = openblas
 library_dirs = ~a/lib
 include_dirs = ~a/include
 
-[lapack]
+# backslash-n to make emacs happy
+\n[lapack]
 lapack_libs = lapack
 library_dirs = ~a/lib
 include_dirs = ~a/include
@@ -3353,18 +3319,17 @@ include_dirs = ~a/include
           (substitute* "numpy/distutils/system_info.py"
             (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
              "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
-          #t)
+          #t))
         ;; Tests can only be run after the library has been installed and not
         ;; within the source directory.
-        (alist-cons-after
-         'install 'check
-         (lambda _
+        (delete 'check)
+        (add-after 'install 'check
+         (lambda* (#:key outputs inputs #:allow-other-keys)
+           ;; Make installed package available for running the tests
+           (add-installed-pythonpath inputs outputs)
            (with-directory-excursion "/tmp"
              (zero? (system* "python" "-c"
-                             "import numpy; numpy.test(verbose=2)"))))
-         (alist-delete
-          'check
-          %standard-phases)))))
+                             "import numpy; numpy.test(verbose=2)"))))))))
     (home-page "http://www.numpy.org/")
     (synopsis "Fundamental package for scientific computing with Python")
     (description "NumPy is the fundamental package for scientific computing
@@ -3377,17 +3342,38 @@ capabilities.")
 (define python2-numpy-bootstrap
   (package-with-python2 python-numpy-bootstrap))
 
+(define-public python-munch
+  (package
+    (name "python-munch")
+    (version "2.0.4")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "munch" version))
+        (sha256
+         (base32
+          "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/Infinidat/munch")
+    (synopsis "Dot-accessible dictionary")
+    (description "Munch is a dot-accessible dictionary similar to JavaScript
+objects.")
+    (license license:expat)))
+
+(define-public python2-munch
+  (package-with-python2 python-munch))
+
 (define-public python2-fastlmm
   (package
     (name "python2-fastlmm")
-    (version "0.2.21")
+    (version "0.2.26")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "fastlmm" version ".zip"))
        (sha256
         (base32
-         "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
+         "0yxrx9xzai4fyrsi7c2p31kxvpq9czmv1p0wax5ic07m6izbszxg"))))
     (build-system python-build-system)
     (arguments
      `(#:python ,python-2)) ; only Python 2.7 is supported
@@ -3397,12 +3383,11 @@ capabilities.")
        ("python2-matplotlib" ,python2-matplotlib)
        ("python2-pandas" ,python2-pandas)
        ("python2-scikit-learn" ,python2-scikit-learn)
-       ("python2-cython" ,python2-cython)
        ("python2-pysnptools" ,python2-pysnptools)))
     (native-inputs
      `(("unzip" ,unzip)
-       ("python2-mock" ,python2-mock)
-       ("python2-setuptools" ,python2-setuptools)))
+       ("python2-cython" ,python2-cython)
+       ("python2-mock" ,python2-mock)))
     (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
     (synopsis "Perform genome-wide association studies on large data sets")
     (description
@@ -3417,14 +3402,15 @@ association studies (GWAS) on extremely large data sets.")
     (outputs '("out" "doc"))
     (inputs
      `(("which" ,which)
-       ("python-setuptools" ,python-setuptools)
-       ("python-matplotlib" ,python-matplotlib)
-       ("python-sphinx" ,python-sphinx)
-       ("python-pyparsing" ,python-pyparsing)
-       ("python-numpydoc" ,python-numpydoc)
        ,@(package-inputs python-numpy-bootstrap)))
+    (propagated-inputs
+     `(("python-matplotlib" ,python-matplotlib)
+       ("python-pyparsing" ,python-pyparsing)
+       ,@(package-propagated-inputs python-numpy-bootstrap)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
+       ("python-sphinx" ,python-sphinx)
+       ("python-numpydoc" ,python-numpydoc)
        ("texlive" ,texlive)
        ("texinfo" ,texinfo)
        ("perl" ,perl)
@@ -3435,7 +3421,10 @@ association studies (GWAS) on extremely large data sets.")
            ((#:phases phases)
             `(alist-cons-after
               'install 'install-doc
-              (lambda* (#:key outputs #:allow-other-keys)
+              (lambda* (#:key inputs outputs #:allow-other-keys)
+                ;; Make installed package available for building the
+                ;; documentation
+                (add-installed-pythonpath inputs outputs)
                 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
                        (doc (string-append
                              data "/doc/" ,name "-"
@@ -3471,6 +3460,33 @@ association studies (GWAS) on extremely large data sets.")
 (define-public python2-numpy
   (package-with-python2 python-numpy))
 
+(define-public python-pygit2
+  (package
+    (name "python-pygit2")
+    (version "0.24.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pygit2" version))
+       (sha256
+        (base32
+         "0shnafv9zc483wmcr4fzgvirg1qzz42xpdqd4a3ad39sdj1qbbia"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-six" ,python-six)
+       ("python-cffi" ,python-cffi)
+       ("libgit2" ,libgit2)
+       ("python-tox" ,python-tox)))
+    (home-page "https://github.com/libgit2/pygit2")
+    (synopsis "Python bindings for libgit2")
+    (description "Pygit2 is a set of Python bindings to the libgit2 shared
+library, libgit2 implements Git plumbing.")
+    ;; GPL2.0 only, with linking exception.
+    (license license:gpl2)))
+
+(define-public python2-pygit2
+  (package-with-python2 python-pygit2))
+
 (define-public python-pyparsing
   (package
     (name "python-pyparsing")
@@ -3542,11 +3558,10 @@ that client code uses to construct the grammar directly in Python code.")
            (substitute* "numpydoc/tests/test_plot_directive.py"
              (("3") "2"))))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-docutils" ,python-docutils)
-       ("python-sphinx" ,python-sphinx)
-       ("python-nose" ,python-nose)))
+    (propagated-inputs
+     `(("python-sphinx" ,python-sphinx)))
+    (native-inputs
+     `(("python-nose" ,python-nose)))
     (home-page "https://pypi.python.org/pypi/numpydoc")
     (synopsis
      "Numpy's Sphinx extensions")
@@ -3560,14 +3575,14 @@ that client code uses to construct the grammar directly in Python code.")
 (define-public python-numexpr
   (package
     (name "python-numexpr")
-    (version "2.6.0")
+    (version "2.6.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "numexpr" version))
        (sha256
         (base32
-         "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
+         "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
     (build-system python-build-system)
     (arguments `(#:tests? #f))          ; no tests included
     (propagated-inputs
@@ -3581,11 +3596,10 @@ doing the same calculation in Python.  In addition, its multi-threaded
 capabilities can make use of all your cores, which may accelerate
 computations, most specially if they are not memory-bounded (e.g. those using
 transcendental functions).")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-numexpr))))))
+    (license license:expat)))
 
 (define-public python2-numexpr
-  (package-with-python2 (strip-python2-variant python-numexpr)))
+  (package-with-python2 python-numexpr))
 
 (define-public python-matplotlib
   (package
@@ -3608,6 +3622,11 @@ transcendental functions).")
        ("python-pygobject" ,python-pygobject)
        ("gobject-introspection" ,gobject-introspection)
        ("python-tkinter" ,python "tk")
+       ("python-dateutil" ,python-dateutil-2)
+       ("python-numpy" ,python-numpy-bootstrap)
+       ("python-pillow" ,python-pillow)
+       ("python-pytz" ,python-pytz)
+       ("python-six" ,python-six)
        ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
        ;; from 'gtk+') provides the required 'typelib' files used by
        ;; 'gobject-introspection'. The location of these files is set with the
@@ -3624,21 +3643,11 @@ transcendental functions).")
        ("python-pycairo" ,python-pycairo)
        ("python-cairocffi" ,python-cairocffi)))
     (inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-dateutil" ,python-dateutil-2)
-       ("python-six" ,python-six)
-       ("python-pytz" ,python-pytz)
-       ("python-numpy" ,python-numpy-bootstrap)
-       ("python-sphinx" ,python-sphinx)
-       ("python-numpydoc" ,python-numpydoc)
-       ("python-nose" ,python-nose)
-       ("python-mock" ,python-mock)
-       ("libpng" ,libpng)
+     `(("libpng" ,libpng)
        ("imagemagick" ,imagemagick)
        ("freetype" ,freetype)
        ("cairo" ,cairo)
        ("glib" ,glib)
-       ("python-pillow" ,python-pillow)
        ;; FIXME: Add backends when available.
        ;("python-wxpython" ,python-wxpython)
        ;("python-pyqt" ,python-pyqt)
@@ -3646,6 +3655,10 @@ transcendental functions).")
        ("tk" ,tk)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
+       ("python-sphinx" ,python-sphinx)
+       ("python-numpydoc" ,python-numpydoc)
+       ("python-nose" ,python-nose)
+       ("python-mock" ,python-mock)
        ("texlive" ,texlive)
        ("texinfo" ,texinfo)))
     (arguments
@@ -3670,11 +3683,14 @@ backend = TkAgg~%"
                         (assoc-ref inputs "tk"))))))
         (alist-cons-after
          'install 'install-doc
-         (lambda* (#:key outputs #:allow-other-keys)
+         (lambda* (#:key inputs outputs #:allow-other-keys)
            (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
                   (doc (string-append data "/doc/" ,name "-" ,version))
                   (info (string-append data "/info"))
                   (html (string-append doc "/html")))
+             ;; Make installed package available for building the
+             ;; documentation
+             (add-installed-pythonpath inputs outputs)
              (with-directory-excursion "doc"
                ;; Produce pdf in 'A4' format.
                (substitute* (find-files "." "conf\\.py")
@@ -3744,15 +3760,11 @@ toolkits.")
     (propagated-inputs
      `(("python2-numpy" ,python2-numpy)
        ("python2-scipy" ,python2-scipy)
-       ("python2-pytz" ,python2-pytz)
-       ("python2-cython" ,python2-cython)))
-    (inputs
-     `(("python2-dateutil-2" ,python2-dateutil-2)
-       ("python2-pandas" ,python2-pandas)
-       ("python2-six" ,python2-six)))
+       ("python2-pandas" ,python2-pandas)))
     (native-inputs
-     `(("unzip" ,unzip)
-       ("python2-setuptools" ,python2-setuptools)))
+     `(("python2-cython" ,python2-cython)))
+    (native-inputs
+     `(("unzip" ,unzip)))
     (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
     (synopsis "Library for reading and manipulating genetic data")
     (description
@@ -3774,15 +3786,15 @@ operators such as union, intersection, and difference.")
         (base32
          "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
     (build-system python-build-system)
+    (propagated-inputs
+     `(("python-six" ,python-six)))
     (inputs
-     `(("python-six" ,python-six)
-       ("readline" ,readline)
+     `(("readline" ,readline)
        ("icu4c" ,icu4c)
        ("pcre" ,pcre)
        ("r" ,r)))
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("zlib" ,zlib)))
+     `(("zlib" ,zlib)))
     (home-page "http://rpy.sourceforge.net/")
     (synopsis "Python interface to the R language")
     (description "rpy2 is a redesign and rewrite of rpy.  It is providing a
@@ -3839,7 +3851,9 @@ functions.")
 libraries = openblas
 library_dirs = ~a/lib
 include_dirs = ~a/include
-[atlas]
+
+# backslash-n to make emacs happy
+\n[atlas]
 library_dirs = ~a/lib
 atlas_libs = openblas
 "
@@ -3849,11 +3863,14 @@ atlas_libs = openblas
           #t)
         (alist-cons-after
          'install 'install-doc
-         (lambda* (#:key outputs #:allow-other-keys)
+         (lambda* (#:key inputs outputs #:allow-other-keys)
            (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
                   (doc (string-append data "/doc/" ,name "-" ,version))
                   (html (string-append doc "/html"))
                   (pyver ,(string-append "PYVER=")))
+             ;; Make installed package available for building the
+             ;; documentation
+             (add-installed-pythonpath inputs outputs)
              (with-directory-excursion "doc"
                ;; Fix generation of images for mathematical expressions.
                (substitute* (find-files "source" "conf\\.py")
@@ -3977,16 +3994,10 @@ simple and Pythonic domain language.")
     (description "@code{pycodestyle} (formerly pep8) is a tool to check
 Python code against some of the style conventions in
 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-pycodestyle))))))
+    (license license:expat)))
 
 (define-public python2-pycodestyle
-  (let ((base (package-with-python2 (strip-python2-variant
-                                     python-pycodestyle))))
-    (package (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-pycodestyle))
 
 (define-public python-orderedmultidict
   (package
@@ -4019,16 +4030,10 @@ Python code against some of the style conventions in
 dictionaries.  A multivalue dictionary is a dictionary that can store
 multiple values for the same key.  An ordered multivalue dictionary is a
 multivalue dictionary that retains the order of insertions and deletions.")
-    (license license:unlicense)
-    (properties `((python2-variant . ,(delay python2-orderedmultidict))))))
+    (license license:unlicense)))
 
 (define-public python2-orderedmultidict
-  (let ((base (package-with-python2 (strip-python2-variant
-                                     python-orderedmultidict))))
-    (package (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-orderedmultidict))
 
 (define-public python-furl
   (package
@@ -4051,16 +4056,10 @@ multivalue dictionary that retains the order of insertions and deletions.")
     (synopsis "URL manipulation in Python")
     (description "Furl provides an easy-to-use alternative to the
 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
-    (license license:unlicense)
-    (properties `((python2-variant . ,(delay python2-furl))))))
+    (license license:unlicense)))
 
 (define-public python2-furl
-  (let ((base (package-with-python2 (strip-python2-variant
-                                     python-furl))))
-    (package (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-furl))
 
 (define-public python-flask-babel
   (package
@@ -4084,28 +4083,22 @@ multivalue dictionary that retains the order of insertions and deletions.")
     (description "This package implements internationalization and localization
 support for Flask.  This is based on the Python babel module as well as pytz -
 both of which are installed automatically if you install this library.")
-    (license license:bsd-3)
-    (properties `((python2-variant . ,(delay python2-flask-babel))))))
+    (license license:bsd-3)))
 
 (define-public python2-flask-babel
-  (let ((base (package-with-python2 (strip-python2-variant
-                                     python-flask-babel))))
-    (package (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-flask-babel))
 
 (define-public python-sqlalchemy-utils
   (package
     (name "python-sqlalchemy-utils")
-    (version "0.32.9")
+    (version "0.32.11")
     (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "SQLAlchemy-Utils" version))
         (sha256
          (base32
-          "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
+          "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
     (build-system python-build-system)
     (propagated-inputs
      `(("python-six" ,python-six)
@@ -4129,16 +4122,10 @@ You might also want to install the following optional dependencies:
 @item @code{python-flask-babel}
 @end enumerate
 ")
-    (properties `((python2-variant . ,(delay python2-sqlalchemy-utils))))
     (license license:bsd-3)))
 
 (define-public python2-sqlalchemy-utils
-  (let ((base (package-with-python2
-                (strip-python2-variant python-sqlalchemy-utils))))
-    (package (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-sqlalchemy-utils))
 
 (define-public python-alembic
   (package
@@ -4165,16 +4152,10 @@ You might also want to install the following optional dependencies:
     (description
      "Alembic is a lightweight database migration tool for usage with the
 SQLAlchemy Database Toolkit for Python.")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-alembic))))))
+    (license license:expat)))
 
 (define-public python2-alembic
-  (let ((alembic (package-with-python2
-                  (strip-python2-variant python-alembic))))
-    (package
-      (inherit alembic)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs alembic))))))
+  (package-with-python2 python-alembic))
 
 (define-public python-distutils-extra
   (package
@@ -4190,8 +4171,6 @@ SQLAlchemy Database Toolkit for Python.")
        (base32
         "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://launchpad.net/python-distutils-extra/")
     (synopsis "Enhancements to Python's distutils")
     (description
@@ -4219,17 +4198,10 @@ Python's distutils.")
         (base32
          "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python2-setuptools" ,python2-setuptools)))
     (arguments
      ;; incompatible with Python 3 (exception syntax)
      `(#:python ,python-2
-       #:tests? #f
-       ;; With standard flags, the install phase attempts to create a zip'd
-       ;; egg file, and fails with an error: 'ZIP does not support timestamps
-       ;; before 1980'
-       #:configure-flags '("--single-version-externally-managed"
-                           "--record=elib.txt")))
+       #:tests? #f))
     (home-page "https://github.com/dieterv/elib.intl")
     (synopsis "Enhanced internationalization for Python")
     (description
@@ -4250,8 +4222,7 @@ services for your Python modules and applications.")
          "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-nose"       ,python-nose)))
+     `(("python-nose"       ,python-nose)))
     (inputs
      `(("freetype" ,freetype)
        ("lcms"     ,lcms)
@@ -4260,27 +4231,16 @@ services for your Python modules and applications.")
        ("openjpeg" ,openjpeg)
        ("libtiff"  ,libtiff)
        ("libwebp"  ,libwebp)))
-    (propagated-inputs
-     `(;; Used at runtime for pkg_resources
-       ("python-setuptools" ,python-setuptools)))
     (arguments
      `(#:phases (modify-phases %standard-phases
-                  (add-before
-                   'install 'disable-egg-compression
-                   (lambda _
-                     ;; Leave the .egg uncompressed since compressing it would
-                     ;; prevent the GC from identifying run-time dependencies.
-                     ;; See <http://bugs.gnu.org/20765>.
-                     (let ((port (open-file "setup.cfg" "a")))
-                       (display "\n[easy_install]\nzip_ok = 0\n"
-                                port)
-                       (close-port port)
-                       #t)))
                   (add-after
                    'install 'check-installed
-                   (lambda _
+                   (lambda* (#:key outputs inputs #:allow-other-keys)
                      (begin
                        (setenv "HOME" (getcwd))
+                       ;; Make installed package available for running the
+                       ;; tests
+                       (add-installed-pythonpath inputs outputs)
                        (and (zero? (system* "python" "selftest.py"
                                             "--installed"))
                             (zero? (system* "python" "test-installed.py"))))))
@@ -4304,39 +4264,36 @@ a general image processing tool.")
 (define-public python-pycparser
   (package
     (name "python-pycparser")
-    (version "2.14")
+    (version "2.17")
     (source
      (origin
       (method url-fetch)
       (uri (pypi-uri "pycparser" version))
       (sha256
        (base32
-        "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
+        "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
     (outputs '("out" "doc"))
     (build-system python-build-system)
     (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("python-setuptools" ,python-setuptools)))
+     `(("pkg-config" ,pkg-config)))
     (arguments
      `(#:phases
-       (alist-replace
-        'check
-        (lambda _
-          (with-directory-excursion "tests"
-            (zero? (system* "python" "all_tests.py"))))
-        (alist-cons-after
-         'install 'install-doc
-         (lambda* (#:key outputs #:allow-other-keys)
-           (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
-                  (doc (string-append data "/doc/" ,name "-" ,version))
-                  (examples (string-append doc "/examples")))
-             (mkdir-p examples)
-             (for-each (lambda (file)
-                         (copy-file (string-append "." file)
-                                    (string-append doc file)))
-                       '("/README.rst" "/CHANGES" "/LICENSE"))
-             (copy-recursively "examples" examples)))
-         %standard-phases))))
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (with-directory-excursion "tests"
+               (zero? (system* "python" "all_tests.py")))))
+         (add-after 'install 'install-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
+                    (doc (string-append data "/doc/" ,name "-" ,version))
+                    (examples (string-append doc "/examples")))
+               (mkdir-p examples)
+               (for-each (lambda (file)
+                           (copy-file (string-append "." file)
+                                      (string-append doc file)))
+                         '("/README.rst" "/CHANGES" "/LICENSE"))
+               (copy-recursively "examples" examples)))))))
     (home-page "https://github.com/eliben/pycparser")
     (synopsis "C parser in Python")
     (description
@@ -4367,8 +4324,7 @@ a front-end for C compilers or analysis tools.")
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("python-sphinx" ,python-sphinx)
-       ("python-pytest" ,python-pytest)
-       ("python-setuptools" ,python-setuptools)))
+       ("python-pytest" ,python-pytest)))
     (arguments
      `(#:phases
        (alist-cons-after
@@ -4406,12 +4362,10 @@ a front-end for C compilers or analysis tools.")
         "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
     (build-system python-build-system)
     (inputs
-     `(("libxcb" ,libxcb)
-       ("python-six" ,python-six)))
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
+     `(("libxcb" ,libxcb)))
     (propagated-inputs
-     `(("python-cffi" ,python-cffi))) ; used at run time
+     `(("python-cffi" ,python-cffi) ; used at run time
+       ("python-six" ,python-six)))
     (arguments
      `(#:phases
        (alist-cons-after
@@ -4455,8 +4409,7 @@ support for Python 3 and PyPy.  It is based on cffi.")
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("python-sphinx" ,python-sphinx)
-       ("python-docutils" ,python-docutils)
-       ("python-setuptools" ,python-setuptools)))
+       ("python-docutils" ,python-docutils)))
     (propagated-inputs
      `(("python-xcffib" ,python-xcffib))) ; used at run time
     (arguments
@@ -4494,17 +4447,15 @@ PNG, PostScript, PDF, and SVG file output.")
 (define-public python-decorator
   (package
     (name "python-decorator")
-    (version "4.0.9")
+    (version "4.0.10")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "decorator" version))
        (sha256
-        (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
+        (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
     (build-system python-build-system)
     (arguments '(#:tests? #f)) ; no test target
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://pypi.python.org/pypi/decorator/")
     (synopsis "Python module to simplify usage of decorators")
     (description
@@ -4535,8 +4486,7 @@ etc.  The core of this module is a decorator factory.")
     ;; should be set to the path of the libdrmaa library.
     (arguments '(#:tests? #f))
     (native-inputs
-     `(("python-nose" ,python-nose)
-       ("python-setuptools" ,python-setuptools)))
+     `(("python-nose" ,python-nose)))
     (home-page "https://pypi.python.org/pypi/drmaa")
     (synopsis "Python bindings for the DRMAA library")
     (description
@@ -4562,12 +4512,10 @@ Python language binding specification.")
        (sha256
         (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
     (build-system python-build-system)
-    (inputs
+    (propagated-inputs
      `(("python-psutil" ,python-psutil)
        ("python-drmaa" ,python-drmaa)
        ("python-pyzmq" ,python-pyzmq)))
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/pygridtools/gridmap")
     (synopsis "Create jobs on a cluster directly from Python")
     (description
@@ -4620,7 +4568,6 @@ child application and control it as if a human were typing commands.")
                (base32
                 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
     (build-system python-build-system)
-    (native-inputs `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/pypa/setuptools_scm/")
     (synopsis "Manage Python package versions in SCM metadata")
     (description
@@ -4643,14 +4590,33 @@ them as the version argument or in a SCM managed file.")
                            "path.py/path.py-" version ".tar.gz"))
        (sha256
         (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
+    (outputs '("out" "doc"))
     (build-system python-build-system)
     (propagated-inputs
      `(("python-appdirs" ,python-appdirs)))
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-setuptools-scm" ,python-setuptools-scm)
+     `(("python-setuptools-scm" ,python-setuptools-scm)
+       ("python-sphinx" ,python-sphinx)
+       ("python-rst.linker" ,python-rst.linker)
        ("python-pytest" ,python-pytest)
        ("python-pytest-runner" ,python-pytest-runner)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'build 'build-doc
+           (lambda _
+             (setenv "LANG" "en_US.UTF-8")
+             (zero? (system* "python" "setup.py" "build_sphinx"))))
+         (add-after 'install 'install-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
+                    (doc (string-append data "/doc/" ,name "-" ,version))
+                    (html (string-append doc "/html")))
+               (mkdir-p html)
+               (for-each (lambda (file)
+                           (copy-file file (string-append doc "/" file)))
+                         '("README.rst" "CHANGES.rst"))
+               (copy-recursively "build/sphinx/html" html)))))))
     (home-page "http://github.com/jaraco/path.py")
     (synopsis "Python module wrapper for built-in os.path")
     (description
@@ -4675,8 +4641,6 @@ common operations on files to be invoked on those path objects directly.")
     (build-system python-build-system)
     (propagated-inputs
      `(("python-pathpy" ,python-pathpy)))
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/vivainio/pickleshare")
     (synopsis "Tiny key value database with concurrency support")
     (description
@@ -4705,8 +4669,7 @@ PickleShare.")
         (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("unzip" ,unzip)))
+     `(("unzip" ,unzip)))
     (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
     (synopsis "Python module for simple generic functions")
     (description
@@ -4722,6 +4685,7 @@ standard library.")
   (package-with-python2 python-simplegeneric))
 
 (define-public python-ipython-genutils
+  ;; TODO: This package is retired, check if can be removed, see description.
   (package
     (name "python-ipython-genutils")
     (version "0.1.0")
@@ -4738,7 +4702,13 @@ standard library.")
     (home-page "http://ipython.org")
     (synopsis "Vestigial utilities from IPython")
     (description
-     "This package provides retired utilities from IPython.")
+     "This package provides retired utilities from IPython.  No packages
+outside IPython/Jupyter should depend on it.
+
+This package shouldn't exist.  It contains some common utilities shared by
+Jupyter and IPython projects during The Big Split.  As soon as possible, those
+packages will remove their dependency on this, and this package will go
+away.")
     (license license:bsd-3)))
 
 (define-public python2-ipython-genutils
@@ -4783,14 +4753,14 @@ without using the configuration machinery.")
 (define-public python-jupyter-core
   (package
     (name "python-jupyter-core")
-    (version "4.2.0")
+    (version "4.2.1")
     (source
      (origin
        (method url-fetch)
        (uri (string-append (pypi-uri "jupyter_core" version)))
        (sha256
         (base32
-         "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
+         "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
     (build-system python-build-system)
     ;; FIXME: not sure how to run the tests
     (arguments `(#:tests? #f))
@@ -4840,13 +4810,13 @@ installing @code{kernelspec}s for use with Jupyter frontends.")
 (define-public python-ipykernel
   (package
     (name "python-ipykernel")
-    (version "4.5.0")
+    (version "4.5.2")
     (source
      (origin
       (method url-fetch)
       (uri (pypi-uri "ipykernel" version))
       (sha256
-       (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
+       (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
     (build-system python-build-system)
     ;; The tests load a submodule of IPython.  However, IPython itself depends
     ;; on ipykernel.
@@ -4907,13 +4877,13 @@ tools for mocking system commands and recording calls to those.")
 (define-public python-ipython
   (package
     (name "python-ipython")
-    (version "4.0.0")
+    (version "4.0.3")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "ipython" version ".tar.gz"))
        (sha256
-        (base32 "1npl8g6bfsff9j938ypx0q5fyzy2l8lp0jl8skjjj2zv0z27dlig"))))
+        (base32 "1h2gp1p06sww9rzfkfzqy489bh47gj3910y2b1wdk3dcx1cqz4is"))))
     (build-system python-build-system)
     (outputs '("out" "doc"))
     (propagated-inputs
@@ -4941,8 +4911,7 @@ tools for mocking system commands and recording calls to those.")
        ("python-nose" ,python-nose)
        ("python-sphinx" ,python-sphinx)
        ("texlive" ,texlive)
-       ("texinfo" ,texinfo)
-       ("python-setuptools" ,python-setuptools)))
+       ("texinfo" ,texinfo)))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
@@ -4956,6 +4925,8 @@ tools for mocking system commands and recording calls to those.")
                    (info (string-append data "/info"))
                    (examples (string-append doc "/examples")))
               (setenv "LANG" "en_US.utf8")
+              ;; Make installed package available for running the tests
+              (add-installed-pythonpath inputs outputs)
               (with-directory-excursion "docs"
                 ;; FIXME: pdf fails to build
                 ;;(system* "make" "pdf" "PAPER=a4")
@@ -4975,9 +4946,11 @@ tools for mocking system commands and recording calls to those.")
          (delete 'check)
          (add-after
           'install 'check
-          (lambda* (#:key outputs tests? #:allow-other-keys)
+          (lambda* (#:key inputs outputs tests? #:allow-other-keys)
             (if tests?
                 (with-directory-excursion "/tmp"
+                  ;; Make installed package available for running the tests
+                  (add-installed-pythonpath inputs outputs)
                   (setenv "HOME" "/tmp/") ;; required by a test
                   (zero? (system* (string-append (assoc-ref outputs "out")
                                                  "/bin/iptest"))))
@@ -5012,9 +4985,9 @@ computing.")
       (arguments
        `(#:tests? #f ,@(package-arguments ipython)))
       ;; FIXME: add pyreadline once available.
-      (inputs
+      (native-inputs
        `(("python2-mock" ,python2-mock)
-         ,@(package-inputs ipython))))))
+         ,@(package-native-inputs ipython))))))
 
 (define-public python-isodate
   (package
@@ -5028,8 +5001,6 @@ computing.")
           (base32
             "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
     (build-system python-build-system)
-    (inputs
-      `(("python-setuptools" ,python-setuptools)))
     (home-page
       "http://cheeseshop.python.org/pypi/isodate")
     (synopsis
@@ -5045,19 +5016,18 @@ ISO 8601 dates, time and duration.")
 (define-public python-html5lib
   (package
     (name "python-html5lib")
-    (version "1.0b8")
+    (version "1.0b10")
     (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "html5lib" version))
         (sha256
           (base32
-            "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
+            "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
     (build-system python-build-system)
     (propagated-inputs
-      `(("python-six" ,python-six))) ; required to "import html5lib"
-    (inputs
-      `(("python-setuptools" ,python-setuptools)))
+     `(("python-six" ,python-six)
+       ("python-webencodings" ,python-webencodings)))
     (arguments
      `(#:test-target "check"))
     (home-page
@@ -5088,6 +5058,46 @@ and written in Python.")
 (define-public python2-html5lib-0.9
   (package-with-python2 python-html5lib-0.9))
 
+(define-public python-webencodings
+  (package
+    (name "python-webencodings")
+    (version "0.5")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "webencodings" version))
+              (sha256
+               (base32
+                "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (home-page "https://github.com/SimonSapin/python-webencodings")
+    (synopsis "Character encoding aliases for legacy web content")
+    (description
+     "In order to be compatible with legacy web content when interpreting
+something like @code{Content-Type: text/html; charset=latin1}, tools need
+to use a particular set of aliases for encoding labels as well as some
+overriding rules.  For example, @code{US-ASCII} and @code{iso-8859-1} on
+the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
+or @code{UTF-16} BOM takes precedence over any other encoding declaration.
+The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
+defines all such details so that implementations do not have to
+reverse-engineer each other.
+
+This module implements the Encoding standard and has encoding labels and
+BOM detection, but the actual implementation for encoders and decoders
+is Python’s.")
+    (license license:bsd-3)))
+
+(define-public python2-webencodings
+  (package-with-python2 python-webencodings))
+
 (define-public python-urwid
   (package
     (name "python-urwid")
@@ -5111,7 +5121,6 @@ and written in Python.")
             (substitute* "urwid/tests/test_event_loops.py"
               (("test_remove_watch_file")
                 "disable_remove_watch_file")))))))
-    (native-inputs `(("python-setuptools" ,python-setuptools)))
     (home-page "http://urwid.org")
     (synopsis "Console user interface library for Python")
     (description
@@ -5122,6 +5131,27 @@ features useful for text console applications.")
 (define-public python2-urwid
   (package-with-python2 python-urwid))
 
+(define-public python2-openid
+  (package
+    (name "python2-openid")
+    (version "2.2.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-openid" version))
+       (sha256
+        (base32
+         "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
+    (build-system python-build-system)
+    (arguments
+     ;; Python 3 support is in `python3-openid`, a separate package.
+     `(#:python ,python-2))
+    (home-page "https://github.com/openid/python-openid")
+    (synopsis "OpenID support for servers and consumers")
+    (description "This library provides OpenID authentication for Python, both
+for clients and servers.")
+    (license license:asl2.0)))
+
 (define-public python-urwidtrees
   (package
     (name "python-urwidtrees")
@@ -5140,7 +5170,7 @@ features useful for text console applications.")
     (build-system python-build-system)
     (arguments
      '(#:tests? #f)) ; no tests
-    (inputs `(("python-urwid" ,python-urwid)))
+    (propagated-inputs `(("python-urwid" ,python-urwid)))
     (home-page "https://github.com/pazz/urwidtrees")
     (synopsis "Tree widgets for urwid")
     (description "Urwidtrees is a Widget Container API for the @code{urwid}
@@ -5209,8 +5239,7 @@ implementation of D-Bus.")
            "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
     (build-system python-build-system)
     (inputs
-      `(("python-setuptools" ,python-setuptools)
-        ("sqlite" ,sqlite)))
+      `(("sqlite" ,sqlite)))
     (arguments
      `(#:phases
         ;; swap check and install phases
@@ -5245,8 +5274,7 @@ translate the complete SQLite API into Python.")
     (build-system python-build-system)
     (inputs
       `(("libxml2" ,libxml2)
-        ("libxslt" ,libxslt)
-        ("python-setuptools" ,python-setuptools)))
+        ("libxslt" ,libxslt)))
     (home-page "http://lxml.de/")
     (synopsis
       "Python XML processing library")
@@ -5292,14 +5320,12 @@ screen-scraping projects.  It offers Pythonic idioms for navigating,
 searching, and modifying a parse tree, providing a toolkit for
 dissecting a document and extracting what you need.  It automatically
 converts incoming documents to Unicode and outgoing documents to UTF-8.")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
+    (license license:expat)))
 
 (define-public python2-beautifulsoup4
   (package
     (inherit (package-with-python2
               (strip-python2-variant python-beautifulsoup4)))
-    (native-inputs `(("python2-setuptools" ,python2-setuptools)))
     (arguments `(#:python ,python-2))))
 
 (define-public python2-cssutils
@@ -5317,8 +5343,6 @@ converts incoming documents to Unicode and outgoing documents to UTF-8.")
     (native-inputs
       `(("python2-mock" ,python2-mock) ; for the tests
         ("unzip" ,unzip))) ; for unpacking the source
-    (inputs
-      `(("python2-setuptools" ,python2-setuptools)))
     (arguments
      `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
        #:tests? #f ; The tests apparently download an external URL.
@@ -5344,8 +5368,6 @@ options.")
          (base32
           "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
     (build-system python-build-system)
-    (inputs
-      `(("python-setuptools" ,python-setuptools)))
     (arguments
      ;; tests fail with message
      ;; AttributeError: 'module' object has no attribute 'tests'
@@ -5363,6 +5385,49 @@ another XPath engine to find the matching elements in an XML or HTML document.")
 (define-public python2-cssselect
   (package-with-python2 python-cssselect))
 
+(define-public python-openid-cla
+  (package
+    (name "python-openid-cla")
+    (version "1.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-openid-cla" version))
+       (sha256
+        (base32
+         "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/puiterwijk/python-openid-cla/")
+    (synopsis "Implementation of the OpenID CLA extension for python-openid")
+    (description "@code{openid-cla} is an implementation of the OpenID
+contributor license agreement extension for python-openid.")
+    (license license:bsd-3)))
+
+(define-public python2-openid-cla
+  (package-with-python2 python-openid-cla))
+
+(define-public python-openid-teams
+  (package
+    (name "python-openid-teams")
+    (version "1.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-openid-teams" version))
+       (sha256
+        (base32
+         "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/puiterwijk/python-openid-teams/")
+    (synopsis "Implementation of the OpenID teams extension for python-openid")
+    (description
+     "@code{openid-teams} is an implementation of the OpenID
+teams extension for python-openid.")
+    (license license:bsd-3)))
+
+(define-public python2-openid-teams
+  (package-with-python2 python-openid-teams))
+
 (define-public python-netifaces
   (package
     (name "python-netifaces")
@@ -5378,8 +5443,6 @@ another XPath engine to find the matching elements in an XML or HTML document.")
           (base32
             "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
     (build-system python-build-system)
-    (inputs
-      `(("python-setuptools" ,python-setuptools)))
     (home-page
       "https://bitbucket.org/al45tair/netifaces")
     (synopsis
@@ -5407,8 +5470,7 @@ interfaces in an easy and portable manner.")
     (propagated-inputs
      `(("python-decorator" ,python-decorator)))
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-nose" ,python-nose)))
+     `(("python-nose" ,python-nose)))
     (home-page "http://networkx.github.io/")
     (synopsis "Python module for creating and manipulating graphs and networks")
     (description
@@ -5432,7 +5494,6 @@ of the structure, dynamics, and functions of complex networks.")
        (sha256
         (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
     (build-system python-build-system)
-    (inputs `(("python-setuptools" ,python-setuptools)))
     (home-page "https://bitbucket.org/johanneskoester/snakemake")
     (synopsis "Python-based execution environment for make-like workflows")
     (description
@@ -5471,9 +5532,7 @@ and statistical routines from scipy and statsmodels.")
     (package
       (inherit base)
       (propagated-inputs `(("python2-pytz" ,python2-pytz)
-                           ,@(package-propagated-inputs base)))
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs base))))))
+                           ,@(package-propagated-inputs base))))))
 
 (define-public python-sympy
   (package
@@ -5488,8 +5547,6 @@ and statistical routines from scipy and statsmodels.")
        (sha256
         (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://www.sympy.org/")
     (synopsis "Python library for symbolic mathematics")
     (description
@@ -5519,16 +5576,10 @@ as possible in order to be comprehensible and easily extensible.")
      "q is a Python module for \"print\" style of debugging Python code.  It
 provides convenient short API for print out of values, tracebacks, and
 falling into the Python interpreter.")
-    (license license:asl2.0)
-    (properties `((python2-variant . ,(delay python2-q))))))
+    (license license:asl2.0)))
 
 (define-public python2-q
-  (let ((base (package-with-python2 (strip-python2-variant python-q))))
-    (package
-      (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-q))
 
 (define-public python-testlib
   (package
@@ -5543,21 +5594,8 @@ falling into the Python interpreter.")
        (sha256
         (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
     (build-system python-build-system)
-    (inputs
-      `(("python-setuptools" ,python-setuptools)))
     (native-inputs
-     `(("unzip" ,unzip)))
-    (arguments
-     `(#:phases
-       (alist-replace
-        'unpack
-        (lambda* (#:key inputs outputs #:allow-other-keys)
-          (let ((unzip (string-append (assoc-ref inputs "unzip")
-                                      "/bin/unzip"))
-                (source (assoc-ref inputs "source")))
-            (and (zero? (system* unzip source))
-                 (chdir (string-append "testlib-" ,version)))))
-        %standard-phases)))
+     `(("unzip" ,unzip)))  ; for unpacking the source
     (synopsis "Python micro test suite harness")
     (description "A micro unittest suite harness for Python.")
     (home-page "https://github.com/trentm/testlib")
@@ -5582,8 +5620,6 @@ falling into the Python interpreter.")
     (arguments
      `(#:python ,python-2                         ;Python 2 only
        #:tests? #f))                              ;no tests
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://python-xlib.sourceforge.net/")
     (synopsis "Python X11 client library")
     (description
@@ -5605,9 +5641,7 @@ It is written entirely in Python.")
          "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
-    (inputs
-     `(("python-six" ,python-six)))
+     `(("python-six" ,python-six))) ; required for conversion, not at run-time
     (home-page
      "http://docs.python.org/3/library/functools.html#functools.singledispatch")
     (synopsis "Backport of singledispatch feature from Python 3.4")
@@ -5632,7 +5666,7 @@ It is written entirely in Python.")
     (build-system python-build-system)
     (native-inputs
      `(("python-certifi" ,python-certifi)))
-    (inputs
+    (propagated-inputs
      `(("python-backports-abc" ,python-backports-abc)))
     (home-page "http://www.tornadoweb.org/")
     (synopsis "Python web framework and asynchronous networking library")
@@ -5648,30 +5682,25 @@ connection to each user.")
 (define-public python2-tornado
   (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
     (package (inherit tornado)
-      (inputs
+      (propagated-inputs
        `(("python2-backport-ssl-match-hostname"
           ,python2-backport-ssl-match-hostname)
          ("python2-singledispatch" ,python2-singledispatch)
-          ,@(package-inputs tornado)))
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs tornado))))))
+          ,@(package-propagated-inputs tornado))))))
 
 ;; the python- version can be removed with python-3.5
 (define-public python-backports-abc
   (package
     (name "python-backports-abc")
-      (version "0.4")
+      (version "0.5")
       (source
         (origin
           (method url-fetch)
           (uri (pypi-uri "backports_abc" version))
           (sha256
            (base32
-            "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
+            "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/cython/backports_abc")
     (synopsis "Backport of additions to the 'collections.abc' module")
     (description
@@ -5737,8 +5766,7 @@ applications.")
      `(("zeromq" ,zeromq)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
-       ("python-nose" ,python-nose)
-       ("python-setuptools" ,python-setuptools)))
+       ("python-nose" ,python-nose)))
     (home-page "http://github.com/zeromq/pyzmq")
     (synopsis "Python bindings for 0MQ")
     (description
@@ -5760,8 +5788,6 @@ applications.")
           (base32
             "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
     (build-system python-build-system)
-    (inputs
-      `(("python-setuptools" ,python-setuptools)))
     (home-page "http://pep8.readthedocs.org/")
     (synopsis "Python style guide checker")
     (description
@@ -5784,8 +5810,6 @@ PEP 8.")
           (base32
             "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
     (build-system python-build-system)
-    (inputs
-      `(("python-setuptools" ,python-setuptools)))
     (home-page
       "https://github.com/pyflakes/pyflakes")
     (synopsis "Passive checker of Python programs")
@@ -5808,10 +5832,9 @@ PEP 8.")
           (base32
             "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
     (build-system python-build-system)
-    (inputs
+    (native-inputs
       `(("python-pytest" ,python-pytest)
-        ("python-pytest-runner" ,python-pytest-runner)
-        ("python-setuptools" ,python-setuptools)))
+        ("python-pytest-runner" ,python-pytest-runner)))
     (home-page "https://github.com/flintwork/mccabe")
     (synopsis "McCabe checker, plugin for flake8")
     (description
@@ -5831,8 +5854,7 @@ complexity of Python source code.")
         (uri (pypi-uri "mccabe" version))
         (sha256
           (base32
-            "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))
-    (inputs `(("python-setuptools" ,python-setuptools)))))
+            "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
 
 (define-public python2-mccabe-0.2.1
   (package-with-python2 python-mccabe-0.2.1))
@@ -5885,14 +5907,22 @@ complexity of Python source code.")
         (uri (pypi-uri "flake8" version))
         (sha256
           (base32
-            "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
+            "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
+        (modules '((guix build utils)))
+        (snippet
+         '(begin
+            ;; Remove pre-compiled .pyc files from source.
+            (for-each delete-file-recursively
+                      (find-files "." "__pycache__" #:directories? #t))
+            (for-each delete-file (find-files "." "\\.pyc$"))
+            #t))))
     (build-system python-build-system)
-    (inputs
-      `(("python-setuptools" ,python-setuptools)
-        ("python-pep8" ,python-pep8)
+    (propagated-inputs
+      `(("python-pep8" ,python-pep8)
         ("python-pyflakes" ,python-pyflakes)
-        ("python-mccabe" ,python-mccabe)
-        ("python-mock" ,python-mock)
+        ("python-mccabe" ,python-mccabe)))
+    (native-inputs
+      `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
         ("python-nose" ,python-nose)))
     (home-page "https://gitlab.com/pycqa/flake8")
     (synopsis
@@ -5908,12 +5938,12 @@ complexity of Python source code.")
 ;; necessary once python-hacking > 0.10.2 is released.
 (define-public python-flake8-2.2.4
   (package (inherit python-flake8)
-    (inputs
-      `(("python-setuptools" ,python-setuptools)
-        ("python-pep8" ,python-pep8-1.5.7)
+    (propagated-inputs
+      `(("python-pep8" ,python-pep8-1.5.7)
         ("python-pyflakes" ,python-pyflakes-0.8.1)
-        ("python-mccabe" ,python-mccabe-0.2.1)
-        ("python-mock" ,python-mock)
+        ("python-mccabe" ,python-mccabe-0.2.1)))
+    (native-inputs
+      `(("python-mock" ,python-mock)
         ("python-nose" ,python-nose)))
     (version "2.2.4")
     (source
@@ -5922,7 +5952,15 @@ complexity of Python source code.")
         (uri (pypi-uri "flake8" version))
         (sha256
           (base32
-            "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
+            "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
+        (modules '((guix build utils)))
+        (snippet
+         '(begin
+            ;; Remove pre-compiled .pyc files from source.
+            (for-each delete-file-recursively
+                      (find-files "." "__pycache__" #:directories? #t))
+            (for-each delete-file (find-files "." "\\.pyc$"))
+            #t))))))
 
 (define-public python2-flake8-2.2.4
   (package-with-python2 python-flake8-2.2.4))
@@ -5942,9 +5980,8 @@ complexity of Python source code.")
         (base32
          "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-nose" ,python-nose)
+    (native-inputs
+     `(("python-nose" ,python-nose)
        ("python-cython" ,python-cython)))
     (home-page "https://github.com/lepture/mistune")
     (synopsis "Markdown parser in pure Python")
@@ -5958,14 +5995,14 @@ Python.")
 (define-public python-markdown
   (package
     (name "python-markdown")
-    (version "2.6.5")
+    (version "2.6.7")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "Markdown" version))
        (sha256
         (base32
-         "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
+         "1h055llfd0ps0ig7qb3v1j9068xv90dc9s7xkhkgz9zg8r4g5sys"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -6002,9 +6039,8 @@ markdown_py is also provided to convert Markdown files to HTML.")
         (base32
          "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-nose" ,python-nose)))
+    (native-inputs
+     `(("python-nose" ,python-nose)))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
@@ -6057,10 +6093,29 @@ term.js Javascript terminal emulator library.")
       (propagated-inputs
        `(("python2-backport-ssl-match-hostname"
           ,python2-backport-ssl-match-hostname)
-          ,@(package-propagated-inputs terminado)))
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs terminado))))))
+          ,@(package-propagated-inputs terminado))))))
+
+(define-public python-straight-plugin
+  (package
+    (name "python-straight-plugin")
+    (version "1.4.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "straight.plugin" version))
+       (sha256
+        (base32
+         "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/ironfroggy/straight.plugin")
+    (synopsis "Simple namespaced plugin facility")
+    (description "Straight Plugin provides a type of plugin you can create from
+almost any existing Python modules, and an easy way for outside developers to
+add functionality and customization to your projects with their own plugins.")
+    (license license:expat)))
+
+(define-public python2-straight-plugin
+  (package-with-python2 python-straight-plugin))
 
 (define-public python-fonttools
   (package
@@ -6075,15 +6130,23 @@ term.js Javascript terminal emulator library.")
                (base32
                 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
     (build-system python-build-system)
-    (arguments '(#:test-target "check"))
-    (propagated-inputs
-     ;; XXX: module not found if setuptools is not available.
-     `(("python-setuptools" ,python-setuptools)))
+    (arguments
+     '(#:test-target "check"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-setuppy
+           ;; Remove the undocumented "extra_path" argument, which adds an
+           ;; intervening directories between site-packages and the package
+           ;; directory.
+           (lambda _
+             (substitute* "setup.py"
+               (("^[ \t]*extra_path *= *'FontTools',") ""))
+             #t)))))
     (home-page "http://github.com/behdad/fonttools")
     (synopsis "Tools to manipulate font files")
     (description
      "FontTools/TTX is a library to manipulate font files from Python.  It
-supports reading and writinfg of TrueType/OpenType fonts, reading and writing
+supports reading and writing of TrueType/OpenType fonts, reading and writing
 of AFM files, reading (and partially writing) of PS Type 1 fonts.  The package
 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
 from an XML-based format.")
@@ -6108,8 +6171,6 @@ from an XML-based format.")
         (base32
          "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (synopsis "Tool and library for manipulating LilyPond files")
     (description "This package provides a Python library to parse, manipulate
 or create documents in LilyPond format.  A command line program ly is also
@@ -6132,8 +6193,6 @@ provided that can be used to do various manipulations with LilyPond files.")
           (base32
             "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
     (build-system python-build-system)
-    (inputs
-      `(("python-setuptools" ,python-setuptools)))
     (home-page "http://github.com/ActiveState/appdirs")
     (synopsis
       "Determine platform-specific dirs, e.g. a \"user data dir\"")
@@ -6162,8 +6221,7 @@ should be stored on various operating systems.")
      `(("fuse" ,fuse)
        ("attr" ,attr)))
     (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("python-setuptools" ,python-setuptools)))
+     `(("pkg-config" ,pkg-config)))
     (synopsis "Python bindings for FUSE")
     (description
      "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
@@ -6208,14 +6266,10 @@ should be stored on various operating systems.")
 suitable for similar data to JSON.  This package provides CPython bindings for
 reading and writing MessagePack data.")
     (home-page "https://pypi.python.org/pypi/msgpack-python/")
-    (license license:asl2.0)
-    (properties `((python2-variant . ,(delay python2-msgpack))))))
+    (license license:asl2.0)))
 
 (define-public python2-msgpack
-  (package (inherit (package-with-python2
-                     (strip-python2-variant python-msgpack)))
-    (native-inputs
-     `(("python2-setuptools" ,python2-setuptools)))))
+  (package-with-python2 python-msgpack))
 
 (define-public python-netaddr
   (package
@@ -6233,8 +6287,6 @@ reading and writing MessagePack data.")
           "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
     (build-system python-build-system)
     (arguments `(#:tests? #f)) ;; No tests.
-    (inputs
-      `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/drkjam/netaddr/")
     (synopsis "Pythonic manipulation of  network addresses")
     (description
@@ -6264,8 +6316,6 @@ and MAC network addresses.")
      ;; Tests are not included in the tarball, they are only available in the
      ;; git repository.
      `(#:tests? #f))
-    (inputs
-      `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/GrahamDumpleton/wrapt")
     (synopsis "Module for decorators, wrappers and monkey patching")
     (description
@@ -6289,8 +6339,6 @@ and MAC network addresses.")
        (base32
         "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
   (build-system python-build-system)
-  (inputs
-    `(("python-setuptools" ,python-setuptools)))
   (home-page "https://bitbucket.org/micktwomey/pyiso8601")
   (synopsis "Module to parse ISO 8601 dates")
   (description
@@ -6316,8 +6364,6 @@ and MAC network addresses.")
           (base32
             "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
     (build-system python-build-system)
-    (inputs
-      `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/atdt/monotonic")
     (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
     (description
@@ -6340,9 +6386,8 @@ fractional seconds) of a clock which never goes backwards.")
         (base32
          "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
     (build-system python-build-system)
-    (inputs
-      `(("python-nose" ,python-nose)
-        ("python-setuptools" ,python-setuptools)))
+    (native-inputs
+      `(("python-nose" ,python-nose)))
     (home-page "http://webob.org/")
     (synopsis "WSGI request and response object")
     (description
@@ -6370,8 +6415,7 @@ object to help create WSGI responses.")
          ;; Current test in setup.py does not work as of 1.0.0, so use nose to
          ;; run tests instead for now.
          (replace 'check (lambda _ (zero? (system* "nosetests")))))))
-    (native-inputs `(("python-nose"       ,python-nose)
-                     ("python-setuptools" ,python-setuptools)))
+    (native-inputs `(("python-nose"       ,python-nose)))
     (home-page "http://www.python-excel.org/")
     (synopsis "Library for extracting data from Excel files")
     (description "This packages provides a library to extract data from
@@ -6397,8 +6441,6 @@ Unicode-aware.  It is not intended as an end-user tool.")
         (base32
          "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
     (build-system python-build-system)
-    (inputs
-      `(("python-setuptools" ,python-setuptools)))
     (home-page "http://code.google.com/p/prettytable/")
     (synopsis "Display tabular data in an ASCII table format")
     (description
@@ -6421,7 +6463,15 @@ printing of sub-tables by specifying a row range.")
        (uri (pypi-uri "tables" version))
        (sha256
         (base32
-         "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))))
+         "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; Remove pre-compiled .pyc files from source.
+           (for-each delete-file-recursively
+                     (find-files "." "__pycache__" #:directories? #t))
+           (for-each delete-file (find-files "." "\\.pyc$"))
+           #t))))
     (build-system python-build-system)
     (arguments
      `(;; FIXME: python-build-system does not pass configure-flags to "build"
@@ -6452,8 +6502,7 @@ printing of sub-tables by specifying a row range.")
      `(("python-numexpr" ,python-numexpr)
        ("python-numpy" ,python-numpy)))
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-cython" ,python-cython)
+     `(("python-cython" ,python-cython)
        ("pkg-config" ,pkg-config)))
     (inputs
      `(("hdf5" ,hdf5)
@@ -6502,11 +6551,9 @@ suitable for a wide range of protocols based on the ASN.1 specification.")
          (base32
           "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (propagated-inputs
      `(("python-pyasn1" ,python-pyasn1)))
-    (home-page "http://sourceforge.net/projects/pyasn1/")
+    (home-page "https://sourceforge.net/projects/pyasn1/")
     (synopsis "ASN.1 codec implementations")
     (description
      "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
@@ -6534,15 +6581,10 @@ implementations of ASN.1-based codecs and protocols.")
  in Python.  This library is used to create, poke at, and manipulate IPv4 and
  IPv6 addresses and networks.  This is a port of the Python 3.3 ipaddress
  module to older versions of Python.")
-    (license license:psfl)
-    (properties `((python2-variant . ,(delay python2-ipaddress))))))
+    (license license:psfl)))
 
 (define-public python2-ipaddress
-  (let ((base (package-with-python2 (strip-python2-variant python-ipaddress))))
-    (package (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-ipaddress))
 
 (define-public python2-ipaddr
   (package
@@ -6586,8 +6628,6 @@ versions of Python.")
         (base32
          "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/kjd/idna")
     (synopsis "Internationalized domain names in applications")
     (description
@@ -6616,8 +6656,6 @@ specification.")
         (base32
          "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/alex/pretend")
     (synopsis "Library for stubbing in Python")
     (description
@@ -6633,17 +6671,15 @@ responses, rather than doing any computation.")
 (define-public python-cryptography-vectors
   (package
     (name "python-cryptography-vectors")
-    (version "1.5.3")
+    (version "1.7.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "cryptography_vectors" version))
        (sha256
         (base32
-         "1bnd1bricyhxa27rhr0ljk0kacxzvysd3ar2j2hlv13a2k6zw4z5"))))
+         "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/pyca/cryptography")
     (synopsis "Test vectors for the cryptography package")
     (description
@@ -6657,29 +6693,15 @@ responses, rather than doing any computation.")
 (define-public python-cryptography
   (package
     (name "python-cryptography")
-    (version "1.5.3")
+    (version "1.7.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "cryptography" version))
        (sha256
         (base32
-         "1raanvkdfw5ai56ymlij6ghc4k126fs7jx948ig7yn4vj6ndv0ng"))))
+         "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
     (build-system python-build-system)
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'check 'disable-failing-test
-           (lambda _
-             ;; This test is known to fail with OpenSSL >= 1.0.2i and older
-             ;; versions of python-cryptography:
-             ;; https://github.com/pyca/cryptography/issues/3196
-             ;; TODO: Try re-enabling the test when upgrading
-             ;; python-cryptography.
-             (substitute* "tests/hazmat/backends/test_openssl.py"
-               (("def test_numeric_string_x509_name_entry")
-                 "@pytest.mark.xfail\n    def test_numeric_string_x509_name_entry"))
-             #t)))))
     (inputs
      `(("openssl" ,openssl)))
     (propagated-inputs
@@ -6691,7 +6713,6 @@ responses, rather than doing any computation.")
     (native-inputs
      `(("python-cryptography-vectors" ,python-cryptography-vectors)
        ("python-hypothesis" ,python-hypothesis)
-       ("python-setuptools" ,python-setuptools)
        ("python-pretend" ,python-pretend)
        ("python-pyasn1" ,python-pyasn1)
        ("python-pyasn1-modules" ,python-pyasn1-modules)
@@ -6737,8 +6758,6 @@ message digests and key derivation functions.")
        ("python-six" ,python-six)))
     (inputs
      `(("openssl" ,openssl)))
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/pyca/pyopenssl")
     (synopsis "Python wrapper module around the OpenSSL library")
     (description
@@ -6761,10 +6780,9 @@ library.")
         (base32
          "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
     (build-system python-build-system)
-    (inputs
-      `(("python-setuptools" ,python-setuptools)
+    (native-inputs
+      `(;; Tests
         ("python-virtualenv" ,python-virtualenv)
-        ;; Tests
         ("python-mock" ,python-mock)
         ("python-pytest" ,python-pytest)
         ("python-scripttest" ,python-scripttest)))
@@ -6869,18 +6887,9 @@ a hash value.")
                        (substitute* "libarchive/ffi.py"
                          (("find_library\\('archive'\\)")
                           (string-append "'" libarchive
-                                         "/lib/libarchive.so'"))))
-
-                     ;; Do not make a compressed egg (see
-                     ;; <http://bugs.gnu.org/20765>).
-                     (let ((port (open-file "setup.cfg" "a")))
-                       (display "\n[easy_install]\nzip_ok = 0\n"
-                                port)
-                       (close-port port)
-                       #t))))))
+                                         "/lib/libarchive.so'")))))))))
     (inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("libarchive" ,libarchive)))
+     `(("libarchive" ,libarchive)))
     (home-page "https://github.com/Changaco/python-libarchive-c")
     (synopsis "Python interface to libarchive")
     (description
@@ -6921,17 +6930,10 @@ Python's @code{ctypes} foreign function interface (FFI).")
     (synopsis "Python bindings to the libmagic file type guesser.  Note that
 this module and the python-magic module both provide a \"magic.py\" file;
 these two modules, which are different and were developed separately, both
-serve the same purpose: provide Python bindings for libmagic.")
-    (properties `((python2-variant . ,(delay python2-file))))))
+serve the same purpose: provide Python bindings for libmagic.")))
 
 (define-public python2-file
-  (let ((base (package-with-python2 (strip-python2-variant python-file))))
-    (package
-      (inherit base)
-      (source (package-source file))
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-file))
 
 (define-public python-debian
   (package
@@ -6947,10 +6949,8 @@ serve the same purpose: provide Python bindings for libmagic.")
         (base32
          "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
     (build-system python-build-system)
-    (inputs
+    (propagated-inputs
      `(("python-six" ,python-six)))
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://packages.debian.org/sid/python-debian")
     (synopsis "Debian package related modules")
     (description
@@ -6993,8 +6993,6 @@ Debian-related files, such as:
        ("python-jsonschema" ,python-jsonschema)
        ("python-jupyter-core" ,python-jupyter-core)
        ("python-traitlets" ,python-traitlets)))
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://jupyter.org")
     (synopsis "Jupyter Notebook format")
     (description "This package provides the reference implementation of the
@@ -7018,7 +7016,6 @@ Jupyter Notebook format and Python APIs for working with notebooks.")
     (build-system python-build-system)
     (propagated-inputs
      `(("python-html5lib" ,python-html5lib-0.9)
-       ("python-setuptools" ,python-setuptools)
        ("python-six" ,python-six)))
     (native-inputs
      `(("python-nose" ,python-nose)))
@@ -7093,7 +7090,6 @@ functions to find and load entry points.")
        ("python-mistune" ,python-mistune)
        ("python-nbformat" ,python-nbformat)
        ("python-pygments" ,python-pygments)
-       ("python-setuptools" ,python-setuptools)
        ("python-traitlets" ,python-traitlets)))
     (home-page "http://jupyter.org")
     (synopsis "Converting Jupyter Notebooks")
@@ -7148,10 +7144,28 @@ convert an @code{.ipynb} notebook file into various static formats including:
     (description
      "The Jupyter HTML notebook is a web-based notebook environment for
 interactive computing.")
+    (properties `((python2-variant . ,(delay python2-notebook))))
     (license license:bsd-3)))
 
 (define-public python2-notebook
-  (package-with-python2 python-notebook))
+  (let ((base (package-with-python2
+                (strip-python2-variant python-notebook))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-mock" ,python2-mock)
+         ,@(package-native-inputs base)))
+      (arguments
+       (substitute-keyword-arguments (package-arguments base)
+         ((#:phases phases)
+          `(modify-phases ,phases
+             (add-before 'check 'disable-test-case
+              ;; The test requires network access to localhost. Curiously it
+              ;; fails with Python 2 only. Simply make the test-case return
+              ;; immediately.
+              (lambda _
+                (substitute*
+                    "notebook/services/nbconvert/tests/test_nbconvert_api.py"
+                  (("formats = self.nbconvert_api") "return #")))))))))))
 
 (define-public python-widgetsnbextension
   (package
@@ -7168,8 +7182,7 @@ interactive computing.")
     (propagated-inputs
      `(("python-notebook" ,python-notebook)))
     (native-inputs
-     `(("python-nose" ,python-nose)
-       ("python-setuptools" ,python-setuptools)))
+     `(("python-nose" ,python-nose)))
     (home-page "http://ipython.org")
     (synopsis "IPython HTML widgets for Jupyter")
     (description "This package provides interactive HTML widgets for Jupyter
@@ -7196,7 +7209,6 @@ notebooks.")
     (propagated-inputs
      `(("python-ipykernel" ,python-ipykernel)
        ("python-ipython" ,python-ipython)
-       ("python-setuptools" ,python-setuptools)
        ("python-traitlets" ,python-traitlets)
        ("python-widgetsnbextension" ,python-widgetsnbextension)))
     (home-page "http://ipython.org")
@@ -7229,8 +7241,7 @@ in the data.")
        ("python-ipython" ,python-ipython)
        ("python-jupyter-client" ,python-jupyter-client)
        ("python-prompt-toolkit" ,python-prompt-toolkit)
-       ("python-pygments" ,python-pygments)
-       ("python-setuptools" ,python-setuptools)))
+       ("python-pygments" ,python-pygments)))
     (home-page "https://jupyter.org")
     (synopsis "Jupyter terminal console")
     (description "This package provides a terminal-based console frontend for
@@ -7260,8 +7271,7 @@ Jupyter kernels such as IJulia and IRKernel.")
        ("python-ipywidgets" ,python-ipywidgets)
        ("python-jupyter-console" ,python-jupyter-console)
        ("python-nbconvert" ,python-nbconvert)
-       ("python-notebook" ,python-notebook)
-       ("python-setuptools" ,python-setuptools)))
+       ("python-notebook" ,python-notebook)))
     (home-page "http://jupyter.org")
     (synopsis "Web application for interactive documents")
     (description
@@ -7286,8 +7296,6 @@ simulation, statistical modeling, machine learning and much more.")
         (base32
          "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/chardet/chardet")
     (synopsis "Universal encoding detector for Python 2 and 3")
     (description
@@ -7315,8 +7323,7 @@ automatically detect a wide range of file encodings.")
          "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-pytest" ,python-pytest)
-       ("python-setuptools" ,python-setuptools)))
+     `(("python-pytest" ,python-pytest)))
     (arguments
      `(#:phases (alist-replace
                  'check
@@ -7346,8 +7353,6 @@ programatically with command-line parsers like @code{getopt} and
         (base32
          "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://pypi.python.org/pypi/zope.event")
     (synopsis "Event publishing system for Python")
     (description "Zope.event provides an event publishing API, intended for
@@ -7372,7 +7377,7 @@ dispatching systems can be built.")
         (base32
          "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
     (build-system python-build-system)
-    (propagated-inputs
+    (native-inputs
      `(("python-zope-event" ,python-zope-event)))
     (home-page "https://github.com/zopefoundation/zope.interface")
     (synopsis "Python implementation of the \"design by contract\"
@@ -7460,6 +7465,7 @@ forms, HTTP servers, regular expressions, and more.")
     (build-system python-build-system)
     (native-inputs
      `(("python-six" ,python-six)
+       ;("python-zope-interface" ,python-zope-interface)
        ("python-zope-exceptions" ,python-zope-exceptions)
        ("python-zope-testing" ,python-zope-testing)
        ("unzip" ,unzip)))
@@ -7495,8 +7501,6 @@ tests.")
         (base32
          "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
     (synopsis "Message identifiers for internationalization")
     (description "Zope.i18nmessageid provides facilities for declaring
@@ -7523,7 +7527,9 @@ internationalized messages within program source text.")
      `(("python-zope-event" ,python-zope-event)
        ("python-zope-interface" ,python-zope-interface)))
     (native-inputs
-     `(("python-zope-testing" ,python-zope-testing)))
+     `(("python-zope-testing" ,python-zope-testing)
+       ("python-coverage" ,python-coverage)
+       ("python-nose" ,python-nose)))
     (home-page "http://pypi.python.org/pypi/zope.schema")
     (synopsis "Zope data schemas")
     (description "Zope.scheme provides extensions to zope.interface for
@@ -7598,7 +7604,7 @@ brokering, etc.) for which the proxy is responsible.")
         (base32
          "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
     (build-system python-build-system)
-    (native-inputs
+    (propagated-inputs
      `(("python-zope-proxy" ,python-zope-proxy)
        ("python-zope-schema" ,python-zope-schema)))
     (home-page "http://pypi.python.org/pypi/zope.location/")
@@ -7625,10 +7631,12 @@ Zope3, which are are special objects that have a structural location.")
     (build-system python-build-system)
     (propagated-inputs
      `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
-       ("python-zope-component" ,python-zope-component)
-       ("python-zope-location" ,python-zope-location)
        ("python-zope-proxy" ,python-zope-proxy)
-       ("python-zope-schema" ,python-zope-schema)
+       ("python-zope-schema" ,python-zope-schema)))
+     (native-inputs
+     `(("python-zope-component" ,python-zope-component)
+       ("python-zope-configuration" ,python-zope-configuration)
+       ("python-zope-location" ,python-zope-location)
        ("python-zope-testrunner" ,python-zope-testrunner)
        ("python-zope-testing" ,python-zope-testing)))
     (home-page "http://pypi.python.org/pypi/zope.security")
@@ -7741,8 +7749,7 @@ This allows one to make simple text-mode user interfaces on Unix-like systems")
     (propagated-inputs
      `(("python-pytz" ,python-pytz)))
     (native-inputs
-     `(("python-nose" ,python-nose)
-       ("python-setuptools" ,python-setuptools)))
+     `(("python-nose" ,python-nose)))
     (home-page "https://github.com/kurtraschke/pyRFC3339")
     (synopsis "Python timestamp library")
     (description "Python library for generating and parsing RFC 3339-compliant
@@ -7755,14 +7762,14 @@ timestamps.")
 (define-public python-werkzeug
   (package
     (name "python-werkzeug")
-    (version "0.11.11")
+    (version "0.11.15")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "Werkzeug" version))
        (sha256
         (base32
-         "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
+         "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-pytest" ,python-pytest)))
@@ -7794,9 +7801,8 @@ addon modules.")
               ;; required to parse the keyword 'install_requires' in setup.py.
               (patches (search-patches "python-configobj-setuptools.patch"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-six" ,python-six)))
+    (propagated-inputs
+     `(("python-six" ,python-six)))
     (synopsis "Config file reading, writing and validation")
     (description "ConfigObj is a simple but powerful config file reader and
 writer: an ini file round tripper.  Its main feature is that it is very easy to
@@ -7837,15 +7843,13 @@ be set via config files and/or environment variables.")
 (define-public python-ndg-httpsclient
   (package
     (name "python-ndg-httpsclient")
-    (version "0.4.0")
+    (version "0.4.2")
     (source (origin
               (method url-fetch)
-              (uri (string-append
-                    "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
-                    "ndg_httpsclient-" version ".tar.gz"))
+              (uri (pypi-uri "ndg_httpsclient" version))
               (sha256
                 (base32
-                  "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
+                  "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
     (build-system python-build-system)
     (arguments
      '(;; The tests appear to require networking.
@@ -7934,10 +7938,8 @@ tables.")
         (base32
          "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-six" ,python-six))) ; for tests
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
+    (propagated-inputs
+     `(("python-six" ,python-six)))
     (home-page "https://github.com/liris/websocket-client")
     (synopsis "WebSocket client for Python")
     (description "The Websocket-client module provides the low level APIs for
@@ -7962,14 +7964,10 @@ WebSocket usage in Python programs.")
     (description "Library for atomic file writes using platform dependent tools
 for atomic file system operations.")
     (home-page "https://github.com/untitaker/python-atomicwrites")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-atomicwrites))))))
+    (license license:expat)))
 
 (define-public python2-atomicwrites
-  (package (inherit (package-with-python2
-                     (strip-python2-variant python-atomicwrites)))
-    (native-inputs
-     `(("python2-setuptools" ,python2-setuptools)))))
+  (package-with-python2 python-atomicwrites))
 
 (define-public python-requests-toolbelt
   (package
@@ -8022,13 +8020,13 @@ applications.")
 (define-public python-click-log
   (package
     (name "python-click-log")
-    (version "0.1.3")
+    (version "0.1.8")
     (source (origin
              (method url-fetch)
              (uri (pypi-uri "click-log" version))
              (sha256
               (base32
-               "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
+               "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
     (build-system python-build-system)
     (propagated-inputs
      `(("python-click" ,python-click)))
@@ -8049,22 +8047,17 @@ applications.")
               (base32
                "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
     (build-system python-build-system)
-    (inputs
+    (native-inputs
      `(("python-pytest" ,python-pytest)))
     (synopsis "Namespace control and lazy-import mechanism")
     (description "With apipkg you can control the exported namespace of a Python
 package and greatly reduce the number of imports for your users.  It is a small
 pure Python module that works on virtually all Python versions.")
     (home-page "https://bitbucket.org/hpk42/apipkg")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-apipkg))))))
+    (license license:expat)))
 
 (define-public python2-apipkg
-  (package
-    (inherit (package-with-python2
-              (strip-python2-variant python-apipkg)))
-    (native-inputs
-     `(("python2-setuptools" ,python2-setuptools)))))
+  (package-with-python2 python-apipkg))
 
 (define-public python-execnet
   (package
@@ -8085,7 +8078,7 @@ pure Python module that works on virtually all Python versions.")
     (native-inputs
      `(("python-pytest" ,python-pytest)
        ("python-setuptools-scm" ,python-setuptools-scm)))
-    (inputs
+    (propagated-inputs
      `(("python-apipkg" ,python-apipkg)))
     (synopsis "Rapid multi-Python deployment")
     (description "Execnet provides a share-nothing model with
@@ -8098,17 +8091,32 @@ minimal and fast API targetting the following uses:
 @item write scripts to administer multiple environments
 @end enumerate")
     (home-page "http://codespeak.net/execnet/")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-execnet))))))
+    (license license:expat)))
 
 (define-public python2-execnet
-  (let ((execnet (package-with-python2
-                  (strip-python2-variant python-execnet))))
-    (package
-      (inherit execnet)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs execnet))))))
+  (package-with-python2 python-execnet))
+
+(define-public python-trollius-redis
+  (package
+    (name "python-trollius-redis")
+    (version "0.1.4")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "trollius_redis" version))
+        (sha256
+         (base32
+          "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/benjolitz/trollius-redis")
+    (synopsis "Port of asyncio-redis to trollius")
+    (description "@code{trollius-redis} is a Redis client for Python
+  trollius.  It is an asynchronious IO (PEP 3156) implementation of the
+  Redis protocol.")
+    (license license:bsd-2)))
+
+(define-public python2-trollius-redis
+  (package-with-python2 python-trollius-redis))
 
 ;;; The software provided by this package was integrated into pytest 2.8.
 (define-public python-pytest-cache
@@ -8122,7 +8130,7 @@ minimal and fast API targetting the following uses:
               (base32
                "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
     (build-system python-build-system)
-    (inputs
+    (propagated-inputs
      `(("python-apipkg" ,python-apipkg)
        ("python-execnet" ,python-execnet)
        ("python-py" ,python-py)
@@ -8131,17 +8139,10 @@ minimal and fast API targetting the following uses:
     (description "The pytest-cache plugin provides tools to rerun failures from
 the last py.test invocation.")
     (home-page "https://bitbucket.org/hpk42/pytest-cache/")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-pytest-cache))))))
+    (license license:expat)))
 
 (define-public python2-pytest-cache
-  (let ((pytest-cache (package-with-python2
-                        (strip-python2-variant python-pytest-cache))))
-    (package
-      (inherit pytest-cache)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs pytest-cache))))))
+  (package-with-python2 python-pytest-cache))
 
 (define-public python-pytest-localserver
   (package
@@ -8164,7 +8165,7 @@ the last py.test invocation.")
      `(("python-pytest" ,python-pytest)
        ("python-requests" ,python-requests)
        ("python-six" ,python-six)))
-    (inputs
+    (propagated-inputs
      `(("python-werkzeug" ,python-werkzeug)))
     (synopsis "Py.test plugin to test server connections locally")
     (description "Pytest-localserver is a plugin for the pytest testing
@@ -8186,13 +8187,13 @@ framework which enables you to test server connections locally.")
               (base32
                "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
     (build-system python-build-system)
+    (propagated-inputs
+     `(("python-six" ,python-six)))
     (native-inputs
      `(("python-pytest" ,python-pytest)
-       ("python-six" ,python-six)
+       ("python-httplib2" ,python-httplib2)
+       ("python-requests" ,python-requests)
        ("python-urllib3" ,python-urllib3)))
-    (propagated-inputs
-     `(("python-httplib2" ,python-httplib2)
-       ("python-requests" ,python-requests)))
     (synopsis "Puts a WSGI application in place of a real URI for testing")
     (description "Wsgi_intercept installs a WSGI application in place of a real
 URI for testing.  Testing a WSGI application normally involves starting a
@@ -8228,13 +8229,13 @@ processes across test runs.")
 (define-public python-icalendar
   (package
     (name "python-icalendar")
-    (version "3.11")
+    (version "3.11.1")
     (source (origin
              (method url-fetch)
              (uri (pypi-uri "icalendar" version))
              (sha256
               (base32
-               "01v2f3swd5s72x65cdihw83dx1z799b4i49a6ncg7vqmcm20wapd"))))
+               "1bvi7rzh7scl4nmgj2n2cy7k0v3p29y15cqy2hcdnfq9mnhdr63y"))))
     (build-system python-build-system)
     (propagated-inputs
      `(("python-dateutil-2" ,python-dateutil-2)
@@ -8257,8 +8258,7 @@ files for use with Python.")
                "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
     (build-system python-build-system)
     (propagated-inputs
-     `(("python-docutils" ,python-docutils)
-       ("python-sphinx" ,python-sphinx)))
+     `(("python-sphinx" ,python-sphinx)))
     (synopsis "News Feed extension for Sphinx")
     (description "Sphinxcontrib-newsfeed is an extension for adding a simple
 Blog, News or Announcements section to a Sphinx website.")
@@ -8276,8 +8276,6 @@ Blog, News or Announcements section to a Sphinx website.")
                (base32
                 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/kennethreitz/args")
     (synopsis "Command-line argument parser")
     (description
@@ -8298,9 +8296,8 @@ Blog, News or Announcements section to a Sphinx website.")
                (base32
                 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-args" ,python-args)
-       ("python-setuptools" ,python-setuptools)))
+    (propagated-inputs
+     `(("python-args" ,python-args)))
     (home-page "https://github.com/kennethreitz/clint")
     (synopsis "Command-line interface tools")
     (description
@@ -8323,8 +8320,6 @@ output, progress bar display, and pipes.")
                (base32
                 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/berkerpeksag/astor")
     (synopsis "Read and write Python ASTs")
     (description
@@ -8346,9 +8341,8 @@ Abstract Syntax Tree.")
                (base32
                 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-appdirs" ,python-appdirs)
-       ("python-setuptools" ,python-setuptools)))
+    (propagated-inputs
+     `(("python-appdirs" ,python-appdirs)))
     (home-page "https://github.com/alex/rply")
     (synopsis "Parser generator for Python")
     (description
@@ -8371,11 +8365,10 @@ with a new public API, and RPython support.")
                (base32
                 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
     (build-system python-build-system)
-    (inputs
+    (propagated-inputs
      `(("python-astor" ,python-astor)
        ("python-clint" ,python-clint)
-       ("python-rply" ,python-rply)
-       ("python-setuptools" ,python-setuptools)))
+       ("python-rply" ,python-rply)))
     (home-page "http://hylang.org/")
     (synopsis "Lisp frontend to Python")
     (description
@@ -8401,7 +8394,7 @@ Python at your fingertips, in Lisp form.")
     (build-system python-build-system)
     (arguments
      `(#:test-target "check"))
-    (inputs
+    (propagated-inputs
      `(("python-requests" ,python-requests)))
     (home-page "https://github.com/litl/rauth")
     (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
@@ -8416,8 +8409,7 @@ authenticated session objects providing things like keep-alive.")
   (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
     (package
       (inherit base)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ("python2-unittest2" ,python2-unittest2)
+      (native-inputs `(("python2-unittest2" ,python2-unittest2)
                        ,@(package-native-inputs base))))))
 
 (define-public python2-functools32
@@ -8435,8 +8427,6 @@ authenticated session objects providing things like keep-alive.")
     (arguments
      `(#:python ,python-2
        #:tests? #f)) ; no test target
-    (native-inputs
-     `(("python2-setuptools" ,python2-setuptools)))
     (home-page "https://github.com/MiCHiLU/python-functools32")
     (synopsis
      "Backport of the functools module from Python 3.2.3")
@@ -8458,8 +8448,6 @@ authenticated session objects providing things like keep-alive.")
           "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
     (build-system python-build-system)
     (arguments `(#:python ,python-2))
-    (native-inputs
-     `(("python2-setuptools" ,python2-setuptools)))
     (home-page "https://github.com/agronholm/pythonfutures")
     (synopsis
      "Backport of the concurrent.futures package from Python 3.2")
@@ -8500,7 +8488,6 @@ concurrent.futures package from Python 3.2")
       (native-inputs
        `(("python2-futures" ,python2-futures)
          ("python2-pytest" ,python2-pytest)
-         ("python2-setuptools" ,python2-setuptools)
          ,@(package-native-inputs promise))))))
 
 (define-public python-urllib3
@@ -8517,13 +8504,12 @@ concurrent.futures package from Python 3.2")
     (build-system python-build-system)
     (arguments `(#:tests? #f))
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)
-       ;; some packages for tests
+     `(;; some packages for tests
        ("python-nose" ,python-nose)
        ("python-mock" ,python-mock)
        ("python-tornado" ,python-tornado)))
     (propagated-inputs
-     `(;; packages for https security
+     `(;; extra packages for https security
        ("python-certifi" ,python-certifi)
        ("python-ndg-httpsclient" ,python-ndg-httpsclient)
        ("python-pyasn1" ,python-pyasn1)
@@ -8551,8 +8537,6 @@ supports url redirection and retries, and also gzip and deflate decoding.")
       (base32
        "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
    (build-system python-build-system)
-   (inputs
-    `(("python-setuptools" ,python-setuptools)))
    (synopsis "colored terminal text rendering for Python")
    (description "Colorama is a Python library for rendering colored terminal
 text.")
@@ -8574,9 +8558,8 @@ text.")
       (base32
        "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
    (build-system python-build-system)
-   (inputs
-    `(("python-pyasn1" ,python-pyasn1)
-      ("python-setuptools" ,python-setuptools)))
+   (propagated-inputs
+    `(("python-pyasn1" ,python-pyasn1)))
    (synopsis "Pure-Python RSA implementation")
    (description "Python-RSA is a pure-Python RSA implementation.  It supports
 encryption and decryption, signing and verifying signatures, and key
@@ -8600,8 +8583,6 @@ library as well as on the command line.")
       (base32
        "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
    (build-system python-build-system)
-   (inputs
-    `(("python-setuptools" ,python-setuptools)))
    (synopsis "Plugin and hook calling mechanism for Python")
    (description "Pluggy is an extraction of the plugin manager as used by
 Pytest but stripped of Pytest specific details.")
@@ -8624,15 +8605,16 @@ Pytest but stripped of Pytest specific details.")
        "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
    (build-system python-build-system)
    (arguments
-    ;; FIXME: Tests require a newer version of pytest, but upgrading our
-    ;; pytest breaks other packages.
+    ;; FIXME: Tests require pytest-timeout, which itself requires
+    ;; pytest>=2.8.0 for installation.
     '(#:tests? #f))
-   (inputs
-    `(("python-setuptools" ,python-setuptools)
-      ("python-pluggy" ,python-pluggy)
+   (propagated-inputs
+    `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
       ("python-py" ,python-py)
-      ("python-virtualenv" ,python-virtualenv)
-      ("python-pytest" ,python-pytest)))
+      ("python-virtualenv" ,python-virtualenv)))
+   (native-inputs
+    `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
+      ("python-pytest" ,python-pytest)))  ; >= 2.3.5
    (home-page "http://tox.testrun.org/")
    (synopsis "Virtualenv-based automation of test activities")
    (description "Tox is a generic virtualenv management and test command line
@@ -8657,8 +8639,6 @@ servers.")
       (base32
        "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
    (build-system python-build-system)
-   (inputs
-    `(("python-setuptools" ,python-setuptools)))
    (synopsis "JSON Matching Expressions")
    (description "JMESPath (pronounced “james path”) is a Python library that
 allows one to declaratively specify how to extract elements from a JSON
@@ -8681,15 +8661,16 @@ document.")
       (base32
        "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
    (build-system python-build-system)
-   (inputs
+   (propagated-inputs
     `(("python-dateutil" ,python-dateutil-2)
       ("python-docutils" ,python-docutils)
-      ("python-mock" ,python-mock)
+      ("python-jmespath" ,python-jmespath)))
+   (native-inputs
+    `(("python-mock" ,python-mock)
       ("python-nose" ,python-nose)
-      ("python-setuptools" ,python-setuptools)
+      ("behave" ,behave)
       ("python-tox" ,python-tox)
-      ("python-wheel" ,python-wheel)
-      ("python-jmespath" ,python-jmespath)))
+      ("python-wheel" ,python-wheel)))
    (home-page "https://github.com/boto/botocore")
    (synopsis "Low-level interface to AWS")
    (description "Botocore is a Python library that provides a low-level
@@ -8702,27 +8683,27 @@ interface to the Amazon Web Services (AWS) API.")
 (define-public awscli
   (package
    (name "awscli")
-   (version "1.11.5")
+   (version "1.11.35")
    (source
     (origin
      (method url-fetch)
      (uri (pypi-uri name version))
      (sha256
       (base32
-       "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
+       "0k6y8cg311bqak5x9pilg80w6f76dcbzm6xcdrw6rjnk6v4xwy70"))))
    (build-system python-build-system)
-   (inputs
+   (propagated-inputs
     `(("python-colorama" ,python-colorama)
+      ("python-botocore" ,python-botocore)
+      ("python-s3transfer" ,python-s3transfer)
       ("python-docutils" ,python-docutils)
-      ("python-mock" ,python-mock)
+      ("python-rsa" ,python-rsa)))
+   (native-inputs
+    `(("python-mock" ,python-mock)
       ("python-nose" ,python-nose)
-      ("python-rsa" ,python-rsa)
-      ("python-setuptools" ,python-setuptools)
       ("python-sphinx" ,python-sphinx)
       ("python-tox" ,python-tox)
-      ("python-wheel" ,python-wheel)
-      ("python-botocore" ,python-botocore)
-      ("python-s3transfer" ,python-s3transfer)))
+      ("python-wheel" ,python-wheel)))
    (home-page "http://aws.amazon.com/cli/")
    (synopsis "Command line client for AWS")
    (description "AWS CLI provides a unified command line interface to the
@@ -8757,8 +8738,7 @@ seamlessly into your existing Python unit testing work flow.")
                      (strip-python2-variant python-hypothesis))))
     (package (inherit hypothesis)
       (native-inputs
-       `(("python2-enum34" ,python2-enum34)
-         ("python2-setuptools" ,python2-setuptools))))))
+       `(("python2-enum34" ,python2-enum34))))))
 
 (define-public python-pytest-subtesthack
   (package
@@ -8771,9 +8751,6 @@ seamlessly into your existing Python unit testing work flow.")
                (base32
                 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
     (build-system python-build-system)
-    (native-inputs
-     `(;; setuptools required for python-2 variant
-       ("python-setuptools" ,python-setuptools)))
     (propagated-inputs
      `(("python-pytest" ,python-pytest)))
     (synopsis "Set-up and tear-down fixtures for unit tests")
@@ -8788,10 +8765,10 @@ normally the case.")
 (define-public python2-pytest-subtesthack
   (package-with-python2 python-pytest-subtesthack))
 
-(define-public python2-xdo
+(define-public python-xdo
   (package
-    (name "python2-xdo")
-    (version "0.2")
+    (name "python-xdo")
+    (version "0.3")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -8799,11 +8776,10 @@ normally the case.")
                     "python-xdo_" version ".orig.tar.gz"))
               (sha256
                (base32
-                "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
+                "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
     (build-system python-build-system)
     (arguments
-     `(#:python ,python-2
-       #:tests? #f))  ; no tests provided
+     `(#:tests? #f))  ; no tests provided
     (inputs
      `(("xdotool" ,xdotool)
        ("libX11" ,libx11)))
@@ -8814,6 +8790,9 @@ input.  (Note that this is mostly a legacy library; you may wish to look at
 python-xdo for newer bindings.)")
     (license license:bsd-3)))
 
+(define-public python2-xdo
+  (package-with-python2 python-xdo))
+
 (define-public python-wtforms
   (package
     (name "python-wtforms")
@@ -8846,46 +8825,36 @@ python-xdo for newer bindings.)")
      "WTForms is a flexible forms validation and rendering library
 for Python web development.  It is very similar to the web form API
 available in Django, but is a standalone package.")
-    (license license:bsd-3)
-    (properties `((python2-variant . ,(delay python2-wtforms))))))
+    (license license:bsd-3)))
 
 (define-public python2-wtforms
-  (package
-    (inherit (package-with-python2
-              (strip-python2-variant python-wtforms)))
-    (inputs `(("python2-setuptools" ,python2-setuptools)))))
+  (package-with-python2 python-wtforms))
 
 (define-public python-mako
   (package
     (name "python-mako")
-    (version "1.0.3")
+    (version "1.0.6")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "Mako" version))
        (sha256
         (base32
-         "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
+         "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
     (build-system python-build-system)
+    (propagated-inputs
+     `(("python-markupsafe" ,python-markupsafe)))
     (native-inputs
-     `(("python-markupsafe" ,python-markupsafe)
-       ("python-mock" ,python-mock)
+     `(("python-mock" ,python-mock)
        ("python-nose" ,python-nose)))
     (home-page "http://www.makotemplates.org/")
     (synopsis "Templating language for Python")
     (description "Mako is a templating language for Python that compiles
 templates into Python modules.")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-mako))))))
+    (license license:expat)))
 
 (define-public python2-mako
-  (let ((base (package-with-python2
-               (strip-python2-variant python-mako))))
-    (package
-      (inherit base)
-      (native-inputs
-       (cons `("python2-setuptools" ,python2-setuptools)
-             (package-native-inputs base))))))
+  (package-with-python2 python-mako))
 
 (define-public python-waitress
   (package
@@ -8903,14 +8872,10 @@ templates into Python modules.")
     (synopsis "Waitress WSGI server")
     (description "Waitress is meant to be a production-quality pure-Python WSGI
 server with very acceptable performance.")
-    (license license:zpl2.1)
-    (properties `((python2-variant . ,(delay python2-waitress))))))
+    (license license:zpl2.1)))
 
 (define-public python2-waitress
-  (package
-    (inherit (package-with-python2
-              (strip-python2-variant python-waitress)))
-    (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
+  (package-with-python2 python-waitress))
 
 (define-public python-wsgiproxy2
   (package
@@ -8943,16 +8908,10 @@ server with very acceptable performance.")
 WSGIProxy turns WSGI function calls into HTTP requests.
 It also includes code to sign requests and pass private data,
 and to spawn subprocesses to handle requests.")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-wsgiproxy2))))))
+    (license license:expat)))
 
 (define-public python2-wsgiproxy2
-  (let ((wsgiproxy2 (package-with-python2
-                     (strip-python2-variant python-wsgiproxy2))))
-    (package
-      (inherit wsgiproxy2)
-      (inputs `(("python2-setuptools" ,python2-setuptools)
-                ,@(package-inputs wsgiproxy2))))))
+ (package-with-python2 python-wsgiproxy2))
 
 (define-public python-pastedeploy
   (package
@@ -8968,10 +8927,6 @@ and to spawn subprocesses to handle requests.")
     (build-system python-build-system)
     (native-inputs
      `(("python-nose" ,python-nose)))
-    (propagated-inputs
-     ;; This package uses pkg_resources, part of setuptools, during runtime,
-     ;; hence why not a native-input.
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://pythonpaste.org/deploy/")
     (synopsis
      "Load, configure, and compose WSGI applications and servers")
@@ -9002,9 +8957,7 @@ file.")
     (native-inputs
      `(("python-nose" ,python-nose)))
     (propagated-inputs
-     `(;; Uses pkg_resources provided by setuptools internally.
-       ("python-setuptools" ,python-setuptools)
-       ("python-six" ,python-six)))
+     `(("python-six" ,python-six)))
     (arguments
      '(;; Tests don't pass on Python 3, but work fine on Python 2.
        ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
@@ -9046,9 +8999,7 @@ follows ideas flowing from WSGI (Web Standard Gateway Interface).")
     (native-inputs
      `(("python-nose" ,python-nose)))
     (propagated-inputs
-     `(;; Uses pkg_resources provided by setuptools internally.
-       ("python-setuptools" ,python-setuptools)
-       ("python-paste" ,python-paste)
+     `(("python-paste" ,python-paste)
        ("python-pastedeploy" ,python-pastedeploy)))
     (home-page "http://pythonpaste.org/script/")
     (arguments
@@ -9072,14 +9023,14 @@ layouts.")
 (define-public python-pyquery
   (package
     (name "python-pyquery")
-    (version "1.2.13")
+    (version "1.2.17")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pyquery" version))
        (sha256
         (base32
-         "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
+         "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-webob" ,python-webob)
@@ -9092,16 +9043,10 @@ layouts.")
     (description "pyquery allows you to make jQuery queries on xml documents.
 The API is as much as possible the similar to jQuery.  pyquery uses lxml for
 fast xml and html manipulation.")
-    (license license:bsd-3)
-    (properties `((python2-variant . ,(delay python2-pyquery))))))
+    (license license:bsd-3)))
 
 (define-public python2-pyquery
-  (let ((pyquery (package-with-python2
-                  (strip-python2-variant python-pyquery))))
-    (package
-      (inherit pyquery)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs pyquery))))))
+  (package-with-python2 python-pyquery))
 
 (define-public python-webtest
   (package
@@ -9144,16 +9089,10 @@ fast xml and html manipulation.")
     (description "Webtest allows you to test your Python web applications
 without starting an HTTP server.  It supports anything that supports the
 minimum of WSGI.")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-webtest))))))
+    (license license:expat)))
 
 (define-public python2-webtest
-  (let ((webtest (package-with-python2
-                  (strip-python2-variant python-webtest))))
-    (package
-      (inherit webtest)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs webtest))))))
+  (package-with-python2 python-webtest))
 
 (define-public python-anyjson
   (package
@@ -9192,8 +9131,7 @@ and provides a uniform API regardless of which JSON implementation is used.")
       (arguments `(;; Unlike the python 3 variant, we do run tests.  See above!
                    #:tests? #t
                    ,@(package-arguments anyjson)))
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ("python2-nose" ,python2-nose))))))
+      (native-inputs `(("python2-nose" ,python2-nose))))))
 
 (define-public python-amqp
   (package
@@ -9229,9 +9167,7 @@ alternative when librabbitmq is not available.")
                    ;; unmaintained.  Weirdly, does not do this on the python 3
                    ;; version?
                    #:tests? #f
-                   ,@(package-arguments amqp)))
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs amqp))))))
+                   ,@(package-arguments amqp))))))
 
 (define-public python-kombu
   (package
@@ -9268,9 +9204,8 @@ RabbitMQ messaging server is the most popular implementation.")
                 (strip-python2-variant python-kombu))))
     (package
       (inherit kombu)
-      (inputs `(("python2-setuptools" ,python2-setuptools)
-                ("python2-unittest2" ,python2-unittest2)
-                ,@(package-inputs kombu))))))
+      (native-inputs `(("python2-unittest2" ,python2-unittest2)
+                ,@(package-native-inputs kombu))))))
 
 (define-public python-billiard
   (package
@@ -9302,8 +9237,7 @@ Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
                    (strip-python2-variant python-billiard))))
     (package
       (inherit billiard)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ("python2-unittest2" ,python2-unittest2)
+      (native-inputs `(("python2-unittest2" ,python2-unittest2)
                        ("python2-mock" ,python2-mock)
                        ,@(package-native-inputs billiard))))))
 
@@ -9330,10 +9264,8 @@ Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
                (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
     (native-inputs
      `(("python-nose" ,python-nose)))
-    (inputs
+    (propagated-inputs
      `(("python-pytz" ,python-pytz)
-       ("python-amqp" ,python-amqp)
-       ("python-anyjson" ,python-anyjson)
        ("python-billiard" ,python-billiard)
        ("python-kombu" ,python-kombu)))
     (home-page "http://celeryproject.org")
@@ -9352,8 +9284,7 @@ synchronously (wait until ready).")
                  (strip-python2-variant python-celery))))
     (package
       (inherit celery)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ("python2-unittest2" ,python2-unittest2)
+      (native-inputs `(("python2-unittest2" ,python2-unittest2)
                        ("python2-mock" ,python2-mock)
                        ,@(package-native-inputs celery))))))
 
@@ -9379,14 +9310,10 @@ synchronously (wait until ready).")
      "This package contains codecs for transliterating ISO 10646 texts into
 best-effort representations using smaller coded character sets (ASCII,
 ISO 8859, etc.).")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-translitcodec))))))
+    (license license:expat)))
 
 (define-public python2-translitcodec
-  (package
-    (inherit (package-with-python2
-              (strip-python2-variant python-translitcodec)))
-    (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
+  (package-with-python2 python-translitcodec))
 
 (define-public python-editor
   (package
@@ -9407,14 +9334,10 @@ ISO 8859, etc.).")
   (description
     "python-editor is a library that provides the editor module for
 programmatically interfacing with your system's $EDITOR.")
-  (license license:asl2.0)
-  (properties `((python2-variant . ,(delay python2-editor))))))
+  (license license:asl2.0)))
 
 (define-public python2-editor
-  (package
-    (inherit (package-with-python2
-              (strip-python2-variant python-editor)))
-    (inputs `(("python2-setuptools" ,python2-setuptools)))))
+  (package-with-python2 python-editor))
 
 (define-public python-sphinxcontrib-programoutput
   (package
@@ -9428,20 +9351,15 @@ programmatically interfacing with your system's $EDITOR.")
                 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
     (build-system python-build-system)
     (propagated-inputs
-     `(("python-docutils" ,python-docutils)
-       ("python-sphinx" ,python-sphinx)))
+     `(("python-sphinx" ,python-sphinx)))
     (synopsis "Sphinx extension to include program output")
     (description "A Sphinx extension to literally insert the output of arbitrary
 commands into documents, helping you to keep your command examples up to date.")
     (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
-    (license license:bsd-2)
-    (properties `((python2-variant . ,(delay python2-sphinxcontrib-programoutput))))))
+    (license license:bsd-2)))
 
 (define-public python2-sphinxcontrib-programoutput
-  (package
-    (inherit (package-with-python2
-              (strip-python2-variant python-sphinxcontrib-programoutput)))
-    (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
+  (package-with-python2 python-sphinxcontrib-programoutput))
 
 (define-public python-sphinx-repoze-autointerface
   (package
@@ -9455,8 +9373,7 @@ commands into documents, helping you to keep your command examples up to date.")
                 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
     (build-system python-build-system)
     (propagated-inputs
-     `(("python-docutils" ,python-docutils)
-       ("python-sphinx" ,python-sphinx)
+     `(("python-sphinx" ,python-sphinx)
        ("python-zope-interface" ,python-zope-interface)))
     (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
     (description "This package defines an extension for the Sphinx documentation
@@ -9490,14 +9407,10 @@ introspection of @code{zope.interface} instances in code.")
     (synopsis "Python PostgreSQL adapter")
     (description
      "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
-    (license license:lgpl3+)
-    (properties `((python2-variant . ,(delay python2-psycopg2))))))
+    (license license:lgpl3+)))
 
 (define-public python2-psycopg2
-  (package
-    (inherit (package-with-python2
-              (strip-python2-variant python-psycopg2)))
-    (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
+  (package-with-python2 python-psycopg2))
 
 (define-public python-vobject
   (package
@@ -9513,7 +9426,7 @@ introspection of @code{zope.interface} instances in code.")
     (arguments
      '(;; The test suite relies on some non-portable Windows interfaces.
        #:tests? #f))
-    (inputs
+    (propagated-inputs
      `(("python-dateutil-2" ,python-dateutil-2)
        ("python-pyicu" ,python-pyicu)))
     (synopsis "Parse and generate vCard and vCalendar files")
@@ -9523,25 +9436,21 @@ are supported and well tested. vCard 3.0 files are supported, and all data
 should be imported, but only a few components are understood in a sophisticated
 way.")
     (home-page "http://eventable.github.io/vobject/")
-    (license license:asl2.0)
-    (properties `((python2-variant . ,(delay python2-vobject))))))
+    (license license:asl2.0)))
 
 (define-public python2-vobject
-  (package
-    (inherit (package-with-python2
-              (strip-python2-variant python-vobject)))
-    (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
+  (package-with-python2 python-vobject))
 
 (define-public python-munkres
   (package
     (name "python-munkres")
-    (version "1.0.7")
+    (version "1.0.8")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "munkres" version))
               (sha256
                (base32
-                "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
+                "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
     (build-system python-build-system)
     (arguments
      '(#:tests? #f)) ; no test suite
@@ -9569,21 +9478,67 @@ useful for solving the Assignment Problem.")
     (propagated-inputs
      `(("python-itsdangerous" ,python-itsdangerous)
        ("python-jinja2" ,python-jinja2)
+       ("python-click" ,python-click)
        ("python-werkzeug" ,python-werkzeug)))
-    (native-inputs
-     `(("python-click" ,python-click)))
     (home-page "https://github.com/mitsuhiko/flask/")
     (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
     (description "Flask is a micro web framework based on the Werkzeug toolkit
 and Jinja2 template engine.  It is called a micro framework because it does not
 presume or force a developer to use a particular tool or library.")
-    (license license:bsd-3)
-    (properties `((python2-variant . ,(delay python2-flask))))))
+    (license license:bsd-3)))
 
 (define-public python2-flask
-  (package (inherit (package-with-python2
-                     (strip-python2-variant python-flask)))
-    (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
+  (package-with-python2 python-flask))
+
+(define-public python-flask-wtf
+  (package
+    (name "python-flask-wtf")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "Flask-WTF" version))
+       (sha256
+        (base32
+         "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-flask-babel" ,python-flask-babel)
+       ("python-babel" ,python-babel)
+       ("python-wtforms" ,python-wtforms)))
+    (native-inputs
+     `(("python-nose" ,python-nose)))
+    (home-page "https://github.com/lepture/flask-wtf")
+    (synopsis "Simple integration of Flask and WTForms")
+    (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
+upload, and reCAPTCHA.")
+    (license license:bsd-3)))
+
+(define-public python2-flask-wtf
+  (package-with-python2 python-flask-wtf))
+
+(define-public python-flask-multistatic
+  (package
+    (name "python-flask-multistatic")
+    (version "1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "flask-multistatic" version))
+       (sha256
+        (base32
+         "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-flask" ,python-flask)))
+    (home-page "https://pagure.io/flask-multistatic")
+    (synopsis "Flask plugin to allow overriding static files")
+    (description "@code{flask-multistatic} is a flask plugin that adds support
+for overriding static files.")
+    (license license:gpl3+)))
+
+(define-public python2-flask-multistatic
+  (package-with-python2 python-flask-multistatic))
 
 (define-public python-cookies
   (package
@@ -9605,15 +9560,10 @@ presume or force a developer to use a particular tool or library.")
     (description "A RFC 6265-compliant HTTP cookie parser and renderer in
 Python.")
     (home-page "https://gitlab.com/sashahart/cookies")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-cookies))))))
+    (license license:expat)))
 
 (define-public python2-cookies
-  (let ((cookies (package-with-python2
-                  (strip-python2-variant python-cookies))))
-    (package (inherit cookies)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs cookies))))))
+  (package-with-python2 python-cookies))
 
 (define-public python-responses
   (package
@@ -9631,24 +9581,19 @@ Python.")
        ;; https://github.com/getsentry/responses/issues/38
        #:tests? #f))
     (native-inputs
-     `(("python-cookies" ,python-cookies)
-       ("python-mock" ,python-mock)))
+     `(("python-mock" ,python-mock)))
     (propagated-inputs
      `(("python-requests" ,python-requests)
+       ("python-cookies" ,python-cookies)
        ("python-six" ,python-six)))
     (home-page "https://github.com/getsentry/responses")
     (synopsis "Utility for mocking out the `requests` Python library")
     (description "A utility library for mocking out the `requests` Python
 library.")
-    (license license:asl2.0)
-    (properties `((python2-variant . ,(delay python2-responses))))))
+    (license license:asl2.0)))
 
 (define-public python2-responses
-  (let ((responses (package-with-python2
-                    (strip-python2-variant python-responses))))
-    (package (inherit responses)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs responses))))))
+  (package-with-python2 python-responses))
 
 (define-public python-whoosh
   (package
@@ -9663,8 +9608,7 @@ library.")
          "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-pytest" ,python-pytest)))
+     `(("python-pytest" ,python-pytest)))
     (home-page "http://bitbucket.org/mchaput/whoosh")
     (synopsis "Full text indexing, search, and spell checking library")
     (description
@@ -9734,8 +9678,7 @@ anymore.")
     (arguments
      `(#:python ,python-2))
     (native-inputs
-     `(("python2-setuptools" ,python2-setuptools)
-       ("python2-six" ,python2-six)))
+     `(("python2-six" ,python2-six)))
     (home-page "http://pypi.python.org/pypi/pathlib2/")
     (synopsis "Object-oriented file system paths - backport of standard
 pathlib module")
@@ -9759,13 +9702,13 @@ ambiguities (forward vs. backward slashes, etc.).
 (define-public python-jellyfish
   (package
     (name "python-jellyfish")
-    (version "0.5.3")
+    (version "0.5.6")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "jellyfish" version))
               (sha256
                (base32
-                "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
+                "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-pytest" ,python-pytest)))
@@ -9780,8 +9723,7 @@ encoding algorithms to do fuzzy string matching.")
   (let ((jellyfish (package-with-python2
                      (strip-python2-variant python-jellyfish))))
     (package (inherit jellyfish)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ("python2-unicodecsv" ,python2-unicodecsv)
+      (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
                        ,@(package-native-inputs jellyfish))))))
 
 (define-public python2-unicodecsv
@@ -9803,8 +9745,7 @@ encoding algorithms to do fuzzy string matching.")
      `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
        #:python ,python-2))
     (native-inputs
-     `(("python2-setuptools" ,python2-setuptools)
-       ("python2-unittest2" ,python2-unittest2)))
+     `(("python2-unittest2" ,python2-unittest2)))
     (home-page "https://github.com/jdunck/python-unicodecsv")
     (synopsis "Unicode CSV module for Python 2")
     (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
@@ -9814,15 +9755,13 @@ module, adding support for Unicode strings.")
 (define-public python-rarfile
   (package
     (name "python-rarfile")
-    (version "2.7")
+    (version "2.8")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "rarfile" version))
               (sha256
                (base32
-                "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
-              ;; https://github.com/markokr/rarfile/pull/17/
-              (patches (search-patches "python-rarfile-fix-tests.patch"))))
+                "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
     (build-system python-build-system)
     (arguments
      '(#:phases
@@ -9892,8 +9831,6 @@ is made as zipfile like as possible.")
                         port)
                (close-port port)
                #t))))))
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (inputs
      ;; python-magic needs to be able to find libmagic.so.
      `(("file" ,file)))
@@ -9928,9 +9865,7 @@ the same purpose: to provide Python bindings for libmagic.")
      ;; s3cmd is written for python2 only and contains no tests.
      `(#:python ,python-2
        #:tests? #f))
-    (native-inputs
-     `(("python2-setuptools" ,python2-setuptools)))
-    (inputs
+    (propagated-inputs
      `(("python2-dateutil" ,python2-dateutil)
        ;; The python-file package also provides a magic.py module.
        ;; This is an unfortunate state of affairs; however, s3cmd
@@ -9963,17 +9898,13 @@ CloudFront content delivery network.")
             "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
     (build-system python-build-system)
     (native-inputs
-      `(("python-nose" ,python-nose)
-        ("python-setuptools" ,python-setuptools)))
+      `(("python-nose" ,python-nose)))
     (inputs
       `(("pkg-config" ,pkg-config)))
     (arguments
       `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
         ;; and on Python 2 they need the dl module deprecated since Python 2.6.
         #:tests? #f
-        ;; Prevent creation of the egg. This works around
-        ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
-        #:configure-flags '("--single-version-externally-managed" "--root=/")
         ;; Hard-code the path to pkg-config.
         #:phases
         (modify-phases %standard-phases
@@ -10024,8 +9955,6 @@ development version of CPython that are not available in older releases.")
                (strip-python2-variant python-bz2file))))
     (package
       (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)))
       (arguments
        `(#:python ,python-2
          #:phases
@@ -10058,15 +9987,10 @@ development version of CPython that are not available in older releases.")
      "@code{python-future} is the missing compatibility layer between Python 2 and
 Python 3.  It allows you to use a single, clean Python 3.x-compatible codebase
 to support both Python 2 and Python 3 with minimal overhead.")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-future))))))
+    (license license:expat)))
 
 (define-public python2-future
-  (let ((base (package-with-python2
-               (strip-python2-variant python-future))))
-    (package
-      (inherit base)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
+  (package-with-python2 python-future))
 
 (define-public python-cysignals
   (package
@@ -10082,7 +10006,6 @@ to support both Python 2 and Python 3 with minimal overhead.")
     (build-system python-build-system)
     (native-inputs
       `(("python-cython" ,python-cython)
-        ("python-setuptools" ,python-setuptools)
         ("python-sphinx" ,python-sphinx)))
     (inputs
       `(("pari-gp" ,pari-gp)))
@@ -10144,7 +10067,6 @@ respectively.")
                                    "            line += ' -L" pcre "/lib"
                                    " -L " libgc "/lib'")))
                   #t))))))
-  (native-inputs `(("python2-setuptools" ,python2-setuptools)))
   (inputs `(("pcre" ,pcre)
             ("libgc" ,libgc)))
   (home-page "https://shedskin.github.io/")
@@ -10170,8 +10092,7 @@ Python.  It generates C++ code and a Makefile."))
      `(#:python ,python-2))
     (build-system python-build-system)
     (native-inputs
-     `(("python2-unittest2" ,python2-unittest2)
-       ("python2-setuptools" ,python2-setuptools)))
+     `(("python2-unittest2" ,python2-unittest2)))
     (home-page "https://github.com/python-rope/rope")
     (synopsis "Refactoring library for Python")
     (description "Rope is a refactoring library for Python.  It facilitates
@@ -10192,8 +10113,6 @@ to occurences in strings and comments.")
         (base32
          "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/ultrabug/py3status")
     (synopsis "Extensible i3status wrapper written in Python")
     (description "py3status is an i3status wrapper which extends i3status
@@ -10225,7 +10144,6 @@ own code, responding to click events and updating clock every second.")
              (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
     (native-inputs
      `(("python-pytest" ,python-pytest)
-       ("python-setuptools" ,python-setuptools)
        ("python-six" ,python-six)))
     (home-page "https://github.com/ionelmc/python-tblib")
     (synopsis "Traceback serialization library")
@@ -10267,8 +10185,7 @@ multiple processes (imagine multiprocessing, billiard, futures, celery etc).
                (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
              (zero? (system* "py.test")))))))
     (native-inputs
-     `(("python-pytest" ,python-pytest)
-       ("python-setuptools" ,python-setuptools)))
+     `(("python-pytest" ,python-pytest)))
     (home-page "https://github.com/andialbrecht/sqlparse")
     (synopsis "Non-validating SQL parser")
     (description "Sqlparse is a non-validating SQL parser for Python.  It
@@ -10281,16 +10198,14 @@ provides support for parsing, splitting and formatting SQL statements.")
 (define-public python-greenlet
   (package
     (name "python-greenlet")
-    (version "0.4.9")
+    (version "0.4.11")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "greenlet" version))
               (sha256
                (base32
-                "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
+                "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://greenlet.readthedocs.io/")
     (synopsis "Lightweight in-process concurrent programming")
     (description
@@ -10327,8 +10242,7 @@ are synchronized with data exchanges on \"channels\".")
     (propagated-inputs
      `(("python-greenlet" ,python-greenlet)))
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-six" ,python-six)))
+     `(("python-six" ,python-six)))
     (inputs
      `(("c-ares" ,c-ares)
        ("libev" ,libev)))
@@ -10353,8 +10267,6 @@ to provide a high-level synchronous API on top of the libev event loop.")
                (base32
                 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (propagated-inputs
      `(("python-zope-interface" ,python-zope-interface)))
     (home-page "https://twistedmatrix.com/")
@@ -10397,30 +10309,23 @@ network support library.")
 (define-public python-ply
   (package
     (name "python-ply")
-    (version "3.8")
+    (version "3.9")
     (source
       (origin
         (method url-fetch)
-        (uri (string-append
-               "https://pypi.python.org/packages/"
-               "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
-               "/ply-" version ".tar.gz"))
+        (uri (pypi-uri "ply" version))
         (sha256
           (base32
-            "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
+            "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
     (build-system python-build-system)
     (home-page "http://www.dabeaz.com/ply/")
     (synopsis "Python Lex & Yacc")
     (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
 It uses LR parsing and does extensive error checking.")
-    (license license:bsd-3)
-    (properties `((python2-variant . ,(delay python2-ply))))))
+    (license license:bsd-3)))
 
 (define-public python2-ply
-  (package
-    (inherit (package-with-python2
-              (strip-python2-variant python-ply)))
-    (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
+  (package-with-python2 python-ply))
 
 (define-public python-tabulate
   (package
@@ -10441,8 +10346,7 @@ It uses LR parsing and does extensive error checking.")
                          (("from common") "from nose.tools")))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)
-       ;; For testing
+     `(;; For testing
        ("python-nose" ,python-nose)))
     (home-page "https://bitbucket.org/astanin/python-tabulate")
     (synopsis "Pretty-print tabular data")
@@ -10467,8 +10371,6 @@ data in Python.")
          "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
     (build-system python-build-system)
     (arguments '(#:tests? #f)) ; XXX: needs zookeeper
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (propagated-inputs
      `(("python-six" ,python-six)))
     (home-page "https://kazoo.readthedocs.org")
@@ -10497,8 +10399,6 @@ programming errors.")
                 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
     (build-system python-build-system)
     (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (propagated-inputs
      `(("python-gevent" ,python-gevent)
        ("python-kazoo" ,python-kazoo)
@@ -10538,14 +10438,10 @@ wide-character codes.  It is useful for those implementing a terminal emulator,
 or programs that carefully produce output to be interpreted by one.  It is a
 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
 specified in POSIX.1-2001 and POSIX.1-2008.")
-  (license license:expat)
-  (properties `((python2-variant . ,(delay python2-wcwidth))))))
+  (license license:expat)))
 
 (define-public python2-wcwidth
-  (package
-    (inherit (package-with-python2
-              (strip-python2-variant python-wcwidth)))
-    (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
+  (package-with-python2 python-wcwidth))
 
 (define-public python2-jsonrpclib
   (package
@@ -10560,8 +10456,6 @@ specified in POSIX.1-2001 and POSIX.1-2008.")
                (base32
                 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python2-setuptools" ,python2-setuptools)))
     (arguments
      `(#:tests? #f
        #:python ,python-2))
@@ -10585,8 +10479,6 @@ etc.")
                (base32
                 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/agoragames/chai")
     (synopsis "Mocking framework for Python")
     (description
@@ -10609,8 +10501,7 @@ objects, patterned after the Mocha library for Ruby.")
                 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)
-       ;; For testing
+     `(;; For testing
        ("python-chai" ,python-chai)
        ("python-simplejson" ,python-simplejson)))
     (propagated-inputs
@@ -10637,8 +10528,6 @@ datetime type.")
               (base32
                "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://github.com/jpvanhal/inflection")
     (synopsis "Python string transformation library")
     (description
@@ -10661,8 +10550,6 @@ underscored string.")
                (base32
                 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://github.com/toastdriven/pylev")
     (synopsis "Levenshtein distance implementation in Python")
     (description "Pure Python Levenshtein implementation, based off the
@@ -10685,8 +10572,7 @@ Wikipedia code samples at
                 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)
-       ;; For testing
+     `(;; For testing
        ("python-mock" ,python-mock)
        ("python-pytest" ,python-pytest)))
     (propagated-inputs
@@ -10713,8 +10599,6 @@ docstring and colored output.")
                (base32
                 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
     (synopsis "Lazy object proxy for python")
     (description
@@ -10738,8 +10622,6 @@ until the object is actually required, and caches the result of said call.")
               "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
   (build-system python-build-system)
   (arguments '(#:tests? #f)) ; XXX: requires internet access
-  (native-inputs
-   `(("python-setuptools" ,python-setuptools)))
   (home-page "http://www.dnspython.org")
   (synopsis "DNS toolkit for Python")
   (description
@@ -10770,8 +10652,6 @@ It supports TSIG authenticated messages and EDNS0.")
              (substitute* "setup.py"
                (("dnspython3") "dnspython"))
              #t)))))
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (propagated-inputs
      `(("python-dnspython" ,python-dnspython)
        ("python-idna" ,python-idna)))
@@ -10795,8 +10675,6 @@ It supports TSIG authenticated messages and EDNS0.")
                (base32
                 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/hamstah/ukpostcodeparser")
     (synopsis "UK Postcode parser for Python")
     (description
@@ -10819,8 +10697,7 @@ parsing UK postcodes.")
               "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
   (build-system python-build-system)
   (native-inputs
-   `(("python-setuptools" ,python-setuptools)
-     ;; For testing
+   `(;; For testing
      ("python-email-validator" ,python-email-validator)
      ("python-mock" ,python-mock)
      ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
@@ -10855,8 +10732,6 @@ addresses, and phone numbers.")
                (base32
                 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (propagated-inputs
      `(("python-pyyaml" ,python-pyyaml)))
     (home-page "https://github.com/mk-fg/pretty-yaml")
@@ -10880,8 +10755,6 @@ YAML-serialized data.")
                (base32
                 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://flexmock.readthedocs.org")
     (synopsis "Testing library for Python")
     (description
@@ -10904,8 +10777,6 @@ mocks, stubs and fakes.")
                 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
     (build-system python-build-system)
     (arguments '(#:tests? #f)) ; no tests
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (propagated-inputs
      `(("python-arrow" ,python-arrow)
        ("python-blinker" ,python-blinker)
@@ -10935,20 +10806,21 @@ implementation for Python.")
 (define-public python-prompt-toolkit
  (package
   (name "python-prompt-toolkit")
-  (version "1.0.7")
+  (version "1.0.9")
   (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
       (sha256
         (base32
-          "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
+          "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
   (build-system python-build-system)
   (arguments
    '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
-  (inputs `(("python-wcwidth" ,python-wcwidth)
-            ("python-pygments" ,python-pygments)))
-  (native-inputs `(("python-six" ,python-six)))
+  (propagated-inputs
+   `(("python-wcwidth" ,python-wcwidth)
+     ("python-six" ,python-six)
+     ("python-pygments" ,python-pygments)))
   (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
   (synopsis "Library for building command line interfaces in Python")
   (description
@@ -10957,16 +10829,10 @@ interfaces in Python.  It's like GNU Readline but it also features syntax
 highlighting while typing, out-of-the-box multi-line input editing, advanced
 code completion, incremental search, support for Chinese double-width
 characters, mouse support, and auto suggestions.")
-  (license license:bsd-3)
-  (properties `((python2-variant . ,(delay python2-prompt-toolkit))))))
+  (license license:bsd-3)))
 
 (define-public python2-prompt-toolkit
-  (let ((base (package-with-python2 (strip-python2-variant python-prompt-toolkit))))
-    (package
-      (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-prompt-toolkit))
 
 (define-public python-jedi
   (package
@@ -10985,16 +10851,10 @@ characters, mouse support, and auto suggestions.")
       "Autocompletion for Python that can be used for text editors")
     (description
       "Jedi is an autocompletion tool for Python that can be used for text editors.")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-jedi))))))
+    (license license:expat)))
 
 (define-public python2-jedi
-  (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
-    (package
-      (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-jedi))
 
 (define-public ptpython
   (package
@@ -11007,12 +10867,11 @@ characters, mouse support, and auto suggestions.")
                (base32
                 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
     (build-system python-build-system)
-    (inputs
+    (propagated-inputs
      `(("python-docopt" ,python-docopt)
        ("python-jedi" ,python-jedi)
        ("python-prompt-toolkit" ,python-prompt-toolkit)
-       ("python-pygments" ,python-pygments)
-       ("python-setuptools" ,python-setuptools)))
+       ("python-pygments" ,python-pygments)))
     (home-page "https://github.com/jonathanslenders/ptpython")
     (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
     (description
@@ -11052,7 +10911,7 @@ etc.")
     (native-inputs
      `(("python-requests-mock" ,python-requests-mock)
        ("python-mock" ,python-mock)))
-    (inputs
+    (propagated-inputs
      `(("python-oauthlib" ,python-oauthlib)
        ("python-requests" ,python-requests)))
     (home-page
@@ -11062,27 +10921,22 @@ etc.")
     (description
      "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
-    (license license:isc)
-    (properties `((python2-variant . ,(delay python2-requests-oauthlib))))))
+    (license license:isc)))
 
 (define-public python2-requests-oauthlib
-  (let ((base (package-with-python2 (strip-python2-variant python-requests-oauthlib))))
-    (package
-      (inherit base)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs base))))))
+  (package-with-python2 python-requests-oauthlib))
 
 (define-public python-stem
   (package
     (name "python-stem")
-    (version "1.4.1b")
+    (version "1.5.3")
     (source
      (origin
        (method url-fetch)
-       (uri (pypi-uri "stem" version ".tar.bz2"))
+       (uri (pypi-uri "stem" version))
        (sha256
         (base32
-         "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
+         "0fm67dfx6qaj0mg80r4yw2i72birpzn7cnbyz4p1857max3zfc97"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -11094,8 +10948,6 @@ provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients."
      `(("python-mock" ,python-mock)
        ("python-pep8" ,python-pep8)
        ("python-pyflakes" ,python-pyflakes)))
-    (inputs
-     `(("python-pycrypto" ,python-pycrypto)))
     (home-page "https://stem.torproject.org/")
     (synopsis
      "Python controller library that allows applications to interact with Tor")
@@ -11126,16 +10978,10 @@ relays publish about themselves.")
     (description "@code{pyserial} provide serial port bindings for Python.  It
 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
 and/or Xon/Xoff.  The port is accessed in RAW mode.")
-    (license license:bsd-3)
-    (properties `((python2-variant . ,(delay python2-pyserial))))))
+    (license license:bsd-3)))
 
 (define-public python2-pyserial
-  (let ((base (package-with-python2 (strip-python2-variant python-pyserial))))
-    (package
-      (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-pyserial))
 
 (define-public python-kivy
   (package
@@ -11162,10 +11008,10 @@ and/or Xon/Xoff.  The port is accessed in RAW mode.")
                                     "/include/SDL2"))
              #t)))))
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     `(("pkg-config" ,pkg-config)
+       ("python-cython" ,python-cython)))
     (inputs
-     `(("python-cython" ,python-cython)
-       ("gstreamer" ,gstreamer)
+     `(("gstreamer" ,gstreamer)
        ("mesa" ,mesa)
        ("sdl-union"
         ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
@@ -11212,7 +11058,7 @@ hardware-accelerated multitouch applications.")
                (base32
                 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
     (build-system python-build-system)
-    (inputs
+    (propagated-inputs
      `(("python-chardet" ,python-chardet)
        ("python-hypothesis" ,python-hypothesis)))
     (home-page "https://github.com/audreyr/binaryornot")
@@ -11225,12 +11071,9 @@ binary or text.")
 (define-public python2-binaryornot
   (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
     (package (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base)))
-      (inputs
+      (propagated-inputs
        `(("python2-enum34" ,python2-enum34)
-         ,@(package-inputs base))))))
+         ,@(package-propagated-inputs base))))))
 
 (define-public python-nltk
   (package
@@ -11253,15 +11096,10 @@ binary or text.")
 resources such as WordNet, along with a suite of text processing libraries
 for classification, tokenization, stemming, tagging, parsing, and semantic
 reasoning, wrappers for natural language processing libraries.")
-    (license license:asl2.0)
-    (properties `((python2-variant . ,(delay python2-nltk))))))
+    (license license:asl2.0)))
 
 (define-public python2-nltk
-  (let ((base (package-with-python2 (strip-python2-variant python-nltk))))
-    (package (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-nltk))
 
 (define-public python-pymongo
   (package
@@ -11274,20 +11112,15 @@ reasoning, wrappers for natural language processing libraries.")
                (base32
                 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
     (build-system python-build-system)
-    (inputs
+    (propagated-inputs
      `(("python-certifi" ,python-certifi)))
     (home-page "http://github.com/mongodb/mongo-python-driver")
     (synopsis "Python driver for MongoDB")
     (description "Python driver for MongoDB.")
-    (license license:asl2.0)
-    (properties `((python2-variant . ,(delay python2-pymongo))))))
+    (license license:asl2.0)))
 
 (define-public python2-pymongo
-  (let ((base (package-with-python2 (strip-python2-variant python-pymongo))))
-    (package (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-pymongo))
 
 (define-public python-sh
   (package
@@ -11306,15 +11139,10 @@ reasoning, wrappers for natural language processing libraries.")
     (synopsis "Python subprocess interface")
     (description "Abstracts process invocation by providing a function
 interface for programs.")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-sh))))))
+    (license license:expat)))
 
 (define-public python2-sh
-  (let ((base (package-with-python2 (strip-python2-variant python-sh))))
-    (package (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-sh))
 
 (define-public python-consul
   (package
@@ -11329,8 +11157,9 @@ interface for programs.")
           "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-pytest" ,python-pytest)
-       ("python-requests" ,python-requests)
+     `(("python-pytest" ,python-pytest)))
+    (propagated-inputs
+     `(("python-requests" ,python-requests)
        ("python-six" ,python-six)))
     (home-page "https://github.com/cablehead/python-consul")
     (synopsis "Python client for Consul")
@@ -11340,11 +11169,7 @@ discovery, monitoring and configuration.")
     (license license:expat)))
 
 (define-public python2-consul
-  (let ((consul (package-with-python2 python-consul)))
-    (package (inherit consul)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs consul))))))
+  (package-with-python2 python-consul))
 
 (define-public python-schematics
   (package
@@ -11360,7 +11185,7 @@ discovery, monitoring and configuration.")
          (base32
           "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
     (build-system python-build-system)
-    (inputs
+    (propagated-inputs
      `(("python-six" ,python-six)))
     (arguments
      `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
@@ -11368,15 +11193,10 @@ discovery, monitoring and configuration.")
     (home-page "https://github.com/schematics/schematics")
     (synopsis "Python Data Structures for Humans")
     (description "Python Data Structures for Humans.")
-    (license license:bsd-3)
-    (properties `((python2-variant . ,(delay python2-schematics))))))
+    (license license:bsd-3)))
 
 (define-public python2-schematics
-  (let ((base (package-with-python2 (strip-python2-variant python-schematics))))
-    (package (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-schematics))
 
 (define-public python-publicsuffix
   (package
@@ -11395,15 +11215,10 @@ discovery, monitoring and configuration.")
     (synopsis "Get suffix for a domain name")
     (description "Get a public suffix for a domain name using the Public Suffix
 List.")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-nltk))))))
+    (license license:expat)))
 
 (define-public python2-publicsuffix
-  (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix))))
-    (package (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-publicsuffix))
 
 (define-public python-publicsuffix2
   (package
@@ -11423,15 +11238,10 @@ List.")
     (synopsis "Get a public suffix for a domain name using the Public Suffix List")
     (description "Get a public suffix for a domain name using the Public Suffix
 List.  Forked from and using the same API as the publicsuffix package.")
-    (license (list license:expat license:mpl2.0))
-    (properties `((python2-variant . ,(delay python2-publicsuffix2))))))
+    (license (list license:expat license:mpl2.0))))
 
 (define-public python2-publicsuffix2
-  (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix2))))
-    (package (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-publicsuffix2))
 
 (define-public python-url
   (package
@@ -11444,7 +11254,7 @@ List.  Forked from and using the same API as the publicsuffix package.")
                (base32
                 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
     (build-system python-build-system)
-    (inputs
+    (propagated-inputs
      `(("python-publicsuffix" ,python-publicsuffix)))
     (native-inputs
      `(("python-coverage" ,python-coverage)
@@ -11460,31 +11270,28 @@ List.  Forked from and using the same API as the publicsuffix package.")
 (define-public python2-url
   (let ((base (package-with-python2 (strip-python2-variant python-url))))
     (package (inherit base)
-      (inputs
-       `(("python2-publicsuffix" ,python2-publicsuffix)))
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+      (propagated-inputs
+       `(("python2-publicsuffix" ,python2-publicsuffix))))))
 
 (define-public python-freezegun
   (package
     (name "python-freezegun")
-    (version "0.3.7")
+    (version "0.3.8")
     (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "freezegun" version))
         (sha256
           (base32
-            "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
+            "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-mock" ,python-mock)
        ("python-nose" ,python-nose)
-       ("python-coverage" ,python-coverage)
+       ("python-coverage" ,python-coverage)))
+    (propagated-inputs
+     `(("python-six" ,python-six)
        ("python-dateutil-2" ,python-dateutil-2)))
-    (inputs
-     `(("python-six" ,python-six)))
     (arguments
      `(#:phases (modify-phases %standard-phases
         ;; The tests are normally executed via `make test`, but the PyPi
@@ -11500,11 +11307,8 @@ time by mocking the datetime module.")
     (license license:asl2.0)))
 
 (define-public python2-freezegun
-  (let ((base (package-with-python2 (strip-python2-variant python-freezegun))))
-    (package (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-freezegun))
+
 
 (define-public python-odfpy
   (package
@@ -11581,15 +11385,10 @@ Python to manipulate OpenDocument 1.2 files.")
     (synopsis "The httplib2 caching algorithms for use with requests")
     (description "CacheControl is a port of the caching algorithms in
 @code{httplib2} for use with @code{requests} session objects.")
-    (license license:asl2.0)
-    (properties `((python2-variant . ,(delay python2-cachecontrol))))))
+    (license license:asl2.0)))
 
 (define-public python2-cachecontrol
-  (let ((base (package-with-python2 (strip-python2-variant python-cachecontrol))))
-    (package (inherit base)
-             (native-inputs
-              `(("python2-setuptools" ,python2-setuptools)
-                ,@(package-native-inputs base))))))
+  (package-with-python2 python-cachecontrol))
 
 (define-public python-lit
   (package
@@ -11608,16 +11407,10 @@ Python to manipulate OpenDocument 1.2 files.")
     (description "@code{lit} is a portable tool for executing LLVM and Clang
 style test suites, summarizing their results, and providing indication of
 failures.")
-    (license license:ncsa)
-    (properties `((python2-variant . ,(delay python2-lit))))))
+    (license license:ncsa)))
 
 (define-public python2-lit
-  (let ((base (package-with-python2 (strip-python2-variant python-lit))))
-    (package
-      (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-lit))
 
 (define-public python-pytest-pep8
   (package
@@ -11631,10 +11424,7 @@ failures.")
                 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
     (build-system python-build-system)
     (arguments
-     `(#:tests? #f ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
-       ;; Prevent creation of the egg. This works around
-       ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
-       #:configure-flags '("--single-version-externally-managed" "--root=/")))
+     `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
     (native-inputs
      `(("python-pytest" ,python-pytest)))
     (propagated-inputs
@@ -11642,15 +11432,10 @@ failures.")
     (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
     (synopsis "Py.test plugin to check PEP8 requirements")
     (description "Pytest plugin for checking PEP8 compliance.")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-pytest-pep8))))))
+    (license license:expat)))
 
 (define-public python2-pytest-pep8
-  (let ((base (package-with-python2 (strip-python2-variant python-pytest-pep8))))
-    (package (inherit base)
-             (native-inputs
-              `(("python2-setuptools" ,python2-setuptools)
-                ,@(package-native-inputs base))))))
+  (package-with-python2 python-pytest-pep8))
 
 (define-public python-pytest-flakes
   (package
@@ -11664,14 +11449,14 @@ failures.")
                 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
     (build-system python-build-system)
     (arguments
-     `(;; Prevent creation of the egg. This works around
-       ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
-       #:configure-flags '("--single-version-externally-managed" "--root=/")
-       #:phases
+     `(#:phases
        (modify-phases %standard-phases
          (delete 'check)
          (add-after 'install 'check
-           (lambda _ ; It's easier to run tests after install.
+           (lambda* (#:key outputs inputs #:allow-other-keys)
+             ;; It's easier to run tests after install.
+             ;; Make installed package available for running the tests
+             (add-installed-pythonpath inputs outputs)
              (zero? (system* "py.test" "-vv")))))))
     (native-inputs
      `(("python-coverage" ,python-coverage)
@@ -11683,15 +11468,10 @@ failures.")
     (home-page "https://github.com/fschulze/pytest-flakes")
     (synopsis "Py.test plugin to check source code with pyflakes")
     (description "Pytest plugin for checking Python source code with pyflakes.")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-pytest-flakes))))))
+    (license license:expat)))
 
 (define-public python2-pytest-flakes
-  (let ((base (package-with-python2 (strip-python2-variant python-pytest-flakes))))
-    (package (inherit base)
-             (native-inputs
-              `(("python2-setuptools" ,python2-setuptools)
-                ,@(package-native-inputs base))))))
+  (package-with-python2 python-pytest-flakes))
 
 (define-public python-natsort
   (package
@@ -11736,8 +11516,7 @@ functionality in the command line.")
   (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
     (package (inherit base)
              (native-inputs
-              `(("python2-setuptools" ,python2-setuptools)
-                ("python2-pathlib" ,python2-pathlib)
+              `(("python2-pathlib" ,python2-pathlib)
                 ("python2-mock" ,python2-mock)
                 ("python2-enum34" ,python2-enum34)
                 ,@(package-native-inputs base))))))
@@ -11754,7 +11533,7 @@ functionality in the command line.")
         (base32
           "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
   (build-system python-build-system)
-  (inputs
+  (propagated-inputs
    `(("python-psutil" ,python-psutil)))
   (home-page
     "https://github.com/nicolargo/glances")
@@ -11764,16 +11543,10 @@ functionality in the command line.")
     "Glances is a curses-based monitoring tool for a wide variety of platforms.
 Glances uses the PsUtil library to get information from your system. It monitors
 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
-  (license license:lgpl3+)
-  (properties `((python2-variant . ,(delay python2-glances))))))
+  (license license:lgpl3+)))
 
 (define-public python2-glances
-  (let ((base (package-with-python2 (strip-python2-variant python-glances))))
-    (package
-      (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-glances))
 
 (define-public python-graphql-core
   (package
@@ -11800,7 +11573,7 @@ CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
      `(("python-gevent" ,python-gevent)
        ("python-mock" ,python-mock)
        ("python-pytest-mock" ,python-pytest-mock)))
-    (inputs
+    (propagated-inputs
      `(("python-promise" ,python-promise)
        ("python-six" ,python-six)))
     (home-page "https://github.com/graphql-python/graphql-core")
@@ -11810,32 +11583,26 @@ CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
 runtime designed and used to request and deliver data to mobile and web apps.
 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
 to Python.")
-    (properties `((python2-variant . ,(delay python2-graphql-core))))
     (license license:expat)))
 
 (define-public python2-graphql-core
-  (let ((base (package-with-python2
-                (strip-python2-variant python-graphql-core))))
-    (package (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-graphql-core))
 
 (define-public python-graphql-relay
   (package
     (name "python-graphql-relay")
-    (version "0.4.4")
+    (version "0.4.5")
     (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "graphql-relay" version))
         (sha256
          (base32
-          "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
+          "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-pytest" ,python-pytest)))
-    (inputs
+    (propagated-inputs
      `(("python-graphql-core" ,python-graphql-core)
        ("python-promise" ,python-promise)
        ("python-six" ,python-six)))
@@ -11847,16 +11614,10 @@ using the GraphQL Python reference implementation of a GraphQL server.  It
 should be noted that the code is a exact port of the original
 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
 from Facebook.")
-    (properties `((python2-variant . ,(delay python2-graphql-relay))))
     (license license:expat)))
 
 (define-public python2-graphql-relay
-  (let ((base (package-with-python2
-                (strip-python2-variant python-graphql-relay))))
-    (package (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-graphql-relay))
 
 (define-public python-graphene
   (package
@@ -11876,7 +11637,7 @@ from Facebook.")
        ("python-psycopg2" ,python-psycopg2)
        ("python-pytest-django" ,python-pytest-django)
        ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
-    (inputs
+    (propagated-inputs
      `(("python-graphql-core" ,python-graphql-core)
        ("python-graphql-relay" ,python-graphql-relay)
        ("python-iso8601" ,python-iso8601)
@@ -11896,8 +11657,7 @@ with an associated set of resolve methods that know how to fetch data.")
                 (strip-python2-variant python-graphene))))
     (package (inherit base)
       (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ("python2-sqlalchemy" ,python2-sqlalchemy)
+       `(("python2-sqlalchemy" ,python2-sqlalchemy)
          ,@(package-native-inputs base))))))
 
 (define-public python-nautilus
@@ -11913,23 +11673,18 @@ with an associated set of resolve methods that know how to fetch data.")
           "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
     (build-system python-build-system)
     (arguments `(#:tests? #f)) ; fails to import test modules
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
-    (inputs
+    (propagated-inputs
      `(("python-bcrypt" ,python-bcrypt)
        ("python-click" ,python-click)
        ("python-consul" ,python-consul)
-       ("python-graphql-core" ,python-graphql-core)
-       ("python-graphql-relay" ,python-graphql-relay)
        ("python-graphene" ,python-graphene)
        ("python-jinja2" ,python-jinja2)
-       ("python-nose2" ,python-nose2)
        ("python-peewee" ,python-peewee)
        ("python-pika" ,python-pika)
-       ("python-pycparser" ,python-pycparser)
-       ("python-requests" ,python-requests)
        ("python-tornado" ,python-tornado)
        ("python-wtforms" ,python-wtforms)))
+    (native-inputs
+     `(("python-nose2" ,python-nose2)))
     (home-page "https://github.com/AlecAivazis/nautilus")
     (synopsis "Library for creating microservice applications")
     (description
@@ -11938,6 +11693,74 @@ provide extendible implementations of common aspects of a cloud so that you can
 focus on building massively scalable web applications.")
     (license license:expat)))
 
+(define-public python-snowballstemmer
+  (package
+    (name "python-snowballstemmer")
+    (version "1.2.1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "snowballstemmer" version))
+              (sha256
+               (base32
+                "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
+    (build-system python-build-system)
+    (arguments
+     `(;; No tests exist
+       #:tests? #f))
+    (home-page "https://github.com/shibukawa/snowball_py")
+    (synopsis "Snowball stemming library collection for Python")
+    (description "This package provides 16 word stemmer algorithms generated
+from Snowball algorithms.  It includes the 15 original ones plus the Poerter
+English stemmer.")
+    (license license:bsd-3)))
+
+(define-public python2-snowballstemmer
+  (package-with-python2 python-snowballstemmer))
+
+(define-public python-sphinx-cloud-sptheme
+  (package
+    (name "python-sphinx-cloud-sptheme")
+    (version "1.7.1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "cloud_sptheme" version))
+              (sha256
+               (base32
+                "0zm9ap4p5dzln8f1m2immadaxv2xpg8jg4w53y52rhfl7pdb58vy"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-sphinx" ,python-sphinx)))
+    (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
+    (synopsis "'Cloud' theme for Sphinx documenter")
+    (description "This package contains the \"Cloud\" theme for Sphinx and some
+related extensions.")
+    (license license:bsd-3)))
+
+(define-public python2-sphinx-cloud-sptheme
+  (package-with-python2 python-sphinx-cloud-sptheme))
+
+(define-public python-sphinx-alabaster-theme
+  (package
+    (name "python-sphinx-alabaster-theme")
+    (version "0.7.9")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "alabaster" version))
+              (sha256
+               (base32
+                "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-pygments" ,python-pygments)))
+    (home-page "https://alabaster.readthedocs.io/")
+    (synopsis "Configurable sidebar-enabled Sphinx theme")
+    (description "Alabaster is a visually (c)lean, responsive, configurable
+theme for the Sphinx documentation system.  It's the default theme of Sphinx.")
+    (license license:bsd-3)))
+
+(define-public python2-sphinx-alabaster-theme
+  (package-with-python2 python-sphinx-alabaster-theme))
+
 (define-public python-betamax
   (package
     (name "python-betamax")
@@ -11953,33 +11776,27 @@ focus on building massively scalable web applications.")
     (arguments
      '(;; Many tests fail because they require networking.
        #:tests? #f))
-    (inputs
+    (propagated-inputs
      `(("python-requests" ,python-requests)))
     (home-page "https://github.com/sigmavirus24/betamax")
     (synopsis "Record HTTP interactions with python-requests")
     (description "Betamax will record your test suite's HTTP interactions and
 replay them during future tests.  It is designed to work with python-requests.")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-betamax))))))
+    (license license:expat)))
 
 (define-public python2-betamax
-  (let ((base (package-with-python2 (strip-python2-variant python-betamax))))
-    (package
-      (inherit base)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs base))))))
+  (package-with-python2 python-betamax))
 
 (define-public python-s3transfer
   (package
     (name "python-s3transfer")
-    (version "0.1.8")
+    (version "0.1.10")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "s3transfer" version))
               (sha256
                (base32
-                "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
+                "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -11993,7 +11810,7 @@ replay them during future tests.  It is designed to work with python-requests.")
      `(("python-docutils" ,python-docutils)
        ("python-mock" ,python-mock)
        ("python-nose" ,python-nose)))
-    (inputs
+    (propagated-inputs
      `(("python-botocore" ,python-botocore)))
     (synopsis "Amazon S3 Transfer Manager")
     (description "S3transfer is a Python library for managing Amazon S3
@@ -12008,7 +11825,6 @@ transfers.")
       (inherit base)
       (native-inputs
        `(("python2-futures" ,python2-futures)
-         ("python2-setuptools" ,python2-setuptools)
          ,@(package-native-inputs base))))))
 
 (define-public python-setproctitle
@@ -12108,16 +11924,10 @@ is used by PostgreSQL and the OpenSSH Server for example.")
 The schema format is based on the JSON Schema
 proposal (http://json-schema.org), so combined with json the library is also
 useful as a validator for JSON data.")
-  (license license:expat)
-  (properties `((python2-variant . ,(delay python2-validictory))))))
+  (license license:expat)))
 
 (define-public python2-validictory
-  (let ((base (package-with-python2
-               (strip-python2-variant python-validictory))))
-    (package
-      (inherit base)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs base))))))
+  (package-with-python2 python-validictory))
 
 (define-public python-aniso8601
   (package
@@ -12271,15 +12081,10 @@ useful as a validator for JSON data.")
     (description
       "This package allows determination of image size from
 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
-    (license license:expat)
-    (properties `((python2-variant . ,(delay python2-imagesize))))))
+    (license license:expat)))
 
 (define-public python2-imagesize
-  (let ((base (package-with-python2 (strip-python2-variant python-imagesize))))
-    (package
-      (inherit base)
-      (native-inputs `(("python2-setuptools" ,python2-setuptools)
-                       ,@(package-native-inputs base))))))
+ (package-with-python2 python-imagesize))
 
 (define-public python-axolotl-curve25519
   (package
@@ -12300,8 +12105,6 @@ PNG, JPEG, JPEG2000 and GIF files in pure Python.")
      `(;; Prevent creation of the egg. This works around
        ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
        #:configure-flags '("--root=/")))
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/tgalal/python-axolotl-curve25519")
     (synopsis "Python wrapper for curve25519 library")
     (description "This is a python wrapper for the curve25519 library
@@ -12340,8 +12143,6 @@ python-axolotl.")
        ;; Prevent creation of the egg. This works around
        ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
        #:configure-flags '("--root=/")))
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (propagated-inputs
      `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
        ("python-dateutil" ,python-dateutil)
@@ -12437,3 +12238,101 @@ the Flask web framework in Python.  It is similar to package
 @code{python-flask-restful} but supports the @code{python-swagger}
 documentation builder.")
     (license license:expat)))
+
+(define-public python-sadisplay
+  (package
+    (name "python-sadisplay")
+    (version "0.4.6")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "sadisplay" version))
+      (sha256
+        (base32
+          "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
+    (build-system python-build-system)
+    (propagated-inputs
+      `(("python-sqlalchemy" ,python-sqlalchemy)))
+    (native-inputs
+      `(("python-nose" ,python-nose)))
+    (home-page "https://bitbucket.org/estin/sadisplay")
+    (synopsis "SQLAlchemy schema displayer")
+    (description "This package provides a program to build Entity
+Relationship diagrams from a SQLAlchemy model (or directly from the
+database).")
+    (license license:bsd-3)))
+
+(define-public python2-sadisplay
+  (package-with-python2 python-sadisplay))
+
+(define-public python-flask-restful-swagger
+  (package
+    (name "python-flask-restful-swagger")
+    (version "0.19")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "flask-restful-swagger" version))
+       (sha256
+        (base32
+         "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-flask-restful" ,python-flask-restful)))
+    (home-page "https://github.com/rantav/flask-restful-swagger")
+    (synopsis "Extract Swagger specs from Flask-Restful projects")
+    (description "This package lets you extract Swagger API documentation
+specs from your Flask-Restful projects.")
+    (license license:expat)))
+
+(define-public python2-flask-restful-swagger
+  (package-with-python2 python-flask-restful-swagger))
+
+(define-public python-argcomplete
+  (package
+    (name "python-argcomplete")
+    (version "1.7.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "argcomplete" version))
+        (sha256
+          (base32
+            "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/kislyuk/argcomplete")
+    (synopsis "Shell tab completion for Python argparse")
+    (description "argcomplete provides extensible command line tab completion
+of arguments and options for Python scripts using @code{argparse}.  It's
+particularly useful for programs with many options or sub-parsers that can
+dynamically suggest completions; for example, when browsing resources over the
+network.")
+    (license license:asl2.0)))
+
+(define-public python2-argcomplete
+  (package-with-python2 python-argcomplete))
+
+(define-public python-xopen
+  (package
+    (name "python-xopen")
+    (version "0.1.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "xopen" version))
+        (sha256
+          (base32
+           "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
+        (file-name (string-append name "-" version ".tar.gz"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/marcelm/xopen/")
+    (synopsis "Open compressed files transparently")
+    (description "This module provides an @code{xopen} function that works like
+Python's built-in @code{open} function, but can also deal with compressed files.
+Supported compression formats are gzip, bzip2 and, xz, and are automatically
+recognized by their file extensions.  The focus is on being as efficient as
+possible on all supported Python versions.")
+    (license license:expat)))
+
+(define-public python2-xopen
+  (package-with-python2 python-xopen))
diff --git a/gnu/packages/qemu.scm b/gnu/packages/qemu.scm
index e429c04244..4c47a09902 100644
--- a/gnu/packages/qemu.scm
+++ b/gnu/packages/qemu.scm
@@ -69,17 +69,14 @@
 (define-public qemu
   (package
     (name "qemu")
-    (version "2.7.0")
+    (version "2.8.0")
     (source (origin
              (method url-fetch)
              (uri (string-append "http://wiki.qemu-project.org/download/qemu-"
                                  version ".tar.bz2"))
              (sha256
               (base32
-               "0lqyz01z90nvxpc3nx4djbci7hx62cwvs5zwd6phssds0sap6vij"))
-             (patches (search-patches "qemu-CVE-2016-8576.patch"
-                                      "qemu-CVE-2016-8577.patch"
-                                      "qemu-CVE-2016-8578.patch"))))
+               "0qjy3rcrn89n42y5iz60kgr0rrl29hpnj8mq2yvbc1wrcizmvzfs"))))
     (build-system gnu-build-system)
     (arguments
      '(;; Running tests in parallel can occasionally lead to failures, like:
@@ -106,6 +103,8 @@
                 (apply system*
                        `("./configure"
                          ,(string-append "--cc=" (which "gcc"))
+                         ;; Some architectures insist on using HOST_CC
+                         ,(string-append "--host-cc=" (which "gcc"))
                          "--disable-debug-info" ; save build space
                          "--enable-virtfs"      ; just to be sure
                          ,(string-append "--prefix=" out)
@@ -124,7 +123,7 @@
          (add-before 'check 'make-gtester-verbose
            (lambda _
              ;; Make GTester verbose to facilitate investigation upon failure.
-             (setenv "V" "1")))
+             (setenv "V" "1") #t))
          (add-before 'check 'disable-test-qga
            (lambda _
              (substitute* "tests/Makefile.include"
@@ -230,10 +229,10 @@ server and embedded PowerPC, and S390 guests.")
        ("pci.ids"
         ,(origin
            (method url-fetch)
-           (uri "http://pciids.sourceforge.net/v2.2/pci.ids")
+           (uri "https://raw.githubusercontent.com/pciutils/pciids/f9477789526f9d380bc57aa92e357c521738d5dd/pci.ids")
            (sha256
             (base32
-             "0h8v0lrlrxkfnjiwnwiq86zyvb8qa2n3844dp1m01lh2nb2fliqw"))))
+             "0g6dbwlamagxqxvng67xng3w2x56c0np4md1v1p1jn32qw518az0"))))
        ("usb.ids"
         ,(origin
            (method url-fetch)
@@ -394,8 +393,9 @@ three libraries:
                                (which "nosetests") "\"")))
              #t)))))
     (inputs
-     `(("libvirt" ,libvirt)
-       ("python-lxml" ,python-lxml)))
+     `(("libvirt" ,libvirt)))
+    (propagated-inputs
+     `(("python-lxml" ,python-lxml)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("python-nose" ,python-nose)))
@@ -423,6 +423,7 @@ virtualization library.")
     (build-system python-build-system)
     (arguments
      `(#:python ,python-2
+       #:use-setuptools? #f ; Uses custom distutils 'install' command.
        ;; Some of the tests seem to require network access to install virtual
        ;; machines.
        #:tests? #f
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index b442356530..15beb8037e 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -35,6 +35,7 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages databases)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages freedesktop)
@@ -59,6 +60,38 @@
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages xml))
 
+(define-public grantlee
+  (package
+    (name "grantlee")
+    (version "5.1.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "https://github.com/steveire/grantlee/archive/v"
+                            version ".tar.gz"))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32 "1lf9rkv0i0kd7fvpgg5l8jb87zw8dzcwd1liv6hji7g4wlpmfdiq"))))
+    (native-inputs
+     `(("doxygen" ,doxygen)))
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("qtscript" ,qtscript)))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+                  (lambda _
+                    (zero? (system* "ctest" ;; exclude 2 tests which require a display
+                                    "-E" "htmlbuildertest|plainmarkupbuildertest")))))))
+    (home-page "https://github.com/steveire/grantlee")
+    (synopsis "Libraries for text templating with Qt")
+    (description "Grantlee Templates can be used for theming and generation of
+other text such as code.  The syntax uses the syntax of the Django template
+system, and the core design of Django is reused in Grantlee.")
+    (license license:lgpl2.0+)))
+
 (define-public qt
   (package
     (name "qt")
@@ -315,7 +348,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtbase
   (package
     (name "qtbase")
-    (version "5.7.0")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -324,7 +357,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0ip6xnizsn269r4s1nq9lkx8cdxkjqr1fidwrj3sa8xb7h96syry"))
+               "0zjmcrmnnmaz1lr9wc5i6y565hsvl8ycn790ivqaz62dv54zbkgd"))
              (modules '((guix build utils)))
              (snippet
               '(begin
@@ -498,7 +531,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtsvg
   (package (inherit qtbase)
     (name "qtsvg")
-    (version "5.7.0")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -507,7 +540,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "10fqrlqkiq83xhx79g8d2sjy7hjdnp28067z8f4byj7db81rzy51"))))
+               "0irr9h566hl9nx8p919rz276zbfvvd6vqdb6i9g6b3piikdigw5h"))))
     (propagated-inputs `())
     (native-inputs `(("perl" ,perl)))
     (inputs
@@ -532,7 +565,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtimageformats
   (package (inherit qtsvg)
     (name "qtimageformats")
-    (version "5.7.0")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -541,14 +574,15 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1rb27x7i2pmvsck6wax2cg31gqpzaakciy45wm5l3lcl86j48czg"))
+               "1x3p1xmw7spxa4bwriyrwsfrq31jabsdjsi5fras9y39naia55sg"))
              (modules '((guix build utils)))
              (snippet
               '(begin
                  (delete-file-recursively "src/3rdparty")))))
     (native-inputs `())
     (inputs
-     `(("libmng" ,libmng)
+     `(("jasper" ,jasper)
+       ("libmng" ,libmng)
        ("libtiff" ,libtiff)
        ("libwebp" ,libwebp)
        ("mesa" ,mesa)
@@ -558,7 +592,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtx11extras
   (package (inherit qtsvg)
     (name "qtx11extras")
-    (version "5.7.0")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -567,7 +601,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1yrkn8pqdbvbqykas3wx1vdfimhjkgx3s5jgdxib9dgmgyx6vjzw"))))
+               "09z49jm70f5i0gcdz9a16z00pg96x8pz7vri5wpirh3fqqn0qnjz"))))
     (native-inputs `(("perl" ,perl)))
     (inputs
      `(("mesa" ,mesa)
@@ -576,7 +610,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtxmlpatterns
   (package (inherit qtsvg)
     (name "qtxmlpatterns")
-    (version "5.7.0")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -585,14 +619,14 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "02z2qxamslg6sphnaykjcjfpypq4b69pb586s43vw4fplm72m21q"))))
+               "1rgqnpg64gn5agmvjwy0am8hp5fpxl3cdkixr1yrsdxi5a6961d8"))))
     (native-inputs `(("perl" ,perl)))
     (inputs `(("qtbase" ,qtbase)))))
 
 (define-public qtdeclarative
   (package (inherit qtsvg)
     (name "qtdeclarative")
-    (version "5.7.0")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -601,7 +635,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1x7rij423g5chlfd2kix54f393vxwjvdfsn1c7sybqmfycwn5pl6"))))
+               "0mjxfwnplpx60jc6y94krg00isddl9bfwc7dayl981njb4qds4zx"))))
     (native-inputs
      `(("perl" ,perl)
        ("pkg-config" ,pkg-config)
@@ -615,7 +649,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtconnectivity
   (package (inherit qtsvg)
     (name "qtconnectivity")
-    (version "5.7.0")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -624,7 +658,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "00r7lc1w3snfp2qfqmviqzv0cw16zd8m1sfpvxvpl65yqmzcli4q"))))
+               "0rmr7bd4skby7bax9hpj2sid2bq3098nkw7xm02mdp04hc3bks5k"))))
     (native-inputs
      `(("perl" ,perl)
        ("pkg-config" ,pkg-config)
@@ -636,7 +670,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtwebsockets
   (package (inherit qtsvg)
     (name "qtwebsockets")
-    (version "5.7.0")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -645,7 +679,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0hwb2l7iwf4wf7l95dli8j3b7h0nffp56skfg1x810kzj0df26vl"))))
+               "1laj0slwibs0bg69kgrdhc9k1s6yisq3pcsr0r9rhbkzisv7aajw"))))
     (native-inputs
      `(("perl" ,perl)
        ("qtdeclarative" ,qtdeclarative)))
@@ -654,7 +688,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtsensors
   (package (inherit qtsvg)
     (name "qtsensors")
-    (version "5.7.0")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -663,7 +697,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1gii6wg2xd3bkb86y5hgpmwcpl04xav030zscpl6fhscl9kcqg98"))))
+               "041v1x8pwfzpyk6y0sy5zgm915pi15xdhiy18fd5wqayvcp99cyc"))))
     (native-inputs
      `(("perl" ,perl)
        ("qtdeclarative" ,qtdeclarative)))
@@ -672,7 +706,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtmultimedia
   (package (inherit qtsvg)
     (name "qtmultimedia")
-    (version "5.7.0")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -681,7 +715,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0ndmhiflmyr144nq8drd5njsdi282ixsm4730q5n0ji2v9dp1bh5"))
+               "1vvxmgmvjnz9w1h2ph1j2fy77ij141ycx5fric60lq02pxzifax5"))
              (modules '((guix build utils)))
              (snippet
               '(begin
@@ -701,7 +735,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtwayland
   (package (inherit qtsvg)
     (name "qtwayland")
-    (version "5.7.0")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -710,7 +744,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "04dynjcr6gxi3hcqdf688a4hkabi2l17slpcx9k0f3dxygwcgf96"))))
+               "1iq1c89y4ggq0dxjlf62jyhh8a9l3x7y914x84w5pby8h3hwagzj"))))
     (native-inputs
      `(("glib" ,glib)
        ("perl" ,perl)
@@ -732,7 +766,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtserialport
   (package (inherit qtsvg)
     (name "qtserialport")
-    (version "5.7.0")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -741,7 +775,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0rc2l14s59qskp16wqlkizfai32s41qlm7a86r3qahx28gc51qaw"))))
+               "09jsryc0z49cz9783kq48rkn42f10c6krzivp812ddwjsfdy3mbn"))))
     (native-inputs `(("perl" ,perl)))
     (inputs
      `(("qtbase" ,qtbase)
@@ -750,7 +784,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtwebchannel
   (package (inherit qtsvg)
     (name "qtwebchannel")
-    (version "5.7.0")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -759,7 +793,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "05lqfidlh1ahdd1j9y20p2037qbcq51zkdzj2m8fwhn7ghbwvd1s"))))
+               "16rij92dxy4k5231l3dpmhy7cnz0cjkn50cpzaf014zrdz3kmav3"))))
     (native-inputs
      `(("perl" ,perl)
        ("qtdeclarative" ,qtdeclarative)
@@ -769,7 +803,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtlocation
   (package (inherit qtsvg)
     (name "qtlocation")
-    (version "5.7.0")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -778,7 +812,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0rd898gndn41jrp78203lxd94ybfv693l0qg0myag4r46ikk69vh"))))
+               "17zkzffzwbg6aqhsggs23cmwzq4y45m938842lsc423hfm7fdsgr"))))
     (native-inputs
      `(("perl" ,perl)
        ("qtdeclarative" ,qtdeclarative)
@@ -789,7 +823,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qttools
   (package (inherit qtsvg)
     (name "qttools")
-    (version "5.7.0")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -798,7 +832,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "004m9l7bgh7qnncbyl3d5fkggdrqx58ib21xv4hflvvarxrssibg"))))
+               "1b6zqa5690b8lqms7rrhb8rcq0xg5hp117v3m08qngbcd0i706b4"))))
     (native-inputs
      `(("perl" ,perl)
        ("qtdeclarative" ,qtdeclarative)))
@@ -809,7 +843,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtscript
   (package (inherit qtsvg)
     (name "qtscript")
-    (version "5.7.0")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -818,7 +852,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0040890p5ilyrmcpndz1hhp08x2ms5gw4lp4n5iax2a957yy2i4w"))))
+               "09m41n95448pszr7inlg03ycb66s1a9hzfylaka92382acf1myav"))))
     (native-inputs
      `(("perl" ,perl)
        ("qttools" ,qttools)))
@@ -828,7 +862,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtquickcontrols
   (package (inherit qtsvg)
     (name "qtquickcontrols")
-    (version "5.7.0")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -837,7 +871,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0cpcrmz9n5b4bgmshmk093lirl9xwqb23inchnai1zqg21vrmqfq"))))
+               "17cyfyqzjbm9dhq9pjscz36y84y16rmxwk6h826gjfprddrimsvg"))))
     (inputs
      `(("qtbase" ,qtbase)
        ("qtdeclarative" ,qtdeclarative)))))
@@ -845,7 +879,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtquickcontrols2
   (package (inherit qtsvg)
     (name "qtquickcontrols2")
-    (version "5.7.0")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -854,7 +888,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0i8h933vhvx1bmniqdx0idg6vk82w9byd3dq0bb2phwjg5vv1xb3"))))
+               "1v77ydy4k15lksp3bi2kgha2h7m79g4n7c2qhbr09xnvpb8ars7j"))))
     (inputs
      `(("qtbase" ,qtbase)
        ("qtdeclarative" ,qtdeclarative)))))
@@ -862,7 +896,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public qtgraphicaleffects
   (package (inherit qtsvg)
     (name "qtgraphicaleffects")
-    (version "5.7.0")
+    (version "5.7.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.qt.io/official_releases/qt/"
@@ -871,7 +905,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1rwdjg5mk6xpadmxfq64xfp573zp5lrj9illb9105ra5wff565n8"))))
+               "1j2drnx7zp3w6cgvy7bn00fyk5v7vw1j1hidaqcg78lzb6zgls1c"))))
     (inputs
      `(("qtbase" ,qtbase)
        ("qtdeclarative" ,qtdeclarative)))))
@@ -879,7 +913,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
 (define-public python-sip
   (package
     (name "python-sip")
-    (version "4.18")
+    (version "4.18.1")
     (source
       (origin
         (method url-fetch)
@@ -888,7 +922,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
                          "sip-" version "/sip-" version ".tar.gz"))
         (sha256
          (base32
-          "1dlw4kyiwd9bzmd1djm79c121r219abaz86lvizdk6ksq20mrp7i"))))
+          "1452zy3g0qv4fpd9c0y4gq437kn0xf7bbfniibv5n43zpwnpmklv"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("python" ,python-wrapper)))
@@ -942,7 +976,7 @@ module provides support functions to the automatically generated code.")
 (define-public python-pyqt
   (package
     (name "python-pyqt")
-    (version "5.6")
+    (version "5.7")
     (source
       (origin
         (method url-fetch)
@@ -952,14 +986,28 @@ module provides support functions to the automatically generated code.")
                          version ".tar.gz"))
         (sha256
          (base32
-          "1qgh42zsr9jppl9k7fcdbhxcd1wrb7wyaj9lng9nxfa19in1lj1f"))
+          "01avscn1bir0h8zzfh1jvpljgwg6qkax5nk142xrm63rbyx969l9"))
        (patches (search-patches "pyqt-configure.patch"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("python-sip" ,python-sip)
        ("qtbase" ,qtbase))) ; for qmake
     (inputs
-     `(("python" ,python-wrapper)))
+     `(("python" ,python-wrapper)
+       ("qtbase" ,qtbase)
+       ("qtconnectivity" ,qtconnectivity)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtlocation" ,qtlocation)
+       ("qtmultimedia" ,qtmultimedia)
+       ("qtsensors" ,qtsensors)
+       ("qtserialport" ,qtserialport)
+       ("qtsvg" ,qtsvg)
+       ("qttools" ,qttools)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebkit" ,qtwebkit)
+       ("qtwebsockets" ,qtwebsockets)
+       ("qtx11extras" ,qtx11extras)
+       ("qtxmlpatterns" ,qtxmlpatterns)))
     (arguments
      `(#:modules ((srfi srfi-1)
                   ,@%gnu-build-system-modules)
@@ -982,13 +1030,19 @@ module provides support functions to the automatically generated code.")
                         "."))
                     (lib (string-append out "/lib/python"
                                         python-major+minor
-                                        "/site-packages")))
+                                        "/site-packages"))
+                    (stubs (string-append lib "/PyQt5")))
                (zero? (system* "python" "configure.py"
                                "--confirm-license"
                                "--bindir" bin
                                "--destdir" lib
                                "--designer-plugindir" designer
                                "--qml-plugindir" qml
+                               ; Where to install the PEP 484 Type Hints stub
+                               ; files. Without this the stubs are tried to be
+                               ; installed into the python package's
+                               ; site-package directory, which is read-only.
+                               "--stubsdir" stubs
                                "--sipdir" sip))))))))
     (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
     (synopsis "Python bindings for Qt")
@@ -1005,34 +1059,8 @@ contain over 620 classes.")
      `(("python-sip" ,python2-sip)
        ("qtbase" ,qtbase)))
     (inputs
-     `(("python" ,python-2)))))
-
-(define-public python-pyqt-5.5
-  (package (inherit python-pyqt)
-    (version "5.5")
-    (source
-      (origin
-        (method url-fetch)
-        (uri
-          (string-append "mirror://sourceforge/pyqt/PyQt5/"
-                         "PyQt-" version "/PyQt-gpl-"
-                         version ".tar.gz"))
-        (sha256
-         (base32
-          "056qmkv02wdcfblqdaxiswrgn4wa88sz22i1x58dpb1iniavplfd"))
-       (patches (search-patches "pyqt-configure.patch"))))
-    (native-inputs
-     `(("python-sip" ,python-sip)
-       ("qt" ,qt)))))
-
-(define-public python2-pyqt-5.5
-  (package (inherit python-pyqt-5.5)
-    (name "python2-pyqt")
-    (native-inputs
-     `(("python-sip" ,python2-sip)
-       ("qt" ,qt)))
-    (inputs
-     `(("python" ,python-2)))))
+     `(("python" ,python-2)
+       ,@(alist-delete "python" (package-inputs python-pyqt))))))
 
 (define-public python-pyqt-4
   (package (inherit python-pyqt)
@@ -1051,38 +1079,38 @@ contain over 620 classes.")
     (native-inputs
      `(("python-sip" ,python-sip)
        ("qt" ,qt-4)))
+    (inputs `(("python" ,python-wrapper)))
     (arguments
      `(#:tests? #f ; no check target
        #:modules ((srfi srfi-1)
                   ,@%gnu-build-system-modules)
        #:phases
-         (alist-replace
-         'configure
-         (lambda* (#:key inputs outputs #:allow-other-keys)
-           (let* ((out (assoc-ref outputs "out"))
-                  (bin (string-append out "/bin"))
-                  (sip (string-append out "/share/sip"))
-                  (python (assoc-ref inputs "python"))
-                  (python-version
-                    (last (string-split python #\-)))
-                  (python-major+minor
-                    (string-join
-                      (take (string-split python-version #\.) 2)
-                      "."))
-                  (lib (string-append out "/lib/python"
-                                      python-major+minor
-                                      "/site-packages")))
-             (zero? (system* "python" "configure.py"
-                             "--confirm-license"
-                             "--bindir" bin
-                             "--destdir" lib
-                             "--sipdir" sip))))
-         %standard-phases)))
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin"))
+                    (sip (string-append out "/share/sip"))
+                    (python (assoc-ref inputs "python"))
+                    (python-version
+                      (last (string-split python #\-)))
+                    (python-major+minor
+                      (string-join
+                        (take (string-split python-version #\.) 2)
+                        "."))
+                    (lib (string-append out "/lib/python"
+                                        python-major+minor
+                                        "/site-packages")))
+               (zero? (system* "python" "configure.py"
+                               "--confirm-license"
+                               "--bindir" bin
+                               "--destdir" lib
+                               "--sipdir" sip))))))))
     (license (list license:gpl2 license:gpl3)))) ; choice of either license
 
 (define-public python2-pyqt-4
   (package (inherit python-pyqt-4)
-           (name "python2-pyqt-4")
+           (name "python2-pyqt")
            (native-inputs
             `(("python-sip" ,python2-sip)
               ("qt" ,qt-4)))
@@ -1175,7 +1203,7 @@ different kinds of sliders, and much more.")
 (define-public qtwebkit
   (package
     (name "qtwebkit")
-    (version "5.7.0")
+    (version "5.7.1")
     (source
       (origin
         (method url-fetch)
@@ -1187,7 +1215,7 @@ different kinds of sliders, and much more.")
         ;; <http://lists.qt-project.org/pipermail/development/2016-May/025923.html>.
         (sha256
          (base32
-          "1prlpl3zslzpr1iv7m3irvxjxn3v8nlxh21v9k2kaq4fpwy2b8y7"))))
+          "00szgcra6pf2myfjrdbsr1gmrxycpbjqlzkplna5yr1rjg4gfv54"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("perl" ,perl)
diff --git a/gnu/packages/rdf.scm b/gnu/packages/rdf.scm
index d0a362c3a0..1dd23c28e3 100644
--- a/gnu/packages/rdf.scm
+++ b/gnu/packages/rdf.scm
@@ -315,11 +315,10 @@ ideal (e.g. in LV2 implementations or embedded applications).")
           (base32
             "0kvaf332cqbi47rqzlpdx4mbkvw12mkrzkj8n9l19wk713d4py9w"))))
     (build-system python-build-system)
-    (inputs
+    (propagated-inputs
       `(("python-html5lib" ,python-html5lib)
         ("python-isodate" ,python-isodate)
-        ("python-pyparsing" ,python-pyparsing)
-        ("python-setuptools" ,python-setuptools)))
+        ("python-pyparsing" ,python-pyparsing)))
     (home-page "https://github.com/RDFLib/rdflib")
     (synopsis
       "Python RDF library")
diff --git a/gnu/packages/readline.scm b/gnu/packages/readline.scm
index 43817791b5..16a31afd73 100644
--- a/gnu/packages/readline.scm
+++ b/gnu/packages/readline.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24,7 +25,8 @@
   #:use-module (gnu packages perl)
   #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module (guix build-system gnu))
+  #:use-module (guix build-system gnu)
+  #:use-module (guix utils))
 
 (define-public readline
   (let ((post-install-phase
@@ -61,8 +63,18 @@
                          ;; cross-compiling, so provide the correct answer.
                          ,@(if (%current-target-system)
                                '("bash_cv_wcwidth_broken=no")
+                               '())
+                         ;; MinGW: ncurses provides the termcap api.
+                         ,@(if (target-mingw?)
+                               '("bash_cv_termcap_lib=ncurses")
                                '()))
 
+                   ,@(if (target-mingw?)
+                         ;; MinGW: termcap in ncurses
+                         ;; some SIG_* #defined in _POSIX
+                         '(#:make-flags '("TERMCAP_LIB=-lncurses"
+                                          "CPPFLAGS=-D_POSIX -D'chown(f,o,g)=0'"))
+                         '())
                    #:phases (alist-cons-after
                              'install 'post-install
                              ,post-install-phase
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index baae553992..50dde3f48c 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014, 2015 Pjotr Prins <pjotr.guix@thebird.nl>
-;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014, 2015 David Thompson <davet@gnu.org>
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
@@ -47,8 +47,7 @@
 (define-public ruby
   (package
     (name "ruby")
-    (replacement ruby-2.3.3)
-    (version "2.3.1")
+    (version "2.3.3")
     (source
      (origin
        (method url-fetch)
@@ -57,9 +56,8 @@
                            "/ruby-" version ".tar.xz"))
        (sha256
         (base32
-         "0f3395q7pd2hrl2gv26bib80038sjawxgmhl9zn22fjs9m9va9b7"))
+         "1p0rfk0blrbfjcnv0vb0ha4hxflgkfhv9zbzp4vvld2pi31ahkqs"))
        (modules '((guix build utils)))
-       (patches (search-patches "ruby-symlinkfix.patch"))
        (snippet `(begin
                    ;; Remove bundled libffi
                    (delete-file-recursively "ext/fiddle/libffi-3.2.1")
@@ -102,27 +100,9 @@ a focus on simplicity and productivity.")
     (home-page "https://ruby-lang.org")
     (license license:ruby)))
 
-(define ruby-2.3.3
-  (package
-    (inherit ruby)
-    (version "2.3.3")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
-                           (version-major+minor version)
-                           "/ruby-" version ".tar.xz"))
-       (sha256
-        (base32
-         "1p0rfk0blrbfjcnv0vb0ha4hxflgkfhv9zbzp4vvld2pi31ahkqs"))
-       (modules '((guix build utils)))
-       (snippet `(begin
-                   ;; Remove bundled libffi
-                   (delete-file-recursively "ext/fiddle/libffi-3.2.1")
-                   #t))))))
-
 (define-public ruby-2.2
   (package (inherit ruby)
+    (replacement #f)
     (version "2.2.6")
     (source
      (origin
@@ -136,6 +116,7 @@ a focus on simplicity and productivity.")
 
 (define-public ruby-2.1
   (package (inherit ruby)
+    (replacement #f)
     (version "2.1.10")
     (source
      (origin
@@ -169,6 +150,7 @@ a focus on simplicity and productivity.")
 
 (define-public ruby-1.8
   (package (inherit ruby)
+    (replacement #f)
     (version "1.8.7-p374")
     (source
      (origin
@@ -198,13 +180,13 @@ a focus on simplicity and productivity.")
 (define-public ruby-hoe
   (package
     (name "ruby-hoe")
-    (version "3.15.2")
+    (version "3.16.0")
     (source (origin
               (method url-fetch)
               (uri (rubygems-uri "hoe" version))
               (sha256
                (base32
-                "1riyf9j9vp7dzgpw5xj9xx1vqkdmg6lr7qiprmn91hcdp81kaszp"))) )
+                "03r8nsw4n4mnia9iqiqk9kqhvrl96m2i81j4yg8cpnppd8vk7vlb"))))
     (build-system ruby-build-system)
     (synopsis "Ruby project management helper")
     (description
@@ -1444,8 +1426,8 @@ conversion to (X)HTML.")
          (add-before 'check 'use-latest-redcarpet
           (lambda _
             (substitute* "mocha.gemspec"
-              (("<redcarpet>, \\[\"~> 1\"\\]")
-               "<redcarpet>, [\">= 3\"]"))
+              (("<redcarpet>.freeze, \\[\"~> 1\"\\]")
+               "<redcarpet>.freeze, [\">= 3\"]"))
             #t))
          (add-before 'check 'hardcode-version
           (lambda _
@@ -1497,13 +1479,13 @@ with processes on remote servers, via SSH2.")
 (define-public ruby-minitest
   (package
     (name "ruby-minitest")
-    (version "5.7.0")
+    (version "5.10.1")
     (source (origin
               (method url-fetch)
               (uri (rubygems-uri "minitest" version))
               (sha256
                (base32
-                "0rxqfakp629mp3vwda7zpgb57lcns5znkskikbfd0kriwv8i1vq8"))))
+                "1yk2m8sp0p5m1niawa3ncg157a4i0594cg7z91rzjxv963rzrwab"))))
     (build-system ruby-build-system)
     (native-inputs
      `(("ruby-hoe" ,ruby-hoe)))
@@ -1930,13 +1912,13 @@ to reproduce user environments.")
 (define-public ruby-nokogiri
   (package
     (name "ruby-nokogiri")
-    (version "1.6.8")
+    (version "1.7.0.1")
     (source (origin
               (method url-fetch)
               (uri (rubygems-uri "nokogiri" version))
               (sha256
                (base32
-                "17pjhvm4yigriizxbbpx266nnh6nckdm33m3j4ws9dcg99daz91p"))))
+                "10xahg0fwydh27psm8bv429mdja2ks6x83vxizq26ib8wvs05mv3"))))
     (build-system ruby-build-system)
     (arguments
      ;; Tests fail because Nokogiri can only test with an installed extension,
@@ -2222,28 +2204,27 @@ current line in an external editor.")
 (define-public ruby-sdoc
   (package
     (name "ruby-sdoc")
-    (version "0.4.1")
+    (version "0.4.2")
     (source (origin
               (method url-fetch)
               (uri (rubygems-uri "sdoc" version))
               (sha256
                (base32
-                "16xyfair1j4irfkd6sxvmdcak957z71lwkvhglrznfpkalfnqyqp"))))
+                "0qhvy10vnmrqcgh8494m13kd5ag9c3sczzhfasv8j0294ylk679n"))))
     (build-system ruby-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (add-after 'build 'relax-minitest-requirement
+         (add-before 'check 'set-rubylib
           (lambda _
-            (substitute* "sdoc.gemspec"
-              (("<minitest>, \\[\"~> 4\\.0\"\\]")
-               "<minitest>, [\">= 4.0\"]"))
+            (setenv "RUBYLIB" "lib")
             #t)))))
     (propagated-inputs
      `(("ruby-json" ,ruby-json)))
     (native-inputs
      `(("bundler" ,bundler)
-       ("ruby-minitest" ,ruby-minitest)))
+       ("ruby-minitest" ,ruby-minitest)
+       ("ruby-hoe" ,ruby-hoe)))
     (synopsis "Generate searchable RDoc documentation")
     (description
      "SDoc is an RDoc documentation generator to build searchable HTML
@@ -3511,7 +3492,7 @@ support to both Ruby and JRuby.  It uses @code{unf_ext} on CRuby and
                 "Bundler::GemHelper.gemspec.version"))
              ;; Loosen unnecessarily strict test-unit version specification.
              (substitute* "domain_name.gemspec"
-               (("<test-unit>, \\[\\\"~> 2.5.5") "<test-unit>, [\">0"))
+               (("<test-unit>.freeze, \\[\\\"~> 2.5.5") "<test-unit>, [\">0"))
              #t)))))
     (propagated-inputs
      `(("ruby-unf" ,ruby-unf)))
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
new file mode 100644
index 0000000000..97d0d7cb0d
--- /dev/null
+++ b/gnu/packages/rust.scm
@@ -0,0 +1,322 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 David Craven <david@craven.ch>
+;;; Copyright © 2016 Eric Le Bihan <eric.le.bihan.dev@free.fr>
+;;; Copyright © 2016 ng0 <ng0@libertad.pw>
+;;;
+;;; 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 rust)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages bootstrap)
+  #:use-module (gnu packages cmake)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages curl)
+  #:use-module (gnu packages elf)
+  #:use-module (gnu packages gcc)
+  #:use-module (gnu packages jemalloc)
+  #:use-module (gnu packages llvm)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages ssh)
+  #:use-module (gnu packages tls)
+  #:use-module (gnu packages version-control)
+  #:use-module (guix build-system cargo)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system trivial)
+  #:use-module (guix download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (ice-9 match)
+  #:use-module (srfi srfi-26))
+
+;; Should be one less than the current released version.
+(define %rust-bootstrap-binaries-version "1.13.0")
+
+(define %rust-bootstrap-binaries
+  (origin
+    (method url-fetch)
+    (uri (string-append
+          "https://static.rust-lang.org/dist/"
+          "rust-" %rust-bootstrap-binaries-version
+          "-i686-unknown-linux-gnu.tar.gz"))
+    (sha256
+     (base32
+      "0fcl7xgm2m21sjv1f27i3v692aa91lk8r867hl8d6l377w8k95r3"))))
+
+(define (increment-rust-version rust-version major patch)
+  (match (string-split rust-version #\.)
+    (("1" minor _)
+     (string-append (number->string major) "."
+                    (number->string (+ (string->number minor) 1)) "."
+                    (number->string patch)))))
+
+(define* (cargo-version rustc-version #:optional (patch 0))
+  ;; Computes the cargo version that matches the rustc version.
+  ;; https://github.com/rust-lang/cargo#Releases
+  (increment-rust-version rustc-version 0 patch))
+
+(define* (rustc-version bootstrap-version #:optional (patch 0))
+  ;; Computes the rustc version that can be compiled from a given
+  ;; other rustc version. The patch argument is for selecting
+  ;; a stability or security fix. 1.11.0 -> 1.12.1 -> 1.13.0
+  (increment-rust-version bootstrap-version 1 patch))
+
+(define rustc-bootstrap
+  (package
+    (name "rustc-bootstrap")
+    (version %rust-bootstrap-binaries-version)
+    (source %rust-bootstrap-binaries)
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("patchelf" ,patchelf)))
+    (inputs
+     `(("gcc:lib" ,(canonical-package gcc) "lib")
+       ("zlib" ,zlib)))
+    (arguments
+     `(#:tests? #f
+       #:strip-binaries? #f
+       #:system "i686-linux"
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (delete 'build)
+         (replace 'install
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (gcc:lib (assoc-ref inputs "gcc:lib"))
+                    (libc (assoc-ref inputs "libc"))
+                    (zlib (assoc-ref inputs "zlib"))
+                    (ld-so (string-append libc
+                                          ,(glibc-dynamic-linker "i686-linux")))
+                    (rpath (string-append out "/lib:" zlib "/lib:"
+                                          libc "/lib:" gcc:lib "/lib"))
+                    (rustc (string-append out "/bin/rustc"))
+                    (rustdoc (string-append out "/bin/rustdoc")))
+               (system* "bash" "install.sh"
+                        (string-append "--prefix=" out)
+                        (string-append "--components=rustc,"
+                                       "rust-std-i686-unknown-linux-gnu"))
+               (for-each (lambda (file)
+                           (system* "patchelf" "--set-rpath" rpath file))
+                         (cons* rustc rustdoc (find-files out "\\.so$")))
+               (for-each (lambda (file)
+                           (system* "patchelf" "--set-interpreter" ld-so file))
+                         (list rustc rustdoc))))))))
+    (supported-systems '("i686-linux" "x86_64-linux"))
+    (home-page "https://www.rust-lang.org")
+    (synopsis "Prebuilt rust compiler")
+    (description "This package provides a pre-built @command{rustc} compiler,
+which can in turn be used to build the final Rust compiler.")
+    (license license:asl2.0)))
+
+(define cargo-bootstrap
+  (package
+    (name "cargo-bootstrap")
+    (version (cargo-version %rust-bootstrap-binaries-version))
+    (source %rust-bootstrap-binaries)
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("patchelf" ,patchelf)))
+    (inputs
+     `(("gcc:lib" ,(canonical-package gcc) "lib")))
+    (arguments
+     `(#:tests? #f
+       #:strip-binaries? #f
+       #:system "i686-linux"
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (delete 'build)
+         (replace 'install
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (gcc:lib (assoc-ref inputs "gcc:lib"))
+                    (libc (assoc-ref inputs "libc"))
+                    (ld-so (string-append libc
+                                          ,(glibc-dynamic-linker "i686-linux")))
+                    (rpath (string-append out "/lib:" libc "/lib:"
+                                          gcc:lib "/lib"))
+                    (cargo (string-append out "/bin/cargo")))
+               (system* "bash" "install.sh"
+                        (string-append "--prefix=" out)
+                        "--components=cargo")
+               (system* "patchelf"
+                        "--set-interpreter" ld-so
+                        "--set-rpath" rpath
+                        cargo)))))))
+    (supported-systems '("i686-linux" "x86_64-linux"))
+    (home-page "https://www.rust-lang.org")
+    (synopsis "Prebuilt cargo package manager")
+    (description "This package provides a pre-built @command{cargo} package
+manager, which is required to build itself.")
+    (license license:asl2.0)))
+
+(define rust-bootstrap
+  (package
+    (name "rust-bootstrap")
+    (version %rust-bootstrap-binaries-version)
+    (source #f)
+    (build-system trivial-build-system)
+    (propagated-inputs
+     `(("rustc-bootstrap" ,rustc-bootstrap)
+       ("cargo-bootstrap" ,cargo-bootstrap)
+       ("gcc" ,(canonical-package gcc))))
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (let ((out (assoc-ref %outputs "out"))
+               (gcc (assoc-ref %build-inputs "gcc")))
+           (mkdir-p (string-append out "/bin"))
+           ;; Rust requires a C toolchain for linking. The prebuilt
+           ;; binaries expect a compiler called cc. Thus symlink gcc
+           ;; to cc.
+           (symlink (string-append gcc "/bin/gcc")
+                    (string-append out "/bin/cc"))))))
+    (home-page "https://www.rust-lang.org")
+    (synopsis "Rust bootstrapping meta package")
+    (description "Meta package for a rust environment. Provides pre-compiled
+rustc-bootstrap and cargo-bootstrap packages.")
+    (license license:asl2.0)))
+
+(define-public rustc
+  (package
+    (name "rustc")
+    (version (rustc-version %rust-bootstrap-binaries-version))
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://static.rust-lang.org/dist/"
+                    "rustc-" version "-src.tar.gz"))
+              (sha256
+               (base32
+                "0srvmhhdbbcl21nzg9m9zni7k10h88lsy8k1ljz03g8mx79fv467"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("git" ,git)
+       ("python-2" ,python-2)
+       ("rust-bootstrap" ,rust-bootstrap)
+       ("which" ,which)))
+    (inputs
+     `(("jemalloc" ,jemalloc)
+       ("llvm" ,llvm)))
+    (arguments
+     ;; FIXME: Test failure with llvm 3.8; Update llvm.
+     ;; https://github.com/rust-lang/rust/issues/36835
+     `(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-configure
+           (lambda _
+             ;; Detect target CPU correctly.
+             (substitute* "configure"
+               (("/usr/bin/env") (which "env")))
+             ;; Avoid curl as a build dependency.
+             (substitute* "configure"
+               (("probe_need CFG_CURL curl") ""))))
+         (add-after 'unpack 'set-env
+           (lambda _
+             (setenv "SHELL" (which "sh"))
+             (setenv "CONFIG_SHELL" (which "sh"))))
+         (add-after 'unpack 'patch-lockfile-test
+           (lambda _
+             (substitute* "src/tools/tidy/src/main.rs"
+               (("^.*cargo.*::check.*$") ""))))
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (gcc (assoc-ref inputs "gcc"))
+                    (python (assoc-ref inputs "python-2"))
+                    (rustc (assoc-ref inputs "rustc-bootstrap"))
+                    (llvm (assoc-ref inputs "llvm"))
+                    (jemalloc (assoc-ref inputs "jemalloc"))
+                    (flags (list
+                            (string-append "--prefix=" out)
+                            (string-append "--datadir=" out "/share")
+                            (string-append "--infodir=" out "/share/info")
+                            (string-append "--default-linker=" gcc "/bin/gcc")
+                            (string-append "--default-ar=" gcc "/bin/ar")
+                            (string-append "--python=" python "/bin/python2")
+                            (string-append "--local-rust-root=" rustc)
+                            (string-append "--llvm-root=" llvm)
+                            (string-append "--jemalloc-root=" jemalloc "/lib")
+                            "--release-channel=stable"
+                            "--enable-rpath"
+                            "--enable-local-rust"
+                            ;;"--enable-rustbuild"
+                            "--disable-manage-submodules")))
+               ;; Rust uses a custom configure script (no autoconf).
+               (zero? (apply system* "./configure" flags))))))))
+    (synopsis "Compiler for the Rust progamming language")
+    (description "Rust is a systems programming language that provides memory
+safety and thread safety guarantees.")
+    (home-page "https://www.rust-lang.org")
+    ;; Dual licensed.
+    (license (list license:asl2.0 license:expat))))
+
+(define-public cargo
+  (package
+    (name "cargo")
+    (version (cargo-version (rustc-version %rust-bootstrap-binaries-version)))
+    (source (origin
+              (method url-fetch)
+              ;; Use a cargo tarball with vendored dependencies and a cargo
+              ;; config file.
+              (uri (string-append
+                    "https://github.com/dvc94ch/cargo"
+                    "/archive/" version "-cargo-vendor.tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0hpix5hwz10pm1wh65gimhsy9nxjvy7yikgbpw8afwglqr3bl856"))))
+    (build-system cargo-build-system)
+    (propagated-inputs
+     `(("cmake" ,cmake)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("curl" ,curl)
+       ("libgit2" ,libgit2)
+       ("libssh2" ,libssh2)
+       ("openssl" ,openssl)
+       ("python-2" ,python-2)
+       ("zlib" ,zlib)))
+    (arguments
+     `(#:cargo ,cargo-bootstrap
+       #:tests? #f ; FIXME
+       #:phases
+       (modify-phases %standard-phases
+         ;; Avoid cargo complaining about missmatched checksums.
+         (delete 'patch-source-shebangs)
+         (delete 'patch-generated-file-shebangs)
+         (delete 'patch-usr-bin-file)
+         ;; Set CARGO_HOME to use the vendored dependencies.
+         (add-after 'unpack 'set-cargo-home
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((gcc (assoc-ref inputs "gcc"))
+                    (cc (string-append gcc "/bin/gcc")))
+               (setenv "CARGO_HOME" (string-append (getcwd) "/cargohome"))
+               (setenv "CMAKE_C_COMPILER" cc)
+               (setenv "CC" cc))
+             #t)))))
+    (home-page "https://github.com/rust-lang/cargo")
+    (synopsis "Build tool and package manager for Rust")
+    (description "Cargo is a tool that allows Rust projects to declare their
+dependencies and ensures a reproducible build.")
+    ;; Cargo is dual licensed Apache and MIT. Also contains
+    ;; code from openssl which is GPL2 with linking exception.
+    (license (list license:asl2.0 license:expat license:gpl2))))
diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm
index 1706ec3030..b2309f4b51 100644
--- a/gnu/packages/samba.scm
+++ b/gnu/packages/samba.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -98,14 +99,14 @@ anywhere.")
 (define-public samba
   (package
     (name "samba")
-    (version "4.5.1")
+    (version "4.5.3")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://download.samba.org/pub/samba/stable/"
                                  "samba-" version ".tar.gz"))
              (sha256
               (base32
-               "11ghsfvqxzfv8gnl62jfnpil9cwd04gak8sx5qcg6zv7d7h079xh"))))
+               "1jif95684swssqwp9v3i2r08cn3r2iddf6ly68db4wmvl5ac8vgh"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases
@@ -121,11 +122,16 @@ anywhere.")
                        ;; XXX: heimdal not packaged.
                        "--bundled-libraries=com_err"
                        (string-append "--prefix=" out)
+		       "--sysconfdir=/etc"
                        ;; Install public and private libraries into
                        ;; a single directory to avoid RPATH issues.
                        (string-append "--libdir=" libdir)
-                       (string-append "--with-privatelibdir=" libdir)))))))
-
+                       (string-append "--with-privatelibdir=" libdir))))))
+	 (add-before 'install 'disable-etc-samba-directory-creation
+           (lambda _
+             (substitute* "dynconfig/wscript"
+               (("bld\\.INSTALL_DIRS\\(\"\",[[:blank:]]{1,}\"\\$\\{CONFIGDIR\\}[[:blank:]]{1,}")
+                "bld.INSTALL_DIRS(\"\", \"")))))
        ;; XXX: The test infrastructure attempts to set password with
        ;; smbpasswd, which fails with "smbpasswd -L can only be used by root."
        ;; So disable tests until there's a workaround.
diff --git a/gnu/packages/scanner.scm b/gnu/packages/scanner.scm
index 76817b389f..7bdbf35f05 100644
--- a/gnu/packages/scanner.scm
+++ b/gnu/packages/scanner.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
 ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
+;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20,24 +21,32 @@
 (define-module (gnu packages scanner)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages libusb)
   #:use-module ((guix licenses)
                 #:prefix licence:))
 
-(define-public sane-backends
+(define-public sane-backends-minimal
   (package
-    (name "sane-backends")
+    (name "sane-backends-minimal")
     (version "1.0.25")
     (source (origin
              (method url-fetch)
              (uri (string-append
                    "https://alioth.debian.org/frs/download.php/file/4146/"
-                   name "-" version ".tar.gz"))
+                   "sane-backends-" version ".tar.gz"))
              (sha256
               (base32
-               "0b3fvhrxl4l82bf3v0j47ypjv6a0k5lqbgknrq1agpmjca6vmmx4"))))
+               "0b3fvhrxl4l82bf3v0j47ypjv6a0k5lqbgknrq1agpmjca6vmmx4"))
+             (modules '((guix build utils)))
+             (snippet
+              ;; Generated HTML files and udev rules normally embed a
+              ;; timestamp.  Work around that to build things reproducibly.
+              '(substitute* "tools/sane-desc.c"
+                 (("asctime \\(localtime \\(&current_time\\)\\)")
+                  "\"1970-01-01\"")))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -47,6 +56,10 @@
      `(#:tests? #f
        #:phases
        (modify-phases %standard-phases
+         (add-before 'configure 'disable-backends
+           (lambda _
+             (setenv "BACKENDS" " ")
+             #t))
          (add-after
           'install 'install-udev-rules
           (lambda* (#:key outputs #:allow-other-keys)
@@ -67,9 +80,48 @@
     ;; **** File generated for html-backends-split mode is different from reference
     ;; Makefile:501: recipe for target 'check.local' failed
     (home-page "http://www.sane-project.org")
-    (synopsis "Raster image scanner library and drivers")
+    (synopsis
+     "Raster image scanner library and drivers, without scanner support")
     (description "SANE stands for \"Scanner Access Now Easy\" and is an API
 proving access to any raster image scanner hardware (flatbed scanner,
 hand-held scanner, video- and still-cameras, frame-grabbers, etc.).  The
-package contains the library and drivers.")
+package contains the library, but no drivers.")
     (license licence:gpl2+))) ; plus linking exception
+
+;; This variant links in the hpaio backend, provided by hplip, which adds
+;; support for HP scanners whose backends are not maintained by
+;; 'sane-backends'. It also builds all of those backends.
+(define-public sane-backends
+  (package
+    (inherit sane-backends-minimal)
+    (name "sane-backends")
+    (inputs
+     `(("hplip" ,(@ (gnu packages cups) hplip))
+       ,@(package-inputs sane-backends-minimal)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments sane-backends-minimal)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (delete 'disable-backends)
+           (add-after 'unpack 'add-backends
+             (lambda _
+               (substitute* "backend/dll.conf.in"
+                 (("hp5590" all) (format #f "~a~%~a" all "hpaio")))
+               #t))
+           (add-after 'install 'install-hpaio
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (define hplip (string-append (assoc-ref inputs "hplip")
+                                            "/lib/sane"))
+               (define out (string-append (assoc-ref outputs "out")
+                                          "/lib/sane"))
+               (for-each
+                (lambda (file)
+                  (symlink file (string-append out "/" (basename file))))
+                (find-files hplip))
+               #t))))))
+    (synopsis
+     "Raster image scanner library and drivers, with scanner support")
+    (description "SANE stands for \"Scanner Access Now Easy\" and is an API
+proving access to any raster image scanner hardware (flatbed scanner,
+hand-held scanner, video- and still-cameras, frame-grabbers, etc.).  The
+package contains the library and drivers.")))
diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index 16b1b5586c..2756805f3d 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -323,20 +323,24 @@ mashups, office (web agendas, mail clients, ...), etc.")
 (define-public chicken
   (package
     (name "chicken")
-    (version "4.11.0")
+    (version "4.11.1")
     (source (origin
-             (method url-fetch)
-             (uri (string-append "http://code.call-cc.org/releases/"
-                                 version "/chicken-" version ".tar.gz"))
-             (sha256
-              (base32
-               "12ddyiikqknpr8h6llsxbg2fz75xnayvcnsvr1cwv8xnjn7jpp73"))))
+              (method url-fetch)
+              (uri (string-append "http://code.call-cc.org/releases/"
+                                  version "/chicken-" version ".tar.gz"))
+              (uri (string-append "http://code.call-cc.org/dev-snapshots/"
+                                  "2016/09/12/chicken-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1rwymbbmnwdyhdzilv9w75an989xw9kjf3x52iqdng3nphpflcga"))
+              (patches
+               (search-patches "chicken-CVE-2016-6830+CVE-2016-6831.patch"))))
     (build-system gnu-build-system)
     (arguments
      `(#:modules ((guix build gnu-build-system)
                   (guix build utils)
                   (srfi srfi-1))
-
+       
        ;; No `configure' script; run "make check" after "make install" as
        ;; prescribed by README.
        #:phases
@@ -344,14 +348,7 @@ mashups, office (web agendas, mail clients, ...), etc.")
          (delete 'configure)
          (delete 'check)
          (add-after 'install 'check
-           (assoc-ref %standard-phases 'check))
-         (add-after 'unpack 'disable-broken-tests
-           (lambda _
-             ;; The port tests fail with this error:
-             ;; Error: (line 294) invalid escape-sequence '\x o'
-             (substitute* "tests/runtests.sh"
-               (("\\$interpret -s port-tests\\.scm") ""))
-             #t)))
+           (assoc-ref %standard-phases 'check)))
 
        #:make-flags (let ((out (assoc-ref %outputs "out")))
                       (list "PLATFORM=linux"
@@ -578,7 +575,7 @@ mixed.")
                       (list (string-append "PREFIX=" out)
                             (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")))
        #:test-target "test"))
-    (home-page "https://code.google.com/p/chibi-scheme/")
+    (home-page "https://github.com/ashinn/chibi-scheme")
     (synopsis "Small embeddable Scheme implementation")
     (description
      "Chibi-Scheme is a very small library with no external dependencies
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index bb4ad1c90b..cb0af1ceed 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2015 David Thompson <dthompson2@worcester.edu>
+;;; Copyright © 2013, 2015, 2017 David Thompson <dthompson2@worcester.edu>
 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
@@ -29,8 +29,11 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages audio)
+  #:use-module (gnu packages fcitx)
   #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages glib)
   #:use-module (gnu packages guile)
+  #:use-module (gnu packages ibus)
   #:use-module (gnu packages image)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages mp3)
@@ -97,6 +100,16 @@ joystick, and graphics hardware.")
              (sha256
               (base32
                "11c75qj1qxmx67iwkvf9z4x69phk301pdn86zzr6jncnap7kh824"))))
+    (inputs
+     ;; SDL2 needs to be built with ibus support otherwise some systems
+     ;; experience a bug where input events are doubled.
+     ;;
+     ;; For more information, see: https://dev.solus-project.com/T1721
+     (append `(("dbus" ,dbus)
+               ("fcitx" ,fcitx) ; helps with CJK input
+               ("glib" ,glib)
+               ("ibus" ,ibus))
+             (package-inputs sdl)))
     (license bsd-3)))
 
 (define-public libmikmod
diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index 8f58c589d9..e1b87adff9 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -93,15 +93,15 @@ the low-level development kit for the Yubico YubiKey authentication device.")
 (define-public pcsc-lite
   (package
     (name "pcsc-lite")
-    (version "1.8.18")
+    (version "1.8.20")
     (source (origin
               (method url-fetch)
               (uri (string-append
-                    "https://alioth.debian.org/frs/download.php/file/4179/"
+                    "https://alioth.debian.org/frs/download.php/file/4203/"
                     "pcsc-lite-" version ".tar.bz2"))
               (sha256
                (base32
-                "0189s10xsgcmdvc2sixakncwlv47cg6by6m9vdm038gn32q34bdj"))))
+                "1ckb0jf4n585a4j26va3jm2nrv3c1y38974514f8qy3c04a02zgc"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags '("--enable-usbdropdir=/var/lib/pcsc/drivers")))
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index 31444509f1..8db81c581c 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -154,7 +154,7 @@ serialization.")
 (define-public jsoncpp
   (package
     (name "jsoncpp")
-    (version "1.7.7")
+    (version "1.8.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -163,9 +163,11 @@ serialization.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "15wg14480lrbrhc2myk9rwpwb2gzix9bk80p4y7gxg3zrzml0xh8"))))
+                "1g35ci93s03wph4kabi46iz42wgyfbn2763cklf15h7hrdi29ssx"))))
     (build-system cmake-build-system)
     (home-page "https://github.com/open-source-parsers/jsoncpp")
+    (arguments
+     `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES")))
     (synopsis "C++ library for interacting with JSON")
     (description "JsonCpp is a C++ library that allows manipulating JSON values,
 including serialization and deserialization to and from strings.  It can also
diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm
index f3350ef501..960cb1f2a2 100644
--- a/gnu/packages/shells.scm
+++ b/gnu/packages/shells.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2014 Kevin Lemonnier <lemonnierk@ulrar.net>
 ;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2016 Stefan Reichör <stefan@xsteve.at>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -174,6 +175,7 @@ has a small feature set similar to a traditional Bourne shell.")
 (define-public tcsh
   (package
     (name "tcsh")
+    (replacement tcsh/fixed)
     (version "6.18.01")
     (source (origin
               (method url-fetch)
@@ -231,6 +233,15 @@ command-line editor, programmable word completion, spelling correction, a
 history mechanism, job control and a C-like syntax.")
     (license bsd-4)))
 
+(define tcsh/fixed
+  (package
+    (inherit tcsh)
+    (name "tcsh")
+    (source (origin
+              (inherit (package-source tcsh))
+              (patches (cons (search-patch "tcsh-fix-out-of-bounds-read.patch")
+                             (origin-patches (package-source tcsh))))))))
+
 (define-public zsh
   (package
     (name "zsh")
@@ -288,21 +299,21 @@ ksh, and tcsh.")
 (define-public xonsh
   (package
     (name "xonsh")
-    (version "0.4.7")
+    (version "0.5.1")
     (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "xonsh" version))
         (sha256
           (base32
-            "04b0z41mxiwsp5rl21fzrixcdmx2kndjlh4gn3582qfga9hihf20"))
+            "1a3jkvfh1xc6aw557y8zjn498q89bapyx4dxc3md7qwrmnj9pkv3"))
         (modules '((guix build utils)))
         (snippet
          `(begin
             ;; Delete bundled ply.
             (delete-file-recursively "xonsh/ply")
             (substitute* '("setup.py")
-              (("'xonsh\\.ply',") ""))
+              (("'xonsh\\.ply\\.ply',") ""))
             #t))))
     (build-system python-build-system)
     (arguments
@@ -316,8 +327,8 @@ ksh, and tcsh.")
     (synopsis "Python-ish shell")
     (description
      "Xonsh is a Python-ish, BASHwards-looking shell language and command
-prompt. The language is a superset of Python 3.4+ with additional shell
-primitives that you are used to from Bash and IPython. It works on all major
-systems including Linux, Mac OSX, and Windows. Xonsh is meant for the daily
+prompt.  The language is a superset of Python 3.4+ with additional shell
+primitives that you are used to from Bash and IPython.  It works on all major
+systems including Linux, Mac OSX, and Windows.  Xonsh is meant for the daily
 use of experts and novices alike.")
     (license bsd-2)))
diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm
index 894ec7804a..c9a35ca3b6 100644
--- a/gnu/packages/shellutils.scm
+++ b/gnu/packages/shellutils.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 Matthew Jordan <matthewjordandevops@yandex.com>
-;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
+;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2016 Christopher Baines <mail@cbaines.net>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -58,14 +58,14 @@ between various shells or commands.")
 (define-public trash-cli
   (package
     (name "trash-cli")
-    (version "0.12.9.14")
+    (version "0.17.1.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "trash-cli" version))
        (sha256
         (base32
-         "1p4v2qx0sy47d9c9axszq04wns63s4b7rrhmsavg948sklqdaf54"))))
+         "019sjab29jkps8zkf8icihhf3ng4lx9y4p1lxjd3wbnnynphc4is"))))
     (build-system python-build-system)
     (arguments
      `(#:python ,python-2
@@ -94,7 +94,7 @@ are already there.")
 (define-public direnv
   (package
     (name "direnv")
-    (version "2.9.0")
+    (version "2.10.0")
     (source
      (origin (method url-fetch)
              (uri (string-append "https://github.com/direnv/" name
@@ -102,7 +102,7 @@ are already there.")
              (file-name (string-append name "-" version ".tar.gz"))
              (sha256
               (base32
-               "04v3v2sz9m6ivgbxcplxscj1dsvpaqpqnxgls4060naj3iz9sg82"))))
+               "1h5ywn0glw1kmxs3jwjv9fvnhha942c6k740p5ghvyns05ds9cqf"))))
     (build-system gnu-build-system)
     (arguments
      '(#:test-target "test"
diff --git a/gnu/packages/speech.scm b/gnu/packages/speech.scm
index 39a940dfde..1d903520e7 100644
--- a/gnu/packages/speech.scm
+++ b/gnu/packages/speech.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 David Thompson <davet@gnu.org>
 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -92,3 +93,36 @@ stable and well documented interface.")
                     ;; festival_client.{c,h} carries an expat-style license.
                     "See src/modules/festival_client.c in the distribution.")
                    license:gpl3+)))) ; doc/texinfo.tex -- with TeX exception.
+
+(define-public sonic
+  (package
+    (name "sonic")
+    (version "0.2.0")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://github.com/waywardgeek/sonic/archive/"
+                                 "release-" version ".tar.gz"))
+             (file-name (string-append name "-" version ".tar.gz"))
+             (sha256
+              (base32
+               "11a0q9wkgbb9ymf52v7dvybfhj8hprgr67zs1xcng143fvjpr0n7"))))
+    (build-system gnu-build-system)
+    (arguments
+      `(#:tests? #f ; No test suite.
+        #:make-flags
+         (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))
+        #:phases
+        (modify-phases %standard-phases
+          (delete 'configure)))) ; No ./configure script.
+    (synopsis "Speed up or slow down speech")
+    (description "Sonic implements a simple algorithm for speeding up or slowing
+down speech.  However, it's optimized for speed ups of over 2X, unlike previous
+algorithms for changing speech rate.  Sonic is a C library designed to be easily
+integrated into streaming voice applications such as text-to-speech (TTS) back
+ends.
+
+The primary motivation behind Sonic is to enable the blind and visually impaired
+to improve their productivity with speech engines, like eSpeak.  Sonic can also
+be used by the sighted.")
+    (home-page "https://github.com/waywardgeek/sonic")
+    (license license:asl2.0)))
diff --git a/gnu/packages/spice.scm b/gnu/packages/spice.scm
index c0e8d240cf..805f47a600 100644
--- a/gnu/packages/spice.scm
+++ b/gnu/packages/spice.scm
@@ -217,7 +217,7 @@ which allows users to view a desktop computing environment.")
     (inputs
       `(("cyrus-sasl" ,cyrus-sasl)
         ("glib" ,glib)
-        ("libjpeg" ,libjpeg)
+        ("libjpeg-turbo" ,libjpeg-turbo)
         ("lz4" ,lz4)
         ("opus" ,opus)
         ("zlib" ,zlib)))
diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm
index 65f118f5ca..5b6800346c 100644
--- a/gnu/packages/ssh.scm
+++ b/gnu/packages/ssh.scm
@@ -112,7 +112,7 @@ a server that supports the SSH-2 protocol.")
 (define-public openssh
   (package
    (name "openssh")
-   (version "7.3p1")
+   (version "7.4p1")
    (source (origin
             (method url-fetch)
             (uri (let ((tail (string-append name "-" version ".tar.gz")))
@@ -122,9 +122,8 @@ a server that supports the SSH-2 protocol.")
                                         tail)
                          (string-append "http://ftp2.fr.openbsd.org/pub/OpenBSD/OpenSSH/portable/"
                                         tail))))
-            (patches (search-patches "openssh-memory-exhaustion.patch"))
             (sha256 (base32
-                     "1k5y1wi29d47cgizbryxrhc1fbjsba2x8l5mqfa9b9nadnd9iyrz"))))
+                     "1l8r3x4fr2kb6xm95s7kjdif1wp6f94d4kljh4qjj9109shw87qv"))))
    (build-system gnu-build-system)
    (inputs `(("groff" ,groff)
              ("openssl" ,openssl)
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 700a8957cc..40a511b6ed 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2016 Pjotr Prins <pjotr.guix@thebird.nl>
 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
 ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
+;;; Copyright © 2016 Raoul Bonnal <ilpuccio.febo@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -101,7 +102,7 @@ be output in text, PostScript, PDF or HTML.")
 (define-public r
   (package
     (name "r")
-    (version "3.3.1")
+    (version "3.3.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://cran/src/base/R-"
@@ -109,7 +110,7 @@ be output in text, PostScript, PDF or HTML.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1qm9znh8akfy9fkzzi6f1vz2w1dd0chsr6qn7kw80lqzhgjrmi9x"))))
+                "0k2i9qdd83g09fcpls2198q4ykxkii5skczb514gnx7mx4hsv56j"))))
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags
@@ -205,16 +206,63 @@ publication-quality data plots.  A large amount of 3rd-party packages are
 available, greatly increasing its breadth and scope.")
     (license license:gpl3+)))
 
+(define-public r-bit
+  (package
+    (name "r-bit")
+    (version "1.1-12")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "bit" version))
+       (sha256
+        (base32
+         "0a6ig6nnjzq80r2ll4hc74za3xwzbzig6wlyb4dby0knzf3iqa6f"))))
+    (build-system r-build-system)
+    (home-page "http://ff.r-forge.r-project.org")
+    (synopsis "Class for vectors of 1-bit booleans")
+    (description
+     "This package provides bitmapped vectors of booleans (no @code{NA}s),
+coercion from and to logicals, integers and integer subscripts, fast boolean
+operators and fast summary statistics.  With @code{bit} class vectors of true
+binary booleans, @code{TRUE} and @code{FALSE} can be stored with 1 bit only.")
+    (license license:gpl2)))
+
+(define-public r-bit64
+  (package
+    (name "r-bit64")
+    (version "0.9-5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "bit64" version))
+       (sha256
+        (base32
+         "0fz5m3fhvxgwjl76maag7yn0zdw24rx34gy6v77378fajag9yllg"))))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-bit" ,r-bit)))
+    (home-page "http://ff.r-forge.r-project.org/")
+    (synopsis "S3 class for vectors of 64 bit integers")
+    (description
+     "The bit64 package provides serializable S3 atomic 64 bit (signed)
+integers that can be used in vectors, matrices, arrays and @code{data.frames}.
+Methods are available for coercion from and to logicals, integers, doubles,
+characters and factors as well as many elementwise and summary functions.
+Many fast algorithmic operations such as @code{match} and @code{order} support
+interactive data exploration and manipulation and optionally leverage
+caching.")
+    (license license:gpl2)))
+
 (define-public r-colorspace
   (package
     (name "r-colorspace")
-    (version "1.2-7")
+    (version "1.3-2")
     (source
      (origin
        (method url-fetch)
        (uri (cran-uri "colorspace" version))
        (sha256
-        (base32 "0flw97iwwpkxy6si9cn982jhl61wb1rxi3r0nz2xxf0c3fzw18d5"))))
+        (base32 "0d1ya7hx4y58n5ivwmdmq2zgh0g2sbv7ykh13n85c1355csd57yx"))))
     (build-system r-build-system)
     (home-page "http://cran.r-project.org/web/packages/colorspace")
     (synopsis "Color space manipulation")
@@ -276,13 +324,13 @@ OpenSSL should be used.")
 (define-public r-estimability
   (package
     (name "r-estimability")
-    (version "1.1-1")
+    (version "1.2")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "estimability" version))
               (sha256
                (base32
-                "049adh8i0ad0m0qln2ylqdxcs5v2q9zfignn2a50r5f93ip2ay6w"))))
+                "13b80bpnbrarazjvnpnk91ljjsqgfm2fm3gy66aj09cmmsmv199h"))))
     (build-system r-build-system)
     (home-page "http://cran.r-project.org/web/packages/estimability")
     (synopsis "Tools for assessing estimability of linear predictions")
@@ -394,13 +442,13 @@ Munsell colour system.")
 (define-public r-rcpp
   (package
     (name "r-rcpp")
-    (version "0.12.7")
+    (version "0.12.8")
     (source
      (origin
        (method url-fetch)
        (uri (cran-uri "Rcpp" version))
        (sha256
-        (base32 "1ipid4yfqp1k5c70f7bz7izzq63srmrcxhiqrnyilk2wgrvd7ypb"))))
+        (base32 "0is1vql1q82g7yakad4skx707ip0fx3rgdwv9a8mi8259gly2qji"))))
     (build-system r-build-system)
     (home-page "http://www.rcpp.org")
     (synopsis "Seamless R and C++ Integration")
@@ -440,14 +488,14 @@ and operations on them using LAPACK and SuiteSparse.")
 (define-public r-mgcv
   (package
    (name "r-mgcv")
-   (version "1.8-15")
+   (version "1.8-16")
    (source
     (origin
      (method url-fetch)
      (uri (cran-uri "mgcv" version))
      (sha256
       (base32
-       "05xzmsx51y92c0r0yihac8m9d3v1sqnn8ahcgm3q75j8z6zybsjs"))))
+       "0pj31gdwra7nv8spys4pfcbmsik99q1y1d0d2g37ywc3sz5s0rlj"))))
    (build-system r-build-system)
    (home-page "http://cran.r-project.org/web/packages/mgcv")
    (synopsis "Mixed generalised additive model computation")
@@ -638,13 +686,13 @@ using just two functions: melt and dcast (or acast).")
 (define-public r-scales
   (package
     (name "r-scales")
-    (version "0.4.0")
+    (version "0.4.1")
     (source
      (origin
        (method url-fetch)
        (uri (cran-uri "scales" version))
        (sha256
-        (base32 "19y6q4j8vpmc73dnn4ncp5wj44gri7m77ys3z2rn3crrcc9zc7l5"))))
+        (base32 "1lqccfmqdwrw0cjyqvw2zvgpk2jvnqrfb303l1raqyyf3zxqhav4"))))
     (build-system r-build-system)
     (propagated-inputs
      `(("r-dichromat" ,r-dichromat)
@@ -664,22 +712,22 @@ legends.")
 (define-public r-ggplot2
   (package
     (name "r-ggplot2")
-    (version "2.1.0")
+    (version "2.2.1")
     (source
      (origin
        (method url-fetch)
        (uri (cran-uri "ggplot2" version))
        (sha256
-        (base32 "0s9rvp0f736ji6p9xpxq54agxf95pjkql4sj7ag0hv2xhnp27hzj"))))
+        (base32 "0543782ddv2hp6s0l702mnxfg8n7a6qlbm8bm55x22hnqgz8kg2z"))))
     (build-system r-build-system)
     (propagated-inputs
      `(("r-digest" ,r-digest)
        ("r-gtable" ,r-gtable)
        ("r-plyr" ,r-plyr)
-       ("r-proto" ,r-proto)
+       ("r-lazyeval" ,r-lazyeval)
+       ("r-tibble" ,r-tibble)
        ("r-reshape2" ,r-reshape2)
-       ("r-scales" ,r-scales)
-       ("r-svglite" ,r-svglite)))
+       ("r-scales" ,r-scales)))
     (home-page "http://ggplot2.org")
     (synopsis "An implementation of the grammar of graphics")
     (description
@@ -694,14 +742,14 @@ aesthetic attributes.")
 (define-public r-gdtools
   (package
     (name "r-gdtools")
-    (version "0.1.1")
+    (version "0.1.3")
     (source
      (origin
        (method url-fetch)
        (uri (cran-uri "gdtools" version))
        (sha256
         (base32
-         "1l9d759x9s4ddz51sls8kcjps2i9kwfbc72dnagrdavh82h0al8n"))))
+         "1prh814lw3qkgnf0760cvpic1k68jhlkpcxlksv8chjkvsrnnf09"))))
     (build-system r-build-system)
     (native-inputs
      `(("r-rcpp" ,r-rcpp)
@@ -720,14 +768,14 @@ and to generate base64 encoded string from raster matrix.")
 (define-public r-svglite
   (package
     (name "r-svglite")
-    (version "1.1.0")
+    (version "1.2.0")
     (source
      (origin
        (method url-fetch)
        (uri (cran-uri "svglite" version))
        (sha256
         (base32
-         "11ryicjglfi6jvkk4jgg5kra42qbs5z2zid7jjhlslpjcljfwc70"))))
+         "1s1gvmlmmna5y4jsn9h6438pg5b86fl4nwfvkgm6n4h6ljfgqyx3"))))
     (build-system r-build-system)
     (native-inputs  `(("r-rcpp" ,r-rcpp)))
     (propagated-inputs
@@ -803,13 +851,13 @@ R/DBMS implementations.")
 (define-public r-bh
   (package
     (name "r-bh")
-    (version "1.60.0-2")
+    (version "1.62.0-1")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "BH" version))
               (sha256
                (base32
-                "136497fng9bcvrf8favpj8inz96pxdwp1rrb2k00sxjxjbgawhg4"))))
+                "01vfdpfznd4ynqql33z238xr262mvy3i80lyi8l3a3p3hi0a262p"))))
     (build-system r-build-system)
     (home-page "https://github.com/eddelbuettel/bh")
     (synopsis "R package providing subset of Boost headers")
@@ -926,13 +974,13 @@ syntax that can be converted to XHTML or other formats.")
 (define-public r-yaml
   (package
     (name "r-yaml")
-    (version "2.1.13")
+    (version "2.1.14")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "yaml" version))
               (sha256
                (base32
-                "18kz5mfn7qpif5pn91w4vbrc5bkycsj85vwm5wxwzjlb02i9mxi6"))))
+                "0x88xicrf7vwp77xgan27mnpdljhpkn0pz5kphnwqi3ddy25k9a1"))))
     (build-system r-build-system)
     (home-page "https://cran.r-project.org/web/packages/yaml/")
     (synopsis "Methods to convert R data to YAML and back")
@@ -944,18 +992,17 @@ emitter (http://pyyaml.org/wiki/LibYAML) for R.")
 (define-public r-knitr
   (package
     (name "r-knitr")
-    (version "1.14")
+    (version "1.15.1")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "knitr" version))
               (sha256
                (base32
-                "1v0s0knb294p7a2xkwy35bhg0w8p3qcgyphd748sj86hh8a30vds"))))
+                "1pbxd3k7kv5sa1a5gxm0zc2bhjxdgx2nfch9xap5k85djmgsfqc1"))))
     (build-system r-build-system)
     (propagated-inputs
      `(("r-evaluate" ,r-evaluate)
        ("r-digest" ,r-digest)
-       ("r-formatr" ,r-formatr)
        ("r-highr" ,r-highr)
        ("r-markdown" ,r-markdown)
        ("r-stringr" ,r-stringr)
@@ -1323,13 +1370,13 @@ and density estimation.")
 (define-public r-chron
   (package
     (name "r-chron")
-    (version "2.3-47")
+    (version "2.3-48")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "chron" version))
               (sha256
                (base32
-                "1xj50kk8b8mbjpszp8i0wbripb5a4b36jcscwlbyap8n4487g34s"))))
+                "1q1d0p2wq19w3mpfqnrg8nmspxqmhv4ap52r393s6y3abl36ccac"))))
     (build-system r-build-system)
     (home-page "http://cran.r-project.org/web/packages/chron")
     (synopsis "Chronological R objects which can handle dates and times")
@@ -1341,16 +1388,14 @@ times.")
 (define-public r-data-table
   (package
     (name "r-data-table")
-    (version "1.9.6")
+    (version "1.10.0")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "data.table" version))
               (sha256
                (base32
-                "0vi3zplpxqbg78z9ifjfs1kl2i8qhkqxr7l9ysp2663kq54w6x3g"))))
+                "1168arn4wjd1jj7kgr4sb8xd52hr8p8iqp85g5jwp3mkz4p76qfg"))))
     (build-system r-build-system)
-    (propagated-inputs
-     `(("r-chron" ,r-chron)))
     (home-page "https://github.com/Rdatatable/data.table/wiki")
     (synopsis "Enhanced version of data.frame R object")
     (description
@@ -1394,13 +1439,7 @@ and fast file reading.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (replace 'check (lambda _ (zero? (system* "nosetests" "-v"))))
-         (add-after 'unpack 'prevent-generation-of-egg-archive
-          (lambda _
-            (substitute* "setup.py"
-              (("from setuptools import setup")
-               "from distutils.core import setup"))
-            #t)))))
+         (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
     (propagated-inputs
      `(("python-numpy" ,python-numpy)
        ("python-scipy" ,python-scipy)
@@ -1416,15 +1455,10 @@ building design matrices.")
     ;; The majority of the code is distributed under BSD-2.  The module
     ;; patsy.compat contains code derived from the Python standard library,
     ;; and is covered by the PSFL.
-    (license (list license:bsd-2 license:psfl))
-    (properties `((python2-variant . ,(delay python2-patsy))))))
+    (license (list license:bsd-2 license:psfl))))
 
 (define-public python2-patsy
-  (let ((patsy (package-with-python2 (strip-python2-variant python-patsy))))
-    (package (inherit patsy)
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs patsy))))))
+  (package-with-python2 python-patsy))
 
 (define-public python-statsmodels
   (package
@@ -1455,11 +1489,13 @@ building design matrices.")
                               line)))
             #t))
          (add-after 'install 'check
-          (lambda _
-            (with-directory-excursion "/tmp"
-              (zero? (system* "nosetests"
-                              "--stop"
-                              "-v" "statsmodels"))))))))
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             ;; Make installed package available for running the tests
+             (add-installed-pythonpath inputs outputs)
+             (with-directory-excursion "/tmp"
+               (zero? (system* "nosetests"
+                               "--stop"
+                               "-v" "statsmodels"))))))))
     (propagated-inputs
      `(("python-numpy" ,python-numpy)
        ("python-scipy" ,python-scipy)
@@ -1487,24 +1523,19 @@ inference for statistical models.")
          ("python2-scipy" ,python2-scipy)
          ("python2-pandas" ,python2-pandas)
          ("python2-patsy" ,python2-patsy)
-         ("python2-matplotlib" ,python2-matplotlib)))
-      (native-inputs
-       `(("python2-setuptools" ,python2-setuptools)
-         ,@(package-native-inputs stats))))))
+         ("python2-matplotlib" ,python2-matplotlib))))))
 
 (define-public r-coda
   (package
     (name "r-coda")
-    (version "0.18-1")
+    (version "0.19-1")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "coda" version))
               (sha256
                (base32
-                "03sc780734zj2kqcm8lkyvf76fql0jbfhkblpn8l58zmb6cqi958"))))
+                "14a4a8df4ygj05h37chmdn8kzcqs07fpbflxfrq530563mrza7yl"))))
     (build-system r-build-system)
-    (propagated-inputs
-     `(("r-lattice" ,r-lattice)))
     (home-page "http://cran.r-project.org/web/packages/coda")
     (synopsis "This is a package for Output Analysis and Diagnostics for MCMC")
     (description "This package provides functions for summarizing and plotting
@@ -1516,14 +1547,14 @@ chain.")
 (define-public r-ade4
   (package
     (name "r-ade4")
-    (version "1.7-4")
+    (version "1.7-5")
     (source
       (origin
         (method url-fetch)
         (uri (cran-uri "ade4" version))
         (sha256
           (base32
-            "17sbicash7z4b63dlrbaf8xx2pbwh62vykzvhdjs43h8jkl881y7"))))
+            "0aaqbnydm5fb37nrvqj4bx6hxax7255j426cwh2lh88nyvznbq37"))))
     (build-system r-build-system)
     (home-page "http://pbil.univ-lyon1.fr/ADE-4")
     (synopsis "Multivariate data analysis and graphical display")
@@ -1788,14 +1819,14 @@ collation, and NAMESPACE files.")
 (define-public r-openssl
   (package
     (name "r-openssl")
-    (version "0.9.5")
+    (version "0.9.6")
     (source
      (origin
        (method url-fetch)
        (uri (cran-uri "openssl" version))
        (sha256
         (base32
-         "1lal8mmcwjhhln10mfi96ipv3d364k0wiviiln220wvhddcpr9pp"))))
+         "0ffwllii8xl6sa2v66134g0fwaw1y3zn3mvaa4nrc120vv5d3mkd"))))
     (build-system r-build-system)
     (inputs
      `(("openssl" ,openssl)))
@@ -1845,13 +1876,13 @@ functions make it easy to control additional request components.")
 (define-public r-git2r
   (package
     (name "r-git2r")
-    (version "0.15.0")
+    (version "0.18.0")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "git2r" version))
               (sha256
                (base32
-                "1rpdf85wy9fp456ypvbhl3p9whkb7kgl0n7rkqxd2bhvyzkvjak8"))))
+                "0bgzdsdi9n6l8pchivs6a2g4ksa56qs8hygpyv2c0ndqmx4jxcwi"))))
     (build-system r-build-system)
     ;; This R package contains modified sources of libgit2.  This modified
     ;; version of libgit2 is built as the package is built.  Hence libgit2 is
@@ -1938,14 +1969,14 @@ were originally a part of the r-devtools package.")
 (define-public r-hms
   (package
     (name "r-hms")
-    (version "0.2")
+    (version "0.3")
     (source
      (origin
        (method url-fetch)
        (uri (cran-uri "hms" version))
        (sha256
         (base32
-         "0ln1dc26mkl5pc26vvyf01d35x75q6cjaj39cccxp67chbwbdlds"))))
+         "127znf522r5mn3k6frhdd7pqh063bs3l85gn9h7cx50hpjf2as4k"))))
     (build-system r-build-system)
     (home-page "https://github.com/rstats-db/hms")
     (synopsis "Pretty time of day")
@@ -1982,13 +2013,13 @@ disk (or a connection).")
 (define-public r-plotrix
   (package
     (name "r-plotrix")
-    (version "3.6-3")
+    (version "3.6-4")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "plotrix" version))
               (sha256
                (base32
-                "0h97jra8zqssi9j4i0psa6c7ya49ya8jd2qc18lc61a4s2yn8w91"))))
+                "1wxzjnzvkl3aga51ad2xhv4s7v46kvnp4z0nz4cb9cn10057sfw8"))))
     (build-system r-build-system)
     (home-page "http://cran.r-project.org/web/packages/plotrix")
     (synopsis "Various plotting functions")
@@ -2061,13 +2092,13 @@ well as additional utilities such as panel and axis annotation functions.")
 (define-public r-rcpparmadillo
   (package
     (name "r-rcpparmadillo")
-    (version "0.7.500.0.0")
+    (version "0.7.600.1.0")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "RcppArmadillo" version))
               (sha256
                (base32
-                "06qb6877c5qd8lvnc4b27z8fwb5r5pyylkj0g6kj1rn868zkh5ps"))
+                "0k1wniip184j0ckcg9kcjy2q4mcfj5jpd1nkk4l0ab75ad8znywv"))
               (modules '((guix build utils)))
               ;; Remove bundled armadillo sources
               (snippet
@@ -2142,27 +2173,50 @@ ENVI binary files, fast calculation of AUC, LogitBoost classifier, base64
 encoder/decoder, round-off-error-free sum and cumsum, etc.")
     (license license:gpl3+)))
 
+(define-public r-rprojroot
+  (package
+    (name "r-rprojroot")
+    (version "1.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "rprojroot" version))
+       (sha256
+        (base32
+         "04ywfpar4d2hyi4rh4fbixrbzd665gpa2jhx67g8857cr70pp0nh"))))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-backports" ,r-backports)))
+    (home-page "https://github.com/krlmlr/rprojroot")
+    (synopsis "Finding files in project subdirectories")
+    (description
+     "This package helps accessing files relative to a project root.  It
+provides helpers for robust, reliable and flexible paths to files below a
+project root.  The root of a project is defined as a directory that matches a
+certain criterion, e.g., it contains a certain regular file.")
+    (license license:gpl3)))
+
 (define-public r-rmarkdown
   (package
     (name "r-rmarkdown")
-    (version "1.1")
+    (version "1.3")
     (source
       (origin
         (method url-fetch)
         (uri (cran-uri "rmarkdown" version))
         (sha256
           (base32
-            "1czvkaz1ji3jyj6qrvbswisqs9d05ljqc4vjkfdrf6hygix7azd0"))))
+            "1vvxyf3zhyxx6k697lia299456hryp8nh3zr0fc27f3107a8mcjf"))))
     (properties `((upstream-name . "rmarkdown")))
     (build-system r-build-system)
     (propagated-inputs
      `(("r-catools" ,r-catools)
        ("r-evaluate" ,r-evaluate)
-       ("r-tibble" ,r-tibble)
        ("r-htmltools" ,r-htmltools)
        ("r-jsonlite" ,r-jsonlite)
        ("r-base64enc" ,r-base64enc)
        ("r-knitr" ,r-knitr)
+       ("r-rprojroot" ,r-rprojroot)
        ("r-yaml" ,r-yaml)
        ("ghc-pandoc" ,ghc-pandoc)))
     (home-page "http://rmarkdown.rstudio.com")
@@ -2215,20 +2269,44 @@ grobs.")
 and draw tables.")
     (license license:gpl2+)))
 
+(define-public r-plogr
+  (package
+    (name "r-plogr")
+    (version "0.1-1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "plogr" version))
+       (sha256
+        (base32
+         "13zliqlbkl8b04k9ga0sx5jsh7k867gracgl84l2a9kcqy9mqx92"))))
+    (build-system r-build-system)
+    (home-page "https://github.com/krlmlr/plogr")
+    (synopsis "R bindings for the plog C++ logging library")
+    (description
+     "This package provides the header files for a stripped-down version of
+the plog header-only C++ logging library, and a method to log to R's standard
+error stream.")
+    (license license:expat)))
+
 (define-public r-rsqlite
   (package
     (name "r-rsqlite")
-    (version "1.0.0")
+    (version "1.1-1")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "RSQLite" version))
               (sha256
                (base32
-                "08b1syv8z887gxiw8i09dpqh0zisfb6ihq6qqr01zipvkahzq34f"))))
+                "11vnzds5gidgakdmsbdn0bvnsz064ym1savwb7l6gc1bjn7xa2k4"))))
     (properties `((upstream-name . "RSQLite")))
     (build-system r-build-system)
     (propagated-inputs
-     `(("r-dbi" ,r-dbi)))
+     `(("r-dbi" ,r-dbi)
+       ("r-bh" ,r-bh)
+       ("r-memoise" ,r-memoise)
+       ("r-plogr" ,r-plogr)
+       ("r-rcpp" ,r-rcpp)))
     (home-page "https://github.com/rstats-db/RSQLite")
     (synopsis "SQLite interface for R")
     (description
@@ -2271,20 +2349,18 @@ ldap, and also supports cookies, redirects, authentication, etc.")
 (define-public r-xml
   (package
     (name "r-xml")
-    (version "3.98-1.4")
+    (version "3.98-1.5")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "XML" version))
               (sha256
                (base32
-                "09hiy5a875v2fhsgrsfymrwccn9249wnnsr6ck2slrig65svq2lw"))))
+                "0dcdj7ryn8lm7wmv4hqhh9jxa5k97l6ad8xyvb932yfkwj1g1byy"))))
     (properties
      `((upstream-name . "XML")))
     (build-system r-build-system)
     (inputs
      `(("libxml2" ,libxml2)))
-    (propagated-inputs
-     `(("r-rcurl" ,r-rcurl)))
     (home-page "http://www.omegahat.org/RSXML")
     (synopsis "Tools for parsing and generating XML within R")
     (description
@@ -2432,13 +2508,13 @@ worker processes and collect and return the results on the master.")
 (define-public r-sparsem
   (package
     (name "r-sparsem")
-    (version "1.72")
+    (version "1.74")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "SparseM" version))
               (sha256
                (base32
-                "0zpb1swn9xjkb22sky10ixff7vqfiz9m36nkbc1qqbm9frcldnka"))))
+                "1fpfhld887y5lyb8jydprmv5krqm1fk6n53z942b4g4z1v4g04j7"))))
     (properties
      `((upstream-name . "SparseM")))
     (inputs
@@ -2966,13 +3042,13 @@ maintenance for package developers.")
 (define-public r-r-utils
   (package
     (name "r-r-utils")
-    (version "2.4.0")
+    (version "2.5.0")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "R.utils" version))
               (sha256
                (base32
-                "0cn0wlmgwclmqak05825wrk9q894xa4qjqa7rn0i9p4ss7k6vifj"))))
+                "17q3w5dlly5xl2srrzsmf9s7vs5d576vqbcs6sr2p5x4qvqa1q8s"))))
     (properties `((upstream-name . "R.utils")))
     (build-system r-build-system)
     (propagated-inputs
@@ -3014,13 +3090,13 @@ persistent (on the file system).")
 (define-public r-r-rsp
   (package
     (name "r-r-rsp")
-    (version "0.30.0")
+    (version "0.40.0")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "R.rsp" version))
               (sha256
                (base32
-                "1ssykygqkxzx9qblxhavxlf2z6r5bhk0s47yw1dllfiyc8zy7jv2"))))
+                "1hz5fnxz30m3cc7x7ha1swx4pn8c2244z6ka6v9m3l5lpdgc1367"))))
     (properties `((upstream-name . "R.rsp")))
     (build-system r-build-system)
     (propagated-inputs
@@ -3216,13 +3292,13 @@ features present in other programming languages.")
 (define-public r-plotly
   (package
     (name "r-plotly")
-    (version "4.5.2")
+    (version "4.5.6")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "plotly" version))
               (sha256
                (base32
-                "08shs0qhy9js0fpj3d4rzfbwmw11ki3z5vg8jszfm6m69mfkgzw1"))))
+                "09yw977yxlcxv57kni3q899zrxyxa6pznr06cylr9lqkyr7llfhx"))))
     (build-system r-build-system)
     (propagated-inputs
      `(("r-base64enc" ,r-base64enc)
@@ -3272,6 +3348,128 @@ noncentral hypergeometric distribution (also called extended hypergeometric
 distribution).")
    (license license:gpl3+)))
 
+(define-public r-rematch
+  (package
+    (name "r-rematch")
+    (version "1.0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "rematch" version))
+       (sha256
+        (base32
+         "0y3mshvpvz9csmq8hk8jbabx4nxlv5sckvfzvm6920ndg34xw2d4"))))
+    (build-system r-build-system)
+    (home-page "https://github.com/MangoTheCat/rematch")
+    (synopsis "Match regular expressions with a nicer API")
+    (description
+     "This package provides a small wrapper on @code{regexpr} to extract the
+matches and captured groups from the match of a regular expression to a
+character vector.")
+    (license license:expat)))
+
+(define-public r-cellranger
+  (package
+    (name "r-cellranger")
+    (version "1.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "cellranger" version))
+       (sha256
+        (base32
+         "16fgi3annn34c3cxi0pxf62mmmmxi21hp0zzlv7bkfsjqy4g4f2x"))))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-rematch" ,r-rematch)
+       ("r-tibble" ,r-tibble)))
+    (home-page "https://github.com/rsheets/cellranger")
+    (synopsis "Translate spreadsheet cell ranges to rows and columns")
+    (description
+     "This package provides helper functions to work with spreadsheets and the
+@code{A1:D10} style of cell range specification.")
+    (license license:expat)))
+
+(define-public r-googlesheets
+  (package
+    (name "r-googlesheets")
+    (version "0.2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "googlesheets" version))
+       (sha256
+        (base32
+         "0ps13h1cv7fj5dh8s4nvwi64wnnyqdsadcaa4iizq1c5s615cwk3"))))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-cellranger" ,r-cellranger)
+       ("r-dplyr" ,r-dplyr)
+       ("r-httr" ,r-httr)
+       ("r-jsonlite" ,r-jsonlite)
+       ("r-purrr" ,r-purrr)
+       ("r-readr" ,r-readr)
+       ("r-stringr" ,r-stringr)
+       ("r-tidyr" ,r-tidyr)
+       ("r-xml2" ,r-xml2)))
+    (home-page "https://github.com/jennybc/googlesheets")
+    (synopsis "Manage Google spreadsheets from R")
+    (description "This package provides tools to interact with Google Sheets
+from within R.")
+    (license license:expat)))
+
+(define-public r-spams
+  (package
+    (name "r-spams")
+    (version "2.5-svn2014-07-04")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://gforge.inria.fr/frs/download.php/33815/"
+                           "spams-R-v" version ".tar.gz"))
+       (sha256
+        (base32
+         "1k459jg9a334slkw31w63l4d39xszjzsng7dv5j1mp78zifz7hvx"))))
+    (build-system r-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'chdir
+           (lambda _ (chdir "spams") #t))
+         ;; Since R 3.3.0 including R headers inside of an extern "C" block
+         ;; causes C headers to be included, which results in a lot of
+         ;; duplicate definitions.  This can be avoided by defining
+         ;; NO_C_HEADERS before including the R headers.
+         (add-after 'chdir 'patch-use-of-R-headers
+           (lambda _
+             (substitute* "src/spams.cpp"
+               (("#include <R.h>" line)
+                (string-append "#define NO_C_HEADERS\n" line)))
+             #t))
+         ;; This looks like a syntax error.
+         (add-after 'chdir 'patch-isnan
+           (lambda _
+             (substitute* '"src/spams/linalg/linalg.h"
+               (("if isnan\\(lambda\\) \\{")
+                "if (isnan(lambda)) {"))
+             #t)))))
+    (home-page "http://spams-devel.gforge.inria.fr")
+    (synopsis "Toolbox for solving sparse estimation problems")
+    (description "SPAMS (SPArse Modeling Software) is an optimization toolbox
+for solving various sparse estimation problems.  It includes tools for the
+following problems:
+
+@enumerate
+@item Dictionary learning and matrix factorization (NMF, sparse @dfn{principle
+ component analysis} (PCA), ...)
+@item Solving sparse decomposition problems with LARS, coordinate descent,
+ OMP, SOMP, proximal methods
+@item Solving structured sparse decomposition problems (l1/l2, l1/linf, sparse
+ group lasso, tree-structured regularization, structured sparsity with
+ overlapping groups,...).
+@end enumerate\n")
+    (license license:gpl3+)))
+
 (define-public r-rpart
   (package
     (name "r-rpart")
@@ -3311,40 +3509,59 @@ definition of Surv objects, Kaplan-Meier and Aalen-Johansen (multi-state)
 curves, Cox models, and parametric accelerated failure time models.")
     (license license:lgpl2.0+)))
 
+(define-public r-base64
+  (package
+    (name "r-base64")
+    (version "2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "base64" version))
+       (sha256
+        (base32
+         "1labh0ycdm2xcjssj8bhnyjvbk44mcdsi0rb2p8rfqa428mrq9cf"))))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-openssl" ,r-openssl)))
+    (home-page "http://cran.r-project.org/web/packages/base64")
+    (synopsis "Base64 encoder and decoder")
+    (description
+     "This package is a compatibility wrapper to replace the orphaned package
+by Romain Francois.  New applications should use the openssl or base64enc
+package instead.")
+    (license license:expat)))
+
 (define-public r-hmisc
   (package
     (name "r-hmisc")
-    (version "4.0-0")
+    (version "4.0-2")
     (source
      (origin
        (method url-fetch)
        (uri (cran-uri "Hmisc" version))
        (sha256
         (base32
-         "0azxmg9h9c456biydc0wpi9xhljmd37m8bv0zaadbvc93g7x0l4b"))))
+         "1lg9k0kj803wsm3h0a991q9l2lrgsqryzfv2z79b88kjbfapqpqr"))))
     (properties `((upstream-name . "Hmisc")))
     (build-system r-build-system)
     (native-inputs
      `(("gfortran" ,gfortran)))
     (propagated-inputs
      `(("r-acepack" ,r-acepack)
-       ("r-cluster" ,r-cluster)
+       ("r-base64" ,r-base64)
+       ("r-base64enc" ,r-base64enc)
        ("r-data-table" ,r-data-table)
-       ("r-foreign" ,r-foreign)
        ("r-formula" ,r-formula)
        ("r-ggplot2" ,r-ggplot2)
        ("r-gridextra" ,r-gridextra)
        ("r-gtable" ,r-gtable)
-       ("r-lattice" ,r-lattice)
        ;; Hmisc needs survival >= 2.40.1, so it cannot use the survival
-       ;; package that comes with R 3.3.1.
+       ;; package that comes with R 3.3.2.
        ("r-survival" ,r-survival)
        ("r-latticeextra" ,r-latticeextra)
        ("r-htmltable" ,r-htmltable)
        ("r-htmltools" ,r-htmltools)
-       ("r-viridis" ,r-viridis)
-       ("r-nnet" ,r-nnet)
-       ("r-rpart" ,r-rpart)))
+       ("r-viridis" ,r-viridis)))
     (home-page "http://biostat.mc.vanderbilt.edu/Hmisc")
     (synopsis "Miscellaneous data analysis and graphics functions")
     (description
@@ -3375,6 +3592,224 @@ conversion of R objects to LaTeX code, and recoding variables.")
 framework, with additional code inspection and report generation tools.")
     (license license:gpl2+)))
 
+(define-public r-dynamictreecut
+  (package
+    (name "r-dynamictreecut")
+    (version "1.63-1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "dynamicTreeCut" version))
+       (sha256
+        (base32
+         "1fadbql7g5r2vvlkr89nlrjxwp4yx4xrdqmv077qvmnx9vv0f4w3"))))
+    (properties `((upstream-name . "dynamicTreeCut")))
+    (build-system r-build-system)
+    (home-page
+     "http://www.genetics.ucla.edu/labs/horvath/CoexpressionNetwork/BranchCutting/")
+    (synopsis "Detect clusters in hierarchical clustering dendrograms")
+    (description
+     "This package contains methods for the detection of clusters in
+hierarchical clustering dendrograms.")
+    (license license:gpl2+)))
+
+(define-public r-preprocesscore
+  (package
+    (name "r-preprocesscore")
+    (version "1.36.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (bioconductor-uri "preprocessCore" version))
+       (sha256
+        (base32
+         "1n8y12q7145f385gm2k3c6y3vwvin7jlb47la4mnl7mar6pq9kmp"))))
+    (properties
+     `((upstream-name . "preprocessCore")))
+    (build-system r-build-system)
+    (home-page "https://github.com/bmbolstad/preprocessCore")
+    (synopsis "Collection of pre-processing functions")
+    (description
+     "This package provides a library of core pre-processing and normalization
+routines.")
+    (license license:lgpl2.0+)))
+
+(define-public r-fastcluster
+  (package
+    (name "r-fastcluster")
+    (version "1.1.22")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "fastcluster" version))
+       (sha256
+        (base32
+         "006k9isra5biyavqwci61avladw19mhp6kmkjj3777rl1r4r8b9z"))))
+    (build-system r-build-system)
+    (home-page "http://danifold.net/fastcluster.html")
+    (synopsis "Fast hierarchical clustering routines")
+    (description
+     "This package implements fast hierarchical, agglomerative clustering
+routines.  Part of the functionality is designed as drop-in replacement for
+existing routines: @code{linkage()} in the SciPy package
+@code{scipy.cluster.hierarchy}, @code{hclust()} in R's @code{stats} package,
+and the @code{flashClust} package.  It provides the same functionality with
+the benefit of a much faster implementation.  Moreover, there are
+memory-saving routines for clustering of vector data, which go beyond what the
+existing packages provide.")
+    (license license:bsd-2)))
+
+(define-public r-sfsmisc
+  (package
+    (name "r-sfsmisc")
+    (version "1.1-0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "sfsmisc" version))
+       (sha256
+        (base32
+         "0580piv4n1nispl3pa8nfjjfnb8iwaqky2dzdy0aqnxrxgrhqhvz"))))
+    (build-system r-build-system)
+    (home-page "http://cran.r-project.org/web/packages/sfsmisc")
+    (synopsis "Utilities from \"Seminar fuer Statistik\" ETH Zurich")
+    (description
+     "This package provides useful utilities from Seminar fuer Statistik ETH
+Zurich, including many that are related to graphics.")
+    (license license:gpl2+)))
+
+(define-public r-gtools
+  (package
+    (name "r-gtools")
+    (version "3.5.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "gtools" version))
+       (sha256
+        (base32
+         "1xknwk9xlsj027pg0nwiizigcrsc84hdrig0jn0cgcyxj8dabdl6"))))
+    (build-system r-build-system)
+    (home-page "http://cran.r-project.org/web/packages/gtools")
+    (synopsis "Various R programming tools")
+    (description
+     "This package contains a collection of various functions to assist in R
+programming, such as tools to assist in developing, updating, and maintaining
+R and R packages, calculating the logit and inverse logit transformations,
+tests for whether a value is missing, empty or contains only @code{NA} and
+@code{NULL} values, and many more.")
+    (license license:gpl2)))
+
+(define-public r-gdata
+  (package
+    (name "r-gdata")
+    (version "2.17.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "gdata" version))
+       (sha256
+        (base32
+         "0kiy3jbcszlpmarg311spdsfi5pn89wgy742dxsbzxk8907fr5w0"))))
+    (build-system r-build-system)
+    (inputs
+     `(("perl" ,perl)))
+    (propagated-inputs
+     `(("r-gtools" ,r-gtools)))
+    (home-page "http://cran.r-project.org/web/packages/gdata")
+    (synopsis "Various R programming tools for data manipulation")
+    (description
+     "This package provides various R programming tools for data manipulation,
+including:
+
+@itemize
+@item medical unit conversions
+@item combining objects
+@item character vector operations
+@item factor manipulation
+@item obtaining information about R objects
+@item manipulating MS-Excel formatted files
+@item generating fixed-width format files
+@item extricating components of date and time objects
+@item operations on columns of data frames
+@item matrix operations
+@item operations on vectors and data frames
+@item value of last evaluated expression
+@item wrapper for @code{sample} that ensures consistent behavior for
+  both scalar and vector arguments
+@end itemize\n")
+    (license license:gpl2+)))
+
+(define-public r-gplots
+  (package
+    (name "r-gplots")
+    (version "3.0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "gplots" version))
+       (sha256
+        (base32
+         "02nb8n3s7c1zxq2s7ycaq2ys72y7mzirxrwj954h6gdc4x1zhg9l"))))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-catools" ,r-catools)
+       ("r-gdata" ,r-gdata)
+       ("r-gtools" ,r-gtools)
+       ("r-kernsmooth" ,r-kernsmooth)))
+    (home-page "http://cran.r-project.org/web/packages/gplots")
+    (synopsis "Various R programming tools for plotting data")
+    (description
+     "This package provides various R programming tools for plotting data,
+including:
+
+@itemize
+@item calculating and plotting locally smoothed summary function
+@item enhanced versions of standard plots
+@item manipulating colors
+@item calculating and plotting two-dimensional data summaries
+@item enhanced regression diagnostic plots
+@item formula-enabled interface to @code{stats::lowess} function
+@item displaying textual data in plots
+@item baloon plots
+@item plotting \"Venn\" diagrams
+@item displaying Open-Office style plots
+@item plotting multiple data on same region, with separate axes
+@item plotting means and confidence intervals
+@item spacing points in an x-y plot so they don't overlap
+@end itemize\n")
+    (license license:gpl2+)))
+
+(define-public r-rocr
+  (package
+    (name "r-rocr")
+    (version "1.0-7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "ROCR" version))
+       (sha256
+        (base32
+         "1jay8cm7lgq56i967vm5c2hgaxqkphfpip0gn941li3yhh7p3vz7"))))
+    (properties `((upstream-name . "ROCR")))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-gplots" ,r-gplots)))
+    (home-page "http://rocr.bioinf.mpi-sb.mpg.de/")
+    (synopsis "Visualizing the performance of scoring classifiers")
+    (description
+     "ROCR is a flexible tool for creating cutoff-parameterized 2D performance
+curves by freely combining two from over 25 performance measures (new
+performance measures can be added using a standard interface).  Curves from
+different cross-validation or bootstrapping runs can be averaged by different
+methods, and standard deviations, standard errors or box plots can be used to
+visualize the variability across the runs.  The parameterization can be
+visualized by printing cutoff values at the corresponding curve positions, or
+by coloring the curve according to cutoff.  All components of a performance
+plot can be quickly adjusted using a flexible parameter dispatching
+mechanism.")
+    (license license:gpl2+)))
+
 (define-public r-kernsmooth
   (package
     (name "r-kernsmooth")
@@ -3402,16 +3837,14 @@ estimation) corresponding to the book: Wand, M.P.  and Jones, M.C. (1995)
 (define-public r-zoo
   (package
     (name "r-zoo")
-    (version "1.7-13")
+    (version "1.7-14")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "zoo" version))
               (sha256
                (base32
-                "0m67bnrg7r1jxvs9p7rpa430szp5qfp65r056yb8bivpc16jd98c"))))
+                "167m142rwwfy8b9hnfc3fi28dcsdjk61g1crqhll6sh5xmgnfn28"))))
     (build-system r-build-system)
-    (propagated-inputs
-     `(("r-lattice" ,r-lattice)))
     (home-page "http://zoo.R-Forge.R-project.org/")
     (synopsis "S3 infrastructure for regular and irregular time series")
     (description "This package contains an S3 class with methods for totally
@@ -3439,3 +3872,110 @@ with alternating row colors) in LaTeX and HTML formats easily from
 @code{glm}, @code{coxph}, @code{nls}, @code{fitdistr}, @code{mytable} and
 @code{cbind.mytable} objects.")
     (license license:gpl2+)))
+
+(define-public r-vipor
+  (package
+    (name "r-vipor")
+    (version "0.4.4")
+    (source (origin
+              (method url-fetch)
+              (uri (cran-uri "vipor" version))
+              (sha256
+               (base32
+                "0p1z9a3fazl78pj8a1i2n62v8hrs8cinq82j9wpawhmfkn3dggss"))))
+    (build-system r-build-system)
+    (home-page "http://cran.r-project.org/web/packages/vipor")
+    (synopsis "Plot categorical data using noise and density estimates")
+    (description
+     "This package provides tools to generate a violin point plot, a
+combination of a violin/histogram plot and a scatter plot by offsetting points
+within a category based on their density using quasirandom noise.")
+    (license license:gpl2+)))
+
+(define-public r-beeswarm
+  (package
+    (name "r-beeswarm")
+    (version "0.2.3")
+    (source (origin
+              (method url-fetch)
+              (uri (cran-uri "beeswarm" version))
+              (sha256
+               (base32
+                "0hy89bwv7jixlg91li1fywa77916am2whqp1m1fx1khd45g44581"))))
+    (build-system r-build-system)
+    (home-page "http://www.cbs.dtu.dk/~eklund/beeswarm/")
+    (synopsis "Implementation of bee swarm plots")
+    (description
+     "This package provides an implementation of bee swarm plots.  The bee
+swarm plot is a one-dimensional scatter plot like stripchart, but with
+closely-packed, non-overlapping points.")
+    (license license:artistic2.0)))
+
+(define-public r-sourcetools
+  (package
+    (name "r-sourcetools")
+    (version "0.1.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "sourcetools" version))
+       (sha256
+        (base32
+         "0jx6kslygfqaic3cmjwag3dy98q1a2dw20cz7z8agsknmmbk6dy2"))))
+    (build-system r-build-system)
+    (home-page "http://cran.r-project.org/web/packages/sourcetools")
+    (synopsis "Tools for reading, tokenizing and parsing R code")
+    (description
+     "The sourcetools package provides both an R and C++ interface for the
+tokenization of R code, and helpers for interacting with the tokenized
+representation of R code.")
+    (license license:expat)))
+
+(define-public r-ggbeeswarm
+  (package
+    (name "r-ggbeeswarm")
+    (version "0.5.3")
+    (source (origin
+              (method url-fetch)
+              (uri (cran-uri "ggbeeswarm" version))
+              (sha256
+               (base32
+                "1jgp55rvmzc4agcrlsjn8m5lk85di9c4wj94xzikqkql4lvq3qpd"))))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-beeswarm" ,r-beeswarm)
+       ("r-ggplot2" ,r-ggplot2)
+       ("r-vipor" ,r-vipor)))
+    (home-page "https://github.com/eclarke/ggbeeswarm")
+    (synopsis "Categorical scatter (violin point) plots")
+    (description
+     "This package provides two methods of plotting categorical scatter plots
+such that the arrangement of points within a category reflects the density of
+data at that region, and avoids over-plotting.")
+    (license license:gpl2+)))
+
+(define-public r-statmod
+  (package
+    (name "r-statmod")
+    (version "1.4.27")
+    (source (origin
+              (method url-fetch)
+              (uri (cran-uri "statmod" version))
+              (sha256
+               (base32
+                "14yilq9d3z20hig4rs8bjqyydw3dfx90mhmzvw9w8p16h0s595sn"))))
+    (build-system r-build-system)
+    (home-page "http://cran.r-project.org/web/packages/statmod")
+    (native-inputs
+     `(("gfortran" ,gfortran)))
+    (synopsis "Statistical modeling")
+    (description
+     "This package provides a collection of algorithms and functions to aid
+statistical modeling.  It includes growth curve comparisons, limiting dilution
+analysis (aka ELDA), mixed linear models, heteroscedastic regression,
+inverse-Gaussian probability calculations, Gauss quadrature and a secure
+convergence algorithm for nonlinear models.  It also includes advanced
+generalized linear model functions that implement secure convergence,
+dispersion modeling and Tweedie power-law families.")
+    ;; Statmod is distributed under either license
+    (license (list license:gpl2 license:gpl3))))
diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
index 820d550d6e..a00420312d 100644
--- a/gnu/packages/suckless.scm
+++ b/gnu/packages/suckless.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2015 Dmitry Bogatov <KAction@gnu.org>
 ;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -40,16 +41,19 @@
 (define-public dwm
   (package
     (name "dwm")
-    (version "6.0")
+    (version "6.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "http://dl.suckless.org/dwm/dwm-"
                                  version ".tar.gz"))
              (sha256
-              (base32 "0mpbivy9j80l1jqq4bd4g4z8s5c54fxrjj44avmfwncjwqylifdj"))))
+              (base32 "1zkmwb6df6m254shx06ly90c0q4jl70skk1pvkixpb7hcxhwbxn2"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f
+       #:make-flags (list (string-append "FREETYPEINC="
+                                         (assoc-ref %build-inputs "freetype")
+                                         "/include/freetype2"))
        #:phases
        (alist-replace
         'configure
@@ -65,7 +69,9 @@
                      (string-append "DESTDIR=" out) "PREFIX="))))
          %standard-phases))))
     (inputs
-     `(("libx11" ,libx11)
+     `(("freetype" ,freetype)
+       ("libx11" ,libx11)
+       ("libxft" ,libxft)
        ("libxinerama" ,libxinerama)))
     (home-page "http://dwm.suckless.org/")
     (synopsis "Dynamic window manager")
@@ -78,23 +84,28 @@ optimising the environment for the application in use and the task performed.")
 (define-public dmenu
   (package
     (name "dmenu")
-    (version "4.5")
+    (version "4.6")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://dl.suckless.org/tools/dmenu-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0l58jpxrr80fmyw5pgw5alm5qry49aw6y049745wl991v2cdcb08"))))
+                "1cwnvamqqlgczvd5dv5rsgqbhv8kp0ddjnhmavb3q732i8028yja"))))
     (build-system gnu-build-system)
     (arguments
      '(#:tests? #f ; no tests
        #:make-flags (list "CC=gcc"
-                          (string-append "PREFIX=" %output))
+                          (string-append "PREFIX=" %output)
+                          (string-append "FREETYPEINC="
+                                         (assoc-ref %build-inputs "freetype")
+                                         "/include/freetype2"))
        #:phases
        (alist-delete 'configure %standard-phases)))
     (inputs
-     `(("libx11" ,libx11)
+     `(("freetype" ,freetype)
+       ("libxft" ,libxft)
+       ("libx11" ,libx11)
        ("libxinerama" ,libxinerama)))
     (home-page "http://tools.suckless.org/dmenu/")
     (synopsis "Dynamic menu")
@@ -106,15 +117,14 @@ numbers of user-defined menu items efficiently.")
 (define-public slock
   (package
     (name "slock")
-    (version "1.3")
+    (version "1.4")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://dl.suckless.org/tools/slock-"
                                   version ".tar.gz"))
-              (patches (search-patches "slock-CVE-2016-6866.patch"))
               (sha256
                (base32
-                "065xa9hl7zn0lv2f7yjxphqsa35rg6dn9hv10gys0sh4ljpa7d5s"))))
+                "0sif752303dg33f14k6pgwq2jp1hjyhqv6x4sy3sj281qvdljf5m"))))
     (build-system gnu-build-system)
     (arguments
      '(#:tests? #f ; no tests
diff --git a/gnu/packages/swig.scm b/gnu/packages/swig.scm
index a615796745..acf0529377 100644
--- a/gnu/packages/swig.scm
+++ b/gnu/packages/swig.scm
@@ -31,7 +31,7 @@
 (define-public swig
   (package
     (name "swig")
-    (version "3.0.5")
+    (version "3.0.10")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://sourceforge/" name "/" name "/"
@@ -39,7 +39,7 @@
                                  name "-" version ".tar.gz"))
              (sha256
               (base32
-               "0g1a69vrqxgsnr1wkx851ljn73a2x3jqzxa66s2l3w0kyblbjk4z"))))
+               "0k7ljh07rla6223lhvljgg881b2qr7hmrfgic9a0j1pckpislf99"))))
     (build-system gnu-build-system)
     (native-inputs `(("boost" ,boost)
                      ("pcre" ,pcre "bin")))       ;for 'pcre-config'
diff --git a/gnu/packages/sxiv.scm b/gnu/packages/sxiv.scm
deleted file mode 100644
index 8a81d48f3e..0000000000
--- a/gnu/packages/sxiv.scm
+++ /dev/null
@@ -1,62 +0,0 @@
-;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2016 Alex Kost <alezost@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 sxiv)
-  #:use-module (guix packages)
-  #:use-module (guix download)
-  #:use-module (guix build-system gnu)
-  #:use-module ((guix licenses) #:prefix license:)
-  #:use-module (gnu packages xorg)
-  #:use-module (gnu packages image)
-  #:use-module (gnu packages photo))
-
-(define-public sxiv
-  (package
-    (name "sxiv")
-    (version "1.3.2")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append
-                    "https://github.com/muennich/sxiv/archive/v"
-                    version ".tar.gz"))
-              (file-name (string-append name "-" version ".tar.gz"))
-              (sha256
-               (base32
-                "0lxnd33gaw4drhdwbkk94wzrjyhh64d57jq2ps7ffmqgizg6hlwz"))))
-    (build-system gnu-build-system)
-    (arguments
-     '(#:tests? #f                      ; no check target
-       #:make-flags (list (string-append "PREFIX=" %output)
-                          "CC=gcc")
-       #:phases (alist-delete
-                 'configure             ; no configure phase
-                 %standard-phases)))
-    (inputs
-     `(("libx11" ,libx11)
-       ("imlib2" ,imlib2)
-       ("giflib" ,giflib)
-       ("libexif" ,libexif)))
-    (home-page "https://github.com/muennich/sxiv")
-    (synopsis "Simple X Image Viewer")
-    (description
-     "sxiv is an alternative to feh and qiv.  Its primary goal is to
-provide the most basic features required for fast image viewing.  It has
-vi key bindings and works nicely with tiling window managers.  Its code
-base should be kept small and clean to make it easy for you to dig into
-it and customize it for your needs.")
-    (license license:gpl2+)))
diff --git a/gnu/packages/owncloud.scm b/gnu/packages/sync.scm
index 6b40bd3ada..429fe196de 100644
--- a/gnu/packages/owncloud.scm
+++ b/gnu/packages/sync.scm
@@ -16,7 +16,7 @@
 ;;; 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 owncloud)
+(define-module (gnu packages sync)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system cmake)
   #:use-module (guix download)
@@ -103,3 +103,58 @@ to and a server to synchronize to.  You can configure more computers to
 synchronize to the same server and any change to the files on one computer will
 silently and reliably flow across to every other.")
     (license license:gpl2+)))
+
+(define-public qsyncthingtray
+  (package
+    (name "qsyncthingtray")
+    (version "0.5.7")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+               "https://github.com/sieren/QSyncthingTray/archive/"
+               version ".tar.gz"))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "1qzlxgq36sb1dk621nkbjw9k6y3css6q3z8xzx6nv7f327vanvp6"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags '("-DQST_BUILD_WEBKIT=1")
+       #:phases
+       (modify-phases %standard-phases
+         ;; The program is meant to be run from the git repo or source tarball.
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin")))
+               (install-file "QSyncthingTray" bin)
+               (install-file (string-append
+                               "../QSyncthingTray-"
+                               ,(package-version qsyncthingtray)
+                               "/resources/images/Icon1024.png")
+                             (string-append
+                               out "/share/pixmaps/QSyncthingTray.png"))
+               #t))))
+       #:tests? #f)) ; no test target
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("qtwebkit" ,qtwebkit)))
+    (home-page "https://github.com/sieren/QSyncthingTray")
+    (synopsis "Traybar Application for Syncthing")
+    (description
+     "A traybar application for syncthing.
+@enumerate
+@item Shows number of connections at a glance.
+@item Traffic statistics about incoming, outgoing and total throughput.
+@item Launches Syncthing and Syncthing-iNotifier if specified.
+@item Quickly pause Syncthing with one click.
+@item Last Synced Files - Quickly see the recently synchronised files and open
+their folder.
+@item Quick Access to all shared folders.
+@item Presents Syncthing UI in a separate view instead of using the browser.
+@item Supports authenticated HTTPS connections.
+@item Uses System Notifications about current connection status.
+@item Toggle for monochrome icon.
+@end enumerate\n")
+    (license license:lgpl3+)))
diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index 6597d26096..2adf08ce97 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
-;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
 ;;; Copyright © 2016 Francesco Frassinelli <fraph24@gmail.com>
 ;;; Copyright © 2016 ng0 <ng0@libertad.pw>
@@ -210,6 +210,7 @@ internet.")
              (method url-fetch)
              (uri (string-append "https://github.com/cisco/libsrtp/archive/v"
                                   version ".tar.gz"))
+             (file-name (string-append name "-" version ".tar.gz"))
              (sha256
               (base32
                "1w2g623qkd7gdyydglx2hr4s2y237lg0nszjmy7z8d2iq8hvb9sn"))))
@@ -217,7 +218,25 @@ internet.")
      `(("procps" ,procps)))
     (build-system gnu-build-system)
     (arguments
-     `(#:test-target "runtest"))
+     '(#:test-target "runtest"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-mips-variable-in-testsuite
+           ;; This comes from https://github.com/cisco/libsrtp/pull/151
+           (lambda _
+             (substitute* "test/srtp_driver.c"
+               (("mips ") "mips_est ")
+               (("mips\\)") "mips_est)"))
+             #t))
+         (add-after 'unpack 'patch-dictionary-location
+           ;; With the above changes, the rtpw_test.sh test finally runs, and fails
+           (lambda _
+             (substitute* "test/rtpw.c"
+               (("/usr/share/dict/words")
+                (string-append (assoc-ref %build-inputs "procps")
+                               "/share/doc/procps-ng"))
+                (("words.txt") "FAQ"))
+             #t)))))
     (synopsis "Secure RTP (SRTP) Reference Implementation")
     (description "This package provides an implementation of the Secure
 Real-time Transport Protocol (SRTP), the Universal Security Transform (UST),
@@ -299,14 +318,14 @@ address of one of the participants.")
 (define-public mumble
   (package
     (name "mumble")
-    (version "1.2.17")
+    (version "1.2.18")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://mumble.info/snapshot/"
                                   name "-" version ".tar.gz"))
               (sha256
                (base32
-                "176br3b0pv5sz3zvgzsz9rxr3n79irlm902h7n1wh4f6vbph2dhw"))
+                "1ajmdzf2jqbnm4hm53wv8bzazffflzs3z8hhbl70kfci4v4arxz0"))
               (modules '((guix build utils)))
               (snippet
                `(begin
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 97dd0a82bd..20897860d2 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -4,6 +4,8 @@
 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
+;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,6 +38,7 @@
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages wm)
@@ -161,8 +164,7 @@ insert mode and command mode where keybindings have different functions.")
                  (("'tput'")
                   (string-append "'" ncurses "/bin/tput'"))))
              #t)))))
-    (inputs `(("ncurses" ,ncurses)
-              ("python-setuptools" ,python-setuptools)))
+    (inputs `(("ncurses" ,ncurses)))
     (home-page "https://asciinema.org")
     (synopsis "Terminal session recorder")
     (description
@@ -262,6 +264,35 @@ multi-seat support, a replacement for @command{mingetty}, and more.")
     (supported-systems (filter (cut string-suffix? "-linux" <>)
                                %supported-systems))))
 
+(define-public libtermkey
+  (package
+    (name "libtermkey")
+    (version "0.19")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://www.leonerd.org.uk/code/"
+                                  name "/" name "-" version ".tar.gz"))
+              (sha256
+               (base32 "1ds8gdr8p2dfr970z8kxgfz6x7m1jxmmfrb2aafab3wcni6al1f5"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:make-flags (list
+                     "CC=gcc"
+                     (string-append "PREFIX=" (assoc-ref %outputs "out")))
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure))
+       #:test-target "test"))
+    (inputs `(("ncurses", ncurses)))
+    (native-inputs `(("libtool", libtool)
+                     ("perl-test-harness" ,perl-test-harness)
+                     ("pkg-config", pkg-config)))
+    (synopsis "Keyboard entry processing library for terminal-based programs")
+    (description
+     "Libtermkey handles all the necessary logic to recognise special keys, UTF-8
+combining, and so on, with a simple interface.")
+    (home-page "http://www.leonerd.org.uk/code/libtermkey")
+    (license license:expat)))
+
 (define-public picocom
   (package
     (name "picocom")
@@ -296,3 +327,38 @@ configuration, testing, and debugging tool.  It has also serves well
 as a low-tech serial communications program to allow access to all
 types of devices that provide serial consoles.")
     (license license:gpl2+)))
+
+(define-public beep
+  (package
+    (name "beep")
+    (version "1.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://www.johnath.com/" name "/"
+                                  name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0bgch6jq5cahakk3kbr9549iysf2dik09afixxy5brbxk1xfzb2r"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ; no tests.
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-after 'unpack 'patch-makefile
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "Makefile" (("/usr") (assoc-ref outputs "out")))
+             #t))
+         (add-before 'install 'create-output-directories
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref %outputs "out")))
+               (mkdir-p (string-append out "/bin"))
+               (mkdir-p (string-append out "/man/man1"))))))))
+    (synopsis "Linux command-line utility to control the PC speaker")
+    (description "beep allows the user to control the PC speaker with precision,
+allowing different sounds to indicate different events.  While it can be run
+quite happily on the command line, its intended place of residence is within
+scripts, notifying the user when something interesting occurs.  Of course, it
+has no notion of what's interesing, but it's very good at that notifying part.")
+    (home-page "http://www.johnath.com/beep")
+    (license license:gpl2+)))
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 9186e4693a..7c84ed7194 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch>
 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
+;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27,6 +28,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system perl)
   #:use-module (guix build-system trivial)
   #:use-module (guix utils)
   #:use-module (guix git-download)
@@ -50,6 +52,8 @@
   #:use-module (gnu packages ruby)
   #:use-module (gnu packages shells)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages web)
+  #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages zip)
@@ -382,6 +386,154 @@ world.
 
 This package contains a small working part of the TeX Live distribution.")))
 
+(define-public perl-text-bibtex
+  (package
+    (name "perl-text-bibtex")
+    (version "0.77")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/A/AM/AMBS/Text-BibTeX-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "0kkfx8skk763pivz6h2ffy2zdp1lvy6d5sz0kjaj0mdbjffvnnb4"))))
+    (build-system perl-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'add-output-directory-to-rpath
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "inc/MyBuilder.pm"
+               (("-Lbtparse" line)
+                (string-append "-Wl,-rpath="
+                               (assoc-ref outputs "out") "/lib " line)))
+             #t))
+         (add-after 'unpack 'install-libraries-to-/lib
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "Build.PL"
+               (("lib64") "lib"))
+             #t)))))
+    (native-inputs
+     `(("perl-capture-tiny" ,perl-capture-tiny)
+       ("perl-config-autoconf" ,perl-config-autoconf)
+       ("perl-extutils-libbuilder" ,perl-extutils-libbuilder)
+       ("perl-module-build" ,perl-module-build)))
+    (home-page "http://search.cpan.org/dist/Text-BibTeX")
+    (synopsis "Interface to read and parse BibTeX files")
+    (description "@code{Text::BibTeX} is a Perl library for reading, parsing,
+and processing BibTeX files.  @code{Text::BibTeX} gives you access to the data
+at many different levels: you may work with BibTeX entries as simple field to
+string mappings, or get at the original form of the data as a list of simple
+values (strings, macros, or numbers) pasted together.")
+    (license (package-license perl))))
+
+(define-public biber
+  (package
+    (name "biber-next")
+    (version "2.6")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/plk/biber/archive/v"
+                                  version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "158smzgjhjvyabdv97si5q88zjj5l8j1zbfnddvzy6fkpfhskgkp"))))
+    (build-system perl-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'wrap-programs
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (perl5lib (getenv "PERL5LIB")))
+               (wrap-program (string-append out "/bin/biber")
+                 `("PERL5LIB" ":" prefix
+                   (,(string-append perl5lib ":" out
+                                    "/lib/perl5/site_perl")))))
+             #t)))))
+    (inputs
+     `(("perl-autovivification" ,perl-autovivification)
+       ("perl-class-accessor" ,perl-class-accessor)
+       ("perl-data-dump" ,perl-data-dump)
+       ("perl-data-compare" ,perl-data-compare)
+       ("perl-data-uniqid" ,perl-data-uniqid)
+       ("perl-datetime-format-builder" ,perl-datetime-format-builder)
+       ("perl-datetime-calendar-julian" ,perl-datetime-calendar-julian)
+       ("perl-file-slurp" ,perl-file-slurp)
+       ("perl-ipc-cmd" ,perl-ipc-cmd)
+       ("perl-ipc-run3" ,perl-ipc-run3)
+       ("perl-list-allutils" ,perl-list-allutils)
+       ("perl-list-moreutils" ,perl-list-moreutils)
+       ("perl-mozilla-ca" ,perl-mozilla-ca)
+       ("perl-regexp-common" ,perl-regexp-common)
+       ("perl-log-log4perl" ,perl-log-log4perl)
+       ;; We cannot use perl-unicode-collate here, because otherwise the
+       ;; hardcoded hashes in the tests would differ.  See
+       ;; https://mail-archive.com/debian-bugs-dist@lists.debian.org/msg1469249.html
+       ;;("perl-unicode-collate" ,perl-unicode-collate)
+       ("perl-unicode-normalize" ,perl-unicode-normalize)
+       ("perl-unicode-linebreak" ,perl-unicode-linebreak)
+       ("perl-encode-eucjpascii" ,perl-encode-eucjpascii)
+       ("perl-encode-jis2k" ,perl-encode-jis2k)
+       ("perl-encode-hanextra" ,perl-encode-hanextra)
+       ("perl-xml-libxml" ,perl-xml-libxml)
+       ("perl-xml-libxml-simple" ,perl-xml-libxml-simple)
+       ("perl-xml-libxslt" ,perl-xml-libxslt)
+       ("perl-xml-writer" ,perl-xml-writer)
+       ("perl-sort-key" ,perl-sort-key)
+       ("perl-text-csv" ,perl-text-csv)
+       ("perl-text-csv-xs" ,perl-text-csv-xs)
+       ("perl-text-roman" ,perl-text-roman)
+       ("perl-uri" ,perl-uri)
+       ("perl-text-bibtex" ,perl-text-bibtex)
+       ("perl-libwww" ,perl-libwww)
+       ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
+       ("perl-business-isbn" ,perl-business-isbn)
+       ("perl-business-issn" ,perl-business-issn)
+       ("perl-business-ismn" ,perl-business-ismn)
+       ("perl-lingua-translit" ,perl-lingua-translit)))
+    (native-inputs
+     `(("perl-config-autoconf" ,perl-config-autoconf)
+       ("perl-extutils-libbuilder" ,perl-extutils-libbuilder)
+       ("perl-module-build" ,perl-module-build)
+       ;; for tests
+       ("perl-file-which" ,perl-file-which)
+       ("perl-test-more" ,perl-test-most) ; FIXME: "more" would be sufficient
+       ("perl-test-differences" ,perl-test-differences)))
+    (home-page "http://biblatex-biber.sourceforge.net/")
+    (synopsis "Backend for the BibLaTeX citation management tool")
+    (description "Biber is a BibTeX replacement for users of biblatex.  Among
+other things it comes with full Unicode support.")
+    (license license:artistic2.0)))
+
+;; Our version of texlive comes with biblatex 3.4, which is only compatible
+;; with biber 2.5 according to the compatibility matrix in the biber
+;; documentation.
+(define-public biber-2.5
+  (package (inherit biber)
+    (name "biber")
+    (version "2.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/plk/biber/archive/v"
+                                  version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "163sd343wkrzwnvj2003m2j0kz517jmjr4savw6f8bjxhj8fdrqv"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments biber)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-before 'check 'delete-failing-test
+             (lambda _
+               (delete-file "t/sort-order.t")
+               #t))))))
+    (inputs
+     `(("perl-date-simple" ,perl-date-simple)
+       ,@(package-inputs biber)))))
 
 (define-public rubber
   (package
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
new file mode 100644
index 0000000000..4e2324dbea
--- /dev/null
+++ b/gnu/packages/text-editors.scm
@@ -0,0 +1,77 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 José Miguel Sánchez García <jmi2k@openmailbox.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/>.
+
+(define-module (gnu packages text-editors)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix utils)
+  #:use-module (guix build-system gnu)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages lua)
+  #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages terminals))
+
+(define-public vis
+  (package
+    (name "vis")
+    (version "0.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/martanne/"
+                                  name "/archive/v" version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32 "0bbmkblpndc53pvr8xcfywdn8g351yxfj8c46zp5d744c3bq2nry"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags '("CFLAGS=-pie")
+       #:tests? #f ; No tests.
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'wrap-binary
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (lpeg (assoc-ref inputs "lua-lpeg"))
+                    (lua-version ,(version-major+minor (package-version lua)))
+                    (LUA_PATH (string-append lpeg "/share/lua/"
+                                             lua-version "/?.lua"))
+                    (LUA_CPATH (string-append lpeg "/lib/lua/"
+                                              lua-version "/?.so")))
+               (wrap-program (string-append out "/bin/vis")
+                 `("LUA_PATH" ":" prefix (,LUA_PATH))
+                 `("LUA_CPATH" ":" prefix (,LUA_CPATH)))
+               #t))))))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "VIS_PATH")
+            (files '("share/vis")))))
+    (inputs `(("lua", lua)
+              ("ncurses", ncurses)
+              ("libtermkey", libtermkey)
+              ("lua-lpeg", lua-lpeg)))
+    (synopsis "Vim-like text editor")
+    (description
+     "Vis aims to be a modern, legacy free, simple yet efficient vim-like text
+editor.  It extends vim's modal editing with built-in support for multiple
+cursors/selections and combines it with sam's structural regular expression
+based command language.")
+    (home-page "https://github.com/martanne/vis")
+    (license (list license:isc               ; Main distribution.
+                   license:public-domain     ; map.[ch]
+                   license:expat))))         ; lexers and libutf.[ch]
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index 4c19ebe3a4..111942ab1f 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -354,7 +354,7 @@ required structures.")
   (package
     (inherit openssl)
     (name "openssl")
-    (version "1.1.0b")
+    (version "1.1.0c")
     (source (origin
              (method url-fetch)
              (uri (list (string-append "ftp://ftp.openssl.org/source/"
@@ -365,7 +365,7 @@ required structures.")
               (patches (search-patches "openssl-1.1.0-c-rehash-in.patch"))
               (sha256
                (base32
-                "1xznrqvb1dbngv2k2nb6da6fdw00c01sy2i36yjdxr4vpxrf0pd4"))))
+                "1xfn5ydl14myd9wgxm4nxy5a42cpp1g12ijf3g9m4mz0l90n8hzw"))))
     (outputs '("out"
                "doc"        ;1.3MiB of man3 pages
                "static"))   ; 5.5MiB of .a files
@@ -376,13 +376,42 @@ required structures.")
            (delete 'patch-tests)          ; These two phases are not needed by
            (delete 'patch-Makefile.org)   ; OpenSSL 1.1.0.
 
-           (add-after 'configure 'patch-runpath
+           ;; Override configure phase since -rpath is now a configure option.
+           (replace 'configure
              (lambda* (#:key outputs #:allow-other-keys)
-               (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
-                 (substitute* "Makefile.shared"
-                   (("\\$\\$\\{SHAREDCMD\\} \\$\\$\\{SHAREDFLAGS\\}")
-                    (string-append "$${SHAREDCMD} $${SHAREDFLAGS}"
-                                   " -Wl,-rpath," lib)))
+               (let* ((out (assoc-ref outputs "out"))
+                      (lib (string-append out "/lib")))
+                 (zero?
+                  (system* "./config"
+                           "shared"                   ;build shared libraries
+                           "--libdir=lib"
+
+                           ;; The default for this catch-all directory is
+                           ;; PREFIX/ssl.  Change that to something more
+                           ;; conventional.
+                           (string-append "--openssldir=" out
+                                          "/share/openssl-" ,version)
+
+                           (string-append "--prefix=" out)
+                           (string-append "-Wl,-rpath," lib)
+
+                           ;; XXX FIXME: Work around a code generation bug in GCC
+                           ;; 4.9.3 on ARM when compiled with -mfpu=neon.  See:
+                           ;; <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66917>
+                           ,@(if (and (not (%current-target-system))
+                                      (string-prefix? "armhf" (%current-system)))
+                                 '("-mfpu=vfpv3")
+                                 '()))))))
+
+           ;; XXX: Duplicate this phase to make sure 'version' evaluates
+           ;; in the current scope and not the inherited one.
+           (replace 'remove-miscellany
+             (lambda* (#:key outputs #:allow-other-keys)
+               ;; The 'misc' directory contains random undocumented shell and Perl
+               ;; scripts.  Remove them to avoid retaining a reference on Perl.
+               (let ((out (assoc-ref outputs "out")))
+                 (delete-file-recursively (string-append out "/share/openssl-"
+                                                         ,version "/misc"))
                  #t)))))))))
 
 (define-public libressl
@@ -436,15 +465,6 @@ security, and applying best practice development processes.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (add-before 'install 'disable-egg-compression
-           (lambda _
-             ;; Do not compress the egg.
-             ;; See <http://bugs.gnu.org/20765>.
-             (let ((port (open-file "setup.cfg" "a")))
-               (display "\n[easy_install]\nzip_ok = 0\n"
-                        port)
-               (close-port port)
-               #t)))
          (add-after 'install 'docs
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
@@ -461,7 +481,6 @@ security, and applying best practice development processes.")
        ("python-sphinx" ,python-sphinx)
        ("python-sphinxcontrib-programoutput" ,python-sphinxcontrib-programoutput)
        ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
-       ("python-setuptools" ,python-setuptools)
        ("texinfo" ,texinfo)))
     (propagated-inputs
      `(("python-ndg-httpsclient" ,python-ndg-httpsclient)
@@ -680,7 +699,7 @@ number generator")
 (define-public acme-client
   (package
     (name "acme-client")
-    (version "0.1.14")
+    (version "0.1.15")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://kristaps.bsd.lv/" name "/"
@@ -688,7 +707,7 @@ number generator")
                                   version ".tgz"))
               (sha256
                (base32
-                "1qq4xk41pn65m3v7nnvkmxg96pr06vz6hzdrm0vcmlp3clzpbahl"))))
+                "07p723391whrswl4rir0l1k03l457sjscnj0cfaxr8mfnkx4y3wi"))))
     (build-system gnu-build-system)
     (arguments
      '(#:tests? #f ; no test suite
@@ -697,7 +716,16 @@ number generator")
              (string-append "PREFIX=" (assoc-ref %outputs "out")))
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'patch-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((pem (string-append (assoc-ref inputs "libressl")
+                                       "/etc/ssl/cert.pem")))
+               (substitute* "http.c"
+                 (("/etc/ssl/cert.pem") pem))
+               #t)))
          (delete 'configure)))) ; no './configure' script
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
     (inputs
      `(("libbsd" ,libbsd)
        ("libressl" ,libressl)))
diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm
index e6fbf6e005..6f26f404be 100644
--- a/gnu/packages/tor.scm
+++ b/gnu/packages/tor.scm
@@ -39,14 +39,14 @@
 (define-public tor
   (package
     (name "tor")
-    (version "0.2.8.9")
+    (version "0.2.9.8")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://dist.torproject.org/tor-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "05jkvhbgyq81fcmk1xpl3yw97ljj5sg9pngl27zlmgl7p0xjfp1z"))))
+               "0sklgmx4nikcfhqd606kvpwy1l8840w24ikli1xjjx25739k7pgv"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("python" ,python-2)))  ; for tests
@@ -54,9 +54,6 @@
      `(("zlib" ,zlib)
        ("openssl" ,openssl)
        ("libevent" ,libevent)))
-
-    ;; TODO: Recommend `torsocks' since `torify' needs it.
-
     (home-page "https://www.torproject.org/")
     (synopsis "Anonymous network router to improve privacy on the Internet")
     (description
@@ -66,7 +63,12 @@ somebody watching your Internet connection from learning what sites you
 visit, and it prevents the sites you visit from learning your physical
 location.  Tor works with many of your existing applications, including
 web browsers, instant messaging clients, remote login, and other
-applications based on the TCP protocol.")
+applications based on the TCP protocol.
+
+To @code{torify} applications (to take measures to ensure that an application,
+which has not been designed for use with Tor such as ssh, will use only Tor for
+internet connectivity, and also ensures that there are no leaks from DNS, UDP or
+the application layer) you need to install @code{torsocks}.")
     (license bsd-3)))
 
 (define-public torsocks
@@ -138,7 +140,7 @@ networks.")
 (define-public onionshare
   (package
     (name "onionshare")
-    (version "0.9")
+    (version "0.9.2")
     (source
       (origin
         (method url-fetch)
@@ -147,8 +149,7 @@ networks.")
         (file-name (string-append name "-" version ".tar.gz"))
         (sha256
          (base32
-          "0pc3xbq379415s0i0y6rz02hay20zbvgra1jmg4mgrl9vbdr8zmw"))
-        (patches (search-patches "onionshare-fix-install-paths.patch"))))
+          "02iv7dg15da57gy3zvfchnwwpr21n1gva7mqwpwr958ni2034smk"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -157,25 +158,17 @@ networks.")
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out        (assoc-ref outputs "out"))
                     (onionshare (string-append out "/share/onionshare")))
-               (substitute*
-                 "install/pyinstaller.spec"
-                 ;; inform onionshare where the 'resources' files are installed
-                 (("../resources") onionshare))
-               (substitute*
-                 "onionshare/strings.py"
+               (substitute* "onionshare/strings.py"
                  ;; correct the locale directory
                  (("helpers.get_resource_path\\('locale'\\)")
                   (string-append "'" onionshare "/locale'")))
-               (substitute*
-                 "onionshare/helpers.py"
+               (substitute* "onionshare/helpers.py"
                  ;; correct the location of version.txt
-                 (("/usr") out)
                  (("get_resource_path\\('version.txt'\\)")
                   (string-append "'" onionshare "/version.txt'"))
                  (("get_resource_path\\('wordlist.txt'\\)")
                   (string-append "'" onionshare "/wordlist.txt'")))
-               (substitute*
-                 "onionshare/web.py"
+               (substitute* "onionshare/web.py"
                  ;; fix the location of the html files
                  (("helpers.get_resource_path\\('html/denied.html'\\)")
                   (string-append "'" onionshare "/html/denied.html'"))
@@ -183,36 +176,33 @@ networks.")
                   (string-append "'" onionshare "/html/404.html'"))
                  (("helpers.get_resource_path\\('html/index.html'\\)")
                   (string-append "'" onionshare "/html/index.html'")))
-               (substitute*
-                 "onionshare_gui/file_selection.py"
+               (substitute* "onionshare_gui/file_selection.py"
+                 ;; fancy box image in the GUI
                  (("helpers.get_resource_path\\('images/drop_files.png'\\)")
                   (string-append "'" onionshare "/images/drop_files.png'")))
-               (substitute*
-                 "onionshare_gui/server_status.py"
+               (substitute* "onionshare_gui/server_status.py"
                  (("helpers.get_resource_path\\('images/server_stopped.png'\\)")
                   (string-append "'" onionshare "/images/server_stopped.png'"))
                  (("helpers.get_resource_path\\('images/server_working.png'\\)")
                   (string-append "'" onionshare "/images/server_working.png'"))
                  (("helpers.get_resource_path\\('images/server_started.png'\\)")
                   (string-append "'" onionshare "/images/server_started.png'")))
-               (substitute*
-                 "onionshare_gui/onionshare_gui.py"
+               (substitute* "onionshare_gui/onionshare_gui.py"
+                  ;; for the icon on the GUI
                  (("helpers.get_resource_path\\('images/logo.png'\\)")
                   (string-append "'" onionshare "/images/logo.png'")))
-               (substitute*
-                 "install/onionshare.desktop"
-                 (("/usr") out))
+               (substitute* '("setup.py" "onionshare/helpers.py")
+                 (("sys.prefix,") (string-append "'" out "',")))
+               (substitute* "setup.py"
+                 ;; for the nautilus plugin
+                 (("/usr/share/nautilus") "share/nautilus"))
              #t)))
          (delete 'check)
          (add-before 'strip 'tests
            ;; After all the patching we run the tests after installing.
            ;; This is also a known issue:
            ;; https://github.com/micahflee/onionshare/issues/284
-           (lambda _ (zero? (system* "nosetests" "test")))))
-       ;; can't compress the egg because it expects to find all the resources
-       ;; inside the egg as though it were a folder.
-       #:configure-flags '("--single-version-externally-managed" "--root=/")
-       ))
+           (lambda _ (zero? (system* "nosetests" "test")))))))
     (native-inputs
      `(("python-nose" ,python-nose)))
     (inputs
diff --git a/gnu/packages/unrtf.scm b/gnu/packages/unrtf.scm
index 162dec7525..e11c9445ca 100644
--- a/gnu/packages/unrtf.scm
+++ b/gnu/packages/unrtf.scm
@@ -23,6 +23,7 @@
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (guix gexp)
+  #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages base))
@@ -35,6 +36,7 @@
              (method url-fetch)
              (uri (string-append "mirror://gnu/unrtf/unrtf-"
                                  version ".tar.gz"))
+             (patches (search-patches "unrtf-CVE-2016-10091.patch"))
              (sha256
               (base32
                "1pcdzf2h1prn393dkvg93v80vh38q0v817xnbwrlwxbdz4k7i8r2"))
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index e06a611164..7918b90ca6 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -112,14 +112,14 @@ as well as the classic centralized workflow.")
 (define-public git
   (package
    (name "git")
-   (version "2.10.2")
+   (version "2.11.0")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://kernel.org/software/scm/git/git-"
                                 version ".tar.xz"))
             (sha256
              (base32
-              "0wc64dzcxrzgi6kwcljz6y3cwm3ajdgf6aws7g58azbhvl1jk04l"))))
+              "02zx368id8rys0bh2sjrxz0ln2l2wm5nf1vhp1rj72clsilqszky"))))
    (build-system gnu-build-system)
    (native-inputs
     `(("native-perl" ,perl)
@@ -132,7 +132,7 @@ as well as the classic centralized workflow.")
                 version ".tar.xz"))
           (sha256
            (base32
-            "0vxaz23vf3ki0q5zgn6mxr9x1hjryqn1hsmgyrgdk6h3yqbs7c43"))))))
+            "1n18jnpi0z3skwc1ckrm7zdld6i3zvn0g95cg9r9pdn0564fglxk"))))))
    (inputs
     `(("curl" ,curl)
       ("expat" ,expat)
@@ -141,6 +141,9 @@ as well as the classic centralized workflow.")
       ("python" ,python-2) ; CAVEAT: incompatible with python-3 according to INSTALL
       ("zlib" ,zlib)
 
+      ;; For 'gitweb.cgi'
+      ("perl-cgi" ,perl-cgi)
+
       ;; For 'git-svn'.
       ("subversion" ,subversion)
       ("perl-term-readkey" ,perl-term-readkey)
@@ -257,6 +260,17 @@ as well as the classic centralized workflow.")
                                    "perl-net-smtp-ssl"
                                    "perl-io-socket-ssl")))))))
 
+              ;; Tell 'gitweb.cgi' where perl modules are.
+              (wrap-program (string-append out "/share/gitweb/gitweb.cgi")
+                `("PERL5LIB" ":" prefix
+                  ,(map (lambda (o) (string-append o "/lib/perl5/site_perl"))
+                        (list
+                         ,@(transitive-input-references
+                            'inputs
+                            (map (lambda (l)
+                                   (assoc l (inputs)))
+                                 '("perl-cgi")))))))
+
               ;; Tell 'git-submodule' where Perl is.
               (wrap-program git-sm
                 `("PATH" ":" prefix
@@ -670,14 +684,14 @@ property manipulation.")
 (define-public subversion
   (package
     (name "subversion")
-    (version "1.8.16")
+    (version "1.8.17")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://archive.apache.org/dist/subversion/"
                                  "subversion-" version ".tar.bz2"))
              (sha256
               (base32
-               "0imkxn25n6sbcgfldrx4z29npjprb1lxjm5fb89q4297161nx3zi"))))
+               "1450fkj1jmxyphqn6cd95z1ykwsabajm9jw4i412qpwss8w9a4fy"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases
@@ -691,7 +705,8 @@ property manipulation.")
              ;; nice if this fix ultimately made its way into libtool.
              (let ((coreutils (assoc-ref inputs "coreutils")))
                (substitute* "libtool"
-                 (("\\\\`ls") (string-append "\\`" coreutils "/bin/ls"))))))
+                 (("\\\\`ls") (string-append "\\`" coreutils "/bin/ls")))
+               #t)))
          (add-after 'install 'install-perl-bindings
            (lambda* (#:key outputs #:allow-other-keys)
              ;; Follow the instructions from 'subversion/bindings/swig/INSTALL'.
@@ -874,16 +889,14 @@ large, complex patch files.")
 (define-public cssc
   (package
     (name "cssc")
-    (version "1.3.0")
+    (version "1.4.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/" name "/CSSC-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0bkw6fjh20ppvn54smv05461lm1vcwvn02avx941c4acafmkl1cm"))
-              (patches (search-patches "cssc-gets-undeclared.patch"
-                                       "cssc-missing-include.patch"))))
+                "15191dh8hr46cvssmv4v52gymiiyk6ca9j1bfimlqakcqab6y51h"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -1156,8 +1169,7 @@ Mercurial, Bazaar, Darcs, CVS, Fossil, and Veracity.")
     (build-system python-build-system)
     (arguments `(#:python ,python-2))
     (native-inputs
-     `(("python2-setuptools" ,python2-setuptools)
-       ;; for the tests
+     `(;; for the tests
        ("python2-six" ,python2-six)))
     (propagated-inputs
      `(("python2-dateutil" ,python2-dateutil-2)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 3b93f27426..b9f2d69100 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2014, 2015, 2016 David Thompson <davet@gnu.org>
 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
-;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015, 2016 Alex Vong <alexvong1995@gmail.com>
@@ -13,6 +13,7 @@
 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -212,14 +213,14 @@ television and DVD.  It is also known as AC-3.")
 (define-public libx264
   (package
     (name "libx264")
-    (version "20160220-2245")
+    (version "20161205-2245")
     (source (origin
               (method url-fetch)
-              (uri (string-append "http://download.videolan.org/pub/x264/snapshots/"
+              (uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
                                   "x264-snapshot-" version ".tar.bz2"))
               (sha256
                (base32
-                "12zyzbiihfhamf7yi4qqaj6k0nisnrydvfr36kxadvmsm7dg4sj3"))))
+                "0jjzdwag59kqlk09bb2pykm1ss8bw3p9q7bsks2kjgdwbj121a44"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
@@ -245,7 +246,7 @@ television and DVD.  It is also known as AC-3.")
                                                      (%current-system)))
                                  '("--disable-asm")
                                  '()))))
-    (home-page "http://www.videolan.org/developers/x264.html")
+    (home-page "https://www.videolan.org/developers/x264.html")
     (synopsis "H.264 video coding library")
     (description "libx264 is an advanced encoding library for creating
 H.264 (MPEG-4 AVC) video streams.")
@@ -441,14 +442,14 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
 (define-public ffmpeg
   (package
     (name "ffmpeg")
-    (version "3.2.1")
+    (version "3.2.2")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1pxsy9s9n2nvz970rid3j3b45w6s7ziwnrbc16rny7k0bpd97kqy"))))
+               "1z7d5y5crhsl5fm74236rdwbkd4jj5frx1l4iizjfym1w4gvs09z"))))
     (build-system gnu-build-system)
     (inputs
      `(("fontconfig" ,fontconfig)
@@ -609,14 +610,14 @@ audio/video codec library.")
 (define-public ffmpeg-2.8
   (package
     (inherit ffmpeg)
-    (version "2.8.8")
+    (version "2.8.10")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1691bmq8j56rcys09xwvzjq16z25m8vczj5a50gdn7ydm9qjykpr"))))
+               "1ca84kc715xm7wmbnj1z4jfhxj8c7rxhy4cqwrd8cnih0l196j1c"))))
     (arguments
      (substitute-keyword-arguments (package-arguments ffmpeg)
        ((#:configure-flags flags)
@@ -833,7 +834,7 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
 (define-public mpv
   (package
     (name "mpv")
-    (version "0.22.0")
+    (version "0.23.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -841,11 +842,11 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
                     ".tar.gz"))
               (sha256
                (base32
-                "1xl2a0nfbkcq00f41m50fmfz9hl7hzpk7cq7j38r38rp1s7sryf0"))
+                "1629v5l0rmphxra7chmfm7bnn59zc1mp529b9m2zqzaqf1czxvla"))
               (file-name (string-append name "-" version ".tar.gz"))))
     (build-system waf-build-system)
     (native-inputs
-     `(("perl" ,perl)
+     `(("perl" ,perl) ; for zsh completion file
        ("pkg-config" ,pkg-config)
        ("python-docutils" ,python-docutils)))
     ;; Missing features: libguess, Wayland, V4L2
@@ -969,7 +970,7 @@ access to mpv's powerful playback capabilities.")
 (define-public youtube-dl
   (package
     (name "youtube-dl")
-    (version "2016.10.16")
+    (version "2016.12.15")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://youtube-dl.org/downloads/"
@@ -977,7 +978,7 @@ access to mpv's powerful playback capabilities.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0q6cxbp1xx8xmwn3xbxh6gcbgqjxy3slzfca4dbkk9xl2yy9rwqg"))))
+                "17m3dimgpn6139w95drc7zncfx2mskjx45qvmj74zhdqxnk3gnc5"))))
     (build-system python-build-system)
     (arguments
      ;; The problem here is that the directory for the man page and completion
@@ -1398,7 +1399,7 @@ from various services and pipes them into a video playing application.")
 (define-public mlt
   (package
     (name "mlt")
-    (version "6.2.0")
+    (version "6.4.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/mltframework/mlt/"
@@ -1406,7 +1407,7 @@ from various services and pipes them into a video playing application.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "1zwzfgxrcbwkxnkiwv0a1rzxdnnaly90yyarl9wdw84nx11ffbnx"))))
+                "10m3ry0b2pvqx3bk34qh5dq337nn8pkc2gzfyhsj4nv9abskln47"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ; no tests
@@ -1830,3 +1831,31 @@ supported players in addition to this package.")
 of modern, widely supported codecs.")
     ;; Most under GPL version 2 or later, and portions under BSD 3 Clause
     (license (list license:gpl2+ license:bsd-3))))
+
+(define-public openh264
+  (package
+    (name "openh264")
+    (version "1.6.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/cisco/"
+                                  name "/archive/v" version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1ix2fhk62i4q4kbnkl0gfk4x53vxqavsn0pck1pashr566zhglv5"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("nasm" ,nasm)
+       ("python" ,python)))
+    (arguments
+     '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
+       #:test-target "test"
+       #:phases (modify-phases %standard-phases
+                  ;; no configure script
+                  (delete 'configure))))
+    (home-page "http://www.openh264.org/")
+    (synopsis "H264 decoder library")
+    (description
+     "Openh264 is a library which can decode H264 video streams.")
+    (license license:bsd-2)))
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 83c21249b4..0c359967d9 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -49,7 +49,7 @@
 (define-public vim
   (package
     (name "vim")
-    (version "8.0.0101")
+    (version "8.0.0133")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://github.com/vim/vim/archive/v"
@@ -57,7 +57,7 @@
              (file-name (string-append name "-" version ".tar.gz"))
              (sha256
               (base32
-               "0kzk1p5vnqr8j5jwb3p745zx3dki5jwlsp7rh6nli0ci2w6vg3r8"))))
+               "1965lb3sq378kz2fxb5swi442bdvzj416znvslb7saapqx3pjj51"))))
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index 6d50304307..0ce51aaf88 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -3,7 +3,8 @@
 ;;; Copyright © 2013, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
-;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -25,6 +26,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system python)
   #:use-module (gnu packages)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages gettext)
@@ -32,6 +34,7 @@
   #:use-module (gnu packages linux)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages xml))
 
@@ -116,13 +119,13 @@ Only \"Universal TUN/TAP device driver support\" is needed in the kernel.")
 (define-public openconnect
   (package
    (name "openconnect")
-   (version "7.07")
+   (version "7.08")
    (source (origin
             (method url-fetch)
             (uri (string-append "ftp://ftp.infradead.org/pub/openconnect/"
                                 "openconnect-" version ".tar.gz"))
             (sha256 (base32
-                     "0rl33f1g42hxzqfv2a33gls8cb77q4w432xkims1dnfwhzagrv7k"))))
+                     "00wacb79l2c45f94gxs63b9z25wlciarasvjrb8jb8566wgyqi0w"))))
    (build-system gnu-build-system)
    (inputs
     `(("libxml2" ,libxml2)
@@ -149,7 +152,7 @@ and probably others.")
 (define-public openvpn
   (package
     (name "openvpn")
-    (version "2.3.9")
+    (version "2.3.14")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -157,7 +160,7 @@ and probably others.")
                     version ".tar.xz"))
               (sha256
                (base32
-                "1hfwmdsp7s34qx34qgwrpp89h30744lbsks6y619cdh27bpnpwaj"))))
+                "167frlmmg2raffn9h7ww3agdwgfdl0wa5wm9fsgl0i6mz3md187k"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags '("--enable-iproute2=yes")))
@@ -201,3 +204,61 @@ traversing network address translators (NATs) and firewalls.")
      "Tinc is a VPN that uses tunnelling and encryption to create a secure
 private network between hosts on the internet.")
     (license license:gpl2+)))
+
+(define-public sshuttle
+  (package
+    (name "sshuttle")
+    (version "0.78.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri name version))
+       (sha256
+        (base32
+         "0g1dpqigz02vafzh84z5990lnj9d95raknav0xmf0va7rr41d9q3"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-pytest-runner" ,python-pytest-runner)
+       ("python-setuptools-scm" ,python-setuptools-scm)
+       ;; For tests only.
+       ("python-mock" ,python-mock)
+       ("python-pytest" ,python-pytest)))
+    (home-page "https://github.com/sshuttle/sshuttle")
+    (synopsis "VPN that transparently forwards connections over SSH")
+    (description "sshuttle creates an encrypted virtual private network (VPN)
+connection to any remote server to which you have secure shell (SSH) access.
+The only requirement is a suitable version of Python on the server;
+administrative privileges are required only on the client.  Unlike most VPNs,
+sshuttle forwards entire sessions, not packets, using kernel transparent
+proxying.  This makes it faster and more reliable than SSH's own tunneling and
+port forwarding features.  It can forward both TCP and UDP traffic, including
+DNS domain name queries.")
+    (license license:lgpl2.0))) ; incorrectly identified as GPL in ‘setup.py’
+
+(define-public sshoot
+  (package
+    (name "sshoot")
+    (version "1.2.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri name version))
+       (sha256
+        (base32
+         "0a92lk8790dpp9j64vb6p4sazax0x3nby01lnfll7mxs1hx6n27q"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python-argcomplete" ,python-argcomplete)
+       ("python-prettytable" ,python-prettytable)
+       ("python-pyyaml" ,python-pyyaml)))
+    ;; For tests only.
+    (native-inputs
+     `(("python-fixtures" ,python-fixtures)
+       ("python-pbr" ,python-pbr)
+       ("python-testtools" ,python-testtools)))
+    (home-page "https://bitbucket.org/ack/sshoot")
+    (synopsis "sshuttle VPN session manager")
+    (description "sshoot provides a command-line interface to manage multiple
+@command{sshuttle} virtual private networks.  It supports flexible profiles
+with configuration options for most of @command{sshuttle}’s features.")
+    (license license:gpl3+)))
diff --git a/gnu/packages/vtk.scm b/gnu/packages/vtk.scm
index 13ce2e2ac0..5a5c941270 100644
--- a/gnu/packages/vtk.scm
+++ b/gnu/packages/vtk.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20,37 +21,64 @@
 (define-module (gnu packages vtk)
   #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module (guix licenses)
+  #:use-module ((guix licenses) #:select (bsd-3))
+  #:use-module (guix utils)
   #:use-module (guix build-system cmake)
   #:use-module (gnu packages)
-  #:use-module (gnu packages xorg)
-  #:use-module (gnu packages gl))
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages gl)
+  #:use-module (gnu packages image)
+  #:use-module (gnu packages maths)
+  #:use-module (gnu packages serialization)
+  #:use-module (gnu packages xiph)
+  #:use-module (gnu packages xml)
+  #:use-module (gnu packages xorg))
 
 (define-public vtk
   (package
     (name "vtk")
-    (version "6.1.0")
+    (version "7.1.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://www.vtk.org/files/release/"
-                                  (substring version 0
-                                             (string-rindex version #\.))
+                                  (version-major+minor version)
                                   "/VTK-" version ".tar.gz"))
               (sha256
                (base32
-                "0d7shccdkyj4mbh2riilslgx3gd28in4c7xpm0lxa1ln8w5g2zdx"))
-              (patches (search-patches "vtk-mesa-10.patch"))))
+                "0yj96z58haan77gzilnqp7xpf8hg5jk11a3jx55p2ksd400s0gjz"))))
     (build-system cmake-build-system)
     (arguments
-     ;; Build without '-g' to save space.
-     '(#:configure-flags '("-DCMAKE_BUILD_TYPE=Release")
+     '(#:build-type "Release"           ;Build without '-g' to save space.
+       ;; -DVTK_USE_SYSTEM_NETCDF:BOOL=TRUE requires netcdf_cxx
+       #:configure-flags '("-DVTK_USE_SYSTEM_EXPAT:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_FREETYPE:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_HDF5:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_JPEG:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_JSONCPP:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_LIBXML2:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_OGGTHEORA:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_PNG:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_TIFF:BOOL=TRUE"
+                           "-DVTK_USE_SYSTEM_ZLIB:BOOL=TRUE")
        #:tests? #f))                              ;XXX: no "test" target
     (inputs
      `(("libXt" ,libxt)
        ("xproto" ,xproto)
        ("libX11" ,libx11)
+       ("libxml2" ,libxml2)
        ("mesa" ,mesa)
-       ("glu" ,glu)))
+       ("glu" ,glu)
+       ("expat" ,expat)
+       ("freetype" ,freetype)
+       ("hdf5" ,hdf5)
+       ("jpeg" ,libjpeg)
+       ("jsoncpp" ,jsoncpp)
+       ("libogg" ,libogg)
+       ("libtheora" ,libtheora)
+       ("png" ,libpng)
+       ("tiff" ,libtiff)
+       ("zlib" ,zlib)))
     (home-page "http://www.vtk.org/")
     (synopsis "Libraries for 3D computer graphics")
     (description
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 753a81625c..5901e0ef6d 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -16,6 +16,7 @@
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2016 Bake Timmons <b3timmons@speedymail.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -62,6 +63,7 @@
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gnupg)
   #:use-module (gnu packages gperf)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages icu4c)
@@ -92,7 +94,9 @@
                                  version ".tar.bz2"))
              (sha256
               (base32
-               "0n2yx3gjlpr4kgqx845fj6amnmg25r2l6a7rzab5hxnpmar985hc"))))
+               "0n2yx3gjlpr4kgqx845fj6amnmg25r2l6a7rzab5hxnpmar985hc"))
+             (patches (search-patches "httpd-CVE-2016-8740.patch"))
+             (patch-flags '("-p0"))))
     (build-system gnu-build-system)
     (native-inputs `(("pcre" ,pcre "bin")))       ;for 'pcre-config'
     (inputs `(("apr" ,apr)
@@ -201,6 +205,68 @@ and as a proxy to reduce the load on back-end HTTP or mail servers.")
     ;;     except for two source files which are bsd-4 licensed.
     (license (list l:bsd-2 l:expat l:bsd-3 l:bsd-4))))
 
+(define-public fcgi
+  (package
+    (name "fcgi")
+    (version "2.4.0")
+    (source
+     (origin
+       (method url-fetch)
+       ;; Upstream has disappeared
+       (uri (string-append "https://sources.archlinux.org/other/packages/fcgi/"
+                           "fcgi-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1f857wnl1d6jfrgfgfpz3zdaj8fch3vr13mnpcpvy8bang34bz36"))
+       (patches (search-patches "fcgi-2.4.0-poll.patch"
+                                "fcgi-2.4.0-gcc44-fixes.patch"))))
+    (build-system gnu-build-system)
+    ;; Parallel building is not supported.
+    (arguments `(#:parallel-build? #f))
+    (home-page "http://www.fastcgi.com")
+    (synopsis "Language-independent, high-performant extension to CGI")
+    (description "FastCGI is a language independent, scalable extension to CGI
+that provides high performance without the limitations of server specific
+APIs.")
+    ;; This package is released under the Open Market License, a variant of
+    ;; the Expat license, incompatible with the GPL.
+    (license (l:non-copyleft "file://LICENSE.TERMS"))))
+
+(define-public fcgiwrap
+  (package
+    (name "fcgiwrap")
+    (version "1.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/gnosek/fcgiwrap/"
+                           "archive/" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "07y6s4mm86cv7p1ljz94sxnqa89y9amn3vzwsnbq5hrl4vdy0zac"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; no tests included
+       #:make-flags (list "CC=gcc")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'bootstrap
+           (lambda _
+             (zero? (system* "autoreconf" "-vif")))))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("fcgi" ,fcgi)))
+    (home-page "https://nginx.localdomain.pl/wiki/FcgiWrap")
+    (synopsis "Simple server for running CGI applications over FastCGI")
+    (description "Fcgiwrap is a simple server for running CGI applications
+over FastCGI.  It hopes to provide clean CGI support to Nginx (and other web
+servers that may need it).")
+    (license l:expat)))
+
 (define-public starman
   (package
     (name "starman")
@@ -461,7 +527,7 @@ for efficient socket-like bidirectional reliable communication channels.")
 (define-public libpsl
   (package
     (name "libpsl")
-    (version "0.15.0")
+    (version "0.16.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/rockdaboot/libpsl/"
@@ -469,7 +535,7 @@ for efficient socket-like bidirectional reliable communication channels.")
                                   "/libpsl-" version ".tar.gz"))
               (sha256
                (base32
-                "0wm9i3qshfdasd5s5nrdihl4f5c6zrd1nkqrqjnh7zhhv1an755m"))))
+                "1srrd0iyz9p5xgl8q0hrzqg7p8cl9ar0cdb8f54hls4kllf3f80l"))))
     (build-system gnu-build-system)
     (inputs
      `(("icu4c" ,icu4c)
@@ -604,6 +670,34 @@ server).  It was primarily designed to be used by one person or a small group
 of people.")
     (license l:expat)))
 
+(define-public wwwoffle
+  (package
+    (name "wwwoffle")
+    (version "2.9j")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://www.gedanken.org.uk/software/"
+                                  "wwwoffle/download/wwwoffle-"
+                                  version ".tgz"))
+              (sha256
+               (base32
+                "1ihil1xq9dp21hf108khxbw6f3baq0w5c0j3af038y6lkmad4vdi"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags '("--with-gnutls")
+       #:tests? #f))                         ; no test target
+    (native-inputs `(("flex" ,flex)))
+    (inputs `(("gnutls" ,gnutls)
+              ("libcrypt", libgcrypt)))
+    (home-page "https://www.gedanken.org.uk/software/wwwoffle/")
+    (synopsis "Caching web proxy optimized for intermittent internet links")
+    (description "WWWOFFLE is a proxy web server that is especially good for
+intermittent internet links.  It can cache HTTP, HTTPS, FTP, and finger
+protocols, and supports browsing and requesting pages while offline, indexing,
+modifying pages and incoming and outgoing headers, monitoring pages for
+changes, and much more.")
+    (license l:gpl2+)))
+
 (define-public libyaml
   (package
     (name "libyaml")
@@ -827,7 +921,7 @@ language known as SASS.")
 (define-public perl-apache-logformat-compiler
   (package
     (name "perl-apache-logformat-compiler")
-    (version "0.32")
+    (version "0.33")
     (source
      (origin
        (method url-fetch)
@@ -835,7 +929,7 @@ language known as SASS.")
                            "Apache-LogFormat-Compiler-" version ".tar.gz"))
        (sha256
         (base32
-         "0zyx4r2bxc6d48m70fhcq80nw0q9wnfz6qgn1g0r6bigqgdjq4dw"))))
+         "17blk3zhp05azgypn25ydxf3d7fyfgr9bxyiv7xkchhqma96vwqv"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-http-message" ,perl-http-message)
@@ -902,26 +996,29 @@ action, which will forward to the first available view.")
 (define-public perl-catalyst-action-rest
   (package
     (name "perl-catalyst-action-rest")
-    (version "1.17")
+    (version "1.20")
     (source (origin
               (method url-fetch)
-              (uri (string-append "mirror://cpan/authors/id/F/FR/FREW/"
+              (uri (string-append "mirror://cpan/authors/id/J/JJ/JJNAPIORK/"
                                   "Catalyst-Action-REST-" version ".tar.gz"))
               (sha256
                (base32
-                "1rnxmsd9dsqz4xc0g9ynafxi934jwp0nixbg92q3bc2h46xcccy8"))))
+                "1mpa64p61f3dp24xnhdraswch4sqj5vyv1iivcvvh5h0xi0haiy0"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-test-requires" ,perl-test-requires)))
     (propagated-inputs
      `(("perl-catalyst-runtime" ,perl-catalyst-runtime)
        ("perl-class-inspector" ,perl-class-inspector)
+       ("perl-config-general" ,perl-config-general)
+       ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
        ("perl-libwww" ,perl-libwww)
        ("perl-moose" ,perl-moose)
        ("perl-mro-compat" ,perl-mro-compat)
        ("perl-namespace-autoclean" ,perl-namespace-autoclean)
        ("perl-params-validate" ,perl-params-validate)
-       ("perl-uri-find" ,perl-uri-find)))
+       ("perl-uri-find" ,perl-uri-find)
+       ("perl-xml-simple" ,perl-xml-simple)))
     (home-page "http://search.cpan.org/dist/Catalyst-Action-REST")
     (synopsis "Automated REST Method Dispatching")
     (description "This Action handles doing automatic method dispatching for
@@ -1110,7 +1207,7 @@ Models.")
 (define-public perl-catalyst-plugin-accesslog
   (package
     (name "perl-catalyst-plugin-accesslog")
-    (version "1.05")
+    (version "1.10")
     (source
      (origin
        (method url-fetch)
@@ -1118,14 +1215,13 @@ Models.")
                            "Catalyst-Plugin-AccessLog-" version ".tar.gz"))
        (sha256
         (base32
-         "0hqvckaw91q5yc25a33bp0d4qqxlgkp7rxlvi8n8svxd1406r55s"))))
+         "0811rj45q4v2y8wka3wb9d5m4vbyhcmkvddf2wz4x69awzjbhgc7"))))
     (build-system perl-build-system)
     (propagated-inputs
      `(("perl-catalyst-runtime" ,perl-catalyst-runtime)
        ("perl-datetime" ,perl-datetime)
        ("perl-moose" ,perl-moose)
        ("perl-namespace-autoclean" ,perl-namespace-autoclean)))
-    (arguments `(#:tests? #f))          ;Unexpected http responses
     (home-page "http://search.cpan.org/dist/Catalyst-Plugin-AccessLog")
     (synopsis "Request logging from within Catalyst")
     (description "This Catalyst plugin enables you to create \"access logs\"
@@ -1251,7 +1347,7 @@ formats.")
 (define-public perl-catalyst-plugin-session
   (package
     (name "perl-catalyst-plugin-session")
-    (version "0.39")
+    (version "0.40")
     (source
      (origin
        (method url-fetch)
@@ -1259,7 +1355,7 @@ formats.")
                            "Catalyst-Plugin-Session-" version ".tar.gz"))
        (sha256
         (base32
-         "0m4a003qgz7848iyckwbigg2vw3kmfxggh1razrnzxrbz3n6x5gi"))))
+         "171vi9xcl775scjaw4fcfdmqvz0rb1nr0xxg2gb3ng6bjzpslhgv"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-test-deep" ,perl-test-deep)
@@ -1269,6 +1365,7 @@ formats.")
        ("perl-moose" ,perl-moose)
        ("perl-moosex-emulate-class-accessor-fast"
         ,perl-moosex-emulate-class-accessor-fast)
+       ("perl-mro-compat" ,perl-mro-compat)
        ("perl-namespace-clean" ,perl-namespace-clean)
        ("perl-object-signature" ,perl-object-signature)
        ("perl-test-www-mechanize-psgi" ,perl-test-www-mechanize-psgi)))
@@ -1517,7 +1614,7 @@ table based report in a variety of formats (CSV, HTML, etc.).")
 (define-public perl-catalyst-view-json
   (package
     (name "perl-catalyst-view-json")
-    (version "0.35")
+    (version "0.36")
     (source
      (origin
        (method url-fetch)
@@ -1525,7 +1622,7 @@ table based report in a variety of formats (CSV, HTML, etc.).")
                            "Catalyst-View-JSON-" version ".tar.gz"))
        (sha256
         (base32
-         "184pyghlrkl7p387bnyvswi2d9myvdg4v3lax6xrd59shskvpmkm"))))
+         "0x943j1n2r0zqanyzdrs1xsnn8ayn2wqskn7h144xcqa6v6gcisl"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-yaml" ,perl-yaml)))
@@ -1542,19 +1639,20 @@ stash data in JSON format.")
 (define-public perl-catalyst-view-tt
   (package
     (name "perl-catalyst-view-tt")
-    (version "0.42")
+    (version "0.44")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "mirror://cpan/authors/id/J/JJ/JJNAPIORK/"
+       (uri (string-append "mirror://cpan/authors/id/E/ET/ETHER/"
                            "Catalyst-View-TT-" version ".tar.gz"))
      (sha256
       (base32
-       "18ciik9fqaqjfasa9wicbjrsl3gjhjc15xzaj3rif57an25cl178"))))
+       "06d1zg4nbb6kcyjbnyxrkf8z4zlscxr8650d94f7187jygfl8rvh"))))
   (build-system perl-build-system)
   (propagated-inputs
    `(("perl-catalyst-runtime" ,perl-catalyst-runtime)
      ("perl-class-accessor" ,perl-class-accessor)
+     ("perl-data-dump" ,perl-data-dump)
      ("perl-mro-compat" ,perl-mro-compat)
      ("perl-path-class" ,perl-path-class)
      ("perl-template-timer" ,perl-template-timer)
@@ -1651,7 +1749,7 @@ development server with Starman.")
 (define-public perl-cgi
   (package
     (name "perl-cgi")
-    (version "4.25")
+    (version "4.35")
     (source
      (origin
        (method url-fetch)
@@ -1659,7 +1757,7 @@ development server with Starman.")
                            "CGI-" version ".tar.gz"))
        (sha256
         (base32
-         "06hk9zzvlix1yi95wlkb1ykdxgl6lscm7452gkwr2snsb8iybczg"))))
+         "07gwnlc7vq58fjwmfsrv0hfyirqqdrpjhf89caq34rjrkz2wsd0b"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-test-deep" ,perl-test-deep)
@@ -1768,7 +1866,7 @@ for files and urls.")
 (define-public perl-encode-locale
   (package
     (name "perl-encode-locale")
-    (version "1.03")
+    (version "1.05")
     (source (origin
              (method url-fetch)
              (uri (string-append
@@ -1776,7 +1874,7 @@ for files and urls.")
                    version ".tar.gz"))
              (sha256
               (base32
-               "0m9d1vdphlyzybgmdanipwd9ndfvyjgk3hzw250r299jjgh3fqzp"))))
+               "1h8fvcdg3n20c2yp7107yhdkkx78534s9hnvn7ps8hpmf4ks0vqp"))))
     (build-system perl-build-system)
     (license (package-license perl))
     (synopsis "Perl locale encoding determination")
@@ -1843,7 +1941,7 @@ which can be used to parse directory listings.")
 (define-public perl-finance-quote
   (package
    (name "perl-finance-quote")
-   (version "1.37")
+   (version "1.38")
    (source
     (origin
       (method url-fetch)
@@ -1851,7 +1949,7 @@ which can be used to parse directory listings.")
                           "Finance-Quote-" version ".tar.gz"))
       (sha256
        (base32
-        "1b6pbh7f76fb5sa4f0lhx085xy55pprz5v7z7li7pqiyw7i4f4bf"))
+        "0zhqb27y4vdxn476s2kwm9zl2f970yjcyyybnjm9b406krr2fm59"))
       (patches (search-patches
                 "perl-finance-quote-unuse-mozilla-ca.patch"))))
    (build-system perl-build-system)
@@ -2019,7 +2117,7 @@ representing, creating, and extracting information from HTML syntax trees.")
 (define-public perl-html-parser
   (package
     (name "perl-html-parser")
-    (version "3.71")
+    (version "3.72")
     (source (origin
              (method url-fetch)
              (uri (string-append
@@ -2027,10 +2125,11 @@ representing, creating, and extracting information from HTML syntax trees.")
                    version ".tar.gz"))
              (sha256
               (base32
-               "00nqzdgl7c3jilx7mil19k5jwcw3as14pvkjgxi97zyk94vqp4dy"))))
+               "12v05ywlnsi9lc17z32k9jxx3sj1viy7y1wpl7n4az76v7hwfa7c"))))
     (build-system perl-build-system)
     (inputs
-     `(("perl-html-tagset" ,perl-html-tagset)))
+     `(("perl-html-tagset" ,perl-html-tagset)
+       ("perl-http-message" ,perl-http-message)))
     (license (package-license perl))
     (synopsis "Perl HTML parser class")
     (description
@@ -2089,7 +2188,7 @@ you to separate design from the data.")
 (define-public perl-http-body
   (package
     (name "perl-http-body")
-    (version "1.19")
+    (version "1.22")
     (source
      (origin
        (method url-fetch)
@@ -2097,7 +2196,7 @@ you to separate design from the data.")
                            "HTTP-Body-" version ".tar.gz"))
        (sha256
         (base32
-         "0ahhksj0zg6wq6glpjkxdr3byd5riwvq2f5aw21n1jcsl71nll01"))))
+         "15vj488i62mdp4ps9k77h39prj70i7anb6b0j8nm7l9vbdc2q3gw"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-test-deep" ,perl-test-deep)))
@@ -2114,7 +2213,7 @@ and multipart/form-data.")
 (define-public perl-http-cookiejar
   (package
     (name "perl-http-cookiejar")
-    (version "0.006")
+    (version "0.008")
     (source
      (origin
        (method url-fetch)
@@ -2122,12 +2221,13 @@ and multipart/form-data.")
                            "HTTP-CookieJar-" version ".tar.gz"))
        (sha256
         (base32
-         "0c7l29ak6ba2j006ca00vnkxpyc1fvpikydjvsb24s50zf1mv7b2"))))
+         "0rfw6avcralggs7bf7n86flvhaahxjnqzvpwszp0sk4z4wwy01wm"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-test-deep" ,perl-test-deep)
        ("perl-test-requires" ,perl-test-requires)
-       ("perl-time-mock" ,perl-time-mock)))
+       ("perl-time-mock" ,perl-time-mock)
+       ("perl-uri" ,perl-uri)))
     (inputs
      `(("perl-time-local" ,perl-time-local)
        ("perl-http-date" ,perl-http-date)))
@@ -2207,18 +2307,19 @@ used by the HTTP protocol (and then some more).")
 (define-public perl-http-message
   (package
     (name "perl-http-message")
-    (version "6.06")
+    (version "6.11")
     (source (origin
              (method url-fetch)
              (uri (string-append
-                   "mirror://cpan/authors/id/G/GA/GAAS/HTTP-Message-"
+                   "mirror://cpan/authors/id/E/ET/ETHER/HTTP-Message-"
                    version ".tar.gz"))
              (sha256
               (base32
-               "0qxdrcak97azjvqyx1anpb2ky6vp6vc37x0wcfjdqfajkh09fzh8"))))
+               "06yq6cjx4vzl4if4ykap77xsrrd8aa7ish90k7cqi8g6g83nicz7"))))
     (build-system perl-build-system)
     (propagated-inputs
-     `(("perl-http-date" ,perl-http-date)
+     `(("perl-encode-locale" ,perl-encode-locale)
+       ("perl-http-date" ,perl-http-date)
        ("perl-io-html" ,perl-io-html)
        ("perl-lwp-mediatypes" ,perl-lwp-mediatypes)
        ("perl-uri" ,perl-uri)))
@@ -2226,7 +2327,7 @@ used by the HTTP protocol (and then some more).")
     (synopsis "Perl HTTP style message")
     (description
      "An HTTP::Message object contains some headers and a content body.")
-    (home-page "http://search.cpan.org/~gaas/HTTP-Message/")))
+    (home-page "http://search.cpan.org/~ether/HTTP-Message/")))
 
 (define-public perl-http-negotiate
   (package
@@ -2322,15 +2423,15 @@ environment from an HTTP::Request.")
 (define-public perl-http-server-simple
   (package
     (name "perl-http-server-simple")
-    (version "0.44")
+    (version "0.51")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "mirror://cpan/authors/id/J/JE/JESSE/"
+       (uri (string-append "mirror://cpan/authors/id/B/BP/BPS/"
                            "HTTP-Server-Simple-" version ".tar.gz"))
        (sha256
         (base32
-         "05klpfkss2a6i5ihmvcm27fyar0f2v4ispg2f49agab3va1gix6g"))))
+         "1yvd2g57z2kq00q5i3zzfi15k98qgbif3vghjsda6v612agmrp5r"))))
     (build-system perl-build-system)
     (propagated-inputs
      `(("perl-cgi" ,perl-cgi)))
@@ -2348,7 +2449,7 @@ http-based UI to your existing tools.")
 (define-public perl-http-tiny
   (package
     (name "perl-http-tiny")
-    (version "0.053")
+    (version "0.070")
     (source
      (origin
        (method url-fetch)
@@ -2356,12 +2457,13 @@ http-based UI to your existing tools.")
                            "HTTP-Tiny-" version ".tar.gz"))
        (sha256
         (base32
-         "1bwy31xrcz5zfx1n3vc50vj1aqvzn5ccr7lgacl8wmi03a6w2af2"))))
+         "0cvp5yqrni6qydpsa8fpkbm82zfwmy9js8jsvyj8gs3dx78qbwvl"))))
     (build-system perl-build-system)
     (inputs
      `(("perl-http-cookiejar" ,perl-http-cookiejar)
        ("perl-io-socket-ip" ,perl-io-socket-ip)
        ("perl-io-socket-ssl" ,perl-io-socket-ssl)
+       ("perl-mozilla-ca" ,perl-mozilla-ca)
        ("perl-net-ssleay" ,perl-net-ssleay)))
     (home-page "http://search.cpan.org/dist/HTTP-Tiny")
     (synopsis "HTTP/1.1 client")
@@ -2442,7 +2544,7 @@ select or poll.")
 (define-public perl-libwww
   (package
     (name "perl-libwww")
-    (version "6.13")
+    (version "6.15")
     (source (origin
              (method url-fetch)
              (uri (string-append
@@ -2450,7 +2552,7 @@ select or poll.")
                    version ".tar.gz"))
              (sha256
               (base32
-               "1cpqjl59viw50bnbdyn8xzrwzg7g54b2rszw0fifacqrppp17gaz"))))
+               "08l3mpgcvm4ipn1zggymqgk402apf35xyds43i8c07hvq92rsd3g"))))
     (build-system perl-build-system)
     (propagated-inputs
      `(("perl-encode-locale" ,perl-encode-locale)
@@ -2458,8 +2560,11 @@ select or poll.")
        ("perl-html-parser" ,perl-html-parser)
        ("perl-http-cookies" ,perl-http-cookies)
        ("perl-http-daemon" ,perl-http-daemon)
+       ("perl-http-date" ,perl-http-date)
+       ("perl-http-message" ,perl-http-message)
        ("perl-http-negotiate" ,perl-http-negotiate)
        ("perl-net-http" ,perl-net-http)
+       ("perl-uri" ,perl-uri)
        ("perl-www-robotrules" ,perl-www-robotrules)))
     (license (package-license perl))
     (synopsis "Perl modules for the WWW")
@@ -3172,11 +3277,7 @@ CDF, Atom 0.3, and Atom 1.0 feeds.")
                    l:freebsd-doc)))) ; documentation
 
 (define-public python2-feedparser
-  (let ((base (package-with-python2
-               (strip-python2-variant python-feedparser))))
-    (package (inherit base)
-             (native-inputs
-              `(("python2-setuptools" ,python2-setuptools))))))
+  (package-with-python2 python-feedparser))
 
 (define-public r-httpuv
   (package
@@ -3205,13 +3306,13 @@ particularly easy to create complete web applications using httpuv alone.")
 (define-public r-jsonlite
   (package
     (name "r-jsonlite")
-    (version "1.1")
+    (version "1.2")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "jsonlite" version))
               (sha256
                (base32
-                "0mrfzh0mxxrhqdmxai434wvyd7skkw28vxr7pyls19yrg941g6r3"))))
+                "0k966hzp3qnwck7fgd76w49zrz39s7pqyywws17bhbcd8rh4csyb"))))
     (build-system r-build-system)
     (home-page "http://arxiv.org/abs/1403.2805")
     (synopsis "Robust, high performance JSON parser and generator for R")
@@ -3229,13 +3330,13 @@ in systems and applications.")
 (define-public r-servr
   (package
     (name "r-servr")
-    (version "0.4")
+    (version "0.5")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "servr" version))
               (sha256
                (base32
-                "1fkqf5ynd1g0932qwv5nr70bw42m8vxpc9rhi0qxmdamwqcw8qjn"))))
+                "1ixcl9xjc1k9zvl6v6bsw4kpramr1h53b4s46qg8kahkqy6kqd8a"))))
     (build-system r-build-system)
     (propagated-inputs
      `(("r-httpuv" ,r-httpuv)
@@ -3288,13 +3389,13 @@ directory.")
 (define-public r-htmlwidgets
   (package
     (name "r-htmlwidgets")
-    (version "0.7")
+    (version "0.8")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "htmlwidgets" version))
               (sha256
                (base32
-                "1xh8aiaci5hi3r67ym7r37hm89m9vzywk292avnmaj125kq7w1d0"))))
+                "1df3pwl34rvdbr9sgr5h27q9bmqpckvpwq4frl3d1v614y3vfclj"))))
     (build-system r-build-system)
     (propagated-inputs
      `(("r-htmltools" ,r-htmltools)
@@ -3340,13 +3441,13 @@ LaTeX.")
 (define-public r-curl
   (package
     (name "r-curl")
-    (version "2.2")
+    (version "2.3")
     (source (origin
               (method url-fetch)
               (uri (cran-uri "curl" version))
               (sha256
                (base32
-                "0hyvyjzf5ja7kfhzmlfgp86hg1lxrriiwbnr6pxabwwslswj3cmj"))))
+                "0gbw5l0wnsw26fbr08gj9vgxrzxg8axvqxfshmd8g9khpgbdl0gr"))))
     (build-system r-build-system)
     (arguments
      `(#:phases
diff --git a/gnu/packages/wget.scm b/gnu/packages/wget.scm
index 80da33272e..72aab86c14 100644
--- a/gnu/packages/wget.scm
+++ b/gnu/packages/wget.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -60,3 +61,36 @@ HTTPS and FTP protocols.  It can resume interrupted downloads, use file name
 wild cards, supports proxies and cookies, and it can convert absolute links
 in downloaded documents to relative links.")
     (license gpl3+))) ; some files are under GPLv2+
+
+(define-public wgetpaste
+  (package
+    (name "wgetpaste")
+    (version "2.28")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "http://wgetpaste.zlin.dk/wgetpaste-"
+                            version ".tar.bz2"))
+        (sha256
+         (base32
+          "1hh9svyypqcvdg5mjxyyfzpdzhylhf7s7xq5dzglnm4injx3i3ak"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (delete 'build)
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin"))
+                    (zsh (string-append out "/share/zsh/site-functions")))
+               (install-file "wgetpaste" bin)
+               (install-file "_wgetpaste" zsh)))))
+       #:tests? #f)) ; no test target
+    (home-page "http://wgetpaste.zlin.dk/")
+    (synopsis "Script that automates pasting to a number of pastebin services")
+    (description
+     "@code{wgetpaste} is an extremely simple command-line interface to various
+online pastebin services.")
+    (license public-domain)))
diff --git a/gnu/packages/wicd.scm b/gnu/packages/wicd.scm
index e70bf736a5..9de956c6ff 100644
--- a/gnu/packages/wicd.scm
+++ b/gnu/packages/wicd.scm
@@ -67,6 +67,9 @@
     (arguments
      `(#:python ,python-2
        #:tests? #f                      ; test suite requires networking
+       ;; wicd directly extends distutils command classes,
+       ;; we can't easily make setup.py use setuptools.
+       #:use-setuptools? #f
        #:phases
        (alist-cons-before
         'build 'configure
diff --git a/gnu/packages/wine.scm b/gnu/packages/wine.scm
index 9a1bd56608..367f27af5e 100644
--- a/gnu/packages/wine.scm
+++ b/gnu/packages/wine.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014, 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -52,7 +53,7 @@
 (define-public wine
   (package
     (name "wine")
-    (version "1.9.15")
+    (version "1.9.24")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://dl.winehq.org/wine/source/"
@@ -60,7 +61,7 @@
                                   "/wine-" version ".tar.bz2"))
               (sha256
                (base32
-                "1nmd65knzyh8b0yhxlqqvzai5rpnmhhm0c46n789zr5hj74jm6fg"))))
+                "0qb07vfxwz41wj71lb0ss3apf22m4ch06382rqfksf7gg34pswnb"))))
     (build-system gnu-build-system)
     (native-inputs `(("pkg-config" ,pkg-config)
                      ("gettext" ,gettext-minimal)
@@ -117,19 +118,19 @@
        (list "SHELL=bash")
 
        #:phases
-       (alist-cons-after
-        'configure 'patch-dlopen-paths
-        ;; Hardcode dlopened sonames to absolute paths.
-        (lambda _
-          (let* ((library-path (search-path-as-string->list
-                                (getenv "LIBRARY_PATH")))
-                 (find-so (lambda (soname)
-                            (search-path library-path soname))))
-            (substitute* "include/config.h"
-              (("(#define SONAME_.* )\"(.*)\"" _ defso soname)
-               (format #f "~a\"~a\"" defso (find-so soname))))))
-        %standard-phases)))
-    (home-page "http://www.winehq.org/")
+       (modify-phases %standard-phases
+         (add-after 'configure 'patch-dlopen-paths
+           ;; Hardcode dlopened sonames to absolute paths.
+           (lambda _
+             (let* ((library-path (search-path-as-string->list
+                                   (getenv "LIBRARY_PATH")))
+                    (find-so (lambda (soname)
+                               (search-path library-path soname))))
+               (substitute* "include/config.h"
+                 (("(#define SONAME_.* )\"(.*)\"" _ defso soname)
+                  (format #f "~a\"~a\"" defso (find-so soname))))
+               #t))))))
+    (home-page "https://www.winehq.org/")
     (synopsis "Implementation of the Windows API")
     (description
      "Wine (originally an acronym for \"Wine Is Not an Emulator\") is a
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 999f78927f..6713560c5f 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -9,7 +9,7 @@
 ;;; Copyright © 2016 Al McElrath <hello@yrns.org>
 ;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
 ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
+;;; Copyright © 2016 ng0 <ng0@libertad.pw>
 ;;; Copyright © 2016 doncatnip <gnopap@gmail.com>
 ;;; Copyright © 2016 Ivan Vilata i Balaguer <ivan@selidor.net>
 ;;;
@@ -162,27 +162,49 @@ commands would.")
 (define-public i3-wm
   (package
     (name "i3-wm")
-    (version "4.12")
+    (version "4.13")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://i3wm.org/downloads/i3-"
                                   version ".tar.bz2"))
               (sha256
                (base32
-                "1d3q3lgpjbkmcwzjhp0dfr0jq847silcfg087slcnj95ikh1r7p1"))))
+                "12ngz32swh9n85xy0cz1lq16aqi9ys5hq19v589q9a97wn1k3hcl"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'configure))
-       #:tests? #f)) ; no test suite
+     `(#:make-flags
+       (let* ((docbook-xsl-name-version ,(string-append
+                                          (package-name docbook-xsl) "-"
+                                          (package-version  docbook-xsl)))
+              (docbook-xsl-catalog-file (string-append
+                                         (assoc-ref %build-inputs "docbook-xsl")
+                                         "/xml/xsl/"
+                                         docbook-xsl-name-version
+                                         "/catalog.xml"))
+              (docbook-xml-catalog-file (string-append
+                                         (assoc-ref %build-inputs "docbook-xml")
+                                         "/xml/dtd/docbook/catalog.xml")))
+         ;; Reference the catalog files required to build the manpages.
+         (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file " "
+                              docbook-xml-catalog-file)
+              "CC=gcc"
+              (string-append "PREFIX=" %output)
+              ;; This works around the following error:
+              ;; 'error: ‘for’ loop initial declarations are only allowed in C99
+              ;; or C11 mode'
+              "CFLAGS=-std=c11"))
+       ;; The build system tries to build in a separate directory, but that
+       ;; seems to be unnecessary.
+       #:configure-flags '("--disable-builddir")
+       ;; The test suite appears to require the unpackaged Perl module AnyEvent.
+       #:tests? #f))
     (inputs
      `(("libxcb" ,libxcb)
        ("xcb-util" ,xcb-util)
        ("xcb-util-cursor" ,xcb-util-cursor)
        ("xcb-util-keysyms" ,xcb-util-keysyms)
        ("xcb-util-wm" ,xcb-util-wm)
+       ("xcb-util-xrm" ,xcb-util-xrm)
        ("libxkbcommon" ,libxkbcommon)
        ("libev" ,libev)
        ("libyajl" ,libyajl)
@@ -198,7 +220,9 @@ commands would.")
     (native-inputs
      `(("which" ,which)
        ("perl" ,perl)
-       ("pkg-config" ,pkg-config)))
+       ("pkg-config" ,pkg-config)
+       ;; For building the documentation.
+       ("docbook-xsl" ,docbook-xsl)))
     (home-page "https://i3wm.org/")
     (synopsis "Improved tiling window manager")
     (description "A tiling window manager, completely written
@@ -473,15 +497,15 @@ experience.")
 (define-public awesome
   (package
     (name "awesome")
-    (version "3.5.9")
+    (version "4.0")
     (source
      (origin (method url-fetch)
              (uri (string-append
-                   "https://awesome.naquadah.org/download/awesome-"
-                   version ".tar.xz"))
+                   "https://github.com/awesomeWM/awesome-releases/raw/"
+                   "master/awesome-" version ".tar.xz"))
              (sha256
               (base32
-               "0kynair1ykr74b39a4gcm2y24viial64337cf26nhlc7azjbby67"))
+               "0czkcz67sab63gf5m2p2pgg05yinjx60hfb9rfyzdkkg28q9f02w"))
              (modules '((guix build utils)
                         (srfi srfi-19)))
              (snippet
@@ -514,6 +538,7 @@ experience.")
               ("libxcb" ,libxcb)
               ("libxcursor" ,libxcursor)
               ("libxdg-basedir" ,libxdg-basedir)
+              ("libxkbcommon" ,libxkbcommon)
               ("lua" ,lua)
               ("lua-lgi",lua-lgi)
               ("pango" ,pango)
@@ -523,6 +548,7 @@ experience.")
               ("xcb-util-image" ,xcb-util-image)
               ("xcb-util-keysyms" ,xcb-util-keysyms)
               ("xcb-util-renderutil" ,xcb-util-renderutil)
+              ("xcb-util-xrm" ,xcb-util-xrm)
               ("xcb-util-wm" ,xcb-util-wm)))
     (arguments
      `(;; Let compression happen in our 'compress-documentation' phase so that
diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm
index b72567f259..5285037ffe 100644
--- a/gnu/packages/wxwidgets.scm
+++ b/gnu/packages/wxwidgets.scm
@@ -149,6 +149,9 @@ and many other languages.")
     (arguments
      `(#:python ,python-2
        #:tests? #f ; tests fail
+       ;; wxPython directly extends distutils command classes,
+       ;; we can't easily make setup.py use setuptools.
+       #:use-setuptools? #f
        #:configure-flags (list "WXPORT=gtk2"
                                "UNICODE=1")
        #:phases
@@ -181,8 +184,7 @@ and many other languages.")
              #t)))))
     (native-inputs
      `(("mesa" ,mesa) ; for glcanvas
-       ("pkg-config" ,pkg-config)
-       ("python2-setuptools" ,python2-setuptools)))
+       ("pkg-config" ,pkg-config)))
     (inputs
      `(("gtk+" ,gtk+-2) ; for wxPython/src/helpers.cpp
        ("wxwidgets" ,wxwidgets-gtk2)))
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 86f5ad203c..615e539e20 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -92,8 +92,7 @@
     (inputs `(("pygtk" ,python2-pygtk)
               ("xrandr" ,xrandr)))
     (native-inputs `(("gettext"           ,gettext-minimal)
-                     ("python-docutils"   ,python2-docutils)
-                     ("python-setuptools" ,python2-setuptools)))
+                     ("python-docutils"   ,python2-docutils)))
     (home-page "https://christian.amsuess.com/tools/arandr/")
     (synopsis "Another RandR graphical user interface")
     ;; TRANSLATORS: "X11 resize-and-rotate" should not be translated.
@@ -242,7 +241,6 @@ following the mouse.")
   (package
     (name "pixman")
     (version "0.34.0")
-    (replacement pixman/fixed)
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -250,7 +248,8 @@ following the mouse.")
                     version ".tar.gz"))
               (sha256
                (base32
-                "13m842m9ffac3m9r0b4lvwjhwzg3w4353djkjpf00s0wnm4v5di1"))))
+                "13m842m9ffac3m9r0b4lvwjhwzg3w4353djkjpf00s0wnm4v5di1"))
+              (patches (search-patches "pixman-CVE-2016-5296.patch"))))
     (build-system gnu-build-system)
     (inputs
      `(("libpng" ,libpng)
@@ -264,14 +263,6 @@ manipulation, providing features such as image compositing and trapezoid
 rasterisation.")
     (license license:x11)))
 
-(define pixman/fixed
-  (package
-    (inherit pixman)
-    (source (origin
-              (inherit (package-source pixman))
-              (patches (search-patches "pixman-CVE-2016-5296.patch"))))))
-
-
 (define-public libdrm
   (package
     (name "libdrm")
@@ -610,7 +601,7 @@ X Window System.")
        ("libxt" ,libxt)
        ("libxext" ,libxext)
        ("libxinerama" ,libxinerama)))
-    (home-page "http://sourceforge.net/projects/libxosd/")
+    (home-page "https://sourceforge.net/projects/libxosd/")
     (synopsis "X On Screen Display")
     (description
      "XOSD provides a C library and a simple utility (osd_cat) for displaying
@@ -725,7 +716,7 @@ within a single process.")
 (define-public xcape
   (package
     (name "xcape")
-    (version "1.1")
+    (version "1.2")
     (source
       (origin
         (method url-fetch)
@@ -734,7 +725,7 @@ within a single process.")
         (file-name (string-append name "-" version ".tar.gz"))
         (sha256
           (base32
-            "0jkdiaxc6sryrbibdgi2y1c48n4l9xyazhxr16l6h4ibddx95bk9"))))
+            "0898zc3vwxia00h9kfknpf7jygxgwggrx8v5mxc31w4lzn2dhzm2"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ; no check target
@@ -949,7 +940,7 @@ connectivity of the X server running on a particular @code{DISPLAY}.")
 (define-public rofi
   (package
     (name "rofi")
-    (version "1.2.0")
+    (version "1.3.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/DaveDavenport/rofi/"
@@ -957,7 +948,7 @@ connectivity of the X server running on a particular @code{DISPLAY}.")
                                   version "/rofi-" version ".tar.xz"))
               (sha256
                (base32
-                "0xxx0xpxhrhlhi2axq9867zqrhwqavc1qrr833k1xr0pvm5m0aqc"))))
+                "1a65ai93ygras5bi7wc0s5i3zqslzqlnw3klq3sdnp2p0d6hjjqn"))))
     (build-system gnu-build-system)
     (inputs
      `(("pango" ,pango)
@@ -1036,7 +1027,7 @@ actions, a built-in clock, a battery monitor and a system tray.")
 (define-public xcb-util-xrm
   (package
     (name "xcb-util-xrm")
-    (version "1.0")
+    (version "1.2")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1044,7 +1035,7 @@ actions, a built-in clock, a battery monitor and a system tray.")
                     "/download/v" version "/xcb-util-xrm-" version ".tar.bz2"))
               (sha256
                (base32
-                "1h5vxwpd37dqfw9yj1l4zd9c5dj30r3g0szgysr6kd7xrqgaq04l"))
+                "0vbqhag51i0njc8d5fc8c6aa12496cwrc3s6s7sa5kfc17cwhppp"))
               (modules '((guix build utils)))
               (snippet
                ;; Drop bundled m4.
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 505d585e66..32b658489c 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -74,6 +74,7 @@ things the parser might find in the XML document (like start tags).")
 (define-public libxml2
   (package
     (name "libxml2")
+    (replacement libxml2/fixed)
     (version "2.9.4")
     (source (origin
              (method url-fetch)
@@ -101,6 +102,15 @@ things the parser might find in the XML document (like start tags).")
 project (but it is usable outside of the Gnome platform).")
     (license license:x11)))
 
+(define libxml2/fixed
+  (package
+    (inherit libxml2)
+    (source
+      (origin
+        (inherit (package-source libxml2))
+        (patches (search-patches "libxml2-CVE-2016-4658.patch"
+                                 "libxml2-CVE-2016-5131.patch"))))))
+
 (define-public python-libxml2
   (package (inherit libxml2)
     (name "python-libxml2")
@@ -167,7 +177,7 @@ based on libxml for XML parsing, tree manipulation and XPath support.")
 (define-public perl-graph-readwrite
   (package
     (name "perl-graph-readwrite")
-    (version "2.08")
+    (version "2.09")
     (source
      (origin
        (method url-fetch)
@@ -177,7 +187,7 @@ based on libxml for XML parsing, tree manipulation and XPath support.")
              ".tar.gz"))
        (sha256
         (base32
-         "1wjni212nfz9irp19nx9if1lj3w9cybpdbzhii4g8macpryjj7ci"))))
+         "0jlsg64pmy6ka5q5gy851nnyfgjzvhyxc576bhns3vi2x5ng07mh"))))
     (build-system perl-build-system)
     (propagated-inputs
      `(("perl-graph" ,perl-graph)
@@ -310,14 +320,14 @@ XML parser and the high performance DOM implementation.")
 (define-public perl-xml-libxml-simple
   (package
     (name "perl-xml-libxml-simple")
-    (version "0.95")
+    (version "0.97")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
                                   "XML-LibXML-Simple-" version ".tar.gz"))
               (sha256
                (base32
-                "0qqfqj5bgqmh1j4iv8dwl3g00nsmcvf2b7w1d09k9d77rrb249xi"))))
+                "1g8nlk3zdz2cclxf7azvsb3jfxmvy6ml8wmj774k4qjqcsqmzk0w"))))
     (build-system perl-build-system)
     (propagated-inputs
      `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
@@ -329,6 +339,29 @@ XML parser and the high performance DOM implementation.")
 @code{XML::LibXML}.")
     (license (package-license perl))))
 
+(define-public perl-xml-libxslt
+  (package
+    (name "perl-xml-libxslt")
+    (version "1.95")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
+                           "XML-LibXSLT-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0dggycql18kfxzkb1kw3yc7gslxlrrgyyn2r2ygsylycb89j3jpi"))))
+    (build-system perl-build-system)
+    (inputs
+     `(("libxslt" ,libxslt)))
+    (propagated-inputs
+     `(("perl-xml-libxml" ,perl-xml-libxml)))
+    (home-page "http://search.cpan.org/dist/XML-LibXSLT")
+    (synopsis "Perl bindings to GNOME libxslt library")
+    (description "This Perl module is an interface to the GNOME project's
+libxslt library.")
+    (license (package-license perl))))
+
 (define-public perl-xml-namespacesupport
   (package
     (name "perl-xml-namespacesupport")
@@ -491,7 +524,7 @@ EntityRef, CharRef, Reference, Name, NmToken, and AttValue.")
 (define-public perl-xml-dom
   (package
     (name "perl-xml-dom")
-    (version "1.44")
+    (version "1.46")
     (source (origin
              (method url-fetch)
              (uri (string-append
@@ -499,11 +532,12 @@ EntityRef, CharRef, Reference, Name, NmToken, and AttValue.")
                    version ".tar.gz"))
              (sha256
               (base32
-               "1r0ampc88ni3sjpzr583k86076qg399arfm9xirv3cw49k3k5bzn"))))
+               "0phpkc4li43m2g44hdcvyxzy9pymqwlqhh5hwp2xc0cv8l5lp8lb"))))
     (build-system perl-build-system)
     (propagated-inputs
      `(("perl-libwww" ,perl-libwww)
        ("perl-libxml" ,perl-libxml)
+       ("perl-xml-parser" ,perl-xml-parser)
        ("perl-xml-regexp" ,perl-xml-regexp)))
     (license (package-license perl))
     (synopsis
@@ -542,14 +576,14 @@ This module provide functions which simplify writing tests for
 (define-public perl-xml-compile
   (package
     (name "perl-xml-compile")
-    (version "1.51")
+    (version "1.54")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
                                   "XML-Compile-" version ".tar.gz"))
               (sha256
                (base32
-                "06fj4zf0yh4kf3kx4bhwrmrjr6al40nasasbgfhn8f1zxwkmm8f2"))))
+                "1hp41960bpqxvv1samv9hc0ghhmvs3i16r4rfl9yp54lp6jhsr2c"))))
     (build-system perl-build-system)
     (propagated-inputs
      `(("perl-log-report" ,perl-log-report)
@@ -567,14 +601,14 @@ a schema.")
 (define-public perl-xml-compile-cache
   (package
     (name "perl-xml-compile-cache")
-    (version "1.04")
+    (version "1.05")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
                                   "XML-Compile-Cache-" version ".tar.gz"))
               (sha256
                (base32
-                "1689dm54n7wb0n0cl9n77vk0kvg0mcckn2hz9ahigjhvazah8740"))))
+                "0xbwlszhi9hg8sxm5ylglm2qvnb689i595p913awrj2g4mp9yfsw"))))
     (build-system perl-build-system)
     (propagated-inputs
      `(("perl-log-report" ,perl-log-report)
@@ -590,14 +624,14 @@ a schema.")
 (define-public perl-xml-compile-soap
   (package
     (name "perl-xml-compile-soap")
-    (version "3.13")
+    (version "3.20")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
                                   "XML-Compile-SOAP-" version ".tar.gz"))
               (sha256
                (base32
-                "08qw63l78040nh37xzapbqp43g6s5l67bvskf3dyyizlarjx5mi4"))))
+                "0qplb77qr97pc9yis51jmphl9gbq9xyf8abldpxkwvdn6iqlbgx5"))))
     (build-system perl-build-system)
     (propagated-inputs
      `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
@@ -618,14 +652,14 @@ used.")
 (define-public perl-xml-compile-wsdl11
   (package
     (name "perl-xml-compile-wsdl11")
-    (version "3.04")
+    (version "3.05")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
                                   "XML-Compile-WSDL11-" version ".tar.gz"))
               (sha256
                (base32
-                "0pyikwnfwpangvnkf5dbdagy4z93ag9824f1ax5qaibc3ghca8kv"))))
+                "1a50in1qrbzx3924wvrhgfm5fcxz5cd95f3z9z2xgln27q1zssc4"))))
     (build-system perl-build-system)
     (propagated-inputs
      `(("perl-log-report" ,perl-log-report)
@@ -683,14 +717,14 @@ RSS 0.91, RSS 1.0, RSS 2.0, Atom")
 (define-public perl-xml-xpath
   (package
     (name "perl-xml-xpath")
-    (version "1.37")
+    (version "1.40")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://cpan/authors/id/M/MA/MANWAR/"
                                   "XML-XPath-" version ".tar.gz"))
               (sha256
                (base32
-                "0997l8vjgq8p7d1irvp6amqyrv24x7f8hybjm4l4ayag32b13bmq"))))
+                "07pa0bl42jka8mj7jshjynx8vpfh8b4cdyiv4zlkqvkqz98nzxib"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-path-tiny" ,perl-path-tiny)))
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 55e3bd0839..1267d3106d 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
+;;; Copyright © 2016 John Darrington <jmd@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -335,6 +336,44 @@ provided.")
                                 "See 'dri3proto.h' in the distribution."))))
 
 
+(define-public editres
+  (package
+    (name "editres")
+    (version "1.0.6")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+               "mirror://xorg/individual/app/" name "-"
+               version
+               ".tar.bz2"))
+        (sha256
+         (base32
+          "1w2d5hb5pw9ii2jlf4yjlp899402zfwc8hdkpdr3i1fy1cjd2riv"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (list (string-append "--with-appdefaultdir="
+                            %output "/lib/X11/app-defaults"))))
+    (inputs
+     `(("libxaw" ,libxaw)
+       ("libxmu" ,libxmu)
+       ("libxt" ,libxt)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "https://www.x.org/wiki/")
+    (synopsis "Tool to browse and edit X Toolkit resource specifications")
+    (description
+     "Editres is a tool that allows users and application developers to view
+the full widget hierarchy of any X Toolkit application that speaks the Editres
+protocol.  In addition, editres will help the user construct resource
+specifications, allow the user to apply the resource to the application and
+view the results dynamically.  Once the user is happy with a resource
+specification editres will append the resource string to the user's X
+Resources file.")
+    (license license:x11)))
+
+
 (define-public encodings
   (package
     (name "encodings")
@@ -2360,7 +2399,7 @@ XC-APPGROUP, XTEST.")
 (define-public libevdev
   (package
     (name "libevdev")
-    (version "1.3")
+    (version "1.5.5")
     (source
      (origin
        (method url-fetch)
@@ -2368,10 +2407,10 @@ XC-APPGROUP, XTEST.")
                            name "-" version ".tar.xz"))
        (sha256
         (base32
-         "0iil4pnla0kjdx52ay7igq65sx32sjbzn1wx9q3v74m5g7712m16"))))
+         "1cc00876lqvyadsfmj3sh1h2i0r3qfar98izdfar5f8q41w2009j"))))
     (build-system gnu-build-system)
     (native-inputs `(("python" ,python)))
-    (home-page "http://www.freedesktop.org/wiki/Software/libevdev/")
+    (home-page "https://www.freedesktop.org/wiki/Software/libevdev/")
     (synopsis "Wrapper library for evdev devices")
     (description
      "libevdev is a wrapper library for evdev devices. it moves the common
@@ -2386,7 +2425,7 @@ devices, thus making direct access unnecessary.")
 (define-public xf86-input-evdev
   (package
     (name "xf86-input-evdev")
-    (version "2.10.3")
+    (version "2.10.4")
     (source
       (origin
         (method url-fetch)
@@ -2396,7 +2435,7 @@ devices, thus making direct access unnecessary.")
                ".tar.bz2"))
         (sha256
           (base32
-            "18ijnclnylrr7vkvflalkw4bqfily3scg6baczjjgycdpsj1p8js"))))
+            "1hhc97k1qmgs85fp8p2i3gq4p18azlczbvklv33w19p1phzs1xmv"))))
     (build-system gnu-build-system)
     (inputs
       `(("udev" ,eudev)
@@ -2420,7 +2459,7 @@ including most mice, keyboards, tablets and touchscreens.")
 (define-public xf86-input-libinput
   (package
     (name "xf86-input-libinput")
-    (version "0.16.0")
+    (version "0.23.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2428,7 +2467,7 @@ including most mice, keyboards, tablets and touchscreens.")
                     name "-" version ".tar.bz2"))
               (sha256
                (base32
-                "0jbgnxsbr3g4g9vkspcc6pqy7av59zx5bb78vkvaqy8yx4qybbgx"))))
+                "1p596v3kbmjpdz3kz8z19bnd79l860f1pbwjvma7bz7qx3gynlqb"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags
@@ -2450,7 +2489,7 @@ provide all features that libinput supports it does little beyond.")
 (define-public xf86-input-joystick
   (package
     (name "xf86-input-joystick")
-    (version "1.6.2")
+    (version "1.6.3")
     (source
       (origin
         (method url-fetch)
@@ -2460,7 +2499,7 @@ provide all features that libinput supports it does little beyond.")
                ".tar.bz2"))
         (sha256
           (base32
-            "038mfqairyyqvz02rk7v3i070sab1wr0k6fkxvyvxdgkfbnqcfzf"))))
+            "1awfq496d082brgjbr60lhm6jvr9537rflwxqdfqwfzjy3n6jxly"))))
     (build-system gnu-build-system)
     (inputs `(("xorg-server" ,xorg-server)))
     (native-inputs `(("pkg-config" ,pkg-config)))
@@ -2480,7 +2519,7 @@ It is used to cotrol the pointer with a joystick device.")
 (define-public xf86-input-keyboard
   (package
     (name "xf86-input-keyboard")
-    (version "1.8.1")
+    (version "1.9.0")
     (source
       (origin
         (method url-fetch)
@@ -2490,7 +2529,7 @@ It is used to cotrol the pointer with a joystick device.")
                ".tar.bz2"))
         (sha256
           (base32
-            "04d27kwqq03fc26an6051hs3i0bff8albhnngzyd59wxpwwzzj0s"))))
+            "12032yg412kyvnmc5fha1in7mpi651d8sa1bk4138s2j2zr01jgp"))))
     (build-system gnu-build-system)
     (inputs `(("xorg-server" ,xorg-server)))
     (native-inputs `(("pkg-config" ,pkg-config)))
@@ -2504,7 +2543,7 @@ It is used to cotrol the pointer with a joystick device.")
 (define-public xf86-input-mouse
   (package
     (name "xf86-input-mouse")
-    (version "1.9.1")
+    (version "1.9.2")
     (source
       (origin
         (method url-fetch)
@@ -2514,7 +2553,7 @@ It is used to cotrol the pointer with a joystick device.")
                ".tar.bz2"))
         (sha256
           (base32
-            "1kn5kx3qyn9qqvd6s24a2l1wfgck2pgfvzl90xpl024wfxsx719l"))))
+            "0bsbgww9421792zan43j60mndqprhfxhc48agsi15d3abjqda9gl"))))
     (build-system gnu-build-system)
     (inputs `(("xorg-server" ,xorg-server)))
     (native-inputs `(("pkg-config" ,pkg-config)))
@@ -2536,7 +2575,7 @@ as USB mice.")
 (define-public xf86-input-synaptics
   (package
     (name "xf86-input-synaptics")
-    (version "1.8.99.1")
+    (version "1.9.0")
     (source
       (origin
         (method url-fetch)
@@ -2546,7 +2585,7 @@ as USB mice.")
                ".tar.bz2"))
         (sha256
           (base32
-            "1apbcwn20p7sy07ghlldmqcnxag2r9sdjqmb4xxzki0hz8wm72ac"))))
+            "0niv0w1czbxh4y3qkqbpdp5gjwhp3379inwhknhif0m4sy4k5fmg"))))
     (build-system gnu-build-system)
     (inputs `(("libx11" ,libx11)
               ("libxi" ,libxi)
@@ -2648,7 +2687,7 @@ as USB mice.")
 (define-public xf86-video-ati
   (package
     (name "xf86-video-ati")
-    (version "7.7.0")
+    (version "7.8.0")
     (source
       (origin
         (method url-fetch)
@@ -2658,7 +2697,7 @@ as USB mice.")
                ".tar.bz2"))
         (sha256
           (base32
-            "1hy1n8an98mflfbdcb3q7wv59x971j7nf9zhivf90p0lgdbiqkc4"))))
+            "1ynnm4v4261xmg94b7jam9hjyym4n2nqba23rv23v3wjfbkms7s0"))))
     (build-system gnu-build-system)
     (inputs `(("mesa" ,mesa)
               ("xxf86driproto" ,xf86driproto)
@@ -3050,7 +3089,7 @@ supported, and the RENDER extension is not accelerated by this driver.")
 (define-public xf86-video-nouveau
   (package
     (name "xf86-video-nouveau")
-    (version "1.0.12")
+    (version "1.0.13")
     (source
      (origin
        (method url-fetch)
@@ -3060,7 +3099,7 @@ supported, and the RENDER extension is not accelerated by this driver.")
              ".tar.bz2"))
        (sha256
         (base32
-         "07irv1zkk0rkyn1d7f2gn1icgcz2ix0pwv74sjian763gynmg80f"))))
+         "1js7vak68g2800f1cy5r41wl5x2j7dbmbd7zxypzfgcw2fx454kd"))))
     (build-system gnu-build-system)
     (inputs `(("xorg-server" ,xorg-server)))
     (native-inputs `(("pkg-config" ,pkg-config)))
@@ -3106,7 +3145,7 @@ UniChrome Pro and Chrome9 integrated graphics processors.")
 (define-public xf86-video-qxl
   (package
     (name "xf86-video-qxl")
-    (version "0.1.4")
+    (version "0.1.5")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -3114,7 +3153,7 @@ UniChrome Pro and Chrome9 integrated graphics processors.")
                 "xf86-video-qxl-" version ".tar.bz2"))
               (sha256
                (base32
-                "018ic9ddxfnjcv2yss0mwk1gq6rmip1hrgi2wxwqkbqx1cpx4yp5"))))
+                "14jc24znnahhmz4kqalafmllsg8awlz0y6gpgdpk5ih38ph851mi"))))
     (build-system gnu-build-system)
     (inputs
       `(("fontsproto" ,fontsproto)
@@ -3397,7 +3436,7 @@ X server.")
 (define-public xf86-video-vmware
   (package
     (name "xf86-video-vmware")
-    (version "13.1.0")
+    (version "13.2.1")
     (source
       (origin
         (method url-fetch)
@@ -3407,14 +3446,16 @@ X server.")
                ".tar.bz2"))
         (sha256
           (base32
-           "1k50whwnkzxam2ihc1sw456dx0pvr76naycm4qhyjxqv9d72879w"))))
+           "0azn3g0vcki47n5jddagk2rmbwdvp845k8p7d2r56zxs3w8ggxz2"))))
     (build-system gnu-build-system)
-    (inputs `(("libx11" ,libx11)
-              ("libxext" ,libxext)
-              ("mesa" ,mesa)            ; for xatracker
-              ("xorg-server" ,xorg-server)))
+    (inputs
+     `(("libx11" ,libx11)
+       ("libxext" ,libxext)
+       ("mesa" ,mesa)                   ; for xatracker
+       ("xorg-server" ,xorg-server)))
     (native-inputs
-       `(("pkg-config" ,pkg-config)))
+     `(("eudev" ,eudev)
+       ("pkg-config" ,pkg-config)))
     (home-page "https://www.x.org/wiki/")
     (synopsis "VMware SVGA video driver for X server")
     (description
@@ -4847,7 +4888,7 @@ an X Window System display.")
 (define-public libxfont
   (package
     (name "libxfont")
-    (version "1.5.1")
+    (version "1.5.2")
     (source
       (origin
         (method url-fetch)
@@ -4857,7 +4898,7 @@ an X Window System display.")
                ".tar.bz2"))
         (sha256
           (base32
-            "1630v3sfvwwlimb2ja10c84ql6v1mw9bdfhvan7pbybkgi99h25p"))))
+            "0w8d07bkmjiarkx09579bl8zsq903mn8javc7qpi0ix4ink5x502"))))
     (build-system gnu-build-system)
     (propagated-inputs
       `(("fontsproto" ,fontsproto)
@@ -4884,7 +4925,7 @@ new API's in libXft, or the legacy API's in libX11.")
 (define-public libxi
   (package
     (name "libxi")
-    (version "1.7.7")
+    (version "1.7.8")
     (source
       (origin
         (method url-fetch)
@@ -4894,7 +4935,7 @@ new API's in libXft, or the legacy API's in libX11.")
                ".tar.bz2"))
         (sha256
           (base32
-            "0c70n4aq0ba628wr88ih4740nci9d9f6y3v96sx376vvlm7q6vwr"))))
+            "1fr7mi4nbcxsa88qin9g2ipmzh595ydxy9qnabzl270laf6zmwnq"))))
     (build-system gnu-build-system)
     (propagated-inputs
       `(("inputproto" ,inputproto)
@@ -5369,8 +5410,9 @@ The XCB util module provides the following libraries:
      `(("m4" ,m4)
        ("pkg-config" ,pkg-config)))
     (inputs
-     `(("libxcb" ,libxcb)
-       ("xcb-util-renderutil" ,xcb-util-renderutil)
+     `(("libxcb" ,libxcb)))
+    (propagated-inputs
+     `(("xcb-util-renderutil" ,xcb-util-renderutil)
        ("xcb-util-image" ,xcb-util-image)))
     (home-page "https://cgit.freedesktop.org/xcb/util-cursor/")
     (synopsis "Port of libxcursor")
diff --git a/gnu/packages/zile.scm b/gnu/packages/zile.scm
index 13a5440eea..dfa9d7373d 100644
--- a/gnu/packages/zile.scm
+++ b/gnu/packages/zile.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2017 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;;
@@ -21,14 +21,21 @@
 (define-module (gnu packages zile)
   #:use-module (guix licenses)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix packages)
+  #:use-module (guix utils)
   #:use-module (guix build-system gnu)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages bdw-gc)
-  #:use-module (gnu packages perl)
+  #:use-module (gnu packages guile)
+  #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages m4)
   #:use-module (gnu packages man)
   #:use-module (gnu packages ncurses)
-  #:use-module (gnu packages bash)
-  #:use-module (gnu packages pkg-config))
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages version-control))
 
 (define-public zile
   (package
@@ -67,3 +74,70 @@
      "GNU Zile is a lightweight Emacs clone.  It usage is similar to the
 default Emacs configuration, but it carries a much lighter feature set.")
     (license gpl3+)))
+
+(define-public zile-on-guile
+  ;; This is a fork of Zile that uses Guile, announced here:
+  ;; <http://lists.gnu.org/archive/html/guile-user/2012-02/msg00033.html>.
+  (let ((commit "fd097811a60e58696d734c35b0eb7da3afc1adb7")
+        (revision "0"))
+    (package
+      (inherit zile)
+      (name "zile-on-guile")
+      (version (string-append (package-version zile)
+                              "-" revision "."
+                              (string-take commit 7)))
+      (home-page "https://github.com/spk121/zile")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url home-page)
+                      (commit commit)
+                      (recursive? #t)))           ;for the Gnulib sub-module
+                (sha256
+                 (base32
+                  "0wlli8hqal9ikmbl3a49kyhzyf164jk6mdbir3bclq2gxszs532d"))
+                (file-name (string-append name "-" version "-checkout"))))
+      (inputs
+       `(("guile" ,guile-2.0)
+         ,@(package-inputs zile)))
+      (native-inputs
+       `(("m4" ,m4)                               ;for 'bootstrap'
+         ("autoconf" ,(autoconf-wrapper))
+         ("automake" ,automake)
+
+         ;; For some reason, 'bootstrap' insists on having these.
+         ("git" ,git)
+         ("gpg" ,gnupg)
+
+         ,@(package-native-inputs zile)))
+      (arguments
+       (substitute-keyword-arguments (package-arguments zile)
+         ((#:phases phases)
+          `(modify-phases ,phases
+             (add-after 'unpack 'bootstrap
+               (lambda _
+                 ;; Make sure all the files are writable so that ./bootstrap
+                 ;; can proceed.
+                 (for-each (lambda (file)
+                             (chmod file #o755))
+                           (find-files "."))
+                 (patch-shebang "gnulib/gnulib-tool")
+                 (zero? (system* "sh" "./bootstrap"
+                                 "--gnulib-srcdir=gnulib"
+                                 "--skip-git" "--skip-po"
+                                 "--verbose"))))
+             (add-after 'install 'wrap-command
+               (lambda* (#:key outputs #:allow-other-keys)
+                 ;; Add zile.scm to the search path.
+                 (let* ((out    (assoc-ref outputs "out"))
+                        (scheme (dirname
+                                 (car (find-files out "^zile\\.scm$")))))
+                   (wrap-program (string-append out "/bin/zile-on-guile")
+                     `("GUILE_LOAD_PATH" ":" prefix (,scheme)))
+                   #t)))))))
+      (synopsis "Lightweight clone of the Emacs editor using Guile")
+      (description
+       "GNU Zile is a lightweight clone of the Emacs editor, and Zile-on-Guile
+is a variant of Zile that can be extended in Guile Scheme.  Hitting
+@kbd{M-C} (or: @kbd{Alt} and @kbd{C}) brings up a Guile REPL from which
+interactive functions akin to those of Emacs can be invoked."))))
diff --git a/gnu/packages/zip.scm b/gnu/packages/zip.scm
index c9fb70c031..2cf30d6e32 100644
--- a/gnu/packages/zip.scm
+++ b/gnu/packages/zip.scm
@@ -156,7 +156,7 @@ recreates the stored directory structure by default.")
 (define-public perl-zip
   (package
     (name "perl-zip")
-    (version "1.30")
+    (version "1.59")
     (source 
      (origin
        (method url-fetch)
@@ -165,7 +165,7 @@ recreates the stored directory structure by default.")
              version ".tar.gz"))
        (sha256
         (base32
-         "0633zah5z9njiqnvy3vh42fjymncmil1jdfb7d18w8xpfzzp5d7q"))))
+         "0m31qlppg65vh32pwxkwjby02q70abx49d2yk6vfd4585fqb27cx"))))
     (build-system perl-build-system)
     (synopsis  "Provides an interface to ZIP archive files")
     (description "The Archive::Zip module allows a Perl program to create,
diff --git a/gnu/services.scm b/gnu/services.scm
index 693a7f8001..03112f7515 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -338,12 +338,14 @@ ACTIVATION-SCRIPT-TYPE."
                       (activate-/bin/sh
                        (string-append #$(canonical-package bash) "/bin/sh"))
 
+                      ;; Set up /run/current-system.  Among other things this
+                      ;; sets up locales, which the activation snippets
+                      ;; executed below may expect.
+                      (activate-current-system)
+
                       ;; Run the services' activation snippets.
                       ;; TODO: Use 'load-compiled'.
-                      (for-each primitive-load '#$actions)
-
-                      ;; Set up /run/current-system.
-                      (activate-current-system))))))
+                      (for-each primitive-load '#$actions))))))
 
 (define (gexps->activation-gexp gexps)
   "Return a gexp that runs the activation script containing GEXPS."
diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index d8086b78d4..deaf677bd9 100644
--- a/gnu/services/admin.scm
+++ b/gnu/services/admin.scm
@@ -58,8 +58,8 @@
 }
 "))
 
-(define (simple-rotation-config file)
-  (string-append file " {
+(define (simple-rotation-config files)
+  #~(string-append #$(string-join files ",") " {
         sharedscripts
 }
 "))
@@ -72,7 +72,8 @@
                            (display #$(syslog-rotation-config %rotated-files)
                                     port)
                            (display #$(simple-rotation-config
-                                       "/var/log/shepherd.log")
+                                       '("/var/log/shepherd.log"
+                                         "/var/log/guix-daemon.log"))
                                     port)))))))
 
 (define (default-jobs rottlog)
diff --git a/gnu/services/avahi.scm b/gnu/services/avahi.scm
index 60e9e61f94..29720415fc 100644
--- a/gnu/services/avahi.scm
+++ b/gnu/services/avahi.scm
@@ -107,7 +107,7 @@
            (requirement '(dbus-system networking))
 
            (start #~(make-forkexec-constructor
-                     (list (string-append #$avahi "/sbin/avahi-daemon")
+                     (list #$(file-append avahi "/sbin/avahi-daemon")
                            "--daemonize"
                            #$@(if debug? #~("--debug") #~())
                            "-f" #$config)
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index afbecdb47e..1b1ce0d5e8 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -37,7 +37,6 @@
   #:use-module ((gnu packages base)
                 #:select (canonical-package glibc))
   #:use-module (gnu packages package-management)
-  #:use-module (gnu packages ssh)
   #:use-module (gnu packages lsof)
   #:use-module (gnu packages terminals)
   #:use-module ((gnu build file-systems)
@@ -252,6 +251,8 @@ FILE-SYSTEM."
         (device  (file-system-device file-system))
         (type    (file-system-type file-system))
         (title   (file-system-title file-system))
+        (flags   (file-system-flags file-system))
+        (options (file-system-options file-system))
         (check?  (file-system-check? file-system))
         (create? (file-system-create-mount-point? file-system))
         (dependencies (file-system-dependencies file-system)))
@@ -264,35 +265,27 @@ FILE-SYSTEM."
                            ,@(map dependency->shepherd-service-name dependencies)))
             (documentation "Check, mount, and unmount the given file system.")
             (start #~(lambda args
-                       ;; FIXME: Use or factorize with 'mount-file-system'.
-                       (let ((device (canonicalize-device-spec #$device '#$title))
-                             (flags  #$(mount-flags->bit-mask
-                                        (file-system-flags file-system))))
-                         #$(if create?
-                               #~(mkdir-p #$target)
-                               #~#t)
-                         #$(if check?
-                               #~(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 flags
-                                #$(file-system-options file-system))
-
-                         ;; For read-only bind mounts, an extra remount is
-                         ;; needed, as per <http://lwn.net/Articles/281157/>,
-                         ;; which still applies to Linux 4.0.
-                         (when (and (= MS_BIND (logand flags MS_BIND))
-                                    (= MS_RDONLY (logand flags MS_RDONLY)))
-                           (mount device #$target #$type
-                                  (logior MS_BIND MS_REMOUNT MS_RDONLY))))
-                       #t))
+		       #$(if create?
+                             #~(mkdir-p #$target)
+                             #t)
+
+                       (let (($PATH (getenv "PATH")))
+                         ;; Make sure fsck.ext2 & co. can be found.
+                         (dynamic-wind
+                           (lambda ()
+                             (setenv "PATH"
+                                     (string-append
+                                      #$e2fsprogs "/sbin:"
+                                      "/run/current-system/profile/sbin:"
+                                      $PATH)))
+                           (lambda ()
+                             (mount-file-system
+                              `(#$device #$title #$target #$type #$flags
+                                         #$options #$check?)
+                              #:root "/"))
+                           (lambda ()
+                             (setenv "PATH" $PATH)))
+                         #t)))
             (stop #~(lambda args
                       ;; Normally there are no processes left at this point, so
                       ;; TARGET can be safely unmounted.
@@ -305,7 +298,7 @@ FILE-SYSTEM."
 
             ;; We need an additional module.
             (modules `(((gnu build file-systems)
-                        #:select (check-file-system canonicalize-device-spec))
+                        #:select (mount-file-system))
                        ,@%default-modules)))))))
 
 (define file-system-service-type
@@ -616,7 +609,7 @@ strings or string-valued gexps."
            (dup2 (open-fdes #$tty O_RDONLY) 0)
            (close-fdes 1)
            (dup2 (open-fdes #$tty O_WRONLY) 1)
-           (execl (string-append #$kbd "/bin/unicode_start")
+           (execl #$(file-append kbd "/bin/unicode_start")
                   "unicode_start"))
           (else
            (zero? (cdr (waitpid pid))))))))
@@ -629,7 +622,7 @@ strings or string-valued gexps."
       (documentation (string-append "Load console keymap (loadkeys)."))
       (provision '(console-keymap))
       (start #~(lambda _
-                 (zero? (system* (string-append #$kbd "/bin/loadkeys")
+                 (zero? (system* #$(file-append kbd "/bin/loadkeys")
                                  #$@files))))
       (respawn? #f)))))
 
@@ -661,7 +654,7 @@ strings or string-valued gexps."
              (start #~(lambda _
                         (and #$(unicode-start device)
                              (zero?
-                              (system* (string-append #$kbd "/bin/setfont")
+                              (system* #$(file-append kbd "/bin/setfont")
                                        "-C" #$device #$font)))))
              (stop #~(const #t))
              (respawn? #f)))))
@@ -743,7 +736,7 @@ the message of the day, among other things."
        (requirement '(user-processes host-name udev))
 
        (start  #~(make-forkexec-constructor
-                  (list (string-append #$mingetty "/sbin/mingetty")
+                  (list #$(file-append mingetty "/sbin/mingetty")
                         "--noclear" #$tty
                         #$@(if auto-login
                                #~("--autologin" #$auto-login)
@@ -878,7 +871,7 @@ the tty to run, among other things."
            (provision '(nscd))
            (requirement '(user-processes))
            (start #~(make-forkexec-constructor
-                     (list (string-append #$(nscd-configuration-glibc config)
+                     (list #$(file-append (nscd-configuration-glibc config)
                                           "/sbin/nscd")
                            "-f" #$nscd.conf "--foreground")
 
@@ -1064,7 +1057,7 @@ public key, with GUIX."
              (format #t "registering public key '~a'...~%" key)
              (close-port (current-input-port))
              (dup port 0)
-             (execl (string-append #$guix "/bin/guix")
+             (execl #$(file-append guix "/bin/guix")
                     "guix" "archive" "--authorize")
              (exit 1)))
           (else
@@ -1096,10 +1089,10 @@ failed to register hydra.gnu.org public key: ~a~%" status))))))))
                     (default %default-substitute-urls))
   (extra-options    guix-configuration-extra-options ;list of strings
                     (default '()))
+  (log-file         guix-configuration-log-file   ;string
+                    (default "/var/log/guix-daemon.log"))
   (lsof             guix-configuration-lsof       ;<package>
-                    (default lsof))
-  (lsh              guix-configuration-lsh        ;<package>
-                    (default lsh)))
+                    (default lsof)))
 
 (define %default-guix-configuration
   (guix-configuration))
@@ -1110,14 +1103,14 @@ failed to register hydra.gnu.org public key: ~a~%" status))))))))
     (($ <guix-configuration> guix build-group build-accounts
                              authorize-key? keys
                              use-substitutes? substitute-urls extra-options
-                             lsof lsh)
+                             log-file lsof)
      (list (shepherd-service
             (documentation "Run the Guix daemon.")
             (provision '(guix-daemon))
             (requirement '(user-processes))
             (start
              #~(make-forkexec-constructor
-                (list (string-append #$guix "/bin/guix-daemon")
+                (list #$(file-append guix "/bin/guix-daemon")
                       "--build-users-group" #$build-group
                       #$@(if use-substitutes?
                              '()
@@ -1125,10 +1118,11 @@ failed to register hydra.gnu.org public key: ~a~%" status))))))))
                       "--substitute-urls" #$(string-join substitute-urls)
                       #$@extra-options)
 
-                ;; Add 'lsof' (for the GC) and 'lsh' (for offloading) to the
-                ;; daemon's $PATH.
+                ;; Add 'lsof' (for the GC) to the daemon's $PATH.
                 #:environment-variables
-                (list (string-append "PATH=" #$lsof "/bin:" #$lsh "/bin"))))
+                (list (string-append "PATH=" #$lsof "/bin"))
+
+                #:log-file #$log-file))
             (stop #~(make-kill-destructor)))))))
 
 (define (guix-accounts config)
@@ -1192,7 +1186,7 @@ failed to register hydra.gnu.org public key: ~a~%" status))))))))
             (provision '(guix-publish))
             (requirement '(guix-daemon))
             (start #~(make-forkexec-constructor
-                      (list (string-append #$guix "/bin/guix")
+                      (list #$(file-append guix "/bin/guix")
                             "publish" "-u" "guix-publish"
                             "-p" #$(number->string port)
                             (string-append "--listen=" #$host))))
@@ -1346,7 +1340,7 @@ item of @var{packages}."
                     ;; The first one is for udev, the second one for eudev.
                     (setenv "UDEV_CONFIG_FILE" #$udev.conf)
                     (setenv "EUDEV_RULES_DIRECTORY"
-                            (string-append #$rules "/lib/udev/rules.d"))
+                            #$(file-append rules "/lib/udev/rules.d"))
 
                     (let ((pid (primitive-fork)))
                       (case pid
@@ -1359,11 +1353,11 @@ item of @var{packages}."
                          (wait-for-udevd)
 
                          ;; Trigger device node creation.
-                         (system* (string-append #$udev "/bin/udevadm")
+                         (system* #$(file-append udev "/bin/udevadm")
                                   "trigger" "--action=add")
 
                          ;; Wait for things to settle down.
-                         (system* (string-append #$udev "/bin/udevadm")
+                         (system* #$(file-append udev "/bin/udevadm")
                                   "settle")
                          pid)))))
          (stop #~(make-kill-destructor))
@@ -1434,7 +1428,7 @@ extra rules from the packages listed in @var{rules}."
                        ;; 'gpm' runs in the background and sets a PID file.
                        ;; Note that it requires running as "root".
                        (false-if-exception (delete-file "/var/run/gpm.pid"))
-                       (fork+exec-command (list (string-append #$gpm "/sbin/gpm")
+                       (fork+exec-command (list #$(file-append gpm "/sbin/gpm")
                                                 #$@options))
 
                        ;; Wait for the PID file to appear; declare failure if
@@ -1449,7 +1443,7 @@ extra rules from the packages listed in @var{rules}."
 
             (stop #~(lambda (_)
                       ;; Return #f if successfully stopped.
-                      (not (zero? (system* (string-append #$gpm "/sbin/gpm")
+                      (not (zero? (system* #$(file-append gpm "/sbin/gpm")
                                            "-k"))))))))))
 
 (define gpm-service-type
@@ -1478,7 +1472,7 @@ This service is not part of @var{%base-services}."
                            (default kmscon))
   (virtual-terminal        kmscon-configuration-virtual-terminal)
   (login-program           kmscon-configuration-login-program
-                           (default #~(string-append #$shadow "/bin/login")))
+                           (default (file-append shadow "/bin/login")))
   (login-arguments         kmscon-configuration-login-arguments
                            (default '("-p")))
   (hardware-acceleration?  kmscon-configuration-hardware-acceleration?
@@ -1496,7 +1490,7 @@ This service is not part of @var{%base-services}."
 
        (define kmscon-command
          #~(list
-            (string-append #$kmscon "/bin/kmscon") "--login"
+            #$(file-append kmscon "/bin/kmscon") "--login"
             "--vt" #$virtual-terminal
             #$@(if hardware-acceleration? '("--hwaccel") '())
             "--" #$login-program #$@login-arguments))
diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm
index 9f28aabc96..94c5f21557 100644
--- a/gnu/services/configuration.scm
+++ b/gnu/services/configuration.scm
@@ -30,6 +30,8 @@
             configuration-field-name
             configuration-missing-field
             configuration-field-error
+            configuration-field-serializer
+            configuration-field-getter
             serialize-configuration
             define-configuration
             validate-configuration
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
new file mode 100644
index 0000000000..c15a846bad
--- /dev/null
+++ b/gnu/services/cuirass.scm
@@ -0,0 +1,141 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
+;;; Copyright © 2016, 2017 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/>.
+
+(define-module (gnu services cuirass)
+  #:use-module (guix gexp)
+  #:use-module (guix records)
+  #:use-module (gnu packages admin)
+  #:autoload   (gnu packages ci) (cuirass)
+  #:use-module (gnu services)
+  #:use-module (gnu services base)
+  #:use-module (gnu services shepherd)
+  #:use-module (gnu system shadow)
+  #:export (<cuirass-configuration>
+            cuirass-configuration
+            cuirass-configuration?
+
+            cuirass-service-type))
+
+;;;; Commentary:
+;;;
+;;; This module implements a service that to run instances of Cuirass, a
+;;; continuous integration tool.
+;;;
+;;;; Code:
+
+(define-record-type* <cuirass-configuration>
+  cuirass-configuration make-cuirass-configuration
+  cuirass-configuration?
+  (cuirass          cuirass-configuration-cuirass ;package
+                    (default cuirass))
+  (log-file         cuirass-configuration-log-file ;string
+                    (default "/var/log/cuirass.log"))
+  (cache-directory  cuirass-configuration-cache-directory ;string (dir-name)
+                    (default "/var/cache/cuirass"))
+  (user             cuirass-configuration-user ;string
+                    (default "cuirass"))
+  (group            cuirass-configuration-group ;string
+                    (default "cuirass"))
+  (interval         cuirass-configuration-interval ;integer (seconds)
+                    (default 60))
+  (database         cuirass-configuration-database ;string (file-name)
+                    (default "/var/run/cuirass/cuirass.db"))
+  (specifications   cuirass-configuration-specifications)
+                                  ;gexp that evaluates to specification-alist
+  (use-substitutes? cuirass-configuration-use-substitutes? ;boolean
+                    (default #f))
+  (one-shot?        cuirass-configuration-one-shot? ;boolean
+                    (default #f)))
+
+(define (cuirass-shepherd-service config)
+  "Return a <shepherd-service> for the Cuirass service with CONFIG."
+  (and
+   (cuirass-configuration? config)
+   (let ((cuirass          (cuirass-configuration-cuirass config))
+         (cache-directory  (cuirass-configuration-cache-directory config))
+         (log-file         (cuirass-configuration-log-file config))
+         (user             (cuirass-configuration-user config))
+         (group            (cuirass-configuration-group config))
+         (interval         (cuirass-configuration-interval config))
+         (database         (cuirass-configuration-database config))
+         (specs            (cuirass-configuration-specifications config))
+         (use-substitutes? (cuirass-configuration-use-substitutes? config))
+         (one-shot?        (cuirass-configuration-one-shot? config)))
+     (list (shepherd-service
+            (documentation "Run Cuirass.")
+            (provision '(cuirass))
+            (requirement '(guix-daemon))
+            (start #~(make-forkexec-constructor
+                      (list (string-append #$cuirass "/bin/cuirass")
+                            "--cache-directory" #$cache-directory
+                            "--specifications"
+                            #$(scheme-file "cuirass-specs.scm" specs)
+                            "--database" #$database
+                            "--interval" #$(number->string interval)
+                            #$@(if use-substitutes? '("--use-substitutes") '())
+                            #$@(if one-shot? '("--one-shot") '()))
+                      #:user #$user
+                      #:group #$group
+                      #:log-file #$log-file))
+            (stop #~(make-kill-destructor)))))))
+
+(define (cuirass-account config)
+  "Return the user accounts and user groups for CONFIG."
+  (let ((cuirass-user  (cuirass-configuration-user config))
+        (cuirass-group (cuirass-configuration-group config)))
+    (list (user-group
+           (name cuirass-group)
+           (system? #t))
+          (user-account
+           (name cuirass-user)
+           (group cuirass-group)
+           (system? #t)
+           (comment "Cuirass privilege separation user")
+           (home-directory (string-append "/var/run/" cuirass-user))
+           (shell #~(string-append #$shadow "/sbin/nologin"))))))
+
+(define (cuirass-activation config)
+  "Return the activation code for CONFIG."
+  (let ((cache (cuirass-configuration-cache-directory config))
+        (db    (dirname (cuirass-configuration-database config)))
+        (user  (cuirass-configuration-user config))
+        (group (cuirass-configuration-group config)))
+    (with-imported-modules '((guix build utils))
+      #~(begin
+          (use-modules (guix build utils))
+
+          (mkdir-p #$cache)
+          (mkdir-p #$db)
+
+          (let ((uid (passwd:uid (getpw #$user)))
+                (gid (group:gid (getgr #$group))))
+            (chown #$cache uid gid)
+            (chown #$db uid gid))))))
+
+(define cuirass-service-type
+  (service-type
+   (name 'cuirass)
+   (extensions
+    (list
+     (service-extension profile-service-type      ;for 'info cuirass'
+                        (compose list cuirass-configuration-cuirass))
+     (service-extension activation-service-type cuirass-activation)
+     (service-extension shepherd-root-service-type cuirass-shepherd-service)
+     (service-extension account-service-type cuirass-account)))))
+
diff --git a/gnu/services/cups.scm b/gnu/services/cups.scm
index 391046a75f..df1843e438 100644
--- a/gnu/services/cups.scm
+++ b/gnu/services/cups.scm
@@ -894,7 +894,7 @@ IPP specifications.")
                     (if (file-exists? dst)
                         (format (current-error-port) "warning: ~a exists\n" dst)
                         (symlink src dst))))
-                (find-files (string-append package path))))
+                (find-files (string-append package path) #:stat stat)))
              (list #$@paths)))
           (list #$@packages))
          #t))))
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index 1eed85542b..d88c839f7d 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -48,6 +48,10 @@
   postgresql-configuration?
   (postgresql     postgresql-configuration-postgresql ;<package>
                   (default postgresql))
+  (port           postgresql-configuration-port
+                  (default 5432))
+  (locale         postgresql-configuration-locale
+                  (default "en_US.utf8"))
   (config-file    postgresql-configuration-file)
   (data-directory postgresql-configuration-data-directory))
 
@@ -80,13 +84,18 @@ host	all	all	::1/128 	trust"))
 
 (define postgresql-activation
   (match-lambda
-    (($ <postgresql-configuration> postgresql config-file data-directory)
+    (($ <postgresql-configuration> postgresql port locale config-file data-directory)
      #~(begin
          (use-modules (guix build utils)
                       (ice-9 match))
 
          (let ((user (getpwnam "postgres"))
-               (initdb (string-append #$postgresql "/bin/initdb")))
+               (initdb (string-append #$postgresql "/bin/initdb"))
+               (initdb-args
+                (append
+                 (if #$locale
+                     (list (string-append "--locale=" #$locale))
+                     '()))))
            ;; Create db state directory.
            (mkdir-p #$data-directory)
            (chown #$data-directory (passwd:uid user) (passwd:gid user))
@@ -101,14 +110,19 @@ host	all	all	::1/128 	trust"))
                 (lambda ()
                   (setgid (passwd:gid user))
                   (setuid (passwd:uid user))
-                  (primitive-exit (system* initdb "-D" #$data-directory)))
+                  (primitive-exit
+                   (apply system*
+                          initdb
+                          "-D"
+                          #$data-directory
+                          initdb-args)))
                 (lambda ()
                   (primitive-exit 1))))
              (pid (waitpid pid))))))))
 
 (define postgresql-shepherd-service
   (match-lambda
-    (($ <postgresql-configuration> postgresql config-file data-directory)
+    (($ <postgresql-configuration> postgresql port locale config-file data-directory)
      (let ((start-script
             ;; Wrapper script that switches to the 'postgres' user before
             ;; launching daemon.
@@ -121,6 +135,7 @@ host	all	all	::1/128 	trust"))
                               (system* postgres
                                        (string-append "--config-file="
                                                       #$config-file)
+                                       "-p" (number->string #$port)
                                        "-D" #$data-directory)))))
        (list (shepherd-service
               (provision '(postgres))
@@ -140,6 +155,8 @@ host	all	all	::1/128 	trust"))
                                           (const %postgresql-accounts))))))
 
 (define* (postgresql-service #:key (postgresql postgresql)
+                             (port 5432)
+                             (locale "en_US.utf8")
                              (config-file %default-postgres-config)
                              (data-directory "/var/lib/postgresql/data"))
   "Return a service that runs @var{postgresql}, the PostgreSQL database server.
@@ -149,6 +166,8 @@ and stores the database cluster in @var{data-directory}."
   (service postgresql-service-type
            (postgresql-configuration
             (postgresql postgresql)
+            (port port)
+            (locale locale)
             (config-file config-file)
             (data-directory data-directory))))
 
@@ -160,7 +179,8 @@ and stores the database cluster in @var{data-directory}."
 (define-record-type* <mysql-configuration>
   mysql-configuration make-mysql-configuration
   mysql-configuration?
-  (mysql mysql-configuration-mysql (default mariadb)))
+  (mysql mysql-configuration-mysql (default mariadb))
+  (port mysql-configuration-port (default 3306)))
 
 (define %mysql-accounts
   (list (user-group
@@ -175,10 +195,11 @@ and stores the database cluster in @var{data-directory}."
 
 (define mysql-configuration-file
   (match-lambda
-    (($ <mysql-configuration> mysql)
-     (plain-file "my.cnf" "[mysqld]
+    (($ <mysql-configuration> mysql port)
+     (mixed-text-file "my.cnf" "[mysqld]
 datadir=/var/lib/mysql
 socket=/run/mysqld/mysqld.sock
+port=" (number->string port) "
 "))))
 
 (define (%mysql-activation config)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 7555780ade..36049587d3 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -40,6 +40,7 @@
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages suckless)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages libusb)
   #:use-module (guix records)
   #:use-module (guix packages)
   #:use-module (guix store)
@@ -753,6 +754,10 @@ with the administrator's password."
          (screen-locker-service slock)
          (screen-locker-service xlockmore "xlock")
 
+         ;; Add udev rules for MTP devices so that non-root users can access
+         ;; them.
+         (simple-service 'mtp udev-service-type (list libmtp))
+
          ;; The D-Bus clique.
          (avahi-service)
          (wicd-service)
diff --git a/gnu/services/kerberos.scm b/gnu/services/kerberos.scm
index a56f63082c..cb33a7c53d 100644
--- a/gnu/services/kerberos.scm
+++ b/gnu/services/kerberos.scm
@@ -17,14 +17,388 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu services kerberos)
-  #:use-module (gnu packages admin)
   #:use-module (gnu services)
+  #:use-module (gnu services configuration)
   #:use-module (gnu system pam)
   #:use-module (guix gexp)
   #:use-module (guix records)
+  #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-34)
+  #:use-module (srfi srfi-35)
+  #:use-module (ice-9 match)
   #:export (pam-krb5-configuration
             pam-krb5-configuration?
-            pam-krb5-service-type))
+            pam-krb5-service-type
+
+            krb5-realm
+            krb5-realm?
+
+            krb5-configuration
+            krb5-configuration?
+            krb5-service-type))
+
+
+
+(define unset-field (list 'unset-field))
+
+(define (predicate/unset pred)
+  (lambda (x) (or (eq? x unset-field) (pred x))))
+
+(define string/unset? (predicate/unset string?))
+(define boolean/unset? (predicate/unset boolean?))
+(define integer/unset? (predicate/unset integer?))
+
+(define (uglify-field-name field-name)
+  "Return FIELD-NAME with all instances of '-' replaced by '_' and any
+trailing '?' removed."
+  (let ((str (symbol->string field-name)))
+    (string-join (string-split (if (string-suffix? "?" str)
+                                   (substring str 0 (1- (string-length str)))
+                                   str)
+                               #\-)
+                 "_")))
+
+(define (serialize-field* field-name val)
+  (format #t "~a = ~a\n" (uglify-field-name field-name) val))
+
+(define (serialize-string/unset field-name val)
+  (unless (eq? val unset-field)
+      (serialize-field* field-name val)))
+
+(define (serialize-integer/unset field-name val)
+  (unless (eq? val unset-field)
+      (serialize-field* field-name val)))
+
+(define (serialize-boolean/unset field-name val)
+  (unless (eq? val unset-field)
+      (serialize-field* field-name
+                        (if val "true" "false"))))
+
+
+;; An end-point is an address such as "192.168.0.1"
+;; or an address port pair ("foobar.example.com" . 109)
+(define (end-point? val)
+  (match val
+    ((? string?) #t)
+    (((? string?) . (? integer?)) #t)
+    (_ #f)))
+
+(define (serialize-end-point field-name val)
+  (serialize-field* field-name
+                    (match val
+                      ((host . port)
+                       ;; The [] are needed in the case of IPv6 addresses
+                       (format #f "[~a]:~a" host port))
+                      (host
+                       (format #f "~a" host)))))
+
+(define (serialize-space-separated-string-list/unset field-name val)
+  (unless (eq? val unset-field)
+      (serialize-field* field-name (string-join val " "))))
+
+(define space-separated-string-list/unset?
+  (predicate/unset space-separated-string-list?))
+
+(define comma-separated-integer-list/unset?
+  (predicate/unset (lambda (val)
+                     (and (list? val)
+                          (and-map (lambda (x) (integer? x))
+                                   val)))))
+
+(define (serialize-comma-separated-integer-list/unset field-name val)
+  (unless (eq? val unset-field)
+      (serialize-field* field-name
+                       (string-drop ; Drop the leading comma
+                        (fold
+                         (lambda (i prev)
+                           (string-append prev "," (number->string i)))
+                         "" val) 1))))
+
+(define file-name? (predicate/unset
+                    (lambda (val)
+                      (string-prefix? "/" val))))
+
+(define (serialize-file-name field-name val)
+  (unless (eq? val unset-field)
+    (serialize-string field-name val)))
+
+(define (non-negative-integer? val)
+  (and (exact-integer? val) (not (negative? val))))
+
+(define (serialize-non-negative-integer/unset field-name val)
+  (unless (eq? val unset-field)
+    (serialize-field* field-name val)))
+
+(define (free-form-fields? val)
+  (match val
+    (() #t)
+    ((((? symbol?) . (? string)) . val) (free-form-fields? val))
+    (_ #f)))
+
+(define (serialize-free-form-fields field-name val)
+  (for-each (match-lambda ((k . v) (serialize-field* k v))) val))
+
+(define non-negative-integer/unset? (predicate/unset non-negative-integer?))
+
+(define (realm-list? val)
+  (and (list? val)
+       (and-map (lambda (x) (krb5-realm? x)) val)))
+
+(define (serialize-realm-list field-name val)
+  (format #t "\n[~a]\n" field-name)
+  (for-each (lambda (realm)
+              (format #t "\n~a = {\n" (krb5-realm-name realm))
+              (for-each (lambda (field)
+                          (unless (eq? 'name (configuration-field-name field))
+                            ((configuration-field-serializer field)
+                             (configuration-field-name field)
+                             ((configuration-field-getter field)
+                              realm)))) krb5-realm-fields)
+
+              (format #t "}\n")) val))
+
+
+
+;; For a more detailed explanation of these fields see man 5 krb5.conf
+(define-configuration krb5-realm
+  (name
+   (string/unset unset-field)
+   "The name of the realm.")
+
+  (kdc
+   (end-point unset-field)
+   "The host and port on which the realm's Key Distribution Server listens.")
+
+  (admin-server
+   (string/unset unset-field)
+   "The Host running the administration server for the realm.")
+
+  (master-kdc
+   (string/unset unset-field)
+   "If an attempt to get credentials fails because of an invalid password, 
+the client software will attempt to contact the master KDC.")
+
+  (kpasswd-server
+   (string/unset unset-field)
+   "The server where password changes are performed.")
+
+  (auth-to-local
+   (free-form-fields '())
+   "Rules to map between principals and local users.")
+
+  (auth-to-local-names
+   (free-form-fields '())
+   "Explicit mappings between principal names and local user names.")
+
+  (http-anchors
+   (free-form-fields '())
+   "Useful only when http proxy is used to access KDC or KPASSWD.")
+
+  ;; The following are useful only for working with V4 services
+  (default-domain
+    (string/unset unset-field)
+    "The domain used to expand host names when translating Kerberos 4 service
+principals to Kerberos 5 principals")
+
+  (v4-instance-convert
+   (free-form-fields '())
+   "Exceptions to the default-domain mapping rule.")
+
+  (v4-realm
+   (string/unset unset-field)
+   "Used  when the V4 realm name and the V5 realm name are not the same, but
+still share the same principal names and passwords"))
+
+
+
+;; For a more detailed explanation of these fields see man 5 krb5.conf
+(define-configuration krb5-configuration
+  (allow-weak-crypto?
+   (boolean/unset unset-field)
+   "If true, permits access to services which only offer weak encryption.")
+
+  (ap-req-checksum-type
+   (non-negative-integer/unset unset-field)
+   "The type of the AP-REQ checksum.")
+
+  (canonicalize?
+   (boolean/unset unset-field)
+   "Should principals in initial ticket requests be canonicalized?")
+
+  (ccache-type
+   (non-negative-integer/unset unset-field)
+   "The format of the credential cache type.")
+
+  (clockskew
+   (non-negative-integer/unset unset-field)
+   "Maximum allowable clock skew in seconds (default 300).")
+
+  (default-ccache-name
+    (file-name unset-field)
+    "The name of the default credential cache.")
+
+  (default-client-keytab-name
+    (file-name unset-field)
+    "The name of the default keytab for client credentials.")
+
+  (default-keytab-name
+    (file-name unset-field)
+    "The name of the default keytab file.")
+
+  (default-realm
+    (string/unset unset-field)
+    "The realm to be accessed if not explicitly specified by clients.")
+
+  (default-tgs-enctypes
+    (free-form-fields '())
+    "Session key encryption types when making TGS-REQ requests.")
+
+  (default-tkt-enctypes
+    (free-form-fields '())
+    "Session key encryption types when making AS-REQ requests.")
+
+  (dns-canonicalize-hostname?
+   (boolean/unset  unset-field)
+   "Whether name lookups will be used to canonicalize host names for use in 
+service principal names.")
+
+  (dns-lookup-kdc?
+   (boolean/unset unset-field)
+ "Should DNS SRV records should be used to locate the KDCs and other servers 
+not appearing in the realm specification")
+
+  (err-fmt
+   (string/unset unset-field)
+   "Custom error message formatting. If not #f error messages will be formatted 
+by substituting a normal error message for %M and an error code for %C in the 
+value.")
+
+  (forwardable?
+   (boolean/unset unset-field)
+   "Should initial tickets be forwardable by default?")
+
+  (ignore-acceptor-hostname?
+   (boolean/unset unset-field)
+   "When accepting GSSAPI or krb5 security contexts for host-based service 
+principals, ignore any hostname passed by the calling application, and allow 
+clients to authenticate to any service principal in the keytab matching the 
+service name and realm name.")
+
+  (k5login-authoritative?
+   (boolean/unset unset-field)
+   "If this flag is true, principals must be listed in a local user's k5login
+file to be granted login access, if a ~/.k5login file exists.")
+
+  (k5login-directory
+   (string/unset unset-field)
+   "If not #f, the library will look for a local user's @file{k5login} file 
+within the named directory (instead of the user's home directory), with a 
+file name corresponding to the local user name.")
+
+  (kcm-mach-service
+   (string/unset unset-field)
+   "The name of the bootstrap service used to contact the KCM daemon for the 
+KCM credential cache type.")
+
+  (kcm-socket
+   (file-name unset-field)
+ "Path to the Unix domain socket used to access the KCM daemon for the KCM 
+credential cache type.")
+
+  (kdc-default-options
+   (non-negative-integer/unset unset-field)
+   "Default KDC options (logored for multiple values) when requesting initial 
+tickets.")
+
+  (kdc-timesync
+   (non-negative-integer/unset unset-field)
+   "Attempt to compensate for clock skew between the KDC and client.")
+
+  (kdc-req-checksum-type
+   (non-negative-integer/unset unset-field)
+   "The type of checksum to use for the KDC requests. Relevant only for DES 
+keys")
+
+  (noaddresses?
+   (boolean/unset unset-field)
+   "If true, initial ticket requests will not be made with address restrictions.
+This enables their use across NATs.")
+
+  (permitted-enctypes
+   (space-separated-string-list/unset unset-field)
+   "All encryption types that are permitted for use in session key encryption.")
+
+  (plugin-base-dir
+   (file-name unset-field)
+   "The directory where krb5 plugins are located.")
+
+  (preferred-preauth-types
+   (comma-separated-integer-list/unset unset-field)
+   "The preferred pre-authentication types which the client will attempt before 
+others.")
+
+  (proxiable?
+   (boolean/unset unset-field)
+   "Should initial tickets be proxiable by default?")
+
+  (rdns?
+   (boolean/unset unset-field)
+   "Should reverse DNS lookup be used in addition to forward name lookup to 
+canonicalize host names for use in service principal names.")
+
+  (realm-try-domains
+   (integer/unset unset-field)
+   "Should a host's domain components should be used to determine the Kerberos 
+realm of the host.")
+
+  (renew-lifetime
+   (non-negative-integer/unset unset-field)
+   "The default renewable lifetime for initial ticket requests.")
+
+  (safe-checksum-type
+   (non-negative-integer/unset unset-field)
+   "The type of checksum to use for the KRB-SAFE requests.")
+
+  (ticket-lifetime
+   (non-negative-integer/unset unset-field)
+   "The default lifetime for initial ticket requests.")
+
+  (udp-preference-limit
+   (non-negative-integer/unset unset-field)
+   "When sending messages to the KDC, the library will try using TCP
+before UDP if the size of the message greater than this limit.")
+
+  (verify-ap-rereq-nofail?
+   (boolean/unset unset-field)
+ "If true, then attempts to verify initial credentials will fail if the client
+machine does not have a keytab.")
+
+  (realms
+   (realm-list '())
+   "The list of realms which clients may access."))
+
+
+(define (krb5-configuration-file config)
+  "Create a Kerberos 5 configuration file based on CONFIG"
+  (mixed-text-file "krb5.conf"
+                   "[libdefaults]\n\n"
+                   (with-output-to-string
+                     (lambda ()
+                       (serialize-configuration config
+                                                krb5-configuration-fields)))))
+
+(define (krb5-etc-service config)
+  (list `("krb5.conf" ,(krb5-configuration-file config))))
+
+
+(define krb5-service-type
+  (service-type (name 'krb5)
+                (extensions
+                 (list (service-extension etc-service-type
+                                          krb5-etc-service)))))
+
+
+
 
 (define-record-type* <pam-krb5-configuration>
   pam-krb5-configuration  make-pam-krb5-configuration
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index bbb9053008..d672ecf687 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -467,6 +467,9 @@ HiddenServicePort ~a ~a~%"
       (chown "/var/lib/tor" (passwd:uid %user) (passwd:gid %user))
       (chmod "/var/lib/tor" #o700)
 
+      ;; Make sure /var/lib is accessible to the 'tor' user.
+      (chmod "/var/lib" #o755)
+
       (for-each initialize
                 '#$(map hidden-service-name
                         (tor-configuration-hidden-services config)))))
diff --git a/gnu/services/sddm.scm b/gnu/services/sddm.scm
index 5bb58bd6f0..2ebfe22016 100644
--- a/gnu/services/sddm.scm
+++ b/gnu/services/sddm.scm
@@ -220,7 +220,7 @@ Relogin="              (if (sddm-configuration-relogin? config)
    (name "sddm-greeter")
    (auth
     (list
-     ;; Load environment form /etc/environment and ~/.pam_environment
+     ;; Load environment from /etc/environment and ~/.pam_environment
      (pam-entry
       (control "required")
       (module "pam_env.so"))
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index 3273184b9a..d8d5006abf 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -82,7 +82,7 @@
                     (loop (+ 1 fd))))
 
                 ;; Start shepherd.
-                (execl (string-append #$shepherd "/bin/shepherd")
+                (execl #$(file-append shepherd "/bin/shepherd")
                        "shepherd" "--config" #$shepherd-conf)))))
 
 (define shepherd-root-service-type
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 59e1e54e04..db895405a2 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -27,11 +27,12 @@
   #:use-module (gnu packages web)
   #:use-module (guix records)
   #:use-module (guix gexp)
+  #:use-module (srfi srfi-1)
   #:use-module (ice-9 match)
   #:export (nginx-configuration
             nginx-configuration?
-            nginx-vhost-configuration
-            nginx-vhost-configuration?
+            nginx-server-configuration
+            nginx-server-configuration?
             nginx-service
             nginx-service-type))
 
@@ -41,24 +42,24 @@
 ;;;
 ;;; Code:
 
-(define-record-type* <nginx-vhost-configuration>
-  nginx-vhost-configuration make-nginx-vhost-configuration
-  nginx-vhost-configuration?
-  (http-port           nginx-vhost-configuration-http-port
+(define-record-type* <nginx-server-configuration>
+  nginx-server-configuration make-nginx-server-configuration
+  nginx-server-configuration?
+  (http-port           nginx-server-configuration-http-port
                        (default 80))
-  (https-port          nginx-vhost-configuration-https-port
+  (https-port          nginx-server-configuration-https-port
                        (default 443))
-  (server-name         nginx-vhost-configuration-server-name
+  (server-name         nginx-server-configuration-server-name
                        (default (list 'default)))
-  (root                nginx-vhost-configuration-root
+  (root                nginx-server-configuration-root
                        (default "/srv/http"))
-  (index               nginx-vhost-configuration-index
+  (index               nginx-server-configuration-index
                        (default (list "index.html")))
-  (ssl-certificate     nginx-vhost-configuration-ssl-certificate
+  (ssl-certificate     nginx-server-configuration-ssl-certificate
                        (default "/etc/nginx/cert.pem"))
-  (ssl-certificate-key nginx-vhost-configuration-ssl-certificate-key
+  (ssl-certificate-key nginx-server-configuration-ssl-certificate-key
                        (default "/etc/nginx/key.pem"))
-  (server-tokens?      nginx-vhost-configuration-server-tokens?
+  (server-tokens?      nginx-server-configuration-server-tokens?
                        (default #f)))
 
 (define-record-type* <nginx-configuration>
@@ -67,56 +68,57 @@
   (nginx         nginx-configuration-nginx)         ;<package>
   (log-directory nginx-configuration-log-directory) ;string
   (run-directory nginx-configuration-run-directory) ;string
+  (server-blocks nginx-configuration-server-blocks) ;list
   (file          nginx-configuration-file))         ;string | file-like
 
 (define (config-domain-strings names)
  "Return a string denoting the nginx config representation of NAMES, a list
 of domain names."
- (string-concatenate
+ (string-join
   (map (match-lambda
-        ('default "_")
-        ((? string? str) str))
+        ('default "_ ")
+        ((? string? str) (string-append str " ")))
        names)))
 
 (define (config-index-strings names)
  "Return a string denoting the nginx config representation of NAMES, a list
 of index files."
- (string-concatenate
+ (string-join
   (map (match-lambda
-        ((? string? str) str))
+        ((? string? str) (string-append str " ")))
        names)))
 
-(define (default-nginx-vhost-config vhost)
+(define (default-nginx-server-config server)
   (string-append
    "    server {\n"
-   (if (nginx-vhost-configuration-http-port vhost)
+   (if (nginx-server-configuration-http-port server)
        (string-append "      listen "
-                      (number->string (nginx-vhost-configuration-http-port vhost))
+                      (number->string (nginx-server-configuration-http-port server))
                       ";\n")
        "")
-   (if (nginx-vhost-configuration-https-port vhost)
+   (if (nginx-server-configuration-https-port server)
        (string-append "      listen "
-                      (number->string (nginx-vhost-configuration-https-port vhost))
+                      (number->string (nginx-server-configuration-https-port server))
                       " ssl;\n")
        "")
    "      server_name " (config-domain-strings
-                         (nginx-vhost-configuration-server-name vhost))
+                         (nginx-server-configuration-server-name server))
                         ";\n"
-   (if (nginx-vhost-configuration-ssl-certificate vhost)
+   (if (nginx-server-configuration-ssl-certificate server)
        (string-append "      ssl_certificate "
-                      (nginx-vhost-configuration-ssl-certificate vhost) ";\n")
+                      (nginx-server-configuration-ssl-certificate server) ";\n")
        "")
-   (if (nginx-vhost-configuration-ssl-certificate-key vhost)
+   (if (nginx-server-configuration-ssl-certificate-key server)
        (string-append "      ssl_certificate_key "
-                      (nginx-vhost-configuration-ssl-certificate-key vhost) ";\n")
+                      (nginx-server-configuration-ssl-certificate-key server) ";\n")
        "")
-   "      root " (nginx-vhost-configuration-root vhost) ";\n"
-   "      index " (config-index-strings (nginx-vhost-configuration-index vhost)) ";\n"
-   "      server_tokens " (if (nginx-vhost-configuration-server-tokens? vhost)
+   "      root " (nginx-server-configuration-root server) ";\n"
+   "      index " (config-index-strings (nginx-server-configuration-index server)) ";\n"
+   "      server_tokens " (if (nginx-server-configuration-server-tokens? server)
                               "on" "off") ";\n"
    "    }\n"))
 
-(define (default-nginx-config log-directory run-directory vhost-list)
+(define (default-nginx-config log-directory run-directory server-list)
   (plain-file "nginx.conf"
               (string-append
                "user nginx nginx;\n"
@@ -129,7 +131,7 @@ of index files."
                "    uwsgi_temp_path " run-directory "/uwsgi_temp;\n"
                "    scgi_temp_path " run-directory "/scgi_temp;\n"
                "    access_log " log-directory "/access.log;\n"
-               (let ((http (map default-nginx-vhost-config vhost-list)))
+               (let ((http (map default-nginx-server-config server-list)))
                  (do ((http http (cdr http))
                       (block "" (string-append (car http) "\n" block )))
                      ((null? http) block)))
@@ -148,7 +150,8 @@ of index files."
 
 (define nginx-activation
   (match-lambda
-    (($ <nginx-configuration> nginx log-directory run-directory config-file)
+    (($ <nginx-configuration> nginx log-directory run-directory server-blocks
+                              config-file)
      #~(begin
          (use-modules (guix build utils))
 
@@ -164,17 +167,25 @@ of index files."
          (mkdir-p (string-append #$run-directory "/scgi_temp"))
          ;; Check configuration file syntax.
          (system* (string-append #$nginx "/sbin/nginx")
-                  "-c" #$config-file "-t")))))
+                  "-c" #$(or config-file
+                             (default-nginx-config log-directory
+                               run-directory server-blocks))
+                  "-t")))))
 
 (define nginx-shepherd-service
   (match-lambda
-    (($ <nginx-configuration> nginx log-directory run-directory config-file)
+    (($ <nginx-configuration> nginx log-directory run-directory server-blocks
+                              config-file)
      (let* ((nginx-binary (file-append nginx "/sbin/nginx"))
             (nginx-action
              (lambda args
                #~(lambda _
                    (zero?
-                    (system* #$nginx-binary "-c" #$config-file #$@args))))))
+                    (system* #$nginx-binary "-c"
+                             #$(or config-file
+                                   (default-nginx-config log-directory
+                                     run-directory server-blocks))
+                             #$@args))))))
 
        ;; TODO: Add 'reload' action.
        (list (shepherd-service
@@ -192,14 +203,20 @@ of index files."
                        (service-extension activation-service-type
                                           nginx-activation)
                        (service-extension account-service-type
-                                          (const %nginx-accounts))))))
+                                          (const %nginx-accounts))))
+                (compose concatenate)
+                (extend (lambda (config servers)
+                          (nginx-configuration
+                            (inherit config)
+                            (server-blocks
+                              (append (nginx-configuration-server-blocks config)
+                              servers)))))))
 
 (define* (nginx-service #:key (nginx nginx)
                         (log-directory "/var/log/nginx")
                         (run-directory "/var/run/nginx")
-                        (vhost-list (list (nginx-vhost-configuration)))
-                        (config-file
-                         (default-nginx-config log-directory run-directory vhost-list)))
+                        (server-list '())
+                        (config-file #f))
   "Return a service that runs NGINX, the nginx web server.
 
 The nginx daemon loads its runtime configuration from CONFIG-FILE, stores log
@@ -209,4 +226,5 @@ files in LOG-DIRECTORY, and stores temporary runtime files in RUN-DIRECTORY."
             (nginx nginx)
             (log-directory log-directory)
             (run-directory run-directory)
+            (server-blocks server-list)
             (file config-file))))
diff --git a/gnu/system/examples/desktop.tmpl b/gnu/system/examples/desktop.tmpl
index 82687e740b..21b4563b53 100644
--- a/gnu/system/examples/desktop.tmpl
+++ b/gnu/system/examples/desktop.tmpl
@@ -4,7 +4,7 @@
 
 (use-modules (gnu) (gnu system nss))
 (use-service-modules desktop)
-(use-package-modules certs)
+(use-package-modules certs gnome)
 
 (operating-system
   (host-name "antelope")
@@ -42,6 +42,7 @@
 
   ;; This is where we specify system-wide packages.
   (packages (cons* nss-certs         ;for HTTPS access
+                   gvfs              ;for user mounts
                    %base-packages))
 
   ;; Add GNOME and/or Xfce---we can choose at the log-in
diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm
index 4657b06b5f..067b291a5c 100644
--- a/gnu/system/grub.scm
+++ b/gnu/system/grub.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -177,9 +177,9 @@ STORE-MOUNT-POINT is its mount point; these are used to determine where the
 background image and fonts must be searched for.  SYSTEM must be the target
 system string---e.g., \"x86_64-linux\"."
   (define setup-gfxterm-body
-    ;; Intel systems need to be switched into graphics mode, whereas most
-    ;; other modern architectures have no other mode and therefore don't need
-    ;; to be switched.
+    ;; Intel and EFI systems need to be switched into graphics mode, whereas
+    ;; most other modern architectures have no other mode and therefore don't
+    ;; need to be switched.
     (if (string-match "^(x86_64|i[3-6]86)-" system)
         "
   # Leave 'gfxmode' to 'auto'.
@@ -188,6 +188,15 @@ system string---e.g., \"x86_64-linux\"."
   insmod video_bochs
   insmod video_cirrus
   insmod gfxterm
+
+  if [ \"${grub_platform}\" == efi ]; then
+    # This is for (U)EFI systems (these modules are unavailable in the
+    # non-EFI GRUB.)  If we don't load them, GRUB boots in \"blind mode\",
+    # which isn't convenient.
+    insmod efi_gop
+    insmod efi_uga
+  fi
+
   terminal_output gfxterm
 "
         ""))
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index dfa003f256..ad234fd9c1 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -255,8 +255,8 @@ the user's target storage device rather than on the RAM disk."
                     (persistent? #f)
                     (max-database-size (* 5 (expt 2 20)))))) ;5 MiB
 
-(define (installation-services)
-  "Return the list services for the installation image."
+(define %installation-services
+  ;; List of services of the installation system.
   (let ((motd (plain-file "motd" "
 Welcome to the installation of the Guix System Distribution!
 
@@ -377,8 +377,7 @@ Use Alt-F2 for documentation.
                   (home-directory "/home/guest"))))
 
     (issue %issue)
-
-    (services (installation-services))
+    (services %installation-services)
 
     ;; We don't need setuid programs so pass the empty list so we don't pull
     ;; additional programs here.
@@ -393,6 +392,7 @@ Use Alt-F2 for documentation.
                      grub                  ;mostly so xrefs to its manual work
                      cryptsetup
                      mdadm
+                     dosfstools         ;mkfs.fat, for the UEFI boot partition
                      btrfs-progs
                      wireless-tools iw wpa-supplicant-minimal iproute
                      ;; XXX: We used to have GNU fdisk here, but as of version
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
index 174239a566..a787072ba7 100644
--- a/gnu/system/linux-initrd.scm
+++ b/gnu/system/linux-initrd.scm
@@ -29,6 +29,7 @@
                 #:select (derivation->output-path))
   #:use-module (guix modules)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages disk)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages guile)
   #:use-module ((gnu packages make-bootstrap)
@@ -193,6 +194,9 @@ loaded at boot time in the order in which they appear."
       ,@(if (find (file-system-type-predicate "9p") file-systems)
             virtio-9p-modules
             '())
+      ,@(if (find (file-system-type-predicate "vfat") file-systems)
+            '("nls_iso8859-1")
+            '())
       ,@(if volatile-root?
             '("fuse")
             '())
@@ -205,6 +209,11 @@ loaded at boot time in the order in which they appear."
                   file-systems)
             (list e2fsck/static)
             '())
+      ,@(if (find (lambda (fs)
+                    (string-suffix? "fat" (file-system-type fs)))
+                  file-systems)
+            (list fatfsck/static)
+            '())
       ,@(if volatile-root?
             (list unionfs-fuse/static)
             '())))
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
index ecf1ac1923..4779b80e94 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -199,8 +199,15 @@ IMAGE, a disk image.  The QEMU VM is has access to MEMORY-SIZE MiB of RAM."
   (mlet %store-monad ((system (current-system)))
     (return #~(let ((image #$image))
                 ;; First we need a writable copy of the image.
-                (format #t "copying image '~a'...~%" image)
-                (copy-file image "disk.img")
+                (format #t "creating writable image from '~a'...~%" image)
+                (unless (zero? (system* #+(file-append qemu-minimal
+                                                       "/bin/qemu-img")
+                                        "create" "-f" "qcow2"
+                                        "-o"
+                                        (string-append "backing_file=" image)
+                                        "disk.img"))
+                  (error "failed to create writable QEMU image" image))
+
                 (chmod "disk.img" #o644)
                 `(,(string-append #$qemu-minimal "/bin/"
                                   #$(qemu-command system))
diff --git a/gnu/tests/mail.scm b/gnu/tests/mail.scm
new file mode 100644
index 0000000000..47328a54ae
--- /dev/null
+++ b/gnu/tests/mail.scm
@@ -0,0 +1,159 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Sou Bunnbu <iyzsong@member.fsf.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/>.
+
+(define-module (gnu tests mail)
+  #:use-module (gnu tests)
+  #:use-module (gnu system)
+  #:use-module (gnu system file-systems)
+  #:use-module (gnu system grub)
+  #:use-module (gnu system vm)
+  #:use-module (gnu services)
+  #:use-module (gnu services base)
+  #:use-module (gnu services mail)
+  #:use-module (gnu services networking)
+  #:use-module (guix gexp)
+  #:use-module (guix monads)
+  #:use-module (guix store)
+  #:export (%test-opensmtpd))
+
+(define %opensmtpd-os
+  (operating-system
+    (host-name "komputilo")
+    (timezone "Europe/Berlin")
+    (locale "en_US.UTF-8")
+    (bootloader (grub-configuration (device #f)))
+    (file-systems %base-file-systems)
+    (firmware '())
+    (services (cons*
+               (dhcp-client-service)
+               (service opensmtpd-service-type
+                        (opensmtpd-configuration
+                         (config-file
+                          (plain-file "smtpd.conf" "
+listen on 0.0.0.0
+accept from any for local deliver to mbox
+"))))
+               %base-services))))
+
+(define (run-opensmtpd-test)
+  "Return a test of an OS running OpenSMTPD service."
+  (mlet* %store-monad ((command (system-qemu-image/shared-store-script
+                                 (marionette-operating-system
+                                  %opensmtpd-os
+                                  #:imported-modules '((gnu services herd)))
+                                 #:graphic? #f)))
+    (define test
+      (with-imported-modules '((gnu build marionette))
+        #~(begin
+            (use-modules (rnrs base)
+                         (srfi srfi-64)
+                         (ice-9 rdelim)
+                         (ice-9 regex)
+                         (gnu build marionette))
+
+            (define marionette
+              (make-marionette
+               ;; Enable TCP forwarding of the guest's port 25.
+               '(#$command "-net" "user,hostfwd=tcp::1025-:25")))
+
+            (define (read-reply-code port)
+              "Read a SMTP reply from PORT and return its reply code."
+              (let* ((line      (read-line port))
+                     (mo        (string-match "([0-9]+)([ -]).*" line))
+                     (code      (string->number (match:substring mo 1)))
+                     (finished? (string= " " (match:substring mo 2))))
+                (if finished?
+                    code
+                    (read-reply-code port))))
+
+            (mkdir #$output)
+            (chdir #$output)
+
+            (test-begin "opensmptd")
+
+            (test-assert "service is running"
+              (marionette-eval
+               '(begin
+                  (use-modules (gnu services herd))
+                  (start-service 'smtpd)
+                  #t)
+               marionette))
+
+            (test-assert "mbox is empty"
+              (marionette-eval
+               '(and (file-exists? "/var/mail")
+                     (not (file-exists? "/var/mail/root")))
+               marionette))
+
+            (test-eq "accept an email"
+              #t
+              (let* ((smtp (socket AF_INET SOCK_STREAM 0))
+                     (addr (make-socket-address AF_INET INADDR_LOOPBACK 1025)))
+                (connect smtp addr)
+                ;; Be greeted.
+                (read-reply-code smtp)             ;220
+                ;; Greet the server.
+                (write-line "EHLO somehost" smtp)
+                (read-reply-code smtp)             ;250
+                ;; Set sender email.
+                (write-line "MAIL FROM: <someone>" smtp)
+                (read-reply-code smtp)             ;250
+                ;; Set recipient email.
+                (write-line "RCPT TO: <root>" smtp)
+                (read-reply-code smtp)             ;250
+                ;; Send message.
+                (write-line "DATA" smtp)
+                (read-reply-code smtp)             ;354
+                (write-line "Subject: Hello" smtp)
+                (newline smtp)
+                (write-line "Nice to meet you!" smtp)
+                (write-line "." smtp)
+                (read-reply-code smtp)             ;250
+                ;; Say goodbye.
+                (write-line "QUIT" smtp)
+                (read-reply-code smtp)             ;221
+                (close smtp)
+                #t))
+
+            (test-assert "mail arrived"
+              (marionette-eval
+               '(begin
+                  (use-modules (ice-9 popen)
+                               (ice-9 rdelim))
+
+                  (define (queue-empty?)
+                    (eof-object?
+                     (read-line
+                      (open-input-pipe "smtpctl show queue"))))
+
+                  (let wait ()
+                    (if (queue-empty?)
+                        (file-exists? "/var/mail/root")
+                        (begin (sleep 1) (wait)))))
+               marionette))
+
+            (test-end)
+            (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+
+    (gexp->derivation "opensmtpd-test" test)))
+
+(define %test-opensmtpd
+  (system-test
+   (name "opensmtpd")
+   (description "Send an email to a running OpenSMTPD server.")
+   (value (run-opensmtpd-test))))
diff --git a/gnu/tests/nfs.scm b/gnu/tests/nfs.scm
new file mode 100644
index 0000000000..1f28f5a5b8
--- /dev/null
+++ b/gnu/tests/nfs.scm
@@ -0,0 +1,131 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016 John Darrington <jmd@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/>.
+
+(define-module (gnu tests nfs)
+  #:use-module (gnu tests)
+  #:use-module (gnu system)
+  #:use-module (gnu system grub)
+  #:use-module (gnu system file-systems)
+  #:use-module (gnu system shadow)
+  #:use-module (gnu system vm)
+  #:use-module (gnu services)
+  #:use-module (gnu services base)
+  #:use-module (gnu services nfs)
+  #:use-module (gnu services networking)
+  #:use-module (gnu packages onc-rpc)
+  #:use-module (guix gexp)
+  #:use-module (guix store)
+  #:use-module (guix monads)
+  #:export (%test-nfs))
+
+(define %base-os
+  (operating-system
+    (host-name "olitupmok")
+    (timezone "Europe/Berlin")
+    (locale "en_US.UTF-8")
+
+    (bootloader (grub-configuration (device "/dev/sdX")))
+    (file-systems %base-file-systems)
+    (users %base-user-accounts)
+    (packages (cons*
+               rpcbind
+               %base-packages))
+    (services (cons*
+               (service rpcbind-service-type
+                        (rpcbind-configuration))
+               (dhcp-client-service)
+               %base-services))))
+
+(define (run-nfs-test name socket)
+  "Run a test of an OS running RPC-SERVICE, which should create SOCKET."
+  (mlet* %store-monad ((os ->   (marionette-operating-system
+                                 %base-os
+                                 #:imported-modules '((gnu services herd)
+                                                      (guix combinators))))
+                       (command (system-qemu-image/shared-store-script
+                                 os #:graphic? #f)))
+    (define test
+      (with-imported-modules '((gnu build marionette))
+        #~(begin
+            (use-modules (gnu build marionette)
+                         (srfi srfi-64))
+
+            (define marionette
+              (make-marionette (list #$command)))
+
+            (define (wait-for-socket file)
+              ;; Wait until SOCKET  exists in the guest
+              (marionette-eval
+               `(let loop ((i 10))
+                  (cond ((and (file-exists? ,file)
+                              (eq? 'socket (stat:type (stat ,file))))
+                         #t)
+                        ((> i 0)
+                         (sleep 1)
+                         (loop (- i 1)))
+                        (else
+                         (error "Socket didn't show up: " ,file))))
+               marionette))
+
+            (mkdir #$output)
+            (chdir #$output)
+
+            (test-begin "rpc-daemon")
+
+            ;; Wait for the rpcbind daemon to be up and running.
+            (test-eq "RPC service running"
+              'running!
+              (marionette-eval
+               '(begin
+                  (use-modules (gnu services herd))
+                  (start-service 'rpcbind-daemon)
+                  'running!)
+               marionette))
+
+            ;; Check the socket file and that the service is still running.
+            (test-assert "RPC socket exists"
+              (and
+                (wait-for-socket #$socket)
+                (marionette-eval
+                 '(begin
+                    (use-modules (gnu services herd)
+                                 (srfi srfi-1))
+
+                    (live-service-running
+                     (find (lambda (live)
+                             (memq 'rpcbind-daemon
+                                   (live-service-provision live)))
+                           (current-services))))
+                 marionette)))
+
+            (test-assert "Probe RPC daemon"
+              (marionette-eval
+               '(zero? (system* "rpcinfo" "-p"))
+               marionette))
+
+            (test-end)
+            (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+
+    (gexp->derivation name test)))
+
+(define %test-nfs
+  (system-test
+   (name "nfs")
+   (description "Test some things related to NFS.")
+   (value (run-nfs-test name "/var/run/rpcbind.sock"))))