diff options
62 files changed, 2186 insertions, 1086 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 764257a5cd..aa8b705be6 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -3359,23 +3359,8 @@ These build systems can also be used to produce executable programs, or lisp images which contain a set of packages pre-loaded. The build system uses naming conventions. For binary packages, the -package itself as well as its run-time dependencies should begin their -name with the lisp implementation, such as @code{sbcl-} for -@code{asdf-build-system/sbcl}. Beginning the input name with this -prefix will allow the build system to encode its location into the -resulting library, so that the input can be found at run-time. - -If dependencies are used only for tests, it is convenient to use a -different prefix in order to avoid having a run-time dependency on such -systems. For example, - -@example -(define-public sbcl-bordeaux-threads - (package - ... - (native-inputs `(("tests:cl-fiveam" ,sbcl-fiveam))) - ...)) -@end example +package name should be prefixed with the lisp implementation, such as +@code{sbcl-} for @code{asdf-build-system/sbcl}. Additionally, the corresponding source package should be labeled using the same convention as python packages (see @ref{Python Modules}), using @@ -3395,7 +3380,16 @@ expressions to be passed as the @code{#:entry-program} argument. If the system is not defined within its own @code{.asd} file of the same name, then the @code{#:asd-file} parameter should be used to specify -which file the system is defined in. +which file the system is defined in. Furthermore, if the package +defines a system for its tests in a separate file, it will be loaded +before the tests are run if it is specified by the +@code{#:test-asd-file} parameter. If it is not set, the files +@code{<system>-tests.asd}, @code{<system>-test.asd}, @code{tests.asd}, +and @code{test.asd} will be tried if they exist. + +If for some reason the package must be named in a different way than the +naming conventions suggest, the @code{#:asd-system-name} parameter can +be used to specify the name of the system. @end defvr @@ -7328,8 +7322,8 @@ Access to @file{/dev/sdX} usually requires root privileges. @end enumerate Once this is done, you should be able to reboot the system and boot from -the USB stick. The latter usually requires you to get in the BIOS' boot -menu, where you can choose to boot from the USB stick. +the USB stick. The latter usually requires you to get in the BIOS' or +UEFI boot menu, where you can choose to boot from the USB stick. @xref{Installing GuixSD in a VM}, if, instead, you would like to install GuixSD in a virtual machine (VM). @@ -7483,6 +7477,17 @@ install BIOS-based GRUB (which is the default), make sure a BIOS Boot Partition is available (@pxref{BIOS installation,,, grub, GNU GRUB manual}). +@cindex EFI, installation +@cindex UEFI, installation +@cindex ESP, EFI system partition +If you instead wish to use EFI-based GRUB, a FAT32 @dfn{EFI System Partition} +(ESP) is required. This partition should be mounted at @file{/boot/efi} and +must have the @code{esp} flag set. E.g., for @command{parted}: + +@example +parted /dev/sda set 1 esp on +@end example + Once you are done partitioning the target hard disk drive, you have to create a file system on the relevant partition(s)@footnote{Currently GuixSD only supports ext4 and btrfs file systems. In particular, code @@ -7522,6 +7527,11 @@ root partition): mount LABEL=my-root /mnt @end example +Also mount any other partitions you would like to use on the target +system relative to this path. If you have @file{/boot} on a separate +partition for example, mount it at @file{/mnt/boot} now so it is found +by @code{guix system init} afterwards. + Finally, if you plan to use one or more swap partitions (@pxref{Memory Concepts, swap space,, libc, The GNU C Library Reference Manual}), make sure to initialize them with @command{mkswap}. Assuming you have one @@ -7596,7 +7606,8 @@ in particular: @itemize @item Make sure the @code{grub-configuration} form refers to the device you -want to install GRUB on. +want to install GRUB on. You also need to specify the @code{grub-efi} +package if you wish to use native UEFI boot. @item Be sure that your partition labels match the value of their respective @@ -7885,7 +7896,7 @@ management, power management, and more, would look like this: @include os-config-desktop.texi @end lisp -A graphical environment with a choice of lightweight window managers +A graphical UEFI system with a choice of lightweight window managers instead of full-blown desktop environments would look like this: @lisp @@ -15283,7 +15294,12 @@ The number of seconds to wait for keyboard input before booting. Set to The @code{grub-theme} object describing the theme to use. @item @code{grub} (default: @code{grub}) -The GRUB package to use. +@cindex EFI, bootloader +@cindex UEFI, bootloader +@cindex BIOS, bootloader +The GRUB package to use. Currently either @code{grub}, for ``legacy'' +x86 BIOS systems, or @code{grub-efi}, for modern systems using the +@dfn{Unified Extensible Firmware Interface} (UEFI). @item @code{terminal-outputs} (default: @code{'gfxterm}) The output terminals used for the GRUB boot menu, as a list of symbols. @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Joshua S. Grant <jgrant@parenthetical.io> +;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,7 +35,8 @@ '((gnu system) (gnu system mapped-devices) (gnu system file-systems) - (gnu system grub) ; 'grub-configuration' + (gnu bootloader) + (gnu bootloader grub) (gnu system pam) (gnu system shadow) ; 'user-account' (gnu system linux-initrd) diff --git a/gnu/bootloader.scm b/gnu/bootloader.scm new file mode 100644 index 0000000000..4e77974d31 --- /dev/null +++ b/gnu/bootloader.scm @@ -0,0 +1,127 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 David Craven <david@craven.ch> +;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2017 Leo Famulari <leo@famulari.name> +;;; +;;; 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 bootloader) + #:use-module (guix discovery) + #:use-module (guix records) + #:use-module (guix ui) + #:use-module (srfi srfi-1) + #:export (bootloader + bootloader? + bootloader-name + bootloader-package + bootloader-installer + bootloader-configuration-file + bootloader-configuration-file-generator + + bootloader-configuration + bootloader-configuration? + bootloader-configuration-bootloader + bootloader-configuration-device + bootloader-configuration-menu-entries + bootloader-configuration-default-entry + bootloader-configuration-timeout + bootloader-configuration-theme + bootloader-configuration-terminal-outputs + bootloader-configuration-terminal-inputs + bootloader-configuration-serial-unit + bootloader-configuration-serial-speed + bootloader-configuration-additional-configuration + + %bootloaders + lookup-bootloader-by-name)) + + +;;; +;;; Bootloader record. +;;; + +;; The <bootloader> record contains fields expressing how the bootloader +;; should be installed. Every bootloader in gnu/bootloader/ directory +;; has to be described by this record. + +(define-record-type* <bootloader> + bootloader make-bootloader + bootloader? + (name bootloader-name) + (package bootloader-package) + (installer bootloader-installer) + (configuration-file bootloader-configuration-file) + (configuration-file-generator bootloader-configuration-file-generator)) + + +;;; +;;; Bootloader configuration record. +;;; + +;; The <bootloader-configuration> record contains bootloader independant +;; configuration used to fill bootloader configuration file. + +(define-record-type* <bootloader-configuration> + bootloader-configuration make-bootloader-configuration + bootloader-configuration? + (bootloader bootloader-configuration-bootloader) ; <bootloader> + (device bootloader-configuration-device ; string + (default #f)) + (menu-entries bootloader-configuration-menu-entries ; list of <boot-parameters> + (default '())) + (default-entry bootloader-configuration-default-entry ; integer + (default 0)) + (timeout bootloader-configuration-timeout ; seconds as integer + (default 5)) + (theme bootloader-configuration-theme ; bootloader-specific theme + (default #f)) + (terminal-outputs bootloader-configuration-terminal-outputs ; list of symbols + (default '(gfxterm))) + (terminal-inputs bootloader-configuration-terminal-inputs ; list of symbols + (default '())) + (serial-unit bootloader-configuration-serial-unit ; integer | #f + (default #f)) + (serial-speed bootloader-configuration-serial-speed ; integer | #f + (default #f)) + (additional-configuration bootloader-configuration-additional-configuration ; record + (default #f))) + + +;;; +;;; Bootloaders. +;;; + +(define (bootloader-modules) + "Return the list of bootloader modules." + (all-modules (map (lambda (entry) + `(,entry . "gnu/bootloader")) + %load-path))) + +(define %bootloaders + ;; The list of publically-known bootloaders. + (delay (fold-module-public-variables (lambda (obj result) + (if (bootloader? obj) + (cons obj result) + result)) + '() + (bootloader-modules)))) + +(define (lookup-bootloader-by-name name) + "Return the bootloader called NAME." + (or (find (lambda (bootloader) + (eq? name (bootloader-name bootloader))) + (force %bootloaders)) + (leave (G_ "~a: no such bootloader~%") name))) diff --git a/gnu/bootloader/extlinux.scm b/gnu/bootloader/extlinux.scm new file mode 100644 index 0000000000..67b8815d40 --- /dev/null +++ b/gnu/bootloader/extlinux.scm @@ -0,0 +1,120 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 David Craven <david@craven.ch> +;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@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 bootloader extlinux) + #:use-module (gnu bootloader) + #:use-module (gnu system) + #:use-module (gnu packages bootloaders) + #:use-module (guix gexp) + #:use-module (guix monads) + #:use-module (guix records) + #:use-module (guix utils) + #:export (extlinux-bootloader)) + +(define* (extlinux-configuration-file config entries + #:key + (system (%current-system)) + (old-entries '())) + "Return the U-Boot configuration file corresponding to CONFIG, a +<u-boot-configuration> object, and where the store is available at STORE-FS, a +<file-system> object. OLD-ENTRIES is taken to be a list of menu entries +corresponding to old generations of the system." + + (define all-entries + (append entries (bootloader-configuration-menu-entries config))) + + (define (boot-parameters->gexp params) + (let ((label (boot-parameters-label params)) + (kernel (boot-parameters-kernel params)) + (kernel-arguments (boot-parameters-kernel-arguments params)) + (initrd (boot-parameters-initrd params))) + #~(format port "LABEL ~a + MENU LABEL ~a + KERNEL ~a + FDTDIR ~a/lib/dtbs + INITRD ~a + APPEND ~a +~%" + #$label #$label + #$kernel #$kernel #$initrd + (string-join (list #$@kernel-arguments))))) + + (define builder + #~(call-with-output-file #$output + (lambda (port) + (let ((timeout #$(bootloader-configuration-timeout config))) + (format port "# This file was generated from your GuixSD configuration. Any changes +# will be lost upon reconfiguration. +UI menu.c32 +PROMPT ~a +TIMEOUT ~a~%" + (if (> timeout 0) 1 0) + ;; timeout is expressed in 1/10s of seconds. + (* 10 timeout)) + #$@(map boot-parameters->gexp all-entries) + + #$@(if (pair? old-entries) + #~((format port "~%") + #$@(map boot-parameters->gexp old-entries) + (format port "~%")) + #~()))))) + + (gexp->derivation "extlinux.conf" builder)) + + + + +;;; +;;; Install procedures. +;;; + +(define dd + #~(lambda (bs count if of) + (zero? (system* "dd" + (string-append "bs=" (number->string bs)) + (string-append "count=" (number->string count)) + (string-append "if=" if) + (string-append "of=" of))))) + +(define install-extlinux + #~(lambda (bootloader device mount-point) + (let ((extlinux (string-append bootloader "/sbin/extlinux")) + (install-dir (string-append mount-point "/boot/extlinux")) + (syslinux-dir (string-append bootloader "/share/syslinux"))) + (for-each (lambda (file) + (install-file file install-dir)) + (find-files syslinux-dir "\\.c32$")) + + (unless (and (zero? (system* extlinux "--install" install-dir)) + (#$dd 440 1 (string-append syslinux-dir "/mbr.bin") device)) + (error "failed to install SYSLINUX"))))) + + + +;;; +;;; Bootloader definitions. +;;; + +(define extlinux-bootloader + (bootloader + (name 'extlinux) + (package syslinux) + (installer install-extlinux) + (configuration-file "/boot/extlinux/extlinux.conf") + (configuration-file-generator extlinux-configuration-file))) diff --git a/gnu/system/grub.scm b/gnu/bootloader/grub.scm index 85878de85c..49616b7164 100644 --- a/gnu/system/grub.scm +++ b/gnu/bootloader/grub.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com> ;;; Copyright © 2017 Leo Famulari <leo@famulari.name> +;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,7 +19,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 system grub) +(define-module (gnu bootloader grub) #:use-module (guix store) #:use-module (guix packages) #:use-module (guix derivations) @@ -28,6 +29,7 @@ #:use-module (guix download) #:use-module (gnu artwork) #:use-module (gnu system) + #:use-module (gnu bootloader) #:use-module (gnu system file-systems) #:autoload (gnu packages bootloaders) (grub) #:autoload (gnu packages compression) (gzip) @@ -50,15 +52,10 @@ %background-image %default-theme - grub-configuration - grub-configuration? - grub-configuration-device - grub-configuration-grub + grub-bootloader + grub-efi-bootloader - menu-entry - menu-entry? - - grub-configuration-file)) + grub-configuration)) ;;; Commentary: ;;; @@ -106,29 +103,6 @@ denoting a file name." (color-highlight '((fg . yellow) (bg . black))) (color-normal '((fg . light-gray) (bg . black))))) ;XXX: #x303030 -(define-record-type* <grub-configuration> - grub-configuration make-grub-configuration - grub-configuration? - (grub grub-configuration-grub ; package - (default (@ (gnu packages bootloaders) grub))) - (device grub-configuration-device) ; string - (menu-entries grub-configuration-menu-entries ; list - (default '())) - (default-entry grub-configuration-default-entry ; integer - (default 0)) - (timeout grub-configuration-timeout ; integer - (default 5)) - (theme grub-configuration-theme ; <grub-theme> - (default %default-theme)) - (terminal-outputs grub-configuration-terminal-outputs ; list of symbols - (default '(gfxterm))) - (terminal-inputs grub-configuration-terminal-inputs ; list of symbols - (default '())) - (serial-unit grub-configuration-serial-unit ; integer | #f - (default #f)) - (serial-speed grub-configuration-serial-speed ; integer | #f - (default #f))) - (define-record-type* <menu-entry> menu-entry make-menu-entry menu-entry? @@ -147,6 +121,11 @@ denoting a file name." ;;; Background image & themes. ;;; +(define (bootloader-theme config) + "Return user defined theme in CONFIG if defined or %default-theme +otherwise." + (or (bootloader-configuration-theme config) %default-theme)) + (define* (svg->png svg #:key width height) "Build a PNG of HEIGHT x WIDTH from SVG." (gexp->derivation "grub-image.png" @@ -171,7 +150,8 @@ WIDTH/HEIGHT, or #f if none was found." (let* ((ratio (/ width height)) (image (find (lambda (image) (= (grub-image-aspect-ratio image) ratio)) - (grub-theme-images (grub-configuration-theme config))))) + (grub-theme-images + (bootloader-theme config))))) (if image (svg->png (grub-image-file image) #:width width #:height height) @@ -212,14 +192,14 @@ system string---e.g., \"x86_64-linux\"." "")) (define (setup-gfxterm config font-file) - (if (memq 'gfxterm (grub-configuration-terminal-outputs config)) - #~(format #f "if loadfont ~a; then + (if (memq 'gfxterm (bootloader-configuration-terminal-outputs config)) + #~(format #f "if loadfont ~a; then setup_gfxterm fi~%" #$font-file) - "")) + "")) (define (theme-colors type) - (let* ((theme (grub-configuration-theme config)) + (let* ((theme (bootloader-theme config)) (colors (type theme))) (string-append (symbol->string (assoc-ref colors 'fg)) "/" (symbol->string (assoc-ref colors 'bg))))) @@ -266,10 +246,10 @@ fi~%" is a string that can be inserted in grub.cfg." (let* ((symbols->string (lambda (list) (string-join (map symbol->string list) " "))) - (outputs (grub-configuration-terminal-outputs config)) - (inputs (grub-configuration-terminal-inputs config)) - (unit (grub-configuration-serial-unit config)) - (speed (grub-configuration-serial-speed config)) + (outputs (bootloader-configuration-terminal-outputs config)) + (inputs (bootloader-configuration-terminal-inputs config)) + (unit (bootloader-configuration-serial-unit config)) + (speed (bootloader-configuration-serial-speed config)) ;; Respectively, GRUB_TERMINAL_OUTPUT and GRUB_TERMINAL_INPUT, ;; as documented in GRUB manual section "Simple Configuration @@ -347,12 +327,13 @@ code." (system (%current-system)) (old-entries '())) "Return the GRUB configuration file corresponding to CONFIG, a -<grub-configuration> object, and where the store is available at STORE-FS, a -<file-system> object. OLD-ENTRIES is taken to be a list of menu entries -corresponding to old generations of the system." +<bootloader-configuration> object, and where the store is available at +STORE-FS, a <file-system> object. OLD-ENTRIES is taken to be a list of menu +entries corresponding to old generations of the system." (define all-entries - (append (map boot-parameters->menu-entry entries) - (grub-configuration-menu-entries config))) + (map boot-parameters->menu-entry + (append entries + (bootloader-configuration-menu-entries config)))) (define entry->gexp (match-lambda @@ -391,8 +372,8 @@ corresponding to old generations of the system." (format port " set default=~a set timeout=~a~%" - #$(grub-configuration-default-entry config) - #$(grub-configuration-timeout config)) + #$(bootloader-configuration-default-entry config) + #$(bootloader-configuration-timeout config)) #$@(map entry->gexp all-entries) #$@(if (pair? old-entries) @@ -404,4 +385,64 @@ submenu \"GNU system, old configurations...\" {~%") (gexp->derivation "grub.cfg" builder))) + + +;;; +;;; Install procedures. +;;; + +(define install-grub + #~(lambda (bootloader device mount-point) + ;; Install GRUB on DEVICE which is mounted at MOUNT-POINT. + (let ((grub (string-append bootloader "/sbin/grub-install")) + (install-dir (string-append mount-point "/boot"))) + ;; Tell 'grub-install' that there might be a LUKS-encrypted /boot or + ;; root partition. + (setenv "GRUB_ENABLE_CRYPTODISK" "y") + + (unless (zero? (system* grub "--no-floppy" + "--boot-directory" install-dir + device)) + (error "failed to install GRUB"))))) + + + +;;; +;;; Bootloader definitions. +;;; + +(define grub-bootloader + (bootloader + (name 'grub) + (package grub) + (installer install-grub) + (configuration-file "/boot/grub/grub.cfg") + (configuration-file-generator grub-configuration-file))) + +(define* grub-efi-bootloader + (bootloader + (inherit grub-bootloader) + (name 'grub-efi) + (package grub-efi))) + + +;;; +;;; Compatibility macros. +;;; + +(define-syntax grub-configuration + (syntax-rules (grub) + ((_ (grub package) fields ...) + (if (eq? package grub) + (bootloader-configuration + (bootloader grub-bootloader) + fields ...) + (bootloader-configuration + (bootloader grub-efi-bootloader) + fields ...))) + ((_ fields ...) + (bootloader-configuration + (bootloader grub-bootloader) + fields ...)))) + ;;; grub.scm ends here diff --git a/gnu/build/install.scm b/gnu/build/install.scm index 5cb6055a0c..9e30c0d23e 100644 --- a/gnu/build/install.scm +++ b/gnu/build/install.scm @@ -22,8 +22,7 @@ #:use-module (guix build store-copy) #:use-module (srfi srfi-26) #:use-module (ice-9 match) - #:export (install-grub - install-grub-config + #:export (install-boot-config evaluate-populate-directive populate-root-file-system reset-timestamps @@ -39,36 +38,17 @@ ;;; ;;; Code: -(define (install-grub grub.cfg device mount-point) - "Install GRUB with GRUB.CFG on DEVICE, which is assumed to be mounted on -MOUNT-POINT. - -Note that the caller must make sure that GRUB.CFG is registered as a GC root -so that the fonts, background images, etc. referred to by GRUB.CFG are not -GC'd." - (install-grub-config grub.cfg mount-point) - - ;; Tell 'grub-install' that there might be a LUKS-encrypted /boot or root - ;; partition. - (setenv "GRUB_ENABLE_CRYPTODISK" "y") - - (unless (zero? (system* "grub-install" "--no-floppy" - "--boot-directory" - (string-append mount-point "/boot") - device)) - (error "failed to install GRUB"))) - -(define (install-grub-config grub.cfg mount-point) - "Atomically copy GRUB.CFG into boot/grub/grub.cfg on the MOUNT-POINT. Note -that the caller must make sure that GRUB.CFG is registered as a GC root so -that the fonts, background images, etc. referred to by GRUB.CFG are not GC'd." - (let* ((target (string-append mount-point "/boot/grub/grub.cfg")) +(define (install-boot-config bootcfg bootcfg-location mount-point) + "Atomically copy BOOTCFG into BOOTCFG-LOCATION on the MOUNT-POINT. Note +that the caller must make sure that BOOTCFG is registered as a GC root so +that the fonts, background images, etc. referred to by BOOTCFG are not GC'd." + (let* ((target (string-append mount-point bootcfg-location)) (pivot (string-append target ".new"))) (mkdir-p (dirname target)) - ;; Copy GRUB.CFG instead of just symlinking it, because symlinks won't + ;; Copy BOOTCFG instead of just symlinking it, because symlinks won't ;; work when /boot is on a separate partition. Do that atomically. - (copy-file grub.cfg pivot) + (copy-file bootcfg pivot) (rename-file pivot target))) (define (evaluate-populate-directive directive target) diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index 7147ce1993..57619764ce 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -310,11 +310,11 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation." (unless register-closures? (reset-timestamps target)))) -(define (register-grub.cfg-root target bootcfg) +(define (register-bootcfg-root target bootcfg) "On file system TARGET, register BOOTCFG as a GC root." (let ((directory (string-append target "/var/guix/gcroots"))) (mkdir-p directory) - (symlink bootcfg (string-append directory "/grub.cfg")))) + (symlink bootcfg (string-append directory "/bootcfg")))) (define (install-efi grub esp config-file) "Write a self-contained GRUB EFI loader to the mounted ESP using CONFIG-FILE." @@ -346,7 +346,10 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation." (define* (initialize-hard-disk device #:key - grub.cfg + bootloader-package + bootcfg + bootcfg-location + bootloader-installer (grub-efi #f) (partitions '())) "Initialize DEVICE as a disk containing all the <partition> objects listed @@ -375,7 +378,10 @@ passing it a directory name where it is mounted." (display "mounting root partition...\n") (mkdir-p target) (mount (partition-device root) target (partition-file-system root)) - (install-grub grub.cfg device target) + (install-boot-config bootcfg bootcfg-location target) + (when bootloader-installer + (display "installing bootloader...\n") + (bootloader-installer bootloader-package device target)) (when esp ;; Mount the ESP somewhere and install GRUB UEFI image. @@ -402,8 +408,8 @@ passing it a directory name where it is mounted." (delete-file grub-config) (umount mount-point))) - ;; Register GRUB.CFG as a GC root. - (register-grub.cfg-root target grub.cfg) + ;; Register BOOTCFG as a GC root. + (register-bootcfg-root target bootcfg) (umount target))) diff --git a/gnu/local.mk b/gnu/local.mk index f1a3cf6dba..3ca546913c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -36,6 +36,9 @@ GNU_SYSTEM_MODULES = \ gnu.scm \ %D%/artwork.scm \ + %D%/bootloader.scm \ + %D%/bootloader/grub.scm \ + %D%/bootloader/extlinux.scm \ %D%/packages.scm \ %D%/packages/abduco.scm \ %D%/packages/abiword.scm \ @@ -443,7 +446,6 @@ GNU_SYSTEM_MODULES = \ \ %D%/system.scm \ %D%/system/file-systems.scm \ - %D%/system/grub.scm \ %D%/system/install.scm \ %D%/system/linux-container.scm \ %D%/system/linux-initrd.scm \ @@ -518,7 +520,9 @@ dist_patch_DATA = \ %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-dont-load-remote-icons.patch \ %D%/packages/patches/calibre-no-updates-dialog.patch \ + %D%/packages/patches/calibre-use-packaged-feedparser.patch \ %D%/packages/patches/cdparanoia-fpic.patch \ %D%/packages/patches/cdrtools-3.01-mkisofs-isoinfo.patch \ %D%/packages/patches/ceph-disable-cpu-optimizations.patch \ @@ -644,6 +648,7 @@ dist_patch_DATA = \ %D%/packages/patches/graphite2-non-linear-classes-even-number.patch \ %D%/packages/patches/grep-timing-sensitive-test.patch \ %D%/packages/patches/gsl-test-i686.patch \ + %D%/packages/patches/gspell-dash-test.patch \ %D%/packages/patches/guile-1.8-cpp-4.5.patch \ %D%/packages/patches/guile-default-utf8.patch \ %D%/packages/patches/guile-linux-syscalls.patch \ @@ -684,6 +689,9 @@ dist_patch_DATA = \ %D%/packages/patches/jasper-CVE-2017-6850.patch \ %D%/packages/patches/jbig2dec-ignore-testtest.patch \ %D%/packages/patches/jbig2dec-CVE-2016-9601.patch \ + %D%/packages/patches/jbig2dec-CVE-2017-7885.patch \ + %D%/packages/patches/jbig2dec-CVE-2017-7975.patch \ + %D%/packages/patches/jbig2dec-CVE-2017-7976.patch \ %D%/packages/patches/jq-CVE-2015-8863.patch \ %D%/packages/patches/kdbusaddons-kinit-file-name.patch \ %D%/packages/patches/khmer-use-libraries.patch \ @@ -943,6 +951,7 @@ dist_patch_DATA = \ %D%/packages/patches/python2-subprocess32-disable-input-test.patch \ %D%/packages/patches/qemu-CVE-2017-7493.patch \ %D%/packages/patches/qt4-ldflags.patch \ + %D%/packages/patches/qtscript-disable-tests.patch \ %D%/packages/patches/quickswitch-fix-dmenu-check.patch \ %D%/packages/patches/rapicorn-isnan.patch \ %D%/packages/patches/ratpoison-shell.patch \ @@ -965,8 +974,6 @@ dist_patch_DATA = \ %D%/packages/patches/screen-fix-info-syntax-error.patch \ %D%/packages/patches/sdl-libx11-1.6.patch \ %D%/packages/patches/seq24-rename-mutex.patch \ - %D%/packages/patches/shadow-4.4-su-snprintf-fix.patch \ - %D%/packages/patches/shadow-CVE-2017-2616.patch \ %D%/packages/patches/slim-session.patch \ %D%/packages/patches/slim-config.patch \ %D%/packages/patches/slim-sigusr1.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 1610729c44..aa6ccc0a73 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -281,17 +281,15 @@ client and server, a telnet client and server, and an rsh client and server.") (define-public shadow (package (name "shadow") - (version "4.4") + (version "4.5") (source (origin (method url-fetch) (uri (string-append "https://github.com/shadow-maint/shadow/releases/" "download/" version "/shadow-" version ".tar.xz")) - (patches (search-patches "shadow-4.4-su-snprintf-fix.patch" - "shadow-CVE-2017-2616.patch")) (sha256 (base32 - "0g7hf55ar2pafg5g3ldx0fwzjk36wf4xb21p4ndanbjm3c2a9ab1")))) + "0hdpai78n63l3v3fgr3kkiqzhd0awrpfnnzz4mf7lmxdh61qb37w")))) (build-system gnu-build-system) (arguments '(;; Assume System V `setpgrp (void)', which is the default on GNU diff --git a/gnu/packages/aux-files/linux-libre/4.11-i686.conf b/gnu/packages/aux-files/linux-libre/4.11-i686.conf index 6234a980ae..93c1f1747b 100644 --- a/gnu/packages/aux-files/linux-libre/4.11-i686.conf +++ b/gnu/packages/aux-files/linux-libre/4.11-i686.conf @@ -935,8 +935,7 @@ CONFIG_XFRM_STATISTICS=y CONFIG_XFRM_IPCOMP=m CONFIG_NET_KEY=m # CONFIG_NET_KEY_MIGRATE is not set -CONFIG_SMC=m -CONFIG_SMC_DIAG=m +# CONFIG_SMC is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y CONFIG_IP_ADVANCED_ROUTER=y diff --git a/gnu/packages/aux-files/linux-libre/4.11-x86_64.conf b/gnu/packages/aux-files/linux-libre/4.11-x86_64.conf index d47a5d1226..ea6e5cc899 100644 --- a/gnu/packages/aux-files/linux-libre/4.11-x86_64.conf +++ b/gnu/packages/aux-files/linux-libre/4.11-x86_64.conf @@ -919,8 +919,7 @@ CONFIG_XFRM_STATISTICS=y CONFIG_XFRM_IPCOMP=m CONFIG_NET_KEY=m # CONFIG_NET_KEY_MIGRATE is not set -CONFIG_SMC=m -CONFIG_SMC_DIAG=m +# CONFIG_SMC is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y CONFIG_IP_ADVANCED_ROUTER=y diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm index ab5da5ffc5..136f141d8b 100644 --- a/gnu/packages/benchmark.scm +++ b/gnu/packages/benchmark.scm @@ -30,7 +30,7 @@ (define-public fio (package (name "fio") - (version "2.19") + (version "2.20") (source (origin (method url-fetch) (uri (string-append @@ -38,7 +38,7 @@ "fio-" version ".tar.bz2")) (sha256 (base32 - "0dwx2dpbsg3xyd8jzm64gazy6ij4zirlfdrbgcxr1a0z5smcmcw1")))) + "15vgbzlcjd21bi9ahlbs8h9ca4raw5qgi711n802qmagjdjbmlxw")))) (build-system gnu-build-system) (arguments '(#:test-target "test" @@ -78,8 +78,8 @@ (dst (string-append newbin "/" file))) (link src dst) (delete-file src))) - '("fio2gnuplot" "fio_latency2csv.py" - "fiologparser_hist.py" "fiologparser.py")) + '("fio2gnuplot" "fiologparser_hist.py" + "fiologparser.py")) ;; Make sure numpy et.al is found. (wrap-program (string-append newbin "/fiologparser_hist.py") `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 9f5d8141d8..9b4afbfcfb 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -614,7 +614,7 @@ Python.") (define-public python-biom-format (package (name "python-biom-format") - (version "2.1.5") + (version "2.1.6") (source (origin (method url-fetch) @@ -625,14 +625,15 @@ Python.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1n25w3p1rixbpac8iysmzcja6m4ip5r6sz19l8y6wlwi49hxn278")))) + "08cr7wpahk6zb31h4bs7jmzpvxcqv9s13xz40h6y2h656jvdvnpj")))) (build-system python-build-system) (propagated-inputs `(("python-numpy" ,python-numpy) ("python-scipy" ,python-scipy) ("python-future" ,python-future) ("python-click" ,python-click) - ("python-h5py" ,python-h5py))) + ("python-h5py" ,python-h5py) + ("python-pandas" ,python-pandas))) (native-inputs `(("python-nose" ,python-nose))) (home-page "http://www.biom-format.org") @@ -2092,7 +2093,7 @@ identify enrichments with functional annotations of the genome.") (define-public diamond (package (name "diamond") - (version "0.8.38") + (version "0.9.0") (source (origin (method url-fetch) (uri (string-append @@ -2101,7 +2102,7 @@ identify enrichments with functional annotations of the genome.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0q2z6z5f7c0kbbzpjamkcyqg0rc6h5rxfp97qbmb0wxaycr7jajq")))) + "19lvz661mmgikbry0nvnsjc01fdxqbw9rl2868dvjfraxbcx9ras")))) (build-system cmake-build-system) (arguments '(#:tests? #f ; no "check" target @@ -2121,8 +2122,7 @@ translated DNA query sequences against a protein reference database (BLASTP and BLASTX alignment mode). The speedup over BLAST is up to 20,000 on short reads at a typical sensitivity of 90-99% relative to BLAST depending on the data and settings.") - (license (license:non-copyleft "file://src/COPYING" - "See src/COPYING in the distribution.")))) + (license license:agpl3+))) (define-public discrover (package @@ -2417,7 +2417,7 @@ similarity of community members.") (define-public fasttree (package (name "fasttree") - (version "2.1.9") + (version "2.1.10") (source (origin (method url-fetch) (uri (string-append @@ -2425,7 +2425,7 @@ similarity of community members.") version ".c")) (sha256 (base32 - "0ljvvw8i1als1wbfzvrf15c3ii2vw9db20a259g6pzg34xyyb97k")))) + "0vcjdvy1j4m702vmak4svbfkrpcw63k7wymfksjp9a982zy8kjsl")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no "check" target @@ -2551,7 +2551,7 @@ Illumina, Roche 454, and the SOLiD platform.") (define-public fraggenescan (package (name "fraggenescan") - (version "1.20") + (version "1.30") (source (origin (method url-fetch) @@ -2559,7 +2559,7 @@ Illumina, Roche 454, and the SOLiD platform.") (string-append "mirror://sourceforge/fraggenescan/" "FragGeneScan" version ".tar.gz")) (sha256 - (base32 "1zzigqmvqvjyqv4945kv6nc5ah2xxm1nxgrlsnbzav3f5c0n0pyj")))) + (base32 "158dcnwczgcyhwm4qlx19sanrwgdpzf6bn2y57mbpx55lkgz1mzj")))) (build-system gnu-build-system) (arguments `(#:phases @@ -2574,6 +2574,7 @@ Illumina, Roche 454, and the SOLiD platform.") (string-append "system(\"" (which "rm"))) (("system\\(\"mv") (string-append "system(\"" (which "mv"))) + (("\\\"awk") (string-append "\"" (which "awk"))) ;; This script and other programs expect the training files ;; to be in the non-standard location bin/train/XXX. Change ;; this to be share/fraggenescan/train/XXX instead. @@ -2583,10 +2584,7 @@ Illumina, Roche 454, and the SOLiD platform.") "train/\".$FGS_train_file;"))) (substitute* "run_hmm.c" (("^ strcat\\(train_dir, \\\"train/\\\"\\);") - (string-append " strcpy(train_dir, \"" share "/train/\");"))) - (substitute* "post_process.pl" - (("^my \\$dir = substr.*") - (string-append "my $dir = \"" share "\";")))) + (string-append " strcpy(train_dir, \"" share "/train/\");")))) #t)) (replace 'build (lambda _ (and (zero? (system* "make" "clean")) @@ -2598,8 +2596,6 @@ Illumina, Roche 454, and the SOLiD platform.") (share (string-append out "/share/fraggenescan/train"))) (install-file "run_FragGeneScan.pl" bin) (install-file "FragGeneScan" bin) - (install-file "FGS_gff.py" bin) - (install-file "post_process.pl" bin) (copy-recursively "train" share)))) (delete 'check) (add-after 'install 'post-install-check @@ -2607,8 +2603,9 @@ Illumina, Roche 454, and the SOLiD platform.") ;; output files gets created. (lambda* (#:key outputs #:allow-other-keys) (let* ((out (string-append (assoc-ref outputs "out"))) - (bin (string-append out "/bin/"))) - (and (zero? (system* (string-append bin "run_FragGeneScan.pl") + (bin (string-append out "/bin/")) + (frag (string-append bin "run_FragGeneScan.pl"))) + (and (zero? (system* frag ; Test complete genome. "-genome=./example/NC_000913.fna" "-out=./test2" "-complete=1" @@ -2616,7 +2613,13 @@ Illumina, Roche 454, and the SOLiD platform.") (file-exists? "test2.faa") (file-exists? "test2.ffn") (file-exists? "test2.gff") - (file-exists? "test2.out")))))))) + (file-exists? "test2.out") + (zero? (system* ; Test incomplete sequences. + frag + "-genome=./example/NC_000913-fgs.ffn" + "-out=out" + "-complete=0" + "-train=454_30"))))))))) (inputs `(("perl" ,perl) ("python" ,python-2))) ;not compatible with python 3. @@ -2696,6 +2699,46 @@ comment or quality sections.") (supported-systems '("x86_64-linux")) (license license:expat)))) +(define-public gemma + (package + (name "gemma") + (version "0.96") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/xiangzhou/GEMMA/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "055ynn16gd12pf78n4vr2a9jlwsbwzajpdnf2y2yilg1krfff222")))) + (inputs + `(("gsl" ,gsl) + ("lapack" ,lapack) + ("zlib" ,zlib))) + (build-system gnu-build-system) + (arguments + `(#:make-flags '("FORCE_DYNAMIC=1") ; use shared libs + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'bin-mkdir + (lambda _ + (mkdir-p "bin"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (install-file "bin/gemma" + (string-append + out "/bin")))))) + #:tests? #f)) ; no tests included yet + (home-page "https://github.com/xiangzhou/GEMMA") + (synopsis "Tool for genome-wide efficient mixed model association") + (description + "Genome-wide Efficient Mixed Model Association (GEMMA) provides a +standard linear mixed model resolver with application in genome-wide +association studies (GWAS).") + (license license:gpl3))) + (define-public grit (package (name "grit") @@ -4054,7 +4097,7 @@ partial genes, and identifies translation initiation sites.") (define-public roary (package (name "roary") - (version "3.7.0") + (version "3.8.2") (source (origin (method url-fetch) @@ -4063,7 +4106,7 @@ partial genes, and identifies translation initiation sites.") version ".tar.gz")) (sha256 (base32 - "0x2hpb3nfsc6x2nq1788w0fhqfzc7cn2dp4xwyva9m3k6xlz0m43")))) + "03dfr2cd5fp80bcr65923zpdzrasvcxl7c2vgh8373v25a1yfap7")))) (build-system perl-build-system) (arguments `(#:phases @@ -5396,18 +5439,13 @@ Cuffdiff or Ballgown programs.") (define-public taxtastic (package (name "taxtastic") - (version "0.5.7") - ;; Versions after 0.5.4 do not appear to be distributed on PyPI so we - ;; download the package from GitHub. + (version "0.6.4") (source (origin (method url-fetch) - (uri (string-append - "https://github.com/fhcrc/taxtastic/archive/v" - version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) + (uri (pypi-uri "taxtastic" version)) (sha256 (base32 - "1s0h5y1lds1c40jhir5585ffm6yjyn8h5aqimpgv64rhqhfv56xx")))) + "0s79z8kfl853x7l4h8ms05k31q87aw62nrchlk20w9n227j35929")))) (build-system python-build-system) (arguments `(#:python ,python-2 @@ -7904,14 +7942,14 @@ library implementing most of the pipeline's features.") (define-public r-mutationalpatterns (package (name "r-mutationalpatterns") - (version "1.2.0") + (version "1.2.1") (source (origin (method url-fetch) (uri (bioconductor-uri "MutationalPatterns" version)) (sha256 (base32 - "00jh1qklj8jb9j7mwvkfybq368h2wg9yc2cwkgb7yb9vsw72r61d")))) + "1s50diwh1j6vg3mgahh6bczvq74mfdbmwjrad4d5lh723gnc5pjg")))) (build-system r-build-system) (propagated-inputs `(("r-biocgenerics" ,r-biocgenerics) diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm index 0a53e6ca99..1d64e9b69f 100644 --- a/gnu/packages/ebook.scm +++ b/gnu/packages/ebook.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2015, 2016 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com> +;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,7 +20,7 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu packages ebook) - #:use-module ((guix licenses) #:select (gpl3 lgpl2.1+)) + #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) @@ -27,8 +28,10 @@ #:use-module (guix build-system python) #:use-module (gnu packages) #:use-module (gnu packages databases) + #:use-module (gnu packages fonts) #:use-module (gnu packages fontutils) #:use-module (gnu packages freedesktop) + #:use-module (gnu packages gnome) #:use-module (gnu packages glib) #:use-module (gnu packages icu4c) #:use-module (gnu packages image) @@ -38,6 +41,7 @@ #:use-module (gnu packages python) #:use-module (gnu packages qt) #:use-module (gnu packages tls) + #:use-module (gnu packages web) #:use-module (gnu packages xorg)) (define-public chmlib @@ -56,12 +60,12 @@ (home-page "http://www.jedrea.com/chmlib/") (synopsis "Library for CHM files") (description "CHMLIB is a library for dealing with ITSS/CHM format files.") - (license lgpl2.1+))) + (license license:lgpl2.1+))) (define-public calibre (package (name "calibre") - (version "2.76.0") + (version "2.85.1") (source (origin (method url-fetch) @@ -70,33 +74,35 @@ version ".tar.xz")) (sha256 (base32 - "1xfm586n6gm44mkyn25mbiyhj6w9ji9yl6fvmnr4zk1q6qcga3v8")) + "1g8s0kp1gj05yysfgqpp2lgrxvzc0fsny1hwzx5jh9hvqn0b53cc")) ;; Remove non-free or doubtful code, see ;; https://lists.gnu.org/archive/html/guix-devel/2015-02/msg00478.html (modules '((guix build utils))) (snippet '(begin + (delete-file-recursively "src/calibre/ebooks/markdown") (delete-file-recursively "src/unrar") - (delete-file "src/odf/thumbnail.py"))) + (delete-file "src/odf/thumbnail.py") + (delete-file-recursively "resources/fonts/liberation") + (delete-file-recursively "src/chardet") + (substitute* (find-files "." "\\.py") + (("calibre\\.ebooks\\.markdown") "markdown")) + #t)) (patches (search-patches "calibre-drop-unrar.patch" + "calibre-use-packaged-feedparser.patch" + "calibre-dont-load-remote-icons.patch" "calibre-no-updates-dialog.patch")))) (build-system python-build-system) (native-inputs `(("pkg-config" ,pkg-config) + ("font-liberation" ,font-liberation) ("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 + ("python2-flake8" ,python2-flake8) ("xdg-utils" ,xdg-utils))) - ;; FIXME: The following are missing inputs according to the documentation, - ;; but the package can apparently be used without them, - ;; They may need to be added if a deficiency is detected. - ;; BeautifulSoup >= 3.0.5 - ;; dnspython >= 1.6.0 - ;; poppler >= 0.20.2 - ;; libwmf >= 0.2.8 - ;; psutil >= 0.6.1 - ;; python-pygments >= 2.0.1 ; used for ebook editing + ;; Beautifulsoup3 is bundled but obsolete and not packaged, so just leave it bundled. (inputs `(("chmlib" ,chmlib) ("fontconfig" ,fontconfig) @@ -108,16 +114,22 @@ ("libxrender" ,libxrender) ("openssl" ,openssl) ("podofo" ,podofo) + ("poppler" ,poppler) ("python" ,python-2) ("python2-apsw" ,python2-apsw) + ("python2-chardet" ,python2-chardet) ("python2-cssselect" ,python2-cssselect) ("python2-cssutils" ,python2-cssutils) ("python2-dateutil" ,python2-dateutil) ("python2-dbus" ,python2-dbus) + ("python2-dnspython" ,python2-dnspython) + ("python2-feedparser" ,python2-feedparser) ("python2-lxml" ,python2-lxml) + ("python2-markdown" ,python2-markdown) ("python2-mechanize" ,python2-mechanize) ("python2-netifaces" ,python2-netifaces) ("python2-pillow" ,python2-pillow) + ("python2-pygments" ,python2-pygments) ("python2-pyqt" ,python2-pyqt) ("python2-sip" ,python2-sip) ("sqlite" ,sqlite))) @@ -130,6 +142,12 @@ #:use-setuptools? #f #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-source + (lambda _ + (substitute* "src/calibre/linux.py" + ;; We can't use the uninstaller in Guix. Don't build it. + (("self\\.create_uninstaller()") "")) + #t)) (add-before 'build 'configure (lambda* (#:key inputs #:allow-other-keys) (let ((podofo (assoc-ref inputs "podofo")) @@ -137,7 +155,17 @@ (substitute* "setup/build_environment.py" (("sys.prefix") (string-append "'" pyqt "'"))) (setenv "PODOFO_INC_DIR" (string-append podofo "/include/podofo")) - (setenv "PODOFO_LIB_DIR" (string-append podofo "/lib")))))))) + (setenv "PODOFO_LIB_DIR" (string-append podofo "/lib"))))) + (add-after 'install 'install-font-liberation + (lambda* (#:key inputs outputs #:allow-other-keys) + (for-each (lambda (file) + (install-file file (string-append + (assoc-ref outputs "out") + "/share/calibre/fonts/liberation"))) + (find-files (string-append + (assoc-ref inputs "font-liberation") + "/share/fonts/truetype"))) + #t))))) (home-page "http://calibre-ebook.com/") (synopsis "E-book library management software") (description "Calibre is an ebook library manager. It can view, convert @@ -145,4 +173,16 @@ and catalog ebooks in most of the major ebook formats. It can also talk to many ebook reader devices. It can go out to the Internet and fetch metadata for books. It can download newspapers and convert them into ebooks for convenient reading.") - (license gpl3))) ; some files are under various other licenses, see COPYRIGHT + ;; Calibre is largely GPL3+, but includes a number of components covered + ;; by other licenses. See COPYRIGHT for more details. + (license (list license:gpl3+ + license:gpl2+ + license:lgpl2.1+ + license:lgpl2.1 + license:bsd-3 + license:expat + license:zpl2.1 + license:asl2.0 + license:public-domain + license:silofl1.1 + license:cc-by-sa3.0)))) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 3d9e83713e..4a0d20c9f1 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -1156,14 +1156,14 @@ rather than the contents of files.") (define-public emacs-async (package (name "emacs-async") - (version "1.9") + (version "1.9.2") (source (origin (method url-fetch) (uri (string-append "https://elpa.gnu.org/packages/async-" version ".tar")) (sha256 (base32 - "1ip5nc8xyln5szvqwp6wqva9xr84pn8ssn3nnphrszr19y4js2bm")))) + "17fnvrj7jww29sav6a6jpizclg4w2962m6h37akpii71gf0vrffw")))) (build-system emacs-build-system) (home-page "https://elpa.gnu.org/packages/async.html") (synopsis "Asynchronous processing in Emacs") @@ -3361,7 +3361,7 @@ Dust.js, React/JSX, Angularjs, ejs, etc.") (define-public emacs-helm (package (name "emacs-helm") - (version "1.9.8") + (version "2.7.0") (source (origin (method url-fetch) (uri (string-append @@ -3370,7 +3370,7 @@ Dust.js, React/JSX, Angularjs, ejs, etc.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "019dpzr6l83k1fgxn40aqxjvrpz4dl5d9vi7fc5wjnifmxaqxia6")))) + "1scdirpclgq3pi1j2c90gqaaqg1pgvasp98f4jqw8c5xbqcr7jdw")))) (build-system emacs-build-system) (propagated-inputs `(("emacs-async" ,emacs-async) @@ -3387,6 +3387,55 @@ considered to be its successor. Helm sets out to clean up the legacy code in not tied in the trap of backward compatibility.") (license license:gpl3+))) +(define-public emacs-helm-swoop + (package + (name "emacs-helm-swoop") + (version "1.7.2") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/ShingoFukuyama/helm-swoop/archive/" + version + ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1z34pfi0gsk054pxr906ilaalaw0xz3s536163gf9ykkwmc2356d")))) + (build-system emacs-build-system) + (propagated-inputs + `(("emacs-helm" ,emacs-helm))) + (home-page "https://github.com/ShingoFukuyama/helm-swoop") + (synopsis "Filter and jump to lines in an Emacs buffer using Helm") + (description + "This package builds on the Helm interface to provide several commands +for search-based navigation of buffers.") + (license license:gpl2+))) + +(define-public emacs-helm-projectile + (package + (name "emacs-helm-projectile") + (version "0.14.0") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/bbatsov/helm-projectile/archive/v" + version + ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "19cfmilqh8kbab3b2hmx6lyrj73q6vfmn3p730x95g23iz16mnd5")))) + (build-system emacs-build-system) + (propagated-inputs + `(("emacs-dash" ,emacs-dash) + ("emacs-helm" ,emacs-helm) + ("emacs-projectile" ,emacs-projectile))) + (home-page "https://github.com/bbatsov/helm-projectile") + (synopsis "Helm integration for Projectile") + (description + "This Emacs library provides a Helm interface for Projectile.") + (license license:gpl3+))) + (define-public emacs-cider (package (name "emacs-cider") @@ -3579,14 +3628,14 @@ passive voice.") (define-public emacs-org (package (name "emacs-org") - (version "20170502") + (version "20170515") (source (origin (method url-fetch) (uri (string-append "http://elpa.gnu.org/packages/org-" version ".tar")) (sha256 (base32 - "12inz804j55ycprb2m3ay54d1bhwhjssmn5nrfm7cfklyhfsy27s")))) + "0lfapcxil69x1a63cszgq72lqks1z3gpyxw7vcllqlgi7n7a4y6f")))) (build-system emacs-build-system) (home-page "http://orgmode.org/") (synopsis "Outline-based notes management and organizer") @@ -4145,7 +4194,7 @@ jQuery and Bootstrap resources included via osscdn.") (define-public emacspeak (package (name "emacspeak") - (version "45.0") + (version "46.0") (source (origin (method url-fetch) @@ -4154,7 +4203,11 @@ jQuery and Bootstrap resources included via osscdn.") version "/emacspeak-" version ".tar.bz2")) (sha256 (base32 - "0npcr867xbbhwa0i7v26hnk4z2d51522jwcfwc594j74kbv3g6ka")))) + "15x4yfp3wl2fxm1nkx6pz3clw6zyw3argcsqxgcx6pa28sivlg2n")) + (modules '((guix build utils))) + (snippet + ;; Delete the bundled byte-compiled elisp files. + '(for-each delete-file (find-files "lisp" "\\.elc$"))))) (build-system gnu-build-system) (arguments '(#:make-flags (list (string-append "prefix=" @@ -4162,25 +4215,35 @@ jQuery and Bootstrap resources included via osscdn.") #:phases (modify-phases %standard-phases (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (substitute* "Makefile" - (("\\$\\(INSTALL\\) -d \\$\\(libdir\\)/servers/linux-outloud") - "") - (("\\$\\(INSTALL\\) -m 755 \\$\\{OUTLOUD\\}.*$") "") - (("\\*info\\*") "*")) - (substitute* "etc/emacspeak.sh.def" - (("<emacspeak-dir>") - (string-append (assoc-ref outputs "out") - "/share/emacs/site-lisp/emacspeak/lisp"))) + (lambda _ + ;; Configure Emacspeak according to etc/install.org. (zero? (system* "make" "config")))) - (add-after 'install 'install-espeak-server + (add-after 'build 'build-espeak + (lambda _ + (zero? (system* "make" "espeak")))) + (replace 'install (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (with-directory-excursion "servers/linux-espeak" - (and (zero? (system* "make")) - (zero? (system* "make" "install" - (string-append "PREFIX=" out)))))))) - (add-after 'install-espeak-server 'wrap-program + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (lisp (string-append out "/share/emacs/site-lisp/emacspeak")) + (info (string-append out "/share/info"))) + ;; According to etc/install.org, the Emacspeak directory should + ;; be copied to its installation destination. + (for-each + (lambda (file) + (copy-recursively file (string-append lisp "/" file))) + '("etc" "info" "lisp" "media" "servers" "sounds" "stumpwm" + "xsl")) + ;; Make sure emacspeak is loaded from the correct directory. + (substitute* "etc/emacspeak.sh" + (("exec emacs.*$") + (string-append "exec emacs -l " lisp + "/lisp/emacspeak-setup.el $CL_ALL"))) + ;; Install the convenient startup script. + (mkdir-p bin) + (copy-file "etc/emacspeak.sh" (string-append bin "/emacspeak"))) + #t)) + (add-after 'install 'wrap-program (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (emacspeak (string-append out "/bin/emacspeak")) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 3517f06acf..fc1e3dcf37 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -1059,14 +1059,14 @@ reference interpreter, using the Glk API.") (define-public fizmo (package (name "fizmo") - (version "0.7.9") + (version "0.8.4") (source (origin (method url-fetch) (uri (string-append "https://christoph-ender.de/fizmo/source/" name "-" version ".tar.gz")) (sha256 (base32 - "1w7cgyjrhgkadjrazijzhq7zh0pl5bfc6wl7mdpgh020y4kp46d7")))) + "1sd988db2302r7cbfcfghbmg8ck43c6hvnlnlpb0rqxb7pm9cwyy")))) (build-system gnu-build-system) (arguments '(#:configure-flags @@ -1079,12 +1079,13 @@ reference interpreter, using the Glk API.") (native-inputs `(("pkg-config" ,pkg-config))) (inputs - `(("libjpeg" ,libjpeg) + `(("freetype" ,freetype) + ("libjpeg" ,libjpeg) ("libpng" ,libpng) ("libsndfile" ,libsndfile) ("libxml2" ,libxml2) ("ncurses" ,ncurses) - ("sdl" ,sdl))) + ("sdl2" ,sdl2))) (home-page "https://christoph-ender.de/fizmo/") (synopsis "Z-machine interpreter") (description @@ -1410,14 +1411,14 @@ older games.") (define-public gamine (package (name "gamine") - (version "1.4") + (version "1.5") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/gamine-game/" "gamine-" version ".tar.gz")) (sha256 (base32 - "1iny959i1kl2ab6z5xi4s66mrvrwcarxyvjfp2k1sx532s8knk8h")))) + "08wnk7w84c2413hwny89j2cn89cvfdf67bfc6wl0bf475if0mf4h")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) @@ -1490,7 +1491,7 @@ is programmed in Haskell.") (define-public manaplus (package (name "manaplus") - (version "1.7.3.4") + (version "1.7.5.14") (source (origin (method url-fetch) (uri (string-append @@ -1498,7 +1499,7 @@ is programmed in Haskell.") version "/manaplus-" version ".tar.xz")) (sha256 (base32 - "0mbxzsgjg16pqa3jnxkd7wwvw1lrx455r7fvwjfhzp0yv7acrn10")))) + "1b5q79jkdrck5lq8lvhnpq2mly257r8lylp7b8sp8xn4365f86ch")))) (build-system gnu-build-system) (arguments '(#:configure-flags @@ -1512,7 +1513,6 @@ is programmed in Haskell.") ("curl" ,curl) ("libxml2" ,libxml2) ("mesa" ,mesa) - ("physfs" ,physfs) ("sdl-union" ,(sdl-union)))) (home-page "http://manaplus.org") (synopsis "Client for 'The Mana World' and similar games") @@ -2160,14 +2160,14 @@ and a game metadata scraper.") (define openttd-engine (package (name "openttd-engine") - (version "1.6.1") + (version "1.7.0") (source (origin (method url-fetch) (uri (string-append "http://binaries.openttd.org/releases/" version "/openttd-" version "-source.tar.xz")) (sha256 (base32 - "1ak32fj5xkk2fvmm3g8i7wzmk4bh2ijsp8fzvvw5wj6365p9j24v")) + "1q4r5860dpkkw4fpfz3f8mvdd8xjpnwwzr9zybgmgb255bs0g4yz")) (modules '((guix build utils))) (snippet ;; The DOS port contains proprietary software. @@ -2207,8 +2207,8 @@ and a game metadata scraper.") passengers by land, water and air. It is a re-implementation of Transport Tycoon Deluxe with many enhancements including multiplayer mode, internationalization support, conditional orders and the ability to clone, -autoreplace and autoupdate vehicles. This package only includes the game engine. When you start -it you will be prompted to download a graphics set.") +autoreplace and autoupdate vehicles. This package only includes the game +engine. When you start it you will be prompted to download a graphics set.") (home-page "http://openttd.org/") ;; This package is GPLv2, except for a few files located in ;; "src/3rdparty/" which are under the 3-clause BSD, LGPLv2.1+ and Zlib diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm index 4e8736cd71..1cb651c96b 100644 --- a/gnu/packages/ghostscript.scm +++ b/gnu/packages/ghostscript.scm @@ -132,6 +132,7 @@ printing, and psresize, for adjusting page sizes.") (name "ghostscript") (replacement ghostscript/fixed) (version "9.14.0") + ;; XXX Try removing the bundled copy of jbig2dec. (source (origin (method url-fetch) (uri (string-append "mirror://gnu/ghostscript/gnu-ghostscript-" diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index cec8baebfe..e81a3f0883 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -51,6 +51,7 @@ #:use-module (guix build-system trivial) #:use-module (gnu packages) #:use-module (gnu packages admin) + #:use-module (gnu packages aspell) #:use-module (gnu packages autotools) #:use-module (gnu packages avahi) #:use-module (gnu packages base) @@ -1870,7 +1871,7 @@ libraries written in C.") (define-public vte (package (name "vte") - (version "0.48.2") + (version "0.48.3") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -1878,7 +1879,7 @@ libraries written in C.") name "-" version ".tar.xz")) (sha256 (base32 - "14060d5rmjjmxaknrabhnsjwxni5wa3crg61mqxv8f7yxl0v6y62")))) + "1hsqc7238862mqnva5qqdfxnhpwq3ak6zx6kbjj95cs04wcgpad3")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) @@ -1905,7 +1906,7 @@ editors, IDEs, etc.") (package (inherit vte) (name "vte-ng") - (version "0.48.2.a") + (version "0.48.3.a") (native-inputs `(("gtk-doc" ,gtk-doc) ("gperf" ,gperf) @@ -1920,7 +1921,7 @@ editors, IDEs, etc.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0m0bqcppa9vzysxizbymwifpii1lgg1cjy7yphvb1ivxz1pk7bal")))) + "1wdkf090zclqy11hxdjgy8f6fgzajl0xzzirajikhbaiill7f8zh")))) (arguments `(#:configure-flags '("CXXFLAGS=-Wformat=0") #:phases (modify-phases %standard-phases @@ -2852,7 +2853,7 @@ playlists in a variety of formats.") (define-public aisleriot (package (name "aisleriot") - (version "3.22.1") + (version "3.22.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -2860,7 +2861,7 @@ playlists in a variety of formats.") name "-" version ".tar.xz")) (sha256 (base32 - "01ydq39kk8xvv8nbqqbh458gpmvx676sms71r1iix42z40a13caj")))) + "0a8cir7vgi67sncl0m7cypq11amardm7r68gr3q52a11l8ajycdx")))) (build-system glib-or-gtk-build-system) (arguments '(#:configure-flags @@ -3983,7 +3984,7 @@ classes for commonly used data structures.") (define-public gexiv2 (package (name "gexiv2") - (version "0.10.4") + (version "0.10.6") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -3991,7 +3992,7 @@ classes for commonly used data structures.") name "-" version ".tar.xz")) (sha256 (base32 - "190www3b61spfgwx42jw8h5hsz2996jcxky48k63468avjpk33dd")))) + "09aqsnpah71p9gx0ap2px2dyanrs7jmkkar6q114n9b7js8qh9qk")))) (build-system gnu-build-system) (native-inputs `(("glib" ,glib "bin") @@ -5350,7 +5351,7 @@ beautifying border effects.") (define-public dconf-editor (package (name "dconf-editor") - (version "3.22.1") + (version "3.22.3") (source (origin (method url-fetch) @@ -5359,7 +5360,7 @@ beautifying border effects.") name "-" version ".tar.xz")) (sha256 (base32 - "09n1ljryjgkmxwly542zb2dh9j7h76chc0br2bbhrhkwvjjmc3ha")))) + "1939yq3fl55c2dqkc6nzp6cbpxq9sli74gdj0rj7c50pwvbngwam")))) (build-system glib-or-gtk-build-system) (arguments '(#:phases @@ -6136,3 +6137,56 @@ accessibility infrastructure.") via speech and refreshable braille. Orca works with applications and toolkits that support the Assistive Technology Service Provider Interface (AT-SPI).") (license license:lgpl2.1+))) + +(define-public gspell + (package + (name "gspell") + (version "1.3.2") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "1n4kd5i11l79h8bpvx3cz79ww0b4z89y99h4czvyg80qlarn585w")) + (patches (search-patches "gspell-dash-test.patch")))) + (build-system glib-or-gtk-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-before 'check 'pre-check + (lambda* (#:key inputs #:allow-other-keys) + ;; Tests require a running X server. + (system "Xvfb :1 &") + (setenv "DISPLAY" ":1") + + ;; For the missing /etc/machine-id. + (setenv "DBUS_FATAL_WARNINGS" "0") + + ;; Allow Enchant and its Aspell backend to find the en_US + ;; dictionary. + (setenv "ASPELL_DICT_DIR" + (string-append (assoc-ref inputs "aspell-dict-en") + "/lib/aspell")) + #t))))) + (inputs + `(("enchant" ,enchant) + ("iso-codes" ,iso-codes) + ("gtk+" ,gtk+) + ("glib" ,glib))) + (native-inputs + `(("glib" ,glib "bin") + ("pkg-config" ,pkg-config) + ("xmllint" ,libxml2) + + ;; For tests. + ("xorg-server" ,xorg-server) + ("aspell-dict-en" ,aspell-dict-en))) + (home-page "https://wiki.gnome.org/Projects/gspell") + (synopsis "GNOME's alternative spell checker") + (description + "gspell provides a flexible API to add spell-checking to a GTK+ +application. It provides a GObject API, spell-checking to text entries and +text views, and buttons to choose the language.") + (license license:gpl2+))) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 3edb157704..440e7d550f 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -192,16 +192,14 @@ specifications are building blocks of S/MIME and TLS.") (define-public npth (package (name "npth") - (version "1.3") + (version "1.4") (source (origin (method url-fetch) - (uri (string-append - "mirror://gnupg/npth/npth-" - version ".tar.bz2")) + (uri (string-append "mirror://gnupg/npth/npth-" version ".tar.bz2")) (sha256 (base32 - "0am86vblapwz84254qpmhz0chk70g6qzh3wdxcs0gvba8d01ka5w")))) + "1wpijvxg5svj893q9vp5r83d9ipwhpbyphb55m89l5m36qc185c9")))) (build-system gnu-build-system) (home-page "https://www.gnupg.org") (synopsis "Non-preemptive thread library") @@ -217,14 +215,14 @@ compatible to GNU Pth.") (define-public gnupg (package (name "gnupg") - (version "2.1.20") + (version "2.1.21") (source (origin (method url-fetch) (uri (string-append "mirror://gnupg/gnupg/gnupg-" version ".tar.bz2")) (sha256 (base32 - "03cnd6gz8f4lf69inskssw57idrswcdimhccdyglmrlv6rlrmkr4")))) + "1p97limv29p01y79mgnzpwixa50lv53wgdl3ymk9idkmpaldisks")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index de8043d236..86902d5680 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -509,7 +509,10 @@ arithmetic ops.") (sha256 (base32 "04akiwab8iy5iy34razcvh9mcja9wy737civ3sbjxk4j143s1b2s")) (patches (search-patches "jbig2dec-ignore-testtest.patch" - "jbig2dec-CVE-2016-9601.patch")))) + "jbig2dec-CVE-2016-9601.patch" + "jbig2dec-CVE-2017-7885.patch" + "jbig2dec-CVE-2017-7975.patch" + "jbig2dec-CVE-2017-7976.patch")))) (build-system gnu-build-system) (synopsis "Decoder of the JBIG2 image compression format") diff --git a/gnu/packages/imagemagick.scm b/gnu/packages/imagemagick.scm index 48902bbfd0..bde3ebe402 100644 --- a/gnu/packages/imagemagick.scm +++ b/gnu/packages/imagemagick.scm @@ -46,14 +46,14 @@ ;; The 7 release series has an incompatible API, while the 6 series is still ;; maintained. Don't update to 7 until we've made sure that the ImageMagick ;; users are ready for the 7-series API. - (version "6.9.8-4") + (version "6.9.8-6") (source (origin (method url-fetch) (uri (string-append "mirror://imagemagick/ImageMagick-" version ".tar.xz")) (sha256 (base32 - "04fb0x8zc9z11127wsnxlzg0jcgs4xwlx8fxy4jac2y3mmmlzhm6")))) + "1sxg2wx3nrzbymh5wcqiv1x401nrz95xkrqgk3x446vx8lq7ln6w")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--with-frozenpaths" "--without-gcc-arch") diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 85f2bb975f..e86c904e71 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -840,16 +840,16 @@ IcedTea build harness.") (license license:gpl2+)))) (define-public icedtea-8 - (let* ((version "3.3.0") + (let* ((version "3.4.0") (drop (lambda (name hash) (origin (method url-fetch) (uri (string-append - "http://icedtea.classpath.org/download/drops/" + "http://icedtea.classpath.org/download/drops" "/icedtea8/" version "/" name ".tar.xz")) (sha256 (base32 hash)))))) (package (inherit icedtea-7) - (version "3.3.0") + (version "3.4.0") (source (origin (method url-fetch) (uri (string-append @@ -857,7 +857,7 @@ IcedTea build harness.") version ".tar.xz")) (sha256 (base32 - "02vmxa6gc6gizcri1fy797qmmm9y77vgi7gy9pwkk4agcw4zyr5p")) + "16if055973y6yw7n5gczp8iksvc31cy4p5by9lkbniadqj4z665m")) (modules '((guix build utils))) (snippet '(begin @@ -929,31 +929,34 @@ IcedTea build harness.") `(("jdk" ,icedtea-7 "jdk") ("openjdk-src" ,(drop "openjdk" - "0889n19w6rvpzxgmmk9hlgzdh9ya95qkc2ajgpnzr3h69g15nz48")) + "0va5i3zr8y8ncv914rz914jda9d88gq0viww3smdqnln8n78rszi")) + ("aarch32-drop" + ,(drop "aarch32" + "0cway5a5hcfyh4pzl9zz5xr7lil4gsliy6r5iqbaasd2d9alvqiq")) ("corba-drop" ,(drop "corba" - "0qcb72hhlsjgp6h9wd048qgyc88b7lfnxyc51xfyav0nhpfjnj8r")) + "1l9zr97a3kq00bj4i8wcdsjlz3xlfldxd8zhkcxikinwd5n0n8a7")) ("jaxp-drop" ,(drop "jaxp" - "1vyc7dw10x5k45jmi348y8min6sg651ns12zzn30fjzhpfi36nds")) + "0lqxrsr3xlpwm2na6f2rpl7znrz34dkb9dg3zjmympyjy4kqljn7")) ("jaxws-drop" ,(drop "jaxws" - "1dki6p39z1ms94cjvj5hd9q75q75g244c0xib82pma3q74jg6hx4")) + "1b3chckk10dzrpa7cswmcf1jvryaiwkj8lihfqjr5j7l668jwr4h")) ("jdk-drop" ,(drop "jdk" - "17czby3nylcglp7l3d90a4pz1izc1sslifv8hrmynm9hn4m9d3k8")) + "15lq0k2jv2x26x6vqkbljdcxk35i3b60pcsw3j1sdfmlk1xy6wgc")) ("langtools-drop" ,(drop "langtools" - "1h4azc21k58g9gn2y686wrvn9ahgac0ii7jhrrrmb5c1kjs0y2qv")) + "17xkb8ahkg04ri0bp5wblcp1a2lp8j7c83ic5zdbggvgm339k5s8")) ("hotspot-drop" ,(drop "hotspot" - "12bfgwhrjfhgj6a2dsysdwhirg0jx88pi44y7s8a1bdan1mp03r8")) + "0xpx8ykaq0ki6r0dl3dzca2xgp1p82z8mvsxcs2931ib667ncgcp")) ("nashorn-drop" ,(drop "nashorn" - "0bg9r16jffc64fhyczn4jpx7bkfw7w62prw65mh66vshqk4lbh0f")) + "1bnn4731lhlvg8axy4mjxgvh646yl22hp52wipx8cfca4vkn2f1z")) ("shenandoah-drop" ,(drop "shenandoah" - "0abjlsvz669i06mlks28wnh11mm55y5613990pn5j7hfbw8a34q5")) + "0fpxl8zlii1hpm777r875ys2cr5ih3gb6p1nm9jfa6krjrccrxv1")) ,@(fold alist-delete (package-native-inputs icedtea-7) '("gcj" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop" "jdk-drop" "langtools-drop" "hotspot-drop"))))))) @@ -3149,9 +3152,9 @@ C++, or Python actions. ANTLR provides excellent support for tree construction, tree walking, and translation.") (license license:public-domain))) -(define-public stringtemplate3 +(define-public java-stringtemplate-3 (package - (name "stringtemplate3") + (name "java-stringtemplate") (version "3.2.1") (source (origin (method url-fetch) @@ -3163,21 +3166,30 @@ tree walking, and translation.") "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is")))) (build-system ant-build-system) (arguments - `(#:jar-name "stringtemplate-3.2.1.jar" - #:tests? #f + `(#:jar-name (string-append ,name "-" ,version ".jar") + #:test-dir "test" + #:modules ((guix build ant-build-system) + (guix build utils) + (srfi srfi-1)) #:phases (modify-phases %standard-phases + (add-before 'check 'fix-tests + (lambda _ + (substitute* "build.xml" + (("\\$\\{test.home\\}/java") + "${test.home}/org")) + #t)) (add-before 'build 'generate-grammar (lambda _ - (let ((dir "src/org/antlr/stringtemplate/language/")) - (for-each (lambda (file) - (display file) - (newline) - (system* "antlr" "-o" dir (string-append dir file))) - '("template.g" "angle.bracket.template.g" "action.g" - "eval.g" "group.g" "interface.g")))))))) + (with-directory-excursion "src/org/antlr/stringtemplate/language/" + (every (lambda (file) + (format #t "~a\n" file) + (zero? (system* "antlr" file))) + '("template.g" "angle.bracket.template.g" "action.g" + "eval.g" "group.g" "interface.g")))))))) (native-inputs - `(("antlr" ,antlr2))) + `(("antlr" ,antlr2) + ("java-junit" ,java-junit))) (home-page "http://www.stringtemplate.org") (synopsis "Template engine to generate formatted text output") (description "StringTemplate is a java template engine (with ports for C#, @@ -3201,9 +3213,9 @@ StringTemplate also powers ANTLR.") ;; only grammar files with the antlr2 syntax. ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3. -(define-public stringtemplate4 - (package - (name "stringtemplate4") +(define-public java-stringtemplate + (package (inherit java-stringtemplate-3) + (name "java-stringtemplate") (version "4.0.8") (source (origin (method url-fetch) @@ -3215,36 +3227,36 @@ StringTemplate also powers ANTLR.") "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087")))) (build-system ant-build-system) (arguments - `(#:tests? #f - #:jar-name (string-append ,name "-" ,version ".jar") + `(#:jar-name (string-append ,name "-" ,version ".jar") + #:tests? #f ; FIXME: tests fail for unknown reasons + #:test-dir "test" + #:modules ((guix build ant-build-system) + (guix build utils) + (srfi srfi-1)) #:phases (modify-phases %standard-phases + (add-before 'check 'fix-test-target + (lambda _ + (substitute* "build.xml" + (("\\$\\{test.home\\}/java") "${test.home}/") + (("\\*Test.java") "Test*.java")) + #t)) (add-before 'build 'generate-grammar - (lambda* (#:key inputs #:allow-other-keys) - (chdir "src/org/stringtemplate/v4/compiler/") - (for-each (lambda (file) - (display file) - (newline) - (system* "antlr3" file)) - '("STParser.g" "Group.g" "CodeGenerator.g")) - (chdir "../../../../..")))))) + (lambda _ + (with-directory-excursion "src/org/stringtemplate/v4/compiler/" + (every (lambda (file) + (format #t "~a\n" file) + (zero? (system* "antlr3" file))) + '("STParser.g" "Group.g" "CodeGenerator.g")))))))) (inputs `(("antlr3" ,antlr3-bootstrap) ("antlr2" ,antlr2) - ("stringtemplate" ,stringtemplate3))) - (home-page "http://www.stringtemplate.org") - (synopsis "Template engine to generate formatted text output") - (description "StringTemplate is a java template engine (with ports for C#, -Objective-C, JavaScript, Scala) for generating source code, web pages, emails, -or any other formatted text output. StringTemplate is particularly good at -code generators, multiple site skins, and internationalization / localization. -StringTemplate also powers ANTLR.") - (license license:bsd-3))) + ("java-stringtemplate" ,java-stringtemplate-3) + ("java-junit" ,java-junit))))) -(define stringtemplate4-4.0.6 - (package - (inherit stringtemplate4) - (name "stringtemplate4") +(define java-stringtemplate-4.0.6 + (package (inherit java-stringtemplate) + (name "java-stringtemplate") (version "4.0.6") (source (origin (method url-fetch) @@ -3257,7 +3269,7 @@ StringTemplate also powers ANTLR.") (inputs `(("antlr3" ,antlr3-3.3) ("antlr2" ,antlr2) - ("stringtemplate" ,stringtemplate3))))) + ("java-stringtemplate" ,java-stringtemplate-3))))) (define-public antlr3 (package @@ -3344,12 +3356,12 @@ import org.antlr.grammar.v3.ANTLRTreePrinter;")) ("antlr3" ,antlr3-bootstrap))) (inputs `(("junit" ,java-junit) - ("stringtemplate" ,stringtemplate3) - ("stringtemplate4" ,stringtemplate4))) + ("stringtemplate" ,java-stringtemplate-3) + ("stringtemplate4" ,java-stringtemplate))) (propagated-inputs - `(("stringtemplate" ,stringtemplate3) + `(("stringtemplate" ,java-stringtemplate-3) ("antlr" ,antlr2) - ("stringtemplate4" ,stringtemplate4-4.0.6))) + ("stringtemplate4" ,java-stringtemplate-4.0.6))) (home-page "http://www.antlr3.org") (synopsis "Framework for constructing recognizers, compilers, and translators") (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) @@ -3400,7 +3412,7 @@ tree walking, and translation.") (string-append "#!" (which "sh") "\n" "java -cp " jar "/antlr3-3.3.jar:" (string-concatenate - (find-files (assoc-ref inputs "stringtemplate") + (find-files (assoc-ref inputs "java-stringtemplate") ".*\\.jar")) ":" (string-concatenate @@ -3450,7 +3462,7 @@ import org.antlr.grammar.v2.ANTLRTreePrinter;")))) (inputs `(("junit" ,java-junit))) (propagated-inputs - `(("stringtemplate" ,stringtemplate3) + `(("java-stringtemplate" ,java-stringtemplate-3) ("antlr" ,antlr2) ("antlr3" ,antlr3-3.1))))) @@ -3522,7 +3534,7 @@ import org.antlr.grammar.v2.ANTLRTreePrinter;")))) (inputs `(("junit" ,java-junit))) (propagated-inputs - `(("stringtemplate" ,stringtemplate3))))) + `(("stringtemplate" ,java-stringtemplate-3))))) (define-public java-asm (package diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index cd2c833e39..bfe6b64ffe 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -354,8 +354,8 @@ It has been modified to remove all non-free binary blobs.") (define %intel-compatible-systems '("x86_64-linux" "i686-linux")) -(define %linux-libre-version "4.11") -(define %linux-libre-hash "0j1bzzq9iq5i1zm7gnig8v0clr8wq303kvcdsaifc0r0ggz1mx1n") +(define %linux-libre-version "4.11.2") +(define %linux-libre-hash "0vp6hjc7cb6q6bhbg6jcf08r27xbf293cdib2vfng15ygvxpyfij") (define-public linux-libre (make-linux-libre %linux-libre-version @@ -364,14 +364,14 @@ It has been modified to remove all non-free binary blobs.") #:configuration-file kernel-config)) (define-public linux-libre-4.9 - (make-linux-libre "4.9.27" - "1b39zijjkv21kya359y4g88w5ff110v95pvc4wfvc83dvik9hny5" + (make-linux-libre "4.9.29" + "0yj4gajdzilxnh9lhb2zl0hs654lagdfx8cp7bv2w4q41bnmc3l9" %intel-compatible-systems #:configuration-file kernel-config)) (define-public linux-libre-4.4 - (make-linux-libre "4.4.67" - "1nadmrd26llc17ipig7bx7rf2gwns94g86a3ilcvgdk17hq5riss" + (make-linux-libre "4.4.69" + "14q5lqsfmwyiilbhffr3bwsm6i3z1jv6y09rg8x3faibcg766wny" %intel-compatible-systems #:configuration-file kernel-config)) @@ -2864,7 +2864,7 @@ and copy/paste text in the console and in xterm.") (define-public btrfs-progs (package (name "btrfs-progs") - (version "4.10.2") + (version "4.11") (source (origin (method url-fetch) (uri (string-append "mirror://kernel.org/linux/kernel/" @@ -2872,7 +2872,7 @@ and copy/paste text in the console and in xterm.") "btrfs-progs-v" version ".tar.xz")) (sha256 (base32 - "02p63nz78lrr156cmbb759z76cn95hv6mmz7v592lmiq0dkxy2gd")))) + "03mzv89f08gdsqv4ima793g44kdavcfyjialf5dr0zd2ab66hyp1")))) (build-system gnu-build-system) (outputs '("out" "static")) ; static versions of binaries in "out" (~16MiB!) @@ -3325,14 +3325,14 @@ the default @code{nsswitch} and the experimental @code{umich_ldap}.") (define-public mcelog (package (name "mcelog") - (version "149") + (version "150") (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 - "08hd8bl9rgss990icb69srarrfwcg8k7py979ak753j92ybbkhdm")) + "1skfiracl3a1afmml8mvnccr4rym4ibv33c342rkyxn0j3088h24")) (file-name (string-append name "-" version ".tar.gz")) (modules '((guix build utils))) (snippet diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 57d0191b70..64acc75e59 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch> ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net> -;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca> +;;; Copyright © 2016, 2017 Andy Patterson <ajpatter@uwaterloo.ca> ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> ;;; @@ -659,7 +659,7 @@ portable between implementations.") (sha256 (base32 "0f48pcbhqs3wwwzjl5nk57d4hcbib4l9xblxc66b8c2fhvhmhxnv")) (file-name (string-append "fiveam-" version ".tar.gz")))) - (inputs `(("sbcl-alexandria" ,sbcl-alexandria))) + (inputs `(("alexandria" ,sbcl-alexandria))) (build-system asdf-build-system/sbcl) (synopsis "Common Lisp testing framework") (description "FiveAM is a simple (as far as writing and running tests @@ -687,8 +687,8 @@ interactive development model in mind.") (base32 "10ryrcx832fwqdawb6jmknymi7wpdzhi30qzx7cbrk0cpnka71w2")) (file-name (string-append "bordeaux-threads-" version ".tar.gz")))) - (inputs `(("sbcl-alexandria" ,sbcl-alexandria))) - (native-inputs `(("tests:cl-fiveam" ,sbcl-fiveam))) + (inputs `(("alexandria" ,sbcl-alexandria))) + (native-inputs `(("fiveam" ,sbcl-fiveam))) (build-system asdf-build-system/sbcl) (synopsis "Portable shared-state concurrency library for Common Lisp") (description "BORDEAUX-THREADS is a proposed standard for a minimal @@ -749,7 +749,7 @@ thin compatibility layer for gray streams.") (base32 "16grnxvs7vqm5s6myf8a5s7vwblzq1kgwj8i7ahz8vwvihm9gzfi")) (file-name (string-append "flexi-streams-" version ".tar.gz")))) (build-system asdf-build-system/sbcl) - (inputs `(("sbcl-trivial-gray-streams" ,sbcl-trivial-gray-streams))) + (inputs `(("trivial-gray-streams" ,sbcl-trivial-gray-streams))) (synopsis "Implementation of virtual bivalent streams for Common Lisp") (description "Flexi-streams is an implementation of \"virtual\" bivalent streams that can be layered atop real binary or bivalent streams and that can @@ -779,7 +779,7 @@ streams which are similar to string streams.") (base32 "1i7daxf0wnydb0pgwiym7qh2wy70n14lxd6dyv28sy0naa8p31gd")) (file-name (string-append "cl-ppcre-" version ".tar.gz")))) (build-system asdf-build-system/sbcl) - (native-inputs `(("tests:cl-flexi-streams" ,sbcl-flexi-streams))) + (native-inputs `(("flexi-streams" ,sbcl-flexi-streams))) (synopsis "Portable regular expression library for Common Lisp") (description "CL-PPCRE is a portable regular expression library for Common Lisp, which is compatible with perl. It is pretty fast, thread-safe, and @@ -793,6 +793,51 @@ compatible with ANSI-compliant Common Lisp implementations.") (define-public ecl-cl-ppcre (sbcl-package->ecl-package sbcl-cl-ppcre)) +(define sbcl-cl-unicode-base + (let ((revision "1") + (commit "9fcd06fba1ddc9e66aed2f2d6c32dc9b764f03ea")) + (package + (name "sbcl-cl-unicode-base") + (version (string-append "0.1.5-" revision "." (string-take commit 7))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/edicl/cl-unicode.git") + (commit commit))) + (file-name (string-append "cl-unicode-" version "-checkout")) + (sha256 + (base32 + "1jicprb5b3bv57dy1kg03572gxkcaqdjhak00426s76g0plmx5ki")))) + (build-system asdf-build-system/sbcl) + (arguments + '(#:asd-file "cl-unicode.asd" + #:asd-system-name "cl-unicode/base")) + (inputs + `(("cl-ppcre" ,sbcl-cl-ppcre))) + (home-page "http://weitz.de/cl-unicode/") + (synopsis "Portable Unicode library for Common Lisp") + (description "CL-UNICODE is a portable Unicode library Common Lisp, which +is compatible with perl. It is pretty fast, thread-safe, and compatible with +ANSI-compliant Common Lisp implementations.") + (license license:bsd-2)))) + +(define-public sbcl-cl-unicode + (package + (inherit sbcl-cl-unicode-base) + (name "sbcl-cl-unicode") + (inputs + `(("cl-unicode/base" ,sbcl-cl-unicode-base) + ,@(package-inputs sbcl-cl-unicode-base))) + (native-inputs + `(("flexi-streams" ,sbcl-flexi-streams))) + (arguments '()))) + +(define-public ecl-cl-unicode + (sbcl-package->ecl-package sbcl-cl-unicode)) + +(define-public cl-unicode + (sbcl-package->cl-source-package sbcl-cl-unicode)) + (define-public sbcl-clx (let ((revision "1") (commit "1c62774b03c1cf3fe6e5cb532df8b14b44c96b95")) @@ -822,8 +867,6 @@ compatible with ANSI-compliant Common Lisp implementations.") (substitute* "clx.asd" (("\\(:file \"trapezoid\"\\)") "")))))) (build-system asdf-build-system/sbcl) - (arguments - '(#:special-dependencies '("sb-bsd-sockets"))) (home-page "http://www.cliki.net/portable-clx") (synopsis "X11 client library for Common Lisp") (description "CLX is an X11 client library for Common Lisp. The code was @@ -851,31 +894,27 @@ from other CLXes around the net.") (base32 "1maxp98gh64az3d9vz9br6zdd6rc9fmj2imvax4by85g6kxvdz1i")) (file-name (string-append "stumpwm-" version ".tar.gz")))) (build-system asdf-build-system/sbcl) - (inputs `(("sbcl-cl-ppcre" ,sbcl-cl-ppcre) - ("sbcl-clx" ,sbcl-clx))) - (outputs '("out" "bin")) + (inputs `(("cl-ppcre" ,sbcl-cl-ppcre) + ("clx" ,sbcl-clx))) + (outputs '("out" "lib")) (arguments - '(#:special-dependencies '("sb-posix") - #:phases + '(#:phases (modify-phases %standard-phases (add-after 'create-symlinks 'build-program - (lambda* (#:key lisp outputs inputs #:allow-other-keys) + (lambda* (#:key outputs #:allow-other-keys) (build-program - lisp - (string-append (assoc-ref outputs "bin") "/bin/stumpwm") - #:inputs inputs + (string-append (assoc-ref outputs "out") "/bin/stumpwm") + outputs #:entry-program '((stumpwm:stumpwm) 0)))) (add-after 'build-program 'create-desktop-file - (lambda* (#:key outputs lisp binary? #:allow-other-keys) - (let ((output (or (assoc-ref outputs "bin") - (assoc-ref outputs "out"))) - (xsessions "/share/xsessions")) - (mkdir-p (string-append output xsessions)) - (with-output-to-file - (string-append output xsessions - "/stumpwm.desktop") - (lambda _ - (format #t + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (xsessions (string-append out "/share/xsessions"))) + (mkdir-p xsessions) + (call-with-output-file + (string-append xsessions "/stumpwm.desktop") + (lambda (file) + (format file "[Desktop Entry]~@ Name=stumpwm~@ Comment=The Stump Window Manager~@ @@ -883,7 +922,7 @@ from other CLXes around the net.") TryExec=~@*~a/bin/stumpwm~@ Icon=~@ Type=Application~%" - output))) + out))) #t)))))) (synopsis "Window manager written in Common Lisp") (description "Stumpwm is a window manager written entirely in Common Lisp. @@ -904,11 +943,15 @@ productive, customizable lisp based systems.") (outputs '("out")) (arguments '())))) +;; The slynk that users expect to install includes all of slynk's contrib +;; modules. Therefore, we build the base module and all contribs first; then +;; we expose the union of these as `sbcl-slynk'. The following variable +;; describes the base module. (define sbcl-slynk-boot0 (let ((revision "1") (commit "5706cd45d484a4f25795abe8e643509d31968aa2")) (package - (name "sbcl-slynk") + (name "sbcl-slynk-boot0") (version (string-append "1.0.0-beta-" revision "." (string-take commit 7))) (source (origin @@ -948,19 +991,22 @@ productive, customizable lisp based systems.") (scandir "slynk")))))) (build-system asdf-build-system/sbcl) (arguments - `(#:tests? #f)) ; No test suite + `(#:tests? #f ; No test suite + #:asd-system-name "slynk")) (synopsis "Common Lisp IDE for Emacs") - (description "SLY is a fork of SLIME. It also features a completely -redesigned REPL based on Emacs's own full-featured comint.el, live code -annotations, and a consistent interactive button interface. Everything can be -copied to the REPL. One can create multiple inspectors with independent -history.") + (description "SLY is a fork of SLIME, an IDE backend for Common Lisp. +It also features a completely redesigned REPL based on Emacs's own +full-featured comint.el, live code annotations, and a consistent interactive +button interface. Everything can be copied to the REPL. One can create +multiple inspectors with independent history.") (home-page "https://github.com/joaotavora/sly") (license license:public-domain) (properties `((cl-source-variant . ,(delay cl-slynk))))))) (define-public cl-slynk - (sbcl-package->cl-source-package sbcl-slynk-boot0)) + (package + (inherit (sbcl-package->cl-source-package sbcl-slynk-boot0)) + (name "cl-slynk"))) (define ecl-slynk-boot0 (sbcl-package->ecl-package sbcl-slynk-boot0)) @@ -969,10 +1015,11 @@ history.") (package (inherit sbcl-slynk-boot0) (name "sbcl-slynk-arglists") - (inputs `(("sbcl-slynk" ,sbcl-slynk-boot0))) + (inputs `(("slynk" ,sbcl-slynk-boot0))) (arguments - `(#:asd-file "slynk.asd" - ,@(package-arguments sbcl-slynk-boot0))))) + (substitute-keyword-arguments (package-arguments sbcl-slynk-boot0) + ((#:asd-file _ "") "slynk.asd") + ((#:asd-system-name _ #f) #f))))) (define ecl-slynk-arglists (sbcl-package->ecl-package sbcl-slynk-arglists)) @@ -989,7 +1036,7 @@ history.") (package (inherit sbcl-slynk-arglists) (name "sbcl-slynk-fancy-inspector") - (inputs `(("sbcl-slynk-util" ,sbcl-slynk-util) + (inputs `(("slynk-util" ,sbcl-slynk-util) ,@(package-inputs sbcl-slynk-arglists))))) (define ecl-slynk-fancy-inspector @@ -1067,6 +1114,7 @@ history.") (define-public sbcl-slynk (package (inherit sbcl-slynk-boot0) + (name "sbcl-slynk") (inputs `(("slynk" ,sbcl-slynk-boot0) ("slynk-util" ,sbcl-slynk-util) @@ -1104,12 +1152,15 @@ history.") (prepend-to-source-registry (string-append (assoc-ref %outputs "out") "//")) - (build-image "sbcl" - (string-append - (assoc-ref %outputs "image") - "/bin/slynk") - #:inputs %build-inputs - #:dependencies ',slynk-systems)))))) + + (parameterize ((%lisp-type "sbcl") + (%lisp (string-append (assoc-ref %build-inputs "sbcl") + "/bin/sbcl"))) + (build-image (string-append + (assoc-ref %outputs "image") + "/bin/slynk") + %outputs + #:dependencies ',slynk-systems))))))) (define-public ecl-slynk (package @@ -1138,28 +1189,30 @@ history.") (inherit sbcl-stumpwm) (name "sbcl-stumpwm-with-slynk") (outputs '("out")) - (native-inputs - `(("stumpwm" ,sbcl-stumpwm) + (inputs + `(("stumpwm" ,sbcl-stumpwm "lib") ("slynk" ,sbcl-slynk))) (arguments (substitute-keyword-arguments (package-arguments sbcl-stumpwm) ((#:phases phases) `(modify-phases ,phases (replace 'build-program - (lambda* (#:key lisp inputs outputs #:allow-other-keys) + (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (program (string-append out "/bin/stumpwm"))) - (build-program lisp program - #:inputs inputs + (build-program program outputs #:entry-program '((stumpwm:stumpwm) 0) #:dependencies '("stumpwm" - ,@slynk-systems)) + ,@slynk-systems) + #:dependency-prefixes + (map (lambda (input) (assoc-ref inputs input)) + '("stumpwm" "slynk"))) ;; Remove unneeded file. (delete-file (string-append out "/bin/stumpwm-exec.fasl")) #t))) (delete 'copy-source) (delete 'build) (delete 'check) - (delete 'link-dependencies) + (delete 'create-asd-file) (delete 'cleanup) (delete 'create-symlinks))))))) diff --git a/gnu/packages/logging.scm b/gnu/packages/logging.scm index 2523d65f61..7501f1e5db 100644 --- a/gnu/packages/logging.scm +++ b/gnu/packages/logging.scm @@ -109,6 +109,21 @@ command line.") `(("python-pyyaml" ,python-pyyaml) ("python-sockjs-tornado" ,python-sockjs-tornado) ("python-tornado" ,python-tornado))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-commands.py + (lambda args + (substitute* "tailon/commands.py" + (("self\\.first_in_path\\('grep'\\)") + (string-append"'" (which "grep") "'")) + (("self\\.first_in_path\\('gawk', 'awk'\\)") + (string-append"'" (which "gawk") "'")) + (("self\\.first_in_path\\('gsed', 'sed'\\)") + (string-append"'" (which "sed") "'")) + (("self\\.first_in_path\\('gtail', 'tail'\\)") + (string-append"'" (which "tail") "'"))) + #t))))) (home-page "https://tailon.readthedocs.io/") (synopsis "Webapp for looking at and searching through log files") diff --git a/gnu/packages/mc.scm b/gnu/packages/mc.scm index 3cdc542157..bae12439f1 100644 --- a/gnu/packages/mc.scm +++ b/gnu/packages/mc.scm @@ -1,7 +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> +;;; Copyright © 2016, 2017 ng0 <ng0@no-reply.pragmatique.xyz> ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,7 +30,8 @@ #:use-module (gnu packages ssh) #:use-module (gnu packages pkg-config) #:use-module (gnu packages check) - #:use-module (gnu packages perl)) + #:use-module (gnu packages perl) + #:use-module (gnu packages zip)) (define-public mc (package @@ -51,7 +52,8 @@ ("ncurses" ,ncurses) ("libssh2" ,libssh2) ("glib" ,glib) - ("check" ,check))) + ("check" ,check) + ("unzip" ,unzip))) (arguments `(#:configure-flags '("--with-screen=ncurses" "--enable-aspell") diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm index 84d6f8ff78..1e233a852d 100644 --- a/gnu/packages/mes.scm +++ b/gnu/packages/mes.scm @@ -54,30 +54,35 @@ extensive examples, including parsers for the Javascript and C99 languages.") (license (list gpl3+ lgpl3+)))) (define-public mes - (let ((commit "a437c173b9da1949ad966fd50dd4f26e522a910a") + (let ((commit "d4420bbcc9f994e2cce430cf156f383dc4092bca") (revision "0") - (triplet "i686-unknown-linux-gnu")) + (triplet "i686-unknown-linux-gnu") + (version "0.6")) (package (name "mes") - (version (string-append "0.5-" revision "." (string-take commit 7))) + (version (string-append version "-" revision "." (string-take commit 7))) (source (origin (method git-fetch) (uri (git-reference (url "https://gitlab.com/janneke/mes") (commit commit))) (file-name (string-append name "-" version)) - ;; TODO: Unbundle nyacc. (sha256 - (base32 "1ynr0hc0k15307sgzv09k3y5rvy46h0wbh7zcblx1f9v7y8k90zv")))) + (base32 "0qqywk3siyhf08v7xac08lqldklrqfndlp495wgy6ii9fn93197k")))) (build-system gnu-build-system) - (supported-systems '("x86_64-linux")) + (supported-systems '("i686-linux" "x86_64-linux")) + (propagated-inputs + `(("nyacc" ,nyacc))) (native-inputs `(("guile" ,guile-2.2) - ;; Use cross-compiler rather than #:system "i686-linux" to get - ;; MesCC 64 bit .go files installed ready for use with Guile. - ("i686-linux-binutils" ,(cross-binutils triplet)) - ("i686-linux-gcc" ,(let ((triplet triplet)) (cross-gcc triplet))) - ("perl" ,perl))) ;build-aux/gitlog-to-changelog + ,@(if (string-prefix? "x86_64-linux" (or (%current-target-system) + (%current-system))) + ;; Use cross-compiler rather than #:system "i686-linux" to get + ;; MesCC 64 bit .go files installed ready for use with Guile. + `(("i686-linux-binutils" ,(cross-binutils triplet)) + ("i686-linux-gcc" ,(cross-gcc triplet))) + '()) + ("perl" ,perl))) ;build-aux/gitlog-to-changelog (arguments `(#:phases (modify-phases %standard-phases diff --git a/gnu/packages/nano.scm b/gnu/packages/nano.scm index f0344d7481..61ff3ced06 100644 --- a/gnu/packages/nano.scm +++ b/gnu/packages/nano.scm @@ -29,7 +29,7 @@ (define-public nano (package (name "nano") - (version "2.8.2") + (version "2.8.4") (source (origin (method url-fetch) @@ -37,7 +37,7 @@ version ".tar.xz")) (sha256 (base32 - "1q5rxkvsv974085xrd2k11ffazadabcb9cnpfra0shmj71xqlgh2")))) + "04bvmimrw40cbcnm3xm5l5lir0qy7cncfkmwrlzg8jiy1x7jdky7")))) (build-system gnu-build-system) (inputs `(("gettext" ,gettext-minimal) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 246d2539d6..12e1f9e6c0 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -52,6 +52,7 @@ #:use-module (gnu packages tls) #:use-module (gnu packages ssh) #:use-module (gnu packages vim) + #:use-module (srfi srfi-1) #:use-module (ice-9 match)) (define (boot-guile-uri arch) @@ -265,6 +266,18 @@ the Nix package manager.") ;; Alias for backward compatibility. (define-public guix-devel guix) +(define-public guile2.0-guix + (package + (inherit guix) + (name "guile2.0-guix") + (inputs + `(("guile" ,guile-2.0) + ,@(alist-delete "guile" (package-inputs guix)))) + (propagated-inputs + `(("gnutls" ,gnutls) + ("guile-json" ,guile2.0-json) + ("guile-ssh" ,guile2.0-ssh))))) + (define (source-file? file stat) "Return true if FILE is likely a source file, false if it is a typical generated file." diff --git a/gnu/packages/patches/calibre-dont-load-remote-icons.patch b/gnu/packages/patches/calibre-dont-load-remote-icons.patch new file mode 100644 index 0000000000..2168263072 --- /dev/null +++ b/gnu/packages/patches/calibre-dont-load-remote-icons.patch @@ -0,0 +1,45 @@ +From: Martin Pitt <mpitt@debian.org> +Date: Mon, 14 Nov 2016 22:41:24 +0100 +Subject: content-server: Don't load external URLs for privacy + +Spotted by lintian. +--- + resources/content_server/browse/browse.html | 4 +--- + resources/content_server/index.html | 2 +- + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/resources/content_server/browse/browse.html b/resources/content_server/browse/browse.html +index 36f7199..e615707 100644 +--- a/resources/content_server/browse/browse.html ++++ b/resources/content_server/browse/browse.html +@@ -7,7 +7,7 @@ + <title>..:: calibre {library} ::.. {title}</title> + <meta http-equiv="X-UA-Compatible" content="IE=100" /> + <meta name="robots" content="noindex" /> +- <link rel="icon" type="image/x-icon" href="//calibre-ebook.com/favicon.ico" /> ++ <link rel="icon" type="image/x-icon" href="favicon.ico" /> + + <link rel="stylesheet" type="text/css" href="{prefix}/static/browse/browse.css" /> + <link type="text/css" href="{prefix}/static/jquery_ui/css/humanity-custom/jquery-ui-1.8.5.custom.css" rel="stylesheet" /> +@@ -63,8 +63,6 @@ + <input type="image" + src="{prefix}/static/button-donate.png" + name="submit"></input> +- <img alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif" +- width="1" height="1"></img> + </div> + </form> + <div id="calibre-home-link" title="Go to the calibre website"></div> +diff --git a/resources/content_server/index.html b/resources/content_server/index.html +index 51cc33a..e71d0e8 100644 +--- a/resources/content_server/index.html ++++ b/resources/content_server/index.html +@@ -9,7 +9,7 @@ + <script type="text/javascript" src="{prefix}/static/date.js" charset="utf-8"></script> + <script type="text/javascript" src="{prefix}/static/jquery.js" charset="utf-8"></script> + <script type="text/javascript" src="{prefix}/static/gui.js" charset="utf-8"></script> +- <link rel="icon" href="//calibre-ebook.com/favicon.ico" type="image/x-icon" /> ++ <link rel="icon" href="favicon.ico" type="image/x-icon" /> + </head> + <body> + <div id="banner"> diff --git a/gnu/packages/patches/calibre-drop-unrar.patch b/gnu/packages/patches/calibre-drop-unrar.patch index 4eb64404f6..adf977b183 100644 --- a/gnu/packages/patches/calibre-drop-unrar.patch +++ b/gnu/packages/patches/calibre-drop-unrar.patch @@ -1,15 +1,20 @@ -Taken from Debian. Updated by Alex Griffin. +Recreated old debian patch on the latest calibre version -Author: Dmitry Shachnev <mitya57@gmail.com> -Description: do not build unrar extension as we strip unrar from the tarball -Forwarded: not-needed -Last-Update: 2013-04-04 +From 6764e4c211e50d4f4633dbabfba7cbc3089c51dc Mon Sep 17 00:00:00 2001 +From: Brendan Tildesley <brendan.tildesley@openmailbox.org> +Date: Sat, 13 May 2017 21:12:12 +1000 +Subject: [PATCH] Remove unrar extension -Index: calibre/setup/extensions.py -=================================================================== ---- calibre.orig/setup/extensions.json 2016-07-21 21:21:05.000000000 -0500 -+++ calibre/setup/extensions.json 2016-07-27 11:22:17.167710112 -0500 -@@ -211,14 +211,5 @@ +--- + setup/extensions.json | 11 ----------- + src/calibre/ebooks/metadata/archive.py | 2 +- + 2 files changed, 1 insertion(+), 12 deletions(-) + +diff --git a/setup/extensions.json b/setup/extensions.json +index 1f6d1fb5fd..127390450f 100644 +--- a/setup/extensions.json ++++ b/setup/extensions.json +@@ -211,16 +211,5 @@ "sources": "calibre/devices/mtp/unix/devices.c calibre/devices/mtp/unix/libmtp.c", "headers": "calibre/devices/mtp/unix/devices.h calibre/devices/mtp/unix/upstream/music-players.h calibre/devices/mtp/unix/upstream/device-flags.h", "libraries": "mtp" @@ -20,22 +25,25 @@ Index: calibre/setup/extensions.py - "inc_dirs": "unrar", - "defines": "SILENT RARDLL UNRAR _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE", - "windows_defines": "SILENT RARDLL UNRAR", +- "haiku_defines": "LITTLE_ENDIAN SILENT RARDLL UNRAR _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE _BSD_SOURCE", +- "haiku_libraries": "bsd", - "optimize_level": 2, - "windows_libraries": "User32 Advapi32 kernel32 Shell32" } ] - - -Index: calibre/src/calibre/ebooks/metadata/archive.py -=================================================================== ---- calibre.orig/src/calibre/ebooks/metadata/archive.py 2016-07-21 21:21:05.000000000 -0500 -+++ calibre/src/calibre/ebooks/metadata/archive.py 2016-07-27 11:21:07.793616039 -0500 -@@ -42,7 +42,7 @@ - description = _('Extract common e-book formats from archives ' - '(zip/rar) files. Also try to autodetect if they are actually ' - 'cbz/cbr files.') +diff --git a/src/calibre/ebooks/metadata/archive.py b/src/calibre/ebooks/metadata/archive.py +index f5c0b7bed3..32257dcdae 100644 +--- a/src/calibre/ebooks/metadata/archive.py ++++ b/src/calibre/ebooks/metadata/archive.py +@@ -44,7 +44,7 @@ class ArchiveExtract(FileTypePlugin): + description = _('Extract common e-book formats from archive files ' + '(ZIP/RAR). Also try to autodetect if they are actually ' + 'CBZ/CBR files.') - file_types = set(['zip', 'rar']) + file_types = set(['zip']) supported_platforms = ['windows', 'osx', 'linux'] on_import = True +-- +2.12.2 + diff --git a/gnu/packages/patches/calibre-use-packaged-feedparser.patch b/gnu/packages/patches/calibre-use-packaged-feedparser.patch new file mode 100644 index 0000000000..8f4bbc8248 --- /dev/null +++ b/gnu/packages/patches/calibre-use-packaged-feedparser.patch @@ -0,0 +1,51 @@ +From: Martin Pitt <mpitt@debian.org> +Date: Mon, 14 Nov 2016 22:41:23 +0100 +Subject: Use packaged instead of bundled feedparser Python module + +--- + recipes/lenta_ru.recipe | 4 +++- + src/calibre/web/feeds/__init__.py | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/recipes/lenta_ru.recipe b/recipes/lenta_ru.recipe +index aa4dac4..4b6710c 100644 +--- a/recipes/lenta_ru.recipe ++++ b/recipes/lenta_ru.recipe +@@ -4,11 +4,13 @@ + Lenta.ru + ''' + +-from calibre.web.feeds.feedparser import parse + from calibre.ebooks.BeautifulSoup import Tag + from calibre.web.feeds.news import BasicNewsRecipe ++from feedparser import parse ++from functools import partial + import re + ++parse = partial(parse, agent='Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11') + + class LentaRURecipe(BasicNewsRecipe): + title = u'Lenta.ru: \u041d\u043e\u0432\u043e\u0441\u0442\u0438' +diff --git a/src/calibre/web/feeds/__init__.py b/src/calibre/web/feeds/__init__.py +index 8c9d748..f262604 100644 +--- a/src/calibre/web/feeds/__init__.py ++++ b/src/calibre/web/feeds/__init__.py +@@ -11,7 +11,10 @@ from calibre.utils.logging import default_log + from calibre import entity_to_unicode, strftime, force_unicode + from calibre.utils.date import dt_factory, utcnow, local_tz + from calibre.utils.cleantext import clean_ascii_chars, clean_xml_chars ++from feedparser import parse ++from functools import partial + ++parse = partial(parse, agent='Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11') + + class Article(object): + +@@ -334,7 +337,6 @@ def feed_from_xml(raw_xml, title=None, oldest_article=7, + max_articles_per_feed=100, + get_article_url=lambda item: item.get('link', None), + log=default_log): +- from calibre.web.feeds.feedparser import parse + # Handle unclosed escaped entities. They trip up feedparser and HBR for one + # generates them + raw_xml = re.sub(r'(&#\d+)([^0-9;])', r'\1;\2', raw_xml) diff --git a/gnu/packages/patches/gspell-dash-test.patch b/gnu/packages/patches/gspell-dash-test.patch new file mode 100644 index 0000000000..e737921c4b --- /dev/null +++ b/gnu/packages/patches/gspell-dash-test.patch @@ -0,0 +1,16 @@ +Somehow, Aspell 0.60.6.1 and aspell-dict-en-2016.11.20-0 don't consider +this a valid spelling. Skip it. + +--- gspell-1.3.2/testsuite/test-checker.c 2017-05-17 16:02:40.832415940 +0200 ++++ gspell-1.3.2/testsuite/test-checker.c 2017-05-17 16:02:50.768351895 +0200 +@@ -101,9 +101,6 @@ test_dashes (void) + + checker = gspell_checker_new (lang); + +- correctly_spelled = gspell_checker_check_word (checker, "spell-checking", -1, &error); +- g_assert_no_error (error); +- g_assert (correctly_spelled); + + correctly_spelled = gspell_checker_check_word (checker, "nrst-auie", -1, &error); + g_assert_no_error (error); + diff --git a/gnu/packages/patches/jbig2dec-CVE-2017-7885.patch b/gnu/packages/patches/jbig2dec-CVE-2017-7885.patch new file mode 100644 index 0000000000..a598392765 --- /dev/null +++ b/gnu/packages/patches/jbig2dec-CVE-2017-7885.patch @@ -0,0 +1,38 @@ +Fix CVE-2017-7885: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7885 +https://bugs.ghostscript.com/show_bug.cgi?id=697703 + +Patch copied from upstream source repository: + +https://git.ghostscript.com/?p=jbig2dec.git;a=commit;h=258290340bb657c9efb44457f717b0d8b49f4aa3 + +From 258290340bb657c9efb44457f717b0d8b49f4aa3 Mon Sep 17 00:00:00 2001 +From: Shailesh Mistry <shailesh.mistry@hotmail.co.uk> +Date: Wed, 3 May 2017 22:06:01 +0100 +Subject: [PATCH] Bug 697703: Prevent integer overflow vulnerability. + +Add extra check for the offset being greater than the size +of the image and hence reading off the end of the buffer. + +Thank you to Dai Ge for finding this issue and suggesting a patch. +--- + jbig2_symbol_dict.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/jbig2_symbol_dict.c b/jbig2_symbol_dict.c +index 4acaba9..36225cb 100644 +--- a/jbig2_symbol_dict.c ++++ b/jbig2_symbol_dict.c +@@ -629,7 +629,7 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx, + byte *dst = image->data; + + /* SumatraPDF: prevent read access violation */ +- if (size - jbig2_huffman_offset(hs) < image->height * stride) { ++ if ((size - jbig2_huffman_offset(hs) < image->height * stride) || (size < jbig2_huffman_offset(hs))) { + jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "not enough data for decoding (%d/%d)", image->height * stride, + size - jbig2_huffman_offset(hs)); + jbig2_image_release(ctx, image); +-- +2.13.0 + diff --git a/gnu/packages/patches/jbig2dec-CVE-2017-7975.patch b/gnu/packages/patches/jbig2dec-CVE-2017-7975.patch new file mode 100644 index 0000000000..c83fe9d9f2 --- /dev/null +++ b/gnu/packages/patches/jbig2dec-CVE-2017-7975.patch @@ -0,0 +1,40 @@ +Fix CVE-2017-7975: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7975 +https://bugs.ghostscript.com/show_bug.cgi?id=697693 + +Patch copied from upstream source repository: + +https://git.ghostscript.com/?p=jbig2dec.git;a=commit;h=f8992b8fe65c170c8624226f127c5c4bfed42c66 + +From f8992b8fe65c170c8624226f127c5c4bfed42c66 Mon Sep 17 00:00:00 2001 +From: Shailesh Mistry <shailesh.mistry@hotmail.co.uk> +Date: Wed, 26 Apr 2017 22:12:14 +0100 +Subject: [PATCH] Bug 697693: Prevent SEGV due to integer overflow. + +While building a Huffman table, the start and end points were susceptible +to integer overflow. + +Thank you to Jiaqi for finding this issue and suggesting a patch. +--- + jbig2_huffman.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/jbig2_huffman.c b/jbig2_huffman.c +index 511e461..b4189a1 100644 +--- a/jbig2_huffman.c ++++ b/jbig2_huffman.c +@@ -421,8 +421,8 @@ jbig2_build_huffman_table(Jbig2Ctx *ctx, const Jbig2HuffmanParams *params) + + if (PREFLEN == CURLEN) { + int RANGELEN = lines[CURTEMP].RANGELEN; +- int start_j = CURCODE << shift; +- int end_j = (CURCODE + 1) << shift; ++ uint32_t start_j = CURCODE << shift; ++ uint32_t end_j = (CURCODE + 1) << shift; + byte eflags = 0; + + if (end_j > max_j) { +-- +2.13.0 + diff --git a/gnu/packages/patches/jbig2dec-CVE-2017-7976.patch b/gnu/packages/patches/jbig2dec-CVE-2017-7976.patch new file mode 100644 index 0000000000..2fe02358b8 --- /dev/null +++ b/gnu/packages/patches/jbig2dec-CVE-2017-7976.patch @@ -0,0 +1,122 @@ +Fix CVE-2017-7976: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7976 +https://bugs.ghostscript.com/show_bug.cgi?id=697683 + +In order to make the bug-fix patch apply, we also include an earlier commit +that it depends on. + +Patches copied from upstream source repository: + +Earlier commit, creating context for the CVE fix: +https://git.ghostscript.com/?p=jbig2dec.git;a=commit;h=9d2c4f3bdb0bd003deae788e7187c0f86e624544 + +CVE-2017-7976 bug fix: +https://git.ghostscript.com/?p=jbig2dec.git;a=commit;h=cfa054925de49675ac5445515ebf036fa9379ac6 + +From 9d2c4f3bdb0bd003deae788e7187c0f86e624544 Mon Sep 17 00:00:00 2001 +From: Tor Andersson <tor.andersson@artifex.com> +Date: Wed, 14 Dec 2016 15:56:31 +0100 +Subject: [PATCH] Fix warnings: remove unsigned < 0 tests that are always + false. + +--- + jbig2_image.c | 2 +- + jbig2_mmr.c | 2 +- + jbig2_symbol_dict.c | 9 ++------- + 3 files changed, 4 insertions(+), 9 deletions(-) + +diff --git a/jbig2_image.c b/jbig2_image.c +index 94e5a4c..00f966b 100644 +--- a/jbig2_image.c ++++ b/jbig2_image.c +@@ -256,7 +256,7 @@ jbig2_image_compose(Jbig2Ctx *ctx, Jbig2Image *dst, Jbig2Image *src, int x, int + /* general OR case */ + s = ss; + d = dd = dst->data + y * dst->stride + leftbyte; +- if (d < dst->data || leftbyte > dst->stride || h * dst->stride < 0 || d - leftbyte + h * dst->stride > dst->data + dst->height * dst->stride) { ++ if (d < dst->data || leftbyte > dst->stride || d - leftbyte + h * dst->stride > dst->data + dst->height * dst->stride) { + return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "preventing heap overflow in jbig2_image_compose"); + } + if (leftbyte == rightbyte) { +diff --git a/jbig2_mmr.c b/jbig2_mmr.c +index 390e27c..da54934 100644 +--- a/jbig2_mmr.c ++++ b/jbig2_mmr.c +@@ -977,7 +977,7 @@ jbig2_decode_mmr_line(Jbig2MmrCtx *mmr, const byte *ref, byte *dst) + if (b1 < 2) + break; + if (c) { +- if (b1 - 2 < a0 || a0 < 0) ++ if (a0 == MINUS1 || b1 - 2 < a0) + return -1; + jbig2_set_bits(dst, a0, b1 - 2); + } +diff --git a/jbig2_symbol_dict.c b/jbig2_symbol_dict.c +index 11a2252..4acaba9 100644 +--- a/jbig2_symbol_dict.c ++++ b/jbig2_symbol_dict.c +@@ -92,11 +92,6 @@ jbig2_sd_new(Jbig2Ctx *ctx, uint32_t n_symbols) + { + Jbig2SymbolDict *new_dict = NULL; + +- if (n_symbols < 0) { +- jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "Negative number of symbols in symbol dict: %d", n_symbols); +- return NULL; +- } +- + new_dict = jbig2_new(ctx, Jbig2SymbolDict, 1); + if (new_dict != NULL) { + new_dict->glyphs = jbig2_new(ctx, Jbig2Image *, n_symbols); +@@ -613,7 +608,7 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx, + uint32_t j; + int x; + +- if (code || (BMSIZE < 0)) { ++ if (code) { + jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "error decoding size of collective bitmap!"); + goto cleanup4; + } +@@ -716,7 +711,7 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx, + code = jbig2_arith_int_decode(IAEX, as, (int32_t *)&exrunlength); + /* prevent infinite loop */ + zerolength = exrunlength > 0 ? 0 : zerolength + 1; +- if (code || (exrunlength > limit - i) || (exrunlength < 0) || (zerolength > 4) || (exflag && (exrunlength + j > params->SDNUMEXSYMS))) { ++ if (code || (exrunlength > limit - i) || (zerolength > 4) || (exflag && (exrunlength + j > params->SDNUMEXSYMS))) { + if (code) + jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "failed to decode exrunlength for exported symbols"); + else if (exrunlength <= 0) +-- +2.13.0 + +From cfa054925de49675ac5445515ebf036fa9379ac6 Mon Sep 17 00:00:00 2001 +From: Shailesh Mistry <shailesh.mistry@hotmail.co.uk> +Date: Wed, 10 May 2017 17:50:39 +0100 +Subject: [PATCH] Bug 697683: Bounds check before reading from image source + data. + +Add extra check to prevent reading off the end of the image source +data buffer. + +Thank you to Dai Ge for finding this issue and suggesting a patch. +--- + jbig2_image.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/jbig2_image.c b/jbig2_image.c +index 661d0a5..ae161b9 100644 +--- a/jbig2_image.c ++++ b/jbig2_image.c +@@ -263,7 +263,8 @@ jbig2_image_compose(Jbig2Ctx *ctx, Jbig2Image *dst, Jbig2Image *src, int x, int + /* general OR case */ + s = ss; + d = dd = dst->data + y * dst->stride + leftbyte; +- if (d < dst->data || leftbyte > dst->stride || d - leftbyte + h * dst->stride > dst->data + dst->height * dst->stride) { ++ if (d < dst->data || leftbyte > dst->stride || d - leftbyte + h * dst->stride > dst->data + dst->height * dst->stride || ++ s - leftbyte + (h - 1) * src->stride + rightbyte > src->data + src->height * src->stride) { + return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "preventing heap overflow in jbig2_image_compose"); + } + if (leftbyte == rightbyte) { +-- +2.13.0 + diff --git a/gnu/packages/patches/qtscript-disable-tests.patch b/gnu/packages/patches/qtscript-disable-tests.patch new file mode 100644 index 0000000000..41a017d864 --- /dev/null +++ b/gnu/packages/patches/qtscript-disable-tests.patch @@ -0,0 +1,64 @@ +In all of these tests the result wraps around and comes out the negative of the exptected value. + +--- + tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.4.7-02.js | 2 +- + tests/auto/qscriptjstestsuite/tests/ecma/TypeConversion/9.3.1-3.js | 5 ++++- + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.4.7-02.js b/tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.4.7-02.js +index 43bd923..103f251 100644 +--- a/tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.4.7-02.js ++++ b/tests/auto/qscriptjstestsuite/tests/ecma/Expressions/11.4.7-02.js +@@ -74,7 +74,7 @@ test_negation(-1073741823, 1073741823); + + //2147483648 == (1 << 31) + test_negation(2147483648, -2147483648); +-test_negation(-2147483648, 2147483648); ++//test_negation(-2147483648, 2147483648); + + //2147483648 == (1 << 31) - 1 + test_negation(2147483647, -2147483647); +diff --git a/tests/auto/qscriptjstestsuite/tests/ecma/TypeConversion/9.3.1-3.js b/tests/auto/qscriptjstestsuite/tests/ecma/TypeConversion/9.3.1-3.js +index dc56427..c1a4bf3 100644 +--- a/tests/auto/qscriptjstestsuite/tests/ecma/TypeConversion/9.3.1-3.js ++++ b/tests/auto/qscriptjstestsuite/tests/ecma/TypeConversion/9.3.1-3.js +@@ -86,11 +86,12 @@ new TestCase( + // test cases from bug http://scopus.mcom.com/bugsplat/show_bug.cgi?id=122882 + + +- ++/* + new TestCase( SECTION, + '- -"0x80000000"', + 2147483648, + - -"0x80000000" ); ++*/ + + new TestCase( SECTION, + '- -"0x100000000"', +@@ -280,10 +281,12 @@ new TestCase( SECTION, + 305419896, + 0x12345678 ); + ++/* + new TestCase( SECTION, + "0x80000000", + 2147483648, + 0x80000000 ); ++*/ + + new TestCase( SECTION, + "0xffffffff", +@@ -681,10 +681,12 @@ new TestCase( SECTION, + NaN, + -"+Infiniti" ); + ++/* + new TestCase( SECTION, + "- -\"0x80000000\"", + 2147483648, + - -"0x80000000" ); ++*/ + + new TestCase( SECTION, + "- -\"0x100000000\"", diff --git a/gnu/packages/patches/ruby-concurrent-test-arm.patch b/gnu/packages/patches/ruby-concurrent-test-arm.patch index 75e6365565..06d5657814 100644 --- a/gnu/packages/patches/ruby-concurrent-test-arm.patch +++ b/gnu/packages/patches/ruby-concurrent-test-arm.patch @@ -5,27 +5,27 @@ Work around two test suite failures on ARM: The regexps here assume addresses like "0x1234" but on ARM (32-bit) we get something like "0x-7db1e810" (notice the dash). -diff --git a/spec/concurrent/edge/future_spec.rb b/spec/concurrent/edge/future_spec.rb -index a48fd29..4344d7e 100644 ---- b/spec/concurrent/edge/future_spec.rb -+++ a/spec/concurrent/edge/future_spec.rb -@@ -322,9 +322,9 @@ +diff --git a/spec/concurrent/edge/promises_spec.rb b/spec/concurrent/edge/promises_spec.rb +index 727210f..149f7cd 100644 +--- a/spec/concurrent/edge/promises_spec.rb ++++ b/spec/concurrent/edge/promises_spec.rb +@@ -371,9 +371,9 @@ describe 'Concurrent::Promises' do four = three.delay.then(&:succ) # meaningful to_s and inspect defined for Future and Promise -- expect(head.to_s).to match /<#Concurrent::Edge::Future:0x[\da-f]+ pending>/ -+ expect(head.to_s).to match /<#Concurrent::Edge::Future:0x-?[\da-f]+ pending>/ +- expect(head.to_s).to match /<#Concurrent::Promises::Future:0x[\da-f]+ pending>/ ++ expect(head.to_s).to match /<#Concurrent::Promises::Future:0x-?[\da-f]+ pending>/ expect(head.inspect).to( -- match(/<#Concurrent::Edge::Future:0x[\da-f]+ pending blocks:\[<#Concurrent::Edge::ThenPromise:0x[\da-f]+ pending>\]>/)) -+ match(/<#Concurrent::Edge::Future:0x-?[\da-f]+ pending blocks:\[<#Concurrent::Edge::ThenPromise:0x-?[\da-f]+ pending>\]>/)) +- match(/<#Concurrent::Promises::Future:0x[\da-f]+ pending>/)) ++ match(/<#Concurrent::Promises::Future:0x-?[\da-f]+ pending>/)) # evaluates only up to three, four is left unevaluated expect(three.value!).to eq 3 diff --git a/spec/concurrent/map_spec.rb b/spec/concurrent/map_spec.rb -index 13fd5b7..1c82ebe 100644 ---- b/spec/concurrent/map_spec.rb -+++ a/spec/concurrent/map_spec.rb -@@ -827,7 +827,7 @@ +index c4050be..0a9095d 100644 +--- a/spec/concurrent/map_spec.rb ++++ b/spec/concurrent/map_spec.rb +@@ -794,7 +794,7 @@ module Concurrent end it '#inspect' do diff --git a/gnu/packages/patches/shadow-4.4-su-snprintf-fix.patch b/gnu/packages/patches/shadow-4.4-su-snprintf-fix.patch deleted file mode 100644 index 3f357c4924..0000000000 --- a/gnu/packages/patches/shadow-4.4-su-snprintf-fix.patch +++ /dev/null @@ -1,31 +0,0 @@ -Patch copied from upstream source repository: - -https://github.com/shadow-maint/shadow/commit/67d2bb6e0a5ac124ce1f026dd5723217b1493194 - -From 67d2bb6e0a5ac124ce1f026dd5723217b1493194 Mon Sep 17 00:00:00 2001 -From: Serge Hallyn <serge@hallyn.com> -Date: Sun, 18 Sep 2016 21:31:18 -0500 -Subject: [PATCH] su.c: fix missing length argument to snprintf - ---- - src/su.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/su.c b/src/su.c -index 0c50a9456afd..93ffd2fbe2b4 100644 ---- a/src/su.c -+++ b/src/su.c -@@ -373,8 +373,8 @@ static void prepare_pam_close_session (void) - stderr); - (void) kill (-pid_child, caught); - -- snprintf (kill_msg, _(" ...killed.\n")); -- snprintf (wait_msg, _(" ...waiting for child to terminate.\n")); -+ snprintf (kill_msg, 256, _(" ...killed.\n")); -+ snprintf (wait_msg, 256, _(" ...waiting for child to terminate.\n")); - - (void) signal (SIGALRM, kill_child); - (void) alarm (2); --- -2.11.0.rc2 - diff --git a/gnu/packages/patches/shadow-CVE-2017-2616.patch b/gnu/packages/patches/shadow-CVE-2017-2616.patch deleted file mode 100644 index f88aac40bc..0000000000 --- a/gnu/packages/patches/shadow-CVE-2017-2616.patch +++ /dev/null @@ -1,72 +0,0 @@ -Fix CVE-2017-2616: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-2616 -http://seclists.org/oss-sec/2017/q1/490 -http://seclists.org/oss-sec/2017/q1/474 - -Patch copied from upstream source repository: - -https://github.com/shadow-maint/shadow/commit/08fd4b69e84364677a10e519ccb25b71710ee686 - -From 08fd4b69e84364677a10e519ccb25b71710ee686 Mon Sep 17 00:00:00 2001 -From: Tobias Stoeckmann <tobias@stoeckmann.org> -Date: Thu, 23 Feb 2017 09:47:29 -0600 -Subject: [PATCH] su: properly clear child PID - -If su is compiled with PAM support, it is possible for any local user -to send SIGKILL to other processes with root privileges. There are -only two conditions. First, the user must be able to perform su with -a successful login. This does NOT have to be the root user, even using -su with the same id is enough, e.g. "su $(whoami)". Second, SIGKILL -can only be sent to processes which were executed after the su process. -It is not possible to send SIGKILL to processes which were already -running. I consider this as a security vulnerability, because I was -able to write a proof of concept which unlocked a screen saver of -another user this way. ---- - src/su.c | 19 +++++++++++++++++-- - 1 file changed, 17 insertions(+), 2 deletions(-) - -diff --git a/src/su.c b/src/su.c -index f20d230..d86aa86 100644 ---- a/src/su.c -+++ b/src/su.c -@@ -379,11 +379,13 @@ static void prepare_pam_close_session (void) - /* wake child when resumed */ - kill (pid, SIGCONT); - stop = false; -+ } else { -+ pid_child = 0; - } - } while (!stop); - } - -- if (0 != caught) { -+ if (0 != caught && 0 != pid_child) { - (void) fputs ("\n", stderr); - (void) fputs (_("Session terminated, terminating shell..."), - stderr); -@@ -393,9 +395,22 @@ static void prepare_pam_close_session (void) - snprintf (wait_msg, sizeof wait_msg, _(" ...waiting for child to terminate.\n")); - - (void) signal (SIGALRM, kill_child); -+ (void) signal (SIGCHLD, catch_signals); - (void) alarm (2); - -- (void) wait (&status); -+ sigemptyset (&ourset); -+ if ((sigaddset (&ourset, SIGALRM) != 0) -+ || (sigprocmask (SIG_BLOCK, &ourset, NULL) != 0)) { -+ fprintf (stderr, _("%s: signal masking malfunction\n"), Prog); -+ kill_child (0); -+ } else { -+ while (0 == waitpid (pid_child, &status, WNOHANG)) { -+ sigsuspend (&ourset); -+ } -+ pid_child = 0; -+ (void) sigprocmask (SIG_UNBLOCK, &ourset, NULL); -+ } -+ - (void) fputs (_(" ...terminated.\n"), stderr); - } - diff --git a/gnu/packages/php.scm b/gnu/packages/php.scm index ab277ed973..1b55cd4eb9 100644 --- a/gnu/packages/php.scm +++ b/gnu/packages/php.scm @@ -53,7 +53,7 @@ (define-public php (package (name "php") - (version "7.1.4") + (version "7.1.5") (home-page "https://secure.php.net/") (source (origin (method url-fetch) @@ -61,7 +61,7 @@ name "-" version ".tar.xz")) (sha256 (base32 - "02rh1lcfj2hakyls73gwn6w00yblnfh4883w13gn7sgkmn346lbi")) + "1b7njiqgy66ga5c8wsm78mqqjr7lj3hlpwbbvksi2mn4jv1s6jfi")) (modules '((guix build utils))) (snippet '(with-directory-excursion "ext" @@ -169,12 +169,6 @@ "ext/standard/tests/general_functions/proc_open.phpt") (("/bin/cat") (which "cat"))) - ;; These tests fail because they include a file whose modification - ;; time is 0. Touch them to make the test pass. The issue is reported - ;; upstream as #74137. - (utime "sapi/phpdbg/tests/include.inc" 1 1) - (utime "sapi/phpdbg/tests/phpdbg_get_executable_stream_wrapper.inc" 1 1) - ;; The encoding of this file is not recognized, so we simply drop it. (delete-file "ext/mbstring/tests/mb_send_mail07.phpt") diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 57a67de416..54dc493904 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -10717,14 +10717,14 @@ development version of CPython that are not available in older releases.") (define-public python-future (package (name "python-future") - (version "0.15.2") + (version "0.16.0") (source (origin (method url-fetch) (uri (pypi-uri "future" version)) (sha256 (base32 - "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx")))) + "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773")))) (build-system python-build-system) ;; Many tests connect to the network or are otherwise flawed. ;; https://github.com/PythonCharmers/python-future/issues/210 diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 074ef0b466..d94c652ab2 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -47,7 +47,7 @@ #:use-module (gnu packages icu4c) #:use-module (gnu packages image) #:use-module (gnu packages linux) - #:use-module (gnu packages databases) + #:use-module (gnu packages maths) #:use-module (gnu packages pciutils) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) @@ -349,7 +349,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtbase (package (name "qtbase") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -358,7 +358,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "0zjmcrmnnmaz1lr9wc5i6y565hsvl8ycn790ivqaz62dv54zbkgd")) + "01f07yjly7y24njl2h4hyknmi7pf8yd9gky23szcfkd40ap12wf1")) (modules '((guix build utils))) (snippet '(begin @@ -375,6 +375,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") `(("alsa-lib" ,alsa-lib) ("cups" ,cups) ("dbus" ,dbus) + ("double-conversion" ,double-conversion) ("eudev" ,eudev) ("expat" ,expat) ("fontconfig" ,fontconfig) @@ -467,19 +468,15 @@ developers using C++ or QML, a CSS & JavaScript like language.") "-openssl-linked" ;; explicitly link with dbus instead of dlopening it "-dbus-linked" - ;; drop special machine instructions not supported - ;; on all instances of the target + ;; don't use the precompiled headers + "-no-pch" + ;; drop special machine instructions that do not have + ;; runtime detection ,@(if (string-prefix? "x86_64" (or (%current-target-system) (%current-system))) '() '("-no-sse2")) - "-no-sse3" - "-no-ssse3" - "-no-sse4.1" - "-no-sse4.2" - "-no-avx" - "-no-avx2" "-no-mips_dsp" "-no-mips_dspr2"))))) (add-after 'install 'patch-qt_config.prf @@ -532,7 +529,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtsvg (package (inherit qtbase) (name "qtsvg") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -541,7 +538,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "0irr9h566hl9nx8p919rz276zbfvvd6vqdb6i9g6b3piikdigw5h")))) + "12fwzbp28szqw1sk3flb8i6xnxgl94siwyy41ffdmd0s44f1jwwq")))) (propagated-inputs `()) (native-inputs `(("perl" ,perl))) (inputs @@ -575,7 +572,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtimageformats (package (inherit qtsvg) (name "qtimageformats") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -584,11 +581,10 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "1x3p1xmw7spxa4bwriyrwsfrq31jabsdjsi5fras9y39naia55sg")) + "0vv0wh5q5sih294x661djzwvgdwy7r6xpnxsc111k5hwq7m5w13m")) (modules '((guix build utils))) (snippet - '(begin - (delete-file-recursively "src/3rdparty"))))) + '(delete-file-recursively "src/3rdparty")))) (native-inputs `()) (inputs `(("jasper" ,jasper) @@ -602,7 +598,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtx11extras (package (inherit qtsvg) (name "qtx11extras") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -611,7 +607,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "09z49jm70f5i0gcdz9a16z00pg96x8pz7vri5wpirh3fqqn0qnjz")))) + "03i8lk9qcdf8h2k4f3rkqqkzbrlnyaspv9mgjkn4k61s2asz5mxy")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:tests? _ #f) #f))) ; TODO: Enable the tests @@ -623,7 +619,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtxmlpatterns (package (inherit qtsvg) (name "qtxmlpatterns") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -632,7 +628,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "1rgqnpg64gn5agmvjwy0am8hp5fpxl3cdkixr1yrsdxi5a6961d8")))) + "016s75j2cml7kc8scdm9a6pmxm8jhs424lml2h9znm1flmgadzvv")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:phases phases) @@ -640,7 +636,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (add-after 'unpack 'disable-network-tests (lambda _ (substitute* "tests/auto/auto.pro" (("qxmlquery") "# qxmlquery") - (("xmlpatterns") "# xmlpatterns")) + (("xmlpatterns ") "# xmlpatterns")) #t)))))) (native-inputs `(("perl" ,perl))) (inputs `(("qtbase" ,qtbase))))) @@ -648,7 +644,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtdeclarative (package (inherit qtsvg) (name "qtdeclarative") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -657,7 +653,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "0mjxfwnplpx60jc6y94krg00isddl9bfwc7dayl981njb4qds4zx")))) + "0ilaf2sprpk9fg2j3905hxnhm0xbnm88ppk4zifp7n0jmnwix51j")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:tests? _ #f) #f))) ; TODO: Enable the tests @@ -674,7 +670,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtconnectivity (package (inherit qtsvg) (name "qtconnectivity") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -683,7 +679,18 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "0rmr7bd4skby7bax9hpj2sid2bq3098nkw7xm02mdp04hc3bks5k")))) + "1w97na5s420y08dcydqinbqb0rd9h4pfdnjbwslr0qvzsvlh2bbv")))) + (arguments + (substitute-keyword-arguments (package-arguments qtsvg) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'disable-failing-tests + ;; this test fails on armhf and aarch64 + (lambda _ + (substitute* "tests/auto/qndefnfcsmartposterrecord/tst_qndefnfcsmartposterrecord.cpp" + (("QCOMPARE\\(record.action\\(\\), QNdefNfcSmartPosterRecord::UnspecifiedAction") + "//QCOMPARE(record.action(), QNdefNfcSmartPosterRecord::UnspecifiedAction")) + #t)))))) (native-inputs `(("perl" ,perl) ("pkg-config" ,pkg-config) @@ -695,7 +702,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtwebsockets (package (inherit qtsvg) (name "qtwebsockets") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -704,7 +711,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "1laj0slwibs0bg69kgrdhc9k1s6yisq3pcsr0r9rhbkzisv7aajw")))) + "1xa5p36grqxz3fa08amn7r3dy6k28g6y0gkc6jgj7lyhjzr0l4da")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:tests? _ #f) #f))) ; TODO: Enable the tests @@ -716,7 +723,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtsensors (package (inherit qtsvg) (name "qtsensors") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -725,7 +732,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "041v1x8pwfzpyk6y0sy5zgm915pi15xdhiy18fd5wqayvcp99cyc")))) + "15p7bp21yj4cdl5yfc9qnn4lhhiwiwx3b71lrb431kgqxhwhcp9s")))) (native-inputs `(("perl" ,perl) ("qtdeclarative" ,qtdeclarative))) @@ -734,7 +741,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtmultimedia (package (inherit qtsvg) (name "qtmultimedia") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -743,7 +750,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "1vvxmgmvjnz9w1h2ph1j2fy77ij141ycx5fric60lq02pxzifax5")) + "01sakngvsqr90qhrxyghfqdpddpxwbjyzzhm34k0hlpr6i409g58")) (modules '((guix build utils))) (snippet '(begin @@ -769,7 +776,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtwayland (package (inherit qtsvg) (name "qtwayland") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -778,7 +785,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "1iq1c89y4ggq0dxjlf62jyhh8a9l3x7y914x84w5pby8h3hwagzj")))) + "06ilh55vaxbkyv7irw0n11gxgc34ypx2qhqawxzy7kllzg9zcl7z")))) (native-inputs `(("glib" ,glib) ("perl" ,perl) @@ -800,7 +807,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtserialport (package (inherit qtsvg) (name "qtserialport") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -809,7 +816,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "09jsryc0z49cz9783kq48rkn42f10c6krzivp812ddwjsfdy3mbn")))) + "1b86al3zn1pxyk0n59vh8bqxrpz2m0j33ygclaqbxl1sszg7ycaj")))) (native-inputs `(("perl" ,perl))) (inputs `(("qtbase" ,qtbase) @@ -818,7 +825,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtserialbus (package (inherit qtsvg) (name "qtserialbus") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -827,7 +834,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "0mxi43l2inpbar8rmg21qjg33bv3f1ycxjgvzjf12ncnybhdnzkj")))) + "02n1b1wrvfg6c7z15c5c5gv9r5gd4pp58jrd1a8d8fg3ybcksd2q")))) (inputs `(("qtbase" ,qtbase) ("qtserialport" ,qtserialport))))) @@ -835,7 +842,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtwebchannel (package (inherit qtsvg) (name "qtwebchannel") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -844,7 +851,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "16rij92dxy4k5231l3dpmhy7cnz0cjkn50cpzaf014zrdz3kmav3")))) + "0jhbgp9rdp5lpwjrykxmg4lb60wk7gm3dldz5kp3b8ms2dab3xav")))) (native-inputs `(("perl" ,perl) ("qtdeclarative" ,qtdeclarative) @@ -854,7 +861,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtlocation (package (inherit qtsvg) (name "qtlocation") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -863,7 +870,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "17zkzffzwbg6aqhsggs23cmwzq4y45m938842lsc423hfm7fdsgr")))) + "1fqssa8rhq83lnxjcdh4ijqck3lmqglpk8yax8x17w49v6gf78a8")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:tests? _ #f) #f))) ; TODO: Enable the tests @@ -877,7 +884,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qttools (package (inherit qtsvg) (name "qttools") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -886,7 +893,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "1b6zqa5690b8lqms7rrhb8rcq0xg5hp117v3m08qngbcd0i706b4")))) + "10wx4vydj91yag30457c7azx4ihrwky42l7zzwkbmdlksdv8xv4m")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:tests? _ #f) #f))) ; TODO: Enable the tests @@ -900,7 +907,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtscript (package (inherit qtsvg) (name "qtscript") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -909,7 +916,8 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "09m41n95448pszr7inlg03ycb66s1a9hzfylaka92382acf1myav")))) + "1lssbsjf2p2ag02fjq6k6vk7vywhj4jsl286r2fqi78q5lfvjfi9")) + (patches (search-patches "qtscript-disable-tests.patch")))) (native-inputs `(("perl" ,perl) ("qttools" ,qttools))) @@ -919,7 +927,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtquickcontrols (package (inherit qtsvg) (name "qtquickcontrols") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -928,7 +936,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "17cyfyqzjbm9dhq9pjscz36y84y16rmxwk6h826gjfprddrimsvg")))) + "09mkswxw7wa2l8xz9fbblxr1pbi86hggis55j4k8ifnrrw60vrq4")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:tests? _ #f) #f))) ; TODO: Enable the tests @@ -939,7 +947,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtquickcontrols2 (package (inherit qtsvg) (name "qtquickcontrols2") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -948,7 +956,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "1v77ydy4k15lksp3bi2kgha2h7m79g4n7c2qhbr09xnvpb8ars7j")))) + "06yy98x4vic2yrlpp83gf4kvl7kd93q62k178w0cy4sgqxp8d6dh")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:tests? _ #f) #f))) ; TODO: Enable the tests @@ -959,7 +967,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtgraphicaleffects (package (inherit qtsvg) (name "qtgraphicaleffects") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -968,7 +976,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "1j2drnx7zp3w6cgvy7bn00fyk5v7vw1j1hidaqcg78lzb6zgls1c")))) + "06frknb7m8bgg55rs7jjm61iziisy2ykzrrc5dy3vj0aad89najz")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:tests? _ #f) #f))) ; TODO: Enable the tests @@ -977,6 +985,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") ("qtdeclarative" ,qtdeclarative))))) (define-public qtdeclarative-render2d + ;; As of Qt-5.8.0 this module has been merged into qtdeclarative (package (inherit qtsvg) (name "qtdeclarative-render2d") (version "5.7.1") @@ -995,12 +1004,13 @@ developers using C++ or QML, a CSS & JavaScript like language.") (native-inputs `()) (inputs `(("qtbase" ,qtbase) - ("qtdeclarative" ,qtdeclarative))))) + ("qtdeclarative" ,qtdeclarative))) + (properties `((superseded . ,qtdeclarative))))) (define-public qtgamepad (package (inherit qtsvg) (name "qtgamepad") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1009,7 +1019,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "10lijbsg9xx5ddbbjymdgl41nxz99yn1qgiww2kkggxwwdjj2axv")))) + "0dwcrq60h802z694h4108figlr3yvp8fpzhwjzbjm503v8yaxw5j")))) (native-inputs `(("perl" ,perl) ("pkg-config" ,pkg-config))) @@ -1024,7 +1034,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtscxml (package (inherit qtsvg) (name "qtscxml") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1033,7 +1043,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "135kknqdmib2cjryfmvfgv7a2qx9pyba3m7i7nkbc5d742r4mbcx")) + "1i4xl24q4i32mbhyndrwaz0xj79d9n84s320gmkf5rwnfcwrvfxn")) (modules '((guix build utils))) (snippet '(begin @@ -1048,7 +1058,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtpurchasing (package (inherit qtsvg) (name "qtpurchasing") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1057,7 +1067,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "0hkvrgafz1hx9q4yc3nskv3pd3fszghvvd5a7mj33ynf55wpb57n")))) + "0mdkw73yx1csz9mf3wl0w1x1b8cv9j5px4nvakrknkjzaa9qgzdk")))) (inputs `(("qtbase" ,qtbase) ("qtdeclarative" ,qtdeclarative))))) @@ -1065,7 +1075,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtcanvas3d (package (inherit qtsvg) (name "qtcanvas3d") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1074,7 +1084,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "1d5xpq3mhjg4ipxzap7s2vnlfcd02d3yq720npv10xxp2ww0i1x8")) + "18yaikbwk4d7sh09psi3kjn1mxjp4d2f3qchfzgq5x96yn8gfijl")) (modules '((guix build utils))) (snippet '(delete-file-recursively "examples/canvas3d/3rdparty")))) @@ -1099,7 +1109,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtcharts (package (inherit qtsvg) (name "qtcharts") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1108,7 +1118,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "1qrzcddwff2hxsbxrraff16j4abah2zkra2756s1mvydj9lyxzl5")))) + "11m5g1fxip6z2xk1z6g6h4rq7v282qbkxflan8hs87hadnzars03")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:tests? _ #f) #f))) ; TODO: Enable the tests @@ -1119,7 +1129,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtdatavis3d (package (inherit qtsvg) (name "qtdatavis3d") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1128,7 +1138,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "1y00p0wyj5cw9c2925y537vpmmg9q3kpf7qr1s7sv67dvvf8bzqv")))) + "1n2vdf6n7pr9xrjwbvbar899q74shx6cy19x32adxfn2iilygwbp")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:tests? _ #f) #f))) ; TODO: Enable the tests @@ -1139,7 +1149,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public python-sip (package (name "python-sip") - (version "4.18.1") + (version "4.19.2") (source (origin (method url-fetch) @@ -1148,7 +1158,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") "sip-" version "/sip-" version ".tar.gz")) (sha256 (base32 - "1452zy3g0qv4fpd9c0y4gq437kn0xf7bbfniibv5n43zpwnpmklv")))) + "0cq5r21fmjyw5v7a6l4sfbaj3zgm7k5b2cryj6bnjki54nnllas3")))) (build-system gnu-build-system) (native-inputs `(("python" ,python-wrapper))) @@ -1202,7 +1212,7 @@ module provides support functions to the automatically generated code.") (define-public python-pyqt (package (name "python-pyqt") - (version "5.7") + (version "5.8.2") (source (origin (method url-fetch) @@ -1212,7 +1222,7 @@ module provides support functions to the automatically generated code.") version ".tar.gz")) (sha256 (base32 - "01avscn1bir0h8zzfh1jvpljgwg6qkax5nk142xrm63rbyx969l9")) + "1s1nalcspam9dc7f63jkqn1i2sv9lrqn57p2zsc61g8bncahbmzb")) (patches (search-patches "pyqt-configure.patch")))) (build-system gnu-build-system) (native-inputs @@ -1292,17 +1302,17 @@ contain over 620 classes.") (define-public python-pyqt-4 (package (inherit python-pyqt) (name "python-pyqt") - (version "4.11.4") + (version "4.12") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/pyqt/PyQt4/" - "PyQt-" version "/PyQt-x11-gpl-" + "PyQt-" version "/PyQt4_gpl_x11-" version ".tar.gz")) (sha256 (base32 - "01zlviy5lq8g6db84wnvvpsrfnip9lbcpxagsyqa6as3jmsff7zw")))) + "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w")))) (native-inputs `(("python-sip" ,python-sip) ("qt" ,qt-4))) @@ -1431,19 +1441,19 @@ different kinds of sliders, and much more.") (define-public qtwebkit (package (name "qtwebkit") - (version "5.7.1") + (version "5.8.0") (source (origin (method url-fetch) (uri (string-append "http://download.qt.io/community_releases/" (version-major+minor version) - "/" version "/qtwebkit-opensource-src-" version - ".tar.xz")) + "/" version "-final/qtwebkit-opensource-src-" + version ".tar.xz")) ;; Note: since Qt 5.6, Qt no longer officially supports qtwebkit: ;; <http://lists.qt-project.org/pipermail/development/2016-May/025923.html>. (sha256 (base32 - "00szgcra6pf2myfjrdbsr1gmrxycpbjqlzkplna5yr1rjg4gfv54")))) + "1v0vj6slyh19mjrrpbqdzb47fr0f4xk7bc8803xjzybb11h8dbkr")))) (build-system gnu-build-system) (native-inputs `(("perl" ,perl) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 0d4ae1dbb0..14511d0c32 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -447,13 +447,13 @@ expectations and mocks frameworks.") (define-public bundler (package (name "bundler") - (version "1.14.5") + (version "1.14.6") (source (origin (method url-fetch) (uri (rubygems-uri "bundler" version)) (sha256 (base32 - "0635s6naz9hn4iqbvkhnm1by4j4spvv13mb7nzwwimnpbqgx663i")))) + "0h3x2csvlz99v2ryj1w72vn6kixf7rl35lhdryvh7s49brnj0cgl")))) (build-system ruby-build-system) (arguments '(#:tests? #f)) ; avoid dependency cycles @@ -2911,7 +2911,7 @@ differences (added or removed nodes) between two XML/HTML documents.") (define-public ruby-rack (package (name "ruby-rack") - (version "2.0.1") + (version "2.0.3") (source (origin (method url-fetch) @@ -2923,7 +2923,7 @@ differences (added or removed nodes) between two XML/HTML documents.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "00k62v8lpyjzghkn0h0awrnqj1jmlcs2wp57py27m43y65v89cp3")) + "12bnqrcg43x9hsswjqg31qqwk8cwj2fh0d2m179y20bjghhn54kx")) ;; Ignore test which fails inside the build environment but works ;; outside. (patches (search-patches "ruby-rack-ignore-failing-test.patch")))) @@ -4107,7 +4107,7 @@ call.") (define-public ruby-concurrent (package (name "ruby-concurrent") - (version "1.0.2") + (version "1.0.5") (source (origin (method url-fetch) @@ -4120,7 +4120,7 @@ call.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1x3g2admp14ykwfxidsicqbhlfsnxh9wyc806np4i15hws4if1d8")) + "0qhv0qzsby4iijgwa4s9r88zj8123pmyz1dwaqzdk57xgqll9pny")) ;; Exclude failing test reported at ;; https://github.com/ruby-concurrency/concurrent-ruby/issues/534 (patches (search-patches "ruby-concurrent-ignore-broken-test.patch" diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm index 7bce8c5aa7..5873d85b55 100644 --- a/gnu/packages/security-token.scm +++ b/gnu/packages/security-token.scm @@ -35,15 +35,15 @@ (define-public ccid (package (name "ccid") - (version "1.4.26") + (version "1.4.27") (source (origin (method url-fetch) (uri (string-append - "https://alioth.debian.org/frs/download.php/file/4205/" + "https://alioth.debian.org/frs/download.php/file/4218/" "ccid-" version ".tar.bz2")) (sha256 (base32 - "0bxy835c133ajalpj4gx60nqkjvpf9y1n97n04pw105pi9qbyrrj")))) + "0dyikpmhsph36ndgd61bs4yx437v5y0bmm8ahjacp1k9c1ly4q56")))) (build-system gnu-build-system) (arguments `(#:configure-flags (list (string-append "--enable-usbdropdir=" %output @@ -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.20") + (version "1.8.21") (source (origin (method url-fetch) (uri (string-append - "https://alioth.debian.org/frs/download.php/file/4203/" + "https://alioth.debian.org/frs/download.php/file/4216/" "pcsc-lite-" version ".tar.bz2")) (sha256 (base32 - "1ckb0jf4n585a4j26va3jm2nrv3c1y38974514f8qy3c04a02zgc")))) + "1b8kwl81f6s3y7qh68ahr8sp8a0w6m464v9b3s4zxq2cgpmnaczy")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--enable-usbdropdir=/var/lib/pcsc/drivers"))) diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm index 4e684e8c81..47d3a46148 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -32,6 +32,7 @@ #:use-module (gnu packages bison) #:use-module (gnu packages documentation) #:use-module (gnu packages groff) + #:use-module (gnu packages libbsd) #:use-module (gnu packages libedit) #:use-module (gnu packages ncurses) #:use-module (gnu packages pcre) @@ -457,3 +458,39 @@ components: a process notation for running programs and setting up pipelines and redirections, and a complete syscall library for low-level access to the operating system.") (license bsd-3)))) + +(define-public loksh + (package + (name "loksh") + (version "6.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/dimkr/loksh/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1wg7ds56yr8fgg1m149bi53bvrwccwiashmwknggza1sqgj9m2lq")))) + (build-system gnu-build-system) + (inputs + `(("libbsd" ,libbsd))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (arguments + `(#:tests? #f ;No tests included + #:make-flags (list "CC=gcc" "HAVE_LIBBSD=1" + (string-append "DESTDIR=" + (assoc-ref %outputs "out")) + "PREFIX=") + #:phases + (modify-phases %standard-phases + (delete 'configure)))) ;No configure script + (home-page "https://github.com/dimkr/loksh") + (synopsis "Korn Shell from OpenBSD") + (description + "loksh is a Linux port of OpenBSD's @command{ksh}. It is a small, +interactive POSIX shell targeted at resource-constrained systems.") + ;; The file 'LEGAL' says it is the public domain, and the 2 + ;; exceptions which are listed are not included in this port. + (license public-domain))) diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm index b01a94f871..c96ed0a72b 100644 --- a/gnu/packages/ssh.scm +++ b/gnu/packages/ssh.scm @@ -68,6 +68,7 @@ (base32 "03bcp9ksqp0s1pmwfmzhcknvkxay5k0mjzzxp3rjlifbng1vxq9r")))) (build-system cmake-build-system) + (outputs '("out" "debug")) (arguments '(#:configure-flags '("-DWITH_GCRYPT=ON") @@ -238,6 +239,7 @@ Additionally, various channel-specific options can be negotiated.") "], [chmod +x examples/" file "])\n")))))) (build-system gnu-build-system) + (outputs '("out" "debug")) (arguments '(#:phases (modify-phases %standard-phases (add-after 'unpack 'autoreconf diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 1516fb8527..ebf9a47302 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -474,15 +474,14 @@ security, and applying best practice development processes.") (package (name "python-acme") ;; Remember to update the hash of certbot when updating python-acme. - (version "0.14.0") + (version "0.14.1") (source (origin (method url-fetch) (uri (pypi-uri "acme" version)) (sha256 (base32 - "0hrmh28rrc0fsiw6nqfwbkwb1s4nkl54x50c0g0xlnp86752nzff")))) + "0asmkfkzbswnkrvbj5m01xgy4f6g1fjbj2nir1hhrn3ipcdrsv8f")))) (build-system python-build-system) - (arguments `(#:phases (modify-phases %standard-phases @@ -540,7 +539,7 @@ security, and applying best practice development processes.") (uri (pypi-uri name version)) (sha256 (base32 - "0hbp3njss01a0d3brvcfzja0w0j9plwrv6l70jsfvnhy3rrd7bcq")))) + "0rdby57hw35qdrbl7kigscphnz4kqb608bqzrcb73nb99092i6si")))) (build-system python-build-system) (arguments `(#:python ,python-2 diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index f9e8b898c9..b7c26a0424 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -273,7 +273,7 @@ H.264 (MPEG-4 AVC) video streams.") (define-public x265 (package (name "x265") - (version "2.3") + (version "2.4") (source (origin (method url-fetch) @@ -281,7 +281,7 @@ H.264 (MPEG-4 AVC) video streams.") "x265_" version ".tar.gz")) (sha256 (base32 - "07z4ydxg0lk6j43h0wlh2xddb91cy4y4mny2ln71d4278b1hllj7")) + "0afp0xlk0fb4q6j4sh3hyvjnjccdp61sn21zg3fyqvwgswcafalw")) (modules '((guix build utils))) (snippet '(delete-file-recursively "source/compat/getopt")))) @@ -646,7 +646,7 @@ audio/video codec library.") (define-public vlc (package (name "vlc") - (version "2.2.4") + (version "2.2.5.1") (source (origin (method url-fetch) (uri (string-append @@ -654,14 +654,7 @@ audio/video codec library.") version "/vlc-" version ".tar.xz")) (sha256 (base32 - "1gjkrwlg8ab3skzl67cxb9qzg4187ifckd1z9kpy11q058fyjchn")) - (modules '((guix build utils))) - (snippet - ;; There are two occurrences where __DATE__ and __TIME__ are - ;; used to capture the build time and show it to the user. - '(substitute* (find-files "." "help\\.c(pp)?$") - (("__DATE__") "\"2016\"") - (("__TIME__") "\"00:00\""))))) + "1k51vm6piqlrnld7sxyg0s4kdkd3lan97lmy3v5wdh3qyll8m2xj")))) (build-system gnu-build-system) (native-inputs `(("git" ,git) ; needed for a test @@ -1599,14 +1592,14 @@ tools, XML authoring components, and an extensible plug-in based API.") (define-public v4l-utils (package (name "v4l-utils") - (version "1.12.3") + (version "1.12.5") (source (origin (method url-fetch) (uri (string-append "https://linuxtv.org/downloads/v4l-utils" "/v4l-utils-" version ".tar.bz2")) (sha256 (base32 - "0vpl3jl0x441y7b5cn7zhdsyi954hp9h2p30jhnr1zkx1rpxsiss")))) + "03g2b4rivrilimcp57mwrlsa3qvrxmk4sza08mygwmqbvcnic606")))) (build-system gnu-build-system) (arguments '(#:configure-flags @@ -1816,14 +1809,14 @@ specifications.") (define-public libaacs (package (name "libaacs") - (version "0.8.1") + (version "0.9.0") (source (origin (method url-fetch) (uri (string-append "ftp://ftp.videolan.org/pub/videolan/libaacs/" version "/" name "-" version ".tar.bz2")) (sha256 - (base32 "1s5v075hnbs57995r6lljm79wgrip3gnyf55a0y7bja75jh49hwm")))) + (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27")))) (inputs `(("libgcrypt" ,libgcrypt))) (native-inputs diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm index 697c7dedc7..27c0b0da9c 100644 --- a/gnu/packages/vim.scm +++ b/gnu/packages/vim.scm @@ -60,7 +60,7 @@ (define-public vim (package (name "vim") - (version "8.0.0566") + (version "8.0.0600") (source (origin (method url-fetch) (uri (string-append "https://github.com/vim/vim/archive/v" @@ -68,7 +68,7 @@ (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0qq9pj8391sikzaahlqi289l5wdkbvsdhz8qb6np268yqizpg4p2")))) + "1ifaj0lfzqn06snkcd83l58m9r6lg7lk3wspx71k5ycvypyfi67s")))) (build-system gnu-build-system) (arguments `(#:test-target "test" @@ -138,6 +138,10 @@ configuration files.") ;; https://github.com/vim/vim/issues/1460 (substitute* "src/testdir/test_cmdline.vim" (("call assert_equal\\(.+getcmd.+\\(\\)\\)") "")) + ;; FIXME: This test broke after GCC-5 core-updates merge. + ;; "Test_system_exmode line 7: Expected '0' but got '/'" + (substitute* "src/testdir/test_system.vim" + (("call assert_equal\\('0', a\\[0\\]\\)") "")) #t)) (add-before 'check 'start-xserver (lambda* (#:key inputs #:allow-other-keys) diff --git a/gnu/system.scm b/gnu/system.scm index 2fab394d23..0076f2fcb1 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -48,6 +48,7 @@ #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu services base) + #:use-module (gnu bootloader) #:use-module (gnu system shadow) #:use-module (gnu system nss) #:use-module (gnu system locale) @@ -103,6 +104,7 @@ boot-parameters? boot-parameters-label boot-parameters-root-device + boot-parameters-boot-name boot-parameters-store-device boot-parameters-store-mount-point boot-parameters-kernel @@ -139,7 +141,7 @@ booted from ROOT-DEVICE" (default linux-libre)) (kernel-arguments operating-system-user-kernel-arguments (default '())) ; list of gexps/strings - (bootloader operating-system-bootloader) ; <grub-configuration> + (bootloader operating-system-bootloader) ; <bootloader-configuration> (initrd operating-system-initrd ; (list fs) -> M derivation (default base-initrd)) @@ -213,6 +215,7 @@ directly by the user." ;; exactly to the device field of the <file-system> object representing the ;; OS's root file system, so it might be a device path like "/dev/sda3". (root-device boot-parameters-root-device) + (boot-name boot-parameters-boot-name) (store-device boot-parameters-store-device) (store-mount-point boot-parameters-store-mount-point) (kernel boot-parameters-kernel) @@ -231,6 +234,11 @@ directly by the user." (label label) (root-device root) + (boot-name + (match (assq 'boot-name rest) + ((_ args) args) + (#f 'grub))) ; for compatibility reasons. + ;; In the past, we would store the directory name of the kernel instead ;; of the absolute file name of its image. Detect that and correct it. (kernel (if (string=? linux (direct-store-path linux)) @@ -847,12 +855,11 @@ populate the \"old entries\" menu." (root-device -> (if (eq? 'uuid (file-system-title root-fs)) (uuid->string (file-system-device root-fs)) (file-system-device root-fs))) - (entry (operating-system-boot-parameters os system root-device))) - ((module-ref (resolve-interface '(gnu system grub)) - 'grub-configuration-file) - (operating-system-bootloader os) - (list entry) - #:old-entries old-entries))) + (entry (operating-system-boot-parameters os system root-device)) + (bootloader-conf -> (operating-system-bootloader os))) + ((bootloader-configuration-file-generator + (bootloader-configuration-bootloader bootloader-conf)) + bootloader-conf (list entry) #:old-entries old-entries))) (define (fs->boot-device fs) "Given FS, a <file-system> object, return a value suitable for use as the @@ -869,6 +876,9 @@ kernel arguments for that derivation to <boot-parameters>." (mlet* %store-monad ((initrd (operating-system-initrd-file os)) (store -> (operating-system-store-file-system os)) + (bootloader -> (bootloader-configuration-bootloader + (operating-system-bootloader os))) + (boot-name -> (bootloader-name bootloader)) (label -> (kernel->boot-label (operating-system-kernel os)))) (return (boot-parameters (label label) @@ -879,6 +889,7 @@ kernel arguments for that derivation to <boot-parameters>." (operating-system-kernel-arguments os system.drv root-device) (operating-system-user-kernel-arguments os))) (initrd initrd) + (boot-name boot-name) (store-device (fs->boot-device store)) (store-mount-point (file-system-mount-point store)))))) @@ -904,6 +915,7 @@ being stored into the \"parameters\" file)." (kernel-arguments #$(boot-parameters-kernel-arguments params)) (initrd #$(boot-parameters-initrd params)) + (boot-name #$(boot-parameters-boot-name params)) (store (device #$(boot-parameters-store-device params)) (mount-point #$(boot-parameters-store-mount-point params)))) diff --git a/gnu/system/examples/lightweight-desktop.tmpl b/gnu/system/examples/lightweight-desktop.tmpl index 389ec8574b..6fb6283d29 100644 --- a/gnu/system/examples/lightweight-desktop.tmpl +++ b/gnu/system/examples/lightweight-desktop.tmpl @@ -4,23 +4,31 @@ (use-modules (gnu) (gnu system nss)) (use-service-modules desktop) -(use-package-modules wm ratpoison certs suckless) +(use-package-modules bootloaders certs ratpoison suckless wm) (operating-system (host-name "antelope") (timezone "Europe/Paris") (locale "en_US.utf8") - ;; Assuming /dev/sdX is the target hard disk, and "my-root" - ;; is the label of the target root file system. - (bootloader (grub-configuration (device "/dev/sdX"))) - - (file-systems (cons (file-system - (device "my-root") - (title 'label) - (mount-point "/") - (type "ext4")) - %base-file-systems)) + ;; Use the UEFI variant of GRUB with the EFI System + ;; Partition on /dev/sda1. + (bootloader (grub-configuration (grub grub-efi) + (device "/dev/sda1"))) + + ;; Assume the target root file system is labelled "my-root". + (file-systems (cons* (file-system + (device "my-root") + (title 'label) + (mount-point "/") + (type "ext4")) + (file-system + ;; Specify partition here since FAT + ;; labels are currently unsupported. + (device "/dev/sda1") + (mount-point "/boot/efi") + (type "vfat")) + %base-file-systems)) (users (cons (user-account (name "alice") diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index f01f68fbd3..ad5e6b75bb 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -47,10 +47,11 @@ #:select (%guile-static-stripped)) #:use-module (gnu packages admin) + #:use-module (gnu bootloader) #:use-module (gnu system shadow) #:use-module (gnu system pam) #:use-module (gnu system linux-initrd) - #:use-module (gnu system grub) + #:use-module (gnu bootloader) #:use-module (gnu system file-systems) #:use-module (gnu system) #:use-module (gnu services) @@ -177,8 +178,9 @@ made available under the /xchg CIFS share." (disk-image-format "qcow2") (file-system-type "ext4") file-system-label - os-derivation - grub-configuration + os-drv + bootcfg-drv + bootloader (register-closures? #t) (inputs '()) copy-inputs?) @@ -202,7 +204,7 @@ the image." (guix build utils)) (let ((inputs - '#$(append (list qemu parted grub e2fsprogs dosfstools) + '#$(append (list qemu parted e2fsprogs dosfstools) (map canonical-package (list sed grep coreutils findutils gawk)) (if register-closures? (list guix) '()))) @@ -224,7 +226,7 @@ the image." #:closures graphs #:copy-closures? #$copy-inputs? #:register-closures? #$register-closures? - #:system-directory #$os-derivation)) + #:system-directory #$os-drv)) (partitions (list (partition (size #$(- disk-image-size (* 50 (expt 2 20)))) @@ -246,8 +248,14 @@ the image." (flags '(esp)))))) (initialize-hard-disk "/dev/vda" #:partitions partitions - #:grub.cfg #$grub-configuration - #:grub-efi #$grub-efi) + #:grub-efi #$grub-efi + #:bootloader-package + #$(bootloader-package bootloader) + #:bootcfg #$bootcfg-drv + #:bootcfg-location + #$(bootloader-configuration-file bootloader) + #:bootloader-installer + #$(bootloader-installer bootloader)) (reboot))))) #:system system #:make-disk-image? #t @@ -301,8 +309,10 @@ to USB sticks meant to be read-only." (mlet* %store-monad ((os-drv (operating-system-derivation os)) (bootcfg (operating-system-bootcfg os))) (qemu-image #:name name - #:os-derivation os-drv - #:grub-configuration bootcfg + #:os-drv os-drv + #:bootcfg-drv bootcfg + #:bootloader (bootloader-configuration-bootloader + (operating-system-bootloader os)) #:disk-image-size disk-image-size #:disk-image-format "raw" #:file-system-type file-system-type @@ -344,8 +354,10 @@ of the GNU system as described by OS." (mlet* %store-monad ((os-drv (operating-system-derivation os)) (bootcfg (operating-system-bootcfg os))) - (qemu-image #:os-derivation os-drv - #:grub-configuration bootcfg + (qemu-image #:os-drv os-drv + #:bootcfg-drv bootcfg + #:bootloader (bootloader-configuration-bootloader + (operating-system-bootloader os)) #:disk-image-size disk-image-size #:file-system-type file-system-type #:inputs `(("system" ,os-drv) @@ -443,8 +455,10 @@ bootloader refers to: OS kernel, initrd, bootloader data, etc." ;; BOOTCFG and all its dependencies, including the output of OS-DRV. ;; This is more than needed (we only need the kernel, initrd, GRUB for its ;; font, and the background image), but it's hard to filter that. - (qemu-image #:os-derivation os-drv - #:grub-configuration bootcfg + (qemu-image #:os-drv os-drv + #:bootcfg-drv bootcfg + #:bootloader (bootloader-configuration-bootloader + (operating-system-bootloader os)) #:disk-image-size disk-image-size #:inputs (if full-boot? `(("bootcfg" ,bootcfg)) diff --git a/gnu/tests.scm b/gnu/tests.scm index 810711ab91..2886a982f4 100644 --- a/gnu/tests.scm +++ b/gnu/tests.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,8 +21,8 @@ #:use-module (guix gexp) #:use-module (guix utils) #:use-module (guix records) + #:use-module (gnu bootloader grub) #:use-module (gnu system) - #:use-module (gnu system grub) #:use-module (gnu system file-systems) #:use-module (gnu system shadow) #:use-module (gnu services) diff --git a/gnu/tests/nfs.scm b/gnu/tests/nfs.scm index 1f28f5a5b8..9e1ac1d55a 100644 --- a/gnu/tests/nfs.scm +++ b/gnu/tests/nfs.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016 John Darrington <jmd@gnu.org> +;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,8 +20,8 @@ (define-module (gnu tests nfs) #:use-module (gnu tests) + #:use-module (gnu bootloader grub) #: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) diff --git a/guix/build-system/asdf.scm b/guix/build-system/asdf.scm index f28c098ea2..ec8b64497f 100644 --- a/guix/build-system/asdf.scm +++ b/guix/build-system/asdf.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca> +;;; Copyright © 2016, 2017 Andy Patterson <ajpatter@uwaterloo.ca> ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,6 +22,9 @@ #:use-module (guix packages) #:use-module (guix derivations) #:use-module (guix search-paths) + #:use-module ((guix build utils) + #:select ((package-name->name+version + . hyphen-separated-name->name+version))) #:use-module (guix build-system) #:use-module (guix build-system gnu) #:use-module (ice-9 match) @@ -163,39 +166,40 @@ set up using CL source package conventions." (match-lambda ((name content . rest) (let* ((is-package? (package? content)) - (new-content (if is-package? (transform content) content)) - (new-name (if (and is-package? - (string-prefix? from-prefix name)) - (package-name new-content) - name))) - `(,new-name ,new-content ,@rest))))) + (new-content (if is-package? (transform content) content))) + `(,name ,new-content ,@rest))))) ;; Special considerations for source packages: CL inputs become - ;; propagated, and un-handled arguments are removed. Native inputs are - ;; removed as are extraneous outputs. + ;; propagated, and un-handled arguments are removed. + (define new-propagated-inputs (if target-is-source? (map rewrite - (filter (match-lambda - ((_ input . _) - (has-from-build-system? input))) - (package-inputs pkg))) - '())) - - (define new-inputs + (append + (filter (match-lambda + ((_ input . _) + (has-from-build-system? input))) + (append (package-inputs pkg) + ;; The native inputs might be needed just + ;; to load the system. + (package-native-inputs pkg))) + (package-propagated-inputs pkg))) + + (map rewrite (package-propagated-inputs pkg)))) + + (define (new-inputs inputs-getter) (if target-is-source? (map rewrite (filter (match-lambda ((_ input . _) (not (has-from-build-system? input)))) - (package-inputs pkg))) - (map rewrite (package-inputs pkg)))) + (inputs-getter pkg))) + (map rewrite (inputs-getter pkg)))) (define base-arguments (if target-is-source? (strip-keyword-arguments - '(#:tests? #:special-dependencies #:asd-file - #:test-only-systems #:lisp) + '(#:tests? #:asd-file #:lisp #:asd-system-name #:test-asd-file) (package-arguments pkg)) (package-arguments pkg))) @@ -213,11 +217,9 @@ set up using CL source package conventions." (arguments (substitute-keyword-arguments base-arguments ((#:phases phases) (list phases-transformer phases)))) - (inputs new-inputs) + (inputs (new-inputs package-inputs)) (propagated-inputs new-propagated-inputs) - (native-inputs (if target-is-source? - '() - (map rewrite (package-native-inputs pkg)))) + (native-inputs (new-inputs package-native-inputs)) (outputs (if target-is-source? '("out") (package-outputs pkg))))) @@ -233,10 +235,10 @@ set up using CL source package conventions." (properties (alist-delete variant properties))) pkg)) -(define (lower lisp-implementation) +(define (lower lisp-type) (lambda* (name #:key source inputs outputs native-inputs system target - (lisp (default-lisp (string->symbol lisp-implementation))) + (lisp (default-lisp (string->symbol lisp-type))) #:allow-other-keys #:rest arguments) "Return a bag for NAME" @@ -252,20 +254,19 @@ set up using CL source package conventions." '()) ,@inputs ,@(standard-packages))) - (build-inputs `((,lisp-implementation ,lisp) + (build-inputs `((,lisp-type ,lisp) ,@native-inputs)) (outputs outputs) - (build (asdf-build lisp-implementation)) + (build (asdf-build lisp-type)) (arguments (strip-keyword-arguments private-keywords arguments)))))) -(define (asdf-build lisp-implementation) +(define (asdf-build lisp-type) (lambda* (store name inputs #:key source outputs (tests? #t) - (special-dependencies ''()) (asd-file #f) - (test-only-systems ''()) - (lisp lisp-implementation) + (asd-system-name #f) + (test-asd-file #f) (phases '(@ (guix build asdf-build-system) %standard-phases)) (search-paths '()) @@ -274,26 +275,36 @@ set up using CL source package conventions." (imported-modules %asdf-build-system-modules) (modules %asdf-build-modules)) + (define system-name + (or asd-system-name + (string-drop + ;; NAME is the value returned from `package-full-name'. + (hyphen-separated-name->name+version name) + (1+ (string-length lisp-type))))) ; drop the "<lisp>-" prefix. + (define builder `(begin (use-modules ,@modules) - (asdf-build #:name ,name - #:source ,(match (assoc-ref inputs "source") - (((? derivation? source)) - (derivation->output-path source)) - ((source) source) - (source source)) - #:lisp ,lisp - #:special-dependencies ,special-dependencies - #:asd-file ,asd-file - #:test-only-systems ,test-only-systems - #:system ,system - #:tests? ,tests? - #:phases ,phases - #:outputs %outputs - #:search-paths ',(map search-path-specification->sexp - search-paths) - #:inputs %build-inputs))) + (parameterize ((%lisp (string-append + (assoc-ref %build-inputs ,lisp-type) + "/bin/" ,lisp-type)) + (%lisp-type ,lisp-type)) + (asdf-build #:name ,name + #:source ,(match (assoc-ref inputs "source") + (((? derivation? source)) + (derivation->output-path source)) + ((source) source) + (source source)) + #:asd-file ,(or asd-file (string-append system-name ".asd")) + #:asd-system-name ,system-name + #:test-asd-file ,test-asd-file + #:system ,system + #:tests? ,tests? + #:phases ,phases + #:outputs %outputs + #:search-paths ',(map search-path-specification->sexp + search-paths) + #:inputs %build-inputs)))) (define guile-for-build (match guile diff --git a/guix/build/asdf-build-system.scm b/guix/build/asdf-build-system.scm index 085d073dea..c5e820a00a 100644 --- a/guix/build/asdf-build-system.scm +++ b/guix/build/asdf-build-system.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca> +;;; Copyright © 2016, 2017 Andy Patterson <ajpatter@uwaterloo.ca> ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,6 +21,7 @@ #:use-module (guix build utils) #:use-module (guix build lisp-utils) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) #:use-module (ice-9 rdelim) #:use-module (ice-9 receive) @@ -42,50 +43,42 @@ (define %object-prefix "/lib") -(define (source-install-prefix lisp) - (string-append %install-prefix "/" lisp "-source")) +(define (%lisp-source-install-prefix) + (string-append %source-install-prefix "/" (%lisp-type) "-source")) (define %system-install-prefix - (string-append %install-prefix "/systems")) + (string-append %source-install-prefix "/systems")) -(define (output-path->package-name path) - (package-name->name+version (strip-store-file-name path))) - -(define (outputs->name outputs) - (output-path->package-name - (assoc-ref outputs "out"))) - -(define (lisp-source-directory output lisp name) - (string-append output (source-install-prefix lisp) "/" name)) +(define (lisp-source-directory output name) + (string-append output (%lisp-source-install-prefix) "/" name)) (define (source-directory output name) - (string-append output %install-prefix "/source/" name)) + (string-append output %source-install-prefix "/source/" name)) -(define (library-directory output lisp) +(define (library-directory output) (string-append output %object-prefix - "/" lisp)) + "/" (%lisp-type))) (define (output-translation source-path - object-output - lisp) + object-output) "Return a translation for the system's source path to it's binary output." `((,source-path :**/ :*.*.*) - (,(library-directory object-output lisp) + (,(library-directory object-output) :**/ :*.*.*))) -(define (source-asd-file output lisp name asd-file) - (string-append (lisp-source-directory output lisp name) "/" asd-file)) - -(define (copy-files-to-output outputs output name) - "Copy all files from OUTPUT to \"out\". Create an extra link to any -system-defining files in the source to a convenient location. This is done -before any compiling so that the compiled source locations will be valid." - (let* ((out (assoc-ref outputs output)) - (source (getcwd)) - (target (source-directory out name)) - (system-path (string-append out %system-install-prefix))) +(define (source-asd-file output name asd-file) + (string-append (lisp-source-directory output name) "/" asd-file)) + +(define (copy-files-to-output out name) + "Copy all files from the current directory to OUT. Create an extra link to +any system-defining files in the source to a convenient location. This is +done before any compiling so that the compiled source locations will be +valid." + (let ((source (getcwd)) + (target (source-directory out name)) + (system-path (string-append out %system-install-prefix))) (copy-recursively source target) (mkdir-p system-path) (for-each @@ -97,45 +90,38 @@ before any compiling so that the compiled source locations will be valid." (define* (install #:key outputs #:allow-other-keys) "Copy and symlink all the source files." - (copy-files-to-output outputs "out" (outputs->name outputs))) - -(define* (copy-source #:key outputs lisp #:allow-other-keys) - "Copy the source to \"out\"." - (let* ((out (assoc-ref outputs "out")) - (name (remove-lisp-from-name (output-path->package-name out) lisp)) - (install-path (string-append out %install-prefix))) - (copy-files-to-output outputs "out" name) + (define output (assoc-ref outputs "out")) + (copy-files-to-output output + (package-name->name+version + (strip-store-file-name output)))) + +(define* (copy-source #:key outputs asd-system-name #:allow-other-keys) + "Copy the source to the library output." + (let* ((out (library-output outputs)) + (install-path (string-append out %source-install-prefix))) + (copy-files-to-output out asd-system-name) ;; Hide the files from asdf (with-directory-excursion install-path - (rename-file "source" (string-append lisp "-source")) + (rename-file "source" (string-append (%lisp-type) "-source")) (delete-file-recursively "systems"))) #t) -(define* (build #:key outputs inputs lisp asd-file +(define* (build #:key outputs inputs asd-file asd-system-name #:allow-other-keys) "Compile the system." - (let* ((out (assoc-ref outputs "out")) - (name (remove-lisp-from-name (output-path->package-name out) lisp)) - (source-path (lisp-source-directory out lisp name)) + (let* ((out (library-output outputs)) + (source-path (lisp-source-directory out asd-system-name)) (translations (wrap-output-translations `(,(output-translation source-path - out - lisp)))) - (asd-file (and=> asd-file (cut source-asd-file out lisp name <>)))) + out)))) + (asd-file (source-asd-file out asd-system-name asd-file))) (setenv "ASDF_OUTPUT_TRANSLATIONS" (replace-escaped-macros (format #f "~S" translations))) - ;; We don't need this if we have the asd file, and it can mess with the - ;; load ordering we're trying to enforce - (unless asd-file - (prepend-to-source-registry (string-append source-path "//"))) - (setenv "HOME" out) ; ecl's asdf sometimes wants to create $HOME/.cache - (parameterize ((%lisp (string-append - (assoc-ref inputs lisp) "/bin/" lisp))) - (compile-system name lisp asd-file)) + (compile-system asd-system-name asd-file) ;; As above, ecl will sometimes create this even though it doesn't use it @@ -144,56 +130,48 @@ before any compiling so that the compiled source locations will be valid." (delete-file-recursively cache-directory)))) #t) -(define* (check #:key lisp tests? outputs inputs asd-file +(define* (check #:key tests? outputs inputs asd-file asd-system-name + test-asd-file #:allow-other-keys) "Test the system." - (let* ((name (remove-lisp-from-name (outputs->name outputs) lisp)) - (out (assoc-ref outputs "out")) - (asd-file (and=> asd-file (cut source-asd-file out lisp name <>)))) + (let* ((out (library-output outputs)) + (asd-file (source-asd-file out asd-system-name asd-file)) + (test-asd-file + (and=> test-asd-file + (cut source-asd-file out asd-system-name <>)))) (if tests? - (parameterize ((%lisp (string-append - (assoc-ref inputs lisp) "/bin/" lisp))) - (test-system name lisp asd-file)) + (test-system asd-system-name asd-file test-asd-file) (format #t "test suite not run~%"))) #t) -(define* (patch-asd-files #:key outputs +(define* (create-asd-file #:key outputs inputs - lisp - special-dependencies - test-only-systems + asd-file + asd-system-name #:allow-other-keys) - "Patch any asd files created by the compilation process so that they can -find their dependencies. Exclude any TEST-ONLY-SYSTEMS which were only -included to run tests. Add any SPECIAL-DEPENDENCIES which the LISP -implementation itself provides." - (let* ((out (assoc-ref outputs "out")) - (name (remove-lisp-from-name (output-path->package-name out) lisp)) - (registry (lset-difference - (lambda (input system) - (match input - ((name . path) (string=? name system)))) - (lisp-dependencies lisp inputs) - test-only-systems)) - (lisp-systems (map first registry))) - - (for-each - (lambda (asd-file) - (patch-asd-file asd-file registry lisp - (append lisp-systems special-dependencies))) - (find-files out "\\.asd$"))) + "Create a system definition file for the built system." + (let*-values (((out) (library-output outputs)) + ((_ version) (package-name->name+version + (strip-store-file-name out))) + ((new-asd-file) (string-append + (library-directory out) + "/" (normalize-string asd-system-name) + ".asd"))) + + (make-asd-file new-asd-file + #:system asd-system-name + #:version version + #:inputs inputs + #:system-asd-file asd-file)) #t) -(define* (symlink-asd-files #:key outputs lisp #:allow-other-keys) +(define* (symlink-asd-files #:key outputs #:allow-other-keys) "Create an extra reference to the system in a convenient location." - (let* ((out (assoc-ref outputs "out"))) + (let* ((out (library-output outputs))) (for-each (lambda (asd-file) - (substitute* asd-file - ((";;; Built for.*") "") ; remove potential non-determinism - (("^\\(DEFSYSTEM(.*)$" all end) (string-append "(asdf:defsystem" end))) (receive (new-asd-file asd-file-directory) - (bundle-asd-file out asd-file lisp) + (bundle-asd-file out asd-file) (mkdir-p asd-file-directory) (symlink asd-file new-asd-file) ;; Update the source registry for future phases which might want to @@ -201,15 +179,14 @@ implementation itself provides." (prepend-to-source-registry (string-append asd-file-directory "/")))) - (find-files (string-append out %object-prefix) "\\.asd$")) -) + (find-files (string-append out %object-prefix) "\\.asd$"))) #t) -(define* (cleanup-files #:key outputs lisp - #:allow-other-keys) +(define* (cleanup-files #:key outputs + #:allow-other-keys) "Remove any compiled files which are not a part of the final bundle." - (let ((out (assoc-ref outputs "out"))) - (match lisp + (let ((out (library-output outputs))) + (match (%lisp-type) ("sbcl" (for-each (lambda (file) @@ -219,10 +196,9 @@ implementation itself provides." ("ecl" (for-each delete-file (append (find-files out "\\.fas$") - (find-files out "\\.o$") - (find-files out "\\.a$"))))) + (find-files out "\\.o$"))))) - (with-directory-excursion (library-directory out lisp) + (with-directory-excursion (library-directory out) (for-each (lambda (file) (rename-file file @@ -237,9 +213,9 @@ implementation itself provides." (string<> ".." file))))))) #t) -(define* (strip #:key lisp #:allow-other-keys #:rest args) +(define* (strip #:rest args) ;; stripping sbcl binaries removes their entry program and extra systems - (or (string=? lisp "sbcl") + (or (string=? (%lisp-type) "sbcl") (apply (assoc-ref gnu:%standard-phases 'strip) args))) (define %standard-phases/source @@ -257,8 +233,8 @@ implementation itself provides." (add-before 'build 'copy-source copy-source) (replace 'check check) (replace 'strip strip) - (add-after 'check 'link-dependencies patch-asd-files) - (add-after 'link-dependencies 'cleanup cleanup-files) + (add-after 'check 'create-asd-file create-asd-file) + (add-after 'create-asd-file 'cleanup cleanup-files) (add-after 'cleanup 'create-symlinks symlink-asd-files))) (define* (asdf-build #:key inputs diff --git a/guix/build/lisp-utils.scm b/guix/build/lisp-utils.scm index 55a07c7207..21cb620d59 100644 --- a/guix/build/lisp-utils.scm +++ b/guix/build/lisp-utils.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca> +;;; Copyright © 2016, 2017 Andy Patterson <ajpatter@uwaterloo.ca> ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,13 +18,15 @@ (define-module (guix build lisp-utils) #:use-module (ice-9 format) + #:use-module (ice-9 hash-table) #:use-module (ice-9 match) #:use-module (ice-9 regex) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:use-module (guix build utils) #:export (%lisp - %install-prefix + %lisp-type + %source-install-prefix lisp-eval-program compile-system test-system @@ -32,15 +34,16 @@ generate-executable-wrapper-system generate-executable-entry-point generate-executable-for-system - patch-asd-file - bundle-install-prefix - lisp-dependencies + %bundle-install-prefix bundle-asd-file - remove-lisp-from-name wrap-output-translations prepend-to-source-registry build-program - build-image)) + build-image + make-asd-file + valid-char-set + normalize-string + library-output)) ;;; Commentary: ;;; @@ -54,102 +57,164 @@ ;; File name of the Lisp compiler. (make-parameter "lisp")) -(define %install-prefix "/share/common-lisp") - -(define (bundle-install-prefix lisp) - (string-append %install-prefix "/" lisp "-bundle-systems")) +(define %lisp-type + ;; String representing the class of implementation being used. + (make-parameter "lisp")) -(define (remove-lisp-from-name name lisp) - (string-drop name (1+ (string-length lisp)))) +;; The common parent for Lisp source files, as will as the symbolic +;; link farm for system definition (.asd) files. +(define %source-install-prefix "/share/common-lisp") + +(define (%bundle-install-prefix) + (string-append %source-install-prefix "/" (%lisp-type) "-bundle-systems")) + +(define (library-output outputs) + "If a `lib' output exists, build things there. Otherwise use `out'." + (or (assoc-ref outputs "lib") (assoc-ref outputs "out"))) + +;; See nix/libstore/store-api.cc#checkStoreName. +(define valid-char-set + (string->char-set + "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+-._?=")) + +(define (normalize-string str) + "Replace invalid characters in STR with a hyphen." + (string-join (string-tokenize str valid-char-set) "-")) + +(define (inputs->asd-file-map inputs) + "Produce a hash table of the form (system . asd-file), where system is the +name of an ASD system, and asd-file is the full path to its definition." + (alist->hash-table + (filter-map + (match-lambda + ((_ . path) + (let ((prefix (string-append path (%bundle-install-prefix)))) + (and (directory-exists? prefix) + (match (find-files prefix "\\.asd$") + ((asd-file) + (cons + (string-drop-right (basename asd-file) 4) ; drop ".asd" + asd-file)) + (_ #f)))))) + inputs))) (define (wrap-output-translations translations) `(:output-translations ,@translations :inherit-configuration)) -(define (lisp-eval-program lisp program) +(define (lisp-eval-program program) "Evaluate PROGRAM with a given LISP implementation." (unless (zero? (apply system* - (lisp-invoke lisp (format #f "~S" program)))) - (error "lisp-eval-program failed!" lisp program))) - -(define (lisp-invoke lisp program) + (lisp-invocation program))) + (error "lisp-eval-program failed!" (%lisp) program))) + +(define (spread-statements program argument-name) + "Return a list with the statements from PROGRAM spread between +ARGUMENT-NAME, a string representing the argument a lisp implementation uses +to accept statements to be evaluated before starting." + (append-map (lambda (statement) + (list argument-name (format #f "~S" statement))) + program)) + +(define (lisp-invocation program) "Return a list of arguments for system* determining how to invoke LISP with PROGRAM." - (match lisp - ("sbcl" `(,(%lisp) "--non-interactive" "--eval" ,program)) - ("ecl" `(,(%lisp) "-eval" ,program "-eval" "(quit)")))) + (match (%lisp-type) + ("sbcl" `(,(%lisp) "--non-interactive" + ,@(spread-statements program "--eval"))) + ("ecl" `(,(%lisp) + ,@(spread-statements program "--eval") + "--eval" "(quit)")) + (_ (error "The LISP provided is not supported at this time.")))) (define (asdf-load-all systems) (map (lambda (system) - `(funcall - (find-symbol - (symbol-name :load-system) - (symbol-name :asdf)) - ,system)) + `(asdf:load-system ,system)) systems)) -(define (compile-system system lisp asd-file) +(define (compile-system system asd-file) "Use a lisp implementation to compile SYSTEM using asdf. Load ASD-FILE -first if SYSTEM is defined there." - (lisp-eval-program lisp - `(progn - (require :asdf) - (in-package :asdf) - ,@(if asd-file - `((load ,asd-file)) - '()) - (in-package :cl-user) - (funcall (find-symbol - (symbol-name :operate) - (symbol-name :asdf)) - (find-symbol - (symbol-name :compile-bundle-op) - (symbol-name :asdf)) - ,system) - (funcall (find-symbol - (symbol-name :operate) - (symbol-name :asdf)) - (find-symbol - (symbol-name :deliver-asd-op) - (symbol-name :asdf)) - ,system)))) - -(define (test-system system lisp asd-file) - "Use a lisp implementation to test SYSTEM using asdf. Load ASD-FILE first -if SYSTEM is defined there." - (lisp-eval-program lisp - `(progn - (require :asdf) - (in-package :asdf) - ,@(if asd-file - `((load ,asd-file)) - '()) - (in-package :cl-user) - (funcall (find-symbol - (symbol-name :test-system) - (symbol-name :asdf)) - ,system)))) +first." + (lisp-eval-program + `((require :asdf) + (let ((*package* (find-package :asdf))) + (load ,asd-file)) + (asdf:operate 'asdf:compile-bundle-op ,system)))) + +(define (system-dependencies system asd-file) + "Return the dependencies of SYSTEM, as reported by +asdf:system-depends-on. First load the system's ASD-FILE." + (define deps-file ".deps.sexp") + (define program + `((require :asdf) + (let ((*package* (find-package :asdf))) + (load ,asd-file)) + (with-open-file + (stream ,deps-file :direction :output) + (format stream + "~s~%" + (asdf:system-depends-on + (asdf:find-system ,system)))))) + + (dynamic-wind + (lambda _ + (lisp-eval-program program)) + (lambda _ + (call-with-input-file deps-file read)) + (lambda _ + (when (file-exists? deps-file) + (delete-file deps-file))))) + +(define (compiled-system system) + (let ((system (basename system))) ; this is how asdf handles slashes + (match (%lisp-type) + ("sbcl" (string-append system "--system")) + (_ system)))) + +(define* (generate-system-definition system + #:key version dependencies) + `(asdf:defsystem + ,(normalize-string system) + :class asdf/bundle:prebuilt-system + :version ,version + :depends-on ,dependencies + :components ((:compiled-file ,(compiled-system system))) + ,@(if (string=? "ecl" (%lisp-type)) + `(:lib ,(string-append system ".a")) + '()))) + +(define (test-system system asd-file test-asd-file) + "Use a lisp implementation to test SYSTEM using asdf. Load ASD-FILE first. +Also load TEST-ASD-FILE if necessary." + (lisp-eval-program + `((require :asdf) + (let ((*package* (find-package :asdf))) + (load ,asd-file) + ,@(if test-asd-file + `((load ,test-asd-file)) + ;; Try some likely files. + (map (lambda (file) + `(when (uiop:file-exists-p ,file) + (load ,file))) + (list + (string-append system "-tests.asd") + (string-append system "-test.asd") + "tests.asd" + "test.asd")))) + (asdf:test-system ,system)))) (define (string->lisp-keyword . strings) "Return a lisp keyword for the concatenation of STRINGS." (string->symbol (apply string-append ":" strings))) -(define (generate-executable-for-system type system lisp) - "Use LISP to generate an executable, whose TYPE can be \"image\" or -\"program\". The latter will always be standalone. Depends on having created -a \"SYSTEM-exec\" system which contains the entry program." +(define (generate-executable-for-system type system) + "Use LISP to generate an executable, whose TYPE can be 'asdf:image-op or +'asdf:program-op. The latter will always be standalone. Depends on having +created a \"SYSTEM-exec\" system which contains the entry program." (lisp-eval-program - lisp - `(progn - (require :asdf) - (funcall (find-symbol - (symbol-name :operate) - (symbol-name :asdf)) - (find-symbol - (symbol-name ,(string->lisp-keyword type "-op")) - (symbol-name :asdf)) - ,(string-append system "-exec"))))) + `((require :asdf) + (asdf:operate ',type ,(string-append system "-exec"))))) (define (generate-executable-wrapper-system system dependencies) "Generates a system which can be used by asdf to produce an image or program @@ -183,65 +248,59 @@ ENTRY-PROGRAM for SYSTEM within the current directory." (declare (ignorable arguments)) ,@entry-program)))))))) -(define (wrap-perform-method lisp registry dependencies file-name) - "Creates a wrapper method which allows the system to locate its dependent -systems from REGISTRY, an alist of the same form as %outputs, which contains -lisp systems which the systems is dependent on. All DEPENDENCIES which the -system depends on will the be loaded before this system." - (let* ((system (string-drop-right (basename file-name) 4)) - (system-symbol (string->lisp-keyword system))) - - `(defmethod asdf:perform :before - (op (c (eql (asdf:find-system ,system-symbol)))) - (asdf/source-registry:ensure-source-registry) - ,@(map (match-lambda - ((name . path) - (let ((asd-file (string-append path - (bundle-install-prefix lisp) - "/" name ".asd"))) - `(setf - (gethash ,name - asdf/source-registry:*source-registry*) - ,(string->symbol "#p") - ,(bundle-asd-file path asd-file lisp))))) - registry) - ,@(map (lambda (system) - `(asdf:load-system ,(string->lisp-keyword system))) - dependencies)))) - -(define (patch-asd-file asd-file registry lisp dependencies) - "Patches ASD-FILE with a perform method as described in WRAP-PERFORM-METHOD." - (chmod asd-file #o644) - (let ((port (open-file asd-file "a"))) - (dynamic-wind - (lambda _ #t) - (lambda _ - (display - (replace-escaped-macros - (format #f "~%~y~%" - (wrap-perform-method lisp registry - dependencies asd-file))) - port)) - (lambda _ (close-port port)))) - (chmod asd-file #o444)) - -(define (lisp-dependencies lisp inputs) - "Determine which inputs are lisp system dependencies, by using the convention -that a lisp system dependency will resemble \"system-LISP\"." - (filter-map (match-lambda - ((name . value) - (and (string-prefix? lisp name) - (string<> lisp name) - `(,(remove-lisp-from-name name lisp) - . ,value)))) - inputs)) - -(define (bundle-asd-file output-path original-asd-file lisp) +(define (generate-dependency-links registry system) + "Creates a program which populates asdf's source registry from REGISTRY, an +alist of dependency names to corresponding asd files. This allows the system +to locate its dependent systems." + `(progn + (asdf/source-registry:ensure-source-registry) + ,@(map (match-lambda + ((name . asd-file) + `(setf + (gethash ,name + asdf/source-registry:*source-registry*) + ,(string->symbol "#p") + ,asd-file))) + registry))) + +(define* (make-asd-file asd-file + #:key system version inputs + (system-asd-file #f)) + "Create an ASD-FILE for SYSTEM@VERSION, appending a program to allow the +system to find its dependencies, as described by GENERATE-DEPENDENCY-LINKS." + (define dependencies + (let ((deps + (system-dependencies system system-asd-file))) + (if (eq? 'NIL deps) + '() + (map normalize-string deps)))) + + (define lisp-input-map + (inputs->asd-file-map inputs)) + + (define registry + (filter-map hash-get-handle + (make-list (length dependencies) + lisp-input-map) + dependencies)) + + (call-with-output-file asd-file + (lambda (port) + (display + (replace-escaped-macros + (format #f "~y~%~y~%" + (generate-system-definition system + #:version version + #:dependencies dependencies) + (generate-dependency-links registry system))) + port)))) + +(define (bundle-asd-file output-path original-asd-file) "Find the symlinked bundle file for ORIGINAL-ASD-FILE by looking in OUTPUT-PATH/share/common-lisp/LISP-bundle-systems/<system>.asd. Returns two values: the asd file itself and the directory in which it resides." (let ((bundle-asd-path (string-append output-path - (bundle-install-prefix lisp)))) + (%bundle-install-prefix)))) (values (string-append bundle-asd-path "/" (basename original-asd-file)) bundle-asd-path))) @@ -256,19 +315,22 @@ which are not nested." (setenv "CL_SOURCE_REGISTRY" (string-append path ":" (or (getenv "CL_SOURCE_REGISTRY") "")))) -(define* (build-program lisp program #:key inputs +(define* (build-program program outputs #:key + (dependency-prefixes (list (library-output outputs))) (dependencies (list (basename program))) entry-program #:allow-other-keys) "Generate an executable program containing all DEPENDENCIES, and which will execute ENTRY-PROGRAM. The result is placed in PROGRAM. When executed, it will run ENTRY-PROGRAM, a list of Common Lisp expressions in which `arguments' -has been bound to the command-line arguments which were passed." - (generate-executable lisp program - #:inputs inputs +has been bound to the command-line arguments which were passed. Link in any +asd files from DEPENDENCY-PREFIXES to ensure references to those libraries are +retained." + (generate-executable program #:dependencies dependencies + #:dependency-prefixes dependency-prefixes #:entry-program entry-program - #:type "program") + #:type 'asdf:program-op) (let* ((name (basename program)) (bin-directory (dirname program))) (with-directory-excursion bin-directory @@ -276,16 +338,18 @@ has been bound to the command-line arguments which were passed." name))) #t) -(define* (build-image lisp image #:key inputs +(define* (build-image image outputs #:key + (dependency-prefixes (list (library-output outputs))) (dependencies (list (basename image))) #:allow-other-keys) "Generate an image, possibly standalone, which contains all DEPENDENCIES, -placing the result in IMAGE.image." - (generate-executable lisp image - #:inputs inputs +placing the result in IMAGE.image. Link in any asd files from +DEPENDENCY-PREFIXES to ensure references to those libraries are retained." + (generate-executable image #:dependencies dependencies + #:dependency-prefixes dependency-prefixes #:entry-program '(nil) - #:type "image") + #:type 'asdf:image-op) (let* ((name (basename image)) (bin-directory (dirname image))) (with-directory-excursion bin-directory @@ -293,14 +357,16 @@ placing the result in IMAGE.image." (string-append name ".image")))) #t) -(define* (generate-executable lisp out-file #:key inputs +(define* (generate-executable out-file #:key dependencies + dependency-prefixes entry-program type #:allow-other-keys) - "Generate an executable by using asdf's TYPE-op, containing whithin the + "Generate an executable by using asdf operation TYPE, containing whithin the image all DEPENDENCIES, and running ENTRY-PROGRAM in the case of an -executable." +executable. Link in any asd files from DEPENDENCY-PREFIXES to ensure +references to those libraries are retained." (let* ((bin-directory (dirname out-file)) (name (basename out-file))) (mkdir-p bin-directory) @@ -319,9 +385,25 @@ executable." `(((,bin-directory :**/ :*.*.*) (,bin-directory :**/ :*.*.*))))))) - (parameterize ((%lisp (string-append - (assoc-ref inputs lisp) "/bin/" lisp))) - (generate-executable-for-system type name lisp)) + (generate-executable-for-system type name) + + (let* ((after-store-prefix-index + (string-index out-file #\/ + (1+ (string-length (%store-directory))))) + (output (string-take out-file after-store-prefix-index)) + (hidden-asd-links (string-append output "/.asd-files"))) + + (mkdir-p hidden-asd-links) + (for-each + (lambda (path) + (for-each + (lambda (asd-file) + (symlink asd-file + (string-append hidden-asd-links + "/" (basename asd-file)))) + (find-files (string-append path (%bundle-install-prefix)) + "\\.asd$"))) + dependency-prefixes)) (delete-file (string-append bin-directory "/" name "-exec.asd")) (delete-file (string-append bin-directory "/" name "-exec.lisp")))) diff --git a/guix/download.scm b/guix/download.scm index 5a25725b49..bed1f502cf 100644 --- a/guix/download.scm +++ b/guix/download.scm @@ -213,7 +213,6 @@ ;; mirrors keeping old versions at the top level "ftp://sunsite.icm.edu.pl/packages/ImageMagick/" ;; mirrors moving old versions to "legacy" - "http://mirrors-au.go-parts.com/mirrors/ImageMagick/" "ftp://mirror.aarnet.edu.au/pub/imagemagick/" "http://mirror.checkdomain.de/imagemagick/" "ftp://ftp.kddlabs.co.jp/graphics/ImageMagick/" @@ -222,9 +221,7 @@ "http://ftp.surfnet.nl/pub/ImageMagick/" "http://mirror.searchdaimon.com/ImageMagick" "ftp://ftp.tpnet.pl/pub/graphics/ImageMagick/" - "http://mirrors-ru.go-parts.com/mirrors/ImageMagick/" "http://mirror.is.co.za/pub/imagemagick/" - "http://mirrors-uk.go-parts.com/mirrors/ImageMagick/" "http://mirrors-usa.go-parts.com/mirrors/ImageMagick/" "ftp://ftp.fifi.org/pub/ImageMagick/" "http://www.imagemagick.org/download/" diff --git a/guix/import/cran.scm b/guix/import/cran.scm index a94051655c..8d963a7475 100644 --- a/guix/import/cran.scm +++ b/guix/import/cran.scm @@ -45,7 +45,12 @@ bioconductor->guix-package recursive-import %cran-updater - %bioconductor-updater)) + %bioconductor-updater + + cran-package? + bioconductor-package? + bioconductor-data-package? + bioconductor-experiment-package?)) ;;; Commentary: ;;; @@ -125,17 +130,19 @@ package definition." ;; The latest Bioconductor release is 3.5. Bioconductor packages should be ;; updated together. -(define %bioconductor-svn-url - (string-append "https://readonly:readonly@" - "hedgehog.fhcrc.org/bioconductor/branches/RELEASE_3_5/" - "madman/Rpacks/")) - +(define (bioconductor-mirror-url name) + (string-append "https://raw.githubusercontent.com/Bioconductor-mirror/" + name "/release-3.5")) -(define (fetch-description base-url name) +(define (fetch-description repository name) "Return an alist of the contents of the DESCRIPTION file for the R package -NAME, or #f in case of failure. NAME is case-sensitive." +NAME in the given REPOSITORY, or #f in case of failure. NAME is +case-sensitive." ;; This API always returns the latest release of the module. - (let ((url (string-append base-url name "/DESCRIPTION"))) + (let ((url (string-append (case repository + ((cran) (string-append %cran-url name)) + ((bioconductor) (bioconductor-mirror-url name))) + "/DESCRIPTION"))) (guard (c ((http-get-error? c) (format (current-error-port) "error: failed to retrieve package information \ @@ -200,17 +207,16 @@ empty list when the FIELD cannot be found." (check "*.f95") (check "*.f"))) -(define (needs-zlib? tarball) - "Return #T if any of the Makevars files in the src directory of the TARBALL -contain a zlib linker flag." +(define (tarball-files-match-pattern? tarball regexp . file-patterns) + "Return #T if any of the files represented by FILE-PATTERNS in the TARBALL +match the given REGEXP." (call-with-temporary-directory (lambda (dir) - (let ((pattern (make-regexp "-lz"))) + (let ((pattern (make-regexp regexp))) (parameterize ((current-error-port (%make-void-port "rw+"))) - (system* "tar" - "xf" tarball "-C" dir - "--wildcards" - "*/src/Makevars*" "*/src/configure*" "*/configure*")) + (apply system* "tar" + "xf" tarball "-C" dir + `("--wildcards" ,@file-patterns))) (any (lambda (file) (call-with-input-file file (lambda (port) @@ -219,10 +225,23 @@ contain a zlib linker flag." (cond ((eof-object? line) #f) ((regexp-exec pattern line) #t) - (else (loop))))))) - #t) + (else (loop)))))))) (find-files dir)))))) +(define (needs-zlib? tarball) + "Return #T if any of the Makevars files in the src directory of the TARBALL +contain a zlib linker flag." + (tarball-files-match-pattern? + tarball "-lz" + "*/src/Makevars*" "*/src/configure*" "*/configure*")) + +(define (needs-pkg-config? tarball) + "Return #T if any of the Makevars files in the src directory of the TARBALL +reference the pkg-config tool." + (tarball-files-match-pattern? + tarball "pkg-config" + "*/src/Makevars*" "*/src/configure*" "*/configure*")) + (define (description->package repository meta) "Return the `package' s-expression for an R package published on REPOSITORY from the alist META, which was derived from the R package's DESCRIPTION file." @@ -272,11 +291,12 @@ from the alist META, which was derived from the R package's DESCRIPTION file." (build-system r-build-system) ,@(maybe-inputs sysdepends) ,@(maybe-inputs (map guix-name propagate) 'propagated-inputs) - ,@(if (needs-fortran? tarball) - `((native-inputs (,'quasiquote - ,(list "gfortran" - (list 'unquote 'gfortran))))) - '()) + ,@(maybe-inputs + `(,@(if (needs-fortran? tarball) + '("gfortran") '()) + ,@(if (needs-pkg-config? tarball) + '("pkg-config") '())) + 'native-inputs) (home-page ,(if (string-null? home-page) (string-append base-url name) home-page)) @@ -291,11 +311,8 @@ from the alist META, which was derived from the R package's DESCRIPTION file." (lambda* (package-name #:optional (repo 'cran)) "Fetch the metadata for PACKAGE-NAME from REPO and return the `package' s-expression corresponding to that package, or #f on failure." - (let* ((url (case repo - ((cran) %cran-url) - ((bioconductor) %bioconductor-svn-url))) - (module-meta (fetch-description url package-name))) - (and=> module-meta (cut description->package repo <>)))))) + (and=> (fetch-description repo package-name) + (cut description->package repo <>))))) (define* (recursive-import package-name #:optional (repo 'cran)) "Generate a stream of package expressions for PACKAGE-NAME and all its @@ -386,7 +403,7 @@ dependencies." (package->upstream-name package)) (define meta - (fetch-description %cran-url upstream-name)) + (fetch-description 'cran upstream-name)) (and meta (let ((version (assoc-ref meta "Version"))) @@ -403,7 +420,7 @@ dependencies." (package->upstream-name package)) (define meta - (fetch-description %bioconductor-svn-url upstream-name)) + (fetch-description 'bioconductor upstream-name)) (and meta (let ((version (assoc-ref meta "Version"))) @@ -430,8 +447,13 @@ dependencies." "Return true if PACKAGE is an R package from Bioconductor." (let ((predicate (lambda (uri) (and (string-prefix? "http://bioconductor.org" uri) - ;; Data packages are not listed in SVN - (not (string-contains uri "/data/annotation/")))))) + ;; Data packages are neither listed in SVN nor on + ;; the Github mirror, so we have to exclude them + ;; from the set of bioconductor packages that can be + ;; updated automatically. + (not (string-contains uri "/data/annotation/")) + ;; Experiment packages are in a separate repository. + (not (string-contains uri "/data/experiment/")))))) (and (string-prefix? "r-" (package-name package)) (match (and=> (package-source package) origin-uri) ((? string? uri) @@ -453,6 +475,19 @@ dependencies." (any predicate uris)) (_ #f))))) +(define (bioconductor-experiment-package? package) + "Return true if PACKAGE is an R experiment package from Bioconductor." + (let ((predicate (lambda (uri) + (and (string-prefix? "http://bioconductor.org" uri) + (string-contains uri "/data/experiment/"))))) + (and (string-prefix? "r-" (package-name package)) + (match (and=> (package-source package) origin-uri) + ((? string? uri) + (predicate uri)) + ((? list? uris) + (any predicate uris)) + (_ #f))))) + (define %cran-updater (upstream-updater (name 'cran) diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index f2720f669e..6f30d371a2 100644 --- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -255,7 +255,8 @@ of a package, and INPUT-NAMES, a list of package specifications such as ;; native inputs. (let ((inputs (package-inputs package)) (input-names - '("pkg-config" + '("pkg-config" + "cmake" "extra-cmake-modules" "glib:bin" "intltool" diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index ede158c17c..f71b1d71b8 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -38,10 +38,10 @@ #:use-module (guix build utils) #:use-module (gnu build install) #:use-module (gnu system) + #:use-module (gnu bootloader) #:use-module (gnu system file-systems) #:use-module (gnu system linux-container) #:use-module (gnu system vm) - #:use-module (gnu system grub) #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu services herd) @@ -147,36 +147,45 @@ TARGET, and register them." (map (cut copy-item <> target #:log-port log-port) to-copy)))) -(define (install-grub* grub.cfg device target) - "This is a variant of 'install-grub' with error handling, lifted in -%STORE-MONAD" - (let* ((gc-root (string-append target %gc-roots-directory - "/grub.cfg")) - (temp-gc-root (string-append gc-root ".new")) - (delete-file (lift1 delete-file %store-monad)) - (make-symlink (lift2 switch-symlinks %store-monad)) - (rename (lift2 rename-file %store-monad))) - (mbegin %store-monad - ;; Prepare the symlink to GRUB.CFG to make sure that it's a GC root when - ;; 'install-grub' completes (being a bit paranoid.) - (make-symlink temp-gc-root grub.cfg) - - (munless (false-if-exception (install-grub grub.cfg device target)) +(define* (install-bootloader installer-drv + #:key + bootcfg bootcfg-file + device target) + "Call INSTALLER-DRV with error handling, in %STORE-MONAD." + (with-monad %store-monad + (let* ((gc-root (string-append target %gc-roots-directory + "/bootcfg")) + (temp-gc-root (string-append gc-root ".new")) + (install (and installer-drv + (derivation->output-path installer-drv))) + (bootcfg (derivation->output-path bootcfg))) + ;; Prepare the symlink to bootloader config file to make sure that it's + ;; a GC root when 'installer-drv' completes (being a bit paranoid.) + (switch-symlinks temp-gc-root bootcfg) + + (unless (false-if-exception + (begin + (install-boot-config bootcfg bootcfg-file target) + (when install + (save-load-path-excursion (primitive-load install))))) (delete-file temp-gc-root) - (leave (G_ "failed to install GRUB on device '~a'~%") device)) + (leave (G_ "failed to install bootloader on device ~a '~a'~%") install device)) - ;; Register GRUB.CFG as a GC root so that its dependencies (background - ;; image, font, etc.) are not reclaimed. - (rename temp-gc-root gc-root)))) + ;; Register bootloader config file as a GC root so that its dependencies + ;; (background image, font, etc.) are not reclaimed. + (rename-file temp-gc-root gc-root) + (return #t)))) (define* (install os-drv target #:key (log-port (current-output-port)) - grub? grub.cfg device) - "Copy the closure of GRUB.CFG, which includes the output of OS-DRV, to + bootloader-installer install-bootloader? + bootcfg bootcfg-file + device) + "Copy the closure of BOOTCFG, which includes the output of OS-DRV, to directory TARGET. TARGET must be an absolute directory name since that's what 'guix-register' expects. -When GRUB? is true, install GRUB on DEVICE, using GRUB.CFG." +When INSTALL-BOOTLOADER? is true, install bootloader on DEVICE, using BOOTCFG." (define (maybe-copy to-copy) (with-monad %store-monad (if (string=? target "/") @@ -205,16 +214,21 @@ the ownership of '~a' may be incorrect!~%") (populate (lift2 populate-root-file-system %store-monad))) (mbegin %store-monad - ;; Copy the closure of GRUB.CFG, which includes OS-DIR, GRUB's - ;; background image and so on. - (maybe-copy grub.cfg) + ;; Copy the closure of BOOTCFG, which includes OS-DIR, + ;; eventual background image and so on. + (maybe-copy + (derivation->output-path bootcfg)) ;; Create a bunch of additional files. (format log-port "populating '~a'...~%" target) (populate os-dir target) - (mwhen grub? - (install-grub* grub.cfg device target))))) + (mwhen install-bootloader? + (install-bootloader bootloader-installer + #:bootcfg bootcfg + #:bootcfg-file bootcfg-file + #:device device + #:target target))))) ;;; @@ -398,49 +412,58 @@ connection to the store." ;;; (define (switch-to-system-generation store spec) "Switch the system profile to the generation specified by SPEC, and -re-install grub with a grub configuration file that uses the specified system +re-install bootloader with a configuration file that uses the specified system generation as its default entry. STORE is an open connection to the store." (let ((number (relative-generation-spec->number %system-profile spec))) (if number (begin - (reinstall-grub store number) + (reinstall-bootloader store number) (switch-to-generation* %system-profile number)) (leave (G_ "cannot switch to system generation '~a'~%") spec)))) -(define (reinstall-grub store number) - "Re-install grub for existing system profile generation NUMBER. STORE is an -open connection to the store." +(define* (system-bootloader-name #:optional (system %system-profile)) + "Return the bootloader name stored in SYSTEM's \"parameters\" file." + (let ((params (unless-file-not-found + (read-boot-parameters-file system)))) + (boot-parameters-boot-name params))) + +(define (reinstall-bootloader store number) + "Re-install bootloader for existing system profile generation NUMBER. +STORE is an open connection to the store." (let* ((generation (generation-file-name %system-profile number)) (params (unless-file-not-found (read-boot-parameters-file generation))) - (root-device (boot-parameters-root-device params)) - ;; We don't currently keep track of past menu entries' details. The - ;; default values will allow the system to boot, even if they differ - ;; from the actual past values for this generation's entry. - (grub-config (grub-configuration (device root-device))) + ;; Detect the bootloader used in %system-profile. + (bootloader (lookup-bootloader-by-name (system-bootloader-name))) + + ;; Use the detected bootloader with default configuration. + ;; It will be enough to allow the system to boot. + (bootloader-config (bootloader-configuration + (bootloader bootloader))) + ;; Make the specified system generation the default entry. (entries (profile-boot-parameters %system-profile (list number))) (old-generations (delv number (generation-numbers %system-profile))) - (old-entries (profile-boot-parameters %system-profile old-generations)) - (grub.cfg (run-with-store store - (grub-configuration-file grub-config - entries - #:old-entries old-entries)))) - (show-what-to-build store (list grub.cfg)) - (build-derivations store (list grub.cfg)) - ;; This is basically the same as install-grub*, but for now we avoid - ;; re-installing the GRUB boot loader itself onto a device, mainly because - ;; we don't in general have access to the same version of the GRUB package - ;; which was used when installing this other system generation. - (let* ((grub.cfg-path (derivation->output-path grub.cfg)) - (gc-root (string-append %gc-roots-directory "/grub.cfg")) - (temp-gc-root (string-append gc-root ".new"))) - (switch-symlinks temp-gc-root grub.cfg-path) - (unless (false-if-exception (install-grub-config grub.cfg-path "/")) - (delete-file temp-gc-root) - (leave (G_ "failed to re-install GRUB configuration file: '~a'~%") - grub.cfg-path)) - (rename-file temp-gc-root gc-root)))) + (old-entries (profile-boot-parameters + %system-profile old-generations))) + (run-with-store store + (mlet* %store-monad + ((bootcfg ((bootloader-configuration-file-generator bootloader) + bootloader-config entries + #:old-entries old-entries)) + (bootcfg-file -> (bootloader-configuration-file bootloader)) + (target -> "/") + (drvs -> (list bootcfg))) + (mbegin %store-monad + (show-what-to-build* drvs) + (built-derivations drvs) + ;; Only install bootloader configuration file. Thus, no installer + ;; nor device is provided here. + (install-bootloader #f + #:bootcfg bootcfg + #:bootcfg-file bootcfg-file + #:device #f + #:target target)))))) ;;; @@ -498,6 +521,7 @@ list of services." (let* ((generation (generation-file-name profile number)) (params (read-boot-parameters-file generation)) (label (boot-parameters-label params)) + (boot-name (boot-parameters-boot-name params)) (root (boot-parameters-root-device params)) (root-device (if (bytevector? root) (uuid->string root) @@ -508,6 +532,7 @@ list of services." (format #t (G_ " canonical file name: ~a~%") (readlink* generation)) ;; TRANSLATORS: Please preserve the two-space indentation. (format #t (G_ " label: ~a~%") label) + (format #t (G_ " bootloader: ~a~%") boot-name) (format #t (G_ " root device: ~a~%") root-device) (format #t (G_ " kernel: ~a~%") kernel)))) @@ -570,17 +595,29 @@ PATTERN, a string. When PATTERN is #f, display all the system generations." (warning (G_ "Consider running 'guix pull' before 'reconfigure'.~%")) (warning (G_ "Failing to do that may downgrade your system!~%")))) +(define (bootloader-installer-derivation installer + bootloader device target) + "Return a file calling INSTALLER gexp with given BOOTLOADER, DEVICE +and TARGET arguments." + (with-monad %store-monad + (gexp->file "bootloader-installer" + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (#$installer #$bootloader #$device #$target)))))) + (define* (perform-action action os - #:key bootloader? dry-run? derivations-only? + #:key install-bootloader? + dry-run? derivations-only? use-substitutes? device target image-size full-boot? (mappings '()) (gc-root #f)) - "Perform ACTION for OS. GRUB? specifies whether to install GRUB; DEVICE is -the target devices for GRUB; TARGET is the target root directory; IMAGE-SIZE -is the size of the image to be built, for the 'vm-image' and 'disk-image' -actions. FULL-BOOT? is used for the 'vm' action; it determines whether to -boot directly to the kernel or to the bootloader. + "Perform ACTION for OS. INSTALL-BOOTLOADER? specifies whether to install +bootloader; DEVICE is the target devices for bootloader; TARGET is the target +root directory; IMAGE-SIZE is the size of the image to be built, for the +'vm-image' and 'disk-image' actions. FULL-BOOT? is used for the 'vm' action; +it determines whether to boot directly to the kernel or to the bootloader. When DERIVATIONS-ONLY? is true, print the derivation file name(s) without building anything. @@ -598,22 +635,37 @@ output when building a system derivation, such as a disk image." #:image-size image-size #:full-boot? full-boot? #:mappings mappings)) - (grub (package->derivation (grub-configuration-grub - (operating-system-bootloader os)))) - (grub.cfg (if (eq? 'container action) - (return #f) - (operating-system-bootcfg os - (if (eq? 'init action) - '() - (profile-boot-parameters))))) - - ;; For 'init' and 'reconfigure', always build GRUB.CFG, even if - ;; --no-grub is passed, because GRUB.CFG because we then use it as a GC - ;; root. See <http://bugs.gnu.org/21068>. + (bootloader -> (bootloader-configuration-bootloader + (operating-system-bootloader os))) + (bootloader-package + (let ((package (bootloader-package bootloader))) + (if package + (package->derivation package) + (return #f)))) + (bootcfg (if (eq? 'container action) + (return #f) + (operating-system-bootcfg + os + (if (eq? 'init action) + '() + (profile-boot-parameters))))) + (bootcfg-file -> (bootloader-configuration-file bootloader)) + (bootloader-installer + (let ((installer (bootloader-installer bootloader)) + (target (or target "/"))) + (bootloader-installer-derivation installer + bootloader-package + device target))) + + ;; For 'init' and 'reconfigure', always build BOOTCFG, even if + ;; --no-bootloader is passed, because we then use it as a GC root. + ;; See <http://bugs.gnu.org/21068>. (drvs -> (if (memq action '(init reconfigure)) - (if bootloader? - (list sys grub.cfg grub) - (list sys grub.cfg)) + (if (and install-bootloader? bootloader-package) + (list sys bootcfg + bootloader-package + bootloader-installer) + (list sys bootcfg)) (list sys))) (% (if derivations-only? (return (for-each (compose println derivation-file-name) @@ -627,27 +679,25 @@ output when building a system derivation, such as a disk image." (for-each (compose println derivation->output-path) drvs) - ;; Make sure GRUB is accessible. - (when bootloader? - (let ((prefix (derivation->output-path grub))) - (setenv "PATH" - (string-append prefix "/bin:" prefix "/sbin:" - (getenv "PATH"))))) - (case action ((reconfigure) (mbegin %store-monad (switch-to-system os) - (mwhen bootloader? - (install-grub* (derivation->output-path grub.cfg) - device "/")))) + (mwhen install-bootloader? + (install-bootloader bootloader-installer + #:bootcfg bootcfg + #:bootcfg-file bootcfg-file + #:device device + #:target "/")))) ((init) (newline) (format #t (G_ "initializing operating system under '~a'...~%") target) (install sys (canonicalize-path target) - #:grub? bootloader? - #:grub.cfg (derivation->output-path grub.cfg) + #:install-bootloader? install-bootloader? + #:bootcfg bootcfg + #:bootcfg-file bootcfg-file + #:bootloader-installer bootloader-installer #:device device)) (else ;; All we had to do was to build SYS and maybe register an @@ -832,7 +882,7 @@ resulting from command-line parsing." ((first second) second) (_ #f))) (device (and bootloader? - (grub-configuration-device + (bootloader-configuration-device (operating-system-bootloader os))))) (with-store store @@ -863,7 +913,7 @@ resulting from command-line parsing." m) (_ #f)) opts) - #:bootloader? bootloader? + #:install-bootloader? bootloader? #:target target #:device device #:gc-root (assoc-ref opts 'gc-root))))) #:system system)))) |