diff --git a/.mailmap b/.mailmap index 32c77307b8..618bc50114 100644 --- a/.mailmap +++ b/.mailmap @@ -42,14 +42,15 @@ Mathieu Lirzin Mathieu Lirzin Mathieu Othacehe Nikita Karetnikov -ng0 -ng0 -ng0 -ng0 -ng0 -ng0 -ng0 -ng0 +ng0 +ng0 +ng0 +ng0 +ng0 +ng0 +ng0 +ng0 +ng0 Pjotr Prins Pjotr Prins Pjotr Prins diff --git a/Makefile.am b/Makefile.am index 1be09d7637..4dfcd06d0b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,6 +6,7 @@ # Copyright © 2016, 2017 Mark H Weaver # Copyright © 2017 Mathieu Othacehe # Copyright © 2017 Leo Famulari +# Copyright © 2017 Ricardo Wurmus # # This file is part of GNU Guix. # @@ -87,6 +88,7 @@ MODULES = \ guix/build-system/waf.scm \ guix/build-system/r.scm \ guix/build-system/ruby.scm \ + guix/build-system/texlive.scm \ guix/build-system/trivial.scm \ guix/ftp-client.scm \ guix/http-client.scm \ @@ -114,6 +116,7 @@ MODULES = \ guix/build/ocaml-build-system.scm \ guix/build/r-build-system.scm \ guix/build/ruby-build-system.scm \ + guix/build/texlive-build-system.scm \ guix/build/waf-build-system.scm \ guix/build/haskell-build-system.scm \ guix/build/store-copy.scm \ @@ -142,6 +145,7 @@ MODULES = \ guix/import/cran.scm \ guix/import/hackage.scm \ guix/import/elpa.scm \ + guix/import/texlive.scm \ guix/scripts.scm \ guix/scripts/download.scm \ guix/scripts/perform-download.scm \ @@ -164,6 +168,7 @@ MODULES = \ guix/scripts/import/nix.scm \ guix/scripts/import/hackage.scm \ guix/scripts/import/elpa.scm \ + guix/scripts/import/texlive.scm \ guix/scripts/environment.scm \ guix/scripts/publish.scm \ guix/scripts/edit.scm \ @@ -300,6 +305,7 @@ SCM_TESTS = \ tests/hackage.scm \ tests/cran.scm \ tests/elpa.scm \ + tests/texlive.scm \ tests/store.scm \ tests/monads.scm \ tests/gexp.scm \ diff --git a/build-aux/hydra/gnu-system.scm b/build-aux/hydra/gnu-system.scm index b1faa2265a..eeb7183a4f 100644 --- a/build-aux/hydra/gnu-system.scm +++ b/build-aux/hydra/gnu-system.scm @@ -245,7 +245,11 @@ (define package->job (cond ((member package base-packages) #f) ((supported-package? package system) - (package-job store (job-name package) package system)) + (let ((drv (package-derivation store package system + #:graft? #f))) + (and (substitutable-derivation? drv) + (package-job store (job-name package) + package system)))) (else #f))))) diff --git a/doc/guix.texi b/doc/guix.texi index 87aaae8545..4933a98ddb 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -21,7 +21,7 @@ Copyright @copyright{} 2015, 2016 Mathieu Lirzin@* Copyright @copyright{} 2014 Pierre-Antoine Rault@* Copyright @copyright{} 2015 Taylan Ulrich Bayırlı/Kammer@* Copyright @copyright{} 2015, 2016, 2017 Leo Famulari@* -Copyright @copyright{} 2015, 2016 Ricardo Wurmus@* +Copyright @copyright{} 2015, 2016, 2017 Ricardo Wurmus@* Copyright @copyright{} 2016 Ben Woodcroft@* Copyright @copyright{} 2016 Chris Marusich@* Copyright @copyright{} 2016, 2017 Efraim Flashner@* @@ -1441,6 +1441,30 @@ some reason, you want to avoid auto-loading Emacs packages installed with Guix, you can do so by running Emacs with @code{--no-site-file} option (@pxref{Init File,,, emacs, The GNU Emacs Manual}). +@subsection The GCC toolchain + +@cindex GCC +@cindex ld-wrapper + +Guix offers individual compiler packages such as @code{gcc} but if you +are in need of a complete toolchain for compiling and linking source +code what you really want is the @code{gcc-toolchain} package. This +package provides a complete GCC toolchain for C/C++ development, +including GCC itself, the GNU C Library (headers and binaries, plus +debugging symbols in the @code{debug} output), Binutils, and a linker +wrapper. + +@cindex attempt to use impure library, error message + +The wrapper's purpose is to inspect the @code{-L} and @code{-l} switches +passed to the linker, add corresponding @code{-rpath} arguments, and +invoke the actual linker with this new set of arguments. By default, +the linker wrapper refuses to link to libraries outside the store to +ensure ``purity''. This can be annoying when using the toolchain to +link with local libraries. To allow references to libraries outside the +store you need to define the environment variable +@code{GUIX_LD_WRAPPER_ALLOW_IMPURITIES}. + @c TODO What else? @c ********************************************************************* @@ -1742,18 +1766,17 @@ of packages: (list guile-2.0 "debug"))) @end example -@findex specification->package+output +@findex specifications->manifest In this example we have to know which modules define the @code{emacs} and @code{guile-2.0} variables to provide the right @code{use-package-modules} line, which can be cumbersome. We can instead provide regular package specifications and let -@code{specification->package-output} look up the corresponding package +@code{specifications->manifest} look up the corresponding package objects, like this: @example -(packages->manifest - (map (compose list specification->package+output) - '("emacs" "guile@@2.0" "guile@@2.0:debug"))) +(specifications->manifest + '("emacs" "guile@@2.2" "guile@@2.2:debug")) @end example @item --roll-back @@ -1855,7 +1878,7 @@ availability of packages: @itemx -s @var{regexp} @cindex searching for packages List the available packages whose name, synopsis, or description matches -@var{regexp}. Print all the metadata of matching packages in +@var{regexp}, sorted by relevance. Print all the metadata of matching packages in @code{recutils} format (@pxref{Top, GNU recutils databases,, recutils, GNU recutils manual}). @@ -1863,12 +1886,18 @@ This allows specific fields to be extracted using the @command{recsel} command, for instance: @example -$ guix package -s malloc | recsel -p name,version +$ guix package -s malloc | recsel -p name,version,relevance +name: jemalloc +version: 4.5.0 +relevance: 6 + name: glibc -version: 2.17 +version: 2.25 +relevance: 1 name: libgc -version: 7.2alpha6 +version: 7.6.0 +relevance: 1 @end example Similarly, to show the name of all the packages available under the @@ -3575,6 +3604,25 @@ are run after installation using the R function @code{tools::testInstalledPackage}. @end defvr +@defvr {Scheme Variable} texlive-build-system +This variable is exported by @code{(guix build-system texlive)}. It is +used to build TeX packages in batch mode with a specified engine. The +build system sets the @code{TEXINPUTS} variable to find all TeX source +files in the inputs. + +By default it runs @code{luatex} on all files ending on @code{ins}. A +different engine and format can be specified with the +@code{#:tex-format} argument. Different build targets can be specified +with the @code{#:build-targets} argument, which expects a list of file +names. The build system adds only @code{texlive-bin} and +@code{texlive-latex-base} (both from @code{(gnu packages tex}) to the +inputs. Both can be overridden with the arguments @code{#:texlive-bin} +and @code{#:texlive-latex-base}, respectively. + +The @code{#:tex-directory} parameter tells the build system where to +install the built files under the texmf tree. +@end defvr + @defvr {Scheme Variable} ruby-build-system This variable is exported by @code{(guix build-system ruby)}. It implements the RubyGems build procedure used by Ruby packages, which @@ -5647,6 +5695,38 @@ R package: guix import cran --archive=bioconductor GenomicRanges @end example +@item texlive +@cindex TeX Live +@cindex CTAN +Import metadata from @uref{http://www.ctan.org/, CTAN}, the +comprehensive TeX archive network for TeX packages that are part of the +@uref{https://www.tug.org/texlive/, TeX Live distribution}. + +Information about the package is obtained through the XML API provided +by CTAN, while the source code is downloaded from the SVN repository of +the Tex Live project. This is done because the CTAN does not keep +versioned archives. + +The command command below imports metadata for the @code{fontspec} +TeX package: + +@example +guix import texlive fontspec +@end example + +When @code{--archive=DIRECTORY} is added, the source code is downloaded +not from the @file{latex} sub-directory of the @file{texmf-dist/source} +tree in the TeX Live SVN repository, but from the specified sibling +directory under the same root. + +The command below imports metadata for the @code{ifxetex} package from +CTAN while fetching the sources from the directory +@file{texmf/source/generic}: + +@example +guix import texlive --archive=generic ifxetex +@end example + @item nix Import metadata from a local copy of the source of the @uref{http://nixos.org/nixpkgs/, Nixpkgs distribution}@footnote{This @@ -7716,10 +7796,11 @@ Create a disk image that will hold the installed system. To make a qcow2-formatted disk image, use the @command{qemu-img} command: @example -qemu-img create -f qcow2 guixsd.img 5G +qemu-img create -f qcow2 guixsd.img 50G @end example -This will create a 5GB file. +The resulting file will be much smaller than 50 GB (typically less than +1 MB), but it will grow as the virtualized storage device is filled up. @item Boot the USB installation image in an VM: @@ -9544,7 +9625,7 @@ services admin)} module provides an interface to GNU@tie{}Rot[t]log, a log rotation tool (@pxref{Top,,, rottlog, GNU Rot[t]log Manual}). The example below defines an operating system that provides log rotation -with the default settings. +with the default settings, for commonly encountered log files. @lisp (use-modules (guix) (gnu)) @@ -9562,6 +9643,9 @@ with the default settings. This is the type of the Rottlog service, whose value is a @code{rottlog-configuration} object. +Other services can extend this one with new @code{log-rotation} objects +(see below), thereby augmenting the set of files to be rotated. + This service type can define mcron jobs (@pxref{Scheduled Job Execution}) to run the rottlog service. @end defvr @@ -9577,23 +9661,8 @@ The Rottlog package to use. The Rottlog configuration file to use (@pxref{Mandatory RC Variables,,, rottlog, GNU Rot[t]log Manual}). -@item @code{periodic-rotations} (default: @code{`(("weekly" %default-rotations))}) -A list of Rottlog period-name/period-config tuples. - -For example, taking an example from the Rottlog manual (@pxref{Period -Related File Examples,,, rottlog, GNU Rot[t]log Manual}), a valid tuple -might be: - -@example -("daily" ,(plain-file "daily" - "\ - /var/log/apache/* @{ - storedir apache-archives - rotate 6 - notifempty - nocompress - @}")) -@end example +@item @code{rotations} (default: @code{%default-rotations}) +A list of @code{log-rotation} objects as defined below. @item @code{jobs} This is a list of gexps where each gexp corresponds to an mcron job @@ -9601,9 +9670,44 @@ specification (@pxref{Scheduled Job Execution}). @end table @end deftp +@deftp {Data Type} log-rotation +Data type representing the rotation of a group of log files. + +Taking an example from the Rottlog manual (@pxref{Period Related File +Examples,,, rottlog, GNU Rot[t]log Manual}), a log rotation might be +defined like this: + +@example +(log-rotation + (frequency 'daily) + (files '("/var/log/apache/*")) + (options '("storedir apache-archives" + "rotate 6" + "notifempty" + "nocompress"))) +@end example + +The list of fields is as follows: + +@table @asis +@item @code{frequency} (default: @code{'weekly}) +The log rotation frequency, a symbol. + +@item @code{files} +The list of files or file glob patterns to rotate. + +@item @code{options} (default: @code{'()}) +The list of rottlog options for this rotation (@pxref{Configuration +parameters,,, rottlog, GNU Rot[t]lg Manual}). + +@item @code{post-rotate} (default: @code{#f}) +Either @code{#f} or a gexp to execute once the rotation has completed. +@end table +@end deftp + @defvr {Scheme Variable} %default-rotations Specifies weekly rotation of @var{%rotated-files} and -@code{"/var/log/shepherd.log"}. +a couple of other files. @end defvr @defvr {Scheme Variable} %rotated-files diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm index 08f7d478ec..f9cc4088bb 100644 --- a/gnu/build/file-systems.scm +++ b/gnu/build/file-systems.scm @@ -419,6 +419,10 @@ (define (ENOENT-safe proc) #f) ((= ENOMEDIUM errno) ;for removable media #f) + ((= EIO errno) ;unreadable hardware like audio CDs + (format (current-error-port) + "warning: failed to read from device '~a'~%" device) + #f) (else (apply throw args)))))))) diff --git a/gnu/build/marionette.scm b/gnu/build/marionette.scm index 506d6da420..424f2b6713 100644 --- a/gnu/build/marionette.scm +++ b/gnu/build/marionette.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016 Ludovic Courtès +;;; Copyright © 2016, 2017 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,6 +25,7 @@ (define-module (gnu build marionette) #:export (marionette? make-marionette marionette-eval + wait-for-file marionette-control marionette-screen-text wait-for-screen-text @@ -164,6 +165,20 @@ (define (marionette-eval exp marionette) (newline repl) (read repl)))) +(define* (wait-for-file file marionette #:key (timeout 10)) + "Wait until FILE exists in MARIONETTE; 'read' its content and return it. If +FILE has not shown up after TIMEOUT seconds, raise an error." + (marionette-eval + `(let loop ((i ,timeout)) + (cond ((file-exists? ,file) + (call-with-input-file ,file read)) + ((> i 0) + (sleep 1) + (loop (- i 1))) + (else + (error "file didn't show up" ,file)))) + marionette)) + (define (marionette-control command marionette) "Run COMMAND in the QEMU monitor of MARIONETTE. COMMAND is a string such as \"sendkey ctrl-alt-f1\" or \"screendump foo.ppm\" (info \"(qemu-doc) diff --git a/gnu/local.mk b/gnu/local.mk index 1d5c98094c..20351f3cd0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -548,6 +548,7 @@ dist_patch_DATA = \ %D%/packages/patches/cpufrequtils-fix-aclocal.patch \ %D%/packages/patches/cracklib-CVE-2016-6318.patch \ %D%/packages/patches/cracklib-fix-buffer-overflow.patch \ + %D%/packages/patches/crawl-upgrade-saves.patch \ %D%/packages/patches/crda-optional-gcrypt.patch \ %D%/packages/patches/crossmap-allow-system-pysam.patch \ %D%/packages/patches/csound-header-ordering.patch \ @@ -600,6 +601,7 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-cross-environment-variables.patch \ %D%/packages/patches/gcc-libvtv-runpath.patch \ %D%/packages/patches/gcc-strmov-store-file-names.patch \ + %D%/packages/patches/gcc-4.6-gnu-inline.patch \ %D%/packages/patches/gcc-4.9.3-mingw-gthr-default.patch \ %D%/packages/patches/gcc-5.0-libvtv-runpath.patch \ %D%/packages/patches/gcc-5-source-date-epoch-1.patch \ @@ -647,8 +649,9 @@ dist_patch_DATA = \ %D%/packages/patches/guile-present-coding.patch \ %D%/packages/patches/guile-relocatable.patch \ %D%/packages/patches/guile-rsvg-pkgconfig.patch \ - %D%/packages/patches/guile-ssh-rexec-bug.patch \ + gnu/packages/patches/guile-ssh-channel-finalization.patch \ %D%/packages/patches/guile-ssh-double-free.patch \ + %D%/packages/patches/guile-ssh-rexec-bug.patch \ %D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch \ %D%/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch \ %D%/packages/patches/gtk2-theme-paths.patch \ @@ -721,7 +724,6 @@ dist_patch_DATA = \ %D%/packages/patches/libevent-2.0-evbuffer-add-use-last-with-datap.patch \ %D%/packages/patches/libevent-2.1-dns-tests.patch \ %D%/packages/patches/libevent-2.1-skip-failing-test.patch \ - %D%/packages/patches/libextractor-ffmpeg-3.patch \ %D%/packages/patches/libgit2-0.25.1-mtime-0.patch \ %D%/packages/patches/libgdata-fix-tests.patch \ %D%/packages/patches/libgdata-glib-duplicate-tests.patch \ @@ -736,6 +738,7 @@ dist_patch_DATA = \ %D%/packages/patches/libmad-armv7-thumb-pt2.patch \ %D%/packages/patches/libmad-frame-length.patch \ %D%/packages/patches/libmad-mips-newgcc.patch \ + %D%/packages/patches/libmwaw-CVE-2017-9433.patch \ %D%/packages/patches/libsndfile-armhf-type-checks.patch \ %D%/packages/patches/libsndfile-CVE-2017-8361-8363-8365.patch \ %D%/packages/patches/libsndfile-CVE-2017-8362.patch \ @@ -828,7 +831,6 @@ dist_patch_DATA = \ %D%/packages/patches/ngircd-handle-zombies.patch \ %D%/packages/patches/ninja-zero-mtime.patch \ %D%/packages/patches/node-9077.patch \ - %D%/packages/patches/nss-disable-long-b64-tests.patch \ %D%/packages/patches/nss-increase-test-timeout.patch \ %D%/packages/patches/nss-pkgconfig.patch \ %D%/packages/patches/ntfs-3g-CVE-2017-0358.patch \ @@ -852,6 +854,7 @@ dist_patch_DATA = \ %D%/packages/patches/openssl-1.1.0-c-rehash-in.patch \ %D%/packages/patches/openssl-c-rehash-in.patch \ %D%/packages/patches/orpheus-cast-errors-and-includes.patch \ + %D%/packages/patches/osip-CVE-2017-7853.patch \ %D%/packages/patches/ots-no-include-missing-file.patch \ %D%/packages/patches/p7zip-CVE-2016-9296.patch \ %D%/packages/patches/p7zip-remove-unused-code.patch \ @@ -1058,7 +1061,13 @@ dist_patch_DATA = \ %D%/packages/patches/xinetd-CVE-2013-4342.patch \ %D%/packages/patches/xmodmap-asprintf.patch \ %D%/packages/patches/libyaml-CVE-2014-9130.patch \ - %D%/packages/patches/zathura-plugindir-environment-variable.patch + %D%/packages/patches/zathura-plugindir-environment-variable.patch \ + %D%/packages/patches/zziplib-CVE-2017-5974.patch \ + %D%/packages/patches/zziplib-CVE-2017-5975.patch \ + %D%/packages/patches/zziplib-CVE-2017-5976.patch \ + %D%/packages/patches/zziplib-CVE-2017-5978.patch \ + %D%/packages/patches/zziplib-CVE-2017-5979.patch \ + %D%/packages/patches/zziplib-CVE-2017-5981.patch MISC_DISTRO_FILES = \ %D%/packages/ld-wrapper.in diff --git a/gnu/packages.scm b/gnu/packages.scm index 57907155fb..5629061788 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -29,6 +29,7 @@ (define-module (gnu packages) #:use-module ((guix build utils) #:select ((package-name->name+version . hyphen-separated-name->name+version))) + #:autoload (guix profiles) (packages->manifest) #:use-module (ice-9 vlist) #:use-module (ice-9 match) #:use-module (srfi srfi-1) @@ -53,7 +54,8 @@ (define-module (gnu packages) find-newest-available-packages specification->package - specification->package+output)) + specification->package+output + specifications->manifest)) ;;; Commentary: ;;; @@ -278,3 +280,11 @@ (define* (specification->package+output spec #:optional (output "out")) (leave (G_ "package `~a' lacks output `~a'~%") (package-full-name package) sub-drv)))))) + +(define (specifications->manifest specs) + "Given SPECS, a list of specifications such as \"emacs@25.2\" or +\"guile:debug\", return a profile manifest." + ;; This procedure exists mostly so users of 'guix package -m' don't have to + ;; fiddle with multiple-value returns. + (packages->manifest + (map (compose list specification->package+output) specs))) diff --git a/gnu/packages/abiword.scm b/gnu/packages/abiword.scm index 30c2411df3..9a4acdc384 100644 --- a/gnu/packages/abiword.scm +++ b/gnu/packages/abiword.scm @@ -50,7 +50,7 @@ (define-public abiword (origin (method url-fetch) (uri - (string-append "http://abisource.org/downloads/" name "/" version + (string-append "https://www.abisource.com/downloads/" name "/" version "/source/" name "-" version ".tar.gz")) (sha256 (base32 "08imry821g81apdwym3gcs4nss0l9j5blqk31j5rv602zmcd9gxg")) @@ -111,7 +111,7 @@ (define-public abiword ("glib:bin" ,glib "bin") ("libtool" ,libtool) ("pkg-config" ,pkg-config))) - (home-page "http://abisource.org/") + (home-page "https://www.abisource.com/") (synopsis "Word processing program") ;; HACKERS: The comment below is here so that it shows up early in the diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 79f1a4c2ba..3f960812a6 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -1359,14 +1359,14 @@ (define-public graphios (define-public ansible (package (name "ansible") - (version "2.3.0.0") + (version "2.3.1.0") (source (origin (method url-fetch) (uri (pypi-uri "ansible" version)) (sha256 (base32 - "0n54h8g6a6hcp41sasvjqa4yz1pwd8mshbwlcghj0sjnrl3kk7r9")))) + "1xdr82fy8gahxh3586wm5k1bxksys7yl1f2n24shrk8gf99qyjyd")))) (build-system python-build-system) (native-inputs `(("python2-pycrypto" ,python2-pycrypto) @@ -1582,14 +1582,14 @@ (define-public audit (define-public nmap (package (name "nmap") - (version "7.40") + (version "7.50") (source (origin (method url-fetch) (uri (string-append "https://nmap.org/dist/nmap-" version ".tar.bz2")) (sha256 (base32 - "121i9mgyc28ra2825akd0ix5qyssv4xc2qlx296mam6hzxgnc54y")) + "1ckl2qxqxkrfa2qxdrqyaa4k1hhj273aqckrc46fijdz0a76mag9")) (modules '((guix build utils))) (snippet '(map delete-file-recursively @@ -1701,7 +1701,7 @@ (define-public dstat (define-public thefuck (package (name "thefuck") - (version "3.16") + (version "3.18") (source (origin (method url-fetch) (uri (string-append "https://github.com/nvbn/thefuck/archive/" @@ -1709,7 +1709,7 @@ (define-public thefuck (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0jrhfxmj2asx4jdix9ks3fpl364ph8w9prhwpk4488aj1a0q4rak")) + "1xsvkqh89rgxq5w03mnlcfkn9y39nfwhb2pjabjspcc2mi2mq5y6")) (patches (search-patches "thefuck-test-environ.patch")))) (build-system python-build-system) (arguments diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index 2aa65d5880..879c6ba6a6 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -117,7 +117,7 @@ (define-public gnuastro (define-public stellarium (package (name "stellarium") - (version "0.15.1") + (version "0.15.2") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/stellarium/" @@ -125,7 +125,7 @@ (define-public stellarium version "/stellarium-" version ".tar.gz")) (sha256 (base32 - "04avigz8i8mi2x6x71bqr9np85n1p9qnvbj2hxr947f1jv22zr8g")))) + "19nxj482g1hh9qicgskpcgy61pri254jgxnkd10icxbnza4c0hv9")))) (build-system cmake-build-system) (inputs `(("qtbase" ,qtbase) @@ -141,6 +141,14 @@ (define-public stellarium (arguments `(#:test-target "tests" #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-version-check + (lambda _ + ;; Previously-deprecated cmake variable vanished in + ;; Qt 5.9. + ;; See . + (substitute* "CMakeLists.txt" + (("Qt5Core_VERSION_STRING") "Qt5Core_VERSION")) + #t)) (add-before 'check 'set-offscreen-display (lambda _ ;; make Qt render "offscreen", required for tests diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index b62438e4f1..1ef4e42015 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -118,7 +118,7 @@ (define-public duplicity (define-public par2cmdline (package (name "par2cmdline") - (version "0.7.1") + (version "0.7.2") (source (origin (method url-fetch) (uri (string-append "https://github.com/Parchive/par2cmdline/archive/v" @@ -126,7 +126,7 @@ (define-public par2cmdline (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0b2m90jmxm37zpvwcmhshdznnh3l5g5ahdx459a9ckgsxy77jkl9")))) + "0rsrca7903g08zrifv4102gkxrhmzvgwd1sb6vw9pa00qhzsfkzs")))) (native-inputs `(("automake" ,automake) ("autoconf" ,autoconf))) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index b47f136935..b9d641ec34 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -97,7 +97,8 @@ (define-module (gnu packages bioinformatics) #:use-module (gnu packages xml) #:use-module (gnu packages xorg) #:use-module (gnu packages zip) - #:use-module (srfi srfi-1)) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26)) (define-public r-ape (package @@ -2094,7 +2095,7 @@ (define-public deeptools (define-public diamond (package (name "diamond") - (version "0.9.6") + (version "0.9.8") (source (origin (method url-fetch) (uri (string-append @@ -2103,7 +2104,7 @@ (define-public diamond (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1y8a10b695pvgn7kk2s87jdwbdf7iszpnr6139pw8ina1ajs4w8y")))) + "04f501vj3i95i2b4n60831k00ljalifrq33419bbz0y3sjlmcnj3")))) (build-system cmake-build-system) (arguments '(#:tests? #f ; no "check" target @@ -2718,19 +2719,26 @@ (define-public gemma ("zlib" ,zlib))) (build-system gnu-build-system) (arguments - `(#:make-flags '("FORCE_DYNAMIC=1") ; use shared libs + `(#:make-flags + '(,@(if (any (cute string-prefix? <> (or (%current-system) + (%current-target-system))) + '("x86_64" "mips64el" "aarch64")) + '("FORCE_DYNAMIC=1") ; use shared libs + '("FORCE_DYNAMIC=1" "FORCE_32BIT=1"))) #:phases (modify-phases %standard-phases (delete 'configure) (add-before 'build 'bin-mkdir - (lambda _ - (mkdir-p "bin"))) + (lambda _ + (mkdir-p "bin") + #t)) (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (install-file "bin/gemma" - (string-append - out "/bin")))))) + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (install-file "bin/gemma" + (string-append + out "/bin"))) + #t))) #:tests? #f)) ; no tests included yet (home-page "https://github.com/xiangzhou/GEMMA") (synopsis "Tool for genome-wide efficient mixed model association") @@ -9527,7 +9535,7 @@ (define-public tadbit "TADbit is a complete Python library to deal with all steps to analyze, model, and explore 3C-based data. With TADbit the user can map FASTQ files to obtain raw interaction binned matrices (Hi-C like matrices), normalize and -correct interaction matrices, identify adn compare the so-called +correct interaction matrices, identify and compare the so-called @dfn{Topologically Associating Domains} (TADs), build 3D models from the interaction matrices, and finally, extract structural properties from the models. TADbit is complemented by TADkit for visualizing 3D models.") diff --git a/gnu/packages/calcurse.scm b/gnu/packages/calcurse.scm index f66fbdb636..20a9a8fb47 100644 --- a/gnu/packages/calcurse.scm +++ b/gnu/packages/calcurse.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015 Eric Bavier +;;; Copyright © 2014, 2015, 2017 Eric Bavier ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,12 +22,13 @@ (define-module (gnu packages calcurse) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (gnu packages) + #:use-module (gnu packages base) #:use-module (gnu packages ncurses)) (define-public calcurse (package (name "calcurse") - (version "4.0.0") + (version "4.2.2") (source (origin (method url-fetch) @@ -35,14 +36,21 @@ (define-public calcurse version ".tar.gz")) (sha256 (base32 - "0d33cpkbhyidvm3xx6iw9ljqdvl6477c2kcwix3bs63nj0ch06v2")))) + "0il0y06akdqgy0f9p40m4x6arn66nh7sr1w1i41bszycs7div266")))) (build-system gnu-build-system) - (inputs `(("ncurses" ,ncurses))) + (inputs `(("ncurses" ,ncurses) + ("tzdata" ,tzdata))) (arguments ;; The ical tests all want to create a ".calcurse" directory, and may ;; fail with "cannot create directory '.calcurse': File exists" if run ;; concurently. - '(#:parallel-tests? #f)) + '(#:parallel-tests? #f + #:phases (modify-phases %standard-phases + (add-before 'check 'check-setup + (lambda* (#:key inputs #:allow-other-keys) + (setenv "TZDIR" ;for test/ical-007.sh + (string-append (assoc-ref inputs "tzdata") + "/share/zoneinfo"))))))) (home-page "http://www.calcurse.org") (synopsis "Text-based calendar and scheduling") (description diff --git a/gnu/packages/certs.scm b/gnu/packages/certs.scm index 85a8badc55..2441de6631 100644 --- a/gnu/packages/certs.scm +++ b/gnu/packages/certs.scm @@ -74,7 +74,7 @@ (define certdata2pem (define-public nss-certs (package (name "nss-certs") - (version "3.30.2") + (version "3.31") (source (origin (method url-fetch) (uri (let ((version-with-underscores @@ -85,7 +85,7 @@ (define-public nss-certs "nss-" version ".tar.gz"))) (sha256 (base32 - "096frzvyp3z257x84rxknscfgsbavzh2a0gyibx7kvmw4vzpfjhd")))) + "0pd643a8ns7q5az5ai3ascrw666i2kbfiyy1c9hlhw9jd8jn21g9")))) (build-system gnu-build-system) (outputs '("out")) (native-inputs diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index ea91200a65..4b59ac567d 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -181,13 +181,13 @@ (define-public cmocka (define-public cppcheck (package (name "cppcheck") - (version "1.78") + (version "1.79") (source (origin (method url-fetch) (uri (string-append "https://github.com/danmar/cppcheck/archive/" version ".tar.gz")) (sha256 - (base32 "1dnizw0rfj6faqgnmg8qh6njr9q89j8brhba7qmx2i47vl0qj11i")) + (base32 "1qf7l0hx2k2qsc1rm3gh00bc0hwf9wqkrvrk08141yjj2js2y8lw")) (file-name (string-append name "-" version ".tar.gz")))) (build-system cmake-build-system) (home-page "http://cppcheck.sourceforge.net") diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm index f8631a6dbb..6f02d8691d 100644 --- a/gnu/packages/crypto.scm +++ b/gnu/packages/crypto.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2016 Lukas Gradl ;;; Copyright © 2016 Tobias Geerinckx-Rice ;;; Copyright © 2016 ng0 -;;; Copyright © 2016 Eric Bavier +;;; Copyright © 2016, 2017 Eric Bavier ;;; ;;; This file is part of GNU Guix. ;;; @@ -315,18 +315,18 @@ (define-public eschalot (define-public tomb (package (name "tomb") - (version "2.3") + (version "2.4") (source (origin (method url-fetch) (uri (string-append "https://files.dyne.org/tomb/" "Tomb-" version ".tar.gz")) (sha256 (base32 - "1j90ab8x4cf10167yw4cs4frz694gb0qwkhgqiz1ly7mnr8ysmby")))) + "1hv1w79as7swqj0n137vz8n8mwvcgwlvd91sdyssz41jarg7f1vr")))) (build-system gnu-build-system) + (native-inputs `(("sudo" ,sudo))) ;presence needed for 'check' phase (inputs `(("zsh" ,zsh) - ("sudo" ,sudo) ("gnupg" ,gnupg) ("cryptsetup" ,cryptsetup) ("e2fsprogs" ,e2fsprogs) ;for mkfs.ext4 @@ -334,8 +334,7 @@ (define-public tomb ("mlocate" ,mlocate) ("pinentry" ,pinentry) ("qrencode" ,qrencode) - ("steghide" ,steghide) - ("swish-e" ,swish-e))) + ("steghide" ,steghide))) (arguments `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))) ;; TODO: Build and install gtk and qt trays @@ -358,7 +357,7 @@ (define-public tomb (error "program not found:" program))) '("seq" "mkfs.ext4" "pinentry" "sudo" "gpg" "cryptsetup" "gettext" - "qrencode" "steghide" "swish-e"))))) + "qrencode" "steghide"))))) #t))) (delete 'check) (add-after 'wrap 'check diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm index 420b9bacc1..af15aa38c4 100644 --- a/gnu/packages/curl.scm +++ b/gnu/packages/curl.scm @@ -40,14 +40,14 @@ (define-module (gnu packages curl) (define-public curl (package (name "curl") - (version "7.54.0") + (version "7.54.1") (source (origin (method url-fetch) (uri (string-append "https://curl.haxx.se/download/curl-" version ".tar.lzma")) (sha256 (base32 - "02h7qhl8ynp75g1vcaw18ks0gp7nahvvkqck19pb1q0kkw1scsnd")))) + "0vnv3cz0s1l5cjby86hm0x6pgzqijmdm97qa9q5px200956z6yib")))) (build-system gnu-build-system) (outputs '("out" "doc")) ;1.2 MiB of man3 pages diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 0d252ed91d..a05ba6b726 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -459,7 +459,8 @@ (define-public postgresql "1imrjp4vfslxj5rrvphcrrk21zv8kqw3gacmwradixh1d5rv6i8n")))) (build-system gnu-build-system) (arguments - `(#:phases + `(#:configure-flags '("--with-uuid=e2fs") + #:phases (modify-phases %standard-phases (add-before 'configure 'patch-/bin/sh (lambda _ @@ -467,9 +468,16 @@ (define-public postgresql (substitute* '("src/bin/pg_ctl/pg_ctl.c" "src/bin/psql/command.c") (("/bin/sh") (which "sh"))) - #t))))) + #t)) + (add-after 'build 'build-contrib + (lambda _ + (zero? (system* "make" "-C" "contrib")))) + (add-after 'install 'install-contrib + (lambda _ + (zero? (system* "make" "-C" "contrib" "install"))))))) (inputs `(("readline" ,readline) + ("libuuid" ,util-linux) ("zlib" ,zlib))) (home-page "https://www.postgresql.org/") (synopsis "Powerful object-relational database system") @@ -1210,6 +1218,7 @@ (define-public kyotocabinet (arguments `(#:configure-flags (list + "--disable-opt" ;"-march=native". XXX this also turns off -O0. (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") "/lib")))) (inputs `(("zlib" ,zlib))) @@ -1326,14 +1335,14 @@ (define-public perl-db-file (define-public lmdb (package (name "lmdb") - (version "0.9.18") + (version "0.9.21") (source (origin (method url-fetch) (uri (string-append "https://github.com/LMDB/lmdb/archive/" "LMDB_" version ".tar.gz")) (sha256 (base32 - "12crvzxky8in99ibh22k4ppmkgqs28yy3v7yy944za7fsrqv8dfx")))) + "0ndmj07hkm2ic60z1f4rdscxs7pq45hk9fibjyv5nhfclhsvd1qi")))) (build-system gnu-build-system) (arguments `(#:test-target "test" diff --git a/gnu/packages/datastructures.scm b/gnu/packages/datastructures.scm index 79068a54d0..36318ee04e 100644 --- a/gnu/packages/datastructures.scm +++ b/gnu/packages/datastructures.scm @@ -97,14 +97,14 @@ (define-public ssdeep (define-public liburcu (package (name "liburcu") - (version "0.9.3") + (version "0.10.0") (source (origin (method url-fetch) (uri (string-append "https://www.lttng.org/files/urcu/" "userspace-rcu-" version ".tar.bz2")) (sha256 (base32 - "01j0xp3f0w147yfyzybkjvb7i67i7prsvnkssgvgwry9lvk35khv")))) + "141imnd1s4bcd4wz0wk7sp3fj649kp8whp82gw49h48mlmxqmdbw")))) (build-system gnu-build-system) (native-inputs `(("perl" ,perl))) ; for tests diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm index 7f1d18f2b0..2e4d8fd18e 100644 --- a/gnu/packages/dns.scm +++ b/gnu/packages/dns.scm @@ -93,7 +93,7 @@ (define-public dnsmasq (define-public isc-bind (package (name "bind") - (version "9.11.1") + (version "9.11.1-P1") (source (origin (method url-fetch) (uri (string-append @@ -101,7 +101,7 @@ (define-public isc-bind version ".tar.gz")) (sha256 (base32 - "1chhphaa4lmfxj9daqsxph5ng4h3qq51jx21rj2i6an8ynah0192")))) + "0f56bhkxx7bga3f1a4whlm8fh5q8lz7ah97fdayp310vsn43w6vb")))) (build-system gnu-build-system) (outputs `("out" "utils")) (inputs diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index a4cb4a0b3a..99b9b06011 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -1740,6 +1740,29 @@ (define-public emacs-fill-column-indicator column by drawing a thin line down the length of the editing window.") (license license:gpl3+))) +(define-public emacs-inf-ruby + (package + (name "emacs-inf-ruby") + (version "2.5.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/nonsequitur/inf-ruby/" + "archive/" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0m7323k649ckxql1grsdnf71bjhys7l4qb8wbpphb1mr1q8i4066")))) + (build-system emacs-build-system) + (home-page "https://github.com/nonsequitur/inf-ruby") + (synopsis "Provides a REPL buffer connected to a Ruby subprocess in Emacs") + (description + "@code{inf-ruby} provides a Read Eval Print Loop (REPL) buffer, allowing +for easy interaction with a ruby subprocess. Features include support for +detecting specific uses of Ruby, e.g. when using rails, and using a +appropriate console.") + (license license:gpl3+))) + (define-public emacs-znc (package (name "emacs-znc") @@ -2780,7 +2803,7 @@ (define-public emacs-ace-window (define-public emacs-iedit (package (name "emacs-iedit") - (version "0.9.9") + (version "0.9.9.9") (source (origin (method url-fetch) @@ -2789,7 +2812,7 @@ (define-public emacs-iedit (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "00v86zllcsivmiibigbr91qij2zdf1lr9db8z8again1sn63wkdj")))) + "1hv8q6pr85ss9g3158l1fqv3m62vsq8rslsi86jicr2dcxyascr0")))) (build-system emacs-build-system) (home-page "http://www.emacswiki.org/emacs/Iedit") (synopsis "Edit multiple regions in the same way simultaneously") @@ -3097,7 +3120,7 @@ (define-public emacs-js2-mode (define-public emacs-markdown-mode (package (name "emacs-markdown-mode") - (version "2.1") + (version "2.2") (source (origin (method url-fetch) (uri (string-append "https://raw.githubusercontent.com/jrblevin" @@ -3106,7 +3129,7 @@ (define-public emacs-markdown-mode (file-name (string-append "markdown-mode-" version ".el")) (sha256 (base32 - "1faibar32jnjia9202swblw91q6z1g5s4k9xmypwjahfh8yznl6w")))) + "04isd2sdnms9acpmkd6n7b7y7j0x2kank2kry0zwbxs3bwdavgav")))) (build-system emacs-build-system) (home-page "http://jblevins.org/projects/markdown-mode/") (synopsis "Emacs Major mode for Markdown files") @@ -3144,7 +3167,7 @@ (define-public emacs-projectile (define-public emacs-elfeed (package (name "emacs-elfeed") - (version "2.1.0") + (version "2.1.1") (source (origin (method url-fetch) (uri (string-append "https://github.com/skeeto/elfeed/archive/" @@ -3152,7 +3175,7 @@ (define-public emacs-elfeed (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "145glas04zd0s2rmnif46vhyijs4z03v871gfp1dcrwxvvvns8ap")))) + "1wlwc8fbkg6w1c8p856ikc20xm72f51clnzz419p0g8cavy27npw")))) (build-system emacs-build-system) (arguments `(#:phases @@ -3305,7 +3328,7 @@ (define-public emacs-ido-ubiquitous (define-public emacs-yaml-mode (package (name "emacs-yaml-mode") - (version "0.0.12") + (version "0.0.13") (source (origin (method url-fetch) (uri (string-append "https://raw.githubusercontent.com/yoshiki" @@ -3313,7 +3336,7 @@ (define-public emacs-yaml-mode (file-name (string-append "yaml-mode-" version ".el")) (sha256 (base32 - "17wq433ycli0qx4gdhgrmb392qblm6y2dwcyn38j5ja1lasfb0ax")))) + "0im88sk9dqw03x6d6zaspgvg9i0pfpgb8f2zygrmbifh2w4pwmvj")))) (build-system emacs-build-system) (home-page "https://github.com/yoshiki/yaml-mode") (synopsis "Major mode for editing YAML files") @@ -3351,7 +3374,7 @@ (define-public emacs-web-mode (define-public emacs-helm (package (name "emacs-helm") - (version "2.7.0") + (version "2.7.1") (source (origin (method url-fetch) (uri (string-append @@ -3360,7 +3383,7 @@ (define-public emacs-helm (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1scdirpclgq3pi1j2c90gqaaqg1pgvasp98f4jqw8c5xbqcr7jdw")))) + "0pay8pi3fszykgskfbxsp4byad497cgfz4m886mxnkba1naxf6h7")))) (build-system emacs-build-system) (propagated-inputs `(("emacs-async" ,emacs-async) diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index b9b8e84685..b81eedbd80 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm @@ -488,6 +488,28 @@ (define-public propeller-gcc (home-page "https://github.com/totalspectrum/gcc-propeller") (synopsis "GCC for the Parallax Propeller")))) +(define-public propeller-gcc-4 + (let ((xgcc propeller-gcc) + (commit "f1b01001b760d691a91ff1db4830d41bb712557f") + (revision "1")) + (package (inherit xgcc) + (name "propeller-gcc") + (version (string-append "4.6.1-" revision "." (string-take commit 9))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dbetz/propgcc-gcc.git") + (commit commit))) + (file-name (string-append name "-" commit "-checkout")) + (sha256 + (base32 + "15mxrhk2v4vqmdkvcqy33ag1wrg9x9q20kx2w33kkw8pkrijknbi")) + (patches + (append + (origin-patches (package-source gcc-4.7)) + (search-patches "gcc-4.6-gnu-inline.patch"))))) + (home-page "https://github.com/dbetz/propgcc-gcc")))) + ;; There is no release, so we take the latest version as referenced from here: ;; https://github.com/dbetz/propeller-gcc (define-public proplib @@ -654,7 +676,7 @@ (define-public propeller-load (define-public spin2cpp (package (name "spin2cpp") - (version "3.4.0") + (version "3.6.3") (source (origin (method url-fetch) (uri (string-append "https://github.com/totalspectrum/spin2cpp/" @@ -662,7 +684,7 @@ (define-public spin2cpp (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "00i8i0dspd5115ggkv5vx2xqb21l6y38wz0bakgby8n3b4k9xnk0")))) + "0v5vzh69bp1r2byrpz12rql1w24ff2v9msr31596zq6hd6n82lnh")))) (build-system gnu-build-system) (arguments `(#:tests? #f ;; The tests assume that a micro-controller is connected. diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 7ad93653e9..c171e2629a 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -44,6 +44,7 @@ (define-module (gnu packages engineering) #:use-module (gnu packages curl) #:use-module (gnu packages flex) #:use-module (gnu packages fontutils) + #:use-module (gnu packages freedesktop) #:use-module (gnu packages gd) #:use-module (gnu packages gettext) #:use-module (gnu packages ghostscript) @@ -57,6 +58,7 @@ (define-module (gnu packages engineering) #:use-module (gnu packages linux) ;FIXME: for pcb #:use-module (gnu packages m4) #:use-module (gnu packages maths) + #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -812,3 +814,32 @@ (define-public volk for mathematical functions. It also provides an machine-independent interface to select the best such procedures to use on a given system.") (license license:gpl3+))) + +(define-public minicom + (package + (name "minicom") + (version "2.7.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://alioth.debian.org/frs/download.php/" + "file/4215/" name "-" version ".tar.gz")) + (sha256 + (base32 + "1wa1l36fa4npd21xa9nz60yrqwkk5cq713fa3p5v0zk7g9mq6bsk")))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags '("--enable-lock-dir=/var/lock") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-lock-check + (lambda _ + (substitute* "configure" + (("test -d [$]UUCPLOCK") "true")) + #t))))) + (inputs + `(("ncurses" ,ncurses))) + (home-page "https://alioth.debian.org/projects/minicom/") + (synopsis "Serial terminal emulator") + (description "@code{minicom} is a serial terminal emulator.") + (license license:gpl2+))) diff --git a/gnu/packages/enlightenment.scm b/gnu/packages/enlightenment.scm index 165ca50ce1..6487446336 100644 --- a/gnu/packages/enlightenment.scm +++ b/gnu/packages/enlightenment.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2015 Tomáš Čech ;;; Copyright © 2015 Daniel Pimentel ;;; Copyright © 2015, 2016, 2017 Efraim Flashner +;;; Copyright © 2017 ng0 ;;; ;;; This file is part of GNU Guix. ;;; @@ -208,7 +209,19 @@ (define-public enlightenment "1xvngjdsa0p901vfhrh2qpa50k32hwwhc8bgi16a9b5d9byzfhvn")))) (build-system gnu-build-system) (arguments - `(#:configure-flags '("--enable-mount-eeze"))) + `(#:configure-flags '("--enable-mount-eeze") + #:phases + (modify-phases %standard-phases + (add-before 'configure 'fix-keyboard + (lambda _ + (let ((xkeyboard (assoc-ref %build-inputs "xkeyboard-config"))) + ;; We need to patch the path to 'base.lst' to be able + ;; to switch the keyboard layout in E. + (substitute* "src/modules/xkbswitch/e_mod_parse.c" + (("/usr/share/X11/xkb/rules/xorg.lst") + (string-append xkeyboard + "/share/X11/xkb/rules/base.lst"))) + #t)))))) (native-inputs `(("gettext" ,gettext-minimal) ("pkg-config" ,pkg-config))) @@ -220,7 +233,8 @@ (define-public enlightenment ("libxcb" ,libxcb) ("libxext" ,libxext) ("linux-pam" ,linux-pam) - ("xcb-util-keysyms" ,xcb-util-keysyms))) + ("xcb-util-keysyms" ,xcb-util-keysyms) + ("xkeyboard-config" ,xkeyboard-config))) (home-page "https://www.enlightenment.org/about-enlightenment") (synopsis "Lightweight desktop environment") (description diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm index 59e60dc292..4d61f0fccf 100644 --- a/gnu/packages/fonts.scm +++ b/gnu/packages/fonts.scm @@ -555,28 +555,13 @@ (define-public font-tex-gyre (version "2.005") (source (origin - (method url-fetch) + (method url-fetch/zipbomb) (uri (string-append "http://www.gust.org.pl/projects/e-foundry/" "tex-gyre/whole/tg-" version "otf.zip")) (sha256 (base32 "0kph9l3g7jb2bpmxdbdg5zl56wacmnvdvsdn7is1gc750sqvsn31")))) - (build-system trivial-build-system) - (arguments - `(#:modules ((guix build utils)) - #:builder - (begin - (use-modules (guix build utils)) - - (let ((unzip (string-append (assoc-ref %build-inputs "unzip") - "/bin/unzip")) - (font-dir (string-append %output "/share/fonts/opentype"))) - (mkdir-p font-dir) - (system* unzip - (assoc-ref %build-inputs "source") - "-d" font-dir))))) - (native-inputs - `(("unzip" ,unzip))) + (build-system font-build-system) (home-page "http://www.gust.org.pl/projects/e-foundry/tex-gyre/") (synopsis "Remake of Ghostscript fonts") (description "The TeX Gyre collection of fonts is the result of an @@ -598,28 +583,7 @@ (define-public font-anonymous-pro (sha256 (base32 "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6")))) - (build-system trivial-build-system) - (arguments - `(#:modules ((guix build utils)) - #:builder - (begin - (use-modules (guix build utils)) - (let ((unzip (string-append (assoc-ref %build-inputs "unzip") - "/bin/unzip")) - (font-dir (string-append %output "/share/fonts/truetype")) - (doc-dir (string-append %output "/share/doc/" ,name))) - (system* unzip (assoc-ref %build-inputs "source")) - (mkdir-p font-dir) - (mkdir-p doc-dir) - (chdir (string-append "AnonymousPro-" ,version ".001")) - (for-each (lambda (ttf) - (install-file ttf font-dir)) - (find-files "." "\\.ttf$")) - (for-each (lambda (doc) - (install-file doc doc-dir)) - (find-files "." "\\.txt$")))))) - (native-inputs - `(("unzip" ,unzip))) + (build-system font-build-system) (home-page "http://www.marksimonson.com/fonts/view/anonymous-pro") (synopsis "Fixed-width fonts designed with coding in mind") (description "Anonymous Pro is a family of four fixed-width fonts designed @@ -740,27 +704,7 @@ (define-public font-google-roboto (sha256 (base32 "0spscx08fad7i8qs7icns96iwcapniq8lwwqqvbf7bamvs8qfln4")))) - (native-inputs `(("unzip" ,unzip))) - (build-system trivial-build-system) - (arguments - `(#:modules ((guix build utils)) - #:builder (begin - (use-modules (guix build utils) - (srfi srfi-26)) - - (let ((PATH (string-append (assoc-ref %build-inputs - "unzip") - "/bin")) - (font-dir (string-append %output - "/share/fonts/truetype"))) - (setenv "PATH" PATH) - (system* "unzip" (assoc-ref %build-inputs "source")) - - (mkdir-p font-dir) - (chdir "roboto-hinted") - (for-each (lambda (ttf) - (install-file ttf font-dir)) - (find-files "." "\\.ttf$")))))) + (build-system font-build-system) (home-page "https://github.com/google/roboto") (synopsis "The Roboto family of fonts") (description @@ -782,33 +726,7 @@ (define-public font-un (sha256 (base32 "13liaz2pmww3aqabm55la5npd08m1skh334ky7qfidxaz5s742iv")))) - (build-system trivial-build-system) - (arguments - `(#:modules ((guix build utils)) - #:builder - (begin - (use-modules (guix build utils)) - - (let ((tar (string-append (assoc-ref %build-inputs "tar") - "/bin/tar")) - (PATH (string-append (assoc-ref %build-inputs "gzip") - "/bin")) - (font-dir (string-append %output "/share/fonts/truetype")) - (doc-dir (string-append %output "/share/doc/" ,name))) - (setenv "PATH" PATH) - (system* tar "xvf" (assoc-ref %build-inputs "source")) - (mkdir-p font-dir) - (mkdir-p doc-dir) - (chdir (string-append "un-fonts")) - (for-each (lambda (ttf) - (install-file ttf font-dir)) - (find-files "." "\\.ttf$")) - (for-each (lambda (doc) - (install-file doc doc-dir)) - '("COPYING" "README")))))) - (native-inputs - `(("tar" ,tar) - ("gzip" ,gzip))) + (build-system font-build-system) (home-page "https://kldp.net/projects/unfonts/") (synopsis "Collection of Korean fonts") (description @@ -876,7 +794,7 @@ (define-public font-hack (name "font-hack") (version "2.020") (source (origin - (method url-fetch) + (method url-fetch/zipbomb) (uri (string-append "https://github.com/chrissimpkins/Hack/releases/download/v" version "/Hack-v" @@ -885,28 +803,7 @@ (define-public font-hack (sha256 (base32 "16kkmc3psckw1b7k07ccn1gi5ymhlg9djh43nqjzg065g6p6d184")))) - (build-system trivial-build-system) - (arguments - `(#:modules ((guix build utils)) - #:builder (begin - (use-modules (guix build utils) - (srfi srfi-26)) - - (let ((PATH (string-append (assoc-ref %build-inputs - "unzip") - "/bin")) - (font-dir (string-append %output - "/share/fonts/truetype"))) - (setenv "PATH" PATH) - (system* "unzip" (assoc-ref %build-inputs "source")) - - (mkdir-p font-dir) - (for-each (lambda (ttf) - (install-file ttf font-dir)) - (find-files "." "\\.ttf$")))))) - (native-inputs - `(("source" ,source) - ("unzip" ,unzip))) + (build-system font-build-system) (home-page "https://sourcefoundry.org/hack/") (synopsis "Typeface designed for source code") (description @@ -933,26 +830,7 @@ (define-public font-adobe-source-code-pro (sha256 (base32 "0arhhsf3i7ss39ykn73d1j8k4n8vx7115xph6jwkd970p1cxvr54")))) - (build-system trivial-build-system) - (arguments - `(#:modules ((guix build utils)) - #:builder - (begin - (use-modules (guix build utils)) - (let ((tar (string-append (assoc-ref %build-inputs "tar") - "/bin/tar")) - (PATH (string-append (assoc-ref %build-inputs "gzip") - "/bin")) - (font-dir (string-append %output "/share/fonts/opentype"))) - (setenv "PATH" PATH) - (mkdir-p font-dir) - (zero? (system* tar "-C" font-dir "--strip-components=2" - "-xvf" (assoc-ref %build-inputs "source") - (string-append "source-code-pro-" - ,version "/OTF"))))))) - (native-inputs - `(("gzip" ,gzip) - ("tar" ,tar))) + (build-system font-build-system) (home-page "https://github.com/adobe-fonts/source-code-pro") (synopsis "Monospaced font family for user interface and coding environments") @@ -974,23 +852,7 @@ (define-public font-fira-mono (sha256 (base32 "1z65x0dw5dq6rs6p9wyfrir50rlh95vgzsxr8jcd40nqazw4jhpi")))) - (build-system trivial-build-system) - (arguments - `(#:modules ((guix build utils)) - #:builder - (begin - (use-modules (guix build utils)) - (let ((unzip (string-append (assoc-ref %build-inputs "unzip") - "/bin/unzip")) - (font-dir (string-append %output "/share/fonts/opentype"))) - (mkdir-p font-dir) - (system* unzip - "-j" - (assoc-ref %build-inputs "source") - "*.otf" - "-d" font-dir))))) - (native-inputs - `(("unzip" ,unzip))) + (build-system font-build-system) (home-page "http://mozilla.github.io/Fira/") (synopsis "Mozilla's monospace font") (description "This is the typeface used by Mozilla in Firefox OS.") diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index ef07f2d64b..a9a7e08da1 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -129,14 +129,14 @@ (define-public xdg-utils (define-public libinput (package (name "libinput") - (version "1.7.0") + (version "1.7.3") (source (origin (method url-fetch) (uri (string-append "https://freedesktop.org/software/libinput/" name "-" version ".tar.xz")) (sha256 (base32 - "1a58q60j3456d3qfhkkv319aq2hn4bpimcyhib4yks817pv719hj")))) + "07fbzxddvhjcch43hdxb24sj7ri96zzpcjalvsicmw0i4wnn2v89")))) (build-system gnu-build-system) (native-inputs `(("cairo" ,cairo) @@ -968,3 +968,35 @@ (define-public fprintd communication bus. This daemon layer above libfprint solves problems related to applications simultaneously competing for fingerprint readers.") (license license:gpl2+))) + +(define-public desktop-file-utils + (package + (name "desktop-file-utils") + (version "0.23") + (source (origin + (method url-fetch) + (uri (string-append "https://www.freedesktop.org/software/" name + "/releases/" name "-" version ".tar.xz")) + (sha256 + (base32 + "119kj2w0rrxkhg4f9cf5waa55jz1hj8933vh47vcjipcplql02bc")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("glib" ,glib))) + (home-page "http://www.freedesktop.org/wiki/Software/desktop-file-utils/") + (synopsis "Utilities for working with desktop entries") + (description + "This package contains a few command line utilities for working with +desktop entries: + +desktop-file-validate: validates a desktop file and prints warnings/errors + about desktop entry specification violations. + +desktop-file-install: installs a desktop file to the applications directory, + optionally munging it a bit in transit. + +update-desktop-database: updates the database containing a cache of MIME types + handled by desktop files.") + (license license:gpl2+))) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 5253d0c919..18ce2ae4a4 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -39,6 +39,7 @@ (define-module (gnu packages game-development) #:use-module (gnu packages databases) #:use-module (gnu packages documentation) #:use-module (gnu packages fontutils) + #:use-module (gnu packages freedesktop) #:use-module (gnu packages fribidi) #:use-module (gnu packages glib) #:use-module (gnu packages gnunet) @@ -295,7 +296,7 @@ (define-public python2-xsge (define-public tiled (package (name "tiled") - (version "1.0.0") + (version "1.0.1") (source (origin (method url-fetch) (uri (string-append "https://github.com/bjorn/tiled/archive/v" @@ -303,7 +304,7 @@ (define-public tiled (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0g6ld9znydbdzy4x9h532gf1fg5bnz1mmrpvw4jg2a4lxkrz3rd5")))) + "1y75jmpcf2lv8s3g9v3ghnrwvs2fc4ni7nx74csaylg1g04cwlq7")))) (build-system gnu-build-system) (inputs `(("qtbase" ,qtbase) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index a76ab1ddc2..2c5294737f 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -1569,7 +1569,7 @@ (define-public raincat (define-public manaplus (package (name "manaplus") - (version "1.7.5.14") + (version "1.7.6.10") (source (origin (method url-fetch) (uri (string-append @@ -1577,7 +1577,7 @@ (define-public manaplus version "/manaplus-" version ".tar.xz")) (sha256 (base32 - "1b5q79jkdrck5lq8lvhnpq2mly257r8lylp7b8sp8xn4365f86ch")))) + "0l7swvpzq20am4w2rsjpp6fsvbjv07il6wbfy45a7h9zsdihmqhl")))) (build-system gnu-build-system) (arguments '(#:configure-flags @@ -2238,14 +2238,14 @@ (define-public emulation-station (define openttd-engine (package (name "openttd-engine") - (version "1.7.0") + (version "1.7.1") (source (origin (method url-fetch) (uri (string-append "http://binaries.openttd.org/releases/" version "/openttd-" version "-source.tar.xz")) (sha256 (base32 - "1q4r5860dpkkw4fpfz3f8mvdd8xjpnwwzr9zybgmgb255bs0g4yz")) + "0dhv5bbbg1dmmq7fi3xss0a9jq2rqgb5sf9fsqzlsjcdm590j6b1")) (modules '((guix build utils))) (snippet ;; The DOS port contains proprietary software. @@ -4049,7 +4049,8 @@ (define-public crawl version "-nodeps.tar.xz"))) (sha256 (base32 - "0127dgldij2h4m7cf32yy9ndv4vcz03g4km71lmxrsi5mw7ljgpd")))) + "0127dgldij2h4m7cf32yy9ndv4vcz03g4km71lmxrsi5mw7ljgpd")) + (patches (search-patches "crawl-upgrade-saves.patch")))) (build-system gnu-build-system) (inputs `(("lua51" ,lua-5.1) @@ -4101,6 +4102,9 @@ (define-public crawl license:zlib license:asl2.0)))) +;; The linter here claims that patch file names should start with the package +;; name. But, in this case, the patches are inherited from crawl with the +;; "crawl-" prefix instead of "crawl-tiles-". (define-public crawl-tiles (package (inherit crawl) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index e277385aec..29b8dab7f8 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -24,6 +24,8 @@ ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice ;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2017 Hartmut Goebel +;;; Copyright © 2017 nee +;;; Copyright © 2017 Chris Marusich ;;; ;;; This file is part of GNU Guix. ;;; @@ -65,6 +67,7 @@ (define-module (gnu packages gnome) #:use-module (gnu packages databases) #:use-module (gnu packages djvu) #:use-module (gnu packages dns) + #:use-module (gnu packages documentation) #:use-module (gnu packages flex) #:use-module (gnu packages docbook) #:use-module (gnu packages enchant) @@ -103,6 +106,7 @@ (define-module (gnu packages gnome) #:use-module (gnu packages python) #:use-module (gnu packages rdesktop) #:use-module (gnu packages scanner) + #:use-module (gnu packages selinux) #:use-module (gnu packages ssh) #:use-module (gnu packages xml) #:use-module (gnu packages gl) @@ -735,38 +739,6 @@ (define-public icon-naming-utils GNOME and KDE desktops to the icon names proposed in the specification.") (license license:lgpl2.1+))) -(define-public desktop-file-utils - (package - (name "desktop-file-utils") - (version "0.23") - (source (origin - (method url-fetch) - (uri (string-append "https://www.freedesktop.org/software/" name - "/releases/" name "-" version ".tar.xz")) - (sha256 - (base32 - "119kj2w0rrxkhg4f9cf5waa55jz1hj8933vh47vcjipcplql02bc")))) - (build-system gnu-build-system) - (native-inputs - `(("pkg-config" ,pkg-config))) - (inputs - `(("glib" ,glib))) - (home-page "http://www.freedesktop.org/wiki/Software/desktop-file-utils/") - (synopsis "Utilities for working with desktop entries") - (description - "This package contains a few command line utilities for working with -desktop entries: - -desktop-file-validate: validates a desktop file and prints warnings/errors - about desktop entry specification violations. - -desktop-file-install: installs a desktop file to the applications directory, - optionally munging it a bit in transit. - -update-desktop-database: updates the database containing a cache of MIME types - handled by desktop files.") - (license license:gpl2+))) - (define-public gnome-icon-theme (package (name "gnome-icon-theme") @@ -2449,6 +2421,37 @@ (define-public libsecret and other secrets. It communicates with the \"Secret Service\" using DBus.") (license license:lgpl2.1+))) +(define-public five-or-more + (package + (name "five-or-more") + (version "3.22.2") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "1b26afyjr26wqy5j008gzsi3hpblbmabh0192lx6414lml1qxkxs")))) + (build-system glib-or-gtk-build-system) + (native-inputs + `(("pkg-config" ,pkg-config) + ("desktop-file-utils" ,desktop-file-utils) + ("intltool" ,intltool) + ("itstool" ,itstool) + ("xmllint" ,libxml2))) + (inputs + `(("gtk+" ,gtk+) + ("librsvg" ,librsvg))) + (home-page "https://wiki.gnome.org/Apps/Five%20or%20more") + (synopsis "Logic puzzle game") + (description "Five or More is a game where you try to align + five or more objects of the same color and shape causing them to disappear. + On every turn more objects will appear, until the board is full. + Try to last as long as possible.") + (license license:gpl2+))) + (define-public gnome-mines (package (name "gnome-mines") @@ -2777,7 +2780,7 @@ (define-public upower (define-public libgweather (package (name "libgweather") - (version "3.24.0") + (version "3.24.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -2785,7 +2788,7 @@ (define-public libgweather name "-" version ".tar.xz")) (sha256 (base32 - "0ggspn3wmlkdxpfv4ym68qn1mzqc3hv666sykv8sv1ah40rbk28h")))) + "0g35xfcw9vh3sfff42blk9ksrlmkrjmj46h3ad0sqgdn6xh329qj")))) (build-system gnu-build-system) (arguments `(#:configure-flags @@ -3324,7 +3327,7 @@ (define-public gnome-klotski (define-public grilo (package (name "grilo") - (version "0.3.2") + (version "0.3.3") (source (origin (method url-fetch) @@ -3333,7 +3336,7 @@ (define-public grilo name "-" version ".tar.xz")) (sha256 (base32 - "0nvzr2gfk2mpzf99442zawv0n5yjcyy50rqkrvdsibknbm56hvzj")))) + "1qx072m0gl6m3d5g5cbbf13p4h217icmlxjnrn829x5xqwi451sw")))) (build-system gnu-build-system) (native-inputs `(("glib:bin" ,glib "bin") ; for glib-mkenums and glib-genmarshal @@ -3341,10 +3344,11 @@ (define-public grilo ("pkg-config" ,pkg-config) ("gobject-introspection" ,gobject-introspection))) (inputs - `(("glib" ,glib) + `(("cyrus-sasl" ,cyrus-sasl) + ("glib" ,glib) ("gtk+" ,gtk+) ("libxml2" ,libxml2) - ;; XXX TODO: Add oauth + ("liboauth" ,liboauth) ("libsoup" ,libsoup) ("nettle" ,nettle) ("totem-pl-parser" ,totem-pl-parser))) @@ -4499,7 +4503,7 @@ (define-public mutter (define-public gnome-online-accounts (package (name "gnome-online-accounts") - (version "3.24.0") + (version "3.24.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -4507,7 +4511,7 @@ (define-public gnome-online-accounts name "-" version ".tar.xz")) (sha256 (base32 - "0yy10znqj278lnhdiqjcqxrwwv5c1jdjd0ncjbbdyh8n0q77hbwy")))) + "0lgniqmkr6ffdw3kcqd34lvp969j2q2qzcy30zkzl5c09r7anc0a")))) (build-system glib-or-gtk-build-system) (native-inputs `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc. @@ -4662,7 +4666,7 @@ (define-public caribou (define-public network-manager (package (name "network-manager") - (version "1.6.2") + (version "1.8.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/NetworkManager/" @@ -4670,7 +4674,7 @@ (define-public network-manager "NetworkManager-" version ".tar.xz")) (sha256 (base32 - "1y96k82rav8if334jl500zc024d210c4pgprh94yqyz3rmanyaxj")) + "17pn7kzilyl0qk525gp9xnbz4x0ssrdmgk1lvw95pyfd6rm5qnps")) (snippet '(begin (use-modules (guix build utils)) @@ -4751,8 +4755,11 @@ (define-public network-manager ("python-dbus" ,python-dbus) ("python-pygobject" ,python-pygobject))) (inputs - `(("dbus-glib" ,dbus-glib) + `(("curl" ,curl) + ("cyrus-sasl" ,cyrus-sasl) + ("dbus-glib" ,dbus-glib) ("dnsmasq" ,dnsmasq) + ("eudev" ,eudev) ("gnutls" ,gnutls) ("iptables" ,iptables) ("isc-dhcp" ,isc-dhcp) @@ -4803,7 +4810,7 @@ (define-public mobile-broadband-provider-info (define-public network-manager-applet (package (name "network-manager-applet") - (version "1.4.2") + (version "1.8.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -4811,12 +4818,9 @@ (define-public network-manager-applet name "-" version ".tar.xz")) (sha256 (base32 - "16a43sl9aijmvxbb08hbjqyjnlshj8dckycbgi9nm333fr47n6s3")))) + "09f9hjpn9nkhw57mk6pi7q1bq3lhf5hvmwas0fknscssak7yjmry")))) (build-system glib-or-gtk-build-system) - ;; TODO: WWAN support supposedly requires an update of glibmm which in turn - ;; requires an update of the its dependencies (glib and others). - (arguments '(#:configure-flags '("--disable-migration" - "--without-wwan"))) + (arguments '(#:configure-flags '("--disable-migration"))) (native-inputs `(("intltool" ,intltool) ("gobject-introspection" ,gobject-introspection) @@ -4831,7 +4835,9 @@ (define-public network-manager-applet ("libgudev" ,libgudev) ("libnotify" ,libnotify) ("libsecret" ,libsecret) - ("jansson" ,jansson))) ;for team support + ("libselinux" ,libselinux) + ("jansson" ,jansson) ; for team support + ("modem-manager" ,modem-manager))) (synopsis "Applet for managing network connections") (home-page "http://www.gnome.org/projects/NetworkManager/") (description @@ -5595,7 +5601,7 @@ (define-public libzapojit (define-public gnome-calendar (package (name "gnome-calendar") - (version "3.24.2") + (version "3.24.3") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -5603,7 +5609,7 @@ (define-public gnome-calendar name "-" version ".tar.xz")) (sha256 (base32 - "0lc0xdgn0y12i87775xyy0p3a5l82w9k49cmwl1my8r8pwf9lp6s")))) + "1v7k1wcl5yg9bd4l0rz0z03h32d35zgfp4qzz21widjcyis41jry")))) (build-system glib-or-gtk-build-system) (native-inputs `(("intltool" ,intltool) @@ -6218,7 +6224,7 @@ (define-public orca (define-public gspell (package (name "gspell") - (version "1.3.2") + (version "1.4.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -6226,7 +6232,7 @@ (define-public gspell name "-" version ".tar.xz")) (sha256 (base32 - "1n4kd5i11l79h8bpvx3cz79ww0b4z89y99h4czvyg80qlarn585w")) + "1ghh1xdzf04mfgb13zqpj88krpa44xv2vbyhm6k017kzrpz8hbs4")) (patches (search-patches "gspell-dash-test.patch")))) (build-system glib-or-gtk-build-system) (arguments @@ -6267,3 +6273,48 @@ (define-public gspell application. It provides a GObject API, spell-checking to text entries and text views, and buttons to choose the language.") (license license:gpl2+))) + +(define-public gnome-planner + (package + (name "gnome-planner") + (version "0.14.6") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/planner/" + (version-major+minor version) "/planner-" + version ".tar.xz")) + (sha256 + (base32 + "15h6ps58giy5r1g66sg1l4xzhjssl362mfny2x09khdqsvk2j38k")))) + (build-system glib-or-gtk-build-system) + (arguments + ;; Disable the Python bindings because the Planner program functions + ;; without them, and (as of 2017-06-13) we have not packaged all of + ;; packages that are necessary for building the Python bindings. + `(#:configure-flags (list "--disable-python"))) + (inputs + `(("libgnomecanvas" ,libgnomecanvas) + ("libgnomeui" ,libgnomeui) + ("libglade" ,libglade) + ("gnome-vfs" ,gnome-vfs) + ("gconf" ,gconf) + ("libxml2" ,libxml2) + ("libxslt" ,libxslt) + ("gtk+" ,gtk+) + ("glib" ,glib))) + (native-inputs + `(("intltool" ,intltool) + ("scrollkeeper" ,scrollkeeper) + ("pkg-config" ,pkg-config))) + (home-page "https://wiki.gnome.org/Apps/Planner") + (synopsis "Project management software for the GNOME desktop") + (description + "GNOME Planner is a project management tool based on the Work Breakdown +Structure (WBS). Its goal is to enable you to easily plan projects. Based on +the resources, tasks, and constraints that you define, Planner generates +various views into a project. For example, Planner can show a Gantt chart of +the project. It can show a detailed summary of tasks including their +duration, cost, and current progress. It can also show a report of resource +utilization that highlights under-utilized and over-utilized resources. These +views can be printed as PDF or PostScript files, or exported to HTML.") + (license license:gpl2+))) diff --git a/gnu/packages/gnunet.scm b/gnu/packages/gnunet.scm index 44d6129897..56db405bc8 100644 --- a/gnu/packages/gnunet.scm +++ b/gnu/packages/gnunet.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2015 Efraim Flashner ;;; Copyright © 2016 Ricardo Wurmus ;;; Copyright © 2016 Mark H Weaver -;;; Copyright © 2016, 2017 ng0 +;;; Copyright © 2016, 2017 ng0 ;;; ;;; This file is part of GNU Guix. ;;; @@ -66,22 +66,14 @@ (define-module (gnu packages gnunet) (define-public libextractor (package (name "libextractor") - (version "1.3") + (version "1.4") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/libextractor/libextractor-" version ".tar.gz")) (sha256 (base32 - "0zvv7wd011npcx7yphw9bpgivyxz6mlp87a57n96nv85k96dd2l6")) - (patches (search-patches "libextractor-ffmpeg-3.patch")) - (modules '((guix build utils))) - (snippet - ;; Nowadays libmagic (from 'file') returns 'audio/ogg' and not - ;; 'application/ogg'. Adjust accordingly. - '(substitute* "src/plugins/test_mime.c" - (("application/ogg") - "audio/ogg"))))) + "0v7ns5jhsyp1wzvbaydfgxnva5zd63gkzm9djhckmam9liq824l4")))) (build-system gnu-build-system) ;; WARNING: Checks require /dev/shm to be in the build chroot, especially ;; not to be a symbolic link to /run/shm. @@ -184,14 +176,14 @@ (define-public libmicrohttpd (define-public gnurl (package (name "gnurl") - (version "7.54.0") + (version "7.54.1") (source (origin (method url-fetch) (uri (string-append "https://gnunet.org/sites/default/files/" name "-" version ".tar.bz2")) (sha256 (base32 - "1ww346cdsxln6iq158a4wm38bmicg5wspd2c83gnqf1glx22hza0")))) + "0szbj352h95sgc9kbx9wzkgjksmg3g5k6cvlc7hz3wrbdh5gb0a4")))) (build-system gnu-build-system) (outputs '("out" "doc")) ; 1.5 MiB of man3 pages diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 8d03f0e00d..6809a696a0 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -250,7 +250,7 @@ (define-public mozjs-38 (define-public nspr (package (name "nspr") - (version "4.14") + (version "4.15") (source (origin (method url-fetch) (uri (string-append @@ -258,7 +258,7 @@ (define-public nspr version "/src/nspr-" version ".tar.gz")) (sha256 (base32 - "1m8p9l3prabhfxz6zs889fl7gmcka72a62i46a8klh2pca11iz34")))) + "101dksqm1z0hzd7ap82ccbxjr48s6q3xhshdl81qkj6hqdmy1p97")))) (build-system gnu-build-system) (native-inputs `(("perl" ,perl))) @@ -282,7 +282,7 @@ (define-public nspr (define-public nss (package (name "nss") - (version "3.30.2") + (version "3.31") (source (origin (method url-fetch) (uri (let ((version-with-underscores @@ -293,10 +293,9 @@ (define-public nss "nss-" version ".tar.gz"))) (sha256 (base32 - "096frzvyp3z257x84rxknscfgsbavzh2a0gyibx7kvmw4vzpfjhd")) + "0pd643a8ns7q5az5ai3ascrw666i2kbfiyy1c9hlhw9jd8jn21g9")) ;; Create nss.pc and nss-config. (patches (search-patches "nss-pkgconfig.patch" - "nss-disable-long-b64-tests.patch" "nss-increase-test-timeout.patch")))) (build-system gnu-build-system) (outputs '("out" "bin")) @@ -329,16 +328,6 @@ (define-public nss `((setenv "USE_64" "1"))) (_ '())) - ;; The timeout values in "increase-test-timeouts" are still - ;; too low, so apply this workaround on armhf for now to avoid - ;; rebuilding on all platforms. This should be incorporated in - ;; the patch for the next update. - ;; https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00472.html - ,@(if (string-prefix? "armhf" (or (%current-target-system) - (%current-system))) - `((substitute* "nss/gtests/ssl_gtest/tls_connect.cc" - (("25000\\);") "300000);"))) - '()) #t)) (replace 'check (lambda _ @@ -427,35 +416,35 @@ (define-public icecat (mozilla-patch "icecat-bug-1342366.patch" "fb43f6690a26" "1vnkjpq2bcqwzmjkgyqv8wj0ndrrsyix3qy1rsb5is6pjmi9sbaa") (mozilla-patch "icecat-bug-1343818.patch" "90f870bbec29" "0mbki955f71n4yr9p0yc7kh5jwq7vs4bs4rhaazdncirbr564hm6") (mozilla-patch "icecat-bug-1348454.patch" "c1cd8a02669f" "1wf0107763rw45kxkak7478vlax06ay7076cbm7ysxl7vijbr52w") - (mozilla-patch "icecat-bug-1297111.patch" "2553531f83b9" "0ibf59pa8czdyhc25sas6zhh2gf1k8vr8fklis2b1ms3n1qnzrha") + (mozilla-patch "icecat-CVE-2017-5470-pt01.patch" "2553531f83b9" "0ibf59pa8czdyhc25sas6zhh2gf1k8vr8fklis2b1ms3n1qnzrha") (mozilla-patch "icecat-bug-1355873.patch" "9ee455ddcd68" "0d38hi4556635g9ag805vfyffdgfsp4a8v3d9ldffdp99ypv2ixj") - (mozilla-patch "icecat-bug-1348424-pt1.patch" "6472c7006a73" "1fgydas23fzj49n4g43133bgjn98b2h38bii4knl7z7pm3fs2wws") - (mozilla-patch "icecat-bug-1348424-pt2.patch" "0d5a26b29816" "03mkghl9i83jk1axr8bvw8la6shbggkabf23if8a9vi5jdv8182x") + (mozilla-patch "icecat-CVE-2017-5470-pt02.patch" "6472c7006a73" "1fgydas23fzj49n4g43133bgjn98b2h38bii4knl7z7pm3fs2wws") + (mozilla-patch "icecat-CVE-2017-5470-pt03.patch" "0d5a26b29816" "03mkghl9i83jk1axr8bvw8la6shbggkabf23if8a9vi5jdv8182x") (mozilla-patch "icecat-bug-1357092.patch" "e78c943af07f" "0r830k6hja8z9rjk2nqjg8zfzr0wjcnic8rddh7jmc1inr1w3crm") - (mozilla-patch "icecat-bug-1352093.patch" "d7c06f2d0d13" "1ahyns5v37w91bilvb3pa8kkdzkkn3fcxmi49jr5bycjlawljrm4") - (mozilla-patch "icecat-bug-1349595.patch" "9071c7d4cc9c" "12128sf8s3zwv2w16kfl5jry9d6ky7hvps2006184rg23p32aj6n") + (mozilla-patch "icecat-CVE-2017-5470-pt04.patch" "d7c06f2d0d13" "1ahyns5v37w91bilvb3pa8kkdzkkn3fcxmi49jr5bycjlawljrm4") + (mozilla-patch "icecat-CVE-2017-5470-pt05.patch" "9071c7d4cc9c" "12128sf8s3zwv2w16kfl5jry9d6ky7hvps2006184rg23p32aj6n") (mozilla-patch "icecat-bug-1336979.patch" "8bbc7b586d68" "0c13imyp1nq18in3yb1zcyi41b69svh4fn8msyj0c2lhbf8qnqcw") - (mozilla-patch "icecat-bug-1352556.patch" "6d80ca63ff8b" "0s893fn6v0p323lcnl4cbkg1zd7gs1p0bw76ki6cmiapkn63gs13") - (mozilla-patch "icecat-bug-1359547.patch" "43d7b98d8743" "1dhgy1jkvn3c4k27hbv8p16w7l09b8hd4w9zzpk8dpn4h78ncs3h") + (mozilla-patch "icecat-CVE-2017-5470-pt06.patch" "6d80ca63ff8b" "0s893fn6v0p323lcnl4cbkg1zd7gs1p0bw76ki6cmiapkn63gs13") + (mozilla-patch "icecat-CVE-2017-7752.patch" "43d7b98d8743" "1dhgy1jkvn3c4k27hbv8p16w7l09b8hd4w9zzpk8dpn4h78ncs3h") (mozilla-patch "icecat-CVE-2017-5031.patch" "bd4fcdee9a06" "0xz1r342023a0bsllhjbzn6v75lpqznwacqyikb7q8i4hxkxh78a") (mozilla-patch "icecat-bug-1346499.patch" "747fd6c81983" "00iscyn4wr69205ppiaghlnd32845f5lcsl303v0fcdd4d1v04vc") (mozilla-patch "icecat-bug-1334443-pt1.patch" "16201e8478df" "1k91xaai25vn1svkaldnsd2s8br3fgvnk5l54k3n3lk3m5vj55hv") (mozilla-patch "icecat-bug-1334443-pt2.patch" "f100e5cf3bcb" "1cgbbbnkrd3ydfw99rhnpqdp5zq65537mg8sa1s9ajxkjjd1dkwj") (mozilla-patch "icecat-bug-1354810.patch" "e579ef6e8d11" "0cmrh8dl85lzjxpbni08xbs8qq15sljnpg70a7rsl0jdbgih3mdx") (mozilla-patch "icecat-bug-1356755.patch" "4a3fce67b52d" "126i9nwxsb3sjwb7dvhafacq86glnhx7r7jjv0h9v21s1w0kx4wj") - (mozilla-patch "icecat-bug-1273265.patch" "7902fea300b8" "1jkrl8hdycsi17dd1m1vvl6gm1skhpf10q2m29zwfr8l40fd6a3q") + (mozilla-patch "icecat-CVE-2017-7765.patch" "7902fea300b8" "1jkrl8hdycsi17dd1m1vvl6gm1skhpf10q2m29zwfr8l40fd6a3q") (mozilla-patch "icecat-bug-1353204.patch" "b5a21502aeff" "13rbrhvr37w95av9d4hkgi913nq0j6k2iijydylvprcn18cwibp0") (mozilla-patch "icecat-bug-1028195.patch" "69a5ca2bf867" "0q8cgi6837ikpg7gsvywmzhq0i102845apcbrd6mw0205qqsnw5c") (mozilla-patch "icecat-bug-1347835.patch" "bc635f45af37" "1fny422l6yc80901x6swybr8nk0in1wxfgy97ky4bdkcqlnmzpqv") (mozilla-patch "icecat-bug-1241066.patch" "b922ca70cce5" "09hcf9rm7ng3vj5y267w0c9h6pqinnz8gjlkwx1337xh43mdvqjv") - (mozilla-patch "icecat-bug-1346012.patch" "1ce6d0652921" "163ji64a86h682frh1jq016w1mjf8g24r8cni0irsdmiihis7zxc") + (mozilla-patch "icecat-CVE-2017-5470-pt07.patch" "1ce6d0652921" "163ji64a86h682frh1jq016w1mjf8g24r8cni0irsdmiihis7zxc") (mozilla-patch "icecat-bug-1324140.patch" "8886f9cd5dd3" "0byabs9md8r3pc4r67sv2759427n1za0gfayln40nx47n2p52kmg") - (mozilla-patch "icecat-bug-1342552.patch" "ad995e90916b" "02nq9sg675p26z99nr2pykbz51hi2phf0gmrb1bjpq9pjbll7gsa") - (mozilla-patch "icecat-bug-1355039.patch" "4ae71415fecf" "0yfkkdkkimad9a3w734xx85lb7hrl870c8k8an7w78fq3vl3fjnd") - (mozilla-patch "icecat-bug-1363396.patch" "24cbb7f2e0ff" "006f0zhz5nxs72q9plwzhq4l79b47svzizvv510m5g2krsfrccza") - (mozilla-patch "icecat-bug-1356558.patch" "89c7fb6c5be3" "19650nmc4vn1prbpn5h06kz9d1al279xkc23v39577h4zhdrknkj") + (mozilla-patch "icecat-CVE-2017-5470-pt08.patch" "ad995e90916b" "02nq9sg675p26z99nr2pykbz51hi2phf0gmrb1bjpq9pjbll7gsa") + (mozilla-patch "icecat-CVE-2017-7749.patch" "4ae71415fecf" "0yfkkdkkimad9a3w734xx85lb7hrl870c8k8an7w78fq3vl3fjnd") + (mozilla-patch "icecat-CVE-2017-7751.patch" "24cbb7f2e0ff" "006f0zhz5nxs72q9plwzhq4l79b47svzizvv510m5g2krsfrccza") + (mozilla-patch "icecat-CVE-2017-7750.patch" "89c7fb6c5be3" "19650nmc4vn1prbpn5h06kz9d1al279xkc23v39577h4zhdrknkj") (mozilla-patch "icecat-bug-1337810.patch" "0f6dd3564c76" "1sxajqh6r7fjs45xhvjwg94smpvyvplh3rdvq11d3q5m9v4kg7mz") - (mozilla-patch "icecat-bug-1347748.patch" "145905da25d3" "0c2q9f000snpm9x0qda2y0awrsm313iwxbv0kh33ca0kpza49a76") + (mozilla-patch "icecat-CVE-2017-5470-pt09.patch" "145905da25d3" "0c2q9f000snpm9x0qda2y0awrsm313iwxbv0kh33ca0kpza49a76") (mozilla-patch "icecat-bug-1345355.patch" "c5012009a0b2" "0m772bgrwb8iwv2bdgx694ybg5wgbf58xg5v245x0p7gwhgwiwmr") (mozilla-patch "icecat-bug-1351340.patch" "047f19a1b9a0" "0qjnhybibs3cpcba3ga4g7d4c0w716xa9jf87y2ir8yz7dw1f9vl") (mozilla-patch "icecat-bug-1056322.patch" "f076a30f6c29" "0xgskjl6zmxi3v4l0f3wlas0qb2403fin5lv1hi3jf2142ihpaml") @@ -480,32 +469,44 @@ (define-public icecat (mozilla-patch "icecat-bug-1360574-pt1.patch" "237eee780619" "1iw6z762zdc42kwjvv58a2cjc0s4kzwwy7838apl7y7cq85g0jg2") (mozilla-patch "icecat-bug-1360574-pt2.patch" "46a5a4aac189" "1i553f9qvav0fn5avbp8912995pqbhzbzamxxfz8gn2ik17y3xly") (mozilla-patch "icecat-bug-1358776.patch" "bd35fa23f79a" "12nicgwhcn63knmlcl0c2askn9sj35bfclaab3826pkd9yq5g4p5") - (mozilla-patch "icecat-bug-1362590.patch" "c1314a709b41" "0klgrcyc20fig6rbm9znjpcnfsz6xnlp1v03fbvaww0riy2qm42k") + (mozilla-patch "icecat-CVE-2017-5470-pt10.patch" "c1314a709b41" "0klgrcyc20fig6rbm9znjpcnfsz6xnlp1v03fbvaww0riy2qm42k") (mozilla-patch "icecat-bug-1359859.patch" "e38948fb79d6" "1sfyc5s9ndv6q72k8n9x0rvj4sz40k51iljrs42gwykzkjm2fx5m") (mozilla-patch "icecat-bug-1342057.patch" "278bef1d7a64" "0zk18s9pnbwz9ankmc9mj4197s55j1jvax04ansqymmmc3a5ciif") - (mozilla-patch "icecat-bug-1325513.patch" "218e0963406f" "0wqms5nany4sx2g4p01lbam7la2dyazz87dhv5hcsf8ifxrfww11") + (mozilla-patch "icecat-CVE-2017-5470-pt11.patch" "218e0963406f" "0wqms5nany4sx2g4p01lbam7la2dyazz87dhv5hcsf8ifxrfww11") (mozilla-patch "icecat-bug-1304566.patch" "188e39630fcd" "1bfxfgj5ywx4bcf91kwyrjh5ppiv59gadx4445achyabdi639l8d") (mozilla-patch "icecat-bug-1356601.patch" "8191e403fedf" "1k4zmq0923f5dc3dwbz1q0bkcbm90ldwkczym366hgwadb2305nd") (mozilla-patch "icecat-bug-1334097.patch" "fe2a2c7e88cb" "1rppaivaddigwk65krn8m9f9mcdkiiv28ws9n9zj62n0rc1shyvc") (mozilla-patch "icecat-bug-1359051.patch" "8d7dbe5c6587" "14zh74bbld4s0jy0a48fi9acxkc236mh9wjid3vrf72yj6bi5xnp") (mozilla-patch "icecat-bug-1359697.patch" "ca2b5274549f" "1ns7v70i1hfkxqnjhf9fp0lk9095hdcllg94j3dl1nfaif4w6vbf") (mozilla-patch "icecat-bug-1343256.patch" "a30dd7dd6617" "1k078176fp8vz871wirjz9d3yx9l2lfl8p75c4905n3j3zv2297q") - (mozilla-patch "icecat-bug-1349310.patch" "81b3ce7d37b3" "0ad0wqczy4kpggj6m3b8bzxi6ax340mik1mfawhkq89a1h2sfpxv") + (mozilla-patch "icecat-CVE-2017-7778.patch" "81b3ce7d37b3" "0ad0wqczy4kpggj6m3b8bzxi6ax340mik1mfawhkq89a1h2sfpxv") (mozilla-patch "icecat-bug-1356179.patch" "66d8893f37f0" "0izl31lagvdv4qpb9gkjxvgpmxzw50x5bviap4l7bbnb56cv7d8p") - (mozilla-patch "icecat-bug-1365602.patch" "aad883966edd" "058axnrwrbvy2h9r9pb766lyky45hb92rap142sbp17yz0sxfmww") + (mozilla-patch "icecat-CVE-2017-5472.patch" "aad883966edd" "058axnrwrbvy2h9r9pb766lyky45hb92rap142sbp17yz0sxfmww") (mozilla-patch "icecat-bug-1355520.patch" "7ca2d8839f7a" "1xbmpvr2x720x9ghd5wgbg6lknbnhcyqmkkfamdf97mqcyizyr21") (mozilla-patch "icecat-bug-1358469.patch" "4d432638c0f9" "0qpjmwik3dryjwmgfwmkqk0rs9rb2lafb2k9fc3pkjnrq5y0l9xg") - (mozilla-patch "icecat-bug-1356025.patch" "f5967db0a0f3" "045wbvkm21kbm314dd6lbq2disiaf26kmsxi6brf442fd0028gwq") + (mozilla-patch "icecat-CVE-2017-5470-pt12.patch" "f5967db0a0f3" "045wbvkm21kbm314dd6lbq2disiaf26kmsxi6brf442fd0028gwq") (mozilla-patch "icecat-bug-1345910.patch" "ec6b6720e54e" "0lm15jl46mdlsds6947jsiyvhf9agb8hcdrqj2svc3kn9kzvyr2n") - (mozilla-patch "icecat-bug-1359639.patch" "a4f8d8a12afa" "0d7sjc21af074rvgvijj42gmpjvcb1v1zlpgb3s7ky7w6wjr35vx") - (mozilla-patch "icecat-bug-1357090.patch" "d07f24a72ce4" "1qbwska76b2zslb95wnx9v04znb6k9fqylr4ajyfqpwk1sr363hg") - (mozilla-patch "icecat-bug-1364283.patch" "a6caa7628e36" "1yv5f4h8js9bry9krcx130w6ic8rdmmq4fap6va24kfx8qflg70h") + (mozilla-patch "icecat-CVE-2017-5470-pt13.patch" "a4f8d8a12afa" "0d7sjc21af074rvgvijj42gmpjvcb1v1zlpgb3s7ky7w6wjr35vx") + (mozilla-patch "icecat-CVE-2017-7754.patch" "d07f24a72ce4" "1qbwska76b2zslb95wnx9v04znb6k9fqylr4ajyfqpwk1sr363hg") + (mozilla-patch "icecat-CVE-2017-7764.patch" "a6caa7628e36" "1yv5f4h8js9bry9krcx130w6ic8rdmmq4fap6va24kfx8qflg70h") (mozilla-patch "icecat-bug-1237868.patch" "41138235d4ea" "0mcj4x2kmagwf5hp8xhczf04sxm995pk1zarc9yffk84z7fcrxkj") (mozilla-patch "icecat-bug-1331335.patch" "b724283e3b31" "1xbb1vcdzfpcmrmxm8ihwzslh2vz15k0k601nvyhh6vgx270h1wn") (mozilla-patch "icecat-bug-1367267.patch" "4c2f4d8b693e" "1hrndhfnz0vnjnspwh5mbvgl2j8d1cs62awp04wx2w6z4l4wrmbv") - (mozilla-patch "icecat-bug-1366595.patch" "cce3fd607206" "1z97jw8jpfyx61jxf0j8nsplnna2c5bwihwnl9cvlc2cspp3kgp5") - (mozilla-patch "icecat-bug-1349266.patch" "dc4e3c64d781" "1zd666k4qpdamly3av09k602pmirjcs9l6la6ba0qq9w9vfan3g5") - (mozilla-patch "icecat-bug-1366140.patch" "379c348250e8" "0kvsyhi9j3bjx14ffr13dslqp8ghcgrz6ds2fikdkrrrk4syskd5"))) + (mozilla-patch "icecat-CVE-2017-7756.patch" "cce3fd607206" "1z97jw8jpfyx61jxf0j8nsplnna2c5bwihwnl9cvlc2cspp3kgp5") + (mozilla-patch "icecat-CVE-2017-5470-pt14.patch" "dc4e3c64d781" "1zd666k4qpdamly3av09k602pmirjcs9l6la6ba0qq9w9vfan3g5") + (mozilla-patch "icecat-CVE-2017-5470-pt15.patch" "379c348250e8" "0kvsyhi9j3bjx14ffr13dslqp8ghcgrz6ds2fikdkrrrk4syskd5") + (mozilla-patch "icecat-bug-1349531.patch" "70cd711c6ae8" "07hlby5xdvqy6jdqxydv5pwap8hhsycb19fgw5fan2xf9dhrfpb8") + (mozilla-patch "icecat-CVE-2017-5470-pt16.patch" "6e644bc1a57f" "1xp8b74wijfz198q4hdybldnwh3hh0vh33dc5s7489abmz4s5zjg") + (mozilla-patch "icecat-CVE-2017-7758.patch" "279bffa85beb" "0shf77l9id6s8cs8xbc0ii0ccd7n09jv20410kkqqz11m296dcjr") + (mozilla-patch "icecat-CVE-2017-7757.patch" "0abcbc6ef8f3" "045arb1b83a3yv358naznl15bnr4wgxxayv8d5gcxarcbrrvm5q4") + (mozilla-patch "icecat-CVE-2017-5470-pt17.patch" "e0261afd69b9" "0a19b24iq57430kpbsdvka9vyg6kwhnnqis1xsd6wh8gz0bw5l79") + (mozilla-patch "icecat-CVE-2017-5470-pt18.patch" "4ec931d4bf29" "0bq0hq41xhy9aqjra5m0flmpilinlkb088r6w1kly561ckjl1f9f") + (mozilla-patch "icecat-bug-1339826-pt1.patch" "9c29579fffe2" "0yfc764qrynh441wwim18cr6k0sazgrm77frcdnyks0hzf0y44d1") + (mozilla-patch "icecat-bug-1339826-pt2.patch" "be946ea1a75a" "0pw0y1sdckn5brm39sdg47hbda5432aw32c3xq26ism23im85191") + (mozilla-patch "icecat-bug-1339826-pt2.patch" "44b2fe592a90" "1v8mz3b40dp6l5qrgha4yibmrnx80pxsvdll6ky1k937yhbzjk4a") + (mozilla-patch "icecat-CVE-2017-5470-pt19.patch" "f68e0d98a22a" "063z4a7gyhzy85fc2j2yr7kmk2zf7v875hjw4485civazydysw4j") + (mozilla-patch "icecat-bug-1353625.patch" "c41f37d913e2" "1s997c1hj4ywnlfbhvi1y96vd6bxl74wcrb0nly611h51h8xnyxm") + (mozilla-patch "icecat-CVE-2017-5470-pt20.patch" "38273203b827" "12p9r4spdp09d6ic9sqspvdr50lmc1p86ydz2fxdifb1f95njhx0"))) (modules '((guix build utils))) (snippet '(begin diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 0bafdf6f61..9d03e5600f 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -4109,7 +4109,7 @@ (define-public ghc-base-orphans (define-public ghc-auto-update (package (name "ghc-auto-update") - (version "0.1.2.2") + (version "0.1.4") (source (origin (method url-fetch) @@ -4119,7 +4119,7 @@ (define-public ghc-auto-update ".tar.gz")) (sha256 (base32 - "1ns4c5mqhnm7hsiqxf1ivjs5fflyq92b16ldzrcl0p85631h0c3v")))) + "09dlh2alsx2mw5kvj931yhbj0aw7jmly2cm9xbscm2sf098w35jy")))) (build-system haskell-build-system) (home-page "https://github.com/yesodweb/wai") (synopsis "Efficiently run periodic, on-demand actions") @@ -5085,7 +5085,7 @@ (define-public ghc-aeson-pretty (define-public ghc-wai (package (name "ghc-wai") - (version "3.0.4.0") + (version "3.2.1.1") (source (origin (method url-fetch) @@ -5095,7 +5095,7 @@ (define-public ghc-wai ".tar.gz")) (sha256 (base32 - "1551n0g0n22vml33v0jz5xgjcy6j79algvsdqg11a1z5ljjrjlqf")))) + "08afasnirja21vr0bmzcywz4w29x736dmdv7h8nnh1l8bn7sd02x")))) (build-system haskell-build-system) (inputs `(("ghc-bytestring-builder" ,ghc-bytestring-builder) @@ -5153,7 +5153,7 @@ (define-public ghc-wai-logger (define-public ghc-wai-extra (package (name "ghc-wai-extra") - (version "3.0.11.1") + (version "3.0.13.1") (source (origin (method url-fetch) @@ -5163,7 +5163,7 @@ (define-public ghc-wai-extra ".tar.gz")) (sha256 (base32 - "1kr2s5qyx1dvnwr372h7pca4sgxjv0pdx96xkgsfi180h3mb0vq8")))) + "0mh761a1bayr4ydwqmh3h8ndpi19zqw34mmy49lp2abr70r0nm1p")))) (build-system haskell-build-system) (inputs `(("ghc-ansi-terminal" ,ghc-ansi-terminal) @@ -5890,7 +5890,7 @@ (define-public ghc-mime-types (define-public ghc-http-client (package (name "ghc-http-client") - (version "0.4.24") + (version "0.5.6.1") (source (origin (method url-fetch) (uri (string-append "https://hackage.haskell.org/package/" @@ -5898,7 +5898,7 @@ (define-public ghc-http-client version ".tar.gz")) (sha256 (base32 - "0xz133kdfiyy2rm6z95bmvjj6y2540xzd86cfmdv9s6kz4p1ir4k")))) + "1v9bdb8dkhb5g6jl9azk86ig7ia8xh9arr64n7s8r94fp0vl6c1c")))) (build-system haskell-build-system) ;; Tests require access to the web. (arguments `(#:tests? #f)) @@ -6371,7 +6371,7 @@ (define-public ghc-connection (define-public ghc-http-client-tls (package (name "ghc-http-client-tls") - (version "0.2.2") + (version "0.3.4.1") (source (origin (method url-fetch) (uri (string-append "https://hackage.haskell.org/package/" @@ -6379,7 +6379,7 @@ (define-public ghc-http-client-tls version ".tar.gz")) (sha256 (base32 - "0a01r05h5fxswyn6k6cgqgak4scqjan72hyy5wbdqzzhl4rmh7j5")))) + "1mbwdfn4hs8lcwml2l6xv4n068l9zlasyv6vwb2ylgm030pyv3xh")))) (build-system haskell-build-system) ;; Tests require Internet access (arguments `(#:tests? #f)) @@ -8295,4 +8295,375 @@ (define-public shellcheck @end enumerate") (license license:gpl3+))) +(define-public ghc-wai-conduit + (package + (name "ghc-wai-conduit") + (version "3.0.0.3") + (source + (origin + (method url-fetch) + (uri (string-append "https://hackage.haskell.org/package/" + "wai-conduit-" version "/" + "wai-conduit-" version ".tar.gz")) + (sha256 + (base32 + "1zvsiwjq2mvkb9sjgp3ly9m968m7a2jjzr4id6jpi3mmqykj15z4")))) + (build-system haskell-build-system) + (inputs + `(("ghc-conduit" ,ghc-conduit) + ("ghc-http-types" ,ghc-http-types) + ("ghc-wai" ,ghc-wai) + ("ghc-blaze-builder" ,ghc-blaze-builder))) + (home-page "https://github.com/yesodweb/wai") + (synopsis "Conduit wrappers for Haskell's WAI") + (description "This package provides data streaming abstraction for +Haskell's Web Application Interface (WAI).") + (license license:expat))) + +(define-public ghc-http-date + (package + (name "ghc-http-date") + (version "0.0.6.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://hackage.haskell.org/package/" + "http-date-" version "/" + "http-date-" version ".tar.gz")) + (sha256 + (base32 + "0dknh28kyarnzqrsc80ssalxjrq0qbv7ir49247p2grb7rh0dqgj")))) + (build-system haskell-build-system) + (inputs + `(("ghc-attoparsec" ,ghc-attoparsec))) + (native-inputs + `(("ghc-doctest" ,ghc-doctest) + ("ghc-hspec" ,ghc-hspec) + ("hspec-discover" ,hspec-discover) + ("ghc-old-locale" ,ghc-old-locale))) + (home-page "https://github.com/kazu-yamamoto/http-date") + (synopsis "HTTP Date parser/formatter") + (description "Library for Parsing and formatting HTTP +Date in Haskell.") + (license license:bsd-3))) + +(define-public ghc-simple-sendfile + (package + (name "ghc-simple-sendfile") + (version "0.2.25") + (source + (origin + (method url-fetch) + (uri (string-append "https://hackage.haskell.org/package/" + "simple-sendfile-" version "/" + "simple-sendfile-" version ".tar.gz")) + (sha256 + (base32 + "0k99j9xfcf83c55jmn202hdinhjaa4yn3dal4rvjk2w2rlhqirha")))) + (build-system haskell-build-system) + (inputs + `(("ghc-conduit" ,ghc-conduit) + ("ghc-conduit-extra" ,ghc-conduit-extra) + ("ghc-network" ,ghc-network) + ("ghc-resourcet" ,ghc-resourcet))) + (native-inputs + `(("ghc-hspec" ,ghc-hspec) + ("hspec-discover" ,hspec-discover))) + (home-page "https://github.com/kazu-yamamoto/simple-sendfile") + (synopsis "Cross platform library for the sendfile system call") + (description "This library tries to call minimum system calls which +are the bottleneck of web servers.") + (license license:bsd-3))) + +(define-public ghc-hex + (package + (name "ghc-hex") + (version "0.1.2") + (source + (origin + (method url-fetch) + (uri (string-append "https://hackage.haskell.org/package/" + "hex-" version "/" + "hex-" version ".tar.gz")) + (sha256 + (base32 + "1v31xiaivrrn0q2jz8919wvkjplv1kxna5ajhsj701fqxm1i5vhj")))) + (build-system haskell-build-system) + (home-page "http://hackage.haskell.org/package/hex") + (synopsis "Convert strings into hexadecimal and back") + (description "This package provides conversion functions between +bytestrings and their hexademical representation.") + (license license:bsd-3))) + +(define-public ghc-psqueues + (package + (name "ghc-psqueues") + (version "0.2.2.3") + (source + (origin + (method url-fetch) + (uri (string-append "https://hackage.haskell.org/package/" + "psqueues-" version "/" + "psqueues-" version ".tar.gz")) + (sha256 + (base32 + "1dd6xv1wjxj1xinx155b14hijw8fafrg4096srzdzj7xyqq7qxbd")))) + (build-system haskell-build-system) + (inputs + `(("ghc-hashable" ,ghc-hashable))) + (native-inputs + `(("ghc-hunit" ,ghc-hunit) + ("ghc-quickcheck" ,ghc-quickcheck) + ("ghc-tagged" ,ghc-tagged) + ("ghc-test-framework" ,ghc-test-framework) + ("ghc-test-framework-hunit" ,ghc-test-framework-hunit) + ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2))) + (home-page "https://github.com/bttr/psqueues") + (synopsis "Pure priority search queues") + (description "The psqueues package provides +@uref{http://en.wikipedia.org/wiki/Priority_queue, Priority Search Queues} in +three different flavors: + +@itemize +@item @code{OrdPSQ k p v}, which uses the @code{Ord k} instance to provide +fast insertion, deletion and lookup. This implementation is based on Ralf +Hinze's @uref{http://citeseer.ist.psu.edu/hinze01simple.html, A Simple +Implementation Technique for Priority Search Queues}. + +Hence, it is similar to the @uref{http://hackage.haskell.org/package/PSQueue, +PSQueue} library, although it is considerably faster and provides a slightly +different API. + +@item @code{IntPSQ p v} is a far more efficient implementation. It fixes the +key type to @code{Int} and uses a +@code{http://en.wikipedia.org/wiki/Radix_tree, radix tree} +(like @code{IntMap}) with an additional min-heap property. + +@item @code{HashPSQ k p v} is a fairly straightforward extension +of @code{IntPSQ}: it simply uses the keys' hashes as indices in the +@code{IntPSQ}. If there are any hash collisions, it uses an +@code{OrdPSQ} to resolve those. The performance of this implementation +is comparable to that of @code{IntPSQ}, but it is more widely +applicable since the keys are not restricted to @code{Int}, +but rather to any @code{Hashable} datatype. +@end itemize + +Each of the three implementations provides the same API, so they can +be used interchangeably. + +Typical applications of Priority Search Queues include: + +@itemize +@item Caches, and more specifically LRU Caches; +@item Schedulers; +@item Pathfinding algorithms, such as Dijkstra's and A*. +@end itemize") + (license license:bsd-3))) + +(define-public ghc-glob + (package + (name "ghc-glob") + (version "0.7.14") + (source + (origin + (method url-fetch) + (uri (string-append "https://hackage.haskell.org/package/" + "Glob-" version "/" + "Glob-" version ".tar.gz")) + (sha256 + (base32 + "0aw43izg8vlvjl40ms6k92w7gxg7n3l6smdvzla47fp82s4vhdr8")))) + (build-system haskell-build-system) + (inputs + `(("ghc-dlist" ,ghc-dlist) + ("ghc-semigroups" ,ghc-semigroups) + ("ghc-transformers-compat" ,ghc-transformers-compat))) + (native-inputs + `(("ghc-hunit" ,ghc-hunit) + ("ghc-quickcheck" ,ghc-quickcheck) + ("ghc-test-framework" ,ghc-test-framework) + ("ghc-test-framework-hunit" ,ghc-test-framework-hunit) + ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2))) + (home-page "http://iki.fi/matti.niemenmaa/glob/") + (synopsis "Haskell library matching glob patterns against file paths") + (description "This package providesa Haskell library for globbing: +matching patterns against file paths.") + (license license:bsd-3))) + +(define-public ghc-http2 + (package + (name "ghc-http2") + (version "1.6.3") + (source + (origin + (method url-fetch) + (uri (string-append "https://hackage.haskell.org/package/" + "http2-" version "/" + "http2-" version ".tar.gz")) + (sha256 + (base32 + "0hww0rfsv6lqx62qzycbcqy5q6rh9k09qkyjkdm5m1sp1z50wqk1")))) + (build-system haskell-build-system) + (inputs + `(("ghc-bytestring-builder" ,ghc-bytestring-builder) + ("ghc-case-insensitive" ,ghc-case-insensitive) + ("ghc-aeson" ,ghc-aeson) + ("ghc-aeson-pretty" ,ghc-aeson-pretty) + ("ghc-hex" ,ghc-hex) + ("ghc-unordered-containers" ,ghc-unordered-containers) + ("ghc-vector" ,ghc-vector) + ("ghc-word8" ,ghc-word8) + ("ghc-psqueues" ,ghc-psqueues) + ("ghc-stm" ,ghc-stm))) + (native-inputs + `(("ghc-glob" ,ghc-glob) + ("ghc-hspec" ,ghc-hspec) + ("ghc-doctest" ,ghc-doctest) + ("hspec-discover" ,hspec-discover))) + (home-page "https://github.com/kazu-yamamoto/http2") + (synopsis "HTTP/2 library including frames, priority queues and HPACK") + (description "This package provides a HTTP/2.0 library including frames +and HPACK. Currently HTTP/2 16 framing and HPACK 10 is supported.") + (license license:bsd-3))) + +(define-public ghc-warp + (package + (name "ghc-warp") + (version "3.2.11.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://hackage.haskell.org/package/" + "warp-" version "/" "warp-" version + ".tar.gz")) + (sha256 + (base32 + "1zp5cy0bbj508vdvms1n5z80z37m253kwsqc5a83cfc990n6fgw5")))) + (build-system haskell-build-system) + (arguments + `(#:tests? #f)) ; FIXME: Test-Suite `spec` fails. + (inputs + `(("ghc-async" ,ghc-async) + ("ghc-auto-update" ,ghc-auto-update) + ("ghc-blaze-builder" ,ghc-blaze-builder) + ("ghc-bytestring-builder" ,ghc-bytestring-builder) + ("ghc-case-insensitive" ,ghc-case-insensitive) + ("ghc-hashable" ,ghc-hashable) + ("ghc-http-types" ,ghc-http-types) + ("ghc-iproute" ,ghc-iproute) + ("ghc-network" ,ghc-network) + ("ghc-stm" ,ghc-stm) + ("ghc-streaming-commons" ,ghc-streaming-commons) + ("ghc-text" ,ghc-text) + ("ghc-unix-compat" ,ghc-unix-compat) + ("ghc-vault" ,ghc-vault) + ("ghc-wai" ,ghc-wai) + ("ghc-word8" ,ghc-word8) + ("ghc-lifted-base" ,ghc-lifted-base) + ("ghc-http-date" ,ghc-http-date) + ("ghc-simple-sendfile" ,ghc-simple-sendfile) + ("ghc-http2" ,ghc-http2))) + (native-inputs + `(("ghc-silently" ,ghc-silently) + ("ghc-hspec" ,ghc-hspec) + ("ghc-auto-update" ,ghc-auto-update) + ("ghc-doctest" ,ghc-doctest) + ("ghc-quickcheck" ,ghc-quickcheck) + ("ghc-hunit" ,ghc-hunit) + ("ghc-http" ,ghc-http) + ("hspec-discover" ,hspec-discover))) + (home-page "http://github.com/yesodweb/wai") + (synopsis "HTTP server library for Haskell's WAI") + (description "Warp is a server library for HTTP/1.x and HTTP/2 +based WAI (Web Application Interface in Haskell).") + (license license:expat))) + +(define-public ghc-warp-tls + (package + (name "ghc-warp-tls") + (version "3.2.3") + (source + (origin + (method url-fetch) + (uri (string-append "https://hackage.haskell.org/package/" + "warp-tls-" version "/" + "warp-tls-" version ".tar.gz")) + (sha256 + (base32 + "14m2bzk5ivz9gdpxlcj6qnh46f2lycm1ybdjnfkj2876zrqwii7m")))) + (build-system haskell-build-system) + (inputs + `(("ghc-cryptonite" ,ghc-cryptonite) + ("ghc-data-default-class" ,ghc-data-default-class) + ("ghc-network" ,ghc-network) + ("ghc-streaming-commons" ,ghc-streaming-commons) + ("ghc-tls" ,ghc-tls) + ("ghc-wai" ,ghc-wai) + ("ghc-warp" ,ghc-warp))) + (home-page "http://github.com/yesodweb/wai") + (synopsis "SSL/TLS support for Warp") + (description "This package provides SSL/TLS support for Warp, +a WAI handler, via the native Haskell TLS implementation.") + (license license:expat))) + +(define-public ghc-http-conduit + (package + (name "ghc-http-conduit") + (version "2.2.3.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://hackage.haskell.org/package/" + "http-conduit-" version "/" "http-conduit-" + version ".tar.gz")) + (sha256 (base32 + "03na2nbm9la0shlijvjyb5mpp1prfskk4jmjy8iz707r0731dbjk")))) + (build-system haskell-build-system) + ;; FIXME: `httpLbs TLS` in test-suite `test` fails with + ;; ConnectionFailure getProtocolByName: does not exist (no such protocol + ;; name: tcp) + (arguments `(#:tests? #f)) + (inputs + `(("ghc-aeson" ,ghc-aeson) + ("ghc-resourcet" ,ghc-resourcet) + ("ghc-conduit" ,ghc-conduit) + ("ghc-conduit-extra" ,ghc-conduit-extra) + ("ghc-http-types" ,ghc-http-types) + ("ghc-lifted-base" ,ghc-lifted-base) + ("ghc-http-client" ,ghc-http-client) + ("ghc-http-client-tls" ,ghc-http-client-tls) + ("ghc-monad-control" ,ghc-monad-control) + ("ghc-mtl" ,ghc-mtl) + ("ghc-exceptions" ,ghc-exceptions))) + (native-inputs + `(("ghc-hunit" ,ghc-hunit) + ("ghc-hspec" ,ghc-hspec) + ("ghc-data-default-class" ,ghc-data-default-class) + ("ghc-connection" ,ghc-connection) + ("ghc-warp-tls" ,ghc-warp-tls) + ("ghc-blaze-builder" ,ghc-blaze-builder) + ("ghc-text" ,ghc-text) + ("ghc-conduit" ,ghc-conduit) + ("ghc-utf8-string" ,ghc-utf8-string) + ("ghc-case-insensitive" ,ghc-case-insensitive) + ("ghc-lifted-base" ,ghc-lifted-base) + ("ghc-network" ,ghc-network) + ("ghc-wai" ,ghc-wai) + ("ghc-warp" ,ghc-warp) + ("ghc-wai-conduit" ,ghc-wai-conduit) + ("ghc-http-types" ,ghc-http-types) + ("ghc-http-client" ,ghc-http-client) + ("ghc-cookie" ,ghc-cookie) + ("ghc-conduit-extra" ,ghc-conduit-extra) + ("ghc-streaming-commons" ,ghc-streaming-commons) + ("ghc-aeson" ,ghc-aeson) + ("ghc-temporary" ,ghc-temporary) + ("ghc-resourcet" ,ghc-resourcet))) + (home-page "https://hackage.haskell.org/package/http-conduit") + (synopsis "HTTP/HTTPS client with conduit interface") + (description "This library uses attoparsec for parsing the actual +contents of the HTTP connection. It also provides higher-level functions +which allow you to avoid direct usage of conduits.") + (license license:bsd-3))) + ;;; haskell.scm ends here diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 317b1a0a30..7c4a18a4af 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -415,7 +415,7 @@ (define-public libwmf (define-public leptonica (package (name "leptonica") - (version "1.74.0") + (version "1.74.4") (source (origin (method url-fetch) @@ -424,7 +424,7 @@ (define-public leptonica ".tar.gz")) (file-name (string-append "leptonica-" version ".tar.gz")) (sha256 - (base32 "0i2a4vx9gizki0wgmv03xjz8j9d8agkvbag1a8m4kcw4asd4p87g")))) + (base32 "10pw7pwccd0m0fc9rlrr2m41s7j1qvba2wcrav17pw1gclkf34i0")))) (build-system gnu-build-system) (native-inputs `(("gnuplot" ,gnuplot) ;needed for test suite @@ -850,16 +850,18 @@ (define-public libmng (define-public exiv2 (package (name "exiv2") - (version "0.25") + (version "0.26") (source (origin (method url-fetch) - (uri (list (string-append "http://www.exiv2.org/exiv2-" + (uri (list (string-append "http://www.exiv2.org/builds/exiv2-" + version "-trunk.tar.gz") + (string-append "http://www.exiv2.org/exiv2-" version ".tar.gz") (string-append "https://fossies.org/linux/misc/exiv2-" version ".tar.gz"))) (sha256 (base32 - "197g6vgcpyf9p2cwn5p5hb1r714xsk1v4p96f5pv1z8mi9vzq2y8")))) + "1hsdzlzgkipprqh93yj81mrckl2l7c2mn2i84691pallnjz5qqhc")))) (build-system gnu-build-system) (arguments '(#:tests? #f)) ; no `check' target (propagated-inputs diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 9a129b8d91..7bdf97f98a 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -51,10 +51,12 @@ (define-module (gnu packages java) #:use-module (gnu packages guile) #:use-module (gnu packages icu4c) #:use-module (gnu packages image) + #:use-module (gnu packages libffi) #:use-module (gnu packages linux) ;alsa #:use-module (gnu packages wget) #:use-module (gnu packages pkg-config) #:use-module (gnu packages perl) + #:use-module (gnu packages popt) #:use-module (gnu packages kerberos) #:use-module (gnu packages xml) #:use-module (gnu packages xorg) @@ -160,8 +162,22 @@ (define sablevm "1jyg4bsym6igz94wps5443c7wiwlzinqzkchcw972nz4kf1cql6g")))) (build-system gnu-build-system) (arguments - `(#:phases + `(#:configure-flags + (list "--with-internal-libffi=no" + "--with-internal-libpopt=no") + #:phases (modify-phases %standard-phases + (add-after 'unpack 'remove-timestamp-for-reproducibility + (lambda _ + (substitute* "src/sablevm/Makefile.in" + (("\\$\\(SVMCOMPILETIME\\)") "(unknown)")) + #t)) + (add-after 'unpack 'link-with-popt + (lambda _ + (substitute* "src/sablevm/Makefile.in" + (("\\$\\(SVMADD\\)" match) + (string-append match " -lpopt"))) + #t)) (add-after 'unpack 'patch-path-to-classpath (lambda* (#:key inputs #:allow-other-keys) (substitute* "Makefile.in" @@ -179,7 +195,9 @@ (define sablevm (inputs `(("classpath" ,sablevm-classpath) ("jikes" ,jikes) - ("zlib" ,zlib))) + ("zlib" ,zlib) + ("popt" ,popt) + ("libffi" ,libffi))) (native-inputs `(("libltdl" ,libltdl))) (home-page "http://sablevm.org/") diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm index a5ad8da062..0a416148cb 100644 --- a/gnu/packages/kde.scm +++ b/gnu/packages/kde.scm @@ -39,7 +39,7 @@ (define-module (gnu packages kde) (define-public kdevelop (package (name "kdevelop") - (version "5.1.0") + (version "5.1.1") (source (origin (method url-fetch) @@ -48,7 +48,7 @@ (define-public kdevelop version ".tar.xz")) (sha256 (base32 - "1s4cbkx2a0p73b52yxmf5dhv08xk9pxgrkjsnbzy76ssfr545g60")))) + "0m6pnmylp1gij5cr75waz8hjry5894qillj5977h467hnbzs808a")))) (build-system cmake-build-system) (native-inputs `(("extra-cmake-modules" ,extra-cmake-modules) @@ -100,6 +100,7 @@ (define-public kdevelop (kio (assoc-ref inputs "kio")) (kcmutils (assoc-ref inputs "kcmutils")) (qtquickcontrols (assoc-ref inputs "qtquickcontrols")) + (qtbase (assoc-ref inputs "qtbase")) (qtdeclarative (assoc-ref inputs "qtdeclarative")) (profile "$HOME/.guix-profile") (qml "/qml")) @@ -107,6 +108,8 @@ (define-public kdevelop `("XDG_DATA_DIRS" ":" prefix ,(map (lambda (s) (string-append s "/share")) (list profile out kdevplatform kcmutils))) + `("QT_QPA_PLATFORM_PLUGIN_PATH" ":" = + (,(string-append qtbase "/plugins/platforms"))) `("QT_PLUGIN_PATH" ":" prefix ,(map (lambda (s) (string-append s "/lib/plugins")) (list profile out kdevplatform kio))) @@ -148,7 +151,7 @@ (define-public kdevelop-pg-qt (define-public kdevplatform (package (name "kdevplatform") - (version "5.1.0") + (version "5.1.1") (source (origin (method url-fetch) (uri (string-append "mirror://kde/stable/kdevelop" @@ -156,7 +159,7 @@ (define-public kdevplatform version ".tar.xz")) (sha256 (base32 - "1nxf66vk6p7lmckdsha9fpq3zchwbg79qhy49f4hndlxgj03p7zh")))) + "09p7lvniw55g6x8v8wl3azlps8c13yx03x1m9cd3qdxi282l8n9i")))) (build-system cmake-build-system) (native-inputs `(("extra-cmake-modules" ,extra-cmake-modules) diff --git a/gnu/packages/ldc.scm b/gnu/packages/ldc.scm index 59036a5315..5707b9476b 100644 --- a/gnu/packages/ldc.scm +++ b/gnu/packages/ldc.scm @@ -77,105 +77,105 @@ (define-public rdmd (license license:boost1.0))) (define-public ldc-bootstrap - (package - (name "ldc") - (version "0.17.3") - (source (origin - (method url-fetch) - (uri (string-append - "https://github.com/ldc-developers/ldc/archive/v" - version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "135rgwwk82ccqp4n3fhqz4696jmvip90fg5ql2kccq5h1r71gb82")))) - (build-system cmake-build-system) - (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux")) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'unpack-submodule-sources - (lambda* (#:key inputs #:allow-other-keys) - (let ((unpack (lambda (source target) - (with-directory-excursion target - (zero? (system* "tar" "xvf" - (assoc-ref inputs source) - "--strip-components=1")))))) - (and (unpack "phobos-src" "runtime/phobos") - (unpack "druntime-src" "runtime/druntime") - (unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite"))))) - (add-after 'unpack-submodule-sources 'patch-dmd2 - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "dmd2/root/port.c" - ((" ::isnan") " isnan") - ((" ::isinf") " isinf") - (("#undef isnan") "") - (("#undef isinf") "")) - #t)) - (add-after 'unpack-submodule-sources 'patch-phobos - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "runtime/phobos/std/process.d" - (("/bin/sh") (which "sh")) - (("echo") (which "echo"))) - (substitute* "runtime/phobos/std/datetime.d" - (("/usr/share/zoneinfo/") - (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))) - (substitute* "tests/d2/dmd-testsuite/Makefile" - (("/bin/bash") (which "bash"))) - ;; FIXME: this test cannot be linked. - (delete-file "tests/d2/dmd-testsuite/runnable/cppa.d") - #t))))) - (inputs - `(("libconfig" ,libconfig) - ("libedit" ,libedit) - ("tzdata" ,tzdata) - ("zlib" ,zlib))) - (native-inputs - `(("llvm" ,llvm) - ("clang" ,clang) - ("python-lit" ,python-lit) - ("python-wrapper" ,python-wrapper) - ("unzip" ,unzip) - ("phobos-src" - ,(origin - (method url-fetch) - (uri (string-append - "https://github.com/ldc-developers/phobos/archive/ldc-v" - version ".tar.gz")) - (sha256 - (base32 - "0qywnvnp019mmmr74aw90ir9f03iz0hc7cgzna609agsar0b27jl")) - (patches (search-patches "ldc-disable-tests.patch")))) - ("druntime-src" - ,(origin - (method url-fetch) - (uri (string-append - "https://github.com/ldc-developers/druntime/archive/ldc-v" - version ".tar.gz")) - (sha256 - (base32 - "0z418n6x2fxac07sxpi4rl69069qiym4w6r9sjppn91q58qh8hjs")))) - ("dmd-testsuite-src" - ,(origin - (method url-fetch) - (uri (string-append - "https://github.com/ldc-developers/dmd-testsuite/archive/ldc-v" - version ".tar.gz")) - (sha256 - (base32 - "196mkfax5y3yqm3gz7jhqhnkjwrvr2m4a8nc9k41l0511ldzsk9x")))))) - (home-page "http://wiki.dlang.org/LDC") - (synopsis "LLVM compiler for the D programming language") - (description - "LDC is a compiler for the D programming language. It is based on the + (let ((runtime-version "0.17.3")) + (package + (name "ldc") + (version "0.17.4") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/ldc/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1kw0j378k6bh0k66dvx99bjq8ilp8bb24w3jrmibn8rhmqv0d5q8")))) + (build-system cmake-build-system) + (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux")) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-submodule-sources + (lambda* (#:key inputs #:allow-other-keys) + (let ((unpack (lambda (source target) + (with-directory-excursion target + (zero? (system* "tar" "xvf" + (assoc-ref inputs source) + "--strip-components=1")))))) + (and (unpack "phobos-src" "runtime/phobos") + (unpack "druntime-src" "runtime/druntime") + (unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite"))))) + (add-after 'unpack-submodule-sources 'patch-dmd2 + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "dmd2/root/port.c" + ((" ::isnan") " isnan") + ((" ::isinf") " isinf") + (("#undef isnan") "") + (("#undef isinf") "")) + #t)) + (add-after 'unpack-submodule-sources 'patch-phobos + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "runtime/phobos/std/process.d" + (("/bin/sh") (which "sh")) + (("echo") (which "echo"))) + (substitute* "runtime/phobos/std/datetime.d" + (("/usr/share/zoneinfo/") + (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))) + (substitute* "tests/d2/dmd-testsuite/Makefile" + (("/bin/bash") (which "bash"))) + ;; FIXME: this test cannot be linked. + (delete-file "tests/d2/dmd-testsuite/runnable/cppa.d") + #t))))) + (inputs + `(("libconfig" ,libconfig) + ("libedit" ,libedit) + ("tzdata" ,tzdata) + ("zlib" ,zlib))) + (native-inputs + `(("llvm" ,llvm) + ("clang" ,clang) + ("python-lit" ,python-lit) + ("python-wrapper" ,python-wrapper) + ("unzip" ,unzip) + ("phobos-src" + ,(origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/phobos/archive/ldc-v" + runtime-version ".tar.gz")) + (sha256 + (base32 + "0qywnvnp019mmmr74aw90ir9f03iz0hc7cgzna609agsar0b27jl")) + (patches (search-patches "ldc-disable-tests.patch")))) + ("druntime-src" + ,(origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/druntime/archive/ldc-v" + runtime-version ".tar.gz")) + (sha256 + (base32 + "0z418n6x2fxac07sxpi4rl69069qiym4w6r9sjppn91q58qh8hjs")))) + ("dmd-testsuite-src" + ,(origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/dmd-testsuite/archive/ldc-v" + runtime-version ".tar.gz")) + (sha256 + (base32 + "196mkfax5y3yqm3gz7jhqhnkjwrvr2m4a8nc9k41l0511ldzsk9x")))))) + (home-page "http://wiki.dlang.org/LDC") + (synopsis "LLVM compiler for the D programming language") + (description + "LDC is a compiler for the D programming language. It is based on the latest DMD frontend and uses LLVM as backend.") - ;; Most of the code is released under BSD-3, except for code originally - ;; written for GDC, which is released under GPLv2+, and the DMD frontend, - ;; which is released under the "Boost Software License version 1.0". - (license (list license:bsd-3 - license:gpl2+ - license:boost1.0)))) - + ;; Most of the code is released under BSD-3, except for code originally + ;; written for GDC, which is released under GPLv2+, and the DMD frontend, + ;; which is released under the "Boost Software License version 1.0". + (license (list license:bsd-3 + license:gpl2+ + license:boost1.0))))) (define-public ldc ;; The phobos, druntime and dmd-testsuite dependencies do not have a newer diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm index 42e47a5109..809e28e27b 100644 --- a/gnu/packages/libreoffice.scm +++ b/gnu/packages/libreoffice.scm @@ -584,14 +584,15 @@ (define-public libodfgen (define-public libmwaw (package (name "libmwaw") - (version "0.3.5") + (version "0.3.11") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/" name "/" name "/" name "-" version "/" name "-" version ".tar.xz")) + (patches (search-patches "libmwaw-CVE-2017-9433.patch")) (sha256 (base32 - "1vx9h419fcfcs0yj071hsg9d2qvkacgca6052m8hv3h743cdmzil")))) + "16i9s9p4sjpdpbm3gq6jkc9r3nyfy47ggkdlgh7vr0mydccklj2b")))) (build-system gnu-build-system) (native-inputs `(("doxygen" ,doxygen) diff --git a/gnu/packages/lighting.scm b/gnu/packages/lighting.scm index 5f816dc54b..7f01cdbc99 100644 --- a/gnu/packages/lighting.scm +++ b/gnu/packages/lighting.scm @@ -36,7 +36,7 @@ (define-module (gnu packages lighting) (define-public ola (package (name "ola") - (version "0.10.3") + (version "0.10.4") (source (origin (method url-fetch) (uri (string-append @@ -45,7 +45,7 @@ (define-public ola (patches (search-patches "ola-readdir-r.patch")) (sha256 (base32 - "1yf1yy9n64n73zjq2bwc0gik0dd3n05297hdrrma2qvb0imzm5h1")))) + "01zpm0vpin784jyjhbdad097a4i0cjdfrqqfbsvx47d6nbssq2my")))) (build-system gnu-build-system) (native-inputs `(("bison" ,bison) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 8e17f29581..f7e6853b62 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -358,8 +358,8 @@ (define* (make-linux-libre version hash supported-systems (define %intel-compatible-systems '("x86_64-linux" "i686-linux")) -(define %linux-libre-version "4.11.4") -(define %linux-libre-hash "11nd9pv18vz3g82ja71dkz9mbs0ffb8yamsd44d381szmmm2kpj8") +(define %linux-libre-version "4.11.6") +(define %linux-libre-hash "0xay0m2a4la8aqc8ai8zqfh1c1i6sjgh0dywm7nis0g1gqirwrds") (define-public linux-libre (make-linux-libre %linux-libre-version @@ -368,32 +368,22 @@ (define-public linux-libre #:configuration-file kernel-config)) (define-public linux-libre-4.9 - (make-linux-libre "4.9.31" - "0amc35c9f2rym6grb277yscnx8ybn8d4fbc2a59sgkg1lsdv7n4q" + (make-linux-libre "4.9.33" + "1dam6vqymhlx1vsl0lzxphamiifgyf97snxg18b2czqq402nz094" %intel-compatible-systems #:configuration-file kernel-config)) (define-public linux-libre-4.4 - (make-linux-libre "4.4.71" - "0nrd165crx9m9s1px98if6q5dcdqwmas9kh8i4rw51gz2xinh0gx" + (make-linux-libre "4.4.73" + "144ssqw1dr86z4cgl797pq5rggfibsxqk7wmfbl6j92l1cj6yjrz" %intel-compatible-systems #:configuration-file kernel-config)) (define-public linux-libre-4.1 - (make-linux-libre "4.1.40" - "0ygc5qaxwd4yxyzyq6qya9w111q24xqzxd33x73pmg3hr7asvy4x" + (make-linux-libre "4.1.41" + "02mqfl899jxvrmxlh8lvcgvm3klwd8wbsdz4rr2gpchbggj4vgb2" %intel-compatible-systems - #:configuration-file kernel-config - #:patches - (list %boot-logo-patch - (origin - (method url-fetch) - (uri "\ -https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/?id=5edabca9d4cff7f1f2b68f0bac55ef99d9798ba4") - (file-name "linux-libre-CVE-2017-6074.patch") - (sha256 - (base32 - "1x40slfz1qxgiaznyy13bwlh34450pkyyrkljpyjlx6c4mrzb1jj")))))) + #:configuration-file kernel-config)) (define-public linux-libre-arm-generic (make-linux-libre %linux-libre-version @@ -3387,14 +3377,14 @@ (define-public module-init-tools (define-public mcelog (package (name "mcelog") - (version "152") + (version "153") (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 - "0df1kbiw1pl84l6b9g515lpk5a81hmy8r27yakr4hrmi2vwzdfh6")) + "0q40d60p1klzg0aznvxhxgjlddwcxfj2q59s4q86sf9ild6rcdhl")) (file-name (string-append name "-" version ".tar.gz")) (modules '((guix build utils))) (snippet @@ -3960,10 +3950,11 @@ (define-public proot ;; build currently.) (system* "make" "-C" "src" "install" (string-append "PREFIX=" out))) - (begin - (install-file "doc/proot/man.1" - (string-append out "/share" - "/man/man1")) + (let ((man1 (string-append out + "/share/man/man1"))) + (mkdir-p man1) + (copy-file "doc/proot/man.1" + (string-append man1 "/proot.1")) #t)))))))) (native-inputs `(("which" ,which) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 02a4f26022..f4003d7391 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -15,7 +15,7 @@ ;;; Copyright © 2016 Lukas Gradl ;;; Copyright © 2016 Alex Kost ;;; Copyright © 2016 Troy Sankey -;;; Copyright © 2016, 2017 ng0 +;;; Copyright © 2016, 2017 ng0 ;;; Copyright © 2016 Clément Lassieur ;;; Copyright © 2016, 2017 Arun Isaac ;;; Copyright © 2016 John Darrington @@ -265,7 +265,7 @@ (define-public neomutt (package (inherit mutt) (name "neomutt") - (version "20170602") + (version "20170609") (source (origin (method url-fetch) @@ -273,7 +273,7 @@ (define-public neomutt "/archive/" name "-" version ".tar.gz")) (sha256 (base32 - "1kzhkz8bdqbdh5b6pzqb6ikp8d3nsic906b5pkmi6qlaga32yxjk")))) + "1kdhnhdlv84v6brhqgh8g0h6cpcbwfc59b4g09zkkgqc4fnggapy")))) (inputs `(("cyrus-sasl" ,cyrus-sasl) ("gdbm" ,gdbm) @@ -296,10 +296,7 @@ (define-public neomutt ("pkg-config" ,pkg-config))) (arguments `(#:configure-flags - (list "--enable-smtp" - "--enable-imap" - "--enable-pop" - "--enable-gpgme" + (list "--enable-gpgme" ;; database, implies header caching "--without-tokyocabinet" @@ -325,8 +322,6 @@ (define-public neomutt "--with-mailpath=/var/mail" "--with-external-dotlock" - "--enable-nntp" - "--enable-compressed" (string-append "--with-curses=" (assoc-ref %build-inputs "ncurses"))) diff --git a/gnu/packages/mate.scm b/gnu/packages/mate.scm index a39cd25d30..316385a6f8 100644 --- a/gnu/packages/mate.scm +++ b/gnu/packages/mate.scm @@ -37,7 +37,7 @@ (define-module (gnu packages mate) (define-public mate-icon-theme (package (name "mate-icon-theme") - (version "1.16.0") + (version "1.18.2") (source (origin (method url-fetch) (uri (string-append "http://pub.mate-desktop.org/releases/" @@ -45,7 +45,7 @@ (define-public mate-icon-theme name "-" version ".tar.xz")) (sha256 (base32 - "1zldw22p1i76iss8car39pmfagpfxxlfk1fdhvr4x5r6gf36gv7d")))) + "0si3li3kza7s45zhasjvqn5f85zpkn0x8i4kq1dlnqvjjqzkg4ch")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) @@ -92,7 +92,7 @@ (define-public mate-themes (define-public mate-desktop (package (name "mate-desktop") - (version "1.16.1") + (version "1.18.0") (source (origin (method url-fetch) (uri (string-append "http://pub.mate-desktop.org/releases/" @@ -100,11 +100,8 @@ (define-public mate-desktop name "-" version ".tar.xz")) (sha256 (base32 - "1pzncfgrzp2mp9407ivk1113hkadpf110blr058h31jkwsk8syjq")))) + "12iv2y4dan962fs7vkkxbjkp77pbvjnwfa43ggr0zkdsc3ydjbbg")))) (build-system gnu-build-system) - (arguments - `(#:configure-flags '("--with-gtk=3.0" - "--enable-mpaste"))) (native-inputs `(("pkg-config" ,pkg-config) ("intltool" ,intltool) @@ -115,7 +112,6 @@ (define-public mate-desktop (inputs `(("gtk+" ,gtk+) ("libxrandr" ,libxrandr) - ("python2" ,python-2) ("startup-notification" ,startup-notification))) (propagated-inputs `(("dconf" ,dconf))) ; mate-desktop-2.0.pc @@ -129,7 +125,7 @@ (define-public mate-desktop (define-public libmateweather (package (name "libmateweather") - (version "1.16.1") + (version "1.18.1") (source (origin (method url-fetch) (uri (string-append "http://pub.mate-desktop.org/releases/" @@ -137,14 +133,13 @@ (define-public libmateweather name "-" version ".tar.xz")) (sha256 (base32 - "0w1b8b1ckmkbvwnqi9yh2lwbskzhz99s5yxdkar5xiqylnjrwmm3")))) + "0z6vfh42fv9rqjrraqfpf6h9nd9h662bxy3l3r48j19xvxrwmx3a")))) (build-system gnu-build-system) (arguments `(#:configure-flags - `("--with-gtk=3.0" - ,(string-append "--with-zoneinfo-dir=" - (assoc-ref %build-inputs "tzdata") - "/share/zoneinfo")) + (list (string-append "--with-zoneinfo-dir=" + (assoc-ref %build-inputs "tzdata") + "/share/zoneinfo")) #:phases (modify-phases %standard-phases (add-before @@ -178,7 +173,7 @@ (define-public libmateweather (define-public mate-menus (package (name "mate-menus") - (version "1.16.0") + (version "1.18.0") (source (origin (method url-fetch) (uri (string-append "http://pub.mate-desktop.org/releases/" @@ -186,7 +181,7 @@ (define-public mate-menus name "-" version ".tar.xz")) (sha256 (base32 - "0crw07iszwsqk54y8znfqdgfz76rjdz8992v4q9kpwwlrl11xmc5")))) + "05kyr37xqv6hm1rlvnqd5ng0x1n883brqynkirkk5drl56axnz7h")))) (build-system gnu-build-system) (arguments `(#:phases diff --git a/gnu/packages/mpd.scm b/gnu/packages/mpd.scm index 1ed8e967ef..11ca2d1979 100644 --- a/gnu/packages/mpd.scm +++ b/gnu/packages/mpd.scm @@ -75,7 +75,7 @@ (define-public libmpdclient (define-public mpd (package (name "mpd") - (version "0.20.6") + (version "0.20.9") (source (origin (method url-fetch) (uri @@ -84,7 +84,7 @@ (define-public mpd "/mpd-" version ".tar.xz")) (sha256 (base32 - "0isbpa79m7zf09w3s1ry638cw96rxasy1ch66zl01k75i48mw1gl")))) + "1dsfwd0i81x8m9idi7idm9612mpf1g5lzcy69h04nd9jks3a4xyd")))) (build-system gnu-build-system) (arguments `(#:phases diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index 57a02e9f4a..5d1c432da3 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2016, 2017 Pjotr Prins ;;; Copyright © 2017 Mathieu Othacehe ;;; Copyright © 2017 Leo Famulari +;;; Copyright © 2017 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -31,12 +32,12 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages networking) - #:use-module (guix build-system perl) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system gnu) + #:use-module (guix build-system perl) #:use-module (guix build-system python) #:use-module (gnu packages) #:use-module (gnu packages admin) @@ -64,7 +65,8 @@ (define-module (gnu packages networking) #:use-module (gnu packages python) #:use-module (gnu packages textutils) #:use-module (gnu packages tls) - #:use-module (gnu packages valgrind)) + #:use-module (gnu packages valgrind) + #:use-module (ice-9 match)) (define-public macchanger (package @@ -433,7 +435,7 @@ (define-public iodine (define-public whois (package (name "whois") - (version "5.2.15") + (version "5.2.16") (source (origin (method url-fetch) @@ -441,7 +443,7 @@ (define-public whois name "_" version ".tar.xz")) (sha256 (base32 - "123ingf699javzh8qm6ny10nl28zbjzasa4k5pcn0qzw1dlnnnks")))) + "0fpwac26ja0rdqsbxyjcsk8gxgixfpxk0baj3rhnpaff3jv0ilp9")))) (build-system gnu-build-system) ;; TODO: unbundle mkpasswd binary + its po files. (arguments @@ -634,7 +636,12 @@ (define-public aircrack-ng "libnl=true" "pcre=true" "experimental=true" ;build wesside-ng, etc. - "AVX2FLAG=N" "AVX1FLAG=N" "SSEFLAG=Y" + "AVX2FLAG=N" "AVX1FLAG=N" + ,,@(match (%current-system) + ((or "x86_64-linux" "i686-linux") + `("SSEFLAG=Y")) + (_ + `("NEWSSE=false"))) ,(string-append "prefix=" %output)) #:phases (modify-phases %standard-phases (delete 'configure) ;no configure phase diff --git a/gnu/packages/patches/crawl-upgrade-saves.patch b/gnu/packages/patches/crawl-upgrade-saves.patch new file mode 100644 index 0000000000..301942dc30 --- /dev/null +++ b/gnu/packages/patches/crawl-upgrade-saves.patch @@ -0,0 +1,83 @@ +Store the crawl version in the textdatabases in SAVEDIR and +upgrade the databases when the crawl version changes. + +By default crawl checks for a mtime difference on files in DATADIR to see if an +upgrade is required, but guix nulls all file dates, +and crawl would never upgrade saves. + +--- a/source/database.cc 2016-05-31 09:56:08.000000000 +0200 ++++ a/source/database.cc 2017-06-05 03:00:19.270632107 +0200 +@@ -25,6 +25,7 @@ + #include "syscalls.h" + #include "threads.h" + #include "unicode.h" ++#include "version.h" + + // TextDB handles dependency checking the db vs text files, creating the + // db, loading, and destroying the DB. +@@ -55,6 +56,7 @@ + vector _input_files; + DBM* _db; + string timestamp; ++ string version; + TextDB *_parent; + const char* lang() { return _parent ? Options.lang_name : 0; } + public: +@@ -165,7 +167,7 @@ + + TextDB::TextDB(const char* db_name, const char* dir, ...) + : _db_name(db_name), _directory(dir), +- _db(nullptr), timestamp(""), _parent(0), translation(0) ++ _db(nullptr), timestamp(""), version(""), _parent(0), translation(0) + { + va_list args; + va_start(args, dir); +@@ -187,7 +189,7 @@ + : _db_name(parent->_db_name), + _directory(parent->_directory + Options.lang_name + "/"), + _input_files(parent->_input_files), // FIXME: pointless copy +- _db(nullptr), timestamp(""), _parent(parent), translation(nullptr) ++ _db(nullptr), timestamp(""), version(""), _parent(parent), translation(nullptr) + { + } + +@@ -202,6 +204,9 @@ + return false; + + timestamp = _query_database(*this, "TIMESTAMP", false, false, true); ++ version = _query_database(*this, "VERSION", false, false, true); ++ if (version.empty()) ++ return false; + if (timestamp.empty()) + return false; + +@@ -245,6 +250,9 @@ + string ts; + bool no_files = true; + ++ if (string(Version::Long) != version) ++ return true; ++ + for (const string &file : _input_files) + { + string full_input_path = _directory + file; +@@ -261,7 +269,7 @@ + ts += buf; + } + +- if (no_files && timestamp.empty()) ++ if (no_files && timestamp.empty() && version.empty()) + { + // No point in empty databases, although for simplicity keep ones + // for disappeared translations for now. +@@ -321,7 +329,10 @@ + _store_text_db(full_input_path, _db); + } + } ++ ++ string current_version = string(Version::Long); + _add_entry(_db, "TIMESTAMP", ts); ++ _add_entry(_db, "VERSION", current_version); + + dbm_close(_db); + _db = 0; diff --git a/gnu/packages/patches/gcc-4.6-gnu-inline.patch b/gnu/packages/patches/gcc-4.6-gnu-inline.patch new file mode 100644 index 0000000000..710d358a8b --- /dev/null +++ b/gnu/packages/patches/gcc-4.6-gnu-inline.patch @@ -0,0 +1,65 @@ +This patch was taken from https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00375.html. +It is used by propeller-gcc-4. + +Since the 3.0.3 release of gperf (made in May 2007), the generated func +has had the gnu_inline attribute applied to it. The gcc source however +has not been updated to include that which has lead to a mismatch. + +In practice, this hasn't been an issue for two reasons: +(1) Before gcc-5, the default standard was (gnu) C89, and gcc does not +warn or throw an error in this mode. +(2) Starting with gcc-4.8, the compiler driver used to build gcc was +changed to C++, and g++ does not warn or throw an error in this mode. + +This error does show up though when using gcc-5 to build gcc-4.7 or +older as then the default is (gnu) C11 and the C compiler driver is +used. That failure looks like: +In file included from .../gcc-4.7.4/gcc/cp/except.c:990:0: +cfns.gperf: At top level: +cfns.gperf:101:1: error: 'gnu_inline' attribute present on 'libc_name_p' +cfns.gperf:26:14: error: but not here + +Whether the compiler should always emit this error regardless of the +active standard or compiler driver is debatable (I think it should be +consistent -- either always do it or never do it). + +2015-08-06 Mike Frysinger + + * cfns.gperf [__GNUC__, __GNUC_STDC_INLINE__]: Apply the + __gnu_inline__ attribute. + * cfns.h: Regenerated. +--- + gcc/cp/cfns.gperf | 3 +++ + gcc/cp/cfns.h | 3 +++ + 2 files changed, 6 insertions(+) + +diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf +index 68acd3d..953262f 100644 +--- a/gcc/cp/cfns.gperf ++++ b/gcc/cp/cfns.gperf +@@ -22,6 +22,9 @@ __inline + static unsigned int hash (const char *, unsigned int); + #ifdef __GNUC__ + __inline ++#ifdef __GNUC_STDC_INLINE__ ++__attribute__ ((__gnu_inline__)) ++#endif + #endif + const char * libc_name_p (const char *, unsigned int); + %} +diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h +index 1c6665d..6d00c0e 100644 +--- a/gcc/cp/cfns.h ++++ b/gcc/cp/cfns.h +@@ -53,6 +53,9 @@ __inline + static unsigned int hash (const char *, unsigned int); + #ifdef __GNUC__ + __inline ++#ifdef __GNUC_STDC_INLINE__ ++__attribute__ ((__gnu_inline__)) ++#endif + #endif + const char * libc_name_p (const char *, unsigned int); + /* maximum key range = 391, duplicates = 0 */ +-- +2.4.4 diff --git a/gnu/packages/patches/gspell-dash-test.patch b/gnu/packages/patches/gspell-dash-test.patch index e737921c4b..1c9d77cfba 100644 --- a/gnu/packages/patches/gspell-dash-test.patch +++ b/gnu/packages/patches/gspell-dash-test.patch @@ -1,16 +1,22 @@ 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); - +TODO: Migrate to using hunspell. According to upstream, this bug won't be fixed. +See https://bugzilla.gnome.org/show_bug.cgi?id=772406. +--- a/testsuite/test-checker.c 2017-03-24 09:50:50.000000000 -0400 ++++ b/testsuite/test-checker.c 2017-06-15 21:47:07.116173895 -0400 +@@ -105,10 +105,11 @@ + * be considered deprecated, it is better to use hunspell, so WONTFIX. + * For more details, see: + * https://bugzilla.gnome.org/show_bug.cgi?id=772406 ++ * ++ * 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, "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/guile-ssh-channel-finalization.patch b/gnu/packages/patches/guile-ssh-channel-finalization.patch new file mode 100644 index 0000000000..54b5055a20 --- /dev/null +++ b/gnu/packages/patches/guile-ssh-channel-finalization.patch @@ -0,0 +1,28 @@ +Avoid asynchronous channel finalization, which could lead to segfaults due to +libssh not being thread-safe: . + +--- guile-ssh-0.11.0/modules/ssh/dist/node.scm 2017-06-13 14:37:44.861671297 +0200 ++++ guile-ssh-0.11.0/modules/ssh/dist/node.scm 2017-06-13 14:38:02.841580565 +0200 +@@ -391,11 +391,18 @@ listens on an expected port, return #f o + "Evaluate QUOTED-EXP on the node and return the evaluated result." + (let ((repl-channel (node-open-rrepl node))) + (rrepl-skip-to-prompt repl-channel) +- (call-with-values (lambda () (rrepl-eval repl-channel quoted-exp)) +- (lambda vals +- (and (node-stop-repl-server? node) ++ (dynamic-wind ++ (const #t) ++ (lambda () ++ (rrepl-eval repl-channel quoted-exp)) ++ (lambda () ++ (when (node-stop-repl-server? node) + (node-stop-server node)) +- (apply values vals))))) ++ ++ ;; Close REPL-CHANNEL right away to prevent finalization from ++ ;; happening in another thread at the wrong time (see ++ ;; .) ++ (close-port repl-channel))))) + + (define (node-eval-1 node quoted-exp) + "Evaluate QUOTED-EXP on the node and return the evaluated result. The diff --git a/gnu/packages/patches/libextractor-ffmpeg-3.patch b/gnu/packages/patches/libextractor-ffmpeg-3.patch deleted file mode 100644 index d0f83f624c..0000000000 --- a/gnu/packages/patches/libextractor-ffmpeg-3.patch +++ /dev/null @@ -1,360 +0,0 @@ -Fix build with ffmpeg-3, based on upstream revisions r35548 and r35549 by LRN -and r36975 by Christian Grothoff, and backported to libextractor-1.3 by -Mark H Weaver - ---- libextractor-1.3/src/plugins/thumbnailffmpeg_extractor.c.orig 2013-12-21 11:04:41.000000000 -0500 -+++ libextractor-1.3/src/plugins/thumbnailffmpeg_extractor.c 2016-04-04 23:38:46.429041081 -0400 -@@ -59,6 +59,12 @@ - #include - #endif - -+#ifdef PIX_FMT_RGB24 -+#define PIX_OUTPUT_FORMAT PIX_FMT_RGB24 -+#else -+#define PIX_OUTPUT_FORMAT AV_PIX_FMT_RGB24 -+#endif -+ - /** - * Set to 1 to enable debug output. - */ -@@ -153,7 +159,7 @@ - static size_t - create_thumbnail (int src_width, int src_height, - int src_stride[], -- enum PixelFormat src_pixfmt, -+ enum AVPixelFormat src_pixfmt, - const uint8_t * const src_data[], - int dst_width, int dst_height, - uint8_t **output_data, -@@ -189,7 +195,8 @@ - if (NULL == - (scaler_ctx = - sws_getContext (src_width, src_height, src_pixfmt, -- dst_width, dst_height, PIX_FMT_RGB24, -+ dst_width, dst_height, -+ PIX_OUTPUT_FORMAT, - SWS_BILINEAR, NULL, NULL, NULL))) - { - #if DEBUG -@@ -199,7 +206,12 @@ - return 0; - } - -- if (NULL == (dst_frame = avcodec_alloc_frame ())) -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) -+ dst_frame = av_frame_alloc (); -+#else -+ dst_frame = avcodec_alloc_frame(); -+#endif -+ if (NULL == dst_frame) - { - #if DEBUG - fprintf (stderr, -@@ -209,18 +221,24 @@ - return 0; - } - if (NULL == (dst_buffer = -- av_malloc (avpicture_get_size (PIX_FMT_RGB24, dst_width, dst_height)))) -+ av_malloc (avpicture_get_size (PIX_OUTPUT_FORMAT, -+ dst_width, dst_height)))) - { - #if DEBUG - fprintf (stderr, - "Failed to allocate the destination image buffer\n"); - #endif -- av_free (dst_frame); -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) -+ av_frame_free (&dst_frame); -+#else -+ avcodec_free_frame (&dst_frame); -+#endif - sws_freeContext (scaler_ctx); - return 0; - } - avpicture_fill ((AVPicture *) dst_frame, dst_buffer, -- PIX_FMT_RGB24, dst_width, dst_height); -+ PIX_OUTPUT_FORMAT, -+ dst_width, dst_height); - sws_scale (scaler_ctx, - src_data, - src_stride, -@@ -236,7 +254,11 @@ - "Failed to allocate the encoder output buffer\n"); - #endif - av_free (dst_buffer); -- av_free (dst_frame); -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) -+ av_frame_free (&dst_frame); -+#else -+ avcodec_free_frame (&dst_frame); -+#endif - sws_freeContext (scaler_ctx); - return 0; - } -@@ -249,13 +271,17 @@ - #endif - av_free (encoder_output_buffer); - av_free (dst_buffer); -- av_free (dst_frame); -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) -+ av_frame_free (&dst_frame); -+#else -+ avcodec_free_frame (&dst_frame); -+#endif - sws_freeContext (scaler_ctx); - return 0; - } - encoder_codec_ctx->width = dst_width; - encoder_codec_ctx->height = dst_height; -- encoder_codec_ctx->pix_fmt = PIX_FMT_RGB24; -+ encoder_codec_ctx->pix_fmt = PIX_OUTPUT_FORMAT; - opts = NULL; - if (avcodec_open2 (encoder_codec_ctx, encoder_codec, &opts) < 0) - { -@@ -263,10 +289,14 @@ - fprintf (stderr, - "Failed to open the encoder\n"); - #endif -- av_free (encoder_codec_ctx); -+ avcodec_free_context (&encoder_codec_ctx); - av_free (encoder_output_buffer); - av_free (dst_buffer); -- av_free (dst_frame); -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) -+ av_frame_free (&dst_frame); -+#else -+ avcodec_free_frame (&dst_frame); -+#endif - sws_freeContext (scaler_ctx); - return 0; - } -@@ -295,9 +325,13 @@ - cleanup: - av_dict_free (&opts); - avcodec_close (encoder_codec_ctx); -- av_free (encoder_codec_ctx); -+ avcodec_free_context (&encoder_codec_ctx); - av_free (dst_buffer); -- av_free (dst_frame); -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) -+ av_frame_free (&dst_frame); -+#else -+ avcodec_free_frame (&dst_frame); -+#endif - sws_freeContext (scaler_ctx); - *output_data = encoder_output_buffer; - -@@ -406,18 +440,23 @@ - fprintf (stderr, - "Failed to open image codec\n"); - #endif -- av_free (codec_ctx); -+ avcodec_free_context (&codec_ctx); - return; - } - av_dict_free (&opts); -- if (NULL == (frame = avcodec_alloc_frame ())) -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) -+ frame = av_frame_alloc (); -+#else -+ frame = avcodec_alloc_frame(); -+#endif -+ if (NULL == frame) - { - #if DEBUG - fprintf (stderr, - "Failed to allocate frame\n"); - #endif - avcodec_close (codec_ctx); -- av_free (codec_ctx); -+ avcodec_free_context (&codec_ctx); - return; - } - -@@ -441,9 +480,13 @@ - fprintf (stderr, - "Failed to decode a complete frame\n"); - #endif -- av_free (frame); -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) -+ av_frame_free (&frame); -+#else -+ avcodec_free_frame (&frame); -+#endif - avcodec_close (codec_ctx); -- av_free (codec_ctx); -+ avcodec_free_context (&codec_ctx); - return; - } - calculate_thumbnail_dimensions (codec_ctx->width, codec_ctx->height, -@@ -467,9 +510,13 @@ - err); - av_free (encoded_thumbnail); - } -- av_free (frame); -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) -+ av_frame_free (&frame); -+#else -+ avcodec_free_frame (&frame); -+#endif - avcodec_close (codec_ctx); -- av_free (codec_ctx); -+ avcodec_free_context (&codec_ctx); - } - - -@@ -563,7 +610,12 @@ - return; - } - -- if (NULL == (frame = avcodec_alloc_frame ())) -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) -+ frame = av_frame_alloc (); -+#else -+ frame = avcodec_alloc_frame(); -+#endif -+ if (NULL == frame) - { - #if DEBUG - fprintf (stderr, -@@ -616,7 +668,11 @@ - fprintf (stderr, - "Failed to decode a complete frame\n"); - #endif -- av_free (frame); -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) -+ av_frame_free (&frame); -+#else -+ avcodec_free_frame (&frame); -+#endif - avcodec_close (codec_ctx); - avformat_close_input (&format_ctx); - av_free (io_ctx); -@@ -643,7 +699,11 @@ - err); - av_free (encoded_thumbnail); - } -- av_free (frame); -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) -+ av_frame_free (&frame); -+#else -+ avcodec_free_frame (&frame); -+#endif - avcodec_close (codec_ctx); - avformat_close_input (&format_ctx); - av_free (io_ctx); ---- libextractor-1.3/src/plugins/previewopus_extractor.c.orig 2013-12-22 17:44:18.000000000 -0500 -+++ libextractor-1.3/src/plugins/previewopus_extractor.c 2016-04-04 23:39:41.377720710 -0400 -@@ -296,8 +296,13 @@ - /** Initialize one audio frame for reading from the input file */ - static int init_input_frame(AVFrame **frame) - { -- if (!(*frame = avcodec_alloc_frame())) { -- #if DEBUG -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) -+ *frame = av_frame_alloc (); -+#else -+ *frame = avcodec_alloc_frame(); -+#endif -+ if (NULL == *frame) { -+#if DEBUG - fprintf(stderr, "Could not allocate input frame\n"); - #endif - return AVERROR(ENOMEM); -@@ -655,7 +660,11 @@ - av_freep(&converted_input_samples[0]); - free(converted_input_samples); - } -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) -+ av_frame_free (&input_frame); -+#else - avcodec_free_frame(&input_frame); -+#endif - - return ret; - } -@@ -671,10 +680,15 @@ - int error; - - /** Create a new frame to store the audio samples. */ -- if (!(*frame = avcodec_alloc_frame())) { -- #if DEBUG -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) -+ *frame = av_frame_alloc (); -+#else -+ *frame = avcodec_alloc_frame(); -+#endif -+ if (NULL == *frame) { -+#if DEBUG - fprintf(stderr, "Could not allocate output frame\n"); -- #endif -+#endif - return AVERROR_EXIT; - } - -@@ -699,10 +713,14 @@ - * sure that the audio frame can hold as many samples as specified. - */ - if ((error = av_frame_get_buffer(*frame, 0)) < 0) { -- #if DEBUG -+#if DEBUG - fprintf(stderr, "Could allocate output frame samples (error '%s')\n", get_error_text(error)); -- #endif -+#endif -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) -+ av_frame_free (frame); -+#else - avcodec_free_frame(frame); -+#endif - return error; - } - -@@ -780,20 +798,32 @@ - * The samples are stored in the frame temporarily. - */ - if (av_audio_fifo_read(fifo, (void **)output_frame->data, frame_size) < frame_size) { -- #if DEBUG -+#if DEBUG - fprintf(stderr, "Could not read data from FIFO\n"); -- #endif -+#endif -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) -+ av_frame_free (&output_frame); -+#else - avcodec_free_frame(&output_frame); -+#endif - return AVERROR_EXIT; - } - - /** Encode one frame worth of audio samples. */ - if (encode_audio_frame(output_frame, output_format_context, - output_codec_context, &data_written)) { -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) -+ av_frame_free (&output_frame); -+#else - avcodec_free_frame(&output_frame); -+#endif - return AVERROR_EXIT; - } -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) -+ av_frame_free (&output_frame); -+#else - avcodec_free_frame(&output_frame); -+#endif - return 0; - } - /** Write the trailer of the output file container. */ -@@ -907,7 +937,12 @@ - return; - } - -- if (NULL == (frame = avcodec_alloc_frame ())) -+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1) -+ frame = av_frame_alloc (); -+#else -+ frame = avcodec_alloc_frame(); -+#endif -+ if (NULL == frame) - { - #if DEBUG - fprintf (stderr, diff --git a/gnu/packages/patches/libmwaw-CVE-2017-9433.patch b/gnu/packages/patches/libmwaw-CVE-2017-9433.patch new file mode 100644 index 0000000000..502a11d2a8 --- /dev/null +++ b/gnu/packages/patches/libmwaw-CVE-2017-9433.patch @@ -0,0 +1,33 @@ +Fix CVE-2017-9433: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9433 + +Patch copied from upstream source repository: + +https://sourceforge.net/p/libmwaw/libmwaw/ci/68b3b74569881248bfb6cbb4266177cc253b292f + +From 68b3b74569881248bfb6cbb4266177cc253b292f Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Sat, 8 Apr 2017 14:03:29 +0200 +Subject: [PATCH] ofz#1037 resize vector correctly + +--- + src/lib/MsWrd1Parser.cxx | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lib/MsWrd1Parser.cxx b/src/lib/MsWrd1Parser.cxx +index 63547e6..3626064 100644 +--- a/src/lib/MsWrd1Parser.cxx ++++ b/src/lib/MsWrd1Parser.cxx +@@ -902,7 +902,7 @@ bool MsWrd1Parser::readFootnoteCorrespondance(MWAWVec2i limits) + int id = fIt++->second; + fPos[1] = fIt==footnoteMap.end() ? m_state->m_eot : fIt->first; + if (id >= int(m_state->m_footnotesList.size())) +- m_state->m_footnotesList.resize(size_t(id),MWAWVec2l(0,0)); ++ m_state->m_footnotesList.resize(size_t(id)+1,MWAWVec2l(0,0)); + m_state->m_footnotesList[size_t(id)]=fPos; + } + ascii().addDelimiter(input->tell(),'|'); +-- +2.13.1 + diff --git a/gnu/packages/patches/nss-disable-long-b64-tests.patch b/gnu/packages/patches/nss-disable-long-b64-tests.patch deleted file mode 100644 index 612d94128d..0000000000 --- a/gnu/packages/patches/nss-disable-long-b64-tests.patch +++ /dev/null @@ -1,34 +0,0 @@ -Disable long b64 tests, which consistently fail on armhf. -This is based on an excerpt of the following upstream patch: - - https://hg.mozilla.org/projects/nss/rev/00b2cc2b33c7 - -(we exclude the part of the upstream patch that reverts -an earlier failed attempt, and adapt the file names) - -diff --git a/gtests/util_gtest/util_b64_unittest.cc b/gtests/util_gtest/util_b64_unittest.cc ---- a/nss/gtests/util_gtest/util_b64_unittest.cc -+++ b/nss/gtests/util_gtest/util_b64_unittest.cc -@@ -63,17 +63,19 @@ TEST_F(B64EncodeDecodeTest, EncDecTest) - - TEST_F(B64EncodeDecodeTest, FakeDecTest) { EXPECT_TRUE(TestFakeDecode(100)); } - - TEST_F(B64EncodeDecodeTest, FakeEncDecTest) { - EXPECT_TRUE(TestFakeEncode(100)); - } - - // These takes a while ... --TEST_F(B64EncodeDecodeTest, LongFakeDecTest1) { -+TEST_F(B64EncodeDecodeTest, DISABLED_LongFakeDecTest1) { - EXPECT_TRUE(TestFakeDecode(0x66666666)); - } --TEST_F(B64EncodeDecodeTest, LongFakeEncDecTest1) { TestFakeEncode(0x3fffffff); } --TEST_F(B64EncodeDecodeTest, LongFakeEncDecTest2) { -+TEST_F(B64EncodeDecodeTest, DISABLED_LongFakeEncDecTest1) { -+ TestFakeEncode(0x3fffffff); -+} -+TEST_F(B64EncodeDecodeTest, DISABLED_LongFakeEncDecTest2) { - EXPECT_FALSE(TestFakeEncode(0x40000000)); - } - - } // namespace nss_test diff --git a/gnu/packages/patches/nss-increase-test-timeout.patch b/gnu/packages/patches/nss-increase-test-timeout.patch index 1e24940322..55117c02e9 100644 --- a/gnu/packages/patches/nss-increase-test-timeout.patch +++ b/gnu/packages/patches/nss-increase-test-timeout.patch @@ -1,4 +1,4 @@ -We've seen some tests take more than 20s to complete on a busy armhf +We've seen some tests take up to 60s to complete on a busy armhf machine. Even a busy x86_64 machine can use more than 5s on some tests. Increase timeouts to increase chances of a successful build. @@ -10,7 +10,7 @@ Increase timeouts to increase chances of a successful build. ASSERT_TRUE_WAIT((client_->state() != TlsAgent::STATE_CONNECTING) && (server_->state() != TlsAgent::STATE_CONNECTING), - 5000); -+ 25000); ++ 300000); } void TlsConnectTestBase::EnableExtendedMasterSecret() { @@ -19,7 +19,7 @@ Increase timeouts to increase chances of a successful build. failing_agent = client_; } - ASSERT_TRUE_WAIT(failing_agent->state() == TlsAgent::STATE_ERROR, 5000); -+ ASSERT_TRUE_WAIT(failing_agent->state() == TlsAgent::STATE_ERROR, 25000); ++ ASSERT_TRUE_WAIT(failing_agent->state() == TlsAgent::STATE_ERROR, 300000); } void TlsConnectTestBase::ConfigureVersion(uint16_t version) { diff --git a/gnu/packages/patches/osip-CVE-2017-7853.patch b/gnu/packages/patches/osip-CVE-2017-7853.patch new file mode 100644 index 0000000000..33d95cdb0e --- /dev/null +++ b/gnu/packages/patches/osip-CVE-2017-7853.patch @@ -0,0 +1,40 @@ +Fix CVE-2017-7853: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7853 +https://savannah.gnu.org/support/index.php?109265 + +Patch copied from upstream source repository: + +https://git.savannah.gnu.org/cgit/osip.git/commit/?id=1ae06daf3b2375c34af23083394a6f010be24a45 + +From 1ae06daf3b2375c34af23083394a6f010be24a45 Mon Sep 17 00:00:00 2001 +From: Aymeric Moizard +Date: Tue, 21 Feb 2017 17:16:26 +0100 +Subject: [PATCH] * fix bug report: sr #109265: SIP message body length + underflow in libosip2-4.1.0 https://savannah.gnu.org/support/?109265 + also applicable to current latest version + +--- + src/osipparser2/osip_message_parse.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/osipparser2/osip_message_parse.c b/src/osipparser2/osip_message_parse.c +index 1628c60..aa35446 100644 +--- a/src/osipparser2/osip_message_parse.c ++++ b/src/osipparser2/osip_message_parse.c +@@ -784,6 +784,12 @@ msg_osip_body_parse (osip_message_t * sip, const char *start_of_buf, const char + if ('\n' == start_of_body[0] || '\r' == start_of_body[0]) + start_of_body++; + ++ /* if message body is empty or contains a single CR/LF */ ++ if (end_of_body <= start_of_body) { ++ osip_free (sep_boundary); ++ return OSIP_SYNTAXERROR; ++ } ++ + body_len = end_of_body - start_of_body; + + /* Skip CR before end boundary. */ +-- +2.13.1 + diff --git a/gnu/packages/patches/zziplib-CVE-2017-5974.patch b/gnu/packages/patches/zziplib-CVE-2017-5974.patch new file mode 100644 index 0000000000..9ae02103e7 --- /dev/null +++ b/gnu/packages/patches/zziplib-CVE-2017-5974.patch @@ -0,0 +1,28 @@ +Fix CVE-2017-5974: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5974 + +Patch copied from Debian. + +Index: zziplib-0.13.62/zzip/memdisk.c +=================================================================== +--- zziplib-0.13.62.orig/zzip/memdisk.c ++++ zziplib-0.13.62/zzip/memdisk.c +@@ -216,12 +216,12 @@ zzip_mem_entry_new(ZZIP_DISK * disk, ZZI + /* override sizes/offsets with zip64 values for largefile support */ + zzip_extra_zip64 *block = (zzip_extra_zip64 *) + zzip_mem_entry_extra_block(item, ZZIP_EXTRA_zip64); +- if (block) ++ if (block && ZZIP_GET16(block->z_datasize) >= (8 + 8 + 8 + 4)) + { +- item->zz_usize = __zzip_get64(block->z_usize); +- item->zz_csize = __zzip_get64(block->z_csize); +- item->zz_offset = __zzip_get64(block->z_offset); +- item->zz_diskstart = __zzip_get32(block->z_diskstart); ++ item->zz_usize = ZZIP_GET64(block->z_usize); ++ item->zz_csize = ZZIP_GET64(block->z_csize); ++ item->zz_offset = ZZIP_GET64(block->z_offset); ++ item->zz_diskstart = ZZIP_GET32(block->z_diskstart); + } + } + /* NOTE: diff --git a/gnu/packages/patches/zziplib-CVE-2017-5975.patch b/gnu/packages/patches/zziplib-CVE-2017-5975.patch new file mode 100644 index 0000000000..fad174b056 --- /dev/null +++ b/gnu/packages/patches/zziplib-CVE-2017-5975.patch @@ -0,0 +1,32 @@ +Fix CVE-2017-5975: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5975 + +Patch copied from Debian. + +Index: zziplib-0.13.62/zzip/memdisk.c +=================================================================== +--- zziplib-0.13.62.orig/zzip/memdisk.c ++++ zziplib-0.13.62/zzip/memdisk.c +@@ -173,6 +173,8 @@ zzip_mem_entry_new(ZZIP_DISK * disk, ZZI + return 0; /* errno=ENOMEM; */ + ___ struct zzip_file_header *header = + zzip_disk_entry_to_file_header(disk, entry); ++ if (!header) ++ { free(item); return 0; } + /* there is a number of duplicated information in the file header + * or the disk entry block. Theoretically some part may be missing + * that exists in the other, ... but we will prefer the disk entry. +Index: zziplib-0.13.62/zzip/mmapped.c +=================================================================== +--- zziplib-0.13.62.orig/zzip/mmapped.c ++++ zziplib-0.13.62/zzip/mmapped.c +@@ -289,6 +289,8 @@ zzip_disk_entry_to_file_header(ZZIP_DISK + (disk->buffer + zzip_disk_entry_fileoffset(entry)); + if (disk->buffer > file_header || file_header >= disk->endbuf) + return 0; ++ if (ZZIP_GET32(file_header) != ZZIP_FILE_HEADER_MAGIC) ++ return 0; + return (struct zzip_file_header *) file_header; + } + diff --git a/gnu/packages/patches/zziplib-CVE-2017-5976.patch b/gnu/packages/patches/zziplib-CVE-2017-5976.patch new file mode 100644 index 0000000000..17fc30e302 --- /dev/null +++ b/gnu/packages/patches/zziplib-CVE-2017-5976.patch @@ -0,0 +1,61 @@ +Fix CVE-2017-5976: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5976 + +Patch copied from Debian. + +Index: zziplib-0.13.62/zzip/memdisk.c +=================================================================== +--- zziplib-0.13.62.orig/zzip/memdisk.c ++++ zziplib-0.13.62/zzip/memdisk.c +@@ -201,6 +201,7 @@ zzip_mem_entry_new(ZZIP_DISK * disk, ZZI + { + void *mem = malloc(ext1 + 2); + item->zz_ext[1] = mem; ++ item->zz_extlen[1] = ext1 + 2; + memcpy(mem, ptr1, ext1); + ((char *) (mem))[ext1 + 0] = 0; + ((char *) (mem))[ext1 + 1] = 0; +@@ -209,6 +210,7 @@ zzip_mem_entry_new(ZZIP_DISK * disk, ZZI + { + void *mem = malloc(ext2 + 2); + item->zz_ext[2] = mem; ++ item->zz_extlen[2] = ext2 + 2; + memcpy(mem, ptr2, ext2); + ((char *) (mem))[ext2 + 0] = 0; + ((char *) (mem))[ext2 + 1] = 0; +@@ -245,8 +247,10 @@ zzip_mem_entry_extra_block(ZZIP_MEM_ENTR + while (1) + { + ZZIP_EXTRA_BLOCK *ext = entry->zz_ext[i]; +- if (ext) ++ if (ext && (entry->zz_extlen[i] >= zzip_extra_block_headerlength)) + { ++ char *endblock = (char *)ext + entry->zz_extlen[i]; ++ + while (*(short *) (ext->z_datatype)) + { + if (datatype == zzip_extra_block_get_datatype(ext)) +@@ -257,6 +261,10 @@ zzip_mem_entry_extra_block(ZZIP_MEM_ENTR + e += zzip_extra_block_headerlength; + e += zzip_extra_block_get_datasize(ext); + ext = (void *) e; ++ if (e >= endblock) ++ { ++ break; ++ } + ____; + } + } +Index: zziplib-0.13.62/zzip/memdisk.h +=================================================================== +--- zziplib-0.13.62.orig/zzip/memdisk.h ++++ zziplib-0.13.62/zzip/memdisk.h +@@ -66,6 +66,7 @@ struct _zzip_mem_entry { + int zz_filetype; /* (from "z_filetype") */ + char* zz_comment; /* zero-terminated (from "comment") */ + ZZIP_EXTRA_BLOCK* zz_ext[3]; /* terminated by null in z_datatype */ ++ int zz_extlen[3]; /* length of zz_ext[i] in bytes */ + }; /* the extra blocks are NOT converted */ + + #define _zzip_mem_disk_findfirst(_d_) ((_d_)->list) diff --git a/gnu/packages/patches/zziplib-CVE-2017-5978.patch b/gnu/packages/patches/zziplib-CVE-2017-5978.patch new file mode 100644 index 0000000000..452b14f804 --- /dev/null +++ b/gnu/packages/patches/zziplib-CVE-2017-5978.patch @@ -0,0 +1,37 @@ +Fix CVE-2017-5978: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5978 + +Patch copied from Debian. + +Index: zziplib-0.13.62/zzip/memdisk.c +=================================================================== +--- zziplib-0.13.62.orig/zzip/memdisk.c ++++ zziplib-0.13.62/zzip/memdisk.c +@@ -180,7 +180,7 @@ zzip_mem_entry_new(ZZIP_DISK * disk, ZZI + * that exists in the other, ... but we will prefer the disk entry. + */ + item->zz_comment = zzip_disk_entry_strdup_comment(disk, entry); +- item->zz_name = zzip_disk_entry_strdup_name(disk, entry); ++ item->zz_name = zzip_disk_entry_strdup_name(disk, entry) ?: strdup(""); + item->zz_data = zzip_file_header_to_data(header); + item->zz_flags = zzip_disk_entry_get_flags(entry); + item->zz_compr = zzip_disk_entry_get_compr(entry); +@@ -197,7 +197,7 @@ zzip_mem_entry_new(ZZIP_DISK * disk, ZZI + int /* */ ext2 = zzip_file_header_get_extras(header); + char *_zzip_restrict ptr2 = zzip_file_header_to_extras(header); + +- if (ext1) ++ if (ext1 && ((ptr1 + ext1) < disk->endbuf)) + { + void *mem = malloc(ext1 + 2); + item->zz_ext[1] = mem; +@@ -206,7 +206,7 @@ zzip_mem_entry_new(ZZIP_DISK * disk, ZZI + ((char *) (mem))[ext1 + 0] = 0; + ((char *) (mem))[ext1 + 1] = 0; + } +- if (ext2) ++ if (ext2 && ((ptr2 + ext2) < disk->endbuf)) + { + void *mem = malloc(ext2 + 2); + item->zz_ext[2] = mem; diff --git a/gnu/packages/patches/zziplib-CVE-2017-5979.patch b/gnu/packages/patches/zziplib-CVE-2017-5979.patch new file mode 100644 index 0000000000..b38f50b172 --- /dev/null +++ b/gnu/packages/patches/zziplib-CVE-2017-5979.patch @@ -0,0 +1,19 @@ +Fix CVE-2017-5979: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5979 + +Patch copied from Debian. + +Index: zziplib-0.13.62/zzip/fseeko.c +=================================================================== +--- zziplib-0.13.62.orig/zzip/fseeko.c ++++ zziplib-0.13.62/zzip/fseeko.c +@@ -255,7 +255,7 @@ zzip_entry_findfirst(FILE * disk) + return 0; + /* we read out chunks of 8 KiB in the hope to match disk granularity */ + ___ zzip_off_t pagesize = PAGESIZE; /* getpagesize() */ +- ___ ZZIP_ENTRY *entry = malloc(sizeof(*entry)); ++ ___ ZZIP_ENTRY *entry = calloc(1, sizeof(*entry)); + if (! entry) + return 0; + ___ unsigned char *buffer = malloc(pagesize); diff --git a/gnu/packages/patches/zziplib-CVE-2017-5981.patch b/gnu/packages/patches/zziplib-CVE-2017-5981.patch new file mode 100644 index 0000000000..ed82cb3b91 --- /dev/null +++ b/gnu/packages/patches/zziplib-CVE-2017-5981.patch @@ -0,0 +1,19 @@ +Fix CVE-2017-5981: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5981 + +Patch copied from Debian. +Index: zziplib-0.13.62/zzip/fseeko.c +=================================================================== +--- zziplib-0.13.62.orig/zzip/fseeko.c ++++ zziplib-0.13.62/zzip/fseeko.c +@@ -311,7 +311,8 @@ zzip_entry_findfirst(FILE * disk) + } else + continue; + +- assert(0 <= root && root < mapsize); ++ if (root < 0 || root >= mapsize) ++ goto error; + if (fseeko(disk, root, SEEK_SET) == -1) + goto error; + if (fread(disk_(entry), 1, sizeof(*disk_(entry)), disk) diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm index b68aea9d7b..92513822ce 100644 --- a/gnu/packages/photo.scm +++ b/gnu/packages/photo.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2014, 2015 Ludovic Courtès ;;; Copyright © 2015 Ricardo Wurmus ;;; Copyright © 2015 Andreas Enge -;;; Copyright © 2016 Efraim Flashner +;;; Copyright © 2016, 2017 Efraim Flashner ;;; Copyright © 2017 Roel Janssen ;;; ;;; This file is part of GNU Guix. @@ -54,7 +54,9 @@ (define-module (gnu packages photo) #:use-module (gnu packages tex) #:use-module (gnu packages web) #:use-module (gnu packages xfig) - #:use-module (gnu packages xml)) + #:use-module (gnu packages xml) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26)) (define-public libraw (package @@ -285,7 +287,14 @@ (define-public lensfun (base32 "0cfk8jjhs9nbfjfdy98plrj9ayi59aph0nx6ppslgjhlcvacm2xf")))) (build-system cmake-build-system) - (arguments `(#:tests? #f)) ; There are no tests to run. + (arguments + `(,@(if (any (cute string-prefix? <> (or (%current-system) + (%current-target-system))) + '("x86_64" "i686")) + ;; SSE and SSE2 are supported only on Intel processors. + '() + '(#:configure-flags '("-DBUILD_FOR_SSE=OFF" "-DBUILD_FOR_SSE2=OFF"))) + #:tests? #f)) ; There are no tests to run. (native-inputs `(("pkg-config" ,pkg-config))) (inputs @@ -310,7 +319,7 @@ (define-public lensfun (define-public darktable (package (name "darktable") - (version "2.2.4") + (version "2.2.5") (source (origin (method url-fetch) (uri (string-append @@ -319,7 +328,7 @@ (define-public darktable version "/darktable-" version ".tar.xz")) (sha256 (base32 - "1n7rddkxwcifc3kcdlnar9w562xv4h78fqkkn27jihqzp3b4am5x")))) + "10gjzd4irxhladh4jyss9kgp627k8vgx2divipsb33pp6cms80z3")))) (build-system cmake-build-system) (arguments `(#:tests? #f ; There are no tests. diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index a9091ff707..1373e4bb75 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -98,6 +98,7 @@ (define-module (gnu packages python) #:use-module (gnu packages readline) #:use-module (gnu packages sdl) #:use-module (gnu packages shells) + #:use-module (gnu packages ssh) #:use-module (gnu packages statistics) #:use-module (gnu packages tex) #:use-module (gnu packages texinfo) @@ -3134,16 +3135,14 @@ (define-public python2-sphinx (define-public python-sphinx-rtd-theme (package (name "python-sphinx-rtd-theme") - (version "0.1.6") + (version "0.2.4") (source (origin (method url-fetch) - (uri (string-append "https://pypi.python.org/packages/source/s/" - "sphinx_rtd_theme/sphinx_rtd_theme-" - version ".tar.gz")) + (uri (pypi-uri "sphinx_rtd_theme" version)) (sha256 (base32 - "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g")))) + "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd")))) (build-system python-build-system) (arguments '(#:tests? #f)) ; No tests. (propagated-inputs @@ -13132,6 +13131,9 @@ (define-public python-rednose @command{nosetests} command of the Python Nose unit test framework.") (license license:bsd-3))) +(define-public python2-rednose + (package-with-python2 python-rednose)) + (define-public python-flask-restplus (package (name "python-flask-restplus") @@ -15319,3 +15321,61 @@ (define-public python-swagger-spec-validator (define-public python2-swagger-spec-validator (package-with-python2 python-swagger-spec-validator)) + +(define-public python-apache-libcloud + (package + (name "python-apache-libcloud") + (version "2.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "apache-libcloud" version)) + (sha256 + (base32 + "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-ssh + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "libcloud/compute/ssh.py" + (("'ssh'") (string-append "'" (assoc-ref inputs "openssh") + "/bin/ssh" "'"))) + #t)) + (add-after 'unpack 'patch-tests + (lambda _ + (substitute* "./libcloud/test/test_file_fixtures.py" + ;; See . + (("def _ascii") "def _raw_data(self, method, url, body, headers): + return (httplib.OK, + \"1234abcd\", + {\"test\": \"value\"}, + httplib.responses[httplib.OK]) + def _ascii")) + (substitute* "libcloud/test/compute/test_ssh_client.py" + (("class ShellOutSSHClientTests") + "@unittest.skip(\"Guix container doesn't have ssh service\") +class ShellOutSSHClientTests") + ;; See . + (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'") + (("'.xF0', '.x90', '.x8D', '.x88'") + "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'")) + #t))))) + (inputs + `(("openssh" ,openssh))) + (propagated-inputs + `(("python-paramiko" ,python-paramiko) + ("python-requests" ,python-requests))) + (native-inputs + `(("python-lockfile" ,python-lockfile) + ("python-mock" ,python-mock) + ("python-requests-mock" ,python-requests-mock))) + (home-page "https://libcloud.apache.org/") + (synopsis "Unified Cloud API") + (description "@code{libcloud} is a Python library for interacting with +many of the popular cloud service providers using a unified API.") + (license license:asl2.0))) + +(define-public python2-apache-libcloud + (package-with-python2 python-apache-libcloud)) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 6691095e55..7680f4eae0 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -466,13 +466,13 @@ (define-public bundler (define-public ruby-builder (package (name "ruby-builder") - (version "3.2.2") + (version "3.2.3") (source (origin (method url-fetch) (uri (rubygems-uri "builder" version)) (sha256 (base32 - "14fii7ab8qszrvsvhz6z2z3i4dw0h41a62fjr2h1j8m41vbrmyv2")))) + "0qibi5s67lpdv1wgcj66wcymcr04q6j4mzws6a479n0mlrmh5wr1")))) (build-system ruby-build-system) (arguments `(#:phases diff --git a/gnu/packages/selinux.scm b/gnu/packages/selinux.scm index 81c899f841..729ae646b2 100644 --- a/gnu/packages/selinux.scm +++ b/gnu/packages/selinux.scm @@ -157,11 +157,13 @@ (define-public libselinux (add-after 'install 'install-pywrap (lambda* (#:key make-flags #:allow-other-keys) (zero? (apply system* "make" "install-pywrap" make-flags)))))))) - (inputs + ;; These libraries are in "Requires.private" in libselinux.pc. + (propagated-inputs `(("libsepol" ,libsepol) - ("pcre" ,pcre) - ;; For pywrap phase - ("python" ,python-wrapper))) + ("pcre" ,pcre))) + ;; For pywrap phase + (inputs + `(("python" ,python-wrapper))) ;; These inputs are only needed for the pywrap phase. (native-inputs `(("swig" ,swig) diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm index 41d1758250..6b9125e77f 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2016 Tobias Geerinckx-Rice ;;; Copyright © 2016 Stefan Reichör ;;; Copyright © 2017 Ricardo Wurmus -;;; Copyright © 2017 ng0 +;;; Copyright © 2017 ng0 ;;; Copyright © 2017 Leo Famulari ;;; ;;; This file is part of GNU Guix. @@ -99,14 +99,14 @@ (define-public dash (define-public fish (package (name "fish") - (version "2.5.0") + (version "2.6.0") (source (origin (method url-fetch) (uri (string-append "https://fishshell.com/files/" version "/fish-" version ".tar.gz")) (sha256 (base32 - "19djav128nkhjxgfhwhc32i5y9d9c3karbh5yg67kqrdranyvh7q")) + "1yzx73kg5ng5ivhi68756sl5hpb8869110l9fwim6gn7f7bbprby")) (modules '((guix build utils))) ;; Don't try to install /etc/fish/config.fish. (snippet diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm index d79663a2b5..d03686c11c 100644 --- a/gnu/packages/ssh.scm +++ b/gnu/packages/ssh.scm @@ -229,7 +229,8 @@ (define-public guile-ssh (base32 "0r261i8kc3avbmbwgyzak2vnqwssjlgz37g2y2fwm80w9bmn2m7j")) (patches (search-patches "guile-ssh-rexec-bug.patch" - "guile-ssh-double-free.patch")) + "guile-ssh-double-free.patch" + "guile-ssh-channel-finalization.patch")) (modules '((guix build utils))) (snippet ;; 'configure.ac' mistakenly tries to link files from examples/ diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index ae44bfb01f..91b91beae1 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -2294,13 +2294,13 @@ (define-public r-rstudioapi (define-public r-devtools (package (name "r-devtools") - (version "1.12.0") + (version "1.13.2") (source (origin (method url-fetch) (uri (cran-uri "devtools" version)) (sha256 (base32 - "16l18szmj482vf3dvl2fqwwa4zaqylmic1pk7dwh428cp0d86mzi")))) + "08ajsr12wd31lsx3jv5l9mq4063dc5fpr9lcnzra6kl59vi5pa7v")))) (build-system r-build-system) (propagated-inputs `(("r-curl" ,r-curl) diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm index 45701bf445..c3bf203602 100644 --- a/gnu/packages/telephony.scm +++ b/gnu/packages/telephony.scm @@ -120,12 +120,14 @@ (define-public ccrtp (define-public osip (package (name "osip") - (version "4.1.0") + (version "5.0.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/osip/libosip2-" version ".tar.gz")) - (sha256 (base32 - "014503kqv7z63az6lgxr5fbajlrqylm5c4kgbf8p3a0n6cva0slr")))) + (patches (search-patches "osip-CVE-2017-7853.patch")) + (sha256 + (base32 + "00yznbrm9q04wgd4b831km8iwlvwvsnwv87igf79g5vj9yakr88q")))) (build-system gnu-build-system) (synopsis "Library implementing SIP (RFC-3261)") diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index 7839e16b27..71aa5c7f3a 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2016 Federico Beffa ;;; Copyright © 2016 Thomas Danckaert -;;; Copyright © 2016 Ricardo Wurmus +;;; Copyright © 2016, 2017 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,8 +30,10 @@ (define-module (gnu packages tex) #:use-module (guix build-system gnu) #:use-module (guix build-system perl) #:use-module (guix build-system trivial) + #:use-module (guix build-system texlive) #:use-module (guix utils) #:use-module (guix git-download) + #:use-module (guix svn-download) #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages bash) @@ -59,7 +61,8 @@ (define-module (gnu packages tex) #:use-module (gnu packages zip) #:autoload (gnu packages texinfo) (texinfo) #:use-module (ice-9 ftw) - #:use-module (srfi srfi-1)) + #:use-module (ice-9 match) + #:use-module ((srfi srfi-1) #:hide (zip))) (define texlive-extra-src (origin @@ -77,7 +80,7 @@ (define texlive-texmf-src (sha256 (base32 "1dv8vgfzpczqw82hv9g7a8djhhyzywljmrarlcyy6g2qi5q51glr")))) -(define texlive-bin +(define-public texlive-bin (package (name "texlive-bin") (version "2016") @@ -179,6 +182,1271 @@ (define texlive-bin (license (license:fsf-free "https://www.tug.org/texlive/copying.html")) (home-page "https://www.tug.org/texlive/"))) +(define-public texlive-dvips + (package + (name "texlive-dvips") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (svn-reference + (url (string-append "svn://www.tug.org/texlive/tags/" + %texlive-tag "/Master/texmf-dist/" + "/dvips")) + (revision %texlive-revision))) + (sha256 + (base32 + "1k11yvz4q95bxyxczwvd4r177h6a2gg03xmf51kmgjgz8an2gq2w")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((target (string-append (assoc-ref %outputs "out") + "/share/texmf-dist/dvips"))) + (mkdir-p target) + (copy-recursively (assoc-ref %build-inputs "source") target) + #t)))) + (home-page "http://www.ctan.org/pkg/dvips") + (synopsis "DVI to PostScript drivers") + (description "This package provides files needed for converting DVI files +to PostScript.") + ;; Various free software licenses apply to individual files. + (license (list license:lppl1.3c+ + license:expat + license:lgpl3+)))) + +(define-public texlive-generic-unicode-data + (package + (name "texlive-generic-unicode-data") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (svn-reference + (url (string-append "svn://www.tug.org/texlive/tags/" + %texlive-tag "/Master/texmf-dist/" + "/tex/generic/unicode-data")) + (revision %texlive-revision))) + (sha256 + (base32 + "0ivrhp6jz31pl4z841g4ws41lmvdiwz4sslmhf02inlib79gz6r2")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((target (string-append (assoc-ref %outputs "out") + "/share/texmf-dist/tex/generic/unicode-data"))) + (mkdir-p target) + (copy-recursively (assoc-ref %build-inputs "source") target) + #t)))) + (home-page "http://www.ctan.org/pkg/unicode-data") + (synopsis "Unicode data and loaders for TeX") + (description "This bundle provides generic access to Unicode Consortium +data for TeX use. It contains a set of text files provided by the Unicode +Consortium which are currently all from Unicode 8.0.0, with the exception of +@code{MathClass.txt} which is not currently part of the Unicode Character +Database. Accompanying these source data are generic TeX loader files +allowing this data to be used as part of TeX runs, in particular in building +format files. Currently there are two loader files: one for general character +set up and one for initializing XeTeX character classes as has been carried +out to date by @code{unicode-letters.tex}. ") + (license license:lppl1.3c+))) + +(define-public texlive-generic-dehyph-exptl + (package + (name "texlive-generic-dehyph-exptl") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (svn-reference + (url (string-append "svn://www.tug.org/texlive/tags/" + %texlive-tag "/Master/texmf-dist/" + "/tex/generic/dehyph-exptl")) + (revision %texlive-revision))) + (sha256 + (base32 + "1l9wgv99qq0ysvlxqpj4g8bl0dywbzra4g8m2kmpg2fb0i0hczap")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((target (string-append (assoc-ref %outputs "out") + "/share/texmf-dist/tex/generic/dehyph-exptl"))) + (mkdir-p target) + (copy-recursively (assoc-ref %build-inputs "source") target) + #t)))) + (home-page "http://projekte.dante.de/Trennmuster/WebHome") + (synopsis "Hyphenation patterns for German") + (description "The package provides experimental hyphenation patterns for +the German language, covering both traditional and reformed orthography. The +patterns can be used with packages Babel and hyphsubst from the Oberdiek +bundle.") + ;; Hyphenation patterns are under the Expat license; documentation is + ;; under LPPL. + (license (list license:expat license:lppl)))) + +(define-public texlive-generic-tex-ini-files + (package + (name "texlive-generic-tex-ini-files") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (svn-reference + (url (string-append "svn://www.tug.org/texlive/tags/" + %texlive-tag "/Master/texmf-dist/" + "/tex/generic/tex-ini-files")) + (revision %texlive-revision))) + (sha256 + (base32 + "1wh42n1lmzcvi3g6mm31nm3yd5ha5bl260xqc444jg1m9fdp3wz5")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((target (string-append (assoc-ref %outputs "out") + "/share/texmf-dist/tex/generic/tex-ini-files"))) + (mkdir-p target) + (copy-recursively (assoc-ref %build-inputs "source") target) + #t)))) + (home-page "http://ctan.org/pkg/tex-ini-files") + (synopsis "Files for creating TeX formats") + (description "This bundle provides a collection of model \".ini\" files +for creating TeX formats. These files are commonly used to introduced +distribution-dependent variations in formats. They are also used to +allow existing format source files to be used with newer engines, for example +to adapt the plain e-TeX source file to work with XeTeX and LuaTeX.") + (license license:public-domain))) + +(define-public texlive-generic-hyph-utf8 + (package + (name "texlive-generic-hyph-utf8") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (svn-reference + (url (string-append "svn://www.tug.org/texlive/tags/" + %texlive-tag "/Master/texmf-dist/" + "/tex/generic/hyph-utf8")) + (revision %texlive-revision))) + (sha256 + (base32 + "0ghizcz7ps16dzfqf66wwg5i181assc6qsm0g7g5dbmp909931vi")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((target (string-append (assoc-ref %outputs "out") + "/share/texmf-dist/tex/generic/hyph-utf8"))) + (mkdir-p target) + (copy-recursively (assoc-ref %build-inputs "source") target) + #t)))) + (home-page "http://ctan.org/pkg/hyph-utf8") + (synopsis "Hyphenation patterns expressed in UTF-8") + (description "Modern native UTF-8 engines such as XeTeX and LuaTeX need +hyphenation patterns in UTF-8 format, whereas older systems require +hyphenation patterns in the 8-bit encoding of the font in use (such encodings +are codified in the LaTeX scheme with names like OT1, T2A, TS1, OML, LY1, +etc). The present package offers a collection of conversions of existing +patterns to UTF-8 format, together with converters for use with 8-bit fonts in +older systems. Since hyphenation patterns for Knuthian-style TeX systems are +only read at iniTeX time, it is hoped that the UTF-8 patterns, with their +converters, will completely supplant the older patterns.") + ;; Individual files each have their own license. Most of these files are + ;; independent hyphenation patterns. + (license (list license:lppl1.0+ + license:lppl1.2+ + license:lppl1.3 + license:lppl1.3+ + license:lppl1.3a+ + license:lgpl2.1 + license:lgpl2.1+ + license:lgpl3+ + license:gpl2+ + license:gpl3+ + license:mpl1.1 + license:asl2.0 + license:expat + license:bsd-3 + license:cc0 + license:public-domain + license:wtfpl2)))) + +(define-public texlive-metafont-base + (package + (name "texlive-metafont-base") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (svn-reference + (url (string-append "svn://www.tug.org/texlive/tags/" + %texlive-tag "/Master/texmf-dist/" + "/metafont")) + (revision %texlive-revision))) + (sha256 + (base32 + "1yl4n8cn5xqk2nc22zgzq6ymd7bhm6xx1mz3azip7i3ki4bhb5q5")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no test target + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + (let ((cwd (getcwd))) + (setenv "MFINPUTS" + (string-append cwd "/base:" + cwd "/misc:" + cwd "/roex:" + cwd "/feynmf:" + cwd "/mfpic:" + cwd "/config"))) + (mkdir "build") + (with-directory-excursion "build" + (zero? (system* "inimf" "mf.mf"))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (base (string-append out "/share/texmf-dist/web2c")) + (mf (string-append out "/share/texmf-dist/metafont/base"))) + (mkdir-p base) + (mkdir-p mf) + (install-file "build/mf.base" base) + (copy-recursively "base" mf) + #t)))))) + (native-inputs + `(("texlive-bin" ,texlive-bin))) + (home-page "http://www.ctan.org/pkg/metafont") + (synopsis "Metafont base files") + (description "This package provides the Metafont base files needed to +build fonts using the Metafont system.") + (license license:knuth))) + +(define-public texlive-fonts-cm + (package + (name "texlive-fonts-cm") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (svn-reference + (url (string-append "svn://www.tug.org/texlive/tags/" + %texlive-tag "/Master/texmf-dist/" + "/fonts/source/public/cm")) + (revision %texlive-revision))) + (sha256 + (base32 + "045k5b9rdmbxpy1a3006l1x96z1rd18vg3cwrvnld9bqybw5qz44")))) + (build-system gnu-build-system) + (arguments + `(#:modules ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-1) + (srfi srfi-26)) + #:tests? #f ; no tests + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + (let ((mf (assoc-ref inputs "texlive-metafont-base"))) + ;; Tell mf where to find mf.base + (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c")) + ;; Tell mf where to look for source files + (setenv "MFINPUTS" + (string-append (getcwd) ":" + mf "/share/texmf-dist/metafont/base"))) + (mkdir "build") + (every (lambda (font) + (format #t "building font ~a\n" font) + (zero? (system* "mf" "-progname=mf" + "-output-directory=build" + (string-append "\\" + "mode:=ljfour; " + "mag:=1; " + "batchmode; " + "input " + (basename font ".mf"))))) + (find-files "." "cm(.*[0-9]+.*|inch)\\.mf$")))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (tfm (string-append + out "/share/texmf-dist/fonts/tfm/public/cm")) + (mf (string-append + out "/share/texmf-dist/fonts/source/public/cm"))) + (for-each (cut install-file <> tfm) + (find-files "build" "\\.*")) + (for-each (cut install-file <> mf) + (find-files "." "\\.mf")) + #t)))))) + (native-inputs + `(("texlive-bin" ,texlive-bin) + ("texlive-metafont-base" ,texlive-metafont-base))) + (home-page "http://www.ctan.org/pkg/cm") + (synopsis "Computer Modern fonts for TeX") + (description "This package provides the Computer Modern fonts by Donald +Knuth. The Computer Modern font family is a large collection of text, +display, and mathematical fonts in a range of styles, based on Monotype Modern +8A.") + (license license:knuth))) + +(define-public texlive-fonts-knuth-lib + (package + (name "texlive-fonts-knuth-lib") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (svn-reference + (url (string-append "svn://www.tug.org/texlive/tags/" + %texlive-tag "/Master/texmf-dist/" + "/fonts/source/public/knuth-lib")) + (revision %texlive-revision))) + (sha256 + (base32 + "0in9aqyi8jkyf9d16z0li50z5fpwj1iwgwm83gmvwqcf7chfs04y")))) + (build-system gnu-build-system) + (arguments + `(#:modules ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-26)) + #:tests? #f ; no tests + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + (let ((mf (assoc-ref inputs "texlive-metafont-base"))) + ;; Tell mf where to find mf.base + (setenv "MFBASES" + (string-append mf "/share/texmf-dist/web2c")) + ;; Tell mf where to look for source files + (setenv "MFINPUTS" + (string-append (getcwd) ":" + mf "/share/texmf-dist/metafont/base"))) + (mkdir "build") + (zero? (system* "mf" "-progname=mf" + "-output-directory=build" + (string-append "\\" + "mode:=ljfour; " + "mag:=1; " + "batchmode; " + "input manfnt"))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (tfm (string-append + out "/share/texmf-dist/fonts/tfm/public/knuth-lib")) + (mf (string-append + out "/share/texmf-dist/fonts/source/public/knuth-lib"))) + (for-each (cut install-file <> tfm) + (find-files "build" "\\.*")) + (for-each (cut install-file <> mf) + (find-files "." "\\.mf")) + #t)))))) + (native-inputs + `(("texlive-bin" ,texlive-bin) + ("texlive-metafont-base" ,texlive-metafont-base))) + (home-page "https://www.ctan.org/pkg/knuth-lib") + (synopsis "Small library of METAFONT sources") + (description "This is a collection of core TeX and METAFONT macro files +from Donald Knuth, including the plain format, plain base, and the MF logo +fonts.") + (license license:knuth))) + +(define-public texlive-fonts-latex + (package + (name "texlive-fonts-latex") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (svn-reference + (url (string-append "svn://www.tug.org/texlive/tags/" + %texlive-tag "/Master/texmf-dist/" + "/fonts/source/public/latex-fonts")) + (revision %texlive-revision))) + (sha256 + (base32 + "0ypsm4xv9cw0jckk2qc7gi9hcmhf31mrg56pz3llyx3yd9vq2lps")))) + (build-system gnu-build-system) + (arguments + `(#:modules ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-1) + (srfi srfi-26)) + #:tests? #f ; no tests + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + (let ((mf (assoc-ref inputs "texlive-metafont-base"))) + ;; Tell mf where to find mf.base + (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c")) + ;; Tell mf where to look for source files + (setenv "MFINPUTS" + (string-append (getcwd) ":" + mf "/share/texmf-dist/metafont/base:" + (assoc-ref inputs "texlive-fonts-cm") + "/share/texmf-dist/fonts/source/public/cm"))) + (mkdir "build") + (every (lambda (font) + (format #t "building font ~a\n" font) + (zero? (system* "mf" "-progname=mf" + "-output-directory=build" + (string-append "\\" + "mode:=ljfour; " + "mag:=1; " + "batchmode; " + "input " font)))) + '("icmcsc10" "icmex10" "icmmi8" "icmsy8" "icmtt8" + "ilasy8" "ilcmss8" "ilcmssb8" "ilcmssi8" + "lasy5" "lasy6" "lasy7" "lasy8" "lasy9" "lasy10" "lasyb10" + "lcircle10" "lcirclew10" "lcmss8" "lcmssb8" "lcmssi8" + "line10" "linew10")))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (tfm (string-append + out "/share/texmf-dist/fonts/tfm/public/latex-fonts")) + (mf (string-append + out "/share/texmf-dist/fonts/source/public/latex-fonts"))) + (for-each (cut install-file <> tfm) + (find-files "build" "\\.*")) + (for-each (cut install-file <> mf) + (find-files "." "\\.mf")) + #t)))))) + (native-inputs + `(("texlive-bin" ,texlive-bin) + ("texlive-metafont-base" ,texlive-metafont-base) + ("texlive-fonts-cm" ,texlive-fonts-cm))) + (home-page "http://www.ctan.org/pkg/latex-fonts") + (synopsis "Collection of fonts used in LaTeX distributions") + (description "This is a collection of fonts for use with standard LaTeX +packages and classes. It includes invisible fonts (for use with the slides +class), line and circle fonts (for use in the picture environment) and LaTeX +symbol fonts.") + (license license:lppl1.2+))) + +;; This provides etex.src which is needed to build various formats, including +;; luatex.fmt and pdflatex.fmt +(define-public texlive-tex-plain + (package + (name "texlive-tex-plain") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (svn-reference + (url (string-append "svn://www.tug.org/texlive/tags/" + %texlive-tag "/Master/texmf-dist/" + "/tex/plain")) + (revision %texlive-revision))) + (sha256 + (base32 + "1ifmbyl3ir8k0v1g25xjb5rcyy5vhj8a3fa2088nczga09hna5vn")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((target (string-append (assoc-ref %outputs "out") + "/share/texmf-dist/tex/plain"))) + (mkdir-p target) + (copy-recursively (assoc-ref %build-inputs "source") target) + #t)))) + (home-page "https://www.ctan.org/pkg/plain") + (synopsis "Plain TeX format and supporting files") + (description + "Contains files used to build the Plain TeX format, as described in the +TeXbook, together with various supporting files (some also discussed in the +book).") + (license license:knuth))) + +(define-public texlive-latex-base + (let ((texlive-dir + (lambda (dir hash) + (origin + (method svn-fetch) + (uri (svn-reference + (url (string-append "svn://www.tug.org/texlive/tags/" + %texlive-tag "/Master/texmf-dist/" + dir)) + (revision %texlive-revision))) + (sha256 (base32 hash)))))) + (package + (name "texlive-latex-base") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (texlive-ref "latex" "base")) + (sha256 + (base32 + "1h9pir2hz6i9avc4lrl733p3zf4rpkg8537x1zdbhs91hvhikw9k")))) + (build-system gnu-build-system) + (arguments + `(#:modules ((guix build gnu-build-system) + (guix build utils) + (ice-9 match) + (srfi srfi-1) + (srfi srfi-26)) + #:tests? #f ; no tests + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + ;; Find required fonts + (setenv "TFMFONTS" + (string-append (assoc-ref inputs "texlive-fonts-cm") + "/share/texmf-dist/fonts/tfm/public/cm:" + (assoc-ref inputs "texlive-fonts-latex") + "/share/texmf-dist/fonts/tfm/public/latex-fonts:" + (assoc-ref inputs "texlive-fonts-knuth-lib") + "/share/texmf-dist/fonts/tfm/public/knuth-lib")) + (setenv "TEXINPUTS" + (string-append + (getcwd) ":" + (getcwd) "/build:" + (string-join + (append-map (match-lambda + ((_ . dir) + (find-files dir + (lambda (_ stat) + (eq? 'directory (stat:type stat))) + #:directories? #t + #:stat stat))) + inputs) + ":"))) + + ;; Create an empty texsys.cfg, because latex.ltx wants to include + ;; it. This file must exist and it's fine if it's empty. + (with-output-to-file "texsys.cfg" + (lambda _ (format #t "%"))) + + (mkdir "build") + (mkdir "web2c") + (and (zero? (system* "luatex" "-ini" "-interaction=batchmode" + "-output-directory=build" + "unpack.ins")) + ;; LaTeX and XeTeX require e-TeX, which is enabled only in + ;; extended mode (activated with a leading asterisk). We + ;; should not use luatex here, because that would make the + ;; generated format files incompatible with any other TeX + ;; engine. + + ;; FIXME: XeTeX fails to build because neither + ;; \XeTeXuseglyphmetrics nor \XeTeXdashbreakstate are + ;; defined. + (every + (lambda (format) + (zero? (system* "latex" "-ini" "-interaction=batchmode" + "-output-directory=web2c" + "-translate-file=cp227.tcx" + (string-append "*" format ".ini")))) + '("latex" ;"xetex" + )) + (every + (lambda (format) + (zero? (system* "luatex" "-ini" "-interaction=batchmode" + "-output-directory=web2c" + (string-append format ".ini")))) + '("dviluatex" "dvilualatex" "luatex" "lualatex" "xelatex"))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (target (string-append + out "/share/texmf-dist/tex/latex/base")) + (web2c (string-append + out "/share/texmf-dist/web2c"))) + (mkdir-p target) + (mkdir-p web2c) + (for-each delete-file (find-files "." "\\.(log|aux)$")) + (for-each (cut install-file <> target) + (find-files "build" ".*")) + (for-each (cut install-file <> web2c) + (find-files "web2c" ".*")) + #t)))))) + (native-inputs + `(("texlive-bin" ,texlive-bin) + ("texlive-generic-unicode-data" ,texlive-generic-unicode-data) + ("texlive-generic-dehyph-exptl" ,texlive-generic-dehyph-exptl) + ("texlive-generic-tex-ini-files" ,texlive-generic-tex-ini-files) + ("texlive-latex-latexconfig" + ,(texlive-dir "tex/latex/latexconfig/" + "1zb3j49cj8p75yph6c8iysjp7qbdvghwf0mn9j0l7qq3qkbz2xaf")) + ("texlive-generic-hyph-utf8" ,texlive-generic-hyph-utf8) + ("texlive-generic-hyphen" + ,(texlive-dir "tex/generic/hyphen/" + "0xim36wybw2625yd0zwlp9m2c2xrcybw58gl4rih9nkph0wqwwhd")) + ("texlive-generic-ruhyphen" + ,(texlive-dir "tex/generic/ruhyphen/" + "14rjkpl4zkjqs13rcf9kcd24mn2kx7i1jbdwxq8ds94bi66ylzsd")) + ("texlive-generic-ukrhyph" + ,(texlive-dir "tex/generic/ukrhyph/" + "1cfwdg2rhbayl3w0x1xqd36d45zbc96f029myp13s7cb6kbmbppv")) + ("texlive-generic-config" + ,(texlive-dir "tex/generic/config/" + "19vj088p4kkp6xll0141m4kl6ssgdzhs3g10i232khb07aqiag8s")) + ("texlive-tex-plain" ,texlive-tex-plain) + ("texlive-fonts-cm" ,texlive-fonts-cm) + ("texlive-fonts-latex" ,texlive-fonts-latex) + ("texlive-fonts-knuth-lib" ,texlive-fonts-knuth-lib))) + (home-page "http://www.ctan.org/pkg/latex-base") + (synopsis "Base sources of LaTeX") + (description + "This bundle comprises the source of LaTeX itself, together with several +packages which are considered \"part of the kernel\". This bundle, together +with the required packages, constitutes what every LaTeX distribution should +contain.") + (license license:lppl1.3c+)))) + +(define-public texlive-latex-filecontents + (package + (name "texlive-latex-filecontents") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (texlive-ref "latex" "filecontents")) + (sha256 + (base32 + "0swkbxv8vg0yizadfnvrwjb4cj0pn34v9wm6v7wqq903fdav7k7q")))) + (build-system texlive-build-system) + (arguments '(#:tex-directory "latex/filecontents")) + (home-page "http://www.ctan.org/pkg/filecontents") + (synopsis "Extended filecontents and filecontents* environments") + (description + "LaTeX2e's @code{filecontents} and @code{filecontents*} environments +enable a LaTeX source file to generate external files as it runs through +LaTeX. However, there are two limitations of these environments: they refuse +to overwrite existing files, and they can only be used in the preamble of a +document. The filecontents package removes these limitations, letting you +overwrite existing files and letting you use @code{filecontents} / +@code{filecontents*} anywhere.") + (license license:lppl1.3c+))) + +(define-public texlive-generic-ifxetex + (package + (name "texlive-generic-ifxetex") + (version "0.6") + (source (origin + (method svn-fetch) + (uri (texlive-ref "generic" "ifxetex")) + (sha256 + (base32 + "0w2xj7n0szavj329kds09q626szkc378p3w0sk022q0ln4ksz86d")))) + (build-system texlive-build-system) + (arguments + '(#:tex-directory "generic/ifxetex" + #:tex-format "xelatex")) + (inputs + `(("texlive-latex-filecontents" ,texlive-latex-filecontents))) + (home-page "http://www.ctan.org/pkg/ifxetex") + (synopsis "Am I running under XeTeX?") + (description + "This is a simple package which provides an @code{\\ifxetex} conditional, +so that other code can determine that it is running under XeTeX. The package +requires the etexe-TeX extensions to the TeX primitive set.") + (license license:lppl1.3c+))) + +(define-public texlive-latex-fancyvrb + (package + (name "texlive-latex-fancyvrb") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (texlive-ref "latex" "fancyvrb")) + (sha256 + (base32 + "03l7140y031rr14h02i4z9zqsfvrbn7wzwxbjsrjcgrk6sdr71wv")))) + (build-system texlive-build-system) + (arguments + '(#:tex-directory "latex/fancyvrb" + ;; We exclude "fvrb-ex" to avoid a dependency on texlive-luaotfload and + ;; thus texlive-luatex-lualibs. + #:build-targets '("fancyvrb.ins"))) + (home-page "http://www.ctan.org/pkg/fancyvrb") + (synopsis "Sophisticated verbatim text") + (description + "This package provides tools for the flexible handling of verbatim text +including: verbatim commands in footnotes; a variety of verbatim environments +with many parameters; ability to define new customized verbatim environments; +save and restore verbatim text and environments; write and read files in +verbatim mode; build \"example\" environments (showing both result and +verbatim source).") + (license license:lppl1.0+))) + +(define-public texlive-latex-graphics + (package + (name "texlive-latex-graphics") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (texlive-ref "latex" "graphics")) + (sha256 + (base32 + "17ka701xr9nqsjlhz30hphr8d9j4zzwgv5zl5r2f118yzqh9c34v")))) + (build-system texlive-build-system) + (arguments + '(#:tex-directory "latex/graphics" + #:phases + (modify-phases %standard-phases + (add-after 'install 'install-config + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((cfg (assoc-ref inputs "graphics-cfg")) + (target (string-append (assoc-ref outputs "out") + "/share/texmf-dist/tex/latex/graphics-cfg"))) + (mkdir-p target) + (install-file (string-append cfg "/graphics.cfg") target) + (install-file (string-append cfg "/color.cfg") target) + #t))) + (add-after 'install 'install-defs + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((def (assoc-ref inputs "graphics-def")) + (target (string-append (assoc-ref outputs "out") + "/share/texmf-dist/tex/latex/graphics-def"))) + (mkdir-p target) + (copy-recursively def target) + #t)))))) + (native-inputs + `(("graphics-cfg" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/latex3/graphics-cfg.git") + (commit "19d1238af17df376cd46333b229579b0f7f3a41f"))) + (sha256 + (base32 + "12kbgbm52gmmgn8zajb74s8n5rvnxcfdvs3iyj8vcw5vrsw5i6mh")))) + ("graphics-def" + ,(origin + (method svn-fetch) + (uri (svn-reference + (url (string-append "svn://www.tug.org/texlive/tags/" + %texlive-tag "/Master/texmf-dist/" + "/tex/latex/graphics-def")) + (revision %texlive-revision))) + (sha256 + (base32 + "1q5l0x3jsy74v0zq4c9g0x0rb9jfzf7cbhdzkbchyydv49iav802")))))) + (home-page "http://www.ctan.org/pkg/latex-graphics") + (synopsis "LaTeX standard graphics bundle") + (description + "This is a collection of LaTeX packages for producing color, including +graphics (e.g. PostScript) files, and rotation and scaling of text in LaTeX +documents. It comprises the packages color, graphics, graphicx, trig, epsfig, +keyval, and lscape.") + ;; The configuration files are released under CC0. + (license (list license:lppl1.3c+ + license:cc0)))) + +(define-public texlive-latex-xcolor + (package + (name "texlive-latex-xcolor") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (texlive-ref "latex" "xcolor")) + (sha256 + (base32 + "01n613s7bcrd2n4jfawm0k4nn2ny3aaifp2jjfif3lz4sbv31494")))) + (build-system texlive-build-system) + (arguments '(#:tex-directory "latex/xcolor")) + (home-page "http://www.ctan.org/pkg/xcolor") + (synopsis "Driver-independent color extensions for LaTeX and pdfLaTeX") + (description + "The package starts from the basic facilities of the colorcolor package, +and provides easy driver-independent access to several kinds of color tints, +shades, tones, and mixes of arbitrary colors. It allows a user to select a +document-wide target color model and offers complete tools for conversion +between eight color models. Additionally, there is a command for alternating +row colors plus repeated non-aligned material (like horizontal lines) in +tables.") + (license license:lppl1.2+))) + +(define-public texlive-latex-hyperref + (package + (name "texlive-latex-hyperref") + (version "6.84a2") + ;; The sources in the TeX Live SVN repository do not contain hluatex.dtx, + ;; so we fetch the release from GitHub. + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/ho-tex/hyperref/" + "archive/release-" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1d3rmjgzh0025a1dza55zb6nzzlgd1y9snwx45wq1c1vf42m79h2")))) + (build-system texlive-build-system) + (arguments '(#:tex-directory "latex/hyperref")) + (home-page "http://www.ctan.org/pkg/hyperref") + (synopsis "Extensive support for hypertext in LaTeX") + (description + "The hyperref package is used to handle cross-referencing commands in +LaTeX to produce hypertext links in the document. The package provides +backends for the special set defined for HyperTeX DVI processors; for embedded +pdfmark commands for processing by Acrobat Distiller (dvips and dvipsone); for +dviwindo; for PDF control within pdfTeX and dvipdfm; for TeX4ht; and for VTeX +pdf and HTML backends. The package is distributed with the backref and +nameref packages, which make use of the facilities of hyperref.") + (license license:lppl1.3+))) + +(define-public texlive-latex-oberdiek + (package + (name "texlive-latex-oberdiek") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (texlive-ref "latex" "oberdiek")) + (sha256 + (base32 + "0aswvsxgsn709xmvpcg50d2xl7vcy1ckdxb9c1cligqqfjjvviqf")))) + (build-system texlive-build-system) + (arguments + '(#:tex-directory "latex/oberdiek" + #:phases + (modify-phases %standard-phases + ;; "ifpdf.ins" is not generated, so we cannot process it. + (add-after 'unpack 'do-not-process-ifpdf.ins + (lambda _ + (substitute* "oberdiek.ins" + (("\\\\batchinput\\{ifpdf.ins\\}") "")) + #t))))) + (home-page "http://www.ctan.org/pkg/oberdiek") + (synopsis "Bundle of packages submitted by Heiko Oberdiek") + (description + "The bundle comprises various LaTeX packages, providing among others: +better accessibility support for PDF files; extensible chemists reaction +arrows; record information about document class(es) used; and many more.") + (license license:lppl1.3+))) + +(define-public texlive-latex-tools + (package + (name "texlive-latex-tools") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (texlive-ref "latex" "tools")) + (sha256 + (base32 + "052a0pch2k5zls5jlay9xxcf93rw3i60a2x28y3ip3rhbsv3xgiz")))) + (build-system texlive-build-system) + (arguments + '(#:tex-directory "latex/tools" + #:build-targets '("tools.ins"))) + (home-page "http://www.ctan.org/pkg/latex-tools") + (synopsis "LaTeX standard tools bundle") + (description + "This package is a collection of (variously) simple tools provided as +part of the LaTeX required tools distribution, comprising the following +packages: afterpage, array, bm, calc, dcolumn, delarray, enumerate, fileerr, +fontsmpl, ftnright, hhline, indentfirst, layout, longtable, multicol, +rawfonts, showkeys, somedefs, tabularx, theorem, trace, varioref, verbatim, +xr, and xspace.") + (license license:lppl1.3+))) + +(define-public texlive-latex-url + (package + (name "texlive-latex-url") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (svn-reference + (url (string-append "svn://www.tug.org/texlive/tags/" + %texlive-tag "/Master/texmf-dist/" + "/tex/latex/url")) + (revision %texlive-revision))) + (sha256 + (base32 + "184s2543cwia5l7iibhlkl1ffbncfhjpv5p56zq0c15by5sghlac")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((target (string-append (assoc-ref %outputs "out") + "/share/texmf-dist/tex/latex/url"))) + (mkdir-p target) + (copy-recursively (assoc-ref %build-inputs "source") target) + #t)))) + (home-page "https://www.ctan.org/pkg/url") + (synopsis "Verbatim with URL-sensitive line breaks") + (description "The command @code{\\url} is a form of verbatim command that +allows linebreaks at certain characters or combinations of characters, accepts +reconfiguration, and can usually be used in the argument to another command. +The command is intended for email addresses, hypertext links, +directories/paths, etc., which normally have no spaces, so by default the +package ignores spaces in its argument. However, a package option allows +spaces, which is useful for operating systems where spaces are a common part +of file names.") + ;; The license header states that it is under LPPL version 2 or later, but + ;; the latest version is 1.3c. + (license license:lppl1.3c+))) + +(define-public texlive-latex-l3kernel + (package + (name "texlive-latex-l3kernel") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (texlive-ref "latex" "l3kernel")) + (sha256 + (base32 + "0ndqw0flhl20f4ny5lssp8rqpnj5kglyg59whbdrxbh2zc7w7j0b")))) + (build-system texlive-build-system) + (arguments + '(#:tex-directory "latex/l3kernel")) + (home-page "http://www.ctan.org/pkg/l3kernel") + (synopsis "LaTeX3 programmers’ interface") + (description + "The l3kernel bundle provides an implementation of the LaTeX3 +programmers’ interface, as a set of packages that run under LaTeX 2e. The +interface provides the foundation on which the LaTeX3 kernel and other future +code are built: it is an API for TeX programmers. The packages are set up so +that the LaTeX3 conventions can be used with regular LaTeX 2e packages.") + (license license:lppl1.3c+))) + +(define-public texlive-latex-l3packages + (package + (name "texlive-latex-l3packages") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (texlive-ref "latex" "l3packages")) + (sha256 + (base32 + "1p1y9my6ccmp2ab91fzqqgih8ifrk4y3wyh397kagiq9f6a6v91f")))) + (build-system texlive-build-system) + (arguments + '(#:tex-directory "latex/l3packages" + #:phases + (modify-phases %standard-phases + ;; All package sources are in sub-directories, so we need to add them + ;; to TEXINPUTS. + (add-after 'unpack 'set-TEXINPUTS + (lambda _ + (let ((cwd (getcwd))) + (setenv "TEXINPUTS" + (string-append cwd "/l3keys2e:" + cwd "/xparse:" + cwd "/xfrac:" + cwd "/xfp:" + cwd "/xtemplate"))) + #t))))) + (inputs + `(("texlive-latex-l3kernel" ,texlive-latex-l3kernel))) + (home-page "http://www.ctan.org/pkg/l3packages") + (synopsis "High-level LaTeX3 concepts") + (description + "This bundle holds prototype implementations of concepts for a LaTeX +designer interface, to be used with the experimental LaTeX kernel as +programming tools and kernel sup­port. Packages provided in this release are: + +@enumerate +@item l3keys2e, which makes the facilities of the kernel module l3keys + available for use by LaTeX 2e packages; +@item xfrac, which provides flexible splitlevel fractions; +@item xparse, which provides a high-level interface for declaring document + commands; and +@item xtemplate, which provides a means of defining generic functions using a + key-value syntax. +@end enumerate\n") + (license license:lppl1.3c+))) + +(define-public texlive-latex-fontspec + (package + (name "texlive-latex-fontspec") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (texlive-ref "latex" "fontspec")) + (sha256 + (base32 + "1rx43y5xmjqvc27pjdnmqwp4pcw3czcfd6nfpmzc1gnqfl1hlc0q")))) + (build-system texlive-build-system) + (arguments + '(#:tex-directory "latex/fontspec" + #:build-targets '("fontspec.dtx"))) + (inputs + `(("texlive-latex-l3kernel" ,texlive-latex-l3kernel))) + (home-page "http://www.ctan.org/pkg/fontspec") + (synopsis "Advanced font selection in XeLaTeX and LuaLaTeX") + (description + "Fontspec is a package for XeLaTeX and LuaLaTeX. It provides an +automatic and unified interface to feature-rich AAT and OpenType fonts through +the NFSS in LaTeX running on XeTeX or LuaTeX engines. The package requires +the l3kernel and xparse bundles from the LaTeX 3 development team.") + (license license:lppl1.3+))) + +;; The SVN directory contains little more than a dtx file that generates three +;; of the many lua files that should be installed as part of this package. +;; This is why we take the release from GitHub instead. +(define-public texlive-luatex-lualibs + (package + (name "texlive-luatex-lualibs") + (version "2.5") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/lualatex/lualibs/" + "releases/download/v" + version "/lualibs.zip")) + (sha256 + (base32 + "1xx9blvrmx9hyhrl345lpai9m6xxnw997261a1ahn1bm5r2j5fqy")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (list (string-append "DESTDIR=" + (assoc-ref %outputs "out") + "/share/texmf-dist")) + #:phases + (modify-phases %standard-phases + (delete 'configure)))) + (native-inputs + `(("texlive-bin" ,texlive-bin) + ("unzip" ,unzip) + ("zip" ,zip))) + (home-page "https://github.com/lualatex/lualibs") + (synopsis "Lua modules for general programming (in the (La)TeX world)") + (description + "Lualibs is a collection of Lua modules useful for general programming. +The bundle is based on Lua modules shipped with ConTeXt, and made available in +this bundle for use independent of ConTeXt.") + ;; GPL version 2 only + (license license:gpl2))) + +(define-public texlive-latex-amsmath + (package + (name "texlive-latex-amsmath") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (texlive-ref "latex" "amsmath")) + (sha256 + (base32 + "178ywjpdlv78qmfzqdyn6gy14620zjsn2q9wap76fbr9s4hw6dba")))) + (build-system texlive-build-system) + (arguments '(#:tex-directory "latex/amsmath")) + (home-page "http://www.ctan.org/pkg/amsmath") + (synopsis "AMS mathematical facilities for LaTeX") + (description + "This is the principal package in the AMS-LaTeX distribution. It adapts +for use in LaTeX most of the mathematical features found in AMS-TeX; it is +highly recommended as an adjunct to serious mathematical typesetting in LaTeX. +When amsmath is loaded, AMS-LaTeX packages @code{amsbsyamsbsy} (for bold +symbols), @code{amsopnamsopn} (for operator names) and +@code{amstextamstext} (for text embedded in mathematics) are also loaded. +This package is part of the LaTeX required distribution; however, several +contributed packages add still further to its appeal; examples are +@code{empheqempheq}, which provides functions for decorating and highlighting +mathematics, and @code{ntheoremntheorem}, for specifying theorem (and similar) +definitions.") + (license license:lppl1.3c+))) + +(define-public texlive-latex-amscls + (package + (name "texlive-latex-amscls") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (texlive-ref "latex" "amscls")) + (sha256 + (base32 + "0jmcr37mcdi7drczppvr6lmz5d5yd9m67ii79gp2nglg1xpw934j")))) + (build-system texlive-build-system) + (arguments + `(#:tex-directory "latex/amscls")) + (home-page "http://www.ctan.org/pkg/amscls") + (synopsis "AMS document classes for LaTeX") + (description + "This bundle contains three AMS classes: @code{amsartamsart} (for writing +articles for the AMS), @code{amsbookamsbook} (for books) and +@code{amsprocamsproc} (for proceedings), together with some supporting +material. The material is made available as part of the AMS-LaTeX +distribution.") + (license license:lppl1.3c+))) + +(define-public texlive-latex-babel + (package + (name "texlive-latex-babel") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (texlive-ref "latex" "babel")) + (sha256 + (base32 + "1n3i5adsyy7jw0imnzrm2i8wkf73i3mjk9h3ic8cb9cd19i4r9r3")))) + (build-system texlive-build-system) + (arguments + '(#:tex-directory "latex/babel" + #:phases + (modify-phases %standard-phases + ;; This package tries to produce babel.aux twice but refuses to + ;; overwrite the first one. + (add-before 'build 'fix-ins + (lambda _ + (substitute* "babel.ins" + (("askonceonly") "askforoverwritefalse")) + #t))))) + (home-page "http://www.ctan.org/pkg/babel") + (synopsis "Multilingual support for Plain TeX or LaTeX") + (description + "The package manages culturally-determined typographical (and other) +rules, and hyphenation patterns for a wide range of languages. A document may +select a single language to be supported, or it may select several, in which +case the document may switch from one language to another in a variety of +ways. Babel uses contributed configuration files that provide the detail of +what has to be done for each language. Users of XeTeX are advised to use the +polyglossia package rather than Babel.") + (license license:lppl1.3+))) + +(define-public texlive-latex-cyrillic + (package + (name "texlive-latex-cyrillic") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (texlive-ref "latex" "cyrillic")) + (sha256 + (base32 + "1mdhl35hwas68ki56qqngzar37dwv4mm64l2canihr255bz34lbv")))) + (build-system texlive-build-system) + (arguments + '(#:tex-directory "latex/cyrillic")) + (home-page "http://www.ctan.org/pkg/latex-cyrillic") + (synopsis "Support for Cyrillic fonts in LaTeX") + (description + "This bundle of macros files provides macro support (including font +encoding macros) for the use of Cyrillic characters in fonts encoded under the +T2* and X2 encodings. These encodings cover (between them) pretty much every +language that is written in a Cyrillic alphabet.") + (license license:lppl1.3c+))) + +(define-public texlive-latex-psnfss + (package + (name "texlive-latex-psnfss") + (version (number->string %texlive-revision)) + (source (origin + (method svn-fetch) + (uri (texlive-ref "latex" "psnfss")) + (sha256 + (base32 + "1920dcq8613yzprasbg80fh4fcjcidvvl54wkx438nimyxcri7qz")))) + (build-system texlive-build-system) + (arguments '(#:tex-directory "latex/psnfss")) + (home-page "http://www.ctan.org/pkg/psnfss") + (synopsis "Font support for common PostScript fonts") + (description + "The PSNFSS collection includes a set of files that provide a complete +working setup of the LaTeX font selection scheme (NFSS2) for use with common +PostScript fonts. It covers the so-called \"Base\" fonts (which are built +into any Level 2 PostScript printing device and the Ghostscript interpreter) +and a number of free fonts. It provides font definition files, macros and +font metrics. The bundle as a whole is part of the LaTeX required set of +packages.") + (license license:lppl1.2+))) + +(define-public texlive-union + (lambda* (#:optional (packages '())) + "Return 'texlive-union' package which is a union of PACKAGES and the +standard LaTeX packages." + (let ((default-packages + (list texlive-bin + texlive-dvips + texlive-fonts-cm + texlive-fonts-latex + texlive-metafont-base + texlive-latex-base + ;; LaTeX packages from the "required" set. + texlive-latex-amsmath + texlive-latex-amscls + texlive-latex-babel + texlive-latex-cyrillic + texlive-latex-graphics + texlive-latex-psnfss + texlive-latex-tools))) + (package + (name "texlive-union") + (version (number->string %texlive-revision)) + (source #f) + (build-system trivial-build-system) + (arguments + '(#:modules ((guix build union) + (guix build utils) + (guix build texlive-build-system) + (guix build gnu-build-system) + (guix build gremlin) + (guix elf)) + #:builder + (begin + (use-modules (ice-9 match) + (srfi srfi-26) + (guix build union) + (guix build utils) + (guix build texlive-build-system)) + (let* ((out (assoc-ref %outputs "out")) + (texmf.cnf (string-append out "/share/texmf-dist/web2c/texmf.cnf"))) + ;; Build a modifiable union of all inputs (but exclude bash) + (match (filter (match-lambda + ((name . _) + (not (string=? "bash" name)))) + %build-inputs) + (((names . directories) ...) + (union-build (assoc-ref %outputs "out") + directories + #:create-all-directories? #t))) + + ;; The configuration file "texmf.cnf" is provided by the + ;; "texlive-bin" package. We take it and override only the + ;; setting for TEXMFROOT and TEXMF. This file won't be consulted + ;; by default, though, so we still need to set TEXMFCNF. + (substitute* texmf.cnf + (("^TEXMFROOT = .*") + (string-append "TEXMFROOT = " out "/share\n")) + (("^TEXMF = .*") + "TEXMF = $TEXMFROOT/share/texmf-dist\n")) + (setenv "PATH" (string-append (assoc-ref %build-inputs "bash") + "/bin")) + (for-each + (cut wrap-program <> + `("TEXMFCNF" ":" = (,(dirname texmf.cnf))) + `("TEXMF" ":" = (,(string-append out "/share/texmf-dist")))) + (find-files (string-append out "/bin") ".*")) + #t)))) + (inputs + `(("bash" ,bash) + ,@(map (lambda (package) + (list (package-name package) package)) + (append default-packages packages)))) + (home-page (package-home-page texlive-bin)) + (synopsis "Union of TeX Live packages") + (description "This package provides a subset of the TeX Live +distribution.") + (license (fold (lambda (package result) + (match (package-license package) + ((lst ...) + (append lst result)) + ((? license:license? license) + (cons license result)))) + '() + (append default-packages packages))))))) + +(define-public texlive-tiny + (package + (inherit (texlive-union)) + (name "texlive-tiny") + (description "This is a very limited subset of the TeX Live distribution. +It includes little more than the required set of LaTeX packages."))) + (define texlive-texmf (package (name "texlive-texmf") diff --git a/gnu/packages/tmux.scm b/gnu/packages/tmux.scm index 5b92df88ae..0ffc3b9980 100644 --- a/gnu/packages/tmux.scm +++ b/gnu/packages/tmux.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2016 Matthew Jordan ;;; Copyright © 2017 Vasile Dumitrascu +;;; Copyright © 2017 Stefan Reichör ;;; ;;; This file is part of GNU Guix. ;;; @@ -89,3 +90,48 @@ (define-public tmux-themepack (description "A collection of various themes for Tmux.") (license (non-copyleft "http://www.wtfpl.net/txt/copying/"))))) + +(define-public tmuxifier + (package + (name "tmuxifier") + (version "0.13.0") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/jimeh/tmuxifier/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1j9fj6zg0j3sdn7svpybzsqh7876rv81zi437976kj7hxnyjkcz7")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f + #:phases (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref %outputs "out")) + (bindir (string-append out "/bin")) + (share (string-append out "/share/" ,name))) + (install-file "bin/tmuxifier" bindir) + (substitute* (string-append bindir "/tmuxifier") + (("set -e") + (string-append "TMUXIFIER=" share "\nset -e"))) + (for-each (lambda (init-script) + (install-file init-script (string-append + share "/init"))) + '("init.sh" "init.tcsh" "init.fish")) + (for-each (lambda (dir) + (copy-recursively dir (string-append + share "/" dir))) + '("completion" "lib" "libexec" + "templates")))))))) + (home-page "https://github.com/jimeh/tmuxifier") + (synopsis "Powerful session, window & pane management for Tmux") + (description "Tmuxifier allows you to easily create, edit, and load +@code{layout} files, which are simple shell scripts where you use the tmux +command and helper commands provided by tmuxifier to manage Tmux sessions and +windows.") + (license expat))) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index cd2576c51a..953440a6fd 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -701,14 +701,14 @@ (define-public gitolite (define-public mercurial (package (name "mercurial") - (version "3.9") + (version "4.2.1") (source (origin (method url-fetch) (uri (string-append "https://www.mercurial-scm.org/" "release/mercurial-" version ".tar.gz")) (sha256 (base32 - "1g6svg7fc1kyaxq653iwsvdh8hp2lrhs2ywazfc436a4zzf2akw3")))) + "182qh6d0srps2n5sydzy8n3gi78la6m0wi3846zpyyd0b8pmgmfp")))) (build-system python-build-system) (arguments `(;; Restrict to Python 2, as Python 3 would require diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 702704ed46..adae0d3d3e 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -482,6 +482,7 @@ (define-public ffmpeg ("libcaca" ,libcaca) ("libcdio-paranoia" ,libcdio-paranoia) ("libtheora" ,libtheora) + ("libva" ,libva) ("libvdpau" ,libvdpau) ("libvorbis" ,libvorbis) ("libvpx" ,libvpx) @@ -1001,7 +1002,7 @@ (define-public libvpx (define-public youtube-dl (package (name "youtube-dl") - (version "2017.06.05") + (version "2017.06.12") (source (origin (method url-fetch) (uri (string-append "https://yt-dl.org/downloads/" @@ -1009,7 +1010,7 @@ (define-public youtube-dl version ".tar.gz")) (sha256 (base32 - "132f4csbl4bv71b01pnqfkd7hbbc6wclrh1h12fr1182954ahk5m")))) + "1p4d8g44v8vgr4xwvmbvzkjz6zakl2r89spaak6yw1zxmymd9b1w")))) (build-system python-build-system) (arguments ;; The problem here is that the directory for the man page and completion diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 398fdf3ae7..10945d4975 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -4621,3 +4621,52 @@ (define-public http-parser Depending on your architecture, it only requires about 40 bytes of data per message stream (in a web server that is per connection).") (license l:expat))) + +(define-public python2-httpretty + (package + (name "python2-httpretty") + (version "0.8.14") + (source + (origin + (method url-fetch) + (uri (pypi-uri "httpretty" version)) + (sha256 + (base32 + "0vlp5qkyw3pxwwsg7xmdcfh1csvypvaz4m6abida8s4xmjxpdhc3")))) + (build-system python-build-system) + (native-inputs + `(("python-sphinx-rtd-theme" ,python2-sphinx-rtd-theme) + ("python-sphinx" ,python2-sphinx) + ("python-coverage" ,python2-coverage) + ("python-tornado" ,python2-tornado) + ("python-urllib3" ,python2-urllib3) + ("python-sure" ,python2-sure) + ("python-steadymark" ,python2-steadymark) + ("python-requests" ,python2-requests) + ("python-rednose" ,python2-rednose) + ("python-nose-randomly" ,python2-nose-randomly) + ("python-misaka" ,python2-misaka) + ("python-pytest-httpbin" ,python2-pytest-httpbin) + ("python-nose" ,python2-nose))) + (arguments + `(#:tests? #f + ;; Requires mock>=1.3.0 which requires a more up-to-date + ;; python-pbr. After updating these trying to build the + ;; package leads to failures in python-flake8 and other + ;; packages. The cascade of updates and failures this + ;; leads to, seems to not be worth having the test run. + #:python ,python-2 + #:phases + (modify-phases %standard-phases + (add-before 'build 'patch-test-requirements + (lambda* (#:key inputs #:allow-other-keys) + ;; Update requirements from dependecy==version + ;; to dependency>=version + (substitute* "development.txt" + (("==") ">=")) + #t))))) + (home-page "http://github.com/gabrielfalcao/httpretty") + (synopsis "HTTP client mock for Python") + (description "@code{httpretty} is a helper for faking web requests, +inspired by Ruby's @code{fakeweb}.") + (license l:expat))) diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm index c8786dd69b..d7d1372dd2 100644 --- a/gnu/packages/xfce.scm +++ b/gnu/packages/xfce.scm @@ -39,6 +39,7 @@ (define-module (gnu packages xfce) #:use-module (gnu packages xdisorg) #:use-module (gnu packages web) #:use-module (gnu packages fontutils) + #:use-module (gnu packages freedesktop) #:use-module (gnu packages image) #:use-module (gnu packages gnome) #:use-module (gnu packages pdf) diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 9635413b8f..a6bea3588f 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2015 Eric Bavier ;;; Copyright © 2015 Sou Bunnbu ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus -;;; Copyright © 2015, 2016 Mark H Weaver +;;; Copyright © 2015, 2016, 2017 Mark H Weaver ;;; Copyright © 2015, 2016 Efraim Flashner ;;; Copyright © 2015 Raimon Grau ;;; Copyright © 2016 Mathieu Lirzin @@ -56,6 +56,7 @@ (define-public expat (package (name "expat") (version "2.2.0") + (replacement expat-2.2.1) (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/expat/expat/" @@ -74,6 +75,19 @@ (define-public expat things the parser might find in the XML document (like start tags).") (license license:expat))) +(define expat-2.2.1 ; Fixes CVE-2017-9233, CVE-2016-9063 and other issues. + (package + (inherit expat) + (version "2.2.1") + (replacement #f) + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/expat/expat/" + version "/expat-" version ".tar.bz2")) + (sha256 + (base32 + "11c8jy1wvllvlk7xdc5cm8hdhg0hvs8j0aqy6s702an8wkdcls0q")))))) + (define-public libxml2 (package (name "libxml2") diff --git a/gnu/packages/zip.scm b/gnu/packages/zip.scm index 8feb4fea21..018891359b 100644 --- a/gnu/packages/zip.scm +++ b/gnu/packages/zip.scm @@ -136,6 +136,12 @@ (define-public zziplib (uri (string-append "mirror://sourceforge/zziplib/zziplib13/" version "/zziplib-" version ".tar.bz2")) + (patches (search-patches "zziplib-CVE-2017-5974.patch" + "zziplib-CVE-2017-5975.patch" + "zziplib-CVE-2017-5976.patch" + "zziplib-CVE-2017-5978.patch" + "zziplib-CVE-2017-5979.patch" + "zziplib-CVE-2017-5981.patch")) (sha256 (base32 "0nsjqxw017hiyp524p9316283jlf5piixc1091gkimhz38zh7f51")))) diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm index 6ac24e32b0..b9e3fa70a4 100644 --- a/gnu/services/admin.scm +++ b/gnu/services/admin.scm @@ -27,8 +27,17 @@ (define-module (gnu services admin) #:use-module (guix packages) #:use-module (guix records) #:use-module (srfi srfi-1) + #:use-module (ice-9 vlist) #:export (%default-rotations %rotated-files + + log-rotation + log-rotation? + log-rotation-frequency + log-rotation-files + log-rotation-options + log-rotation-post-rotate + rottlog-configuration rottlog-configuration? rottlog-service @@ -40,41 +49,78 @@ (define-module (gnu services admin) ;;; /etc/rottlog/{rc,hourly|daily|weekly}. Example usage ;;; ;;; (mcron-service) -;;; (service rottlog-service-type (rottlog-configuration)) +;;; (service rottlog-service-type) ;;; ;;; Code: +(define-record-type* log-rotation make-log-rotation + log-rotation? + (files log-rotation-files) ;list of strings + (frequency log-rotation-frequency ;symbol + (default 'weekly)) + (post-rotate log-rotation-post-rotate ;#f | gexp + (default #f)) + (options log-rotation-options ;list of strings + (default '()))) + (define %rotated-files ;; Syslog files subject to rotation. '("/var/log/messages" "/var/log/secure" "/var/log/maillog")) -(define (syslog-rotation-config files) - #~(string-append #$(string-join files ",") - " { - sharedscripts - postrotate - " #$coreutils "/bin/kill -HUP $(cat /var/run/syslog.pid) 2> /dev/null - endscript -} -")) - -(define (simple-rotation-config files) - #~(string-append #$(string-join files ",") " { - sharedscripts -} -")) - (define %default-rotations - `(("weekly" - ,(computed-file "rottlog.weekly" - #~(call-with-output-file #$output - (lambda (port) - (display #$(syslog-rotation-config %rotated-files) - port) - (display #$(simple-rotation-config - '("/var/log/shepherd.log" - "/var/log/guix-daemon.log")) - port))))))) + (list (log-rotation ;syslog files + (files %rotated-files) + + ;; Restart syslogd after rotation. + (options '("sharedscripts")) + (post-rotate #~(let ((pid (call-with-input-file "/var/run/syslog.pid" + read))) + (kill pid SIGHUP)))) + (log-rotation + (files '("/var/log/shepherd.log" "/var/log/guix-daemon.log"))))) + +(define (log-rotation->config rotation) + "Return a string-valued gexp representing the rottlog configuration snippet +for ROTATION." + (define post-rotate + (let ((post (log-rotation-post-rotate rotation))) + (and post + (program-file "rottlog-post-rotate.scm" post)))) + + #~(let ((post #$post-rotate)) + (string-append (string-join '#$(log-rotation-files rotation) ",") + " {" + #$(string-join (log-rotation-options rotation) + "\n " 'prefix) + (if post + (string-append "\n postrotate\n " post + "\n endscript\n") + "") + "\n}\n"))) + +(define (log-rotations->/etc-entries rotations) + "Return the list of /etc entries for ROTATIONS, a list of ." + (define (frequency-file frequency rotations) + (computed-file (string-append "rottlog." (symbol->string frequency)) + #~(call-with-output-file #$output + (lambda (port) + (for-each (lambda (str) + (display str port)) + (list #$@(map log-rotation->config + rotations))))))) + + (let* ((frequencies (delete-duplicates + (map log-rotation-frequency rotations))) + (table (fold (lambda (rotation table) + (vhash-consq (log-rotation-frequency rotation) + rotation table)) + vlist-null + rotations))) + (map (lambda (frequency) + `(,(symbol->string frequency) + ,(frequency-file frequency + (vhash-foldq* cons '() frequency table)))) + frequencies))) (define (default-jobs rottlog) (list #~(job '(next-hour '(0)) ;midnight @@ -91,15 +137,17 @@ (define-record-type* (default rottlog)) (rc-file rottlog-rc-file ;file-like (default (file-append rottlog "/etc/rc"))) - (periodic-rotations rottlog-periodic-rotations ;list of (name file) tuples + (rotations rottlog-rotations ;list of (default %default-rotations)) (jobs rottlog-jobs ;list of (default #f))) (define (rottlog-etc config) - `(("rottlog" ,(file-union "rottlog" - (cons `("rc" ,(rottlog-rc-file config)) - (rottlog-periodic-rotations config)))))) + `(("rottlog" + ,(file-union "rottlog" + (cons `("rc" ,(rottlog-rc-file config)) + (log-rotations->/etc-entries + (rottlog-rotations config))))))) (define (rottlog-jobs-or-default config) (or (rottlog-jobs config) @@ -116,6 +164,12 @@ (define rottlog-service-type ;; the documentation. (service-extension profile-service-type (compose list rottlog-rottlog)))) + (compose concatenate) + (extend (lambda (config rotations) + (rottlog-configuration + (inherit config) + (rotations (append (rottlog-rotations config) + rotations))))) (default-value (rottlog-configuration)))) ;;; admin.scm ends here diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm index 6beabc4b3b..88a9a86111 100644 --- a/gnu/services/cuirass.scm +++ b/gnu/services/cuirass.scm @@ -26,6 +26,7 @@ (define-module (gnu services cuirass) #:use-module (gnu services) #:use-module (gnu services base) #:use-module (gnu services shepherd) + #:use-module (gnu services admin) #:use-module (gnu system shadow) #:export ( cuirass-configuration @@ -138,6 +139,13 @@ (define (cuirass-activation config) (chown #$cache uid gid) (chown #$db uid gid)))))) +(define (cuirass-log-rotations config) + "Return the list of log rotations that corresponds to CONFIG." + (list (log-rotation + (files (list (cuirass-configuration-log-file config))) + (frequency 'weekly) + (options '("rotate 40"))))) ;worth keeping + (define cuirass-service-type (service-type (name 'cuirass) @@ -145,6 +153,7 @@ (define cuirass-service-type (list (service-extension profile-service-type ;for 'info cuirass' (compose list cuirass-configuration-cuirass)) + (service-extension rottlog-service-type cuirass-log-rotations) (service-extension activation-service-type cuirass-activation) (service-extension shepherd-root-service-type cuirass-shepherd-service) (service-extension account-service-type cuirass-account))))) diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index ad5e6b75bb..392737d078 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -489,20 +489,21 @@ (define (virtfs-option fs) #$@(map virtfs-option shared-fs) "-vga std" (format #f "-drive file=~a,if=virtio,cache=writeback,werror=report,readonly" - #$image) - "-m 256")) + #$image))) (define* (system-qemu-image/shared-store-script os #:key (qemu qemu) (graphic? #t) + (memory-size 256) (mappings '()) full-boot? (disk-image-size (* (if full-boot? 500 70) (expt 2 20)))) "Return a derivation that builds a script to run a virtual machine image of -OS that shares its store with the host. +OS that shares its store with the host. The virtual machine runs with +MEMORY-SIZE MiB of memory. MAPPINGS is a list of specifying mapping of host file systems into the guest. @@ -531,7 +532,8 @@ (define qemu-exec (string-join #$kernel-arguments " ")))) #$@(common-qemu-options image (map file-system-mapping-source - (cons %store-mapping mappings))))) + (cons %store-mapping mappings))) + "-m " (number->string #$memory-size))) (define builder #~(call-with-output-file #$output diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm index f5bbfafee3..8389b67f68 100644 --- a/gnu/tests/base.scm +++ b/gnu/tests/base.scm @@ -446,20 +446,6 @@ (define test (define marionette (make-marionette (list #$command))) - (define (wait-for-file file) - ;; Wait until FILE exists in the guest; 'read' its content and - ;; return it. - (marionette-eval - `(let loop ((i 10)) - (cond ((file-exists? ,file) - (call-with-input-file ,file read)) - ((> i 0) - (sleep 1) - (loop (- i 1))) - (else - (error "file didn't show up" ,file)))) - marionette)) - (mkdir #$output) (chdir #$output) @@ -478,12 +464,12 @@ (define (wait-for-file file) ;; runs with the right UID/GID. (test-equal "root's job" '(0 0) - (wait-for-file "/root/witness")) + (wait-for-file "/root/witness" marionette)) ;; Likewise for Alice's job. We cannot know what its GID is since ;; it's chosen by 'groupadd', but it's strictly positive. (test-assert "alice's job" - (match (wait-for-file "/home/alice/witness") + (match (wait-for-file "/home/alice/witness" marionette) ((1000 gid) (>= gid 100)))) @@ -492,7 +478,7 @@ (define (wait-for-file file) ;; that don't have a read syntax, hence the string.) (test-equal "root's job with command" "#" - (wait-for-file "/root/witness-touch")) + (wait-for-file "/root/witness-touch" marionette)) (test-end) (exit (= (test-runner-fail-count (test-runner-current)) 0))))) diff --git a/gnu/tests/messaging.scm b/gnu/tests/messaging.scm index cefb52534a..b76b8e8434 100644 --- a/gnu/tests/messaging.scm +++ b/gnu/tests/messaging.scm @@ -80,21 +80,6 @@ (define marionette (number->string #$port) "-:5222")))) - (define (guest-wait-for-file file) - ;; Wait until FILE exists in the guest; 'read' its content and - ;; return it. - (marionette-eval - `(let loop ((i 10)) - (cond ((file-exists? ,file) - (call-with-input-file ,file read)) - ((> i 0) - (begin - (sleep 1)) - (loop (- i 1))) - (else - (error "file didn't show up" ,file)))) - marionette)) - (define (host-wait-for-file file) ;; Wait until FILE exists in the host. (let loop ((i 60)) @@ -124,7 +109,8 @@ (define (host-wait-for-file file) ;; Check XMPP service's PID. (test-assert "service process id" - (let ((pid (number->string (guest-wait-for-file #$pid-file)))) + (let ((pid (number->string (wait-for-file #$pid-file + marionette)))) (marionette-eval `(file-exists? (string-append "/proc/" ,pid)) marionette))) diff --git a/gnu/tests/ssh.scm b/gnu/tests/ssh.scm index 5f06151081..9c83a9cd48 100644 --- a/gnu/tests/ssh.scm +++ b/gnu/tests/ssh.scm @@ -69,20 +69,6 @@ (define marionette (make-marionette (list #$command "-net" "user,hostfwd=tcp::2222-:22"))) - (define (wait-for-file file) - ;; Wait until FILE exists in the guest; 'read' its content and - ;; return it. - (marionette-eval - `(let loop ((i 10)) - (cond ((file-exists? ,file) - (call-with-input-file ,file read)) - ((> i 0) - (sleep 1) - (loop (- i 1))) - (else - (error "file didn't show up" ,file)))) - marionette)) - (define (make-session-for-test) "Make a session with predefined parameters for a test." (make-session #:user "root" @@ -141,7 +127,7 @@ (define (call-with-connected-session/auth proc) ;; Check sshd's PID file. (test-equal "sshd PID" - (wait-for-file #$pid-file) + (wait-for-file #$pid-file marionette) (marionette-eval '(begin (use-modules (gnu services herd) @@ -166,7 +152,7 @@ (define (call-with-connected-session/auth proc) (channel-open-session channel) (channel-request-exec channel "echo hello > /root/witness") (and (zero? (channel-get-exit-status channel)) - (wait-for-file "/root/witness")))))) + (wait-for-file "/root/witness" marionette)))))) ;; Connect to the guest over SFTP. Make sure we can write and ;; read a file there. diff --git a/guix/build-system/texlive.scm b/guix/build-system/texlive.scm new file mode 100644 index 0000000000..d4085ea7e8 --- /dev/null +++ b/guix/build-system/texlive.scm @@ -0,0 +1,164 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 Ricardo Wurmus +;;; +;;; 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 . + +(define-module (guix build-system texlive) + #:use-module (guix store) + #:use-module (guix utils) + #:use-module (guix packages) + #:use-module (guix derivations) + #:use-module (guix search-paths) + #:use-module (guix build-system) + #:use-module (guix build-system gnu) + #:use-module (guix svn-download) + #:use-module (ice-9 match) + #:export (%texlive-build-system-modules + texlive-build + texlive-build-system + texlive-ref + %texlive-tag + %texlive-revision)) + +;; Commentary: +;; +;; Standard build procedure for Texlive packages. +;; +;; Code: + +;; These variables specify the SVN tag and the matching SVN revision. +(define %texlive-tag "texlive-2017.0") +(define %texlive-revision 44445) + +(define (texlive-ref component id) + "Return a object for the package ID, which is part of the +given Texlive COMPONENT." + (svn-reference + (url (string-append "svn://www.tug.org/texlive/tags/" + %texlive-tag "/Master/texmf-dist/" + "source/" component "/" id)) + (revision %texlive-revision))) + +(define %texlive-build-system-modules + ;; Build-side modules imported by default. + `((guix build texlive-build-system) + ,@%gnu-build-system-modules)) + +(define (default-texlive-bin) + "Return the default texlive-bin package." + ;; Lazily resolve the binding to avoid a circular dependency. + (let ((tex-mod (resolve-interface '(gnu packages tex)))) + (module-ref tex-mod 'texlive-bin))) + +(define (default-texlive-latex-base) + "Return the default texlive-latex-base package." + ;; Lazily resolve the binding to avoid a circular dependency. + (let ((tex-mod (resolve-interface '(gnu packages tex)))) + (module-ref tex-mod 'texlive-latex-base))) + +(define* (lower name + #:key + source inputs native-inputs outputs + system target + (texlive-latex-base (default-texlive-latex-base)) + (texlive-bin (default-texlive-bin)) + #:allow-other-keys + #:rest arguments) + "Return a bag for NAME." + (define private-keywords + '(#:source #:target #:inputs #:native-inputs + #:texlive-latex-base #:texlive-bin)) + + (bag + (name name) + (system system) + (host-inputs `(,@(if source + `(("source" ,source)) + '()) + ,@inputs + + ;; Keep the standard inputs of 'gnu-build-system'. + ,@(standard-packages))) + (build-inputs `(("texlive-bin" ,texlive-bin) + ("texlive-latex-base" ,texlive-latex-base) + ,@native-inputs)) + (outputs outputs) + (build texlive-build) + (arguments (strip-keyword-arguments private-keywords arguments)))) + +(define* (texlive-build store name inputs + #:key + (tests? #f) + tex-directory + (build-targets #f) + (tex-format "luatex") + (phases '(@ (guix build texlive-build-system) + %standard-phases)) + (outputs '("out")) + (search-paths '()) + (system (%current-system)) + (guile #f) + (substitutable? #t) + (imported-modules %texlive-build-system-modules) + (modules '((guix build texlive-build-system) + (guix build utils)))) + "Build SOURCE with INPUTS." + (define builder + `(begin + (use-modules ,@modules) + (texlive-build #:name ,name + #:source ,(match (assoc-ref inputs "source") + (((? derivation? source)) + (derivation->output-path source)) + ((source) + source) + (source + source)) + #:tex-directory ,tex-directory + #:build-targets ,build-targets + #:tex-format ,tex-format + #: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 + ((? package?) + (package-derivation store guile system #:graft? #f)) + (#f ; the default + (let* ((distro (resolve-interface '(gnu packages commencement))) + (guile (module-ref distro 'guile-final))) + (package-derivation store guile system #:graft? #f))))) + + (build-expression->derivation store name builder + #:inputs inputs + #:system system + #:modules imported-modules + #:outputs outputs + #:guile-for-build guile-for-build + #:substitutable? substitutable?)) + +(define texlive-build-system + (build-system + (name 'texlive) + (description "The build system for TeX Live packages") + (lower lower))) + +;;; texlive.scm ends here diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index 2def2a108f..9c082b4352 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -28,6 +28,7 @@ (define-module (guix build syscalls) #:use-module (srfi srfi-9 gnu) #:use-module (srfi srfi-11) #:use-module (srfi srfi-19) + #:use-module (srfi srfi-26) #:use-module (ice-9 rdelim) #:use-module (ice-9 regex) #:use-module (ice-9 match) @@ -68,6 +69,7 @@ (define-module (guix build syscalls) mkdtemp! fdatasync pivot-root + scandir* fcntl-flock set-thread-name @@ -817,6 +819,127 @@ (define pivot-root (list new-root put-old (strerror err)) (list err))))))) + +;;; +;;; Opendir & co. +;;; + +(define-c-struct %struct-dirent-header + sizeof-dirent-header + (lambda (inode offset length type name) + ;; Convert TYPE to symbols like 'stat:type' does. + (let ((type (cond ((= type DT_REG) 'regular) + ((= type DT_LNK) 'symlink) + ((= type DT_DIR) 'directory) + ((= type DT_FIFO) 'fifo) + ((= type DT_CHR) 'char-special) + ((= type DT_BLK) 'block-special) + ((= type DT_SOCK) 'socket) + (else 'unknown)))) + `((type . ,type) + (inode . ,inode)))) + read-dirent-header + write-dirent-header! + (inode int64) + (offset int64) + (length unsigned-short) + (type uint8) + (name uint8)) ;first byte of 'd_name' + +;; Constants for the 'type' field, from . +(define DT_UNKNOWN 0) +(define DT_FIFO 1) +(define DT_CHR 2) +(define DT_DIR 4) +(define DT_BLK 6) +(define DT_REG 8) +(define DT_LNK 10) +(define DT_SOCK 12) +(define DT_WHT 14) + +(define string->pointer/utf-8 + (cut string->pointer <> "UTF-8")) + +(define pointer->string/utf-8 + (cut pointer->string <> <> "UTF-8")) + +(define opendir* + (let ((proc (syscall->procedure '* "opendir" '(*)))) + (lambda* (name #:optional (string->pointer string->pointer/utf-8)) + (let-values (((ptr err) + (proc (string->pointer name)))) + (if (null-pointer? ptr) + (throw 'system-error "opendir*" + "~A: ~A" (list name (strerror err)) + (list err)) + ptr))))) + +(define closedir* + (let ((proc (syscall->procedure int "closedir" '(*)))) + (lambda (directory) + (let-values (((ret err) + (proc directory))) + (unless (zero? ret) + (throw 'system-error "closedir" + "closedir: ~A" (list (strerror err)) + (list err))))))) + +(define readdir* + (let ((proc (syscall->procedure '* "readdir64" '(*)))) + (lambda* (directory #:optional (pointer->string pointer->string/utf-8)) + (let ((ptr (proc directory))) + (and (not (null-pointer? ptr)) + (cons (pointer->string + (make-pointer (+ (pointer-address ptr) + (c-struct-field-offset + %struct-dirent-header name))) + -1) + (read-dirent-header + (pointer->bytevector ptr sizeof-dirent-header)))))))) + +(define* (scandir* name #:optional + (select? (const #t)) + (entrypointer string->pointer/utf-8) + (pointer->string pointer->string/utf-8)) + "This procedure improves on Guile's 'scandir' procedure in several ways: + + 1. Systematically encode decode file names using STRING->POINTER and + POINTER->STRING (UTF-8 by default; this works around a defect in Guile 2.0/2.2 + where 'scandir' decodes file names according to the current locale, which is + not always desirable. + + 2. Each entry that is returned has the form (NAME . PROPERTIES). + PROPERTIES is an alist showing additional properties about the entry, as + found in 'struct dirent'. An entry may look like this: + + (\"foo.scm\" (type . regular) (inode . 123456)) + + Callers must be prepared to deal with the case where 'type' is 'unknown' + since some file systems do not provide that information. + + 3. Raise to 'system-error' when NAME cannot be opened." + (let ((directory (opendir* name string->pointer))) + (dynamic-wind + (const #t) + (lambda () + (let loop ((result '())) + (match (readdir* directory pointer->string) + (#f + (sort result entry +;;; +;;; 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 . + +(define-module (guix build texlive-build-system) + #:use-module ((guix build gnu-build-system) #:prefix gnu:) + #:use-module (guix build utils) + #:use-module (ice-9 match) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:export (%standard-phases + texlive-build)) + +;; Commentary: +;; +;; Builder-side code of the standard build procedure for TeX Live packages. +;; +;; Code: + +(define (compile-with-latex format file) + (zero? (system* format + "-interaction=batchmode" + "-output-directory=build" + (string-append "&" format) + file))) + +(define* (build #:key inputs build-targets tex-format #:allow-other-keys) + ;; Find additional tex and sty files + (setenv "TEXINPUTS" + (string-append + (getcwd) ":" (getcwd) "/build:" + (string-join + (append-map (match-lambda + ((_ . dir) + (find-files dir + (lambda (_ stat) + (eq? 'directory (stat:type stat))) + #:directories? #t + #:stat stat))) + inputs) + ":"))) + (setenv "TEXFORMATS" + (string-append (assoc-ref inputs "texlive-latex-base") + "/share/texmf-dist/web2c/")) + (setenv "LUAINPUTS" + (string-append (assoc-ref inputs "texlive-latex-base") + "/share/texmf-dist/tex/latex/base/")) + (mkdir "build") + (every (cut compile-with-latex tex-format <>) + (if build-targets build-targets + (find-files "." "\\.ins$")))) + +(define* (install #:key outputs tex-directory #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (target (string-append + out "/share/texmf-dist/tex/" tex-directory))) + (mkdir-p target) + (for-each delete-file (find-files "." "\\.(log|aux)$")) + (for-each (cut install-file <> target) + (find-files "build" ".*")) + #t)) + +(define %standard-phases + (modify-phases gnu:%standard-phases + (delete 'configure) + (replace 'build build) + (delete 'check) + (replace 'install install))) + +(define* (texlive-build #:key inputs (phases %standard-phases) + #:allow-other-keys #:rest args) + "Build the given TeX Live package, applying all of PHASES in order." + (apply gnu:gnu-build #:inputs inputs #:phases phases args)) + +;;; texlive-build-system.scm ends here diff --git a/guix/derivations.scm b/guix/derivations.scm index b9ad9c9e8c..07803ca94f 100644 --- a/guix/derivations.scm +++ b/guix/derivations.scm @@ -82,6 +82,7 @@ (define-module (guix derivations) derivation-hash read-derivation + read-derivation-from-file write-derivation derivation->output-path derivation->output-paths @@ -241,8 +242,7 @@ (define* (derivation-prerequisites drv #:optional (cut? (const #f))) (append inputs result) (fold set-insert input-set inputs) (map (lambda (i) - (call-with-input-file (derivation-input-path i) - read-derivation)) + (read-derivation-from-file (derivation-input-path i))) inputs))))) (define (offloadable-derivation? drv) @@ -295,9 +295,8 @@ (define (dependencies drv) ;; info is not already in cache. ;; Also, skip derivations marked as non-substitutable. (append-map (lambda (input) - (let ((drv (call-with-input-file - (derivation-input-path input) - read-derivation))) + (let ((drv (read-derivation-from-file + (derivation-input-path input)))) (if (substitutable-derivation? drv) (derivation-input-output-paths input) '()))) @@ -400,13 +399,15 @@ (define (derivation-substitutable-info drv sub-drvs) (derivation-inputs drv)) substitute) (map (lambda (i) - (call-with-input-file (derivation-input-path i) - read-derivation)) + (read-derivation-from-file + (derivation-input-path i))) inputs) (map derivation-input-sub-derivations inputs))))))) -(define (%read-derivation drv-port) - ;; Actually read derivation from DRV-PORT. +(define (read-derivation drv-port) + "Read the derivation from DRV-PORT and return the corresponding +object. Most of the time you'll want to use 'read-derivation-from-file', +which caches things as appropriate and is thus more efficient." (define comma (string->symbol ",")) @@ -482,17 +483,16 @@ (define %derivation-cache ;; XXX: This is redundant with 'atts-cache' in the store. (make-weak-value-hash-table 200)) -(define (read-derivation drv-port) - "Read the derivation from DRV-PORT and return the corresponding +(define (read-derivation-from-file file) + "Read the derivation in FILE, a '.drv' file, and return the corresponding object." - ;; Memoize that operation because `%read-derivation' is quite expensive, + ;; Memoize that operation because 'read-derivation' is quite expensive, ;; and because the same argument is read more than 15 times on average ;; during something like (package-derivation s gdb). - (let ((file (port-filename drv-port))) - (or (and file (hash-ref %derivation-cache file)) - (let ((drv (%read-derivation drv-port))) - (hash-set! %derivation-cache file drv) - drv)))) + (or (and file (hash-ref %derivation-cache file)) + (let ((drv (call-with-input-file file read-derivation))) + (hash-set! %derivation-cache file drv) + drv))) (define-inlinable (write-sequence lst write-item port) ;; Write each element of LST with WRITE-ITEM to PORT, separating them with a @@ -608,8 +608,7 @@ (define (derivation->output-paths drv) (define derivation-path->output-path ;; This procedure is called frequently, so memoize it. (let ((memoized (mlambda (path output) - (derivation->output-path (call-with-input-file path - read-derivation) + (derivation->output-path (read-derivation-from-file path) output)))) (lambda* (path #:optional (output "out")) "Read the derivation from PATH (`/gnu/store/xxx.drv'), and return the store @@ -619,7 +618,7 @@ (define derivation-path->output-path (define (derivation-path->output-paths path) "Read the derivation from PATH (`/gnu/store/xxx.drv'), and return the list of name/path pairs of its outputs." - (derivation->output-paths (call-with-input-file path read-derivation))) + (derivation->output-paths (read-derivation-from-file path))) ;;; @@ -630,10 +629,8 @@ (define derivation-path->base16-hash (mlambda (file) "Return a string containing the base16 representation of the hash of the derivation at FILE." - (call-with-input-file file - (compose bytevector->base16-string - derivation-hash - read-derivation)))) + (bytevector->base16-string + (derivation-hash (read-derivation-from-file file))))) (define derivation-hash ; `hashDerivationModulo' in derivations.cc (mlambda (drv) @@ -896,7 +893,7 @@ (define rewritten-input ((_ . replacement) (list replacement)) (#f - (let* ((drv (loop (call-with-input-file path read-derivation)))) + (let* ((drv (loop (read-derivation-from-file path)))) (cons drv sub-drvs)))))))) (let loop ((drv drv)) diff --git a/guix/discovery.scm b/guix/discovery.scm index 319ba7c872..292df2bd9c 100644 --- a/guix/discovery.scm +++ b/guix/discovery.scm @@ -19,6 +19,7 @@ (define-module (guix discovery) #:use-module (guix ui) #:use-module (guix combinators) + #:use-module (guix build syscalls) #:use-module (srfi srfi-1) #:use-module (ice-9 match) #:use-module (ice-9 vlist) @@ -37,29 +38,45 @@ (define-module (guix discovery) (define* (scheme-files directory) "Return the list of Scheme files found under DIRECTORY, recursively. The -returned list is sorted in alphabetical order." +returned list is sorted in alphabetical order. Return the empty list if +DIRECTORY is not accessible." + (define (entry-type name properties) + (match (assoc-ref properties 'type) + ('unknown + (stat:type (lstat name))) + ((? symbol? type) + type))) - ;; Sort entries so that 'fold-packages' works in a deterministic fashion - ;; regardless of details of the underlying file system. - (sort (file-system-fold (const #t) ;enter? - (lambda (path stat result) ;leaf - (if (string-suffix? ".scm" path) - (cons path result) - result)) - (lambda (path stat result) ;down - result) - (lambda (path stat result) ;up - result) - (const #f) ;skip - (lambda (path stat errno result) - (unless (= ENOENT errno) - (warning (G_ "cannot access `~a': ~a~%") - path (strerror errno))) - result) - '() - directory - stat) - stringmodule-name (let ((not-slash (char-set-complement (char-set #\/)))) diff --git a/guix/grafts.scm b/guix/grafts.scm index 11885db226..d6b0e93e8d 100644 --- a/guix/grafts.scm +++ b/guix/grafts.scm @@ -156,7 +156,7 @@ (define (item->deriver store item) (() ;ITEM is a plain file (values #f #f)) ((drv-file _ ...) - (let ((drv (call-with-input-file drv-file read-derivation))) + (let ((drv (read-derivation-from-file drv-file))) (values drv (any (match-lambda ((name . path) diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index 9c72e73314..90dbe56128 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -258,11 +258,7 @@ (define (make-pypi-sexp name version source-url wheel-url home-page synopsis ;; Sometimes 'pypi-uri' doesn't quite work due to mixed ;; cases in NAME, for instance, as is the case with ;; "uwsgi". In that case, fall back to a full URL. - (uri ,(if (equal? (pypi-uri name version) source-url) - `(pypi-uri ,name version) - `(string-append - ,@(factorize-uri source-url version)))) - + (uri (pypi-uri ,(string-downcase name) version)) (sha256 (base32 ,(guix-hash-url temp))))) diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm new file mode 100644 index 0000000000..d4c3714364 --- /dev/null +++ b/guix/import/texlive.scm @@ -0,0 +1,182 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 Ricardo Wurmus +;;; +;;; 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 . + +(define-module (guix import texlive) + #:use-module (ice-9 match) + #:use-module (sxml simple) + #:use-module (sxml xpath) + #:use-module (srfi srfi-11) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) + #:use-module (web uri) + #:use-module (guix http-client) + #:use-module (guix hash) + #:use-module (guix memoization) + #:use-module (guix store) + #:use-module (guix base32) + #:use-module (guix serialization) + #:use-module (guix svn-download) + #:use-module (guix import utils) + #:use-module (guix utils) + #:use-module (guix upstream) + #:use-module (guix packages) + #:use-module (gnu packages) + #:use-module (guix build-system texlive) + #:export (texlive->guix-package)) + +;;; Commentary: +;;; +;;; Generate a package declaration template for the latest version of a +;;; package on CTAN, using the XML output produced by the XML API to the CTAN +;;; database at http://www.ctan.org/xml/1.2/ +;;; +;;; Instead of taking the packages from CTAN, however, we fetch the sources +;;; from the SVN repository of the Texlive project. We do this because CTAN +;;; only keeps a single version of each package whereas we can access any +;;; version via SVN. Unfortunately, this means that the importer is really +;;; just a Texlive importer, not a generic CTAN importer. +;;; +;;; Code: + +(define string->license + (match-lambda + ("artistic2" 'gpl3+) + ("gpl" 'gpl3+) + ("gpl1" 'gpl1) + ("gpl1+" 'gpl1+) + ("gpl2" 'gpl2) + ("gpl2+" 'gpl2+) + ("gpl3" 'gpl3) + ("gpl3+" 'gpl3+) + ("lgpl2.1" 'lgpl2.1) + ("lgpl3" 'lgpl3) + ("knuth" 'knuth) + ("pd" 'public-domain) + ("bsd2" 'bsd-2) + ("bsd3" 'bsd-3) + ("bsd4" 'bsd-4) + ("opl" 'opl1.0+) + ("ofl" 'silofl1.1) + ("lppl" 'lppl) + ("lppl1" 'lppl1.0+) ; usually means "or later" + ("lppl1.2" 'lppl1.2+) ; usually means "or later" + ("lppl1.3" 'lppl1.3+) ; usually means "or later" + ("lppl1.3a" 'lppl1.3a) + ("lppl1.3b" 'lppl1.3b) + ("lppl1.3c" 'lppl1.3c) + ("cc-by-2" 'cc-by-2.0) + ("cc-by-3" 'cc-by-3.0) + ("cc-by-sa-2" 'cc-by-sa2.0) + ("cc-by-sa-3" 'cc-by-sa3.0) + ("mit" 'expat) + ("fdl" 'fdl1.3+) + ("gfl" 'gfl1.0) + + ;; These are known non-free licenses + ("noinfo" 'unknown) + ("nosell" 'non-free) + ("shareware" 'non-free) + ("nosource" 'non-free) + ("nocommercial" 'non-free) + ("cc-by-nc-nd-1" 'non-free) + ("cc-by-nc-nd-2" 'non-free) + ("cc-by-nc-nd-2.5" 'non-free) + ("cc-by-nc-nd-3" 'non-free) + ("cc-by-nc-nd-4" 'non-free) + ((x) (string->license x)) + ((lst ...) `(list ,@(map string->license lst))) + (_ #f))) + +(define (fetch-sxml name) + "Return an sxml representation of the package information contained in the +XML description of the CTAN package or #f in case of failure." + ;; This API always returns the latest release of the module. + (let ((url (string-append "http://www.ctan.org/xml/1.2/pkg/" name))) + (guard (c ((http-get-error? c) + (format (current-error-port) + "error: failed to retrieve package information \ +from ~s: ~a (~s)~%" + (uri->string (http-get-error-uri c)) + (http-get-error-code c) + (http-get-error-reason c)) + #f)) + (xml->sxml (http-fetch url) + #:trim-whitespace? #t)))) + +(define (guix-name component name) + "Return a Guix package name for a given Texlive package NAME." + (string-append "texlive-" component "-" + (string-map (match-lambda + (#\_ #\-) + (#\. #\-) + (chr (char-downcase chr))) + name))) + +(define* (sxml->package sxml #:optional (component "latex")) + "Return the `package' s-expression for a Texlive package from the SXML +expression describing it." + (define (sxml-value path) + (match ((sxpath path) sxml) + (() #f) + ((val) val))) + (with-store store + (let* ((id (sxml-value '(entry @ id *text*))) + (synopsis (sxml-value '(entry caption *text*))) + (version (or (sxml-value '(entry version @ number *text*)) + (sxml-value '(entry version @ date *text*)))) + (license (string->license (sxml-value '(entry license @ type *text*)))) + (home-page (string-append "http://www.ctan.org/pkg/" id)) + (ref (texlive-ref component id)) + (checkout (download-svn-to-store store ref))) + `(package + (name ,(guix-name component id)) + (version ,version) + (source (origin + (method svn-fetch) + (uri (texlive-ref ,component ,id)) + (sha256 + (base32 + ,(bytevector->nix-base32-string + (let-values (((port get-hash) (open-sha256-port))) + (write-file checkout port) + (force-output port) + (get-hash))))))) + (build-system texlive-build-system) + (arguments ,`(,'quote (#:tex-directory ,(string-join (list component id) "/")))) + (home-page ,home-page) + (synopsis ,synopsis) + (description ,(string-trim-both + (string-join + (map string-trim-both + (string-split + (beautify-description + (sxml->string (or (sxml-value '(entry description)) + '()))) + #\newline))))) + (license ,license))))) + +(define texlive->guix-package + (memoize + (lambda* (package-name #:optional (component "latex")) + "Fetch the metadata for PACKAGE-NAME from REPO and return the `package' +s-expression corresponding to that package, or #f on failure." + (and=> (fetch-sxml package-name) + (cut sxml->package <> component))))) + +;;; ctan.scm ends here diff --git a/guix/licenses.scm b/guix/licenses.scm index 6845b89d90..1bed56af20 100644 --- a/guix/licenses.scm +++ b/guix/licenses.scm @@ -60,7 +60,13 @@ (define-module (guix licenses) ibmpl1.0 imlib2 ipa + knuth lgpl2.0 lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3 lgpl3+ + lppl lppl1.0+ lppl1.2 lppl1.2+ + lppl1.3 lppl1.3+ + lppl1.3a lppl1.3a+ + lppl1.3b lppl1.3b+ + lppl1.3c lppl1.3c+ mpl1.0 mpl1.1 mpl2.0 ms-pl ncsa @@ -351,6 +357,11 @@ (define ipa "http://directory.fsf.org/wiki/License:IPA_Font_License" "https://www.gnu.org/licenses/license-list#IPAFONT")) +(define knuth + (license "Donald Knuth's license for TeX" + "http://www.ctan.org/license/knuth" + "Modification are only permitted under a different name.")) + (define lgpl2.0 (license "LGPL 2.0" "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html" @@ -381,6 +392,66 @@ (define lgpl3+ "https://www.gnu.org/licenses/lgpl.html" "https://www.gnu.org/licenses/license-list#LGPLv3")) +(define lppl + (license "LPPL (any version)" + "https://www.latex-project.org/lppl/lppl-1-0/" + "LaTeX Project Public License 1.0")) + +(define lppl1.0+ + (license "LPPL 1.0+" + "https://www.latex-project.org/lppl/lppl-1-0/" + "LaTeX Project Public License 1.0")) + +(define lppl1.2 + (license "LPPL 1.2" + "http://directory.fsf.org/wiki/License:LPPLv1.2" + "https://www.gnu.org/licenses/license-list#LPPL-1.2")) + +(define lppl1.2+ + (license "LPPL 1.2+" + "http://directory.fsf.org/wiki/License:LPPLv1.2" + "https://www.gnu.org/licenses/license-list#LPPL-1.2")) + +(define lppl1.3 + (license "LPPL 1.3" + "https://www.latex-project.org/lppl/lppl-1-3/" + "LaTeX Project Public License 1.3")) + +(define lppl1.3+ + (license "LPPL 1.3+" + "https://www.latex-project.org/lppl/lppl-1-3/" + "LaTeX Project Public License 1.3+")) + +(define lppl1.3a + (license "LPPL 1.3a" + "http://directory.fsf.org/wiki/License:LPPLv1.3a" + "https://www.gnu.org/licenses/license-list#LPPL-1.3a")) + +(define lppl1.3a+ + (license "LPPL 1.3a+" + "http://directory.fsf.org/wiki/License:LPPLv1.3a" + "https://www.gnu.org/licenses/license-list#LPPL-1.3a")) + +(define lppl1.3b + (license "LPPL 1.3b" + "https://www.latex-project.org/lppl/lppl-1-3b/" + "LaTeX Project Public License 1.3b")) + +(define lppl1.3b+ + (license "LPPL 1.3b+" + "https://www.latex-project.org/lppl/lppl-1-3b/" + "LaTeX Project Public License 1.3b or later")) + +(define lppl1.3c + (license "LPPL 1.3c" + "https://www.latex-project.org/lppl/lppl-1-3c/" + "LaTeX Project Public License 1.3c")) + +(define lppl1.3c+ + (license "LPPL 1.3c+" + "https://www.latex-project.org/lppl/lppl-1-3c/" + "LaTeX Project Public License 1.3c or later")) + (define mpl1.0 (license "MPL 1.0" "http://www.mozilla.org/MPL/1.0/" diff --git a/guix/packages.scm b/guix/packages.scm index 97580352e2..cea3a7472f 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -477,10 +477,10 @@ (define (tarxz-name file-name) (define instantiate-patch (match-lambda - ((? string? patch) + ((? string? patch) ;deprecated (interned-file patch #:recursive? #t)) - ((? origin? patch) - (origin->derivation patch system)))) + ((? struct? patch) ;origin, local-file, etc. + (lower-object patch system)))) (mlet %store-monad ((tar -> (lookup-input "tar")) (xz -> (lookup-input "xz")) diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index 558e8e7719..0571b874f1 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -87,7 +87,7 @@ (define (find-url file) ;; Usually we'll have more luck with the output file name since ;; the deriver that was used by the server could be different, so ;; try one of the output file names. - (let ((drv (call-with-input-file file read-derivation))) + (let ((drv (read-derivation-from-file file))) (or (find-url (derivation->output-path drv)) (find-url file)))) (lambda args @@ -599,7 +599,7 @@ (define (ensure-list x) (append-map (match-lambda (('argument . (? string? spec)) (cond ((derivation-path? spec) - (list (call-with-input-file spec read-derivation))) + (list (read-derivation-from-file spec))) ((store-path? spec) ;; Nothing to do; maybe for --log-file. '()) diff --git a/guix/scripts/graph.scm b/guix/scripts/graph.scm index 0af1fa3ad3..d5be442884 100644 --- a/guix/scripts/graph.scm +++ b/guix/scripts/graph.scm @@ -221,15 +221,11 @@ (define %bag-emerged-node-type ;;; Derivation DAG. ;;; -(define (file->derivation file) - "Read the derivation from FILE and return it." - (call-with-input-file file read-derivation)) - (define (derivation-dependencies obj) "Return the objects and store items corresponding to the dependencies of OBJ, a or store item." (if (derivation? obj) - (append (map (compose file->derivation derivation-input-path) + (append (map (compose read-derivation-from-file derivation-input-path) (derivation-inputs obj)) (derivation-sources obj)) '())) @@ -263,7 +259,7 @@ (define %derivation-node-type ((? derivation-path? item) (mbegin %store-monad ((store-lift add-temp-root) item) - (return (list (file->derivation item))))) + (return (list (read-derivation-from-file item))))) (x (raise (condition (&message (message "unsupported argument for \ diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm index 203cda8049..9bba074e8c 100644 --- a/guix/scripts/import.scm +++ b/guix/scripts/import.scm @@ -74,7 +74,7 @@ (define %standard-import-options '()) ;;; (define importers '("gnu" "nix" "pypi" "cpan" "hackage" "stackage" "elpa" "gem" - "cran" "crate")) + "cran" "crate" "texlive")) (define (resolve-importer name) (let ((module (resolve-interface diff --git a/guix/scripts/import/texlive.scm b/guix/scripts/import/texlive.scm new file mode 100644 index 0000000000..1cceee7051 --- /dev/null +++ b/guix/scripts/import/texlive.scm @@ -0,0 +1,101 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 Ricardo Wurmus +;;; +;;; 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 . + +(define-module (guix scripts import texlive) + #:use-module (guix ui) + #:use-module (guix utils) + #:use-module (guix scripts) + #:use-module (guix import texlive) + #:use-module (guix scripts import) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-11) + #:use-module (srfi srfi-37) + #:use-module (srfi srfi-41) + #:use-module (ice-9 match) + #:use-module (ice-9 format) + #:export (guix-import-texlive)) + + +;;; +;;; Command-line options. +;;; + +(define %default-options + '()) + +(define (show-help) + (display (G_ "Usage: guix import texlive PACKAGE-NAME +Import and convert the Texlive package for PACKAGE-NAME.\n")) + (display (G_ " + -a, --archive=ARCHIVE specify the archive repository")) + (display (G_ " + -h, --help display this help and exit")) + (display (G_ " + -V, --version display version information and exit")) + (newline) + (show-bug-report-information)) + +(define %options + ;; Specification of the command-line options. + (cons* (option '(#\h "help") #f #f + (lambda args + (show-help) + (exit 0))) + (option '(#\V "version") #f #f + (lambda args + (show-version-and-exit "guix import texlive"))) + (option '(#\a "archive") #t #f + (lambda (opt name arg result) + (alist-cons 'component arg + (alist-delete 'component result)))) + %standard-import-options)) + + +;;; +;;; Entry point. +;;; + +(define (guix-import-texlive . args) + (define (parse-options) + ;; Return the alist of option values. + (args-fold* args %options + (lambda (opt name arg result) + (leave (G_ "~A: unrecognized option~%") name)) + (lambda (arg result) + (alist-cons 'argument arg result)) + %default-options)) + + (let* ((opts (parse-options)) + (args (filter-map (match-lambda + (('argument . value) + value) + (_ #f)) + (reverse opts)))) + (match args + ((package-name) + (let ((sexp (texlive->guix-package package-name + (or (assoc-ref opts 'component) + "latex")))) + (unless sexp + (leave (G_ "failed to download description for package '~a'~%") + package-name)) + sexp)) + (() + (leave (G_ "too few arguments~%"))) + ((many ...) + (leave (G_ "too many arguments~%")))))) diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm index 77b340cff6..566d117b02 100644 --- a/guix/scripts/offload.scm +++ b/guix/scripts/offload.scm @@ -652,9 +652,8 @@ (define not-coma (with-error-handling (process-request (equal? (match:substring match 1) "1") (match:substring match 2) ; system - (call-with-input-file - (match:substring match 3) - read-derivation) + (read-derivation-from-file + (match:substring match 3)) (string-tokenize (match:substring match 4) not-coma) #:print-build-trace? print-build-trace? diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index f050fad976..a6bfb03ae4 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -39,6 +39,7 @@ (define-module (guix scripts package) #:select (directory-exists? mkdir-p)) #:use-module (ice-9 format) #:use-module (ice-9 match) + #:use-module (ice-9 regex) #:use-module (ice-9 vlist) #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) @@ -238,32 +239,45 @@ (define* (build-and-use-profile store profile manifest ;;; (define (find-packages-by-description regexps) - "Return the list of packages whose name matches one of REGEXPS, or whose -synopsis or description matches all of REGEXPS." - (define version=?)) + "Return two values: the list of packages whose name, synopsis, or +description matches at least one of REGEXPS sorted by relevance, and the list +of relevance scores." + (define (score str) + (let ((counts (filter-map (lambda (regexp) + (match (regexp-exec regexp str) + (#f #f) + (m (match:count m)))) + regexps))) + ;; Compute a score that's proportional to the number of regexps matched + ;; and to the number of matches for each regexp. + (* (length counts) (reduce + 0 counts)))) - (define (matches-all? str) - (every (cut regexp-exec <> str) regexps)) + (define (package-score package) + (+ (* 3 (score (package-name package))) + (* 2 (match (package-synopsis package) + ((? string? str) (score (P_ str))) + (#f 0))) + (match (package-description package) + ((? string? str) (score (P_ str))) + (#f 0)))) - (define (matches-one? str) - (find (cut regexp-exec <> str) regexps)) - - (sort - (fold-packages (lambda (package result) - (if (or (matches-one? (package-name package)) - (and=> (package-synopsis package) - (compose matches-all? P_)) - (and=> (package-description package) - (compose matches-all? P_))) - (cons package result) - result)) - '()) - (lambda (p1 p2) - (case (string-compare (package-name p1) (package-name p2) - (const '<) (const '=) (const '>)) - ((=) (version? (package-full-name package1) + (package-full-name package2)) + (> score1 score2))))))))))) (define (transaction-upgrade-entry entry transaction) "Return a variant of TRANSACTION that accounts for the upgrade of ENTRY, a @@ -752,8 +766,14 @@ (define (diff-profiles profile numbers) opts)) (regexps (map (cut make-regexp* <> regexp/icase) patterns))) (leave-on-EPIPE - (for-each (cute package->recutils <> (current-output-port)) - (find-packages-by-description regexps))) + (let-values (((packages scores) + (find-packages-by-description regexps))) + (for-each (lambda (package score) + (package->recutils package (current-output-port) + #:extra-fields + `((relevance . ,score)))) + packages + scores))) #t)) (('show requested-name) diff --git a/guix/scripts/perform-download.scm b/guix/scripts/perform-download.scm index aee506af46..18e2fc92f2 100644 --- a/guix/scripts/perform-download.scm +++ b/guix/scripts/perform-download.scm @@ -106,11 +106,11 @@ (define (guix-perform-download . args) (match args (((? derivation-path? drv) (? store-path? output)) (assert-low-privileges) - (perform-download (call-with-input-file drv read-derivation) + (perform-download (read-derivation-from-file drv) output)) (((? derivation-path? drv)) ;backward compatibility (assert-low-privileges) - (perform-download (call-with-input-file drv read-derivation))) + (perform-download (read-derivation-from-file drv))) (("--version") (show-version-and-exit)) (x diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm index c49c0c3e20..a7e3e6d629 100644 --- a/guix/scripts/publish.scm +++ b/guix/scripts/publish.scm @@ -225,10 +225,6 @@ (define %nix-cache-info ("WantMassQuery" . 0) ("Priority" . 100))) -(define (load-derivation file) - "Read the derivation from FILE." - (call-with-input-file file read-derivation)) - (define (signed-string s) "Sign the hash of the string S with the daemon's key." (let* ((public-key (%public-key)) @@ -286,7 +282,7 @@ (define* (narinfo-string store store-path key base-info (catch 'system-error (lambda () - (let ((drv (load-derivation deriver))) + (let ((drv (read-derivation-from-file deriver))) (format #f "~aSystem: ~a~%Deriver: ~a~%" base-info (derivation-system drv) (basename deriver)))) diff --git a/guix/store.scm b/guix/store.scm index c94dfea959..2acab6b1a3 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -718,6 +718,37 @@ (define socket (let loop ((done? (process-stderr server))) (or done? (process-stderr server))))) +(define %rpc-calls + ;; Mapping from RPC names (symbols) to invocation counts. + (make-hash-table)) + +(define* (show-rpc-profile #:optional (port (current-error-port))) + "Write to PORT a summary of the RPCs that have been made." + (let ((profile (sort (hash-fold alist-cons '() %rpc-calls) + (lambda (rpc1 rpc2) + (< (cdr rpc1) (cdr rpc2)))))) + (format port "Remote procedure call summary: ~a RPCs~%" + (match profile + (((names . counts) ...) + (reduce + 0 counts)))) + (for-each (match-lambda + ((rpc . count) + (format port " ~30a ... ~5@a~%" rpc count))) + profile))) + +(define record-operation + ;; Optionally, increment the number of calls of the given RPC. + (let ((profiled (or (and=> (getenv "GUIX_PROFILING") string-tokenize) + '()))) + (if (member "rpc" profiled) + (begin + (add-hook! exit-hook show-rpc-profile) + (lambda (name) + (let ((count (or (hashq-ref %rpc-calls name) 0))) + (hashq-set! %rpc-calls name (+ count 1))))) + (lambda (_) + #t)))) + (define-syntax operation (syntax-rules () "Define a client-side RPC stub for the given operation." @@ -725,6 +756,7 @@ (define-syntax operation (lambda (server arg ...) docstring (let ((s (nix-server-socket server))) + (record-operation 'name) (write-int (operation-id name) s) (write-arg type arg s) ... @@ -830,10 +862,11 @@ (define add-to-store When RECURSIVE? is true, call (SELECT? FILE STAT) for each directory entry, where FILE is the entry's absolute file name and STAT is the result of 'lstat'; exclude entries for which SELECT? does not return true." - (let* ((st (false-if-exception (lstat file-name))) - (args `(,st ,basename ,recursive? ,hash-algo ,select?)) + ;; Note: We don't stat FILE-NAME at each call, and thus we assume that + ;; the file remains unchanged for the lifetime of SERVER. + (let* ((args `(,file-name ,basename ,recursive? ,hash-algo ,select?)) (cache (nix-server-add-to-store-cache server))) - (or (and st (hash-ref cache args)) + (or (hash-ref cache args) (let ((path (add-to-store server basename recursive? hash-algo file-name #:select? select?))) diff --git a/guix/svn-download.scm b/guix/svn-download.scm index c1200fa0c5..c118869af1 100644 --- a/guix/svn-download.scm +++ b/guix/svn-download.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2014 Sree Harsha Totakura +;;; Copyright © 2017 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -23,12 +24,15 @@ (define-module (guix svn-download) #:use-module (guix store) #:use-module (guix monads) #:use-module (guix packages) + #:use-module (guix utils) + #:use-module ((guix build svn) #:prefix build:) #:use-module (ice-9 match) #:export (svn-reference svn-reference? svn-reference-url svn-reference-revision - svn-fetch)) + svn-fetch + download-svn-to-store)) ;;; Commentary: ;;; @@ -79,4 +83,21 @@ (define build #:guile-for-build guile #:local-build? #t))) +(define* (download-svn-to-store store ref + #:optional (name (basename (svn-reference-url ref))) + #:key (log (current-error-port))) + "Download from REF, a object to STORE. Write progress +reports to LOG." + (call-with-temporary-directory + (lambda (temp) + (let ((result + (parameterize ((current-output-port log)) + (build:svn-fetch (svn-reference-url ref) + (svn-reference-revision ref) + temp + #:user-name (svn-reference-user-name ref) + #:password (svn-reference-password ref))))) + (and result + (add-to-store store name #t "sha256" temp)))))) + ;;; svn-download.scm ends here diff --git a/guix/ui.scm b/guix/ui.scm index 5060fd6dc7..889c9d0228 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -946,9 +946,10 @@ (define (string->recutils str) '() str))) -(define* (package->recutils p port #:optional (width (%text-width))) +(define* (package->recutils p port #:optional (width (%text-width)) + #:key (extra-fields '())) "Write to PORT a `recutils' record of package P, arranging to fit within -WIDTH columns." +WIDTH columns. EXTRA-FIELDS is a list of symbol/value pairs to emit." (define width* ;; The available number of columns once we've taken into account space for ;; the initial "+ " prefix. @@ -993,11 +994,11 @@ (define (package (package-synopsis-string p) P_) ""))) - (format port "~a~2%" + (format port "~a~%" (string->recutils (string-trim-right (parameterize ((%text-width width*)) @@ -1005,7 +1006,16 @@ (define (package (package-description p) P_) "")))) - #\newline)))) + #\newline))) + (for-each (match-lambda + ((field . value) + (let ((field (symbol->string field))) + (format port "~a: ~a~%" + field + (fill-paragraph (object->string value) width* + (string-length field)))))) + extra-fields) + (newline port)) (define (string->generations str) "Return the list of generations matching a pattern in STR. This function @@ -1308,7 +1318,14 @@ (define module (parameterize ((program-name command)) ;; Disable canonicalization so we don't don't stat unreasonably. (with-fluids ((%file-port-name-canonicalization #f)) - (apply command-main args))))) + (dynamic-wind + (const #f) + (lambda () + (apply command-main args)) + (lambda () + ;; Abuse 'exit-hook' (which is normally meant to be used by the + ;; REPL) to run things like profiling hooks upon completion. + (run-hook exit-hook))))))) (define (run-guix . args) "Run the 'guix' command defined by command line ARGS. @@ -1316,6 +1333,10 @@ (define (run-guix . args) and signal handling has already been set up." (define option? (cut string-prefix? "-" <>)) + ;; The default %LOAD-EXTENSIONS includes the empty string, which doubles the + ;; number of 'stat' calls per entry in %LOAD-PATH. Shamelessly remove it. + (set! %load-extensions '(".scm")) + (match args (() (format (current-error-port) diff --git a/tests/discovery.scm b/tests/discovery.scm index b838731e16..04de83f085 100644 --- a/tests/discovery.scm +++ b/tests/discovery.scm @@ -32,6 +32,10 @@ (define %top-srcdir ((('guix 'import _ ...) ..1) #t))) +(test-equal "scheme-modules, non-existent directory" + '() + (scheme-modules "/does/not/exist")) + (test-assert "all-modules" (match (map module-name (all-modules `((,%top-srcdir . "guix/build-system")))) diff --git a/tests/pypi.scm b/tests/pypi.scm index 28cc115a9d..74f13e9662 100644 --- a/tests/pypi.scm +++ b/tests/pypi.scm @@ -131,8 +131,7 @@ (define test-metadata ('version "1.0.0") ('source ('origin ('method 'url-fetch) - ('uri (string-append "https://example.com/foo-" - version ".tar.gz")) + ('uri ('pypi-uri "foo" 'version)) ('sha256 ('base32 (? string? hash))))) @@ -194,8 +193,7 @@ (define test-metadata ('version "1.0.0") ('source ('origin ('method 'url-fetch) - ('uri (string-append "https://example.com/foo-" - version ".tar.gz")) + ('uri ('pypi-uri "foo" 'version)) ('sha256 ('base32 (? string? hash))))) diff --git a/tests/syscalls.scm b/tests/syscalls.scm index e20f0600bc..8c048e6109 100644 --- a/tests/syscalls.scm +++ b/tests/syscalls.scm @@ -24,6 +24,8 @@ (define-module (test-syscalls) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:use-module (srfi srfi-64) + #:use-module (system foreign) + #:use-module ((ice-9 ftw) #:select (scandir)) #:use-module (ice-9 match)) ;; Test the (guix build syscalls) module, although there's not much that can @@ -184,6 +186,64 @@ (define perform-container-tests? (status:exit-val status)))) (eq? #t result)))))))) +(test-equal "scandir*, ENOENT" + ENOENT + (catch 'system-error + (lambda () + (scandir* "/does/not/exist")) + (lambda args + (system-error-errno args)))) + +(test-equal "scandir*, ASCII file names" + (scandir (dirname (search-path %load-path "guix/base32.scm")) + (const #t) stringprocedure int + (dynamic-func "creat" (dynamic-link)) + (list '* int)))) + (creat (string->pointer (string-append directory "/α") + "UTF-8") + #o644) + (creat (string->pointer (string-append directory "/λ") + "UTF-8") + #o644) + (let ((locale (setlocale LC_ALL))) + (dynamic-wind + (lambda () + ;; Make sure that even in a C locale we get the right result. + (setlocale LC_ALL "C")) + (lambda () + (match (scandir* directory) + (((names . properties) ...) + names))) + (lambda () + (setlocale LC_ALL locale)))))))) + +(test-assert "scandir*, properties" + (let ((directory (dirname (search-path %load-path "guix/base32.scm")))) + (every (lambda (entry name) + (match entry + ((name2 . properties) + (and (string=? name2 name) + (let* ((full (string-append directory "/" name)) + (stat (lstat full)) + (inode (assoc-ref properties 'inode)) + (type (assoc-ref properties 'type))) + (and (= inode (stat:ino stat)) + (or (eq? type 'unknown) + (eq? type (stat:type stat))))))))) + (scandir* directory) + (scandir directory (const #t) string +;;; +;;; 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 . + +(define-module (test-texlive) + #:use-module (gnu packages tex) + #:use-module (guix import texlive) + #:use-module (guix tests) + #:use-module (guix build utils) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-64) + #:use-module (srfi srfi-26) + #:use-module (ice-9 match)) + +(test-begin "texlive") + +(define xml + "\ + + foo + Foomatic frobnication in LuaLaTeX + + + + +

