diff options
26 files changed, 223 insertions, 939 deletions
diff --git a/Makefile.am b/Makefile.am index d054f78791..b6b7af3eb7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -397,7 +397,7 @@ check-local: endif !CAN_RUN_TESTS -check-system: $(GOBJECTS) $(BOOTSTRAP_GUILE_TARBALLS) +check-system: $(GOBJECTS) $(AM_V_at)$(top_builddir)/pre-inst-env \ $(GUILE) --no-auto-compile \ -e '(@@ (run-system-tests) run-system-tests)' \ @@ -427,7 +427,6 @@ EXTRA_DIST = \ build-aux/hydra/guix.scm \ build-aux/check-available-binaries.scm \ build-aux/check-final-inputs-self-contained.scm \ - build-aux/download.scm \ build-aux/generate-authors.scm \ build-aux/test-driver.scm \ build-aux/update-guix-package.scm \ diff --git a/build-aux/download.scm b/build-aux/download.scm deleted file mode 100644 index 8dfa914603..0000000000 --- a/build-aux/download.scm +++ /dev/null @@ -1,73 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2017 Ludovic Courtès <ludo@gnu.org> -;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> -;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> -;;; -;;; This file is part of GNU Guix. -;;; -;;; GNU Guix is free software; you can redistribute it and/or modify it -;;; under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3 of the License, or (at -;;; your option) any later version. -;;; -;;; GNU Guix is distributed in the hope that it will be useful, but -;;; WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. - -;;; -;;; Download a binary file from an external source. -;;; - -(use-modules (ice-9 match) - (web uri) - (web client) - (rnrs io ports) - (srfi srfi-11) - (guix base16) - (guix hash)) - -(define %url-base - "http://alpha.gnu.org/gnu/guix/bootstrap" - - ;; Alternately: - ;;"http://www.fdn.fr/~lcourtes/software/guix/packages" - ) - -(define (file-name->uri file) - "Return the URI for FILE." - (match (string-tokenize file (char-set-complement (char-set #\/))) - ((_ ... system basename) - (string->uri - (string-append %url-base "/" system - (match system - ("aarch64-linux" - "/20170217/") - ("armhf-linux" - "/20150101/") - (_ - "/20131110/")) - basename))))) - -(match (command-line) - ((_ file expected-hash) - (let ((uri (file-name->uri file))) - (format #t "downloading file `~a'~%from `~a'...~%" - file (uri->string uri)) - (let*-values (((resp data) (http-get uri #:decode-body? #f)) - ((hash) (bytevector->base16-string (sha256 data))) - ((part) (string-append file ".part"))) - (if (string=? expected-hash hash) - (begin - (call-with-output-file part - (lambda (port) - (put-bytevector port data))) - (rename-file part file)) - (begin - (format (current-error-port) - "file at `~a' has SHA256 ~a; expected ~a~%" - (uri->string uri) hash expected-hash) - (exit 1))))))) diff --git a/build-aux/test-env.in b/build-aux/test-env.in index 1657556b19..4a422cf607 100644 --- a/build-aux/test-env.in +++ b/build-aux/test-env.in @@ -1,7 +1,7 @@ #!/bin/sh # GNU Guix --- Functional package management for GNU -# Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> +# Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org> # # This file is part of GNU Guix. # @@ -110,6 +110,20 @@ then daemon_pid=$! trap "kill $daemon_pid ; rm -rf $NIX_STATE_DIR" EXIT + + # The test suite expects the 'guile-bootstrap' package to be available. + # Normally the Guile bootstrap tarball is downloaded by a fixed-output + # derivation but when network access is missing we allow users to drop + # the tarball in 'gnu/packages/bootstrap/SYSTEM' and "intern" it here. + bootstrap_directory="@abs_top_builddir@/gnu/packages/bootstrap/@guix_system@" + if [ -d "$bootstrap_directory" ] + then + for file in "$bootstrap_directory"/guile-* + do + "@abs_top_builddir@/pre-inst-env" \ + guix download "file://$file" > /dev/null + done + fi fi # Avoid issues that could stem from l10n, such as language/encoding diff --git a/gnu/local.mk b/gnu/local.mk index edd6d8237e..e2b9a69b8f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -566,7 +566,6 @@ dist_patch_DATA = \ %D%/packages/patches/cool-retro-term-fix-array-size.patch \ %D%/packages/patches/cool-retro-term-memory-leak-1.patch \ %D%/packages/patches/cool-retro-term-remove-non-free-fonts.patch \ - %D%/packages/patches/coreutils-cut-huge-range-test.patch \ %D%/packages/patches/cpio-CVE-2016-2037.patch \ %D%/packages/patches/cpufrequtils-fix-aclocal.patch \ %D%/packages/patches/cracklib-CVE-2016-6318.patch \ @@ -689,7 +688,6 @@ dist_patch_DATA = \ %D%/packages/patches/graphicsmagick-CVE-2017-14042.patch \ %D%/packages/patches/graphicsmagick-CVE-2017-14165.patch \ %D%/packages/patches/graphite2-ffloat-store.patch \ - %D%/packages/patches/grep-gnulib-lock.patch \ %D%/packages/patches/grep-timing-sensitive-test.patch \ %D%/packages/patches/groff-source-date-epoch.patch \ %D%/packages/patches/gsl-test-i686.patch \ @@ -814,15 +812,7 @@ dist_patch_DATA = \ %D%/packages/patches/libusb-0.1-disable-tests.patch \ %D%/packages/patches/libvpx-CVE-2016-2818.patch \ %D%/packages/patches/libxcb-python-3.5-compat.patch \ - %D%/packages/patches/libxml2-CVE-2016-4658.patch \ - %D%/packages/patches/libxml2-CVE-2016-5131.patch \ - %D%/packages/patches/libxml2-CVE-2017-0663.patch \ - %D%/packages/patches/libxml2-CVE-2017-7375.patch \ - %D%/packages/patches/libxml2-CVE-2017-7376.patch \ - %D%/packages/patches/libxml2-CVE-2017-9047+CVE-2017-9048.patch \ - %D%/packages/patches/libxml2-CVE-2017-9049+CVE-2017-9050.patch \ %D%/packages/patches/libxslt-generated-ids.patch \ - %D%/packages/patches/libxslt-CVE-2016-4738.patch \ %D%/packages/patches/libxt-guix-search-paths.patch \ %D%/packages/patches/lierolibre-check-unaligned-access.patch \ %D%/packages/patches/lierolibre-is-free-software.patch \ @@ -1171,56 +1161,7 @@ dist_bootstrap_mips64el_linux_DATA = \ %D%/packages/bootstrap/mips64el-linux/tar \ %D%/packages/bootstrap/mips64el-linux/xz -# Big bootstrap binaries are not included in the tarball. Instead, they -# are downloaded. -nodist_bootstrap_x86_64_linux_DATA = \ - %D%/packages/bootstrap/x86_64-linux/guile-2.0.9.tar.xz -nodist_bootstrap_i686_linux_DATA = \ - %D%/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz -nodist_bootstrap_armhf_linux_DATA = \ - %D%/packages/bootstrap/armhf-linux/guile-2.0.11.tar.xz -nodist_bootstrap_aarch64_linux_DATA = \ - %D%/packages/bootstrap/aarch64-linux/guile-2.0.14.tar.xz -nodist_bootstrap_mips64el_linux_DATA = \ - %D%/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz - # Those files must remain executable, so they remain executable once # imported into the store. set-bootstrap-executable-permissions: chmod +x $(DESTDIR)$(bootstrapdir)/*/{bash,mkdir,tar,xz} - -BOOTSTRAP_GUILE_TARBALLS = \ - $(nodist_bootstrap_x86_64_linux_DATA) \ - $(nodist_bootstrap_i686_linux_DATA) \ - $(nodist_bootstrap_armhf_linux_DATA) \ - $(nodist_bootstrap_aarch64_linux_DATA) \ - $(nodist_bootstrap_mips64el_linux_DATA) - -DISTCLEANFILES = $(BOOTSTRAP_GUILE_TARBALLS) - -# Method to download a file from an external source. -DOWNLOAD_FILE = \ - GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH" \ - $(GUILE) --no-auto-compile -L "$(top_builddir)" -L "$(top_srcdir)" \ - "$(top_srcdir)/build-aux/download.scm" - -%D%/packages/bootstrap/x86_64-linux/guile-2.0.9.tar.xz: - $(AM_V_DL)$(MKDIR_P) `dirname "$@"`; \ - $(DOWNLOAD_FILE) "$@" \ - "037b103522a2d0d7d69c7ffd8de683dfe5bb4b59c1fafd70b4ffd397fd2f57f0" -%D%/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz: - $(AM_V_DL)$(MKDIR_P) `dirname "$@"`; \ - $(DOWNLOAD_FILE) "$@" \ - "b757cd46bf13ecac83fb8e955fb50096ac2d17bb610ca8eb816f29302a00a846" -%D%/packages/bootstrap/armhf-linux/guile-2.0.11.tar.xz: - $(AM_V_DL)$(MKDIR_P) `dirname "$@"`; \ - $(DOWNLOAD_FILE) "$@" \ - "e551d05d4d385d6706ab8d574856a087758294dc90ab4c06e70a157a685e23d6" -%D%/packages/bootstrap/aarch64-linux/guile-2.0.14.tar.xz: - $(AM_V_DL)$(MKDIR_P) `dirname "$@"`; \ - $(DOWNLOAD_FILE) "$@" \ - "3939909f24dcb955621aa7f81ecde6844bea8a083969c2d275c55699af123ebe" -%D%/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz: - $(AM_V_DL)$(MKDIR_P) `dirname "$@"`; \ - $(DOWNLOAD_FILE) "$@" \ - "994680f0001346864aa2c2cc5110f380ee7518dcd701c614291682b8e948f73b" diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 972ffeeecb..e0f2844bce 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -81,16 +81,15 @@ command-line arguments, multiple languages, and so on.") (define-public grep (package (name "grep") - (version "3.0") + (version "3.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/grep/grep-" version ".tar.xz")) (sha256 (base32 - "1dcasjp3a578nrvzrcn38mpizb8w1q6mvfzhjmcqqgkf0nsivj72")) - (patches (search-patches "grep-timing-sensitive-test.patch" - "grep-gnulib-lock.patch")))) + "0zm0ywmyz9g8vn1plw14mn8kj74yipx5qsljndbyfgmvndx5qqnv")) + (patches (search-patches "grep-timing-sensitive-test.patch")))) (build-system gnu-build-system) (native-inputs `(("perl" ,perl))) ;some of the tests require it (arguments @@ -293,15 +292,14 @@ used to apply commands with arbitrarily long arguments.") (define-public coreutils (package (name "coreutils") - (version "8.27") + (version "8.28") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/coreutils/coreutils-" version ".tar.xz")) (sha256 (base32 - "0sv547572iq8ayy8klir4hnngnx92a9nsazmf1wgzfc7xr4x74c8")) - (patches (search-patches "coreutils-cut-huge-range-test.patch")))) + "0r8c1bgm68kl70j1lgd0rv12iykw6143k4m9a56xip9rc2hv25qi")))) (build-system gnu-build-system) (inputs `(("acl" ,acl) ; TODO: add SELinux ("gmp" ,gmp) ;bignums in 'expr', yay! @@ -557,7 +555,8 @@ store.") ;; users should automatically pull Linux headers as well. (propagated-inputs `(("kernel-headers" ,linux-libre-headers))) - (outputs '("out" "debug")) + (outputs '("out" "debug" + "static")) ;9 MiB of .a files (arguments `(#:out-of-source? #t @@ -568,6 +567,11 @@ store.") ;; RUNPATH checks. #:validate-runpath? #f + #:modules ((ice-9 ftw) + (srfi srfi-26) + (guix build utils) + (guix build gnu-build-system)) + #:configure-flags (list "--enable-add-ons" "--sysconfdir=/etc" @@ -672,7 +676,46 @@ store.") ;; "bilingual" eval/exec magic at the top of the file. "") (("exec @PERL@") - "exec perl")))))))) + "exec perl"))))) + + (add-after 'install 'move-static-libs + (lambda* (#:key outputs #:allow-other-keys) + ;; Move static libraries to the "static" output. + (define (static-library? file) + ;; Return true if FILE is a static library. The + ;; "_nonshared.a" files are referred to by libc.so, + ;; libpthread.so, etc., which are in fact linker + ;; scripts. + (and (string-suffix? ".a" file) + (not (string-contains file "_nonshared")))) + + (define (linker-script? file) + ;; Guess whether FILE, a ".a" file, is actually a + ;; linker script. + (and (not (ar-file? file)) + (not (elf-file? file)))) + + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (files (scandir lib static-library?)) + (static (assoc-ref outputs "static")) + (slib (string-append static "/lib"))) + (mkdir-p slib) + (for-each (lambda (base) + (rename-file (string-append lib "/" base) + (string-append slib "/" base))) + files) + + ;; Usually libm.a is a linker script so we need to + ;; change the file names in there to refer to STATIC + ;; instead of OUT. + (for-each (lambda (ld-script) + (substitute* ld-script + ((out) static))) + (filter linker-script? + (map (cut string-append slib "/" <>) + files))) + #t)))))) (inputs `(("static-bash" ,static-bash))) diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm index ba733b3a9e..d1b03eb882 100644 --- a/gnu/packages/bootstrap.scm +++ b/gnu/packages/bootstrap.scm @@ -26,8 +26,10 @@ #:use-module (guix build-system) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) - #:use-module ((guix store) #:select (add-to-store add-text-to-store)) - #:use-module ((guix derivations) #:select (derivation)) + #:use-module ((guix store) + #:select (run-with-store add-to-store add-text-to-store)) + #:use-module ((guix derivations) + #:select (derivation derivation->output-path)) #:use-module ((guix utils) #:select (gnu-triplet->nix-system)) #:use-module ((guix build utils) #:select (elf-file?)) #:use-module (guix memoization) @@ -38,6 +40,8 @@ package-with-bootstrap-guile glibc-dynamic-linker + bootstrap-guile-origin + %bootstrap-guile %bootstrap-coreutils&co %bootstrap-binutils @@ -191,6 +195,56 @@ successful, or false to signal an error." ;;; Bootstrap packages. ;;; +(define %bootstrap-base-urls + ;; This is where the initial binaries come from. + '("https://alpha.gnu.org/gnu/guix/bootstrap" + "http://alpha.gnu.org/gnu/guix/bootstrap" + "ftp://alpha.gnu.org/gnu/guix/bootstrap" + "http://www.fdn.fr/~lcourtes/software/guix/packages" + "http://flashner.co.il/guix/bootstrap")) + +(define (bootstrap-guile-url-path system) + "Return the URI for FILE." + (string-append "/" system + (match system + ("aarch64-linux" + "/20170217/guile-2.0.14.tar.xz") + ("armhf-linux" + "/20150101/guile-2.0.11.tar.xz") + (_ + "/20131110/guile-2.0.9.tar.xz")))) + +(define (bootstrap-guile-hash system) + "Return the SHA256 hash of the Guile bootstrap tarball for SYSTEM." + (match system + ("x86_64-linux" + (base32 "1w2p5zyrglzzniqgvyn1b55vprfzhgk8vzbzkkbdgl5248si0yq3")) + ("i686-linux" + (base32 "0im800m30abgh7msh331pcbjvb4n02smz5cfzf1srv0kpx3csmxp")) + ("mips64el-linux" + (base32 "0fzp93lvi0hn54acc0fpvhc7bvl0yc853k62l958cihk03q80ilr")) + ("armhf-linux" + (base32 "1mi3brl7l58aww34rawhvja84xc7l1b4hmwdmc36fp9q9mfx0lg5")) + ("aarch64-linux" + (base32 "1giy2aprjmn5fp9c4s9r125fljw4wv6ixy5739i5bffw4jgr0f9r")))) + +(define (bootstrap-guile-origin system) + "Return an <origin> object for the Guile tarball of SYSTEM." + (origin + (method url-fetch) + (uri (map (cute string-append <> (bootstrap-guile-url-path system)) + %bootstrap-base-urls)) + (sha256 (bootstrap-guile-hash system)))) + +(define (download-bootstrap-guile store system) + "Return a derivation that downloads the bootstrap Guile tarball for SYSTEM." + (let* ((path (bootstrap-guile-url-path system)) + (base (basename path)) + (urls (map (cut string-append <> path) %bootstrap-base-urls))) + (run-with-store store + (url-fetch urls 'sha256 (bootstrap-guile-hash system) + #:system system)))) + (define* (raw-build store name inputs #:key outputs system search-paths #:allow-other-keys) @@ -205,13 +259,7 @@ successful, or false to signal an error." (xz (->store "xz")) (mkdir (->store "mkdir")) (bash (->store "bash")) - (guile (->store (match system - ("armhf-linux" - "guile-2.0.11.tar.xz") - ("aarch64-linux" - "guile-2.0.14.tar.xz") - (_ - "guile-2.0.9.tar.xz")))) + (guile (download-bootstrap-guile store system)) ;; The following code, run by the bootstrap guile after it is ;; unpacked, creates a wrapper for itself to set its load path. ;; This replaces the previous non-portable method based on @@ -246,7 +294,7 @@ exec -a \"~a0\" ~a \"~a@\"\n" echo \"unpacking bootstrap Guile to '$out'...\" ~a $out cd $out -~a -dc < ~a | ~a xv +~a -dc < $GUILE_TARBALL | ~a xv # Use the bootstrap guile to create its own wrapper to set the load path. GUILE_SYSTEM_PATH=$out/share/guile/2.0 \ @@ -255,14 +303,16 @@ $out/bin/guile -c ~s $out ~a # Sanity check. $out/bin/guile --version~%" - mkdir xz guile tar + mkdir xz tar (format #f "~s" make-guile-wrapper) bash) - (list mkdir xz guile tar bash)))) + (list mkdir xz tar bash)))) (derivation store name bash `(,builder) #:system system - #:inputs `((,bash) (,builder))))) + #:inputs `((,bash) (,builder) (,guile)) + #:env-vars `(("GUILE_TARBALL" + . ,(derivation->output-path guile)))))) (define* (make-raw-bag name #:key source inputs native-inputs outputs @@ -294,13 +344,6 @@ $out/bin/guile --version~%" (home-page #f) (license lgpl3+)))) -(define %bootstrap-base-urls - ;; This is where the initial binaries come from. - '("ftp://alpha.gnu.org/gnu/guix/bootstrap" - "http://alpha.gnu.org/gnu/guix/bootstrap" - "http://www.fdn.fr/~lcourtes/software/guix/packages" - "http://flashner.co.il/guix/bootstrap")) - (define %bootstrap-coreutils&co (package-from-tarball "bootstrap-binaries" (lambda (system) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index ec7677814f..23939157ec 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -583,12 +583,24 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (let* ((gcc (cross-gcc-wrapper gcc-boot0 binutils-boot0 glibc-final-with-bootstrap-bash (car (assoc-ref %boot1-inputs "bash")))) - (bash (package (inherit static-bash) + (bash (package + (inherit static-bash) (arguments - `(#:guile ,%bootstrap-guile - ,@(package-arguments static-bash))))) + (substitute-keyword-arguments + (package-arguments static-bash) + ((#:guile _ #f) + '%bootstrap-guile) + ((#:configure-flags flags '()) + ;; Add a '-L' flag so that the pseudo-cross-ld of + ;; BINUTILS-BOOT0 can find libc.a. + `(append ,flags + (list (string-append "LDFLAGS=-static -L" + (assoc-ref %build-inputs + "libc:static") + "/lib")))))))) (inputs `(("gcc" ,gcc) ("libc" ,glibc-final-with-bootstrap-bash) + ("libc:static" ,glibc-final-with-bootstrap-bash "static") ,@(fold alist-delete %boot1-inputs '("gcc" "libc"))))) (package-with-bootstrap-guile @@ -663,6 +675,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (define %boot2-inputs ;; 3rd stage inputs. `(("libc" ,glibc-final) + ("libc:static" ,glibc-final "static") ("gcc" ,gcc-boot0-wrapped) ,@(fold alist-delete %boot1-inputs '("libc" "gcc")))) @@ -923,12 +936,13 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" ("binutils" ,binutils-final) ("gcc" ,gcc-final) ("libc" ,glibc-final) + ("libc:static" ,glibc-final "static") ("locales" ,glibc-utf8-locales-final)))) (define-public canonical-package (let ((name->package (fold (lambda (input result) (match input - ((_ package) + ((_ package . outputs) (vhash-cons (package-full-name package) package result)))) vlist-null diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 7eeeaf362d..f3fe5e8de1 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -202,7 +202,16 @@ adding and extracting files to/from a tar archive.") (synopsis "General file (de)compression (using lzw)") (arguments ;; FIXME: The test suite wants `less', and optionally Perl. - '(#:tests? #f)) + '(#:tests? #f + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'use-absolute-name-of-gzip + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "gunzip.in" + (("exec gzip") + (string-append "exec " (assoc-ref outputs "out") + "/bin/gzip"))) + #t))))) (description "GNU Gzip provides data compression and decompression utilities; the typical extension is \".gz\". Unlike the \"zip\" format, it compresses a single diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index abc3a2821c..369083eab0 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -248,6 +248,7 @@ target that libc." ,@inputs))) (libc `(("libc" ,libc) + ("libc:static" ,libc "static") ("xkernel-headers" ;the target headers ,@(assoc-ref (package-propagated-inputs libc) "kernel-headers")) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index bd1c9e55e2..20981dced1 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -792,7 +792,7 @@ for example from a shell script.") (define-public sqlite (package (name "sqlite") - (version "3.19.3") + (version "3.20.1") (source (origin (method url-fetch) (uri (let ((numeric-version @@ -808,7 +808,7 @@ for example from a shell script.") numeric-version ".tar.gz"))) (sha256 (base32 - "00b3l2qglpl1inx21fckiwxnfq5xf6441flc79rqg7zdvh1rq4h6")))) + "0hh7jnxfwvs2qlvmjwrgkvxb8sk4x8hj04m54fq9h1xw55dmjrpc")))) (build-system gnu-build-system) (inputs `(("readline" ,readline))) (arguments diff --git a/gnu/packages/file.scm b/gnu/packages/file.scm index 3bc8e1dcfe..63aa3fac49 100644 --- a/gnu/packages/file.scm +++ b/gnu/packages/file.scm @@ -27,16 +27,15 @@ (define-public file (package - (replacement file/fixed) (name "file") - (version "5.30") + (version "5.32") (source (origin (method url-fetch) (uri (string-append "ftp://ftp.astron.com/pub/file/file-" version ".tar.gz")) (sha256 (base32 - "057jpcyy8ws7q4s4sm8r1rxb8xycdbng2z4y9i98f094wlr28k39")))) + "0l1bfa0icng9vdwya00ff48fhvjazi5610ylbhl35qi13d6xqfc6")))) (build-system gnu-build-system) ;; When cross-compiling, this package depends upon a native install of @@ -50,11 +49,4 @@ you in words what kind of data a file contains. It does not rely on filename extensions to tell you the type of a file, but looks at the actual contents of the file.") (license bsd-2) - (home-page "http://www.darwinsys.com/file/"))) - -(define file/fixed - (package - (inherit file) - (source (origin - (inherit (package-source file)) - (patches (search-patches "file-CVE-2017-1000249.patch")))))) + (home-page "https://www.darwinsys.com/file/"))) diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm index 67dd1dbfa6..6e1a60e9ba 100644 --- a/gnu/packages/groff.scm +++ b/gnu/packages/groff.scm @@ -56,7 +56,14 @@ ("perl" ,perl) ("psutils" ,psutils) ("texinfo" ,texinfo))) - (arguments '(#:parallel-build? #f)) ; parallel build fails + (arguments + `(#:parallel-build? #f ; parallel build fails + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'setenv + (lambda _ + (setenv "GS_GENERATE_UUIDS" "0") + #t))))) (synopsis "Typesetting from plain text mixed with formatting commands") (description "Groff is a typesetting package that reads plain text and produces diff --git a/gnu/packages/libidn.scm b/gnu/packages/libidn.scm index dfb1be6c4f..ff0c05bad0 100644 --- a/gnu/packages/libidn.scm +++ b/gnu/packages/libidn.scm @@ -55,15 +55,14 @@ Java libraries.") (define-public libidn2 (package (name "libidn2") - (version "2.0.2") - (replacement libidn2-2.0.4) + (version "2.0.4") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/libidn/" name "-" version ".tar.lz")) (sha256 (base32 - "0pqaj8d01aj4i110669fincqs10kgynyqcrmq2q7pss8v9dcd1jq")))) + "00f2fyw5kwr9is3cdn5h9arzxp0lnvg0z9bb9zyfs0dq81gaqim4")))) (native-inputs `(("lzip" ,lzip))) (inputs @@ -75,19 +74,7 @@ the IDNA2008 specifications. Libidn2 is believed to be a complete IDNA2008 implementation, but has yet to be as extensively used as the original Libidn library.") (home-page "https://www.gnu.org/software/libidn/#libidn2") + (properties '((ftp-directory . "/gnu/libidn"))) ;; The command-line tool 'idn2' is GPL3+, while the library is dual-licensed ;; GPL2+ or LGPL3+. (license (list gpl2+ gpl3+ lgpl3+)))) - -(define-public libidn2-2.0.4 - (package - (inherit libidn2) - (name "libidn2") - (version "2.0.4") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/libidn/" name "-" version - ".tar.lz")) - (sha256 - (base32 - "00f2fyw5kwr9is3cdn5h9arzxp0lnvg0z9bb9zyfs0dq81gaqim4")))))) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index f326f6af72..962bcd8278 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -2458,7 +2458,7 @@ parts of it.") (define-public openblas (package (name "openblas") - (version "0.2.19") + (version "0.2.20") (source (origin (method url-fetch) @@ -2467,10 +2467,10 @@ parts of it.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "071zqnmnxhh0c9phzyn3f198yxa0hjxda7016azdbq2056sm70w7")))) + "1bd03c5xni0bla0wg1wba841b36b0sg13sjja955kn5xzvy4i61a")))) (build-system gnu-build-system) (arguments - `(#:tests? #f ;no "check" target + `(#:test-target "test" ;; DYNAMIC_ARCH is only supported on x86. When it is disabled and no ;; TARGET is specified, OpenBLAS will tune itself to the build host, so ;; we need to disable substitutions. diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm index b6d2d7f4af..69272eb18a 100644 --- a/gnu/packages/multiprecision.scm +++ b/gnu/packages/multiprecision.scm @@ -87,13 +87,13 @@ cryptography and computational algebra.") (define-public mpfr (package (name "mpfr") - (version "3.1.5") + (version "3.1.6") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/mpfr/mpfr-" version ".tar.xz")) (sha256 (base32 - "1g32l2fg8f62lcyzzh88y3fsh6rk539qc6ahhdgvx7wpnf1dwpq1")))) + "0l598h9klpgkz2bp0rxiqb90mkqh9f2f81n5rpy191j00hdaqqks")))) (build-system gnu-build-system) (outputs '("out" "debug")) (propagated-inputs `(("gmp" ,gmp))) ; <mpfr.h> refers to <gmp.h> diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 197a7a0142..1efb30e800 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -33,6 +33,7 @@ #:use-module (gnu packages guile) #:use-module (gnu packages file) #:use-module (gnu packages backup) + #:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin' #:use-module (gnu packages compression) #:use-module (gnu packages gnupg) #:use-module (gnu packages databases) @@ -229,39 +230,19 @@ ("graphviz" ,graphviz) ("help2man" ,help2man))) (inputs - (let ((boot-guile (lambda (arch hash) - (origin - (method url-fetch) - (uri (boot-guile-uri arch)) - (sha256 hash))))) - `(("bzip2" ,bzip2) - ("gzip" ,gzip) - ("zlib" ,zlib) ;for 'guix publish' - - ("sqlite" ,sqlite) - ("libgcrypt" ,libgcrypt) - ("guile" ,guile-2.2) - - ("boot-guile/i686" - ,(boot-guile "i686" - (base32 - "0im800m30abgh7msh331pcbjvb4n02smz5cfzf1srv0kpx3csmxp"))) - ("boot-guile/x86_64" - ,(boot-guile "x86_64" - (base32 - "1w2p5zyrglzzniqgvyn1b55vprfzhgk8vzbzkkbdgl5248si0yq3"))) - ("boot-guile/mips64el" - ,(boot-guile "mips64el" - (base32 - "0fzp93lvi0hn54acc0fpvhc7bvl0yc853k62l958cihk03q80ilr"))) - ("boot-guile/armhf" - ,(boot-guile "armhf" - (base32 - "1mi3brl7l58aww34rawhvja84xc7l1b4hmwdmc36fp9q9mfx0lg5"))) - ("boot-guile/aarch64" - ,(boot-guile "aarch64" - (base32 - "1giy2aprjmn5fp9c4s9r125fljw4wv6ixy5739i5bffw4jgr0f9r")))))) + `(("bzip2" ,bzip2) + ("gzip" ,gzip) + ("zlib" ,zlib) ;for 'guix publish' + + ("sqlite" ,sqlite) + ("libgcrypt" ,libgcrypt) + ("guile" ,guile-2.2) + + ("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")) + ("boot-guile/x86_64" ,(bootstrap-guile-origin "x86_64-linux")) + ("boot-guile/mips64el" ,(bootstrap-guile-origin "mips64el-linux")) + ("boot-guile/armhf" ,(bootstrap-guile-origin "armhf-linux")) + ("boot-guile/aarch64" ,(bootstrap-guile-origin "aarch64-linux")))) (propagated-inputs `(("gnutls" ,gnutls) ("guile-json" ,guile-json) diff --git a/gnu/packages/patches/coreutils-cut-huge-range-test.patch b/gnu/packages/patches/coreutils-cut-huge-range-test.patch deleted file mode 100644 index e3a0ef28eb..0000000000 --- a/gnu/packages/patches/coreutils-cut-huge-range-test.patch +++ /dev/null @@ -1,33 +0,0 @@ -This patch fixes 100% reproducible test failures on arm-linux-gnueabihf in our -the build environment chroot, as reported at <https://bugs.gnu.org/26253>, -and now on x86_64-linux-gnu as well. It is a variant of this upstream patch: - - commit f5422009389678680dba9ff4ecb7d33632ee3383 - Author: Ludovic Courtès <ludo@gnu.org> - Date: Mon Mar 27 20:34:39 2017 -0700 - - tests: avoid false ulimit failure on some systems - - * tests/misc/cut-huge-range.sh: On some systems returns_ may - use more memory, so incorporate that in the determination - of the ulimit value to use. Noticed on ARMv7 with bash-4.4.12, - and x86_64 with bash-4.2.37. - Fixes http://bugs.gnu.org/26253 - -... which appeared to be insufficient. - -diff --git a/tests/misc/cut-huge-range.sh b/tests/misc/cut-huge-range.sh -index 6b3c5b6ed..55b7b640e 100755 ---- a/tests/misc/cut-huge-range.sh -+++ b/tests/misc/cut-huge-range.sh -@@ -20,9 +20,9 @@ - print_ver_ cut - getlimits_ - --vm=$(get_min_ulimit_v_ cut -b1 /dev/null) \ -+vm=$(get_min_ulimit_v_ sh -c 'cut -b1 /dev/null') \ - || skip_ "this shell lacks ulimit support" - vm=$(($vm + 1000)) # avoid spurious failures - - # sed script to subtract one from the input. - # Each input line should consist of a positive decimal number. diff --git a/gnu/packages/patches/grep-gnulib-lock.patch b/gnu/packages/patches/grep-gnulib-lock.patch deleted file mode 100644 index 68c33f1031..0000000000 --- a/gnu/packages/patches/grep-gnulib-lock.patch +++ /dev/null @@ -1,32 +0,0 @@ -This patch fix error on 'gnulib' library required to build -'grep' package on GNU/Hurd. -The patch was adapted from upstream source repository: -'<http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=4084b3a1094372b960ce4a97634e08f4538c8bdd>' - -Commit: 4084b3a1094372b960ce4a97634e08f4538c8bdd - -diff --git a/lib/glthread/lock.c b/lib/glthread/lock.c -index 061562b..afc86f4 100644 ---- a/lib/glthread/lock.c -+++ b/lib/glthread/lock.c -@@ -30,7 +30,7 @@ - - /* ------------------------- gl_rwlock_t datatype ------------------------- */ - --# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (__GNU_LIBRARY__ > 1)) -+# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (defined PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP && (__GNU_LIBRARY__ > 1))) - - # ifdef PTHREAD_RWLOCK_INITIALIZER - -diff --git a/lib/glthread/lock.h b/lib/glthread/lock.h -index ec16d39..67932aa 100644 ---- a/lib/glthread/lock.h -+++ b/lib/glthread/lock.h -@@ -179,7 +179,7 @@ typedef pthread_mutex_t gl_lock_t; - - /* ------------------------- gl_rwlock_t datatype ------------------------- */ - --# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (__GNU_LIBRARY__ > 1)) -+# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (defined PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP && (__GNU_LIBRARY__ > 1))) - - # ifdef PTHREAD_RWLOCK_INITIALIZER diff --git a/gnu/packages/patches/libxml2-CVE-2016-4658.patch b/gnu/packages/patches/libxml2-CVE-2016-4658.patch deleted file mode 100644 index a4e1f31fae..0000000000 --- a/gnu/packages/patches/libxml2-CVE-2016-4658.patch +++ /dev/null @@ -1,257 +0,0 @@ -Fix CVE-2016-4658: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-4658 - -Patch copied from upstream source repository: - -https://git.gnome.org/browse/libxml2/commit/?id=c1d1f7121194036608bf555f08d3062a36fd344b - -From c1d1f7121194036608bf555f08d3062a36fd344b Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer <wellnhofer@aevum.de> -Date: Tue, 28 Jun 2016 18:34:52 +0200 -Subject: [PATCH] Disallow namespace nodes in XPointer ranges - -Namespace nodes must be copied to avoid use-after-free errors. -But they don't necessarily have a physical representation in a -document, so simply disallow them in XPointer ranges. - -Found with afl-fuzz. - -Fixes CVE-2016-4658. ---- - xpointer.c | 149 +++++++++++++++++++++++-------------------------------------- - 1 file changed, 56 insertions(+), 93 deletions(-) - -diff --git a/xpointer.c b/xpointer.c -index a7b03fbd..694d120e 100644 ---- a/xpointer.c -+++ b/xpointer.c -@@ -320,6 +320,45 @@ xmlXPtrRangesEqual(xmlXPathObjectPtr range1, xmlXPathObjectPtr range2) { - } - - /** -+ * xmlXPtrNewRangeInternal: -+ * @start: the starting node -+ * @startindex: the start index -+ * @end: the ending point -+ * @endindex: the ending index -+ * -+ * Internal function to create a new xmlXPathObjectPtr of type range -+ * -+ * Returns the newly created object. -+ */ -+static xmlXPathObjectPtr -+xmlXPtrNewRangeInternal(xmlNodePtr start, int startindex, -+ xmlNodePtr end, int endindex) { -+ xmlXPathObjectPtr ret; -+ -+ /* -+ * Namespace nodes must be copied (see xmlXPathNodeSetDupNs). -+ * Disallow them for now. -+ */ -+ if ((start != NULL) && (start->type == XML_NAMESPACE_DECL)) -+ return(NULL); -+ if ((end != NULL) && (end->type == XML_NAMESPACE_DECL)) -+ return(NULL); -+ -+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); -+ if (ret == NULL) { -+ xmlXPtrErrMemory("allocating range"); -+ return(NULL); -+ } -+ memset(ret, 0, sizeof(xmlXPathObject)); -+ ret->type = XPATH_RANGE; -+ ret->user = start; -+ ret->index = startindex; -+ ret->user2 = end; -+ ret->index2 = endindex; -+ return(ret); -+} -+ -+/** - * xmlXPtrNewRange: - * @start: the starting node - * @startindex: the start index -@@ -344,17 +383,7 @@ xmlXPtrNewRange(xmlNodePtr start, int startindex, - if (endindex < 0) - return(NULL); - -- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); -- if (ret == NULL) { -- xmlXPtrErrMemory("allocating range"); -- return(NULL); -- } -- memset(ret, 0 , (size_t) sizeof(xmlXPathObject)); -- ret->type = XPATH_RANGE; -- ret->user = start; -- ret->index = startindex; -- ret->user2 = end; -- ret->index2 = endindex; -+ ret = xmlXPtrNewRangeInternal(start, startindex, end, endindex); - xmlXPtrRangeCheckOrder(ret); - return(ret); - } -@@ -381,17 +410,8 @@ xmlXPtrNewRangePoints(xmlXPathObjectPtr start, xmlXPathObjectPtr end) { - if (end->type != XPATH_POINT) - return(NULL); - -- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); -- if (ret == NULL) { -- xmlXPtrErrMemory("allocating range"); -- return(NULL); -- } -- memset(ret, 0 , (size_t) sizeof(xmlXPathObject)); -- ret->type = XPATH_RANGE; -- ret->user = start->user; -- ret->index = start->index; -- ret->user2 = end->user; -- ret->index2 = end->index; -+ ret = xmlXPtrNewRangeInternal(start->user, start->index, end->user, -+ end->index); - xmlXPtrRangeCheckOrder(ret); - return(ret); - } -@@ -416,17 +436,7 @@ xmlXPtrNewRangePointNode(xmlXPathObjectPtr start, xmlNodePtr end) { - if (start->type != XPATH_POINT) - return(NULL); - -- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); -- if (ret == NULL) { -- xmlXPtrErrMemory("allocating range"); -- return(NULL); -- } -- memset(ret, 0 , (size_t) sizeof(xmlXPathObject)); -- ret->type = XPATH_RANGE; -- ret->user = start->user; -- ret->index = start->index; -- ret->user2 = end; -- ret->index2 = -1; -+ ret = xmlXPtrNewRangeInternal(start->user, start->index, end, -1); - xmlXPtrRangeCheckOrder(ret); - return(ret); - } -@@ -453,17 +463,7 @@ xmlXPtrNewRangeNodePoint(xmlNodePtr start, xmlXPathObjectPtr end) { - if (end->type != XPATH_POINT) - return(NULL); - -- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); -- if (ret == NULL) { -- xmlXPtrErrMemory("allocating range"); -- return(NULL); -- } -- memset(ret, 0 , (size_t) sizeof(xmlXPathObject)); -- ret->type = XPATH_RANGE; -- ret->user = start; -- ret->index = -1; -- ret->user2 = end->user; -- ret->index2 = end->index; -+ ret = xmlXPtrNewRangeInternal(start, -1, end->user, end->index); - xmlXPtrRangeCheckOrder(ret); - return(ret); - } -@@ -486,17 +486,7 @@ xmlXPtrNewRangeNodes(xmlNodePtr start, xmlNodePtr end) { - if (end == NULL) - return(NULL); - -- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); -- if (ret == NULL) { -- xmlXPtrErrMemory("allocating range"); -- return(NULL); -- } -- memset(ret, 0 , (size_t) sizeof(xmlXPathObject)); -- ret->type = XPATH_RANGE; -- ret->user = start; -- ret->index = -1; -- ret->user2 = end; -- ret->index2 = -1; -+ ret = xmlXPtrNewRangeInternal(start, -1, end, -1); - xmlXPtrRangeCheckOrder(ret); - return(ret); - } -@@ -516,17 +506,7 @@ xmlXPtrNewCollapsedRange(xmlNodePtr start) { - if (start == NULL) - return(NULL); - -- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); -- if (ret == NULL) { -- xmlXPtrErrMemory("allocating range"); -- return(NULL); -- } -- memset(ret, 0 , (size_t) sizeof(xmlXPathObject)); -- ret->type = XPATH_RANGE; -- ret->user = start; -- ret->index = -1; -- ret->user2 = NULL; -- ret->index2 = -1; -+ ret = xmlXPtrNewRangeInternal(start, -1, NULL, -1); - return(ret); - } - -@@ -541,6 +521,8 @@ xmlXPtrNewCollapsedRange(xmlNodePtr start) { - */ - xmlXPathObjectPtr - xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) { -+ xmlNodePtr endNode; -+ int endIndex; - xmlXPathObjectPtr ret; - - if (start == NULL) -@@ -549,7 +531,12 @@ xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) { - return(NULL); - switch (end->type) { - case XPATH_POINT: -+ endNode = end->user; -+ endIndex = end->index; -+ break; - case XPATH_RANGE: -+ endNode = end->user2; -+ endIndex = end->index2; - break; - case XPATH_NODESET: - /* -@@ -557,39 +544,15 @@ xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) { - */ - if (end->nodesetval->nodeNr <= 0) - return(NULL); -+ endNode = end->nodesetval->nodeTab[end->nodesetval->nodeNr - 1]; -+ endIndex = -1; - break; - default: - /* TODO */ - return(NULL); - } - -- ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); -- if (ret == NULL) { -- xmlXPtrErrMemory("allocating range"); -- return(NULL); -- } -- memset(ret, 0 , (size_t) sizeof(xmlXPathObject)); -- ret->type = XPATH_RANGE; -- ret->user = start; -- ret->index = -1; -- switch (end->type) { -- case XPATH_POINT: -- ret->user2 = end->user; -- ret->index2 = end->index; -- break; -- case XPATH_RANGE: -- ret->user2 = end->user2; -- ret->index2 = end->index2; -- break; -- case XPATH_NODESET: { -- ret->user2 = end->nodesetval->nodeTab[end->nodesetval->nodeNr - 1]; -- ret->index2 = -1; -- break; -- } -- default: -- STRANGE -- return(NULL); -- } -+ ret = xmlXPtrNewRangeInternal(start, -1, endNode, endIndex); - xmlXPtrRangeCheckOrder(ret); - return(ret); - } --- -2.11.0 - diff --git a/gnu/packages/patches/libxml2-CVE-2016-5131.patch b/gnu/packages/patches/libxml2-CVE-2016-5131.patch deleted file mode 100644 index 38938c8e3e..0000000000 --- a/gnu/packages/patches/libxml2-CVE-2016-5131.patch +++ /dev/null @@ -1,218 +0,0 @@ -Fix CVE-2016-5131: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-5131 - -Patches copied from upstream source repository (the test suite fails -without the 2nd patch): - -https://git.gnome.org/browse/libxml2/commit/?id=9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e -https://git.gnome.org/browse/libxml2/commit/?id=a005199330b86dada19d162cae15ef9bdcb6baa8 - -From 9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer <wellnhofer@aevum.de> -Date: Tue, 28 Jun 2016 14:22:23 +0200 -Subject: [PATCH] Fix XPointer paths beginning with range-to - -The old code would invoke the broken xmlXPtrRangeToFunction. range-to -isn't really a function but a special kind of location step. Remove -this function and always handle range-to in the XPath code. - -The old xmlXPtrRangeToFunction could also be abused to trigger a -use-after-free error with the potential for remote code execution. - -Found with afl-fuzz. - -Fixes CVE-2016-5131. ---- - result/XPath/xptr/vidbase | 13 ++++++++ - test/XPath/xptr/vidbase | 1 + - xpath.c | 7 ++++- - xpointer.c | 76 ++++------------------------------------------- - 4 files changed, 26 insertions(+), 71 deletions(-) - -diff --git a/result/XPath/xptr/vidbase b/result/XPath/xptr/vidbase -index 8b9e92d6..f19193e7 100644 ---- a/result/XPath/xptr/vidbase -+++ b/result/XPath/xptr/vidbase -@@ -17,3 +17,16 @@ Object is a Location Set: - To node - ELEMENT p - -+ -+======================== -+Expression: xpointer(range-to(id('chapter2'))) -+Object is a Location Set: -+1 : Object is a range : -+ From node -+ / -+ To node -+ ELEMENT chapter -+ ATTRIBUTE id -+ TEXT -+ content=chapter2 -+ -diff --git a/test/XPath/xptr/vidbase b/test/XPath/xptr/vidbase -index b1463830..884b1065 100644 ---- a/test/XPath/xptr/vidbase -+++ b/test/XPath/xptr/vidbase -@@ -1,2 +1,3 @@ - xpointer(id('chapter1')/p) - xpointer(id('chapter1')/p[1]/range-to(following-sibling::p[2])) -+xpointer(range-to(id('chapter2'))) -diff --git a/xpath.c b/xpath.c -index d992841e..5a01b1b3 100644 ---- a/xpath.c -+++ b/xpath.c -@@ -10691,13 +10691,18 @@ xmlXPathCompPathExpr(xmlXPathParserContextPtr ctxt) { - lc = 1; - break; - } else if ((NXT(len) == '(')) { -- /* Note Type or Function */ -+ /* Node Type or Function */ - if (xmlXPathIsNodeType(name)) { - #ifdef DEBUG_STEP - xmlGenericError(xmlGenericErrorContext, - "PathExpr: Type search\n"); - #endif - lc = 1; -+#ifdef LIBXML_XPTR_ENABLED -+ } else if (ctxt->xptr && -+ xmlStrEqual(name, BAD_CAST "range-to")) { -+ lc = 1; -+#endif - } else { - #ifdef DEBUG_STEP - xmlGenericError(xmlGenericErrorContext, -diff --git a/xpointer.c b/xpointer.c -index 676c5105..d74174a3 100644 ---- a/xpointer.c -+++ b/xpointer.c -@@ -1332,8 +1332,6 @@ xmlXPtrNewContext(xmlDocPtr doc, xmlNodePtr here, xmlNodePtr origin) { - ret->here = here; - ret->origin = origin; - -- xmlXPathRegisterFunc(ret, (xmlChar *)"range-to", -- xmlXPtrRangeToFunction); - xmlXPathRegisterFunc(ret, (xmlChar *)"range", - xmlXPtrRangeFunction); - xmlXPathRegisterFunc(ret, (xmlChar *)"range-inside", -@@ -2243,76 +2241,14 @@ xmlXPtrRangeInsideFunction(xmlXPathParserContextPtr ctxt, int nargs) { - * @nargs: the number of args - * - * Implement the range-to() XPointer function -+ * -+ * Obsolete. range-to is not a real function but a special type of location -+ * step which is handled in xpath.c. - */ - void --xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt, int nargs) { -- xmlXPathObjectPtr range; -- const xmlChar *cur; -- xmlXPathObjectPtr res, obj; -- xmlXPathObjectPtr tmp; -- xmlLocationSetPtr newset = NULL; -- xmlNodeSetPtr oldset; -- int i; -- -- if (ctxt == NULL) return; -- CHECK_ARITY(1); -- /* -- * Save the expression pointer since we will have to evaluate -- * it multiple times. Initialize the new set. -- */ -- CHECK_TYPE(XPATH_NODESET); -- obj = valuePop(ctxt); -- oldset = obj->nodesetval; -- ctxt->context->node = NULL; -- -- cur = ctxt->cur; -- newset = xmlXPtrLocationSetCreate(NULL); -- -- for (i = 0; i < oldset->nodeNr; i++) { -- ctxt->cur = cur; -- -- /* -- * Run the evaluation with a node list made of a single item -- * in the nodeset. -- */ -- ctxt->context->node = oldset->nodeTab[i]; -- tmp = xmlXPathNewNodeSet(ctxt->context->node); -- valuePush(ctxt, tmp); -- -- xmlXPathEvalExpr(ctxt); -- CHECK_ERROR; -- -- /* -- * The result of the evaluation need to be tested to -- * decided whether the filter succeeded or not -- */ -- res = valuePop(ctxt); -- range = xmlXPtrNewRangeNodeObject(oldset->nodeTab[i], res); -- if (range != NULL) { -- xmlXPtrLocationSetAdd(newset, range); -- } -- -- /* -- * Cleanup -- */ -- if (res != NULL) -- xmlXPathFreeObject(res); -- if (ctxt->value == tmp) { -- res = valuePop(ctxt); -- xmlXPathFreeObject(res); -- } -- -- ctxt->context->node = NULL; -- } -- -- /* -- * The result is used as the new evaluation set. -- */ -- xmlXPathFreeObject(obj); -- ctxt->context->node = NULL; -- ctxt->context->contextSize = -1; -- ctxt->context->proximityPosition = -1; -- valuePush(ctxt, xmlXPtrWrapLocationSet(newset)); -+xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt, -+ int nargs ATTRIBUTE_UNUSED) { -+ XP_ERROR(XPATH_EXPR_ERROR); - } - - /** --- -2.11.0 - -From a005199330b86dada19d162cae15ef9bdcb6baa8 Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer <wellnhofer@aevum.de> -Date: Tue, 28 Jun 2016 14:19:58 +0200 -Subject: [PATCH] Fix comparison with root node in xmlXPathCmpNodes - -This change has already been made in xmlXPathCmpNodesExt but not in -xmlXPathCmpNodes. ---- - xpath.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/xpath.c b/xpath.c -index 751665b8..d992841e 100644 ---- a/xpath.c -+++ b/xpath.c -@@ -3342,13 +3342,13 @@ xmlXPathCmpNodes(xmlNodePtr node1, xmlNodePtr node2) { - * compute depth to root - */ - for (depth2 = 0, cur = node2;cur->parent != NULL;cur = cur->parent) { -- if (cur == node1) -+ if (cur->parent == node1) - return(1); - depth2++; - } - root = cur; - for (depth1 = 0, cur = node1;cur->parent != NULL;cur = cur->parent) { -- if (cur == node2) -+ if (cur->parent == node2) - return(-1); - depth1++; - } --- -2.11.0 - diff --git a/gnu/packages/patches/libxslt-CVE-2016-4738.patch b/gnu/packages/patches/libxslt-CVE-2016-4738.patch deleted file mode 100644 index a7537c66ca..0000000000 --- a/gnu/packages/patches/libxslt-CVE-2016-4738.patch +++ /dev/null @@ -1,39 +0,0 @@ -Fix CVE-2016-4738: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-4738 -https://bugs.chromium.org/p/chromium/issues/detail?id=619006 - -Patch copied from upstream source repository: -https://git.gnome.org/browse/libxslt/commit/?id=eb1030de31165b68487f288308f9d1810fed6880 - -From eb1030de31165b68487f288308f9d1810fed6880 Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer <wellnhofer@aevum.de> -Date: Fri, 10 Jun 2016 14:23:58 +0200 -Subject: [PATCH] Fix heap overread in xsltFormatNumberConversion - -An empty decimal-separator could cause a heap overread. This can be -exploited to leak a couple of bytes after the buffer that holds the -pattern string. - -Found with afl-fuzz and ASan. ---- - libxslt/numbers.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/libxslt/numbers.c b/libxslt/numbers.c -index d1549b4..e78c46b 100644 ---- a/libxslt/numbers.c -+++ b/libxslt/numbers.c -@@ -1090,7 +1090,8 @@ xsltFormatNumberConversion(xsltDecimalFormatPtr self, - } - - /* We have finished the integer part, now work on fraction */ -- if (xsltUTF8Charcmp(the_format, self->decimalPoint) == 0) { -+ if ( (*the_format != 0) && -+ (xsltUTF8Charcmp(the_format, self->decimalPoint) == 0) ) { - format_info.add_decimal = TRUE; - the_format += xsltUTF8Size(the_format); /* Skip over the decimal */ - } --- -2.10.2 - diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 77c4a8347d..f1dc2da050 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -6252,14 +6252,15 @@ implementation of D-Bus.") (define-public python-apsw (package (name "python-apsw") - (version "3.9.2-r1") + (version "3.20.1-r1") (source (origin (method url-fetch) - (uri (pypi-uri "apsw" version)) + (uri (string-append "https://github.com/rogerbinns/apsw/archive/" + version ".tar.gz")) (sha256 (base32 - "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs")))) + "00ai7m2pqi26qaflhz314d8k5i3syw7xzr145fhfl0crhyh6adz2")))) (build-system python-build-system) (inputs `(("sqlite" ,sqlite))) diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm index 8c33023bd0..29455b911d 100644 --- a/gnu/packages/texinfo.scm +++ b/gnu/packages/texinfo.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2012, 2013, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014, 2016 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,14 +34,14 @@ ;; TODO: Merge with 'texinfo-latest' on the next core-updates. (package (name "texinfo") - (version "6.3") + (version "6.4") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/texinfo/texinfo-" version ".tar.xz")) (sha256 (base32 - "0fpr9kdjjl6nj2pc50k2zr7134hvqz8bi8pfqa7131a9lpzz6v14")))) + "0ficyfpknfrsm3xn3svd38fja3s7s1ml5wn6yyd0ycf6hwfydqka")))) (build-system gnu-build-system) (native-inputs `(("procps" ,procps))) ;one of the tests needs pgrep (inputs `(("ncurses" ,ncurses) diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index d889e602ed..ff9862e4b9 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2015, 2016, 2017 Mark H Weaver <mhw@netris.org> -;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2015 Raimon Grau <raimonster@gmail.com> ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org> ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name> @@ -110,17 +110,14 @@ hierarchical form with variable field lengths.") (define-public libxml2 (package (name "libxml2") - (version "2.9.4") - (replacement libxml2/fixed) + (version "2.9.5") (source (origin (method url-fetch) (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-" version ".tar.gz")) - (patches (search-patches "libxml2-CVE-2016-4658.patch" - "libxml2-CVE-2016-5131.patch")) (sha256 (base32 - "0g336cr0bw6dax1q48bblphmchgihx9p1pjmxdnrd6sh3qci3fgz")))) + "0f6d5nkvcfx8yqis2dwrnv6qaj0nhiifz49y657vmrwwxvnc2ca0")))) (build-system gnu-build-system) (home-page "http://www.xmlsoft.org/") (synopsis "C parser for XML") @@ -140,20 +137,6 @@ hierarchical form with variable field lengths.") project (but it is usable outside of the Gnome platform).") (license license:x11))) -(define libxml2/fixed - (package - (inherit libxml2) - (source - (origin - (inherit (package-source libxml2)) - (patches - (append (origin-patches (package-source libxml2)) - (search-patches "libxml2-CVE-2017-0663.patch" - "libxml2-CVE-2017-7375.patch" - "libxml2-CVE-2017-7376.patch" - "libxml2-CVE-2017-9047+CVE-2017-9048.patch" - "libxml2-CVE-2017-9049+CVE-2017-9050.patch"))))))) - (define-public python-libxml2 (package (inherit libxml2) (name "python-libxml2") @@ -186,15 +169,14 @@ project (but it is usable outside of the Gnome platform).") (define-public libxslt (package (name "libxslt") - (version "1.1.29") + (version "1.1.30") (source (origin (method url-fetch) (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-" version ".tar.gz")) - (patches (search-patches "libxslt-CVE-2016-4738.patch")) (sha256 (base32 - "1klh81xbm9ppzgqk339097i39b7fnpmlj8lzn8bpczl3aww6x5xm")) + "1cxn21wi0wms3afhnlxwjm8iiykrk29bvckq6gc2d0yy2rhj6rds")) (patches (search-patches "libxslt-generated-ids.patch")))) (build-system gnu-build-system) (home-page "http://xmlsoft.org/XSLT/index.html") diff --git a/guix/build/utils.scm b/guix/build/utils.scm index 7391307c87..d7ed3d5177 100644 --- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -29,6 +29,7 @@ #:use-module (ice-9 regex) #:use-module (ice-9 rdelim) #:use-module (ice-9 format) + #:use-module (ice-9 threads) #:use-module (rnrs bytevectors) #:use-module (rnrs io ports) #:re-export (alist-cons diff --git a/guix/download.scm b/guix/download.scm index e090a72306..a1560de1a1 100644 --- a/guix/download.scm +++ b/guix/download.scm @@ -411,89 +411,6 @@ download by itself using its own dependencies." ;; for that built-in is widespread. #:local-build? #t))) -(define* (in-band-download file-name url - #:key system hash-algo hash - mirrors content-addressed-mirrors - guile) - "Download FILE-NAME from URL using a normal, \"in-band\" fixed-output -derivation. - -This is now deprecated since it has the drawback of causing bootstrapping -issues: we may need to build GnuTLS just to be able to download the source of -GnuTLS itself and its dependencies. See <http://bugs.gnu.org/22774>." - (define need-gnutls? - ;; True if any of the URLs need TLS support. - (let ((https? (cut string-prefix? "https://" <>))) - (match url - ((? string?) - (https? url)) - ((url ...) - (any https? url))))) - - (define builder - (with-imported-modules '((guix build download) - (guix build utils) - (guix ftp-client) - (guix base32) - (guix base64)) - #~(begin - #+(if need-gnutls? - - ;; Add GnuTLS to the inputs and to the load path. - #~(eval-when (load expand eval) - (set! %load-path - (cons (string-append #+(gnutls-package) - "/share/guile/site/" - (effective-version)) - %load-path))) - #~#t) - - (use-modules (guix build download) - (guix base32)) - - (let ((value-from-environment (lambda (variable) - (call-with-input-string - (getenv variable) - read)))) - (url-fetch (value-from-environment "guix download url") - #$output - #:mirrors (call-with-input-file #$mirrors read) - - ;; Content-addressed mirrors. - #:hashes - (value-from-environment "guix download hashes") - #:content-addressed-mirrors - (primitive-load #$content-addressed-mirrors) - - ;; No need to validate certificates since we know the - ;; hash of the expected result. - #:verify-certificate? #f))))) - - (mlet %store-monad ((guile (package->derivation guile system))) - (gexp->derivation file-name builder - #:guile-for-build guile - #:system system - #:hash-algo hash-algo - #:hash hash - - ;; Use environment variables and a fixed script - ;; name so there's only one script in store for - ;; all the downloads. - #:script-name "download" - #:env-vars - `(("guix download url" . ,(object->string url)) - ("guix download hashes" - . ,(object->string `((,hash-algo . ,hash))))) - - ;; Honor the user's proxy settings. - #:leaked-env-vars '("http_proxy" "https_proxy") - - ;; In general, offloading downloads is not a good - ;; idea. Daemons before 0.8.3 would also - ;; interpret this as "do not substitute" (see - ;; <https://bugs.gnu.org/18747>.) - #:local-build? #t))) - (define* (url-fetch url hash-algo hash #:optional name #:key (system (%current-system)) @@ -520,18 +437,21 @@ in the store." (and uri (memq (uri-scheme uri) '(#f file)))) (interned-file (if uri (uri-path uri) url) (or name file-name)) - (mlet* %store-monad ((builtins (built-in-builders*)) - (download -> (if (member "download" builtins) - built-in-download - in-band-download))) - (download (or name file-name) url - #:guile guile - #:system system - #:hash-algo hash-algo - #:hash hash - #:mirrors %mirror-file - #:content-addressed-mirrors - %content-addressed-mirror-file))))) + (mlet %store-monad ((builtins (built-in-builders*))) + ;; The "download" built-in builder was added in guix-daemon in + ;; Nov. 2016 and made it in the 0.12.0 release of Dec. 2016. We now + ;; require it. + (unless (member "download" builtins) + (error "'guix-daemon' is too old, please upgrade" builtins)) + + (built-in-download (or name file-name) url + #:guile guile + #:system system + #:hash-algo hash-algo + #:hash hash + #:mirrors %mirror-file + #:content-addressed-mirrors + %content-addressed-mirror-file))))) (define* (url-fetch/tarbomb url hash-algo hash #:optional name |