diff options
27 files changed, 288 insertions, 231 deletions
diff --git a/gnu-system.am b/gnu-system.am index 8f8ce4003d0..67b13e78032 100644 --- a/gnu-system.am +++ b/gnu-system.am | |||
| @@ -311,7 +311,6 @@ dist_patch_DATA = \ | |||
| 311 | gnu/packages/patches/clucene-pkgconfig.patch \ | 311 | gnu/packages/patches/clucene-pkgconfig.patch \ |
| 312 | gnu/packages/patches/cmake-fix-tests.patch \ | 312 | gnu/packages/patches/cmake-fix-tests.patch \ |
| 313 | gnu/packages/patches/coreutils-dummy-man.patch \ | 313 | gnu/packages/patches/coreutils-dummy-man.patch \ |
| 314 | gnu/packages/patches/coreutils-skip-nohup.patch \ | ||
| 315 | gnu/packages/patches/cpio-gets-undeclared.patch \ | 314 | gnu/packages/patches/cpio-gets-undeclared.patch \ |
| 316 | gnu/packages/patches/cssc-gets-undeclared.patch \ | 315 | gnu/packages/patches/cssc-gets-undeclared.patch \ |
| 317 | gnu/packages/patches/cssc-missing-include.patch \ | 316 | gnu/packages/patches/cssc-missing-include.patch \ |
| @@ -322,11 +321,13 @@ dist_patch_DATA = \ | |||
| 322 | gnu/packages/patches/doxygen-tmake.patch \ | 321 | gnu/packages/patches/doxygen-tmake.patch \ |
| 323 | gnu/packages/patches/emacs-configure-sh.patch \ | 322 | gnu/packages/patches/emacs-configure-sh.patch \ |
| 324 | gnu/packages/patches/eudev-rules-directory.patch \ | 323 | gnu/packages/patches/eudev-rules-directory.patch \ |
| 324 | gnu/packages/patches/file-CVE-2014-3587.patch \ | ||
| 325 | gnu/packages/patches/findutils-absolute-paths.patch \ | 325 | gnu/packages/patches/findutils-absolute-paths.patch \ |
| 326 | gnu/packages/patches/flashrom-use-libftdi1.patch \ | 326 | gnu/packages/patches/flashrom-use-libftdi1.patch \ |
| 327 | gnu/packages/patches/flex-bison-tests.patch \ | 327 | gnu/packages/patches/flex-bison-tests.patch \ |
| 328 | gnu/packages/patches/gawk-shell.patch \ | 328 | gnu/packages/patches/gawk-shell.patch \ |
| 329 | gnu/packages/patches/gcc-cross-environment-variables.patch \ | 329 | gnu/packages/patches/gcc-cross-environment-variables.patch \ |
| 330 | gnu/packages/patches/gcc-fix-pr61801.patch \ | ||
| 330 | gnu/packages/patches/gd-mips64-deplibs-fix.patch \ | 331 | gnu/packages/patches/gd-mips64-deplibs-fix.patch \ |
| 331 | gnu/packages/patches/glib-tests-desktop.patch \ | 332 | gnu/packages/patches/glib-tests-desktop.patch \ |
| 332 | gnu/packages/patches/glib-tests-homedir.patch \ | 333 | gnu/packages/patches/glib-tests-homedir.patch \ |
| @@ -354,7 +355,6 @@ dist_patch_DATA = \ | |||
| 354 | gnu/packages/patches/kmod-module-directory.patch \ | 355 | gnu/packages/patches/kmod-module-directory.patch \ |
| 355 | gnu/packages/patches/libbonobo-activation-test-race.patch \ | 356 | gnu/packages/patches/libbonobo-activation-test-race.patch \ |
| 356 | gnu/packages/patches/libevent-dns-tests.patch \ | 357 | gnu/packages/patches/libevent-dns-tests.patch \ |
| 357 | gnu/packages/patches/libffi-mips-n32-fix.patch \ | ||
| 358 | gnu/packages/patches/liboop-mips64-deplibs-fix.patch \ | 358 | gnu/packages/patches/liboop-mips64-deplibs-fix.patch \ |
| 359 | gnu/packages/patches/libmad-mips-newgcc.patch \ | 359 | gnu/packages/patches/libmad-mips-newgcc.patch \ |
| 360 | gnu/packages/patches/libtheora-config-guess.patch \ | 360 | gnu/packages/patches/libtheora-config-guess.patch \ |
diff --git a/gnu/packages/acl.scm b/gnu/packages/acl.scm index 37c0b71dc98..ef150225661 100644 --- a/gnu/packages/acl.scm +++ b/gnu/packages/acl.scm | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | (define-public acl | 28 | (define-public acl |
| 29 | (package | 29 | (package |
| 30 | (name "acl") | 30 | (name "acl") |
| 31 | (version "2.2.51") | 31 | (version "2.2.52") |
| 32 | (source | 32 | (source |
| 33 | (origin | 33 | (origin |
| 34 | (method url-fetch) | 34 | (method url-fetch) |
| @@ -36,7 +36,7 @@ | |||
| 36 | version ".src.tar.gz")) | 36 | version ".src.tar.gz")) |
| 37 | (sha256 | 37 | (sha256 |
| 38 | (base32 | 38 | (base32 |
| 39 | "09aj30m49ivycl3irram8c3givc0crivjm3ymw0nhfaxrwhlb186")))) | 39 | "08qd9s3wfhv0ajswsylnfwr5h0d7j9d4rgip855nrh400nxp940p")))) |
| 40 | (build-system gnu-build-system) | 40 | (build-system gnu-build-system) |
| 41 | (arguments | 41 | (arguments |
| 42 | `(#:phases | 42 | `(#:phases |
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 0f5af3f02be..ffeab07bde6 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm | |||
| @@ -647,18 +647,7 @@ system administrator.") | |||
| 647 | "") | 647 | "") |
| 648 | (("^install: (.*)install-sudoers(.*)" _ before after) | 648 | (("^install: (.*)install-sudoers(.*)" _ before after) |
| 649 | ;; Don't try to create /etc/sudoers. | 649 | ;; Don't try to create /etc/sudoers. |
| 650 | (string-append "install: " before after "\n"))) | 650 | (string-append "install: " before after "\n")))) |
| 651 | |||
| 652 | ;; XXX FIXME sudo 1.8.10p3 was bootstrapped with a | ||
| 653 | ;; prerelease libtool, which fails on MIPS in the absence | ||
| 654 | ;; of /usr/bin/file. As a temporary workaround, we patch | ||
| 655 | ;; the configure script to hardcode use of the little | ||
| 656 | ;; endian N32 ABI on MIPS. | ||
| 657 | ,@(if (equal? "mips64el-linux" (or (%current-target-system) | ||
| 658 | (%current-system))) | ||
| 659 | '((substitute* "configure" | ||
| 660 | (("\\$emul") "elf32ltsmipn32"))) | ||
| 661 | '())) | ||
| 662 | %standard-phases) | 651 | %standard-phases) |
| 663 | 652 | ||
| 664 | ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but | 653 | ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but |
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index debfa975097..fe2f0f07e8e 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | #:use-module (gnu packages) | 25 | #:use-module (gnu packages) |
| 26 | #:use-module (gnu packages acl) | 26 | #:use-module (gnu packages acl) |
| 27 | #:use-module (gnu packages bash) | 27 | #:use-module (gnu packages bash) |
| 28 | #:use-module (gnu packages ed) | ||
| 28 | #:use-module (gnu packages guile) | 29 | #:use-module (gnu packages guile) |
| 29 | #:use-module (gnu packages multiprecision) | 30 | #:use-module (gnu packages multiprecision) |
| 30 | #:use-module (gnu packages perl) | 31 | #:use-module (gnu packages perl) |
| @@ -122,14 +123,14 @@ implementation offers several extensions over the standard utility.") | |||
| 122 | (define-public tar | 123 | (define-public tar |
| 123 | (package | 124 | (package |
| 124 | (name "tar") | 125 | (name "tar") |
| 125 | (version "1.27.1") | 126 | (version "1.28") |
| 126 | (source (origin | 127 | (source (origin |
| 127 | (method url-fetch) | 128 | (method url-fetch) |
| 128 | (uri (string-append "mirror://gnu/tar/tar-" | 129 | (uri (string-append "mirror://gnu/tar/tar-" |
| 129 | version ".tar.bz2")) | 130 | version ".tar.xz")) |
| 130 | (sha256 | 131 | (sha256 |
| 131 | (base32 | 132 | (base32 |
| 132 | "1iip0fk0wqhxb0jcwphz43r4fxkx1y7mznnhmlvr618jhp7b63wv")))) | 133 | "1wi2zwm4c9r3h3b8y4w0nm0qq897kn8kyj9k22ba0iqvxj48vvk4")))) |
| 133 | (build-system gnu-build-system) | 134 | (build-system gnu-build-system) |
| 134 | (synopsis "Managing tar archives") | 135 | (synopsis "Managing tar archives") |
| 135 | (description | 136 | (description |
| @@ -154,12 +155,9 @@ standard utility.") | |||
| 154 | (base32 | 155 | (base32 |
| 155 | "1sqckf560pzwgniy00vcpdv2c9c11s4cmhlm14yqgg8avd3bl94i")))) | 156 | "1sqckf560pzwgniy00vcpdv2c9c11s4cmhlm14yqgg8avd3bl94i")))) |
| 156 | (build-system gnu-build-system) | 157 | (build-system gnu-build-system) |
| 157 | (native-inputs '()) ; FIXME: needs `ed' for the tests | 158 | (native-inputs `(("ed", ed))) |
| 158 | (arguments | ||
| 159 | '(#:tests? #f) | ||
| 160 | ;; TODO: When cross-compiling, add this: | 159 | ;; TODO: When cross-compiling, add this: |
| 161 | ;; '(#:configure-flags '("ac_cv_func_strnlen_working=yes")) | 160 | ;; '(#:configure-flags '("ac_cv_func_strnlen_working=yes")) |
| 162 | ) | ||
| 163 | (synopsis "Apply differences to originals, with optional backups") | 161 | (synopsis "Apply differences to originals, with optional backups") |
| 164 | (description | 162 | (description |
| 165 | "Patch is a program that applies changes to files based on differences | 163 | "Patch is a program that applies changes to files based on differences |
| @@ -225,17 +223,15 @@ used to apply commands with arbitrarily long arguments.") | |||
| 225 | (define-public coreutils | 223 | (define-public coreutils |
| 226 | (package | 224 | (package |
| 227 | (name "coreutils") | 225 | (name "coreutils") |
| 228 | (version "8.22") | 226 | (version "8.23") |
| 229 | (source (origin | 227 | (source (origin |
| 230 | (method url-fetch) | 228 | (method url-fetch) |
| 231 | (uri (string-append "mirror://gnu/coreutils/coreutils-" | 229 | (uri (string-append "mirror://gnu/coreutils/coreutils-" |
| 232 | version ".tar.xz")) | 230 | version ".tar.xz")) |
| 233 | (sha256 | 231 | (sha256 |
| 234 | (base32 | 232 | (base32 |
| 235 | "04hjzzv434fb8ak3hh3dyhdvg3hqjjwvjmjxqzk1gh2jh6cr8gjv")) | 233 | "0bdq6yggyl7nkc2pbl6pxhhyx15nyqhz3ds6rfn448n6rxdwlhzc")) |
| 236 | (patches (list (search-patch "coreutils-dummy-man.patch") | 234 | (patches (list (search-patch "coreutils-dummy-man.patch"))))) |
| 237 | ;; TODO: remove this patch for >= 8.23 | ||
| 238 | (search-patch "coreutils-skip-nohup.patch"))))) | ||
| 239 | (build-system gnu-build-system) | 235 | (build-system gnu-build-system) |
| 240 | (inputs `(("acl" ,acl) ; TODO: add SELinux | 236 | (inputs `(("acl" ,acl) ; TODO: add SELinux |
| 241 | ("gmp" ,gmp))) | 237 | ("gmp" ,gmp))) |
| @@ -362,14 +358,14 @@ included.") | |||
| 362 | (define-public glibc | 358 | (define-public glibc |
| 363 | (package | 359 | (package |
| 364 | (name "glibc") | 360 | (name "glibc") |
| 365 | (version "2.19") | 361 | (version "2.20") |
| 366 | (source (origin | 362 | (source (origin |
| 367 | (method url-fetch) | 363 | (method url-fetch) |
| 368 | (uri (string-append "mirror://gnu/glibc/glibc-" | 364 | (uri (string-append "mirror://gnu/glibc/glibc-" |
| 369 | version ".tar.xz")) | 365 | version ".tar.xz")) |
| 370 | (sha256 | 366 | (sha256 |
| 371 | (base32 | 367 | (base32 |
| 372 | "18m2dssd6ja5arxmdxinc90xvpqcsnqjfwmjl2as07j0i3srff9d")) | 368 | "19bbyfc2gcxr9rihrkkbd3p362i608yhlyrr7icqsa6cmr16sjzq")) |
| 373 | (snippet | 369 | (snippet |
| 374 | ;; Disable 'ldconfig' and /etc/ld.so.cache. The latter is | 370 | ;; Disable 'ldconfig' and /etc/ld.so.cache. The latter is |
| 375 | ;; required on LFS distros to avoid loading the distro's libc.so | 371 | ;; required on LFS distros to avoid loading the distro's libc.so |
| @@ -409,10 +405,10 @@ included.") | |||
| 409 | (assoc-ref %build-inputs "linux-headers") | 405 | (assoc-ref %build-inputs "linux-headers") |
| 410 | "/include") | 406 | "/include") |
| 411 | 407 | ||
| 412 | ;; The default is to assume a 2.4 Linux interface, but we'll | 408 | ;; This is the default for most architectures as of GNU libc 2.20, |
| 413 | ;; always use something newer. See "kernel-features.h" in the | 409 | ;; but we specify it explicitly for clarity and consistency. See |
| 414 | ;; GNU libc for details. | 410 | ;; "kernel-features.h" in the GNU libc for details. |
| 415 | "--enable-kernel=2.6.30" | 411 | "--enable-kernel=2.6.32" |
| 416 | 412 | ||
| 417 | ;; Use our Bash instead of /bin/sh. | 413 | ;; Use our Bash instead of /bin/sh. |
| 418 | (string-append "BASH_SHELL=" | 414 | (string-append "BASH_SHELL=" |
diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm index ebb02b1d747..66158912d7d 100644 --- a/gnu/packages/bdw-gc.scm +++ b/gnu/packages/bdw-gc.scm | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> | 2 | ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> | ||
| 3 | ;;; | 4 | ;;; |
| 4 | ;;; This file is part of GNU Guix. | 5 | ;;; This file is part of GNU Guix. |
| 5 | ;;; | 6 | ;;; |
| @@ -64,15 +65,15 @@ C or C++ programs, though that is not its primary goal.") | |||
| 64 | (define-public libatomic-ops | 65 | (define-public libatomic-ops |
| 65 | (package | 66 | (package |
| 66 | (name "libatomic-ops") | 67 | (name "libatomic-ops") |
| 67 | (version "7.4.0") | 68 | (version "7.4.2") |
| 68 | (source (origin | 69 | (source (origin |
| 69 | (method url-fetch) | 70 | (method url-fetch) |
| 70 | (uri (string-append | 71 | (uri (string-append |
| 71 | "http://www.hboehm.info/gc/gc_source/libatomic_ops-" | 72 | "http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-" |
| 72 | version ".tar.gz")) | 73 | version ".tar.gz")) |
| 73 | (sha256 | 74 | (sha256 |
| 74 | (base32 | 75 | (base32 |
| 75 | "0njv3n63zw6v45k68z6dz14g2hpk5p230ncwmdfkglsljb1cqx98")))) | 76 | "1pdm0h1y7bgkczr8byg20r6bq15m5072cqm5pny4f9crc9gn3yh4")))) |
| 76 | (build-system gnu-build-system) | 77 | (build-system gnu-build-system) |
| 77 | (outputs '("out" "debug")) | 78 | (outputs '("out" "debug")) |
| 78 | (synopsis "Accessing hardware atomic memory update operations") | 79 | (synopsis "Accessing hardware atomic memory update operations") |
| @@ -88,14 +89,14 @@ lock-free code, experiment with thread programming paradigms, etc.") | |||
| 88 | 89 | ||
| 89 | (define-public libgc | 90 | (define-public libgc |
| 90 | (package (inherit libgc-7.2) | 91 | (package (inherit libgc-7.2) |
| 91 | (version "7.4.0") | 92 | (version "7.4.2") |
| 92 | (source (origin | 93 | (source (origin |
| 93 | (method url-fetch) | 94 | (method url-fetch) |
| 94 | (uri (string-append "http://www.hboehm.info/gc/gc_source/gc-" | 95 | (uri (string-append "http://www.hboehm.info/gc/gc_source/gc-" |
| 95 | version ".tar.gz")) | 96 | version ".tar.gz")) |
| 96 | (sha256 | 97 | (sha256 |
| 97 | (base32 | 98 | (base32 |
| 98 | "10z2nph62ilab063wygg2lv0jxlsbcf2az9w1lx01jzqj5lzry31")))) | 99 | "18mg28rr6kwr5clc65k4l4hkyy4kd16amx831sjf8q2lqkbhlck3")))) |
| 99 | 100 | ||
| 100 | ;; New dependencies. | 101 | ;; New dependencies. |
| 101 | (native-inputs `(("pkg-config" ,pkg-config))) | 102 | (native-inputs `(("pkg-config" ,pkg-config))) |
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index a1d2fcaaed0..79c22a59742 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm | |||
| @@ -26,6 +26,8 @@ | |||
| 26 | #:use-module (gnu packages base) | 26 | #:use-module (gnu packages base) |
| 27 | #:use-module (gnu packages bash) | 27 | #:use-module (gnu packages bash) |
| 28 | #:use-module (gnu packages gcc) | 28 | #:use-module (gnu packages gcc) |
| 29 | #:use-module (gnu packages ed) | ||
| 30 | #:use-module (gnu packages file) | ||
| 29 | #:use-module (gnu packages gawk) | 31 | #:use-module (gnu packages gawk) |
| 30 | #:use-module (gnu packages guile) | 32 | #:use-module (gnu packages guile) |
| 31 | #:use-module (gnu packages multiprecision) | 33 | #:use-module (gnu packages multiprecision) |
| @@ -106,11 +108,20 @@ | |||
| 106 | (current-source-location) | 108 | (current-source-location) |
| 107 | #:guile %bootstrap-guile))) | 109 | #:guile %bootstrap-guile))) |
| 108 | 110 | ||
| 111 | (define file-boot0 | ||
| 112 | (package-with-bootstrap-guile | ||
| 113 | (package-with-explicit-inputs file | ||
| 114 | `(("make" ,gnu-make-boot0) | ||
| 115 | ,@%bootstrap-inputs) | ||
| 116 | (current-source-location) | ||
| 117 | #:guile %bootstrap-guile))) | ||
| 118 | |||
| 109 | 119 | ||
| 110 | (define %boot0-inputs | 120 | (define %boot0-inputs |
| 111 | `(("make" ,gnu-make-boot0) | 121 | `(("make" ,gnu-make-boot0) |
| 112 | ("diffutils" ,diffutils-boot0) | 122 | ("diffutils" ,diffutils-boot0) |
| 113 | ("findutils" ,findutils-boot0) | 123 | ("findutils" ,findutils-boot0) |
| 124 | ("file" ,file-boot0) | ||
| 114 | ,@%bootstrap-inputs)) | 125 | ,@%bootstrap-inputs)) |
| 115 | 126 | ||
| 116 | (define* (nix-system->gnu-triplet | 127 | (define* (nix-system->gnu-triplet |
| @@ -663,6 +674,7 @@ store.") | |||
| 663 | ("gzip" ,gzip) | 674 | ("gzip" ,gzip) |
| 664 | ("bzip2" ,bzip2) | 675 | ("bzip2" ,bzip2) |
| 665 | ("xz" ,xz) | 676 | ("xz" ,xz) |
| 677 | ("file" ,file) | ||
| 666 | ("diffutils" ,diffutils) | 678 | ("diffutils" ,diffutils) |
| 667 | ("patch" ,patch) | 679 | ("patch" ,patch) |
| 668 | ("sed" ,sed) | 680 | ("sed" ,sed) |
diff --git a/gnu/packages/cyrus-sasl.scm b/gnu/packages/cyrus-sasl.scm index 1913f93f0d0..0c92cc36a17 100644 --- a/gnu/packages/cyrus-sasl.scm +++ b/gnu/packages/cyrus-sasl.scm | |||
| @@ -49,7 +49,13 @@ | |||
| 49 | (arguments | 49 | (arguments |
| 50 | '(#:configure-flags (list (string-append "--with-plugindir=" | 50 | '(#:configure-flags (list (string-append "--with-plugindir=" |
| 51 | (assoc-ref %outputs "out") | 51 | (assoc-ref %outputs "out") |
| 52 | "/lib/sasl2")))) | 52 | "/lib/sasl2")) |
| 53 | |||
| 54 | ;; The 'plugins' directory has shared source files, such as | ||
| 55 | ;; 'plugin_common.c'. When building the shared libraries there, libtool | ||
| 56 | ;; ends up doing "ln -s plugin_common.lo plugin_common.o", which can | ||
| 57 | ;; fail with EEXIST when building things in parallel. | ||
| 58 | #:parallel-build? #f)) | ||
| 53 | (synopsis "Cyrus SASL, an implementation of the Simple Authentication Security Layer framework") | 59 | (synopsis "Cyrus SASL, an implementation of the Simple Authentication Security Layer framework") |
| 54 | (description | 60 | (description |
| 55 | "SASL (Simple Authentication Security Layer) is an Internet | 61 | "SASL (Simple Authentication Security Layer) is an Internet |
diff --git a/gnu/packages/file.scm b/gnu/packages/file.scm index f53c22f4cde..601b1581289 100644 --- a/gnu/packages/file.scm +++ b/gnu/packages/file.scm | |||
| @@ -27,17 +27,15 @@ | |||
| 27 | (define-public file | 27 | (define-public file |
| 28 | (package | 28 | (package |
| 29 | (name "file") | 29 | (name "file") |
| 30 | (version "5.18") | 30 | (version "5.19") |
| 31 | (source (origin | 31 | (source (origin |
| 32 | (method url-fetch) | 32 | (method url-fetch) |
| 33 | (uri (string-append "ftp://ftp.astron.com/pub/file/file-" | 33 | (uri (string-append "ftp://ftp.astron.com/pub/file/file-" |
| 34 | version ".tar.gz")) | 34 | version ".tar.gz")) |
| 35 | (sha256 (base32 | 35 | (sha256 (base32 |
| 36 | "01xz106biz6x4h5ilymg5v3367djvgnfp4lm87132cjqdmqgn6b5")))) | 36 | "0z1sgrcfy6d285kj5izy1yypf371bjl3247plh9ppk0svaxv714l")) |
| 37 | (patches (list (search-patch "file-CVE-2014-3587.patch"))))) | ||
| 37 | (build-system gnu-build-system) | 38 | (build-system gnu-build-system) |
| 38 | (native-inputs | ||
| 39 | ;; This package depends upon a native install of itself. | ||
| 40 | (if (%current-target-system) `(("file" ,file)) '() )) | ||
| 41 | (synopsis "file, a file type guesser") | 39 | (synopsis "file, a file type guesser") |
| 42 | (description | 40 | (description |
| 43 | "The file command is a file type guesser, a command-line tool that tells | 41 | "The file command is a file type guesser, a command-line tool that tells |
diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm index 718059e527d..10506197f3a 100644 --- a/gnu/packages/gawk.scm +++ b/gnu/packages/gawk.scm | |||
| @@ -57,15 +57,12 @@ | |||
| 57 | (string-append "### " match)))) | 57 | (string-append "### " match)))) |
| 58 | '()) | 58 | '()) |
| 59 | 59 | ||
| 60 | ;; XXX FIXME gawk 4.1.1 was bootstrapped with a prerelease | 60 | ;; XXX FIXME prerelease libtool fails on MIPS in the |
| 61 | ;; libtool, which fails on MIPS in the absence of | 61 | ;; absence of /usr/bin/file. |
| 62 | ;; /usr/bin/file. As a temporary workaround, we patch | ||
| 63 | ;; the configure script to hardcode use of the little | ||
| 64 | ;; endian N32 ABI on MIPS. | ||
| 65 | ,@(if (equal? "mips64el-linux" (or (%current-target-system) | 62 | ,@(if (equal? "mips64el-linux" (or (%current-target-system) |
| 66 | (%current-system))) | 63 | (%current-system))) |
| 67 | '((substitute* "extension/configure" | 64 | '((substitute* "extension/configure" |
| 68 | (("\\$emul") "elf32ltsmipn32"))) | 65 | (("/usr/bin/file") (which "file")))) |
| 69 | '()))) | 66 | '()))) |
| 70 | %standard-phases))) | 67 | %standard-phases))) |
| 71 | (inputs `(("libsigsegv" ,libsigsegv) | 68 | (inputs `(("libsigsegv" ,libsigsegv) |
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 66888389d4d..02601585b93 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm | |||
| @@ -268,7 +268,8 @@ Go. It also includes runtime support libraries for these languages.") | |||
| 268 | version "/gcc-" version ".tar.bz2")) | 268 | version "/gcc-" version ".tar.bz2")) |
| 269 | (sha256 | 269 | (sha256 |
| 270 | (base32 | 270 | (base32 |
| 271 | "07hg10zs7gnqz58my10ch0zygizqh0z0bz6pv4pgxx45n48lz3ka")))))) | 271 | "07hg10zs7gnqz58my10ch0zygizqh0z0bz6pv4pgxx45n48lz3ka")) |
| 272 | (patches (list (search-patch "gcc-fix-pr61801.patch"))))))) | ||
| 272 | 273 | ||
| 273 | (define-public gcc-4.9 | 274 | (define-public gcc-4.9 |
| 274 | (package (inherit gcc-4.7) | 275 | (package (inherit gcc-4.7) |
diff --git a/gnu/packages/gnutls.scm b/gnu/packages/gnutls.scm index 917dfdd2285..89fc86d6ade 100644 --- a/gnu/packages/gnutls.scm +++ b/gnu/packages/gnutls.scm | |||
| @@ -63,7 +63,7 @@ specifications.") | |||
| 63 | (define-public gnutls | 63 | (define-public gnutls |
| 64 | (package | 64 | (package |
| 65 | (name "gnutls") | 65 | (name "gnutls") |
| 66 | (version "3.2.15") | 66 | (version "3.2.16") |
| 67 | (source (origin | 67 | (source (origin |
| 68 | (method url-fetch) | 68 | (method url-fetch) |
| 69 | (uri | 69 | (uri |
| @@ -75,12 +75,8 @@ specifications.") | |||
| 75 | "/gnutls-" version ".tar.xz")) | 75 | "/gnutls-" version ".tar.xz")) |
| 76 | (sha256 | 76 | (sha256 |
| 77 | (base32 | 77 | (base32 |
| 78 | "1fbpr9r1r2y803s3avwjpy1higqsz85dyb302kvmh0i29frwgg9h")))) | 78 | "1bmwhg8y3mz5w2klclf5dz9502477kaj8r8db7k45fwb9ah3c63q")))) |
| 79 | (build-system gnu-build-system) | 79 | (build-system gnu-build-system) |
| 80 | (arguments | ||
| 81 | ;; Work around build issue reported at | ||
| 82 | ;; <https://lists.gnu.org/archive/html/guix-devel/2014-03/msg00027.html>. | ||
| 83 | '(#:make-flags '("CPPFLAGS=-DENABLE_RSA_EXPORT"))) | ||
| 84 | (native-inputs | 80 | (native-inputs |
| 85 | `(("pkg-config" ,pkg-config))) | 81 | `(("pkg-config" ,pkg-config))) |
| 86 | (inputs | 82 | (inputs |
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index 906763e9245..e928c311e46 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm | |||
| @@ -122,11 +122,7 @@ without requiring the source code to be rewritten.") | |||
| 122 | (native-inputs `(("pkgconfig" ,pkg-config))) | 122 | (native-inputs `(("pkgconfig" ,pkg-config))) |
| 123 | (inputs `(("libffi" ,libffi) | 123 | (inputs `(("libffi" ,libffi) |
| 124 | ("readline" ,readline) | 124 | ("readline" ,readline) |
| 125 | 125 | ("bash" ,bash))) | |
| 126 | ;; TODO: On next core-updates, make Bash input unconditional. | ||
| 127 | ,@(if (%current-target-system) | ||
| 128 | `(("bash" ,bash)) | ||
| 129 | '()))) | ||
| 130 | 126 | ||
| 131 | (propagated-inputs | 127 | (propagated-inputs |
| 132 | `( ;; These ones aren't normally needed here, but since `libguile-2.0.la' | 128 | `( ;; These ones aren't normally needed here, but since `libguile-2.0.la' |
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 1ab79ad954f..a55a5456afc 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm | |||
| @@ -19,7 +19,6 @@ | |||
| 19 | (define-module (gnu packages image) | 19 | (define-module (gnu packages image) |
| 20 | #:use-module (gnu packages) | 20 | #:use-module (gnu packages) |
| 21 | #:use-module (gnu packages compression) | 21 | #:use-module (gnu packages compression) |
| 22 | #:use-module (gnu packages file) | ||
| 23 | #:use-module (gnu packages fontutils) | 22 | #:use-module (gnu packages fontutils) |
| 24 | #:use-module (gnu packages pkg-config) | 23 | #:use-module (gnu packages pkg-config) |
| 25 | #:use-module (gnu packages xml) | 24 | #:use-module (gnu packages xml) |
| @@ -102,20 +101,11 @@ image files in PBMPLUS PPM/PGM, GIF, BMP, and Targa file formats.") | |||
| 102 | (inputs `(("zlib" ,zlib) | 101 | (inputs `(("zlib" ,zlib) |
| 103 | ("libjpeg-8" ,libjpeg-8))) | 102 | ("libjpeg-8" ,libjpeg-8))) |
| 104 | ;; currently does not compile with libjpeg version 9 | 103 | ;; currently does not compile with libjpeg version 9 |
| 105 | (native-inputs `(("file" ,file))) | ||
| 106 | (arguments | 104 | (arguments |
| 107 | `(#:configure-flags | 105 | `(#:configure-flags |
| 108 | (list (string-append "--with-jpeg-include-dir=" | 106 | (list (string-append "--with-jpeg-include-dir=" |
| 109 | (assoc-ref %build-inputs "libjpeg-8") | 107 | (assoc-ref %build-inputs "libjpeg-8") |
| 110 | "/include")) | 108 | "/include")))) |
| 111 | #:phases | ||
| 112 | (alist-cons-before | ||
| 113 | 'configure 'patch-configure | ||
| 114 | (lambda _ | ||
| 115 | (substitute* "configure" | ||
| 116 | (("`/usr/bin/file") | ||
| 117 | (string-append "`" (which "file"))))) | ||
| 118 | %standard-phases))) | ||
| 119 | (synopsis "Libtiff, a library for handling TIFF files") | 109 | (synopsis "Libtiff, a library for handling TIFF files") |
| 120 | (description | 110 | (description |
| 121 | "Libtiff provides support for the Tag Image File Format (TIFF), a format | 111 | "Libtiff provides support for the Tag Image File Format (TIFF), a format |
diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm index c5e265087e9..33e10d6fc29 100644 --- a/gnu/packages/libffi.scm +++ b/gnu/packages/libffi.scm | |||
| @@ -29,11 +29,11 @@ | |||
| 29 | ;; available in $includedir where some users expect them. | 29 | ;; available in $includedir where some users expect them. |
| 30 | '(lambda* (#:key outputs #:allow-other-keys) | 30 | '(lambda* (#:key outputs #:allow-other-keys) |
| 31 | (define out (assoc-ref outputs "out")) | 31 | (define out (assoc-ref outputs "out")) |
| 32 | (symlink (string-append out "/lib/libffi-3.0.13/include") | 32 | (symlink (string-append out "/lib/libffi-3.1/include") |
| 33 | (string-append out "/include"))))) | 33 | (string-append out "/include"))))) |
| 34 | (package | 34 | (package |
| 35 | (name "libffi") | 35 | (name "libffi") |
| 36 | (version "3.0.13") | 36 | (version "3.1") |
| 37 | (source (origin | 37 | (source (origin |
| 38 | (method url-fetch) | 38 | (method url-fetch) |
| 39 | (uri | 39 | (uri |
| @@ -41,8 +41,7 @@ | |||
| 41 | name "-" version ".tar.gz")) | 41 | name "-" version ".tar.gz")) |
| 42 | (sha256 | 42 | (sha256 |
| 43 | (base32 | 43 | (base32 |
| 44 | "077ibkf84bvcd6rw1m6jb107br63i2pp301rkmsbgg6300adxp8x")) | 44 | "1sznmrhcswwbyqla9y2ximlkzbxks59wjfs3lh7qf8ayranyxzlp")))) |
| 45 | (patches (list (search-patch "libffi-mips-n32-fix.patch"))))) | ||
| 46 | (build-system gnu-build-system) | 45 | (build-system gnu-build-system) |
| 47 | (arguments `(#:phases (alist-cons-after 'install 'post-install | 46 | (arguments `(#:phases (alist-cons-after 'install 'post-install |
| 48 | ,post-install-phase | 47 | ,post-install-phase |
diff --git a/gnu/packages/libunistring.scm b/gnu/packages/libunistring.scm index a7681009acd..ddafd742022 100644 --- a/gnu/packages/libunistring.scm +++ b/gnu/packages/libunistring.scm | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | (define-public libunistring | 25 | (define-public libunistring |
| 26 | (package | 26 | (package |
| 27 | (name "libunistring") | 27 | (name "libunistring") |
| 28 | (version "0.9.3") | 28 | (version "0.9.4") |
| 29 | (source (origin | 29 | (source (origin |
| 30 | (method url-fetch) | 30 | (method url-fetch) |
| 31 | (uri (string-append | 31 | (uri (string-append |
| @@ -33,7 +33,7 @@ | |||
| 33 | version ".tar.gz")) | 33 | version ".tar.gz")) |
| 34 | (sha256 | 34 | (sha256 |
| 35 | (base32 | 35 | (base32 |
| 36 | "18q620269xzpw39dwvr9zpilnl2dkw5z5kz3mxaadnpv4k3kw3b1")))) | 36 | "19nqvn19hz25ig9dbmh2di5j1r7v852x9mlnq0nr0hka51ins97m")))) |
| 37 | (propagated-inputs '()) ; FIXME: add libiconv when !glibc | 37 | (propagated-inputs '()) ; FIXME: add libiconv when !glibc |
| 38 | (build-system gnu-build-system) | 38 | (build-system gnu-build-system) |
| 39 | (arguments | 39 | (arguments |
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 29c2878d846..561275c05f4 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm | |||
| @@ -379,7 +379,16 @@ providing the system administrator with some help in common tasks.") | |||
| 379 | (sha256 | 379 | (sha256 |
| 380 | (base32 | 380 | (base32 |
| 381 | "1rpgghf7n0zx0cdy8hibr41wvkm2qp1yvd8ab1rxr193l1jmgcir")) | 381 | "1rpgghf7n0zx0cdy8hibr41wvkm2qp1yvd8ab1rxr193l1jmgcir")) |
| 382 | (patches (list (search-patch "util-linux-perl.patch"))))) | 382 | (patches (list (search-patch "util-linux-perl.patch"))) |
| 383 | (modules '((guix build utils))) | ||
| 384 | (snippet | ||
| 385 | ;; We take the 'logger' program from GNU Inetutils, so remove | ||
| 386 | ;; it from here. | ||
| 387 | '(substitute* "misc-utils/Makefile.in" | ||
| 388 | (("PROGRAMS =(.*) logger(.*)" _ before after) | ||
| 389 | (string-append "PROGRAMS =" before " " after)) | ||
| 390 | (("MANS =(.*) logger\\.1(.*)" _ before after) | ||
| 391 | (string-append "MANS =" before " " after)))))) | ||
| 383 | (build-system gnu-build-system) | 392 | (build-system gnu-build-system) |
| 384 | (arguments | 393 | (arguments |
| 385 | `(#:configure-flags '("--disable-use-tty-group" | 394 | `(#:configure-flags '("--disable-use-tty-group" |
diff --git a/gnu/packages/mc.scm b/gnu/packages/mc.scm index aba14d59acf..6e3747c943b 100644 --- a/gnu/packages/mc.scm +++ b/gnu/packages/mc.scm | |||
| @@ -28,7 +28,6 @@ | |||
| 28 | #:use-module (gnu packages ssh) | 28 | #:use-module (gnu packages ssh) |
| 29 | #:use-module (gnu packages pkg-config) | 29 | #:use-module (gnu packages pkg-config) |
| 30 | #:use-module (gnu packages check) | 30 | #:use-module (gnu packages check) |
| 31 | #:use-module (gnu packages file) | ||
| 32 | #:use-module (gnu packages perl)) | 31 | #:use-module (gnu packages perl)) |
| 33 | 32 | ||
| 34 | (define-public mc | 33 | (define-public mc |
| @@ -46,7 +45,6 @@ | |||
| 46 | (patches (list (search-patch "mc-fix-ncurses-build.patch"))))) | 45 | (patches (list (search-patch "mc-fix-ncurses-build.patch"))))) |
| 47 | (build-system gnu-build-system) | 46 | (build-system gnu-build-system) |
| 48 | (native-inputs `(("pkg-config" ,pkg-config) | 47 | (native-inputs `(("pkg-config" ,pkg-config) |
| 49 | ("file" ,file) | ||
| 50 | ("perl" ,perl))) | 48 | ("perl" ,perl))) |
| 51 | (inputs `(("aspell" ,aspell) | 49 | (inputs `(("aspell" ,aspell) |
| 52 | ("ncurses" ,ncurses) | 50 | ("ncurses" ,ncurses) |
| @@ -55,14 +53,7 @@ | |||
| 55 | ("check" ,check))) | 53 | ("check" ,check))) |
| 56 | (arguments | 54 | (arguments |
| 57 | `(#:configure-flags | 55 | `(#:configure-flags |
| 58 | '("--with-screen=ncurses" "--enable-aspell") | 56 | '("--with-screen=ncurses" "--enable-aspell"))) |
| 59 | #:phases | ||
| 60 | (alist-cons-before | ||
| 61 | 'configure 'patch-configure | ||
| 62 | (lambda _ | ||
| 63 | (substitute* "configure" | ||
| 64 | (("/usr/bin/file") (which "file")))) | ||
| 65 | %standard-phases))) | ||
| 66 | (home-page "http://www.midnight-commander.org") | 57 | (home-page "http://www.midnight-commander.org") |
| 67 | (synopsis "Graphical file manager") | 58 | (synopsis "Graphical file manager") |
| 68 | (description | 59 | (description |
diff --git a/gnu/packages/mcrypt.scm b/gnu/packages/mcrypt.scm index eac8c72c5ec..12a4827224f 100644 --- a/gnu/packages/mcrypt.scm +++ b/gnu/packages/mcrypt.scm | |||
| @@ -23,8 +23,7 @@ | |||
| 23 | #:use-module (guix build-system gnu) | 23 | #:use-module (guix build-system gnu) |
| 24 | #:use-module (gnu packages) | 24 | #:use-module (gnu packages) |
| 25 | #:use-module (gnu packages compression) | 25 | #:use-module (gnu packages compression) |
| 26 | #:use-module (gnu packages perl) | 26 | #:use-module (gnu packages perl)) |
| 27 | #:use-module (gnu packages file)) | ||
| 28 | 27 | ||
| 29 | (define-public mcrypt | 28 | (define-public mcrypt |
| 30 | (package | 29 | (package |
| @@ -68,7 +67,6 @@ them.") | |||
| 68 | (base32 | 67 | (base32 |
| 69 | "0gipgb939vy9m66d3k8il98rvvwczyaw2ixr8yn6icds9c3nrsz4")))) | 68 | "0gipgb939vy9m66d3k8il98rvvwczyaw2ixr8yn6icds9c3nrsz4")))) |
| 70 | (build-system gnu-build-system) | 69 | (build-system gnu-build-system) |
| 71 | (native-inputs `(("file" ,file))) | ||
| 72 | (home-page "http://mcrypt.sourceforge.net/") | 70 | (home-page "http://mcrypt.sourceforge.net/") |
| 73 | (synopsis "Encryption algorithm library") | 71 | (synopsis "Encryption algorithm library") |
| 74 | (description | 72 | (description |
| @@ -95,8 +93,7 @@ XTEA, 3WAY, TWOFISH, BLOWFISH, ARCFOUR, WAKE and more.") | |||
| 95 | (patches (list (search-patch "mhash-keygen-test-segfault.patch"))))) | 93 | (patches (list (search-patch "mhash-keygen-test-segfault.patch"))))) |
| 96 | (build-system gnu-build-system) | 94 | (build-system gnu-build-system) |
| 97 | (native-inputs | 95 | (native-inputs |
| 98 | `(("file" ,file) | 96 | `(("perl" ,perl))) ;for tests |
| 99 | ("perl" ,perl))) ;for tests | ||
| 100 | (home-page "http://mhash.sourceforge.net/") | 97 | (home-page "http://mhash.sourceforge.net/") |
| 101 | (synopsis "Thread-safe hash library") | 98 | (synopsis "Thread-safe hash library") |
| 102 | (description | 99 | (description |
diff --git a/gnu/packages/patches/coreutils-dummy-man.patch b/gnu/packages/patches/coreutils-dummy-man.patch index f6a6a310020..a43cfc47c36 100644 --- a/gnu/packages/patches/coreutils-dummy-man.patch +++ b/gnu/packages/patches/coreutils-dummy-man.patch | |||
| @@ -7,15 +7,15 @@ would appear when compiling: | |||
| 7 | 7 | ||
| 8 | dummy-man: too many non-option arguments | 8 | dummy-man: too many non-option arguments |
| 9 | 9 | ||
| 10 | --- coreutils-8.22/Makefile.in 2013-12-13 16:20:00.000000000 +0100 | 10 | --- coreutils-8.23/Makefile.in 2014-07-18 18:22:24.000000000 -0400 |
| 11 | +++ coreutils-8.22/Makefile.in 2014-02-28 10:53:27.000000000 +0100 | 11 | +++ coreutils-8.23/Makefile.in 2014-08-03 20:21:10.849158313 -0400 |
| 12 | @@ -9977,8 +9977,8 @@ man/yes.1: src/yes | 12 | @@ -14076,8 +14076,8 @@ |
| 13 | && $(run_help2man) \ | 13 | && $(run_help2man) \ |
| 14 | --source='$(PACKAGE_STRING)' \ | 14 | --source='$(PACKAGE_STRING)' \ |
| 15 | --include=$(srcdir)/man/$$name.x \ | 15 | --include=$(srcdir)/man/$$name.x \ |
| 16 | - --output=$$t/$$name.1 $$t/$$name \ | 16 | - --output=$$t/$$name.1 $$t/$$argv \ |
| 17 | --info-page='coreutils \(aq'$$name' invocation\(aq' \ | 17 | --info-page='coreutils \(aq'$$name' invocation\(aq' \ |
| 18 | + --output=$$t/$$name.1 $$t/$$name \ | 18 | + --output=$$t/$$name.1 $$t/$$argv \ |
| 19 | && sed \ | 19 | && sed \ |
| 20 | -e 's|$*\.td/||g' \ | 20 | -e 's|$*\.td/||g' \ |
| 21 | -e '/For complete documentation/d' \ | 21 | -e '/For complete documentation/d' \ |
diff --git a/gnu/packages/patches/coreutils-skip-nohup.patch b/gnu/packages/patches/coreutils-skip-nohup.patch deleted file mode 100644 index f5283a6b21d..00000000000 --- a/gnu/packages/patches/coreutils-skip-nohup.patch +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | commit 5dce6bdfafc930dfd17d5d16aea7d1add3472066 | ||
| 2 | Author: Pádraig Brady <P@draigBrady.com> | ||
| 3 | Date: Wed Mar 5 15:14:07 2014 +0000 | ||
| 4 | |||
| 5 | tests: fix false failure in nohup.sh in non tty builds | ||
| 6 | |||
| 7 | * tests/misc/nohup.sh: When running tests without a controlling tty, | ||
| 8 | an exec failure is triggered in a subshell, which causes POSIX | ||
| 9 | shells to immediately exit the subshell. This was brought | ||
| 10 | to notice by the newly conforming bash 4.3. | ||
| 11 | Fixes http:/bugs.gnu.org/16940 | ||
| 12 | |||
| 13 | diff --git a/tests/misc/nohup.sh b/tests/misc/nohup.sh | ||
| 14 | index 6d2b515..2328b43 100755 | ||
| 15 | --- a/tests/misc/nohup.sh | ||
| 16 | +++ b/tests/misc/nohup.sh | ||
| 17 | @@ -63,6 +63,11 @@ rm -f nohup.out err | ||
| 18 | # to stderr must be fatal. Requires stdout to be terminal. | ||
| 19 | if test -w /dev/full && test -c /dev/full; then | ||
| 20 | ( | ||
| 21 | + # POSIX shells immediately exit the subshell on exec error. | ||
| 22 | + # So check we can write to /dev/tty before the exec, which | ||
| 23 | + # isn't possible if we've no controlling tty for example. | ||
| 24 | + test -c /dev/tty && >/dev/tty || exit 0 | ||
| 25 | + | ||
| 26 | exec >/dev/tty | ||
| 27 | test -t 1 || exit 0 | ||
| 28 | nohup echo hi 2> /dev/full | ||
diff --git a/gnu/packages/patches/file-CVE-2014-3587.patch b/gnu/packages/patches/file-CVE-2014-3587.patch new file mode 100644 index 00000000000..cf88bf5f3ec --- /dev/null +++ b/gnu/packages/patches/file-CVE-2014-3587.patch | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | Fixes CVE-2014-3587. Copied from upstream commit | ||
| 2 | 0641e56be1af003aa02c7c6b0184466540637233. | ||
| 3 | |||
| 4 | --- file-5.19/src/cdf.c.orig 2014-06-09 09:04:37.000000000 -0400 | ||
| 5 | +++ file-5.19/src/cdf.c 2014-08-26 11:55:23.887118898 -0400 | ||
| 6 | @@ -824,6 +824,10 @@ | ||
| 7 | q = (const uint8_t *)(const void *) | ||
| 8 | ((const char *)(const void *)p + ofs | ||
| 9 | - 2 * sizeof(uint32_t)); | ||
| 10 | + if (q < p) { | ||
| 11 | + DPRINTF(("Wrapped around %p < %p\n", q, p)); | ||
| 12 | + goto out; | ||
| 13 | + } | ||
| 14 | if (q > e) { | ||
| 15 | DPRINTF(("Ran of the end %p > %p\n", q, e)); | ||
| 16 | goto out; | ||
diff --git a/gnu/packages/patches/gcc-fix-pr61801.patch b/gnu/packages/patches/gcc-fix-pr61801.patch new file mode 100644 index 00000000000..e9cd92aa1ca --- /dev/null +++ b/gnu/packages/patches/gcc-fix-pr61801.patch | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | GCC bug fix for <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801>. | ||
| 2 | Initially discussed at | ||
| 3 | <http://lists.gnu.org/archive/html/guix-devel/2014-09/msg00283.html>. | ||
| 4 | Patch from <https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=212740>. | ||
| 5 | |||
| 6 | 2014-07-17 Richard Biener <rguenther@suse.de> | ||
| 7 | |||
| 8 | PR rtl-optimization/61801 | ||
| 9 | |||
| 10 | * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and | ||
| 11 | ASM_INPUT don't set reg_pending_barrier if it appears in a | ||
| 12 | debug-insn. | ||
| 13 | |||
| 14 | --- gcc-4_8-branch/gcc/sched-deps.c 2014/07/17 07:48:49 212739 | ||
| 15 | +++ gcc-4_8-branch/gcc/sched-deps.c 2014/07/17 07:49:44 212740 | ||
| 16 | @@ -2744,7 +2744,8 @@ | ||
| 17 | Consider for instance a volatile asm that changes the fpu rounding | ||
| 18 | mode. An insn should not be moved across this even if it only uses | ||
| 19 | pseudo-regs because it might give an incorrectly rounded result. */ | ||
| 20 | - if (code != ASM_OPERANDS || MEM_VOLATILE_P (x)) | ||
| 21 | + if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x)) | ||
| 22 | + && !DEBUG_INSN_P (insn)) | ||
| 23 | reg_pending_barrier = TRUE_BARRIER; | ||
| 24 | |||
| 25 | /* For all ASM_OPERANDS, we must traverse the vector of input operands. | ||
diff --git a/gnu/packages/patches/libffi-mips-n32-fix.patch b/gnu/packages/patches/libffi-mips-n32-fix.patch deleted file mode 100644 index 87ec48f8830..00000000000 --- a/gnu/packages/patches/libffi-mips-n32-fix.patch +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | Fix handling of uint32_t arguments on the MIPS N32 ABI. | ||
| 2 | |||
| 3 | Patch by Mark H Weaver <mhw@netris.org>. | ||
| 4 | |||
| 5 | --- libffi/src/mips/ffi.c.orig 2013-03-16 07:19:39.000000000 -0400 | ||
| 6 | +++ libffi/src/mips/ffi.c 2013-10-22 01:11:03.111985247 -0400 | ||
| 7 | @@ -170,7 +170,14 @@ | ||
| 8 | break; | ||
| 9 | |||
| 10 | case FFI_TYPE_UINT32: | ||
| 11 | +#ifdef FFI_MIPS_N32 | ||
| 12 | + /* The N32 ABI requires that 32-bit integers | ||
| 13 | + be sign-extended to 64-bits, regardless of | ||
| 14 | + whether they are signed or unsigned. */ | ||
| 15 | + *(ffi_arg *)argp = *(SINT32 *)(* p_argv); | ||
| 16 | +#else | ||
| 17 | *(ffi_arg *)argp = *(UINT32 *)(* p_argv); | ||
| 18 | +#endif | ||
| 19 | break; | ||
| 20 | |||
| 21 | /* This can only happen with 64bit slots. */ | ||
diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm index 8c51b54f189..07837eb1ac6 100644 --- a/gnu/packages/pretty-print.scm +++ b/gnu/packages/pretty-print.scm | |||
| @@ -30,8 +30,7 @@ | |||
| 30 | #:use-module (gnu packages bison) | 30 | #:use-module (gnu packages bison) |
| 31 | #:use-module (gnu packages flex) | 31 | #:use-module (gnu packages flex) |
| 32 | #:use-module (gnu packages gperf) | 32 | #:use-module (gnu packages gperf) |
| 33 | #:use-module (gnu packages perl) | 33 | #:use-module (gnu packages perl)) |
| 34 | #:use-module (gnu packages file)) | ||
| 35 | 34 | ||
| 36 | (define-public a2ps | 35 | (define-public a2ps |
| 37 | (package | 36 | (package |
| @@ -53,45 +52,39 @@ | |||
| 53 | ("imagemagick" ,imagemagick))) | 52 | ("imagemagick" ,imagemagick))) |
| 54 | (native-inputs | 53 | (native-inputs |
| 55 | `(("gperf" ,gperf) | 54 | `(("gperf" ,gperf) |
| 56 | ("perl" ,perl) | 55 | ("perl" ,perl))) |
| 57 | ("file" ,file))) | ||
| 58 | (arguments | 56 | (arguments |
| 59 | '(#:phases (alist-cons-before | 57 | '(#:phases (alist-cons-before |
| 60 | 'configure 'patch-configure | 58 | 'build 'patch-scripts |
| 61 | (lambda _ | 59 | (lambda _ |
| 62 | (substitute* "configure" | 60 | (substitute* |
| 63 | (("/usr/bin/file") (which "file")))) | 61 | '("afm/make_fonts_map.sh" |
| 62 | "tests/defs" | ||
| 63 | "tests/backup.tst" | ||
| 64 | "tests/styles.tst") | ||
| 65 | (("/bin/rm") (which "rm")))) | ||
| 64 | (alist-cons-before | 66 | (alist-cons-before |
| 65 | 'build 'patch-scripts | 67 | 'check 'patch-test-files |
| 66 | (lambda _ | 68 | ;; Alternatively, we could unpatch the shebangs in tstfiles |
| 67 | (substitute* | 69 | (lambda* (#:key inputs #:allow-other-keys) |
| 68 | '("afm/make_fonts_map.sh" | 70 | (let ((perl (assoc-ref inputs "perl"))) |
| 69 | "tests/defs" | 71 | (substitute* '("tests/ps-ref/includeres.ps" |
| 70 | "tests/backup.tst" | 72 | "tests/gps-ref/includeres.ps") |
| 71 | "tests/styles.tst") | 73 | (("/usr/local/bin/perl") |
| 72 | (("/bin/rm") (which "rm")))) | 74 | (string-append perl "/bin/perl")))) |
| 73 | (alist-cons-before | 75 | ;; Some of the reference postscript contain a 'version 3' |
| 74 | 'check 'patch-test-files | 76 | ;; string that in inconsistent with the source text in the |
| 75 | ;; Alternatively, we could unpatch the shebangs in tstfiles | 77 | ;; tstfiles directory. Erroneous search-and-replace? |
| 76 | (lambda* (#:key inputs #:allow-other-keys) | 78 | (substitute* '("tests/ps-ref/InsertBlock.ps" |
| 77 | (let ((perl (assoc-ref inputs "perl"))) | 79 | "tests/gps-ref/InsertBlock.ps" |
| 78 | (substitute* '("tests/ps-ref/includeres.ps" | 80 | "tests/ps-ref/bookie.ps" |
| 79 | "tests/gps-ref/includeres.ps") | 81 | "tests/gps-ref/bookie.ps") |
| 80 | (("/usr/local/bin/perl") | 82 | (("version 3") "version 2")) |
| 81 | (string-append perl "/bin/perl")))) | 83 | (substitute* '("tests/ps-ref/psmandup.ps" |
| 82 | ;; Some of the reference postscript contain a 'version 3' | 84 | "tests/gps-ref/psmandup.ps") |
| 83 | ;; string that in inconsistent with the source text in the | 85 | (("#! */bin/sh") (string-append |
| 84 | ;; tstfiles directory. Erroneous search-and-replace? | 86 | "#!" (which "sh"))))) |
| 85 | (substitute* '("tests/ps-ref/InsertBlock.ps" | 87 | %standard-phases)))) |
| 86 | "tests/gps-ref/InsertBlock.ps" | ||
| 87 | "tests/ps-ref/bookie.ps" | ||
| 88 | "tests/gps-ref/bookie.ps") | ||
| 89 | (("version 3") "version 2")) | ||
| 90 | (substitute* '("tests/ps-ref/psmandup.ps" | ||
| 91 | "tests/gps-ref/psmandup.ps") | ||
| 92 | (("#! */bin/sh") (string-append | ||
| 93 | "#!" (which "sh"))))) | ||
| 94 | %standard-phases))))) | ||
| 95 | (home-page "http://www.gnu.org/software/a2ps") | 88 | (home-page "http://www.gnu.org/software/a2ps") |
| 96 | (synopsis "Any file to PostScript, including pretty-printing") | 89 | (synopsis "Any file to PostScript, including pretty-printing") |
| 97 | (description | 90 | (description |
| @@ -115,16 +108,9 @@ special cases, such as pretty-printing \"--help\" output.") | |||
| 115 | (base32 | 108 | (base32 |
| 116 | "13rkc0fga10xyf56yy9dnq95zndnfadkhxflnp24skszj21y8jqh")))) | 109 | "13rkc0fga10xyf56yy9dnq95zndnfadkhxflnp24skszj21y8jqh")))) |
| 117 | (build-system gnu-build-system) | 110 | (build-system gnu-build-system) |
| 118 | (native-inputs `(("file" ,file))) | ||
| 119 | (arguments | 111 | (arguments |
| 120 | ;; Must define DIFF_CMD for tests to pass | 112 | ;; Must define DIFF_CMD for tests to pass |
| 121 | '(#:configure-flags '("CPPFLAGS=-DDIFF_CMD=\\\"diff\\\"") | 113 | '(#:configure-flags '("CPPFLAGS=-DDIFF_CMD=\\\"diff\\\""))) |
| 122 | #:phases (alist-cons-before | ||
| 123 | 'configure 'patch-configure | ||
| 124 | (lambda _ | ||
| 125 | (substitute* "configure" | ||
| 126 | (("/usr/bin/file") (which "file")))) | ||
| 127 | %standard-phases))) | ||
| 128 | (home-page "http://www.gnu.org/software/trueprint") | 114 | (home-page "http://www.gnu.org/software/trueprint") |
| 129 | (synopsis "Pretty-print C sources and other plain text to PostScript") | 115 | (synopsis "Pretty-print C sources and other plain text to PostScript") |
| 130 | (description | 116 | (description |
| @@ -178,34 +164,28 @@ different programming languages.") | |||
| 178 | `(("boost" ,boost))) | 164 | `(("boost" ,boost))) |
| 179 | (native-inputs | 165 | (native-inputs |
| 180 | `(("bison" ,bison) | 166 | `(("bison" ,bison) |
| 181 | ("flex" ,flex) | 167 | ("flex" ,flex))) |
| 182 | ("file" ,file))) | ||
| 183 | (arguments | 168 | (arguments |
| 184 | `(#:configure-flags | 169 | `(#:configure-flags |
| 185 | (list (string-append "--with-boost=" | 170 | (list (string-append "--with-boost=" |
| 186 | (assoc-ref %build-inputs "boost"))) | 171 | (assoc-ref %build-inputs "boost"))) |
| 187 | #:parallel-tests? #f ;There appear to be race conditions | 172 | #:parallel-tests? #f ;There appear to be race conditions |
| 188 | #:phases (alist-cons-before | 173 | #:phases (alist-cons-before |
| 189 | 'configure 'patch-configure | 174 | 'check 'patch-test-files |
| 190 | (lambda _ | 175 | (lambda _ |
| 191 | (substitute* "configure" | 176 | ;; Unpatch shebangs in test input so that source-highlight |
| 192 | (("/usr/bin/file") (which "file")))) | 177 | ;; is still able to infer input language |
| 193 | (alist-cons-before | 178 | (substitute* '("tests/test.sh" |
| 194 | 'check 'patch-test-files | 179 | "tests/test2.sh" |
| 195 | (lambda _ | 180 | "tests/test.tcl") |
| 196 | ;; Unpatch shebangs in test input so that source-highlight | 181 | (((string-append "#! *" (which "sh"))) "#!/bin/sh")) |
| 197 | ;; is still able to infer input language | 182 | ;; Initial patching unrecoverably removes whitespace, so |
| 198 | (substitute* '("tests/test.sh" | 183 | ;; remove it also in the comparison output. |
| 199 | "tests/test2.sh" | 184 | (substitute* '("tests/test.sh.html" |
| 200 | "tests/test.tcl") | 185 | "tests/test2.sh.html" |
| 201 | (((string-append "#! *" (which "sh"))) "#!/bin/sh")) | 186 | "tests/test.tcl.html") |
| 202 | ;; Initial patching unrecoverably removes whitespace, so | 187 | (("#! */bin/sh") "#!/bin/sh"))) |
| 203 | ;; remove it also in the comparison output. | 188 | %standard-phases))) |
| 204 | (substitute* '("tests/test.sh.html" | ||
| 205 | "tests/test2.sh.html" | ||
| 206 | "tests/test.tcl.html") | ||
| 207 | (("#! */bin/sh") "#!/bin/sh"))) | ||
| 208 | %standard-phases)))) | ||
| 209 | (home-page "http://www.gnu.org/software/src-highlite") | 189 | (home-page "http://www.gnu.org/software/src-highlite") |
| 210 | (synopsis "Produce a document with syntax highlighting from a source file") | 190 | (synopsis "Produce a document with syntax highlighting from a source file") |
| 211 | (description | 191 | (description |
diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index 8636931ed99..17fa7afd8d0 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm | |||
| @@ -106,6 +106,35 @@ working directory." | |||
| 106 | (and (zero? (system* "tar" "xvf" source)) | 106 | (and (zero? (system* "tar" "xvf" source)) |
| 107 | (chdir (first-subdirectory "."))))) | 107 | (chdir (first-subdirectory "."))))) |
| 108 | 108 | ||
| 109 | ;; See <http://bugs.gnu.org/17840>. | ||
| 110 | (define* (patch-usr-bin-file #:key native-inputs inputs | ||
| 111 | (patch-/usr/bin/file? #t) | ||
| 112 | #:allow-other-keys) | ||
| 113 | "Patch occurrences of /usr/bin/file in configure, if present." | ||
| 114 | (when patch-/usr/bin/file? | ||
| 115 | (let ((file "configure") | ||
| 116 | (file-command (or (and=> (assoc-ref (or native-inputs inputs) "file") | ||
| 117 | (cut string-append <> "/bin/file")) | ||
| 118 | (which "file")))) | ||
| 119 | (cond ((not (file-exists? file)) | ||
| 120 | (format (current-error-port) | ||
| 121 | "patch-usr-bin-file: warning: `~a' not found~%" | ||
| 122 | file)) | ||
| 123 | ((not file-command) | ||
| 124 | (format (current-error-port) | ||
| 125 | "patch-usr-bin-file: warning: `file' not found in PATH~%")) | ||
| 126 | (else | ||
| 127 | (let ((st (stat file))) | ||
| 128 | (substitute* file | ||
| 129 | (("/usr/bin/file") | ||
| 130 | (begin | ||
| 131 | (format (current-error-port) | ||
| 132 | "patch-usr-bin-file: ~a: changing `~a' to `~a'~%" | ||
| 133 | file "/usr/bin/file" file-command) | ||
| 134 | file-command))) | ||
| 135 | (set-file-time file st)))))) | ||
| 136 | #t) | ||
| 137 | |||
| 109 | (define* (patch-source-shebangs #:key source #:allow-other-keys) | 138 | (define* (patch-source-shebangs #:key source #:allow-other-keys) |
| 110 | "Patch shebangs in all source files; this includes non-executable | 139 | "Patch shebangs in all source files; this includes non-executable |
| 111 | files such as `.in' templates. Most scripts honor $SHELL and | 140 | files such as `.in' templates. Most scripts honor $SHELL and |
| @@ -353,6 +382,7 @@ makefiles." | |||
| 353 | (let-syntax ((phases (syntax-rules () | 382 | (let-syntax ((phases (syntax-rules () |
| 354 | ((_ p ...) `((p . ,p) ...))))) | 383 | ((_ p ...) `((p . ,p) ...))))) |
| 355 | (phases set-paths unpack | 384 | (phases set-paths unpack |
| 385 | patch-usr-bin-file | ||
| 356 | patch-source-shebangs configure patch-generated-file-shebangs | 386 | patch-source-shebangs configure patch-generated-file-shebangs |
| 357 | build check install | 387 | build check install |
| 358 | patch-shebangs strip))) | 388 | patch-shebangs strip))) |
diff --git a/guix/build/utils.scm b/guix/build/utils.scm index 2f3dc9cad01..cda4fb12efe 100644 --- a/guix/build/utils.scm +++ b/guix/build/utils.scm | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | #:use-module (ice-9 match) | 25 | #:use-module (ice-9 match) |
| 26 | #:use-module (ice-9 regex) | 26 | #:use-module (ice-9 regex) |
| 27 | #:use-module (ice-9 rdelim) | 27 | #:use-module (ice-9 rdelim) |
| 28 | #:use-module (ice-9 format) | ||
| 28 | #:use-module (rnrs bytevectors) | 29 | #:use-module (rnrs bytevectors) |
| 29 | #:use-module (rnrs io ports) | 30 | #:use-module (rnrs io ports) |
| 30 | #:re-export (alist-cons | 31 | #:re-export (alist-cons |
| @@ -582,14 +583,15 @@ When KEEP-MTIME? is true, the atime/mtime of FILE are kept unchanged." | |||
| 582 | 583 | ||
| 583 | (let ((st (stat file))) | 584 | (let ((st (stat file))) |
| 584 | (substitute* file | 585 | (substitute* file |
| 585 | (("^ *SHELL[[:blank:]]*=[[:blank:]]*([[:graph:]]*/)([[:graph:]]+)[[:blank:]]*" _ dir shell) | 586 | (("^ *SHELL[[:blank:]]*=[[:blank:]]*([[:graph:]]*/)([[:graph:]]+)(.*)$" |
| 587 | _ dir shell args) | ||
| 586 | (let* ((old (string-append dir shell)) | 588 | (let* ((old (string-append dir shell)) |
| 587 | (new (or (find-shell shell) old))) | 589 | (new (or (find-shell shell) old))) |
| 588 | (unless (string=? new old) | 590 | (unless (string=? new old) |
| 589 | (format (current-error-port) | 591 | (format (current-error-port) |
| 590 | "patch-makefile-SHELL: ~a: changing `SHELL' from `~a' to `~a'~%" | 592 | "patch-makefile-SHELL: ~a: changing `SHELL' from `~a' to `~a'~%" |
| 591 | file old new)) | 593 | file old new)) |
| 592 | (string-append "SHELL = " new "\n")))) | 594 | (string-append "SHELL = " new args)))) |
| 593 | 595 | ||
| 594 | (when keep-mtime? | 596 | (when keep-mtime? |
| 595 | (set-file-time file st)))) | 597 | (set-file-time file st)))) |
| @@ -686,8 +688,7 @@ known as `nuke-refs' in Nixpkgs." | |||
| 686 | result)))))) | 688 | result)))))) |
| 687 | 689 | ||
| 688 | (define* (wrap-program prog #:rest vars) | 690 | (define* (wrap-program prog #:rest vars) |
| 689 | "Rename PROG to .PROG-real and make PROG a wrapper. VARS should look like | 691 | "Make a wrapper for PROG. VARS should look like this: |
| 690 | this: | ||
| 691 | 692 | ||
| 692 | '(VARIABLE DELIMITER POSITION LIST-OF-DIRECTORIES) | 693 | '(VARIABLE DELIMITER POSITION LIST-OF-DIRECTORIES) |
| 693 | 694 | ||
| @@ -696,23 +697,44 @@ where DELIMITER is optional. ':' will be used if DELIMITER is not given. | |||
| 696 | For example, this command: | 697 | For example, this command: |
| 697 | 698 | ||
| 698 | (wrap-program \"foo\" | 699 | (wrap-program \"foo\" |
| 699 | '(\"PATH\" \":\" = (\"/nix/.../bar/bin\")) | 700 | '(\"PATH\" \":\" = (\"/gnu/.../bar/bin\")) |
| 700 | '(\"CERT_PATH\" suffix (\"/nix/.../baz/certs\" | 701 | '(\"CERT_PATH\" suffix (\"/gnu/.../baz/certs\" |
| 701 | \"/qux/certs\"))) | 702 | \"/qux/certs\"))) |
| 702 | 703 | ||
| 703 | will copy 'foo' to '.foo-real' and create the file 'foo' with the following | 704 | will copy 'foo' to '.foo-real' and create the file 'foo' with the following |
| 704 | contents: | 705 | contents: |
| 705 | 706 | ||
| 706 | #!location/of/bin/bash | 707 | #!location/of/bin/bash |
| 707 | export PATH=\"/nix/.../bar/bin\" | 708 | export PATH=\"/gnu/.../bar/bin\" |
| 708 | export CERT_PATH=\"$CERT_PATH${CERT_PATH:+:}/nix/.../baz/certs:/qux/certs\" | 709 | export CERT_PATH=\"$CERT_PATH${CERT_PATH:+:}/gnu/.../baz/certs:/qux/certs\" |
| 709 | exec location/of/.foo-real | 710 | exec location/of/.foo-real |
| 710 | 711 | ||
| 711 | This is useful for scripts that expect particular programs to be in $PATH, for | 712 | This is useful for scripts that expect particular programs to be in $PATH, for |
| 712 | programs that expect particular shared libraries to be in $LD_LIBRARY_PATH, or | 713 | programs that expect particular shared libraries to be in $LD_LIBRARY_PATH, or |
| 713 | modules in $GUILE_LOAD_PATH, etc." | 714 | modules in $GUILE_LOAD_PATH, etc. |
| 714 | (let ((prog-real (string-append (dirname prog) "/." (basename prog) "-real")) | 715 | |
| 715 | (prog-tmp (string-append (dirname prog) "/." (basename prog) "-tmp"))) | 716 | If PROG has previously been wrapped by wrap-program the wrapper will point to |
| 717 | the previous wrapper." | ||
| 718 | (define (wrapper-file-name number) | ||
| 719 | (format #f "~a/.~a-wrap-~2'0d" (dirname prog) (basename prog) number)) | ||
| 720 | (define (next-wrapper-number) | ||
| 721 | (let ((wrappers | ||
| 722 | (find-files (dirname prog) | ||
| 723 | (string-append "\\." (basename prog) "-wrap-.*")))) | ||
| 724 | (if (null? wrappers) | ||
| 725 | 0 | ||
| 726 | (string->number (string-take-right (last wrappers) 2))))) | ||
| 727 | (define (wrapper-target number) | ||
| 728 | (if (zero? number) | ||
| 729 | (let ((prog-real (string-append (dirname prog) "/." | ||
| 730 | (basename prog) "-real"))) | ||
| 731 | (copy-file prog prog-real) | ||
| 732 | prog-real) | ||
| 733 | (wrapper-file-name number))) | ||
| 734 | (let* ((number (next-wrapper-number)) | ||
| 735 | (target (wrapper-target number)) | ||
| 736 | (wrapper (wrapper-file-name (1+ number))) | ||
| 737 | (prog-tmp (string-append target "-tmp"))) | ||
| 716 | (define (export-variable lst) | 738 | (define (export-variable lst) |
| 717 | ;; Return a string that exports an environment variable. | 739 | ;; Return a string that exports an environment variable. |
| 718 | (match lst | 740 | (match lst |
| @@ -735,8 +757,6 @@ modules in $GUILE_LOAD_PATH, etc." | |||
| 735 | (format #f "export ~a=\"$~a${~a:+:}~a\"" | 757 | (format #f "export ~a=\"$~a${~a:+:}~a\"" |
| 736 | var var var (string-join rest ":"))))) | 758 | var var var (string-join rest ":"))))) |
| 737 | 759 | ||
| 738 | (copy-file prog prog-real) | ||
| 739 | |||
| 740 | (with-output-to-file prog-tmp | 760 | (with-output-to-file prog-tmp |
| 741 | (lambda () | 761 | (lambda () |
| 742 | (format #t | 762 | (format #t |
| @@ -744,9 +764,11 @@ modules in $GUILE_LOAD_PATH, etc." | |||
| 744 | (which "bash") | 764 | (which "bash") |
| 745 | (string-join (map export-variable vars) | 765 | (string-join (map export-variable vars) |
| 746 | "\n") | 766 | "\n") |
| 747 | (canonicalize-path prog-real)))) | 767 | (canonicalize-path target)))) |
| 748 | 768 | ||
| 749 | (chmod prog-tmp #o755) | 769 | (chmod prog-tmp #o755) |
| 770 | (rename-file prog-tmp wrapper) | ||
| 771 | (symlink wrapper prog-tmp) | ||
| 750 | (rename-file prog-tmp prog))) | 772 | (rename-file prog-tmp prog))) |
| 751 | 773 | ||
| 752 | ;;; Local Variables: | 774 | ;;; Local Variables: |
diff --git a/tests/build-utils.scm b/tests/build-utils.scm index e94f04b2398..a5ea640c479 100644 --- a/tests/build-utils.scm +++ b/tests/build-utils.scm | |||
| @@ -18,9 +18,24 @@ | |||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | (define-module (test-build-utils) | 20 | (define-module (test-build-utils) |
| 21 | #:use-module (guix tests) | ||
| 22 | #:use-module (guix store) | ||
| 23 | #:use-module (guix derivations) | ||
| 21 | #:use-module (guix build utils) | 24 | #:use-module (guix build utils) |
| 22 | #:use-module (srfi srfi-64)) | 25 | #:use-module (guix packages) |
| 26 | #:use-module (guix build-system) | ||
| 27 | #:use-module (guix build-system trivial) | ||
| 28 | #:use-module (gnu packages) | ||
| 29 | #:use-module (gnu packages bootstrap) | ||
| 30 | #:use-module (srfi srfi-34) | ||
| 31 | #:use-module (srfi srfi-64) | ||
| 32 | #:use-module (rnrs io ports) | ||
| 33 | #:use-module (ice-9 popen)) | ||
| 23 | 34 | ||
| 35 | (define %store | ||
| 36 | (open-connection-for-tests)) | ||
| 37 | |||
| 38 | |||
| 24 | (test-begin "build-utils") | 39 | (test-begin "build-utils") |
| 25 | 40 | ||
| 26 | (test-equal "alist-cons-before" | 41 | (test-equal "alist-cons-before" |
| @@ -80,6 +95,46 @@ | |||
| 80 | port | 95 | port |
| 81 | cons))))) | 96 | cons))))) |
| 82 | 97 | ||
| 98 | (test-assert "wrap-program, one input, multiple calls" | ||
| 99 | (let* ((p (package | ||
| 100 | (name "test-wrap-program") (version "0") (source #f) | ||
| 101 | (synopsis #f) (description #f) (license #f) (home-page #f) | ||
| 102 | (build-system trivial-build-system) | ||
| 103 | (arguments | ||
| 104 | `(#:guile ,%bootstrap-guile | ||
| 105 | #:modules ((guix build utils)) | ||
| 106 | #:builder | ||
| 107 | (let* ((out (assoc-ref %outputs "out")) | ||
| 108 | (bash (assoc-ref %build-inputs "bash")) | ||
| 109 | (foo (string-append out "/foo"))) | ||
| 110 | (begin | ||
| 111 | (use-modules (guix build utils)) | ||
| 112 | (mkdir out) | ||
| 113 | (call-with-output-file foo | ||
| 114 | (lambda (p) | ||
| 115 | (format p | ||
| 116 | "#!~a~%echo \"${GUIX_FOO} ${GUIX_BAR}\"~%" | ||
| 117 | bash))) | ||
| 118 | (chmod foo #o777) | ||
| 119 | ;; wrap-program uses `which' to find bash for the wrapper | ||
| 120 | ;; shebang, but it can't know about the bootstrap bash in | ||
| 121 | ;; the store, since it's not named "bash". Help it out a | ||
| 122 | ;; bit by providing a symlink it this package's output. | ||
| 123 | (symlink bash (string-append out "/bash")) | ||
| 124 | (setenv "PATH" out) | ||
| 125 | (wrap-program foo `("GUIX_FOO" prefix ("hello"))) | ||
| 126 | (wrap-program foo `("GUIX_BAR" prefix ("world"))) | ||
| 127 | #t)))) | ||
| 128 | (inputs `(("bash" ,(search-bootstrap-binary "bash" | ||
| 129 | (%current-system))))))) | ||
| 130 | (d (package-derivation %store p))) | ||
| 131 | (and (build-derivations %store (pk 'drv d (list d))) | ||
| 132 | (let* ((p (derivation->output-path d)) | ||
| 133 | (foo (string-append p "/foo")) | ||
| 134 | (pipe (open-input-pipe foo)) | ||
| 135 | (str (get-string-all pipe))) | ||
| 136 | (equal? str "hello world\n"))))) | ||
| 137 | |||
| 83 | (test-end) | 138 | (test-end) |
| 84 | 139 | ||
| 85 | 140 | ||
