diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2015-09-26 15:14:53 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2015-09-26 15:14:53 +0200 |
| commit | e1556533d3e57950417b2e35a68e95c65fee5042 (patch) | |
| tree | 41d67b065c7828e164af83254fb447849d9e880d /gnu/packages | |
| parent | 5d8d8f3b0a07edb3bd435830b076749f906537d8 (diff) | |
| parent | 92f1cefb74f6092c0c70f93140824ab806086272 (diff) | |
Merge branch 'core-updates'
Diffstat (limited to 'gnu/packages')
93 files changed, 1346 insertions, 2405 deletions
diff --git a/gnu/packages/acl.scm b/gnu/packages/acl.scm index af2fb62b8aa..784186b670b 100644 --- a/gnu/packages/acl.scm +++ b/gnu/packages/acl.scm | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #:use-module (gnu packages perl) | 26 | #:use-module (gnu packages perl) |
| 27 | #:use-module (guix packages) | 27 | #:use-module (guix packages) |
| 28 | #:use-module (guix download) | 28 | #:use-module (guix download) |
| 29 | #:use-module (gnu packages) | ||
| 29 | #:use-module (guix build-system gnu)) | 30 | #:use-module (guix build-system gnu)) |
| 30 | 31 | ||
| 31 | (define-public acl | 32 | (define-public acl |
| @@ -39,7 +40,8 @@ | |||
| 39 | version ".src.tar.gz")) | 40 | version ".src.tar.gz")) |
| 40 | (sha256 | 41 | (sha256 |
| 41 | (base32 | 42 | (base32 |
| 42 | "08qd9s3wfhv0ajswsylnfwr5h0d7j9d4rgip855nrh400nxp940p")))) | 43 | "08qd9s3wfhv0ajswsylnfwr5h0d7j9d4rgip855nrh400nxp940p")) |
| 44 | (patches (list (search-patch "acl-hurd-path-max.patch"))))) | ||
| 43 | (build-system gnu-build-system) | 45 | (build-system gnu-build-system) |
| 44 | (arguments | 46 | (arguments |
| 45 | `(#:tests? #f ; FIXME: Investigate test suite failures | 47 | `(#:tests? #f ; FIXME: Investigate test suite failures |
| @@ -58,11 +60,8 @@ | |||
| 58 | (inputs `(("attr" ,attr))) | 60 | (inputs `(("attr" ,attr))) |
| 59 | (native-inputs | 61 | (native-inputs |
| 60 | `(("gettext" ,gnu-gettext) | 62 | `(("gettext" ,gnu-gettext) |
| 61 | ("perl" ,perl) | 63 | ("perl" ,perl))) |
| 62 | ("sed" ,sed))) | 64 | (home-page "http://savannah.nongnu.org/projects/acl") |
| 63 | |||
| 64 | (home-page | ||
| 65 | "http://savannah.nongnu.org/projects/acl") | ||
| 66 | (synopsis | 65 | (synopsis |
| 67 | "Library and tools for manipulating access control lists") | 66 | "Library and tools for manipulating access control lists") |
| 68 | (description | 67 | (description |
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 70b2bb2c8fc..027fe5b5735 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm | |||
| @@ -428,6 +428,7 @@ connection alive.") | |||
| 428 | (zero? (system* "tar" "cf" "bind.tar.gz" | 428 | (zero? (system* "tar" "cf" "bind.tar.gz" |
| 429 | "bind-9.9.5-P1" | 429 | "bind-9.9.5-P1" |
| 430 | ;; avoid non-determinism in the archive | 430 | ;; avoid non-determinism in the archive |
| 431 | "--sort=name" | ||
| 431 | "--mtime=@0" | 432 | "--mtime=@0" |
| 432 | "--owner=root:0" | 433 | "--owner=root:0" |
| 433 | "--group=root:0")))) | 434 | "--group=root:0")))) |
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 2511f121c25..a35ef278ee5 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm | |||
| @@ -340,7 +340,7 @@ tools (analyzer, mono/stereo tools, crossovers).") | |||
| 340 | (define-public csound | 340 | (define-public csound |
| 341 | (package | 341 | (package |
| 342 | (name "csound") | 342 | (name "csound") |
| 343 | (version "6.04") | 343 | (version "6.05") |
| 344 | (source (origin | 344 | (source (origin |
| 345 | (method url-fetch) | 345 | (method url-fetch) |
| 346 | (uri (string-append | 346 | (uri (string-append |
| @@ -348,7 +348,7 @@ tools (analyzer, mono/stereo tools, crossovers).") | |||
| 348 | version "/Csound" version ".tar.gz")) | 348 | version "/Csound" version ".tar.gz")) |
| 349 | (sha256 | 349 | (sha256 |
| 350 | (base32 | 350 | (base32 |
| 351 | "1030w38lxdwjz1irr32m9cl0paqmgr02lab2m7f7j1yihwxj1w0g")))) | 351 | "0a1sni6lr7qpwywpggbkp0ia3h9bwwgf9i87gsag8ra2h30v82hd")))) |
| 352 | (build-system cmake-build-system) | 352 | (build-system cmake-build-system) |
| 353 | (inputs | 353 | (inputs |
| 354 | `(("alsa-lib" ,alsa-lib) | 354 | `(("alsa-lib" ,alsa-lib) |
diff --git a/gnu/packages/avahi.scm b/gnu/packages/avahi.scm index 517df323820..b6eef1a6ad1 100644 --- a/gnu/packages/avahi.scm +++ b/gnu/packages/avahi.scm | |||
| @@ -52,7 +52,8 @@ | |||
| 52 | "--disable-xmltoman" | 52 | "--disable-xmltoman" |
| 53 | "--enable-tests" | 53 | "--enable-tests" |
| 54 | "--disable-qt3" "--disable-qt4" | 54 | "--disable-qt3" "--disable-qt4" |
| 55 | "--disable-gtk" "--disable-gtk3"))) | 55 | "--disable-gtk" "--disable-gtk3" |
| 56 | "--enable-compat-libdns_sd"))) | ||
| 56 | (inputs | 57 | (inputs |
| 57 | `(("expat" ,expat) | 58 | `(("expat" ,expat) |
| 58 | ("glib" ,glib) | 59 | ("glib" ,glib) |
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index c5f447736a6..a3e3e36608f 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> | 4 | ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> |
| 5 | ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> | 5 | ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> |
| 6 | ;;; Copyright © 2014 Alex Kost <alezost@gmail.com> | 6 | ;;; Copyright © 2014 Alex Kost <alezost@gmail.com> |
| 7 | ;;; Copyright © 2014, 2015 Manolis Fragkiskos Ragkousis <manolis837@gmail.com> | ||
| 7 | ;;; | 8 | ;;; |
| 8 | ;;; This file is part of GNU Guix. | 9 | ;;; This file is part of GNU Guix. |
| 9 | ;;; | 10 | ;;; |
| @@ -33,11 +34,13 @@ | |||
| 33 | #:use-module (gnu packages perl) | 34 | #:use-module (gnu packages perl) |
| 34 | #:use-module (gnu packages linux) | 35 | #:use-module (gnu packages linux) |
| 35 | #:use-module (gnu packages texinfo) | 36 | #:use-module (gnu packages texinfo) |
| 37 | #:use-module (gnu packages hurd) | ||
| 36 | #:use-module (gnu packages pkg-config) | 38 | #:use-module (gnu packages pkg-config) |
| 37 | #:use-module (gnu packages gettext) | 39 | #:use-module (gnu packages gettext) |
| 38 | #:use-module (guix utils) | 40 | #:use-module (guix utils) |
| 39 | #:use-module (guix packages) | 41 | #:use-module (guix packages) |
| 40 | #:use-module (guix download) | 42 | #:use-module (guix download) |
| 43 | #:use-module (guix git-download) | ||
| 41 | #:use-module (guix build-system gnu) | 44 | #:use-module (guix build-system gnu) |
| 42 | #:use-module (guix build-system trivial)) | 45 | #:use-module (guix build-system trivial)) |
| 43 | 46 | ||
| @@ -246,10 +249,18 @@ used to apply commands with arbitrarily long arguments.") | |||
| 246 | version ".tar.xz")) | 249 | version ".tar.xz")) |
| 247 | (sha256 | 250 | (sha256 |
| 248 | (base32 | 251 | (base32 |
| 249 | "0w11jw3fb5sslf0f72kxy7llxgk1ia3a6bcw0c9kmvxrlj355mx2")))) | 252 | "0w11jw3fb5sslf0f72kxy7llxgk1ia3a6bcw0c9kmvxrlj355mx2")) |
| 253 | (patches | ||
| 254 | (list (search-patch "coreutils-racy-tail-test.patch"))))) | ||
| 250 | (build-system gnu-build-system) | 255 | (build-system gnu-build-system) |
| 251 | (inputs `(("acl" ,acl) ; TODO: add SELinux | 256 | (inputs `(("acl" ,acl) ; TODO: add SELinux |
| 252 | ("gmp" ,gmp))) | 257 | ("gmp" ,gmp) ;bignums in 'expr', yay! |
| 258 | |||
| 259 | ;; Drop the dependency on libcap when cross-compiling since it's | ||
| 260 | ;; not quite cross-compilable. | ||
| 261 | ,@(if (%current-target-system) | ||
| 262 | '() | ||
| 263 | `(("libcap" ,libcap))))) ;capability support is 'ls', etc. | ||
| 253 | (native-inputs | 264 | (native-inputs |
| 254 | ;; Perl is needed to run tests in native builds, and to run the bundled | 265 | ;; Perl is needed to run tests in native builds, and to run the bundled |
| 255 | ;; copy of help2man. However, don't pass it when cross-compiling since | 266 | ;; copy of help2man. However, don't pass it when cross-compiling since |
| @@ -285,6 +296,14 @@ functionality beyond that which is outlined in the POSIX standard.") | |||
| 285 | (license gpl3+) | 296 | (license gpl3+) |
| 286 | (home-page "http://www.gnu.org/software/coreutils/"))) | 297 | (home-page "http://www.gnu.org/software/coreutils/"))) |
| 287 | 298 | ||
| 299 | (define-public coreutils-minimal | ||
| 300 | ;; Coreutils without its optional dependencies. | ||
| 301 | (package | ||
| 302 | (inherit coreutils) | ||
| 303 | (name "coreutils-minimal") | ||
| 304 | (outputs '("out")) | ||
| 305 | (inputs '()))) | ||
| 306 | |||
| 288 | (define-public gnu-make | 307 | (define-public gnu-make |
| 289 | (package | 308 | (package |
| 290 | (name "make") | 309 | (name "make") |
| @@ -326,14 +345,14 @@ change. GNU make offers many powerful extensions over the standard utility.") | |||
| 326 | (define-public binutils | 345 | (define-public binutils |
| 327 | (package | 346 | (package |
| 328 | (name "binutils") | 347 | (name "binutils") |
| 329 | (version "2.25") | 348 | (version "2.25.1") |
| 330 | (source (origin | 349 | (source (origin |
| 331 | (method url-fetch) | 350 | (method url-fetch) |
| 332 | (uri (string-append "mirror://gnu/binutils/binutils-" | 351 | (uri (string-append "mirror://gnu/binutils/binutils-" |
| 333 | version ".tar.bz2")) | 352 | version ".tar.bz2")) |
| 334 | (sha256 | 353 | (sha256 |
| 335 | (base32 | 354 | (base32 |
| 336 | "08r9i26b05zcwb9zxb6zllpfdiiicdfsgbpsjlrjmvx3rxjzrpi2")) | 355 | "08lzmhidzc16af1zbx34f8cy4z7mzrswpdbhrb8shy3xxpflmcdm")) |
| 337 | (patches (list (search-patch "binutils-ld-new-dtags.patch") | 356 | (patches (list (search-patch "binutils-ld-new-dtags.patch") |
| 338 | (search-patch "binutils-loongson-workaround.patch"))))) | 357 | (search-patch "binutils-loongson-workaround.patch"))))) |
| 339 | (build-system gnu-build-system) | 358 | (build-system gnu-build-system) |
| @@ -439,14 +458,14 @@ store.") | |||
| 439 | (define-public glibc | 458 | (define-public glibc |
| 440 | (package | 459 | (package |
| 441 | (name "glibc") | 460 | (name "glibc") |
| 442 | (version "2.21") | 461 | (version "2.22") |
| 443 | (source (origin | 462 | (source (origin |
| 444 | (method url-fetch) | 463 | (method url-fetch) |
| 445 | (uri (string-append "mirror://gnu/glibc/glibc-" | 464 | (uri (string-append "mirror://gnu/glibc/glibc-" |
| 446 | version ".tar.xz")) | 465 | version ".tar.xz")) |
| 447 | (sha256 | 466 | (sha256 |
| 448 | (base32 | 467 | (base32 |
| 449 | "1f135546j34s9bfkydmx2nhh9vwxlx60jldi80zmsnln6wj3dsxf")) | 468 | "0j49682pm2nh4qbdw35bas82p1pgfnz4d2l7iwfyzvrvj0318wzb")) |
| 450 | (snippet | 469 | (snippet |
| 451 | ;; Disable 'ldconfig' and /etc/ld.so.cache. The latter is | 470 | ;; Disable 'ldconfig' and /etc/ld.so.cache. The latter is |
| 452 | ;; required on LFS distros to avoid loading the distro's libc.so | 471 | ;; required on LFS distros to avoid loading the distro's libc.so |
| @@ -455,7 +474,9 @@ store.") | |||
| 455 | (("use_ldconfig=yes") | 474 | (("use_ldconfig=yes") |
| 456 | "use_ldconfig=no"))) | 475 | "use_ldconfig=no"))) |
| 457 | (modules '((guix build utils))) | 476 | (modules '((guix build utils))) |
| 458 | (patches (list (search-patch "glibc-ldd-x86_64.patch"))))) | 477 | (patches (map search-patch |
| 478 | '("glibc-ldd-x86_64.patch" | ||
| 479 | "glibc-o-largefile.patch"))))) | ||
| 459 | (build-system gnu-build-system) | 480 | (build-system gnu-build-system) |
| 460 | 481 | ||
| 461 | ;; Glibc's <limits.h> refers to <linux/limit.h>, for instance, so glibc | 482 | ;; Glibc's <limits.h> refers to <linux/limit.h>, for instance, so glibc |
| @@ -472,7 +493,7 @@ store.") | |||
| 472 | #:parallel-build? #f | 493 | #:parallel-build? #f |
| 473 | 494 | ||
| 474 | ;; The libraries have an empty RUNPATH, but some, such as the versioned | 495 | ;; The libraries have an empty RUNPATH, but some, such as the versioned |
| 475 | ;; libraries (libdl-2.21.so, etc.) have ld.so marked as NEEDED. Since | 496 | ;; libraries (libdl-2.22.so, etc.) have ld.so marked as NEEDED. Since |
| 476 | ;; these libraries are always going to be found anyway, just skip | 497 | ;; these libraries are always going to be found anyway, just skip |
| 477 | ;; RUNPATH checks. | 498 | ;; RUNPATH checks. |
| 478 | #:validate-runpath? #f | 499 | #:validate-runpath? #f |
| @@ -513,72 +534,65 @@ store.") | |||
| 513 | "libc_cv_ssp=no") | 534 | "libc_cv_ssp=no") |
| 514 | 535 | ||
| 515 | #:tests? #f ; XXX | 536 | #:tests? #f ; XXX |
| 516 | #:phases (alist-cons-before | 537 | #:phases (modify-phases %standard-phases |
| 517 | 'configure 'pre-configure | 538 | (add-before |
| 518 | (lambda* (#:key inputs native-inputs outputs | 539 | 'configure 'pre-configure |
| 519 | #:allow-other-keys) | 540 | (lambda* (#:key inputs native-inputs outputs |
| 520 | (let* ((out (assoc-ref outputs "out")) | 541 | #:allow-other-keys) |
| 521 | (bin (string-append out "/bin"))) | 542 | (let* ((out (assoc-ref outputs "out")) |
| 522 | ;; Use `pwd', not `/bin/pwd'. | 543 | (bin (string-append out "/bin")) |
| 523 | (substitute* "configure" | 544 | ;; FIXME: Normally we would look it up only in INPUTS |
| 524 | (("/bin/pwd") "pwd")) | 545 | ;; but cross-base uses it as a native input. |
| 525 | 546 | (bash (or (assoc-ref inputs "static-bash") | |
| 526 | ;; Install the rpc data base file under `$out/etc/rpc'. | 547 | (assoc-ref native-inputs "static-bash")))) |
| 527 | ;; FIXME: Use installFlags = [ "sysconfdir=$(out)/etc" ]; | 548 | ;; Use `pwd', not `/bin/pwd'. |
| 528 | (substitute* "sunrpc/Makefile" | 549 | (substitute* "configure" |
| 529 | (("^\\$\\(inst_sysconfdir\\)/rpc(.*)$" _ suffix) | 550 | (("/bin/pwd") "pwd")) |
| 530 | (string-append out "/etc/rpc" suffix "\n")) | 551 | |
| 531 | (("^install-others =.*$") | 552 | ;; Install the rpc data base file under `$out/etc/rpc'. |
| 532 | (string-append "install-others = " out "/etc/rpc\n"))) | 553 | ;; FIXME: Use installFlags = [ "sysconfdir=$(out)/etc" ]; |
| 533 | 554 | (substitute* "sunrpc/Makefile" | |
| 534 | (substitute* "Makeconfig" | 555 | (("^\\$\\(inst_sysconfdir\\)/rpc(.*)$" _ suffix) |
| 535 | ;; According to | 556 | (string-append out "/etc/rpc" suffix "\n")) |
| 536 | ;; <http://www.linuxfromscratch.org/lfs/view/stable/chapter05/glibc.html>, | 557 | (("^install-others =.*$") |
| 537 | ;; linking against libgcc_s is not needed with GCC | 558 | (string-append "install-others = " out "/etc/rpc\n"))) |
| 538 | ;; 4.7.1. | 559 | |
| 539 | ((" -lgcc_s") "")) | 560 | (substitute* "Makeconfig" |
| 540 | 561 | ;; According to | |
| 541 | ;; Copy a statically-linked Bash in the output, with | 562 | ;; <http://www.linuxfromscratch.org/lfs/view/stable/chapter05/glibc.html>, |
| 542 | ;; no references to other store paths. | 563 | ;; linking against libgcc_s is not needed with GCC |
| 543 | ;; FIXME: Normally we would look it up only in INPUTS but | 564 | ;; 4.7.1. |
| 544 | ;; cross-base uses it as a native input. | 565 | ((" -lgcc_s") "")) |
| 545 | (mkdir-p bin) | 566 | |
| 546 | (copy-file (string-append (or (assoc-ref inputs | 567 | ;; Have `system' use that Bash. |
| 547 | "static-bash") | 568 | (substitute* "sysdeps/posix/system.c" |
| 548 | (assoc-ref native-inputs | 569 | (("#define[[:blank:]]+SHELL_PATH.*$") |
| 549 | "static-bash")) | 570 | (format #f "#define SHELL_PATH \"~a/bin/bash\"\n" |
| 550 | "/bin/bash") | 571 | bash))) |
| 551 | (string-append bin "/bash")) | 572 | |
| 552 | (remove-store-references (string-append bin "/bash")) | 573 | ;; Same for `popen'. |
| 553 | (chmod (string-append bin "/bash") #o555) | 574 | (substitute* "libio/iopopen.c" |
| 554 | 575 | (("/bin/sh") | |
| 555 | ;; Keep a symlink, for `patch-shebang' resolution. | 576 | (string-append bash "/bin/bash"))) |
| 556 | (with-directory-excursion bin | 577 | |
| 557 | (symlink "bash" "sh")) | 578 | ;; Same for the shell used by the 'exec' functions for |
| 558 | 579 | ;; scripts that lack a shebang. | |
| 559 | ;; Have `system' use that Bash. | 580 | (substitute* (find-files "." "^paths\\.h$") |
| 560 | (substitute* "sysdeps/posix/system.c" | 581 | (("#define[[:blank:]]+_PATH_BSHELL[[:blank:]].*$") |
| 561 | (("#define[[:blank:]]+SHELL_PATH.*$") | 582 | (string-append "#define _PATH_BSHELL \"" |
| 562 | (format #f "#define SHELL_PATH \"~a/bin/bash\"\n" | 583 | bash "/bin/bash\"\n"))) |
| 563 | out))) | 584 | |
| 564 | 585 | ;; Make sure we don't retain a reference to the | |
| 565 | ;; Same for `popen'. | 586 | ;; bootstrap Perl. |
| 566 | (substitute* "libio/iopopen.c" | 587 | (substitute* "malloc/mtrace.pl" |
| 567 | (("/bin/sh") | 588 | (("^#!.*") |
| 568 | (string-append out "/bin/bash"))) | 589 | ;; The shebang can be omitted, because there's the |
| 569 | 590 | ;; "bilingual" eval/exec magic at the top of the file. | |
| 570 | ;; Make sure we don't retain a reference to the | 591 | "") |
| 571 | ;; bootstrap Perl. | 592 | (("exec @PERL@") |
| 572 | (substitute* "malloc/mtrace.pl" | 593 | "exec perl")))))))) |
| 573 | (("^#!.*") | 594 | |
| 574 | ;; The shebang can be omitted, because there's the | 595 | (inputs `(("static-bash" ,static-bash))) |
| 575 | ;; "bilingual" eval/exec magic at the top of the file. | ||
| 576 | "") | ||
| 577 | (("exec @PERL@") | ||
| 578 | "exec perl")))) | ||
| 579 | %standard-phases))) | ||
| 580 | |||
| 581 | (inputs `(("static-bash" ,(static-package bash-light)))) | ||
| 582 | 596 | ||
| 583 | ;; To build the manual, we need Texinfo and Perl. Gettext is needed to | 597 | ;; To build the manual, we need Texinfo and Perl. Gettext is needed to |
| 584 | ;; install the message catalogs, with 'msgfmt'. | 598 | ;; install the message catalogs, with 'msgfmt'. |
| @@ -626,10 +640,6 @@ the 'share/locale' sub-directory of this package.") | |||
| 626 | `(alist-replace | 640 | `(alist-replace |
| 627 | 'build | 641 | 'build |
| 628 | (lambda* (#:key outputs #:allow-other-keys) | 642 | (lambda* (#:key outputs #:allow-other-keys) |
| 629 | (let ((out (assoc-ref outputs "out"))) | ||
| 630 | ;; Delete $out/bin, which contains 'bash'. | ||
| 631 | (delete-file-recursively (string-append out "/bin"))) | ||
| 632 | |||
| 633 | (zero? (system* "make" "localedata/install-locales" | 643 | (zero? (system* "make" "localedata/install-locales" |
| 634 | "-j" (number->string (parallel-job-count))))) | 644 | "-j" (number->string (parallel-job-count))))) |
| 635 | (alist-delete 'install ,phases))) | 645 | (alist-delete 'install ,phases))) |
| @@ -700,6 +710,113 @@ variety of options. It is an alternative to the shell \"type\" built-in | |||
| 700 | command.") | 710 | command.") |
| 701 | (license gpl3+))) ; some files are under GPLv2+ | 711 | (license gpl3+))) ; some files are under GPLv2+ |
| 702 | 712 | ||
| 713 | (define-public glibc/hurd | ||
| 714 | ;; The Hurd's libc variant. | ||
| 715 | (package (inherit glibc) | ||
| 716 | (name "glibc-hurd") | ||
| 717 | (version "2.18") | ||
| 718 | (source (origin | ||
| 719 | (method git-fetch) | ||
| 720 | (uri (git-reference | ||
| 721 | (url "git://git.sv.gnu.org/hurd/glibc") | ||
| 722 | (commit "cc94b3cfe65523f980359e5f0e93a26196bda1d3"))) | ||
| 723 | (sha256 | ||
| 724 | (base32 | ||
| 725 | "17gsh0kaz0zyvghjmx861mi2p65m9901lngi179x61zm6v2v3xc4")) | ||
| 726 | (file-name (string-append name "-" version)) | ||
| 727 | (patches (map search-patch | ||
| 728 | '("glibc-hurd-extern-inline.patch"))))) | ||
| 729 | |||
| 730 | ;; Libc provides <hurd.h>, which includes a bunch of Hurd and Mach headers, | ||
| 731 | ;; so both should be propagated. | ||
| 732 | (propagated-inputs `(("gnumach-headers" ,gnumach-headers) | ||
| 733 | ("hurd-headers" ,hurd-headers) | ||
| 734 | ("hurd-minimal" ,hurd-minimal))) | ||
| 735 | (native-inputs | ||
| 736 | `(,@(package-native-inputs glibc) | ||
| 737 | ("patch/libpthread-patch" ,(search-patch "libpthread-glibc-preparation.patch")) | ||
| 738 | ("mig" ,mig) | ||
| 739 | ("perl" ,perl) | ||
| 740 | ("libpthread" ,(origin | ||
| 741 | (method git-fetch) | ||
| 742 | (uri (git-reference | ||
| 743 | (url "git://git.sv.gnu.org/hurd/libpthread") | ||
| 744 | (commit "0ef7b75c4ba91b6660f0d3d8b51d14d25e3d5bfb"))) | ||
| 745 | (sha256 | ||
| 746 | (base32 | ||
| 747 | "031py18fls15z0wprni33mf762kg6fx8xqijppimhp83yp6ky3l3")) | ||
| 748 | (file-name "libpthread"))))) | ||
| 749 | |||
| 750 | (arguments | ||
| 751 | (substitute-keyword-arguments (package-arguments glibc) | ||
| 752 | ((#:configure-flags original-configure-flags) | ||
| 753 | `(append (list "--host=i686-pc-gnu" | ||
| 754 | |||
| 755 | ;; nscd fails to build for GNU/Hurd: | ||
| 756 | ;; <https://lists.gnu.org/archive/html/bug-hurd/2014-07/msg00006.html>. | ||
| 757 | ;; Disable it. | ||
| 758 | "--disable-nscd") | ||
| 759 | (filter (lambda (flag) | ||
| 760 | (not (or (string-prefix? "--with-headers=" flag) | ||
| 761 | (string-prefix? "--enable-kernel=" flag)))) | ||
| 762 | ;; Evaluate 'original-configure-flags' in a | ||
| 763 | ;; lexical environment that has a dummy | ||
| 764 | ;; "linux-headers" input, to prevent errors. | ||
| 765 | (let ((%build-inputs `(("linux-headers" . "@DUMMY@") | ||
| 766 | ,@%build-inputs))) | ||
| 767 | ,original-configure-flags)))) | ||
| 768 | ((#:phases phases) | ||
| 769 | `(alist-cons-after | ||
| 770 | 'unpack 'prepare-libpthread | ||
| 771 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 772 | (copy-recursively (assoc-ref inputs "libpthread") "libpthread") | ||
| 773 | |||
| 774 | (system* "patch" "--force" "-p1" "-i" | ||
| 775 | (assoc-ref inputs "patch/libpthread-patch")) | ||
| 776 | #t) | ||
| 777 | ,phases)))) | ||
| 778 | (synopsis "The GNU C Library (GNU Hurd variant)") | ||
| 779 | (supported-systems %hurd-systems))) | ||
| 780 | |||
| 781 | (define-public glibc/hurd-headers | ||
| 782 | (package (inherit glibc/hurd) | ||
| 783 | (name "glibc-hurd-headers") | ||
| 784 | (outputs '("out")) | ||
| 785 | (propagated-inputs `(("gnumach-headers" ,gnumach-headers) | ||
| 786 | ("hurd-headers" ,hurd-headers))) | ||
| 787 | (arguments | ||
| 788 | (substitute-keyword-arguments (package-arguments glibc/hurd) | ||
| 789 | ;; We just pass the flags really needed to build the headers. | ||
| 790 | ((#:configure-flags _) | ||
| 791 | `(list "--enable-add-ons" | ||
| 792 | "--host=i686-pc-gnu" | ||
| 793 | "--enable-obsolete-rpc")) | ||
| 794 | ((#:phases _) | ||
| 795 | '(alist-replace | ||
| 796 | 'install | ||
| 797 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 798 | (and (zero? (system* "make" "install-headers")) | ||
| 799 | |||
| 800 | ;; Make an empty stubs.h to work around not being able to | ||
| 801 | ;; produce a valid stubs.h and causing the build to fail. See | ||
| 802 | ;; <http://lists.gnu.org/archive/html/guix-devel/2014-04/msg00233.html>. | ||
| 803 | (let ((out (assoc-ref outputs "out"))) | ||
| 804 | (close-port | ||
| 805 | (open-output-file | ||
| 806 | (string-append out "/include/gnu/stubs.h")))))) | ||
| 807 | |||
| 808 | ;; Nothing to build. | ||
| 809 | (alist-delete | ||
| 810 | 'build | ||
| 811 | |||
| 812 | (alist-cons-before | ||
| 813 | 'configure 'pre-configure | ||
| 814 | (lambda _ | ||
| 815 | ;; Use the right 'pwd'. | ||
| 816 | (substitute* "configure" | ||
| 817 | (("/bin/pwd") "pwd"))) | ||
| 818 | %standard-phases)))))))) | ||
| 819 | |||
| 703 | (define-public tzdata | 820 | (define-public tzdata |
| 704 | (package | 821 | (package |
| 705 | (name "tzdata") | 822 | (name "tzdata") |
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index 6b2d0b855d8..180c64e8728 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm | |||
| @@ -214,10 +214,10 @@ without modification.") | |||
| 214 | (license gpl3+) | 214 | (license gpl3+) |
| 215 | (home-page "http://www.gnu.org/software/bash/")))) | 215 | (home-page "http://www.gnu.org/software/bash/")))) |
| 216 | 216 | ||
| 217 | (define-public bash-light | 217 | (define-public bash-minimal |
| 218 | ;; A stripped-down Bash for non-interactive use. | 218 | ;; A stripped-down Bash for non-interactive use. |
| 219 | (package (inherit bash) | 219 | (package (inherit bash) |
| 220 | (name "bash-light") | 220 | (name "bash-minimal") |
| 221 | (inputs '()) ; no readline, no curses | 221 | (inputs '()) ; no readline, no curses |
| 222 | (arguments | 222 | (arguments |
| 223 | (let ((args `(#:modules ((guix build gnu-build-system) | 223 | (let ((args `(#:modules ((guix build gnu-build-system) |
| @@ -239,6 +239,28 @@ without modification.") | |||
| 239 | '("bash_cv_job_control_missing=no") | 239 | '("bash_cv_job_control_missing=no") |
| 240 | '())))))))) | 240 | '())))))))) |
| 241 | 241 | ||
| 242 | (define-public static-bash | ||
| 243 | ;; Statically-linked Bash that contains nothing but the 'bash' binary and | ||
| 244 | ;; 'sh' symlink, without any reference. | ||
| 245 | (let ((bash (static-package bash-minimal))) | ||
| 246 | (package | ||
| 247 | (inherit bash) | ||
| 248 | (name "bash-static") | ||
| 249 | (arguments | ||
| 250 | (substitute-keyword-arguments | ||
| 251 | `(#:allowed-references ("out") ,@(package-arguments bash)) | ||
| 252 | ((#:phases phases) | ||
| 253 | `(alist-cons-after | ||
| 254 | 'strip 'remove-everything-but-the-binary | ||
| 255 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 256 | (let* ((out (assoc-ref outputs "out")) | ||
| 257 | (bin (string-append out "/bin"))) | ||
| 258 | (remove-store-references (string-append bin "/bash")) | ||
| 259 | (delete-file (string-append bin "/bashbug")) | ||
| 260 | (delete-file-recursively (string-append out "/share")) | ||
| 261 | #t)) | ||
| 262 | ,phases))))))) | ||
| 263 | |||
| 242 | (define-public bash-completion | 264 | (define-public bash-completion |
| 243 | (package | 265 | (package |
| 244 | (name "bash-completion") | 266 | (name "bash-completion") |
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index e647186ab3f..8fc6142f19a 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm | |||
| @@ -233,9 +233,8 @@ computational cluster.") | |||
| 233 | 'install | 233 | 'install |
| 234 | (lambda* (#:key outputs #:allow-other-keys) | 234 | (lambda* (#:key outputs #:allow-other-keys) |
| 235 | (let ((bin (string-append (assoc-ref outputs "out") "/bin/"))) | 235 | (let ((bin (string-append (assoc-ref outputs "out") "/bin/"))) |
| 236 | (mkdir-p bin) | ||
| 237 | (for-each (lambda (file) | 236 | (for-each (lambda (file) |
| 238 | (copy-file file (string-append bin (basename file)))) | 237 | (install-file file bin)) |
| 239 | (find-files "bin" ".*")))) | 238 | (find-files "bin" ".*")))) |
| 240 | %standard-phases))))) | 239 | %standard-phases))))) |
| 241 | (home-page "https://github.com/arq5x/bedtools2") | 240 | (home-page "https://github.com/arq5x/bedtools2") |
| @@ -559,9 +558,8 @@ confidence to have in an alignment.") | |||
| 559 | 'install | 558 | 'install |
| 560 | (lambda* (#:key outputs #:allow-other-keys) | 559 | (lambda* (#:key outputs #:allow-other-keys) |
| 561 | (let ((bin (string-append (assoc-ref outputs "out") "/bin/"))) | 560 | (let ((bin (string-append (assoc-ref outputs "out") "/bin/"))) |
| 562 | (mkdir-p bin) | ||
| 563 | (for-each (lambda (file) | 561 | (for-each (lambda (file) |
| 564 | (copy-file file (string-append bin file))) | 562 | (install-file file bin)) |
| 565 | (find-files "." "bowtie2.*")))) | 563 | (find-files "." "bowtie2.*")))) |
| 566 | (alist-replace | 564 | (alist-replace |
| 567 | 'check | 565 | 'check |
| @@ -611,9 +609,9 @@ gapped, local, and paired-end alignment modes.") | |||
| 611 | (mkdir-p bin) | 609 | (mkdir-p bin) |
| 612 | (mkdir-p doc) | 610 | (mkdir-p doc) |
| 613 | (mkdir-p man) | 611 | (mkdir-p man) |
| 614 | (copy-file "bwa" (string-append bin "/bwa")) | 612 | (install-file "bwa" bin) |
| 615 | (copy-file "README.md" (string-append doc "/README.md")) | 613 | (install-file "README.md" doc) |
| 616 | (copy-file "bwa.1" (string-append man "/bwa.1")))) | 614 | (install-file "bwa.1" man))) |
| 617 | ;; no "configure" script | 615 | ;; no "configure" script |
| 618 | (alist-delete 'configure %standard-phases)))) | 616 | (alist-delete 'configure %standard-phases)))) |
| 619 | (inputs `(("zlib" ,zlib))) | 617 | (inputs `(("zlib" ,zlib))) |
| @@ -1308,14 +1306,12 @@ estimates transcript expression.") | |||
| 1308 | (alist-replace | 1306 | (alist-replace |
| 1309 | 'install | 1307 | 'install |
| 1310 | (lambda* (#:key outputs #:allow-other-keys) | 1308 | (lambda* (#:key outputs #:allow-other-keys) |
| 1311 | (let ((bin (string-append (assoc-ref outputs "out") "/bin/"))) | 1309 | (let ((bin (string-append (assoc-ref outputs "out") "/bi/"))) |
| 1312 | (mkdir-p bin) | 1310 | (for-each (lambda (file) |
| 1313 | (for-each | 1311 | (install-file file bin)) |
| 1314 | (lambda (file) | 1312 | (find-files |
| 1315 | (copy-file file (string-append bin file))) | 1313 | "." |
| 1316 | (find-files | 1314 | "hisat(-(build|align|inspect)(-(s|l)(-debug)*)*)*$")))) |
| 1317 | "." | ||
| 1318 | "hisat(-(build|align|inspect)(-(s|l)(-debug)*)*)*$")))) | ||
| 1319 | (alist-delete 'configure %standard-phases))))) | 1315 | (alist-delete 'configure %standard-phases))))) |
| 1320 | (native-inputs | 1316 | (native-inputs |
| 1321 | `(("unzip" ,unzip))) | 1317 | `(("unzip" ,unzip))) |
| @@ -2091,17 +2087,14 @@ distribution, coverage uniformity, strand specificity, etc.") | |||
| 2091 | 'install 'install-library | 2087 | 'install 'install-library |
| 2092 | (lambda* (#:key outputs #:allow-other-keys) | 2088 | (lambda* (#:key outputs #:allow-other-keys) |
| 2093 | (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) | 2089 | (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) |
| 2094 | (mkdir-p lib) | 2090 | (install-file "libbam.a" lib))) |
| 2095 | (copy-file "libbam.a" (string-append lib "/libbam.a")))) | ||
| 2096 | (alist-cons-after | 2091 | (alist-cons-after |
| 2097 | 'install 'install-headers | 2092 | 'install 'install-headers |
| 2098 | (lambda* (#:key outputs #:allow-other-keys) | 2093 | (lambda* (#:key outputs #:allow-other-keys) |
| 2099 | (let ((include (string-append (assoc-ref outputs "out") | 2094 | (let ((include (string-append (assoc-ref outputs "out") |
| 2100 | "/include/samtools/"))) | 2095 | "/include/samtools/"))) |
| 2101 | (mkdir-p include) | ||
| 2102 | (for-each (lambda (file) | 2096 | (for-each (lambda (file) |
| 2103 | (copy-file file (string-append include | 2097 | (install-file file include)) |
| 2104 | (basename file)))) | ||
| 2105 | (scandir "." (lambda (name) (string-match "\\.h$" name)))) | 2098 | (scandir "." (lambda (name) (string-match "\\.h$" name)))) |
| 2106 | #t)) | 2099 | #t)) |
| 2107 | (alist-delete 'configure %standard-phases)))))) | 2100 | (alist-delete 'configure %standard-phases)))))) |
| @@ -2356,8 +2349,7 @@ accessed/downloaded on demand across HTTP.") | |||
| 2356 | (lambda* (#:key outputs #:allow-other-keys) | 2349 | (lambda* (#:key outputs #:allow-other-keys) |
| 2357 | (let ((bin (string-append (assoc-ref outputs "out") | 2350 | (let ((bin (string-append (assoc-ref outputs "out") |
| 2358 | "/bin/"))) | 2351 | "/bin/"))) |
| 2359 | (mkdir-p bin) | 2352 | (install-file "plink" bin) |
| 2360 | (copy-file "plink" (string-append bin "plink")) | ||
| 2361 | #t)))))) | 2353 | #t)))))) |
| 2362 | (inputs | 2354 | (inputs |
| 2363 | `(("zlib" ,zlib) | 2355 | `(("zlib" ,zlib) |
| @@ -2617,8 +2609,7 @@ is one that takes arguments.") | |||
| 2617 | 'install | 2609 | 'install |
| 2618 | (lambda* (#:key outputs #:allow-other-keys) | 2610 | (lambda* (#:key outputs #:allow-other-keys) |
| 2619 | (let ((bin (string-append (assoc-ref outputs "out") "/bin/"))) | 2611 | (let ((bin (string-append (assoc-ref outputs "out") "/bin/"))) |
| 2620 | (mkdir-p bin) | 2612 | (install-file "STAR" bin))) |
| 2621 | (copy-file "STAR" (string-append bin "STAR")))) | ||
| 2622 | (alist-delete | 2613 | (alist-delete |
| 2623 | 'configure %standard-phases))))) | 2614 | 'configure %standard-phases))))) |
| 2624 | (native-inputs | 2615 | (native-inputs |
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm index bd9bce8a269..f5bf069c207 100644 --- a/gnu/packages/bootstrap.scm +++ b/gnu/packages/bootstrap.scm | |||
| @@ -164,6 +164,8 @@ successful, or false to signal an error." | |||
| 164 | ((string=? system "i686-linux") "/lib/ld-linux.so.2") | 164 | ((string=? system "i686-linux") "/lib/ld-linux.so.2") |
| 165 | ((string=? system "armhf-linux") "/lib/ld-linux-armhf.so.3") | 165 | ((string=? system "armhf-linux") "/lib/ld-linux-armhf.so.3") |
| 166 | ((string=? system "mips64el-linux") "/lib/ld.so.1") | 166 | ((string=? system "mips64el-linux") "/lib/ld.so.1") |
| 167 | ((string=? system "i586-gnu") "/lib/ld.so.1") | ||
| 168 | ((string=? system "i686-gnu") "/lib/ld.so.1") | ||
| 167 | 169 | ||
| 168 | ;; XXX: This one is used bare-bones, without a libc, so add a case | 170 | ;; XXX: This one is used bare-bones, without a libc, so add a case |
| 169 | ;; here just so we can keep going. | 171 | ;; here just so we can keep going. |
diff --git a/gnu/packages/certs.scm b/gnu/packages/certs.scm index 0f5a105755e..dd7d3397941 100644 --- a/gnu/packages/certs.scm +++ b/gnu/packages/certs.scm | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #:use-module (gnu packages) | 26 | #:use-module (gnu packages) |
| 27 | #:use-module (gnu packages gnuzilla) | 27 | #:use-module (gnu packages gnuzilla) |
| 28 | #:use-module (gnu packages python) | 28 | #:use-module (gnu packages python) |
| 29 | #:use-module (gnu packages perl) | ||
| 29 | #:use-module (gnu packages tls)) | 30 | #:use-module (gnu packages tls)) |
| 30 | 31 | ||
| 31 | (define certdata2pem | 32 | (define certdata2pem |
| @@ -76,7 +77,8 @@ | |||
| 76 | (outputs '("out")) | 77 | (outputs '("out")) |
| 77 | (native-inputs | 78 | (native-inputs |
| 78 | `(("certdata2pem" ,certdata2pem) | 79 | `(("certdata2pem" ,certdata2pem) |
| 79 | ("openssl" ,openssl))) | 80 | ("openssl" ,openssl) |
| 81 | ("perl" ,perl))) ;for OpenSSL's 'c_rehash' | ||
| 80 | (inputs '()) | 82 | (inputs '()) |
| 81 | (propagated-inputs '()) | 83 | (propagated-inputs '()) |
| 82 | (arguments | 84 | (arguments |
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index e0ee7c4d4f5..3b7a243ba7f 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm | |||
| @@ -136,10 +136,9 @@ supervised tests.") | |||
| 136 | ,version))) | 136 | ,version))) |
| 137 | (begin | 137 | (begin |
| 138 | (for-each mkdir-p (list incdir docdir)) | 138 | (for-each mkdir-p (list incdir docdir)) |
| 139 | (copy-file (string-append source | 139 | (install-file (string-append source |
| 140 | "/single_include/catch.hpp") | 140 | "/single_include/catch.hpp") |
| 141 | (string-append incdir | 141 | incdir) |
| 142 | "/catch.hpp")) | ||
| 143 | (copy-recursively (string-append source "/docs") | 142 | (copy-recursively (string-append source "/docs") |
| 144 | docdir)))))) | 143 | docdir)))))) |
| 145 | (home-page "http://catch-lib.net/") | 144 | (home-page "http://catch-lib.net/") |
diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm index 6f8b9f67e37..128f0370dd9 100644 --- a/gnu/packages/cmake.scm +++ b/gnu/packages/cmake.scm | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | (define-public cmake | 36 | (define-public cmake |
| 37 | (package | 37 | (package |
| 38 | (name "cmake") | 38 | (name "cmake") |
| 39 | (version "3.2.2") | 39 | (version "3.3.1") |
| 40 | (source (origin | 40 | (source (origin |
| 41 | (method url-fetch) | 41 | (method url-fetch) |
| 42 | (uri (string-append | 42 | (uri (string-append |
| @@ -44,12 +44,11 @@ | |||
| 44 | (version-major+minor version) | 44 | (version-major+minor version) |
| 45 | "/cmake-" version ".tar.gz")) | 45 | "/cmake-" version ".tar.gz")) |
| 46 | (sha256 | 46 | (sha256 |
| 47 | (base32 "0y3w83al0vh9ll7fnqm3nx7l8hsl85k8iv9abxb791q36rp4xsdd")) | 47 | (base32 "1mp32dqywk4dfw7zmpgp31axszv7h74yk69g273z21q7d8n04rfd")) |
| 48 | (patches (list (search-patch "cmake-fix-tests.patch"))))) | 48 | (patches (list (search-patch "cmake-fix-tests.patch"))))) |
| 49 | (build-system gnu-build-system) | 49 | (build-system gnu-build-system) |
| 50 | (arguments | 50 | (arguments |
| 51 | `(#:test-target "test" | 51 | `(#:test-target "test" |
| 52 | #:parallel-tests? #f ; 3 test from RunCMake fails | ||
| 53 | #:phases (alist-cons-before | 52 | #:phases (alist-cons-before |
| 54 | 'configure 'patch-bin-sh | 53 | 'configure 'patch-bin-sh |
| 55 | (lambda _ | 54 | (lambda _ |
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm index e346f7e0c5d..ece86a9ed58 100644 --- a/gnu/packages/code.scm +++ b/gnu/packages/code.scm | |||
| @@ -117,9 +117,8 @@ highlighting your own code that seemed comprehensible when you wrote it.") | |||
| 117 | (let* ((out (assoc-ref outputs "out")) | 117 | (let* ((out (assoc-ref outputs "out")) |
| 118 | (data (string-append out "/share/gtags")) | 118 | (data (string-append out "/share/gtags")) |
| 119 | (lisp (string-append out "/share/emacs/site-lisp"))) | 119 | (lisp (string-append out "/share/emacs/site-lisp"))) |
| 120 | (mkdir-p lisp) | 120 | (install-file (string-append data "/gtags.el") |
| 121 | (copy-file (string-append data "/gtags.el") | 121 | lisp) |
| 122 | (string-append lisp "/gtags.el")) | ||
| 123 | (delete-file (string-append data "/gtags.el")) | 122 | (delete-file (string-append data "/gtags.el")) |
| 124 | #t)) | 123 | #t)) |
| 125 | %standard-phases))) | 124 | %standard-phases))) |
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 74c3f304af3..56c4cefaf9a 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm | |||
| @@ -419,18 +419,17 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" | |||
| 419 | #:guile %bootstrap-guile)))) | 419 | #:guile %bootstrap-guile)))) |
| 420 | 420 | ||
| 421 | (define static-bash-for-glibc | 421 | (define static-bash-for-glibc |
| 422 | ;; A statically-linked Bash to be embedded in GLIBC-FINAL, for use by | 422 | ;; A statically-linked Bash to be used by GLIBC-FINAL in system(3) & co. |
| 423 | ;; system(3) & co. | ||
| 424 | (let* ((gcc (cross-gcc-wrapper gcc-boot0 binutils-boot0 | 423 | (let* ((gcc (cross-gcc-wrapper gcc-boot0 binutils-boot0 |
| 425 | glibc-final-with-bootstrap-bash | 424 | glibc-final-with-bootstrap-bash |
| 426 | (car (assoc-ref %boot1-inputs "bash")))) | 425 | (car (assoc-ref %boot1-inputs "bash")))) |
| 427 | (bash (package (inherit bash-light) | 426 | (bash (package (inherit static-bash) |
| 428 | (native-inputs `(("bison" ,bison-boot1))) | 427 | (native-inputs `(("bison" ,bison-boot1))) |
| 429 | (arguments | 428 | (arguments |
| 430 | `(#:guile ,%bootstrap-guile | 429 | `(#:guile ,%bootstrap-guile |
| 431 | ,@(package-arguments bash-light)))))) | 430 | ,@(package-arguments static-bash)))))) |
| 432 | (package-with-bootstrap-guile | 431 | (package-with-bootstrap-guile |
| 433 | (package-with-explicit-inputs (static-package bash) | 432 | (package-with-explicit-inputs bash |
| 434 | `(("gcc" ,gcc) | 433 | `(("gcc" ,gcc) |
| 435 | ("libc" ,glibc-final-with-bootstrap-bash) | 434 | ("libc" ,glibc-final-with-bootstrap-bash) |
| 436 | ,@(fold alist-delete %boot1-inputs | 435 | ,@(fold alist-delete %boot1-inputs |
| @@ -490,6 +489,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" | |||
| 490 | (arguments | 489 | (arguments |
| 491 | `(#:allowed-references | 490 | `(#:allowed-references |
| 492 | ,(cons* `(,gcc-boot0 "lib") (linux-libre-headers-boot0) | 491 | ,(cons* `(,gcc-boot0 "lib") (linux-libre-headers-boot0) |
| 492 | static-bash-for-glibc | ||
| 493 | (package-outputs glibc-final-with-bootstrap-bash)) | 493 | (package-outputs glibc-final-with-bootstrap-bash)) |
| 494 | 494 | ||
| 495 | ,@(package-arguments glibc-final-with-bootstrap-bash))))) | 495 | ,@(package-arguments glibc-final-with-bootstrap-bash))))) |
| @@ -562,7 +562,8 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" | |||
| 562 | `(#:guile ,%bootstrap-guile | 562 | `(#:guile ,%bootstrap-guile |
| 563 | #:implicit-inputs? #f | 563 | #:implicit-inputs? #f |
| 564 | 564 | ||
| 565 | #:allowed-references ("out" "lib" ,glibc-final) | 565 | #:allowed-references ("out" "lib" |
| 566 | ,glibc-final ,static-bash-for-glibc) | ||
| 566 | 567 | ||
| 567 | ;; Things like libasan.so and libstdc++.so NEED ld.so for some | 568 | ;; Things like libasan.so and libstdc++.so NEED ld.so for some |
| 568 | ;; reason, but it is not in their RUNPATH. This is a false | 569 | ;; reason, but it is not in their RUNPATH. This is a false |
| @@ -596,8 +597,12 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" | |||
| 596 | ((#:phases phases) | 597 | ((#:phases phases) |
| 597 | `(alist-delete 'symlink-libgcc_eh ,phases))))) | 598 | `(alist-delete 'symlink-libgcc_eh ,phases))))) |
| 598 | 599 | ||
| 599 | ;; This time we want Texinfo, so we get the manual. | 600 | ;; This time we want Texinfo, so we get the manual. Add |
| 601 | ;; STATIC-BASH-FOR-GLIBC so that it's used in the final shebangs of | ||
| 602 | ;; scripts such as 'mkheaders' and 'fixinc.sh' (XXX: who cares about these | ||
| 603 | ;; scripts?). | ||
| 600 | (native-inputs `(("texinfo" ,texinfo-boot0) | 604 | (native-inputs `(("texinfo" ,texinfo-boot0) |
| 605 | ("static-bash" ,static-bash-for-glibc) | ||
| 601 | ,@(package-native-inputs gcc-boot0))) | 606 | ,@(package-native-inputs gcc-boot0))) |
| 602 | 607 | ||
| 603 | (inputs `(("gmp-source" ,(bootstrap-origin (package-source gmp))) | 608 | (inputs `(("gmp-source" ,(bootstrap-origin (package-source gmp))) |
| @@ -655,10 +660,90 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" | |||
| 655 | (current-source-location) | 660 | (current-source-location) |
| 656 | #:guile %bootstrap-guile)))))) | 661 | #:guile %bootstrap-guile)))))) |
| 657 | 662 | ||
| 663 | (define (locale-proof-package p) | ||
| 664 | "Return a new package based on P that ignores 'LOCPATH'. The result is a | ||
| 665 | \"locale-proof\" package in the sense that it cannot end up loading locale | ||
| 666 | data that is not in the format its libc expects. This is useful because the | ||
| 667 | locale binary format may change incompatibly between libc versions." | ||
| 668 | (package | ||
| 669 | (inherit p) | ||
| 670 | (name (string-append (package-name p) "-lp")) | ||
| 671 | (build-system trivial-build-system) | ||
| 672 | (inputs `(("original" ,p) | ||
| 673 | ("bash" ,bash-final))) | ||
| 674 | (outputs '("out")) | ||
| 675 | (arguments | ||
| 676 | '(#:modules ((guix build utils)) | ||
| 677 | #:builder | ||
| 678 | (begin | ||
| 679 | (use-modules (guix build utils)) | ||
| 680 | |||
| 681 | (let* ((out (assoc-ref %outputs "out")) | ||
| 682 | (bin (string-append out "/bin")) | ||
| 683 | (bash (assoc-ref %build-inputs "bash")) | ||
| 684 | (binaries (assoc-ref %build-inputs "original")) | ||
| 685 | (programs (find-files (string-append binaries "/bin")))) | ||
| 686 | (define (wrap-program program) | ||
| 687 | (let ((base (basename program))) | ||
| 688 | (call-with-output-file base | ||
| 689 | (lambda (port) | ||
| 690 | (format port "#!~a/bin/sh | ||
| 691 | # Unset 'LOCPATH' so that the program does not end up loading incompatible | ||
| 692 | # locale data. | ||
| 693 | unset LOCPATH | ||
| 694 | exec \"~a\" \"$@\"\n" | ||
| 695 | bash program))) | ||
| 696 | (chmod base #o755))) | ||
| 697 | |||
| 698 | (mkdir-p bin) | ||
| 699 | (with-directory-excursion bin | ||
| 700 | (for-each wrap-program programs) | ||
| 701 | #t))))))) | ||
| 702 | |||
| 703 | (define-public ld-wrapper | ||
| 704 | ;; The final 'ld' wrapper, which uses the final Guile and Binutils. | ||
| 705 | (package (inherit ld-wrapper-boot3) | ||
| 706 | (name "ld-wrapper") | ||
| 707 | (inputs `(("guile" ,guile-final) | ||
| 708 | ("bash" ,bash-final) | ||
| 709 | ,@(fold alist-delete (package-inputs ld-wrapper-boot3) | ||
| 710 | '("guile" "bash")))))) | ||
| 711 | |||
| 658 | (define %boot5-inputs | 712 | (define %boot5-inputs |
| 659 | ;; Now with UTF-8 locale. | 713 | ;; Now with UTF-8 locales. Since the locale binary format differs between |
| 660 | `(("locales" ,glibc-utf8-locales-final) | 714 | ;; libc versions, we have to rebuild some of the packages so that they use |
| 661 | ,@%boot4-inputs)) | 715 | ;; the new libc, which allows them to load locale data from |
| 716 | ;; GLIBC-UTF8-LOCALES-FINAL (remember that the bootstrap binaries were built | ||
| 717 | ;; with an older libc, which cannot load the new locale format.) See | ||
| 718 | ;; <https://lists.gnu.org/archive/html/guix-devel/2015-08/msg00737.html>. | ||
| 719 | (let ((new-libc-package (compose package-with-bootstrap-guile | ||
| 720 | (cut package-with-explicit-inputs <> | ||
| 721 | %boot4-inputs | ||
| 722 | (current-source-location) | ||
| 723 | #:guile %bootstrap-guile)))) | ||
| 724 | `(("locales" ,glibc-utf8-locales-final) | ||
| 725 | ("ld-wrapper" ,ld-wrapper) | ||
| 726 | ("binutils" ,binutils-final) | ||
| 727 | ("bash" ,bash-final) | ||
| 728 | ("make" ,(new-libc-package gnu-make)) | ||
| 729 | |||
| 730 | ;; Some test suites (grep, Gnulib) use 'diff' to compare files in locale | ||
| 731 | ;; encoding, so we need support this. | ||
| 732 | ("diffutils" ,(new-libc-package diffutils)) | ||
| 733 | ("findutils" ,(new-libc-package findutils)) | ||
| 734 | |||
| 735 | ;; Grep's test suite uses 'timeout' from Coreutils to execute command, | ||
| 736 | ;; and yet these commands need to see the valid 'LOCPATH'. | ||
| 737 | ("coreutils" ,(new-libc-package coreutils-minimal)) | ||
| 738 | |||
| 739 | ;; We just wrap the remaining binaries (tar, gzip, xz, etc.) so that | ||
| 740 | ;; they ignore 'LOCPATH' (if they did not, they would be hit by an | ||
| 741 | ;; assertion failure in loadlocale.c.) | ||
| 742 | ("coreutils&co" ,(locale-proof-package %bootstrap-coreutils&co)) | ||
| 743 | |||
| 744 | ,@(fold alist-delete %boot4-inputs | ||
| 745 | '("coreutils&co" "findutils" "diffutils" "make" | ||
| 746 | "bash" "binutils-cross" "ld-wrapper"))))) | ||
| 662 | 747 | ||
| 663 | (define gnu-make-final | 748 | (define gnu-make-final |
| 664 | ;; The final GNU Make, which uses the final Guile. | 749 | ;; The final GNU Make, which uses the final Guile. |
| @@ -668,15 +753,6 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" | |||
| 668 | ,@%boot5-inputs) | 753 | ,@%boot5-inputs) |
| 669 | (current-source-location)))) | 754 | (current-source-location)))) |
| 670 | 755 | ||
| 671 | (define-public ld-wrapper | ||
| 672 | ;; The final `ld' wrapper, which uses the final Guile. | ||
| 673 | (package (inherit ld-wrapper-boot3) | ||
| 674 | (name "ld-wrapper") | ||
| 675 | (inputs `(("guile" ,guile-final) | ||
| 676 | ("bash" ,bash-final) | ||
| 677 | ,@(fold alist-delete (package-inputs ld-wrapper-boot3) | ||
| 678 | '("guile" "bash")))))) | ||
| 679 | |||
| 680 | (define coreutils-final | 756 | (define coreutils-final |
| 681 | ;; The final Coreutils. Treat them specially because some packages, such as | 757 | ;; The final Coreutils. Treat them specially because some packages, such as |
| 682 | ;; Findutils, keep a reference to the Coreutils they were built with. | 758 | ;; Findutils, keep a reference to the Coreutils they were built with. |
| @@ -791,14 +867,6 @@ COREUTILS-FINAL vs. COREUTILS, etc." | |||
| 791 | (((names . directories) ...) | 867 | (((names . directories) ...) |
| 792 | (union-build out directories))) | 868 | (union-build out directories))) |
| 793 | 869 | ||
| 794 | ;; Remove the 'sh' and 'bash' binaries that come with | ||
| 795 | ;; libc to avoid polluting the user's profile (these are | ||
| 796 | ;; statically-linked binaries with no locale support and | ||
| 797 | ;; so on.) | ||
| 798 | (for-each (lambda (file) | ||
| 799 | (delete-file (string-append out "/bin/" file))) | ||
| 800 | '("sh" "bash")) | ||
| 801 | |||
| 802 | (union-build (assoc-ref %outputs "debug") | 870 | (union-build (assoc-ref %outputs "debug") |
| 803 | (list (assoc-ref %build-inputs | 871 | (list (assoc-ref %build-inputs |
| 804 | "libc-debug"))))))) | 872 | "libc-debug"))))))) |
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 9a5c4e9a8d2..fbe5ba484ea 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm | |||
| @@ -253,7 +253,7 @@ than gzip and 15 % smaller output than bzip2.") | |||
| 253 | (define-public lzo | 253 | (define-public lzo |
| 254 | (package | 254 | (package |
| 255 | (name "lzo") | 255 | (name "lzo") |
| 256 | (version "2.06") | 256 | (version "2.09") |
| 257 | (source | 257 | (source |
| 258 | (origin | 258 | (origin |
| 259 | (method url-fetch) | 259 | (method url-fetch) |
| @@ -261,7 +261,7 @@ than gzip and 15 % smaller output than bzip2.") | |||
| 261 | version ".tar.gz")) | 261 | version ".tar.gz")) |
| 262 | (sha256 | 262 | (sha256 |
| 263 | (base32 | 263 | (base32 |
| 264 | "0wryshs446s7cclrbjykyj766znhcpnr7s3cxy33ybfn6vwfcygz")))) | 264 | "0k5kpj3jnsjfxqqkblpfpx0mqcy86zs5fhjhgh2kq1hksg7ag57j")))) |
| 265 | (build-system gnu-build-system) | 265 | (build-system gnu-build-system) |
| 266 | (arguments '(#:configure-flags '("--enable-shared"))) | 266 | (arguments '(#:configure-flags '("--enable-shared"))) |
| 267 | (home-page "http://www.oberhumer.com/opensource/lzo") | 267 | (home-page "http://www.oberhumer.com/opensource/lzo") |
diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index da085ee8978..9dcb75ad910 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | (define-public cups-filters | 37 | (define-public cups-filters |
| 38 | (package | 38 | (package |
| 39 | (name "cups-filters") | 39 | (name "cups-filters") |
| 40 | (version "1.0.71") | 40 | (version "1.0.75") |
| 41 | (source (origin | 41 | (source (origin |
| 42 | (method url-fetch) | 42 | (method url-fetch) |
| 43 | (uri | 43 | (uri |
| @@ -45,7 +45,7 @@ | |||
| 45 | "cups-filters-" version ".tar.xz")) | 45 | "cups-filters-" version ".tar.xz")) |
| 46 | (sha256 | 46 | (sha256 |
| 47 | (base32 | 47 | (base32 |
| 48 | "07wwlqcykfjfqcwj1bxk60ggahyaw7wcx32n5s104d1qkhham01i")) | 48 | "0wrh9jmd2rm4z8c8nb50llb10shj1hik9vwqnr0djcvf63mfqsbw")) |
| 49 | (modules '((guix build utils))) | 49 | (modules '((guix build utils))) |
| 50 | (snippet | 50 | (snippet |
| 51 | ;; install backends, banners and filters to cups-filters output | 51 | ;; install backends, banners and filters to cups-filters output |
| @@ -71,7 +71,8 @@ | |||
| 71 | ,(string-append "--with-rcdir=" | 71 | ,(string-append "--with-rcdir=" |
| 72 | (assoc-ref %outputs "out") "/etc/rc.d")))) | 72 | (assoc-ref %outputs "out") "/etc/rc.d")))) |
| 73 | (native-inputs | 73 | (native-inputs |
| 74 | `(("pkg-config" ,pkg-config))) | 74 | `(("glib" ,glib "bin") ; for gdbus-codegen |
| 75 | ("pkg-config" ,pkg-config))) | ||
| 75 | (inputs | 76 | (inputs |
| 76 | `(("fontconfig" ,fontconfig) | 77 | `(("fontconfig" ,fontconfig) |
| 77 | ("freetype" ,freetype) | 78 | ("freetype" ,freetype) |
| @@ -109,14 +110,14 @@ filters for the PDF-centric printing workflow introduced by OpenPrinting.") | |||
| 109 | (define-public cups-minimal | 110 | (define-public cups-minimal |
| 110 | (package | 111 | (package |
| 111 | (name "cups-minimal") | 112 | (name "cups-minimal") |
| 112 | (version "2.0.3") | 113 | (version "2.1.0") |
| 113 | (source (origin | 114 | (source (origin |
| 114 | (method url-fetch) | 115 | (method url-fetch) |
| 115 | (uri (string-append "http://www.cups.org/software/" | 116 | (uri (string-append "http://www.cups.org/software/" |
| 116 | version "/cups-" version "-source.tar.gz")) | 117 | version "/cups-" version "-source.tar.bz2")) |
| 117 | (sha256 | 118 | (sha256 |
| 118 | (base32 | 119 | (base32 |
| 119 | "1kq1kpny0hghqgbjvashlv6qw1xn0c1p3d4r3cx8qxdzd2ifk4lf")))) | 120 | "1jfjqsw9l7jbn5kb9i96k0wj12kjdbgx0rd8157dif22hi0kh0ms")))) |
| 120 | (build-system gnu-build-system) | 121 | (build-system gnu-build-system) |
| 121 | (arguments | 122 | (arguments |
| 122 | `(#:configure-flags | 123 | `(#:configure-flags |
diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm index 4523d529e7b..f7c9f083b7d 100644 --- a/gnu/packages/curl.scm +++ b/gnu/packages/curl.scm | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr> | 2 | ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr> |
| 3 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> | 3 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> |
| 4 | ;;; Copyright © 2015 Tomáš Čech <sleep_walker@suse.cz> | 4 | ;;; Copyright © 2015 Tomáš Čech <sleep_walker@suse.cz> |
| 5 | ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> | ||
| 5 | ;;; | 6 | ;;; |
| 6 | ;;; This file is part of GNU Guix. | 7 | ;;; This file is part of GNU Guix. |
| 7 | ;;; | 8 | ;;; |
| @@ -47,6 +48,8 @@ | |||
| 47 | (base32 | 48 | (base32 |
| 48 | "0gjnaav9vmwwwza451na1643br7i0kxgd4002pwqh3xk5ywvdap7")))) | 49 | "0gjnaav9vmwwwza451na1643br7i0kxgd4002pwqh3xk5ywvdap7")))) |
| 49 | (build-system gnu-build-system) | 50 | (build-system gnu-build-system) |
| 51 | (outputs '("out" | ||
| 52 | "doc")) ;1.2 MiB of man3 pages | ||
| 50 | (inputs `(("gnutls" ,gnutls) | 53 | (inputs `(("gnutls" ,gnutls) |
| 51 | ("gss" ,gss) | 54 | ("gss" ,gss) |
| 52 | ("libidn" ,libidn) | 55 | ("libidn" ,libidn) |
| @@ -63,40 +66,50 @@ | |||
| 63 | `(#:configure-flags '("--with-gnutls" "--with-gssapi") | 66 | `(#:configure-flags '("--with-gnutls" "--with-gssapi") |
| 64 | ;; Add a phase to patch '/bin/sh' occurances in tests/runtests.pl | 67 | ;; Add a phase to patch '/bin/sh' occurances in tests/runtests.pl |
| 65 | #:phases | 68 | #:phases |
| 66 | (alist-replace | 69 | (modify-phases %standard-phases |
| 67 | 'check | 70 | (add-after |
| 68 | (lambda _ | 71 | 'install 'move-man3-pages |
| 69 | (substitute* "tests/runtests.pl" | 72 | (lambda* (#:key outputs #:allow-other-keys) |
| 70 | (("/bin/sh") (which "sh"))) | 73 | ;; Move section 3 man pages to "doc". |
| 71 | ;; Test #1135 requires extern-scan.pl, which is not part of the | 74 | (let ((out (assoc-ref outputs "out")) |
| 72 | ;; tarball due to a mistake. It has been fixed upstream. We can | 75 | (doc (assoc-ref outputs "doc"))) |
| 73 | ;; simply disable the test as it is specific to VMS and OS/400. | 76 | (mkdir-p (string-append doc "/share/man")) |
| 74 | (delete-file "tests/data/test1135") | 77 | (rename-file (string-append out "/share/man/man3") |
| 78 | (string-append doc "/share/man/man3")) | ||
| 79 | #t))) | ||
| 80 | (replace | ||
| 81 | 'check | ||
| 82 | (lambda _ | ||
| 83 | (substitute* "tests/runtests.pl" | ||
| 84 | (("/bin/sh") (which "sh"))) | ||
| 85 | ;; Test #1135 requires extern-scan.pl, which is not part of the | ||
| 86 | ;; tarball due to a mistake. It has been fixed upstream. We can | ||
| 87 | ;; simply disable the test as it is specific to VMS and OS/400. | ||
| 88 | (delete-file "tests/data/test1135") | ||
| 75 | 89 | ||
| 76 | ;; XXX FIXME: Test #1510 seems to work on some machines and not | 90 | ;; XXX FIXME: Test #1510 seems to work on some machines and not |
| 77 | ;; others, possibly based on the kernel version. It works on GuixSD | 91 | ;; others, possibly based on the kernel version. It works on GuixSD |
| 78 | ;; on x86_64 with linux-libre-4.1, but fails on Hydra for both i686 | 92 | ;; on x86_64 with linux-libre-4.1, but fails on Hydra for both i686 |
| 79 | ;; and x86_64 with the following error: | 93 | ;; and x86_64 with the following error: |
| 80 | ;; | 94 | ;; |
| 81 | ;; test 1510...[HTTP GET connection cache limit (CURLOPT_MAXCONNECTS)] | 95 | ;; test 1510...[HTTP GET connection cache limit (CURLOPT_MAXCONNECTS)] |
| 82 | ;; | 96 | ;; |
| 83 | ;; 1510: output (log/stderr1510) FAILED: | 97 | ;; 1510: output (log/stderr1510) FAILED: |
| 84 | ;; --- log/check-expected 2015-06-27 07:45:53.166720834 +0000 | 98 | ;; --- log/check-expected 2015-06-27 07:45:53.166720834 +0000 |
| 85 | ;; +++ log/check-generated 2015-06-27 07:45:53.166720834 +0000 | 99 | ;; +++ log/check-generated 2015-06-27 07:45:53.166720834 +0000 |
| 86 | ;; @@ -1,5 +1,5 @@ | 100 | ;; @@ -1,5 +1,5 @@ |
| 87 | ;; * Connection #0 to host server1.example.com left intact[LF] | 101 | ;; * Connection #0 to host server1.example.com left intact[LF] |
| 88 | ;; * Connection #1 to host server2.example.com left intact[LF] | 102 | ;; * Connection #1 to host server2.example.com left intact[LF] |
| 89 | ;; * Connection #2 to host server3.example.com left intact[LF] | 103 | ;; * Connection #2 to host server3.example.com left intact[LF] |
| 90 | ;; -* Closing connection 0[LF] | 104 | ;; -* Closing connection 0[LF] |
| 91 | ;; +* Closing connection 1[LF] | 105 | ;; +* Closing connection 1[LF] |
| 92 | ;; * Connection #3 to host server4.example.com left intact[LF] | 106 | ;; * Connection #3 to host server4.example.com left intact[LF] |
| 93 | (delete-file "tests/data/test1510") | 107 | (delete-file "tests/data/test1510") |
| 94 | 108 | ||
| 95 | ;; The top-level "make check" does "make -C tests quiet-test", which | 109 | ;; The top-level "make check" does "make -C tests quiet-test", which |
| 96 | ;; is too quiet. Use the "test" target instead, which is more | 110 | ;; is too quiet. Use the "test" target instead, which is more |
| 97 | ;; verbose. | 111 | ;; verbose. |
| 98 | (zero? (system* "make" "-C" "tests" "test"))) | 112 | (zero? (system* "make" "-C" "tests" "test"))))))) |
| 99 | %standard-phases))) | ||
| 100 | (synopsis "Command line tool for transferring data with URL syntax") | 113 | (synopsis "Command line tool for transferring data with URL syntax") |
| 101 | (description | 114 | (description |
| 102 | "curl is a command line tool for transferring data with URL syntax, | 115 | "curl is a command line tool for transferring data with URL syntax, |
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 9036d0445b6..a17424196a4 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> | 2 | ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2012, 2014 Andreas Enge <andreas@enge.fr> | 3 | ;;; Copyright © 2012, 2014, 2015 Andreas Enge <andreas@enge.fr> |
| 4 | ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com> | 4 | ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com> |
| 5 | ;;; Copyright © 2014 David Thompson <davet@gnu.org> | 5 | ;;; Copyright © 2014 David Thompson <davet@gnu.org> |
| 6 | ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> | 6 | ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> |
| @@ -68,26 +68,31 @@ | |||
| 68 | "doc")) ; 94 MiB of HTML docs | 68 | "doc")) ; 94 MiB of HTML docs |
| 69 | (arguments | 69 | (arguments |
| 70 | '(#:tests? #f ; no check target available | 70 | '(#:tests? #f ; no check target available |
| 71 | #:phases | 71 | #:phases |
| 72 | (alist-replace | 72 | (alist-replace |
| 73 | 'configure | 73 | 'configure |
| 74 | (lambda* (#:key outputs #:allow-other-keys) | 74 | (lambda* (#:key outputs #:allow-other-keys) |
| 75 | (let ((out (assoc-ref outputs "out")) | 75 | (let ((out (assoc-ref outputs "out")) |
| 76 | (doc (assoc-ref outputs "doc"))) | 76 | (doc (assoc-ref outputs "doc"))) |
| 77 | ;; '--docdir' is not honored, so we need to patch. | 77 | ;; '--docdir' is not honored, so we need to patch. |
| 78 | (substitute* "dist/Makefile.in" | 78 | (substitute* "dist/Makefile.in" |
| 79 | (("docdir[[:blank:]]*=.*") | 79 | (("docdir[[:blank:]]*=.*") |
| 80 | (string-append "docdir = " doc "/share/doc/bdb"))) | 80 | (string-append "docdir = " doc "/share/doc/bdb"))) |
| 81 | |||
| 82 | (zero? | ||
| 83 | (system* "./dist/configure" | ||
| 84 | (string-append "--prefix=" out) | ||
| 85 | (string-append "CONFIG_SHELL=" (which "bash")) | ||
| 86 | (string-append "SHELL=" (which "bash")) | ||
| 81 | 87 | ||
| 82 | (zero? | 88 | ;; The compatibility mode is needed by some packages, |
| 83 | (system* "./dist/configure" | 89 | ;; notably iproute2. |
| 84 | (string-append "--prefix=" out) | 90 | "--enable-compat185" |
| 85 | (string-append "CONFIG_SHELL=" (which "bash")) | ||
| 86 | (string-append "SHELL=" (which "bash")) | ||
| 87 | 91 | ||
| 88 | ;; The compatibility mode is needed by some packages, | 92 | ;; The following flag is needed so that the inclusion |
| 89 | ;; notably iproute2. | 93 | ;; of db_cxx.h into C++ files works; it leads to |
| 90 | "--enable-compat185")))) | 94 | ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h. |
| 95 | "--enable-cxx")))) | ||
| 91 | %standard-phases))) | 96 | %standard-phases))) |
| 92 | (synopsis "Berkeley database") | 97 | (synopsis "Berkeley database") |
| 93 | (description | 98 | (description |
| @@ -307,7 +312,7 @@ types are supported, as is encryption.") | |||
| 307 | (define-public sqlite | 312 | (define-public sqlite |
| 308 | (package | 313 | (package |
| 309 | (name "sqlite") | 314 | (name "sqlite") |
| 310 | (version "3.8.10.2") | 315 | (version "3.8.11.1") |
| 311 | (source (origin | 316 | (source (origin |
| 312 | (method url-fetch) | 317 | (method url-fetch) |
| 313 | ;; TODO: Download from sqlite.org once this bug : | 318 | ;; TODO: Download from sqlite.org once this bug : |
| @@ -322,9 +327,13 @@ types are supported, as is encryption.") | |||
| 322 | (map (cut string-pad <> 2 #\0) | 327 | (map (cut string-pad <> 2 #\0) |
| 323 | other-digits)) | 328 | other-digits)) |
| 324 | 6 #\0)))))) | 329 | 6 #\0)))))) |
| 325 | (string-append | 330 | (list |
| 326 | "https://fossies.org/linux/misc/sqlite-autoconf-" | 331 | (string-append |
| 327 | numeric-version ".tar.gz") | 332 | "https://fossies.org/linux/misc/sqlite-autoconf-" |
| 333 | numeric-version ".tar.gz") | ||
| 334 | (string-append | ||
| 335 | "http://distfiles.gentoo.org/distfiles/" | ||
| 336 | "/sqlite-autoconf-" numeric-version ".tar.gz")) | ||
| 328 | 337 | ||
| 329 | ;; XXX: As of 2015-09-08, SourceForge is squatting the URL | 338 | ;; XXX: As of 2015-09-08, SourceForge is squatting the URL |
| 330 | ;; below, returning 200 and showing an advertising page. | 339 | ;; below, returning 200 and showing an advertising page. |
| @@ -334,7 +343,7 @@ types are supported, as is encryption.") | |||
| 334 | )) | 343 | )) |
| 335 | (sha256 | 344 | (sha256 |
| 336 | (base32 | 345 | (base32 |
| 337 | "09nnaqx50gl1vmfvdipirizr61q3s0ywlql50f9kr1bx9rdfb0l3")))) | 346 | "1dnkl4qr1dgaprbyf3jddfiynkhxnin86qabni47wjlc0fnb16gv")))) |
| 338 | (build-system gnu-build-system) | 347 | (build-system gnu-build-system) |
| 339 | (inputs `(("readline" ,readline))) | 348 | (inputs `(("readline" ,readline))) |
| 340 | (arguments | 349 | (arguments |
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index a342f4861b0..dcbe5e5bd56 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm | |||
| @@ -406,9 +406,9 @@ operations.") | |||
| 406 | (lisp-dir (string-append %output "/share/emacs/site-lisp"))) | 406 | (lisp-dir (string-append %output "/share/emacs/site-lisp"))) |
| 407 | (setenv "PATH" PATH) | 407 | (setenv "PATH" PATH) |
| 408 | (system* tar "xvf" source) | 408 | (system* tar "xvf" source) |
| 409 | (mkdir-p lisp-dir) | 409 | |
| 410 | (copy-file (string-append ,name "-" ,version "/magit-svn.el") | 410 | (install-file (string-append ,name "-" ,version "/magit-svn.el") |
| 411 | (string-append lisp-dir "/magit-svn.el")) | 411 | lisp-dir) |
| 412 | 412 | ||
| 413 | (with-directory-excursion lisp-dir | 413 | (with-directory-excursion lisp-dir |
| 414 | (parameterize ((%emacs emacs)) | 414 | (parameterize ((%emacs emacs)) |
| @@ -462,18 +462,14 @@ support for Git-SVN.") | |||
| 462 | out "/share/doc/haskell-mode-" ,version)) | 462 | out "/share/doc/haskell-mode-" ,version)) |
| 463 | (info (string-append out "/share/info"))) | 463 | (info (string-append out "/share/info"))) |
| 464 | (define (copy-to-dir dir files) | 464 | (define (copy-to-dir dir files) |
| 465 | (mkdir-p dir) | 465 | (for-each (lambda (f) |
| 466 | (for-each | 466 | (install-file f dir)) |
| 467 | (lambda (f) | 467 | files)) |
| 468 | (copy-file f (string-append dir "/" (basename f)))) | ||
| 469 | files)) | ||
| 470 | 468 | ||
| 471 | (with-directory-excursion "doc" | 469 | (with-directory-excursion "doc" |
| 472 | (unless (zero? (system* "makeinfo" "haskell-mode.texi")) | 470 | (unless (zero? (system* "makeinfo" "haskell-mode.texi")) |
| 473 | (error "makeinfo failed")) | 471 | (error "makeinfo failed")) |
| 474 | (mkdir-p info) | 472 | (install-file "haskell-mode.info" info)) |
| 475 | (copy-file "haskell-mode.info" | ||
| 476 | (string-append info "/haskell-mode.info"))) | ||
| 477 | (copy-to-dir doc '("CONTRIBUTING.md" "NEWS" "README.md")) | 473 | (copy-to-dir doc '("CONTRIBUTING.md" "NEWS" "README.md")) |
| 478 | (copy-to-dir el-dir (find-files "." "\\.elc?")) | 474 | (copy-to-dir el-dir (find-files "." "\\.elc?")) |
| 479 | ;; these are now distributed with emacs | 475 | ;; these are now distributed with emacs |
| @@ -952,11 +948,9 @@ single buffer.") | |||
| 952 | (lambda* (#:key outputs #:allow-other-keys) | 948 | (lambda* (#:key outputs #:allow-other-keys) |
| 953 | (let ((target (string-append (assoc-ref outputs "out") | 949 | (let ((target (string-append (assoc-ref outputs "out") |
| 954 | "/share/emacs/site-lisp/"))) | 950 | "/share/emacs/site-lisp/"))) |
| 955 | (mkdir-p target) | 951 | (for-each (lambda (file) |
| 956 | (for-each | 952 | (install-file file target)) |
| 957 | (lambda (file) | 953 | (find-files "../lisp" "^(pdf|tab).*\\.elc?")) |
| 958 | (copy-file file (string-append target (basename file)))) | ||
| 959 | (find-files "../lisp" "^(pdf|tab).*\\.elc?")) | ||
| 960 | (emacs-byte-compile-directory target) | 954 | (emacs-byte-compile-directory target) |
| 961 | (emacs-generate-autoloads "pdf-tools" target))))))) | 955 | (emacs-generate-autoloads "pdf-tools" target))))))) |
| 962 | (native-inputs `(("autoconf" ,autoconf) | 956 | (native-inputs `(("autoconf" ,autoconf) |
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 1e245a8b5e3..54e43ef0f81 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm | |||
| @@ -302,11 +302,9 @@ optimizer; and it can produce photorealistic and design review images.") | |||
| 302 | (doc (string-append data "/doc/" ,name "-" ,version)) | 302 | (doc (string-append data "/doc/" ,name "-" ,version)) |
| 303 | (examples (string-append doc "/examples"))) | 303 | (examples (string-append doc "/examples"))) |
| 304 | (with-directory-excursion "bin" | 304 | (with-directory-excursion "bin" |
| 305 | (mkdir-p bin) | 305 | (for-each (lambda (f) |
| 306 | (for-each | 306 | (install-file f bin)) |
| 307 | (lambda (f) | 307 | (find-files "." ".*"))) |
| 308 | (copy-file f (string-append bin "/" (basename f)))) | ||
| 309 | (find-files "." ".*"))) | ||
| 310 | (copy-recursively "doc" doc) | 308 | (copy-recursively "doc" doc) |
| 311 | (copy-recursively "examples" examples) | 309 | (copy-recursively "examples" examples) |
| 312 | #t)))))) | 310 | #t)))))) |
| @@ -352,11 +350,9 @@ multipole-accelerated algorithm.") | |||
| 352 | (doc (string-append data "/doc/" ,name "-" ,version)) | 350 | (doc (string-append data "/doc/" ,name "-" ,version)) |
| 353 | (examples (string-append doc "/examples"))) | 351 | (examples (string-append doc "/examples"))) |
| 354 | (with-directory-excursion "bin" | 352 | (with-directory-excursion "bin" |
| 355 | (mkdir-p bin) | 353 | (for-each (lambda (f) |
| 356 | (for-each | 354 | (install-file f bin)) |
| 357 | (lambda (f) | 355 | (find-files "." ".*"))) |
| 358 | (copy-file f (string-append bin "/" (basename f)))) | ||
| 359 | (find-files "." ".*"))) | ||
| 360 | (copy-recursively "doc" doc) | 356 | (copy-recursively "doc" doc) |
| 361 | (copy-recursively "examples" examples) | 357 | (copy-recursively "examples" examples) |
| 362 | #t)))))) | 358 | #t)))))) |
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm new file mode 100644 index 00000000000..264cfbf7f31 --- /dev/null +++ b/gnu/packages/finance.scm | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | ||
| 2 | ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> | ||
| 3 | ;;; | ||
| 4 | ;;; This file is part of GNU Guix. | ||
| 5 | ;;; | ||
| 6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | ||
| 7 | ;;; under the terms of the GNU General Public License as published by | ||
| 8 | ;;; the Free Software Foundation; either version 3 of the License, or (at | ||
| 9 | ;;; your option) any later version. | ||
| 10 | ;;; | ||
| 11 | ;;; GNU Guix is distributed in the hope that it will be useful, but | ||
| 12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | ;;; GNU General Public License for more details. | ||
| 15 | ;;; | ||
| 16 | ;;; You should have received a copy of the GNU General Public License | ||
| 17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | |||
| 19 | (define-module (gnu packages finance) | ||
| 20 | #:use-module ((guix licenses) #:prefix license:) | ||
| 21 | #:use-module (guix packages) | ||
| 22 | #:use-module (guix download) | ||
| 23 | #:use-module (guix build utils) | ||
| 24 | #:use-module (guix build-system gnu) | ||
| 25 | #:use-module (gnu packages boost) | ||
| 26 | #:use-module (gnu packages databases) | ||
| 27 | #:use-module (gnu packages linux) | ||
| 28 | #:use-module (gnu packages pkg-config) | ||
| 29 | #:use-module (gnu packages protobuf) | ||
| 30 | #:use-module (gnu packages python) | ||
| 31 | #:use-module (gnu packages qt) | ||
| 32 | #:use-module (gnu packages tls) | ||
| 33 | #:use-module (gnu packages upnp)) | ||
| 34 | |||
| 35 | (define-public bitcoin-core | ||
| 36 | (package | ||
| 37 | (name "bitcoin-core") | ||
| 38 | (version "0.11.0") | ||
| 39 | (source (origin | ||
| 40 | (method url-fetch) | ||
| 41 | (uri | ||
| 42 | (string-append "https://bitcoin.org/bin/bitcoin-core-" | ||
| 43 | version "/bitcoin-" | ||
| 44 | version ".tar.gz")) | ||
| 45 | (sha256 | ||
| 46 | (base32 | ||
| 47 | "17yh6lq13xzzi5v2i48qaxiqm40x3hrj4gwyamkib9yzmmb1gfji")))) | ||
| 48 | (build-system gnu-build-system) | ||
| 49 | (native-inputs | ||
| 50 | `(("pkg-config" ,pkg-config) | ||
| 51 | ("python" ,python-wrapper) ; for the tests | ||
| 52 | ("util-linux" ,util-linux))) ; provides the hexdump command for tests | ||
| 53 | (inputs | ||
| 54 | `(("bdb" ,bdb) | ||
| 55 | ("boost" ,boost) | ||
| 56 | ("miniupnpc" ,miniupnpc) | ||
| 57 | ("openssl" ,openssl) | ||
| 58 | ("protobuf" ,protobuf) | ||
| 59 | ("qt" ,qt))) | ||
| 60 | (arguments | ||
| 61 | `(#:configure-flags | ||
| 62 | (list | ||
| 63 | ;; We use a bdb version newer than 4.8. | ||
| 64 | "--with-incompatible-bdb" | ||
| 65 | ;; Boost is not found unless specified manually. | ||
| 66 | (string-append "--with-boost=" | ||
| 67 | (assoc-ref %build-inputs "boost"))) | ||
| 68 | #:phases | ||
| 69 | (modify-phases %standard-phases | ||
| 70 | (add-before 'check 'set-home | ||
| 71 | (lambda _ | ||
| 72 | (setenv "HOME" (getenv "TMPDIR"))))))) ; Tests write to $HOME. | ||
| 73 | (home-page "https://bitcoin.org/en/") | ||
| 74 | (synopsis "Bitcoin peer-to-peer client") | ||
| 75 | (description | ||
| 76 | "Bitcoin is a digital currency that enables instant payments to anyone | ||
| 77 | anywhere in the world. It uses peer-to-peer technology to operate without | ||
| 78 | central authority: managing transactions and issuing money are carried out | ||
| 79 | collectively by the network. Bitcoin Core is the reference implementation | ||
| 80 | of the bitcoin protocol. This package provides the Bitcoin Core command | ||
| 81 | line client and a client based on Qt.") | ||
| 82 | (license license:expat))) | ||
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index 8b5346a17f0..3db8f9f11d5 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm | |||
| @@ -71,14 +71,14 @@ anti-aliased glyph bitmap generation with 256 gray levels.") | |||
| 71 | (define-public fontconfig | 71 | (define-public fontconfig |
| 72 | (package | 72 | (package |
| 73 | (name "fontconfig") | 73 | (name "fontconfig") |
| 74 | (version "2.11.92") | 74 | (version "2.11.94") |
| 75 | (source (origin | 75 | (source (origin |
| 76 | (method url-fetch) | 76 | (method url-fetch) |
| 77 | (uri (string-append | 77 | (uri (string-append |
| 78 | "http://www.freedesktop.org/software/fontconfig/release/fontconfig-" | 78 | "http://www.freedesktop.org/software/fontconfig/release/fontconfig-" |
| 79 | version ".tar.bz2")) | 79 | version ".tar.bz2")) |
| 80 | (sha256 (base32 | 80 | (sha256 (base32 |
| 81 | "18r45dcnaj93izwfr082qiwg8ka7ll6j0c9yf1slblm542d5pmd9")))) | 81 | "1psrl4b4gi4wmbvwwh43lk491wsl8lgvqj146prlcha3vwjc0qyp")))) |
| 82 | (build-system gnu-build-system) | 82 | (build-system gnu-build-system) |
| 83 | (propagated-inputs `(("expat" ,expat) | 83 | (propagated-inputs `(("expat" ,expat) |
| 84 | ("freetype" ,freetype))) | 84 | ("freetype" ,freetype))) |
| @@ -86,13 +86,24 @@ anti-aliased glyph bitmap generation with 256 gray levels.") | |||
| 86 | (native-inputs | 86 | (native-inputs |
| 87 | `(("pkg-config" ,pkg-config))) | 87 | `(("pkg-config" ,pkg-config))) |
| 88 | (arguments | 88 | (arguments |
| 89 | `(#:configure-flags | 89 | `(#:configure-flags |
| 90 | ;; point to user profile instead of /usr/share/fonts in /etc/fonts.conf | 90 | (list "--with-cache-dir=/var/cache/fontconfig" |
| 91 | (list "--with-default-fonts=~/.guix-profile/share/fonts" | 91 | ;; register gs-fonts as default fonts |
| 92 | ;; register gs-fonts | 92 | (string-append "--with-default-fonts=" |
| 93 | (string-append "--with-add-fonts=" | 93 | (assoc-ref %build-inputs "gs-fonts") |
| 94 | (assoc-ref %build-inputs "gs-fonts") | 94 | "/share/fonts") |
| 95 | "/share/fonts")))) | 95 | ;; register fonts from user profile |
| 96 | "--with-add-fonts=~/.guix-profile/share/fonts" | ||
| 97 | ;; python is not actually needed | ||
| 98 | "PYTHON=false") | ||
| 99 | #:phases | ||
| 100 | (modify-phases %standard-phases | ||
| 101 | (replace 'install | ||
| 102 | (lambda _ | ||
| 103 | ;; Don't try to create /var/cache/fontconfig. | ||
| 104 | (zero? (system* "make" "install" | ||
| 105 | "fc_cachedir=$(TMPDIR)" | ||
| 106 | "RUN_FC_CACHE_TEST=false"))))))) | ||
| 96 | (synopsis "Library for configuring and customizing font access") | 107 | (synopsis "Library for configuring and customizing font access") |
| 97 | (description | 108 | (description |
| 98 | "Fontconfig can discover new fonts when installed automatically; | 109 | "Fontconfig can discover new fonts when installed automatically; |
| @@ -192,7 +203,7 @@ applications should be.") | |||
| 192 | (define-public graphite2 | 203 | (define-public graphite2 |
| 193 | (package | 204 | (package |
| 194 | (name "graphite2") | 205 | (name "graphite2") |
| 195 | (version "1.2.4") | 206 | (version "1.3.1") |
| 196 | (source | 207 | (source |
| 197 | (origin | 208 | (origin |
| 198 | (method url-fetch) | 209 | (method url-fetch) |
| @@ -201,12 +212,13 @@ applications should be.") | |||
| 201 | version ".tgz")) | 212 | version ".tgz")) |
| 202 | (sha256 | 213 | (sha256 |
| 203 | (base32 | 214 | (base32 |
| 204 | "00xhv1mp640fr3wmdzwn4yz0g56jd4r9fb7b02mc1g19h0bdbhsb")))) | 215 | "0xvhmlyyxg2qmbwyl8k2f9w7mrbjyl59823pnjd8xmxpyl6976d5")))) |
| 205 | (build-system cmake-build-system) | 216 | (build-system cmake-build-system) |
| 217 | (native-inputs | ||
| 218 | `(("python" ,python-2) ; because of "import imap" in tests | ||
| 219 | ("python-fonttools" ,python2-fonttools))) | ||
| 206 | (inputs | 220 | (inputs |
| 207 | `(("freetype" ,freetype) | 221 | `(("freetype" ,freetype))) |
| 208 | ("perl" ,perl) | ||
| 209 | ("python" ,python-2))) ; because of "import imap" in tests | ||
| 210 | (synopsis "Reimplementation of the SIL Graphite text processing engine") | 222 | (synopsis "Reimplementation of the SIL Graphite text processing engine") |
| 211 | (description | 223 | (description |
| 212 | "Graphite2 is a reimplementation of the SIL Graphite text processing | 224 | "Graphite2 is a reimplementation of the SIL Graphite text processing |
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 761d3a6998f..d2652aef3f3 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm | |||
| @@ -206,7 +206,7 @@ where the OS part is overloaded to denote a specific ABI---into GCC | |||
| 206 | 206 | ||
| 207 | ;; Fix the dynamic linker's file name. | 207 | ;; Fix the dynamic linker's file name. |
| 208 | (substitute* (find-files "gcc/config" | 208 | (substitute* (find-files "gcc/config" |
| 209 | "^linux(64|-elf|-eabi)?\\.h$") | 209 | "^(linux|gnu)(64|-elf|-eabi)?\\.h$") |
| 210 | (("#define GLIBC_DYNAMIC_LINKER([^ ]*).*$" _ suffix) | 210 | (("#define GLIBC_DYNAMIC_LINKER([^ ]*).*$" _ suffix) |
| 211 | (format #f "#define GLIBC_DYNAMIC_LINKER~a \"~a\"~%" | 211 | (format #f "#define GLIBC_DYNAMIC_LINKER~a \"~a\"~%" |
| 212 | suffix | 212 | suffix |
| @@ -578,11 +578,7 @@ using compilers other than GCC." | |||
| 578 | (("@XSL_STYLE_DIR@") | 578 | (("@XSL_STYLE_DIR@") |
| 579 | (string-append | 579 | (string-append |
| 580 | docbook "/xml/xsl/" | 580 | docbook "/xml/xsl/" |
| 581 | (string-drop | 581 | (strip-store-file-name docbook))))))) |
| 582 | docbook | ||
| 583 | (+ 34 | ||
| 584 | (string-length | ||
| 585 | (%store-directory)))))))))) | ||
| 586 | (replace 'build | 582 | (replace 'build |
| 587 | (lambda _ | 583 | (lambda _ |
| 588 | ;; XXX: There's also a 'doc-info' target, but it | 584 | ;; XXX: There's also a 'doc-info' target, but it |
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index cdec3706ddb..2e8797560bb 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm | |||
| @@ -119,7 +119,7 @@ shared NFS home directories.") | |||
| 119 | (define glib | 119 | (define glib |
| 120 | (package | 120 | (package |
| 121 | (name "glib") | 121 | (name "glib") |
| 122 | (version "2.44.0") | 122 | (version "2.44.1") |
| 123 | (source (origin | 123 | (source (origin |
| 124 | (method url-fetch) | 124 | (method url-fetch) |
| 125 | (uri (string-append "mirror://gnome/sources/" | 125 | (uri (string-append "mirror://gnome/sources/" |
| @@ -127,7 +127,7 @@ shared NFS home directories.") | |||
| 127 | name "-" version ".tar.xz")) | 127 | name "-" version ".tar.xz")) |
| 128 | (sha256 | 128 | (sha256 |
| 129 | (base32 | 129 | (base32 |
| 130 | "1fgmjv3yzxgbks31h42201x2izpw0sd84h8dfw0si3x00sqn5lzj")) | 130 | "01yabrfp64i11mrks3p1gcks99lw0zm7f5vhkc53sl4amyndw4c8")) |
| 131 | (patches (list (search-patch "glib-tests-homedir.patch") | 131 | (patches (list (search-patch "glib-tests-homedir.patch") |
| 132 | (search-patch "glib-tests-desktop.patch") | 132 | (search-patch "glib-tests-desktop.patch") |
| 133 | (search-patch "glib-tests-prlimit.patch") | 133 | (search-patch "glib-tests-prlimit.patch") |
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index f9cb579e85d..b4b5c237c91 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm | |||
| @@ -787,7 +787,7 @@ XML/CSS rendering engine.") | |||
| 787 | (define-public libgsf | 787 | (define-public libgsf |
| 788 | (package | 788 | (package |
| 789 | (name "libgsf") | 789 | (name "libgsf") |
| 790 | (version "1.14.30") | 790 | (version "1.14.34") |
| 791 | (source (origin | 791 | (source (origin |
| 792 | (method url-fetch) | 792 | (method url-fetch) |
| 793 | (uri (string-append "mirror://gnome/sources/" name "/" | 793 | (uri (string-append "mirror://gnome/sources/" name "/" |
| @@ -795,7 +795,7 @@ XML/CSS rendering engine.") | |||
| 795 | name "-" version ".tar.xz")) | 795 | name "-" version ".tar.xz")) |
| 796 | (sha256 | 796 | (sha256 |
| 797 | (base32 | 797 | (base32 |
| 798 | "0w2v1a9sxsymd1mcy4mwsz4r6za9iwq69rj86nb939p41d4c6j6b")))) | 798 | "0a5m1i5gp4m2z0cn2x1rrdm8wgrr04bzv65l8pgp6jipw13s9zph")))) |
| 799 | (build-system gnu-build-system) | 799 | (build-system gnu-build-system) |
| 800 | (native-inputs | 800 | (native-inputs |
| 801 | `(("intltool" ,intltool) | 801 | `(("intltool" ,intltool) |
| @@ -820,7 +820,7 @@ dealing with different structured file formats.") | |||
| 820 | (define-public librsvg | 820 | (define-public librsvg |
| 821 | (package | 821 | (package |
| 822 | (name "librsvg") | 822 | (name "librsvg") |
| 823 | (version "2.40.9") | 823 | (version "2.40.10") |
| 824 | (source (origin | 824 | (source (origin |
| 825 | (method url-fetch) | 825 | (method url-fetch) |
| 826 | (uri (string-append "mirror://gnome/sources/" name "/" | 826 | (uri (string-append "mirror://gnome/sources/" name "/" |
| @@ -828,7 +828,7 @@ dealing with different structured file formats.") | |||
| 828 | name "-" version ".tar.xz")) | 828 | name "-" version ".tar.xz")) |
| 829 | (sha256 | 829 | (sha256 |
| 830 | (base32 | 830 | (base32 |
| 831 | "0fplymmqqr28y24vcnb01szn62pfbqhk8p1ngns54x9m6mflr5hk")))) | 831 | "0y9lvnb9ij9mjg8cyp7xysi0c5ms5v4q1zrhx42b546f71s80p4n")))) |
| 832 | (build-system gnu-build-system) | 832 | (build-system gnu-build-system) |
| 833 | (arguments | 833 | (arguments |
| 834 | `(#:phases | 834 | `(#:phases |
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index bfd1f5dc7b4..53e6ea7787b 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm | |||
| @@ -190,14 +190,12 @@ in the Mozilla clients.") | |||
| 190 | (obj (match (scandir "dist" (cut string-suffix? "OBJ" <>)) | 190 | (obj (match (scandir "dist" (cut string-suffix? "OBJ" <>)) |
| 191 | ((obj) (string-append "dist/" obj))))) | 191 | ((obj) (string-append "dist/" obj))))) |
| 192 | ;; Install nss-config to $out/bin. | 192 | ;; Install nss-config to $out/bin. |
| 193 | (mkdir-p (string-append out "/bin")) | 193 | (install-file (string-append obj "/bin/nss-config") |
| 194 | (copy-file (string-append obj "/bin/nss-config") | 194 | (string-append out "/bin")) |
| 195 | (string-append out "/bin/nss-config")) | ||
| 196 | (delete-file (string-append obj "/bin/nss-config")) | 195 | (delete-file (string-append obj "/bin/nss-config")) |
| 197 | ;; Install nss.pc to $out/lib/pkgconfig. | 196 | ;; Install nss.pc to $out/lib/pkgconfig. |
| 198 | (mkdir-p (string-append out "/lib/pkgconfig")) | 197 | (install-file (string-append obj "/lib/pkgconfig/nss.pc") |
| 199 | (copy-file (string-append obj "/lib/pkgconfig/nss.pc") | 198 | (string-append out "/lib/pkgconfig")) |
| 200 | (string-append out "/lib/pkgconfig/nss.pc")) | ||
| 201 | (delete-file (string-append obj "/lib/pkgconfig/nss.pc")) | 199 | (delete-file (string-append obj "/lib/pkgconfig/nss.pc")) |
| 202 | (rmdir (string-append obj "/lib/pkgconfig")) | 200 | (rmdir (string-append obj "/lib/pkgconfig")) |
| 203 | ;; Install other files. | 201 | ;; Install other files. |
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index b2f921e9dd4..02e65d32765 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm | |||
| @@ -43,15 +43,15 @@ | |||
| 43 | (define-public cgal | 43 | (define-public cgal |
| 44 | (package | 44 | (package |
| 45 | (name "cgal") | 45 | (name "cgal") |
| 46 | (version "4.5.1") | 46 | (version "4.6.3") |
| 47 | (source (origin | 47 | (source (origin |
| 48 | (method url-fetch) | 48 | (method url-fetch) |
| 49 | (uri (string-append | 49 | (uri (string-append |
| 50 | "http://gforge.inria.fr/frs/download.php/file/34402/CGAL-" | 50 | "http://gforge.inria.fr/frs/download.php/file/" |
| 51 | version ".tar.xz")) | 51 | "35139/CGAL-4.6.3.tar.xz")) |
| 52 | (sha256 | 52 | (sha256 |
| 53 | (base32 | 53 | (base32 |
| 54 | "1565ycbds92bxmhi09avc1jl6ks141ig00j110l49gqxp9swy6zv")))) | 54 | "08gwjjh0qz3fakj1y2nsl2qvb0qv5lc7k1pxwjkagh37hxxh4f73")))) |
| 55 | (build-system cmake-build-system) | 55 | (build-system cmake-build-system) |
| 56 | (arguments | 56 | (arguments |
| 57 | '(;; "RelWithDebInfo" is not supported. | 57 | '(;; "RelWithDebInfo" is not supported. |
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 45cd1e30f6a..a44c2dd3feb 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm | |||
| @@ -144,28 +144,34 @@ affine transformation (scale, rotation, shear, etc.).") | |||
| 144 | (define-public harfbuzz | 144 | (define-public harfbuzz |
| 145 | (package | 145 | (package |
| 146 | (name "harfbuzz") | 146 | (name "harfbuzz") |
| 147 | (version "0.9.40") | 147 | (version "1.0.3") |
| 148 | (source (origin | 148 | (source (origin |
| 149 | (method url-fetch) | 149 | (method url-fetch) |
| 150 | (uri (string-append "http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-" | 150 | (uri (string-append "http://www.freedesktop.org/software/" |
| 151 | version ".tar.bz2")) | 151 | "harfbuzz/release/harfbuzz-" |
| 152 | (sha256 | 152 | version ".tar.bz2")) |
| 153 | (base32 | 153 | (sha256 |
| 154 | "07rjp05axas96fp23lpf8l2yyfdj9yib4m0qjv592vdyhcsxaw8p")))) | 154 | (base32 |
| 155 | "1xrxlrvgyr6mm9qjxmkif2kvcah082y94gf1vqi0f0bdl1g8gp7b")))) | ||
| 155 | (build-system gnu-build-system) | 156 | (build-system gnu-build-system) |
| 157 | (outputs '("out" | ||
| 158 | "bin")) ; 160K, only hb-view depend on cairo | ||
| 156 | (inputs | 159 | (inputs |
| 157 | `(("cairo" ,cairo) | 160 | `(("cairo" ,cairo))) |
| 161 | (propagated-inputs | ||
| 162 | ;; There are all in the Requires or Requires.private field of '.pc'. | ||
| 163 | `(("glib" ,glib) | ||
| 158 | ("graphite2" ,graphite2) | 164 | ("graphite2" ,graphite2) |
| 159 | ("icu4c" ,icu4c))) | 165 | ("icu4c" ,icu4c))) |
| 160 | (propagated-inputs | ||
| 161 | `(("glib" ,glib))) ; required by harfbuzz-gobject.pc | ||
| 162 | (native-inputs | 166 | (native-inputs |
| 163 | `(("gobject-introspection" ,gobject-introspection) | 167 | `(("gobject-introspection" ,gobject-introspection) |
| 164 | ("pkg-config" ,pkg-config) | 168 | ("pkg-config" ,pkg-config) |
| 165 | ("python" ,python-2))) ; incompatible with Python 3 (print syntax) | 169 | ("python" ,python-2))) ; incompatible with Python 3 (print syntax) |
| 166 | (arguments | 170 | (arguments |
| 167 | `(#:configure-flags `("--with-graphite2" | 171 | `(#:configure-flags `("--with-graphite2" |
| 168 | "--with-gobject"))) | 172 | "--with-gobject" |
| 173 | ,(string-append | ||
| 174 | "--bindir=" (assoc-ref %outputs "bin") "/bin")))) | ||
| 169 | (synopsis "OpenType text shaping engine") | 175 | (synopsis "OpenType text shaping engine") |
| 170 | (description | 176 | (description |
| 171 | "HarfBuzz is an OpenType text shaping engine.") | 177 | "HarfBuzz is an OpenType text shaping engine.") |
| @@ -508,7 +514,7 @@ application suites.") | |||
| 508 | (define-public gtk+ | 514 | (define-public gtk+ |
| 509 | (package (inherit gtk+-2) | 515 | (package (inherit gtk+-2) |
| 510 | (name "gtk+") | 516 | (name "gtk+") |
| 511 | (version "3.16.3") | 517 | (version "3.16.6") |
| 512 | (source (origin | 518 | (source (origin |
| 513 | (method url-fetch) | 519 | (method url-fetch) |
| 514 | (uri (string-append "mirror://gnome/sources/" name "/" | 520 | (uri (string-append "mirror://gnome/sources/" name "/" |
| @@ -516,7 +522,7 @@ application suites.") | |||
| 516 | name "-" version ".tar.xz")) | 522 | name "-" version ".tar.xz")) |
| 517 | (sha256 | 523 | (sha256 |
| 518 | (base32 | 524 | (base32 |
| 519 | "195ykv53sl2gsc847wcnd79zilm1yzcc2cfjxnrakhh2dd5gshr9")))) | 525 | "1gpzlnfrifc17yfk0zki6b2vmsfpf5cmrbh232s6iaan11np44jd")))) |
| 520 | (propagated-inputs | 526 | (propagated-inputs |
| 521 | `(("at-spi2-atk" ,at-spi2-atk) | 527 | `(("at-spi2-atk" ,at-spi2-atk) |
| 522 | ("atk" ,atk) | 528 | ("atk" ,atk) |
| @@ -556,9 +562,6 @@ application suites.") | |||
| 556 | (substitute* "testsuite/Makefile.in" | 562 | (substitute* "testsuite/Makefile.in" |
| 557 | (("SUBDIRS = gdk gtk a11y css reftests") | 563 | (("SUBDIRS = gdk gtk a11y css reftests") |
| 558 | "SUBDIRS = gdk")) | 564 | "SUBDIRS = gdk")) |
| 559 | (substitute* '("demos/widget-factory/Makefile.in" | ||
| 560 | "demos/gtk-demo/Makefile.in") | ||
| 561 | (("gtk-update-icon-cache") "$(bindir)/gtk-update-icon-cache")) | ||
| 562 | #t) | 565 | #t) |
| 563 | (alist-cons-after | 566 | (alist-cons-after |
| 564 | 'install 'wrap-gtk-encode-symbolic-svg | 567 | 'install 'wrap-gtk-encode-symbolic-svg |
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index 60af92dcebf..d5a95a04443 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm | |||
| @@ -467,7 +467,7 @@ http:://json.org specification. These are the main features: | |||
| 467 | scm-files) | 467 | scm-files) |
| 468 | 468 | ||
| 469 | ;; Also copy over the README. | 469 | ;; Also copy over the README. |
| 470 | (copy-file "README.org" (string-append doc "/README.org")) | 470 | (install-file "README.org" doc) |
| 471 | #t)))) | 471 | #t)))) |
| 472 | (inputs | 472 | (inputs |
| 473 | `(("guile" ,guile-2.0))) | 473 | `(("guile" ,guile-2.0))) |
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm index 62dc04385f3..3867b4d7ec1 100644 --- a/gnu/packages/hurd.scm +++ b/gnu/packages/hurd.scm | |||
| @@ -20,11 +20,14 @@ | |||
| 20 | #:use-module (guix licenses) | 20 | #:use-module (guix licenses) |
| 21 | #:use-module (guix download) | 21 | #:use-module (guix download) |
| 22 | #:use-module (guix packages) | 22 | #:use-module (guix packages) |
| 23 | #:use-module (gnu packages) | ||
| 23 | #:use-module (guix build-system gnu) | 24 | #:use-module (guix build-system gnu) |
| 24 | #:use-module (gnu packages flex) | 25 | #:use-module (gnu packages flex) |
| 25 | #:use-module (gnu packages bison) | 26 | #:use-module (gnu packages bison) |
| 26 | #:use-module (gnu packages perl) | 27 | #:use-module (gnu packages perl) |
| 27 | #:use-module (gnu packages autotools)) | 28 | #:use-module (gnu packages autotools) |
| 29 | #:use-module (gnu packages base) | ||
| 30 | #:use-module (guix git-download)) | ||
| 28 | 31 | ||
| 29 | (define-public gnumach-headers | 32 | (define-public gnumach-headers |
| 30 | (package | 33 | (package |
| @@ -73,7 +76,9 @@ | |||
| 73 | (base32 | 76 | (base32 |
| 74 | "13r1pg8icyc0pl082z7k36i440pr1f3nr7ahig3rrc0r7qndqmk9")))) | 77 | "13r1pg8icyc0pl082z7k36i440pr1f3nr7ahig3rrc0r7qndqmk9")))) |
| 75 | (build-system gnu-build-system) | 78 | (build-system gnu-build-system) |
| 76 | (inputs `(("gnumach-headers" ,gnumach-headers))) | 79 | ;; Flex is needed both at build and run time. |
| 80 | (inputs `(("gnumach-headers" ,gnumach-headers) | ||
| 81 | ("flex" ,flex))) | ||
| 77 | (native-inputs | 82 | (native-inputs |
| 78 | `(("flex" ,flex) | 83 | `(("flex" ,flex) |
| 79 | ("bison" ,bison))) | 84 | ("bison" ,bison))) |
| @@ -128,3 +133,55 @@ communication.") | |||
| 128 | "This package provides C headers of the GNU Hurd, used to build the GNU C | 133 | "This package provides C headers of the GNU Hurd, used to build the GNU C |
| 129 | Library and other user programs.") | 134 | Library and other user programs.") |
| 130 | (license gpl2+))) | 135 | (license gpl2+))) |
| 136 | |||
| 137 | (define-public hurd-minimal | ||
| 138 | (package (inherit hurd-headers) | ||
| 139 | (name "hurd-minimal") | ||
| 140 | (inputs `(("glibc-hurd-headers" ,glibc/hurd-headers))) | ||
| 141 | (native-inputs | ||
| 142 | `(("autoconf" ,(autoconf-wrapper)) | ||
| 143 | ("mig" ,mig))) | ||
| 144 | |||
| 145 | (arguments | ||
| 146 | `(#:phases (alist-replace | ||
| 147 | 'install | ||
| 148 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 149 | (let ((out (assoc-ref outputs "out"))) | ||
| 150 | ;; We need to copy libihash.a to the output directory manually, | ||
| 151 | ;; since there is no target for that in the makefile. | ||
| 152 | (mkdir-p (string-append out "/include")) | ||
| 153 | (copy-file "libihash/ihash.h" | ||
| 154 | (string-append out "/include/ihash.h")) | ||
| 155 | (mkdir-p (string-append out "/lib")) | ||
| 156 | (copy-file "libihash/libihash.a" | ||
| 157 | (string-append out "/lib/libihash.a")) | ||
| 158 | #t)) | ||
| 159 | (alist-replace | ||
| 160 | 'build | ||
| 161 | (lambda _ | ||
| 162 | (zero? (system* "make" "-Clibihash" "libihash.a"))) | ||
| 163 | (alist-cons-before | ||
| 164 | 'configure 'bootstrap | ||
| 165 | (lambda _ | ||
| 166 | (zero? (system* "autoreconf" "-vfi"))) | ||
| 167 | %standard-phases))) | ||
| 168 | #:configure-flags '(;; Pretend we're on GNU/Hurd; 'configure' wants | ||
| 169 | ;; that. | ||
| 170 | "--host=i686-pc-gnu" | ||
| 171 | |||
| 172 | ;; Reduce set of dependencies. | ||
| 173 | "--disable-ncursesw" | ||
| 174 | "--disable-test" | ||
| 175 | "--without-libbz2" | ||
| 176 | "--without-libz" | ||
| 177 | "--without-parted" | ||
| 178 | ;; Skip the clnt_create check because it expects | ||
| 179 | ;; a working glibc causing a circular dependency. | ||
| 180 | "ac_cv_search_clnt_create=no") | ||
| 181 | #:tests? #f)) | ||
| 182 | (home-page "http://www.gnu.org/software/hurd/hurd.html") | ||
| 183 | (synopsis "GNU Hurd libraries") | ||
| 184 | (description | ||
| 185 | "This package provides libihash, needed to build the GNU C | ||
| 186 | Library for GNU/Hurd.") | ||
| 187 | (license gpl2+))) | ||
diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm index 38db959d948..97b65698bb4 100644 --- a/gnu/packages/ibus.scm +++ b/gnu/packages/ibus.scm | |||
| @@ -82,6 +82,7 @@ | |||
| 82 | ("dconf" ,dconf) | 82 | ("dconf" ,dconf) |
| 83 | ("gconf" ,gconf) | 83 | ("gconf" ,gconf) |
| 84 | ("gtk2" ,gtk+-2) | 84 | ("gtk2" ,gtk+-2) |
| 85 | ("gtk+" ,gtk+) | ||
| 85 | ("intltool" ,intltool) | 86 | ("intltool" ,intltool) |
| 86 | ("libnotify" ,libnotify) | 87 | ("libnotify" ,libnotify) |
| 87 | ("iso-codes" ,iso-codes) | 88 | ("iso-codes" ,iso-codes) |
diff --git a/gnu/packages/icu4c.scm b/gnu/packages/icu4c.scm index 46e5d120492..d442b5e69a3 100644 --- a/gnu/packages/icu4c.scm +++ b/gnu/packages/icu4c.scm | |||
| @@ -38,7 +38,9 @@ | |||
| 38 | "-src.tgz")) | 38 | "-src.tgz")) |
| 39 | (sha256 | 39 | (sha256 |
| 40 | (base32 "0ys5f5spizg45qlaa31j2lhgry0jka2gfha527n4ndfxxz5j4sz1")) | 40 | (base32 "0ys5f5spizg45qlaa31j2lhgry0jka2gfha527n4ndfxxz5j4sz1")) |
| 41 | (patches (list (search-patch "icu4c-CVE-2015-4760.patch"))))) | 41 | (patches (map search-patch '("icu4c-CVE-2014-6585.patch" |
| 42 | "icu4c-CVE-2015-1270.patch" | ||
| 43 | "icu4c-CVE-2015-4760.patch"))))) | ||
| 42 | (build-system gnu-build-system) | 44 | (build-system gnu-build-system) |
| 43 | (inputs | 45 | (inputs |
| 44 | `(("perl" ,perl))) | 46 | `(("perl" ,perl))) |
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 1ba281205ca..cee7f146fac 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm | |||
| @@ -107,41 +107,24 @@ image files in PBMPLUS PPM/PGM, GIF, BMP, and Targa file formats.") | |||
| 107 | (define-public libtiff | 107 | (define-public libtiff |
| 108 | (package | 108 | (package |
| 109 | (name "libtiff") | 109 | (name "libtiff") |
| 110 | (version "4.0.3") | 110 | (version "4.0.5") |
| 111 | (source (origin | 111 | (source (origin |
| 112 | (method url-fetch) | 112 | (method url-fetch) |
| 113 | (uri (string-append "ftp://ftp.remotesensing.org/pub/libtiff/tiff-" | 113 | (uri (string-append "ftp://ftp.remotesensing.org/pub/libtiff/tiff-" |
| 114 | version ".tar.gz")) | 114 | version ".tar.gz")) |
| 115 | (sha256 (base32 | 115 | (sha256 (base32 |
| 116 | "0wj8d1iwk9vnpax2h29xqc2hwknxg3s0ay2d5pxkg59ihbifn6pa")) | 116 | "171hgy4mylwmvdm7gp6ffjva81m4j56v3fbqsbfl7avzxn1slpp2")))) |
| 117 | (patches (map search-patch '("libtiff-CVE-2012-4564.patch" | ||
| 118 | "libtiff-CVE-2013-1960.patch" | ||
| 119 | "libtiff-CVE-2013-1961.patch" | ||
| 120 | "libtiff-CVE-2013-4231.patch" | ||
| 121 | "libtiff-CVE-2013-4232.patch" | ||
| 122 | "libtiff-CVE-2013-4244.patch" | ||
| 123 | "libtiff-CVE-2013-4243.patch" | ||
| 124 | "libtiff-CVE-2014-9330.patch" | ||
| 125 | "libtiff-CVE-2014-8127-pt1.patch" | ||
| 126 | "libtiff-CVE-2014-8127-pt2.patch" | ||
| 127 | "libtiff-CVE-2014-8127-pt3.patch" | ||
| 128 | "libtiff-CVE-2014-8127-pt4.patch" | ||
| 129 | "libtiff-CVE-2014-8128-pt1.patch" | ||
| 130 | "libtiff-CVE-2014-8128-pt2.patch" | ||
| 131 | "libtiff-CVE-2014-8128-pt3.patch" | ||
| 132 | "libtiff-CVE-2014-8129.patch" | ||
| 133 | "libtiff-CVE-2014-9655.patch" | ||
| 134 | "libtiff-CVE-2014-8128-pt4.patch" | ||
| 135 | "libtiff-CVE-2014-8128-pt5.patch"))))) | ||
| 136 | (build-system gnu-build-system) | 117 | (build-system gnu-build-system) |
| 137 | (inputs `(("zlib" ,zlib) | 118 | (outputs '("out" |
| 138 | ("libjpeg-8" ,libjpeg-8))) | 119 | "doc")) ;1.3 MiB of HTML documentation |
| 139 | ;; currently does not compile with libjpeg version 9 | ||
| 140 | (arguments | 120 | (arguments |
| 141 | `(#:configure-flags | 121 | ;; Instead of using --docdir, this package has its own --with-docdir. |
| 142 | (list (string-append "--with-jpeg-include-dir=" | 122 | `(#:configure-flags (list (string-append "--with-docdir=" |
| 143 | (assoc-ref %build-inputs "libjpeg-8") | 123 | (assoc-ref %outputs "doc") |
| 144 | "/include")))) | 124 | "/share/doc/" |
| 125 | ,name "-" ,version)))) | ||
| 126 | (inputs `(("zlib" ,zlib) | ||
| 127 | ("libjpeg" ,libjpeg))) | ||
| 145 | (synopsis "Library for handling TIFF files") | 128 | (synopsis "Library for handling TIFF files") |
| 146 | (description | 129 | (description |
| 147 | "Libtiff provides support for the Tag Image File Format (TIFF), a format | 130 | "Libtiff provides support for the Tag Image File Format (TIFF), a format |
diff --git a/gnu/packages/imagemagick.scm b/gnu/packages/imagemagick.scm index 4e49c60993c..8e176845e16 100644 --- a/gnu/packages/imagemagick.scm +++ b/gnu/packages/imagemagick.scm | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #:use-module (guix build-system perl) | 23 | #:use-module (guix build-system perl) |
| 24 | #:use-module (guix download) | 24 | #:use-module (guix download) |
| 25 | #:use-module ((guix licenses) #:select (fsf-free)) | 25 | #:use-module ((guix licenses) #:select (fsf-free)) |
| 26 | #:use-module (gnu packages) | ||
| 26 | #:use-module (gnu packages algebra) | 27 | #:use-module (gnu packages algebra) |
| 27 | #:use-module (gnu packages compression) | 28 | #:use-module (gnu packages compression) |
| 28 | #:use-module (gnu packages fontutils) | 29 | #:use-module (gnu packages fontutils) |
| @@ -37,14 +38,15 @@ | |||
| 37 | (define-public imagemagick | 38 | (define-public imagemagick |
| 38 | (package | 39 | (package |
| 39 | (name "imagemagick") | 40 | (name "imagemagick") |
| 40 | (version "6.9.1-3") | 41 | (version "6.9.2-1") |
| 41 | (source (origin | 42 | (source (origin |
| 42 | (method url-fetch) | 43 | (method url-fetch) |
| 43 | (uri (string-append "mirror://imagemagick/ImageMagick-" | 44 | (uri (string-append "mirror://imagemagick/ImageMagick-" |
| 44 | version ".tar.xz")) | 45 | version ".tar.xz")) |
| 45 | (sha256 | 46 | (sha256 |
| 46 | (base32 | 47 | (base32 |
| 47 | "18wbsjfccxlgsdsd6h9wvhcjrsglyi086jk4bk029ik07rh81laz")))) | 48 | "159afhqrj22jlz745ccbgnkdiwvn8pjcc96jic0iv9ms7gqxwln5")) |
| 49 | (patches (list (search-patch "imagemagick-test-segv.patch"))))) | ||
| 48 | (build-system gnu-build-system) | 50 | (build-system gnu-build-system) |
| 49 | (arguments | 51 | (arguments |
| 50 | `(#:phases (modify-phases %standard-phases | 52 | `(#:phases (modify-phases %standard-phases |
| @@ -84,7 +86,7 @@ | |||
| 84 | ("libxml2" ,libxml2) | 86 | ("libxml2" ,libxml2) |
| 85 | ("libtiff" ,libtiff) | 87 | ("libtiff" ,libtiff) |
| 86 | ("libpng" ,libpng) | 88 | ("libpng" ,libpng) |
| 87 | ("libjpeg" ,libjpeg-8) | 89 | ("libjpeg" ,libjpeg) |
| 88 | ("pango" ,pango) | 90 | ("pango" ,pango) |
| 89 | ("freetype" ,freetype) | 91 | ("freetype" ,freetype) |
| 90 | ("bzip2" ,bzip2) | 92 | ("bzip2" ,bzip2) |
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 0ff70c82b2c..9304a92eb91 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm | |||
| @@ -102,8 +102,8 @@ | |||
| 102 | (lambda* (#:key outputs #:allow-other-keys) | 102 | (lambda* (#:key outputs #:allow-other-keys) |
| 103 | (let ((java (string-append (assoc-ref outputs "out") | 103 | (let ((java (string-append (assoc-ref outputs "out") |
| 104 | "/share/java"))) | 104 | "/share/java"))) |
| 105 | (mkdir-p java) | 105 | (install-file "swt.jar" java) |
| 106 | (copy-file "swt.jar" (string-append java "/swt.jar"))) #t) | 106 | #t)) |
| 107 | (alist-delete 'configure %standard-phases)))))) | 107 | (alist-delete 'configure %standard-phases)))))) |
| 108 | (inputs | 108 | (inputs |
| 109 | `(("xulrunner" ,icecat) | 109 | `(("xulrunner" ,icecat) |
diff --git a/gnu/packages/libidn.scm b/gnu/packages/libidn.scm index 4a7840c78c0..382e14f0cc3 100644 --- a/gnu/packages/libidn.scm +++ b/gnu/packages/libidn.scm | |||
| @@ -26,13 +26,13 @@ | |||
| 26 | (define-public libidn | 26 | (define-public libidn |
| 27 | (package | 27 | (package |
| 28 | (name "libidn") | 28 | (name "libidn") |
| 29 | (version "1.31") | 29 | (version "1.32") |
| 30 | (source (origin | 30 | (source (origin |
| 31 | (method url-fetch) | 31 | (method url-fetch) |
| 32 | (uri (string-append "mirror://gnu/libidn/libidn-" version | 32 | (uri (string-append "mirror://gnu/libidn/libidn-" version |
| 33 | ".tar.gz")) | 33 | ".tar.gz")) |
| 34 | (sha256 (base32 | 34 | (sha256 (base32 |
| 35 | "026z12mczlag443ms9n954h36pi3m7iva9jfw8y4ispsj772zpxg")))) | 35 | "1xf4hphhahcjm2xwx147lfpsavjwv9l4c2gf6hx71zxywbz5lpds")))) |
| 36 | (build-system gnu-build-system) | 36 | (build-system gnu-build-system) |
| 37 | ;; FIXME: No Java and C# libraries are currently built. | 37 | ;; FIXME: No Java and C# libraries are currently built. |
| 38 | (synopsis "Internationalized string processing library") | 38 | (synopsis "Internationalized string processing library") |
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 97e8bdcaec0..d2619335a30 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm | |||
| @@ -321,7 +321,7 @@ It has been modified to remove all non-free binary blobs.") | |||
| 321 | (define-public linux-pam | 321 | (define-public linux-pam |
| 322 | (package | 322 | (package |
| 323 | (name "linux-pam") | 323 | (name "linux-pam") |
| 324 | (version "1.1.6") | 324 | (version "1.2.1") |
| 325 | (source | 325 | (source |
| 326 | (origin | 326 | (origin |
| 327 | (method url-fetch) | 327 | (method url-fetch) |
| @@ -331,7 +331,7 @@ It has been modified to remove all non-free binary blobs.") | |||
| 331 | version ".tar.bz2"))) | 331 | version ".tar.bz2"))) |
| 332 | (sha256 | 332 | (sha256 |
| 333 | (base32 | 333 | (base32 |
| 334 | "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s")))) | 334 | "1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl")))) |
| 335 | (build-system gnu-build-system) | 335 | (build-system gnu-build-system) |
| 336 | (native-inputs | 336 | (native-inputs |
| 337 | `(("flex" ,flex) | 337 | `(("flex" ,flex) |
| @@ -390,7 +390,7 @@ providing the system administrator with some help in common tasks.") | |||
| 390 | (define-public util-linux | 390 | (define-public util-linux |
| 391 | (package | 391 | (package |
| 392 | (name "util-linux") | 392 | (name "util-linux") |
| 393 | (version "2.25.2") | 393 | (version "2.27") |
| 394 | (source (origin | 394 | (source (origin |
| 395 | (method url-fetch) | 395 | (method url-fetch) |
| 396 | (uri (string-append "mirror://kernel.org/linux/utils/" | 396 | (uri (string-append "mirror://kernel.org/linux/utils/" |
| @@ -398,19 +398,20 @@ providing the system administrator with some help in common tasks.") | |||
| 398 | name "-" version ".tar.xz")) | 398 | name "-" version ".tar.xz")) |
| 399 | (sha256 | 399 | (sha256 |
| 400 | (base32 | 400 | (base32 |
| 401 | "1miwwdq1zwvhf0smrxx3fjddq3mz22s8rc5cw54s7x3kbdqpyig0")) | 401 | "1ivdx1bhjbakf77agm9dn3wyxia1wgz9lzxgd61zqxw3xzih9gzw")) |
| 402 | (patches (list (search-patch "util-linux-tests.patch"))) | 402 | (patches (list (search-patch "util-linux-tests.patch"))) |
| 403 | (modules '((guix build utils))) | 403 | (modules '((guix build utils))) |
| 404 | (snippet | 404 | (snippet |
| 405 | ;; We take the 'logger' program from GNU Inetutils and 'kill' | 405 | ;; We take the 'logger' program from GNU Inetutils and 'kill' |
| 406 | ;; from GNU Coreutils. | 406 | ;; from GNU Coreutils. |
| 407 | '(substitute* "configure" | 407 | '(begin |
| 408 | (("build_logger=yes") "build_logger=no") | 408 | (substitute* "configure" |
| 409 | (("build_kill=yes") "build_kill=no"))))) | 409 | (("build_logger=yes") "build_logger=no") |
| 410 | (("build_kill=yes") "build_kill=no")) | ||
| 411 | #t)))) | ||
| 410 | (build-system gnu-build-system) | 412 | (build-system gnu-build-system) |
| 411 | (arguments | 413 | (arguments |
| 412 | `(#:configure-flags (list "--disable-use-tty-group" | 414 | `(#:configure-flags (list "--disable-use-tty-group" |
| 413 | "--enable-ddate" | ||
| 414 | 415 | ||
| 415 | ;; Install completions where our | 416 | ;; Install completions where our |
| 416 | ;; bash-completion package expects them. | 417 | ;; bash-completion package expects them. |
| @@ -1021,19 +1022,15 @@ advanced aspects of IP configuration (iptunnel, ipmaddr).") | |||
| 1021 | (define-public libcap | 1022 | (define-public libcap |
| 1022 | (package | 1023 | (package |
| 1023 | (name "libcap") | 1024 | (name "libcap") |
| 1024 | (version "2.22") | 1025 | (version "2.24") |
| 1025 | (source (origin | 1026 | (source (origin |
| 1026 | (method url-fetch) | 1027 | (method url-fetch) |
| 1027 | |||
| 1028 | ;; Tarballs used to be available from | ||
| 1029 | ;; <https://www.kernel.org/pub/linux/libs/security/linux-privs/> | ||
| 1030 | ;; but they never came back after kernel.org was compromised. | ||
| 1031 | (uri (string-append | 1028 | (uri (string-append |
| 1032 | "mirror://debian/pool/main/libc/libcap2/libcap2_" | 1029 | "mirror://kernel.org/linux/libs/security/linux-privs/" |
| 1033 | version ".orig.tar.gz")) | 1030 | "libcap2/libcap-" version ".tar.xz")) |
| 1034 | (sha256 | 1031 | (sha256 |
| 1035 | (base32 | 1032 | (base32 |
| 1036 | "07vjhkznm82p8dm4w6j8mmg7h5c70lp5s9bwwfdmgwpbixfydjp1")))) | 1033 | "0rbc9qbqs5bp9am9s9g83wxj5k4ixps2agy9dxr1v1fwg27mdr6f")))) |
| 1037 | (build-system gnu-build-system) | 1034 | (build-system gnu-build-system) |
| 1038 | (arguments '(#:phases | 1035 | (arguments '(#:phases |
| 1039 | (modify-phases %standard-phases | 1036 | (modify-phases %standard-phases |
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index 1b70d54c483..b3c86dbebf1 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm | |||
| @@ -115,7 +115,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." | |||
| 115 | #:native-inputs native-inputs)) | 115 | #:native-inputs native-inputs)) |
| 116 | 116 | ||
| 117 | (define %bash-static | 117 | (define %bash-static |
| 118 | (static-package bash-light)) | 118 | (static-package bash-minimal)) |
| 119 | 119 | ||
| 120 | (define %static-inputs | 120 | (define %static-inputs |
| 121 | ;; Packages that are to be used as %BOOTSTRAP-INPUTS. | 121 | ;; Packages that are to be used as %BOOTSTRAP-INPUTS. |
| @@ -253,10 +253,8 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." | |||
| 253 | 253 | ||
| 254 | ;; But of course, there are exceptions to this rule. | 254 | ;; But of course, there are exceptions to this rule. |
| 255 | (let ((grep (assoc-ref %build-inputs "grep"))) | 255 | (let ((grep (assoc-ref %build-inputs "grep"))) |
| 256 | (copy-file (string-append grep "/bin/fgrep") | 256 | (install-file (string-append grep "/bin/fgrep") bin) |
| 257 | (string-append bin "/fgrep")) | 257 | (install-file (string-append grep "/bin/egrep") bin)) |
| 258 | (copy-file (string-append grep "/bin/egrep") | ||
| 259 | (string-append bin "/egrep"))) | ||
| 260 | 258 | ||
| 261 | ;; Clear references to the store path. | 259 | ;; Clear references to the store path. |
| 262 | (for-each remove-store-references | 260 | (for-each remove-store-references |
| @@ -425,8 +423,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." | |||
| 425 | "--disable-libcilkrts" | 423 | "--disable-libcilkrts" |
| 426 | "--disable-libvtv" | 424 | "--disable-libvtv" |
| 427 | "--disable-libssp" | 425 | "--disable-libssp" |
| 428 | "--disable-libquadmath" | 426 | "--disable-libquadmath") |
| 429 | "--disable-decimal-float") | ||
| 430 | (remove (cut string-match "--(.*plugin|enable-languages)" <>) | 427 | (remove (cut string-match "--(.*plugin|enable-languages)" <>) |
| 431 | ,flags))) | 428 | ,flags))) |
| 432 | ((#:phases phases) | 429 | ((#:phases phases) |
| @@ -631,7 +628,8 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." | |||
| 631 | ".tar.xz") | 628 | ".tar.xz") |
| 632 | "." | 629 | "." |
| 633 | ;; avoid non-determinism in the archive | 630 | ;; avoid non-determinism in the archive |
| 634 | "--mtime=@0" "--owner=root:0" "--group=root:0")))))))))) | 631 | "--sort=name" "--mtime=@0" |
| 632 | "--owner=root:0" "--group=root:0")))))))))) | ||
| 635 | 633 | ||
| 636 | (define %bootstrap-binaries-tarball | 634 | (define %bootstrap-binaries-tarball |
| 637 | ;; A tarball with the statically-linked bootstrap binaries. | 635 | ;; A tarball with the statically-linked bootstrap binaries. |
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index b56ca4057d3..45fda144be7 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm | |||
| @@ -1828,21 +1828,17 @@ specifications.") | |||
| 1828 | (string-append lib "/liblpsolve55.a")) | 1828 | (string-append lib "/liblpsolve55.a")) |
| 1829 | (copy-file "lpsolve55/bin/ux64/liblpsolve55.so" | 1829 | (copy-file "lpsolve55/bin/ux64/liblpsolve55.so" |
| 1830 | (string-append lib "/liblpsolve55.so")) | 1830 | (string-append lib "/liblpsolve55.so")) |
| 1831 | (mkdir-p bin) | 1831 | (install-file "lp_solve/bin/ux64/lp_solve" bin) |
| 1832 | (copy-file "lp_solve/bin/ux64/lp_solve" | 1832 | |
| 1833 | (string-append bin "/lp_solve")) | ||
| 1834 | (mkdir-p include) | ||
| 1835 | ;; Install a subset of the header files as on Debian | 1833 | ;; Install a subset of the header files as on Debian |
| 1836 | ;; (plus lp_bit.h, which matches the regular expression). | 1834 | ;; (plus lp_bit.h, which matches the regular expression). |
| 1837 | (for-each | 1835 | (for-each (lambda (name) |
| 1838 | (lambda (name) | 1836 | (install-file name include)) |
| 1839 | (copy-file name (string-append include "/" name))) | 1837 | (find-files "." "lp_[HMSa-z].*\\.h$")) |
| 1840 | (find-files "." "lp_[HMSa-z].*\\.h$")) | ||
| 1841 | (with-directory-excursion "shared" | 1838 | (with-directory-excursion "shared" |
| 1842 | (for-each | 1839 | (for-each (lambda (name) |
| 1843 | (lambda (name) | 1840 | (install-file name include)) |
| 1844 | (copy-file name (string-append include "/" name))) | 1841 | (find-files "." "\\.h$"))) |
| 1845 | (find-files "." "\\.h$"))) | ||
| 1846 | #t)))))) | 1842 | #t)))))) |
| 1847 | (home-page "http://lpsolve.sourceforge.net/") | 1843 | (home-page "http://lpsolve.sourceforge.net/") |
| 1848 | (synopsis "Mixed integer linear programming (MILP) solver") | 1844 | (synopsis "Mixed integer linear programming (MILP) solver") |
diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm index ddd90fb72af..d5ca1555dbe 100644 --- a/gnu/packages/mp3.scm +++ b/gnu/packages/mp3.scm | |||
| @@ -435,7 +435,7 @@ format.") | |||
| 435 | (let* ((out (assoc-ref outputs "out")) | 435 | (let* ((out (assoc-ref outputs "out")) |
| 436 | (bin (string-append out "/bin"))) | 436 | (bin (string-append out "/bin"))) |
| 437 | (mkdir-p bin) | 437 | (mkdir-p bin) |
| 438 | (copy-file "mpc123" (string-append bin "/mpc123")))) | 438 | (install-file "mpc123" bin))) |
| 439 | %standard-phases)) | 439 | %standard-phases)) |
| 440 | #:tests? #f)) | 440 | #:tests? #f)) |
| 441 | 441 | ||
diff --git a/gnu/packages/ncurses.scm b/gnu/packages/ncurses.scm index 180cdde19f5..2b0d4426642 100644 --- a/gnu/packages/ncurses.scm +++ b/gnu/packages/ncurses.scm | |||
| @@ -28,21 +28,17 @@ | |||
| 28 | '(lambda _ | 28 | '(lambda _ |
| 29 | (for-each patch-makefile-SHELL | 29 | (for-each patch-makefile-SHELL |
| 30 | (find-files "." "Makefile.in")))) | 30 | (find-files "." "Makefile.in")))) |
| 31 | (configure-phase | 31 | (remove-shebang-phase |
| 32 | '(lambda* (#:key inputs outputs configure-flags | 32 | '(lambda _ |
| 33 | #:allow-other-keys) | 33 | ;; To avoid retaining a reference to the bootstrap Bash via the |
| 34 | ;; The `ncursesw5-config' has a #!/bin/sh. We want to patch | 34 | ;; shebang of the 'ncursesw5-config' script, simply remove that |
| 35 | ;; it to point to libc's embedded Bash, to avoid retaining a | 35 | ;; shebang: it'll work just as well without it. |
| 36 | ;; reference to the bootstrap Bash. | 36 | (substitute* "misc/ncurses-config.in" |
| 37 | (let* ((libc (assoc-ref inputs "libc")) | 37 | (("#!@SHELL@") |
| 38 | (bash (string-append libc "/bin/bash")) | 38 | "# No shebang here, use /bin/sh!\n") |
| 39 | (out (assoc-ref outputs "out"))) | 39 | (("@SHELL@ \\$0") |
| 40 | (format #t "configure flags: ~s~%" configure-flags) | 40 | "$0")) |
| 41 | (zero? (apply system* bash "./configure" | 41 | #t)) |
| 42 | (string-append "SHELL=" bash) | ||
| 43 | (string-append "CONFIG_SHELL=" bash) | ||
| 44 | (string-append "--prefix=" out) | ||
| 45 | configure-flags))))) | ||
| 46 | (post-install-phase | 42 | (post-install-phase |
| 47 | '(lambda* (#:key outputs #:allow-other-keys) | 43 | '(lambda* (#:key outputs #:allow-other-keys) |
| 48 | (let ((out (assoc-ref outputs "out"))) | 44 | (let ((out (assoc-ref outputs "out"))) |
| @@ -56,9 +52,9 @@ | |||
| 56 | (define lib.a | 52 | (define lib.a |
| 57 | (string-append "lib" lib ".a")) | 53 | (string-append "lib" lib ".a")) |
| 58 | (define libw.so.x | 54 | (define libw.so.x |
| 59 | (string-append "lib" lib "w.so.5")) | 55 | (string-append "lib" lib "w.so.6")) |
| 60 | (define lib.so.x | 56 | (define lib.so.x |
| 61 | (string-append "lib" lib ".so.5")) | 57 | (string-append "lib" lib ".so.6")) |
| 62 | (define lib.so | 58 | (define lib.so |
| 63 | (string-append "lib" lib ".so")) | 59 | (string-append "lib" lib ".so")) |
| 64 | 60 | ||
| @@ -73,14 +69,14 @@ | |||
| 73 | '("curses" "ncurses" "form" "panel" "menu"))))))) | 69 | '("curses" "ncurses" "form" "panel" "menu"))))))) |
| 74 | (package | 70 | (package |
| 75 | (name "ncurses") | 71 | (name "ncurses") |
| 76 | (version "5.9") | 72 | (version "6.0") |
| 77 | (source (origin | 73 | (source (origin |
| 78 | (method url-fetch) | 74 | (method url-fetch) |
| 79 | (uri (string-append "mirror://gnu/ncurses/ncurses-" | 75 | (uri (string-append "mirror://gnu/ncurses/ncurses-" |
| 80 | version ".tar.gz")) | 76 | version ".tar.gz")) |
| 81 | (sha256 | 77 | (sha256 |
| 82 | (base32 | 78 | (base32 |
| 83 | "0fsn7xis81za62afan0vvm38bvgzg5wfmv1m86flqcj0nj7jjilh")))) | 79 | "0q3jck7lna77z5r42f13c4xglc7azd19pxfrjrpgp2yf615w4lgm")))) |
| 84 | (build-system gnu-build-system) | 80 | (build-system gnu-build-system) |
| 85 | (arguments | 81 | (arguments |
| 86 | `(#:configure-flags | 82 | `(#:configure-flags |
| @@ -90,37 +86,20 @@ | |||
| 90 | ;; what users expect. | 86 | ;; what users expect. |
| 91 | ,(string-append "--includedir=" (assoc-ref %outputs "out") | 87 | ,(string-append "--includedir=" (assoc-ref %outputs "out") |
| 92 | "/include") | 88 | "/include") |
| 89 | "--enable-overwrite" ;really honor --includedir | ||
| 93 | 90 | ||
| 94 | ;; Make sure programs like 'tic', 'reset', and 'clear' have a | 91 | ;; Make sure programs like 'tic', 'reset', and 'clear' have a |
| 95 | ;; correct RUNPATH. | 92 | ;; correct RUNPATH. |
| 96 | ,(string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") | 93 | ,(string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") |
| 97 | "/lib") | 94 | "/lib")) |
| 98 | |||
| 99 | ;; C++ bindings fail to build on | ||
| 100 | ;; `i386-pc-solaris2.11' with GCC 3.4.3: | ||
| 101 | ;; <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6395191>. | ||
| 102 | ,,@(if (string=? (%current-system) "i686-solaris") | ||
| 103 | '("--without-cxx-binding") | ||
| 104 | '())) | ||
| 105 | #:tests? #f ; no "check" target | 95 | #:tests? #f ; no "check" target |
| 106 | #:phases ,(if (%current-target-system) | 96 | #:phases (modify-phases %standard-phases |
| 107 | 97 | (add-after 'install 'post-install | |
| 108 | `(alist-cons-before ; cross build | 98 | ,post-install-phase) |
| 109 | 'configure 'patch-makefile-SHELL | 99 | (add-before 'configure 'patch-makefile-SHELL |
| 110 | ,patch-makefile-phase | 100 | ,patch-makefile-phase) |
| 111 | (alist-cons-after | 101 | (add-after 'unpack 'remove-unneeded-shebang |
| 112 | 'install 'post-install ,post-install-phase | 102 | ,remove-shebang-phase)))) |
| 113 | %standard-phases)) | ||
| 114 | |||
| 115 | `(alist-cons-after ; native build | ||
| 116 | 'install 'post-install ,post-install-phase | ||
| 117 | (alist-cons-before | ||
| 118 | 'configure 'patch-makefile-SHELL | ||
| 119 | ,patch-makefile-phase | ||
| 120 | (alist-replace | ||
| 121 | 'configure | ||
| 122 | ,configure-phase | ||
| 123 | %standard-phases)))))) | ||
| 124 | (self-native-input? #t) ; for `tic' | 103 | (self-native-input? #t) ; for `tic' |
| 125 | (synopsis "Terminal emulation (termcap, terminfo) library") | 104 | (synopsis "Terminal emulation (termcap, terminfo) library") |
| 126 | (description | 105 | (description |
diff --git a/gnu/packages/ninja.scm b/gnu/packages/ninja.scm index a0eb109bbb9..ea5488afc9d 100644 --- a/gnu/packages/ninja.scm +++ b/gnu/packages/ninja.scm | |||
| @@ -66,11 +66,8 @@ | |||
| 66 | (let* ((out (assoc-ref outputs "out")) | 66 | (let* ((out (assoc-ref outputs "out")) |
| 67 | (bin (string-append out "/bin")) | 67 | (bin (string-append out "/bin")) |
| 68 | (doc (string-append out "/share/doc/ninja"))) | 68 | (doc (string-append out "/share/doc/ninja"))) |
| 69 | (mkdir-p bin) | 69 | (install-file "ninja" bin) |
| 70 | (copy-file "ninja" (string-append bin "/ninja")) | 70 | (install-file "doc/manual.asciidoc" doc) |
| 71 | (mkdir-p doc) | ||
| 72 | (copy-file "doc/manual.asciidoc" | ||
| 73 | (string-append doc "/manual.asciidoc")) | ||
| 74 | #t)))))) | 71 | #t)))))) |
| 75 | (home-page "http://martine.github.io/ninja/") | 72 | (home-page "http://martine.github.io/ninja/") |
| 76 | (synopsis "Small build system") | 73 | (synopsis "Small build system") |
diff --git a/gnu/packages/openldap.scm b/gnu/packages/openldap.scm index bbc3ebdd8f1..d416a43857e 100644 --- a/gnu/packages/openldap.scm +++ b/gnu/packages/openldap.scm | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | (define-public openldap | 34 | (define-public openldap |
| 35 | (package | 35 | (package |
| 36 | (name "openldap") | 36 | (name "openldap") |
| 37 | (version "2.4.40") | 37 | (version "2.4.42") |
| 38 | (source (origin | 38 | (source (origin |
| 39 | (method url-fetch) | 39 | (method url-fetch) |
| 40 | 40 | ||
| @@ -51,7 +51,7 @@ | |||
| 51 | "openldap-release/openldap-" version ".tgz"))) | 51 | "openldap-release/openldap-" version ".tgz"))) |
| 52 | (sha256 | 52 | (sha256 |
| 53 | (base32 | 53 | (base32 |
| 54 | "1nyslrgwxwilgv5sixc37svls5rbvhsv9drb7hlrjr2vqaji29ni")))) | 54 | "0qwfpb5ipp2l76v11arghq5mr0sjc6xhjfg8a0kgsaw5qpib1dzf")))) |
| 55 | (build-system gnu-build-system) | 55 | (build-system gnu-build-system) |
| 56 | (inputs `(("bdb" ,bdb) | 56 | (inputs `(("bdb" ,bdb) |
| 57 | ("openssl" ,openssl) | 57 | ("openssl" ,openssl) |
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index f7af1a30dad..8fbe5b3064f 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm | |||
| @@ -176,7 +176,7 @@ the Nix package manager.") | |||
| 176 | ;; | 176 | ;; |
| 177 | ;; Note: use a short commit id; when using the long one, the limit on socket | 177 | ;; Note: use a short commit id; when using the long one, the limit on socket |
| 178 | ;; file names is exceeded while running the tests. | 178 | ;; file names is exceeded while running the tests. |
| 179 | (let ((commit "5d09263")) | 179 | (let ((commit "abbe2c6")) |
| 180 | (package (inherit guix-0.8.3) | 180 | (package (inherit guix-0.8.3) |
| 181 | (version (string-append "0.8.3." commit)) | 181 | (version (string-append "0.8.3." commit)) |
| 182 | (source (origin | 182 | (source (origin |
| @@ -186,7 +186,7 @@ the Nix package manager.") | |||
| 186 | (commit commit))) | 186 | (commit commit))) |
| 187 | (sha256 | 187 | (sha256 |
| 188 | (base32 | 188 | (base32 |
| 189 | "0v5g90di91j218x620shib7xjrjd5dkk4h1zrlg98hdmbgxq5s3j")) | 189 | "1zgjj5knpz3qbbqdjm4yh436bzfgasc6p0k3xnx58hfjd88mdsga")) |
| 190 | (file-name (string-append "guix-" version "-checkout")))) | 190 | (file-name (string-append "guix-" version "-checkout")))) |
| 191 | (arguments | 191 | (arguments |
| 192 | (substitute-keyword-arguments (package-arguments guix-0.8.3) | 192 | (substitute-keyword-arguments (package-arguments guix-0.8.3) |
diff --git a/gnu/packages/patches/acl-hurd-path-max.patch b/gnu/packages/patches/acl-hurd-path-max.patch new file mode 100644 index 00000000000..89cb3a38d76 --- /dev/null +++ b/gnu/packages/patches/acl-hurd-path-max.patch | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636512 | ||
| 2 | |||
| 3 | From: Svante Signell <srs@kth.se> | ||
| 4 | Subject: acl: Fix FTBFS on hurd-i386 | ||
| 5 | Date: Wed, 03 Aug 2011 19:36:27 +0200 | ||
| 6 | |||
| 7 | Currently acl does not compile on hurd-i386. The problem is a PATH_MAX | ||
| 8 | definition which is not supported on GNU/Hurd. | ||
| 9 | |||
| 10 | Index: acl-2.2.52/setfacl/parse.c | ||
| 11 | =================================================================== | ||
| 12 | --- acl-2.2.52/setfacl/parse.c | ||
| 13 | +++ acl-2.2.52/setfacl/parse.c | ||
| 14 | @@ -419,7 +419,13 @@ read_acl_comments( | ||
| 15 | bytes for "# file: ". Not a good solution but for now it is the | ||
| 16 | best I can do without too much impact on the code. [tw] | ||
| 17 | */ | ||
| 18 | + | ||
| 19 | +#ifdef __GNU__ | ||
| 20 | + char *linebuf; | ||
| 21 | + size_t dummy = 0; | ||
| 22 | +#else | ||
| 23 | char linebuf[(4*PATH_MAX)+9]; | ||
| 24 | +#endif | ||
| 25 | char *cp; | ||
| 26 | char *p; | ||
| 27 | int comments_read = 0; | ||
| 28 | @@ -449,9 +455,13 @@ read_acl_comments( | ||
| 29 | if (line) | ||
| 30 | (*line)++; | ||
| 31 | |||
| 32 | +#ifdef __GNU__ | ||
| 33 | + if (getline(&linebuf, &dummy, file) == -1) | ||
| 34 | + break; | ||
| 35 | +#else | ||
| 36 | if (fgets(linebuf, sizeof(linebuf), file) == NULL) | ||
| 37 | break; | ||
| 38 | - | ||
| 39 | +#endif | ||
| 40 | comments_read = 1; | ||
| 41 | |||
| 42 | p = strrchr(linebuf, '\0'); | ||
| 43 | @@ -473,7 +483,12 @@ read_acl_comments( | ||
| 44 | goto fail; | ||
| 45 | *path_p = (char*)malloc(strlen(cp)+1); | ||
| 46 | if (!*path_p) | ||
| 47 | + { | ||
| 48 | +#ifdef __GNU__ | ||
| 49 | + free (linebuf); | ||
| 50 | +#endif | ||
| 51 | return -1; | ||
| 52 | + } | ||
| 53 | strcpy(*path_p, cp); | ||
| 54 | } | ||
| 55 | } else if (strncmp(cp, "owner:", 6) == 0) { | ||
| 56 | @@ -522,13 +537,24 @@ read_acl_comments( | ||
| 57 | } | ||
| 58 | } | ||
| 59 | if (ferror(file)) | ||
| 60 | + { | ||
| 61 | +#ifdef __GNU__ | ||
| 62 | + free (linebuf); | ||
| 63 | +#endif | ||
| 64 | return -1; | ||
| 65 | + } | ||
| 66 | +#ifdef __GNU__ | ||
| 67 | + free (linebuf); | ||
| 68 | +#endif | ||
| 69 | return comments_read; | ||
| 70 | fail: | ||
| 71 | if (path_p && *path_p) { | ||
| 72 | free(*path_p); | ||
| 73 | *path_p = NULL; | ||
| 74 | } | ||
| 75 | +#ifdef __GNU__ | ||
| 76 | + free (linebuf); | ||
| 77 | +#endif | ||
| 78 | return -EINVAL; | ||
| 79 | } | ||
| 80 | |||
diff --git a/gnu/packages/patches/coreutils-racy-tail-test.patch b/gnu/packages/patches/coreutils-racy-tail-test.patch new file mode 100644 index 00000000000..91640513e4d --- /dev/null +++ b/gnu/packages/patches/coreutils-racy-tail-test.patch | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | Skip this test, which uncovers a race condition in how 'tail' handles | ||
| 2 | file deletion. See <http://bugs.gnu.org/21460>. | ||
| 3 | |||
| 4 | --- a/tests/tail-2/assert.sh | ||
| 5 | +++ b/tests/tail-2/assert.sh | ||
| 6 | @@ -16,6 +16,7 @@ | ||
| 7 | # You should have received a copy of the GNU General Public License | ||
| 8 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 9 | |||
| 10 | +exit 77 # see <http://bugs.gnu.org/21460> | ||
| 11 | |||
| 12 | # This test fails with tail from textutils-2.0. | ||
| 13 | # It would get something like this: | ||
diff --git a/gnu/packages/patches/glibc-hurd-extern-inline.patch b/gnu/packages/patches/glibc-hurd-extern-inline.patch new file mode 100644 index 00000000000..a609b1f54a7 --- /dev/null +++ b/gnu/packages/patches/glibc-hurd-extern-inline.patch | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | This changes the way _EXTERN_INLINE is defined so we can | ||
| 2 | avoid external definition errors. | ||
| 3 | https://lists.gnu.org/archive/html/bug-hurd/2014-04/msg00002.html | ||
| 4 | |||
| 5 | diff --git a/signal/sigsetops.c b/signal/sigsetops.c | ||
| 6 | index 0317662..b92c296 100644 | ||
| 7 | --- a/signal/sigsetops.c | ||
| 8 | +++ b/signal/sigsetops.c | ||
| 9 | @@ -3,7 +3,9 @@ | ||
| 10 | |||
| 11 | #include <features.h> | ||
| 12 | |||
| 13 | -#define _EXTERN_INLINE | ||
| 14 | +#ifndef _EXTERN_INLINE | ||
| 15 | +#define _EXTERN_INLINE __extern_inline | ||
| 16 | +#endif | ||
| 17 | #ifndef __USE_EXTERN_INLINES | ||
| 18 | # define __USE_EXTERN_INLINES 1 | ||
| 19 | #endif | ||
| 20 | |||
| 21 | Link libmachuser and libhurduser automatically with libc, since they are | ||
| 22 | considered a standard part of the API in GNU-land. | ||
| 23 | |||
| 24 | --- a/Makerules | ||
| 25 | +++ b/Makerules | ||
| 26 | @@ -978,6 +978,9 @@ | ||
| 27 | '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\ | ||
| 28 | ' AS_NEEDED (' $(rtlddir)/$(rtld-installed-name) ') )' \ | ||
| 29 | ) > $@.new | ||
| 30 | +ifeq ($(patsubst gnu%,,$(config-os)),) | ||
| 31 | + echo 'INPUT ( AS_NEEDED ( -lmachuser -lhurduser ) )' >> $@.new | ||
| 32 | +endif | ||
| 33 | mv -f $@.new $@ | ||
| 34 | |||
| 35 | endif \ No newline at end of file | ||
diff --git a/gnu/packages/patches/glibc-locales.patch b/gnu/packages/patches/glibc-locales.patch index 1d254e1c1df..1bcf12bf6f0 100644 --- a/gnu/packages/patches/glibc-locales.patch +++ b/gnu/packages/patches/glibc-locales.patch | |||
| @@ -9,9 +9,9 @@ in a package separate from glibc. | |||
| 9 | because otherwise, 'localedef' fails with: | 9 | because otherwise, 'localedef' fails with: |
| 10 | "cannot write output files to `(null)'". | 10 | "cannot write output files to `(null)'". |
| 11 | 11 | ||
| 12 | --- glibc-2.20/localedata/Makefile 2014-09-07 10:09:09.000000000 +0200 | 12 | --- glibc-2.22/localedata/Makefile 1970-01-01 01:00:00.000000000 +0100 |
| 13 | +++ glibc-2.20/localedata/Makefile 2015-02-11 10:23:55.560545568 +0100 | 13 | +++ glibc-2.22/localedata/Makefile 2015-09-25 14:18:34.698941752 +0200 |
| 14 | @@ -217,7 +217,7 @@ INSTALL-SUPPORTED-LOCALES=$(addprefix in | 14 | @@ -195,7 +195,7 @@ INSTALL-SUPPORTED-LOCALES=$(addprefix in |
| 15 | 15 | ||
| 16 | # Sometimes the whole collection of locale files should be installed. | 16 | # Sometimes the whole collection of locale files should be installed. |
| 17 | LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \ | 17 | LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \ |
| @@ -20,12 +20,12 @@ in a package separate from glibc. | |||
| 20 | install-locales: $(INSTALL-SUPPORTED-LOCALES) | 20 | install-locales: $(INSTALL-SUPPORTED-LOCALES) |
| 21 | 21 | ||
| 22 | install-locales-dir: | 22 | install-locales-dir: |
| 23 | @@ -234,7 +234,7 @@ $(INSTALL-SUPPORTED-LOCALES): install-lo | 23 | @@ -212,7 +212,7 @@ $(INSTALL-SUPPORTED-LOCALES): install-lo |
| 24 | input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \ | 24 | input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \ |
| 25 | $(LOCALEDEF) --alias-file=../intl/locale.alias \ | 25 | $(LOCALEDEF) --alias-file=../intl/locale.alias \ |
| 26 | -i locales/$$input -c -f charmaps/$$charset \ | 26 | -i locales/$$input -c -f charmaps/$$charset \ |
| 27 | - $(addprefix --prefix=,$(install_root)) $$locale; \ | 27 | - $(addprefix --prefix=,$(install_root)) $$locale \ |
| 28 | + $(addprefix --prefix=,$(install_root)) $(localedir)/$$locale; \ | 28 | + $(addprefix --prefix=,$(install_root)) $(localedir)/$$locale \ |
| 29 | echo ' done'; \ | 29 | && echo ' done'; \ |
| 30 | 30 | ||
| 31 | tst-setlocale-ENV = LC_ALL=ja_JP.EUC-JP | 31 | tst-setlocale-ENV = LC_ALL=ja_JP.EUC-JP |
diff --git a/gnu/packages/patches/glibc-o-largefile.patch b/gnu/packages/patches/glibc-o-largefile.patch new file mode 100644 index 00000000000..2b0ae8c8bb0 --- /dev/null +++ b/gnu/packages/patches/glibc-o-largefile.patch | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | This fixes <https://sourceware.org/bugzilla/show_bug.cgi?id=18781> | ||
| 2 | whereby, on 32-bit platforms, libc 2.22 would fail to pass O_LARGEFILE | ||
| 3 | to 'openat'. This was caught by 'tests/sparse03.at' in the tar | ||
| 4 | test suite. | ||
| 5 | |||
| 6 | commit eb32b0d40308166c4d8f6330cc2958cb1e545075 | ||
| 7 | Author: Andreas Schwab <schwab@suse.de> | ||
| 8 | Date: Mon Aug 10 14:12:47 2015 +0200 | ||
| 9 | |||
| 10 | Readd O_LARGEFILE flag for openat64 (bug 18781) | ||
| 11 | |||
| 12 | --- a/sysdeps/unix/sysv/linux/openat.c | ||
| 13 | +++ b/sysdeps/unix/sysv/linux/openat.c | ||
| 14 | @@ -68,6 +68,11 @@ __OPENAT (int fd, const char *file, int oflag, ...) | ||
| 15 | va_end (arg); | ||
| 16 | } | ||
| 17 | |||
| 18 | + /* We have to add the O_LARGEFILE flag for openat64. */ | ||
| 19 | +#ifdef MORE_OFLAGS | ||
| 20 | + oflag |= MORE_OFLAGS; | ||
| 21 | +#endif | ||
| 22 | + | ||
| 23 | return SYSCALL_CANCEL (openat, fd, file, oflag, mode); | ||
| 24 | } | ||
| 25 | libc_hidden_def (__OPENAT) | ||
diff --git a/gnu/packages/patches/icu4c-CVE-2014-6585.patch b/gnu/packages/patches/icu4c-CVE-2014-6585.patch new file mode 100644 index 00000000000..d21a0d0ba18 --- /dev/null +++ b/gnu/packages/patches/icu4c-CVE-2014-6585.patch | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | Copied from Debian. | ||
| 2 | |||
| 3 | description: out-of-bounds read | ||
| 4 | origin: https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2014-6585 | ||
| 5 | |||
| 6 | --- a/source/layout/LETableReference.h | ||
| 7 | +++ b/source/layout/LETableReference.h | ||
| 8 | @@ -322,7 +322,12 @@ LE_TRACE_TR("INFO: new RTAO") | ||
| 9 | } | ||
| 10 | |||
| 11 | const T& operator()(le_uint32 i, LEErrorCode &success) const { | ||
| 12 | - return *getAlias(i,success); | ||
| 13 | + const T *ret = getAlias(i,success); | ||
| 14 | + if (LE_FAILURE(success) || ret==NULL) { | ||
| 15 | + return *(new T()); | ||
| 16 | + } else { | ||
| 17 | + return *ret; | ||
| 18 | + } | ||
| 19 | } | ||
| 20 | |||
| 21 | size_t getOffsetFor(le_uint32 i, LEErrorCode &success) const { | ||
diff --git a/gnu/packages/patches/icu4c-CVE-2015-1270.patch b/gnu/packages/patches/icu4c-CVE-2015-1270.patch new file mode 100644 index 00000000000..2a7658d36ef --- /dev/null +++ b/gnu/packages/patches/icu4c-CVE-2015-1270.patch | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | Copied from Debian. | ||
| 2 | |||
| 3 | diff --git a/source/common/ucnv_io.cpp b/source/common/ucnv_io.cpp | ||
| 4 | index 5dd35d8..4424664 100644 | ||
| 5 | --- a/source/common/ucnv_io.cpp | ||
| 6 | +++ b/source/common/ucnv_io.cpp | ||
| 7 | @@ -744,7 +744,7 @@ ucnv_io_getConverterName(const char *alias, UBool *containsOption, UErrorCode *p | ||
| 8 | * the name begins with 'x-'. If it does, strip it off and try | ||
| 9 | * again. This behaviour is similar to how ICU4J does it. | ||
| 10 | */ | ||
| 11 | - if (aliasTmp[0] == 'x' || aliasTmp[1] == '-') { | ||
| 12 | + if (aliasTmp[0] == 'x' && aliasTmp[1] == '-') { | ||
| 13 | aliasTmp = aliasTmp+2; | ||
| 14 | } else { | ||
| 15 | break; | ||
diff --git a/gnu/packages/patches/imagemagick-test-segv.patch b/gnu/packages/patches/imagemagick-test-segv.patch new file mode 100644 index 00000000000..6626e54828c --- /dev/null +++ b/gnu/packages/patches/imagemagick-test-segv.patch | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | This patch works around a segmentation fault in 'Magick++/tests/color' when | ||
| 2 | running 'Magick++/tests/tests.tap'. Here we get an exception early on, which | ||
| 3 | is supposedly harmless: | ||
| 4 | |||
| 5 | Caught exception: color: UnableToOpenConfigureFile `colors.xml' @ warning/configure.c/GetConfigureOptions/706 | ||
| 6 | |||
| 7 | However, when the stack unwinders run, 'UnregisterDOTImage' gets called even | ||
| 8 | though 'RegisterDOTImage' hadn't been called yet; thus, 'graphic_context' in | ||
| 9 | coders/dot.c is NULL, leading to the segfault. | ||
| 10 | |||
| 11 | --- ImageMagick-6.9.2-1/coders/dot.c 2015-09-16 17:32:42.900323334 +0200 | ||
| 12 | +++ ImageMagick-6.9.2-1/coders/dot.c 2015-09-16 17:32:48.312367636 +0200 | ||
| 13 | @@ -240,6 +240,7 @@ ModuleExport void UnregisterDOTImage(voi | ||
| 14 | (void) UnregisterMagickInfo("GV"); | ||
| 15 | (void) UnregisterMagickInfo("DOT"); | ||
| 16 | #if defined(MAGICKCORE_GVC_DELEGATE) | ||
| 17 | + if (graphic_context != NULL) | ||
| 18 | gvFreeContext(graphic_context); | ||
| 19 | #endif | ||
| 20 | } | ||
diff --git a/gnu/packages/patches/libpthread-glibc-preparation.patch b/gnu/packages/patches/libpthread-glibc-preparation.patch new file mode 100644 index 00000000000..a43245436c2 --- /dev/null +++ b/gnu/packages/patches/libpthread-glibc-preparation.patch | |||
| @@ -0,0 +1,146 @@ | |||
| 1 | This patch helps to integrate the Hurd's libpthread as a libc add-on. | ||
| 2 | |||
| 3 | It writes the configure file, removes an rpc call not yet | ||
| 4 | implemented on the version of gnumach we use and defines | ||
| 5 | a missing macro. | ||
| 6 | |||
| 7 | diff --git a/libpthread/configure b/libpthread/configure | ||
| 8 | new file mode 100644 | ||
| 9 | index 0000000..2cdbc71 | ||
| 10 | --- /dev/null | ||
| 11 | +++ b/libpthread/configure | ||
| 12 | @@ -0,0 +1,2 @@ | ||
| 13 | +libc_add_on_canonical=libpthread | ||
| 14 | +libc_add_on_subdirs=. | ||
| 15 | -- | ||
| 16 | 1.9.0 | ||
| 17 | |||
| 18 | We are using a version of GNU Mach that lacks 'thread_terminate_release' | ||
| 19 | (not introduced yet). The 'thread_terminate' RPC call will be enough for | ||
| 20 | our needs. | ||
| 21 | See <http://lists.gnu.org/archive/html/bug-hurd/2014-05/msg00127.html>. | ||
| 22 | |||
| 23 | diff --git a/libpthread/sysdeps/mach/pt-thread-terminate.c b/libpthread/sysdeps/mach/pt-thread-terminate.c | ||
| 24 | index 6672065..129a611 100644 | ||
| 25 | --- a/libpthread/sysdeps/mach/pt-thread-terminate.c | ||
| 26 | +++ b/libpthread/sysdeps/mach/pt-thread-terminate.c | ||
| 27 | @@ -70,9 +70,9 @@ __pthread_thread_terminate (struct __pthread *thread) | ||
| 28 | __mach_port_destroy (__mach_task_self (), wakeup_port); | ||
| 29 | |||
| 30 | /* Terminate and release all that's left. */ | ||
| 31 | - err = __thread_terminate_release (kernel_thread, mach_task_self (), | ||
| 32 | - kernel_thread, reply_port, | ||
| 33 | - stackaddr, stacksize); | ||
| 34 | + /* err = __thread_terminate_release (kernel_thread, mach_task_self (), */ | ||
| 35 | + /* kernel_thread, reply_port, */ | ||
| 36 | + /* stackaddr, stacksize); */ | ||
| 37 | |||
| 38 | /* The kernel does not support it yet. Leak but at least terminate | ||
| 39 | correctly. */ | ||
| 40 | -- | ||
| 41 | 1.9.2 | ||
| 42 | |||
| 43 | The __PTHREAD_SPIN_LOCK_INITIALIZER definition is missing, so we | ||
| 44 | define it to __SPIN_LOCK_INITIALIZER which already exists. | ||
| 45 | See <http://lists.gnu.org/archive/html/commit-hurd/2009-04/msg00006.html>. | ||
| 46 | |||
| 47 | diff --git a/libpthread/sysdeps/mach/bits/spin-lock.h b/libpthread/sysdeps/mach/bits/spin-lock.h | ||
| 48 | index 537dac9..fca0e5a 100644 | ||
| 49 | --- a/libpthread/sysdeps/mach/bits/spin-lock.h | ||
| 50 | +++ b/libpthread/sysdeps/mach/bits/spin-lock.h | ||
| 51 | @@ -30,7 +30,7 @@ typedef __spin_lock_t __pthread_spinlock_t; | ||
| 52 | |||
| 53 | /* Initializer for a spin lock object. */ | ||
| 54 | #ifndef __PTHREAD_SPIN_LOCK_INITIALIZER | ||
| 55 | -#error __PTHREAD_SPIN_LOCK_INITIALIZER undefined: should be defined by <lock-intern.h>. | ||
| 56 | +#define __PTHREAD_SPIN_LOCK_INITIALIZER __SPIN_LOCK_INITIALIZER | ||
| 57 | #endif | ||
| 58 | |||
| 59 | __END_DECLS | ||
| 60 | |||
| 61 | The version of the glibc we use doesn't include the shm-directory.c file and does | ||
| 62 | not yet support IS_IN. | ||
| 63 | See <https://lists.gnu.org/archive/html/bug-hurd/2015-03/msg00078.html> | ||
| 64 | |||
| 65 | diff --git a/libpthread/Makefile b/libpthread/Makefile | ||
| 66 | index 2906788..b8dee58 100644 | ||
| 67 | --- a/libpthread/Makefile | ||
| 68 | +++ b/libpthread/Makefile | ||
| 69 | @@ -149,8 +149,6 @@ libpthread-routines := pt-attr pt-attr-destroy pt-attr-getdetachstate \ | ||
| 70 | sem-post sem-timedwait sem-trywait sem-unlink \ | ||
| 71 | sem-wait \ | ||
| 72 | \ | ||
| 73 | - shm-directory \ | ||
| 74 | - \ | ||
| 75 | cthreads-compat \ | ||
| 76 | $(SYSDEPS) | ||
| 77 | |||
| 78 | -- | ||
| 79 | 2.3.6 | ||
| 80 | |||
| 81 | diff --git a/libpthread/pthread/pt-create.c b/libpthread/pthread/pt-create.c | ||
| 82 | index d88afae..84044dc 100644 | ||
| 83 | --- a/libpthread/pthread/pt-create.c | ||
| 84 | +++ b/libpthread/pthread/pt-create.c | ||
| 85 | @@ -28,7 +28,7 @@ | ||
| 86 | |||
| 87 | #include <pt-internal.h> | ||
| 88 | |||
| 89 | -#if IS_IN (libpthread) | ||
| 90 | +#ifdef IS_IN_libpthread | ||
| 91 | # include <ctype.h> | ||
| 92 | #endif | ||
| 93 | #ifdef HAVE_USELOCALE | ||
| 94 | @@ -50,7 +50,7 @@ entry_point (struct __pthread *self, void *(*start_routine)(void *), void *arg) | ||
| 95 | __resp = &self->res_state; | ||
| 96 | #endif | ||
| 97 | |||
| 98 | -#if IS_IN (libpthread) | ||
| 99 | +#ifdef IS_IN_libpthread | ||
| 100 | /* Initialize pointers to locale data. */ | ||
| 101 | __ctype_init (); | ||
| 102 | #endif | ||
| 103 | diff --git a/libpthread/pthread/pt-initialize.c b/libpthread/pthread/pt-initialize.c | ||
| 104 | index 9e5404b..b9cacbd 100644 | ||
| 105 | --- a/libpthread/pthread/pt-initialize.c | ||
| 106 | +++ b/libpthread/pthread/pt-initialize.c | ||
| 107 | @@ -28,7 +28,7 @@ | ||
| 108 | |||
| 109 | DEFINE_HOOK (__pthread_init, (void)); | ||
| 110 | |||
| 111 | -#if IS_IN (libpthread) | ||
| 112 | +#ifdef IS_IN_libpthread | ||
| 113 | static const struct pthread_functions pthread_functions = | ||
| 114 | { | ||
| 115 | .ptr_pthread_attr_destroy = __pthread_attr_destroy, | ||
| 116 | @@ -81,7 +81,7 @@ static const struct pthread_functions pthread_functions = | ||
| 117 | void | ||
| 118 | ___pthread_init (void) | ||
| 119 | { | ||
| 120 | -#if IS_IN (libpthread) | ||
| 121 | +#ifdef IS_IN_libpthread | ||
| 122 | __libc_pthread_init(&pthread_functions); | ||
| 123 | #endif | ||
| 124 | RUN_HOOK (__pthread_init, ()); | ||
| 125 | diff --git a/libpthread/pthread/pt-internal.h b/libpthread/pthread/pt-internal.h | ||
| 126 | index 18b5b4c..8cdcfce 100644 | ||
| 127 | --- a/libpthread/pthread/pt-internal.h | ||
| 128 | +++ b/libpthread/pthread/pt-internal.h | ||
| 129 | @@ -35,7 +35,7 @@ | ||
| 130 | #include <pt-sysdep.h> | ||
| 131 | #include <pt-machdep.h> | ||
| 132 | |||
| 133 | -#if IS_IN (libpthread) | ||
| 134 | +#ifdef IS_IN_libpthread | ||
| 135 | # include <ldsodefs.h> | ||
| 136 | #endif | ||
| 137 | |||
| 138 | @@ -60,7 +60,7 @@ enum pthread_state | ||
| 139 | # define PTHREAD_SYSDEP_MEMBERS | ||
| 140 | #endif | ||
| 141 | |||
| 142 | -#if !(IS_IN (libpthread)) | ||
| 143 | +#ifndef IS_IN_libpthread | ||
| 144 | #ifdef ENABLE_TLS | ||
| 145 | /* Type of the TCB. */ | ||
| 146 | typedef struct | ||
diff --git a/gnu/packages/patches/libtiff-CVE-2012-4564.patch b/gnu/packages/patches/libtiff-CVE-2012-4564.patch deleted file mode 100644 index 472f9ca35f1..00000000000 --- a/gnu/packages/patches/libtiff-CVE-2012-4564.patch +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | Copied from Debian | ||
| 2 | |||
| 3 | Index: tiff-4.0.3/tools/ppm2tiff.c | ||
| 4 | =================================================================== | ||
| 5 | --- tiff-4.0.3.orig/tools/ppm2tiff.c 2013-06-23 10:36:50.779629492 -0400 | ||
| 6 | +++ tiff-4.0.3/tools/ppm2tiff.c 2013-06-23 10:36:50.775629494 -0400 | ||
| 7 | @@ -89,6 +89,7 @@ | ||
| 8 | int c; | ||
| 9 | extern int optind; | ||
| 10 | extern char* optarg; | ||
| 11 | + tmsize_t scanline_size; | ||
| 12 | |||
| 13 | if (argc < 2) { | ||
| 14 | fprintf(stderr, "%s: Too few arguments\n", argv[0]); | ||
| 15 | @@ -237,8 +238,16 @@ | ||
| 16 | } | ||
| 17 | if (TIFFScanlineSize(out) > linebytes) | ||
| 18 | buf = (unsigned char *)_TIFFmalloc(linebytes); | ||
| 19 | - else | ||
| 20 | - buf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out)); | ||
| 21 | + else { | ||
| 22 | + scanline_size = TIFFScanlineSize(out); | ||
| 23 | + if (scanline_size != 0) | ||
| 24 | + buf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out)); | ||
| 25 | + else { | ||
| 26 | + fprintf(stderr, "%s: scanline size overflow\n",infile); | ||
| 27 | + (void) TIFFClose(out); | ||
| 28 | + exit(-2); | ||
| 29 | + } | ||
| 30 | + } | ||
| 31 | if (resolution > 0) { | ||
| 32 | TIFFSetField(out, TIFFTAG_XRESOLUTION, resolution); | ||
| 33 | TIFFSetField(out, TIFFTAG_YRESOLUTION, resolution); | ||
diff --git a/gnu/packages/patches/libtiff-CVE-2013-1960.patch b/gnu/packages/patches/libtiff-CVE-2013-1960.patch deleted file mode 100644 index 341063f25d5..00000000000 --- a/gnu/packages/patches/libtiff-CVE-2013-1960.patch +++ /dev/null | |||
| @@ -1,148 +0,0 @@ | |||
| 1 | Copied from Debian | ||
| 2 | |||
| 3 | Index: tiff-4.0.3/tools/tiff2pdf.c | ||
| 4 | =================================================================== | ||
| 5 | --- tiff-4.0.3.orig/tools/tiff2pdf.c 2013-06-23 10:36:50.979629486 -0400 | ||
| 6 | +++ tiff-4.0.3/tools/tiff2pdf.c 2013-06-23 10:36:50.975629486 -0400 | ||
| 7 | @@ -3341,33 +3341,56 @@ | ||
| 8 | uint32 height){ | ||
| 9 | |||
| 10 | tsize_t i=0; | ||
| 11 | - uint16 ri =0; | ||
| 12 | - uint16 v_samp=1; | ||
| 13 | - uint16 h_samp=1; | ||
| 14 | - int j=0; | ||
| 15 | - | ||
| 16 | - i++; | ||
| 17 | - | ||
| 18 | - while(i<(*striplength)){ | ||
| 19 | + | ||
| 20 | + while (i < *striplength) { | ||
| 21 | + tsize_t datalen; | ||
| 22 | + uint16 ri; | ||
| 23 | + uint16 v_samp; | ||
| 24 | + uint16 h_samp; | ||
| 25 | + int j; | ||
| 26 | + int ncomp; | ||
| 27 | + | ||
| 28 | + /* marker header: one or more FFs */ | ||
| 29 | + if (strip[i] != 0xff) | ||
| 30 | + return(0); | ||
| 31 | + i++; | ||
| 32 | + while (i < *striplength && strip[i] == 0xff) | ||
| 33 | + i++; | ||
| 34 | + if (i >= *striplength) | ||
| 35 | + return(0); | ||
| 36 | + /* SOI is the only pre-SOS marker without a length word */ | ||
| 37 | + if (strip[i] == 0xd8) | ||
| 38 | + datalen = 0; | ||
| 39 | + else { | ||
| 40 | + if ((*striplength - i) <= 2) | ||
| 41 | + return(0); | ||
| 42 | + datalen = (strip[i+1] << 8) | strip[i+2]; | ||
| 43 | + if (datalen < 2 || datalen >= (*striplength - i)) | ||
| 44 | + return(0); | ||
| 45 | + } | ||
| 46 | switch( strip[i] ){ | ||
| 47 | - case 0xd8: | ||
| 48 | - /* SOI - start of image */ | ||
| 49 | + case 0xd8: /* SOI - start of image */ | ||
| 50 | _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), 2); | ||
| 51 | *bufferoffset+=2; | ||
| 52 | - i+=2; | ||
| 53 | break; | ||
| 54 | - case 0xc0: | ||
| 55 | - case 0xc1: | ||
| 56 | - case 0xc3: | ||
| 57 | - case 0xc9: | ||
| 58 | - case 0xca: | ||
| 59 | + case 0xc0: /* SOF0 */ | ||
| 60 | + case 0xc1: /* SOF1 */ | ||
| 61 | + case 0xc3: /* SOF3 */ | ||
| 62 | + case 0xc9: /* SOF9 */ | ||
| 63 | + case 0xca: /* SOF10 */ | ||
| 64 | if(no==0){ | ||
| 65 | - _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2); | ||
| 66 | - for(j=0;j<buffer[*bufferoffset+9];j++){ | ||
| 67 | - if( (buffer[*bufferoffset+11+(2*j)]>>4) > h_samp) | ||
| 68 | - h_samp = (buffer[*bufferoffset+11+(2*j)]>>4); | ||
| 69 | - if( (buffer[*bufferoffset+11+(2*j)] & 0x0f) > v_samp) | ||
| 70 | - v_samp = (buffer[*bufferoffset+11+(2*j)] & 0x0f); | ||
| 71 | + _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), datalen+2); | ||
| 72 | + ncomp = buffer[*bufferoffset+9]; | ||
| 73 | + if (ncomp < 1 || ncomp > 4) | ||
| 74 | + return(0); | ||
| 75 | + v_samp=1; | ||
| 76 | + h_samp=1; | ||
| 77 | + for(j=0;j<ncomp;j++){ | ||
| 78 | + uint16 samp = buffer[*bufferoffset+11+(3*j)]; | ||
| 79 | + if( (samp>>4) > h_samp) | ||
| 80 | + h_samp = (samp>>4); | ||
| 81 | + if( (samp & 0x0f) > v_samp) | ||
| 82 | + v_samp = (samp & 0x0f); | ||
| 83 | } | ||
| 84 | v_samp*=8; | ||
| 85 | h_samp*=8; | ||
| 86 | @@ -3381,45 +3404,43 @@ | ||
| 87 | (unsigned char) ((height>>8) & 0xff); | ||
| 88 | buffer[*bufferoffset+6]= | ||
| 89 | (unsigned char) (height & 0xff); | ||
| 90 | - *bufferoffset+=strip[i+2]+2; | ||
| 91 | - i+=strip[i+2]+2; | ||
| 92 | - | ||
| 93 | + *bufferoffset+=datalen+2; | ||
| 94 | + /* insert a DRI marker */ | ||
| 95 | buffer[(*bufferoffset)++]=0xff; | ||
| 96 | buffer[(*bufferoffset)++]=0xdd; | ||
| 97 | buffer[(*bufferoffset)++]=0x00; | ||
| 98 | buffer[(*bufferoffset)++]=0x04; | ||
| 99 | buffer[(*bufferoffset)++]=(ri >> 8) & 0xff; | ||
| 100 | buffer[(*bufferoffset)++]= ri & 0xff; | ||
| 101 | - } else { | ||
| 102 | - i+=strip[i+2]+2; | ||
| 103 | } | ||
| 104 | break; | ||
| 105 | - case 0xc4: | ||
| 106 | - case 0xdb: | ||
| 107 | - _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2); | ||
| 108 | - *bufferoffset+=strip[i+2]+2; | ||
| 109 | - i+=strip[i+2]+2; | ||
| 110 | + case 0xc4: /* DHT */ | ||
| 111 | + case 0xdb: /* DQT */ | ||
| 112 | + _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), datalen+2); | ||
| 113 | + *bufferoffset+=datalen+2; | ||
| 114 | break; | ||
| 115 | - case 0xda: | ||
| 116 | + case 0xda: /* SOS */ | ||
| 117 | if(no==0){ | ||
| 118 | - _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2); | ||
| 119 | - *bufferoffset+=strip[i+2]+2; | ||
| 120 | - i+=strip[i+2]+2; | ||
| 121 | + _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), datalen+2); | ||
| 122 | + *bufferoffset+=datalen+2; | ||
| 123 | } else { | ||
| 124 | buffer[(*bufferoffset)++]=0xff; | ||
| 125 | buffer[(*bufferoffset)++]= | ||
| 126 | (unsigned char)(0xd0 | ((no-1)%8)); | ||
| 127 | - i+=strip[i+2]+2; | ||
| 128 | } | ||
| 129 | - _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), (*striplength)-i-1); | ||
| 130 | - *bufferoffset+=(*striplength)-i-1; | ||
| 131 | + i += datalen + 1; | ||
| 132 | + /* copy remainder of strip */ | ||
| 133 | + _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i]), *striplength - i); | ||
| 134 | + *bufferoffset+= *striplength - i; | ||
| 135 | return(1); | ||
| 136 | default: | ||
| 137 | - i+=strip[i+2]+2; | ||
| 138 | + /* ignore any other marker */ | ||
| 139 | + break; | ||
| 140 | } | ||
| 141 | + i += datalen + 1; | ||
| 142 | } | ||
| 143 | - | ||
| 144 | |||
| 145 | + /* failed to find SOS marker */ | ||
| 146 | return(0); | ||
| 147 | } | ||
| 148 | #endif | ||
diff --git a/gnu/packages/patches/libtiff-CVE-2013-1961.patch b/gnu/packages/patches/libtiff-CVE-2013-1961.patch deleted file mode 100644 index 9c2481ce836..00000000000 --- a/gnu/packages/patches/libtiff-CVE-2013-1961.patch +++ /dev/null | |||
| @@ -1,770 +0,0 @@ | |||
| 1 | Copied from Debian | ||
| 2 | |||
| 3 | Index: tiff-4.0.3/contrib/dbs/xtiff/xtiff.c | ||
| 4 | =================================================================== | ||
| 5 | --- tiff-4.0.3.orig/contrib/dbs/xtiff/xtiff.c 2013-06-23 10:36:51.163629483 -0400 | ||
| 6 | +++ tiff-4.0.3/contrib/dbs/xtiff/xtiff.c 2013-06-23 10:36:51.147629484 -0400 | ||
| 7 | @@ -512,9 +512,9 @@ | ||
| 8 | Arg args[1]; | ||
| 9 | |||
| 10 | if (tfMultiPage) | ||
| 11 | - sprintf(buffer, "%s - page %d", fileName, tfDirectory); | ||
| 12 | + snprintf(buffer, sizeof(buffer), "%s - page %d", fileName, tfDirectory); | ||
| 13 | else | ||
| 14 | - strcpy(buffer, fileName); | ||
| 15 | + snprintf(buffer, sizeof(buffer), "%s", fileName); | ||
| 16 | XtSetArg(args[0], XtNlabel, buffer); | ||
| 17 | XtSetValues(labelWidget, args, 1); | ||
| 18 | } | ||
| 19 | Index: tiff-4.0.3/libtiff/tif_dirinfo.c | ||
| 20 | =================================================================== | ||
| 21 | --- tiff-4.0.3.orig/libtiff/tif_dirinfo.c 2013-06-23 10:36:51.163629483 -0400 | ||
| 22 | +++ tiff-4.0.3/libtiff/tif_dirinfo.c 2013-06-23 10:36:51.147629484 -0400 | ||
| 23 | @@ -711,7 +711,7 @@ | ||
| 24 | * note that this name is a special sign to TIFFClose() and | ||
| 25 | * _TIFFSetupFields() to free the field | ||
| 26 | */ | ||
| 27 | - sprintf(fld->field_name, "Tag %d", (int) tag); | ||
| 28 | + snprintf(fld->field_name, 32, "Tag %d", (int) tag); | ||
| 29 | |||
| 30 | return fld; | ||
| 31 | } | ||
| 32 | Index: tiff-4.0.3/libtiff/tif_codec.c | ||
| 33 | =================================================================== | ||
| 34 | --- tiff-4.0.3.orig/libtiff/tif_codec.c 2013-06-23 10:36:51.163629483 -0400 | ||
| 35 | +++ tiff-4.0.3/libtiff/tif_codec.c 2013-06-23 10:36:51.151629482 -0400 | ||
| 36 | @@ -108,7 +108,8 @@ | ||
| 37 | const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression); | ||
| 38 | char compression_code[20]; | ||
| 39 | |||
| 40 | - sprintf( compression_code, "%d", tif->tif_dir.td_compression ); | ||
| 41 | + snprintf(compression_code, sizeof(compression_code), "%d", | ||
| 42 | + tif->tif_dir.td_compression ); | ||
| 43 | TIFFErrorExt(tif->tif_clientdata, tif->tif_name, | ||
| 44 | "%s compression support is not configured", | ||
| 45 | c ? c->name : compression_code ); | ||
| 46 | Index: tiff-4.0.3/tools/tiffdither.c | ||
| 47 | =================================================================== | ||
| 48 | --- tiff-4.0.3.orig/tools/tiffdither.c 2013-06-23 10:36:51.163629483 -0400 | ||
| 49 | +++ tiff-4.0.3/tools/tiffdither.c 2013-06-23 10:36:51.151629482 -0400 | ||
| 50 | @@ -260,7 +260,7 @@ | ||
| 51 | TIFFSetField(out, TIFFTAG_FILLORDER, fillorder); | ||
| 52 | else | ||
| 53 | CopyField(TIFFTAG_FILLORDER, shortv); | ||
| 54 | - sprintf(thing, "Dithered B&W version of %s", argv[optind]); | ||
| 55 | + snprintf(thing, sizeof(thing), "Dithered B&W version of %s", argv[optind]); | ||
| 56 | TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing); | ||
| 57 | CopyField(TIFFTAG_PHOTOMETRIC, shortv); | ||
| 58 | CopyField(TIFFTAG_ORIENTATION, shortv); | ||
| 59 | Index: tiff-4.0.3/tools/rgb2ycbcr.c | ||
| 60 | =================================================================== | ||
| 61 | --- tiff-4.0.3.orig/tools/rgb2ycbcr.c 2013-06-23 10:36:51.163629483 -0400 | ||
| 62 | +++ tiff-4.0.3/tools/rgb2ycbcr.c 2013-06-23 10:36:51.151629482 -0400 | ||
| 63 | @@ -332,7 +332,8 @@ | ||
| 64 | TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); | ||
| 65 | { char buf[2048]; | ||
| 66 | char *cp = strrchr(TIFFFileName(in), '/'); | ||
| 67 | - sprintf(buf, "YCbCr conversion of %s", cp ? cp+1 : TIFFFileName(in)); | ||
| 68 | + snprintf(buf, sizeof(buf), "YCbCr conversion of %s", | ||
| 69 | + cp ? cp+1 : TIFFFileName(in)); | ||
| 70 | TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, buf); | ||
| 71 | } | ||
| 72 | TIFFSetField(out, TIFFTAG_SOFTWARE, TIFFGetVersion()); | ||
| 73 | Index: tiff-4.0.3/tools/tiff2pdf.c | ||
| 74 | =================================================================== | ||
| 75 | --- tiff-4.0.3.orig/tools/tiff2pdf.c 2013-06-23 10:36:51.163629483 -0400 | ||
| 76 | +++ tiff-4.0.3/tools/tiff2pdf.c 2013-06-23 10:36:51.151629482 -0400 | ||
| 77 | @@ -3630,7 +3630,9 @@ | ||
| 78 | char buffer[16]; | ||
| 79 | int buflen=0; | ||
| 80 | |||
| 81 | - buflen=sprintf(buffer, "%%PDF-%u.%u ", t2p->pdf_majorversion&0xff, t2p->pdf_minorversion&0xff); | ||
| 82 | + buflen = snprintf(buffer, sizeof(buffer), "%%PDF-%u.%u ", | ||
| 83 | + t2p->pdf_majorversion&0xff, | ||
| 84 | + t2p->pdf_minorversion&0xff); | ||
| 85 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 86 | written += t2pWriteFile(output, (tdata_t)"\n%\342\343\317\323\n", 7); | ||
| 87 | |||
| 88 | @@ -3644,10 +3646,10 @@ | ||
| 89 | tsize_t t2p_write_pdf_obj_start(uint32 number, TIFF* output){ | ||
| 90 | |||
| 91 | tsize_t written=0; | ||
| 92 | - char buffer[16]; | ||
| 93 | + char buffer[32]; | ||
| 94 | int buflen=0; | ||
| 95 | |||
| 96 | - buflen=sprintf(buffer, "%lu", (unsigned long)number); | ||
| 97 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)number); | ||
| 98 | written += t2pWriteFile(output, (tdata_t) buffer, buflen ); | ||
| 99 | written += t2pWriteFile(output, (tdata_t) " 0 obj\n", 7); | ||
| 100 | |||
| 101 | @@ -3686,13 +3688,13 @@ | ||
| 102 | written += t2pWriteFile(output, (tdata_t) "/", 1); | ||
| 103 | for (i=0;i<namelen;i++){ | ||
| 104 | if ( ((unsigned char)name[i]) < 0x21){ | ||
| 105 | - sprintf(buffer, "#%.2X", name[i]); | ||
| 106 | + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); | ||
| 107 | buffer[sizeof(buffer) - 1] = '\0'; | ||
| 108 | written += t2pWriteFile(output, (tdata_t) buffer, 3); | ||
| 109 | nextchar=1; | ||
| 110 | } | ||
| 111 | if ( ((unsigned char)name[i]) > 0x7E){ | ||
| 112 | - sprintf(buffer, "#%.2X", name[i]); | ||
| 113 | + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); | ||
| 114 | buffer[sizeof(buffer) - 1] = '\0'; | ||
| 115 | written += t2pWriteFile(output, (tdata_t) buffer, 3); | ||
| 116 | nextchar=1; | ||
| 117 | @@ -3700,57 +3702,57 @@ | ||
| 118 | if (nextchar==0){ | ||
| 119 | switch (name[i]){ | ||
| 120 | case 0x23: | ||
| 121 | - sprintf(buffer, "#%.2X", name[i]); | ||
| 122 | + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); | ||
| 123 | buffer[sizeof(buffer) - 1] = '\0'; | ||
| 124 | written += t2pWriteFile(output, (tdata_t) buffer, 3); | ||
| 125 | break; | ||
| 126 | case 0x25: | ||
| 127 | - sprintf(buffer, "#%.2X", name[i]); | ||
| 128 | + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); | ||
| 129 | buffer[sizeof(buffer) - 1] = '\0'; | ||
| 130 | written += t2pWriteFile(output, (tdata_t) buffer, 3); | ||
| 131 | break; | ||
| 132 | case 0x28: | ||
| 133 | - sprintf(buffer, "#%.2X", name[i]); | ||
| 134 | + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); | ||
| 135 | buffer[sizeof(buffer) - 1] = '\0'; | ||
| 136 | written += t2pWriteFile(output, (tdata_t) buffer, 3); | ||
| 137 | break; | ||
| 138 | case 0x29: | ||
| 139 | - sprintf(buffer, "#%.2X", name[i]); | ||
| 140 | + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); | ||
| 141 | buffer[sizeof(buffer) - 1] = '\0'; | ||
| 142 | written += t2pWriteFile(output, (tdata_t) buffer, 3); | ||
| 143 | break; | ||
| 144 | case 0x2F: | ||
| 145 | - sprintf(buffer, "#%.2X", name[i]); | ||
| 146 | + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); | ||
| 147 | buffer[sizeof(buffer) - 1] = '\0'; | ||
| 148 | written += t2pWriteFile(output, (tdata_t) buffer, 3); | ||
| 149 | break; | ||
| 150 | case 0x3C: | ||
| 151 | - sprintf(buffer, "#%.2X", name[i]); | ||
| 152 | + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); | ||
| 153 | buffer[sizeof(buffer) - 1] = '\0'; | ||
| 154 | written += t2pWriteFile(output, (tdata_t) buffer, 3); | ||
| 155 | break; | ||
| 156 | case 0x3E: | ||
| 157 | - sprintf(buffer, "#%.2X", name[i]); | ||
| 158 | + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); | ||
| 159 | buffer[sizeof(buffer) - 1] = '\0'; | ||
| 160 | written += t2pWriteFile(output, (tdata_t) buffer, 3); | ||
| 161 | break; | ||
| 162 | case 0x5B: | ||
| 163 | - sprintf(buffer, "#%.2X", name[i]); | ||
| 164 | + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); | ||
| 165 | buffer[sizeof(buffer) - 1] = '\0'; | ||
| 166 | written += t2pWriteFile(output, (tdata_t) buffer, 3); | ||
| 167 | break; | ||
| 168 | case 0x5D: | ||
| 169 | - sprintf(buffer, "#%.2X", name[i]); | ||
| 170 | + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); | ||
| 171 | buffer[sizeof(buffer) - 1] = '\0'; | ||
| 172 | written += t2pWriteFile(output, (tdata_t) buffer, 3); | ||
| 173 | break; | ||
| 174 | case 0x7B: | ||
| 175 | - sprintf(buffer, "#%.2X", name[i]); | ||
| 176 | + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); | ||
| 177 | buffer[sizeof(buffer) - 1] = '\0'; | ||
| 178 | written += t2pWriteFile(output, (tdata_t) buffer, 3); | ||
| 179 | break; | ||
| 180 | case 0x7D: | ||
| 181 | - sprintf(buffer, "#%.2X", name[i]); | ||
| 182 | + snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); | ||
| 183 | buffer[sizeof(buffer) - 1] = '\0'; | ||
| 184 | written += t2pWriteFile(output, (tdata_t) buffer, 3); | ||
| 185 | break; | ||
| 186 | @@ -3865,14 +3867,14 @@ | ||
| 187 | tsize_t t2p_write_pdf_stream_dict(tsize_t len, uint32 number, TIFF* output){ | ||
| 188 | |||
| 189 | tsize_t written=0; | ||
| 190 | - char buffer[16]; | ||
| 191 | + char buffer[32]; | ||
| 192 | int buflen=0; | ||
| 193 | |||
| 194 | written += t2pWriteFile(output, (tdata_t) "/Length ", 8); | ||
| 195 | if(len!=0){ | ||
| 196 | written += t2p_write_pdf_stream_length(len, output); | ||
| 197 | } else { | ||
| 198 | - buflen=sprintf(buffer, "%lu", (unsigned long)number); | ||
| 199 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)number); | ||
| 200 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 201 | written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6); | ||
| 202 | } | ||
| 203 | @@ -3913,10 +3915,10 @@ | ||
| 204 | tsize_t t2p_write_pdf_stream_length(tsize_t len, TIFF* output){ | ||
| 205 | |||
| 206 | tsize_t written=0; | ||
| 207 | - char buffer[16]; | ||
| 208 | + char buffer[32]; | ||
| 209 | int buflen=0; | ||
| 210 | |||
| 211 | - buflen=sprintf(buffer, "%lu", (unsigned long)len); | ||
| 212 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)len); | ||
| 213 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 214 | written += t2pWriteFile(output, (tdata_t) "\n", 1); | ||
| 215 | |||
| 216 | @@ -3930,7 +3932,7 @@ | ||
| 217 | tsize_t t2p_write_pdf_catalog(T2P* t2p, TIFF* output) | ||
| 218 | { | ||
| 219 | tsize_t written = 0; | ||
| 220 | - char buffer[16]; | ||
| 221 | + char buffer[32]; | ||
| 222 | int buflen = 0; | ||
| 223 | |||
| 224 | written += t2pWriteFile(output, | ||
| 225 | @@ -3969,7 +3971,6 @@ | ||
| 226 | written += t2p_write_pdf_string(t2p->pdf_datetime, output); | ||
| 227 | } | ||
| 228 | written += t2pWriteFile(output, (tdata_t) "\n/Producer ", 11); | ||
| 229 | - _TIFFmemset((tdata_t)buffer, 0x00, sizeof(buffer)); | ||
| 230 | snprintf(buffer, sizeof(buffer), "libtiff / tiff2pdf - %d", TIFFLIB_VERSION); | ||
| 231 | written += t2p_write_pdf_string(buffer, output); | ||
| 232 | written += t2pWriteFile(output, (tdata_t) "\n", 1); | ||
| 233 | @@ -4110,7 +4111,7 @@ | ||
| 234 | { | ||
| 235 | tsize_t written=0; | ||
| 236 | tdir_t i=0; | ||
| 237 | - char buffer[16]; | ||
| 238 | + char buffer[32]; | ||
| 239 | int buflen=0; | ||
| 240 | |||
| 241 | int page=0; | ||
| 242 | @@ -4118,7 +4119,7 @@ | ||
| 243 | (tdata_t) "<< \n/Type /Pages \n/Kids [ ", 26); | ||
| 244 | page = t2p->pdf_pages+1; | ||
| 245 | for (i=0;i<t2p->tiff_pagecount;i++){ | ||
| 246 | - buflen=sprintf(buffer, "%d", page); | ||
| 247 | + buflen=snprintf(buffer, sizeof(buffer), "%d", page); | ||
| 248 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 249 | written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); | ||
| 250 | if ( ((i+1)%8)==0 ) { | ||
| 251 | @@ -4133,8 +4134,7 @@ | ||
| 252 | } | ||
| 253 | } | ||
| 254 | written += t2pWriteFile(output, (tdata_t) "] \n/Count ", 10); | ||
| 255 | - _TIFFmemset(buffer, 0x00, 16); | ||
| 256 | - buflen=sprintf(buffer, "%d", t2p->tiff_pagecount); | ||
| 257 | + buflen=snprintf(buffer, sizeof(buffer), "%d", t2p->tiff_pagecount); | ||
| 258 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 259 | written += t2pWriteFile(output, (tdata_t) " \n>> \n", 6); | ||
| 260 | |||
| 261 | @@ -4149,28 +4149,28 @@ | ||
| 262 | |||
| 263 | unsigned int i=0; | ||
| 264 | tsize_t written=0; | ||
| 265 | - char buffer[16]; | ||
| 266 | + char buffer[256]; | ||
| 267 | int buflen=0; | ||
| 268 | |||
| 269 | written += t2pWriteFile(output, (tdata_t) "<<\n/Type /Page \n/Parent ", 24); | ||
| 270 | - buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_pages); | ||
| 271 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_pages); | ||
| 272 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 273 | written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6); | ||
| 274 | written += t2pWriteFile(output, (tdata_t) "/MediaBox [", 11); | ||
| 275 | - buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x1); | ||
| 276 | + buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.x1); | ||
| 277 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 278 | written += t2pWriteFile(output, (tdata_t) " ", 1); | ||
| 279 | - buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y1); | ||
| 280 | + buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.y1); | ||
| 281 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 282 | written += t2pWriteFile(output, (tdata_t) " ", 1); | ||
| 283 | - buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x2); | ||
| 284 | + buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.x2); | ||
| 285 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 286 | written += t2pWriteFile(output, (tdata_t) " ", 1); | ||
| 287 | - buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y2); | ||
| 288 | + buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.y2); | ||
| 289 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 290 | written += t2pWriteFile(output, (tdata_t) "] \n", 3); | ||
| 291 | written += t2pWriteFile(output, (tdata_t) "/Contents ", 10); | ||
| 292 | - buflen=sprintf(buffer, "%lu", (unsigned long)(object + 1)); | ||
| 293 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(object + 1)); | ||
| 294 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 295 | written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6); | ||
| 296 | written += t2pWriteFile(output, (tdata_t) "/Resources << \n", 15); | ||
| 297 | @@ -4178,15 +4178,13 @@ | ||
| 298 | written += t2pWriteFile(output, (tdata_t) "/XObject <<\n", 12); | ||
| 299 | for(i=0;i<t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount;i++){ | ||
| 300 | written += t2pWriteFile(output, (tdata_t) "/Im", 3); | ||
| 301 | - buflen = sprintf(buffer, "%u", t2p->pdf_page+1); | ||
| 302 | + buflen = snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1); | ||
| 303 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 304 | written += t2pWriteFile(output, (tdata_t) "_", 1); | ||
| 305 | - buflen = sprintf(buffer, "%u", i+1); | ||
| 306 | + buflen = snprintf(buffer, sizeof(buffer), "%u", i+1); | ||
| 307 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 308 | written += t2pWriteFile(output, (tdata_t) " ", 1); | ||
| 309 | - buflen = sprintf( | ||
| 310 | - buffer, | ||
| 311 | - "%lu", | ||
| 312 | + buflen = snprintf(buffer, sizeof(buffer), "%lu", | ||
| 313 | (unsigned long)(object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra)); | ||
| 314 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 315 | written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); | ||
| 316 | @@ -4198,12 +4196,10 @@ | ||
| 317 | } else { | ||
| 318 | written += t2pWriteFile(output, (tdata_t) "/XObject <<\n", 12); | ||
| 319 | written += t2pWriteFile(output, (tdata_t) "/Im", 3); | ||
| 320 | - buflen = sprintf(buffer, "%u", t2p->pdf_page+1); | ||
| 321 | + buflen = snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1); | ||
| 322 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 323 | written += t2pWriteFile(output, (tdata_t) " ", 1); | ||
| 324 | - buflen = sprintf( | ||
| 325 | - buffer, | ||
| 326 | - "%lu", | ||
| 327 | + buflen = snprintf(buffer, sizeof(buffer), "%lu", | ||
| 328 | (unsigned long)(object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra)); | ||
| 329 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 330 | written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); | ||
| 331 | @@ -4212,9 +4208,7 @@ | ||
| 332 | if(t2p->tiff_transferfunctioncount != 0) { | ||
| 333 | written += t2pWriteFile(output, (tdata_t) "/ExtGState <<", 13); | ||
| 334 | t2pWriteFile(output, (tdata_t) "/GS1 ", 5); | ||
| 335 | - buflen = sprintf( | ||
| 336 | - buffer, | ||
| 337 | - "%lu", | ||
| 338 | + buflen = snprintf(buffer, sizeof(buffer), "%lu", | ||
| 339 | (unsigned long)(object + 3)); | ||
| 340 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 341 | written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); | ||
| 342 | @@ -4587,7 +4581,7 @@ | ||
| 343 | if(t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount>0){ | ||
| 344 | for(i=0;i<t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount; i++){ | ||
| 345 | box=t2p->tiff_tiles[t2p->pdf_page].tiles_tiles[i].tile_box; | ||
| 346 | - buflen=sprintf(buffer, | ||
| 347 | + buflen=snprintf(buffer, sizeof(buffer), | ||
| 348 | "q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d_%ld Do Q\n", | ||
| 349 | t2p->tiff_transferfunctioncount?"/GS1 gs ":"", | ||
| 350 | box.mat[0], | ||
| 351 | @@ -4602,7 +4596,7 @@ | ||
| 352 | } | ||
| 353 | } else { | ||
| 354 | box=t2p->pdf_imagebox; | ||
| 355 | - buflen=sprintf(buffer, | ||
| 356 | + buflen=snprintf(buffer, sizeof(buffer), | ||
| 357 | "q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d Do Q\n", | ||
| 358 | t2p->tiff_transferfunctioncount?"/GS1 gs ":"", | ||
| 359 | box.mat[0], | ||
| 360 | @@ -4627,59 +4621,48 @@ | ||
| 361 | TIFF* output){ | ||
| 362 | |||
| 363 | tsize_t written=0; | ||
| 364 | - char buffer[16]; | ||
| 365 | + char buffer[32]; | ||
| 366 | int buflen=0; | ||
| 367 | |||
| 368 | written += t2p_write_pdf_stream_dict(0, t2p->pdf_xrefcount+1, output); | ||
| 369 | written += t2pWriteFile(output, | ||
| 370 | (tdata_t) "/Type /XObject \n/Subtype /Image \n/Name /Im", | ||
| 371 | 42); | ||
| 372 | - buflen=sprintf(buffer, "%u", t2p->pdf_page+1); | ||
| 373 | + buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1); | ||
| 374 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 375 | if(tile != 0){ | ||
| 376 | written += t2pWriteFile(output, (tdata_t) "_", 1); | ||
| 377 | - buflen=sprintf(buffer, "%lu", (unsigned long)tile); | ||
| 378 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)tile); | ||
| 379 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 380 | } | ||
| 381 | written += t2pWriteFile(output, (tdata_t) "\n/Width ", 8); | ||
| 382 | - _TIFFmemset((tdata_t)buffer, 0x00, 16); | ||
| 383 | if(tile==0){ | ||
| 384 | - buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_width); | ||
| 385 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_width); | ||
| 386 | } else { | ||
| 387 | if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){ | ||
| 388 | - buflen=sprintf( | ||
| 389 | - buffer, | ||
| 390 | - "%lu", | ||
| 391 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", | ||
| 392 | (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth); | ||
| 393 | } else { | ||
| 394 | - buflen=sprintf( | ||
| 395 | - buffer, | ||
| 396 | - "%lu", | ||
| 397 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", | ||
| 398 | (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth); | ||
| 399 | } | ||
| 400 | } | ||
| 401 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 402 | written += t2pWriteFile(output, (tdata_t) "\n/Height ", 9); | ||
| 403 | - _TIFFmemset((tdata_t)buffer, 0x00, 16); | ||
| 404 | if(tile==0){ | ||
| 405 | - buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_length); | ||
| 406 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_length); | ||
| 407 | } else { | ||
| 408 | if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){ | ||
| 409 | - buflen=sprintf( | ||
| 410 | - buffer, | ||
| 411 | - "%lu", | ||
| 412 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", | ||
| 413 | (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength); | ||
| 414 | } else { | ||
| 415 | - buflen=sprintf( | ||
| 416 | - buffer, | ||
| 417 | - "%lu", | ||
| 418 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", | ||
| 419 | (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); | ||
| 420 | } | ||
| 421 | } | ||
| 422 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 423 | written += t2pWriteFile(output, (tdata_t) "\n/BitsPerComponent ", 19); | ||
| 424 | - _TIFFmemset((tdata_t)buffer, 0x00, 16); | ||
| 425 | - buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample); | ||
| 426 | + buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_bitspersample); | ||
| 427 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 428 | written += t2pWriteFile(output, (tdata_t) "\n/ColorSpace ", 13); | ||
| 429 | written += t2p_write_pdf_xobject_cs(t2p, output); | ||
| 430 | @@ -4723,11 +4706,10 @@ | ||
| 431 | t2p->pdf_colorspace ^= T2P_CS_PALETTE; | ||
| 432 | written += t2p_write_pdf_xobject_cs(t2p, output); | ||
| 433 | t2p->pdf_colorspace |= T2P_CS_PALETTE; | ||
| 434 | - buflen=sprintf(buffer, "%u", (0x0001 << t2p->tiff_bitspersample)-1 ); | ||
| 435 | + buflen=snprintf(buffer, sizeof(buffer), "%u", (0x0001 << t2p->tiff_bitspersample)-1 ); | ||
| 436 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 437 | written += t2pWriteFile(output, (tdata_t) " ", 1); | ||
| 438 | - _TIFFmemset(buffer, 0x00, 16); | ||
| 439 | - buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_palettecs ); | ||
| 440 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_palettecs ); | ||
| 441 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 442 | written += t2pWriteFile(output, (tdata_t) " 0 R ]\n", 7); | ||
| 443 | return(written); | ||
| 444 | @@ -4761,10 +4743,10 @@ | ||
| 445 | X_W /= Y_W; | ||
| 446 | Z_W /= Y_W; | ||
| 447 | Y_W = 1.0F; | ||
| 448 | - buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W); | ||
| 449 | + buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W); | ||
| 450 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 451 | written += t2pWriteFile(output, (tdata_t) "/Range ", 7); | ||
| 452 | - buflen=sprintf(buffer, "[%d %d %d %d] \n", | ||
| 453 | + buflen=snprintf(buffer, sizeof(buffer), "[%d %d %d %d] \n", | ||
| 454 | t2p->pdf_labrange[0], | ||
| 455 | t2p->pdf_labrange[1], | ||
| 456 | t2p->pdf_labrange[2], | ||
| 457 | @@ -4780,26 +4762,26 @@ | ||
| 458 | tsize_t t2p_write_pdf_transfer(T2P* t2p, TIFF* output){ | ||
| 459 | |||
| 460 | tsize_t written=0; | ||
| 461 | - char buffer[16]; | ||
| 462 | + char buffer[32]; | ||
| 463 | int buflen=0; | ||
| 464 | |||
| 465 | written += t2pWriteFile(output, (tdata_t) "<< /Type /ExtGState \n/TR ", 25); | ||
| 466 | if(t2p->tiff_transferfunctioncount == 1){ | ||
| 467 | - buflen=sprintf(buffer, "%lu", | ||
| 468 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", | ||
| 469 | (unsigned long)(t2p->pdf_xrefcount + 1)); | ||
| 470 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 471 | written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); | ||
| 472 | } else { | ||
| 473 | written += t2pWriteFile(output, (tdata_t) "[ ", 2); | ||
| 474 | - buflen=sprintf(buffer, "%lu", | ||
| 475 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", | ||
| 476 | (unsigned long)(t2p->pdf_xrefcount + 1)); | ||
| 477 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 478 | written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); | ||
| 479 | - buflen=sprintf(buffer, "%lu", | ||
| 480 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", | ||
| 481 | (unsigned long)(t2p->pdf_xrefcount + 2)); | ||
| 482 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 483 | written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); | ||
| 484 | - buflen=sprintf(buffer, "%lu", | ||
| 485 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", | ||
| 486 | (unsigned long)(t2p->pdf_xrefcount + 3)); | ||
| 487 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 488 | written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); | ||
| 489 | @@ -4821,7 +4803,7 @@ | ||
| 490 | written += t2pWriteFile(output, (tdata_t) "/FunctionType 0 \n", 17); | ||
| 491 | written += t2pWriteFile(output, (tdata_t) "/Domain [0.0 1.0] \n", 19); | ||
| 492 | written += t2pWriteFile(output, (tdata_t) "/Range [0.0 1.0] \n", 18); | ||
| 493 | - buflen=sprintf(buffer, "/Size [%u] \n", (1<<t2p->tiff_bitspersample)); | ||
| 494 | + buflen=snprintf(buffer, sizeof(buffer), "/Size [%u] \n", (1<<t2p->tiff_bitspersample)); | ||
| 495 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 496 | written += t2pWriteFile(output, (tdata_t) "/BitsPerSample 16 \n", 19); | ||
| 497 | written += t2p_write_pdf_stream_dict(((tsize_t)1)<<(t2p->tiff_bitspersample+1), 0, output); | ||
| 498 | @@ -4848,7 +4830,7 @@ | ||
| 499 | tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){ | ||
| 500 | |||
| 501 | tsize_t written=0; | ||
| 502 | - char buffer[128]; | ||
| 503 | + char buffer[256]; | ||
| 504 | int buflen=0; | ||
| 505 | |||
| 506 | float X_W=0.0; | ||
| 507 | @@ -4916,16 +4898,16 @@ | ||
| 508 | written += t2pWriteFile(output, (tdata_t) "<< \n", 4); | ||
| 509 | if(t2p->pdf_colorspace & T2P_CS_CALGRAY){ | ||
| 510 | written += t2pWriteFile(output, (tdata_t) "/WhitePoint ", 12); | ||
| 511 | - buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W); | ||
| 512 | + buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W); | ||
| 513 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 514 | written += t2pWriteFile(output, (tdata_t) "/Gamma 2.2 \n", 12); | ||
| 515 | } | ||
| 516 | if(t2p->pdf_colorspace & T2P_CS_CALRGB){ | ||
| 517 | written += t2pWriteFile(output, (tdata_t) "/WhitePoint ", 12); | ||
| 518 | - buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W); | ||
| 519 | + buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W); | ||
| 520 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 521 | written += t2pWriteFile(output, (tdata_t) "/Matrix ", 8); | ||
| 522 | - buflen=sprintf(buffer, "[%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f] \n", | ||
| 523 | + buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f] \n", | ||
| 524 | X_R, Y_R, Z_R, | ||
| 525 | X_G, Y_G, Z_G, | ||
| 526 | X_B, Y_B, Z_B); | ||
| 527 | @@ -4944,11 +4926,11 @@ | ||
| 528 | tsize_t t2p_write_pdf_xobject_icccs(T2P* t2p, TIFF* output){ | ||
| 529 | |||
| 530 | tsize_t written=0; | ||
| 531 | - char buffer[16]; | ||
| 532 | + char buffer[32]; | ||
| 533 | int buflen=0; | ||
| 534 | |||
| 535 | written += t2pWriteFile(output, (tdata_t) "[/ICCBased ", 11); | ||
| 536 | - buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_icccs); | ||
| 537 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_icccs); | ||
| 538 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 539 | written += t2pWriteFile(output, (tdata_t) " 0 R] \n", 7); | ||
| 540 | |||
| 541 | @@ -4958,11 +4940,11 @@ | ||
| 542 | tsize_t t2p_write_pdf_xobject_icccs_dict(T2P* t2p, TIFF* output){ | ||
| 543 | |||
| 544 | tsize_t written=0; | ||
| 545 | - char buffer[16]; | ||
| 546 | + char buffer[32]; | ||
| 547 | int buflen=0; | ||
| 548 | |||
| 549 | written += t2pWriteFile(output, (tdata_t) "/N ", 3); | ||
| 550 | - buflen=sprintf(buffer, "%u \n", t2p->tiff_samplesperpixel); | ||
| 551 | + buflen=snprintf(buffer, sizeof(buffer), "%u \n", t2p->tiff_samplesperpixel); | ||
| 552 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 553 | written += t2pWriteFile(output, (tdata_t) "/Alternate ", 11); | ||
| 554 | t2p->pdf_colorspace ^= T2P_CS_ICCBASED; | ||
| 555 | @@ -5027,7 +5009,7 @@ | ||
| 556 | tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output){ | ||
| 557 | |||
| 558 | tsize_t written=0; | ||
| 559 | - char buffer[16]; | ||
| 560 | + char buffer[32]; | ||
| 561 | int buflen=0; | ||
| 562 | |||
| 563 | if(t2p->pdf_compression==T2P_COMPRESS_NONE){ | ||
| 564 | @@ -5042,41 +5024,33 @@ | ||
| 565 | written += t2pWriteFile(output, (tdata_t) "<< /K -1 ", 9); | ||
| 566 | if(tile==0){ | ||
| 567 | written += t2pWriteFile(output, (tdata_t) "/Columns ", 9); | ||
| 568 | - buflen=sprintf(buffer, "%lu", | ||
| 569 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", | ||
| 570 | (unsigned long)t2p->tiff_width); | ||
| 571 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 572 | written += t2pWriteFile(output, (tdata_t) " /Rows ", 7); | ||
| 573 | - buflen=sprintf(buffer, "%lu", | ||
| 574 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", | ||
| 575 | (unsigned long)t2p->tiff_length); | ||
| 576 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 577 | } else { | ||
| 578 | if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){ | ||
| 579 | written += t2pWriteFile(output, (tdata_t) "/Columns ", 9); | ||
| 580 | - buflen=sprintf( | ||
| 581 | - buffer, | ||
| 582 | - "%lu", | ||
| 583 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", | ||
| 584 | (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth); | ||
| 585 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 586 | } else { | ||
| 587 | written += t2pWriteFile(output, (tdata_t) "/Columns ", 9); | ||
| 588 | - buflen=sprintf( | ||
| 589 | - buffer, | ||
| 590 | - "%lu", | ||
| 591 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", | ||
| 592 | (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth); | ||
| 593 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 594 | } | ||
| 595 | if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){ | ||
| 596 | written += t2pWriteFile(output, (tdata_t) " /Rows ", 7); | ||
| 597 | - buflen=sprintf( | ||
| 598 | - buffer, | ||
| 599 | - "%lu", | ||
| 600 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", | ||
| 601 | (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); | ||
| 602 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 603 | } else { | ||
| 604 | written += t2pWriteFile(output, (tdata_t) " /Rows ", 7); | ||
| 605 | - buflen=sprintf( | ||
| 606 | - buffer, | ||
| 607 | - "%lu", | ||
| 608 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", | ||
| 609 | (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength); | ||
| 610 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 611 | } | ||
| 612 | @@ -5103,21 +5077,17 @@ | ||
| 613 | if(t2p->pdf_compressionquality%100){ | ||
| 614 | written += t2pWriteFile(output, (tdata_t) "/DecodeParms ", 13); | ||
| 615 | written += t2pWriteFile(output, (tdata_t) "<< /Predictor ", 14); | ||
| 616 | - _TIFFmemset(buffer, 0x00, 16); | ||
| 617 | - buflen=sprintf(buffer, "%u", t2p->pdf_compressionquality%100); | ||
| 618 | + buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_compressionquality%100); | ||
| 619 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 620 | written += t2pWriteFile(output, (tdata_t) " /Columns ", 10); | ||
| 621 | - _TIFFmemset(buffer, 0x00, 16); | ||
| 622 | - buflen = sprintf(buffer, "%lu", | ||
| 623 | + buflen = snprintf(buffer, sizeof(buffer), "%lu", | ||
| 624 | (unsigned long)t2p->tiff_width); | ||
| 625 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 626 | written += t2pWriteFile(output, (tdata_t) " /Colors ", 9); | ||
| 627 | - _TIFFmemset(buffer, 0x00, 16); | ||
| 628 | - buflen=sprintf(buffer, "%u", t2p->tiff_samplesperpixel); | ||
| 629 | + buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_samplesperpixel); | ||
| 630 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 631 | written += t2pWriteFile(output, (tdata_t) " /BitsPerComponent ", 19); | ||
| 632 | - _TIFFmemset(buffer, 0x00, 16); | ||
| 633 | - buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample); | ||
| 634 | + buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_bitspersample); | ||
| 635 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 636 | written += t2pWriteFile(output, (tdata_t) ">>\n", 3); | ||
| 637 | } | ||
| 638 | @@ -5137,16 +5107,16 @@ | ||
| 639 | tsize_t t2p_write_pdf_xreftable(T2P* t2p, TIFF* output){ | ||
| 640 | |||
| 641 | tsize_t written=0; | ||
| 642 | - char buffer[21]; | ||
| 643 | + char buffer[64]; | ||
| 644 | int buflen=0; | ||
| 645 | uint32 i=0; | ||
| 646 | |||
| 647 | written += t2pWriteFile(output, (tdata_t) "xref\n0 ", 7); | ||
| 648 | - buflen=sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount + 1)); | ||
| 649 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount + 1)); | ||
| 650 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 651 | written += t2pWriteFile(output, (tdata_t) " \n0000000000 65535 f \n", 22); | ||
| 652 | for (i=0;i<t2p->pdf_xrefcount;i++){ | ||
| 653 | - sprintf(buffer, "%.10lu 00000 n \n", | ||
| 654 | + snprintf(buffer, sizeof(buffer), "%.10lu 00000 n \n", | ||
| 655 | (unsigned long)t2p->pdf_xrefoffsets[i]); | ||
| 656 | written += t2pWriteFile(output, (tdata_t) buffer, 20); | ||
| 657 | } | ||
| 658 | @@ -5170,17 +5140,14 @@ | ||
| 659 | snprintf(t2p->pdf_fileid + i, 9, "%.8X", rand()); | ||
| 660 | |||
| 661 | written += t2pWriteFile(output, (tdata_t) "trailer\n<<\n/Size ", 17); | ||
| 662 | - buflen = sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount+1)); | ||
| 663 | + buflen = snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount+1)); | ||
| 664 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 665 | - _TIFFmemset(buffer, 0x00, 32); | ||
| 666 | written += t2pWriteFile(output, (tdata_t) "\n/Root ", 7); | ||
| 667 | - buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_catalog); | ||
| 668 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_catalog); | ||
| 669 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 670 | - _TIFFmemset(buffer, 0x00, 32); | ||
| 671 | written += t2pWriteFile(output, (tdata_t) " 0 R \n/Info ", 12); | ||
| 672 | - buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_info); | ||
| 673 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_info); | ||
| 674 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 675 | - _TIFFmemset(buffer, 0x00, 32); | ||
| 676 | written += t2pWriteFile(output, (tdata_t) " 0 R \n/ID[<", 11); | ||
| 677 | written += t2pWriteFile(output, (tdata_t) t2p->pdf_fileid, | ||
| 678 | sizeof(t2p->pdf_fileid) - 1); | ||
| 679 | @@ -5188,9 +5155,8 @@ | ||
| 680 | written += t2pWriteFile(output, (tdata_t) t2p->pdf_fileid, | ||
| 681 | sizeof(t2p->pdf_fileid) - 1); | ||
| 682 | written += t2pWriteFile(output, (tdata_t) ">]\n>>\nstartxref\n", 16); | ||
| 683 | - buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_startxref); | ||
| 684 | + buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_startxref); | ||
| 685 | written += t2pWriteFile(output, (tdata_t) buffer, buflen); | ||
| 686 | - _TIFFmemset(buffer, 0x00, 32); | ||
| 687 | written += t2pWriteFile(output, (tdata_t) "\n%%EOF\n", 7); | ||
| 688 | |||
| 689 | return(written); | ||
| 690 | Index: tiff-4.0.3/tools/tiff2ps.c | ||
| 691 | =================================================================== | ||
| 692 | --- tiff-4.0.3.orig/tools/tiff2ps.c 2013-06-23 10:36:51.163629483 -0400 | ||
| 693 | +++ tiff-4.0.3/tools/tiff2ps.c 2013-06-23 10:36:51.155629481 -0400 | ||
| 694 | @@ -1781,8 +1781,8 @@ | ||
| 695 | imageOp = "imagemask"; | ||
| 696 | |||
| 697 | (void)strcpy(im_x, "0"); | ||
| 698 | - (void)sprintf(im_y, "%lu", (long) h); | ||
| 699 | - (void)sprintf(im_h, "%lu", (long) h); | ||
| 700 | + (void)snprintf(im_y, sizeof(im_y), "%lu", (long) h); | ||
| 701 | + (void)snprintf(im_h, sizeof(im_h), "%lu", (long) h); | ||
| 702 | tile_width = w; | ||
| 703 | tile_height = h; | ||
| 704 | if (TIFFIsTiled(tif)) { | ||
| 705 | @@ -1803,7 +1803,7 @@ | ||
| 706 | } | ||
| 707 | if (tile_height < h) { | ||
| 708 | fputs("/im_y 0 def\n", fd); | ||
| 709 | - (void)sprintf(im_y, "%lu im_y sub", (unsigned long) h); | ||
| 710 | + (void)snprintf(im_y, sizeof(im_y), "%lu im_y sub", (unsigned long) h); | ||
| 711 | } | ||
| 712 | } else { | ||
| 713 | repeat_count = tf_numberstrips; | ||
| 714 | @@ -1815,7 +1815,7 @@ | ||
| 715 | fprintf(fd, "/im_h %lu def\n", | ||
| 716 | (unsigned long) tile_height); | ||
| 717 | (void)strcpy(im_h, "im_h"); | ||
| 718 | - (void)sprintf(im_y, "%lu im_y sub", (unsigned long) h); | ||
| 719 | + (void)snprintf(im_y, sizeof(im_y), "%lu im_y sub", (unsigned long) h); | ||
| 720 | } | ||
| 721 | } | ||
| 722 | |||
| 723 | Index: tiff-4.0.3/tools/tiffcrop.c | ||
| 724 | =================================================================== | ||
| 725 | --- tiff-4.0.3.orig/tools/tiffcrop.c 2013-06-23 10:36:51.163629483 -0400 | ||
| 726 | +++ tiff-4.0.3/tools/tiffcrop.c 2013-06-23 10:36:51.159629481 -0400 | ||
| 727 | @@ -2077,7 +2077,7 @@ | ||
| 728 | return 1; | ||
| 729 | } | ||
| 730 | |||
| 731 | - sprintf (filenum, "-%03d%s", findex, export_ext); | ||
| 732 | + snprintf(filenum, sizeof(filenum), "-%03d%s", findex, export_ext); | ||
| 733 | filenum[14] = '\0'; | ||
| 734 | strncat (exportname, filenum, 15); | ||
| 735 | } | ||
| 736 | @@ -2230,8 +2230,8 @@ | ||
| 737 | |||
| 738 | /* dump.infilename is guaranteed to be NUL termimated and have 20 bytes | ||
| 739 | fewer than PATH_MAX */ | ||
| 740 | - memset (temp_filename, '\0', PATH_MAX + 1); | ||
| 741 | - sprintf (temp_filename, "%s-read-%03d.%s", dump.infilename, dump_images, | ||
| 742 | + snprintf(temp_filename, sizeof(temp_filename), "%s-read-%03d.%s", | ||
| 743 | + dump.infilename, dump_images, | ||
| 744 | (dump.format == DUMP_TEXT) ? "txt" : "raw"); | ||
| 745 | if ((dump.infile = fopen(temp_filename, dump.mode)) == NULL) | ||
| 746 | { | ||
| 747 | @@ -2249,8 +2249,8 @@ | ||
| 748 | |||
| 749 | /* dump.outfilename is guaranteed to be NUL termimated and have 20 bytes | ||
| 750 | fewer than PATH_MAX */ | ||
| 751 | - memset (temp_filename, '\0', PATH_MAX + 1); | ||
| 752 | - sprintf (temp_filename, "%s-write-%03d.%s", dump.outfilename, dump_images, | ||
| 753 | + snprintf(temp_filename, sizeof(temp_filename), "%s-write-%03d.%s", | ||
| 754 | + dump.outfilename, dump_images, | ||
| 755 | (dump.format == DUMP_TEXT) ? "txt" : "raw"); | ||
| 756 | if ((dump.outfile = fopen(temp_filename, dump.mode)) == NULL) | ||
| 757 | { | ||
| 758 | Index: tiff-4.0.3/tools/tiff2bw.c | ||
| 759 | =================================================================== | ||
| 760 | --- tiff-4.0.3.orig/tools/tiff2bw.c 2013-06-23 10:36:51.163629483 -0400 | ||
| 761 | +++ tiff-4.0.3/tools/tiff2bw.c 2013-06-23 10:36:51.159629481 -0400 | ||
| 762 | @@ -205,7 +205,7 @@ | ||
| 763 | } | ||
| 764 | } | ||
| 765 | TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK); | ||
| 766 | - sprintf(thing, "B&W version of %s", argv[optind]); | ||
| 767 | + snprintf(thing, sizeof(thing), "B&W version of %s", argv[optind]); | ||
| 768 | TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing); | ||
| 769 | TIFFSetField(out, TIFFTAG_SOFTWARE, "tiff2bw"); | ||
| 770 | outbuf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out)); | ||
diff --git a/gnu/packages/patches/libtiff-CVE-2013-4231.patch b/gnu/packages/patches/libtiff-CVE-2013-4231.patch deleted file mode 100644 index c71f7dac2ee..00000000000 --- a/gnu/packages/patches/libtiff-CVE-2013-4231.patch +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | Copied from Debian | ||
| 2 | |||
| 3 | Description: Buffer overflow in gif2tiff | ||
| 4 | Bug: http://bugzilla.maptools.org/show_bug.cgi?id=2450 | ||
| 5 | Bug-Debian: http://bugs.debian.org/719303 | ||
| 6 | |||
| 7 | Index: tiff-4.0.3/tools/gif2tiff.c | ||
| 8 | =================================================================== | ||
| 9 | --- tiff-4.0.3.orig/tools/gif2tiff.c 2013-08-22 11:46:11.960846910 -0400 | ||
| 10 | +++ tiff-4.0.3/tools/gif2tiff.c 2013-08-22 11:46:11.956846910 -0400 | ||
| 11 | @@ -333,6 +333,8 @@ | ||
| 12 | int status = 1; | ||
| 13 | |||
| 14 | datasize = getc(infile); | ||
| 15 | + if (datasize > 12) | ||
| 16 | + return 0; | ||
| 17 | clear = 1 << datasize; | ||
| 18 | eoi = clear + 1; | ||
| 19 | avail = clear + 2; | ||
diff --git a/gnu/packages/patches/libtiff-CVE-2013-4232.patch b/gnu/packages/patches/libtiff-CVE-2013-4232.patch deleted file mode 100644 index 3a92f61fef1..00000000000 --- a/gnu/packages/patches/libtiff-CVE-2013-4232.patch +++ /dev/null | |||
| @@ -1,20 +0,0 @@ | |||
| 1 | Copied from Debian | ||
| 2 | |||
| 3 | Description: use after free in tiff2pdf | ||
| 4 | Bug: http://bugzilla.maptools.org/show_bug.cgi?id=2449 | ||
| 5 | Bug-Debian: http://bugs.debian.org/719303 | ||
| 6 | |||
| 7 | Index: tiff-4.0.3/tools/tiff2pdf.c | ||
| 8 | =================================================================== | ||
| 9 | --- tiff-4.0.3.orig/tools/tiff2pdf.c 2013-08-22 11:46:37.292847242 -0400 | ||
| 10 | +++ tiff-4.0.3/tools/tiff2pdf.c 2013-08-22 11:46:37.292847242 -0400 | ||
| 11 | @@ -2461,7 +2461,8 @@ | ||
| 12 | (unsigned long) t2p->tiff_datasize, | ||
| 13 | TIFFFileName(input)); | ||
| 14 | t2p->t2p_error = T2P_ERR_ERROR; | ||
| 15 | - _TIFFfree(buffer); | ||
| 16 | + _TIFFfree(buffer); | ||
| 17 | + return(0); | ||
| 18 | } else { | ||
| 19 | buffer=samplebuffer; | ||
| 20 | t2p->tiff_datasize *= t2p->tiff_samplesperpixel; | ||
diff --git a/gnu/packages/patches/libtiff-CVE-2013-4243.patch b/gnu/packages/patches/libtiff-CVE-2013-4243.patch deleted file mode 100644 index a10884cd899..00000000000 --- a/gnu/packages/patches/libtiff-CVE-2013-4243.patch +++ /dev/null | |||
| @@ -1,39 +0,0 @@ | |||
| 1 | Copied from Debian | ||
| 2 | |||
| 3 | Index: tiff/tools/gif2tiff.c | ||
| 4 | =================================================================== | ||
| 5 | --- tiff.orig/tools/gif2tiff.c | ||
| 6 | +++ tiff/tools/gif2tiff.c | ||
| 7 | @@ -280,6 +280,10 @@ readgifimage(char* mode) | ||
| 8 | fprintf(stderr, "no colormap present for image\n"); | ||
| 9 | return (0); | ||
| 10 | } | ||
| 11 | + if (width == 0 || height == 0) { | ||
| 12 | + fprintf(stderr, "Invalid value of width or height\n"); | ||
| 13 | + return(0); | ||
| 14 | + } | ||
| 15 | if ((raster = (unsigned char*) _TIFFmalloc(width*height+EXTRAFUDGE)) == NULL) { | ||
| 16 | fprintf(stderr, "not enough memory for image\n"); | ||
| 17 | return (0); | ||
| 18 | @@ -404,6 +408,10 @@ process(register int code, unsigned char | ||
| 19 | fprintf(stderr, "bad input: code=%d is larger than clear=%d\n",code, clear); | ||
| 20 | return 0; | ||
| 21 | } | ||
| 22 | + if (*fill >= raster + width*height) { | ||
| 23 | + fprintf(stderr, "raster full before eoi code\n"); | ||
| 24 | + return 0; | ||
| 25 | + } | ||
| 26 | *(*fill)++ = suffix[code]; | ||
| 27 | firstchar = oldcode = code; | ||
| 28 | return 1; | ||
| 29 | @@ -434,6 +442,10 @@ process(register int code, unsigned char | ||
| 30 | } | ||
| 31 | oldcode = incode; | ||
| 32 | do { | ||
| 33 | + if (*fill >= raster + width*height) { | ||
| 34 | + fprintf(stderr, "raster full before eoi code\n"); | ||
| 35 | + return 0; | ||
| 36 | + } | ||
| 37 | *(*fill)++ = *--stackp; | ||
| 38 | } while (stackp > stack); | ||
| 39 | return 1; | ||
diff --git a/gnu/packages/patches/libtiff-CVE-2013-4244.patch b/gnu/packages/patches/libtiff-CVE-2013-4244.patch deleted file mode 100644 index be9c65c3119..00000000000 --- a/gnu/packages/patches/libtiff-CVE-2013-4244.patch +++ /dev/null | |||
| @@ -1,20 +0,0 @@ | |||
| 1 | Copied from Debian | ||
| 2 | |||
| 3 | Description: OOB write in gif2tiff | ||
| 4 | Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=996468 | ||
| 5 | |||
| 6 | Index: tiff-4.0.3/tools/gif2tiff.c | ||
| 7 | =================================================================== | ||
| 8 | --- tiff-4.0.3.orig/tools/gif2tiff.c 2013-08-24 11:17:13.546447901 -0400 | ||
| 9 | +++ tiff-4.0.3/tools/gif2tiff.c 2013-08-24 11:17:13.546447901 -0400 | ||
| 10 | @@ -400,6 +400,10 @@ | ||
| 11 | } | ||
| 12 | |||
| 13 | if (oldcode == -1) { | ||
| 14 | + if (code >= clear) { | ||
| 15 | + fprintf(stderr, "bad input: code=%d is larger than clear=%d\n",code, clear); | ||
| 16 | + return 0; | ||
| 17 | + } | ||
| 18 | *(*fill)++ = suffix[code]; | ||
| 19 | firstchar = oldcode = code; | ||
| 20 | return 1; | ||
diff --git a/gnu/packages/patches/libtiff-CVE-2014-8127-pt1.patch b/gnu/packages/patches/libtiff-CVE-2014-8127-pt1.patch deleted file mode 100644 index 7f70edb86fb..00000000000 --- a/gnu/packages/patches/libtiff-CVE-2014-8127-pt1.patch +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | Copied from Debian | ||
| 2 | |||
| 3 | From 0782c759084daaf9e4de7ee6be7543081823455e Mon Sep 17 00:00:00 2001 | ||
| 4 | From: erouault <erouault> | ||
| 5 | Date: Sun, 21 Dec 2014 20:58:29 +0000 | ||
| 6 | Subject: [PATCH] * tools/tiff2bw.c: when Photometric=RGB, the utility only | ||
| 7 | works if SamplesPerPixel = 3. Enforce that | ||
| 8 | http://bugzilla.maptools.org/show_bug.cgi?id=2485 (CVE-2014-8127) | ||
| 9 | |||
| 10 | --- | ||
| 11 | ChangeLog | 6 ++++++ | ||
| 12 | tools/tiff2bw.c | 5 +++++ | ||
| 13 | 2 files changed, 11 insertions(+) | ||
| 14 | |||
| 15 | diff --git a/tools/tiff2bw.c b/tools/tiff2bw.c | ||
| 16 | index 22467cd..94b8e31 100644 | ||
| 17 | --- a/tools/tiff2bw.c | ||
| 18 | +++ b/tools/tiff2bw.c | ||
| 19 | @@ -171,6 +171,11 @@ main(int argc, char* argv[]) | ||
| 20 | argv[optind], samplesperpixel); | ||
| 21 | return (-1); | ||
| 22 | } | ||
| 23 | + if( photometric == PHOTOMETRIC_RGB && samplesperpixel != 3) { | ||
| 24 | + fprintf(stderr, "%s: Bad samples/pixel %u for PHOTOMETRIC_RGB.\n", | ||
| 25 | + argv[optind], samplesperpixel); | ||
| 26 | + return (-1); | ||
| 27 | + } | ||
| 28 | TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bitspersample); | ||
| 29 | if (bitspersample != 8) { | ||
| 30 | fprintf(stderr, | ||
diff --git a/gnu/packages/patches/libtiff-CVE-2014-8127-pt2.patch b/gnu/packages/patches/libtiff-CVE-2014-8127-pt2.patch deleted file mode 100644 index a177ebfa211..00000000000 --- a/gnu/packages/patches/libtiff-CVE-2014-8127-pt2.patch +++ /dev/null | |||
| @@ -1,42 +0,0 @@ | |||
| 1 | Copied from Debian | ||
| 2 | |||
| 3 | From 3996fa0f84f4a8b7e65fe4b8f0681711022034ea Mon Sep 17 00:00:00 2001 | ||
| 4 | From: erouault <erouault> | ||
| 5 | Date: Sun, 21 Dec 2014 20:04:31 +0000 | ||
| 6 | Subject: [PATCH] * tools/pal2rgb.c, tools/thumbnail.c: fix crash by disabling | ||
| 7 | TIFFTAG_INKNAMES copying. The right fix would be to properly copy it, but not | ||
| 8 | worth the burden for those esoteric utilities. | ||
| 9 | http://bugzilla.maptools.org/show_bug.cgi?id=2484 (CVE-2014-8127) | ||
| 10 | |||
| 11 | --- | ||
| 12 | ChangeLog | 7 +++++++ | ||
| 13 | tools/pal2rgb.c | 2 +- | ||
| 14 | tools/thumbnail.c | 2 +- | ||
| 15 | 3 files changed, 9 insertions(+), 2 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/tools/pal2rgb.c b/tools/pal2rgb.c | ||
| 18 | index bfe7899..3fc3de3 100644 | ||
| 19 | --- a/tools/pal2rgb.c | ||
| 20 | +++ b/tools/pal2rgb.c | ||
| 21 | @@ -372,7 +372,7 @@ static struct cpTag { | ||
| 22 | { TIFFTAG_CLEANFAXDATA, 1, TIFF_SHORT }, | ||
| 23 | { TIFFTAG_CONSECUTIVEBADFAXLINES, 1, TIFF_LONG }, | ||
| 24 | { TIFFTAG_INKSET, 1, TIFF_SHORT }, | ||
| 25 | - { TIFFTAG_INKNAMES, 1, TIFF_ASCII }, | ||
| 26 | + /*{ TIFFTAG_INKNAMES, 1, TIFF_ASCII },*/ /* Needs much more complicated logic. See tiffcp */ | ||
| 27 | { TIFFTAG_DOTRANGE, 2, TIFF_SHORT }, | ||
| 28 | { TIFFTAG_TARGETPRINTER, 1, TIFF_ASCII }, | ||
| 29 | { TIFFTAG_SAMPLEFORMAT, 1, TIFF_SHORT }, | ||
| 30 | diff --git a/tools/thumbnail.c b/tools/thumbnail.c | ||
| 31 | index c50bbff..73f9c34 100644 | ||
| 32 | --- a/tools/thumbnail.c | ||
| 33 | +++ b/tools/thumbnail.c | ||
| 34 | @@ -257,7 +257,7 @@ static struct cpTag { | ||
| 35 | { TIFFTAG_CLEANFAXDATA, 1, TIFF_SHORT }, | ||
| 36 | { TIFFTAG_CONSECUTIVEBADFAXLINES, 1, TIFF_LONG }, | ||
| 37 | { TIFFTAG_INKSET, 1, TIFF_SHORT }, | ||
| 38 | - { TIFFTAG_INKNAMES, 1, TIFF_ASCII }, | ||
| 39 | + /*{ TIFFTAG_INKNAMES, 1, TIFF_ASCII },*/ /* Needs much more complicated logic. See tiffcp */ | ||
| 40 | { TIFFTAG_DOTRANGE, 2, TIFF_SHORT }, | ||
| 41 | { TIFFTAG_TARGETPRINTER, 1, TIFF_ASCII }, | ||
| 42 | { TIFFTAG_SAMPLEFORMAT, 1, TIFF_SHORT }, | ||
diff --git a/gnu/packages/patches/libtiff-CVE-2014-8127-pt3.patch b/gnu/packages/patches/libtiff-CVE-2014-8127-pt3.patch deleted file mode 100644 index b8a3703c4c6..00000000000 --- a/gnu/packages/patches/libtiff-CVE-2014-8127-pt3.patch +++ /dev/null | |||
| @@ -1,45 +0,0 @@ | |||
| 1 | Copied from Debian | ||
| 2 | |||
| 3 | From 1f7359b00663804d96c3a102bcb6ead9812c1509 Mon Sep 17 00:00:00 2001 | ||
| 4 | From: erouault <erouault> | ||
| 5 | Date: Tue, 23 Dec 2014 10:15:35 +0000 | ||
| 6 | Subject: [PATCH] * libtiff/tif_read.c: fix several invalid comparisons of a | ||
| 7 | uint64 value with <= 0 by casting it to int64 first. This solves crashing bug | ||
| 8 | on corrupted images generated by afl. | ||
| 9 | |||
| 10 | --- | ||
| 11 | ChangeLog | 6 ++++++ | ||
| 12 | libtiff/tif_read.c | 6 +++--- | ||
| 13 | 2 files changed, 9 insertions(+), 3 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/libtiff/tif_read.c b/libtiff/tif_read.c | ||
| 16 | index 2ba822a..dfc5b07 100644 | ||
| 17 | --- a/libtiff/tif_read.c | ||
| 18 | +++ b/libtiff/tif_read.c | ||
| 19 | @@ -458,7 +458,7 @@ TIFFReadRawStrip(TIFF* tif, uint32 strip, void* buf, tmsize_t size) | ||
| 20 | return ((tmsize_t)(-1)); | ||
| 21 | } | ||
| 22 | bytecount = td->td_stripbytecount[strip]; | ||
| 23 | - if (bytecount <= 0) { | ||
| 24 | + if ((int64)bytecount <= 0) { | ||
| 25 | #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) | ||
| 26 | TIFFErrorExt(tif->tif_clientdata, module, | ||
| 27 | "%I64u: Invalid strip byte count, strip %lu", | ||
| 28 | @@ -498,7 +498,7 @@ TIFFFillStrip(TIFF* tif, uint32 strip) | ||
| 29 | if ((tif->tif_flags&TIFF_NOREADRAW)==0) | ||
| 30 | { | ||
| 31 | uint64 bytecount = td->td_stripbytecount[strip]; | ||
| 32 | - if (bytecount <= 0) { | ||
| 33 | + if ((int64)bytecount <= 0) { | ||
| 34 | #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) | ||
| 35 | TIFFErrorExt(tif->tif_clientdata, module, | ||
| 36 | "Invalid strip byte count %I64u, strip %lu", | ||
| 37 | @@ -801,7 +801,7 @@ TIFFFillTile(TIFF* tif, uint32 tile) | ||
| 38 | if ((tif->tif_flags&TIFF_NOREADRAW)==0) | ||
| 39 | { | ||
| 40 | uint64 bytecount = td->td_stripbytecount[tile]; | ||
| 41 | - if (bytecount <= 0) { | ||
| 42 | + if ((int64)bytecount <= 0) { | ||
| 43 | #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) | ||
| 44 | TIFFErrorExt(tif->tif_clientdata, module, | ||
| 45 | "%I64u: Invalid tile byte count, tile %lu", | ||
diff --git a/gnu/packages/patches/libtiff-CVE-2014-8127-pt4.patch b/gnu/packages/patches/libtiff-CVE-2014-8127-pt4.patch deleted file mode 100644 index 62d903c6503..00000000000 --- a/gnu/packages/patches/libtiff-CVE-2014-8127-pt4.patch +++ /dev/null | |||
| @@ -1,295 +0,0 @@ | |||
| 1 | Copied from Debian | ||
| 2 | |||
| 3 | From 662f74445b2fea2eeb759c6524661118aef567ca Mon Sep 17 00:00:00 2001 | ||
| 4 | From: erouault <erouault> | ||
| 5 | Date: Sun, 21 Dec 2014 15:15:31 +0000 | ||
| 6 | Subject: [PATCH] Fix various crasher bugs on fuzzed images. * | ||
| 7 | libtiff/tif_dir.c: TIFFSetField(): refuse to set negative values for | ||
| 8 | TIFFTAG_XRESOLUTION and TIFFTAG_YRESOLUTION that cause asserts when writing | ||
| 9 | the directory * libtiff/tif_dirread.c: TIFFReadDirectory(): refuse to read | ||
| 10 | ColorMap or TransferFunction if BitsPerSample has not yet been read, | ||
| 11 | otherwise reading it later will cause user code to crash if BitsPerSample > 1 | ||
| 12 | * libtiff/tif_getimage.c: TIFFRGBAImageOK(): return FALSE if LOGLUV with | ||
| 13 | SamplesPerPixel != 3, or if CIELAB with SamplesPerPixel != 3 or BitsPerSample | ||
| 14 | != 8 * libtiff/tif_next.c: in the "run mode", use tilewidth for tiled images | ||
| 15 | instead of imagewidth to avoid crash * tools/bmp2tiff.c: fix crash due to int | ||
| 16 | overflow related to input BMP dimensions * tools/tiff2pdf.c: fix crash due to | ||
| 17 | invalid tile count (should likely be checked by libtiff too). Detect invalid | ||
| 18 | settings of BitsPerSample/SamplesPerPixel for CIELAB / ITULAB * | ||
| 19 | tools/tiffcrop.c: fix crash due to invalid TileWidth/TileHeight * | ||
| 20 | tools/tiffdump.c: fix crash due to overflow of entry count. | ||
| 21 | |||
| 22 | --- | ||
| 23 | ChangeLog | 19 +++++++++++++++++++ | ||
| 24 | libtiff/tif_dir.c | 21 +++++++++++++++++++-- | ||
| 25 | libtiff/tif_dirread.c | 17 +++++++++++++++++ | ||
| 26 | libtiff/tif_getimage.c | 15 +++++++++++++++ | ||
| 27 | libtiff/tif_next.c | 2 ++ | ||
| 28 | tools/bmp2tiff.c | 15 +++++++++++++++ | ||
| 29 | tools/tiff2pdf.c | 41 +++++++++++++++++++++++++++++++++++++++++ | ||
| 30 | tools/tiffcrop.c | 7 ++++--- | ||
| 31 | tools/tiffdump.c | 9 ++++++--- | ||
| 32 | 9 files changed, 138 insertions(+), 8 deletions(-) | ||
| 33 | |||
| 34 | diff --git a/libtiff/tif_dir.c b/libtiff/tif_dir.c | ||
| 35 | index 98cf66d..ab43a28 100644 | ||
| 36 | --- a/libtiff/tif_dir.c | ||
| 37 | +++ b/libtiff/tif_dir.c | ||
| 38 | @@ -160,6 +160,7 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) | ||
| 39 | TIFFDirectory* td = &tif->tif_dir; | ||
| 40 | int status = 1; | ||
| 41 | uint32 v32, i, v; | ||
| 42 | + double dblval; | ||
| 43 | char* s; | ||
| 44 | const TIFFField *fip = TIFFFindField(tif, tag, TIFF_ANY); | ||
| 45 | uint32 standard_tag = tag; | ||
| 46 | @@ -284,10 +285,16 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) | ||
| 47 | setDoubleArrayOneValue(&td->td_smaxsamplevalue, va_arg(ap, double), td->td_samplesperpixel); | ||
| 48 | break; | ||
| 49 | case TIFFTAG_XRESOLUTION: | ||
| 50 | - td->td_xresolution = (float) va_arg(ap, double); | ||
| 51 | + dblval = va_arg(ap, double); | ||
| 52 | + if( dblval < 0 ) | ||
| 53 | + goto badvaluedouble; | ||
| 54 | + td->td_xresolution = (float) dblval; | ||
| 55 | break; | ||
| 56 | case TIFFTAG_YRESOLUTION: | ||
| 57 | - td->td_yresolution = (float) va_arg(ap, double); | ||
| 58 | + dblval = va_arg(ap, double); | ||
| 59 | + if( dblval < 0 ) | ||
| 60 | + goto badvaluedouble; | ||
| 61 | + td->td_yresolution = (float) dblval; | ||
| 62 | break; | ||
| 63 | case TIFFTAG_PLANARCONFIG: | ||
| 64 | v = (uint16) va_arg(ap, uint16_vap); | ||
| 65 | @@ -694,6 +701,16 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap) | ||
| 66 | va_end(ap); | ||
| 67 | } | ||
| 68 | return (0); | ||
| 69 | +badvaluedouble: | ||
| 70 | + { | ||
| 71 | + const TIFFField* fip=TIFFFieldWithTag(tif,tag); | ||
| 72 | + TIFFErrorExt(tif->tif_clientdata, module, | ||
| 73 | + "%s: Bad value %f for \"%s\" tag", | ||
| 74 | + tif->tif_name, dblval, | ||
| 75 | + fip ? fip->field_name : "Unknown"); | ||
| 76 | + va_end(ap); | ||
| 77 | + } | ||
| 78 | + return (0); | ||
| 79 | } | ||
| 80 | |||
| 81 | /* | ||
| 82 | diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c | ||
| 83 | index 391c823..f66c9a7 100644 | ||
| 84 | --- a/libtiff/tif_dirread.c | ||
| 85 | +++ b/libtiff/tif_dirread.c | ||
| 86 | @@ -3430,6 +3430,8 @@ TIFFReadDirectory(TIFF* tif) | ||
| 87 | const TIFFField* fip; | ||
| 88 | uint32 fii=FAILED_FII; | ||
| 89 | toff_t nextdiroff; | ||
| 90 | + int bitspersample_read = FALSE; | ||
| 91 | + | ||
| 92 | tif->tif_diroff=tif->tif_nextdiroff; | ||
| 93 | if (!TIFFCheckDirOffset(tif,tif->tif_nextdiroff)) | ||
| 94 | return 0; /* last offset or bad offset (IFD looping) */ | ||
| 95 | @@ -3706,6 +3708,8 @@ TIFFReadDirectory(TIFF* tif) | ||
| 96 | } | ||
| 97 | if (!TIFFSetField(tif,dp->tdir_tag,value)) | ||
| 98 | goto bad; | ||
| 99 | + if( dp->tdir_tag == TIFFTAG_BITSPERSAMPLE ) | ||
| 100 | + bitspersample_read = TRUE; | ||
| 101 | } | ||
| 102 | break; | ||
| 103 | case TIFFTAG_SMINSAMPLEVALUE: | ||
| 104 | @@ -3763,6 +3767,19 @@ TIFFReadDirectory(TIFF* tif) | ||
| 105 | uint32 countrequired; | ||
| 106 | uint32 incrementpersample; | ||
| 107 | uint16* value=NULL; | ||
| 108 | + /* It would be dangerous to instanciate those tag values */ | ||
| 109 | + /* since if td_bitspersample has not yet been read (due to */ | ||
| 110 | + /* unordered tags), it could be read afterwards with a */ | ||
| 111 | + /* values greater than the default one (1), which may cause */ | ||
| 112 | + /* crashes in user code */ | ||
| 113 | + if( !bitspersample_read ) | ||
| 114 | + { | ||
| 115 | + fip = TIFFFieldWithTag(tif,dp->tdir_tag); | ||
| 116 | + TIFFWarningExt(tif->tif_clientdata,module, | ||
| 117 | + "Ignoring %s since BitsPerSample tag not found", | ||
| 118 | + fip ? fip->field_name : "unknown tagname"); | ||
| 119 | + continue; | ||
| 120 | + } | ||
| 121 | countpersample=(1L<<tif->tif_dir.td_bitspersample); | ||
| 122 | if ((dp->tdir_tag==TIFFTAG_TRANSFERFUNCTION)&&(dp->tdir_count==(uint64)countpersample)) | ||
| 123 | { | ||
| 124 | diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c | ||
| 125 | index 074d32a..396ad08 100644 | ||
| 126 | --- a/libtiff/tif_getimage.c | ||
| 127 | +++ b/libtiff/tif_getimage.c | ||
| 128 | @@ -182,8 +182,23 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[1024]) | ||
| 129 | "Planarconfiguration", td->td_planarconfig); | ||
| 130 | return (0); | ||
| 131 | } | ||
| 132 | + if( td->td_samplesperpixel != 3 ) | ||
| 133 | + { | ||
| 134 | + sprintf(emsg, | ||
| 135 | + "Sorry, can not handle image with %s=%d", | ||
| 136 | + "Samples/pixel", td->td_samplesperpixel); | ||
| 137 | + return 0; | ||
| 138 | + } | ||
| 139 | break; | ||
| 140 | case PHOTOMETRIC_CIELAB: | ||
| 141 | + if( td->td_samplesperpixel != 3 || td->td_bitspersample != 8 ) | ||
| 142 | + { | ||
| 143 | + sprintf(emsg, | ||
| 144 | + "Sorry, can not handle image with %s=%d and %s=%d", | ||
| 145 | + "Samples/pixel", td->td_samplesperpixel, | ||
| 146 | + "Bits/sample", td->td_bitspersample); | ||
| 147 | + return 0; | ||
| 148 | + } | ||
| 149 | break; | ||
| 150 | default: | ||
| 151 | sprintf(emsg, "Sorry, can not handle image with %s=%d", | ||
| 152 | diff --git a/libtiff/tif_next.c b/libtiff/tif_next.c | ||
| 153 | index 55e2537..a53c716 100644 | ||
| 154 | --- a/libtiff/tif_next.c | ||
| 155 | +++ b/libtiff/tif_next.c | ||
| 156 | @@ -102,6 +102,8 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) | ||
| 157 | default: { | ||
| 158 | uint32 npixels = 0, grey; | ||
| 159 | uint32 imagewidth = tif->tif_dir.td_imagewidth; | ||
| 160 | + if( isTiled(tif) ) | ||
| 161 | + imagewidth = tif->tif_dir.td_tilewidth; | ||
| 162 | |||
| 163 | /* | ||
| 164 | * The scanline is composed of a sequence of constant | ||
| 165 | diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c | ||
| 166 | index dfda963..f202b41 100644 | ||
| 167 | --- a/tools/tiff2pdf.c | ||
| 168 | +++ b/tools/tiff2pdf.c | ||
| 169 | @@ -1167,6 +1167,15 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){ | ||
| 170 | if( (TIFFGetField(input, TIFFTAG_PLANARCONFIG, &xuint16) != 0) | ||
| 171 | && (xuint16 == PLANARCONFIG_SEPARATE ) ){ | ||
| 172 | TIFFGetField(input, TIFFTAG_SAMPLESPERPIXEL, &xuint16); | ||
| 173 | + if( (t2p->tiff_tiles[i].tiles_tilecount % xuint16) != 0 ) | ||
| 174 | + { | ||
| 175 | + TIFFError( | ||
| 176 | + TIFF2PDF_MODULE, | ||
| 177 | + "Invalid tile count, %s", | ||
| 178 | + TIFFFileName(input)); | ||
| 179 | + t2p->t2p_error = T2P_ERR_ERROR; | ||
| 180 | + return; | ||
| 181 | + } | ||
| 182 | t2p->tiff_tiles[i].tiles_tilecount/= xuint16; | ||
| 183 | } | ||
| 184 | if( t2p->tiff_tiles[i].tiles_tilecount > 0){ | ||
| 185 | @@ -1552,6 +1561,22 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){ | ||
| 186 | #endif | ||
| 187 | break; | ||
| 188 | case PHOTOMETRIC_CIELAB: | ||
| 189 | + if( t2p->tiff_samplesperpixel != 3){ | ||
| 190 | + TIFFError( | ||
| 191 | + TIFF2PDF_MODULE, | ||
| 192 | + "Unsupported samplesperpixel = %d for CIELAB", | ||
| 193 | + t2p->tiff_samplesperpixel); | ||
| 194 | + t2p->t2p_error = T2P_ERR_ERROR; | ||
| 195 | + return; | ||
| 196 | + } | ||
| 197 | + if( t2p->tiff_bitspersample != 8){ | ||
| 198 | + TIFFError( | ||
| 199 | + TIFF2PDF_MODULE, | ||
| 200 | + "Invalid bitspersample = %d for CIELAB", | ||
| 201 | + t2p->tiff_bitspersample); | ||
| 202 | + t2p->t2p_error = T2P_ERR_ERROR; | ||
| 203 | + return; | ||
| 204 | + } | ||
| 205 | t2p->pdf_labrange[0]= -127; | ||
| 206 | t2p->pdf_labrange[1]= 127; | ||
| 207 | t2p->pdf_labrange[2]= -127; | ||
| 208 | @@ -1567,6 +1592,22 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){ | ||
| 209 | t2p->pdf_colorspace=T2P_CS_LAB; | ||
| 210 | break; | ||
| 211 | case PHOTOMETRIC_ITULAB: | ||
| 212 | + if( t2p->tiff_samplesperpixel != 3){ | ||
| 213 | + TIFFError( | ||
| 214 | + TIFF2PDF_MODULE, | ||
| 215 | + "Unsupported samplesperpixel = %d for ITULAB", | ||
| 216 | + t2p->tiff_samplesperpixel); | ||
| 217 | + t2p->t2p_error = T2P_ERR_ERROR; | ||
| 218 | + return; | ||
| 219 | + } | ||
| 220 | + if( t2p->tiff_bitspersample != 8){ | ||
| 221 | + TIFFError( | ||
| 222 | + TIFF2PDF_MODULE, | ||
| 223 | + "Invalid bitspersample = %d for ITULAB", | ||
| 224 | + t2p->tiff_bitspersample); | ||
| 225 | + t2p->t2p_error = T2P_ERR_ERROR; | ||
| 226 | + return; | ||
| 227 | + } | ||
| 228 | t2p->pdf_labrange[0]=-85; | ||
| 229 | t2p->pdf_labrange[1]=85; | ||
| 230 | t2p->pdf_labrange[2]=-75; | ||
| 231 | diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c | ||
| 232 | index f5530bb..4088463 100644 | ||
| 233 | --- a/tools/tiffcrop.c | ||
| 234 | +++ b/tools/tiffcrop.c | ||
| 235 | @@ -1205,9 +1205,10 @@ static int writeBufferToContigTiles (TIFF* out, uint8* buf, uint32 imagelength, | ||
| 236 | tsize_t tilesize = TIFFTileSize(out); | ||
| 237 | unsigned char *tilebuf = NULL; | ||
| 238 | |||
| 239 | - TIFFGetField(out, TIFFTAG_TILELENGTH, &tl); | ||
| 240 | - TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw); | ||
| 241 | - TIFFGetField(out, TIFFTAG_BITSPERSAMPLE, &bps); | ||
| 242 | + if( !TIFFGetField(out, TIFFTAG_TILELENGTH, &tl) || | ||
| 243 | + !TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw) || | ||
| 244 | + !TIFFGetField(out, TIFFTAG_BITSPERSAMPLE, &bps) ) | ||
| 245 | + return 1; | ||
| 246 | |||
| 247 | tile_buffsize = tilesize; | ||
| 248 | if (tilesize < (tsize_t)(tl * tile_rowsize)) | ||
| 249 | diff --git a/tools/tiffdump.c b/tools/tiffdump.c | ||
| 250 | index cf5d62f..8247765 100644 | ||
| 251 | --- a/tools/tiffdump.c | ||
| 252 | +++ b/tools/tiffdump.c | ||
| 253 | @@ -374,6 +374,8 @@ ReadDirectory(int fd, unsigned int ix, uint64 off) | ||
| 254 | void* datamem; | ||
| 255 | uint64 dataoffset; | ||
| 256 | int datatruncated; | ||
| 257 | + int datasizeoverflow; | ||
| 258 | + | ||
| 259 | tag = *(uint16*)dp; | ||
| 260 | if (swabflag) | ||
| 261 | TIFFSwabShort(&tag); | ||
| 262 | @@ -412,13 +414,14 @@ ReadDirectory(int fd, unsigned int ix, uint64 off) | ||
| 263 | else | ||
| 264 | typewidth = datawidth[type]; | ||
| 265 | datasize = count*typewidth; | ||
| 266 | + datasizeoverflow = (typewidth > 0 && datasize / typewidth != count); | ||
| 267 | datafits = 1; | ||
| 268 | datamem = dp; | ||
| 269 | dataoffset = 0; | ||
| 270 | datatruncated = 0; | ||
| 271 | if (!bigtiff) | ||
| 272 | { | ||
| 273 | - if (datasize>4) | ||
| 274 | + if (datasizeoverflow || datasize>4) | ||
| 275 | { | ||
| 276 | uint32 dataoffset32; | ||
| 277 | datafits = 0; | ||
| 278 | @@ -432,7 +435,7 @@ ReadDirectory(int fd, unsigned int ix, uint64 off) | ||
| 279 | } | ||
| 280 | else | ||
| 281 | { | ||
| 282 | - if (datasize>8) | ||
| 283 | + if (datasizeoverflow || datasize>8) | ||
| 284 | { | ||
| 285 | datafits = 0; | ||
| 286 | datamem = NULL; | ||
| 287 | @@ -442,7 +445,7 @@ ReadDirectory(int fd, unsigned int ix, uint64 off) | ||
| 288 | } | ||
| 289 | dp += sizeof(uint64); | ||
| 290 | } | ||
| 291 | - if (datasize>0x10000) | ||
| 292 | + if (datasizeoverflow || datasize>0x10000) | ||
| 293 | { | ||
| 294 | datatruncated = 1; | ||
| 295 | count = 0x10000/typewidth; | ||
diff --git a/gnu/packages/patches/libtiff-CVE-2014-8128-pt1.patch b/gnu/packages/patches/libtiff-CVE-2014-8128-pt1.patch deleted file mode 100644 index fda018b7bb8..00000000000 --- a/gnu/packages/patches/libtiff-CVE-2014-8128-pt1.patch +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | Copied from Debian | ||
| 2 | |||
| 3 | From 3206e0c752a62da1ae606867113ed3bf9bf73306 Mon Sep 17 00:00:00 2001 | ||
| 4 | From: erouault <erouault> | ||
| 5 | Date: Sun, 21 Dec 2014 19:53:59 +0000 | ||
| 6 | Subject: [PATCH] * tools/thumbnail.c: fix out-of-buffer write | ||
| 7 | http://bugzilla.maptools.org/show_bug.cgi?id=2489 (CVE-2014-8128) | ||
| 8 | |||
| 9 | --- | ||
| 10 | ChangeLog | 5 +++++ | ||
| 11 | tools/thumbnail.c | 8 +++++++- | ||
| 12 | 2 files changed, 12 insertions(+), 1 deletion(-) | ||
| 13 | |||
| 14 | diff --git a/tools/thumbnail.c b/tools/thumbnail.c | ||
| 15 | index fab63f6..c50bbff 100644 | ||
| 16 | --- a/tools/thumbnail.c | ||
| 17 | +++ b/tools/thumbnail.c | ||
| 18 | @@ -568,7 +568,13 @@ setImage1(const uint8* br, uint32 rw, uint32 rh) | ||
| 19 | err -= limit; | ||
| 20 | sy++; | ||
| 21 | if (err >= limit) | ||
| 22 | - rows[nrows++] = br + bpr*sy; | ||
| 23 | + { | ||
| 24 | + /* We should perhaps error loudly, but I can't make sense of that */ | ||
| 25 | + /* code... */ | ||
| 26 | + if( nrows == 256 ) | ||
| 27 | + break; | ||
| 28 | + rows[nrows++] = br + bpr*sy; | ||
| 29 | + } | ||
| 30 | } | ||
| 31 | setrow(row, nrows, rows); | ||
| 32 | row += tnw; | ||
diff --git a/gnu/packages/patches/libtiff-CVE-2014-8128-pt2.patch b/gnu/packages/patches/libtiff-CVE-2014-8128-pt2.patch deleted file mode 100644 index 6f9ef85d14b..00000000000 --- a/gnu/packages/patches/libtiff-CVE-2014-8128-pt2.patch +++ /dev/null | |||
| @@ -1,83 +0,0 @@ | |||
| 1 | Copied from Debian | ||
| 2 | |||
| 3 | From 8b6e80fca434525497e5a31c3309a3bab5b3c1c8 Mon Sep 17 00:00:00 2001 | ||
| 4 | From: erouault <erouault> | ||
| 5 | Date: Sun, 21 Dec 2014 18:52:42 +0000 | ||
| 6 | Subject: [PATCH] * tools/thumbnail.c, tools/tiffcmp.c: only read/write | ||
| 7 | TIFFTAG_GROUP3OPTIONS or TIFFTAG_GROUP4OPTIONS if compression is | ||
| 8 | COMPRESSION_CCITTFAX3 or COMPRESSION_CCITTFAX4 | ||
| 9 | http://bugzilla.maptools.org/show_bug.cgi?id=2493 (CVE-2014-8128) | ||
| 10 | |||
| 11 | --- | ||
| 12 | ChangeLog | 7 +++++++ | ||
| 13 | tools/thumbnail.c | 21 ++++++++++++++++++++- | ||
| 14 | tools/tiffcmp.c | 17 +++++++++++++++-- | ||
| 15 | 3 files changed, 42 insertions(+), 3 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/tools/thumbnail.c b/tools/thumbnail.c | ||
| 18 | index a98a881..fab63f6 100644 | ||
| 19 | --- a/tools/thumbnail.c | ||
| 20 | +++ b/tools/thumbnail.c | ||
| 21 | @@ -274,7 +274,26 @@ cpTags(TIFF* in, TIFF* out) | ||
| 22 | { | ||
| 23 | struct cpTag *p; | ||
| 24 | for (p = tags; p < &tags[NTAGS]; p++) | ||
| 25 | - cpTag(in, out, p->tag, p->count, p->type); | ||
| 26 | + { | ||
| 27 | + /* Horrible: but TIFFGetField() expects 2 arguments to be passed */ | ||
| 28 | + /* if we request a tag that is defined in a codec, but that codec */ | ||
| 29 | + /* isn't used */ | ||
| 30 | + if( p->tag == TIFFTAG_GROUP3OPTIONS ) | ||
| 31 | + { | ||
| 32 | + uint16 compression; | ||
| 33 | + if( !TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) || | ||
| 34 | + compression != COMPRESSION_CCITTFAX3 ) | ||
| 35 | + continue; | ||
| 36 | + } | ||
| 37 | + if( p->tag == TIFFTAG_GROUP4OPTIONS ) | ||
| 38 | + { | ||
| 39 | + uint16 compression; | ||
| 40 | + if( !TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) || | ||
| 41 | + compression != COMPRESSION_CCITTFAX4 ) | ||
| 42 | + continue; | ||
| 43 | + } | ||
| 44 | + cpTag(in, out, p->tag, p->count, p->type); | ||
| 45 | + } | ||
| 46 | } | ||
| 47 | #undef NTAGS | ||
| 48 | |||
| 49 | diff --git a/tools/tiffcmp.c b/tools/tiffcmp.c | ||
| 50 | index 508a461..d6392af 100644 | ||
| 51 | --- a/tools/tiffcmp.c | ||
| 52 | +++ b/tools/tiffcmp.c | ||
| 53 | @@ -260,6 +260,7 @@ tiffcmp(TIFF* tif1, TIFF* tif2) | ||
| 54 | static int | ||
| 55 | cmptags(TIFF* tif1, TIFF* tif2) | ||
| 56 | { | ||
| 57 | + uint16 compression1, compression2; | ||
| 58 | CmpLongField(TIFFTAG_SUBFILETYPE, "SubFileType"); | ||
| 59 | CmpLongField(TIFFTAG_IMAGEWIDTH, "ImageWidth"); | ||
| 60 | CmpLongField(TIFFTAG_IMAGELENGTH, "ImageLength"); | ||
| 61 | @@ -276,8 +277,20 @@ cmptags(TIFF* tif1, TIFF* tif2) | ||
| 62 | CmpShortField(TIFFTAG_SAMPLEFORMAT, "SampleFormat"); | ||
| 63 | CmpFloatField(TIFFTAG_XRESOLUTION, "XResolution"); | ||
| 64 | CmpFloatField(TIFFTAG_YRESOLUTION, "YResolution"); | ||
| 65 | - CmpLongField(TIFFTAG_GROUP3OPTIONS, "Group3Options"); | ||
| 66 | - CmpLongField(TIFFTAG_GROUP4OPTIONS, "Group4Options"); | ||
| 67 | + if( TIFFGetField(tif1, TIFFTAG_COMPRESSION, &compression1) && | ||
| 68 | + compression1 == COMPRESSION_CCITTFAX3 && | ||
| 69 | + TIFFGetField(tif2, TIFFTAG_COMPRESSION, &compression2) && | ||
| 70 | + compression2 == COMPRESSION_CCITTFAX3 ) | ||
| 71 | + { | ||
| 72 | + CmpLongField(TIFFTAG_GROUP3OPTIONS, "Group3Options"); | ||
| 73 | + } | ||
| 74 | + if( TIFFGetField(tif1, TIFFTAG_COMPRESSION, &compression1) && | ||
| 75 | + compression1 == COMPRESSION_CCITTFAX4 && | ||
| 76 | + TIFFGetField(tif2, TIFFTAG_COMPRESSION, &compression2) && | ||
| 77 | + compression2 == COMPRESSION_CCITTFAX4 ) | ||
| 78 | + { | ||
| 79 | + CmpLongField(TIFFTAG_GROUP4OPTIONS, "Group4Options"); | ||
| 80 | + } | ||
| 81 | CmpShortField(TIFFTAG_RESOLUTIONUNIT, "ResolutionUnit"); | ||
| 82 | CmpShortField(TIFFTAG_PLANARCONFIG, "PlanarConfiguration"); | ||
| 83 | CmpLongField(TIFFTAG_ROWSPERSTRIP, "RowsPerStrip"); | ||
diff --git a/gnu/packages/patches/libtiff-CVE-2014-8128-pt3.patch b/gnu/packages/patches/libtiff-CVE-2014-8128-pt3.patch deleted file mode 100644 index 200af0ef8b1..00000000000 --- a/gnu/packages/patches/libtiff-CVE-2014-8128-pt3.patch +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | Copied from Debian | ||
| 2 | |||
| 3 | From 266bc48054b018a2f1d74562aa48eb2f509436d5 Mon Sep 17 00:00:00 2001 | ||
| 4 | From: erouault <erouault> | ||
| 5 | Date: Sun, 21 Dec 2014 17:36:36 +0000 | ||
| 6 | Subject: [PATCH] * tools/tiff2pdf.c: check return code of TIFFGetField() when | ||
| 7 | reading TIFFTAG_SAMPLESPERPIXEL | ||
| 8 | |||
| 9 | --- | ||
| 10 | ChangeLog | 5 +++++ | ||
| 11 | tools/tiff2pdf.c | 10 +++++++++- | ||
| 12 | 2 files changed, 14 insertions(+), 1 deletion(-) | ||
| 13 | |||
| 14 | Index: tiff-4.0.3/tools/tiff2pdf.c | ||
| 15 | =================================================================== | ||
| 16 | --- tiff-4.0.3.orig/tools/tiff2pdf.c | ||
| 17 | +++ tiff-4.0.3/tools/tiff2pdf.c | ||
| 18 | @@ -1164,7 +1164,15 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* | ||
| 19 | t2p->tiff_pages[i].page_tilecount; | ||
| 20 | if( (TIFFGetField(input, TIFFTAG_PLANARCONFIG, &xuint16) != 0) | ||
| 21 | && (xuint16 == PLANARCONFIG_SEPARATE ) ){ | ||
| 22 | - TIFFGetField(input, TIFFTAG_SAMPLESPERPIXEL, &xuint16); | ||
| 23 | + if( !TIFFGetField(input, TIFFTAG_SAMPLESPERPIXEL, &xuint16) ) | ||
| 24 | + { | ||
| 25 | + TIFFError( | ||
| 26 | + TIFF2PDF_MODULE, | ||
| 27 | + "Missing SamplesPerPixel, %s", | ||
| 28 | + TIFFFileName(input)); | ||
| 29 | + t2p->t2p_error = T2P_ERR_ERROR; | ||
| 30 | + return; | ||
| 31 | + } | ||
| 32 | if( (t2p->tiff_tiles[i].tiles_tilecount % xuint16) != 0 ) | ||
| 33 | { | ||
| 34 | TIFFError( | ||
diff --git a/gnu/packages/patches/libtiff-CVE-2014-8128-pt4.patch b/gnu/packages/patches/libtiff-CVE-2014-8128-pt4.patch deleted file mode 100644 index fda4045504f..00000000000 --- a/gnu/packages/patches/libtiff-CVE-2014-8128-pt4.patch +++ /dev/null | |||
| @@ -1,77 +0,0 @@ | |||
| 1 | Copied from Debian | ||
| 2 | |||
| 3 | Picked from CVE: diff -u -r1.14 -r1.15 | ||
| 4 | http://bugzilla.maptools.org/show_bug.cgi?id=2501 | ||
| 5 | |||
| 6 | Author: Even Rouault <even.rouault@spatialys.com> | ||
| 7 | |||
| 8 | --- tiff-4.0.3.orig/tools/tiffdither.c | ||
| 9 | +++ tiff-4.0.3/tools/tiffdither.c | ||
| 10 | @@ -39,6 +39,7 @@ | ||
| 11 | #endif | ||
| 12 | |||
| 13 | #include "tiffio.h" | ||
| 14 | +#include "tiffiop.h" | ||
| 15 | |||
| 16 | #define streq(a,b) (strcmp(a,b) == 0) | ||
| 17 | #define strneq(a,b,n) (strncmp(a,b,n) == 0) | ||
| 18 | @@ -56,7 +57,7 @@ static void usage(void); | ||
| 19 | * Floyd-Steinberg error propragation with threshold. | ||
| 20 | * This code is stolen from tiffmedian. | ||
| 21 | */ | ||
| 22 | -static void | ||
| 23 | +static int | ||
| 24 | fsdither(TIFF* in, TIFF* out) | ||
| 25 | { | ||
| 26 | unsigned char *outline, *inputline, *inptr; | ||
| 27 | @@ -68,14 +69,19 @@ fsdither(TIFF* in, TIFF* out) | ||
| 28 | int lastline, lastpixel; | ||
| 29 | int bit; | ||
| 30 | tsize_t outlinesize; | ||
| 31 | + int errcode = 0; | ||
| 32 | |||
| 33 | imax = imagelength - 1; | ||
| 34 | jmax = imagewidth - 1; | ||
| 35 | inputline = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(in)); | ||
| 36 | - thisline = (short *)_TIFFmalloc(imagewidth * sizeof (short)); | ||
| 37 | - nextline = (short *)_TIFFmalloc(imagewidth * sizeof (short)); | ||
| 38 | + thisline = (short *)_TIFFmalloc(TIFFSafeMultiply(tmsize_t, imagewidth, sizeof (short))); | ||
| 39 | + nextline = (short *)_TIFFmalloc(TIFFSafeMultiply(tmsize_t, imagewidth, sizeof (short))); | ||
| 40 | outlinesize = TIFFScanlineSize(out); | ||
| 41 | outline = (unsigned char *) _TIFFmalloc(outlinesize); | ||
| 42 | + if (! (inputline && thisline && nextline && outline)) { | ||
| 43 | + fprintf(stderr, "Out of memory.\n"); | ||
| 44 | + goto skip_on_error; | ||
| 45 | + } | ||
| 46 | |||
| 47 | /* | ||
| 48 | * Get first line | ||
| 49 | @@ -93,7 +99,7 @@ fsdither(TIFF* in, TIFF* out) | ||
| 50 | nextline = tmpptr; | ||
| 51 | lastline = (i == imax); | ||
| 52 | if (TIFFReadScanline(in, inputline, i, 0) <= 0) | ||
| 53 | - break; | ||
| 54 | + goto skip_on_error; | ||
| 55 | inptr = inputline; | ||
| 56 | nextptr = nextline; | ||
| 57 | for (j = 0; j < imagewidth; ++j) | ||
| 58 | @@ -131,13 +137,18 @@ fsdither(TIFF* in, TIFF* out) | ||
| 59 | } | ||
| 60 | } | ||
| 61 | if (TIFFWriteScanline(out, outline, i-1, 0) < 0) | ||
| 62 | - break; | ||
| 63 | + goto skip_on_error; | ||
| 64 | } | ||
| 65 | + goto exit_label; | ||
| 66 | + | ||
| 67 | skip_on_error: | ||
| 68 | + errcode = 1; | ||
| 69 | + exit_label: | ||
| 70 | _TIFFfree(inputline); | ||
| 71 | _TIFFfree(thisline); | ||
| 72 | _TIFFfree(nextline); | ||
| 73 | _TIFFfree(outline); | ||
| 74 | + return errcode; | ||
| 75 | } | ||
| 76 | |||
| 77 | static uint16 compression = COMPRESSION_PACKBITS; | ||
diff --git a/gnu/packages/patches/libtiff-CVE-2014-8128-pt5.patch b/gnu/packages/patches/libtiff-CVE-2014-8128-pt5.patch deleted file mode 100644 index a555a187479..00000000000 --- a/gnu/packages/patches/libtiff-CVE-2014-8128-pt5.patch +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | Copied from Debian | ||
| 2 | |||
| 3 | Patches by Petr Gajdos (pgajdos@suse.cz) from | ||
| 4 | http://bugzilla.maptools.org/show_bug.cgi?id=2499 | ||
| 5 | |||
| 6 | --- tiff-4.0.3.orig/libtiff/tif_dirinfo.c | ||
| 7 | +++ tiff-4.0.3/libtiff/tif_dirinfo.c | ||
| 8 | @@ -141,6 +141,8 @@ tiffFields[] = { | ||
| 9 | { TIFFTAG_FAXDCS, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_ASCII, FIELD_CUSTOM, TRUE, FALSE, "FaxDcs", NULL }, | ||
| 10 | { TIFFTAG_STONITS, 1, 1, TIFF_DOUBLE, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "StoNits", NULL }, | ||
| 11 | { TIFFTAG_INTEROPERABILITYIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "InteroperabilityIFDOffset", NULL }, | ||
| 12 | + { TIFFTAG_CONSECUTIVEBADFAXLINES, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UINT32, FIELD_CUSTOM, TRUE, FALSE, "ConsecutiveBadFaxLines", NULL }, | ||
| 13 | + { TIFFTAG_PREDICTOR, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UINT16, FIELD_CUSTOM, FALSE, FALSE, "Predictor", NULL }, | ||
| 14 | /* begin DNG tags */ | ||
| 15 | { TIFFTAG_DNGVERSION, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DNGVersion", NULL }, | ||
| 16 | { TIFFTAG_DNGBACKWARDVERSION, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DNGBackwardVersion", NULL }, | ||
diff --git a/gnu/packages/patches/libtiff-CVE-2014-8129.patch b/gnu/packages/patches/libtiff-CVE-2014-8129.patch deleted file mode 100644 index 091ec8f5739..00000000000 --- a/gnu/packages/patches/libtiff-CVE-2014-8129.patch +++ /dev/null | |||
| @@ -1,45 +0,0 @@ | |||
| 1 | Copied from Debian | ||
| 2 | |||
| 3 | From cd82b5267ad4c10eb91e4ee8a716a81362cf851c Mon Sep 17 00:00:00 2001 | ||
| 4 | From: erouault <erouault> | ||
| 5 | Date: Sun, 21 Dec 2014 18:07:48 +0000 | ||
| 6 | Subject: [PATCH] * libtiff/tif_next.c: check that BitsPerSample = 2. Fixes | ||
| 7 | http://bugzilla.maptools.org/show_bug.cgi?id=2487 (CVE-2014-8129) | ||
| 8 | |||
| 9 | --- | ||
| 10 | ChangeLog | 5 +++++ | ||
| 11 | libtiff/tif_next.c | 17 +++++++++++++++++ | ||
| 12 | 2 files changed, 22 insertions(+) | ||
| 13 | |||
| 14 | diff --git a/libtiff/tif_next.c b/libtiff/tif_next.c | ||
| 15 | index a53c716..d834196 100644 | ||
| 16 | --- a/libtiff/tif_next.c | ||
| 17 | +++ b/libtiff/tif_next.c | ||
| 18 | @@ -141,10 +141,27 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) | ||
| 19 | return (0); | ||
| 20 | } | ||
| 21 | |||
| 22 | +static int | ||
| 23 | +NeXTPreDecode(TIFF* tif, uint16 s) | ||
| 24 | +{ | ||
| 25 | + static const char module[] = "NeXTPreDecode"; | ||
| 26 | + TIFFDirectory *td = &tif->tif_dir; | ||
| 27 | + (void)s; | ||
| 28 | + | ||
| 29 | + if( td->td_bitspersample != 2 ) | ||
| 30 | + { | ||
| 31 | + TIFFErrorExt(tif->tif_clientdata, module, "Unsupported BitsPerSample = %d", | ||
| 32 | + td->td_bitspersample); | ||
| 33 | + return (0); | ||
| 34 | + } | ||
| 35 | + return (1); | ||
| 36 | +} | ||
| 37 | + | ||
| 38 | int | ||
| 39 | TIFFInitNeXT(TIFF* tif, int scheme) | ||
| 40 | { | ||
| 41 | (void) scheme; | ||
| 42 | + tif->tif_predecode = NeXTPreDecode; | ||
| 43 | tif->tif_decoderow = NeXTDecode; | ||
| 44 | tif->tif_decodestrip = NeXTDecode; | ||
| 45 | tif->tif_decodetile = NeXTDecode; | ||
diff --git a/gnu/packages/patches/libtiff-CVE-2014-9330.patch b/gnu/packages/patches/libtiff-CVE-2014-9330.patch deleted file mode 100644 index c3c5fc03676..00000000000 --- a/gnu/packages/patches/libtiff-CVE-2014-9330.patch +++ /dev/null | |||
| @@ -1,47 +0,0 @@ | |||
| 1 | Copied from Debian | ||
| 2 | |||
| 3 | Description: CVE-2014-9330 | ||
| 4 | Integer overflow in bmp2tiff | ||
| 5 | Origin: upstream, http://bugzilla.maptools.org/show_bug.cgi?id=2494 | ||
| 6 | Bug: http://bugzilla.maptools.org/show_bug.cgi?id=2494 | ||
| 7 | Bug-Debian: http://bugs.debian.org/773987 | ||
| 8 | |||
| 9 | Index: tiff/tools/bmp2tiff.c | ||
| 10 | =================================================================== | ||
| 11 | --- tiff.orig/tools/bmp2tiff.c | ||
| 12 | +++ tiff/tools/bmp2tiff.c | ||
| 13 | @@ -1,4 +1,4 @@ | ||
| 14 | -/* $Id: bmp2tiff.c,v 1.23 2010-03-10 18:56:49 bfriesen Exp $ | ||
| 15 | +/* $Id: bmp2tiff.c,v 1.24 2014-12-21 15:15:32 erouault Exp $ | ||
| 16 | * | ||
| 17 | * Project: libtiff tools | ||
| 18 | * Purpose: Convert Windows BMP files in TIFF. | ||
| 19 | @@ -403,6 +403,13 @@ main(int argc, char* argv[]) | ||
| 20 | |||
| 21 | width = info_hdr.iWidth; | ||
| 22 | length = (info_hdr.iHeight > 0) ? info_hdr.iHeight : -info_hdr.iHeight; | ||
| 23 | + if( width <= 0 || length <= 0 ) | ||
| 24 | + { | ||
| 25 | + TIFFError(infilename, | ||
| 26 | + "Invalid dimensions of BMP file" ); | ||
| 27 | + close(fd); | ||
| 28 | + return -1; | ||
| 29 | + } | ||
| 30 | |||
| 31 | switch (info_hdr.iBitCount) | ||
| 32 | { | ||
| 33 | @@ -593,6 +600,14 @@ main(int argc, char* argv[]) | ||
| 34 | |||
| 35 | compr_size = file_hdr.iSize - file_hdr.iOffBits; | ||
| 36 | uncompr_size = width * length; | ||
| 37 | + /* Detect int overflow */ | ||
| 38 | + if( uncompr_size / width != length ) | ||
| 39 | + { | ||
| 40 | + TIFFError(infilename, | ||
| 41 | + "Invalid dimensions of BMP file" ); | ||
| 42 | + close(fd); | ||
| 43 | + return -1; | ||
| 44 | + } | ||
| 45 | comprbuf = (unsigned char *) _TIFFmalloc( compr_size ); | ||
| 46 | if (!comprbuf) { | ||
| 47 | TIFFError(infilename, | ||
diff --git a/gnu/packages/patches/libtiff-CVE-2014-9655.patch b/gnu/packages/patches/libtiff-CVE-2014-9655.patch deleted file mode 100644 index 065804d03a7..00000000000 --- a/gnu/packages/patches/libtiff-CVE-2014-9655.patch +++ /dev/null | |||
| @@ -1,88 +0,0 @@ | |||
| 1 | Copied from Debian | ||
| 2 | |||
| 3 | From 40a5955cbf0df62b1f9e9bd7d9657b0070725d19 Mon Sep 17 00:00:00 2001 | ||
| 4 | From: erouault <erouault> | ||
| 5 | Date: Mon, 29 Dec 2014 12:09:11 +0000 | ||
| 6 | Subject: [PATCH] * libtiff/tif_next.c: add new tests to check that we don't | ||
| 7 | read outside of the compressed input stream buffer. | ||
| 8 | |||
| 9 | * libtiff/tif_getimage.c: in OJPEG case, fix checks on strile width/height | ||
| 10 | --- | ||
| 11 | ChangeLog | 9 +++++++++ | ||
| 12 | libtiff/tif_getimage.c | 12 +++++++----- | ||
| 13 | libtiff/tif_next.c | 4 +++- | ||
| 14 | 3 files changed, 19 insertions(+), 6 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c | ||
| 17 | index a4f46d9..3ad8ee7 100644 | ||
| 18 | --- a/libtiff/tif_getimage.c | ||
| 19 | +++ b/libtiff/tif_getimage.c | ||
| 20 | @@ -1871,7 +1871,7 @@ DECLAREContigPutFunc(putcontig8bitYCbCr42tile) | ||
| 21 | |||
| 22 | (void) y; | ||
| 23 | fromskew = (fromskew * 10) / 4; | ||
| 24 | - if ((h & 3) == 0 && (w & 1) == 0) { | ||
| 25 | + if ((w & 3) == 0 && (h & 1) == 0) { | ||
| 26 | for (; h >= 2; h -= 2) { | ||
| 27 | x = w>>2; | ||
| 28 | do { | ||
| 29 | @@ -1948,7 +1948,7 @@ DECLAREContigPutFunc(putcontig8bitYCbCr41tile) | ||
| 30 | /* XXX adjust fromskew */ | ||
| 31 | do { | ||
| 32 | x = w>>2; | ||
| 33 | - do { | ||
| 34 | + while(x>0) { | ||
| 35 | int32 Cb = pp[4]; | ||
| 36 | int32 Cr = pp[5]; | ||
| 37 | |||
| 38 | @@ -1959,7 +1959,8 @@ DECLAREContigPutFunc(putcontig8bitYCbCr41tile) | ||
| 39 | |||
| 40 | cp += 4; | ||
| 41 | pp += 6; | ||
| 42 | - } while (--x); | ||
| 43 | + x--; | ||
| 44 | + } | ||
| 45 | |||
| 46 | if( (w&3) != 0 ) | ||
| 47 | { | ||
| 48 | @@ -2050,7 +2051,7 @@ DECLAREContigPutFunc(putcontig8bitYCbCr21tile) | ||
| 49 | fromskew = (fromskew * 4) / 2; | ||
| 50 | do { | ||
| 51 | x = w>>1; | ||
| 52 | - do { | ||
| 53 | + while(x>0) { | ||
| 54 | int32 Cb = pp[2]; | ||
| 55 | int32 Cr = pp[3]; | ||
| 56 | |||
| 57 | @@ -2059,7 +2060,8 @@ DECLAREContigPutFunc(putcontig8bitYCbCr21tile) | ||
| 58 | |||
| 59 | cp += 2; | ||
| 60 | pp += 4; | ||
| 61 | - } while (--x); | ||
| 62 | + x --; | ||
| 63 | + } | ||
| 64 | |||
| 65 | if( (w&1) != 0 ) | ||
| 66 | { | ||
| 67 | diff --git a/libtiff/tif_next.c b/libtiff/tif_next.c | ||
| 68 | index d834196..dd669cc 100644 | ||
| 69 | --- a/libtiff/tif_next.c | ||
| 70 | +++ b/libtiff/tif_next.c | ||
| 71 | @@ -71,7 +71,7 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) | ||
| 72 | TIFFErrorExt(tif->tif_clientdata, module, "Fractional scanlines cannot be read"); | ||
| 73 | return (0); | ||
| 74 | } | ||
| 75 | - for (row = buf; occ > 0; occ -= scanline, row += scanline) { | ||
| 76 | + for (row = buf; cc > 0 && occ > 0; occ -= scanline, row += scanline) { | ||
| 77 | n = *bp++, cc--; | ||
| 78 | switch (n) { | ||
| 79 | case LITERALROW: | ||
| 80 | @@ -90,6 +90,8 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) | ||
| 81 | * The scanline has a literal span that begins at some | ||
| 82 | * offset. | ||
| 83 | */ | ||
| 84 | + if( cc < 4 ) | ||
| 85 | + goto bad; | ||
| 86 | off = (bp[0] * 256) + bp[1]; | ||
| 87 | n = (bp[2] * 256) + bp[3]; | ||
| 88 | if (cc < 4+n || off+n > scanline) | ||
diff --git a/gnu/packages/patches/openssl-c-rehash.patch b/gnu/packages/patches/openssl-c-rehash.patch new file mode 100644 index 00000000000..f873a9af235 --- /dev/null +++ b/gnu/packages/patches/openssl-c-rehash.patch | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | This patch removes the explicit reference to the 'perl' binary, | ||
| 2 | such that OpenSSL does not retain a reference to Perl. | ||
| 3 | |||
| 4 | The 'c_rehash' program is seldom used, but it is used nonetheless | ||
| 5 | to create symbolic links to certificates, for instance in the 'nss-certs' | ||
| 6 | package. | ||
| 7 | |||
| 8 | --- openssl-1.0.2d/tools/c_rehash 2015-09-09 18:36:07.313316482 +0200 | ||
| 9 | +++ openssl-1.0.2d/tools/c_rehash 2015-09-09 18:36:28.965458458 +0200 | ||
| 10 | @@ -1,4 +1,6 @@ | ||
| 11 | -#!/usr/bin/perl | ||
| 12 | +eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' | ||
| 13 | + & eval 'exec perl -wS "$0" $argv:q' | ||
| 14 | + if 0; | ||
| 15 | |||
| 16 | # Perl c_rehash script, scan all files in a directory | ||
| 17 | # and add symbolic links to their hash values. | ||
diff --git a/gnu/packages/patches/perl-autosplit-default-time.patch b/gnu/packages/patches/perl-autosplit-default-time.patch new file mode 100644 index 00000000000..e801ac9bfe0 --- /dev/null +++ b/gnu/packages/patches/perl-autosplit-default-time.patch | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | AutoSplit will fail to create an index for files whose modification time is 0 | ||
| 2 | because its default time for a non-existent index is 1. Set this default time | ||
| 3 | to -1 instead. | ||
| 4 | |||
| 5 | --- perl-5.16.1/cpan/AutoLoader/lib/AutoSplit.pm.orig 2012-02-14 22:44:36.000000000 -0600 | ||
| 6 | +++ perl-5.16.1/cpan/AutoLoader/lib/AutoSplit.pm 2015-09-09 19:59:22.208708921 -0500 | ||
| 7 | @@ -361,7 +361,7 @@ | ||
| 8 | my($al_idx_file) = catfile($autodir, $modpname, $IndexFile); | ||
| 9 | |||
| 10 | if ($check_mod_time){ | ||
| 11 | - my($al_ts_time) = (stat("$al_idx_file"))[9] || 1; | ||
| 12 | + my($al_ts_time) = (stat("$al_idx_file"))[9] || -1; | ||
| 13 | if ($al_ts_time >= $pm_mod_time and | ||
| 14 | $al_ts_time >= $self_mod_time){ | ||
| 15 | print "AutoSplit skipped ($al_idx_file newer than $filename)\n" | ||
diff --git a/gnu/packages/patches/pixman-pointer-arithmetic.patch b/gnu/packages/patches/pixman-pointer-arithmetic.patch new file mode 100644 index 00000000000..d34e6632a01 --- /dev/null +++ b/gnu/packages/patches/pixman-pointer-arithmetic.patch | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | Fix <https://bugs.freedesktop.org/show_bug.cgi?id=92027> whereby | ||
| 2 | an arithemitic overflow could occur while doing pointer arithmetic, | ||
| 3 | leading pixman to use an invalid address as the destination buffer. | ||
| 4 | |||
| 5 | --- pixman-0.32.6/pixman/pixman-general.c 2015-09-21 15:14:34.695981325 +0200 | ||
| 6 | +++ pixman-0.32.6/pixman/pixman-general.c 2015-09-21 15:19:48.898355548 +0200 | ||
| 7 | @@ -144,8 +144,7 @@ general_composite_rect (pixman_implemen | ||
| 8 | mask_buffer = ALIGN (src_buffer + width * Bpp); | ||
| 9 | dest_buffer = ALIGN (mask_buffer + width * Bpp); | ||
| 10 | |||
| 11 | - if (ALIGN (dest_buffer + width * Bpp) > | ||
| 12 | - scanline_buffer + sizeof (stack_scanline_buffer)) | ||
| 13 | + if ((width + 1) * Bpp * 3 > sizeof (stack_scanline_buffer)) | ||
| 14 | { | ||
| 15 | scanline_buffer = pixman_malloc_ab_plus_c (width, Bpp * 3, 32 * 3); | ||
diff --git a/gnu/packages/patches/util-linux-tests.patch b/gnu/packages/patches/util-linux-tests.patch index 2ad025f66ac..f436299b7f8 100644 --- a/gnu/packages/patches/util-linux-tests.patch +++ b/gnu/packages/patches/util-linux-tests.patch | |||
| @@ -16,15 +16,3 @@ using 'getpwnam' in libmount. This doesn't work in the chroot because | |||
| 16 | ts_init_subtest "deduplicate" | 16 | ts_init_subtest "deduplicate" |
| 17 | ts_valgrind $TESTPROG --dedup bbb,ccc,AAA,xxx,AAA=a,AAA=bbb,ddd,AAA=ccc,fff=eee AAA &> $TS_OUTPUT | 17 | ts_valgrind $TESTPROG --dedup bbb,ccc,AAA,xxx,AAA=a,AAA=bbb,ddd,AAA=ccc,fff=eee AAA &> $TS_OUTPUT |
| 18 | ts_finalize_subtest | 18 | ts_finalize_subtest |
| 19 | |||
| 20 | |||
| 21 | The expected output for this test seems to lack a carriage return. | ||
| 22 | |||
| 23 | --- util-linux-2.25.2/tests/expected/more/regexp 2015-01-23 14:02:21.098557632 +0100 | ||
| 24 | +++ util-linux-2.25.2/tests/expected/more/regexp 2015-01-23 14:02:23.598573648 +0100 | ||
| 25 | @@ -1,4 +1,4 @@ | ||
| 26 | |||
| 27 | ...skipping | ||
| 28 | -foo | ||
| 29 | + foo | ||
| 30 | xyzzy | ||
diff --git a/gnu/packages/patches/valgrind-glibc-2.21.patch b/gnu/packages/patches/valgrind-glibc-2.22.patch index 70f809c43fd..36c4916cc68 100644 --- a/gnu/packages/patches/valgrind-glibc-2.21.patch +++ b/gnu/packages/patches/valgrind-glibc-2.22.patch | |||
| @@ -4,10 +4,13 @@ Initial Package Version: 3.10.1 | |||
| 4 | Upstream Status: Unknown | 4 | Upstream Status: Unknown |
| 5 | Origin: Self | 5 | Origin: Self |
| 6 | Description: Allows Valgrind to build with glibc-2.21 | 6 | Description: Allows Valgrind to build with glibc-2.21 |
| 7 | |||
| 8 | Later modified to support glibc-2.22 as well. | ||
| 9 | |||
| 7 | diff -Naur valgrind-3.10.1.old/configure valgrind-3.10.1.new/configure | 10 | diff -Naur valgrind-3.10.1.old/configure valgrind-3.10.1.new/configure |
| 8 | --- valgrind-3.10.1.old/configure 2014-11-25 20:42:25.000000000 +0100 | 11 | --- valgrind-3.10.1.old/configure 2014-11-25 20:42:25.000000000 +0100 |
| 9 | +++ valgrind-3.10.1.new/configure 2015-02-22 10:46:06.607826488 +0100 | 12 | +++ valgrind-3.10.1.new/configure 2015-02-22 10:46:06.607826488 +0100 |
| 10 | @@ -6842,6 +6842,16 @@ | 13 | @@ -6842,6 +6842,26 @@ |
| 11 | DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" | 14 | DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" |
| 12 | DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" | 15 | DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" |
| 13 | ;; | 16 | ;; |
| @@ -21,6 +24,16 @@ diff -Naur valgrind-3.10.1.old/configure valgrind-3.10.1.new/configure | |||
| 21 | + DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" | 24 | + DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" |
| 22 | + DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" | 25 | + DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" |
| 23 | + ;; | 26 | + ;; |
| 27 | + 2.22) | ||
| 28 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.22 family" >&5 | ||
| 29 | +$as_echo "2.22 family" >&6; } | ||
| 30 | + | ||
| 31 | +$as_echo "#define GLIBC_2_22 1" >>confdefs.h | ||
| 32 | + | ||
| 33 | + DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" | ||
| 34 | + DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" | ||
| 35 | + DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" | ||
| 36 | + ;; | ||
| 24 | darwin) | 37 | darwin) |
| 25 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5 | 38 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5 |
| 26 | $as_echo "Darwin" >&6; } | 39 | $as_echo "Darwin" >&6; } |
diff --git a/gnu/packages/patches/valgrind-linux-libre-4.x.patch b/gnu/packages/patches/valgrind-linux-libre-4.x.patch new file mode 100644 index 00000000000..79166619c72 --- /dev/null +++ b/gnu/packages/patches/valgrind-linux-libre-4.x.patch | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | Modify valgrind's configure script to accept linux-libre-4.x as being in the | ||
| 2 | same family as 3.x. | ||
| 3 | |||
| 4 | --- valgrind-3.10.1/configure 2015-09-15 18:02:20.710262686 -0400 | ||
| 5 | +++ valgrind-3.10.1/configure 2015-09-15 18:02:59.831829731 -0400 | ||
| 6 | @@ -5553,9 +5553,9 @@ | ||
| 7 | kernel=`uname -r` | ||
| 8 | |||
| 9 | case "${kernel}" in | ||
| 10 | - 2.6.*|3.*) | ||
| 11 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.6.x/3.x family (${kernel})" >&5 | ||
| 12 | -$as_echo "2.6.x/3.x family (${kernel})" >&6; } | ||
| 13 | + 2.6.*|3.*|4.*) | ||
| 14 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.6.x/3.x/4.x family (${kernel})" >&5 | ||
| 15 | +$as_echo "2.6.x/3.x/4.x family (${kernel})" >&6; } | ||
| 16 | |||
| 17 | $as_echo "#define KERNEL_2_6 1" >>confdefs.h | ||
| 18 | |||
diff --git a/gnu/packages/pciutils.scm b/gnu/packages/pciutils.scm index 7135af44e50..e022b6a81df 100644 --- a/gnu/packages/pciutils.scm +++ b/gnu/packages/pciutils.scm | |||
| @@ -28,16 +28,16 @@ | |||
| 28 | (define-public pciutils | 28 | (define-public pciutils |
| 29 | (package | 29 | (package |
| 30 | (name "pciutils") | 30 | (name "pciutils") |
| 31 | (version "3.2.0") | 31 | (version "3.3.1") |
| 32 | (source (origin | 32 | (source (origin |
| 33 | (method url-fetch) | 33 | (method url-fetch) |
| 34 | (uri (string-append | 34 | (uri (string-append |
| 35 | "mirror://kernel.org/software/utils/pciutils/pciutils-" | 35 | "mirror://kernel.org/software/utils/pciutils/pciutils-" |
| 36 | version | 36 | version |
| 37 | ".tar.bz2")) | 37 | ".tar.xz")) |
| 38 | (sha256 | 38 | (sha256 |
| 39 | (base32 | 39 | (base32 |
| 40 | "0d9as9jzjjg5c1nwf58z1y1i7rf9fqxmww1civckhcvcn0xr85mq")))) | 40 | "1ag3skny1bamqil46dlppw8j1fp08spqa60fjygbxkg4fzdknjji")))) |
| 41 | (build-system gnu-build-system) | 41 | (build-system gnu-build-system) |
| 42 | (arguments | 42 | (arguments |
| 43 | '(#:phases (alist-replace | 43 | '(#:phases (alist-replace |
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 5897974e781..03ed5113b13 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm | |||
| @@ -52,13 +52,13 @@ | |||
| 52 | (define-public poppler | 52 | (define-public poppler |
| 53 | (package | 53 | (package |
| 54 | (name "poppler") | 54 | (name "poppler") |
| 55 | (version "0.32.0") | 55 | (version "0.36.0") |
| 56 | (source (origin | 56 | (source (origin |
| 57 | (method url-fetch) | 57 | (method url-fetch) |
| 58 | (uri (string-append "http://poppler.freedesktop.org/poppler-" | 58 | (uri (string-append "http://poppler.freedesktop.org/poppler-" |
| 59 | version ".tar.xz")) | 59 | version ".tar.xz")) |
| 60 | (sha256 (base32 | 60 | (sha256 (base32 |
| 61 | "162vfbvbz0frvqyk00ldsbl49h4bj8i8wn0ngfl30xg1lldy6qs9")))) | 61 | "13i440kv873wgmw50rs4d1v05cj0r7bqnghd70hp9vy44dxhdk4k")))) |
| 62 | (build-system gnu-build-system) | 62 | (build-system gnu-build-system) |
| 63 | ;; FIXME: more dependencies could be added | 63 | ;; FIXME: more dependencies could be added |
| 64 | ;; cairo output: no (requires cairo >= 1.10.0) | 64 | ;; cairo output: no (requires cairo >= 1.10.0) |
| @@ -477,13 +477,13 @@ and examining the file structure (pdfshow).") | |||
| 477 | (define-public qpdf | 477 | (define-public qpdf |
| 478 | (package | 478 | (package |
| 479 | (name "qpdf") | 479 | (name "qpdf") |
| 480 | (version "5.1.2") | 480 | (version "5.1.3") |
| 481 | (source (origin | 481 | (source (origin |
| 482 | (method url-fetch) | 482 | (method url-fetch) |
| 483 | (uri (string-append "mirror://sourceforge/qpdf/qpdf-" | 483 | (uri (string-append "mirror://sourceforge/qpdf/qpdf-" |
| 484 | version ".tar.gz")) | 484 | version ".tar.gz")) |
| 485 | (sha256 (base32 | 485 | (sha256 (base32 |
| 486 | "1zbvhrp0zjzbi6q2bnbxbg6399r47pq5gw3kspzph81j19fqvpg9")))) | 486 | "1lq1v7xghvl6p4hgrwbps3a13ad6lh4ib3myimb83hxgsgd4n5nm")))) |
| 487 | (build-system gnu-build-system) | 487 | (build-system gnu-build-system) |
| 488 | (arguments | 488 | (arguments |
| 489 | '(#:phases (alist-cons-before | 489 | '(#:phases (alist-cons-before |
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index 5bae3f31c80..95aa596cf51 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm | |||
| @@ -47,6 +47,7 @@ | |||
| 47 | "15qxzba3a50c9nik5ydgyfp62x7h9vxxn12yd1jgl93hb1wj96km")) | 47 | "15qxzba3a50c9nik5ydgyfp62x7h9vxxn12yd1jgl93hb1wj96km")) |
| 48 | (patches (map search-patch | 48 | (patches (map search-patch |
| 49 | '("perl-no-sys-dirs.patch" | 49 | '("perl-no-sys-dirs.patch" |
| 50 | "perl-autosplit-default-time.patch" | ||
| 50 | "perl-module-pluggable-search.patch"))))) | 51 | "perl-module-pluggable-search.patch"))))) |
| 51 | (build-system gnu-build-system) | 52 | (build-system gnu-build-system) |
| 52 | (arguments | 53 | (arguments |
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 7bb5e95c353..708ba29d240 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm | |||
| @@ -674,7 +674,7 @@ have been used.") | |||
| 674 | (define-public python-setuptools | 674 | (define-public python-setuptools |
| 675 | (package | 675 | (package |
| 676 | (name "python-setuptools") | 676 | (name "python-setuptools") |
| 677 | (version "12.1") | 677 | (version "18.3.1") |
| 678 | (source | 678 | (source |
| 679 | (origin | 679 | (origin |
| 680 | (method url-fetch) | 680 | (method url-fetch) |
| @@ -682,7 +682,7 @@ have been used.") | |||
| 682 | version ".tar.gz")) | 682 | version ".tar.gz")) |
| 683 | (sha256 | 683 | (sha256 |
| 684 | (base32 | 684 | (base32 |
| 685 | "04bfk7si1pwj3b5k2b1x9b1zkiclybmzpw6alrs5bciri56lg9zs")))) | 685 | "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig")))) |
| 686 | (build-system python-build-system) | 686 | (build-system python-build-system) |
| 687 | ;; FIXME: Tests require pytest, which itself relies on setuptools. | 687 | ;; FIXME: Tests require pytest, which itself relies on setuptools. |
| 688 | ;; One could bootstrap with an internal untested setuptools. | 688 | ;; One could bootstrap with an internal untested setuptools. |
| @@ -2791,7 +2791,7 @@ association studies (GWAS) on extremely large data sets.") | |||
| 2791 | (tgt-dir (string-append html "/" dir))) | 2791 | (tgt-dir (string-append html "/" dir))) |
| 2792 | (unless (equal? "." dir) | 2792 | (unless (equal? "." dir) |
| 2793 | (mkdir-p tgt-dir)) | 2793 | (mkdir-p tgt-dir)) |
| 2794 | (copy-file file (string-append html "/" file)))) | 2794 | (install-file file html))) |
| 2795 | (find-files "." ".*")))))) | 2795 | (find-files "." ".*")))))) |
| 2796 | ,phases))))))) | 2796 | ,phases))))))) |
| 2797 | 2797 | ||
| @@ -2835,7 +2835,7 @@ association studies (GWAS) on extremely large data sets.") | |||
| 2835 | (for-each | 2835 | (for-each |
| 2836 | (lambda (dir tgt) | 2836 | (lambda (dir tgt) |
| 2837 | (map (lambda (file) | 2837 | (map (lambda (file) |
| 2838 | (copy-file file (string-append tgt "/" (basename file)))) | 2838 | (install-file file tgt)) |
| 2839 | (find-files dir ".*"))) | 2839 | (find-files dir ".*"))) |
| 2840 | (list "docs" "htmldoc" "examples") | 2840 | (list "docs" "htmldoc" "examples") |
| 2841 | (list doc html-doc examples)))) | 2841 | (list doc html-doc examples)))) |
| @@ -3147,9 +3147,7 @@ atlas_libs = openblas | |||
| 3147 | (for-each (lambda (file) | 3147 | (for-each (lambda (file) |
| 3148 | (let* ((dir (dirname file)) | 3148 | (let* ((dir (dirname file)) |
| 3149 | (tgt-dir (string-append html "/" dir))) | 3149 | (tgt-dir (string-append html "/" dir))) |
| 3150 | (unless (equal? "." dir) | 3150 | (install-file file html))) |
| 3151 | (mkdir-p tgt-dir)) | ||
| 3152 | (copy-file file (string-append html "/" file)))) | ||
| 3153 | (find-files "." ".*")))))) | 3151 | (find-files "." ".*")))))) |
| 3154 | ;; Tests can only be run after the library has been installed and not | 3152 | ;; Tests can only be run after the library has been installed and not |
| 3155 | ;; within the source directory. | 3153 | ;; within the source directory. |
| @@ -4642,6 +4640,37 @@ term.js Javascript terminal emulator library.") | |||
| 4642 | ,@(alist-delete "python-tornado" | 4640 | ,@(alist-delete "python-tornado" |
| 4643 | (package-propagated-inputs terminado))))))) | 4641 | (package-propagated-inputs terminado))))))) |
| 4644 | 4642 | ||
| 4643 | (define-public python-fonttools | ||
| 4644 | (package | ||
| 4645 | (name "python-fonttools") | ||
| 4646 | (version "2.5") | ||
| 4647 | (source (origin | ||
| 4648 | (method url-fetch) | ||
| 4649 | (uri (string-append | ||
| 4650 | "https://pypi.python.org/packages/source/F/FontTools/" | ||
| 4651 | "fonttools-" version ".tar.gz")) | ||
| 4652 | (sha256 | ||
| 4653 | (base32 | ||
| 4654 | "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb")))) | ||
| 4655 | (build-system python-build-system) | ||
| 4656 | (arguments '(#:test-target "check")) | ||
| 4657 | (propagated-inputs | ||
| 4658 | ;; XXX: module not found if setuptools is not available. | ||
| 4659 | `(("python-setuptools" ,python-setuptools))) | ||
| 4660 | (home-page "http://github.com/behdad/fonttools") | ||
| 4661 | (synopsis "Tools to manipulate font files") | ||
| 4662 | (description | ||
| 4663 | "FontTools/TTX is a library to manipulate font files from Python. It | ||
| 4664 | supports reading and writinfg of TrueType/OpenType fonts, reading and writing | ||
| 4665 | of AFM files, reading (and partially writing) of PS Type 1 fonts. The package | ||
| 4666 | also contains a tool called “TTX” which converts TrueType/OpenType fonts to and | ||
| 4667 | from an XML-based format.") | ||
| 4668 | (license (non-copyleft "file://LICENSE.txt" | ||
| 4669 | "See LICENSE.txt in the distribution.")))) | ||
| 4670 | |||
| 4671 | (define-public python2-fonttools | ||
| 4672 | (package-with-python2 python-fonttools)) | ||
| 4673 | |||
| 4645 | (define-public python-ly | 4674 | (define-public python-ly |
| 4646 | (package | 4675 | (package |
| 4647 | (name "python-ly") | 4676 | (name "python-ly") |
diff --git a/gnu/packages/screen.scm b/gnu/packages/screen.scm index 3a39c36478a..84cc8c9dc5f 100644 --- a/gnu/packages/screen.scm +++ b/gnu/packages/screen.scm | |||
| @@ -79,8 +79,7 @@ view to show two terminals at once.") | |||
| 79 | 'install | 79 | 'install |
| 80 | (lambda* (#:key outputs #:allow-other-keys) | 80 | (lambda* (#:key outputs #:allow-other-keys) |
| 81 | (let ((out (assoc-ref outputs "out"))) | 81 | (let ((out (assoc-ref outputs "out"))) |
| 82 | (mkdir-p (string-append out "/bin")) | 82 | (install-file "dtach" (string-append out "/bin")))) |
| 83 | (copy-file "dtach" (string-append out "/bin/dtach")))) | ||
| 84 | %standard-phases) | 83 | %standard-phases) |
| 85 | ;; No check target. | 84 | ;; No check target. |
| 86 | #:tests? #f)) | 85 | #:tests? #f)) |
diff --git a/gnu/packages/synergy.scm b/gnu/packages/synergy.scm index 9a038bb545d..905ef82af40 100644 --- a/gnu/packages/synergy.scm +++ b/gnu/packages/synergy.scm | |||
| @@ -92,19 +92,15 @@ | |||
| 92 | (ex (string-append out "/share/doc/synergy-" | 92 | (ex (string-append out "/share/doc/synergy-" |
| 93 | ,version "/examples"))) | 93 | ,version "/examples"))) |
| 94 | (begin | 94 | (begin |
| 95 | (mkdir-p bin) | ||
| 96 | (for-each | 95 | (for-each |
| 97 | (lambda (f) | 96 | (lambda (f) |
| 98 | (copy-file (string-append srcdir "/bin/" f) | 97 | (install-file (string-append srcdir "/bin/" f) bin)) |
| 99 | (string-append bin "/" f))) | ||
| 100 | '("synergyc" "synergys" "synergyd" | 98 | '("synergyc" "synergys" "synergyd" |
| 101 | "usynergy" "syntool")) | 99 | "usynergy" "syntool")) |
| 102 | ;; Install example configuration files | 100 | ;; Install example configuration files |
| 103 | (mkdir-p ex) | ||
| 104 | (for-each | 101 | (for-each |
| 105 | (lambda (e) | 102 | (lambda (e) |
| 106 | (copy-file (string-append srcdir "/doc/" e) | 103 | (install-file (string-append srcdir "/doc/" e) ex)) |
| 107 | (string-append ex "/" e))) | ||
| 108 | '("synergy.conf.example" | 104 | '("synergy.conf.example" |
| 109 | "synergy.conf.example-advanced" | 105 | "synergy.conf.example-advanced" |
| 110 | "synergy.conf.example-basic"))))) | 106 | "synergy.conf.example-basic"))))) |
diff --git a/gnu/packages/tcl.scm b/gnu/packages/tcl.scm index afa715c4cb2..5b55cccbdea 100644 --- a/gnu/packages/tcl.scm +++ b/gnu/packages/tcl.scm | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | #:use-module (guix build-system perl) | 25 | #:use-module (guix build-system perl) |
| 26 | #:use-module (gnu packages) | 26 | #:use-module (gnu packages) |
| 27 | #:use-module (gnu packages image) | 27 | #:use-module (gnu packages image) |
| 28 | #:use-module (gnu packages fontutils) | ||
| 28 | #:use-module (gnu packages perl) | 29 | #:use-module (gnu packages perl) |
| 29 | #:use-module (gnu packages pkg-config) | 30 | #:use-module (gnu packages pkg-config) |
| 30 | #:use-module (gnu packages xorg) | 31 | #:use-module (gnu packages xorg) |
| @@ -33,7 +34,7 @@ | |||
| 33 | (define-public tcl | 34 | (define-public tcl |
| 34 | (package | 35 | (package |
| 35 | (name "tcl") | 36 | (name "tcl") |
| 36 | (version "8.6.0") | 37 | (version "8.6.4") |
| 37 | (source | 38 | (source |
| 38 | (origin | 39 | (origin |
| 39 | (method url-fetch) | 40 | (method url-fetch) |
| @@ -41,7 +42,7 @@ | |||
| 41 | version "/tcl" version "-src.tar.gz")) | 42 | version "/tcl" version "-src.tar.gz")) |
| 42 | (sha256 | 43 | (sha256 |
| 43 | (base32 | 44 | (base32 |
| 44 | "1pnabp3xsja4rc8c01l9q1avb65a3zhdzci3j54qa5krqjwj4i1m")))) | 45 | "13cwa4bc85ylf5gfj9vk182lvgy60qni3f7gbxghq78wk16djvly")))) |
| 45 | (build-system gnu-build-system) | 46 | (build-system gnu-build-system) |
| 46 | (arguments | 47 | (arguments |
| 47 | '(#:phases (alist-cons-before | 48 | '(#:phases (alist-cons-before |
| @@ -132,21 +133,34 @@ X11 GUIs.") | |||
| 132 | (define-public tk | 133 | (define-public tk |
| 133 | (package | 134 | (package |
| 134 | (name "tk") | 135 | (name "tk") |
| 135 | (version "8.6.0") | 136 | (version "8.6.4") |
| 136 | (source (origin | 137 | (source (origin |
| 137 | (method url-fetch) | 138 | (method url-fetch) |
| 138 | (uri (string-append "mirror://sourceforge/tcl/Tcl/" | 139 | (uri (string-append "mirror://sourceforge/tcl/Tcl/" |
| 139 | version "/tk" version "-src.tar.gz")) | 140 | version "/tk" version "-src.tar.gz")) |
| 140 | (sha256 | 141 | (sha256 |
| 141 | (base32 | 142 | (base32 |
| 142 | "1rld0l7p1h31z488w44j170jpsm11xsjf2qrb7gid2b5dwmqnw2w")))) | 143 | "1h96vp15zl5xz0d4qp6wjyrchqmrmdm3q5k22wkw9jaxbvw9vy88")))) |
| 143 | (build-system gnu-build-system) | 144 | (build-system gnu-build-system) |
| 144 | (arguments | 145 | (arguments |
| 145 | '(#:phases (alist-cons-before | 146 | '(#:phases (modify-phases %standard-phases |
| 146 | 'configure 'pre-configure | 147 | (add-before |
| 147 | (lambda _ | 148 | 'configure 'pre-configure |
| 148 | (chdir "unix")) | 149 | (lambda _ |
| 149 | %standard-phases) | 150 | (chdir "unix"))) |
| 151 | (add-after | ||
| 152 | 'install 'add-fontconfig-flag | ||
| 153 | (lambda* (#:key inputs outputs #:allow-other-keys) | ||
| 154 | ;; Add the missing -L flag for Fontconfig in 'tk.pc' and | ||
| 155 | ;; 'tkConfig.sh'. | ||
| 156 | (let ((out (assoc-ref outputs "out")) | ||
| 157 | (fontconfig (assoc-ref inputs "fontconfig"))) | ||
| 158 | (substitute* (find-files out | ||
| 159 | "^(tkConfig\\.sh|tk\\.pc)$") | ||
| 160 | (("-lfontconfig") | ||
| 161 | (string-append "-L" fontconfig | ||
| 162 | "/lib -lfontconfig"))) | ||
| 163 | #t)))) | ||
| 150 | 164 | ||
| 151 | #:configure-flags (list (string-append "--with-tcl=" | 165 | #:configure-flags (list (string-append "--with-tcl=" |
| 152 | (assoc-ref %build-inputs "tcl") | 166 | (assoc-ref %build-inputs "tcl") |
| @@ -156,6 +170,7 @@ X11 GUIs.") | |||
| 156 | #:tests? #f)) | 170 | #:tests? #f)) |
| 157 | (native-inputs `(("pkg-config" ,pkg-config))) | 171 | (native-inputs `(("pkg-config" ,pkg-config))) |
| 158 | (inputs `(("libxft" ,libxft) | 172 | (inputs `(("libxft" ,libxft) |
| 173 | ("fontconfig" ,fontconfig) | ||
| 159 | ("tcl" ,tcl))) | 174 | ("tcl" ,tcl))) |
| 160 | ;; tk.h refers to X11 headers, hence the propagation. | 175 | ;; tk.h refers to X11 headers, hence the propagation. |
| 161 | (propagated-inputs `(("libx11" ,libx11) | 176 | (propagated-inputs `(("libx11" ,libx11) |
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm index 08b1b64c573..95a8ad1da98 100644 --- a/gnu/packages/textutils.scm +++ b/gnu/packages/textutils.scm | |||
| @@ -111,11 +111,9 @@ libenca and several charset conversion libraries and tools.") | |||
| 111 | (lambda* (#:key outputs #:allow-other-keys) | 111 | (lambda* (#:key outputs #:allow-other-keys) |
| 112 | (let ((lib (string-append (assoc-ref outputs "out") "/lib/")) | 112 | (let ((lib (string-append (assoc-ref outputs "out") "/lib/")) |
| 113 | (include (string-append (assoc-ref outputs "out") "/include/"))) | 113 | (include (string-append (assoc-ref outputs "out") "/include/"))) |
| 114 | (mkdir-p lib) | 114 | (install-file "utf8proc.h" include) |
| 115 | (mkdir-p include) | ||
| 116 | (copy-file "utf8proc.h" (string-append include "utf8proc.h")) | ||
| 117 | (for-each (lambda (file) | 115 | (for-each (lambda (file) |
| 118 | (copy-file file (string-append lib (basename file)))) | 116 | (install-file file lib)) |
| 119 | '("libutf8proc.a" "libutf8proc.so")))) | 117 | '("libutf8proc.a" "libutf8proc.so")))) |
| 120 | ;; no configure script | 118 | ;; no configure script |
| 121 | (alist-delete 'configure %standard-phases)))) | 119 | (alist-delete 'configure %standard-phases)))) |
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index c9c84dff2fd..1a0eeb27089 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm | |||
| @@ -105,7 +105,7 @@ living in the same process.") | |||
| 105 | (define-public gnutls | 105 | (define-public gnutls |
| 106 | (package | 106 | (package |
| 107 | (name "gnutls") | 107 | (name "gnutls") |
| 108 | (version "3.4.4.1") | 108 | (version "3.4.5") |
| 109 | (source (origin | 109 | (source (origin |
| 110 | (method url-fetch) | 110 | (method url-fetch) |
| 111 | (uri | 111 | (uri |
| @@ -116,7 +116,7 @@ living in the same process.") | |||
| 116 | "/gnutls-" version ".tar.xz")) | 116 | "/gnutls-" version ".tar.xz")) |
| 117 | (sha256 | 117 | (sha256 |
| 118 | (base32 | 118 | (base32 |
| 119 | "1xf354xafavqhi207ll1m1isd4l5b31lic2sz9lw0j0r0fcxfnsj")) | 119 | "1bks1zpmhmnkz2v32dd9b44pz6x0a5w4yi9zzwsd0a078vhbi25g")) |
| 120 | (patches (list (search-patch "gnutls-doc-fix.patch"))))) | 120 | (patches (list (search-patch "gnutls-doc-fix.patch"))))) |
| 121 | (build-system gnu-build-system) | 121 | (build-system gnu-build-system) |
| 122 | (arguments | 122 | (arguments |
| @@ -195,7 +195,9 @@ required structures.") | |||
| 195 | (sha256 | 195 | (sha256 |
| 196 | (base32 | 196 | (base32 |
| 197 | "1j58r7rdj9fz2lanir8ajbx4bspb5jnm5ikl6dq8lql5fx43c737")) | 197 | "1j58r7rdj9fz2lanir8ajbx4bspb5jnm5ikl6dq8lql5fx43c737")) |
| 198 | (patches (list (search-patch "openssl-runpath.patch"))))) | 198 | (patches (map search-patch |
| 199 | '("openssl-runpath.patch" | ||
| 200 | "openssl-c-rehash.patch"))))) | ||
| 199 | (build-system gnu-build-system) | 201 | (build-system gnu-build-system) |
| 200 | (native-inputs `(("perl" ,perl))) | 202 | (native-inputs `(("perl" ,perl))) |
| 201 | (arguments | 203 | (arguments |
| @@ -203,32 +205,68 @@ required structures.") | |||
| 203 | #:parallel-tests? #f | 205 | #:parallel-tests? #f |
| 204 | #:test-target "test" | 206 | #:test-target "test" |
| 205 | #:phases | 207 | #:phases |
| 206 | (alist-replace | 208 | (modify-phases %standard-phases |
| 207 | 'configure | 209 | (add-before |
| 208 | (lambda* (#:key outputs #:allow-other-keys) | 210 | 'configure 'fix-man-dir |
| 209 | (let ((out (assoc-ref outputs "out"))) | 211 | (lambda* (#:key outputs #:allow-other-keys) |
| 210 | (zero? | 212 | ;; The default MANDIR is some unusual place. Fix that. |
| 211 | (system* "./config" | 213 | (let ((out (assoc-ref outputs "out"))) |
| 212 | "shared" ; build shared libraries | 214 | (substitute* "Makefile.org" |
| 213 | "--libdir=lib" | 215 | (("^MANDIR[[:blank:]]*=.*$") |
| 214 | (string-append "--prefix=" out) | 216 | (string-append "MANDIR = " out "/share/man\n"))) |
| 215 | ;; XXX FIXME: Work around a code generation bug in GCC | 217 | #t))) |
| 216 | ;; 4.9.3 on ARM when compiled with -mfpu=neon. See: | 218 | (replace |
| 217 | ;; <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66917> | 219 | 'configure |
| 218 | ,@(if (and (not (%current-target-system)) | 220 | (lambda* (#:key outputs #:allow-other-keys) |
| 219 | (string-prefix? "armhf" (%current-system))) | 221 | (let ((out (assoc-ref outputs "out"))) |
| 220 | '("-mfpu=vfpv3") | 222 | (zero? |
| 221 | '()))))) | 223 | (system* "./config" |
| 222 | (alist-cons-before | 224 | "shared" ;build shared libraries |
| 223 | 'patch-source-shebangs 'patch-tests | 225 | "--libdir=lib" |
| 224 | (lambda* (#:key inputs native-inputs #:allow-other-keys) | 226 | |
| 225 | (let ((bash (assoc-ref (or native-inputs inputs) "bash"))) | 227 | ;; The default for this catch-all directory is |
| 226 | (substitute* (find-files "test" ".*") | 228 | ;; PREFIX/ssl. Change that to something more |
| 227 | (("/bin/sh") | 229 | ;; conventional. |
| 228 | (string-append bash "/bin/bash")) | 230 | (string-append "--openssldir=" out |
| 229 | (("/bin/rm") | 231 | "/share/openssl-" ,version) |
| 230 | "rm")))) | 232 | |
| 231 | %standard-phases)))) | 233 | (string-append "--prefix=" out) |
| 234 | |||
| 235 | ;; XXX FIXME: Work around a code generation bug in GCC | ||
| 236 | ;; 4.9.3 on ARM when compiled with -mfpu=neon. See: | ||
| 237 | ;; <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66917> | ||
| 238 | ,@(if (and (not (%current-target-system)) | ||
| 239 | (string-prefix? "armhf" (%current-system))) | ||
| 240 | '("-mfpu=vfpv3") | ||
| 241 | '())))))) | ||
| 242 | (add-after | ||
| 243 | 'install 'make-libraries-writable | ||
| 244 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 245 | ;; Make libraries writable so that 'strip' does its job. | ||
| 246 | (let ((out (assoc-ref outputs "out"))) | ||
| 247 | (for-each (lambda (file) | ||
| 248 | (chmod file #o644)) | ||
| 249 | (find-files (string-append out "/lib") | ||
| 250 | "\\.so")) | ||
| 251 | #t))) | ||
| 252 | (add-before | ||
| 253 | 'patch-source-shebangs 'patch-tests | ||
| 254 | (lambda* (#:key inputs native-inputs #:allow-other-keys) | ||
| 255 | (let ((bash (assoc-ref (or native-inputs inputs) "bash"))) | ||
| 256 | (substitute* (find-files "test" ".*") | ||
| 257 | (("/bin/sh") | ||
| 258 | (string-append bash "/bin/bash")) | ||
| 259 | (("/bin/rm") | ||
| 260 | "rm"))))) | ||
| 261 | (add-after | ||
| 262 | 'install 'remove-miscellany | ||
| 263 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 264 | ;; The 'misc' directory contains random undocumented shell and Perl | ||
| 265 | ;; scripts. Remove them to avoid retaining a reference on Perl. | ||
| 266 | (let ((out (assoc-ref outputs "out"))) | ||
| 267 | (delete-file-recursively (string-append out "/share/openssl-" | ||
| 268 | ,version "/misc")) | ||
| 269 | #t)))))) | ||
| 232 | (native-search-paths | 270 | (native-search-paths |
| 233 | ;; FIXME: These two variables must designate a single file or directory | 271 | ;; FIXME: These two variables must designate a single file or directory |
| 234 | ;; and are not actually "search paths." In practice it works OK in user | 272 | ;; and are not actually "search paths." In practice it works OK in user |
diff --git a/gnu/packages/valgrind.scm b/gnu/packages/valgrind.scm index 5e5a1d90693..a4c75baed98 100644 --- a/gnu/packages/valgrind.scm +++ b/gnu/packages/valgrind.scm | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> | 2 | ;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> | 3 | ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> |
| 4 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> | ||
| 4 | ;;; | 5 | ;;; |
| 5 | ;;; This file is part of GNU Guix. | 6 | ;;; This file is part of GNU Guix. |
| 6 | ;;; | 7 | ;;; |
| @@ -37,7 +38,8 @@ | |||
| 37 | (sha256 | 38 | (sha256 |
| 38 | (base32 | 39 | (base32 |
| 39 | "15xrzhfnwwn7n1sfbkwvdbvs6zk0zx718n6zd5i1nrnvdp13s9gs")) | 40 | "15xrzhfnwwn7n1sfbkwvdbvs6zk0zx718n6zd5i1nrnvdp13s9gs")) |
| 40 | (patches (list (search-patch "valgrind-glibc-2.21.patch"))))) | 41 | (patches (map search-patch '("valgrind-glibc-2.22.patch" |
| 42 | "valgrind-linux-libre-4.x.patch"))))) | ||
| 41 | (build-system gnu-build-system) | 43 | (build-system gnu-build-system) |
| 42 | (arguments | 44 | (arguments |
| 43 | '(#:phases (alist-cons-after | 45 | '(#:phases (alist-cons-after |
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index e0b3c538586..b4c518acf78 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm | |||
| @@ -419,11 +419,9 @@ lot easier.") | |||
| 419 | (output (assoc-ref %outputs "out")) | 419 | (output (assoc-ref %outputs "out")) |
| 420 | (bindir (string-append output "/bin")) | 420 | (bindir (string-append output "/bin")) |
| 421 | (script "git-test-sequence")) | 421 | (script "git-test-sequence")) |
| 422 | (begin | 422 | (install-file (string-append source "/" script) |
| 423 | (mkdir-p bindir) | 423 | bindir) |
| 424 | (copy-file (string-append source "/" script) | 424 | #t)))) |
| 425 | (string-append bindir "/" script)) | ||
| 426 | #t))))) | ||
| 427 | (home-page "http://dustin.sallings.org/2010/03/28/git-test-sequence.html") | 425 | (home-page "http://dustin.sallings.org/2010/03/28/git-test-sequence.html") |
| 428 | (synopsis "Run a command over a sequence of commits") | 426 | (synopsis "Run a command over a sequence of commits") |
| 429 | (description | 427 | (description |
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index a4e90ac4c1f..fbcfc126248 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm | |||
| @@ -1014,7 +1014,8 @@ for use with HTML5 video.") | |||
| 1014 | (("#! /bin/sh") (string-append "#!" (which "bash")))) | 1014 | (("#! /bin/sh") (string-append "#!" (which "bash")))) |
| 1015 | (system* "tar" "cjf" "ffmpeg-2.6.1.tar.bz2" "ffmpeg-2.6.1" | 1015 | (system* "tar" "cjf" "ffmpeg-2.6.1.tar.bz2" "ffmpeg-2.6.1" |
| 1016 | ;; avoid non-determinism in the archive | 1016 | ;; avoid non-determinism in the archive |
| 1017 | "--mtime=@0" "--owner=root:0" "--group=root:0") | 1017 | "--sort=name" "--mtime=@0" |
| 1018 | "--owner=root:0" "--group=root:0") | ||
| 1018 | (delete-file-recursively "ffmpeg-2.6.1"))) | 1019 | (delete-file-recursively "ffmpeg-2.6.1"))) |
| 1019 | (alist-replace 'configure | 1020 | (alist-replace 'configure |
| 1020 | (lambda _ | 1021 | (lambda _ |
diff --git a/gnu/packages/wicd.scm b/gnu/packages/wicd.scm index 26b1c7d3f92..33953eebf0f 100644 --- a/gnu/packages/wicd.scm +++ b/gnu/packages/wicd.scm | |||
| @@ -174,16 +174,13 @@ | |||
| 174 | ;; directory. | 174 | ;; directory. |
| 175 | (let ((dest-dir (string-append out "/etc/wicd")) | 175 | (let ((dest-dir (string-append out "/etc/wicd")) |
| 176 | (name "dhclient.conf.template.default")) | 176 | (name "dhclient.conf.template.default")) |
| 177 | (mkdir-p dest-dir) | 177 | (install-file (string-append "other/" name) dest-dir)) |
| 178 | (copy-file (string-append "other/" name) | ||
| 179 | (string-append dest-dir "/" name))) | ||
| 180 | 178 | ||
| 181 | ;; Copy index.theme from hicolor-icon-theme. This is needed to | 179 | ;; Copy index.theme from hicolor-icon-theme. This is needed to |
| 182 | ;; allow wicd-gtk to find its icons. | 180 | ;; allow wicd-gtk to find its icons. |
| 183 | (let ((hicolor (assoc-ref inputs "hicolor-icon-theme")) | 181 | (let ((hicolor (assoc-ref inputs "hicolor-icon-theme")) |
| 184 | (name "/share/icons/hicolor/index.theme")) | 182 | (name "/share/icons/hicolor/index.theme")) |
| 185 | (copy-file (string-append hicolor name) | 183 | (install-file (string-append hicolor name) out)) |
| 186 | (string-append out name))) | ||
| 187 | #t)) | 184 | #t)) |
| 188 | %standard-phases)))) | 185 | %standard-phases)))) |
| 189 | (synopsis "Network connection manager") | 186 | (synopsis "Network connection manager") |
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index 9fd9f4a321f..7aa82fe3122 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm | |||
| @@ -150,7 +150,8 @@ following the mouse.") | |||
| 150 | ".tar.gz")) | 150 | ".tar.gz")) |
| 151 | (sha256 | 151 | (sha256 |
| 152 | (base32 | 152 | (base32 |
| 153 | "0129g4zdrw5hif5783li7rzcr4vpbc2cfia91azxmsk0h0xx3zix")))) | 153 | "0129g4zdrw5hif5783li7rzcr4vpbc2cfia91azxmsk0h0xx3zix")) |
| 154 | (patches (list (search-patch "pixman-pointer-arithmetic.patch"))))) | ||
| 154 | (build-system gnu-build-system) | 155 | (build-system gnu-build-system) |
| 155 | (inputs | 156 | (inputs |
| 156 | `(("libpng" ,libpng) | 157 | `(("libpng" ,libpng) |
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index ddb73143a19..5d65648bfb9 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm | |||
| @@ -145,7 +145,7 @@ based on libxml for XML parsing, tree manipulation and XPath support.") | |||
| 145 | (define-public perl-xml-parser | 145 | (define-public perl-xml-parser |
| 146 | (package | 146 | (package |
| 147 | (name "perl-xml-parser") | 147 | (name "perl-xml-parser") |
| 148 | (version "2.41") | 148 | (version "2.44") |
| 149 | (source (origin | 149 | (source (origin |
| 150 | (method url-fetch) | 150 | (method url-fetch) |
| 151 | (uri (string-append | 151 | (uri (string-append |
| @@ -153,7 +153,7 @@ based on libxml for XML parsing, tree manipulation and XPath support.") | |||
| 153 | version ".tar.gz")) | 153 | version ".tar.gz")) |
| 154 | (sha256 | 154 | (sha256 |
| 155 | (base32 | 155 | (base32 |
| 156 | "1sadi505g5qmxr36lgcbrcrqh3a5gcdg32b405gnr8k54b6rg0dl")))) | 156 | "05ij0g6bfn27iaggxf8nl5rhlwx6f6p6xmdav6rjcly3x5zd1s8s")))) |
| 157 | (build-system perl-build-system) | 157 | (build-system perl-build-system) |
| 158 | (arguments `(#:make-maker-flags | 158 | (arguments `(#:make-maker-flags |
| 159 | (let ((expat (assoc-ref %build-inputs "expat"))) | 159 | (let ((expat (assoc-ref %build-inputs "expat"))) |
| @@ -171,7 +171,7 @@ may be provided when the XML::Parser object is created. These options are | |||
| 171 | then passed on to the Expat object on each parse call. They can also be given | 171 | then passed on to the Expat object on each parse call. They can also be given |
| 172 | as extra arguments to the parse methods, in which case they override options | 172 | as extra arguments to the parse methods, in which case they override options |
| 173 | given at XML::Parser creation time.") | 173 | given at XML::Parser creation time.") |
| 174 | (home-page "http://search.cpan.org/~toddr/XML-Parser-2.41/Parser.pm"))) | 174 | (home-page "http://search.cpan.org/dist/XML-Parser"))) |
| 175 | 175 | ||
| 176 | (define-public perl-libxml | 176 | (define-public perl-libxml |
| 177 | (package | 177 | (package |
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index a9859e695bf..d4ed4b82d01 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm | |||
| @@ -4951,6 +4951,12 @@ draggable titlebars and borders.") | |||
| 4951 | (base32 | 4951 | (base32 |
| 4952 | "05mx0s0vqzds3qjc1gmjr2s6x2ll37z4lfhgm7p2w7936zl2g81a")))) | 4952 | "05mx0s0vqzds3qjc1gmjr2s6x2ll37z4lfhgm7p2w7936zl2g81a")))) |
| 4953 | (build-system gnu-build-system) | 4953 | (build-system gnu-build-system) |
| 4954 | (outputs '("out" | ||
| 4955 | "doc")) ;8 MiB of man pages + XML | ||
| 4956 | (arguments | ||
| 4957 | '(#:configure-flags (list (string-append "--mandir=" | ||
| 4958 | (assoc-ref %outputs "doc") | ||
| 4959 | "/share/man")))) | ||
| 4954 | (propagated-inputs | 4960 | (propagated-inputs |
| 4955 | `(("kbproto" ,kbproto) | 4961 | `(("kbproto" ,kbproto) |
| 4956 | ("libxcb" ,libxcb))) | 4962 | ("libxcb" ,libxcb))) |
| @@ -5011,6 +5017,12 @@ draggable titlebars and borders.") | |||
| 5011 | (base32 | 5017 | (base32 |
| 5012 | "0myxwbx9ylam5x3ia5b5f4x8azcqdm420h9ad1r4hrgmi2lrffl4")))) | 5018 | "0myxwbx9ylam5x3ia5b5f4x8azcqdm420h9ad1r4hrgmi2lrffl4")))) |
| 5013 | (build-system gnu-build-system) | 5019 | (build-system gnu-build-system) |
| 5020 | (outputs '("out" | ||
| 5021 | "doc")) ;2 MiB of man pages + XML | ||
| 5022 | (arguments | ||
| 5023 | '(#:configure-flags (list (string-append "--mandir=" | ||
| 5024 | (assoc-ref %outputs "doc") | ||
| 5025 | "/share/man")))) | ||
| 5014 | (propagated-inputs | 5026 | (propagated-inputs |
| 5015 | `(("libx11" ,libx11) | 5027 | `(("libx11" ,libx11) |
| 5016 | ("libice" ,libice) | 5028 | ("libice" ,libice) |