+ Foo is a package for LuaLaTeX. It provides an interface to frobnicate gimbals + in a foomatic way with the LuaTeX engine. +

+

+ The package requires the bar and golly + bundles for extremely special specialties. +

+
+ + + + null +
") + +(define sxml + '(*TOP* (entry (@ (id "foo")) + (name "foo") + (caption "Foomatic frobnication in LuaLaTeX") + (authorref (@ (id "rekado"))) + (license (@ (type "lppl1.3"))) + (version (@ (number "2.6a"))) + (description + (p "\n Foo is a package for LuaLaTeX. It provides an interface to frobnicate gimbals\n in a foomatic way with the LuaTeX engine.\n ") + (p "\n The package requires the bar and golly\n bundles for extremely special specialties.\n ")) + (ctan (@ (path "/macros/latex/contrib/foo") (file "true"))) + (texlive (@ (location "foo"))) + (keyval (@ (value "tests") (key "topic"))) + "\n null\n"))) + +(test-equal "fetch-sxml: returns SXML for valid XML" + sxml + (mock ((guix http-client) http-fetch + (lambda (url) + xml)) + ((@@ (guix import texlive) fetch-sxml) "foo"))) + +;; TODO: +(test-assert "sxml->package" + ;; Replace network resources with sample data. + (mock ((guix build svn) svn-fetch + (lambda* (url revision directory + #:key (svn-command "svn") + (user-name #f) + (password #f)) + (mkdir-p directory) + (with-output-to-file (string-append directory "/foo") + (lambda () + (display "source"))))) + (let ((result ((@@ (guix import texlive) sxml->package) sxml))) + (match result + (('package + ('name "texlive-latex-foo") + ('version "2.6a") + ('source ('origin + ('method 'svn-fetch) + ('uri ('texlive-ref "latex" "foo")) + ('sha256 + ('base32 + (? string? hash))))) + ('build-system 'texlive-build-system) + ('arguments ('quote (#:tex-directory "latex/foo"))) + ('home-page "http://www.ctan.org/pkg/foo") + ('synopsis "Foomatic frobnication in LuaLaTeX") + ('description + "Foo is a package for LuaLaTeX. It provides an interface to \ +frobnicate gimbals in a foomatic way with the LuaTeX engine. The package \ +requires the bar and golly bundles for extremely special specialties.") + ('license 'lppl1.3+)) + #t) + (_ + (begin + (format #t "~s\n" result) + (pk 'fail result #f))))))) + +(test-end "texlive")