From 0b652851b187dd0451c221f6dc173afbd7a555f4 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 9 Sep 2018 14:52:00 +0200 Subject: bootstrap: Add Mes bootstrap. * gnu/packages/patches/mes-nyacc-0.86.0.patch: Support bootstrap build. * gnu/packages/commencement.scm (%fake-bootstrap mes-boot0, mescc-tools-boot, nyacc-boot, mes-boot, tcc-boot0, tcc-boot, make-mesboot0, diffutils-mesboot, binutils-mesboot0, gcc-core-mesboot, mesboot-headers, glibc-mesboot0, gcc-mesboot0, binutils-mesboot, make-mesboot, gmp-boot, mpfr-boot, mpc-boot, gcc-mesboot1, gcc-mesboot1-wrapper, glibc-headers-mesboot, glibc-mesboot, gcc-mesboot, gcc-mesboot-wrapper, m4-mesboot): New variable. * gnu/packages/patches/binutils-boot-2.20.1a.patch: New file. New file. * gnu/packages/patches/gcc-boot-2.95.3.patch: New file. * gnu/packages/patches/gcc-boot-4.7.4.patch: New file. * gnu/packages/patches/glibc-boot-2.16.0.patch: New file. * gnu/packages/patches/glibc-boot-2.2.5.patch: New file. * gnu/packages/patches/glibc-bootstrap-system-2.16.0.patch: New file. * gnu/packages/patches/tcc-boot-0.9.27.patch: New file. * gnu/local.mk (dist_patch_DATA): Add them. --- gnu/local.mk | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index c10894cb5d..71d8e832fd 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -593,6 +593,7 @@ dist_patch_DATA = \ %D%/packages/patches/bash-completion-directories.patch \ %D%/packages/patches/bazaar-CVE-2017-14176.patch \ %D%/packages/patches/beignet-correct-file-names.patch \ + %D%/packages/patches/binutils-boot-2.20.1a.patch \ %D%/packages/patches/binutils-loongson-workaround.patch \ %D%/packages/patches/blast+-fix-makefile.patch \ %D%/packages/patches/boost-fix-icu-build.patch \ @@ -697,6 +698,7 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-arm-bug-71399.patch \ %D%/packages/patches/gcc-arm-link-spec-fix.patch \ %D%/packages/patches/gcc-asan-missing-include.patch \ + %D%/packages/patches/gcc-boot-2.95.3.patch \ %D%/packages/patches/gcc-cross-environment-variables.patch \ %D%/packages/patches/gcc-fix-texi2pod.patch \ %D%/packages/patches/gcc-4.8-libsanitizer-fix.patch \ @@ -745,6 +747,9 @@ dist_patch_DATA = \ %D%/packages/patches/glibc-CVE-2017-1000366-pt2.patch \ %D%/packages/patches/glibc-CVE-2017-1000366-pt3.patch \ %D%/packages/patches/glibc-allow-kernel-2.6.32.patch \ + %D%/packages/patches/glibc-boot-2.16.0.patch \ + %D%/packages/patches/glibc-boot-2.2.5.patch \ + %D%/packages/patches/glibc-bootstrap-system-2.16.0.patch \ %D%/packages/patches/glibc-bootstrap-system.patch \ %D%/packages/patches/glibc-hidden-visibility-ldconfig.patch \ %D%/packages/patches/glibc-ldd-x86_64.patch \ @@ -1155,6 +1160,7 @@ dist_patch_DATA = \ %D%/packages/patches/t1lib-CVE-2011-1552+.patch \ %D%/packages/patches/tar-remove-wholesparse-check.patch \ %D%/packages/patches/tar-skip-unreliable-tests.patch \ + %D%/packages/patches/tcc-boot-0.9.27.patch \ %D%/packages/patches/tclxml-3.2-install.patch \ %D%/packages/patches/tcsh-fix-autotest.patch \ %D%/packages/patches/tcsh-fix-out-of-bounds-read.patch \ -- cgit v1.2.3 From 345fe853c844e0d9b423c8c14b02715df86ad03d Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 7 Oct 2018 00:35:23 +0200 Subject: gnu: mes: Update to 0.18. * gnu/packages/patches/mes-nyacc-0.86.0.patch: Removef file. * gnu/local.mk (dist_patch_DATA): Remove entry. * gnu/packages/mes.scm (mes): Update to 0.18. --- gnu/local.mk | 1 - gnu/packages/mes.scm | 5 +- gnu/packages/patches/mes-nyacc-0.86.0.patch | 225 ---------------------------- 3 files changed, 2 insertions(+), 229 deletions(-) delete mode 100644 gnu/packages/patches/mes-nyacc-0.86.0.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 71d8e832fd..ba5dc0cc70 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -960,7 +960,6 @@ dist_patch_DATA = \ %D%/packages/patches/mcrypt-CVE-2012-4409.patch \ %D%/packages/patches/mcrypt-CVE-2012-4426.patch \ %D%/packages/patches/mcrypt-CVE-2012-4527.patch \ - %D%/packages/patches/mes-nyacc-0.86.0.patch \ %D%/packages/patches/mesa-skip-disk-cache-test.patch \ %D%/packages/patches/meson-for-build-rpath.patch \ %D%/packages/patches/metabat-fix-compilation.patch \ diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm index 880e140b80..6dc6dfb4cb 100644 --- a/gnu/packages/mes.scm +++ b/gnu/packages/mes.scm @@ -63,15 +63,14 @@ extensive examples, including parsers for the Javascript and C99 languages.") (let ((triplet "i686-unknown-linux-gnu")) (package (name "mes") - (version "0.17.1") + (version "0.18") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/mes/" "mes-" version ".tar.gz")) - (patches (search-patches "mes-nyacc-0.86.0.patch")) (sha256 (base32 - "02g8zig53ffd0ai8kqhv2zj7bj2366a8hr6ydkwakmi2d1amyrna")))) + "1dsaaqyanzsq9m5wrcd2bjhb3qd6928c9q97rg5r730pyqjwxyxf")))) (build-system gnu-build-system) (supported-systems '("i686-linux" "x86_64-linux")) (propagated-inputs diff --git a/gnu/packages/patches/mes-nyacc-0.86.0.patch b/gnu/packages/patches/mes-nyacc-0.86.0.patch deleted file mode 100644 index 30ee4645c2..0000000000 --- a/gnu/packages/patches/mes-nyacc-0.86.0.patch +++ /dev/null @@ -1,225 +0,0 @@ -Two small patches off the current Mes `wip' branch, that enable using -Nyacc-0.86.0; and a fix for running ./check.sh. - -From 9e610736bf779f3295c1192e748cd19cbbe3be28 Mon Sep 17 00:00:00 2001 -From: Jan Nieuwenhuizen -Date: Wed, 5 Sep 2018 20:28:06 +0200 -Subject: [PATCH 1/2] mes: Support Nyacc 0.85.3: Add char-set-copy. - -* mes/module/srfi/srfi-14.mes (char-set-copy): New function> ---- - mes/module/srfi/srfi-14.mes | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/mes/module/srfi/srfi-14.mes b/mes/module/srfi/srfi-14.mes -index 0be39b1e..a16d16ce 100644 ---- a/mes/module/srfi/srfi-14.mes -+++ b/mes/module/srfi/srfi-14.mes -@@ -52,3 +52,6 @@ - - (define (char-whitespace? c) - (char-set-contains? char-set:whitespace c)) -+ -+(define (char-set-copy cs) -+ (map identity cs)) --- -2.18.0 - -From b952bdf44f11edbfc277600dc35236aae1769b54 Mon Sep 17 00:00:00 2001 -From: Jan Nieuwenhuizen -Date: Wed, 5 Sep 2018 22:14:34 +0200 -Subject: [PATCH 2/2] mes: Support Nyacc 0.85.3: Integrate progress. - -* mes/module/nyacc/lang/sx-util.mes: New file. -* mes/module/nyacc/version.mes: New file. -* mes/module/nyacc/lang/c99/cpp.mes (nyacc): Include them. -* mes/module/nyacc/lang/c99/parser.mes (nyacc): Include them. -* module/mescc/preprocess.scm (need-progress): New function. -(progress): New function. -(insert-progress-monitors): Use them to Integrate progress. ---- - mes/module/mescc/preprocess.mes | 1 + - mes/module/nyacc/lang/c99/cpp.mes | 1 + - mes/module/nyacc/lang/c99/parser.mes | 1 + - mes/module/nyacc/lang/sx-util.mes | 27 +++++++++++++++++++++ - mes/module/nyacc/version.mes | 26 +++++++++++++++++++++ - module/mescc/preprocess.scm | 35 ++++++++++++++++++++++++++++ - 6 files changed, 91 insertions(+) - create mode 100644 mes/module/nyacc/lang/sx-util.mes - create mode 100644 mes/module/nyacc/version.mes - -diff --git a/mes/module/mescc/preprocess.mes b/mes/module/mescc/preprocess.mes -index c7c5fcaa..022a372c 100644 ---- a/mes/module/mescc/preprocess.mes -+++ b/mes/module/mescc/preprocess.mes -@@ -24,4 +24,5 @@ - (mes-use-module (srfi srfi-13)) - (mes-use-module (srfi srfi-26)) - (mes-use-module (nyacc lang c99 parser)) -+(mes-use-module (nyacc version)) - (include-from-path "mescc/preprocess.scm") -diff --git a/mes/module/nyacc/lang/c99/cpp.mes b/mes/module/nyacc/lang/c99/cpp.mes -index fad1dc55..b25c4a93 100644 ---- a/mes/module/nyacc/lang/c99/cpp.mes -+++ b/mes/module/nyacc/lang/c99/cpp.mes -@@ -28,5 +28,6 @@ - - (mes-use-module (nyacc parse)) - (mes-use-module (nyacc lex)) -+(mes-use-module (nyacc lang sx-util)) - (mes-use-module (nyacc lang util)) - (include-from-path "nyacc/lang/c99/cpp.scm") -diff --git a/mes/module/nyacc/lang/c99/parser.mes b/mes/module/nyacc/lang/c99/parser.mes -index c51552d6..1a9aaf73 100644 ---- a/mes/module/nyacc/lang/c99/parser.mes -+++ b/mes/module/nyacc/lang/c99/parser.mes -@@ -32,6 +32,7 @@ - - (mes-use-module (nyacc lex)) - (mes-use-module (nyacc parse)) -+(mes-use-module (nyacc lang sx-util)) - (mes-use-module (nyacc lang util)) - (mes-use-module (nyacc lang c99 cpp)) - -diff --git a/mes/module/nyacc/lang/sx-util.mes b/mes/module/nyacc/lang/sx-util.mes -new file mode 100644 -index 00000000..41ac5b4a ---- /dev/null -+++ b/mes/module/nyacc/lang/sx-util.mes -@@ -0,0 +1,27 @@ -+;;; -*-scheme-*- -+ -+;;; GNU Mes --- Maxwell Equations of Software -+;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen -+;;; -+;;; This file is part of GNU Mes. -+;;; -+;;; GNU Mes is free software; you can redistribute it and/or modify it -+;;; under the terms of the GNU General Public License as published by -+;;; the Free Software Foundation; either version 3 of the License, or (at -+;;; your option) any later version. -+;;; -+;;; GNU Mes is distributed in the hope that it will be useful, but -+;;; WITHOUT ANY WARRANTY; without even the implied warranty of -+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+;;; GNU General Public License for more details. -+;;; -+;;; You should have received a copy of the GNU General Public License -+;;; along with GNU Mes. If not, see . -+ -+;;; Commentary: -+ -+;;; Code: -+ -+(mes-use-module (srfi srfi-1)) -+(mes-use-module (srfi srfi-16)) -+(include-from-path "nyacc/lang/sx-util.scm") -diff --git a/mes/module/nyacc/version.mes b/mes/module/nyacc/version.mes -new file mode 100644 -index 00000000..b9db628e ---- /dev/null -+++ b/mes/module/nyacc/version.mes -@@ -0,0 +1,26 @@ -+;;; -*-scheme-*- -+ -+;;; GNU Mes --- Maxwell Equations of Software -+;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen -+;;; -+;;; This file is part of GNU Mes. -+;;; -+;;; GNU Mes is free software; you can redistribute it and/or modify it -+;;; under the terms of the GNU General Public License as published by -+;;; the Free Software Foundation; either version 3 of the License, or (at -+;;; your option) any later version. -+;;; -+;;; GNU Mes is distributed in the hope that it will be useful, but -+;;; WITHOUT ANY WARRANTY; without even the implied warranty of -+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+;;; GNU General Public License for more details. -+;;; -+;;; You should have received a copy of the GNU General Public License -+;;; along with GNU Mes. If not, see . -+ -+;;; Commentary: -+ -+;;; Code: -+ -+(include-from-path "nyacc/version.scm") -+(display "nyacc version\n") -diff --git a/module/mescc/preprocess.scm b/module/mescc/preprocess.scm -index 9e341cba..c2efb32c 100644 ---- a/module/mescc/preprocess.scm -+++ b/module/mescc/preprocess.scm -@@ -26,9 +26,44 @@ - #:use-module (srfi srfi-1) - #:use-module (srfi srfi-26) - #:use-module (nyacc lang c99 parser) -+ #:use-module (nyacc lang c99 parser) -+ #:use-module (nyacc version) - #:use-module (mes guile) - #:export (c99-input->ast)) - -+(format (current-error-port) "*nyacc-version*=~a\n" *nyacc-version*) -+;; list of which rules you want progress reported -+(define need-progress -+ (assoc-ref -+ '(("0.85.3" (1 2 3)) -+ ("0.86.0" (1 2 3))) -+ *nyacc-version*)) -+ -+(define (progress o) -+ (when (and o (getenv "NYACC_DEBUG")) -+ (display " :" (current-error-port)) -+ (display o (current-error-port)) -+ (display "\n" (current-error-port)))) -+ -+(define (insert-progress-monitors act-v len-v) -+ (let ((n (vector-length act-v))) -+ (let loop ((ix 0)) -+ (when (< ix n) -+ (if (memq ix need-progress) -+ (vector-set -+ act-v ix -+ (lambda args -+ (progress (list-ref args (1- (vector-ref len-v ix)))) -+ (apply (vector-ref act-v ix) args)))) -+ (loop (1+ ix)))))) -+ -+(cond-expand -+ (guile -+ (insert-progress-monitors (@@ (nyacc lang c99 parser) c99-act-v) -+ (@@ (nyacc lang c99 parser) c99-len-v))) -+ (mes -+ (insert-progress-monitors c99-act-v c99-len-v))) -+ - (define (logf port string . rest) - (apply format (cons* port string rest)) - (force-output port) --- -2.18.0 - -From 20deefe6ea0d62a3338a8e2a9552d2a20b0f607e Mon Sep 17 00:00:00 2001 -From: Jan Nieuwenhuizen -Date: Sun, 9 Sep 2018 07:11:50 +0200 -Subject: [PATCH] build: Oops, fix ./check.sh for bootstrap build. - -* build-aux/config.sh (top_builddir): Set default to `.'. ---- - build-aux/config.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/build-aux/config.sh b/build-aux/config.sh -index a4b9fdef..4fa84441 100644 ---- a/build-aux/config.sh -+++ b/build-aux/config.sh -@@ -17,6 +17,7 @@ - # along with GNU Mes. If not, see . - - srcdir=${srcdir-.} -+top_builddir=${top_builddir-.} - if [ "$V" = 2 ]; then - echo $0 - echo srcdest=${srcdest} --- -2.18.0 - -- cgit v1.2.3 From fc4ff50f2d77d1ff20ebb5a1113b56487d34640f Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Thu, 4 Oct 2018 23:28:20 +0200 Subject: gnu: mescc-tools-boot: Update to 0.5.2. * gnu/packages/commencement.scm (mescc-tools-boot): Update to 0.5.2. * gnu/packages/patches/mescc-tools-boot.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/commencement.scm | 133 ++++++++--------- gnu/packages/patches/mescc-tools-boot.patch | 222 ++++++++++++++++++++++++++++ 3 files changed, 286 insertions(+), 70 deletions(-) create mode 100644 gnu/packages/patches/mescc-tools-boot.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index ba5dc0cc70..5740127571 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -961,6 +961,7 @@ dist_patch_DATA = \ %D%/packages/patches/mcrypt-CVE-2012-4426.patch \ %D%/packages/patches/mcrypt-CVE-2012-4527.patch \ %D%/packages/patches/mesa-skip-disk-cache-test.patch \ + %D%/packages/patches/mescc-tools-boot.patch \ %D%/packages/patches/meson-for-build-rpath.patch \ %D%/packages/patches/metabat-fix-compilation.patch \ %D%/packages/patches/mhash-keygen-test-segfault.patch \ diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 77909f0bd5..c7a2b03918 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -107,77 +107,70 @@ (propagated-inputs '())))) (define mescc-tools-boot - (let ((version "0.4") - (revision "1") - (commit "f02b8f4fda8d0c5c11a1d63a02b2bfdfab55abc5")) - (package-with-bootstrap-guile - (package - (inherit mescc-tools) - (name "mescc-tools-boot") - (version (string-append version "-" revision "." (string-take commit 7))) - (source (origin - (method url-fetch) - (uri (string-append "https://gitlab.com/janneke/mescc-tools" - "/-/archive/" commit - "/mescc-tools-" commit ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "14xw954ad4lnnyflgnwvzfhd3kqimniilzzyf4x23vljky2npkbf")))) - (inputs '()) - (propagated-inputs '()) - (native-inputs - `(("mescc-tools-seed" ,%mescc-tools-seed) - ("mes-source" ,(package-source mes-boot0)) + (package-with-bootstrap-guile + (package + (inherit mescc-tools) + (name "mescc-tools-boot") + (source (origin + (inherit (package-source mescc-tools)) + (patches (search-patches "mescc-tools-boot.patch")))) + (inputs '()) + (propagated-inputs '()) + (native-inputs + `(("mescc-tools-seed" ,%mescc-tools-seed) + ("mes-source" ,(package-source mes-boot0)) - ("coreutils" ,%bootstrap-coreutils&co) - ("mes-seed" ,%mes-seed))) - (build-system gnu-build-system) - (arguments - `(#:implicit-inputs? #f - #:guile ,%bootstrap-guile - #:strip-binaries? #f ; binutil's strip b0rkes MesCC/M1/hex2 binaries - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'unpack-seeds - (lambda* (#:key outputs #:allow-other-keys) - (let* ((coreutils (assoc-ref %build-inputs "coreutils")) - (mescc-tools-seed (assoc-ref %build-inputs "mescc-tools-seed")) - (mes-seed (assoc-ref %build-inputs "mes-seed")) - (mes-source (assoc-ref %build-inputs "mes-source")) - (out (assoc-ref %outputs "out"))) - (with-directory-excursion ".." - (and - (mkdir-p "mescc-tools-seed") - (invoke "tar" "--strip=1" "-C" "mescc-tools-seed" - "-xvf" mescc-tools-seed) - (mkdir-p "mes-source") - (invoke "tar" "--strip=1" "-C" "mes-source" - "-xvf" mes-source) - (mkdir-p "mes-seed") - (invoke "tar" "--strip=1" "-C" "mes-seed" - "-xvf" mes-seed)))))) - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let ((coreutils (assoc-ref %build-inputs "coreutils")) - (out (assoc-ref %outputs "out"))) - (setenv "PATH" (string-append coreutils "/bin" - ":" "../mescc-tools-seed")) - (format (current-error-port) "PATH=~s\n" (getenv "PATH")) - (setenv "PREFIX" out) - (setenv "MES_PREFIX" "../mes-source") - (setenv "MESCC_TOOLS_SEED" "../mescc-tools-seed") - (setenv "MES_SEED" "../mes-seed") - #t))) - (replace 'build - (lambda _ - (invoke "sh" "build.sh"))) - (replace 'check - (lambda _ - (invoke "sh" "check.sh"))) - (replace 'install - (lambda _ - (invoke "sh" "install.sh")))))))))) + ("coreutils" ,%bootstrap-coreutils&co) + ("mes-seed" ,%mes-seed))) + (build-system gnu-build-system) + (arguments + `(#:implicit-inputs? #f + #:guile ,%bootstrap-guile + #:strip-binaries? #f ; binutil's strip b0rkes MesCC/M1/hex2 binaries + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-seeds + (lambda* (#:key outputs #:allow-other-keys) + (let* ((coreutils (assoc-ref %build-inputs "coreutils")) + (mescc-tools-seed (assoc-ref %build-inputs "mescc-tools-seed")) + (mes-seed (assoc-ref %build-inputs "mes-seed")) + (mes-source (assoc-ref %build-inputs "mes-source")) + (out (assoc-ref %outputs "out"))) + (with-directory-excursion ".." + (and + (mkdir-p "mescc-tools-seed") + (invoke "tar" "--strip=1" "-C" "mescc-tools-seed" + "-xvf" mescc-tools-seed) + (mkdir-p "mes-source") + (invoke "tar" "--strip=1" "-C" "mes-source" + "-xvf" mes-source) + (mkdir-p "mes-seed") + (invoke "tar" "--strip=1" "-C" "mes-seed" + "-xvf" mes-seed)))))) + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((coreutils (assoc-ref %build-inputs "coreutils")) + (out (assoc-ref %outputs "out"))) + (setenv "PATH" (string-append coreutils "/bin" + ":" "../mescc-tools-seed")) + (format (current-error-port) "PATH=~s\n" (getenv "PATH")) + (setenv "PREFIX" out) + (setenv "MES_PREFIX" "../mes-source") + (setenv "MESCC_TOOLS_SEED" "../mescc-tools-seed") + (setenv "MES_SEED" "../mes-seed") + #t))) + (replace 'build + (lambda _ + (invoke "sh" "build.sh"))) + (replace 'check + (lambda _ + ;; bootstrap build.sh lacks exec_enable, get_machine, and + ;; kaem_machine + ;; (invoke "sh" "check.sh") + #t)) + (replace 'install + (lambda _ + (invoke "sh" "install.sh"))))))))) (define nyacc-boot (let ((version "0.86.0") diff --git a/gnu/packages/patches/mescc-tools-boot.patch b/gnu/packages/patches/mescc-tools-boot.patch new file mode 100644 index 0000000000..2bce8a49c2 --- /dev/null +++ b/gnu/packages/patches/mescc-tools-boot.patch @@ -0,0 +1,222 @@ +From c184e95096881a13f29ebd7fc507fe305d3d8de5 Mon Sep 17 00:00:00 2001 +From: Jan Nieuwenhuizen +Date: Thu, 4 Oct 2018 22:03:31 +0200 +Subject: [PATCH] build.sh: Update for mes 0.18. + +--- + build.sh | 92 +++++++++++++++++++++++++++++++++++++----------------- + install.sh | 6 ++-- + 2 files changed, 66 insertions(+), 32 deletions(-) + +diff --git a/build.sh b/build.sh +index 335a7bb..19a0029 100755 +--- a/build.sh ++++ b/build.sh +@@ -18,7 +18,8 @@ + # along with mescc-tools. If not, see . + + set -eux +-MES_SEED=${MES_SEED-../mescc-tools-seed/libs} ++MES_PREFIX=${MES_PREFIX-../mes} ++MES_SEED=${MES_SEED-../mes-seed} + MESCC_TOOLS_SEED=${MESCC_TOOLS_SEED-../mescc-tools-seed} + + ######################################### +@@ -32,15 +33,23 @@ MESCC_TOOLS_SEED=${MESCC_TOOLS_SEED-../mescc-tools-seed} + # blood-elf + # Create proper debug segment + $MESCC_TOOLS_SEED/blood-elf\ ++ -f $MESCC_TOOLS_SEED/file_print.M1\ ++ -f $MESCC_TOOLS_SEED/match.M1\ ++ -f $MESCC_TOOLS_SEED/numerate_number.M1\ ++ -f $MESCC_TOOLS_SEED/string.M1\ + -f $MESCC_TOOLS_SEED/blood-elf.M1\ + -o blood-elf-blood-elf-footer.M1 + + # Build + # M1-macro phase + $MESCC_TOOLS_SEED/M1 --LittleEndian --Architecture 1\ +- -f $MES_SEED/x86.M1\ +- -f $MES_SEED/crt1.M1\ +- -f $MES_SEED/libc+tcc-mes.M1\ ++ -f $MES_PREFIX/lib/x86-mes/x86.M1\ ++ -f $MES_SEED/x86-mes/crt1.S\ ++ -f $MES_SEED/x86-mes/libc+tcc.S\ ++ -f $MESCC_TOOLS_SEED/file_print.M1\ ++ -f $MESCC_TOOLS_SEED/match.M1\ ++ -f $MESCC_TOOLS_SEED/numerate_number.M1\ ++ -f $MESCC_TOOLS_SEED/string.M1\ + -f $MESCC_TOOLS_SEED/blood-elf.M1\ + -f blood-elf-blood-elf-footer.M1\ + -o blood-elf.hex2 +@@ -49,7 +58,7 @@ $MESCC_TOOLS_SEED/hex2\ + --LittleEndian\ + --Architecture 1\ + --BaseAddress 0x1000000\ +- -f $MES_SEED/elf32-header.hex2\ ++ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\ + -f blood-elf.hex2\ + --exec_enable\ + -o bin/blood-elf +@@ -65,9 +74,13 @@ $MESCC_TOOLS_SEED/hex2\ + $MESCC_TOOLS_SEED/M1 \ + --LittleEndian\ + --Architecture 1\ +- -f $MES_SEED/x86.M1\ +- -f $MES_SEED/crt1.M1\ +- -f $MES_SEED/libc+tcc-mes.M1\ ++ -f $MES_PREFIX/lib/x86-mes/x86.M1\ ++ -f $MES_SEED/x86-mes/crt1.S\ ++ -f $MES_SEED/x86-mes/libc+tcc.S\ ++ -f $MESCC_TOOLS_SEED/file_print.M1\ ++ -f $MESCC_TOOLS_SEED/match.M1\ ++ -f $MESCC_TOOLS_SEED/numerate_number.M1\ ++ -f $MESCC_TOOLS_SEED/string.M1\ + -f $MESCC_TOOLS_SEED/M1.M1\ + -f M1-footer.M1\ + -o M1.hex2 +@@ -76,7 +89,7 @@ $MESCC_TOOLS_SEED/hex2 \ + --LittleEndian\ + --Architecture 1\ + --BaseAddress 0x1000000\ +- -f $MES_SEED/elf32-header.hex2\ ++ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\ + -f M1.hex2\ + --exec_enable\ + -o bin/M1 +@@ -92,9 +105,13 @@ $MESCC_TOOLS_SEED/hex2 \ + ./bin/M1 \ + --LittleEndian\ + --Architecture 1\ +- -f $MES_SEED/x86.M1\ +- -f $MES_SEED/crt1.M1\ +- -f $MES_SEED/libc+tcc-mes.M1\ ++ -f $MES_PREFIX/lib/x86-mes/x86.M1\ ++ -f $MES_SEED/x86-mes/crt1.S\ ++ -f $MES_SEED/x86-mes/libc+tcc.S\ ++ -f $MESCC_TOOLS_SEED/file_print.M1\ ++ -f $MESCC_TOOLS_SEED/match.M1\ ++ -f $MESCC_TOOLS_SEED/numerate_number.M1\ ++ -f $MESCC_TOOLS_SEED/string.M1\ + -f $MESCC_TOOLS_SEED/hex2.M1\ + -f hex2-footer.M1\ + -o hex2.hex2 +@@ -103,10 +120,10 @@ $MESCC_TOOLS_SEED/hex2 \ + --LittleEndian\ + --Architecture 1\ + --BaseAddress 0x1000000\ +- -f $MES_SEED/elf32-header.hex2\ ++ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\ + -f hex2.hex2\ + --exec_enable\ +- -o bin/hex2 ++ -o bin/hex2-0 + + ######################### + # Phase-1 Self-host # +@@ -123,18 +140,22 @@ $MESCC_TOOLS_SEED/hex2 \ + ./bin/M1 \ + --LittleEndian\ + --Architecture 1\ +- -f $MES_SEED/x86.M1\ +- -f $MES_SEED/crt1.M1\ +- -f $MES_SEED/libc+tcc-mes.M1\ ++ -f $MES_PREFIX/lib/x86-mes/x86.M1\ ++ -f $MES_SEED/x86-mes/crt1.S\ ++ -f $MES_SEED/x86-mes/libc+tcc.S\ ++ -f $MESCC_TOOLS_SEED/file_print.M1\ ++ -f $MESCC_TOOLS_SEED/match.M1\ ++ -f $MESCC_TOOLS_SEED/numerate_number.M1\ ++ -f $MESCC_TOOLS_SEED/string.M1\ + -f $MESCC_TOOLS_SEED/blood-elf.M1\ + -f blood-elf-blood-elf-footer.M1\ + -o blood-elf.hex2 + # Hex2-linker phase +-./bin/hex2 \ ++./bin/hex2-0 \ + --LittleEndian\ + --Architecture 1\ + --BaseAddress 0x1000000\ +- -f $MES_SEED/elf32-header.hex2\ ++ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\ + -f blood-elf.hex2\ + --exec_enable\ + -o blood-elf +@@ -150,18 +171,22 @@ $MESCC_TOOLS_SEED/hex2 \ + ./bin/M1 \ + --LittleEndian\ + --Architecture 1\ +- -f $MES_SEED/x86.M1\ +- -f $MES_SEED/crt1.M1\ +- -f $MES_SEED/libc+tcc-mes.M1\ ++ -f $MES_PREFIX/lib/x86-mes/x86.M1\ ++ -f $MES_SEED/x86-mes/crt1.S\ ++ -f $MES_SEED/x86-mes/libc+tcc.S\ ++ -f $MESCC_TOOLS_SEED/file_print.M1\ ++ -f $MESCC_TOOLS_SEED/match.M1\ ++ -f $MESCC_TOOLS_SEED/numerate_number.M1\ ++ -f $MESCC_TOOLS_SEED/string.M1\ + -f $MESCC_TOOLS_SEED/M1.M1\ + -f M1-footer.M1\ + -o M1.hex2 + # Hex2-linker phase +-./bin/hex2 \ ++./bin/hex2-0 \ + --LittleEndian\ + --Architecture 1\ + --BaseAddress 0x1000000\ +- -f $MES_SEED/elf32-header.hex2\ ++ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\ + -f M1.hex2\ + --exec_enable\ + -o bin/M1 +@@ -177,18 +202,27 @@ $MESCC_TOOLS_SEED/hex2 \ + ./bin/M1 \ + --LittleEndian\ + --Architecture 1\ +- -f $MES_SEED/x86.M1\ +- -f $MES_SEED/crt1.M1\ +- -f $MES_SEED/libc+tcc-mes.M1\ ++ -f $MES_PREFIX/lib/x86-mes/x86.M1\ ++ -f $MES_SEED/x86-mes/crt1.S\ ++ -f $MES_SEED/x86-mes/libc+tcc.S\ ++ -f $MESCC_TOOLS_SEED/file_print.M1\ ++ -f $MESCC_TOOLS_SEED/match.M1\ ++ -f $MESCC_TOOLS_SEED/numerate_number.M1\ ++ -f $MESCC_TOOLS_SEED/string.M1\ + -f $MESCC_TOOLS_SEED/hex2.M1\ + -f hex2-footer.M1\ + -o hex2.hex2 + # Hex2-linker phase +-./bin/hex2 \ ++./bin/hex2-0 \ + --LittleEndian\ + --Architecture 1\ + --BaseAddress 0x1000000\ +- -f $MES_SEED/elf32-header.hex2\ ++ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\ + -f hex2.hex2\ + --exec_enable\ + -o bin/hex2 ++ ++# TODO ++touch bin/exec_enable ++touch bin/get_machine ++touch bin/kaem +diff --git a/install.sh b/install.sh +index e4dccff..29e58d6 100644 +--- a/install.sh ++++ b/install.sh +@@ -18,6 +18,6 @@ + PREFIX=${PREFIX-usr} + + mkdir -p "$PREFIX/bin" +-cp blood-elf "$PREFIX/bin/blood-elf" +-cp hex2 "$PREFIX/bin/hex2" +-cp M1 "$PREFIX/bin/M1" ++cp bin/blood-elf "$PREFIX/bin/blood-elf" ++cp bin/hex2 "$PREFIX/bin/hex2" ++cp bin/M1 "$PREFIX/bin/M1" +-- +2.18.0 + -- cgit v1.2.3 From 1b9fb043d9c2fbd047ab17209ca4a3de5293edee Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Sun, 28 Oct 2018 11:16:46 +0900 Subject: gnu: glibc: Export supported locales. Debian and Archlinux (at least) force the installation of the localedata/SUPPORTED file of the glibc. This file lists all the supported locales of the glibc. * gnu/packages/patches/glibc-supported-locales.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/base.scm (glibc/linux): Add the previous patch, (glibc-2.28): ditto. --- gnu/local.mk | 1 + gnu/packages/base.scm | 6 +++-- gnu/packages/patches/glibc-supported-locales.patch | 31 ++++++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/glibc-supported-locales.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 4ba49e86a4..798b1e9209 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -763,6 +763,7 @@ dist_patch_DATA = \ %D%/packages/patches/glibc-versioned-locpath.patch \ %D%/packages/patches/glibc-2.27-git-fixes.patch \ %D%/packages/patches/glibc-2.28-git-fixes.patch \ + %D%/packages/patches/glibc-supported-locales.patch \ %D%/packages/patches/glusterfs-use-PATH-instead-of-hardcodes.patch \ %D%/packages/patches/glog-gcc-5-demangling.patch \ %D%/packages/patches/gmp-arm-asm-nothumb.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 3a1186673e..a6ece07ad9 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -604,7 +604,8 @@ store.") "glibc-hidden-visibility-ldconfig.patch" "glibc-versioned-locpath.patch" "glibc-allow-kernel-2.6.32.patch" - "glibc-reinstate-prlimit64-fallback.patch")))) + "glibc-reinstate-prlimit64-fallback.patch" + "glibc-supported-locales.patch")))) (build-system gnu-build-system) ;; Glibc's refers to , for instance, so glibc @@ -901,7 +902,8 @@ GLIBC/HURD for a Hurd host" "glibc-hidden-visibility-ldconfig.patch" "glibc-versioned-locpath.patch" "glibc-allow-kernel-2.6.32.patch" - "glibc-reinstate-prlimit64-fallback.patch")))))) + "glibc-reinstate-prlimit64-fallback.patch" + "glibc-supported-locales.patch")))))) (define-public glibc-2.26 (package diff --git a/gnu/packages/patches/glibc-supported-locales.patch b/gnu/packages/patches/glibc-supported-locales.patch new file mode 100644 index 0000000000..f1c8a88871 --- /dev/null +++ b/gnu/packages/patches/glibc-supported-locales.patch @@ -0,0 +1,31 @@ +This patch is taken from debian's glibc package (generate-supported.mk). + +diff --git a/localedata/Makefile.old b/localedata/Makefile +index 34877c0..a61d9b9 100644 +--- a/localedata/Makefile.old ++++ b/localedata/Makefile +@@ -91,7 +91,8 @@ endif + # Files to install. + install-others := $(addprefix $(inst_i18ndir)/, \ + $(addsuffix .gz, $(charmaps)) \ +- $(locales)) ++ $(locales)) \ ++ $(inst_i18ndir)/SUPPORTED + + tests: $(objdir)/iconvdata/gconv-modules + +@@ -195,6 +196,14 @@ endif + + include SUPPORTED + ++$(inst_i18ndir)/SUPPORTED: SUPPORTED $(+force) ++ for locale in $(SUPPORTED-LOCALES); do \ ++ [ $$locale = true ] && continue; \ ++ echo $$locale | sed 's,/, ,' >> LOCALES; \ ++ done ++ $(make-target-directory) ++ $(INSTALL_DATA) LOCALES $@ ++ + INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES)) + + # Sometimes the whole collection of locale files should be installed. -- cgit v1.2.3 From 02d83c247931045cf899433223e1b1a51f605a9f Mon Sep 17 00:00:00 2001 From: Björn Höfling Date: Fri, 2 Nov 2018 17:56:32 +0100 Subject: gnu: libgcrypt: Update to 1.8.4. Update libgcrypt and remove reproducibility patch, it is now built-in. See https://dev.gnupg.org/T4102 * gnu/packages/gnupg.scm (libgcrypt): Update to 1.8.4. [source]: Remove patch. * gnu/packages/patches/libgcrypt-make-yat2m-reproducible.patch: Delete file. * gnu/local.mk(dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/gnupg.scm | 7 ++--- .../libgcrypt-make-yat2m-reproducible.patch | 32 ---------------------- 3 files changed, 3 insertions(+), 37 deletions(-) delete mode 100644 gnu/packages/patches/libgcrypt-make-yat2m-reproducible.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 798b1e9209..773d55ff18 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -886,7 +886,6 @@ dist_patch_DATA = \ %D%/packages/patches/libevent-2.1-skip-failing-test.patch \ %D%/packages/patches/libexif-CVE-2016-6328.patch \ %D%/packages/patches/libexif-CVE-2017-7544.patch \ - %D%/packages/patches/libgcrypt-make-yat2m-reproducible.patch \ %D%/packages/patches/libgit2-mtime-0.patch \ %D%/packages/patches/libgdata-fix-tests.patch \ %D%/packages/patches/libgdata-glib-duplicate-tests.patch \ diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 3d6727bbde..0b8d3e578e 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -15,6 +15,7 @@ ;;; Copyright © 2017 Petter ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Marius Bakke +;;; Copyright © 2018 Björn Höfling ;;; ;;; This file is part of GNU Guix. ;;; @@ -97,16 +98,14 @@ Daemon and possibly more in the future.") (define-public libgcrypt (package (name "libgcrypt") - (version "1.8.3") + (version "1.8.4") (source (origin (method url-fetch) (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-" version ".tar.bz2")) (sha256 (base32 - "0z5gs1khzyknyfjr19k8gk4q148s6q987ya85cpn0iv70fz91v36")) - (patches - (search-patches "libgcrypt-make-yat2m-reproducible.patch")))) + "09r27ywj9zplq6n9qw3mn7zmvf6y2jdmwx5d1kg8yqkj0qx18f7n")))) (build-system gnu-build-system) (propagated-inputs `(("libgpg-error-host" ,libgpg-error))) diff --git a/gnu/packages/patches/libgcrypt-make-yat2m-reproducible.patch b/gnu/packages/patches/libgcrypt-make-yat2m-reproducible.patch deleted file mode 100644 index 3056f0baad..0000000000 --- a/gnu/packages/patches/libgcrypt-make-yat2m-reproducible.patch +++ /dev/null @@ -1,32 +0,0 @@ -Make yat2m in libgcrypt respect SOURCE_DATE_EPOCH, making -the build reproducible. - -This was already fixed upstream in GnuPG: -https://dev.gnupg.org/rG139de02b93773615bdd95e04a7f0c1ad73b4f6fb - -and in libgpg-error: -https://dev.gnupg.org/rE5494a5728418938d2e42158bb646b07124184e64 - - ---- a/doc/yat2m.c 2017-11-23 19:16:58.000000000 +0100 -+++ b/doc/yat2m.c 2017-08-28 12:22:54.000000000 +0200 -@@ -1475,6 +1484,7 @@ - main (int argc, char **argv) - { - int last_argc = -1; -+ const char *s; - - opt_source = "GNU"; - opt_release = ""; -@@ -1608,6 +1618,11 @@ - if (argc > 1) - die ("usage: " PGM " [OPTION] [FILE] (try --help for more information)\n"); - -+ /* Take care of supplied timestamp for reproducible builds. See -+ * https://reproducible-builds.org/specs/source-date-epoch/ */ -+ if (!opt_date && (s = getenv ("SOURCE_DATE_EPOCH")) && *s) -+ opt_date = s; -+ - /* Start processing. */ - if (argc && strcmp (*argv, "-")) - { -- cgit v1.2.3 From ea8be005d409658dea4f4356e9279784ce0a5a39 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 20 Dec 2018 19:57:28 +0100 Subject: gnu: Use i686-linux bootstrap binaries on x86_64-linux. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This saves 4.4 MB on the installed Guix. * gnu/packages/bootstrap/x86_64-linux: Remove directory. * gnu/local.mk (bootstrap_x86_64_linuxdir) (dist_bootstrap_x86_64_linux_DATA): Remove. * gnu/packages.scm (search-bootstrap-binary): When SYSTEM is "x86_64-linux", use "i686-linux" instead. --- gnu/local.mk | 7 ------- gnu/packages.scm | 18 +++++++++++------- gnu/packages/bootstrap/x86_64-linux/bash | Bin 1425560 -> 0 bytes gnu/packages/bootstrap/x86_64-linux/mkdir | Bin 792448 -> 0 bytes gnu/packages/bootstrap/x86_64-linux/tar | Bin 1369912 -> 0 bytes gnu/packages/bootstrap/x86_64-linux/xz | Bin 927264 -> 0 bytes 6 files changed, 11 insertions(+), 14 deletions(-) delete mode 100755 gnu/packages/bootstrap/x86_64-linux/bash delete mode 100755 gnu/packages/bootstrap/x86_64-linux/mkdir delete mode 100755 gnu/packages/bootstrap/x86_64-linux/tar delete mode 100755 gnu/packages/bootstrap/x86_64-linux/xz (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 9cf690e0f1..7c970dc47c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1287,18 +1287,11 @@ MISC_DISTRO_FILES = \ %D%/packages/ld-wrapper.in bootstrapdir = $(guilemoduledir)/%D%/packages/bootstrap -bootstrap_x86_64_linuxdir = $(bootstrapdir)/x86_64-linux bootstrap_i686_linuxdir = $(bootstrapdir)/i686-linux bootstrap_armhf_linuxdir = $(bootstrapdir)/armhf-linux bootstrap_aarch64_linuxdir = $(bootstrapdir)/aarch64-linux bootstrap_mips64el_linuxdir = $(bootstrapdir)/mips64el-linux -dist_bootstrap_x86_64_linux_DATA = \ - %D%/packages/bootstrap/x86_64-linux/bash \ - %D%/packages/bootstrap/x86_64-linux/mkdir \ - %D%/packages/bootstrap/x86_64-linux/tar \ - %D%/packages/bootstrap/x86_64-linux/xz - dist_bootstrap_i686_linux_DATA = \ %D%/packages/bootstrap/i686-linux/bash \ %D%/packages/bootstrap/i686-linux/mkdir \ diff --git a/gnu/packages.scm b/gnu/packages.scm index 532297239d..333b18f9f0 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -102,14 +102,18 @@ FILE-NAME found in %PATCH-PATH." (define (search-bootstrap-binary file-name system) "Search the bootstrap binary FILE-NAME for SYSTEM. Raise an error if not found." - (or (search-path (%bootstrap-binaries-path) - (string-append system "/" file-name)) - (raise (condition - (&message - (message - (format #f (G_ "could not find bootstrap binary '~a' \ + ;; On x86_64 always use the i686 binaries. + (let ((system (match system + ("x86_64-linux" "i686-linux") + (_ system)))) + (or (search-path (%bootstrap-binaries-path) + (string-append system "/" file-name)) + (raise (condition + (&message + (message + (format #f (G_ "could not find bootstrap binary '~a' \ for system '~a'") - file-name system))))))) + file-name system)))))))) (define %distro-root-directory ;; Absolute file name of the module hierarchy. Since (gnu packages …) might diff --git a/gnu/packages/bootstrap/x86_64-linux/bash b/gnu/packages/bootstrap/x86_64-linux/bash deleted file mode 100755 index b9c410b7cf..0000000000 Binary files a/gnu/packages/bootstrap/x86_64-linux/bash and /dev/null differ diff --git a/gnu/packages/bootstrap/x86_64-linux/mkdir b/gnu/packages/bootstrap/x86_64-linux/mkdir deleted file mode 100755 index f8250ae693..0000000000 Binary files a/gnu/packages/bootstrap/x86_64-linux/mkdir and /dev/null differ diff --git a/gnu/packages/bootstrap/x86_64-linux/tar b/gnu/packages/bootstrap/x86_64-linux/tar deleted file mode 100755 index 90e492f89d..0000000000 Binary files a/gnu/packages/bootstrap/x86_64-linux/tar and /dev/null differ diff --git a/gnu/packages/bootstrap/x86_64-linux/xz b/gnu/packages/bootstrap/x86_64-linux/xz deleted file mode 100755 index 6bfe3c6d96..0000000000 Binary files a/gnu/packages/bootstrap/x86_64-linux/xz and /dev/null differ -- cgit v1.2.3 From e992d56669aac6e4e5a2c46d27902a882f3d1bc6 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 6 Jan 2019 15:45:48 +0200 Subject: gnu: diffutils: Update to 3.7. * gnu/packages/base.scm (diffutils): Update to 3.7. [source]: Remove patch. [native-inputs]: Add perl. * gnu/packages/commencement.scm (diffutils-boot0)[native-inputs]: Don't add perl. * gnu/packages/patches/diffutils-getopt.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/base.scm | 6 ++-- gnu/packages/commencement.scm | 1 + gnu/packages/patches/diffutils-getopt.patch | 44 ----------------------------- 4 files changed, 4 insertions(+), 48 deletions(-) delete mode 100644 gnu/packages/patches/diffutils-getopt.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 7c970dc47c..d87d0b598d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -657,7 +657,6 @@ dist_patch_DATA = \ %D%/packages/patches/deja-dup-use-ref-keyword-for-iter.patch \ %D%/packages/patches/dfu-programmer-fix-libusb.patch \ %D%/packages/patches/diffutils-gets-undeclared.patch \ - %D%/packages/patches/diffutils-getopt.patch \ %D%/packages/patches/docbook-xsl-nonrecursive-string-subst.patch \ %D%/packages/patches/doc++-include-directives.patch \ %D%/packages/patches/doc++-segfault-fix.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index d4d3317b98..aa85662a0c 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -245,16 +245,16 @@ differences.") (define-public diffutils (package (name "diffutils") - (version "3.6") + (version "3.7") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/diffutils/diffutils-" version ".tar.xz")) (sha256 (base32 - "1mivg0fy3a6fcn535ln8nkgfj6vxh5hsxxs5h6692wxmsjyyh8fn")) - (patches (search-patches "diffutils-getopt.patch")))) + "09isrg0isjinv8c535nxsi1s86wfdfzml80dbw41dj9x3hiad9xk")))) (build-system gnu-build-system) + (native-inputs `(("perl" ,perl))) (synopsis "Comparing and merging files") (description "GNU Diffutils is a package containing tools for finding the diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index dc05e047d1..79246a0c5d 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -1430,6 +1430,7 @@ exec " gcc "/bin/" program #:guile %bootstrap-guile))) (package (inherit p) (name "diffutils-boot0") + (native-inputs `()) (arguments `(#:tests? #f ; the test suite needs diffutils ,@(package-arguments p))))))) diff --git a/gnu/packages/patches/diffutils-getopt.patch b/gnu/packages/patches/diffutils-getopt.patch deleted file mode 100644 index 05c2504adf..0000000000 --- a/gnu/packages/patches/diffutils-getopt.patch +++ /dev/null @@ -1,44 +0,0 @@ -commit e3461d1c21a99bcef1b8826f710434e0ffb5adea -Author: Paul Eggert -Date: Sun Jun 11 15:53:09 2017 -0700 - - getopt-posix: port to glibc 2.25.90 - - Problem reported by Daniel P. Berrange in: - http://lists.gnu.org/archive/html/bug-gnulib/2017-06/msg00003.html - * lib/getopt-pfx-core.h (_GETOPT_CORE_H): - * lib/getopt-pfx-ext.h (_GETOPT_EXT_H): - #undef if __GETOPT_PREFIX is defined. - -diff --git a/lib/getopt-pfx-core.h b/lib/getopt-pfx-core.h -index 155c11612..6ad0da683 100644 ---- a/lib/getopt-pfx-core.h -+++ b/lib/getopt-pfx-core.h -@@ -47,6 +47,11 @@ - # define opterr __GETOPT_ID (opterr) - # define optind __GETOPT_ID (optind) - # define optopt __GETOPT_ID (optopt) -+ -+/* The system's getopt.h may have already included getopt-core.h to -+ declare the unprefixed identifiers. Undef _GETOPT_CORE_H so that -+ getopt-core.h declares them with prefixes. */ -+# undef _GETOPT_CORE_H - #endif - - #include -diff --git a/lib/getopt-pfx-ext.h b/lib/getopt-pfx-ext.h -index d960bb34e..c5ac52202 100644 ---- a/lib/getopt-pfx-ext.h -+++ b/lib/getopt-pfx-ext.h -@@ -45,6 +45,11 @@ - # define getopt_long_only __GETOPT_ID (getopt_long_only) - # define option __GETOPT_ID (option) - # define _getopt_internal __GETOPT_ID (getopt_internal) -+ -+/* The system's getopt.h may have already included getopt-ext.h to -+ declare the unprefixed identifiers. Undef _GETOPT_EXT_H so that -+ getopt-ext.h declares them with prefixes. */ -+# undef _GETOPT_EXT_H - #endif - - /* Standalone applications get correct prototypes for getopt_long and -- cgit v1.2.3 From 0559a4c2ca5b2573d5086c8b64794a634fc3e799 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 6 Jan 2019 19:46:01 +0200 Subject: gnu: groff: Update to 1.22.4. * gnu/packages/groff.scm (groff): Update to 1.22.4. [source]: Remove patch. (groff-minimal)[arguments]: Update configure flags to skip documentation. * gnu/packages/patches/groff-source-date-epoch.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/groff.scm | 8 +- gnu/packages/patches/groff-source-date-epoch.patch | 299 --------------------- 3 files changed, 4 insertions(+), 304 deletions(-) delete mode 100644 gnu/packages/patches/groff-source-date-epoch.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index d87d0b598d..f487f357e9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -790,7 +790,6 @@ dist_patch_DATA = \ %D%/packages/patches/gpsbabel-minizip.patch \ %D%/packages/patches/gpsbabel-qstring.patch \ %D%/packages/patches/grep-timing-sensitive-test.patch \ - %D%/packages/patches/groff-source-date-epoch.patch \ %D%/packages/patches/groovy-add-exceptionutilsgenerator.patch \ %D%/packages/patches/grub-binutils-compat.patch \ %D%/packages/patches/grub-check-error-efibootmgr.patch \ diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm index 77728a5d78..9bf8662b9f 100644 --- a/gnu/packages/groff.scm +++ b/gnu/packages/groff.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2014 Mark H Weaver ;;; Copyright © 2016 Ricardo Wurmus ;;; Copyright © 2017 Ludovic Courtès +;;; Copyright © 2019 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -36,14 +37,13 @@ (define-public groff (package (name "groff") - (version "1.22.3") + (version "1.22.4") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/groff/groff-" version ".tar.gz")) (sha256 (base32 - "1998v2kcs288d3y7kfxpvl369nqi06zbbvjzafyvyl3pr7bajj1s")) - (patches (search-patches "groff-source-date-epoch.patch")))) + "14q2mldnr1vx0l9lqp9v2f6iww24gj28iyh4j2211hyynx67p3p7")))) (build-system gnu-build-system) (outputs '("out" "doc")) ;12MiB of PS, PDF, HTML, and examples @@ -91,7 +91,7 @@ is usually the formatter of \"man\" documentation pages.") (arguments `(#:disallowed-references (,perl) - #:configure-flags '("--docdir=/tmp/trash/doc") + #:configure-flags '("--with-doc=no") ,@(substitute-keyword-arguments (package-arguments groff) ((#:phases phases) diff --git a/gnu/packages/patches/groff-source-date-epoch.patch b/gnu/packages/patches/groff-source-date-epoch.patch deleted file mode 100644 index 53c590b049..0000000000 --- a/gnu/packages/patches/groff-source-date-epoch.patch +++ /dev/null @@ -1,299 +0,0 @@ -Adds support for the environment variable SOURCE_DATE_EPOCH. - -See: https://sources.debian.net/patches/groff/1.22.3-9/source-date-epoch.patch/ - -From abc23bc9245e18468817f2838361c3a08f7521e2 Mon Sep 17 00:00:00 2001 -From: Colin Watson -Date: Thu, 5 Nov 2015 11:47:34 +0000 -Subject: Implement `SOURCE_DATE_EPOCH' for reproducible builds. - -Author: Colin Watson -Forwarded: yes -Last-Update: 2015-11-05 - -Patch-Name: source-date-epoch.patch ---- - doc/groff.texinfo | 6 +++++ - src/devices/grohtml/grohtml.man | 7 ++++++ - src/devices/grohtml/post-html.cpp | 5 ++-- - src/devices/gropdf/gropdf.man | 7 ++++++ - src/devices/gropdf/gropdf.pl | 3 ++- - src/devices/grops/grops.man | 7 ++++++ - src/devices/grops/ps.cpp | 3 ++- - src/include/curtime.h | 23 ++++++++++++++++++ - src/libs/libgroff/Makefile.sub | 2 ++ - src/libs/libgroff/curtime.cpp | 51 +++++++++++++++++++++++++++++++++++++++ - src/roff/troff/input.cpp | 3 ++- - 11 files changed, 112 insertions(+), 5 deletions(-) - create mode 100644 src/include/curtime.h - create mode 100644 src/libs/libgroff/curtime.cpp - -diff --git a/doc/groff.texinfo b/doc/groff.texinfo -index 066b5274..1d3c7a9f 100644 ---- a/doc/groff.texinfo -+++ b/doc/groff.texinfo -@@ -1453,6 +1453,12 @@ default directory (on Unix and GNU/Linux systems, this is usually - @item GROFF_TYPESETTER - @tindex GROFF_TYPESETTER@r{, environment variable} - The default output device. -+ -+@item SOURCE_DATE_EPOCH -+@tindex SOURCE_DATE_EPOCH@r{, environment variable} -+A timestamp (expressed as seconds since the Unix epoch) to use in place of -+the current time when initializing time-based built-in registers such as -+@code{\n[seconds]}. - @end table - - Note that MS-DOS and MS-Windows ports of @code{groff} use semi-colons, -diff --git a/src/devices/grohtml/grohtml.man b/src/devices/grohtml/grohtml.man -index 51eae224..4be4abbc 100644 ---- a/src/devices/grohtml/grohtml.man -+++ b/src/devices/grohtml/grohtml.man -@@ -419,6 +419,13 @@ and - for more details. - . - . -+.TP -+.SM -+.B SOURCE_DATE_EPOCH -+A timestamp (expressed as seconds since the Unix epoch) to use as the -+creation timestamp in place of the current time. -+. -+. - .\" -------------------------------------------------------------------- - .SH BUGS - .\" -------------------------------------------------------------------- -diff --git a/src/devices/grohtml/post-html.cpp b/src/devices/grohtml/post-html.cpp -index fefbf014..b5fc5167 100644 ---- a/src/devices/grohtml/post-html.cpp -+++ b/src/devices/grohtml/post-html.cpp -@@ -28,6 +28,7 @@ along with this program. If not, see . */ - #include "html.h" - #include "html-text.h" - #include "html-table.h" -+#include "curtime.h" - - #include - -@@ -5013,7 +5014,7 @@ void html_printer::do_file_components (void) - .put_string(Version_string) - .end_comment(); - -- t = time(0); -+ t = current_time(); - html.begin_comment("CreationDate: ") - .put_string(ctime(&t), strlen(ctime(&t))-1) - .end_comment(); -@@ -5126,7 +5127,7 @@ html_printer::~html_printer() - .put_string(Version_string) - .end_comment(); - -- t = time(0); -+ t = current_time(); - html.begin_comment("CreationDate: ") - .put_string(ctime(&t), strlen(ctime(&t))-1) - .end_comment(); -diff --git a/src/devices/gropdf/gropdf.man b/src/devices/gropdf/gropdf.man -index 3bbace6a..cc0c82f1 100644 ---- a/src/devices/gropdf/gropdf.man -+++ b/src/devices/gropdf/gropdf.man -@@ -1029,6 +1029,13 @@ and - for more details. - . - . -+.TP -+.SM -+.B SOURCE_DATE_EPOCH -+A timestamp (expressed as seconds since the Unix epoch) to use as the -+creation timestamp in place of the current time. -+. -+. - .\" -------------------------------------------------------------------- - .SH FILES - .\" -------------------------------------------------------------------- -diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl -index 035d1238..c25c4c67 100644 ---- a/src/devices/gropdf/gropdf.pl -+++ b/src/devices/gropdf/gropdf.pl -@@ -239,13 +239,14 @@ elsif (exists($ppsz{$papersz})) - @defaultmb=@mediabox=(0,0,$ppsz{$papersz}->[0],$ppsz{$papersz}->[1]); - } - --my (@dt)=localtime(time); -+my (@dt)=localtime($ENV{SOURCE_DATE_EPOCH} || time); - my $dt=PDFDate(\@dt); - - my %info=('Creator' => "(groff version $cfg{GROFF_VERSION})", - 'Producer' => "(gropdf version $cfg{GROFF_VERSION})", - 'ModDate' => "($dt)", - 'CreationDate' => "($dt)"); -+ - while (<>) - { - chomp; -diff --git a/src/devices/grops/grops.man b/src/devices/grops/grops.man -index 99fb7486..272c2d18 100644 ---- a/src/devices/grops/grops.man -+++ b/src/devices/grops/grops.man -@@ -1419,6 +1419,13 @@ and - for more details. - . - . -+.TP -+.SM -+.B SOURCE_DATE_EPOCH -+A timestamp (expressed as seconds since the Unix epoch) to use as the -+creation timestamp in place of the current time. -+. -+. - .\" -------------------------------------------------------------------- - .SH FILES - .\" -------------------------------------------------------------------- -diff --git a/src/devices/grops/ps.cpp b/src/devices/grops/ps.cpp -index 745a503b..03e65372 100644 ---- a/src/devices/grops/ps.cpp -+++ b/src/devices/grops/ps.cpp -@@ -28,6 +28,7 @@ along with this program. If not, see . */ - #include "cset.h" - #include "nonposix.h" - #include "paper.h" -+#include "curtime.h" - - #include "ps.h" - #include -@@ -1390,7 +1391,7 @@ ps_printer::~ps_printer() - #else - time_t - #endif -- t = time(0); -+ t = current_time(); - fputs(ctime(&t), out.get_file()); - } - for (font_pointer_list *f = font_list; f; f = f->next) { -diff --git a/src/include/curtime.h b/src/include/curtime.h -new file mode 100644 -index 00000000..a4105196 ---- /dev/null -+++ b/src/include/curtime.h -@@ -0,0 +1,23 @@ -+/* Copyright (C) 2015 Free Software Foundation, Inc. -+ -+This file is part of groff. -+ -+groff is free software; you can redistribute it and/or modify it under -+the terms of the GNU General Public License as published by the Free -+Software Foundation, either version 2 of the License, or -+(at your option) any later version. -+ -+groff is distributed in the hope that it will be useful, but WITHOUT ANY -+WARRANTY; without even the implied warranty of MERCHANTABILITY or -+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+for more details. -+ -+The GNU General Public License version 2 (GPL2) is available in the -+internet at . */ -+ -+#ifdef LONG_FOR_TIME_T -+long -+#else -+time_t -+#endif -+current_time(); -diff --git a/src/libs/libgroff/Makefile.sub b/src/libs/libgroff/Makefile.sub -index 840d9934..4cb4937a 100644 ---- a/src/libs/libgroff/Makefile.sub -+++ b/src/libs/libgroff/Makefile.sub -@@ -32,6 +32,7 @@ OBJS=\ - cmap.$(OBJEXT) \ - color.$(OBJEXT) \ - cset.$(OBJEXT) \ -+ curtime.$(OBJEXT) \ - device.$(OBJEXT) \ - errarg.$(OBJEXT) \ - error.$(OBJEXT) \ -@@ -82,6 +83,7 @@ CCSRCS=\ - $(srcdir)/cmap.cpp \ - $(srcdir)/color.cpp \ - $(srcdir)/cset.cpp \ -+ $(srcdir)/curtime.cpp \ - $(srcdir)/device.cpp \ - $(srcdir)/errarg.cpp \ - $(srcdir)/error.cpp \ -diff --git a/src/libs/libgroff/curtime.cpp b/src/libs/libgroff/curtime.cpp -new file mode 100644 -index 00000000..00821b7f ---- /dev/null -+++ b/src/libs/libgroff/curtime.cpp -@@ -0,0 +1,51 @@ -+/* Copyright (C) 2015 Free Software Foundation, Inc. -+ -+This file is part of groff. -+ -+groff is free software; you can redistribute it and/or modify it under -+the terms of the GNU General Public License as published by the Free -+Software Foundation, either version 2 of the License, or -+(at your option) any later version. -+ -+groff is distributed in the hope that it will be useful, but WITHOUT ANY -+WARRANTY; without even the implied warranty of MERCHANTABILITY or -+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+for more details. -+ -+The GNU General Public License version 2 (GPL2) is available in the -+internet at . */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include "errarg.h" -+#include "error.h" -+ -+#ifdef LONG_FOR_TIME_T -+long -+#else -+time_t -+#endif -+current_time() -+{ -+ char *source_date_epoch = getenv("SOURCE_DATE_EPOCH"); -+ -+ if (source_date_epoch) { -+ errno = 0; -+ char *endptr; -+ long epoch = strtol(source_date_epoch, &endptr, 10); -+ -+ if ((errno == ERANGE && (epoch == LONG_MAX || epoch == LONG_MIN)) || -+ (errno != 0 && epoch == 0)) -+ fatal("$SOURCE_DATE_EPOCH: strtol: %1", strerror(errno)); -+ if (endptr == source_date_epoch) -+ fatal("$SOURCE_DATE_EPOCH: no digits found: %1", endptr); -+ if (*endptr != '\0') -+ fatal("$SOURCE_DATE_EPOCH: trailing garbage: %1", endptr); -+ return epoch; -+ } else -+ return time(0); -+} -diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp -index 9594f074..f7d2c18a 100644 ---- a/src/roff/troff/input.cpp -+++ b/src/roff/troff/input.cpp -@@ -36,6 +36,7 @@ along with this program. If not, see . */ - #include "input.h" - #include "defs.h" - #include "unicode.h" -+#include "curtime.h" - - // Needed for getpid() and isatty() - #include "posix.h" -@@ -8138,7 +8139,7 @@ static void init_registers() - #else /* not LONG_FOR_TIME_T */ - time_t - #endif /* not LONG_FOR_TIME_T */ -- t = time(0); -+ t = current_time(); - // Use struct here to work around misfeature in old versions of g++. - struct tm *tt = localtime(&t); - set_number_reg("seconds", int(tt->tm_sec)); -- cgit v1.2.3 From 974537fc4cd8045bcdce68c5ce79df35b0e17ec3 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Sun, 13 Jan 2019 21:08:48 -0600 Subject: gnu: python-pycodestyle: Fix build with Python 3.7. * gnu/packages/patches/python-pycodestyle-stdlib-tokenize-fix.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/python.scm (python-pycodestyle)[source]: Use it. --- gnu/local.mk | 1 + .../python-pycodestyle-stdlib-tokenize-fix.patch | 35 ++++++++++++++++++++++ gnu/packages/python.scm | 3 +- 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-pycodestyle-stdlib-tokenize-fix.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f487f357e9..23ba0d48f7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1108,6 +1108,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-mox3-python3.6-compat.patch \ %D%/packages/patches/python-testtools.patch \ %D%/packages/patches/python-paste-remove-timing-test.patch \ + %D%/packages/patches/python-pycodestyle-stdlib-tokenize-fix.patch \ %D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \ %D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \ diff --git a/gnu/packages/patches/python-pycodestyle-stdlib-tokenize-fix.patch b/gnu/packages/patches/python-pycodestyle-stdlib-tokenize-fix.patch new file mode 100644 index 0000000000..16388c8dba --- /dev/null +++ b/gnu/packages/patches/python-pycodestyle-stdlib-tokenize-fix.patch @@ -0,0 +1,35 @@ +From 397463014fda3cdefe8d6c9d117ae16d878dc494 Mon Sep 17 00:00:00 2001 +From: Michael Hudson-Doyle +Date: Tue, 25 Sep 2018 14:58:57 +1200 +Subject: [PATCH] Keep compability with stdlib tokenize.py changes + +https://github.com/python/cpython/commit/c4ef4896eac86a6759901c8546e26de4695a1389 +is not yet part of any release of Python but has been backported to all +versions in Git (includeing 2.7!). It causes the tokenize.py module to +emit a synthetic NEWLINE token for files that do not in fact end with a +newline, which confuses pycodestyle's checks for blank lines at the end +of a file. Fortunately the synthetic NEWLINE tokens are easy to detect +(the token text is ""). + +Fixes #786 +--- + pycodestyle.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/pycodestyle.py b/pycodestyle.py +index 0d725d27..fbc3dca3 100755 +--- a/pycodestyle.py ++++ b/pycodestyle.py +@@ -258,10 +258,10 @@ def trailing_blank_lines(physical_line, lines, line_number, total_lines): + """ + if line_number == total_lines: + stripped_last_line = physical_line.rstrip() +- if not stripped_last_line: ++ if physical_line and not stripped_last_line: + return 0, "W391 blank line at end of file" + if stripped_last_line == physical_line: +- return len(physical_line), "W292 no newline at end of file" ++ return len(lines[-1]), "W292 no newline at end of file" + + + @register_check diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 2971dfe779..c0ed19e16c 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3974,7 +3974,8 @@ as the original project seems to have been abandoned circa 2007.") (uri (pypi-uri "pycodestyle" version)) (sha256 (base32 - "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b")))) + "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b")) + (patches (search-patches "python-pycodestyle-stdlib-tokenize-fix.patch")))) (build-system python-build-system) (home-page "https://pycodestyle.readthedocs.io/") (synopsis "Python style guide checker") -- cgit v1.2.3 From 44ab38ef01f11fe29860c944e2169f9a4ef72d13 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 14 Jan 2019 22:31:56 +0100 Subject: bootstrap: Oops, list gcc-boot-4.7.4.patch. * gnu/local.mk (dist_patch_DATA): Oops, add gcc-boot-4.7.4.patch. --- gnu/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 23ba0d48f7..38076259e3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -710,6 +710,7 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-arm-link-spec-fix.patch \ %D%/packages/patches/gcc-asan-missing-include.patch \ %D%/packages/patches/gcc-boot-2.95.3.patch \ + %D%/packages/patches/gcc-boot-4.7.4.patch \ %D%/packages/patches/gcc-cross-environment-variables.patch \ %D%/packages/patches/gcc-fix-texi2pod.patch \ %D%/packages/patches/gcc-4.8-libsanitizer-fix.patch \ -- cgit v1.2.3 From 4bdd41bb839e52876fdc03011bed0aa450c92263 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Tue, 22 Jan 2019 23:33:21 -0600 Subject: gnu: handbrake: Upgrade to 1.2.0. * gnu/packages/patches/handbrake-opt-in-nvenc.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/video.scm (handbrake)[source]: Upgrade to 1.2.0. Use patch. [native-inputs]: Add cmake. [inputs]: Add speex. [arguments]: Disable runtime update checks via #:configure-flags. --- gnu/local.mk | 1 + gnu/packages/patches/handbrake-opt-in-nvenc.patch | 14 ++++++++++++++ gnu/packages/video.scm | 14 +++++++++----- 3 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 gnu/packages/patches/handbrake-opt-in-nvenc.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 38076259e3..f55907731b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -812,6 +812,7 @@ dist_patch_DATA = \ %D%/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch \ %D%/packages/patches/gtkglext-disable-disable-deprecated.patch \ %D%/packages/patches/gzdoom-search-in-installed-share.patch \ + %D%/packages/patches/handbrake-opt-in-nvenc.patch \ %D%/packages/patches/haskell-mode-unused-variables.patch \ %D%/packages/patches/haskell-mode-make-check.patch \ %D%/packages/patches/hdf4-architectures.patch \ diff --git a/gnu/packages/patches/handbrake-opt-in-nvenc.patch b/gnu/packages/patches/handbrake-opt-in-nvenc.patch new file mode 100644 index 0000000000..2b34aaa427 --- /dev/null +++ b/gnu/packages/patches/handbrake-opt-in-nvenc.patch @@ -0,0 +1,14 @@ +Require opt-in for NVEnc support. Otherwise the default is true with no way +to disable it. + +--- HandBrake-1.2.0/make/configure.py.orig 1969-12-31 18:00:00.000000000 -0600 ++++ HandBrake-1.2.0/make/configure.py 2019-01-22 23:22:46.186959060 -0600 +@@ -1320,7 +1320,7 @@ + grp.add_option( '--disable-ffmpeg-aac', dest="enable_ffmpeg_aac", action='store_false' ) + + h = IfHost( 'enable Nvidia NVEnc video encoder', '*-*-*', none=optparse.SUPPRESS_HELP ).value +- grp.add_option( '--enable-nvenc', dest="enable_nvenc", default=not (host.match( '*-*-darwin*' ) or host.match( '*-*-freebsd*' )), action='store_true', help=h ) ++ grp.add_option( '--enable-nvenc', dest="enable_nvenc", default=False, action='store_true', help=h ) + + + cli.add_option_group( grp ) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index c327c9bc5c..4ac1b68077 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -12,7 +12,7 @@ ;;; Copyright © 2016 Dmitry Nikolaev ;;; Copyright © 2016 Andy Patterson ;;; Copyright © 2016, 2017 Nils Gillmann -;;; Copyright © 2016, 2018 Eric Bavier +;;; Copyright © 2016, 2018, 2019 Eric Bavier ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2017 Feng Shu ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice @@ -2430,14 +2430,14 @@ supported players in addition to this package.") (define-public handbrake (package (name "handbrake") - (version "1.1.2") + (version "1.2.0") (source (origin (method url-fetch) (uri (string-append "https://download.handbrake.fr/releases/" version "/HandBrake-" version "-source.tar.bz2")) (sha256 (base32 - "0bny0hwlr55g2c69rsamv0xvwmfh1s4a582b9vq20xv5ly84m6ms")) + "03clkknaq3mz84p85cvr21gsy9b8vv2g4vvyfz44hz8la253jfqi")) (modules '((guix build utils))) (snippet ;; Remove "contrib" and source not necessary for @@ -2451,11 +2451,13 @@ supported players in addition to this package.") ;; which would lead to fetching and building of these ;; libraries. Use our own instead. (("MODULES \\+= contrib") "# MODULES += contrib")) - #t)))) + #t)) + (patches (search-patches "handbrake-opt-in-nvenc.patch")))) (build-system glib-or-gtk-build-system) (native-inputs `(("automake" ,automake) ;gui subpackage must be bootstrapped ("autoconf" ,autoconf) + ("cmake" ,cmake) ;TODO: could probably strip check from make/configure.py ("curl" ,curl) ;not actually used, but tested for ("intltool" ,intltool) ("libtool" ,libtool) @@ -2488,12 +2490,14 @@ supported players in addition to this package.") ("libvpx" ,libvpx) ("libxml2" ,libxml2) ("libx264" ,libx264) + ("speex" ,speex) ("x265" ,x265) ("zlib" ,zlib))) (arguments `(#:tests? #f ;tests require Ruby and claim to be unsupported #:configure-flags - (list (string-append "CPPFLAGS=-I" + (list "--disable-gtk-update-checks" + (string-append "CPPFLAGS=-I" (assoc-ref %build-inputs "libxml2") "/include/libxml2") "LDFLAGS=-lx265") -- cgit v1.2.3 From a5be549e393962764a9df590dc5ba6a314bfe866 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 7 Feb 2019 21:31:23 +0100 Subject: gnu: libarchive: Remove graft for 3.3.3. * gnu/packages/patches/libarchive-CVE-2017-14166.patch, gnu/packages/patches/libarchive-CVE-2017-14502.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/backup.scm (libarchive): Update to 3.3.3. [source](patches): Adjust for 3.3.3. [replacement]: Remove field. (libarchive-3.3.3): Remove variable. --- gnu/local.mk | 2 - gnu/packages/backup.scm | 26 +++---------- .../patches/libarchive-CVE-2017-14166.patch | 45 ---------------------- .../patches/libarchive-CVE-2017-14502.patch | 40 ------------------- 4 files changed, 5 insertions(+), 108 deletions(-) delete mode 100644 gnu/packages/patches/libarchive-CVE-2017-14166.patch delete mode 100644 gnu/packages/patches/libarchive-CVE-2017-14502.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 9544297f17..45f108e768 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -943,8 +943,6 @@ dist_patch_DATA = \ %D%/packages/patches/liba52-link-with-libm.patch \ %D%/packages/patches/liba52-set-soname.patch \ %D%/packages/patches/liba52-use-mtune-not-mcpu.patch \ - %D%/packages/patches/libarchive-CVE-2017-14166.patch \ - %D%/packages/patches/libarchive-CVE-2017-14502.patch \ %D%/packages/patches/libarchive-CVE-2018-1000877.patch \ %D%/packages/patches/libarchive-CVE-2018-1000878.patch \ %D%/packages/patches/libarchive-CVE-2018-1000880.patch \ diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index c312f23c1a..45b1be2413 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -197,18 +197,18 @@ backups (called chunks) to allow easy burning to CD/DVD.") (define-public libarchive (package (name "libarchive") - (replacement libarchive-3.3.3) - (version "3.3.2") + (version "3.3.3") (source (origin (method url-fetch) (uri (string-append "https://libarchive.org/downloads/libarchive-" version ".tar.gz")) - (patches (search-patches "libarchive-CVE-2017-14166.patch" - "libarchive-CVE-2017-14502.patch")) + (patches (search-patches "libarchive-CVE-2018-1000877.patch" + "libarchive-CVE-2018-1000878.patch" + "libarchive-CVE-2018-1000880.patch")) (sha256 (base32 - "1km0mzfl6in7l5vz9kl09a88ajx562rw93ng9h2jqavrailvsbgd")))) + "0bhfncid058p7n1n8v29l6wxm3mhdqfassscihbsxfwz3iwb2zms")))) (build-system gnu-build-system) (inputs `(("zlib" ,zlib) @@ -274,22 +274,6 @@ archive. In particular, note that there is currently no built-in support for random access nor for in-place modification.") (license license:bsd-2))) -(define-public libarchive-3.3.3 - (package - (inherit libarchive) - (version "3.3.3") - (source - (origin - (method url-fetch) - (uri (string-append "https://libarchive.org/downloads/libarchive-" - version ".tar.gz")) - (patches (search-patches "libarchive-CVE-2018-1000877.patch" - "libarchive-CVE-2018-1000878.patch" - "libarchive-CVE-2018-1000880.patch")) - (sha256 - (base32 - "0bhfncid058p7n1n8v29l6wxm3mhdqfassscihbsxfwz3iwb2zms")))))) - (define-public rdup (package (name "rdup") diff --git a/gnu/packages/patches/libarchive-CVE-2017-14166.patch b/gnu/packages/patches/libarchive-CVE-2017-14166.patch deleted file mode 100644 index a122848440..0000000000 --- a/gnu/packages/patches/libarchive-CVE-2017-14166.patch +++ /dev/null @@ -1,45 +0,0 @@ -Fix CVE-2017-14166: - -https://github.com/libarchive/libarchive/issues/935 -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-14166 - -Patch copied from upstream source repository: - -https://github.com/libarchive/libarchive/commit/fa7438a0ff4033e4741c807394a9af6207940d71 - -From fa7438a0ff4033e4741c807394a9af6207940d71 Mon Sep 17 00:00:00 2001 -From: Joerg Sonnenberger -Date: Tue, 5 Sep 2017 18:12:19 +0200 -Subject: [PATCH] Do something sensible for empty strings to make fuzzers - happy. - ---- - libarchive/archive_read_support_format_xar.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/libarchive/archive_read_support_format_xar.c b/libarchive/archive_read_support_format_xar.c -index 7a22beb9d..93eeacc5e 100644 ---- a/libarchive/archive_read_support_format_xar.c -+++ b/libarchive/archive_read_support_format_xar.c -@@ -1040,6 +1040,9 @@ atol10(const char *p, size_t char_cnt) - uint64_t l; - int digit; - -+ if (char_cnt == 0) -+ return (0); -+ - l = 0; - digit = *p - '0'; - while (digit >= 0 && digit < 10 && char_cnt-- > 0) { -@@ -1054,7 +1057,10 @@ atol8(const char *p, size_t char_cnt) - { - int64_t l; - int digit; -- -+ -+ if (char_cnt == 0) -+ return (0); -+ - l = 0; - while (char_cnt-- > 0) { - if (*p >= '0' && *p <= '7') diff --git a/gnu/packages/patches/libarchive-CVE-2017-14502.patch b/gnu/packages/patches/libarchive-CVE-2017-14502.patch deleted file mode 100644 index 8e0508afb5..0000000000 --- a/gnu/packages/patches/libarchive-CVE-2017-14502.patch +++ /dev/null @@ -1,40 +0,0 @@ -Fix CVE-2017-14502: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-14502 -https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=573 - -Patch copied from upstream source repository: - -https://github.com/libarchive/libarchive/commit/5562545b5562f6d12a4ef991fae158bf4ccf92b6 - -From 5562545b5562f6d12a4ef991fae158bf4ccf92b6 Mon Sep 17 00:00:00 2001 -From: Joerg Sonnenberger -Date: Sat, 9 Sep 2017 17:47:32 +0200 -Subject: [PATCH] Avoid a read off-by-one error for UTF16 names in RAR - archives. - -Reported-By: OSS-Fuzz issue 573 ---- - libarchive/archive_read_support_format_rar.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c -index cbb14c32..751de697 100644 ---- a/libarchive/archive_read_support_format_rar.c -+++ b/libarchive/archive_read_support_format_rar.c -@@ -1496,7 +1496,11 @@ read_header(struct archive_read *a, struct archive_entry *entry, - return (ARCHIVE_FATAL); - } - filename[filename_size++] = '\0'; -- filename[filename_size++] = '\0'; -+ /* -+ * Do not increment filename_size here as the computations below -+ * add the space for the terminating NUL explicitly. -+ */ -+ filename[filename_size] = '\0'; - - /* Decoded unicode form is UTF-16BE, so we have to update a string - * conversion object for it. */ --- -2.15.1 - -- cgit v1.2.3 From d16ef28b8037664ad08af5fb825811e9f46bb64c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 8 Feb 2019 18:43:42 +0100 Subject: gnu: python-pycodestyle: Update to 2.5.0. * gnu/packages/patches/python-pycodestyle-stdlib-tokenize-fix.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/python-xyz.scm (python-pycodestyle): Update to 2.5.0. [source](patches): Remove. --- gnu/local.mk | 1 - .../python-pycodestyle-stdlib-tokenize-fix.patch | 35 ---------------------- gnu/packages/python-xyz.scm | 5 ++-- 3 files changed, 2 insertions(+), 39 deletions(-) delete mode 100644 gnu/packages/patches/python-pycodestyle-stdlib-tokenize-fix.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 41f81d0d0b..9df65b9d21 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1171,7 +1171,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-mox3-python3.6-compat.patch \ %D%/packages/patches/python-testtools.patch \ %D%/packages/patches/python-paste-remove-timing-test.patch \ - %D%/packages/patches/python-pycodestyle-stdlib-tokenize-fix.patch \ %D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \ %D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \ diff --git a/gnu/packages/patches/python-pycodestyle-stdlib-tokenize-fix.patch b/gnu/packages/patches/python-pycodestyle-stdlib-tokenize-fix.patch deleted file mode 100644 index 16388c8dba..0000000000 --- a/gnu/packages/patches/python-pycodestyle-stdlib-tokenize-fix.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 397463014fda3cdefe8d6c9d117ae16d878dc494 Mon Sep 17 00:00:00 2001 -From: Michael Hudson-Doyle -Date: Tue, 25 Sep 2018 14:58:57 +1200 -Subject: [PATCH] Keep compability with stdlib tokenize.py changes - -https://github.com/python/cpython/commit/c4ef4896eac86a6759901c8546e26de4695a1389 -is not yet part of any release of Python but has been backported to all -versions in Git (includeing 2.7!). It causes the tokenize.py module to -emit a synthetic NEWLINE token for files that do not in fact end with a -newline, which confuses pycodestyle's checks for blank lines at the end -of a file. Fortunately the synthetic NEWLINE tokens are easy to detect -(the token text is ""). - -Fixes #786 ---- - pycodestyle.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/pycodestyle.py b/pycodestyle.py -index 0d725d27..fbc3dca3 100755 ---- a/pycodestyle.py -+++ b/pycodestyle.py -@@ -258,10 +258,10 @@ def trailing_blank_lines(physical_line, lines, line_number, total_lines): - """ - if line_number == total_lines: - stripped_last_line = physical_line.rstrip() -- if not stripped_last_line: -+ if physical_line and not stripped_last_line: - return 0, "W391 blank line at end of file" - if stripped_last_line == physical_line: -- return len(physical_line), "W292 no newline at end of file" -+ return len(lines[-1]), "W292 no newline at end of file" - - - @register_check diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index b92bed542f..9d80531296 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -3593,15 +3593,14 @@ as the original project seems to have been abandoned circa 2007.") (define-public python-pycodestyle (package (name "python-pycodestyle") - (version "2.4.0") + (version "2.5.0") (source (origin (method url-fetch) (uri (pypi-uri "pycodestyle" version)) (sha256 (base32 - "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b")) - (patches (search-patches "python-pycodestyle-stdlib-tokenize-fix.patch")))) + "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4")))) (build-system python-build-system) (home-page "https://pycodestyle.readthedocs.io/") (synopsis "Python style guide checker") -- cgit v1.2.3 From 8771fc1715b400ead16f97683c67ad336b485750 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 7 Oct 2018 14:38:25 +0200 Subject: gnu: aspell: Fix FTBFS with GCC7. * gnu/packages/patches/aspell-gcc-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/aspell.scm (aspell)[source](patches): Use it. --- gnu/local.mk | 1 + gnu/packages/aspell.scm | 3 ++- gnu/packages/patches/aspell-gcc-compat.patch | 31 ++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/aspell-gcc-compat.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 9df65b9d21..d16b9e8c01 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -643,6 +643,7 @@ dist_patch_DATA = \ %D%/packages/patches/apr-skip-getservbyname-test.patch \ %D%/packages/patches/aria2-CVE-2019-3500.patch \ %D%/packages/patches/aspell-default-dict-dir.patch \ + %D%/packages/patches/aspell-gcc-compat.patch \ %D%/packages/patches/ath9k-htc-firmware-binutils.patch \ %D%/packages/patches/ath9k-htc-firmware-gcc.patch \ %D%/packages/patches/ath9k-htc-firmware-objcopy.patch \ diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm index ca9fc8eda5..01133155e1 100644 --- a/gnu/packages/aspell.scm +++ b/gnu/packages/aspell.scm @@ -45,7 +45,8 @@ (sha256 (base32 "1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm")) - (patches (search-patches "aspell-default-dict-dir.patch")))) + (patches (search-patches "aspell-default-dict-dir.patch" + "aspell-gcc-compat.patch")))) (build-system gnu-build-system) (arguments `(#:phases diff --git a/gnu/packages/patches/aspell-gcc-compat.patch b/gnu/packages/patches/aspell-gcc-compat.patch new file mode 100644 index 0000000000..94c44f8fb6 --- /dev/null +++ b/gnu/packages/patches/aspell-gcc-compat.patch @@ -0,0 +1,31 @@ +Fix GCC7 warnings. + +Taken from upstream: +https://git.savannah.gnu.org/cgit/aspell.git/commit/?id=8089fa02122fed0a6394eba14bbedcb1d18e2384 + +diff --git a/modules/filter/tex.cpp b/modules/filter/tex.cpp +index a979539..19ab63c 100644 +--- a/modules/filter/tex.cpp ++++ b/modules/filter/tex.cpp +@@ -174,7 +174,7 @@ namespace { + + if (c == '{') { + +- if (top.in_what == Parm || top.in_what == Opt || top.do_check == '\0') ++ if (top.in_what == Parm || top.in_what == Opt || *top.do_check == '\0') + push_command(Parm); + + top.in_what = Parm; +diff --git a/prog/check_funs.cpp b/prog/check_funs.cpp +index db54f3d..89ee09d 100644 +--- a/prog/check_funs.cpp ++++ b/prog/check_funs.cpp +@@ -647,7 +647,7 @@ static void print_truncate(FILE * out, const char * word, int width) { + } + } + if (i == width-1) { +- if (word == '\0') ++ if (*word == '\0') + put(out,' '); + else if (word[len] == '\0') + put(out, word, len); -- cgit v1.2.3 From 9df397508dc1bc3544534aebc7c658c9754b08b4 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 10 Feb 2019 18:15:10 +0100 Subject: gnu: poppler: Update to 0.74.0. * gnu/packages/patches/scribus-poppler-0.73.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/scribus.scm (scribus)[source](patches): Add it. * gnu/packages/pdf.scm (poppler): Update to 0.74.0. [arguments]: Adjust renamed configure flag. * gnu/packages/tex.scm (texlive-bin)[arguments]: Add phase 'use-code-for-even-newer-poppler'. --- gnu/local.mk | 1 + gnu/packages/patches/scribus-poppler-0.73.patch | 36 +++++++++++++++++++++++++ gnu/packages/pdf.scm | 6 ++--- gnu/packages/scribus.scm | 4 ++- gnu/packages/tex.scm | 9 +++++++ 5 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 gnu/packages/patches/scribus-poppler-0.73.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 3a7bbedf6c..3f66beac14 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1220,6 +1220,7 @@ dist_patch_DATA = \ %D%/packages/patches/scotch-build-parallelism.patch \ %D%/packages/patches/scotch-integer-declarations.patch \ %D%/packages/patches/scribus-poppler.patch \ + %D%/packages/patches/scribus-poppler-0.73.patch \ %D%/packages/patches/sdl-libx11-1.6.patch \ %D%/packages/patches/seq24-rename-mutex.patch \ %D%/packages/patches/sharutils-CVE-2018-1000097.patch \ diff --git a/gnu/packages/patches/scribus-poppler-0.73.patch b/gnu/packages/patches/scribus-poppler-0.73.patch new file mode 100644 index 0000000000..5cf4cf721d --- /dev/null +++ b/gnu/packages/patches/scribus-poppler-0.73.patch @@ -0,0 +1,36 @@ +Fix build with Poppler 0.73. + +This is an amalgamation of these upstream commits: +https://github.com/scribusproject/scribus/commit/d34e59bfe495250ba023ba0f99e672ee32300a27 +https://github.com/scribusproject/scribus/commit/c43a89030026f8ffab5070b6935daee8bd74838a + +diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h +index c46448b80a..4dac7c3983 100644 +--- a/scribus/plugins/import/pdf/slaoutput.h ++++ b/scribus/plugins/import/pdf/slaoutput.h +@@ -28,7 +28,9 @@ for which a new license (GPL+exception) is in place. + #include "selection.h" + #include "vgradient.h" + ++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 73, 0) + #include ++#endif + #include + #include + #include +diff --git a/scribus/plugins/import/pdf/importpdfconfig.h b/scribus/plugins/import/pdf/importpdfconfig.h +index f6b3950377..80ac796501 100644 +--- a/scribus/plugins/import/pdf/importpdfconfig.h ++++ b/scribus/plugins/import/pdf/importpdfconfig.h +@@ -37,4 +37,11 @@ for which a new license (GPL+exception) is in place. + #define getCString c_str + #endif + ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 73, 0) ++#define Guchar unsigned char ++#define Gushort unsigned short ++#define Guint unsigned int ++#define Gulong unsigned long ++#endif ++ + #endif diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 504e69c769..1aa47b5c28 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -83,14 +83,14 @@ (define-public poppler (package (name "poppler") - (version "0.72.0") + (version "0.74.0") (source (origin (method url-fetch) (uri (string-append "https://poppler.freedesktop.org/poppler-" version ".tar.xz")) (sha256 (base32 - "0lfs1b1jfamxl13zbl5n448dqvl9n8frbv8180y7b7kfyaw7wx61")))) + "0bvb0yq9zsl2b811j4l4x0vf8g5lgmqbndkb2hvgsrr5639rzq4j")))) (build-system cmake-build-system) ;; FIXME: ;; use libcurl: no @@ -122,7 +122,7 @@ #:configure-flags (let* ((out (assoc-ref %outputs "out")) (lib (string-append out "/lib"))) - (list "-DENABLE_XPDF_HEADERS=ON" ; to install header files + (list "-DENABLE_UNSTABLE_API_ABI_HEADERS=ON" ;to install header files "-DENABLE_ZLIB=ON" (string-append "-DCMAKE_INSTALL_LIBDIR=" lib) (string-append "-DCMAKE_INSTALL_RPATH=" lib))))) diff --git a/gnu/packages/scribus.scm b/gnu/packages/scribus.scm index 20795da275..5b770fd696 100644 --- a/gnu/packages/scribus.scm +++ b/gnu/packages/scribus.scm @@ -97,7 +97,9 @@ (file-name "scribus-poppler-0.70.patch") (sha256 (base32 - "0dw7ix3jaj0y1q97cmmqwb2qgdx760yhxx86wa8rnx0xhfi5x6qr")))))) + "0dw7ix3jaj0y1q97cmmqwb2qgdx760yhxx86wa8rnx0xhfi5x6qr")))) + + (search-patches "scribus-poppler-0.73.patch"))) (modules '((guix build utils))) (snippet '(begin diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index 5f294dc84c..631fb8319f 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -200,6 +200,15 @@ (copy-file "texk/web2c/pdftexdir/pdftosrc-newpoppler.cc" "texk/web2c/pdftexdir/pdftosrc.cc") #t)) + (add-after 'use-code-for-new-poppler 'use-code-for-even-newer-poppler + (lambda _ + ;; Adjust for deprecated types in Poppler 0.73. + (substitute* (append + (find-files "texk/web2c/luatexdir/" "\\.(cc|w)$") + '("texk/web2c/pdftexdir/pdftosrc.cc")) + (("Guint") "unsigned int") + (("Guchar") "unsigned char")) + #t)) (add-after 'unpack 'disable-failing-test (lambda _ ;; FIXME: This test fails on 32-bit architectures since Glibc 2.28: -- cgit v1.2.3 From b3e508dadbeb1a08592f8691a1de63bdeb43b39a Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 17 Feb 2019 16:59:45 +0100 Subject: gnu: texinfo: Update to 6.6. * gnu/packages/patches/texinfo-perl-compat.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/texinfo.scm (texinfo): Update to 6.6. [source](patches): Remove. --- gnu/local.mk | 1 - gnu/packages/patches/texinfo-perl-compat.patch | 51 -------------------------- gnu/packages/texinfo.scm | 5 +-- 3 files changed, 2 insertions(+), 55 deletions(-) delete mode 100644 gnu/packages/patches/texinfo-perl-compat.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index e239c76c7c..0500a06b53 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1270,7 +1270,6 @@ dist_patch_DATA = \ %D%/packages/patches/tcsh-fix-out-of-bounds-read.patch \ %D%/packages/patches/teensy-loader-cli-help.patch \ %D%/packages/patches/teeworlds-use-latest-wavpack.patch \ - %D%/packages/patches/texinfo-perl-compat.patch \ %D%/packages/patches/texinfo-5-perl-compat.patch \ %D%/packages/patches/texlive-bin-luatex-poppler-compat.patch \ %D%/packages/patches/texlive-bin-pdftex-poppler-compat.patch \ diff --git a/gnu/packages/patches/texinfo-perl-compat.patch b/gnu/packages/patches/texinfo-perl-compat.patch deleted file mode 100644 index a7348fde0d..0000000000 --- a/gnu/packages/patches/texinfo-perl-compat.patch +++ /dev/null @@ -1,51 +0,0 @@ -Fix compatibility with newer Perls. - -The first patch is taken from upstream: -https://svn.savannah.gnu.org/viewvc/texinfo?view=revision&revision=8008 - -The second gets rid of a deprecation warning that breaks some tests. -Taken from Fedora: . - ---- trunk/tp/Texinfo/Convert/XSParagraph/xspara.c 2017/04/30 14:57:26 7765 -+++ trunk/tp/Texinfo/Convert/XSParagraph/xspara.c 2018/07/13 15:39:29 8008 -@@ -248,6 +248,11 @@ - - dTHX; - -+#if PERL_VERSION > 27 || (PERL_VERSION == 27 && PERL_SUBVERSION > 8) -+ /* needed due to thread-safe locale handling in newer perls */ -+ switch_to_global_locale(); -+#endif -+ - if (setlocale (LC_CTYPE, "en_US.UTF-8") - || setlocale (LC_CTYPE, "en_US.utf8")) - goto success; -@@ -320,6 +325,10 @@ - { - success: ; - free (utf8_locale); -+#if PERL_VERSION > 27 || (PERL_VERSION == 27 && PERL_SUBVERSION > 8) -+ /* needed due to thread-safe locale handling in newer perls */ -+ sync_locale(); -+#endif - /* - fprintf (stderr, "tried to set LC_CTYPE to UTF-8.\n"); - fprintf (stderr, "character encoding is: %s\n", - -diff -up texinfo-6.5/tp/Texinfo/Parser.pm.orig texinfo-6.5/tp/Texinfo/Parser.pm ---- texinfo-6.5/tp/Texinfo/Parser.pm.orig 2018-06-12 13:40:29.356030136 +0200 -+++ texinfo-6.5/tp/Texinfo/Parser.pm 2018-06-12 13:41:28.357725639 +0200 -@@ -5478,11 +5478,11 @@ sub _parse_special_misc_command($$$$) - } - } elsif ($command eq 'clickstyle') { - # REMACRO -- if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*/) { -+ if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)(\{})?\s*/) { - $args = ['@'.$1]; - $self->{'clickstyle'} = $1; - $remaining = $line; -- $remaining =~ s/^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*(\@(c|comment)((\@|\s+).*)?)?//; -+ $remaining =~ s/^\s+@([[:alnum:]][[:alnum:]\-]*)(\{})?\s*(\@(c|comment)((\@|\s+).*)?)?//; - $has_comment = 1 if (defined($4)); - } else { - $self->line_error (sprintf($self->__( diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm index fa98bd56b8..befdd78551 100644 --- a/gnu/packages/texinfo.scm +++ b/gnu/packages/texinfo.scm @@ -32,15 +32,14 @@ (define-public texinfo (package (name "texinfo") - (version "6.5") + (version "6.6") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/texinfo/texinfo-" version ".tar.xz")) - (patches (search-patches "texinfo-perl-compat.patch")) (sha256 (base32 - "0qjzvbvnv9003xdrcpi3jp7y68j4hq2ciw9frh2hghh698zlnxvp")))) + "0rixv4c301djr0d0cnsxs8c1wjndi6bf9vi5axz6mwjkv80cmfcv")))) (build-system gnu-build-system) (inputs `(("ncurses" ,ncurses) ("perl" ,perl))) -- cgit v1.2.3 From 4e3a7d84613e4caeca903a205f21707cff5819f7 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 23 Feb 2019 19:54:46 +0100 Subject: gnu: Python: Consolidate test patches. While at it, adjust patches for -p1 patch flag. * gnu/packages/patches/python-fix-tests.patch: Delete file. Move contents ... * gnu/packages/patches/python-3-fix-tests.patch: ... here. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/python.scm (python-3.7)[source](patches): Remove obsolete. [source](patch-flags): Remove. * gnu/packages/patches/python-3-deterministic-build-info.patch, gnu/packages/patches/python-3-search-paths.patch: Adjust for `patch -p1`. --- gnu/local.mk | 1 - .../python-3-deterministic-build-info.patch | 4 +- gnu/packages/patches/python-3-fix-tests.patch | 354 +++++++++++++++------ gnu/packages/patches/python-3-search-paths.patch | 4 +- gnu/packages/patches/python-fix-tests.patch | 147 --------- gnu/packages/python.scm | 2 - 6 files changed, 256 insertions(+), 256 deletions(-) delete mode 100644 gnu/packages/patches/python-fix-tests.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 0500a06b53..a1555fa224 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1173,7 +1173,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-axolotl-AES-fix.patch \ %D%/packages/patches/python-cairocffi-dlopen-path.patch \ %D%/packages/patches/python-cffi-x87-stack-clean.patch \ - %D%/packages/patches/python-fix-tests.patch \ %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \ %D%/packages/patches/python-configobj-setuptools.patch \ %D%/packages/patches/python-faker-fix-build-32bit.patch \ diff --git a/gnu/packages/patches/python-3-deterministic-build-info.patch b/gnu/packages/patches/python-3-deterministic-build-info.patch index 22c372a0cf..25a079fe90 100644 --- a/gnu/packages/patches/python-3-deterministic-build-info.patch +++ b/gnu/packages/patches/python-3-deterministic-build-info.patch @@ -2,8 +2,8 @@ Always provide the same date and time in 'Py_GetBuildInfo'. This is the information shown at the REPL and in 'sys.version'. We cannot pass it in CPPFLAGS due to whitespace in the DATE string. ---- Modules/getbuildinfo.c -+++ Modules/getbuildinfo.c +--- a/Modules/getbuildinfo.c ++++ b/Modules/getbuildinfo.c @@ -4,6 +4,10 @@ #include #endif diff --git a/gnu/packages/patches/python-3-fix-tests.patch b/gnu/packages/patches/python-3-fix-tests.patch index ab713c54dd..e4ba728a7e 100644 --- a/gnu/packages/patches/python-3-fix-tests.patch +++ b/gnu/packages/patches/python-3-fix-tests.patch @@ -1,9 +1,134 @@ -Additional test fixes which affect Python 3.5 (and presumably later) but not -prior revisions of Python. +See the discussion about the issues fixed here at: +http://bugs.python.org/issue20868 . ---- Lib/test/test_pathlib.py 2014-03-01 03:02:36.088311000 +0100 -+++ Lib/test/test_pathlib.py 2014-03-01 04:56:37.768311000 +0100 -@@ -2132,8 +2132,7 @@ +diff --git a/Lib/ctypes/test/test_callbacks.py b/Lib/ctypes/test/test_callbacks.py +--- a/Lib/ctypes/test/test_callbacks.py ++++ b/Lib/ctypes/test/test_callbacks.py +@@ -3,6 +3,7 @@ import unittest + from ctypes import * + from ctypes.test import need_symbol + import _ctypes_test ++import platform + + class Callbacks(unittest.TestCase): + functype = CFUNCTYPE +@@ -176,6 +177,8 @@ class SampleCallbacksTestCase(unittest.TestCase): + + self.assertLess(diff, 0.01, "%s not less than 0.01" % diff) + ++ @unittest.skipIf(platform.machine() in ['mips64'], ++ "This test fails on this platform") + def test_issue_8959_a(self): + from ctypes.util import find_library + libc_path = find_library("c") +diff --git a/Lib/ctypes/test/test_libc.py b/Lib/ctypes/test/test_libc.py +--- a/Lib/ctypes/test/test_libc.py ++++ b/Lib/ctypes/test/test_libc.py +@@ -2,6 +2,7 @@ import unittest + + from ctypes import * + import _ctypes_test ++import platform + + lib = CDLL(_ctypes_test.__file__) + +@@ -17,6 +18,8 @@ class LibTest(unittest.TestCase): + import math + self.assertEqual(lib.my_sqrt(2.0), math.sqrt(2.0)) + ++ @unittest.skipIf(platform.machine() in ['mips64'], ++ "This test fails on this platform") + def test_qsort(self): + comparefunc = CFUNCTYPE(c_int, POINTER(c_char), POINTER(c_char)) + lib.my_qsort.argtypes = c_void_p, c_size_t, c_size_t, comparefunc +diff --git a/Lib/distutils/tests/test_archive_util.py b/Lib/distutils/tests/test_archive_util.py +--- a/Lib/distutils/tests/test_archive_util.py ++++ b/Lib/distutils/tests/test_archive_util.py +@@ -333,6 +333,7 @@ class ArchiveUtilTestCase(support.TempdirManager, + self.assertEqual(os.path.basename(res), 'archive.tar.xz') + self.assertEqual(self._tarinfo(res), self._created_files) + ++ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") + def test_make_archive_owner_group(self): + # testing make_archive with owner and group, with various combinations + # this works even if there's not gid/uid support +@@ -362,6 +363,7 @@ class ArchiveUtilTestCase(support.TempdirManager, + + @unittest.skipUnless(ZLIB_SUPPORT, "Requires zlib") + @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") ++ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") + def test_tarfile_root_owner(self): + tmpdir = self._create_files() + base_name = os.path.join(self.mkdtemp(), 'archive') +diff --git a/Lib/distutils/tests/test_sdist.py b/Lib/distutils/tests/test_sdist.py +--- a/Lib/distutils/tests/test_sdist.py ++++ b/Lib/distutils/tests/test_sdist.py +@@ -443,6 +443,7 @@ class SDistTestCase(BasePyPIRCCommandTestCase): + "The tar command is not found") + @unittest.skipIf(find_executable('gzip') is None, + "The gzip command is not found") ++ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") + def test_make_distribution_owner_group(self): + # now building a sdist + dist, cmd = self.get_cmd() +diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py +--- a/Lib/test/_test_multiprocessing.py ++++ b/Lib/test/_test_multiprocessing.py +@@ -1473,6 +1473,7 @@ class _TestCondition(BaseTestCase): + if pid is not None: + os.kill(pid, signal.SIGINT) + ++ @unittest.skipIf(True, "This fails for unknown reasons on Guix") + def test_wait_result(self): + if isinstance(self, ProcessesMixin) and sys.platform != 'win32': + pid = os.getpid() +diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py +--- a/Lib/test/test_asyncio/test_base_events.py ++++ b/Lib/test/test_asyncio/test_base_events.py +@@ -1301,6 +1301,8 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase): + self._test_create_connection_ip_addr(m_socket, False) + + @patch_socket ++ @unittest.skipUnless(support.is_resource_enabled('network'), ++ 'network is not enabled') + def test_create_connection_service_name(self, m_socket): + m_socket.getaddrinfo = socket.getaddrinfo + sock = m_socket.socket.return_value +diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py +--- a/Lib/test/test_generators.py ++++ b/Lib/test/test_generators.py +@@ -34,6 +34,7 @@ class SignalAndYieldFromTest(unittest.TestCase): + else: + return "FAILED" + ++ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment') + def test_raise_and_yield_from(self): + gen = self.generator1() + gen.send(None) +diff --git a/Lib/test/test_normalization.py b/Lib/test/test_normalization.py +--- a/Lib/test/test_normalization.py ++++ b/Lib/test/test_normalization.py +@@ -2,6 +2,7 @@ from test.support import open_urlresource + import unittest + + from http.client import HTTPException ++from urllib.error import URLError + import sys + from unicodedata import normalize, unidata_version + +@@ -43,6 +44,8 @@ class NormalizationTest(unittest.TestCase): + except PermissionError: + self.skipTest(f"Permission error when downloading {TESTDATAURL} " + f"into the test data directory") ++ except URLError: ++ self.skipTest("DNS lookups are not enabled.") + except (OSError, HTTPException): + self.fail(f"Could not retrieve {TESTDATAURL}") + +diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py +--- a/Lib/test/test_pathlib.py ++++ b/Lib/test/test_pathlib.py +@@ -2130,8 +2130,7 @@ class PosixPathTest(_BasePathTest, unittest.TestCase): self.assertEqual(given, expect) self.assertEqual(set(p.rglob("FILEd*")), set()) @@ -13,47 +138,10 @@ prior revisions of Python. def test_expanduser(self): P = self.cls support.import_module('pwd') ---- Lib/test/test_tarfile.py 2016-02-24 19:22:52.597208055 +0000 -+++ Lib/test/test_tarfile.py 2016-02-24 20:50:48.941950135 +0000 -@@ -2305,11 +2305,14 @@ - try: - import pwd, grp - except ImportError: - return False -- if pwd.getpwuid(0)[0] != 'root': -- return False -- if grp.getgrgid(0)[0] != 'root': -+ try: -+ if pwd.getpwuid(0)[0] != 'root': -+ return False -+ if grp.getgrgid(0)[0] != 'root': -+ return False -+ except KeyError: - return False - return True - - ---- Lib/test/test_asyncio/test_base_events.py -+++ Lib/test/test_asyncio/test_base_events.py -@@ -1216,6 +1216,8 @@ - self._test_create_connection_ip_addr(m_socket, False) - - @patch_socket -+ @unittest.skipUnless(support.is_resource_enabled('network'), -+ 'network is not enabled') - def test_create_connection_service_name(self, m_socket): - m_socket.getaddrinfo = socket.getaddrinfo - sock = m_socket.socket.return_value - ---- Lib/test/test_pdb.py.org 2017-03-12 03:09:01.991856701 +0100 -+++ Lib/test/test_pdb.py 2017-03-12 03:26:17.742572869 +0100 - -For some reason, KeyboardInterrupts do not work in the build -environment (lack of controlling TTY?). Just change the expected -outcome. Unfortunately, this will make it fail for users running -`python -m test test_pdb test_pdb` interactively. - -@@ -928,11 +928,11 @@ +diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py +--- a/Lib/test/test_pdb.py ++++ b/Lib/test/test_pdb.py +@@ -1133,11 +1133,11 @@ def test_pdb_issue_20766(): > (6)test_function() -> print('pdb %d: %s' % (i, sess._previous_sigint_handler)) (Pdb) continue @@ -65,22 +153,100 @@ outcome. Unfortunately, this will make it fail for users running - pdb 2: + pdb 2: Handlers.SIG_IGN """ - - class PdbTestCase(unittest.TestCase): ---- Lib/test/test_socket.py -+++ Lib/test/test_socket.py -@@ -802,6 +802,8 @@ + + +diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py +--- a/Lib/test/test_regrtest.py ++++ b/Lib/test/test_regrtest.py +@@ -764,6 +764,7 @@ class ArgsTestCase(BaseTestCase): + output = self.run_tests('--fromfile', filename) + self.check_executed_tests(output, tests) + ++ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment.') + def test_interrupted(self): + code = TEST_INTERRUPTED + test = self.create_test('sigint', code=code) +@@ -781,6 +782,7 @@ class ArgsTestCase(BaseTestCase): + % (self.TESTNAME_REGEX, len(tests))) + self.check_line(output, regex) + ++ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment.') + def test_slow_interrupted(self): + # Issue #25373: test --slowest with an interrupted test + code = TEST_INTERRUPTED +diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py +--- a/Lib/test/test_resource.py ++++ b/Lib/test/test_resource.py +@@ -145,6 +145,7 @@ class ResourceTest(unittest.TestCase): + + @unittest.skipUnless(hasattr(resource, 'prlimit'), 'no prlimit') + @support.requires_linux_version(2, 6, 36) ++ @unittest.skipIf(True, "Bug: the PermissionError is not raised") + def test_prlimit(self): + self.assertRaises(TypeError, resource.prlimit) + self.assertRaises(ProcessLookupError, resource.prlimit, +diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py +--- a/Lib/test/test_shutil.py ++++ b/Lib/test/test_shutil.py +@@ -1135,6 +1135,7 @@ class TestShutil(unittest.TestCase): + self.assertRaises(ValueError, make_archive, base_name, 'xxx') + + @support.requires_zlib ++ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") + def test_make_archive_owner_group(self): + # testing make_archive with owner and group, with various combinations + # this works even if there's not gid/uid support +@@ -1163,6 +1164,7 @@ class TestShutil(unittest.TestCase): + + + @support.requires_zlib ++ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") + @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") + def test_tarfile_root_owner(self): + root_dir, base_dir = self._create_files() +diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py +--- a/Lib/test/test_socket.py ++++ b/Lib/test/test_socket.py +@@ -875,6 +875,8 @@ class GeneralModuleTests(unittest.TestCase): if not fqhn in all_host_names: self.fail("Error testing host resolution mechanisms. (fqdn: %s, all: %s)" % (fqhn, repr(all_host_names))) + @unittest.skipUnless(support.is_resource_enabled('network'), + 'network is not enabled') def test_host_resolution(self): - for addr in [support.HOST, '10.0.0.1', '255.255.255.255']: + for addr in [support.HOSTv4, '10.0.0.1', '255.255.255.255']: self.assertEqual(socket.gethostbyname(addr), addr) ---- Lib/test/test_spwd.py -+++ Lib/test/test_spwd.py -@@ -5,8 +5,7 @@ +@@ -1004,6 +1006,8 @@ class GeneralModuleTests(unittest.TestCase): + self.assertWarns(DeprecationWarning, socket.ntohs, k) + self.assertWarns(DeprecationWarning, socket.htons, k) + ++ @unittest.skipUnless(os.path.exists("/etc/services"), ++ "getservbyname uses /etc/services, which is not in the chroot") + def testGetServBy(self): + eq = self.assertEqual + # Find one service that exists, then check all the related interfaces. +@@ -1358,6 +1362,8 @@ class GeneralModuleTests(unittest.TestCase): + raise + self.assertRaises(TypeError, s.ioctl, socket.SIO_LOOPBACK_FAST_PATH, None) + ++ @unittest.skipUnless(os.path.exists("/etc/gai.conf"), ++ "getaddrinfo() will fail") + def testGetaddrinfo(self): + try: + socket.getaddrinfo('localhost', 80) +@@ -1440,6 +1446,8 @@ class GeneralModuleTests(unittest.TestCase): + # only IP addresses are allowed + self.assertRaises(OSError, socket.getnameinfo, ('mail.python.org',0), 0) + ++ @unittest.skipUnless(os.path.exists("/etc/gai.conf"), ++ "getaddrinfo() will fail") + @unittest.skipUnless(support.is_resource_enabled('network'), + 'network is not enabled') + def test_idna(self): +diff --git a/Lib/test/test_spwd.py b/Lib/test/test_spwd.py +--- a/Lib/test/test_spwd.py ++++ b/Lib/test/test_spwd.py +@@ -5,8 +5,7 @@ from test import support spwd = support.import_module('spwd') @@ -90,7 +256,7 @@ outcome. Unfortunately, this will make it fail for users running class TestSpwdRoot(unittest.TestCase): def test_getspall(self): -@@ -56,8 +55,7 @@ +@@ -56,8 +55,7 @@ class TestSpwdRoot(unittest.TestCase): self.assertRaises(TypeError, spwd.getspnam, bytes_name) @@ -100,50 +266,34 @@ outcome. Unfortunately, this will make it fail for users running class TestSpwdNonRoot(unittest.TestCase): def test_getspnam_exception(self): ---- Lib/test/test_regrtest.py -+++ Lib/test/test_regrtest.py -@@ -700,6 +700,7 @@ - output = self.run_tests('--fromfile', filename) - self.check_executed_tests(output, tests) - -+ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment.') - def test_interrupted(self): - code = TEST_INTERRUPTED - test = self.create_test('sigint', code=code) -@@ -717,6 +718,7 @@ - % (self.TESTNAME_REGEX, len(tests))) - self.check_line(output, regex) - -+ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment.') - def test_slow_interrupted(self): - # Issue #25373: test --slowest with an interrupted test - code = TEST_INTERRUPTED ---- Lib/test/test_generators.py -+++ Lib/test/test_generators.py -@@ -29,6 +29,7 @@ - else: - return "FAILED" - -+ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment') - def test_raise_and_yield_from(self): - gen = self.generator1() - gen.send(None) ---- Lib/test/test_normalization.py -+++ Lib/test/test_normalization.py -@@ -2,6 +2,7 @@ - import unittest - - from http.client import HTTPException -+from urllib.error import URLError - import sys - from unicodedata import normalize, unidata_version - -@@ -43,6 +44,8 @@ - except PermissionError: - self.skipTest(f"Permission error when downloading {TESTDATAURL} " - f"into the test data directory") -+ except URLError: -+ self.skipTest("DNS lookups are not enabled.") - except (OSError, HTTPException): - self.fail(f"Could not retrieve {TESTDATAURL}") +diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py +--- a/Lib/test/test_tarfile.py ++++ b/Lib/test/test_tarfile.py +@@ -2504,9 +2504,12 @@ def root_is_uid_gid_0(): + import pwd, grp + except ImportError: + return False +- if pwd.getpwuid(0)[0] != 'root': +- return False +- if grp.getgrgid(0)[0] != 'root': ++ try: ++ if pwd.getpwuid(0)[0] != 'root': ++ return False ++ if grp.getgrgid(0)[0] != 'root': ++ return False ++ except KeyError: + return False + return True +diff --git a/Tools/scripts/run_tests.py b/Tools/scripts/run_tests.py +--- a/Tools/scripts/run_tests.py ++++ b/Tools/scripts/run_tests.py +@@ -39,7 +39,7 @@ def main(regrtest_args): + if not any(is_multiprocess_flag(arg) for arg in regrtest_args): + args.extend(['-j', '0']) # Use all CPU cores + if not any(is_resource_use_flag(arg) for arg in regrtest_args): +- args.extend(['-u', 'all,-largefile,-audio,-gui']) ++ args.extend(['-u', 'all,-largefile,-audio,-gui,-network']) + args.extend(regrtest_args) + print(' '.join(args)) + if sys.platform == 'win32': diff --git a/gnu/packages/patches/python-3-search-paths.patch b/gnu/packages/patches/python-3-search-paths.patch index c824705633..5fea9c66b6 100644 --- a/gnu/packages/patches/python-3-search-paths.patch +++ b/gnu/packages/patches/python-3-search-paths.patch @@ -1,8 +1,8 @@ Make sure the build system honors CPATH and LIBRARY_PATH when looking for headers and libraries. ---- setup.py 2015-10-07 23:32:58.891329173 +0200 -+++ setup.py 2015-10-07 23:46:29.653349924 +0200 +--- a/setup.py 2015-10-07 23:32:58.891329173 +0200 ++++ b/setup.py 2015-10-07 23:46:29.653349924 +0200 @@ -575,8 +575,8 @@ # if a file is found in one of those directories, it can # be assumed that no additional -I,-L directives are needed. diff --git a/gnu/packages/patches/python-fix-tests.patch b/gnu/packages/patches/python-fix-tests.patch deleted file mode 100644 index d8f69866fd..0000000000 --- a/gnu/packages/patches/python-fix-tests.patch +++ /dev/null @@ -1,147 +0,0 @@ -See the discussion about the issues fixed here at: -http://bugs.python.org/issue20868 . - ---- Lib/test/test_shutil.py 2014-03-01 03:02:36.088311000 +0100 -+++ Lib/test/test_shutil.py 2014-03-01 04:56:37.768311000 +0100 -@@ -1127,6 +1127,7 @@ - self.assertRaises(ValueError, make_archive, base_name, 'xxx') - - @support.requires_zlib -+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") - def test_make_archive_owner_group(self): - # testing make_archive with owner and group, with various combinations - # this works even if there's not gid/uid support -@@ -1155,6 +1156,7 @@ - - - @support.requires_zlib -+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") - @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") - def test_tarfile_root_owner(self): - root_dir, base_dir = self._create_files() ---- Lib/test/test_socket.py.orig 2014-03-02 22:14:12.264311000 +0100 -+++ Lib/test/test_socket.py 2014-03-21 03:50:45.660311000 +0100 -@@ -819,6 +819,8 @@ - self.assertRaises(OverflowError, socket.htonl, k) - self.assertRaises(OverflowError, socket.htons, k) - -+ @unittest.skipUnless(os.path.exists("/etc/services"), -+ "getservbyname uses /etc/services, which is not in the chroot") - def testGetServBy(self): - eq = self.assertEqual - # Find one service that exists, then check all the related interfaces. -@@ -1104,6 +1106,8 @@ - self.assertRaises(ValueError, s.ioctl, -1, None) - s.ioctl(socket.SIO_KEEPALIVE_VALS, (1, 100, 100)) - -+ @unittest.skipUnless(os.path.exists("/etc/gai.conf"), -+ "getaddrinfo() will fail") - def testGetaddrinfo(self): - try: - socket.getaddrinfo('localhost', 80) -@@ -1174,6 +1178,8 @@ - # only IP addresses are allowed - self.assertRaises(socket.error, socket.getnameinfo, ('mail.python.org',0), 0) - -+ @unittest.skipUnless(os.path.exists("/etc/gai.conf"), -+ "getaddrinfo() will fail") - @unittest.skipUnless(support.is_resource_enabled('network'), - 'network is not enabled') - def test_idna(self): ---- Lib/test/_test_multiprocessing.py 2014-04-06 23:12:27.575235000 +0200 -+++ Lib/test/_test_multiprocessing.py 2014-04-06 23:13:04.827235000 +0200 -@@ -1016,6 +1016,7 @@ - if pid is not None: - os.kill(pid, signal.SIGINT) - -+ @unittest.skipIf(True, "This fails for unknown reasons on Guix") - def test_wait_result(self): - if isinstance(self, ProcessesMixin) and sys.platform != 'win32': - pid = os.getpid() ---- Lib/ctypes/test/test_libc.py 2014-04-07 23:17:41.351235000 +0200 -+++ Lib/ctypes/test/test_libc.py 2014-04-07 23:32:18.799235000 +0200 -@@ -2,6 +2,7 @@ - - from ctypes import * - import _ctypes_test -+import platform - - lib = CDLL(_ctypes_test.__file__) - -@@ -17,6 +18,8 @@ - import math - self.assertEqual(lib.my_sqrt(2.0), math.sqrt(2.0)) - -+ @unittest.skipIf(platform.machine() in ['mips64'], -+ "This test fails on this platform") - def test_qsort(self): - comparefunc = CFUNCTYPE(c_int, POINTER(c_char), POINTER(c_char)) - lib.my_qsort.argtypes = c_void_p, c_size_t, c_size_t, comparefunc ---- Lib/ctypes/test/test_callbacks.py 2014-04-07 23:15:42.835235000 +0200 -+++ Lib/ctypes/test/test_callbacks.py 2014-04-07 23:32:42.035235000 +0200 -@@ -1,6 +1,7 @@ - import unittest - from ctypes import * - import _ctypes_test -+import platform - - class Callbacks(unittest.TestCase): - functype = CFUNCTYPE -@@ -174,6 +175,8 @@ - - self.assertLess(diff, 0.01, "%s not less than 0.01" % diff) - -+ @unittest.skipIf(platform.machine() in ['mips64'], -+ "This test fails on this platform") - def test_issue_8959_a(self): - from ctypes.util import find_library - libc_path = find_library("c") ---- Tools/scripts/run_tests.py.orig 2015-04-06 03:52:17.484000000 +0200 -+++ Tools/scripts/run_tests.py 2015-04-06 03:52:25.880000000 +0200 -@@ -47,7 +47,7 @@ - if threading and not any(is_multiprocess_flag(arg) for arg in regrtest_args): - args.extend(['-j', '0']) # Use all CPU cores - if not any(is_resource_use_flag(arg) for arg in regrtest_args): -- args.extend(['-u', 'all,-largefile,-audio,-gui']) -+ args.extend(['-u', 'all,-largefile,-audio,-gui,-network']) - args.extend(regrtest_args) - print(' '.join(args)) - os.execv(sys.executable, args) ---- Lib/distutils/tests/test_archive_util.py.orig 2015-04-06 04:08:49.288000000 +0200 -+++ Lib/distutils/tests/test_archive_util.py 2015-04-06 04:09:34.396000000 +0200 -@@ -282,6 +282,7 @@ - finally: - del ARCHIVE_FORMATS['xxx'] - -+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") - def test_make_archive_owner_group(self): - # testing make_archive with owner and group, with various combinations - # this works even if there's not gid/uid support -@@ -310,6 +311,7 @@ - - @unittest.skipUnless(ZLIB_SUPPORT, "Requires zlib") - @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") -+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") - def test_tarfile_root_owner(self): - tmpdir, tmpdir2, base_name = self._create_files() - old_dir = os.getcwd() ---- Lib/distutils/tests/test_sdist.py.orig 2015-04-06 04:10:05.264000000 +0200 -+++ Lib/distutils/tests/test_sdist.py 2015-04-06 04:10:21.448000000 +0200 -@@ -435,6 +435,7 @@ - "The tar command is not found") - @unittest.skipIf(find_executable('gzip') is None, - "The gzip command is not found") -+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") - def test_make_distribution_owner_group(self): - # now building a sdist - dist, cmd = self.get_cmd() ---- Lib/test/test_resource.py.orig 2015-04-06 21:30:24.708000000 +0200 -+++ Lib/test/test_resource.py 2015-04-06 23:07:27.220000000 +0200 -@@ -146,6 +146,7 @@ - - @unittest.skipUnless(hasattr(resource, 'prlimit'), 'no prlimit') - @support.requires_linux_version(2, 6, 36) -+ @unittest.skipIf(True, "Bug: the PermissionError is not raised") - def test_prlimit(self): - self.assertRaises(TypeError, resource.prlimit) - if os.geteuid() != 0: diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 057c47706b..9ed16d447e 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -307,11 +307,9 @@ data types.") (uri (string-append "https://www.python.org/ftp/python/" version "/Python-" version ".tar.xz")) (patches (search-patches - "python-fix-tests.patch" "python-3-fix-tests.patch" "python-3-deterministic-build-info.patch" "python-3-search-paths.patch")) - (patch-flags '("-p0")) (sha256 (base32 "1fzi9d2gibh0wzwidyckzbywsxcsbckgsl05ryxlifxia77fhgyq")) -- cgit v1.2.3 From e02671939bcc4a38e13f68f58d4cb531150dde81 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 1 Mar 2019 16:02:16 +0100 Subject: gnu: acl: Update to 2.2.53. * gnu/packages/patches/acl-hurd-path-max.patch, gnu/packages/patches/acl-fix-perl-regex.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/acl.scm (acl): Update to 2.2.53. [source](uri): Adjust for renamed tarball. [arguments]: Remove #:test-target. Adjust disabled tests. Don't override install phase. --- gnu/local.mk | 2 - gnu/packages/acl.scm | 24 ++++---- gnu/packages/patches/acl-fix-perl-regex.patch | 22 -------- gnu/packages/patches/acl-hurd-path-max.patch | 80 --------------------------- 4 files changed, 10 insertions(+), 118 deletions(-) delete mode 100644 gnu/packages/patches/acl-fix-perl-regex.patch delete mode 100644 gnu/packages/patches/acl-hurd-path-max.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 98074678ec..bcdb716c41 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -627,8 +627,6 @@ dist_patch_DATA = \ %D%/packages/patches/a2ps-CVE-2014-0466.patch \ %D%/packages/patches/abiword-explictly-cast-bools.patch \ %D%/packages/patches/abiword-black-drawing-with-gtk322.patch \ - %D%/packages/patches/acl-fix-perl-regex.patch \ - %D%/packages/patches/acl-hurd-path-max.patch \ %D%/packages/patches/adb-add-libraries.patch \ %D%/packages/patches/aegis-constness-error.patch \ %D%/packages/patches/aegis-perl-tempdir1.patch \ diff --git a/gnu/packages/acl.scm b/gnu/packages/acl.scm index 8d5f0117f5..0131adcac4 100644 --- a/gnu/packages/acl.scm +++ b/gnu/packages/acl.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2014 Andreas Enge ;;; Copyright © 2017 Efraim Flashner ;;; Copyright © 2018 Ricardo Wurmus +;;; Copyright © 2019 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,21 +35,18 @@ (define-public acl (package (name "acl") - (version "2.2.52") + (version "2.2.53") (source (origin (method url-fetch) (uri (string-append "mirror://savannah/acl/acl-" - version ".src.tar.gz")) + version ".tar.gz")) (sha256 (base32 - "08qd9s3wfhv0ajswsylnfwr5h0d7j9d4rgip855nrh400nxp940p")) - (patches (search-patches "acl-fix-perl-regex.patch" - "acl-hurd-path-max.patch")))) + "1ir6my3w74s6nfbgbqgzj6w570sn0qjf3524zx8xh67lqrjrigh6")))) (build-system gnu-build-system) (arguments - `(#:test-target "tests" - #:modules ((ice-9 ftw) + `(#:modules ((ice-9 ftw) ,@%gnu-build-system-modules) #:phases (modify-phases %standard-phases @@ -75,13 +73,11 @@ (("\\| sed.*'") "")) ;; These tests require the existence of a user named "bin", but ;; this user does not exist within Guix's build environment. - (for-each (lambda (file) - (delete-file (string-append "test/" file))) - '("setfacl-X.test" "cp.test" "misc.test")) - #t)) - (replace 'install - (lambda _ - (invoke "make" "install" "install-lib" "install-dev")))))) + (substitute* "Makefile.in" + ((".*test/misc\\.test.*") "") + ((".*test/cp\\.test.*") "") + ((".*test/setfacl-X\\.test.*") "")) + #t))))) (inputs `(("attr" ,attr))) (native-inputs `(("gettext" ,gettext-minimal) diff --git a/gnu/packages/patches/acl-fix-perl-regex.patch b/gnu/packages/patches/acl-fix-perl-regex.patch deleted file mode 100644 index f682abc058..0000000000 --- a/gnu/packages/patches/acl-fix-perl-regex.patch +++ /dev/null @@ -1,22 +0,0 @@ -This can be removed with the next acl release - ---- - test/run | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/run b/test/run -index 2cf52e8..4627cd2 100755 ---- a/test/run -+++ b/test/run -@@ -70,7 +70,7 @@ for (;;) { - if (defined $line) { - # Substitute %VAR and %{VAR} with environment variables. - $line =~ s[%(\w+)][$ENV{$1}]eg; -- $line =~ s[%{(\w+)}][$ENV{$1}]eg; -+ $line =~ s[%\{(\w+)\}][$ENV{$1}]eg; - } - if (defined $line) { - if ($line =~ s/^\s*< ?//) { --- -2.15.0 - diff --git a/gnu/packages/patches/acl-hurd-path-max.patch b/gnu/packages/patches/acl-hurd-path-max.patch deleted file mode 100644 index 89cb3a38d7..0000000000 --- a/gnu/packages/patches/acl-hurd-path-max.patch +++ /dev/null @@ -1,80 +0,0 @@ -http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636512 - -From: Svante Signell -Subject: acl: Fix FTBFS on hurd-i386 -Date: Wed, 03 Aug 2011 19:36:27 +0200 - -Currently acl does not compile on hurd-i386. The problem is a PATH_MAX -definition which is not supported on GNU/Hurd. - -Index: acl-2.2.52/setfacl/parse.c -=================================================================== ---- acl-2.2.52/setfacl/parse.c -+++ acl-2.2.52/setfacl/parse.c -@@ -419,7 +419,13 @@ read_acl_comments( - bytes for "# file: ". Not a good solution but for now it is the - best I can do without too much impact on the code. [tw] - */ -+ -+#ifdef __GNU__ -+ char *linebuf; -+ size_t dummy = 0; -+#else - char linebuf[(4*PATH_MAX)+9]; -+#endif - char *cp; - char *p; - int comments_read = 0; -@@ -449,9 +455,13 @@ read_acl_comments( - if (line) - (*line)++; - -+#ifdef __GNU__ -+ if (getline(&linebuf, &dummy, file) == -1) -+ break; -+#else - if (fgets(linebuf, sizeof(linebuf), file) == NULL) - break; -- -+#endif - comments_read = 1; - - p = strrchr(linebuf, '\0'); -@@ -473,7 +483,12 @@ read_acl_comments( - goto fail; - *path_p = (char*)malloc(strlen(cp)+1); - if (!*path_p) -+ { -+#ifdef __GNU__ -+ free (linebuf); -+#endif - return -1; -+ } - strcpy(*path_p, cp); - } - } else if (strncmp(cp, "owner:", 6) == 0) { -@@ -522,13 +537,24 @@ read_acl_comments( - } - } - if (ferror(file)) -+ { -+#ifdef __GNU__ -+ free (linebuf); -+#endif - return -1; -+ } -+#ifdef __GNU__ -+ free (linebuf); -+#endif - return comments_read; - fail: - if (path_p && *path_p) { - free(*path_p); - *path_p = NULL; - } -+#ifdef __GNU__ -+ free (linebuf); -+#endif - return -EINVAL; - } - -- cgit v1.2.3 From ed709ee954817486a5021b182b539dafa80549fb Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 4 Mar 2019 13:02:05 +0100 Subject: gnu: Python@2: Update to 2.7.16. * gnu/packages/patches/python2-CVE-2018-1000802.patch, gnu/packages/patches/python2-CVE-2018-14647.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/python.scm (python-2.7): Update to 2.7.16. [source](patches): Remove obsolete. --- gnu/local.mk | 2 - .../patches/python2-CVE-2018-1000802.patch | 47 ----------------- gnu/packages/patches/python2-CVE-2018-14647.patch | 61 ---------------------- gnu/packages/python.scm | 8 ++- 4 files changed, 3 insertions(+), 115 deletions(-) delete mode 100644 gnu/packages/patches/python2-CVE-2018-1000802.patch delete mode 100644 gnu/packages/patches/python2-CVE-2018-14647.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 52df157a95..64d4324607 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1161,8 +1161,6 @@ dist_patch_DATA = \ %D%/packages/patches/pygpgme-disable-problematic-tests.patch \ %D%/packages/patches/pyqt-configure.patch \ %D%/packages/patches/pyqt-public-sip.patch \ - %D%/packages/patches/python2-CVE-2018-14647.patch \ - %D%/packages/patches/python2-CVE-2018-1000802.patch \ %D%/packages/patches/python-2-deterministic-build-info.patch \ %D%/packages/patches/python-2.7-adjust-tests.patch \ %D%/packages/patches/python-2.7-search-paths.patch \ diff --git a/gnu/packages/patches/python2-CVE-2018-1000802.patch b/gnu/packages/patches/python2-CVE-2018-1000802.patch deleted file mode 100644 index 0d5bc77c84..0000000000 --- a/gnu/packages/patches/python2-CVE-2018-1000802.patch +++ /dev/null @@ -1,47 +0,0 @@ -Fix CVE-2018-1000802: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000802 - -Taken from upstream commit (sans NEWS): -https://github.com/python/cpython/commit/d8b103b8b3ef9644805341216963a64098642435 - -diff --git a/Lib/shutil.py b/Lib/shutil.py -index 3462f7c5e9..0ab1a06f52 100644 ---- a/Lib/shutil.py -+++ b/Lib/shutil.py -@@ -413,17 +413,21 @@ def _make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0, - - return archive_name - --def _call_external_zip(base_dir, zip_filename, verbose=False, dry_run=False): -+def _call_external_zip(base_dir, zip_filename, verbose, dry_run, logger): - # XXX see if we want to keep an external call here - if verbose: - zipoptions = "-r" - else: - zipoptions = "-rq" -- from distutils.errors import DistutilsExecError -- from distutils.spawn import spawn -+ cmd = ["zip", zipoptions, zip_filename, base_dir] -+ if logger is not None: -+ logger.info(' '.join(cmd)) -+ if dry_run: -+ return -+ import subprocess - try: -- spawn(["zip", zipoptions, zip_filename, base_dir], dry_run=dry_run) -- except DistutilsExecError: -+ subprocess.check_call(cmd) -+ except subprocess.CalledProcessError: - # XXX really should distinguish between "couldn't find - # external 'zip' command" and "zip failed". - raise ExecError, \ -@@ -458,7 +462,7 @@ def _make_zipfile(base_name, base_dir, verbose=0, dry_run=0, logger=None): - zipfile = None - - if zipfile is None: -- _call_external_zip(base_dir, zip_filename, verbose, dry_run) -+ _call_external_zip(base_dir, zip_filename, verbose, dry_run, logger) - else: - if logger is not None: - logger.info("creating '%s' and adding '%s' to it", diff --git a/gnu/packages/patches/python2-CVE-2018-14647.patch b/gnu/packages/patches/python2-CVE-2018-14647.patch deleted file mode 100644 index 6226b06aca..0000000000 --- a/gnu/packages/patches/python2-CVE-2018-14647.patch +++ /dev/null @@ -1,61 +0,0 @@ -Fix CVE-2018-14647: -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-14647 -https://bugs.python.org/issue34623 - -Taken from upstream: -https://github.com/python/cpython/commit/18b20bad75b4ff0486940fba4ec680e96e70f3a2 - -diff --git a/Include/pyexpat.h b/Include/pyexpat.h -index 5340ef5fa3..3fc5fa54da 100644 ---- a/Include/pyexpat.h -+++ b/Include/pyexpat.h -@@ -3,7 +3,7 @@ - - /* note: you must import expat.h before importing this module! */ - --#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.0" -+#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.1" - #define PyExpat_CAPSULE_NAME "pyexpat.expat_CAPI" - - struct PyExpat_CAPI -@@ -43,6 +43,8 @@ struct PyExpat_CAPI - XML_Parser parser, XML_UnknownEncodingHandler handler, - void *encodingHandlerData); - void (*SetUserData)(XML_Parser parser, void *userData); -+ /* might be none for expat < 2.1.0 */ -+ int (*SetHashSalt)(XML_Parser parser, unsigned long hash_salt); - /* always add new stuff to the end! */ - }; - -diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c -index f7f992dd3a..b38e0ab329 100644 ---- a/Modules/_elementtree.c -+++ b/Modules/_elementtree.c -@@ -2574,6 +2574,11 @@ xmlparser(PyObject* self_, PyObject* args, PyObject* kw) - PyErr_NoMemory(); - return NULL; - } -+ /* expat < 2.1.0 has no XML_SetHashSalt() */ -+ if (EXPAT(SetHashSalt) != NULL) { -+ EXPAT(SetHashSalt)(self->parser, -+ (unsigned long)_Py_HashSecret.prefix); -+ } - - ALLOC(sizeof(XMLParserObject), "create expatparser"); - -diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c -index 2b4d31293c..1f8c0d70a5 100644 ---- a/Modules/pyexpat.c -+++ b/Modules/pyexpat.c -@@ -2042,6 +2042,11 @@ MODULE_INITFUNC(void) - capi.SetProcessingInstructionHandler = XML_SetProcessingInstructionHandler; - capi.SetUnknownEncodingHandler = XML_SetUnknownEncodingHandler; - capi.SetUserData = XML_SetUserData; -+#if XML_COMBINED_VERSION >= 20100 -+ capi.SetHashSalt = XML_SetHashSalt; -+#else -+ capi.SetHashSalt = NULL; -+#endif - - /* export using capsule */ - capi_object = PyCapsule_New(&capi, PyExpat_CAPSULE_NAME, NULL); diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 9ed16d447e..0a483fb1db 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -94,7 +94,7 @@ (define-public python-2.7 (package (name "python2") - (version "2.7.15") + (version "2.7.16") (source (origin (method url-fetch) @@ -102,14 +102,12 @@ version "/Python-" version ".tar.xz")) (sha256 (base32 - "0x2mvz9dp11wj7p5ccvmk9s0hzjk2fa1m462p395l4r6bfnb3n92")) + "1mqfcqp5y8r0bfyr7ppl74n0lig45p9mc4b8adlcpvj74rhfy8pj")) (patches (search-patches "python-2.7-search-paths.patch" "python-2-deterministic-build-info.patch" "python-2.7-site-prefixes.patch" "python-2.7-source-date-epoch.patch" - "python-2.7-adjust-tests.patch" - "python2-CVE-2018-14647.patch" - "python2-CVE-2018-1000802.patch")) + "python-2.7-adjust-tests.patch")) (modules '((guix build utils))) ;; suboptimal to delete failing tests here, but if we delete them in the ;; arguments then we need to make sure to strip out that phase when it -- cgit v1.2.3 From 1a246c01c6d573b6226fd273f648d231e6ec38f1 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 4 Mar 2019 18:13:18 +0100 Subject: gnu: python-pytest: Update to 4.3.0. * gnu/packages/patches/python-pytest-pluggy-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/check.scm (python-pytest): Update to 4.3.0. [source](patches): New field. [arguments]: Skip five new tests. Disable tests by passing them as arguments. --- gnu/local.mk | 1 + gnu/packages/check.scm | 32 ++++++----- .../patches/python-pytest-pluggy-compat.patch | 64 ++++++++++++++++++++++ 3 files changed, 83 insertions(+), 14 deletions(-) create mode 100644 gnu/packages/patches/python-pytest-pluggy-compat.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 64d4324607..de352884a1 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1182,6 +1182,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \ %D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \ + %D%/packages/patches/python-pytest-pluggy-compat.patch \ %D%/packages/patches/python2-subprocess32-disable-input-test.patch \ %D%/packages/patches/python-unittest2-python3-compat.patch \ %D%/packages/patches/python-unittest2-remove-argparse.patch \ diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 03e6c5fcd0..20132492a7 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -660,31 +660,35 @@ standard library.") (define-public python-pytest (package (name "python-pytest") - (version "3.8.0") + (version "4.3.0") (source (origin (method url-fetch) (uri (pypi-uri "pytest" version)) + (patches (search-patches "python-pytest-pluggy-compat.patch")) (sha256 (base32 - "17grcfvd6ggvvqmprwv5y8g319nayam70hr43ssjwj40ws27z858")))) + "077gzimi9xiiyzpc3xjpb5yfgz038xkldg91mmbdvzr7z15isyh6")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases - (add-before 'check 'disable-invalid-tests + (replace 'check (lambda _ - ;; Some tests involves the /usr directory, and fails. - (substitute* "testing/test_argcomplete.py" - (("def test_remove_dir_prefix\\(self\\):") - "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")) - (substitute* "testing/test_argcomplete.py" - (("def test_remove_dir_prefix" line) - (string-append "@pytest.mark.skip" - "(reason=\"Assumes that /usr exists.\")\n " - line))) - #t)) - (replace 'check (lambda _ (invoke "pytest" "-vv")))))) + (invoke "pytest" "-vv" "-k" + (string-append + ;; These tests involve the /usr directory, and fails. + "not test_remove_dir_prefix" + " and not test_argcomplete" + ;; This test tries to override PYTHONPATH, and + ;; subsequently fails to locate the test libraries. + " and not test_collection" + ;; These tests fail when run in verbose mode: + ;; . + " and not test_dont_rewrite_if_hasattr_fails" + " and not test_len" + " and not test_custom_repr" + " and not test_name"))))))) (propagated-inputs `(("python-atomicwrites" ,python-atomicwrites) ("python-attrs" ,python-attrs-bootstrap) diff --git a/gnu/packages/patches/python-pytest-pluggy-compat.patch b/gnu/packages/patches/python-pytest-pluggy-compat.patch new file mode 100644 index 0000000000..ac33b862e6 --- /dev/null +++ b/gnu/packages/patches/python-pytest-pluggy-compat.patch @@ -0,0 +1,64 @@ +Fix test failures when built against Pluggy 0.9. + +Taken from this upstream commit: +https://github.com/pytest-dev/pytest/commit/a68f4fd2b9e99c82476d0e04ebcf561aeddbcb2e + +diff --git a/testing/test_assertion.py b/testing/test_assertion.py +index b659233eb..e4fe56c6f 100644 +--- a/testing/test_assertion.py ++++ b/testing/test_assertion.py +@@ -209,7 +209,7 @@ def load(self, require=True, *args, **kwargs): + import spamplugin + return spamplugin + +- def iter_entry_points(name): ++ def iter_entry_points(group, name=None): + yield DummyEntryPoint() + + pkg_resources.iter_entry_points = iter_entry_points +diff --git a/testing/test_config.py b/testing/test_config.py +index f9f22a63e..1e29b83f1 100644 +--- a/testing/test_config.py ++++ b/testing/test_config.py +@@ -514,8 +514,8 @@ def test_preparse_ordering_with_setuptools(testdir, monkeypatch): + pkg_resources = pytest.importorskip("pkg_resources") + monkeypatch.delenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD", raising=False) + +- def my_iter(name): +- assert name == "pytest11" ++ def my_iter(group, name=None): ++ assert group == "pytest11" + + class Dist(object): + project_name = "spam" +@@ -552,8 +552,8 @@ def test_setuptools_importerror_issue1479(testdir, monkeypatch): + pkg_resources = pytest.importorskip("pkg_resources") + monkeypatch.delenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD", raising=False) + +- def my_iter(name): +- assert name == "pytest11" ++ def my_iter(group, name=None): ++ assert group == "pytest11" + + class Dist(object): + project_name = "spam" +@@ -583,8 +583,8 @@ def test_plugin_preparse_prevents_setuptools_loading(testdir, monkeypatch, block + + plugin_module_placeholder = object() + +- def my_iter(name): +- assert name == "pytest11" ++ def my_iter(group, name=None): ++ assert group == "pytest11" + + class Dist(object): + project_name = "spam" +@@ -621,7 +621,7 @@ def load(self): + def test_disable_plugin_autoload(testdir, monkeypatch, parse_args, should_load): + pkg_resources = pytest.importorskip("pkg_resources") + +- def my_iter(name): ++ def my_iter(group, name=None): + raise AssertionError("Should not be called") + + class PseudoPlugin(object): -- cgit v1.2.3 From f882f62c6bdef79f0348f1cdfe7a727f44a9cc63 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 23 Mar 2019 19:29:11 +0100 Subject: gnu: python-pytest: Update to 4.3.1. * gnu/packages/check.scm (python-pytest): Update to 4.3.1. [source](patches): Remove. * gnu/packages/patches/python-pytest-pluggy-compat.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/check.scm | 5 +- .../patches/python-pytest-pluggy-compat.patch | 64 ---------------------- 3 files changed, 2 insertions(+), 68 deletions(-) delete mode 100644 gnu/packages/patches/python-pytest-pluggy-compat.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index e936343918..41f42e588f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1188,7 +1188,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \ %D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \ - %D%/packages/patches/python-pytest-pluggy-compat.patch \ %D%/packages/patches/python2-subprocess32-disable-input-test.patch \ %D%/packages/patches/python-unittest2-python3-compat.patch \ %D%/packages/patches/python-unittest2-remove-argparse.patch \ diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 69fe278728..186f4ba09a 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -684,15 +684,14 @@ standard library.") (define-public python-pytest (package (name "python-pytest") - (version "4.3.0") + (version "4.3.1") (source (origin (method url-fetch) (uri (pypi-uri "pytest" version)) - (patches (search-patches "python-pytest-pluggy-compat.patch")) (sha256 (base32 - "077gzimi9xiiyzpc3xjpb5yfgz038xkldg91mmbdvzr7z15isyh6")))) + "08q58ad8vaxyb57ll8m611yb4xwzzhp09kxafmyqrrps6cnalbjr")))) (build-system python-build-system) (arguments `(#:phases diff --git a/gnu/packages/patches/python-pytest-pluggy-compat.patch b/gnu/packages/patches/python-pytest-pluggy-compat.patch deleted file mode 100644 index ac33b862e6..0000000000 --- a/gnu/packages/patches/python-pytest-pluggy-compat.patch +++ /dev/null @@ -1,64 +0,0 @@ -Fix test failures when built against Pluggy 0.9. - -Taken from this upstream commit: -https://github.com/pytest-dev/pytest/commit/a68f4fd2b9e99c82476d0e04ebcf561aeddbcb2e - -diff --git a/testing/test_assertion.py b/testing/test_assertion.py -index b659233eb..e4fe56c6f 100644 ---- a/testing/test_assertion.py -+++ b/testing/test_assertion.py -@@ -209,7 +209,7 @@ def load(self, require=True, *args, **kwargs): - import spamplugin - return spamplugin - -- def iter_entry_points(name): -+ def iter_entry_points(group, name=None): - yield DummyEntryPoint() - - pkg_resources.iter_entry_points = iter_entry_points -diff --git a/testing/test_config.py b/testing/test_config.py -index f9f22a63e..1e29b83f1 100644 ---- a/testing/test_config.py -+++ b/testing/test_config.py -@@ -514,8 +514,8 @@ def test_preparse_ordering_with_setuptools(testdir, monkeypatch): - pkg_resources = pytest.importorskip("pkg_resources") - monkeypatch.delenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD", raising=False) - -- def my_iter(name): -- assert name == "pytest11" -+ def my_iter(group, name=None): -+ assert group == "pytest11" - - class Dist(object): - project_name = "spam" -@@ -552,8 +552,8 @@ def test_setuptools_importerror_issue1479(testdir, monkeypatch): - pkg_resources = pytest.importorskip("pkg_resources") - monkeypatch.delenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD", raising=False) - -- def my_iter(name): -- assert name == "pytest11" -+ def my_iter(group, name=None): -+ assert group == "pytest11" - - class Dist(object): - project_name = "spam" -@@ -583,8 +583,8 @@ def test_plugin_preparse_prevents_setuptools_loading(testdir, monkeypatch, block - - plugin_module_placeholder = object() - -- def my_iter(name): -- assert name == "pytest11" -+ def my_iter(group, name=None): -+ assert group == "pytest11" - - class Dist(object): - project_name = "spam" -@@ -621,7 +621,7 @@ def load(self): - def test_disable_plugin_autoload(testdir, monkeypatch, parse_args, should_load): - pkg_resources = pytest.importorskip("pkg_resources") - -- def my_iter(name): -+ def my_iter(group, name=None): - raise AssertionError("Should not be called") - - class PseudoPlugin(object): -- cgit v1.2.3 From bb9dec546f839c38b7955f78d46b5405af505f76 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 24 May 2019 20:50:38 +0200 Subject: gnu: gawk: Update to 5.0.0. * gnu/packages/patches/libgpg-error-gawk-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gnupg.scm (libgpg-error)[source](modules, patches): New fields. * gnu/packages/gawk.scm (gawk): Update to 5.0.0. --- gnu/local.mk | 1 + gnu/packages/gawk.scm | 4 +- gnu/packages/gnupg.scm | 11 +- .../patches/libgpg-error-gawk-compat.patch | 155 +++++++++++++++++++++ 4 files changed, 168 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/libgpg-error-gawk-compat.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index d531050254..06f3f3a802 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -994,6 +994,7 @@ dist_patch_DATA = \ %D%/packages/patches/libevent-2.1-skip-failing-test.patch \ %D%/packages/patches/libexif-CVE-2016-6328.patch \ %D%/packages/patches/libexif-CVE-2017-7544.patch \ + %D%/packages/patches/libgpg-error-gawk-compat.patch \ %D%/packages/patches/libgit2-avoid-python.patch \ %D%/packages/patches/libgit2-mtime-0.patch \ %D%/packages/patches/libgdata-fix-tests.patch \ diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm index 487020ad3b..9b7b93651f 100644 --- a/gnu/packages/gawk.scm +++ b/gnu/packages/gawk.scm @@ -30,13 +30,13 @@ (define-public gawk (package (name "gawk") - (version "4.2.1") + (version "5.0.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/gawk/gawk-" version ".tar.xz")) (sha256 - (base32 "0lam2zf3n7ak4pig8w46lhx9hzx50kj2v2yj1616mm26wy2rf4fi")))) + (base32 "01j409gharghgf7h0pjzywkimhz2ldrxf85nvf3sv1dl1vnr3w2h")))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 47fcf5569d..230df101d5 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -85,7 +85,16 @@ version ".tar.bz2")) (sha256 (base32 - "0z696dmhfxm2n6pmr8b857wwljq9h633yi99bhbn7h88f91rigds")))) + "0z696dmhfxm2n6pmr8b857wwljq9h633yi99bhbn7h88f91rigds")) + (patches (search-patches "libgpg-error-gawk-compat.patch")) + ;; XXX: Remove this snippet with the gawk patch above. It avoids having + ;; to call autoreconf for the Makefile.am change to take effect. + (modules '((guix build utils))) + (snippet + '(begin + (substitute* "src/Makefile.in" + (("namespace=errnos") "pkg_namespace=errnos")) + #t)))) (build-system gnu-build-system) (home-page "https://gnupg.org") (synopsis "Library of error values for GnuPG components") diff --git a/gnu/packages/patches/libgpg-error-gawk-compat.patch b/gnu/packages/patches/libgpg-error-gawk-compat.patch new file mode 100644 index 0000000000..85477b0be6 --- /dev/null +++ b/gnu/packages/patches/libgpg-error-gawk-compat.patch @@ -0,0 +1,155 @@ +From 7865041c77f4f7005282f10f9b6666b19072fbdf Mon Sep 17 00:00:00 2001 +From: NIIBE Yutaka +Date: Mon, 15 Apr 2019 15:10:44 +0900 +Subject: [PATCH] awk: Prepare for Gawk 5.0. + +* src/Makefile.am: Use pkg_namespace (instead of namespace). +* src/mkerrnos.awk: Likewise. +* lang/cl/mkerrcodes.awk: Don't escape # in regexp. +* src/mkerrcodes.awk, src/mkerrcodes1.awk, src/mkerrcodes2.awk: Ditto. + +-- + +In Gawk 5.0, regexp routines are replaced by Gnulib implementation, +which only allows escaping specific characters. + +GnuPG-bug-id: 4459 +Reported-by: Marius Schamschula +Signed-off-by: NIIBE Yutaka +--- + lang/cl/mkerrcodes.awk | 2 +- + src/Makefile.am | 2 +- + src/mkerrcodes.awk | 2 +- + src/mkerrcodes1.awk | 2 +- + src/mkerrcodes2.awk | 2 +- + src/mkerrnos.awk | 2 +- + src/mkstrtable.awk | 10 +++++----- + 7 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/lang/cl/mkerrcodes.awk b/lang/cl/mkerrcodes.awk +index ae29043..9a1fc18 100644 +--- a/lang/cl/mkerrcodes.awk ++++ b/lang/cl/mkerrcodes.awk +@@ -122,7 +122,7 @@ header { + } + + !header { +- sub (/\#.+/, ""); ++ sub (/#.+/, ""); + sub (/[ ]+$/, ""); # Strip trailing space and tab characters. + + if (/^$/) +diff --git a/src/Makefile.am b/src/Makefile.am +index ce1b882..f2590cb 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -293,7 +293,7 @@ code-from-errno.h: mkerrcodes$(EXEEXT_FOR_BUILD) Makefile + + errnos-sym.h: Makefile mkstrtable.awk errnos.in + $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ +- -v prefix=GPG_ERR_ -v namespace=errnos_ \ ++ -v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \ + $(srcdir)/errnos.in >$@ + + +diff --git a/src/mkerrcodes.awk b/src/mkerrcodes.awk +index 46d436c..e9c857c 100644 +--- a/src/mkerrcodes.awk ++++ b/src/mkerrcodes.awk +@@ -85,7 +85,7 @@ header { + } + + !header { +- sub (/\#.+/, ""); ++ sub (/#.+/, ""); + sub (/[ ]+$/, ""); # Strip trailing space and tab characters. + + if (/^$/) +diff --git a/src/mkerrcodes1.awk b/src/mkerrcodes1.awk +index a771a73..4578e29 100644 +--- a/src/mkerrcodes1.awk ++++ b/src/mkerrcodes1.awk +@@ -81,7 +81,7 @@ header { + } + + !header { +- sub (/\#.+/, ""); ++ sub (/#.+/, ""); + sub (/[ ]+$/, ""); # Strip trailing space and tab characters. + + if (/^$/) +diff --git a/src/mkerrcodes2.awk b/src/mkerrcodes2.awk +index ea58503..188f7a4 100644 +--- a/src/mkerrcodes2.awk ++++ b/src/mkerrcodes2.awk +@@ -91,7 +91,7 @@ header { + } + + !header { +- sub (/\#.+/, ""); ++ sub (/#.+/, ""); + sub (/[ ]+$/, ""); # Strip trailing space and tab characters. + + if (/^$/) +diff --git a/src/mkerrnos.awk b/src/mkerrnos.awk +index f79df66..15b1aad 100644 +--- a/src/mkerrnos.awk ++++ b/src/mkerrnos.awk +@@ -83,7 +83,7 @@ header { + } + + !header { +- sub (/\#.+/, ""); ++ sub (/#.+/, ""); + sub (/[ ]+$/, ""); # Strip trailing space and tab characters. + + if (/^$/) +diff --git a/src/mkstrtable.awk b/src/mkstrtable.awk +index c9de9c1..285e45f 100644 +--- a/src/mkstrtable.awk ++++ b/src/mkstrtable.awk +@@ -77,7 +77,7 @@ + # + # The variable prefix can be used to prepend a string to each message. + # +-# The variable namespace can be used to prepend a string to each ++# The variable pkg_namespace can be used to prepend a string to each + # variable and macro name. + + BEGIN { +@@ -102,7 +102,7 @@ header { + print "/* The purpose of this complex string table is to produce"; + print " optimal code with a minimum of relocations. */"; + print ""; +- print "static const char " namespace "msgstr[] = "; ++ print "static const char " pkg_namespace "msgstr[] = "; + header = 0; + } + else +@@ -110,7 +110,7 @@ header { + } + + !header { +- sub (/\#.+/, ""); ++ sub (/#.+/, ""); + sub (/[ ]+$/, ""); # Strip trailing space and tab characters. + + if (/^$/) +@@ -150,7 +150,7 @@ END { + else + print " gettext_noop (\"" last_msgstr "\");"; + print ""; +- print "static const int " namespace "msgidx[] ="; ++ print "static const int " pkg_namespace "msgidx[] ="; + print " {"; + for (i = 0; i < coded_msgs; i++) + print " " pos[i] ","; +@@ -158,7 +158,7 @@ END { + print " };"; + print ""; + print "static GPG_ERR_INLINE int"; +- print namespace "msgidxof (int code)"; ++ print pkg_namespace "msgidxof (int code)"; + print "{"; + print " return (0 ? 0"; + -- cgit v1.2.3 From 44f07d1dc6806e97c4e9ee3e6be883cc59dc666e Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Tue, 28 May 2019 15:40:26 +0000 Subject: gnu: guile: Disable unreliable out-of-memory test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/patches/guile-2.2-skip-oom-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/guile.scm (guile-2.2)[source](patches): Add "guile-2.2-skip-oom-test.patch". Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/guile.scm | 2 ++ gnu/packages/patches/guile-2.2-skip-oom-test.patch | 25 ++++++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 gnu/packages/patches/guile-2.2-skip-oom-test.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index a212dbc799..b92f82e7cb 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -891,6 +891,7 @@ dist_patch_DATA = \ %D%/packages/patches/gspell-dash-test.patch \ %D%/packages/patches/guile-1.8-cpp-4.5.patch \ %D%/packages/patches/guile-2.2-default-utf8.patch \ + %D%/packages/patches/guile-2.2-skip-oom-test.patch \ %D%/packages/patches/guile-default-utf8.patch \ %D%/packages/patches/guile-gdbm-ffi-support-gdbm-1.14.patch \ %D%/packages/patches/guile-linux-syscalls.patch \ diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index 67825ffc30..ae5fca513a 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -228,6 +228,8 @@ without requiring the source code to be rewritten.") (base32 "07p3g0v2ba2vlfbfidqzlgbhnzdx46wh2rgc5gszq1mjyx5bks6r")) (modules '((guix build utils))) + (patches (search-patches + "guile-2.2-skip-oom-test.patch")) ;; Remove the pre-built object files. Instead, build everything ;; from source, at the expense of significantly longer build diff --git a/gnu/packages/patches/guile-2.2-skip-oom-test.patch b/gnu/packages/patches/guile-2.2-skip-oom-test.patch new file mode 100644 index 0000000000..765577653f --- /dev/null +++ b/gnu/packages/patches/guile-2.2-skip-oom-test.patch @@ -0,0 +1,25 @@ +Skip 'test-out-of-memory', which is unreliable in Guile 2.2.4: + + https://bugs.gnu.org/34155 + +--- a/test-suite/standalone/Makefile.in 1969-12-31 19:00:00.000000000 -0500 ++++ b/test-suite/standalone/Makefile.in 2019-05-27 16:44:32.302355990 -0400 +@@ -103,7 +103,7 @@ + test-scm-c-bind-keyword-arguments$(EXEEXT) \ + test-srfi-4$(EXEEXT) $(am__append_6) $(am__EXEEXT_1) \ + test-smob-mark$(EXEEXT) test-smob-mark-race$(EXEEXT) \ +- test-stack-overflow test-out-of-memory ++ test-stack-overflow + check_PROGRAMS = test-num2integral$(EXEEXT) test-round$(EXEEXT) \ + test-foreign-object-c$(EXEEXT) test-list$(EXEEXT) \ + test-unwind$(EXEEXT) test-conversion$(EXEEXT) \ +@@ -1938,8 +1938,7 @@ + test-command-line-encoding test-command-line-encoding2 \ + test-language test-guild-compile $(am__append_3) \ + test-foreign-object-scm test-fast-slot-ref test-mb-regexp \ +- test-use-srfi $(am__append_5) test-stack-overflow \ +- test-out-of-memory ++ test-use-srfi $(am__append_5) test-stack-overflow + BUILT_SOURCES = $(am__append_2) + EXTRA_DIST = test-import-order-a.scm test-import-order-b.scm \ + test-import-order-c.scm test-import-order-d.scm \ -- cgit v1.2.3 From 92d00ca4661e186022732a47956a2bc0ef16be96 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 14 Jun 2019 21:53:25 +0200 Subject: build: Remove 'gnu/packages/bootstrap' and its binaries. * gnu/local.mk (bootstrapdir, bootstrap_i686_linuxdir) (bootstrap_armhf_linuxdir, bootstrap_aarch64_linuxdir) (bootstrap_mips64el_linuxdir, dist_bootstrap_i686_linux_DATA) (dist_bootstrap_armhf_linux_DATA, dist_bootstrap_aarch64_linux_DATA) (dist_bootstrap_mips64el_linux_DATA): Remove. (set-bootstrap-executable-permissions): Remove target. * Makefile.am (install-data-hook): Remove dependency on 'set-bootstrap-executable-permissions'. * gnu/packages/bootstrap: Remove directory. * tests/search-paths.scm ("evaluate-search-paths, separator is #f"): Adjust to match .../aux-files/linux-libre. --- .gitignore | 1 + Makefile.am | 2 +- gnu/local.mk | 35 ---------------------------- gnu/packages/bootstrap/aarch64-linux/bash | Bin 1162056 -> 0 bytes gnu/packages/bootstrap/aarch64-linux/mkdir | Bin 558216 -> 0 bytes gnu/packages/bootstrap/aarch64-linux/tar | Bin 1085128 -> 0 bytes gnu/packages/bootstrap/aarch64-linux/xz | Bin 738576 -> 0 bytes gnu/packages/bootstrap/armhf-linux/bash | Bin 802224 -> 0 bytes gnu/packages/bootstrap/armhf-linux/mkdir | Bin 401544 -> 0 bytes gnu/packages/bootstrap/armhf-linux/tar | Bin 755356 -> 0 bytes gnu/packages/bootstrap/armhf-linux/xz | Bin 502884 -> 0 bytes gnu/packages/bootstrap/i686-linux/bash | Bin 1351732 -> 0 bytes gnu/packages/bootstrap/i686-linux/mkdir | Bin 714316 -> 0 bytes gnu/packages/bootstrap/i686-linux/tar | Bin 1285420 -> 0 bytes gnu/packages/bootstrap/i686-linux/xz | Bin 861836 -> 0 bytes gnu/packages/bootstrap/mips64el-linux/bash | Bin 1409080 -> 0 bytes gnu/packages/bootstrap/mips64el-linux/mkdir | Bin 698500 -> 0 bytes gnu/packages/bootstrap/mips64el-linux/tar | Bin 1283708 -> 0 bytes gnu/packages/bootstrap/mips64el-linux/xz | Bin 851736 -> 0 bytes tests/search-paths.scm | 8 +++---- 20 files changed, 6 insertions(+), 40 deletions(-) delete mode 100755 gnu/packages/bootstrap/aarch64-linux/bash delete mode 100755 gnu/packages/bootstrap/aarch64-linux/mkdir delete mode 100755 gnu/packages/bootstrap/aarch64-linux/tar delete mode 100755 gnu/packages/bootstrap/aarch64-linux/xz delete mode 100755 gnu/packages/bootstrap/armhf-linux/bash delete mode 100755 gnu/packages/bootstrap/armhf-linux/mkdir delete mode 100755 gnu/packages/bootstrap/armhf-linux/tar delete mode 100755 gnu/packages/bootstrap/armhf-linux/xz delete mode 100755 gnu/packages/bootstrap/i686-linux/bash delete mode 100755 gnu/packages/bootstrap/i686-linux/mkdir delete mode 100755 gnu/packages/bootstrap/i686-linux/tar delete mode 100755 gnu/packages/bootstrap/i686-linux/xz delete mode 100755 gnu/packages/bootstrap/mips64el-linux/bash delete mode 100755 gnu/packages/bootstrap/mips64el-linux/mkdir delete mode 100755 gnu/packages/bootstrap/mips64el-linux/tar delete mode 100755 gnu/packages/bootstrap/mips64el-linux/xz (limited to 'gnu/local.mk') diff --git a/.gitignore b/.gitignore index 93d2ec9801..aa374b54b9 100644 --- a/.gitignore +++ b/.gitignore @@ -149,3 +149,4 @@ tmp /etc/indent-code.el /.version /doc/stamp-[0-9] +/gnu/packages/bootstrap diff --git a/Makefile.am b/Makefile.am index 80be73e4bf..ec1e0285ea 100644 --- a/Makefile.am +++ b/Makefile.am @@ -589,7 +589,7 @@ $(guix_install_go_files): install-nobase_dist_guilemoduleDATA # The above trick doesn't work for 'config.go' because both 'config.scm' and # 'config.go' are listed in $(nobase_nodist_guileobject_DATA). Thus, give it # special treatment. -install-data-hook: set-bootstrap-executable-permissions +install-data-hook: touch "$(DESTDIR)$(guileobjectdir)/guix/config.go" # Assuming Guix is already installed and the daemon is up and running, this diff --git a/gnu/local.mk b/gnu/local.mk index b92f82e7cb..0ba0d1f194 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1385,38 +1385,3 @@ dist_patch_DATA = \ MISC_DISTRO_FILES = \ %D%/packages/ld-wrapper.in - -bootstrapdir = $(guilemoduledir)/%D%/packages/bootstrap -bootstrap_i686_linuxdir = $(bootstrapdir)/i686-linux -bootstrap_armhf_linuxdir = $(bootstrapdir)/armhf-linux -bootstrap_aarch64_linuxdir = $(bootstrapdir)/aarch64-linux -bootstrap_mips64el_linuxdir = $(bootstrapdir)/mips64el-linux - -dist_bootstrap_i686_linux_DATA = \ - %D%/packages/bootstrap/i686-linux/bash \ - %D%/packages/bootstrap/i686-linux/mkdir \ - %D%/packages/bootstrap/i686-linux/tar \ - %D%/packages/bootstrap/i686-linux/xz - -dist_bootstrap_armhf_linux_DATA = \ - %D%/packages/bootstrap/armhf-linux/bash \ - %D%/packages/bootstrap/armhf-linux/mkdir \ - %D%/packages/bootstrap/armhf-linux/tar \ - %D%/packages/bootstrap/armhf-linux/xz - -dist_bootstrap_aarch64_linux_DATA = \ - %D%/packages/bootstrap/aarch64-linux/bash \ - %D%/packages/bootstrap/aarch64-linux/mkdir \ - %D%/packages/bootstrap/aarch64-linux/tar \ - %D%/packages/bootstrap/aarch64-linux/xz - -dist_bootstrap_mips64el_linux_DATA = \ - %D%/packages/bootstrap/mips64el-linux/bash \ - %D%/packages/bootstrap/mips64el-linux/mkdir \ - %D%/packages/bootstrap/mips64el-linux/tar \ - %D%/packages/bootstrap/mips64el-linux/xz - -# Those files must remain executable, so they remain executable once -# imported into the store. -set-bootstrap-executable-permissions: - chmod +x $(DESTDIR)$(bootstrapdir)/*/{bash,mkdir,tar,xz} diff --git a/gnu/packages/bootstrap/aarch64-linux/bash b/gnu/packages/bootstrap/aarch64-linux/bash deleted file mode 100755 index 0bfb9d1824..0000000000 Binary files a/gnu/packages/bootstrap/aarch64-linux/bash and /dev/null differ diff --git a/gnu/packages/bootstrap/aarch64-linux/mkdir b/gnu/packages/bootstrap/aarch64-linux/mkdir deleted file mode 100755 index 35cd1815fd..0000000000 Binary files a/gnu/packages/bootstrap/aarch64-linux/mkdir and /dev/null differ diff --git a/gnu/packages/bootstrap/aarch64-linux/tar b/gnu/packages/bootstrap/aarch64-linux/tar deleted file mode 100755 index 7e68edb0be..0000000000 Binary files a/gnu/packages/bootstrap/aarch64-linux/tar and /dev/null differ diff --git a/gnu/packages/bootstrap/aarch64-linux/xz b/gnu/packages/bootstrap/aarch64-linux/xz deleted file mode 100755 index 5aa18c9234..0000000000 Binary files a/gnu/packages/bootstrap/aarch64-linux/xz and /dev/null differ diff --git a/gnu/packages/bootstrap/armhf-linux/bash b/gnu/packages/bootstrap/armhf-linux/bash deleted file mode 100755 index 212a22c8ce..0000000000 Binary files a/gnu/packages/bootstrap/armhf-linux/bash and /dev/null differ diff --git a/gnu/packages/bootstrap/armhf-linux/mkdir b/gnu/packages/bootstrap/armhf-linux/mkdir deleted file mode 100755 index c3e5246e92..0000000000 Binary files a/gnu/packages/bootstrap/armhf-linux/mkdir and /dev/null differ diff --git a/gnu/packages/bootstrap/armhf-linux/tar b/gnu/packages/bootstrap/armhf-linux/tar deleted file mode 100755 index 5a6aac8a58..0000000000 Binary files a/gnu/packages/bootstrap/armhf-linux/tar and /dev/null differ diff --git a/gnu/packages/bootstrap/armhf-linux/xz b/gnu/packages/bootstrap/armhf-linux/xz deleted file mode 100755 index a77aebc268..0000000000 Binary files a/gnu/packages/bootstrap/armhf-linux/xz and /dev/null differ diff --git a/gnu/packages/bootstrap/i686-linux/bash b/gnu/packages/bootstrap/i686-linux/bash deleted file mode 100755 index 4b99d7eb4a..0000000000 Binary files a/gnu/packages/bootstrap/i686-linux/bash and /dev/null differ diff --git a/gnu/packages/bootstrap/i686-linux/mkdir b/gnu/packages/bootstrap/i686-linux/mkdir deleted file mode 100755 index 6623a38404..0000000000 Binary files a/gnu/packages/bootstrap/i686-linux/mkdir and /dev/null differ diff --git a/gnu/packages/bootstrap/i686-linux/tar b/gnu/packages/bootstrap/i686-linux/tar deleted file mode 100755 index d33cd391f1..0000000000 Binary files a/gnu/packages/bootstrap/i686-linux/tar and /dev/null differ diff --git a/gnu/packages/bootstrap/i686-linux/xz b/gnu/packages/bootstrap/i686-linux/xz deleted file mode 100755 index f94dbde77c..0000000000 Binary files a/gnu/packages/bootstrap/i686-linux/xz and /dev/null differ diff --git a/gnu/packages/bootstrap/mips64el-linux/bash b/gnu/packages/bootstrap/mips64el-linux/bash deleted file mode 100755 index 403671d2fa..0000000000 Binary files a/gnu/packages/bootstrap/mips64el-linux/bash and /dev/null differ diff --git a/gnu/packages/bootstrap/mips64el-linux/mkdir b/gnu/packages/bootstrap/mips64el-linux/mkdir deleted file mode 100755 index c8d3285b38..0000000000 Binary files a/gnu/packages/bootstrap/mips64el-linux/mkdir and /dev/null differ diff --git a/gnu/packages/bootstrap/mips64el-linux/tar b/gnu/packages/bootstrap/mips64el-linux/tar deleted file mode 100755 index 0cdf7cce2c..0000000000 Binary files a/gnu/packages/bootstrap/mips64el-linux/tar and /dev/null differ diff --git a/gnu/packages/bootstrap/mips64el-linux/xz b/gnu/packages/bootstrap/mips64el-linux/xz deleted file mode 100755 index b0622ba946..0000000000 Binary files a/gnu/packages/bootstrap/mips64el-linux/xz and /dev/null differ diff --git a/tests/search-paths.scm b/tests/search-paths.scm index 8dad424415..767a80b76c 100644 --- a/tests/search-paths.scm +++ b/tests/search-paths.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2017 Ludovic Courtès +;;; Copyright © 2017, 2019 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,17 +29,17 @@ (test-equal "evaluate-search-paths, separator is #f" (string-append %top-srcdir - "/gnu/packages/bootstrap/aarch64-linux") + "/gnu/packages/aux-files/linux-libre") ;; The following search path spec should evaluate to a single item: the ;; first directory that matches the "-linux$" pattern in ;; gnu/packages/bootstrap. (let ((spec (search-path-specification (variable "CHBOUIB") - (files '("gnu/packages/bootstrap")) + (files '("gnu/packages/aux-files")) (file-type 'directory) (separator #f) - (file-pattern "-linux$")))) + (file-pattern "^linux")))) (match (evaluate-search-paths (list spec) (list %top-srcdir)) (((spec* . value)) -- cgit v1.2.3 From 549f4091c15568015fafa03ab04a37db5679edea Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 14 Jun 2019 15:58:57 +0200 Subject: gnu: libarchive: Update to 3.4.0. * gnu/packages/patches/libarchive-CVE-2018-1000877.patch, gnu/packages/patches/libarchive-CVE-2018-1000878.patch, gnu/packages/patches/libarchive-CVE-2018-1000880.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/backup.scm (libarchive): Update to 3.4.0. [source](uri): Add alternative download location. [source](patches): Remove. --- gnu/local.mk | 3 - gnu/packages/backup.scm | 14 ++-- .../patches/libarchive-CVE-2018-1000877.patch | 45 ----------- .../patches/libarchive-CVE-2018-1000878.patch | 86 ---------------------- .../patches/libarchive-CVE-2018-1000880.patch | 51 ------------- 5 files changed, 7 insertions(+), 192 deletions(-) delete mode 100644 gnu/packages/patches/libarchive-CVE-2018-1000877.patch delete mode 100644 gnu/packages/patches/libarchive-CVE-2018-1000878.patch delete mode 100644 gnu/packages/patches/libarchive-CVE-2018-1000880.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 0ba0d1f194..7c68b40976 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -982,9 +982,6 @@ dist_patch_DATA = \ %D%/packages/patches/liba52-link-with-libm.patch \ %D%/packages/patches/liba52-set-soname.patch \ %D%/packages/patches/liba52-use-mtune-not-mcpu.patch \ - %D%/packages/patches/libarchive-CVE-2018-1000877.patch \ - %D%/packages/patches/libarchive-CVE-2018-1000878.patch \ - %D%/packages/patches/libarchive-CVE-2018-1000880.patch \ %D%/packages/patches/libbase-fix-includes.patch \ %D%/packages/patches/libbase-use-own-logging.patch \ %D%/packages/patches/libbonobo-activation-test-race.patch \ diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index f62c5c3c00..beb3b09077 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -197,18 +197,18 @@ backups (called chunks) to allow easy burning to CD/DVD.") (define-public libarchive (package (name "libarchive") - (version "3.3.3") + (version "3.4.0") (source (origin (method url-fetch) - (uri (string-append "https://libarchive.org/downloads/libarchive-" - version ".tar.gz")) - (patches (search-patches "libarchive-CVE-2018-1000877.patch" - "libarchive-CVE-2018-1000878.patch" - "libarchive-CVE-2018-1000880.patch")) + (uri (list (string-append "https://libarchive.org/downloads/libarchive-" + version ".tar.gz") + (string-append "https://github.com/libarchive/libarchive" + "/releases/download/v" version "/libarchive-" + version ".tar.gz"))) (sha256 (base32 - "0bhfncid058p7n1n8v29l6wxm3mhdqfassscihbsxfwz3iwb2zms")))) + "0pl25mmz1b1cnwf35kxmygyy9g7z7hslxbx329a9yx8csh7dahw6")))) (build-system gnu-build-system) (inputs `(("zlib" ,zlib) diff --git a/gnu/packages/patches/libarchive-CVE-2018-1000877.patch b/gnu/packages/patches/libarchive-CVE-2018-1000877.patch deleted file mode 100644 index 5b68884a0f..0000000000 --- a/gnu/packages/patches/libarchive-CVE-2018-1000877.patch +++ /dev/null @@ -1,45 +0,0 @@ -Fix CVE-2018-1000877: - -https://bugs.launchpad.net/ubuntu/+source/libarchive/+bug/1794909 -https://github.com/libarchive/libarchive/pull/1105 -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000877 -https://security-tracker.debian.org/tracker/CVE-2018-1000877 - -Patch copied from upstream source repository: - -https://github.com/libarchive/libarchive/commit/021efa522ad729ff0f5806c4ce53e4a6cc1daa31 - -From 021efa522ad729ff0f5806c4ce53e4a6cc1daa31 Mon Sep 17 00:00:00 2001 -From: Daniel Axtens -Date: Tue, 20 Nov 2018 17:56:29 +1100 -Subject: [PATCH] Avoid a double-free when a window size of 0 is specified - -new_size can be 0 with a malicious or corrupted RAR archive. - -realloc(area, 0) is equivalent to free(area), so the region would -be free()d here and the free()d again in the cleanup function. - -Found with a setup running AFL, afl-rb, and qsym. ---- - libarchive/archive_read_support_format_rar.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c -index 23452222..6f419c27 100644 ---- a/libarchive/archive_read_support_format_rar.c -+++ b/libarchive/archive_read_support_format_rar.c -@@ -2300,6 +2300,11 @@ parse_codes(struct archive_read *a) - new_size = DICTIONARY_MAX_SIZE; - else - new_size = rar_fls((unsigned int)rar->unp_size) << 1; -+ if (new_size == 0) { -+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, -+ "Zero window size is invalid."); -+ return (ARCHIVE_FATAL); -+ } - new_window = realloc(rar->lzss.window, new_size); - if (new_window == NULL) { - archive_set_error(&a->archive, ENOMEM, --- -2.20.1 - diff --git a/gnu/packages/patches/libarchive-CVE-2018-1000878.patch b/gnu/packages/patches/libarchive-CVE-2018-1000878.patch deleted file mode 100644 index fef0881320..0000000000 --- a/gnu/packages/patches/libarchive-CVE-2018-1000878.patch +++ /dev/null @@ -1,86 +0,0 @@ -Fix CVE-2018-1000878: - -https://bugs.launchpad.net/ubuntu/+source/libarchive/+bug/1794909 -https://github.com/libarchive/libarchive/pull/1105 -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000878 -https://security-tracker.debian.org/tracker/CVE-2018-1000878 - -Patch copied from upstream source repository: - -https://github.com/libarchive/libarchive/commit/bfcfe6f04ed20db2504db8a254d1f40a1d84eb28 - -From bfcfe6f04ed20db2504db8a254d1f40a1d84eb28 Mon Sep 17 00:00:00 2001 -From: Daniel Axtens -Date: Tue, 4 Dec 2018 00:55:22 +1100 -Subject: [PATCH] rar: file split across multi-part archives must match - -Fuzzing uncovered some UAF and memory overrun bugs where a file in a -single file archive reported that it was split across multiple -volumes. This was caused by ppmd7 operations calling -rar_br_fillup. This would invoke rar_read_ahead, which would in some -situations invoke archive_read_format_rar_read_header. That would -check the new file name against the old file name, and if they didn't -match up it would free the ppmd7 buffer and allocate a new -one. However, because the ppmd7 decoder wasn't actually done with the -buffer, it would continue to used the freed buffer. Both reads and -writes to the freed region can be observed. - -This is quite tricky to solve: once the buffer has been freed it is -too late, as the ppmd7 decoder functions almost universally assume -success - there's no way for ppmd_read to signal error, nor are there -good ways for functions like Range_Normalise to propagate them. So we -can't detect after the fact that we're in an invalid state - e.g. by -checking rar->cursor, we have to prevent ourselves from ever ending up -there. So, when we are in the dangerous part or rar_read_ahead that -assumes a valid split, we set a flag force read_header to either go -down the path for split files or bail. This means that the ppmd7 -decoder keeps a valid buffer and just runs out of data. - -Found with a combination of AFL, afl-rb and qsym. ---- - libarchive/archive_read_support_format_rar.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c -index 6f419c27..a8cc5c94 100644 ---- a/libarchive/archive_read_support_format_rar.c -+++ b/libarchive/archive_read_support_format_rar.c -@@ -258,6 +258,7 @@ struct rar - struct data_block_offsets *dbo; - unsigned int cursor; - unsigned int nodes; -+ char filename_must_match; - - /* LZSS members */ - struct huffman_code maincode; -@@ -1560,6 +1561,12 @@ read_header(struct archive_read *a, struct archive_entry *entry, - } - return ret; - } -+ else if (rar->filename_must_match) -+ { -+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, -+ "Mismatch of file parts split across multi-volume archive"); -+ return (ARCHIVE_FATAL); -+ } - - rar->filename_save = (char*)realloc(rar->filename_save, - filename_size + 1); -@@ -2933,12 +2940,14 @@ rar_read_ahead(struct archive_read *a, size_t min, ssize_t *avail) - else if (*avail == 0 && rar->main_flags & MHD_VOLUME && - rar->file_flags & FHD_SPLIT_AFTER) - { -+ rar->filename_must_match = 1; - ret = archive_read_format_rar_read_header(a, a->entry); - if (ret == (ARCHIVE_EOF)) - { - rar->has_endarc_header = 1; - ret = archive_read_format_rar_read_header(a, a->entry); - } -+ rar->filename_must_match = 0; - if (ret != (ARCHIVE_OK)) - return NULL; - return rar_read_ahead(a, min, avail); --- -2.20.1 - diff --git a/gnu/packages/patches/libarchive-CVE-2018-1000880.patch b/gnu/packages/patches/libarchive-CVE-2018-1000880.patch deleted file mode 100644 index 6834cabda0..0000000000 --- a/gnu/packages/patches/libarchive-CVE-2018-1000880.patch +++ /dev/null @@ -1,51 +0,0 @@ -Fix CVE-2018-1000880: - -https://bugs.launchpad.net/ubuntu/+source/libarchive/+bug/1794909 -https://github.com/libarchive/libarchive/pull/1105 -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000880 -https://security-tracker.debian.org/tracker/CVE-2018-1000880 - -Patch copied from upstream source repository: - -https://github.com/libarchive/libarchive/commit/9c84b7426660c09c18cc349f6d70b5f8168b5680 - -From 9c84b7426660c09c18cc349f6d70b5f8168b5680 Mon Sep 17 00:00:00 2001 -From: Daniel Axtens -Date: Tue, 4 Dec 2018 16:33:42 +1100 -Subject: [PATCH] warc: consume data once read - -The warc decoder only used read ahead, it wouldn't actually consume -data that had previously been printed. This means that if you specify -an invalid content length, it will just reprint the same data over -and over and over again until it hits the desired length. - -This means that a WARC resource with e.g. -Content-Length: 666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666665 -but only a few hundred bytes of data, causes a quasi-infinite loop. - -Consume data in subsequent calls to _warc_read. - -Found with an AFL + afl-rb + qsym setup. ---- - libarchive/archive_read_support_format_warc.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/libarchive/archive_read_support_format_warc.c b/libarchive/archive_read_support_format_warc.c -index e8753853..e8fc8428 100644 ---- a/libarchive/archive_read_support_format_warc.c -+++ b/libarchive/archive_read_support_format_warc.c -@@ -386,6 +386,11 @@ _warc_read(struct archive_read *a, const void **buf, size_t *bsz, int64_t *off) - return (ARCHIVE_EOF); - } - -+ if (w->unconsumed) { -+ __archive_read_consume(a, w->unconsumed); -+ w->unconsumed = 0U; -+ } -+ - rab = __archive_read_ahead(a, 1U, &nrd); - if (nrd < 0) { - *bsz = 0U; --- -2.20.1 - -- cgit v1.2.3 From 1a753d5673b7613727177cb1d3b4c7e343534545 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 15 Jun 2019 12:31:49 +0200 Subject: gnu: poppler: Update to 0.77.0. * gnu/packages/patches/inkscape-poppler-0.76.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/inkscape.scm (inkscape)[source](patches): New field. * gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch: Add two new hunks. * gnu/packages/pdf.scm (poppler): Update to 0.77.0. * gnu/packages/tex.scm (texlive-bin)[source]: Update Arch patches. [arguments]: Adjust accordingly. * gnu/packages/scribus.scm (scribus)[source](patches): Add two new origins. --- gnu/local.mk | 1 + gnu/packages/inkscape.scm | 1 + gnu/packages/patches/inkscape-poppler-0.76.patch | 36 ++++++++++++++++++++++ .../texlive-bin-luatex-poppler-compat.patch | 34 ++++++++++++++++++++ gnu/packages/pdf.scm | 4 +-- gnu/packages/scribus.scm | 29 +++++++++++++++-- gnu/packages/tex.scm | 10 +++--- 7 files changed, 106 insertions(+), 9 deletions(-) create mode 100644 gnu/packages/patches/inkscape-poppler-0.76.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 7c68b40976..2a6908d4bb 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -938,6 +938,7 @@ dist_patch_DATA = \ %D%/packages/patches/idris-test-no-node.patch \ %D%/packages/patches/ilmbase-fix-tests.patch \ %D%/packages/patches/inkscape-poppler-compat3.patch \ + %D%/packages/patches/inkscape-poppler-0.76.patch \ %D%/packages/patches/intltool-perl-compatibility.patch \ %D%/packages/patches/irrlicht-use-system-libs.patch \ %D%/packages/patches/isl-0.11.1-aarch64-support.patch \ diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scm index a2c6778b57..1ad23a92d4 100644 --- a/gnu/packages/inkscape.scm +++ b/gnu/packages/inkscape.scm @@ -52,6 +52,7 @@ (uri (string-append "https://media.inkscape.org/dl/" "resources/file/" "inkscape-" version ".tar.bz2")) + (patches (search-patches "inkscape-poppler-0.76.patch")) (sha256 (base32 "0pjinhjibfsz1aywdpgpj3k23xrsszpj4a1ya5562dkv2yl2vv2p")))) diff --git a/gnu/packages/patches/inkscape-poppler-0.76.patch b/gnu/packages/patches/inkscape-poppler-0.76.patch new file mode 100644 index 0000000000..08e8303892 --- /dev/null +++ b/gnu/packages/patches/inkscape-poppler-0.76.patch @@ -0,0 +1,36 @@ +This patch adds support for Poppler 0.76 and later. + +Taken from upstream: + + +diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp +index 8484984bdf..4f798e35bf 100644 +--- a/src/extension/internal/pdfinput/pdf-parser.cpp ++++ b/src/extension/internal/pdfinput/pdf-parser.cpp +@@ -421,7 +421,7 @@ void PdfParser::parse(Object *obj, GBool topLevel) { + error(errInternal, -1, "Weird page contents"); + return; + } +- parser = new Parser(xref, new Lexer(xref, obj), gFalse); ++ parser = new _POPPLER_NEW_PARSER(xref, obj); + go(topLevel); + delete parser; + parser = nullptr; +diff --git a/src/extension/internal/pdfinput/poppler-transition-api.h b/src/extension/internal/pdfinput/poppler-transition-api.h +index 61a15083a0..5e8bc4ae90 100644 +--- a/src/extension/internal/pdfinput/poppler-transition-api.h ++++ b/src/extension/internal/pdfinput/poppler-transition-api.h +@@ -14,6 +14,13 @@ + + #include + ++#if POPPLER_CHECK_VERSION(0, 76, 0) ++#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, obj, gFalse) ++#else ++#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, new Lexer(xref, obj), gFalse) ++#endif ++ ++ + #if POPPLER_CHECK_VERSION(0, 72, 0) + #define getCString c_str + #endif diff --git a/gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch b/gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch index df6121c6e1..024ff416af 100644 --- a/gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch +++ b/gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch @@ -257,3 +257,37 @@ diff --git a/texk/web2c/luatexdir/lua/lepdflib.cc b/texk/web2c/luatexdir/lua/lep uout = new_StructTreeRoot_userdata(L); uout->d = obj; uout->pc = uin->pc; +--- texlive-source/texk/web2c/luatexdir/lua/lepdflib.cc.orig 2019-04-24 09:41:05.090522664 +0000 ++++ texlive-source/texk/web2c/luatexdir/lua/lepdflib.cc 2019-04-24 09:43:37.119184926 +0000 +@@ -994,7 +994,8 @@ + pdfdoc_changed_error(L); + num = luaL_checkint(L, 2); + gen = luaL_checkint(L, 3); +- i = ((Catalog *) uin->d)->findPage(num, gen); ++ Ref numgen = {num, gen}; ++ i = ((Catalog *) uin->d)->findPage(numgen); + if (i > 0) + lua_pushinteger(L, i); + else +@@ -2596,8 +2597,9 @@ + pdfdoc_changed_error(L); + num = luaL_checkint(L, 2); + gen = luaL_checkint(L, 3); ++ Ref numgen = {num, gen}; + if (((PdfDocument *) uin->d)->doc->getCatalog()->isOk()) { +- i = ((PdfDocument *) uin->d)->doc->findPage(num, gen); ++ i = ((PdfDocument *) uin->d)->doc->findPage(numgen); + if (i > 0) + lua_pushinteger(L, i); + else +--- texlive-source/texk/web2c/luatexdir/image/pdftoepdf.w.orig 2019-04-24 09:56:38.406498975 +0000 ++++ texlive-source/texk/web2c/luatexdir/image/pdftoepdf.w 2019-04-24 09:56:57.020081327 +0000 +@@ -630,7 +630,7 @@ + if (link == NULL || !link->isOk()) + formatted_error("pdf inclusion","invalid destination '%s'",img_pagename(idict)); + Ref ref = link->getPageRef(); +- img_pagenum(idict) = catalog->findPage(ref.num, ref.gen); ++ img_pagenum(idict) = catalog->findPage(ref); + if (img_pagenum(idict) == 0) + formatted_error("pdf inclusion","destination is not a page '%s'",img_pagename(idict)); + delete link; diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index eab97a1a52..9cfac6fb9d 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -84,14 +84,14 @@ (define-public poppler (package (name "poppler") - (version "0.75.0") + (version "0.77.0") (source (origin (method url-fetch) (uri (string-append "https://poppler.freedesktop.org/poppler-" version ".tar.xz")) (sha256 (base32 - "16hr0y3pv66s01bcd4k8xjgd1r038ca9srd06g4wm5r7zaqfvfiv")))) + "0szk09hk8r98ck9cx97nqwrbzdn1q41ic8dq8j1aar6dpi6fnrvj")))) (build-system cmake-build-system) ;; FIXME: ;; use libcurl: no diff --git a/gnu/packages/scribus.scm b/gnu/packages/scribus.scm index 5b770fd696..322a096414 100644 --- a/gnu/packages/scribus.scm +++ b/gnu/packages/scribus.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2017, 2018 Nicolas Goaziou ;;; Copyright © 2018 Clément Lassieur +;;; Copyright © 2019 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -97,9 +98,33 @@ (file-name "scribus-poppler-0.70.patch") (sha256 (base32 - "0dw7ix3jaj0y1q97cmmqwb2qgdx760yhxx86wa8rnx0xhfi5x6qr")))) - + "0dw7ix3jaj0y1q97cmmqwb2qgdx760yhxx86wa8rnx0xhfi5x6qr"))) + ;; This and the preceding patch are taken from Arch Linux + ;; because they are adjusted for the Scribus release tarball + ;; rather than the upstream master branch. + (origin + (method url-fetch) + (uri (string-append "https://git.archlinux.org/svntogit/" + "community.git/plain/trunk/scribus-" + "poppler-0.75.patch?h=packages/scribus&id=" + "4d35c4ad4869c1dcce9243c4786ff303bdd5c601")) + (file-name "scribus-poppler-0.75.patch") + (sha256 + (base32 + "1lhf2srp7iv44zzdbr3kqa0lfjmm77nalxnx80jqaixhr5yq2s8f"))) + (origin + (method url-fetch) + (uri (string-append + "https://github.com/scribusproject/scribus/commit/" + "9449265592a5195153d72c2a511d2010b0cf5b0b.patch")) + (file-name "scribus-poppler-0.76.patch") + (sha256 + (base32 + "0zghiqra9s6f6v06fdr97gdhiw41zr8r6vqh4ar4yw7rqn2771jd")))) (search-patches "scribus-poppler-0.73.patch"))) + ;; The --binary flag is required for 'scribus-poppler-0.75.patch', because + ;; we need to retain the CRLF line endings. + (patch-flags '("-p1" "--binary")) (modules '((guix build utils))) (snippet '(begin diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index e28b36fd98..10233a05b7 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -111,12 +111,12 @@ "&id=" revision)) (file-name (string-append "texlive-bin-" name)) (sha256 (base32 hash))))) - (arch-revision "418dd6f008c3d41a461353fdb60f2d73d87c58ed")) + (arch-revision "c4b99aba97213ea554b6592a4916d3c7394a6d7b")) (append (search-patches "texlive-bin-CVE-2018-17407.patch" "texlive-bin-luatex-poppler-compat.patch") (list - (arch-patch "pdftex-poppler0.75.patch" arch-revision - "1cqpcp7h1qyxyp3wjbpcmx2wgvj9ywpz60hvy280mp9w633yzyg3") + (arch-patch "pdftex-poppler0.76.patch" arch-revision + "15ypbh21amfsdxy7ca825x28lkmmkklxk1w660gpgvzdi7s70h0b") (arch-patch "xetex-poppler-fixes.patch" arch-revision "1jj1p5zkjljb7id9pjv29cw0cf8mwrgrh4ackgzz9c200vaqpsvx"))))))) (build-system gnu-build-system) @@ -194,9 +194,9 @@ #t)) (add-after 'unpack 'use-code-for-new-poppler (lambda _ - (copy-file "texk/web2c/pdftexdir/pdftoepdf-poppler0.75.0.cc" + (copy-file "texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc" "texk/web2c/pdftexdir/pdftoepdf.cc") - (copy-file "texk/web2c/pdftexdir/pdftosrc-poppler0.75.0.cc" + (copy-file "texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc" "texk/web2c/pdftexdir/pdftosrc.cc") #t)) (add-after 'use-code-for-new-poppler 'use-code-for-even-newer-poppler -- cgit v1.2.3 From a9a78d8bfbabcd306115684c99d3b2aa8fc75be8 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 20 Jun 2019 23:40:52 +0200 Subject: gnu: dbus: Update to 1.12.16. * gnu/packages/patches/dbus-CVE-2019-12749.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/glib.scm (dbus): Update to 1.12.16. [replacement]: Remove. (dbus/fixed): Remove variable. --- gnu/local.mk | 1 - gnu/packages/glib.scm | 13 +-- gnu/packages/patches/dbus-CVE-2019-12749.patch | 116 ------------------------- 3 files changed, 2 insertions(+), 128 deletions(-) delete mode 100644 gnu/packages/patches/dbus-CVE-2019-12749.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 3be9c9d60e..42b34ab90e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -740,7 +740,6 @@ dist_patch_DATA = \ %D%/packages/patches/cursynth-wave-rand.patch \ %D%/packages/patches/cvs-2017-12836.patch \ %D%/packages/patches/dbus-helper-search-path.patch \ - %D%/packages/patches/dbus-CVE-2019-12749.patch \ %D%/packages/patches/dealii-mpi-deprecations.patch \ %D%/packages/patches/deja-dup-use-ref-keyword-for-iter.patch \ %D%/packages/patches/dfu-programmer-fix-libusb.patch \ diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index d93a928c20..9fba2310d6 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -82,8 +82,7 @@ (define dbus (package (name "dbus") - (version "1.12.14") - (replacement dbus/fixed) + (version "1.12.16") (source (origin (method url-fetch) (uri (string-append @@ -91,7 +90,7 @@ version ".tar.gz")) (sha256 (base32 - "13aca7gzgl7z1dfdipfs23773w8n6z01d4rj5kmssv4gms8c5ya4")) + "107ckxaff1cv4q6kmfdi2fb1nlsv03312a7kf6lb4biglhpjv8jl")) (patches (search-patches "dbus-helper-search-path.patch")))) (build-system gnu-build-system) (arguments @@ -157,14 +156,6 @@ or through unencrypted TCP/IP suitable for use behind a firewall with shared NFS home directories.") (license license:gpl2+))) ; or Academic Free License 2.1 -(define dbus/fixed - (package - (inherit dbus) - (source (origin - (inherit (package-source dbus)) - (patches (append (search-patches "dbus-CVE-2019-12749.patch") - (origin-patches (package-source dbus)))))))) - (define glib (package (name "glib") diff --git a/gnu/packages/patches/dbus-CVE-2019-12749.patch b/gnu/packages/patches/dbus-CVE-2019-12749.patch deleted file mode 100644 index 12106f4589..0000000000 --- a/gnu/packages/patches/dbus-CVE-2019-12749.patch +++ /dev/null @@ -1,116 +0,0 @@ -From 47b1a4c41004bf494b87370987b222c934b19016 Mon Sep 17 00:00:00 2001 -From: Simon McVittie -Date: Thu, 30 May 2019 12:53:03 +0100 -Subject: [PATCH] auth: Reject DBUS_COOKIE_SHA1 for users other than the server - owner - -The DBUS_COOKIE_SHA1 authentication mechanism aims to prove ownership -of a shared home directory by having the server write a secret "cookie" -into a .dbus-keyrings subdirectory of the desired identity's home -directory with 0700 permissions, and having the client prove that it can -read the cookie. This never actually worked for non-malicious clients in -the case where server uid != client uid (unless the server and client -both have privileges, such as Linux CAP_DAC_OVERRIDE or traditional -Unix uid 0) because an unprivileged server would fail to write out the -cookie, and an unprivileged client would be unable to read the resulting -file owned by the server. - -Additionally, since dbus 1.7.10 we have checked that ~/.dbus-keyrings -is owned by the uid of the server (a side-effect of a check added to -harden our use of XDG_RUNTIME_DIR), further ruling out successful use -by a non-malicious client with a uid differing from the server's. - -Joe Vennix of Apple Information Security discovered that the -implementation of DBUS_COOKIE_SHA1 was susceptible to a symbolic link -attack: a malicious client with write access to its own home directory -could manipulate a ~/.dbus-keyrings symlink to cause the DBusServer to -read and write in unintended locations. In the worst case this could -result in the DBusServer reusing a cookie that is known to the -malicious client, and treating that cookie as evidence that a subsequent -client connection came from an attacker-chosen uid, allowing -authentication bypass. - -This is mitigated by the fact that by default, the well-known system -dbus-daemon (since 2003) and the well-known session dbus-daemon (in -stable releases since dbus 1.10.0 in 2015) only accept the EXTERNAL -authentication mechanism, and as a result will reject DBUS_COOKIE_SHA1 -at an early stage, before manipulating cookies. As a result, this -vulnerability only applies to: - -* system or session dbus-daemons with non-standard configuration -* third-party dbus-daemon invocations such as at-spi2-core (although - in practice at-spi2-core also only accepts EXTERNAL by default) -* third-party uses of DBusServer such as the one in Upstart - -Avoiding symlink attacks in a portable way is difficult, because APIs -like openat() and Linux /proc/self/fd are not universally available. -However, because DBUS_COOKIE_SHA1 already doesn't work in practice for -a non-matching uid, we can solve this vulnerability in an easier way -without regressions, by rejecting it early (before looking at -~/.dbus-keyrings) whenever the requested identity doesn't match the -identity of the process hosting the DBusServer. - -Signed-off-by: Simon McVittie -Closes: https://gitlab.freedesktop.org/dbus/dbus/issues/269 -Closes: CVE-2019-12749 ---- - dbus/dbus-auth.c | 32 ++++++++++++++++++++++++++++++++ - 1 file changed, 32 insertions(+) - -diff --git a/dbus/dbus-auth.c b/dbus/dbus-auth.c -index 37d8d4c9..7390a9d5 100644 ---- a/dbus/dbus-auth.c -+++ b/dbus/dbus-auth.c -@@ -529,6 +529,7 @@ sha1_handle_first_client_response (DBusAuth *auth, - DBusString tmp2; - dbus_bool_t retval = FALSE; - DBusError error = DBUS_ERROR_INIT; -+ DBusCredentials *myself = NULL; - - _dbus_string_set_length (&auth->challenge, 0); - -@@ -565,6 +566,34 @@ sha1_handle_first_client_response (DBusAuth *auth, - return FALSE; - } - -+ myself = _dbus_credentials_new_from_current_process (); -+ -+ if (myself == NULL) -+ goto out; -+ -+ if (!_dbus_credentials_same_user (myself, auth->desired_identity)) -+ { -+ /* -+ * DBUS_COOKIE_SHA1 is not suitable for authenticating that the -+ * client is anyone other than the user owning the process -+ * containing the DBusServer: we probably aren't allowed to write -+ * to other users' home directories. Even if we can (for example -+ * uid 0 on traditional Unix or CAP_DAC_OVERRIDE on Linux), we -+ * must not, because the other user controls their home directory, -+ * and could carry out symlink attacks to make us read from or -+ * write to unintended locations. It's difficult to avoid symlink -+ * attacks in a portable way, so we just don't try. This isn't a -+ * regression, because DBUS_COOKIE_SHA1 never worked for other -+ * users anyway. -+ */ -+ _dbus_verbose ("%s: client tried to authenticate as \"%s\", " -+ "but that doesn't match this process", -+ DBUS_AUTH_NAME (auth), -+ _dbus_string_get_const_data (data)); -+ retval = send_rejected (auth); -+ goto out; -+ } -+ - /* we cache the keyring for speed, so here we drop it if it's the - * wrong one. FIXME caching the keyring here is useless since we use - * a different DBusAuth for every connection. -@@ -679,6 +708,9 @@ sha1_handle_first_client_response (DBusAuth *auth, - _dbus_string_zero (&tmp2); - _dbus_string_free (&tmp2); - -+ if (myself != NULL) -+ _dbus_credentials_unref (myself); -+ - return retval; - } - -- cgit v1.2.3 From b74ef0bae75525227de092c4844b920625095f65 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 5 Dec 2018 17:25:57 +0100 Subject: gnu: gdm: Update to 3.30.2. * gnu/packages/gnome.scm (gdm): Update to 3.30.2. [arguments]: Add --with-udevdir configure flag. [source]: Remove patch. * gnu/packages/patches/gdm-CVE-2018-14424.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/gnome.scm | 8 +- gnu/packages/patches/gdm-CVE-2018-14424.patch | 172 -------------------------- 3 files changed, 5 insertions(+), 176 deletions(-) delete mode 100644 gnu/packages/patches/gdm-CVE-2018-14424.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 42b34ab90e..12a64b23f9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -836,7 +836,6 @@ dist_patch_DATA = \ %D%/packages/patches/gd-CVE-2019-6978.patch \ %D%/packages/patches/gd-fix-tests-on-i686.patch \ %D%/packages/patches/gd-freetype-test-failure.patch \ - %D%/packages/patches/gdm-CVE-2018-14424.patch \ %D%/packages/patches/geoclue-config.patch \ %D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch \ %D%/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 4a8c8049cf..787d9ab074 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -5584,16 +5584,15 @@ libxml2.") (define-public gdm (package (name "gdm") - (version "3.28.2") + (version "3.30.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" (version-major+minor version) "/" name "-" version ".tar.xz")) - (patches (search-patches "gdm-CVE-2018-14424.patch")) (sha256 (base32 - "0wdm1503x66n1crdlmzmincbd2hccpxsdgjsl5anx3yjpdzs0hb0")))) + "1handy65r1n0zby09jr492b3643wszzigdkxp7q2ypgxb3hyv45y")))) (build-system glib-or-gtk-build-system) (arguments '(#:configure-flags @@ -5609,6 +5608,9 @@ libxml2.") ;; systemd-specific '/etc/locale.conf'. "--with-lang-file=/etc/environment" + ,(string-append "--with-udevdir=" + (assoc-ref %outputs "out") "/lib/udev") + "--localstatedir=/var" ,(string-append "--with-default-path=" (string-join '("/run/setuid-programs" diff --git a/gnu/packages/patches/gdm-CVE-2018-14424.patch b/gnu/packages/patches/gdm-CVE-2018-14424.patch deleted file mode 100644 index 88a71f4151..0000000000 --- a/gnu/packages/patches/gdm-CVE-2018-14424.patch +++ /dev/null @@ -1,172 +0,0 @@ -Fix CVE-2018-14424: - -https://gitlab.gnome.org/GNOME/gdm/issues/401 -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-14424 - -Patch copied from upstream source repository: - -https://gitlab.gnome.org/GNOME/gdm/commit/1ac1697b3b019f50729a6e992065959586e170da - -From 1ac1697b3b019f50729a6e992065959586e170da Mon Sep 17 00:00:00 2001 -From: Chris Coulson -Date: Thu, 19 Jul 2018 18:26:05 +0100 -Subject: [PATCH] display-store: Pass the display object rather than the id in - the removed signal - -By the time GdmDisplayStore emits the "display-removed" signal, the display -is no longer in the store and gdm_display_store_lookup will not work in -signal handlers. - -Change the "display-removed" parameter from the display id to the GdmDisplay -object, so that signal handers can perform any cleanup they need to do - -CVE-2018-14424 - -Closes: https://gitlab.gnome.org/GNOME/gdm/issues/401 ---- - daemon/gdm-display-store.c | 11 +++-------- - daemon/gdm-display-store.h | 2 +- - daemon/gdm-local-display-factory.c | 13 +++---------- - daemon/gdm-manager.c | 19 +++++++++---------- - daemon/gdm-manager.h | 3 ++- - 5 files changed, 18 insertions(+), 30 deletions(-) - -diff --git a/daemon/gdm-display-store.c b/daemon/gdm-display-store.c -index af76f519..fd24334e 100644 ---- a/daemon/gdm-display-store.c -+++ b/daemon/gdm-display-store.c -@@ -76,15 +76,10 @@ stored_display_new (GdmDisplayStore *store, - static void - stored_display_free (StoredDisplay *stored_display) - { -- char *id; -- -- gdm_display_get_id (stored_display->display, &id, NULL); -- - g_signal_emit (G_OBJECT (stored_display->store), - signals[DISPLAY_REMOVED], - 0, -- id); -- g_free (id); -+ stored_display->display); - - g_debug ("GdmDisplayStore: Unreffing display: %p", - stored_display->display); -@@ -281,9 +276,9 @@ gdm_display_store_class_init (GdmDisplayStoreClass *klass) - G_STRUCT_OFFSET (GdmDisplayStoreClass, display_removed), - NULL, - NULL, -- g_cclosure_marshal_VOID__STRING, -+ g_cclosure_marshal_VOID__OBJECT, - G_TYPE_NONE, -- 1, G_TYPE_STRING); -+ 1, G_TYPE_OBJECT); - - g_type_class_add_private (klass, sizeof (GdmDisplayStorePrivate)); - } -diff --git a/daemon/gdm-display-store.h b/daemon/gdm-display-store.h -index 28359933..0aff8ee2 100644 ---- a/daemon/gdm-display-store.h -+++ b/daemon/gdm-display-store.h -@@ -49,7 +49,7 @@ typedef struct - void (* display_added) (GdmDisplayStore *display_store, - const char *id); - void (* display_removed) (GdmDisplayStore *display_store, -- const char *id); -+ GdmDisplay *display); - } GdmDisplayStoreClass; - - typedef enum -diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c -index 5f1ae89e..39f3e30a 100644 ---- a/daemon/gdm-local-display-factory.c -+++ b/daemon/gdm-local-display-factory.c -@@ -805,18 +805,11 @@ on_display_added (GdmDisplayStore *display_store, - - static void - on_display_removed (GdmDisplayStore *display_store, -- const char *id, -+ GdmDisplay *display, - GdmLocalDisplayFactory *factory) - { -- GdmDisplay *display; -- -- display = gdm_display_store_lookup (display_store, id); -- -- if (display != NULL) { -- g_signal_handlers_disconnect_by_func (display, G_CALLBACK (on_display_status_changed), factory); -- g_object_weak_unref (G_OBJECT (display), (GWeakNotify)on_display_disposed, factory); -- -- } -+ g_signal_handlers_disconnect_by_func (display, G_CALLBACK (on_display_status_changed), factory); -+ g_object_weak_unref (G_OBJECT (display), (GWeakNotify)on_display_disposed, factory); - } - - static gboolean -diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c -index f17bd1a5..f6684a8b 100644 ---- a/daemon/gdm-manager.c -+++ b/daemon/gdm-manager.c -@@ -1541,19 +1541,18 @@ on_display_status_changed (GdmDisplay *display, - - static void - on_display_removed (GdmDisplayStore *display_store, -- const char *id, -+ GdmDisplay *display, - GdmManager *manager) - { -- GdmDisplay *display; -+ char *id; - -- display = gdm_display_store_lookup (display_store, id); -- if (display != NULL) { -- g_dbus_object_manager_server_unexport (manager->priv->object_manager, id); -+ gdm_display_get_id (display, &id, NULL); -+ g_dbus_object_manager_server_unexport (manager->priv->object_manager, id); -+ g_free (id); - -- g_signal_handlers_disconnect_by_func (display, G_CALLBACK (on_display_status_changed), manager); -+ g_signal_handlers_disconnect_by_func (display, G_CALLBACK (on_display_status_changed), manager); - -- g_signal_emit (manager, signals[DISPLAY_REMOVED], 0, id); -- } -+ g_signal_emit (manager, signals[DISPLAY_REMOVED], 0, display); - } - - static void -@@ -2535,9 +2534,9 @@ gdm_manager_class_init (GdmManagerClass *klass) - G_STRUCT_OFFSET (GdmManagerClass, display_removed), - NULL, - NULL, -- g_cclosure_marshal_VOID__STRING, -+ g_cclosure_marshal_VOID__OBJECT, - G_TYPE_NONE, -- 1, G_TYPE_STRING); -+ 1, G_TYPE_OBJECT); - - g_object_class_install_property (object_class, - PROP_XDMCP_ENABLED, -diff --git a/daemon/gdm-manager.h b/daemon/gdm-manager.h -index 41c68a7a..c8fb3f22 100644 ---- a/daemon/gdm-manager.h -+++ b/daemon/gdm-manager.h -@@ -24,6 +24,7 @@ - - #include - -+#include "gdm-display.h" - #include "gdm-manager-glue.h" - - G_BEGIN_DECLS -@@ -50,7 +51,7 @@ typedef struct - void (* display_added) (GdmManager *manager, - const char *id); - void (* display_removed) (GdmManager *manager, -- const char *id); -+ GdmDisplay *display); - } GdmManagerClass; - - typedef enum --- -2.17.1 - -- cgit v1.2.3 From d0b19e445cd542b8336e47801c6aacd9361ed5a7 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 5 Dec 2018 22:32:10 +0100 Subject: gnu: libgdata: Update to 0.17.9. * gnu/packages/gnome.scm (libgdata): Update to 0.17.9. [inputs]: Move glib, json-glib, and libsoup from here... [propagated-inputs]: ...to here. * gnu/packages/patches/libgdata-fix-tests.patch: Remove file. * gnu/packages/patches/libgdata-glib-duplicate-tests.patch: Likewise. * gnu/local.mk (dist_patch_DATA): Remove patches. --- gnu/local.mk | 2 - gnu/packages/gnome.scm | 17 +- gnu/packages/patches/libgdata-fix-tests.patch | 325 --------------------- .../patches/libgdata-glib-duplicate-tests.patch | 16 - 4 files changed, 8 insertions(+), 352 deletions(-) delete mode 100644 gnu/packages/patches/libgdata-fix-tests.patch delete mode 100644 gnu/packages/patches/libgdata-glib-duplicate-tests.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 12a64b23f9..2051df8d85 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -997,8 +997,6 @@ dist_patch_DATA = \ %D%/packages/patches/libgpg-error-gawk-compat.patch \ %D%/packages/patches/libgit2-avoid-python.patch \ %D%/packages/patches/libgit2-mtime-0.patch \ - %D%/packages/patches/libgdata-fix-tests.patch \ - %D%/packages/patches/libgdata-glib-duplicate-tests.patch \ %D%/packages/patches/libgnome-encoding.patch \ %D%/packages/patches/libgnomeui-utf8.patch \ %D%/packages/patches/libffi-3.2.1-complex-alpha.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index bc59c58d4f..221c79e6a9 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -357,10 +357,12 @@ relationship modeling, and network diagrams. The program supports various file formats like PNG, SVG, PDF and EPS.") (license license:gpl2+)))) +;; This is the unstable release, but it is required for the current stable +;; release of gvfs (1.38.1). (define-public libgdata (package (name "libgdata") - (version "0.16.1") + (version "0.17.9") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -368,10 +370,7 @@ formats like PNG, SVG, PDF and EPS.") name "-" version ".tar.xz")) (sha256 (base32 - "09q8h1129xjpw33rvzz7856drygxwlm0s64z9cm0vbmjxiqy0h47")) - (patches - (search-patches "libgdata-fix-tests.patch" - "libgdata-glib-duplicate-tests.patch")))) + "0fj54yqxdapdppisqm1xcyrpgcichdmipq0a0spzz6009ikzgi45")))) (build-system gnu-build-system) (arguments '(#:phases @@ -391,14 +390,14 @@ formats like PNG, SVG, PDF and EPS.") ("uhttpmock" ,uhttpmock))) (inputs `(("cyrus-sasl" ,cyrus-sasl) - ("glib" ,glib) - ("glib-networking" ,glib-networking) - ("json-glib" ,json-glib) - ("libsoup" ,libsoup))) + ("glib-networking" ,glib-networking))) (propagated-inputs `(("gcr" ,gcr) + ("glib" ,glib) ("gnome-online-accounts:lib" ,gnome-online-accounts "lib") + ("json-glib" ,json-glib) ("liboauth" ,liboauth) + ("libsoup" ,libsoup) ("libxml2" ,libxml2))) (home-page "https://wiki.gnome.org/Projects/libgdata") (synopsis "Library for accessing online service APIs") diff --git a/gnu/packages/patches/libgdata-fix-tests.patch b/gnu/packages/patches/libgdata-fix-tests.patch deleted file mode 100644 index dc86b3ab5a..0000000000 --- a/gnu/packages/patches/libgdata-fix-tests.patch +++ /dev/null @@ -1,325 +0,0 @@ -From c87a112246e0bcbd5c3a8aa484a50c617d710dbf Mon Sep 17 00:00:00 2001 -From: Philip Withnall -Date: Fri, 12 Dec 2014 17:31:01 +0000 -Subject: [PATCH] tests: Eliminate ISO 8601 formatting workaround for dates - -Follow up to commit 732017e4e5235e28c578cc3367fa0c4548b65495. - -https://bugzilla.gnome.org/show_bug.cgi?id=739956 ---- - gdata/tests/calendar.c | 20 ++++++++++---------- - gdata/tests/general.c | 34 +++++++++++++++++----------------- - gdata/tests/tasks.c | 34 +++++++++++++++++----------------- - gdata/tests/youtube.c | 16 ++++++++-------- - 4 files changed, 52 insertions(+), 52 deletions(-) - -diff --git a/gdata/tests/calendar.c b/gdata/tests/calendar.c -index bb1d609..c54ddda 100644 ---- a/gdata/tests/calendar.c -+++ b/gdata/tests/calendar.c -@@ -620,7 +620,7 @@ test_event_xml (void) - "" - "" - "" -- "" -+ "" - "" -@@ -706,7 +706,7 @@ test_event_xml_dates (void) - "" - "" - "" -- "" -+ "" - "" - ""); - -@@ -934,25 +934,25 @@ test_query_uri (void) - - /* Check the built query URI with a normal feed URI */ - query_uri = gdata_query_get_query_uri (GDATA_QUERY (query), "http://example.com"); -- g_assert_cmpstr (query_uri, ==, "http://example.com?q=q&futureevents=true&orderby=starttime&recurrence-expansion-start=2009-04-17T15:00:00.000001+00:00" -- "&recurrence-expansion-end=2010-04-17T15:00:00.000001+00:00&singleevents=true&sortorder=descending" -- "&start-min=2009-04-17T15:00:00.000001+00:00&start-max=2010-04-17T15:00:00.000001+00:00&ctz=America%2FLos_Angeles&max-attendees=15" -+ g_assert_cmpstr (query_uri, ==, "http://example.com?q=q&futureevents=true&orderby=starttime&recurrence-expansion-start=2009-04-17T15:00:00Z" -+ "&recurrence-expansion-end=2010-04-17T15:00:00Z&singleevents=true&sortorder=descending" -+ "&start-min=2009-04-17T15:00:00Z&start-max=2010-04-17T15:00:00Z&ctz=America%2FLos_Angeles&max-attendees=15" - "&showdeleted=true"); - g_free (query_uri); - - /* …with a feed URI with a trailing slash */ - query_uri = gdata_query_get_query_uri (GDATA_QUERY (query), "http://example.com/"); -- g_assert_cmpstr (query_uri, ==, "http://example.com/?q=q&futureevents=true&orderby=starttime&recurrence-expansion-start=2009-04-17T15:00:00.000001+00:00" -- "&recurrence-expansion-end=2010-04-17T15:00:00.000001+00:00&singleevents=true&sortorder=descending" -- "&start-min=2009-04-17T15:00:00.000001+00:00&start-max=2010-04-17T15:00:00.000001+00:00&ctz=America%2FLos_Angeles&max-attendees=15" -+ g_assert_cmpstr (query_uri, ==, "http://example.com/?q=q&futureevents=true&orderby=starttime&recurrence-expansion-start=2009-04-17T15:00:00Z" -+ "&recurrence-expansion-end=2010-04-17T15:00:00Z&singleevents=true&sortorder=descending" -+ "&start-min=2009-04-17T15:00:00Z&start-max=2010-04-17T15:00:00Z&ctz=America%2FLos_Angeles&max-attendees=15" - "&showdeleted=true"); - g_free (query_uri); - - /* …with a feed URI with pre-existing arguments */ - query_uri = gdata_query_get_query_uri (GDATA_QUERY (query), "http://example.com/bar/?test=test&this=that"); - g_assert_cmpstr (query_uri, ==, "http://example.com/bar/?test=test&this=that&q=q&futureevents=true&orderby=starttime" -- "&recurrence-expansion-start=2009-04-17T15:00:00.000001+00:00&recurrence-expansion-end=2010-04-17T15:00:00.000001+00:00" -- "&singleevents=true&sortorder=descending&start-min=2009-04-17T15:00:00.000001+00:00&start-max=2010-04-17T15:00:00.000001+00:00" -+ "&recurrence-expansion-start=2009-04-17T15:00:00Z&recurrence-expansion-end=2010-04-17T15:00:00Z" -+ "&singleevents=true&sortorder=descending&start-min=2009-04-17T15:00:00Z&start-max=2010-04-17T15:00:00Z" - "&ctz=America%2FLos_Angeles&max-attendees=15&showdeleted=true"); - g_free (query_uri); - -diff --git a/gdata/tests/general.c b/gdata/tests/general.c -index 237a908..f828d2e 100644 ---- a/gdata/tests/general.c -+++ b/gdata/tests/general.c -@@ -528,8 +528,8 @@ test_entry_parse_xml (void) - "" - "" - "Testing unhandled XML" -- "2009-01-25T14:07:37.000001+00:00" -- "2009-01-23T14:06:37.000001+00:00" -+ "2009-01-25T14:07:37Z" -+ "2009-01-23T14:06:37Z" - "Here we test unhandled XML elements." - "Test!" - "" -@@ -569,8 +569,8 @@ test_entry_parse_xml_kind_category (void) - "" - "" - "Testing kind categories" -- "2009-01-25T14:07:37.000001+00:00" -- "2009-01-23T14:06:37.000001+00:00" -+ "2009-01-25T14:07:37Z" -+ "2009-01-23T14:06:37Z" - "Here we test kind categories." - "" - "Escaped content & stuff" - "http://foo.com/?foo&bar" -- "2010-12-10T17:21:24.000001+00:00" -- "2010-12-10T17:21:24.000001+00:00" -+ "2010-12-10T17:21:24Z" -+ "2010-12-10T17:21:24Z" - "Summary & stuff" - "Free & open source" - "Content & things." -@@ -1106,7 +1106,7 @@ test_feed_escaping (void) - "" - "Test feed & stuff." - "http://foo.com?foo&bar" -- "2010-12-10T17:49:15.000001+00:00" -+ "2010-12-10T17:49:15Z" - ""); - g_object_unref (feed); - } -@@ -1157,28 +1157,28 @@ test_query_dates (void) - /* updated-min */ - gdata_query_set_updated_min (query, 1373280114); /* 2013-07-08T10:41:54Z */ - query_uri = gdata_query_get_query_uri (query, "http://example.com"); -- g_assert_cmpstr (query_uri, ==, "http://example.com?q=baz&updated-min=2013-07-08T10:41:54.000001+00:00"); -+ g_assert_cmpstr (query_uri, ==, "http://example.com?q=baz&updated-min=2013-07-08T10:41:54Z"); - g_free (query_uri); - gdata_query_set_updated_min (query, -1); - - /* updated-max */ - gdata_query_set_updated_max (query, 1373280114); /* 2013-07-08T10:41:54Z */ - query_uri = gdata_query_get_query_uri (query, "http://example.com"); -- g_assert_cmpstr (query_uri, ==, "http://example.com?q=baz&updated-max=2013-07-08T10:41:54.000001+00:00"); -+ g_assert_cmpstr (query_uri, ==, "http://example.com?q=baz&updated-max=2013-07-08T10:41:54Z"); - g_free (query_uri); - gdata_query_set_updated_max (query, -1); - - /* published-min */ - gdata_query_set_published_min (query, 1373280114); /* 2013-07-08T10:41:54Z */ - query_uri = gdata_query_get_query_uri (query, "http://example.com"); -- g_assert_cmpstr (query_uri, ==, "http://example.com?q=baz&published-min=2013-07-08T10:41:54.000001+00:00"); -+ g_assert_cmpstr (query_uri, ==, "http://example.com?q=baz&published-min=2013-07-08T10:41:54Z"); - g_free (query_uri); - gdata_query_set_published_min (query, -1); - - /* published-max */ - gdata_query_set_published_max (query, 1373280114); /* 2013-07-08T10:41:54Z */ - query_uri = gdata_query_get_query_uri (query, "http://example.com"); -- g_assert_cmpstr (query_uri, ==, "http://example.com?q=baz&published-max=2013-07-08T10:41:54.000001+00:00"); -+ g_assert_cmpstr (query_uri, ==, "http://example.com?q=baz&published-max=2013-07-08T10:41:54Z"); - g_free (query_uri); - gdata_query_set_published_max (query, -1); - -@@ -3127,7 +3127,7 @@ test_gd_reminder (void) - gdata_test_assert_xml (reminder, - "" - ""); -+ "absoluteTime='2005-06-07T00:55:00Z' method='alert'/>"); - g_object_unref (reminder); - } - -@@ -3218,8 +3218,8 @@ test_gd_when (void) - /* Check the outputted XML is the same */ - gdata_test_assert_xml (when, - "" -- ""); -+ ""); - g_object_unref (when); - - /* Now parse a time with different information */ -@@ -3258,7 +3258,7 @@ test_gd_when (void) - "" - "" -- "" -+ "" - "" - ""); - g_object_unref (when); -@@ -3278,7 +3278,7 @@ test_gd_when_escaping (void) - gdata_test_assert_xml (when, - "" - ""); -+ "startTime='2005-06-07T01:00:00Z' valueString='Value string & stuff!'/>"); - g_object_unref (when); - } - -diff --git a/gdata/tests/tasks.c b/gdata/tests/tasks.c -index 7a5bc7e..7bf3174 100644 ---- a/gdata/tests/tasks.c -+++ b/gdata/tests/tasks.c -@@ -122,11 +122,11 @@ test_query_uri (void) - g_assert_cmpstr (query_uri, ==, - "http://example.com" - "?maxResults=10" -- "&updatedMin=1970-01-01T01:53:09.000001+00:00" -- "&completedMin=1970-01-01T01:34:38.000001+00:00" -- "&completedMax=1970-01-01T00:20:34.000001+00:00" -- "&dueMin=1970-01-01T00:39:05.000001+00:00" -- "&dueMax=1970-01-01T00:57:36.000001+00:00" -+ "&updatedMin=1970-01-01T01:53:09Z" -+ "&completedMin=1970-01-01T01:34:38Z" -+ "&completedMax=1970-01-01T00:20:34Z" -+ "&dueMin=1970-01-01T00:39:05Z" -+ "&dueMax=1970-01-01T00:57:36Z" - "&showCompleted=true" - "&showDeleted=true" - "&showHidden=true"); -@@ -148,11 +148,11 @@ test_query_uri (void) - g_assert_cmpstr (query_uri, ==, - "http://example.com" - "?maxResults=10" -- "&updatedMin=1970-01-01T01:53:09.000001+00:00" -- "&completedMin=1970-01-01T01:34:38.000001+00:00" -- "&completedMax=1970-01-01T00:20:34.000001+00:00" -- "&dueMin=1970-01-01T00:39:05.000001+00:00" -- "&dueMax=1970-01-01T00:57:36.000001+00:00" -+ "&updatedMin=1970-01-01T01:53:09Z" -+ "&completedMin=1970-01-01T01:34:38Z" -+ "&completedMax=1970-01-01T00:20:34Z" -+ "&dueMin=1970-01-01T00:39:05Z" -+ "&dueMax=1970-01-01T00:57:36Z" - "&showCompleted=false" - "&showDeleted=false" - "&showHidden=false"); -@@ -317,8 +317,8 @@ test_task_properties (void) - "\"title\": \"some-other-title\"," - "\"notes\": \"more-notes\"," - "\"status\": \"completed\"," -- "\"due\": \"2014-08-30T17:20:00.000001+00:00\"," -- "\"completed\": \"2014-08-30T17:20:00.000001+00:00\"," -+ "\"due\": \"2014-08-30T17:20:00Z\"," -+ "\"completed\": \"2014-08-30T17:20:00Z\"," - "\"deleted\": true," - "\"hidden\": false" - "}"); -@@ -332,8 +332,8 @@ test_task_properties (void) - "\"title\": \"some-other-title\"," - "\"notes\": \"more-notes\"," - "\"status\": \"completed\"," -- "\"due\": \"2014-08-30T17:20:00.000001+00:00\"," -- "\"completed\": \"2014-08-30T17:20:00.000001+00:00\"," -+ "\"due\": \"2014-08-30T17:20:00Z\"," -+ "\"completed\": \"2014-08-30T17:20:00Z\"," - "\"deleted\": false," - "\"hidden\": false" - "}"); -@@ -496,14 +496,14 @@ test_task_parser_normal (void) - "\"id\": \"some-id\"," - "\"etag\": \"some-etag\"," - "\"title\": \"some-title \\\"with quotes\\\"\"," -- "\"updated\": \"2014-08-30T19:40:00.000001+00:00\"," -+ "\"updated\": \"2014-08-30T19:40:00Z\"," - "\"selfLink\": \"http://some-uri/\"," - "\"parent\": \"some-parent-id\"," - "\"position\": \"some-position\"," - "\"notes\": \"Some notes!\"," - "\"status\": \"needsAction\"," -- "\"due\": \"2014-08-30T20:00:00.000001+00:00\"," -- "\"completed\": \"2014-08-30T20:10:05.000001+00:00\"," -+ "\"due\": \"2014-08-30T20:00:00Z\"," -+ "\"completed\": \"2014-08-30T20:10:05Z\"," - "\"deleted\": false," - "\"hidden\": true," - /* Unhandled for the moment: */ -diff --git a/gdata/tests/youtube.c b/gdata/tests/youtube.c -index a1e070a..1195bc3 100644 ---- a/gdata/tests/youtube.c -+++ b/gdata/tests/youtube.c -@@ -967,8 +967,8 @@ test_parsing_yt_recorded (void) - "gd:etag='W/\"CEMFSX47eCp7ImA9WxVUGEw.\"'>" - "Judas Priest - Painkiller" - "tag:youtube.com,2008:video:JAagedeKdcQ" -- "2009-03-23T12:46:58.000001+00:00" -- "2006-05-16T14:06:37.000001+00:00" -+ "2009-03-23T12:46:58Z" -+ "2006-05-16T14:06:37Z" - "" - "" - "" -@@ -1055,8 +1055,8 @@ test_parsing_yt_access_control (void) - "gd:etag='W/\"CEMFSX47eCp7ImA9WxVUGEw.\"'>" - "Judas Priest - Painkiller" - "tag:youtube.com,2008:video:JAagedeKdcQ" -- "2009-03-23T12:46:58.000001+00:00" -- "2006-05-16T14:06:37.000001+00:00" -+ "2009-03-23T12:46:58Z" -+ "2006-05-16T14:06:37Z" - "" - "" - "" -@@ -1255,8 +1255,8 @@ test_parsing_georss_where (void) - "xmlns:gml='http://www.opengis.net/gml'>" - "Some video somewhere" - "tag:youtube.com,2008:video:JAagedeKdcQ" -- "2009-03-23T12:46:58.000001+00:00" -- "2006-05-16T14:06:37.000001+00:00" -+ "2009-03-23T12:46:58Z" -+ "2006-05-16T14:06:37Z" - "" - "" - "" -@@ -1295,8 +1295,8 @@ test_parsing_georss_where (void) - "xmlns:gml='http://www.opengis.net/gml'>" - "Some video somewhere" - "tag:youtube.com,2008:video:JAagedeKdcQ" -- "2009-03-23T12:46:58.000001+00:00" -- "2006-05-16T14:06:37.000001+00:00" -+ "2009-03-23T12:46:58Z" -+ "2006-05-16T14:06:37Z" - "" - "" - "" --- -1.9.3 diff --git a/gnu/packages/patches/libgdata-glib-duplicate-tests.patch b/gnu/packages/patches/libgdata-glib-duplicate-tests.patch deleted file mode 100644 index d5d8d064de..0000000000 --- a/gnu/packages/patches/libgdata-glib-duplicate-tests.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -ur a/gdata/tests/oauth1-authorizer.c b/gdata/tests/oauth1-authorizer.c ---- a/gdata/tests/oauth1-authorizer.c 1969-12-31 19:00:00.000000000 -0500 -+++ b/gdata/tests/oauth1-authorizer.c 2017-05-27 19:35:30.551725678 -0400 -@@ -1045,10 +1045,10 @@ - /* Sync request-authentication-uri tests */ - g_test_add ("/oauth1-authorizer/request-authentication-uri/sync", OAuth1AuthorizerData, NULL, set_up_oauth1_authorizer_data, - test_oauth1_authorizer_request_authentication_uri_sync, tear_down_oauth1_authorizer_data); -- g_test_add ("/oauth1-authorizer/request-authentication-uri/sync/multiple-domains", OAuth1AuthorizerData, NULL, -+ g_test_add ("/oauth1-authorizer/request-authentication-uri/sync/multiple-domains1", OAuth1AuthorizerData, NULL, - set_up_oauth1_authorizer_data_multiple_domains, test_oauth1_authorizer_request_authentication_uri_sync, - tear_down_oauth1_authorizer_data); -- g_test_add ("/oauth1-authorizer/request-authentication-uri/sync/multiple-domains", OAuth1AuthorizerData, NULL, -+ g_test_add ("/oauth1-authorizer/request-authentication-uri/sync/multiple-domains2", OAuth1AuthorizerData, NULL, - set_up_oauth1_authorizer_data_locale, test_oauth1_authorizer_request_authentication_uri_sync, - tear_down_oauth1_authorizer_data); - g_test_add ("/oauth1-authorizer/request-authentication-uri/sync/cancellation", OAuth1AuthorizerData, NULL, -- cgit v1.2.3 From 8bdacad26b1209dd4d95f5ca093a9178feb12f5b Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 21 Jun 2019 14:45:14 +0200 Subject: gnu: libcroco: Update to 0.6.13. * gnu/packages/patches/libcroco-CVE-2017-7960.patch, gnu/packages/patches/libcroco-CVE-2017-7961.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/gnome.scm (libcroco): Update to 0.6.13. [source](patches): Remove. --- gnu/local.mk | 2 - gnu/packages/gnome.scm | 7 +-- gnu/packages/patches/libcroco-CVE-2017-7960.patch | 66 ----------------------- gnu/packages/patches/libcroco-CVE-2017-7961.patch | 50 ----------------- 4 files changed, 2 insertions(+), 123 deletions(-) delete mode 100644 gnu/packages/patches/libcroco-CVE-2017-7960.patch delete mode 100644 gnu/packages/patches/libcroco-CVE-2017-7961.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 2051df8d85..d375b8cd1d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -989,8 +989,6 @@ dist_patch_DATA = \ %D%/packages/patches/libbase-use-own-logging.patch \ %D%/packages/patches/libbonobo-activation-test-race.patch \ %D%/packages/patches/libcanberra-sound-theme-freedesktop.patch \ - %D%/packages/patches/libcroco-CVE-2017-7960.patch \ - %D%/packages/patches/libcroco-CVE-2017-7961.patch \ %D%/packages/patches/libdrm-symbol-check.patch \ %D%/packages/patches/libexif-CVE-2016-6328.patch \ %D%/packages/patches/libexif-CVE-2017-7544.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 5537ca6951..f8a6a774da 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -1256,18 +1256,15 @@ the GNOME desktop environment.") (define-public libcroco (package (name "libcroco") - (version "0.6.12") + (version "0.6.13") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" (version-major+minor version) "/" name "-" version ".tar.xz")) - (patches - (search-patches "libcroco-CVE-2017-7960.patch" - "libcroco-CVE-2017-7961.patch")) (sha256 (base32 - "0q7qhi7z64i26zabg9dbs5706fa8pmzp1qhpa052id4zdiabbi6x")))) + "1m110rbj5d2raxcdp4iz0qp172284945awrsbdlq99ksmqsc4zkn")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) diff --git a/gnu/packages/patches/libcroco-CVE-2017-7960.patch b/gnu/packages/patches/libcroco-CVE-2017-7960.patch deleted file mode 100644 index 0319c7389f..0000000000 --- a/gnu/packages/patches/libcroco-CVE-2017-7960.patch +++ /dev/null @@ -1,66 +0,0 @@ -Fix CVE-2017-7960: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7960 - -Patch copied from upstream source repository: - -https://git.gnome.org/browse/libcroco/commit/?id=898e3a8c8c0314d2e6b106809a8e3e93cf9d4394 - -From 898e3a8c8c0314d2e6b106809a8e3e93cf9d4394 Mon Sep 17 00:00:00 2001 -From: Ignacio Casal Quinteiro -Date: Sun, 16 Apr 2017 13:13:43 +0200 -Subject: input: check end of input before reading a byte - -When reading bytes we weren't check that the index wasn't -out of bound and this could produce an invalid read which -could deal to a security bug. ---- - src/cr-input.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/src/cr-input.c b/src/cr-input.c -index 49000b1..3b63a88 100644 ---- a/src/cr-input.c -+++ b/src/cr-input.c -@@ -256,7 +256,7 @@ cr_input_new_from_uri (const gchar * a_file_uri, enum CREncoding a_enc) - *we should free buf here because it's own by CRInput. - *(see the last parameter of cr_input_new_from_buf(). - */ -- buf = NULL ; -+ buf = NULL; - } - - cleanup: -@@ -404,6 +404,8 @@ cr_input_get_nb_bytes_left (CRInput const * a_this) - enum CRStatus - cr_input_read_byte (CRInput * a_this, guchar * a_byte) - { -+ gulong nb_bytes_left = 0; -+ - g_return_val_if_fail (a_this && PRIVATE (a_this) - && a_byte, CR_BAD_PARAM_ERROR); - -@@ -413,6 +415,12 @@ cr_input_read_byte (CRInput * a_this, guchar * a_byte) - if (PRIVATE (a_this)->end_of_input == TRUE) - return CR_END_OF_INPUT_ERROR; - -+ nb_bytes_left = cr_input_get_nb_bytes_left (a_this); -+ -+ if (nb_bytes_left < 1) { -+ return CR_END_OF_INPUT_ERROR; -+ } -+ - *a_byte = PRIVATE (a_this)->in_buf[PRIVATE (a_this)->next_byte_index]; - - if (PRIVATE (a_this)->nb_bytes - -@@ -477,7 +485,6 @@ cr_input_read_char (CRInput * a_this, guint32 * a_char) - if (*a_char == '\n') { - PRIVATE (a_this)->end_of_line = TRUE; - } -- - } - - return status; --- -cgit v0.12 - diff --git a/gnu/packages/patches/libcroco-CVE-2017-7961.patch b/gnu/packages/patches/libcroco-CVE-2017-7961.patch deleted file mode 100644 index 675dbe4f08..0000000000 --- a/gnu/packages/patches/libcroco-CVE-2017-7961.patch +++ /dev/null @@ -1,50 +0,0 @@ -Fix CVE-2017-7961: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7961 - -Patch copied from upstream source repository: - -https://git.gnome.org/browse/libcroco/commit/?id=9ad72875e9f08e4c519ef63d44cdbd94aa9504f7 - -From 9ad72875e9f08e4c519ef63d44cdbd94aa9504f7 Mon Sep 17 00:00:00 2001 -From: Ignacio Casal Quinteiro -Date: Sun, 16 Apr 2017 13:56:09 +0200 -Subject: tknzr: support only max long rgb values - -This fixes a possible out of bound when reading rgbs which -are longer than the support MAXLONG ---- - src/cr-tknzr.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/src/cr-tknzr.c b/src/cr-tknzr.c -index 1a7cfeb..1548c35 100644 ---- a/src/cr-tknzr.c -+++ b/src/cr-tknzr.c -@@ -1279,6 +1279,11 @@ cr_tknzr_parse_rgb (CRTknzr * a_this, CRRgb ** a_rgb) - status = cr_tknzr_parse_num (a_this, &num); - ENSURE_PARSING_COND ((status == CR_OK) && (num != NULL)); - -+ if (num->val > G_MAXLONG) { -+ status = CR_PARSING_ERROR; -+ goto error; -+ } -+ - red = num->val; - cr_num_destroy (num); - num = NULL; -@@ -1298,6 +1303,11 @@ cr_tknzr_parse_rgb (CRTknzr * a_this, CRRgb ** a_rgb) - status = cr_tknzr_parse_num (a_this, &num); - ENSURE_PARSING_COND ((status == CR_OK) && (num != NULL)); - -+ if (num->val > G_MAXLONG) { -+ status = CR_PARSING_ERROR; -+ goto error; -+ } -+ - PEEK_BYTE (a_this, 1, &next_bytes[0]); - if (next_bytes[0] == '%') { - SKIP_CHARS (a_this, 1); --- -cgit v0.12 - -- cgit v1.2.3 From 61f34ae5bbbb492254a3e618548d7019c3b3898f Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 30 Jun 2019 14:18:35 +0200 Subject: gnu: libssh2: Update to 1.9.0. * gnu/packages/patches/libssh2-fix-build-failure-with-gcrypt.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/ssh.scm (libssh2): Update to 1.9.0. [source](patches): Remove. --- gnu/local.mk | 1 - .../libssh2-fix-build-failure-with-gcrypt.patch | 33 ---------------------- gnu/packages/ssh.scm | 14 ++------- 3 files changed, 3 insertions(+), 45 deletions(-) delete mode 100644 gnu/packages/patches/libssh2-fix-build-failure-with-gcrypt.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f90d0cf402..2e4faeb4c4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1020,7 +1020,6 @@ dist_patch_DATA = \ %D%/packages/patches/libsndfile-CVE-2017-8361-8363-8365.patch \ %D%/packages/patches/libsndfile-CVE-2017-8362.patch \ %D%/packages/patches/libsndfile-CVE-2017-12562.patch \ - %D%/packages/patches/libssh2-fix-build-failure-with-gcrypt.patch \ %D%/packages/patches/libtar-CVE-2013-4420.patch \ %D%/packages/patches/libtheora-config-guess.patch \ %D%/packages/patches/libtommath-fix-linkage.patch \ diff --git a/gnu/packages/patches/libssh2-fix-build-failure-with-gcrypt.patch b/gnu/packages/patches/libssh2-fix-build-failure-with-gcrypt.patch deleted file mode 100644 index 4133be7fc9..0000000000 --- a/gnu/packages/patches/libssh2-fix-build-failure-with-gcrypt.patch +++ /dev/null @@ -1,33 +0,0 @@ -This fixes a regression introduced in 1.8.0 where libssh2 fails to build -with the gcrypt backend. - -Upstream bug URL: - -https://github.com/libssh2/libssh2/issues/150 - -Patch copied from upstream source repository: - -https://github.com/libssh2/libssh2/commit/ced924b78a40126606797ef57a74066eb3b4b83f - -From ced924b78a40126606797ef57a74066eb3b4b83f Mon Sep 17 00:00:00 2001 -From: Sergei Trofimovich -Date: Mon, 31 Oct 2016 09:04:33 +0000 -Subject: [PATCH] acinclude.m4: fix ./configure --with-libgcrypt - -diff --git a/acinclude.m4 b/acinclude.m4 -index 734ef07..c78260c 100644 ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -412,9 +412,9 @@ AC_DEFUN([LIBSSH2_CHECKFOR_GCRYPT], [ - - old_LDFLAGS=$LDFLAGS - old_CFLAGS=$CFLAGS -- if test -n "$use_libgcrypt" && test "$use_libgcrypt" != "no"; then -- LDFLAGS="$LDFLAGS -L$use_libgcrypt/lib" -- CFLAGS="$CFLAGS -I$use_libgcrypt/include" -+ if test -n "$with_libgcrypt_prefix" && test "$use_libgcrypt" != "no"; then -+ LDFLAGS="$LDFLAGS -L$with_libgcrypt_prefix/lib" -+ CFLAGS="$CFLAGS -I$with_libgcrypt_prefix/include" - fi - AC_LIB_HAVE_LINKFLAGS([gcrypt], [], [ - #include diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm index c04fa6fbfd..596bc55a12 100644 --- a/gnu/packages/ssh.scm +++ b/gnu/packages/ssh.scm @@ -111,7 +111,7 @@ applications.") (define-public libssh2 (package (name "libssh2") - (version "1.8.2") + (version "1.9.0") (source (origin (method url-fetch) (uri (string-append @@ -119,21 +119,13 @@ applications.") version ".tar.gz")) (sha256 (base32 - "0rqd37pc80nm2pz4sa2m9pfc48axys7jwq1l7z0vii5nyvchg0q8")) - (patches - (search-patches "libssh2-fix-build-failure-with-gcrypt.patch")))) + "1zfsz9nldakfz61d2j70pk29zlmj7w2vv46s9l3x2prhcgaqpyym")))) (build-system gnu-build-system) ;; The installed libssh2.pc file does not include paths to libgcrypt and ;; zlib libraries, so we need to propagate the inputs. (propagated-inputs `(("libgcrypt" ,libgcrypt) ("zlib" ,zlib))) - (arguments `(#:configure-flags `("--with-libgcrypt") - #:phases (modify-phases %standard-phases - (replace 'bootstrap - (lambda _ - (invoke "autoreconf" "-v")))))) - (native-inputs `(("autoconf" ,autoconf) - ("automake" ,automake))) + (arguments `(#:configure-flags `("--with-libgcrypt"))) (synopsis "Client-side C library implementing the SSH2 protocol") (description "libssh2 is a library intended to allow software developers access to -- cgit v1.2.3 From 5f3f70391809f8791c55c05bd1646bc58508fa2c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 2 Jul 2019 16:45:17 +0200 Subject: gnu: glibc: Update to 2.29. * gnu/packages/patches/glibc-bootstrap-system.patch, gnu/packages/patches/glibc-supported-locales.patch: Adjust for glibc 2.29. * gnu/packages/patches/glibc-2.28-supported-locales.patch, gnu/packages/patches/glibc-CVE-2019-7309.patch, gnu/packages/patches/glibc-CVE-2019-9169.patch, gnu/packages/patches/glibc-2.29-git-updates.patch: New files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/base.scm (glibc): Update to 2.29. [source](patches): Add 'glibc-CVE-2019-7309.patch', 'glibc-CVE-2019-9169.patch', and 'glibc-2.29-git-updates.patch'. Remove 'glibc-hurd-magic-pid.patch'. [native-inputs]: Add PYTHON-MINIMAL. (glibc-2.28): New public variable. * gnu/packages/commencement.scm (expat-sans-tests, python-boot0): New variables. (glibc-final-with-bootstrap-bash)[native-inputs]: Add PYTHON-BOOT0. * gnu/packages/python.scm (python-3.7)[arguments]: Disable test that fails with glibc 2.29. --- gnu/local.mk | 4 + gnu/packages/base.scm | 32 +- gnu/packages/commencement.scm | 40 +- .../patches/glibc-2.28-supported-locales.patch | 33 + gnu/packages/patches/glibc-2.29-git-updates.patch | 742 +++++++++++++++++++++ gnu/packages/patches/glibc-CVE-2019-7309.patch | 76 +++ gnu/packages/patches/glibc-CVE-2019-9169.patch | 22 + gnu/packages/patches/glibc-bootstrap-system.patch | 34 +- gnu/packages/patches/glibc-supported-locales.patch | 16 +- gnu/packages/python.scm | 4 +- 10 files changed, 969 insertions(+), 34 deletions(-) create mode 100644 gnu/packages/patches/glibc-2.28-supported-locales.patch create mode 100644 gnu/packages/patches/glibc-2.29-git-updates.patch create mode 100644 gnu/packages/patches/glibc-CVE-2019-7309.patch create mode 100644 gnu/packages/patches/glibc-CVE-2019-9169.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 2e4faeb4c4..d3ace6891d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -858,6 +858,8 @@ dist_patch_DATA = \ %D%/packages/patches/glibc-CVE-2017-1000366-pt3.patch \ %D%/packages/patches/glibc-CVE-2018-11236.patch \ %D%/packages/patches/glibc-CVE-2018-11237.patch \ + %D%/packages/patches/glibc-CVE-2019-7309.patch \ + %D%/packages/patches/glibc-CVE-2019-9169.patch \ %D%/packages/patches/glibc-allow-kernel-2.6.32.patch \ %D%/packages/patches/glibc-boot-2.16.0.patch \ %D%/packages/patches/glibc-boot-2.2.5.patch \ @@ -873,6 +875,8 @@ dist_patch_DATA = \ %D%/packages/patches/glibc-versioned-locpath.patch \ %D%/packages/patches/glibc-2.27-git-fixes.patch \ %D%/packages/patches/glibc-2.28-git-fixes.patch \ + %D%/packages/patches/glibc-2.28-supported-locales.patch \ + %D%/packages/patches/glibc-2.29-git-updates.patch \ %D%/packages/patches/glibc-supported-locales.patch \ %D%/packages/patches/glusterfs-use-PATH-instead-of-hardcodes.patch \ %D%/packages/patches/glog-gcc-5-demangling.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 6585d2eebd..63c22017e7 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -49,6 +49,7 @@ #:use-module (gnu packages texinfo) #:use-module (gnu packages hurd) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python) #:use-module (gnu packages gettext) #:use-module (guix utils) #:use-module (guix packages) @@ -566,15 +567,13 @@ the store.") ;; version 2.28, GNU/Hurd used a different glibc branch. (package (name "glibc") - ;; Note: Always use a dot after the minor version since various places rely - ;; on "version-major+minor" to determine where locales are found. - (version "2.28") + (version "2.29") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz")) (sha256 (base32 - "10iha5ynvdj5m62vgpgqbq4cwvc2yhyl2w9yyyjgfxmdmx8h145i")) + "0jzh58728flfh939a8k9pi1zdyalfzlxmwra7k0rzji5gvavivpk")) (snippet ;; Disable 'ldconfig' and /etc/ld.so.cache. The latter is ;; required on LFS distros to avoid loading the distro's libc.so @@ -586,12 +585,13 @@ the store.") #t)) (modules '((guix build utils))) (patches (search-patches "glibc-ldd-x86_64.patch" - "glibc-2.28-git-fixes.patch" + "glibc-CVE-2019-7309.patch" + "glibc-CVE-2019-9169.patch" + "glibc-2.29-git-updates.patch" "glibc-hidden-visibility-ldconfig.patch" "glibc-versioned-locpath.patch" "glibc-allow-kernel-2.6.32.patch" "glibc-reinstate-prlimit64-fallback.patch" - "glibc-hurd-magic-pid.patch" "glibc-supported-locales.patch")))) (build-system gnu-build-system) @@ -789,6 +789,7 @@ the store.") ("perl" ,perl) ("bison" ,bison) ("gettext" ,gettext-minimal) + ("python" ,python-minimal) ,@(if (hurd-target?) `(("mig" ,mig) @@ -818,6 +819,25 @@ with the Linux kernel.") ;; Below are old libc versions, which we use mostly to build locale data in ;; the old format (which the new libc cannot cope with.) +(define-public glibc-2.28 + (package + (inherit glibc) + (version "2.28") + (source (origin + (inherit (package-source glibc)) + (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz")) + (sha256 + (base32 + "10iha5ynvdj5m62vgpgqbq4cwvc2yhyl2w9yyyjgfxmdmx8h145i")) + (patches (search-patches "glibc-ldd-x86_64.patch" + "glibc-2.28-git-fixes.patch" + "glibc-hidden-visibility-ldconfig.patch" + "glibc-versioned-locpath.patch" + "glibc-allow-kernel-2.6.32.patch" + "glibc-reinstate-prlimit64-fallback.patch" + "glibc-hurd-magic-pid.patch" + "glibc-2.28-supported-locales.patch")))))) + (define-public glibc-2.27 (package (inherit glibc) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 230b63364a..d28296449d 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -44,10 +44,12 @@ #:use-module (gnu packages compression) #:use-module (gnu packages mes) #:use-module (gnu packages perl) + #:use-module (gnu packages python) #:use-module (gnu packages linux) #:use-module (gnu packages hurd) #:use-module (gnu packages texinfo) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages xml) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) @@ -1843,6 +1845,41 @@ the bootstrap environment." (current-source-location) #:guile %bootstrap-guile)))) +(define expat-sans-tests + (package + (inherit expat) + (arguments + ;; XXX: Linking 'runtestscpp' fails with things like: + ;; + ;; ld: Dwarf Error: found dwarf version '3789', this reader only handles version 2 and 3 information. + ;; + ;; Skip tests altogether. + (substitute-keyword-arguments (package-arguments expat) + ((#:configure-flags flags ''()) + ;; Since we're not passing the right -Wl,-rpath flags, build the + ;; static library to avoid RUNPATH validation failure. + `(cons "--disable-shared" ,flags)) + ((#:tests? _ #f) #f))))) + +(define python-boot0 + (let ((python (package + (inherit python-minimal) + (inputs + `(("expat" ,expat-sans-tests))) ;remove OpenSSL, zlib, etc. + (arguments + (substitute-keyword-arguments (package-arguments + python-minimal) + ;; Disable features that cannot be built at this stage. + ((#:configure-flags _ ''()) + `(list "--without-ensurepip")) + ((#:make-flags _ ''()) + `(list "MODDISABLED_NAMES=_ctypes ossaudiodev")) + ((#:tests? _ #f) #f)))))) + (package-with-bootstrap-guile + (package-with-explicit-inputs python %boot0-inputs + (current-source-location) + #:guile %bootstrap-guile)))) + (define (ld-wrapper-boot0) ;; We need this so binaries on Hurd will have libmachuser and libhurduser ;; in their RUNPATH, otherwise validate-runpath will fail. @@ -1906,7 +1943,8 @@ the bootstrap environment." (native-inputs `(("bison" ,bison-boot0) ("texinfo" ,texinfo-boot0) - ("perl" ,perl-boot0))) + ("perl" ,perl-boot0) + ("python" ,python-boot0))) (inputs `(;; The boot inputs. That includes the bootstrap libc. We don't want ;; it in $CPATH, hence the 'pre-configure' phase above. diff --git a/gnu/packages/patches/glibc-2.28-supported-locales.patch b/gnu/packages/patches/glibc-2.28-supported-locales.patch new file mode 100644 index 0000000000..2888052bb8 --- /dev/null +++ b/gnu/packages/patches/glibc-2.28-supported-locales.patch @@ -0,0 +1,33 @@ +This patch is taken from debian's glibc package (generate-supported.mk). +It install the localedata/SUPPORTED file of the glibc. This file lists +all the supported locales of the glibc. + +diff --git a/localedata/Makefile.old b/localedata/Makefile +index 34877c0..a61d9b9 100644 +--- a/localedata/Makefile.old ++++ b/localedata/Makefile +@@ -91,7 +91,8 @@ endif + # Files to install. + install-others := $(addprefix $(inst_i18ndir)/, \ + $(addsuffix .gz, $(charmaps)) \ +- $(locales)) ++ $(locales)) \ ++ $(inst_i18ndir)/SUPPORTED + + tests: $(objdir)/iconvdata/gconv-modules + +@@ -195,6 +196,14 @@ endif + + include SUPPORTED + ++$(inst_i18ndir)/SUPPORTED: SUPPORTED $(+force) ++ for locale in $(SUPPORTED-LOCALES); do \ ++ [ $$locale = true ] && continue; \ ++ echo $$locale | sed 's,/, ,' >> LOCALES; \ ++ done ++ $(make-target-directory) ++ $(INSTALL_DATA) LOCALES $@ ++ + INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES)) + + # Sometimes the whole collection of locale files should be installed. diff --git a/gnu/packages/patches/glibc-2.29-git-updates.patch b/gnu/packages/patches/glibc-2.29-git-updates.patch new file mode 100644 index 0000000000..5750e9cac1 --- /dev/null +++ b/gnu/packages/patches/glibc-2.29-git-updates.patch @@ -0,0 +1,742 @@ +This file tracks updates from the "release/2.29/master" branch: +https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/release/2.29/master + +Abridged commits are appended to this file. + +From ec894251ef11723d10df04fcfd7bd2030c6e43ff Mon Sep 17 00:00:00 2001 +From: Carlos O'Donell +Date: Mon, 21 Jan 2019 22:50:12 -0500 +Subject: [PATCH] nptl: Fix pthread_rwlock_try*lock stalls (Bug 23844) +diff --git a/nptl/pthread_rwlock_tryrdlock.c b/nptl/pthread_rwlock_tryrdlock.c +index 368862ff07..2f94f17f36 100644 +--- a/nptl/pthread_rwlock_tryrdlock.c ++++ b/nptl/pthread_rwlock_tryrdlock.c +@@ -94,15 +94,22 @@ __pthread_rwlock_tryrdlock (pthread_rwlock_t *rwlock) + /* Same as in __pthread_rwlock_rdlock_full: + We started the read phase, so we are also responsible for + updating the write-phase futex. Relaxed MO is sufficient. +- Note that there can be no other reader that we have to wake +- because all other readers will see the read phase started by us +- (or they will try to start it themselves); if a writer started +- the read phase, we cannot have started it. Furthermore, we +- cannot discard a PTHREAD_RWLOCK_FUTEX_USED flag because we will +- overwrite the value set by the most recent writer (or the readers +- before it in case of explicit hand-over) and we know that there +- are no waiting readers. */ +- atomic_store_relaxed (&rwlock->__data.__wrphase_futex, 0); ++ We have to do the same steps as a writer would when handing over the ++ read phase to use because other readers cannot distinguish between ++ us and the writer. ++ Note that __pthread_rwlock_tryrdlock callers will not have to be ++ woken up because they will either see the read phase started by us ++ or they will try to start it themselves; however, callers of ++ __pthread_rwlock_rdlock_full just increase the reader count and then ++ check what state the lock is in, so they cannot distinguish between ++ us and a writer that acquired and released the lock in the ++ meantime. */ ++ if ((atomic_exchange_relaxed (&rwlock->__data.__wrphase_futex, 0) ++ & PTHREAD_RWLOCK_FUTEX_USED) != 0) ++ { ++ int private = __pthread_rwlock_get_private (rwlock); ++ futex_wake (&rwlock->__data.__wrphase_futex, INT_MAX, private); ++ } + } + + return 0; +diff --git a/nptl/pthread_rwlock_trywrlock.c b/nptl/pthread_rwlock_trywrlock.c +index fd37a71ce4..fae475cc70 100644 +--- a/nptl/pthread_rwlock_trywrlock.c ++++ b/nptl/pthread_rwlock_trywrlock.c +@@ -46,8 +46,15 @@ __pthread_rwlock_trywrlock (pthread_rwlock_t *rwlock) + &rwlock->__data.__readers, &r, + r | PTHREAD_RWLOCK_WRPHASE | PTHREAD_RWLOCK_WRLOCKED)) + { ++ /* We have become the primary writer and we cannot have shared ++ the PTHREAD_RWLOCK_FUTEX_USED flag with someone else, so we ++ can simply enable blocking (see full wrlock code). */ + atomic_store_relaxed (&rwlock->__data.__writers_futex, 1); +- atomic_store_relaxed (&rwlock->__data.__wrphase_futex, 1); ++ /* If we started a write phase, we need to enable readers to ++ wait. If we did not, we must not change it because other threads ++ may have set the PTHREAD_RWLOCK_FUTEX_USED in the meantime. */ ++ if ((r & PTHREAD_RWLOCK_WRPHASE) == 0) ++ atomic_store_relaxed (&rwlock->__data.__wrphase_futex, 1); + atomic_store_relaxed (&rwlock->__data.__cur_writer, + THREAD_GETMEM (THREAD_SELF, tid)); + return 0; +diff --git a/support/Makefile b/support/Makefile +index 432cf2fe6c..c15b93647c 100644 +--- a/support/Makefile ++++ b/support/Makefile +@@ -129,6 +129,7 @@ libsupport-routines = \ + xpthread_mutexattr_settype \ + xpthread_once \ + xpthread_rwlock_init \ ++ xpthread_rwlock_destroy \ + xpthread_rwlock_rdlock \ + xpthread_rwlock_unlock \ + xpthread_rwlock_wrlock \ +diff --git a/support/xpthread_rwlock_destroy.c b/support/xpthread_rwlock_destroy.c +new file mode 100644 +index 0000000000..6d6e953569 +--- /dev/null ++++ b/support/xpthread_rwlock_destroy.c +@@ -0,0 +1,26 @@ ++/* pthread_rwlock_destroy with error checking. ++ Copyright (C) 2019 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++ ++void ++xpthread_rwlock_destroy (pthread_rwlock_t *rwlock) ++{ ++ xpthread_check_return ("pthread_rwlock_destroy", ++ pthread_rwlock_destroy (rwlock)); ++} +diff --git a/support/xthread.h b/support/xthread.h +index 47c23235f3..9fe1f68b3b 100644 +--- a/support/xthread.h ++++ b/support/xthread.h +@@ -84,6 +84,7 @@ void xpthread_rwlockattr_setkind_np (pthread_rwlockattr_t *attr, int pref); + void xpthread_rwlock_wrlock (pthread_rwlock_t *rwlock); + void xpthread_rwlock_rdlock (pthread_rwlock_t *rwlock); + void xpthread_rwlock_unlock (pthread_rwlock_t *rwlock); ++void xpthread_rwlock_destroy (pthread_rwlock_t *rwlock); + + __END_DECLS + +From 44113a8ba24af23d7bbb174f9087a6b83a76289a Mon Sep 17 00:00:00 2001 +From: Stefan Liebler +Date: Thu, 7 Feb 2019 15:18:36 +0100 +Subject: [PATCH] Add compiler barriers around modifications of the robust + mutex list for pthread_mutex_trylock. [BZ #24180] +diff --git a/nptl/pthread_mutex_trylock.c b/nptl/pthread_mutex_trylock.c +index 8fe43b8f0f..bf2869eca2 100644 +--- a/nptl/pthread_mutex_trylock.c ++++ b/nptl/pthread_mutex_trylock.c +@@ -94,6 +94,9 @@ __pthread_mutex_trylock (pthread_mutex_t *mutex) + case PTHREAD_MUTEX_ROBUST_ADAPTIVE_NP: + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, + &mutex->__data.__list.__next); ++ /* We need to set op_pending before starting the operation. Also ++ see comments at ENQUEUE_MUTEX. */ ++ __asm ("" ::: "memory"); + + oldval = mutex->__data.__lock; + do +@@ -119,7 +122,12 @@ __pthread_mutex_trylock (pthread_mutex_t *mutex) + /* But it is inconsistent unless marked otherwise. */ + mutex->__data.__owner = PTHREAD_MUTEX_INCONSISTENT; + ++ /* We must not enqueue the mutex before we have acquired it. ++ Also see comments at ENQUEUE_MUTEX. */ ++ __asm ("" ::: "memory"); + ENQUEUE_MUTEX (mutex); ++ /* We need to clear op_pending after we enqueue the mutex. */ ++ __asm ("" ::: "memory"); + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + + /* Note that we deliberately exist here. If we fall +@@ -135,6 +143,8 @@ __pthread_mutex_trylock (pthread_mutex_t *mutex) + int kind = PTHREAD_MUTEX_TYPE (mutex); + if (kind == PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP) + { ++ /* We do not need to ensure ordering wrt another memory ++ access. Also see comments at ENQUEUE_MUTEX. */ + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, + NULL); + return EDEADLK; +@@ -142,6 +152,8 @@ __pthread_mutex_trylock (pthread_mutex_t *mutex) + + if (kind == PTHREAD_MUTEX_ROBUST_RECURSIVE_NP) + { ++ /* We do not need to ensure ordering wrt another memory ++ access. */ + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, + NULL); + +@@ -160,6 +172,9 @@ __pthread_mutex_trylock (pthread_mutex_t *mutex) + id, 0); + if (oldval != 0 && (oldval & FUTEX_OWNER_DIED) == 0) + { ++ /* We haven't acquired the lock as it is already acquired by ++ another owner. We do not need to ensure ordering wrt another ++ memory access. */ + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + + return EBUSY; +@@ -173,13 +188,20 @@ __pthread_mutex_trylock (pthread_mutex_t *mutex) + if (oldval == id) + lll_unlock (mutex->__data.__lock, + PTHREAD_ROBUST_MUTEX_PSHARED (mutex)); ++ /* FIXME This violates the mutex destruction requirements. See ++ __pthread_mutex_unlock_full. */ + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + return ENOTRECOVERABLE; + } + } + while ((oldval & FUTEX_OWNER_DIED) != 0); + ++ /* We must not enqueue the mutex before we have acquired it. ++ Also see comments at ENQUEUE_MUTEX. */ ++ __asm ("" ::: "memory"); + ENQUEUE_MUTEX (mutex); ++ /* We need to clear op_pending after we enqueue the mutex. */ ++ __asm ("" ::: "memory"); + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + + mutex->__data.__owner = id; +@@ -211,10 +233,15 @@ __pthread_mutex_trylock (pthread_mutex_t *mutex) + } + + if (robust) +- /* Note: robust PI futexes are signaled by setting bit 0. */ +- THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, +- (void *) (((uintptr_t) &mutex->__data.__list.__next) +- | 1)); ++ { ++ /* Note: robust PI futexes are signaled by setting bit 0. */ ++ THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, ++ (void *) (((uintptr_t) &mutex->__data.__list.__next) ++ | 1)); ++ /* We need to set op_pending before starting the operation. Also ++ see comments at ENQUEUE_MUTEX. */ ++ __asm ("" ::: "memory"); ++ } + + oldval = mutex->__data.__lock; + +@@ -223,12 +250,16 @@ __pthread_mutex_trylock (pthread_mutex_t *mutex) + { + if (kind == PTHREAD_MUTEX_ERRORCHECK_NP) + { ++ /* We do not need to ensure ordering wrt another memory ++ access. */ + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + return EDEADLK; + } + + if (kind == PTHREAD_MUTEX_RECURSIVE_NP) + { ++ /* We do not need to ensure ordering wrt another memory ++ access. */ + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + + /* Just bump the counter. */ +@@ -250,6 +281,9 @@ __pthread_mutex_trylock (pthread_mutex_t *mutex) + { + if ((oldval & FUTEX_OWNER_DIED) == 0) + { ++ /* We haven't acquired the lock as it is already acquired by ++ another owner. We do not need to ensure ordering wrt another ++ memory access. */ + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + + return EBUSY; +@@ -270,6 +304,9 @@ __pthread_mutex_trylock (pthread_mutex_t *mutex) + if (INTERNAL_SYSCALL_ERROR_P (e, __err) + && INTERNAL_SYSCALL_ERRNO (e, __err) == EWOULDBLOCK) + { ++ /* The kernel has not yet finished the mutex owner death. ++ We do not need to ensure ordering wrt another memory ++ access. */ + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + + return EBUSY; +@@ -287,7 +324,12 @@ __pthread_mutex_trylock (pthread_mutex_t *mutex) + /* But it is inconsistent unless marked otherwise. */ + mutex->__data.__owner = PTHREAD_MUTEX_INCONSISTENT; + ++ /* We must not enqueue the mutex before we have acquired it. ++ Also see comments at ENQUEUE_MUTEX. */ ++ __asm ("" ::: "memory"); + ENQUEUE_MUTEX (mutex); ++ /* We need to clear op_pending after we enqueue the mutex. */ ++ __asm ("" ::: "memory"); + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + + /* Note that we deliberately exit here. If we fall +@@ -310,13 +352,20 @@ __pthread_mutex_trylock (pthread_mutex_t *mutex) + PTHREAD_ROBUST_MUTEX_PSHARED (mutex)), + 0, 0); + ++ /* To the kernel, this will be visible after the kernel has ++ acquired the mutex in the syscall. */ + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + return ENOTRECOVERABLE; + } + + if (robust) + { ++ /* We must not enqueue the mutex before we have acquired it. ++ Also see comments at ENQUEUE_MUTEX. */ ++ __asm ("" ::: "memory"); + ENQUEUE_MUTEX_PI (mutex); ++ /* We need to clear op_pending after we enqueue the mutex. */ ++ __asm ("" ::: "memory"); + THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); + } + +From c096b008d2671028c21ac8cf01f18a2083e73c44 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Fri, 8 Feb 2019 12:54:41 +0100 +Subject: [PATCH] nptl: Avoid fork handler lock for async-signal-safe fork [BZ + #24161] +--- a/nptl/register-atfork.c ++++ b/nptl/register-atfork.c +@@ -107,13 +107,14 @@ __unregister_atfork (void *dso_handle) + } + + void +-__run_fork_handlers (enum __run_fork_handler_type who) ++__run_fork_handlers (enum __run_fork_handler_type who, _Bool do_locking) + { + struct fork_handler *runp; + + if (who == atfork_run_prepare) + { +- lll_lock (atfork_lock, LLL_PRIVATE); ++ if (do_locking) ++ lll_lock (atfork_lock, LLL_PRIVATE); + size_t sl = fork_handler_list_size (&fork_handlers); + for (size_t i = sl; i > 0; i--) + { +@@ -133,7 +134,8 @@ __run_fork_handlers (enum __run_fork_handler_type who) + else if (who == atfork_run_parent && runp->parent_handler) + runp->parent_handler (); + } +- lll_unlock (atfork_lock, LLL_PRIVATE); ++ if (do_locking) ++ lll_unlock (atfork_lock, LLL_PRIVATE); + } + } + +diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c +index bd68f18b45..14b69a6f89 100644 +--- a/sysdeps/nptl/fork.c ++++ b/sysdeps/nptl/fork.c +@@ -55,7 +55,7 @@ __libc_fork (void) + but our current fork implementation is not. */ + bool multiple_threads = THREAD_GETMEM (THREAD_SELF, header.multiple_threads); + +- __run_fork_handlers (atfork_run_prepare); ++ __run_fork_handlers (atfork_run_prepare, multiple_threads); + + /* If we are not running multiple threads, we do not have to + preserve lock state. If fork runs from a signal handler, only +@@ -134,7 +134,7 @@ __libc_fork (void) + __rtld_lock_initialize (GL(dl_load_lock)); + + /* Run the handlers registered for the child. */ +- __run_fork_handlers (atfork_run_child); ++ __run_fork_handlers (atfork_run_child, multiple_threads); + } + else + { +@@ -149,7 +149,7 @@ __libc_fork (void) + } + + /* Run the handlers registered for the parent. */ +- __run_fork_handlers (atfork_run_parent); ++ __run_fork_handlers (atfork_run_parent, multiple_threads); + } + + return pid; +diff --git a/sysdeps/nptl/fork.h b/sysdeps/nptl/fork.h +index a1c3b26b68..99ed76034b 100644 +--- a/sysdeps/nptl/fork.h ++++ b/sysdeps/nptl/fork.h +@@ -52,10 +52,12 @@ enum __run_fork_handler_type + - atfork_run_child: run all the CHILD_HANDLER and unlocks the internal + lock. + - atfork_run_parent: run all the PARENT_HANDLER and unlocks the internal +- lock. */ +-extern void __run_fork_handlers (enum __run_fork_handler_type who) +- attribute_hidden; ++ lock. ++ ++ Perform locking only if DO_LOCKING. */ ++extern void __run_fork_handlers (enum __run_fork_handler_type who, ++ _Bool do_locking) attribute_hidden; + + /* C library side function to register new fork handlers. */ + extern int __register_atfork (void (*__prepare) (void), + +From 067fc32968b601493f4b247a3ac00caeea3f3d61 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Fri, 15 Feb 2019 21:27:01 +0100 +Subject: [PATCH] nptl: Fix invalid Systemtap probe in pthread_join [BZ #24211] +diff --git a/nptl/pthread_join_common.c b/nptl/pthread_join_common.c +index ecb78ffba5..366feb376b 100644 +--- a/nptl/pthread_join_common.c ++++ b/nptl/pthread_join_common.c +@@ -86,6 +86,7 @@ __pthread_timedjoin_ex (pthread_t threadid, void **thread_return, + pthread_cleanup_pop (0); + } + ++ void *pd_result = pd->result; + if (__glibc_likely (result == 0)) + { + /* We mark the thread as terminated and as joined. */ +@@ -93,7 +94,7 @@ __pthread_timedjoin_ex (pthread_t threadid, void **thread_return, + + /* Store the return value if the caller is interested. */ + if (thread_return != NULL) +- *thread_return = pd->result; ++ *thread_return = pd_result; + + /* Free the TCB. */ + __free_tcb (pd); +@@ -101,7 +102,7 @@ __pthread_timedjoin_ex (pthread_t threadid, void **thread_return, + else + pd->joinid = NULL; + +- LIBC_PROBE (pthread_join_ret, 3, threadid, result, pd->result); ++ LIBC_PROBE (pthread_join_ret, 3, threadid, result, pd_result); + + return result; + } + +From bc6f839fb4066be83272c735e662850af2595777 Mon Sep 17 00:00:00 2001 +From: Stefan Liebler +Date: Wed, 13 Mar 2019 10:45:35 +0100 +Subject: [PATCH] Fix output of LD_SHOW_AUXV=1. +diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c +index 5f6c679a3f..5d19b100b2 100644 +--- a/elf/dl-sysdep.c ++++ b/elf/dl-sysdep.c +@@ -328,14 +328,9 @@ _dl_show_auxv (void) + assert (AT_NULL == 0); + assert (AT_IGNORE == 1); + +- if (av->a_type == AT_HWCAP || av->a_type == AT_HWCAP2 +- || AT_L1I_CACHEGEOMETRY || AT_L1D_CACHEGEOMETRY +- || AT_L2_CACHEGEOMETRY || AT_L3_CACHEGEOMETRY) +- { +- /* These are handled in a special way per platform. */ +- if (_dl_procinfo (av->a_type, av->a_un.a_val) == 0) +- continue; +- } ++ /* Some entries are handled in a special way per platform. */ ++ if (_dl_procinfo (av->a_type, av->a_un.a_val) == 0) ++ continue; + + if (idx < sizeof (auxvars) / sizeof (auxvars[0]) + && auxvars[idx].form != unknown) +diff --git a/sysdeps/powerpc/dl-procinfo.h b/sysdeps/powerpc/dl-procinfo.h +index f542f7318f..dfc3b33a72 100644 +--- a/sysdeps/powerpc/dl-procinfo.h ++++ b/sysdeps/powerpc/dl-procinfo.h +@@ -225,7 +225,7 @@ _dl_procinfo (unsigned int type, unsigned long int word) + break; + } + default: +- /* This should not happen. */ ++ /* Fallback to generic output mechanism. */ + return -1; + } + _dl_printf ("\n"); +diff --git a/sysdeps/sparc/dl-procinfo.h b/sysdeps/sparc/dl-procinfo.h +index 282b8c5117..64ee267fc7 100644 +--- a/sysdeps/sparc/dl-procinfo.h ++++ b/sysdeps/sparc/dl-procinfo.h +@@ -31,8 +31,8 @@ _dl_procinfo (unsigned int type, unsigned long int word) + { + int i; + +- /* Fallback to unknown output mechanism. */ +- if (type == AT_HWCAP2) ++ /* Fallback to generic output mechanism. */ ++ if (type != AT_HWCAP) + return -1; + + _dl_printf ("AT_HWCAP: "); +diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h +index 66c00297b7..05c62c8687 100644 +--- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h ++++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h +@@ -67,7 +67,7 @@ _dl_procinfo (unsigned int type, unsigned long int word) + break; + } + default: +- /* This should not happen. */ ++ /* Fallback to generic output mechanism. */ + return -1; + } + _dl_printf ("\n"); +diff --git a/sysdeps/unix/sysv/linux/i386/dl-procinfo.h b/sysdeps/unix/sysv/linux/i386/dl-procinfo.h +index 22b43431bc..0585cdaa9c 100644 +--- a/sysdeps/unix/sysv/linux/i386/dl-procinfo.h ++++ b/sysdeps/unix/sysv/linux/i386/dl-procinfo.h +@@ -30,8 +30,8 @@ _dl_procinfo (unsigned int type, unsigned long int word) + in the kernel sources. */ + int i; + +- /* Fallback to unknown output mechanism. */ +- if (type == AT_HWCAP2) ++ /* Fallback to generic output mechanism. */ ++ if (type != AT_HWCAP) + return -1; + + _dl_printf ("AT_HWCAP: "); +diff --git a/sysdeps/unix/sysv/linux/s390/dl-procinfo.h b/sysdeps/unix/sysv/linux/s390/dl-procinfo.h +index 19329a335b..d67fde368f 100644 +--- a/sysdeps/unix/sysv/linux/s390/dl-procinfo.h ++++ b/sysdeps/unix/sysv/linux/s390/dl-procinfo.h +@@ -32,8 +32,8 @@ _dl_procinfo (unsigned int type, unsigned long int word) + in the kernel sources. */ + int i; + +- /* Fallback to unknown output mechanism. */ +- if (type == AT_HWCAP2) ++ /* Fallback to generic output mechanism. */ ++ if (type != AT_HWCAP) + return -1; + + _dl_printf ("AT_HWCAP: "); + +From e28ad442e73b00ae2047d89c8cc7f9b2a0de5436 Mon Sep 17 00:00:00 2001 +From: TAMUKI Shoichi +Date: Sat, 2 Mar 2019 21:00:28 +0900 +Subject: [PATCH] ja_JP: Change the offset for Taisho gan-nen from 2 to 1 [BZ + #24162] +diff --git a/localedata/locales/ja_JP b/localedata/locales/ja_JP +index 1fd2fee44b..9bfbb2bb9b 100644 +--- a/localedata/locales/ja_JP ++++ b/localedata/locales/ja_JP +@@ -14951,7 +14951,7 @@ era "+:2:1990//01//01:+*::%EC%Ey";/ + "+:2:1927//01//01:1989//01//07::%EC%Ey";/ + "+:1:1926//12//25:1926//12//31::%EC";/ + "+:2:1913//01//01:1926//12//24::%EC%Ey";/ +- "+:2:1912//07//30:1912//12//31::%EC";/ ++ "+:1:1912//07//30:1912//12//31::%EC";/ + "+:6:1873//01//01:1912//07//29::%EC%Ey";/ + "+:1:0001//01//01:1872//12//31::%EC%Ey";/ + "+:1:-0001//12//31:-*::%EC%Ey" + +From 0941350c20a52447e53c5169354408e3db591f73 Mon Sep 17 00:00:00 2001 +From: TAMUKI Shoichi +Date: Tue, 2 Apr 2019 16:46:55 +0900 +Subject: [PATCH] ja_JP locale: Add entry for the new Japanese era [BZ #22964] +diff --git a/localedata/locales/ja_JP b/localedata/locales/ja_JP +index 9bfbb2bb9b..c64aaaff55 100644 +--- a/localedata/locales/ja_JP ++++ b/localedata/locales/ja_JP +@@ -14946,7 +14946,9 @@ am_pm "";"" + + t_fmt_ampm "%p%I%M%S" + +-era "+:2:1990//01//01:+*::%EC%Ey";/ ++era "+:2:2020//01//01:+*::%EC%Ey";/ ++ "+:1:2019//05//01:2019//12//31::%EC";/ ++ "+:2:1990//01//01:2019//04//30::%EC%Ey";/ + "+:1:1989//01//08:1989//12//31::%EC";/ + "+:2:1927//01//01:1989//01//07::%EC%Ey";/ + "+:1:1926//12//25:1926//12//31::%EC";/ + +From 52b7cd6e9a701bb203023d56e84551943dc6a4c0 Mon Sep 17 00:00:00 2001 +From: Adam Maris +Date: Thu, 14 Mar 2019 16:51:16 -0400 +Subject: [PATCH] malloc: Check for large bin list corruption when inserting + unsorted chunk +diff --git a/malloc/malloc.c b/malloc/malloc.c +index feaf7ee0bf..ce771375b6 100644 +--- a/malloc/malloc.c ++++ b/malloc/malloc.c +@@ -3876,10 +3876,14 @@ _int_malloc (mstate av, size_t bytes) + { + victim->fd_nextsize = fwd; + victim->bk_nextsize = fwd->bk_nextsize; ++ if (__glibc_unlikely (fwd->bk_nextsize->fd_nextsize != fwd)) ++ malloc_printerr ("malloc(): largebin double linked list corrupted (nextsize)"); + fwd->bk_nextsize = victim; + victim->bk_nextsize->fd_nextsize = victim; + } + bck = fwd->bk; ++ if (bck->fd != fwd) ++ malloc_printerr ("malloc(): largebin double linked list corrupted (bk)"); + } + } + else + +From c6177be4b92d5d7df50a785652d1912db511423e Mon Sep 17 00:00:00 2001 +From: Andreas Schwab +Date: Wed, 15 May 2019 17:09:05 +0200 +Subject: [PATCH] Fix crash in _IO_wfile_sync (bug 20568) +diff --git a/libio/wfileops.c b/libio/wfileops.c +index 78f20486e5..bab2ba4892 100644 +--- a/libio/wfileops.c ++++ b/libio/wfileops.c +@@ -508,11 +508,12 @@ _IO_wfile_sync (FILE *fp) + generate the wide characters up to the current reading + position. */ + int nread; +- ++ size_t wnread = (fp->_wide_data->_IO_read_ptr ++ - fp->_wide_data->_IO_read_base); + fp->_wide_data->_IO_state = fp->_wide_data->_IO_last_state; + nread = (*cv->__codecvt_do_length) (cv, &fp->_wide_data->_IO_state, + fp->_IO_read_base, +- fp->_IO_read_end, delta); ++ fp->_IO_read_end, wnread); + fp->_IO_read_ptr = fp->_IO_read_base + nread; + delta = -(fp->_IO_read_end - fp->_IO_read_base - nread); + } + +From e3f828b8bd6e21922da8be8dee35edef09382d8d Mon Sep 17 00:00:00 2001 +From: Mark Wielaard +Date: Wed, 15 May 2019 17:14:01 +0200 +Subject: [PATCH] dlfcn: Guard __dlerror_main_freeres with __libc_once_get + (once) [BZ#24476] +diff --git a/dlfcn/dlerror.c b/dlfcn/dlerror.c +index 27376582d0..ca42c126c1 100644 +--- a/dlfcn/dlerror.c ++++ b/dlfcn/dlerror.c +@@ -72,9 +72,16 @@ __dlerror (void) + __libc_once (once, init); + + /* Get error string. */ +- result = (struct dl_action_result *) __libc_getspecific (key); +- if (result == NULL) +- result = &last_result; ++ if (static_buf != NULL) ++ result = static_buf; ++ else ++ { ++ /* init () has been run and we don't use the static buffer. ++ So we have a valid key. */ ++ result = (struct dl_action_result *) __libc_getspecific (key); ++ if (result == NULL) ++ result = &last_result; ++ } + + /* Test whether we already returned the string. */ + if (result->returned != 0) +@@ -230,13 +237,19 @@ free_key_mem (void *mem) + void + __dlerror_main_freeres (void) + { +- void *mem; + /* Free the global memory if used. */ + check_free (&last_result); +- /* Free the TSD memory if used. */ +- mem = __libc_getspecific (key); +- if (mem != NULL) +- free_key_mem (mem); ++ ++ if (__libc_once_get (once) && static_buf == NULL) ++ { ++ /* init () has been run and we don't use the static buffer. ++ So we have a valid key. */ ++ void *mem; ++ /* Free the TSD memory if used. */ ++ mem = __libc_getspecific (key); ++ if (mem != NULL) ++ free_key_mem (mem); ++ } + } + + struct dlfcn_hook *_dlfcn_hook __attribute__((nocommon)); + +From 95d66fecaabbc92ab53027e808f0fc1929c9f21a Mon Sep 17 00:00:00 2001 +From: Wilco Dijkstra +Date: Fri, 10 May 2019 16:38:21 +0100 +Subject: [PATCH] Fix tcache count maximum (BZ #24531) +diff --git a/malloc/malloc.c b/malloc/malloc.c +index ce771375b6..0abd653be2 100644 +--- a/malloc/malloc.c ++++ b/malloc/malloc.c +@@ -2919,6 +2919,8 @@ typedef struct tcache_perthread_struct + tcache_entry *entries[TCACHE_MAX_BINS]; + } tcache_perthread_struct; + ++#define MAX_TCACHE_COUNT 127 /* Maximum value of counts[] entries. */ ++ + static __thread bool tcache_shutting_down = false; + static __thread tcache_perthread_struct *tcache = NULL; + +@@ -5124,8 +5126,11 @@ static inline int + __always_inline + do_set_tcache_count (size_t value) + { +- LIBC_PROBE (memory_tunable_tcache_count, 2, value, mp_.tcache_count); +- mp_.tcache_count = value; ++ if (value <= MAX_TCACHE_COUNT) ++ { ++ LIBC_PROBE (memory_tunable_tcache_count, 2, value, mp_.tcache_count); ++ mp_.tcache_count = value; ++ } + return 1; + } + +From 34fb5f61d3c3f4b8fc616ea259fa19168b58ecd4 Mon Sep 17 00:00:00 2001 +From: "Dmitry V. Levin" +Date: Wed, 13 Feb 2019 01:20:51 +0000 +Subject: [PATCH] libio: do not attempt to free wide buffers of legacy streams + [BZ #24228] +diff --git a/libio/genops.c b/libio/genops.c +index 2a0d9b81df..11a15549e8 100644 +--- a/libio/genops.c ++++ b/libio/genops.c +@@ -789,9 +789,16 @@ _IO_unbuffer_all (void) + + for (fp = (FILE *) _IO_list_all; fp; fp = fp->_chain) + { ++ int legacy = 0; ++ ++#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) ++ if (__glibc_unlikely (_IO_vtable_offset (fp) != 0)) ++ legacy = 1; ++#endif ++ + if (! (fp->_flags & _IO_UNBUFFERED) + /* Iff stream is un-orientated, it wasn't used. */ +- && fp->_mode != 0) ++ && (legacy || fp->_mode != 0)) + { + #ifdef _IO_MTSAFE_IO + int cnt; +@@ -805,7 +812,7 @@ _IO_unbuffer_all (void) + __sched_yield (); + #endif + +- if (! dealloc_buffers && !(fp->_flags & _IO_USER_BUF)) ++ if (! legacy && ! dealloc_buffers && !(fp->_flags & _IO_USER_BUF)) + { + fp->_flags |= _IO_USER_BUF; + +@@ -816,7 +823,7 @@ _IO_unbuffer_all (void) + + _IO_SETBUF (fp, NULL, 0); + +- if (fp->_mode > 0) ++ if (! legacy && fp->_mode > 0) + _IO_wsetb (fp, NULL, NULL, 0); + + #ifdef _IO_MTSAFE_IO +@@ -827,7 +834,8 @@ _IO_unbuffer_all (void) + + /* Make sure that never again the wide char functions can be + used. */ +- fp->_mode = -1; ++ if (! legacy) ++ fp->_mode = -1; + } + + #ifdef _IO_MTSAFE_IO + diff --git a/gnu/packages/patches/glibc-CVE-2019-7309.patch b/gnu/packages/patches/glibc-CVE-2019-7309.patch new file mode 100644 index 0000000000..f9f623830a --- /dev/null +++ b/gnu/packages/patches/glibc-CVE-2019-7309.patch @@ -0,0 +1,76 @@ +Fix . + +Taken from this upstream commit, sans ChangeLog updates and tests: +. + +diff --git a/sysdeps/x86_64/memcmp.S b/sysdeps/x86_64/memcmp.S +index 1fc487caa5..1322bb3b92 100644 +--- a/sysdeps/x86_64/memcmp.S ++++ b/sysdeps/x86_64/memcmp.S +@@ -21,14 +21,18 @@ + + .text + ENTRY (memcmp) +- test %rdx, %rdx ++#ifdef __ILP32__ ++ /* Clear the upper 32 bits. */ ++ movl %edx, %edx ++#endif ++ test %RDX_LP, %RDX_LP + jz L(finz) + cmpq $1, %rdx +- jle L(finr1b) ++ jbe L(finr1b) + subq %rdi, %rsi + movq %rdx, %r10 + cmpq $32, %r10 +- jge L(gt32) ++ jae L(gt32) + /* Handle small chunks and last block of less than 32 bytes. */ + L(small): + testq $1, %r10 +@@ -156,7 +160,7 @@ L(A32): + movq %r11, %r10 + andq $-32, %r10 + cmpq %r10, %rdi +- jge L(mt16) ++ jae L(mt16) + /* Pre-unroll to be ready for unrolled 64B loop. */ + testq $32, %rdi + jz L(A64) +@@ -178,7 +182,7 @@ L(A64): + movq %r11, %r10 + andq $-64, %r10 + cmpq %r10, %rdi +- jge L(mt32) ++ jae L(mt32) + + L(A64main): + movdqu (%rdi,%rsi), %xmm0 +@@ -216,7 +220,7 @@ L(mt32): + movq %r11, %r10 + andq $-32, %r10 + cmpq %r10, %rdi +- jge L(mt16) ++ jae L(mt16) + + L(A32main): + movdqu (%rdi,%rsi), %xmm0 +@@ -254,7 +258,7 @@ L(ATR): + movq %r11, %r10 + andq $-32, %r10 + cmpq %r10, %rdi +- jge L(mt16) ++ jae L(mt16) + testq $16, %rdi + jz L(ATR32) + +@@ -325,7 +329,7 @@ L(ATR64main): + movq %r11, %r10 + andq $-32, %r10 + cmpq %r10, %rdi +- jge L(mt16) ++ jae L(mt16) + + L(ATR32res): + movdqa (%rdi,%rsi), %xmm0 diff --git a/gnu/packages/patches/glibc-CVE-2019-9169.patch b/gnu/packages/patches/glibc-CVE-2019-9169.patch new file mode 100644 index 0000000000..029b4ddbd7 --- /dev/null +++ b/gnu/packages/patches/glibc-CVE-2019-9169.patch @@ -0,0 +1,22 @@ +Fix . + +Taken from this upstream commit, sans ChangeLog updates: +https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=583dd860d5b833037175247230a328f0050dbfe9 + +diff --git a/posix/regexec.c b/posix/regexec.c +index 91d5a797b8..084b1222d9 100644 +--- a/posix/regexec.c ++++ b/posix/regexec.c +@@ -1293,8 +1293,10 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs, + else if (naccepted) + { + char *buf = (char *) re_string_get_buffer (&mctx->input); +- if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, +- naccepted) != 0) ++ if (mctx->input.valid_len - *pidx < naccepted ++ || (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, ++ naccepted) ++ != 0)) + return -1; + } + } diff --git a/gnu/packages/patches/glibc-bootstrap-system.patch b/gnu/packages/patches/glibc-bootstrap-system.patch index addeed6dbd..39eb47ef26 100644 --- a/gnu/packages/patches/glibc-bootstrap-system.patch +++ b/gnu/packages/patches/glibc-bootstrap-system.patch @@ -5,26 +5,24 @@ instead uses the hard-coded absolute file name of `bash'. --- a/sysdeps/posix/system.c +++ b/sysdeps/posix/system.c -@@ -134,7 +134,7 @@ do_system (const char *line) - INIT_LOCK (); +@@ -140,7 +140,7 @@ do_system (const char *line) + __posix_spawnattr_setflags (&spawn_attr, + POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK); - /* Exec the shell. */ -- (void) __execve (SHELL_PATH, (char *const *) new_argv, __environ); -+ (void) __execvpe (SHELL_NAME, (char *const *) new_argv, __environ); - _exit (127); - } - else if (pid < (pid_t) 0) - +- status = __posix_spawn (&pid, SHELL_PATH, 0, &spawn_attr, ++ status = posix_spawnp (&pid, SHELL_NAME, 0, &spawn_attr, + (char *const[]){ (char*) SHELL_NAME, + (char*) "-c", + (char *) line, NULL }, --- a/libio/iopopen.c +++ b/libio/iopopen.c -@@ -145,7 +145,7 @@ _IO_new_proc_open (fp, command, mode) - __close_nocancel (fd); - } - -- execl ("/bin/sh", "sh", "-c", command, (char *) 0); -+ execlp ("sh", "sh", "-c", command, (char *) 0); - _exit (127); +@@ -85,7 +85,7 @@ spawn_process (posix_spawn_file_actions_t *fa, FILE *fp, const char *command, + return false; } - __close_nocancel (child_end); - + +- if (__posix_spawn (&((_IO_proc_file *) fp)->pid, _PATH_BSHELL, fa, 0, ++ if (posix_spawnp (&((_IO_proc_file *) fp)->pid, "sh", fa, 0, + (char *const[]){ (char*) "sh", (char*) "-c", + (char *) command, NULL }, __environ) != 0) + return false; diff --git a/gnu/packages/patches/glibc-supported-locales.patch b/gnu/packages/patches/glibc-supported-locales.patch index 2888052bb8..05865dc7be 100644 --- a/gnu/packages/patches/glibc-supported-locales.patch +++ b/gnu/packages/patches/glibc-supported-locales.patch @@ -2,11 +2,11 @@ This patch is taken from debian's glibc package (generate-supported.mk). It install the localedata/SUPPORTED file of the glibc. This file lists all the supported locales of the glibc. -diff --git a/localedata/Makefile.old b/localedata/Makefile -index 34877c0..a61d9b9 100644 ---- a/localedata/Makefile.old +diff --git a/localedata/Makefile b/localedata/Makefile +index 65079f9eb8..14818f84e0 100644 +--- a/localedata/Makefile +++ b/localedata/Makefile -@@ -91,7 +91,8 @@ endif +@@ -169,7 +169,8 @@ endif # Files to install. install-others := $(addprefix $(inst_i18ndir)/, \ $(addsuffix .gz, $(charmaps)) \ @@ -16,7 +16,7 @@ index 34877c0..a61d9b9 100644 tests: $(objdir)/iconvdata/gconv-modules -@@ -195,6 +196,14 @@ endif +@@ -380,6 +381,14 @@ endif include SUPPORTED @@ -28,6 +28,6 @@ index 34877c0..a61d9b9 100644 + $(make-target-directory) + $(INSTALL_DATA) LOCALES $@ + - INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES)) - - # Sometimes the whole collection of locale files should be installed. + INSTALL-SUPPORTED-LOCALE-ARCHIVE=$(addprefix install-archive-, $(SUPPORTED-LOCALES)) + INSTALL-SUPPORTED-LOCALE-FILES=$(addprefix install-files-, $(SUPPORTED-LOCALES)) + \ No newline at end of file diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index f3bea4a51d..d834cda915 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -360,7 +360,9 @@ data types.") (format #f "TESTOPTS=-j~d" (parallel-job-count)) ;; Exclude the following test, which fails as of 3.7.3 (see: ;; https://bugs.python.org/issue35998). - " --exclude test_asyncio"))) + ;; Exclude test_email, which fails with glibc 2.29 and later + ;; (see ). + " --exclude test_asyncio test_email"))) ((#:phases phases) `(modify-phases ,phases ;; Unset SOURCE_DATE_EPOCH while running the test-suite and set it -- cgit v1.2.3 From e7a42c4abb2f6b81c4e42b7715dd4724370b713c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 2 Jul 2019 21:17:53 +0200 Subject: gnu: boost: Remove GCC5 workaround. * gnu/packages/patches/boost-fix-icu-build.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/boost.scm (boost)[source](patches): Remove. [arguments]: Do not pass "cxxflags". --- gnu/local.mk | 1 - gnu/packages/boost.scm | 4 +- gnu/packages/patches/boost-fix-icu-build.patch | 53 -------------------------- 3 files changed, 1 insertion(+), 57 deletions(-) delete mode 100644 gnu/packages/patches/boost-fix-icu-build.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index da5262dcf6..b0d51406d9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -698,7 +698,6 @@ dist_patch_DATA = \ %D%/packages/patches/binutils-loongson-workaround.patch \ %D%/packages/patches/blender-2.79-newer-ffmpeg.patch \ %D%/packages/patches/blender-2.79-python-3.7-fix.patch \ - %D%/packages/patches/boost-fix-icu-build.patch \ %D%/packages/patches/byobu-writable-status.patch \ %D%/packages/patches/calibre-no-updates-dialog.patch \ %D%/packages/patches/calibre-remove-test-bs4.patch \ diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm index 73b4cff4c8..6b8eebcecb 100644 --- a/gnu/packages/boost.scm +++ b/gnu/packages/boost.scm @@ -56,8 +56,7 @@ version-with-underscores ".tar.bz2")))) (sha256 (base32 - "0y47nc7w0arwgj4x1phadxbvl7wyfcgknbz5kv8lzpl98wsyh2j3")) - (patches (search-patches "boost-fix-icu-build.patch")))) + "0y47nc7w0arwgj4x1phadxbvl7wyfcgknbz5kv8lzpl98wsyh2j3")))) (build-system gnu-build-system) (inputs `(("icu4c" ,icu4c) ("zlib" ,zlib))) @@ -69,7 +68,6 @@ `(#:tests? #f #:make-flags (list "threading=multi" "link=shared" - "cxxflags=-std=c++14" ;; Set the RUNPATH to $libdir so that the libs find each other. (string-append "linkflags=-Wl,-rpath=" diff --git a/gnu/packages/patches/boost-fix-icu-build.patch b/gnu/packages/patches/boost-fix-icu-build.patch deleted file mode 100644 index 556f91b8f7..0000000000 --- a/gnu/packages/patches/boost-fix-icu-build.patch +++ /dev/null @@ -1,53 +0,0 @@ -Pass -std=c++11 when compiling files that include the ICU headers. Without -this flag, compilation fails and causes Boost's build system to remove ICU -support. Note that $(pkg-config --variable=CXXFLAGS icu-uc) includes -"-std=c++11", but Boost's build system does not use 'pkg-config'. - ---- boost_1_66_0/libs/locale/build/Jamfile.v2.orig 2017-12-13 18:56:44.000000000 -0500 -+++ boost_1_66_0/libs/locale/build/Jamfile.v2 2018-04-08 15:18:58.673025760 -0400 -@@ -65,8 +65,8 @@ - - if $(ICU_LINK) - { -- ICU_OPTS = $(ICU_PATH)/include $(ICU_LINK) $(ICU_PATH)/bin shared ; -- ICU64_OPTS = $(ICU_PATH)/include $(ICU_LINK) $(ICU_PATH)/bin64 shared ; -+ ICU_OPTS = $(ICU_PATH)/include -std=c++11 $(ICU_LINK) $(ICU_PATH)/bin shared ; -+ ICU64_OPTS = $(ICU_PATH)/include -std=c++11 $(ICU_LINK) $(ICU_PATH)/bin64 shared ; - } - else - { -@@ -121,6 +121,7 @@ - explicit icuuc icudt icuin ; - - ICU_OPTS = $(ICU_PATH)/include -+ -std=c++11 - icuuc/shared/shared - icudt/shared/shared - icuin/shared/shared -@@ -180,6 +181,7 @@ - explicit icuuc_64 icudt_64 icuin_64 ; - - ICU64_OPTS = $(ICU_PATH)/include -+ -std=c++11 - icuuc_64/shared/shared - icudt_64/shared/shared - icuin_64/shared/shared ---- boost_1_66_0/libs/regex/build/Jamfile.v2.orig 2017-12-13 18:56:48.000000000 -0500 -+++ boost_1_66_0/libs/regex/build/Jamfile.v2 2018-04-08 15:20:40.865532505 -0400 -@@ -44,7 +44,7 @@ - - if $(ICU_LINK) - { -- ICU_OPTS = $(ICU_PATH)/include $(ICU_LINK) $(ICU_PATH)/bin BOOST_HAS_ICU=1 shared ; -+ ICU_OPTS = $(ICU_PATH)/include -std=c++11 $(ICU_LINK) $(ICU_PATH)/bin BOOST_HAS_ICU=1 shared ; - } - else - { -@@ -78,6 +78,7 @@ - - ICU_OPTS = - $(ICU_PATH)/include -+ -std=c++11 - shared:icuuc/shared - shared:icudt/shared - shared:icuin/shared -- cgit v1.2.3 From 0d75c64d7844bf35b4e1cd09bcc50b2a1005c191 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 3 Jul 2019 00:19:46 +0200 Subject: gnu: glib-networking: Update to 2.60.3. * gnu/packages/gnome.scm (glib-networking): Update to 2.60.3. [source](patches): Remove. [arguments]<#:phases>: Remove. * gnu/packages/patches/glib-networking-connection.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 1 - gnu/packages/gnome.scm | 14 ++---- .../patches/glib-networking-connection.patch | 51 ---------------------- 3 files changed, 3 insertions(+), 63 deletions(-) delete mode 100644 gnu/packages/patches/glib-networking-connection.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index b0d51406d9..bac1a92741 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -846,7 +846,6 @@ dist_patch_DATA = \ %D%/packages/patches/ghostscript-no-header-creationdate.patch \ %D%/packages/patches/giflib-make-reallocarray-private.patch \ %D%/packages/patches/glib-tests-timer.patch \ - %D%/packages/patches/glib-networking-connection.patch \ %D%/packages/patches/glibc-CVE-2015-5180.patch \ %D%/packages/patches/glibc-CVE-2015-7547.patch \ %D%/packages/patches/glibc-CVE-2016-3075.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index d3a348ba89..ecf39334e5 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -2595,7 +2595,7 @@ library.") (define-public glib-networking (package (name "glib-networking") - (version "2.58.0") + (version "2.60.3") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/glib-networking/" @@ -2603,18 +2603,10 @@ library.") name "-" version ".tar.xz")) (sha256 (base32 - "0s006gs9nsq6mg31spqha1jffzmp6qjh10y27h0fxf1iw1ah5ymx")) - (patches (search-patches "glib-networking-connection.patch")))) + "1mfw44qpmwvz6yzj8c6spx6z357wrmkk15byrkc5byagd82860fm")))) (build-system meson-build-system) (arguments - `(#:configure-flags '("-Dlibproxy_support=false") - #:phases (modify-phases %standard-phases - (add-before 'check 'disable-TLSv1.3 - (lambda _ - ;; XXX: One test fails when TLS 1.3 is enabled, fixed in 2.60.0: - ;; . - (setenv "G_TLS_GNUTLS_PRIORITY" "NORMAL:-VERS-TLS1.3") - #t))))) + `(#:configure-flags '("-Dlibproxy_support=false"))) (native-inputs `(("pkg-config" ,pkg-config) ("intltool" ,intltool))) diff --git a/gnu/packages/patches/glib-networking-connection.patch b/gnu/packages/patches/glib-networking-connection.patch deleted file mode 100644 index f64b090ae5..0000000000 --- a/gnu/packages/patches/glib-networking-connection.patch +++ /dev/null @@ -1,51 +0,0 @@ -https://gitlab.gnome.org/GNOME/glib-networking/issues/4 -https://gitlab.gnome.org/GNOME/glib-networking/commit/55daf3e5fd4bc9e4ebad1a9eab93f852dcbf527e.patch -This ultimately rejected work-around should be removed with the next -release, as the bug has supposedly been fixed for real. - - -From 55daf3e5fd4bc9e4ebad1a9eab93f852dcbf527e Mon Sep 17 00:00:00 2001 -From: Michael Catanzaro -Date: Thu, 19 Jul 2018 11:16:35 -0500 -Subject: [PATCH] Fix intermittent failures in missing client private key test - -Because our APIs do nice things like encapsulating the TLS connection -establishment, we have our test server writing to the client after -establishing the TCP connection, because the TLS connection is -established. It's fine in theory, but results in some weirdness like the -server seeing its write having completed successfully before TLS -connection establishment. Normally that's what happens and this test -passes (server sees no error), but sometimes the server sees that the -client has already failed and the test fails. - -This is unfortunate, and tricky to fix properly, so let's just remove -the bad check. The point of the test is to ensure that the TLS -connection is not established, and the client-side check is going to -have to be sufficient, because rewriting the test to wait for the TLS -connection to be established on the server side is quite tricky: my -naive attempt resulted in both sides waiting forever on the other. - -P.S. At no point in this test does the server ever examine the client -certificate. That's not quite what I expected when I added the test, but -it's fine. - -Fixes #4 ---- - tls/tests/connection.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/tls/tests/connection.c b/tls/tests/connection.c -index 94645c3..390275d 100644 ---- a/tls/tests/connection.c -+++ b/tls/tests/connection.c -@@ -1125,7 +1125,6 @@ test_client_auth_fail_missing_client_private_key (TestConnection *test, - g_main_loop_run (test->loop); - - g_assert_error (test->read_error, G_TLS_ERROR, G_TLS_ERROR_CERTIFICATE_REQUIRED); -- g_assert_no_error (test->server_error); - } - - static void --- -2.18.1 - -- cgit v1.2.3 From ca3757e1c2fdc1576d17239a57f0a493a47bc6dc Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Mon, 8 Jul 2019 21:20:17 -0400 Subject: gnu: glibc: Add 2.27 supported locales patch. The 'glibc-supported-locales.patch' was updated for glibc 2.29, breaking compatibility with 2.27. Add a 2.27-specific supported locales patch. * gnu/packages/patches/glibc-2.27-supported-locales.patch: New file. * gnu/packages/base.scm (glibc-2.27)[source](patches): Use 'glibc-2.27-supported-locales.patch' instead. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 1 + gnu/packages/base.scm | 2 +- .../patches/glibc-2.27-supported-locales.patch | 33 ++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/glibc-2.27-supported-locales.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index bac1a92741..f63ff1ff1e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -876,6 +876,7 @@ dist_patch_DATA = \ %D%/packages/patches/glibc-2.28-supported-locales.patch \ %D%/packages/patches/glibc-2.29-git-updates.patch \ %D%/packages/patches/glibc-supported-locales.patch \ + %D%/packages/patches/glibc-2.27-supported-locales.patch \ %D%/packages/patches/glusterfs-use-PATH-instead-of-hardcodes.patch \ %D%/packages/patches/glog-gcc-5-demangling.patch \ %D%/packages/patches/gmp-arm-asm-nothumb.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index f26145cb0b..5878cbec5e 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -854,7 +854,7 @@ with the Linux kernel.") "glibc-versioned-locpath.patch" "glibc-allow-kernel-2.6.32.patch" "glibc-reinstate-prlimit64-fallback.patch" - "glibc-supported-locales.patch" + "glibc-2.27-supported-locales.patch" "glibc-CVE-2018-11236.patch" "glibc-CVE-2018-11237.patch")))) (properties `((lint-hidden-cve . ("CVE-2017-18269")))))) ; glibc-2.27-git-fixes diff --git a/gnu/packages/patches/glibc-2.27-supported-locales.patch b/gnu/packages/patches/glibc-2.27-supported-locales.patch new file mode 100644 index 0000000000..2888052bb8 --- /dev/null +++ b/gnu/packages/patches/glibc-2.27-supported-locales.patch @@ -0,0 +1,33 @@ +This patch is taken from debian's glibc package (generate-supported.mk). +It install the localedata/SUPPORTED file of the glibc. This file lists +all the supported locales of the glibc. + +diff --git a/localedata/Makefile.old b/localedata/Makefile +index 34877c0..a61d9b9 100644 +--- a/localedata/Makefile.old ++++ b/localedata/Makefile +@@ -91,7 +91,8 @@ endif + # Files to install. + install-others := $(addprefix $(inst_i18ndir)/, \ + $(addsuffix .gz, $(charmaps)) \ +- $(locales)) ++ $(locales)) \ ++ $(inst_i18ndir)/SUPPORTED + + tests: $(objdir)/iconvdata/gconv-modules + +@@ -195,6 +196,14 @@ endif + + include SUPPORTED + ++$(inst_i18ndir)/SUPPORTED: SUPPORTED $(+force) ++ for locale in $(SUPPORTED-LOCALES); do \ ++ [ $$locale = true ] && continue; \ ++ echo $$locale | sed 's,/, ,' >> LOCALES; \ ++ done ++ $(make-target-directory) ++ $(INSTALL_DATA) LOCALES $@ ++ + INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES)) + + # Sometimes the whole collection of locale files should be installed. -- cgit v1.2.3 From d4137d84ac75edaf2739578d0868cd77dd6da43c Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Thu, 4 Jul 2019 06:49:29 -0400 Subject: gnu: make-glibc-locales: Adjust patch for glibc 2.29. The patch for glibc 2.28 and earlier replaces the same content, but the context in the patch is different enough to fail to merge. * gnu/packages/base.scm (make-glibc-locales)[source]: Add patch. * gnu/packages/patches/glibc-locales.patch: Adjust for glibc 2.29 and move old file... * gnu/packages/patches/glibc-locales-2.28.patch: ...here. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/base.scm | 9 +++++++- gnu/packages/patches/glibc-locales-2.28.patch | 31 +++++++++++++++++++++++++++ gnu/packages/patches/glibc-locales.patch | 17 ++++++++------- 4 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 gnu/packages/patches/glibc-locales-2.28.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f63ff1ff1e..e142122e6b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -867,6 +867,7 @@ dist_patch_DATA = \ %D%/packages/patches/glibc-hurd-magic-pid.patch \ %D%/packages/patches/glibc-ldd-x86_64.patch \ %D%/packages/patches/glibc-locales.patch \ + %D%/packages/patches/glibc-locales-2.28.patch \ %D%/packages/patches/glibc-o-largefile.patch \ %D%/packages/patches/glibc-reinstate-prlimit64-fallback.patch \ %D%/packages/patches/glibc-vectorized-strcspn-guards.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 5878cbec5e..0df40d9c50 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -999,7 +999,14 @@ with the Linux kernel.") (inherit glibc) (name "glibc-locales") (source (origin (inherit (package-source glibc)) - (patches (cons (search-patch "glibc-locales.patch") + ;; The patch for glibc 2.28 and earlier replaces the same + ;; content, but the context in the patch is different + ;; enough to fail to merge. + (patches (cons (search-patch + (if (version>=? (package-version glibc) + "2.29") + "glibc-locales.patch" + "glibc-locales-2.28.patch")) (origin-patches (package-source glibc)))))) (synopsis "All the locales supported by the GNU C Library") (description diff --git a/gnu/packages/patches/glibc-locales-2.28.patch b/gnu/packages/patches/glibc-locales-2.28.patch new file mode 100644 index 0000000000..31ee6c1ff3 --- /dev/null +++ b/gnu/packages/patches/glibc-locales-2.28.patch @@ -0,0 +1,31 @@ +This patch allows us to use glibc's build system to build locales +in a package separate from glibc. + + 1. Use 'localedef' from $PATH since we are not rebuilding it. + 2. Use '--no-archive' to avoid building the big locale archive, and + because the already-built 'localedef' would want to write it + to '/run/current-system/locale', which is not possible. + 3. Pass $(inst_complocaledir)/$$locale to install files in the right + place, and because otherwise, 'localedef' fails with: + "cannot write output files to `(null)'". + +--- glibc-2.27/localedata/Makefile ++++ glibc-2.27/localedata/Makefile +@@ -199,7 +199,7 @@ INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES)) + + # Sometimes the whole collection of locale files should be installed. + LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \ +-$(rtld-prefix) $(common-objpfx)locale/localedef ++ localedef --no-archive + install-locales: $(INSTALL-SUPPORTED-LOCALES) + + install-locales-dir: +@@ -224,7 +224,7 @@ $(INSTALL-SUPPORTED-LOCALES): install-locales-dir + input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \ + $(LOCALEDEF) $$flags --alias-file=../intl/locale.alias \ + -i locales/$$input -f charmaps/$$charset \ +- $(addprefix --prefix=,$(install_root)) $$locale \ ++ $(addprefix --prefix=,$(install_root)) $(inst_complocaledir)/$$locale \ + && echo ' done'; \ + + tst-setlocale-ENV = LC_ALL=ja_JP.EUC-JP diff --git a/gnu/packages/patches/glibc-locales.patch b/gnu/packages/patches/glibc-locales.patch index 31ee6c1ff3..9329a09063 100644 --- a/gnu/packages/patches/glibc-locales.patch +++ b/gnu/packages/patches/glibc-locales.patch @@ -9,23 +9,24 @@ in a package separate from glibc. place, and because otherwise, 'localedef' fails with: "cannot write output files to `(null)'". ---- glibc-2.27/localedata/Makefile -+++ glibc-2.27/localedata/Makefile -@@ -199,7 +199,7 @@ INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES)) +diff -ru glibc-2.29-old/localedata/Makefile glibc-2.29-new/localedata/Makefile +--- glibc-2.29-old/localedata/Makefile 2019-01-31 11:45:36.000000000 -0500 ++++ glibc-2.29-new/localedata/Makefile 2019-07-03 22:48:35.662015071 -0400 +@@ -385,7 +385,7 @@ # Sometimes the whole collection of locale files should be installed. LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \ -$(rtld-prefix) $(common-objpfx)locale/localedef + localedef --no-archive - install-locales: $(INSTALL-SUPPORTED-LOCALES) + install-locales: install-locale-archive - install-locales-dir: -@@ -224,7 +224,7 @@ $(INSTALL-SUPPORTED-LOCALES): install-locales-dir + # Create and install the locale-archive file. +@@ -414,7 +414,7 @@ input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \ $(LOCALEDEF) $$flags --alias-file=../intl/locale.alias \ -i locales/$$input -f charmaps/$$charset \ - $(addprefix --prefix=,$(install_root)) $$locale \ + $(addprefix --prefix=,$(install_root)) $(inst_complocaledir)/$$locale \ - && echo ' done'; \ + && echo ' done'; + endef - tst-setlocale-ENV = LC_ALL=ja_JP.EUC-JP -- cgit v1.2.3 From c1f4073ff53aa6b958441b7457692a1e146ab565 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 10 Jul 2019 00:29:32 +0200 Subject: gnu: rapidjson: Fix FTBFS with GCC 7. * gnu/packages/patches/rapidjson-gcc-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/web.scm (rapidjson)[source](patches): New field. --- gnu/local.mk | 1 + gnu/packages/patches/rapidjson-gcc-compat.patch | 18 ++++++++++++++++++ gnu/packages/web.scm | 1 + 3 files changed, 20 insertions(+) create mode 100644 gnu/packages/patches/rapidjson-gcc-compat.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index e142122e6b..c8fa44d1cc 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1240,6 +1240,7 @@ dist_patch_DATA = \ %D%/packages/patches/qtwebkit-pbutils-include.patch \ %D%/packages/patches/randomjungle-disable-static-build.patch \ %D%/packages/patches/rapicorn-isnan.patch \ + %D%/packages/patches/rapidjson-gcc-compat.patch \ %D%/packages/patches/raptor2-heap-overflow.patch \ %D%/packages/patches/ratpoints-sturm_and_rp_private.patch \ %D%/packages/patches/ratpoison-shell.patch \ diff --git a/gnu/packages/patches/rapidjson-gcc-compat.patch b/gnu/packages/patches/rapidjson-gcc-compat.patch new file mode 100644 index 0000000000..b5ffc0a908 --- /dev/null +++ b/gnu/packages/patches/rapidjson-gcc-compat.patch @@ -0,0 +1,18 @@ +Disable -Werror=implicit-fallthrough on GCC7 and later. Taken from upstream: +https://github.com/Tencent/rapidjson/commit/fe19b7b6016d446722621fb407738209d1a911e8 +https://github.com/Tencent/rapidjson/commit/cba45fe9de6923b858edb0780e257b7257aa4f7b + +diff --git a/include/rapidjson/internal/regex.h b/include/rapidjson/internal/regex.h +index 422a5240..d4039716 100644 +--- a/include/rapidjson/internal/regex.h ++++ b/include/rapidjson/internal/regex.h +@@ -29,6 +29,9 @@ RAPIDJSON_DIAG_OFF(implicit-fallthrough) + #ifdef __GNUC__ + RAPIDJSON_DIAG_PUSH + RAPIDJSON_DIAG_OFF(effc++) ++#if __GNUC__ >= 7 ++RAPIDJSON_DIAG_OFF(implicit-fallthrough) ++#endif + #endif + + #ifdef _MSC_VER diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 42c00e77a5..687c92e2a6 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -761,6 +761,7 @@ current version of any major web browser.") (sha256 (base32 "1jixgb8w97l9gdh3inihz7avz7i770gy2j2irvvlyrq3wi41f5ab")) + (patches (search-patches "rapidjson-gcc-compat.patch")) (modules '((guix build utils))) (snippet '(begin -- cgit v1.2.3 From 60ccc1653a8ed040bbdfbc89f010614b0d9c4139 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 12 Jul 2019 01:05:13 +0200 Subject: gnu: Remove expat/fixed. The merge preceding this commit (fb9a23a3f3) ignored the replacement added in 5a836ce38c (gnu: expat: fix CVE-2018-20843), because the fix is already present in Expat 2.2.7. This commit removes the remaining bits. * gnu/packages/patches/expat-CVE-2018-20843.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/xml.scm (expat/fixed): Remove variable. --- gnu/local.mk | 1 - gnu/packages/patches/expat-CVE-2018-20843.patch | 21 --------------------- gnu/packages/xml.scm | 8 -------- 3 files changed, 30 deletions(-) delete mode 100644 gnu/packages/patches/expat-CVE-2018-20843.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index b9575ad201..75cb7b62af 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -781,7 +781,6 @@ dist_patch_DATA = \ %D%/packages/patches/evilwm-lost-focus-bug.patch \ %D%/packages/patches/exiv2-CVE-2017-14860.patch \ %D%/packages/patches/exiv2-CVE-2017-14859-14862-14864.patch \ - %D%/packages/patches/expat-CVE-2018-20843.patch \ %D%/packages/patches/extundelete-e2fsprogs-1.44.patch \ %D%/packages/patches/fastcap-mulGlobal.patch \ %D%/packages/patches/fastcap-mulSetup.patch \ diff --git a/gnu/packages/patches/expat-CVE-2018-20843.patch b/gnu/packages/patches/expat-CVE-2018-20843.patch deleted file mode 100644 index 216fbe9667..0000000000 --- a/gnu/packages/patches/expat-CVE-2018-20843.patch +++ /dev/null @@ -1,21 +0,0 @@ -Fix extraction of namespace prefix from XML name. -Fixes CVE-2018-20843 - -This patch comes from upstream commit 11f8838bf99ea0a6f0b76f9760c43704d00c4ff6 -https://github.com/libexpat/libexpat/commit/11f8838bf99ea0a6f0b76f9760c43704d00c4ff6 - -CVE is https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20843 - -diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c -index 30d55c5..737d7cd 100644 ---- a/lib/xmlparse.c -+++ b/lib/xmlparse.c -@@ -6071,7 +6071,7 @@ setElementTypePrefix(XML_Parser parser, ELEMENT_TYPE *elementType) - else - poolDiscard(&dtd->pool); - elementType->prefix = prefix; -- -+ break; - } - } - return 1; diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index e708348006..78b9b713e5 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -88,14 +88,6 @@ stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags).") (license license:expat))) -(define expat/fixed - (package - (inherit expat) - (source - (origin - (inherit (package-source expat)) - (patches (search-patches "expat-CVE-2018-20843.patch")))))) - (define-public libebml (package (name "libebml") -- cgit v1.2.3 From ee46474d54a661e87cd501c3fde6e572b3423a60 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 12 Jul 2019 16:50:14 +0200 Subject: gnu: glib: Fix argument handling in keyfile backend. * gnu/packages/patches/glib-keyfile-arguments.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/glib.scm (glib)[source](patches): Add it. --- gnu/local.mk | 1 + gnu/packages/glib.scm | 3 ++- gnu/packages/patches/glib-keyfile-arguments.patch | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/glib-keyfile-arguments.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 75cb7b62af..0a34b917ce 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -851,6 +851,7 @@ dist_patch_DATA = \ %D%/packages/patches/ghostscript-no-header-uuid.patch \ %D%/packages/patches/ghostscript-no-header-creationdate.patch \ %D%/packages/patches/giflib-make-reallocarray-private.patch \ + %D%/packages/patches/glib-keyfile-arguments.patch \ %D%/packages/patches/glib-tests-timer.patch \ %D%/packages/patches/glibc-CVE-2015-5180.patch \ %D%/packages/patches/glibc-CVE-2015-7547.patch \ diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 3d17bc768f..8f1b91e142 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -168,7 +168,8 @@ shared NFS home directories.") (sha256 (base32 "0bk2l9mhvc44c0gfg442wrifwj2fci1w71dsp3nb50pffvsivpry")) - (patches (search-patches "glib-tests-timer.patch")) + (patches (search-patches "glib-tests-timer.patch" + "glib-keyfile-arguments.patch")) (modules '((guix build utils))) (snippet '(begin diff --git a/gnu/packages/patches/glib-keyfile-arguments.patch b/gnu/packages/patches/glib-keyfile-arguments.patch new file mode 100644 index 0000000000..8d428f4192 --- /dev/null +++ b/gnu/packages/patches/glib-keyfile-arguments.patch @@ -0,0 +1,20 @@ +Fix a problem with the keyfile backend whereby instantiating it with +the default NULL value would cause an assertion error: + +https://gitlab.gnome.org/GNOME/glib/issues/1825 + +This issue showed up when running the test suites of uhttpmock and spice. + +diff --git a/gio/gkeyfilesettingsbackend.c b/gio/gkeyfilesettingsbackend.c +--- a/gio/gkeyfilesettingsbackend.c ++++ b/gio/gkeyfilesettingsbackend.c +@@ -740,7 +740,8 @@ g_keyfile_settings_backend_set_property (GObject *object, + case PROP_FILENAME: + /* Construct only. */ + g_assert (kfsb->file == NULL); +- kfsb->file = g_file_new_for_path (g_value_get_string (value)); ++ if (g_value_get_string (value)) ++ kfsb->file = g_file_new_for_path (g_value_get_string (value)); + break; + + case PROP_ROOT_PATH: -- cgit v1.2.3 From 982c0b368daa2443de6fb642d73469d6a6ca468a Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Thu, 27 Jun 2019 10:01:12 -0400 Subject: gnu: gnome-control-center: Update to 3.30.3. * gnu/packages/gnome.scm (gnome-control-center): Update to 3.30.3. [source](patches): New field. [arguments]: Adjust "patch-paths" phase. [inputs]: Add libsecret and udisks. * gnu/packages/patches/gnome-control-center-use-udisks-to-get-disk-size.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/gnome.scm | 11 +- ...ontrol-center-use-udisks-to-get-disk-size.patch | 221 +++++++++++++++++++++ 3 files changed, 230 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/gnome-control-center-use-udisks-to-get-disk-size.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 0a34b917ce..123ff115a6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -889,6 +889,7 @@ dist_patch_DATA = \ %D%/packages/patches/glog-gcc-5-demangling.patch \ %D%/packages/patches/gmp-arm-asm-nothumb.patch \ %D%/packages/patches/gmp-faulty-test.patch \ + %D%/packages/patches/gnome-control-center-use-udisks-to-get-disk-size.patch \ %D%/packages/patches/gnome-shell-theme.patch \ %D%/packages/patches/gnome-tweaks-search-paths.patch \ %D%/packages/patches/gnutls-skip-trust-store-test.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index eb251498e9..ea854ff38a 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -5809,7 +5809,7 @@ devices using the GNOME desktop.") (define-public gnome-control-center (package (name "gnome-control-center") - (version "3.28.2") + (version "3.30.3") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -5817,7 +5817,10 @@ devices using the GNOME desktop.") name "-" version ".tar.xz")) (sha256 (base32 - "0d6pjdbsra16nav8201kaadja5yma92bhziki9601ilk2ry3v7pz")))) + "0gih1cmqbv803kp30704sllghb0impa0mmv3j8pndfg4zr2mnq9r")) + (patches + (search-patches + "gnome-control-center-use-udisks-to-get-disk-size.patch")))) (build-system meson-build-system) (arguments '(#:glib-or-gtk? #t @@ -5834,7 +5837,7 @@ devices using the GNOME desktop.") (substitute* "panels/datetime/tz.h" (("/usr/share/zoneinfo/zone.tab") (string-append tzdata "/share/zoneinfo/zone.tab"))) - (substitute* "panels/datetime/test-endianess.c" + (substitute* "tests/datetime/test-endianess.c" (("/usr/share/locale") (string-append libc "/share/locale"))) (substitute* "panels/region/cc-region-panel.c" @@ -5877,6 +5880,7 @@ devices using the GNOME desktop.") ("libgudev" ,libgudev) ("libgtop" ,libgtop) ("libpwquality" ,libpwquality) + ("libsecret" ,libsecret) ("libsoup" ,libsoup) ("libxml2" ,libxml2) ("libwacom" ,libwacom) @@ -5888,6 +5892,7 @@ devices using the GNOME desktop.") ("pulseaudio" ,pulseaudio) ("smbclient" ,samba) ("tzdata" ,tzdata) + ("udisks" ,udisks) ("upower" ,upower))) (synopsis "Utilities to configure the GNOME desktop") (home-page "https://www.gnome.org/") diff --git a/gnu/packages/patches/gnome-control-center-use-udisks-to-get-disk-size.patch b/gnu/packages/patches/gnome-control-center-use-udisks-to-get-disk-size.patch new file mode 100644 index 0000000000..823684b2e9 --- /dev/null +++ b/gnu/packages/patches/gnome-control-center-use-udisks-to-get-disk-size.patch @@ -0,0 +1,221 @@ +This patch is derived from upstream commit 2520aea6 and fixes upstream issues +285 and 302. See https://gitlab.gnome.org/GNOME/gcr/merge_requests/387, +https://gitlab.gnome.org/GNOME/gnome-control-center/issues/285 and +https://gitlab.gnome.org/GNOME/gnome-control-center/issues/302. + +diff --git a/panels/info/cc-info-overview-panel.c b/panels/info/cc-info-overview-panel.c +index e2276a295b3fd9de01b30fc3369069b5d33ba5b7..ff47c1fef2493bcc7ab34f9e8716d570d8d370ed 100644 +--- a/panels/info/cc-info-overview-panel.c ++++ b/panels/info/cc-info-overview-panel.c +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + #include + +@@ -81,9 +82,7 @@ typedef struct + + GCancellable *cancellable; + +- /* Free space */ +- GList *primary_mounts; +- guint64 total_bytes; ++ UDisksClient *client; + + GraphicsData *graphics_data; + } CcInfoOverviewPanelPrivate; +@@ -96,8 +95,6 @@ struct _CcInfoOverviewPanel + CcInfoOverviewPanelPrivate *priv; + }; + +-static void get_primary_disc_info_start (CcInfoOverviewPanel *self); +- + typedef struct + { + char *major; +@@ -486,111 +483,51 @@ get_os_type (void) + } + + static void +-query_done (GFile *file, +- GAsyncResult *res, +- CcInfoOverviewPanel *self) ++get_primary_disc_info (CcInfoOverviewPanel *self) + { + CcInfoOverviewPanelPrivate *priv; +- g_autoptr(GFileInfo) info = NULL; +- g_autoptr(GError) error = NULL; +- +- info = g_file_query_filesystem_info_finish (file, res, &error); +- if (info != NULL) +- { +- priv = cc_info_overview_panel_get_instance_private (self); +- priv->total_bytes += g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_FILESYSTEM_SIZE); +- } +- else +- { +- if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) +- return; +- else +- { +- g_autofree char *path = NULL; +- path = g_file_get_path (file); +- g_warning ("Failed to get filesystem free space for '%s': %s", path, error->message); +- } +- } ++ GDBusObjectManager *manager; ++ g_autolist(GDBusObject) objects = NULL; ++ GList *l; ++ guint64 total_size; + +- /* And onto the next element */ +- get_primary_disc_info_start (self); +-} +- +-static void +-get_primary_disc_info_start (CcInfoOverviewPanel *self) +-{ +- GUnixMountEntry *mount; +- g_autoptr(GFile) file = NULL; +- CcInfoOverviewPanelPrivate *priv = cc_info_overview_panel_get_instance_private (self); ++ priv = cc_info_overview_panel_get_instance_private (self); ++ total_size = 0; + +- if (priv->primary_mounts == NULL) ++ if (!priv->client) + { +- g_autofree char *size = NULL; +- +- size = g_format_size (priv->total_bytes); +- gtk_label_set_text (GTK_LABEL (priv->disk_label), size); +- ++ gtk_label_set_text (GTK_LABEL (priv->disk_label), _("Unknown")); + return; + } + +- mount = priv->primary_mounts->data; +- priv->primary_mounts = g_list_remove (priv->primary_mounts, mount); +- file = g_file_new_for_path (g_unix_mount_get_mount_path (mount)); +- g_unix_mount_free (mount); +- +- g_file_query_filesystem_info_async (file, +- G_FILE_ATTRIBUTE_FILESYSTEM_SIZE, +- 0, +- priv->cancellable, +- (GAsyncReadyCallback) query_done, +- self); +-} +- +-static void +-get_primary_disc_info (CcInfoOverviewPanel *self) +-{ +- GList *points; +- GList *p; +- GHashTable *hash; +- CcInfoOverviewPanelPrivate *priv = cc_info_overview_panel_get_instance_private (self); +- +- hash = g_hash_table_new (g_str_hash, g_str_equal); +- points = g_unix_mount_points_get (NULL); +- +- /* If we do not have /etc/fstab around, try /etc/mtab */ +- if (points == NULL) +- points = g_unix_mounts_get (NULL); ++ manager = udisks_client_get_object_manager (priv->client); ++ objects = g_dbus_object_manager_get_objects (manager); + +- for (p = points; p != NULL; p = p->next) ++ for (l = objects; l != NULL; l = l->next) + { +- GUnixMountEntry *mount = p->data; +- const char *mount_path; +- const char *device_path; +- +- mount_path = g_unix_mount_get_mount_path (mount); +- device_path = g_unix_mount_get_device_path (mount); +- +- /* Do not count multiple mounts with same device_path, because it is +- * probably something like btrfs subvolume. Use only the first one in +- * order to count the real size. */ +- if (gsd_should_ignore_unix_mount (mount) || +- gsd_is_removable_mount (mount) || +- g_str_has_prefix (mount_path, "/media/") || +- g_str_has_prefix (mount_path, g_get_home_dir ()) || +- g_hash_table_lookup (hash, device_path) != NULL) ++ UDisksDrive *drive; ++ drive = udisks_object_peek_drive (UDISKS_OBJECT (l->data)); ++ ++ /* Skip removable devices */ ++ if (drive == NULL || ++ udisks_drive_get_removable (drive) || ++ udisks_drive_get_ejectable (drive)) + { +- g_unix_mount_free (mount); + continue; + } + +- priv->primary_mounts = g_list_prepend (priv->primary_mounts, mount); +- g_hash_table_insert (hash, (gpointer) device_path, (gpointer) device_path); ++ total_size += udisks_drive_get_size (drive); + } +- g_list_free (points); +- g_hash_table_destroy (hash); + +- priv->cancellable = g_cancellable_new (); +- get_primary_disc_info_start (self); ++ if (total_size > 0) ++ { ++ g_autofree gchar *size = g_format_size (total_size); ++ gtk_label_set_text (GTK_LABEL (priv->disk_label), size); ++ } ++ else ++ { ++ gtk_label_set_text (GTK_LABEL (priv->disk_label), _("Unknown")); ++ } + } + + static char * +@@ -852,8 +789,7 @@ cc_info_overview_panel_finalize (GObject *object) + g_clear_object (&priv->cancellable); + } + +- if (priv->primary_mounts) +- g_list_free_full (priv->primary_mounts, (GDestroyNotify) g_unix_mount_free); ++ g_clear_object (&priv->client); + + g_free (priv->gnome_version); + g_free (priv->gnome_date); +@@ -895,6 +831,7 @@ static void + cc_info_overview_panel_init (CcInfoOverviewPanel *self) + { + CcInfoOverviewPanelPrivate *priv = cc_info_overview_panel_get_instance_private (self); ++ g_autoptr(GError) error = NULL; + + gtk_widget_init_template (GTK_WIDGET (self)); + +@@ -907,6 +844,12 @@ cc_info_overview_panel_init (CcInfoOverviewPanel *self) + else + gtk_widget_destroy (priv->updates_button); + ++ priv->client = udisks_client_new_sync (NULL, &error); ++ ++ if (error != NULL) ++ g_warning ("Unable to get UDisks client: %s. Disk information will not be available.", ++ error->message); ++ + info_overview_panel_setup_overview (self); + info_overview_panel_setup_virt (self); + } +diff --git a/panels/info/meson.build b/panels/info/meson.build +index 03742551314f91b60e3ec1caad153ff314b93310..c54e5fdaff3c6ddb59cca8ee9a2bf5a0212bf196 100644 +--- a/panels/info/meson.build ++++ b/panels/info/meson.build +@@ -61,6 +61,7 @@ sources += gnome.compile_resources( + + deps = common_deps + [ + polkit_gobject_dep, ++ dependency('udisks2', version: '>= 2.1.8'), + dependency('libgtop-2.0') + ] + -- cgit v1.2.3 From 0de9a1be04a2f93bcdf81bdb0f6c2dca12225974 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 17 Jul 2019 15:58:34 +0200 Subject: gnu: gnome-control-center: Shorten patch file name. * gnu/packages/patches/gnome-control-center-use-udisks-to-get-disk-size.patch: Rename to... * gnu/packages/patches/gnome-control-center-udisks.patch: ... this. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/gnome.scm (gnome-control-center)[source]: Likewise. --- gnu/local.mk | 2 +- gnu/packages/gnome.scm | 3 +- .../patches/gnome-control-center-udisks.patch | 221 +++++++++++++++++++++ ...ontrol-center-use-udisks-to-get-disk-size.patch | 221 --------------------- 4 files changed, 223 insertions(+), 224 deletions(-) create mode 100644 gnu/packages/patches/gnome-control-center-udisks.patch delete mode 100644 gnu/packages/patches/gnome-control-center-use-udisks-to-get-disk-size.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index c41836ad3c..49c3826685 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -889,7 +889,7 @@ dist_patch_DATA = \ %D%/packages/patches/glog-gcc-5-demangling.patch \ %D%/packages/patches/gmp-arm-asm-nothumb.patch \ %D%/packages/patches/gmp-faulty-test.patch \ - %D%/packages/patches/gnome-control-center-use-udisks-to-get-disk-size.patch \ + %D%/packages/patches/gnome-control-center-udisks.patch \ %D%/packages/patches/gnome-shell-theme.patch \ %D%/packages/patches/gnome-tweaks-search-paths.patch \ %D%/packages/patches/gnutls-skip-trust-store-test.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 46dd268f8f..beaba3b4c5 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -5941,8 +5941,7 @@ devices using the GNOME desktop.") (base32 "0gih1cmqbv803kp30704sllghb0impa0mmv3j8pndfg4zr2mnq9r")) (patches - (search-patches - "gnome-control-center-use-udisks-to-get-disk-size.patch")))) + (search-patches "gnome-control-center-udisks.patch")))) (build-system meson-build-system) (arguments '(#:glib-or-gtk? #t diff --git a/gnu/packages/patches/gnome-control-center-udisks.patch b/gnu/packages/patches/gnome-control-center-udisks.patch new file mode 100644 index 0000000000..823684b2e9 --- /dev/null +++ b/gnu/packages/patches/gnome-control-center-udisks.patch @@ -0,0 +1,221 @@ +This patch is derived from upstream commit 2520aea6 and fixes upstream issues +285 and 302. See https://gitlab.gnome.org/GNOME/gcr/merge_requests/387, +https://gitlab.gnome.org/GNOME/gnome-control-center/issues/285 and +https://gitlab.gnome.org/GNOME/gnome-control-center/issues/302. + +diff --git a/panels/info/cc-info-overview-panel.c b/panels/info/cc-info-overview-panel.c +index e2276a295b3fd9de01b30fc3369069b5d33ba5b7..ff47c1fef2493bcc7ab34f9e8716d570d8d370ed 100644 +--- a/panels/info/cc-info-overview-panel.c ++++ b/panels/info/cc-info-overview-panel.c +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + #include + +@@ -81,9 +82,7 @@ typedef struct + + GCancellable *cancellable; + +- /* Free space */ +- GList *primary_mounts; +- guint64 total_bytes; ++ UDisksClient *client; + + GraphicsData *graphics_data; + } CcInfoOverviewPanelPrivate; +@@ -96,8 +95,6 @@ struct _CcInfoOverviewPanel + CcInfoOverviewPanelPrivate *priv; + }; + +-static void get_primary_disc_info_start (CcInfoOverviewPanel *self); +- + typedef struct + { + char *major; +@@ -486,111 +483,51 @@ get_os_type (void) + } + + static void +-query_done (GFile *file, +- GAsyncResult *res, +- CcInfoOverviewPanel *self) ++get_primary_disc_info (CcInfoOverviewPanel *self) + { + CcInfoOverviewPanelPrivate *priv; +- g_autoptr(GFileInfo) info = NULL; +- g_autoptr(GError) error = NULL; +- +- info = g_file_query_filesystem_info_finish (file, res, &error); +- if (info != NULL) +- { +- priv = cc_info_overview_panel_get_instance_private (self); +- priv->total_bytes += g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_FILESYSTEM_SIZE); +- } +- else +- { +- if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) +- return; +- else +- { +- g_autofree char *path = NULL; +- path = g_file_get_path (file); +- g_warning ("Failed to get filesystem free space for '%s': %s", path, error->message); +- } +- } ++ GDBusObjectManager *manager; ++ g_autolist(GDBusObject) objects = NULL; ++ GList *l; ++ guint64 total_size; + +- /* And onto the next element */ +- get_primary_disc_info_start (self); +-} +- +-static void +-get_primary_disc_info_start (CcInfoOverviewPanel *self) +-{ +- GUnixMountEntry *mount; +- g_autoptr(GFile) file = NULL; +- CcInfoOverviewPanelPrivate *priv = cc_info_overview_panel_get_instance_private (self); ++ priv = cc_info_overview_panel_get_instance_private (self); ++ total_size = 0; + +- if (priv->primary_mounts == NULL) ++ if (!priv->client) + { +- g_autofree char *size = NULL; +- +- size = g_format_size (priv->total_bytes); +- gtk_label_set_text (GTK_LABEL (priv->disk_label), size); +- ++ gtk_label_set_text (GTK_LABEL (priv->disk_label), _("Unknown")); + return; + } + +- mount = priv->primary_mounts->data; +- priv->primary_mounts = g_list_remove (priv->primary_mounts, mount); +- file = g_file_new_for_path (g_unix_mount_get_mount_path (mount)); +- g_unix_mount_free (mount); +- +- g_file_query_filesystem_info_async (file, +- G_FILE_ATTRIBUTE_FILESYSTEM_SIZE, +- 0, +- priv->cancellable, +- (GAsyncReadyCallback) query_done, +- self); +-} +- +-static void +-get_primary_disc_info (CcInfoOverviewPanel *self) +-{ +- GList *points; +- GList *p; +- GHashTable *hash; +- CcInfoOverviewPanelPrivate *priv = cc_info_overview_panel_get_instance_private (self); +- +- hash = g_hash_table_new (g_str_hash, g_str_equal); +- points = g_unix_mount_points_get (NULL); +- +- /* If we do not have /etc/fstab around, try /etc/mtab */ +- if (points == NULL) +- points = g_unix_mounts_get (NULL); ++ manager = udisks_client_get_object_manager (priv->client); ++ objects = g_dbus_object_manager_get_objects (manager); + +- for (p = points; p != NULL; p = p->next) ++ for (l = objects; l != NULL; l = l->next) + { +- GUnixMountEntry *mount = p->data; +- const char *mount_path; +- const char *device_path; +- +- mount_path = g_unix_mount_get_mount_path (mount); +- device_path = g_unix_mount_get_device_path (mount); +- +- /* Do not count multiple mounts with same device_path, because it is +- * probably something like btrfs subvolume. Use only the first one in +- * order to count the real size. */ +- if (gsd_should_ignore_unix_mount (mount) || +- gsd_is_removable_mount (mount) || +- g_str_has_prefix (mount_path, "/media/") || +- g_str_has_prefix (mount_path, g_get_home_dir ()) || +- g_hash_table_lookup (hash, device_path) != NULL) ++ UDisksDrive *drive; ++ drive = udisks_object_peek_drive (UDISKS_OBJECT (l->data)); ++ ++ /* Skip removable devices */ ++ if (drive == NULL || ++ udisks_drive_get_removable (drive) || ++ udisks_drive_get_ejectable (drive)) + { +- g_unix_mount_free (mount); + continue; + } + +- priv->primary_mounts = g_list_prepend (priv->primary_mounts, mount); +- g_hash_table_insert (hash, (gpointer) device_path, (gpointer) device_path); ++ total_size += udisks_drive_get_size (drive); + } +- g_list_free (points); +- g_hash_table_destroy (hash); + +- priv->cancellable = g_cancellable_new (); +- get_primary_disc_info_start (self); ++ if (total_size > 0) ++ { ++ g_autofree gchar *size = g_format_size (total_size); ++ gtk_label_set_text (GTK_LABEL (priv->disk_label), size); ++ } ++ else ++ { ++ gtk_label_set_text (GTK_LABEL (priv->disk_label), _("Unknown")); ++ } + } + + static char * +@@ -852,8 +789,7 @@ cc_info_overview_panel_finalize (GObject *object) + g_clear_object (&priv->cancellable); + } + +- if (priv->primary_mounts) +- g_list_free_full (priv->primary_mounts, (GDestroyNotify) g_unix_mount_free); ++ g_clear_object (&priv->client); + + g_free (priv->gnome_version); + g_free (priv->gnome_date); +@@ -895,6 +831,7 @@ static void + cc_info_overview_panel_init (CcInfoOverviewPanel *self) + { + CcInfoOverviewPanelPrivate *priv = cc_info_overview_panel_get_instance_private (self); ++ g_autoptr(GError) error = NULL; + + gtk_widget_init_template (GTK_WIDGET (self)); + +@@ -907,6 +844,12 @@ cc_info_overview_panel_init (CcInfoOverviewPanel *self) + else + gtk_widget_destroy (priv->updates_button); + ++ priv->client = udisks_client_new_sync (NULL, &error); ++ ++ if (error != NULL) ++ g_warning ("Unable to get UDisks client: %s. Disk information will not be available.", ++ error->message); ++ + info_overview_panel_setup_overview (self); + info_overview_panel_setup_virt (self); + } +diff --git a/panels/info/meson.build b/panels/info/meson.build +index 03742551314f91b60e3ec1caad153ff314b93310..c54e5fdaff3c6ddb59cca8ee9a2bf5a0212bf196 100644 +--- a/panels/info/meson.build ++++ b/panels/info/meson.build +@@ -61,6 +61,7 @@ sources += gnome.compile_resources( + + deps = common_deps + [ + polkit_gobject_dep, ++ dependency('udisks2', version: '>= 2.1.8'), + dependency('libgtop-2.0') + ] + diff --git a/gnu/packages/patches/gnome-control-center-use-udisks-to-get-disk-size.patch b/gnu/packages/patches/gnome-control-center-use-udisks-to-get-disk-size.patch deleted file mode 100644 index 823684b2e9..0000000000 --- a/gnu/packages/patches/gnome-control-center-use-udisks-to-get-disk-size.patch +++ /dev/null @@ -1,221 +0,0 @@ -This patch is derived from upstream commit 2520aea6 and fixes upstream issues -285 and 302. See https://gitlab.gnome.org/GNOME/gcr/merge_requests/387, -https://gitlab.gnome.org/GNOME/gnome-control-center/issues/285 and -https://gitlab.gnome.org/GNOME/gnome-control-center/issues/302. - -diff --git a/panels/info/cc-info-overview-panel.c b/panels/info/cc-info-overview-panel.c -index e2276a295b3fd9de01b30fc3369069b5d33ba5b7..ff47c1fef2493bcc7ab34f9e8716d570d8d370ed 100644 ---- a/panels/info/cc-info-overview-panel.c -+++ b/panels/info/cc-info-overview-panel.c -@@ -36,6 +36,7 @@ - #include - #include - #include -+#include - - #include - -@@ -81,9 +82,7 @@ typedef struct - - GCancellable *cancellable; - -- /* Free space */ -- GList *primary_mounts; -- guint64 total_bytes; -+ UDisksClient *client; - - GraphicsData *graphics_data; - } CcInfoOverviewPanelPrivate; -@@ -96,8 +95,6 @@ struct _CcInfoOverviewPanel - CcInfoOverviewPanelPrivate *priv; - }; - --static void get_primary_disc_info_start (CcInfoOverviewPanel *self); -- - typedef struct - { - char *major; -@@ -486,111 +483,51 @@ get_os_type (void) - } - - static void --query_done (GFile *file, -- GAsyncResult *res, -- CcInfoOverviewPanel *self) -+get_primary_disc_info (CcInfoOverviewPanel *self) - { - CcInfoOverviewPanelPrivate *priv; -- g_autoptr(GFileInfo) info = NULL; -- g_autoptr(GError) error = NULL; -- -- info = g_file_query_filesystem_info_finish (file, res, &error); -- if (info != NULL) -- { -- priv = cc_info_overview_panel_get_instance_private (self); -- priv->total_bytes += g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_FILESYSTEM_SIZE); -- } -- else -- { -- if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) -- return; -- else -- { -- g_autofree char *path = NULL; -- path = g_file_get_path (file); -- g_warning ("Failed to get filesystem free space for '%s': %s", path, error->message); -- } -- } -+ GDBusObjectManager *manager; -+ g_autolist(GDBusObject) objects = NULL; -+ GList *l; -+ guint64 total_size; - -- /* And onto the next element */ -- get_primary_disc_info_start (self); --} -- --static void --get_primary_disc_info_start (CcInfoOverviewPanel *self) --{ -- GUnixMountEntry *mount; -- g_autoptr(GFile) file = NULL; -- CcInfoOverviewPanelPrivate *priv = cc_info_overview_panel_get_instance_private (self); -+ priv = cc_info_overview_panel_get_instance_private (self); -+ total_size = 0; - -- if (priv->primary_mounts == NULL) -+ if (!priv->client) - { -- g_autofree char *size = NULL; -- -- size = g_format_size (priv->total_bytes); -- gtk_label_set_text (GTK_LABEL (priv->disk_label), size); -- -+ gtk_label_set_text (GTK_LABEL (priv->disk_label), _("Unknown")); - return; - } - -- mount = priv->primary_mounts->data; -- priv->primary_mounts = g_list_remove (priv->primary_mounts, mount); -- file = g_file_new_for_path (g_unix_mount_get_mount_path (mount)); -- g_unix_mount_free (mount); -- -- g_file_query_filesystem_info_async (file, -- G_FILE_ATTRIBUTE_FILESYSTEM_SIZE, -- 0, -- priv->cancellable, -- (GAsyncReadyCallback) query_done, -- self); --} -- --static void --get_primary_disc_info (CcInfoOverviewPanel *self) --{ -- GList *points; -- GList *p; -- GHashTable *hash; -- CcInfoOverviewPanelPrivate *priv = cc_info_overview_panel_get_instance_private (self); -- -- hash = g_hash_table_new (g_str_hash, g_str_equal); -- points = g_unix_mount_points_get (NULL); -- -- /* If we do not have /etc/fstab around, try /etc/mtab */ -- if (points == NULL) -- points = g_unix_mounts_get (NULL); -+ manager = udisks_client_get_object_manager (priv->client); -+ objects = g_dbus_object_manager_get_objects (manager); - -- for (p = points; p != NULL; p = p->next) -+ for (l = objects; l != NULL; l = l->next) - { -- GUnixMountEntry *mount = p->data; -- const char *mount_path; -- const char *device_path; -- -- mount_path = g_unix_mount_get_mount_path (mount); -- device_path = g_unix_mount_get_device_path (mount); -- -- /* Do not count multiple mounts with same device_path, because it is -- * probably something like btrfs subvolume. Use only the first one in -- * order to count the real size. */ -- if (gsd_should_ignore_unix_mount (mount) || -- gsd_is_removable_mount (mount) || -- g_str_has_prefix (mount_path, "/media/") || -- g_str_has_prefix (mount_path, g_get_home_dir ()) || -- g_hash_table_lookup (hash, device_path) != NULL) -+ UDisksDrive *drive; -+ drive = udisks_object_peek_drive (UDISKS_OBJECT (l->data)); -+ -+ /* Skip removable devices */ -+ if (drive == NULL || -+ udisks_drive_get_removable (drive) || -+ udisks_drive_get_ejectable (drive)) - { -- g_unix_mount_free (mount); - continue; - } - -- priv->primary_mounts = g_list_prepend (priv->primary_mounts, mount); -- g_hash_table_insert (hash, (gpointer) device_path, (gpointer) device_path); -+ total_size += udisks_drive_get_size (drive); - } -- g_list_free (points); -- g_hash_table_destroy (hash); - -- priv->cancellable = g_cancellable_new (); -- get_primary_disc_info_start (self); -+ if (total_size > 0) -+ { -+ g_autofree gchar *size = g_format_size (total_size); -+ gtk_label_set_text (GTK_LABEL (priv->disk_label), size); -+ } -+ else -+ { -+ gtk_label_set_text (GTK_LABEL (priv->disk_label), _("Unknown")); -+ } - } - - static char * -@@ -852,8 +789,7 @@ cc_info_overview_panel_finalize (GObject *object) - g_clear_object (&priv->cancellable); - } - -- if (priv->primary_mounts) -- g_list_free_full (priv->primary_mounts, (GDestroyNotify) g_unix_mount_free); -+ g_clear_object (&priv->client); - - g_free (priv->gnome_version); - g_free (priv->gnome_date); -@@ -895,6 +831,7 @@ static void - cc_info_overview_panel_init (CcInfoOverviewPanel *self) - { - CcInfoOverviewPanelPrivate *priv = cc_info_overview_panel_get_instance_private (self); -+ g_autoptr(GError) error = NULL; - - gtk_widget_init_template (GTK_WIDGET (self)); - -@@ -907,6 +844,12 @@ cc_info_overview_panel_init (CcInfoOverviewPanel *self) - else - gtk_widget_destroy (priv->updates_button); - -+ priv->client = udisks_client_new_sync (NULL, &error); -+ -+ if (error != NULL) -+ g_warning ("Unable to get UDisks client: %s. Disk information will not be available.", -+ error->message); -+ - info_overview_panel_setup_overview (self); - info_overview_panel_setup_virt (self); - } -diff --git a/panels/info/meson.build b/panels/info/meson.build -index 03742551314f91b60e3ec1caad153ff314b93310..c54e5fdaff3c6ddb59cca8ee9a2bf5a0212bf196 100644 ---- a/panels/info/meson.build -+++ b/panels/info/meson.build -@@ -61,6 +61,7 @@ sources += gnome.compile_resources( - - deps = common_deps + [ - polkit_gobject_dep, -+ dependency('udisks2', version: '>= 2.1.8'), - dependency('libgtop-2.0') - ] - -- cgit v1.2.3 From 995c30d0d65c1ad8c98897a7b0ff08740dbed38f Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 18 Jul 2019 16:31:14 +0200 Subject: gnu: libmp4v2: Fix build with C++11. * gnu/packages/patches/libmp4v2-c++11.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/video.scm (libmp4v2)[source](patches): New field. --- gnu/local.mk | 1 + gnu/packages/patches/libmp4v2-c++11.patch | 14 ++++++++++++++ gnu/packages/video.scm | 1 + 3 files changed, 16 insertions(+) create mode 100644 gnu/packages/patches/libmp4v2-c++11.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 49c3826685..e97ff507e9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1023,6 +1023,7 @@ dist_patch_DATA = \ %D%/packages/patches/libmad-armv7-thumb-pt2.patch \ %D%/packages/patches/libmad-frame-length.patch \ %D%/packages/patches/libmad-mips-newgcc.patch \ + %D%/packages/patches/libmp4v2-c++11.patch \ %D%/packages/patches/libmygpo-qt-fix-qt-5.11.patch \ %D%/packages/patches/libmygpo-qt-missing-qt5-modules.patch \ %D%/packages/patches/libreoffice-boost.patch \ diff --git a/gnu/packages/patches/libmp4v2-c++11.patch b/gnu/packages/patches/libmp4v2-c++11.patch new file mode 100644 index 0000000000..e12f89bd84 --- /dev/null +++ b/gnu/packages/patches/libmp4v2-c++11.patch @@ -0,0 +1,14 @@ +Avoid a type mismatch that shows up in C++11. +Taken from . + +--- a/src/rtphint.cpp 2012-05-20 16:11:53.000000000 -0600 ++++ b/src/rtphint.cpp 2017-05-16 10:25:26.930705191 -0600 +@@ -339,7 +339,7 @@ + pSlash = strchr(pSlash, '/'); + if (pSlash != NULL) { + pSlash++; +- if (pSlash != '\0') { ++ if (*pSlash != '\0') { + length = (uint32_t)strlen(pRtpMap) - (pSlash - pRtpMap); + *ppEncodingParams = (char *)MP4Calloc(length + 1); + strncpy(*ppEncodingParams, pSlash, length); diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 995f7fab15..5fa9070ba7 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -2746,6 +2746,7 @@ of modern, widely supported codecs.") "code-archive-downloads/v2/" "code.google.com/mp4v2/mp4v2-" version ".tar.bz2")) (file-name (string-append name "-" version ".tar.bz2")) + (patches (search-patches "libmp4v2-c++11.patch")) (sha256 (base32 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683")))) -- cgit v1.2.3 From b16e08279938fae329e62154da749860bdccef04 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 19 Jul 2019 15:44:26 +0200 Subject: gnu: python-keras: Add upstream patch. * gnu/packages/patches/python-keras-integration-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/machine-learning.scm (python-keras)[source](patches): New field. --- gnu/local.mk | 1 + gnu/packages/machine-learning.scm | 1 + .../patches/python-keras-integration-test.patch | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 gnu/packages/patches/python-keras-integration-test.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 01ec94484f..35775041b8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1225,6 +1225,7 @@ dist_patch_DATA = \ %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \ %D%/packages/patches/python-configobj-setuptools.patch \ %D%/packages/patches/python-faker-fix-build-32bit.patch \ + %D%/packages/patches/python-keras-integration-test.patch \ %D%/packages/patches/python-pyfakefs-remove-bad-test.patch \ %D%/packages/patches/python-flint-includes.patch \ %D%/packages/patches/python-mox3-python3.6-compat.patch \ diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index e3c69948e2..3eeb9cb1e2 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -1853,6 +1853,7 @@ with image data, text data, and sequence data.") (origin (method url-fetch) (uri (pypi-uri "Keras" version)) + (patches (search-patches "python-keras-integration-test.patch")) (sha256 (base32 "1j8bsqzh49vjdxy6l1k4iwax5vpjzniynyd041xjavdzvfii1dlh")))) diff --git a/gnu/packages/patches/python-keras-integration-test.patch b/gnu/packages/patches/python-keras-integration-test.patch new file mode 100644 index 0000000000..aa2b1a273d --- /dev/null +++ b/gnu/packages/patches/python-keras-integration-test.patch @@ -0,0 +1,19 @@ +Fix a test failure with recent versions of ... Pytest? Python? + +Taken from upstream: +https://github.com/keras-team/keras/commit/fe35050a8f18dc52304aa8da4e463eececa25240 + +diff --git a/tests/integration_tests/applications_test.py b/tests/integration_tests/applications_test.py +index 979f2f2abd6..6e3b57fa8e2 100644 +--- a/tests/integration_tests/applications_test.py ++++ b/tests/integration_tests/applications_test.py +@@ -58,7 +58,8 @@ def _test_application_basic(app, last_dim=1000): + def _test_application_notop(app, last_dim): + output_shape = _get_output_shape( + lambda: app(weights=None, include_top=False)) +- assert output_shape == (None, None, None, last_dim) ++ assert len(output_shape) == 4 ++ assert output_shape[-1] == last_dim + + + def test_mobilenet_v2_legacy_import(): -- cgit v1.2.3 From 57d87f435fcb05a8e44a6d0545d0212429826bd0 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 19 Jul 2019 18:00:41 +0200 Subject: gnu: supertux: Adjust for recent GCC and Boost. * gnu/packages/patches/supertux-fix-build-with-gcc5.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/games.scm (supertux)[source](patches): Remove. [arguments]: Adjust <#:configure-flags>. --- gnu/local.mk | 1 - gnu/packages/games.scm | 6 +- .../patches/supertux-fix-build-with-gcc5.patch | 75 ---------------------- 3 files changed, 3 insertions(+), 79 deletions(-) delete mode 100644 gnu/packages/patches/supertux-fix-build-with-gcc5.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 35775041b8..528ad703a4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1307,7 +1307,6 @@ dist_patch_DATA = \ %D%/packages/patches/superlu-dist-awpm-grid.patch \ %D%/packages/patches/superlu-dist-fix-mpi-deprecations.patch \ %D%/packages/patches/superlu-dist-scotchmetis.patch \ - %D%/packages/patches/supertux-fix-build-with-gcc5.patch \ %D%/packages/patches/supertux-unbundle-squirrel.patch \ %D%/packages/patches/swig-guile-gc.patch \ %D%/packages/patches/swish-e-search.patch \ diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 8e9db1412a..1088d2ff4b 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -3519,12 +3519,12 @@ with the \"Stamp\" tool within Tux Paint.") (base32 "1h1s4abirkdv4ag22zvyk6zkk64skqbjmcnnba67ps4hdzxfbhy4")) (patches - (search-patches "supertux-fix-build-with-gcc5.patch" - "supertux-unbundle-squirrel.patch")))) + (search-patches "supertux-unbundle-squirrel.patch")))) (arguments '(#:tests? #f #:configure-flags '("-DINSTALL_SUBDIR_BIN=bin" - "-DENABLE_BOOST_STATIC_LIBS=OFF" + ;; XXX: Work around . + "-DBoost_NO_BOOST_CMAKE=ON" "-DUSE_SYSTEM_PHYSFS=ON") #:phases (modify-phases %standard-phases diff --git a/gnu/packages/patches/supertux-fix-build-with-gcc5.patch b/gnu/packages/patches/supertux-fix-build-with-gcc5.patch deleted file mode 100644 index 6393215ca1..0000000000 --- a/gnu/packages/patches/supertux-fix-build-with-gcc5.patch +++ /dev/null @@ -1,75 +0,0 @@ -Taken from https://github.com/SuperTux/supertux/commit/a75317ef0a94847d9b6a7833b9c6652ef29edde3. -This patch fixes building with gcc versions earlier than 6. - -From a75317ef0a94847d9b6a7833b9c6652ef29edde3 Mon Sep 17 00:00:00 2001 -From: Ingo Ruhnke -Date: Fri, 28 Dec 2018 22:45:35 +0100 -Subject: [PATCH] Add workaround for backwards compatibilty with gcc5 - -Fixes #1014 ---- - src/video/gl/gl_painter.cpp | 11 ++++++----- - src/video/ttf_surface.cpp | 16 +++++++++------- - 2 files changed, 15 insertions(+), 12 deletions(-) - -diff --git a/src/video/gl/gl_painter.cpp b/src/video/gl/gl_painter.cpp -index 5e0d1e7b1e..32fb7a09b6 100644 ---- a/src/video/gl/gl_painter.cpp -+++ b/src/video/gl/gl_painter.cpp -@@ -37,12 +37,13 @@ namespace { - - inline std::tuple blend_factor(Blend blend) - { -+ using B = std::tuple; - switch(blend) { -- case Blend::NONE: return {GL_ONE, GL_ZERO}; -- case Blend::BLEND: return {GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA}; -- case Blend::ADD: return {GL_SRC_ALPHA, GL_ONE}; -- case Blend::MOD: return {GL_DST_COLOR, GL_ZERO}; -- default: return {GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA}; -+ case Blend::NONE: return B(GL_ONE, GL_ZERO); -+ case Blend::BLEND: return B(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -+ case Blend::ADD: return B(GL_SRC_ALPHA, GL_ONE); -+ case Blend::MOD: return B(GL_DST_COLOR, GL_ZERO); -+ default: return B(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - } - } - -diff --git a/src/video/ttf_surface.cpp b/src/video/ttf_surface.cpp -index 7c9505004f..b41d67b2c8 100644 ---- a/src/video/ttf_surface.cpp -+++ b/src/video/ttf_surface.cpp -@@ -55,12 +55,13 @@ TTFSurface::create(const TTFFont& font, const std::string& text) - SDL_SetSurfaceColorMod(text_surface.get(), 0, 0, 0); - SDL_SetSurfaceBlendMode(text_surface.get(), SDL_BLENDMODE_BLEND); - -+ using P = std::tuple; - const std::initializer_list > positions[] = { - {}, -- {{0, 0}}, -- {{-1, 0}, {1, 0}, {0, -1}, {0, 1}}, -- {{-2, 0}, {2, 0}, {0, -2}, {0, 2}, -- {-1, -1}, {1, -1}, {-1, 1}, {1, 1}} -+ {P{0, 0}}, -+ {P{-1, 0}, P{1, 0}, P{0, -1}, P{0, 1}}, -+ {P{-2, 0}, P{2, 0}, P{0, -2}, P{0, 2}, -+ P{-1, -1}, P{1, -1}, P{-1, 1}, P{1, 1}} - }; - - int shadow_size = std::min(2, font.get_shadow_size()); -@@ -77,11 +78,12 @@ TTFSurface::create(const TTFFont& font, const std::string& text) - SDL_SetSurfaceColorMod(text_surface.get(), 0, 0, 0); - SDL_SetSurfaceBlendMode(text_surface.get(), SDL_BLENDMODE_BLEND); - -+ using P = std::tuple; - const std::initializer_list > positions[] = { - {}, -- {{-1, 0}, {1, 0}, {0, -1}, {0, 1}}, -- {{-2, 0}, {2, 0}, {0, -2}, {0, 2}, -- {-1, -1}, {1, -1}, {-1, 1}, {1, 1}} -+ {P{-1, 0}, P{1, 0}, P{0, -1}, P{0, 1}}, -+ {P{-2, 0}, P{2, 0}, P{0, -2}, P{0, 2}, -+ P{-1, -1}, P{1, -1}, P{-1, 1}, P{1, 1}} - }; - - int border = std::min(2, font.get_border()); -- cgit v1.2.3 From e1f174ae284d9954840f1723ac012c0d3fbcecb4 Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Fri, 19 Jul 2019 10:36:21 -0400 Subject: gnu: evolution-data-server: Use a proper patch for locales. See . * gnu/packages/patches/evolution-data-server-locales.patch: New file. * gnu/local.mk: Add it. * gnu/packages/gnome.scm (evolution-data-server): Replace the 'patch-locale-canonicalization' phase with the new patch. --- gnu/local.mk | 1 + gnu/packages/gnome.scm | 17 +---------- .../patches/evolution-data-server-locales.patch | 33 ++++++++++++++++++++++ 3 files changed, 35 insertions(+), 16 deletions(-) create mode 100644 gnu/packages/patches/evolution-data-server-locales.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 528ad703a4..c95a5c8126 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -780,6 +780,7 @@ dist_patch_DATA = \ %D%/packages/patches/erlang-man-path.patch \ %D%/packages/patches/eudev-rules-directory.patch \ %D%/packages/patches/evilwm-lost-focus-bug.patch \ + %D%/packages/patches/evolution-data-server-locales.patch \ %D%/packages/patches/exiv2-CVE-2017-14860.patch \ %D%/packages/patches/exiv2-CVE-2017-14859-14862-14864.patch \ %D%/packages/patches/extundelete-e2fsprogs-1.44.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index beaba3b4c5..9190301ee9 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -5162,6 +5162,7 @@ Exchange, Last.fm, IMAP/SMTP, Jabber, SIP and Kerberos.") (uri (string-append "mirror://gnome/sources/" name "/" (version-major+minor version) "/" name "-" version ".tar.xz")) + (patches (search-patches "evolution-data-server-locales.patch")) (sha256 (base32 "1s952wyhgcbmq9nfgk75v15zdy1h3wy5p5rmkqibaavmc0pk3mli")))) @@ -5205,22 +5206,6 @@ Exchange, Last.fm, IMAP/SMTP, Jabber, SIP and Kerberos.") "tests/libedata-cal/test-cal-cache-utils.c") (("/bin/rm") (which "rm"))) #t)) - ;; This phase fixes locale canonicalization when using newer - ;; versions of ICU. The bug has been fixed upstream, and - ;; should appear starting in version 3.33.5. - ;; . - (add-after 'unpack 'patch-locale-canonicalization - (lambda _ - (substitute* "src/libedataserver/e-collator.c" - (("len = uloc_canonicalize \\(posix_locale,.*" x) - ((lambda (xs) (string-join xs "\n" 'suffix)) - (list - "if (posix_locale && (" - " g_ascii_strcasecmp(posix_locale, \"C\") == 0 ||" - " g_ascii_strcasecmp(posix_locale, \"POSIX\") == 0))" - " posix_locale = \"en_US_POSIX\";" - x)))) - #t)) (add-before 'configure 'dont-override-rpath (lambda _ (substitute* "CMakeLists.txt" diff --git a/gnu/packages/patches/evolution-data-server-locales.patch b/gnu/packages/patches/evolution-data-server-locales.patch new file mode 100644 index 0000000000..48baefb0d8 --- /dev/null +++ b/gnu/packages/patches/evolution-data-server-locales.patch @@ -0,0 +1,33 @@ +This patch fixes locale canonicalization when using newer versions of +ICU. It comes from the upstream repo, and should appear starting in +version 3.33.5. + +From fe4ac94ce3c14f200e049a5d102fc0e4b811c71e Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Tue, 16 Jul 2019 07:22:07 +0200 +Subject: [PATCH] I#137 - POSIX locale tests fail with ICU 64.x + +Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/137 +--- + src/libedataserver/e-collator.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/libedataserver/e-collator.c b/src/libedataserver/e-collator.c +index 718eac5da..ec2cf7951 100644 +--- a/src/libedataserver/e-collator.c ++++ b/src/libedataserver/e-collator.c +@@ -132,6 +132,11 @@ canonicalize_locale (const gchar *posix_locale, + gint len; + const gchar *collation_type = NULL; + ++ if (posix_locale && ( ++ g_ascii_strcasecmp (posix_locale, "C") == 0 || ++ g_ascii_strcasecmp (posix_locale, "POSIX") == 0)) ++ posix_locale = "en_US_POSIX"; ++ + len = uloc_canonicalize (posix_locale, locale_buffer, LOCALE_BUFFER_LEN, &status); + + if (U_FAILURE (status)) { +-- +2.22.0 + -- cgit v1.2.3 From f9f72d35361bde53b8face634c72530aa7d81edf Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 27 Jul 2019 23:45:54 +0200 Subject: gnu: glib: Update to 2.60.6. * gnu/packages/patches/glib-keyfile-arguments.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/glib.scm (glib): Update to 2.60.6. [source](patches): Remove obsolete patch. --- gnu/local.mk | 1 - gnu/packages/glib.scm | 7 +++---- gnu/packages/patches/glib-keyfile-arguments.patch | 20 -------------------- 3 files changed, 3 insertions(+), 25 deletions(-) delete mode 100644 gnu/packages/patches/glib-keyfile-arguments.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 0517578bd2..27edacbc7e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -856,7 +856,6 @@ dist_patch_DATA = \ %D%/packages/patches/ghostscript-no-header-uuid.patch \ %D%/packages/patches/ghostscript-no-header-creationdate.patch \ %D%/packages/patches/giflib-make-reallocarray-private.patch \ - %D%/packages/patches/glib-keyfile-arguments.patch \ %D%/packages/patches/glib-tests-timer.patch \ %D%/packages/patches/glibc-CVE-2015-5180.patch \ %D%/packages/patches/glibc-CVE-2015-7547.patch \ diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 8f1b91e142..438c1f9cbc 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -159,7 +159,7 @@ shared NFS home directories.") (define glib (package (name "glib") - (version "2.60.5") + (version "2.60.6") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" @@ -167,9 +167,8 @@ shared NFS home directories.") name "-" version ".tar.xz")) (sha256 (base32 - "0bk2l9mhvc44c0gfg442wrifwj2fci1w71dsp3nb50pffvsivpry")) - (patches (search-patches "glib-tests-timer.patch" - "glib-keyfile-arguments.patch")) + "0v7vpx2md1gn0wwiirn7g4bhf2csfvcr03y96q2zv97ain6sp3zz")) + (patches (search-patches "glib-tests-timer.patch")) (modules '((guix build utils))) (snippet '(begin diff --git a/gnu/packages/patches/glib-keyfile-arguments.patch b/gnu/packages/patches/glib-keyfile-arguments.patch deleted file mode 100644 index 8d428f4192..0000000000 --- a/gnu/packages/patches/glib-keyfile-arguments.patch +++ /dev/null @@ -1,20 +0,0 @@ -Fix a problem with the keyfile backend whereby instantiating it with -the default NULL value would cause an assertion error: - -https://gitlab.gnome.org/GNOME/glib/issues/1825 - -This issue showed up when running the test suites of uhttpmock and spice. - -diff --git a/gio/gkeyfilesettingsbackend.c b/gio/gkeyfilesettingsbackend.c ---- a/gio/gkeyfilesettingsbackend.c -+++ b/gio/gkeyfilesettingsbackend.c -@@ -740,7 +740,8 @@ g_keyfile_settings_backend_set_property (GObject *object, - case PROP_FILENAME: - /* Construct only. */ - g_assert (kfsb->file == NULL); -- kfsb->file = g_file_new_for_path (g_value_get_string (value)); -+ if (g_value_get_string (value)) -+ kfsb->file = g_file_new_for_path (g_value_get_string (value)); - break; - - case PROP_ROOT_PATH: -- cgit v1.2.3 From 497b2d39427af4aaddbaa8922d4a6a858bbdaee7 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 31 Jul 2019 16:52:39 +0200 Subject: gnu: dbus-c++: Fix build with GCC 7. * gnu/packages/patches/dbus-c++-gcc-compat.patch, gnu/packages/patches/dbus-c++-threading-mutex.patch: New files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/glib.scm (dbus-c++)[source](patches): New field. [arguments]: End phases on #t. --- gnu/local.mk | 2 ++ gnu/packages/glib.scm | 5 ++- gnu/packages/patches/dbus-c++-gcc-compat.patch | 14 ++++++++ .../patches/dbus-c++-threading-mutex.patch | 37 ++++++++++++++++++++++ 4 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/dbus-c++-gcc-compat.patch create mode 100644 gnu/packages/patches/dbus-c++-threading-mutex.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 27edacbc7e..41f4e4eec2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -750,6 +750,8 @@ dist_patch_DATA = \ %D%/packages/patches/cvs-CVE-2017-12836.patch \ %D%/packages/patches/darkice-workaround-fpermissive-error.patch \ %D%/packages/patches/dbus-helper-search-path.patch \ + %D%/packages/patches/dbus-c++-gcc-compat.patch \ + %D%/packages/patches/dbus-c++-threading-mutex.patch \ %D%/packages/patches/dealii-mpi-deprecations.patch \ %D%/packages/patches/deja-dup-use-ref-keyword-for-iter.patch \ %D%/packages/patches/dfu-programmer-fix-libusb.patch \ diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 438c1f9cbc..3e17330447 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -791,6 +791,8 @@ This package provides the library for GLib applications.") "mirror://sourceforge/dbus-cplusplus/dbus-c%2B%2B/" version "/libdbus-c%2B%2B-" version ".tar.gz")) (file-name (string-append name "-" version ".tar.gz")) + (patches (search-patches "dbus-c++-gcc-compat.patch" + "dbus-c++-threading-mutex.patch")) (sha256 (base32 "0qafmy2i6dzx4n1dqp6pygyy6gjljnb7hwjcj2z11c1wgclsq4dw")))) @@ -812,7 +814,8 @@ This package provides the library for GLib applications.") (lambda _ (substitute* "include/dbus-c++/eventloop-integration.h" (("#include ") - "#include \n#include "))))))) + "#include \n#include ")) + #t))))) (synopsis "D-Bus API for C++") (description "This package provides D-Bus client API bindings for the C++ programming language. It also contains the utility diff --git a/gnu/packages/patches/dbus-c++-gcc-compat.patch b/gnu/packages/patches/dbus-c++-gcc-compat.patch new file mode 100644 index 0000000000..c4f126858c --- /dev/null +++ b/gnu/packages/patches/dbus-c++-gcc-compat.patch @@ -0,0 +1,14 @@ +Fix a string comparison in C++ 11. + +Taken from Debian: +https://sources.debian.org/src/dbus-c++/0.9.0-8.1/debian/patches/06_fix_gcc-7_ftbfs.patch/ + +--- a/src/pipe.cpp ++++ b/src/pipe.cpp +@@ -83,5 +83,5 @@ ssize_t Pipe::read(void *buffer, unsigne + void Pipe::signal() + { + // TODO: ignoring return of read/write generates warning; maybe relevant for eventloop work... +- ::write(_fd_write, '\0', 1); ++ ::write(_fd_write, "\0", 1); + } diff --git a/gnu/packages/patches/dbus-c++-threading-mutex.patch b/gnu/packages/patches/dbus-c++-threading-mutex.patch new file mode 100644 index 0000000000..b201700dc0 --- /dev/null +++ b/gnu/packages/patches/dbus-c++-threading-mutex.patch @@ -0,0 +1,37 @@ +Description: Fix FTBFS if DBUS_HAS_RECURSIVE_MUTEX is undefined +Author: Peter Williams +Last-Update: 2018-01-26 + +Taken from Debian: +https://sources.debian.org/src/dbus-c++/0.9.0-8.1/debian/patches/07_fix_mutex_ftbfs.patch/ + +--- dbus-c++-0.9.0.orig/include/dbus-c++/dispatcher.h ++++ dbus-c++-0.9.0/include/dbus-c++/dispatcher.h +@@ -267,6 +267,19 @@ struct Threading + return new Mx; + } + ++#ifndef DBUS_HAS_RECURSIVE_MUTEX ++ static bool mutex_free(Mutex *mx) ++ { ++ delete mx; ++ return true; ++ } ++ ++ static bool mutex_lock(Mutex *mx) ++ { ++ mx->lock(); ++ return true; ++ } ++#else + static void mutex_free(Mutex *mx) + { + delete mx; +@@ -276,6 +289,7 @@ struct Threading + { + mx->lock(); + } ++#endif + + static void mutex_unlock(Mutex *mx) + { -- cgit v1.2.3 From f7780fdf611228f7772052a3c650487cf34846c6 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Thu, 8 Aug 2019 13:16:51 -0400 Subject: gnu: isc-dhcp: Update bundled BIND to 9.11.9. * gnu/packages/patches/isc-dhcp-4.4.1-fixes-for-newer-bind.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/admin.scm (isc-dhcp): Update BIND version to 9.11.9. [arguments]: In the 'replace-bundled-bind' phase, apply the patch. In the 'post-configure' phase: Refine a substitute* regexp to avoid substituting an instance of "./configure.log" in the BIND Makefile. Substitute /usr/bin/file in the BIND configure script. [native-inputs]: Add 'file', 'patch', and the patch. [inputs]: Update the hash of bind-source-tarball. --- gnu/local.mk | 1 + gnu/packages/admin.scm | 40 +++++++-- .../isc-dhcp-4.4.1-fixes-for-newer-bind.patch | 100 +++++++++++++++++++++ 3 files changed, 132 insertions(+), 9 deletions(-) create mode 100644 gnu/packages/patches/isc-dhcp-4.4.1-fixes-for-newer-bind.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f654f84d3a..f412891919 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -951,6 +951,7 @@ dist_patch_DATA = \ %D%/packages/patches/ilmbase-fix-tests.patch \ %D%/packages/patches/intltool-perl-compatibility.patch \ %D%/packages/patches/irrlicht-use-system-libs.patch \ + %D%/packages/patches/isc-dhcp-4.4.1-fixes-for-newer-bind.patch \ %D%/packages/patches/isl-0.11.1-aarch64-support.patch \ %D%/packages/patches/jacal-fix-texinfo.patch \ %D%/packages/patches/jamvm-arm.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 7ffdf18609..bd3c14033e 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès ;;; Copyright © 2013 Cyril Roelandt -;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver +;;; Copyright © 2014, 2015, 2016, 2018, 2019 Mark H Weaver ;;; Copyright © 2014, 2015, 2016, 2017, 2018 Eric Bavier ;;; Copyright © 2015, 2016 Taylan Ulrich Bayırlı/Kammer ;;; Copyright © 2015 Alex Sassmannshausen @@ -684,9 +684,9 @@ connection alive.") (define-public isc-dhcp (let* ((bind-major-version "9") (bind-minor-version "11") - (bind-patch-version "4") - (bind-release-type "-P") ; for patch release, use "-P" - (bind-release-version "2") ; for patch release, e.g. "6" + (bind-patch-version "9") + (bind-release-type "") ; for patch release, use "-P" + (bind-release-version "") ; for patch release, e.g. "6" (bind-version (string-append bind-major-version "." bind-minor-version @@ -710,7 +710,18 @@ connection alive.") #:phases (modify-phases %standard-phases (add-after 'unpack 'replace-bundled-bind - (lambda* (#:key inputs #:allow-other-keys) + (lambda* (#:key inputs native-inputs #:allow-other-keys) + ;; XXX TODO: Remove the following invocation of 'patch' when + ;; isc-dhcp is updated. It should be needed only for 4.4.1. + (let ((patch (string-append (assoc-ref (or native-inputs inputs) + "patch") + "/bin/patch")) + (the-patch (assoc-ref (or native-inputs inputs) + "fixes-for-newer-bind.patch"))) + (format #t "applying '~a'...~%" the-patch) + (invoke patch "--force" "--no-backup-if-mismatch" + "-p1" "--input" the-patch)) + (delete-file "bind/bind.tar.gz") (copy-file (assoc-ref inputs "bind-source-tarball") "bind/bind.tar.gz") @@ -743,15 +754,18 @@ connection alive.") ;; shell is used. (with-directory-excursion "bind" (substitute* "Makefile" - (("\\./configure") + (("\\./configure ") (let ((sh (which "sh"))) (string-append "./configure CONFIG_SHELL=" - sh " SHELL=" sh)))) + sh " SHELL=" sh " ")))) (let ((bind-directory (string-append "bind-" ,bind-version))) (invoke "tar" "xf" "bind.tar.gz") (for-each patch-shebang (find-files bind-directory ".*")) + (substitute* (string-append bind-directory "/configure") + (("/usr/bin/file") + (which "file"))) (invoke "tar" "cf" "bind.tar.gz" bind-directory ;; avoid non-determinism in the archive @@ -787,7 +801,15 @@ connection alive.") (list inetutils net-tools coreutils sed)))) #t)))))) - (native-inputs `(("perl" ,perl))) + (native-inputs + `(("perl" ,perl) + ("file" ,file) + + ;; XXX TODO: Remove the following patch, and also the 'patch' + ;; program, when isc-dhcp is updated. + ("fixes-for-newer-bind.patch" + ,(search-patch "isc-dhcp-4.4.1-fixes-for-newer-bind.patch")) + ("patch" ,patch))) (inputs `(("inetutils" ,inetutils) ("net-tools" ,net-tools) @@ -803,7 +825,7 @@ connection alive.") "/bind-" bind-version ".tar.gz")) (sha256 (base32 - "04fq17zksd2b3w6w6padps5n7b6s2lasxpksbhl4378h56vgfnm8")))) + "03n57as73ygw6g3lqsmq2idkykajpbskzgixixdvi5a76m4g0fwn")))) ;; When cross-compiling, we need the cross Coreutils and sed. ;; Otherwise just use those from %FINAL-INPUTS. diff --git a/gnu/packages/patches/isc-dhcp-4.4.1-fixes-for-newer-bind.patch b/gnu/packages/patches/isc-dhcp-4.4.1-fixes-for-newer-bind.patch new file mode 100644 index 0000000000..53e681ea31 --- /dev/null +++ b/gnu/packages/patches/isc-dhcp-4.4.1-fixes-for-newer-bind.patch @@ -0,0 +1,100 @@ +These fixes are needed to adapt isc-dhcp-4.4.1 to build +successfully after its bundled copy of bind has been updated. + +It is derived from the following upstream commits: + +commit 8194daabfd590f17825f0c61e9534bee5c99cc86 +Author: Thomas Markwalder +Date: Fri Sep 14 13:41:14 2018 -0400 + + [master] Added includes of new BIND9 compatibility headers, updated util/bind.sh + + Merges in rt48072. + +commit cc35f84943df44dac2499f3e16e8aaba7d54191d +Author: Thomas Markwalder +Date: Tue Mar 19 08:36:23 2019 -0400 + + [master] Avoid Bind9 python dependency + + merges [#3,!1] Avoid Bind9 python dependency + +--- a/bind/Makefile.in ++++ b/bind/Makefile.in +@@ -23,7 +23,7 @@ exec_prefix = @exec_prefix@ + + bindconfig = --without-openssl --without-libxml2 --without-libjson \ + --without-gssapi --disable-threads --without-lmdb \ +- --includedir=@includedir@ --libdir=@libdir@ \ ++ --includedir=@includedir@ --libdir=@libdir@ --without-python\ + @BINDLT@ @BINDIOMUX@ @BINDCONFIG@ --enable-full-report + + @BIND_ATF_FALSE@cleandirs = ./lib ./include +diff --git a/includes/omapip/isclib.h b/includes/omapip/isclib.h +index 75a87ff6..538b927f 100644 +--- a/includes/omapip/isclib.h ++++ b/includes/omapip/isclib.h +@@ -48,6 +48,9 @@ + #include + #include + ++#include ++#include ++ + #include + #include + #include +diff --git a/includes/omapip/result.h b/includes/omapip/result.h +index 91243e1b..860298f6 100644 +--- a/includes/omapip/result.h ++++ b/includes/omapip/result.h +@@ -26,6 +26,7 @@ + #ifndef DHCP_RESULT_H + #define DHCP_RESULT_H 1 + ++#include + #include + #include + #include +diff --git a/server/dhcpv6.c b/server/dhcpv6.c +index a7110f98..cde4f617 100644 +--- a/server/dhcpv6.c ++++ b/server/dhcpv6.c +@@ -1034,7 +1034,8 @@ void check_pool6_threshold(struct reply_state *reply, + shared_name, + inet_ntop(AF_INET6, &lease->addr, + tmp_addr, sizeof(tmp_addr)), +- used, count); ++ (long long unsigned)(used), ++ (long long unsigned)(count)); + } + return; + } +@@ -1066,7 +1067,8 @@ void check_pool6_threshold(struct reply_state *reply, + "address: %s; high threshold %d%% %llu/%llu.", + shared_name, + inet_ntop(AF_INET6, &lease->addr, tmp_addr, sizeof(tmp_addr)), +- poolhigh, used, count); ++ poolhigh, (long long unsigned)(used), ++ (long long unsigned)(count)); + + /* handle the low threshold now, if we don't + * have one we default to 0. */ +@@ -1436,12 +1438,15 @@ pick_v6_address(struct reply_state *reply) + log_debug("Unable to pick client address: " + "no addresses available - shared network %s: " + " 2^64-1 < total, %llu active, %llu abandoned", +- shared_name, active - abandoned, abandoned); ++ shared_name, (long long unsigned)(active - abandoned), ++ (long long unsigned)(abandoned)); + } else { + log_debug("Unable to pick client address: " + "no addresses available - shared network %s: " + "%llu total, %llu active, %llu abandoned", +- shared_name, total, active - abandoned, abandoned); ++ shared_name, (long long unsigned)(total), ++ (long long unsigned)(active - abandoned), ++ (long long unsigned)(abandoned)); + } + + return ISC_R_NORESOURCES; -- cgit v1.2.3 From 57939283c0df16cbcec009c442a567ec6e3ff066 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 12 Aug 2019 15:39:59 +0200 Subject: gnu: mame: Fix build. * gnu/packages/emulators.scm (mame): Apply upstream patch. * gnu/packages/patches/mame-rapidjson-fix.patch: New file. * gnu/local.mk: Register file. --- gnu/local.mk | 1 + gnu/packages/emulators.scm | 4 +++ gnu/packages/patches/mame-rapidjson-fix.patch | 37 +++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 gnu/packages/patches/mame-rapidjson-fix.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f412891919..fa5753e511 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1078,6 +1078,7 @@ dist_patch_DATA = \ %D%/packages/patches/lxsession-use-gapplication.patch \ %D%/packages/patches/make-glibc-compat.patch \ %D%/packages/patches/make-impure-dirs.patch \ + %D%/packages/patches/mame-rapidjson-fix.patch \ %D%/packages/patches/mariadb-client-test-32bit.patch \ %D%/packages/patches/mars-install.patch \ %D%/packages/patches/mars-sfml-2.3.patch \ diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index 032ef90807..388611d1d8 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -1196,6 +1196,10 @@ play them on systems for which they were never designed!") (sha256 (base32 "0p3zcb9l624dsy2gyv23ppp1k1iwd1vrg8cbn5v4fx1s44mx7f5c")) + (patches + ;; FIXME: Remove once 0.213 is out. Applied upstream as + ;; 0b5b13cf1e28550b49c387dec93f9801f029e313. + (search-patches "mame-rapidjson-fix.patch")) (modules '((guix build utils))) (snippet ;; Remove bundled libraries. diff --git a/gnu/packages/patches/mame-rapidjson-fix.patch b/gnu/packages/patches/mame-rapidjson-fix.patch new file mode 100644 index 0000000000..70cf8458ea --- /dev/null +++ b/gnu/packages/patches/mame-rapidjson-fix.patch @@ -0,0 +1,37 @@ +From 0b5b13cf1e28550b49c387dec93f9801f029e313 Mon Sep 17 00:00:00 2001 +From: Julian Sikorski +Date: Mon, 5 Aug 2019 21:16:54 +0200 +Subject: [PATCH] Fix building using system rapidjson + +--- + scripts/target/mame/arcade.lua | 1 + + src/mame/video/midtunit.cpp | 4 ++-- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua +index 964daa3572f..ef30ae3c2c2 100644 +--- a/scripts/target/mame/arcade.lua ++++ b/scripts/target/mame/arcade.lua +@@ -930,6 +930,7 @@ function createMAMEProjects(_target, _subtarget, _name) + ext_includedir("flac"), + ext_includedir("glm"), + ext_includedir("jpeg"), ++ ext_includedir("rapidjson"), + } + + end +diff --git a/src/mame/video/midtunit.cpp b/src/mame/video/midtunit.cpp +index b4cb98abacf..b307f3f722b 100644 +--- a/src/mame/video/midtunit.cpp ++++ b/src/mame/video/midtunit.cpp +@@ -20,8 +20,8 @@ + #include "emuopts.h" // Used by PNG logging + #include "png.h" // Used by PNG logging + +-#include "rapidjson/include/rapidjson/prettywriter.h" // Used by JSON logging +-#include "rapidjson/include/rapidjson/stringbuffer.h" // Used by JSON logging ++#include // Used by JSON logging ++#include // Used by JSON logging + + DEFINE_DEVICE_TYPE(MIDTUNIT_VIDEO, midtunit_video_device, "tunitvid", "Midway T-Unit Video") + DEFINE_DEVICE_TYPE(MIDWUNIT_VIDEO, midwunit_video_device, "wunitvid", "Midway W-Unit Video") -- cgit v1.2.3 From 77bdfe2f138e7c074c2eb94de3a44561da39d966 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Tue, 13 Aug 2019 12:44:06 +0200 Subject: gnu: scribus: Update to 1.5.5. * gnu/packages/scribus.scm (scribus): Update to 1.5.5. [source]: Remove unnecessary patches and snippet. [description]: Change freetype to FreeType. * gnu/packages/patches/scribus-poppler.patch: Remove file. * gnu/local.mk: Apply removal. --- gnu/local.mk | 1 - gnu/packages/patches/scribus-poppler.patch | 72 --------------------------- gnu/packages/scribus.scm | 80 ++++++------------------------ 3 files changed, 14 insertions(+), 139 deletions(-) delete mode 100644 gnu/packages/patches/scribus-poppler.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index fa5753e511..cbc741ac57 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1293,7 +1293,6 @@ dist_patch_DATA = \ %D%/packages/patches/scheme48-tests.patch \ %D%/packages/patches/scotch-build-parallelism.patch \ %D%/packages/patches/scotch-integer-declarations.patch \ - %D%/packages/patches/scribus-poppler.patch \ %D%/packages/patches/sdl-libx11-1.6.patch \ %D%/packages/patches/seq24-rename-mutex.patch \ %D%/packages/patches/sharutils-CVE-2018-1000097.patch \ diff --git a/gnu/packages/patches/scribus-poppler.patch b/gnu/packages/patches/scribus-poppler.patch deleted file mode 100644 index 9b969e4cb6..0000000000 --- a/gnu/packages/patches/scribus-poppler.patch +++ /dev/null @@ -1,72 +0,0 @@ -Fix build with recent Poppler. - -From d867ec3c386baaed1b8e076dd70b278863411480 Mon Sep 17 00:00:00 2001 -From: Jean Ghali -Date: Mon, 30 Apr 2018 09:19:33 +0000 -Subject: [PATCH] =?UTF-8?q?#15289:=20FTBFS=201.5.4=20with=20error:=20inval?= - =?UTF-8?q?id=20conversion=20from=20=E2=80=98const=20GooString*=E2=80=99?= - =?UTF-8?q?=20to=20=E2=80=98GooString*=E2=80=99?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -git-svn-id: svn://scribus.net/trunk/Scribus@22498 11d20701-8431-0410-a711-e3c959e3b870 ---- - scribus/plugins/import/pdf/importpdf.cpp | 2 +- - scribus/plugins/import/pdf/importpdf.h | 2 +- - scribus/plugins/import/pdf/slaoutput.cpp | 2 +- - scribus/plugins/import/pdf/slaoutput.h | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp -index c1802861aa..d4c5a9ba49 100644 ---- a/scribus/plugins/import/pdf/importpdf.cpp -+++ b/scribus/plugins/import/pdf/importpdf.cpp -@@ -1081,7 +1081,7 @@ QRectF PdfPlug::getCBox(int box, int pgNum) - return cRect; - } - --QString PdfPlug::UnicodeParsedString(GooString *s1) -+QString PdfPlug::UnicodeParsedString(const GooString *s1) - { - if ( !s1 || s1->getLength() == 0 ) - return QString(); -diff --git a/scribus/plugins/import/pdf/importpdf.h b/scribus/plugins/import/pdf/importpdf.h -index c8c5efcd0d..5249562692 100644 ---- a/scribus/plugins/import/pdf/importpdf.h -+++ b/scribus/plugins/import/pdf/importpdf.h -@@ -81,7 +81,7 @@ class PdfPlug : public QObject - private: - bool convert(const QString& fn); - QRectF getCBox(int box, int pgNum); -- QString UnicodeParsedString(GooString *s1); -+ QString UnicodeParsedString(const GooString *s1); - - QList Elements; - double baseX, baseY; -diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp -index be1815dc29..17b6357246 100644 ---- a/scribus/plugins/import/pdf/slaoutput.cpp -+++ b/scribus/plugins/import/pdf/slaoutput.cpp -@@ -4252,7 +4252,7 @@ void SlaOutputDev::pushGroup(QString maskName, GBool forSoftMask, GBool alpha, b - m_groupStack.push(gElements); - } - --QString SlaOutputDev::UnicodeParsedString(GooString *s1) -+QString SlaOutputDev::UnicodeParsedString(const GooString *s1) - { - if ( !s1 || s1->getLength() == 0 ) - return QString(); -diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h -index 20e8b2d311..6698c030e0 100644 ---- a/scribus/plugins/import/pdf/slaoutput.h -+++ b/scribus/plugins/import/pdf/slaoutput.h -@@ -266,7 +266,7 @@ class SlaOutputDev : public OutputDev - int getBlendMode(GfxState *state); - void applyMask(PageItem *ite); - void pushGroup(QString maskName = "", GBool forSoftMask = gFalse, GBool alpha = gFalse, bool inverted = false); -- QString UnicodeParsedString(GooString *s1); -+ QString UnicodeParsedString(const GooString *s1); - bool checkClip(); - bool pathIsClosed; - QString CurrColorFill; diff --git a/gnu/packages/scribus.scm b/gnu/packages/scribus.scm index 20795da275..25122c10ae 100644 --- a/gnu/packages/scribus.scm +++ b/gnu/packages/scribus.scm @@ -47,7 +47,7 @@ (define-public scribus (package (name "scribus") - (version "1.5.4") + (version "1.5.5") (source (origin (method url-fetch) @@ -55,60 +55,7 @@ version "/scribus-" version ".tar.xz")) (sha256 (base32 - "00ys0p6h3iq77kh72dkl0qrf7qvznq18qdrgiq10gfxja1995034")) - (patches (append - ;; Scribus relies heavily on Poppler internals, which have - ;; changed a lot since the latest Scribus release (2018-04). - ;; Thus, we require a bunch of patches to stay compatible. - (search-patches "scribus-poppler.patch") - (list (origin - (method url-fetch) - (uri (string-append - "https://github.com/scribusproject/scribus/commit/" - "7d4ceeb5cac32287769e3c0238699e0b3e56c24d.patch")) - (file-name "scribus-poppler-0.64.patch") - (sha256 - (base32 - "1kr27bfzkpabrh42nsrrvlqyycdg9isbavpaa5spgmrhidcg02xj"))) - (origin - (method url-fetch) - (uri (string-append - "https://github.com/scribusproject/scribus/commit/" - "76561c1a55cd07c268f8f2b2fea888532933700b.patch")) - (file-name "scribus-poppler-config.patch") - (sha256 - (base32 - "01k18xjj82c3ndzp89dlpfhhdccc8z0acf8b04r592jyr5y9rc19"))) - (origin - (method url-fetch) - (uri (string-append - "https://github.com/scribusproject/scribus/commit/" - "8e05d26c19097ac2ad5b4ebbf40a3771ee6faf9c.patch")) - (file-name "scribus-poppler-0.69.patch") - (sha256 - (base32 - "1avdmsj5l543j0irq18nxgiw99n395jj56ih5dsal59fn0wbqk42"))) - (origin - (method url-fetch) - (uri (string-append "https://git.archlinux.org/svntogit/" - "community.git/plain/trunk/scribus-" - "poppler-0.70.patch?h=packages/scribus&id=" - "8ef43ee2fceb0753ed5a76bb0a11c84775898ffc")) - (file-name "scribus-poppler-0.70.patch") - (sha256 - (base32 - "0dw7ix3jaj0y1q97cmmqwb2qgdx760yhxx86wa8rnx0xhfi5x6qr")))))) - (modules '((guix build utils))) - (snippet - '(begin - (for-each (lambda (file) - (substitute* file - ;; These are required for compatibility with Poppler 0.71. - (("GBool") "bool") (("gTrue") "true") (("gFalse") "false") - ;; ...and this for Poppler 0.72. - (("getCString") "c_str"))) - (find-files "scribus/plugins/import/pdf")) - #t)))) + "0w9zzsiaq3f7vpxybk01c9z2b4qqg67mzpyfb2gjchz8dhdb423r")))) (build-system cmake-build-system) (arguments `(#:tests? #f ;no test target @@ -118,9 +65,9 @@ (modify-phases %standard-phases (add-after 'install 'wrap-program (lambda* (#:key inputs outputs #:allow-other-keys) - ;; Fix "ImportError: No module named _sysconfigdata_nd" where - ;; Scribus checks PATH and eventually runs system's Python - ;; instead of package's. + ;; Fix "ImportError: No module named _sysconfigdata_nd" + ;; runtime error where Scribus checks PATH and eventually + ;; runs system's Python instead of package's. (let* ((out (assoc-ref outputs "out")) (py2 (assoc-ref inputs "python"))) (wrap-program (string-append out "/bin/scribus") @@ -161,12 +108,13 @@ (home-page "https://www.scribus.net") (synopsis "Desktop publishing and page layout program") (description - "Scribus is a @dfn{desktop publishing} (DTP) application and can be used -for many tasks; from brochure design to newspapers, magazines, newsletters and -posters to technical documentation. Scribus supports professional DTP -features, such as CMYK color and a color management system to soft proof -images for high quality color printing, flexible PDF creation options, -Encapsulated PostScript import/export and creation of four color separations, -import of EPS/PS and SVG as native vector graphics, Unicode text including -right to left scripts such as Arabic and Hebrew via freetype.") + "Scribus is a @dfn{desktop publishing} (DTP) application and can +be used for many tasks; from brochure design to newspapers, magazines, +newsletters and posters to technical documentation. Scribus supports +professional DTP features, such as CMYK color and a color management +system to soft proof images for high quality color printing, flexible +PDF creation options, Encapsulated PostScript import/export and +creation of four color separations, import of EPS/PS and SVG as native +vector graphics, Unicode text including right to left scripts such as +Arabic and Hebrew via FreeType.") (license license:gpl2+))) -- cgit v1.2.3 From 5c3f1e4306f252c7dc397ac765caa288a57f99f1 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 14 Aug 2019 22:25:30 +0200 Subject: gnu: sssd: Update to 1.16.4. * gnu/packages/patches/sssd-curl-compat.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/sssd.scm (sssd): Update to 1.16.4. [source](patches): Remove. [arguments]: Enable fixed tests. --- gnu/local.mk | 1 - gnu/packages/patches/sssd-curl-compat.patch | 18 ------------------ gnu/packages/sssd.scm | 9 ++------- 3 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 gnu/packages/patches/sssd-curl-compat.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index c6962aebd1..08bc205623 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1309,7 +1309,6 @@ dist_patch_DATA = \ %D%/packages/patches/snappy-add-O2-flag-in-CmakeLists.txt.patch \ %D%/packages/patches/sooperlooper-build-with-wx-30.patch \ %D%/packages/patches/soundconverter-remove-gconf-dependency.patch \ - %D%/packages/patches/sssd-curl-compat.patch \ %D%/packages/patches/steghide-fixes.patch \ %D%/packages/patches/strace-ipc-tests.patch \ %D%/packages/patches/streamlink-update-test.patch \ diff --git a/gnu/packages/patches/sssd-curl-compat.patch b/gnu/packages/patches/sssd-curl-compat.patch deleted file mode 100644 index ecab737153..0000000000 --- a/gnu/packages/patches/sssd-curl-compat.patch +++ /dev/null @@ -1,18 +0,0 @@ -Fix build with curl >= 7.62. Patch taken from upstream: - -https://pagure.io/SSSD/sssd/c/4d3841ca379afc01184453ba45ab3e75ffec60da?branch=sssd-1-16 - -diff --git a/src/util/tev_curl.c b/src/util/tev_curl.c -index 6a7a580..d70a429 100644 ---- a/src/util/tev_curl.c -+++ b/src/util/tev_curl.c -@@ -97,7 +97,9 @@ static errno_t curl_code2errno(CURLcode crv) - return ETIMEDOUT; - case CURLE_SSL_ISSUER_ERROR: - case CURLE_SSL_CACERT_BADFILE: -+#if LIBCURL_VERSION_NUM < 0x073e00 - case CURLE_SSL_CACERT: -+#endif - case CURLE_SSL_CERTPROBLEM: - return ERR_INVALID_CERT; - diff --git a/gnu/packages/sssd.scm b/gnu/packages/sssd.scm index 6d6caab0ad..7bb71dce13 100644 --- a/gnu/packages/sssd.scm +++ b/gnu/packages/sssd.scm @@ -81,15 +81,14 @@ fundamental object types for C.") (define-public sssd (package (name "sssd") - (version "1.16.2") + (version "1.16.4") (source (origin (method url-fetch) (uri (string-append "http://releases.pagure.org/SSSD/sssd/" "sssd-" version ".tar.gz")) - (patches (search-patches "sssd-curl-compat.patch")) (sha256 (base32 - "032ppk57qs1lnvz7pb7lw9ldwm9i1yagh9fzgqgn6na3bg61ynzy")))) + "0ngr7cgimyjc6flqkm7psxagp1m4jlzpqkn28pliifbmdg6i5ckb")))) (build-system gnu-build-system) (arguments `(#:make-flags @@ -130,10 +129,6 @@ fundamental object types for C.") (lambda _ (substitute* "src/tests/responder_socket_access-tests.c" (("tcase_add_test\\(tc_utils, resp_str_to_array_test\\);") "")) - ;; XXX: These tests fail with recent versions of ldb. See - ;; . - (substitute* "Makefile.in" - (("sysdb-tests\\$\\(EXEEXT\\)") "")) #t))))) (inputs `(("augeas" ,augeas) -- cgit v1.2.3 From fe507d7a3d83169c77b6f73a66ffa0ce59f1119d Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Sun, 11 Aug 2019 22:37:12 -0400 Subject: bootstrap: Build bootstrap bash deterministically. * gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/make-bootstrap.scm (static-bash-for-bootstrap): New variable. (%static-inputs): Use 'static-bash-for-bootstrap' instead of 'static-bash'. --- gnu/local.mk | 1 + gnu/packages/make-bootstrap.scm | 15 ++++++++--- .../patches/bash-4.4-linux-pgrp-pipe.patch | 30 ++++++++++++++++++++++ 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 16b63bc951..38a06e5620 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -697,6 +697,7 @@ dist_patch_DATA = \ %D%/packages/patches/avidemux-install-to-lib.patch \ %D%/packages/patches/awesome-reproducible-png.patch \ %D%/packages/patches/azr3.patch \ + %D%/packages/patches/bash-4.4-linux-pgrp-pipe.patch \ %D%/packages/patches/bash-completion-directories.patch \ %D%/packages/patches/bastet-change-source-of-unordered_set.patch \ %D%/packages/patches/bazaar-CVE-2017-14176.patch \ diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index d3b13d9d5f..2f0bb30b91 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès ;;; Copyright © 2017 Efraim Flashner ;;; Copyright © 2018 Tobias Geerinckx-Rice -;;; Copyright © 2018 Mark H Weaver +;;; Copyright © 2018, 2019 Mark H Weaver ;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. @@ -125,6 +125,15 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (current-source-location) #:native-inputs native-inputs)) +(define static-bash-for-bootstrap + (package + (inherit static-bash) + (source (origin + (inherit (package-source static-bash)) + (patches + (cons (search-patch "bash-4.4-linux-pgrp-pipe.patch") + (origin-patches (package-source static-bash)))))))) + (define %static-inputs ;; Packages that are to be used as %BOOTSTRAP-INPUTS. (let ((coreutils (package (inherit coreutils) @@ -192,7 +201,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (("-Wl,-export-dynamic") "")) #t))))))) (inputs (if (%current-target-system) - `(("bash" ,static-bash)) + `(("bash" ,static-bash-for-bootstrap)) '())))) (tar (package (inherit tar) (arguments @@ -233,7 +242,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." ("sed" ,sed) ("grep" ,grep) ("gawk" ,gawk))) - ("bash" ,static-bash)))) + ("bash" ,static-bash-for-bootstrap)))) (define %static-binaries (package diff --git a/gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch b/gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch new file mode 100644 index 0000000000..0d03d7ce37 --- /dev/null +++ b/gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch @@ -0,0 +1,30 @@ +Unconditionally enable PGRP_PIPE on Linux (the kernel), regardless of +the kernel version in use on the build machine. + +--- configure.ac.orig 1969-12-31 19:00:00.000000000 -0500 ++++ configure.ac 2019-08-11 22:28:26.038841961 -0400 +@@ -1092,9 +1092,7 @@ + solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; + lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; + linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading +- case "`uname -r`" in +- 2.[[456789]]*|[[34]]*) AC_DEFINE(PGRP_PIPE) ;; +- esac ;; ++ AC_DEFINE(PGRP_PIPE) ;; + *qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;; + *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; + powerux*) LOCAL_LIBS="-lgen" ;; +--- configure.orig 1969-12-31 19:00:00.000000000 -0500 ++++ configure 2019-08-11 22:28:10.166763255 -0400 +@@ -16064,10 +16064,7 @@ + solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; + lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; + linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading +- case "`uname -r`" in +- 2.[456789]*|[34]*) $as_echo "#define PGRP_PIPE 1" >>confdefs.h +- ;; +- esac ;; ++ $as_echo "#define PGRP_PIPE 1" >>confdefs.h ;; + *qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;; + *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; + powerux*) LOCAL_LIBS="-lgen" ;; -- cgit v1.2.3 From c902458863d1d341ffd74970b75e69c2bb848183 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Mon, 15 Jul 2019 15:47:14 +0200 Subject: gnu: Add elm-compiler 0.19.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds the elm compiler, version 0.19.0. This provides the `elm` command, with the exception of the `elm reactor` subcommand. Named `elm-compiler`, to leave space for `elm` as the full elm including reactor. * gnu/packages/elm.scm: New module. (elm-compiler): New package. * gnu/packages/patches/elm-disable-reactor.patch: New patch. * gnu/packages/patches/elm-fix-map-key.patch: New patch. * gnu/packages/patches/elm-relax-glsl-bound.patch: New patch. * gnu/local.mk: Add new files. Co-authored-by: Ludovic Courtès --- gnu/local.mk | 6 +- gnu/packages/elm.scm | 81 ++++++++++++++++++++++ .../patches/elm-compiler-disable-reactor.patch | 71 +++++++++++++++++++ .../patches/elm-compiler-fix-map-key.patch | 38 ++++++++++ .../patches/elm-compiler-relax-glsl-bound.patch | 19 +++++ 5 files changed, 214 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/elm.scm create mode 100644 gnu/packages/patches/elm-compiler-disable-reactor.patch create mode 100644 gnu/packages/patches/elm-compiler-fix-map-key.patch create mode 100644 gnu/packages/patches/elm-compiler-relax-glsl-bound.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 16b63bc951..aab29beb0a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -161,6 +161,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/electronics.scm \ %D%/packages/elf.scm \ %D%/packages/elixir.scm \ + %D%/packages/elm.scm \ %D%/packages/embedded.scm \ %D%/packages/emacs.scm \ %D%/packages/emacs-xyz.scm \ @@ -770,9 +771,12 @@ dist_patch_DATA = \ %D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch \ %D%/packages/patches/dstat-skip-devices-without-io.patch \ %D%/packages/patches/dvd+rw-tools-add-include.patch \ + %D%/packages/patches/einstein-build.patch \ %D%/packages/patches/elfutils-tests-ptrace.patch \ %D%/packages/patches/elixir-path-length.patch \ - %D%/packages/patches/einstein-build.patch \ + %D%/packages/patches/elm-compiler-disable-reactor.patch \ + %D%/packages/patches/elm-compiler-fix-map-key.patch \ + %D%/packages/patches/elm-compiler-relax-glsl-bound.patch \ %D%/packages/patches/emacs-dired-toggle-sudo-emacs-26.patch \ %D%/packages/patches/emacs-exec-path.patch \ %D%/packages/patches/emacs-fix-scheme-indent-function.patch \ diff --git a/gnu/packages/elm.scm b/gnu/packages/elm.scm new file mode 100644 index 0000000000..8b5ec36621 --- /dev/null +++ b/gnu/packages/elm.scm @@ -0,0 +1,81 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019 Robert Vollmert +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages elm) + #:use-module (gnu packages) + #:use-module (gnu packages haskell) + #:use-module (gnu packages haskell-check) + #:use-module (gnu packages haskell-crypto) + #:use-module (gnu packages haskell-xyz) + #:use-module (gnu packages haskell-web) + #:use-module (guix build-system haskell) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages)) + +;; The full elm build calls out to itself via Template Haskell to +;; compile the elm reactor web app. elm reactor isn't required to +;; compile elm applications, so we take this part out of this +;; bootstrap package. +(define-public elm-compiler + (package + (name "elm-compiler") + (version "0.19.0") + (source + (origin + (method git-fetch) + (file-name (git-file-name name version)) + (uri (git-reference + (url "https://github.com/elm/compiler/") + (commit version))) + (sha256 + (base32 "0s93z9vr0vp5w894ghc5s34nsq09sg1msf59zfiba87sid5vgjqy")) + (patches + (search-patches "elm-compiler-disable-reactor.patch" + "elm-compiler-relax-glsl-bound.patch" + "elm-compiler-fix-map-key.patch")))) + (build-system haskell-build-system) + (inputs + `(("ghc-ansi-terminal" ,ghc-ansi-terminal) + ("ghc-ansi-wl-pprint" ,ghc-ansi-wl-pprint) + ("ghc-edit-distance" ,ghc-edit-distance) + ("ghc-file-embed" ,ghc-file-embed) + ("ghc-http" ,ghc-http) + ("ghc-http-client" ,ghc-http-client) + ("ghc-http-client-tls" ,ghc-http-client-tls) + ("ghc-http-types" ,ghc-http-types) + ("ghc-language-glsl" ,ghc-language-glsl) + ("ghc-logict" ,ghc-logict) + ("ghc-network" ,ghc-network) + ("ghc-raw-strings-qq" ,ghc-raw-strings-qq) + ("ghc-scientific" ,ghc-scientific) + ("ghc-sha" ,ghc-sha) + ("ghc-snap-core" ,ghc-snap-core) + ("ghc-snap-server" ,ghc-snap-server) + ("ghc-unordered-containers" + ,ghc-unordered-containers) + ("ghc-utf8-string" ,ghc-utf8-string) + ("ghc-vector" ,ghc-vector) + ("ghc-zip-archive" ,ghc-zip-archive))) + (home-page "https://elm-lang.org") + (synopsis "Programming language for Web applications") + (description + "This package provides Elm, a statically-typed functional programming +language for the browser. It includes commands for developers such as +@command{elm make} and @command{elm repl}.") + (license license:bsd-3))) diff --git a/gnu/packages/patches/elm-compiler-disable-reactor.patch b/gnu/packages/patches/elm-compiler-disable-reactor.patch new file mode 100644 index 0000000000..9871b55e8d --- /dev/null +++ b/gnu/packages/patches/elm-compiler-disable-reactor.patch @@ -0,0 +1,71 @@ +commit 20d80e2323b565a36751c9455e535d8f73fa32f7 +Author: Robert Vollmert +Date: Fri Jun 14 16:05:47 2019 +0200 + + disable reactor + +diff --git a/elm.cabal b/elm.cabal +index c75f9689..ece63c46 100644 +--- a/elm.cabal ++++ b/elm.cabal +@@ -45,9 +45,6 @@ Executable elm + builder/src + ui/terminal/src + +- other-extensions: +- TemplateHaskell +- + Main-Is: + Main.hs + +@@ -56,8 +53,6 @@ Executable elm + Develop + Develop.Generate.Help + Develop.Generate.Index +- Develop.StaticFiles +- Develop.StaticFiles.Build + Diff + Init + Install +diff --git a/ui/terminal/src/Develop.hs b/ui/terminal/src/Develop.hs +index 4b2252e1..7ed7716e 100644 +--- a/ui/terminal/src/Develop.hs ++++ b/ui/terminal/src/Develop.hs +@@ -23,7 +23,6 @@ import Snap.Util.FileServe + import qualified Elm.Project as Project + import qualified Develop.Generate.Help as Generate + import qualified Develop.Generate.Index as Index +-import qualified Develop.StaticFiles as StaticFiles + import qualified Generate.Output as Output + import qualified Json.Encode as Encode + import qualified Reporting.Exit as Exit +@@ -219,16 +218,7 @@ compileToHtmlBuilder mode file = + + + serveAssets :: Snap () +-serveAssets = +- do file <- getSafePath +- case StaticFiles.lookup file of +- Nothing -> +- pass +- +- Just (content, mimeType) -> +- do modifyResponse (setContentType (mimeType <> ";charset=utf-8")) +- writeBS content +- ++serveAssets = pass + + + -- MIME TYPES +diff --git a/ui/terminal/src/Main.hs b/terminal/src/Main.hs +index 7000f3ca..2c76965a 100644 +--- a/ui/terminal/src/Main.hs ++++ b/ui/terminal/src/Main.hs +@@ -39,7 +39,6 @@ main = + complex intro outro + [ repl + , init +- , reactor + , make + , install + , bump diff --git a/gnu/packages/patches/elm-compiler-fix-map-key.patch b/gnu/packages/patches/elm-compiler-fix-map-key.patch new file mode 100644 index 0000000000..4f05ded530 --- /dev/null +++ b/gnu/packages/patches/elm-compiler-fix-map-key.patch @@ -0,0 +1,38 @@ +commit e3512d887df41a8162c3e361171c04beca08415b +Author: Tom Stejskal +Date: Mon Nov 19 20:09:43 2018 +0100 + + Fix Map.!: given key is not an element in the map + +diff --git a/compiler/src/Elm/Compiler/Type/Extract.hs b/compiler/src/Elm/Compiler/Type/Extract.hs +index 1aafe1d4..99763392 100644 +--- a/compiler/src/Elm/Compiler/Type/Extract.hs ++++ b/compiler/src/Elm/Compiler/Type/Extract.hs +@@ -10,6 +10,7 @@ module Elm.Compiler.Type.Extract + + + import Data.Map ((!)) ++import qualified Data.Map as Map + import qualified Data.Maybe as Maybe + import qualified Data.Set as Set + +@@ -134,11 +135,15 @@ extractUnion interfaces (Opt.Global home name) = + else + let + pname = toPublicName home name +- unions = I._unions (interfaces ! home) ++ maybeUnions = I._unions <$> Map.lookup home interfaces + in +- case I.toUnionInternals (unions ! name) of +- Can.Union vars ctors _ _ -> +- T.Union pname vars <$> traverse extractCtor ctors ++ case Map.lookup name =<< maybeUnions of ++ Just union -> ++ case I.toUnionInternals union of ++ Can.Union vars ctors _ _ -> ++ T.Union pname vars <$> traverse extractCtor ctors ++ Nothing -> ++ return $ T.Union pname [] [] + + + extractCtor :: Can.Ctor -> Extractor (N.Name, [T.Type]) diff --git a/gnu/packages/patches/elm-compiler-relax-glsl-bound.patch b/gnu/packages/patches/elm-compiler-relax-glsl-bound.patch new file mode 100644 index 0000000000..3f8be810c2 --- /dev/null +++ b/gnu/packages/patches/elm-compiler-relax-glsl-bound.patch @@ -0,0 +1,19 @@ +commit 4c649a5a270aba15cc6a3913c3ad51a293047f40 +Author: Rémi Lefèvre +Date: Mon Sep 3 19:18:54 2018 +0200 + + update language-glsl maximum version + +diff --git a/elm.cabal b/elm.cabal +index 48aa84f0..464fe9d5 100644 +--- a/elm.cabal ++++ b/elm.cabal +@@ -246,7 +246,7 @@ Executable elm + http-client >= 0.5 && < 0.6, + http-client-tls >= 0.3 && < 0.4, + http-types >= 0.9 && < 1.0, +- language-glsl >= 0.0.2 && < 0.3, ++ language-glsl >= 0.0.2 && < 0.4, + logict, + mtl >= 2.2.1 && < 3, + network >= 2.4 && < 2.7, -- cgit v1.2.3 From 04b9b7bb05aff4c41f46cd79aa7bc953ace16e86 Mon Sep 17 00:00:00 2001 From: Rutger Helling Date: Mon, 19 Aug 2019 09:03:44 +0200 Subject: gnu: qemu: Update to 4.1.0. * gnu/local.mk: Remove qemu-CVE-2018-16872.patch and qemu-CVE-2019-6778.patch. * gnu/packages/patches/qemu-CVE-2018-16872.patch: Remove file. * gnu/packages/patches/qemu-CVE-2019-6778.patch: Remove file. * gnu/packages/virtualization.scm (qemu): Update to 4.1.0. [source]: Remove obsolete patches. [arguments]: Add phases 'prevent-network-configuration and 'disable-unusable-tests. --- gnu/local.mk | 2 - gnu/packages/patches/qemu-CVE-2018-16872.patch | 88 -------------------------- gnu/packages/patches/qemu-CVE-2019-6778.patch | 43 ------------- gnu/packages/virtualization.scm | 19 ++++-- 4 files changed, 14 insertions(+), 138 deletions(-) delete mode 100644 gnu/packages/patches/qemu-CVE-2018-16872.patch delete mode 100644 gnu/packages/patches/qemu-CVE-2019-6778.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 08bc205623..0002f49409 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1253,8 +1253,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-unittest2-remove-argparse.patch \ %D%/packages/patches/python-waitress-fix-tests.patch \ %D%/packages/patches/qemu-glibc-2.27.patch \ - %D%/packages/patches/qemu-CVE-2018-16872.patch \ - %D%/packages/patches/qemu-CVE-2019-6778.patch \ %D%/packages/patches/qt4-ldflags.patch \ %D%/packages/patches/qtbase-old-kernel.patch \ %D%/packages/patches/qtbase-use-TZDIR.patch \ diff --git a/gnu/packages/patches/qemu-CVE-2018-16872.patch b/gnu/packages/patches/qemu-CVE-2018-16872.patch deleted file mode 100644 index 094e823ee4..0000000000 --- a/gnu/packages/patches/qemu-CVE-2018-16872.patch +++ /dev/null @@ -1,88 +0,0 @@ -Fixes CVE-2018-16872: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-16872 - -Patch copied from upstream source repository: - -https://git.qemu.org/?p=qemu.git;a=commitdiff;h=bab9df35ce73d1c8e19a37e2737717ea1c984dc1 - -From bab9df35ce73d1c8e19a37e2737717ea1c984dc1 Mon Sep 17 00:00:00 2001 -From: Gerd Hoffmann -Date: Thu, 13 Dec 2018 13:25:11 +0100 -Subject: [PATCH] usb-mtp: use O_NOFOLLOW and O_CLOEXEC. - -Open files and directories with O_NOFOLLOW to avoid symlinks attacks. -While being at it also add O_CLOEXEC. - -usb-mtp only handles regular files and directories and ignores -everything else, so users should not see a difference. - -Because qemu ignores symlinks, carrying out a successful symlink attack -requires swapping an existing file or directory below rootdir for a -symlink and winning the race against the inotify notification to qemu. - -Fixes: CVE-2018-16872 -Cc: Prasad J Pandit -Cc: Bandan Das -Reported-by: Michael Hanselmann -Signed-off-by: Gerd Hoffmann -Reviewed-by: Michael Hanselmann -Message-id: 20181213122511.13853-1-kraxel@redhat.com ---- - hw/usb/dev-mtp.c | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) - -diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c -index 100b7171f4..36c43b8c20 100644 ---- a/hw/usb/dev-mtp.c -+++ b/hw/usb/dev-mtp.c -@@ -653,13 +653,18 @@ static void usb_mtp_object_readdir(MTPState *s, MTPObject *o) - { - struct dirent *entry; - DIR *dir; -+ int fd; - - if (o->have_children) { - return; - } - o->have_children = true; - -- dir = opendir(o->path); -+ fd = open(o->path, O_DIRECTORY | O_CLOEXEC | O_NOFOLLOW); -+ if (fd < 0) { -+ return; -+ } -+ dir = fdopendir(fd); - if (!dir) { - return; - } -@@ -1007,7 +1012,7 @@ static MTPData *usb_mtp_get_object(MTPState *s, MTPControl *c, - - trace_usb_mtp_op_get_object(s->dev.addr, o->handle, o->path); - -- d->fd = open(o->path, O_RDONLY); -+ d->fd = open(o->path, O_RDONLY | O_CLOEXEC | O_NOFOLLOW); - if (d->fd == -1) { - usb_mtp_data_free(d); - return NULL; -@@ -1031,7 +1036,7 @@ static MTPData *usb_mtp_get_partial_object(MTPState *s, MTPControl *c, - c->argv[1], c->argv[2]); - - d = usb_mtp_data_alloc(c); -- d->fd = open(o->path, O_RDONLY); -+ d->fd = open(o->path, O_RDONLY | O_CLOEXEC | O_NOFOLLOW); - if (d->fd == -1) { - usb_mtp_data_free(d); - return NULL; -@@ -1658,7 +1663,7 @@ static void usb_mtp_write_data(MTPState *s) - 0, 0, 0, 0); - goto done; - } -- d->fd = open(path, O_CREAT | O_WRONLY, mask); -+ d->fd = open(path, O_CREAT | O_WRONLY | O_CLOEXEC | O_NOFOLLOW, mask); - if (d->fd == -1) { - usb_mtp_queue_result(s, RES_STORE_FULL, d->trans, - 0, 0, 0, 0); --- -2.20.1 - diff --git a/gnu/packages/patches/qemu-CVE-2019-6778.patch b/gnu/packages/patches/qemu-CVE-2019-6778.patch deleted file mode 100644 index 315f2922da..0000000000 --- a/gnu/packages/patches/qemu-CVE-2019-6778.patch +++ /dev/null @@ -1,43 +0,0 @@ -Fixes CVE-2019-6778: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-6778 - -Patch copied from upstream source repository: - -https://git.qemu.org/?p=qemu.git;a=commitdiff;h=a7104eda7dab99d0cdbd3595c211864cba415905 - -From a7104eda7dab99d0cdbd3595c211864cba415905 Mon Sep 17 00:00:00 2001 -From: Prasad J Pandit -Date: Sun, 13 Jan 2019 23:29:48 +0530 -Subject: [PATCH] slirp: check data length while emulating ident function - -While emulating identification protocol, tcp_emu() does not check -available space in the 'sc_rcv->sb_data' buffer. It could lead to -heap buffer overflow issue. Add check to avoid it. - -Reported-by: Kira <864786842@qq.com> -Signed-off-by: Prasad J Pandit -Signed-off-by: Samuel Thibault ---- - slirp/tcp_subr.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c -index 4a9a5b5edc..23a841f26e 100644 ---- a/slirp/tcp_subr.c -+++ b/slirp/tcp_subr.c -@@ -634,6 +634,11 @@ tcp_emu(struct socket *so, struct mbuf *m) - socklen_t addrlen = sizeof(struct sockaddr_in); - struct sbuf *so_rcv = &so->so_rcv; - -+ if (m->m_len > so_rcv->sb_datalen -+ - (so_rcv->sb_wptr - so_rcv->sb_data)) { -+ return 1; -+ } -+ - memcpy(so_rcv->sb_wptr, m->m_data, m->m_len); - so_rcv->sb_wptr += m->m_len; - so_rcv->sb_rptr += m->m_len; --- -2.20.1 - diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 5535d7a421..2e5b1ce16e 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -107,16 +107,14 @@ (define-public qemu (package (name "qemu") - (version "3.1.0") + (version "4.1.0") (source (origin (method url-fetch) (uri (string-append "https://download.qemu.org/qemu-" version ".tar.xz")) - (patches (search-patches "qemu-CVE-2018-16872.patch" - "qemu-CVE-2019-6778.patch")) (sha256 (base32 - "1z5bd5nfyjvhfi1s95labc82y4hjdjjkdabw931362ls0zghh1ba")))) + "1ih9v6gxgild3m4g80ld4dr3wp9db3bpy203k73fxgc9hqhn0vk5")))) (build-system gnu-build-system) (arguments '(;; Running tests in parallel can occasionally lead to failures, like: @@ -180,13 +178,24 @@ exec smbd $@"))) (chmod "samba-wrapper" #o755) (install-file "samba-wrapper" libexec)) #t)) - (add-before 'check 'disable-test-qga + (add-before 'configure 'prevent-network-configuration (lambda _ + ;; Prevent the build from trying to use git to fetch from the net. + (substitute* "Makefile" + (("@./config.status") + "")) #t)) + (add-before 'check 'disable-unusable-tests + (lambda* (#:key inputs outputs #:allow-other-keys) (substitute* "tests/Makefile.include" ;; Comment out the test-qga test, which needs /sys and ;; fails within the build environment. (("check-unit-.* tests/test-qga" all) (string-append "# " all))) + (substitute* "tests/Makefile.include" + ;; Comment out the test-char test, which needs networking and + ;; fails within the build environment. + (("check-unit-.* tests/test-char" all) + (string-append "# " all))) #t))))) (inputs ; TODO: Add optional inputs. `(("alsa-lib" ,alsa-lib) -- cgit v1.2.3 From 2cb81e1ebedc49a5af549d1bcd520add38d9062d Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 24 Aug 2019 22:13:36 +0200 Subject: gnu: libextractor: Adapt to exiv2 0.27. This fixes a compilation error. * gnu/packages/patches/libextractor-exiv2.patch: New file. * gnu/packages/gnunet.scm (libextractor)[sources]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/gnunet.scm | 3 +- gnu/packages/patches/libextractor-exiv2.patch | 124 ++++++++++++++++++++++++++ 3 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/libextractor-exiv2.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index aab29beb0a..8b1b5ce6b4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1016,6 +1016,7 @@ dist_patch_DATA = \ %D%/packages/patches/libexif-CVE-2016-6328.patch \ %D%/packages/patches/libexif-CVE-2017-7544.patch \ %D%/packages/patches/libexif-CVE-2018-20030.patch \ + %D%/packages/patches/libextractor-exiv2.patch \ %D%/packages/patches/libgcrypt-make-yat2m-reproducible.patch \ %D%/packages/patches/libgit2-avoid-python.patch \ %D%/packages/patches/libgit2-mtime-0.patch \ diff --git a/gnu/packages/gnunet.scm b/gnu/packages/gnunet.scm index 2653645c5d..2d82f47d99 100644 --- a/gnu/packages/gnunet.scm +++ b/gnu/packages/gnunet.scm @@ -75,7 +75,8 @@ version ".tar.gz")) (sha256 (base32 - "1zz2zvikvfibxnk1va3kgzs7djsmiqy7bmk8y01vbsf54ryjb3zh")))) + "1zz2zvikvfibxnk1va3kgzs7djsmiqy7bmk8y01vbsf54ryjb3zh")) + (patches (search-patches "libextractor-exiv2.patch")))) (build-system gnu-build-system) ;; WARNING: Checks require /dev/shm to be in the build chroot, especially ;; not to be a symbolic link to /run/shm. diff --git a/gnu/packages/patches/libextractor-exiv2.patch b/gnu/packages/patches/libextractor-exiv2.patch new file mode 100644 index 0000000000..b92fef3ca1 --- /dev/null +++ b/gnu/packages/patches/libextractor-exiv2.patch @@ -0,0 +1,124 @@ +This patch allows us to build libextractor against exiv2 0.27.x. +Adapted from this upstream commit: + + commit 1ecee9a47717e36cb8a3925d011d1a6de11d631c + Author: Christian Grothoff + Date: Mon Jul 29 17:58:18 2019 +0200 + + importing patch from Gentoo/AS to address exiv2 build issue (#5820) + +diff --git a/src/plugins/exiv2_extractor.cc b/src/plugins/exiv2_extractor.cc +index 8741d40..ef402a8 100644 +--- a/src/plugins/exiv2_extractor.cc ++++ b/src/plugins/exiv2_extractor.cc +@@ -27,10 +27,7 @@ + #include + #include + #include +-#include +-#include +-#include +-#include ++#include + + /** + * Enable debugging to get error messages. +@@ -180,7 +177,7 @@ public: + * + * @return -1 on error + */ +-#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0) ++#if EXIV2_TEST_VERSION(0,26,0) + virtual size_t size (void) const; + #else + virtual long int size (void) const; +@@ -316,7 +313,11 @@ ExtractorIO::getb () + const unsigned char *r; + + if (1 != ec->read (ec->cls, &data, 1)) ++#if EXIV2_TEST_VERSION(0,27,0) ++ throw Exiv2::BasicError (Exiv2::kerDecodeLangAltQualifierFailed); ++#else + throw Exiv2::BasicError (42 /* error code */); ++#endif + r = (const unsigned char *) data; + return *r; + } +@@ -371,7 +372,11 @@ ExtractorIO::putb (Exiv2::byte data) + void + ExtractorIO::transfer (Exiv2::BasicIo& src) + { ++#if EXIV2_TEST_VERSION(0,27,0) ++ throw Exiv2::BasicError (Exiv2::kerDecodeLangAltQualifierFailed); ++#else + throw Exiv2::BasicError (42 /* error code */); ++#endif + } + + +@@ -416,7 +421,11 @@ ExtractorIO::seek (long offset, + Exiv2::byte * + ExtractorIO::mmap (bool isWritable) + { ++#if EXIV2_TEST_VERSION(0,27,0) ++ throw Exiv2::BasicError (Exiv2::kerDecodeLangAltQualifierFailed); ++#else + throw Exiv2::BasicError (42 /* error code */); ++#endif + } + + +@@ -449,7 +458,7 @@ ExtractorIO::tell (void) const + * + * @return -1 on error + */ +-#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0) ++#if EXIV2_TEST_VERSION(0,26,0) + size_t + #else + long int +@@ -504,7 +513,11 @@ ExtractorIO::eof () const + std::string + ExtractorIO::path () const + { ++#if EXIV2_TEST_VERSION(0,27,0) ++ throw Exiv2::BasicError (Exiv2::kerDecodeLangAltQualifierFailed); ++#else + throw Exiv2::BasicError (42 /* error code */); ++#endif + } + + +@@ -517,7 +530,11 @@ ExtractorIO::path () const + std::wstring + ExtractorIO::wpath () const + { ++#if EXIV2_TEST_VERSION(0,27,0) ++ throw Exiv2::BasicError (Exiv2::kerDecodeLangAltQualifierFailed); ++#else + throw Exiv2::BasicError (42 /* error code */); ++#endif + } + #endif + +@@ -531,7 +548,11 @@ Exiv2::BasicIo::AutoPtr + ExtractorIO::temporary () const + { + fprintf (stderr, "throwing temporary error\n"); ++#if EXIV2_TEST_VERSION(0,27,0) ++ throw Exiv2::BasicError (Exiv2::kerDecodeLangAltQualifierFailed); ++#else + throw Exiv2::BasicError (42 /* error code */); ++#endif + } + + +@@ -697,7 +718,7 @@ EXTRACTOR_exiv2_extract_method (struct EXTRACTOR_ExtractContext *ec) + { + try + { +-#if EXIV2_MAKE_VERSION(0,23,0) <= EXIV2_VERSION ++#if !EXIV2_TEST_VERSION(0,24,0) + Exiv2::LogMsg::setLevel (Exiv2::LogMsg::mute); + #endif + std::auto_ptr eio(new ExtractorIO (ec)); -- cgit v1.2.3 From a5f0ebf669946a6f24db8048a708136b036f8d93 Mon Sep 17 00:00:00 2001 From: Jesse Gibbons Date: Sun, 25 Aug 2019 18:35:29 -0600 Subject: gnu: Add cvassistant. * gnu/package/cvassistant.scm: New file. * gnu/local.mk: Add it. * gnu/packages/cvassistant.scm (cvassistant): New variable. --- gnu/local.mk | 1 + gnu/packages/cvassistant.scm | 90 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 gnu/packages/cvassistant.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 8b1b5ce6b4..484cb7d45c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -128,6 +128,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/cryptsetup.scm \ %D%/packages/cups.scm \ %D%/packages/curl.scm \ + %D%/packages/cvassistant.scm \ %D%/packages/cyrus-sasl.scm \ %D%/packages/databases.scm \ %D%/packages/datamash.scm \ diff --git a/gnu/packages/cvassistant.scm b/gnu/packages/cvassistant.scm new file mode 100644 index 0000000000..f57806d734 --- /dev/null +++ b/gnu/packages/cvassistant.scm @@ -0,0 +1,90 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019 Nicolas Goaziou +;;; Copyright © 2019 Jesse Gibbons +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages cvassistant) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages qt) + #:use-module (gnu packages compression)) + +(define-public cvassistant + (package + (name "cvassistant") + (version "3.1.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/cvassistant/" + "cvassistant-" version "-src.tar.bz2")) + (sha256 + (base32 + "1y2680bazyiwm50gdhdd4982ckbjscrkbw2mngyk7yw708iadvr7")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'remove-donation-banner + ;; Remove dialog box with a donation link, as suggested by + ;; the INSTALL file. + (lambda _ + (substitute* "controllers/mainwindow.cpp" + (("//(#define NO_DONATION_PROMPT)" _ line) line)) + #t)) + (add-after 'unpack 'fix-quazip-directory + (lambda _ + (substitute* "models/resumedocument.h" + (("quazip(/quazipfile\\.h)" _ suffix) + (string-append "quazip5" suffix))) + #t)) + (add-after 'fix-quazip-directory 'fix-quazip-link + (lambda _ + (substitute* "CVAssistant.pro" + (("lquazip-qt5") + "lquazip5")) + #t)) + (add-after 'fix-quazip-directory 'fix-install-root + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "CVAssistant.pro" + (("/usr/(bin|share/)" _ suffix) + (string-append out "/" suffix))) + #t))) + (replace 'configure + (lambda _ (invoke "qmake")))))) + (inputs + `(("qtbase" ,qtbase) + ("quazip" ,quazip) + ("zlib" ,zlib))) + (home-page "https://cvassistant.sourceforge.io/") + (synopsis "Job application organizer") + (description "Whether you're looking for a job or trying to help + a friend to find one, CVAssistant is a tool for you. It helps you by + preparing resumes and cover letters and organizing your job + application process. It: + @itemize + @item Stores all your skills and experiences. + @item Creates resumes tailored for each job you apply. + @item Creates cover letters summarized to match each job + advertisement. + @item Keeps a history of job applications so you are ready when you + receive a phone call. + @item Writes resumes in your language. All languages are supported! + @end itemize") + (license license:gpl3+))) -- cgit v1.2.3 From 07d7175406210434d1fb9c100dc33a7d095f1627 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 30 Jul 2019 11:05:21 -0400 Subject: gnu: mingw-w64: Update to 6.0.0. * gnu/packages/mingw.scm (mingw-w64): Update to 6.0.0. * gnu/packages/patches/mingw-w64-6.0.0-gcc.patch: New file. * gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch: Delete it. * gnu/local.mk (dist_patch_DATA): Add new patch. Delete old patch. * gnu/build/cross-toolchain.scm (set-cross-path/mingw): Add additional autoconf-like substitutions. --- gnu/build/cross-toolchain.scm | 6 +- gnu/local.mk | 2 +- gnu/packages/mingw.scm | 6 +- .../patches/mingw-w64-5.0rc2-gcc-4.9.3.patch | 218 --------------------- gnu/packages/patches/mingw-w64-6.0.0-gcc.patch | 65 ++++++ 5 files changed, 74 insertions(+), 223 deletions(-) delete mode 100644 gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch create mode 100644 gnu/packages/patches/mingw-w64-6.0.0-gcc.patch (limited to 'gnu/local.mk') diff --git a/gnu/build/cross-toolchain.scm b/gnu/build/cross-toolchain.scm index 201b36ff7c..7ab0a355b0 100644 --- a/gnu/build/cross-toolchain.scm +++ b/gnu/build/cross-toolchain.scm @@ -130,7 +130,11 @@ C_*INCLUDE_PATH." (substitute* (string-append mingw-headers "/crt/_mingw.h") (("@MINGW_HAS_SECURE_API@") - "#define MINGW_HAS_SECURE_API 1")) + "#define MINGW_HAS_SECURE_API 1") + (("@DEFAULT_WIN32_WINNT@") + "0x502") + (("@DEFAULT_MSVCRT_VERSION@") + "0x700")) (let ((cpath (string-append mingw-headers "/include" ":" mingw-headers "/crt" diff --git a/gnu/local.mk b/gnu/local.mk index a756316f77..d539c3c85b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1098,7 +1098,7 @@ dist_patch_DATA = \ %D%/packages/patches/meson-for-build-rpath.patch \ %D%/packages/patches/metabat-fix-compilation.patch \ %D%/packages/patches/mhash-keygen-test-segfault.patch \ - %D%/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch \ + %D%/packages/patches/mingw-w64-6.0.0-gcc.patch \ %D%/packages/patches/mpc123-initialize-ao.patch \ %D%/packages/patches/module-init-tools-moduledir.patch \ %D%/packages/patches/monero-use-system-miniupnpc.patch \ diff --git a/gnu/packages/mingw.scm b/gnu/packages/mingw.scm index 017f9453ab..fe51780fa3 100644 --- a/gnu/packages/mingw.scm +++ b/gnu/packages/mingw.scm @@ -36,15 +36,15 @@ (let ((triplet (string-append machine "-" "w64-mingw32"))) (package (name (string-append "mingw-w64" "-" machine)) - (version "5.0.4") + (version "6.0.0") (source (origin (method url-fetch) (uri (string-append "https://sourceforge.net/projects/mingw-w64/files/mingw-w64/" "mingw-w64-release/mingw-w64-v" version ".tar.bz2")) (sha256 - (base32 "00zq3z1hbzd5yzmskskjg79xrzwsqx7ihyprfaxy4hb897vf29sm")) - (patches (search-patches "mingw-w64-5.0rc2-gcc-4.9.3.patch")))) + (base32 "1w28mynv500y03h92nh87rgw3fnp82qwnjbxrrzqkmr63q812pl0")) + (patches (search-patches "mingw-w64-6.0.0-gcc.patch")))) (native-inputs `(("xgcc-core" ,(cross-gcc triplet)) ("xbinutils" ,(cross-binutils triplet)))) (build-system gnu-build-system) diff --git a/gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch b/gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch deleted file mode 100644 index e8f841c4fd..0000000000 --- a/gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch +++ /dev/null @@ -1,218 +0,0 @@ -This patch includes - - * mingw-w64-headers/include/winnt.h: compile fixes for1 gcc-4.9.3 - * mingw-w64-headers/crt/math.h: Likewise - * mingw-w64-headers/crt/float.h (FLT_EPSILON,DBL_EPSILON,LDBL_EPSILON): Add - symbols. - * mingw-w64-headers/crt/stat.h (S_ISLNK,S_ISSOCK,S_ISUID,S_ISGID,S_ISLINK): - Add symbols. - (lstat): Add function. - * mingw-w64-headers/crt/_mingw_stat64.h: Likewise - * mingw-w64-headers/crt/stdlib.h (realpath): Add function. - -Needed for building with gcc-4.9.3 and using with cross-libtool-2.4.6. - -Upstream status: not yet presented upstream. - -index 9c5cf87..74a8541 100644 ---- a/mingw-w64-crt/misc/dirname.c -+++ b/mingw-w64-crt/misc/dirname.c -@@ -29,6 +29,12 @@ - #define __cdecl /* this may not be defined. */ - #endif - -+char *__cdecl -+realpath(const char *name, char *resolved) -+{ -+ return resolved ? strcpy (resolved, name) : strdup (name); -+} -+ - char * __cdecl - dirname(char *path) - { -diff --git a/mingw-w64-headers/crt/_mingw_stat64.h b/mingw-w64-headers/crt/_mingw_stat64.h -index 17e754c..7d2339b 100644 ---- a/mingw-w64-headers/crt/_mingw_stat64.h -+++ b/mingw-w64-headers/crt/_mingw_stat64.h -@@ -2,13 +2,17 @@ - - #ifdef _USE_32BIT_TIME_T - #define _fstat32 _fstat -+#define _lstat32 _lstat - #define _stat32 _stat - #define _wstat32 _wstat - #define _fstat32i64 _fstati64 -+#define _lstat32i64 _lstati64 - #define _stat32i64 _stati64 - #define _wstat32i64 _wstati64 - #else - #define _fstat _fstat64i32 -+#define _lstat _lstat64i32 -+#define _lstati64 _lstat64 - #define _fstati64 _fstat64 - #define _stat _stat64i32 - #define _stati64 _stat64 -diff --git a/mingw-w64-headers/crt/float.h b/mingw-w64-headers/crt/float.h -index 5874f4e..bdf4ead 100644 ---- a/mingw-w64-headers/crt/float.h -+++ b/mingw-w64-headers/crt/float.h -@@ -22,6 +22,15 @@ - #if (__GNUC__ < 4) - #error Corrupt install of gcc-s internal headers, or search order was changed. - #else -+ -+ /* From gcc-4.9.3 float.h. */ -+ #undef FLT_EPSILON -+ #undef DBL_EPSILON -+ #undef LDBL_EPSILON -+ #define FLT_EPSILON __FLT_EPSILON__ -+ #define DBL_EPSILON __DBL_EPSILON__ -+ #define LDBL_EPSILON __LDBL_EPSILON__ -+ - /* #include_next */ - - /* Number of decimal digits, q, such that any floating-point number with q -diff --git a/mingw-w64-headers/crt/math.h b/mingw-w64-headers/crt/math.h -index 1e970f4..99a332f 100644 ---- a/mingw-w64-headers/crt/math.h -+++ b/mingw-w64-headers/crt/math.h -@@ -216,6 +216,7 @@ extern "C" { - #endif - } - -+#if 0 - __CRT_INLINE long double __cdecl fabsl (long double x) - { - #ifdef __arm__ -@@ -226,6 +227,7 @@ extern "C" { - return res; - #endif - } -+#endif - - __CRT_INLINE double __cdecl fabs (double x) - { -@@ -905,7 +907,7 @@ __mingw_choose_expr ( \ - /* 7.12.7.3 */ - extern double __cdecl hypot (double, double) __MINGW_ATTRIB_DEPRECATED_MSVC2005; /* in libmoldname.a */ - extern float __cdecl hypotf (float x, float y); --#ifndef __CRT__NO_INLINE -+#if 0 //ndef __CRT__NO_INLINE - __CRT_INLINE float __cdecl hypotf (float x, float y) { return (float) hypot ((double)x, (double)y);} - #endif - extern long double __cdecl hypotl (long double, long double); -diff --git a/mingw-w64-headers/crt/stdlib.h b/mingw-w64-headers/crt/stdlib.h -index dfc5ae4..6f0fee3 100644 ---- a/mingw-w64-headers/crt/stdlib.h -+++ b/mingw-w64-headers/crt/stdlib.h -@@ -8,6 +8,7 @@ - - #include - #include -+#include - - #if defined (__USE_MINGW_ANSI_STDIO) && ((__USE_MINGW_ANSI_STDIO + 0) != 0) && !defined (__USE_MINGW_STRTOX) - #define __USE_MINGW_STRTOX 1 -@@ -676,6 +677,8 @@ unsigned long __cdecl _lrotr(unsigned long,int); - - #endif /* !__NO_ISOCEXT */ - -+char *__cdecl realpath (const char *name, char *resolved); -+ - #ifdef __cplusplus - } - #endif -diff --git a/mingw-w64-headers/crt/sys/stat.h b/mingw-w64-headers/crt/sys/stat.h -index ed60219..d88b4f1 100644 ---- a/mingw-w64-headers/crt/sys/stat.h -+++ b/mingw-w64-headers/crt/sys/stat.h -@@ -58,16 +58,21 @@ extern "C" { - #include <_mingw_stat64.h> - - #define _S_IFMT 0xF000 -+#define _S_IFLNK 0xA000 -+#define _S_IFSOCK 0xC000 - #define _S_IFDIR 0x4000 - #define _S_IFCHR 0x2000 - #define _S_IFIFO 0x1000 - #define _S_IFREG 0x8000 -+#define _S_ISUID 0x0400 -+#define _S_ISGID 0x0200 - #define _S_IREAD 0x0100 - #define _S_IWRITE 0x0080 - #define _S_IEXEC 0x0040 - - _CRTIMP int __cdecl _fstat32(int _FileDes,struct _stat32 *_Stat); - _CRTIMP int __cdecl _stat32(const char *_Name,struct _stat32 *_Stat); -+ static inline int __cdecl _lstat32(const char *_Name,struct _stat32 *_Stat) {return _stat32(_Name, _Stat);} - _CRTIMP int __cdecl _fstat64(int _FileDes,struct _stat64 *_Stat); - _CRTIMP int __cdecl _fstat32i64(int _FileDes,struct _stat32i64 *_Stat); - int __cdecl _fstat64i32(int _FileDes,struct _stat64i32 *_Stat); -@@ -97,6 +102,9 @@ extern "C" { - _CRTIMP int __cdecl _stat64(const char *_Name,struct _stat64 *_Stat); - _CRTIMP int __cdecl _stat32i64(const char *_Name,struct _stat32i64 *_Stat); - int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat); -+ static inline int __cdecl _lstat64(const char *_Name,struct _stat64 *_Stat) {return _stat64(_Name, _Stat);} -+ static inline int __cdecl _lstat32i64(const char *_Name,struct _stat32i64 *_Stat) {return _stat32i64(_Name, _Stat);} -+ static inline int __cdecl _lstat64i32(const char *_Name,struct _stat64i32 *_Stat) {return _stat64i32(_Name, _Stat);} - #ifndef __CRT__NO_INLINE - __CRT_INLINE int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat) - { -@@ -132,6 +140,8 @@ extern "C" { - #ifndef NO_OLDNAMES - #define _S_IFBLK 0x3000 /* Block: Is this ever set under w32? */ - -+#define S_IFLNK _S_IFLNK -+#define S_IFSOCK _S_IFSOCK - #define S_IFMT _S_IFMT - #define S_IFDIR _S_IFDIR - #define S_IFCHR _S_IFCHR -@@ -162,6 +172,11 @@ extern "C" { - #define S_IXOTH (S_IXGRP >> 3) - #define S_IRWXO (S_IRWXG >> 3) - -+#define S_ISUID _S_ISUID -+#define S_ISGID _S_ISGID -+ -+#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) -+#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) - #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) - #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) - #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) -@@ -174,6 +189,7 @@ extern "C" { - int __cdecl stat(const char *_Filename,struct stat *_Stat); - int __cdecl fstat(int _Desc,struct stat *_Stat); - int __cdecl wstat(const wchar_t *_Filename,struct stat *_Stat); -+static inline int __cdecl lstat(const char *_Filename,struct stat *_Stat){return stat(_Filename, _Stat);} - - #ifndef __CRT__NO_INLINE - #ifdef _USE_32BIT_TIME_T -@@ -262,9 +278,11 @@ __CRT_INLINE int __cdecl - - #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64) - #ifdef _USE_32BIT_TIME_T -+#define lstat _lstat32i64 - #define stat _stat32i64 - #define fstat _fstat32i64 - #else -+#define lstat _lstat64 - #define stat _stat64 - #define fstat _fstat64 - #endif -diff --git a/mingw-w64-headers/include/winnt.h b/mingw-w64-headers/include/winnt.h -index 52af29b..8626396 100644 ---- a/mingw-w64-headers/include/winnt.h -+++ b/mingw-w64-headers/include/winnt.h -@@ -6895,7 +6895,12 @@ __buildmemorybarrier() - DWORD Reg : 3; - DWORD R : 1; - DWORD L : 1; -+/* C is used as a const specifier */ -+#define save_C C -+#undef C - DWORD C : 1; -+#define C save_C -+#undef save_C - DWORD StackAdjust : 10; - } DUMMYSTRUCTNAME; - } DUMMYUNIONNAME; diff --git a/gnu/packages/patches/mingw-w64-6.0.0-gcc.patch b/gnu/packages/patches/mingw-w64-6.0.0-gcc.patch new file mode 100644 index 0000000000..036cf79f91 --- /dev/null +++ b/gnu/packages/patches/mingw-w64-6.0.0-gcc.patch @@ -0,0 +1,65 @@ +This patch includes + + * mingw-w64-headers/include/winnt.h: compile fixes for1 gcc-4.9.3 + * mingw-w64-headers/crt/math.h: Likewise + * mingw-w64-headers/crt/float.h (FLT_EPSILON,DBL_EPSILON,LDBL_EPSILON): Add + symbols. + * mingw-w64-headers/crt/stat.h (S_ISLNK,S_ISSOCK,S_ISUID,S_ISGID,S_ISLINK): + Add symbols. + (lstat): Add function. + * mingw-w64-headers/crt/_mingw_stat64.h: Likewise + * mingw-w64-headers/crt/stdlib.h (realpath): Add function. + +Needed for building with gcc-4.9.3 and using with cross-libtool-2.4.6. + +Upstream status: not yet presented upstream. + +diff --git a/mingw-w64-headers/crt/float.h b/mingw-w64-headers/crt/float.h +index 5874f4e..bdf4ead 100644 +--- a/mingw-w64-headers/crt/float.h ++++ b/mingw-w64-headers/crt/float.h +@@ -22,6 +22,15 @@ + #if (__GNUC__ < 4) + #error Corrupt install of gcc-s internal headers, or search order was changed. + #else ++ ++ /* From gcc-4.9.3 float.h. */ ++ #undef FLT_EPSILON ++ #undef DBL_EPSILON ++ #undef LDBL_EPSILON ++ #define FLT_EPSILON __FLT_EPSILON__ ++ #define DBL_EPSILON __DBL_EPSILON__ ++ #define LDBL_EPSILON __LDBL_EPSILON__ ++ + /* #include_next */ + + /* Number of decimal digits, q, such that any floating-point number with q +diff --git a/mingw-w64-headers/crt/math.h b/mingw-w64-headers/crt/math.h +index 1e970f4..99a332f 100644 +--- a/mingw-w64-headers/crt/math.h ++++ b/mingw-w64-headers/crt/math.h +@@ -216,6 +216,7 @@ extern "C" { + #endif + } + ++#if 0 + __CRT_INLINE long double __cdecl fabsl (long double x) + { + #ifdef __arm__ +@@ -226,6 +227,7 @@ extern "C" { + return res; + #endif + } ++#endif + + __CRT_INLINE double __cdecl fabs (double x) + { +@@ -905,7 +907,7 @@ __mingw_choose_expr ( \ + /* 7.12.7.3 */ + extern double __cdecl hypot (double, double) __MINGW_ATTRIB_DEPRECATED_MSVC2005; /* in libmoldname.a */ + extern float __cdecl hypotf (float x, float y); +-#ifndef __CRT__NO_INLINE ++#if 0 //ndef __CRT__NO_INLINE + __CRT_INLINE float __cdecl hypotf (float x, float y) { return (float) hypot ((double)x, (double)y);} + #endif + extern long double __cdecl hypotl (long double, long double); -- cgit v1.2.3 From 5416d9a942468d70441515a9a6492be7625fd75c Mon Sep 17 00:00:00 2001 From: John Soo Date: Mon, 12 Aug 2019 08:43:07 -0700 Subject: gnu: Add cedille. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/cedille.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 2 + gnu/packages/cedille.scm | 124 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 gnu/packages/cedille.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index d539c3c85b..797936d2fd 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -21,6 +21,7 @@ # Copyright © 2018 Stefan Stefanović # Copyright © 2018 Maxim Cournoyer # Copyright © 2019 Guillaume Le Vaillant +# Copyright © 2019 John Soo # # This file is part of GNU Guix. # @@ -99,6 +100,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/calcurse.scm \ %D%/packages/ccache.scm \ %D%/packages/cdrom.scm \ + %D%/packages/cedille.scm \ %D%/packages/certs.scm \ %D%/packages/check.scm \ %D%/packages/chemistry.scm \ diff --git a/gnu/packages/cedille.scm b/gnu/packages/cedille.scm new file mode 100644 index 0000000000..36fa3ae17e --- /dev/null +++ b/gnu/packages/cedille.scm @@ -0,0 +1,124 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019 John Soo +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages cedille) + #:use-module (gnu packages) + #:use-module (gnu packages agda) + #:use-module (gnu packages emacs-xyz) + #:use-module (gnu packages haskell) + #:use-module (guix build-system emacs) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages)) + +(define-public cedille + (package + (name "cedille") + (version "1.1.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/cedille/cedille") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "07kv9wncyipfjf5w4ax8h2p35g70zb1qw6zc4afd7c225xia55wp")))) + (inputs + `(("agda" ,agda) + ("agda-ial" ,agda-ial) + ("ghc" ,ghc-8.4) + ("ghc-alex" ,ghc-alex) + ("ghc-happy" ,ghc-happy))) + (build-system emacs-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-cedille-path-el + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "cedille-mode.el" + (("/usr/share/emacs/site-lisp/cedille-mode") + (string-append + out "/share/emacs/site-lisp/guix.d/cedille-" + ,version))) + #t))) + (add-after 'unpack 'copy-cedille-mode + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lisp + (string-append + out "/share/emacs/site-lisp/guix.d/cedille-" + ,version "/"))) + (mkdir-p (string-append lisp "cedille-mode")) + (copy-recursively + "cedille-mode" + (string-append lisp "cedille-mode")) + (mkdir-p (string-append lisp "se-mode")) + (copy-recursively + "se-mode" + (string-append lisp "se-mode")) + #t))) + ;; FIXME: Byte compilation fails + (delete 'build) + (replace 'check + (lambda _ + (with-directory-excursion "cedille-tests" + (invoke "sh" "run-tests.sh")))) + (add-after 'unpack 'patch-libraries + (lambda _ (patch-shebang "create-libraries.sh") #t)) + (add-after 'unpack 'copy-ial + (lambda* (#:key inputs #:allow-other-keys) + (copy-recursively + (string-append (assoc-ref inputs "agda-ial") + "/include/agda/ial") + "ial") + ;; Ambiguous module if main is included from ial + (delete-file "ial/main.agda") + #t)) + (add-after 'check 'build-cedille + ;; Agda has a hard time with parallel compilation + (lambda _ + (invoke "touch" "src/Templates.hs") + (make-file-writable "src/Templates.hs") + (invoke "touch" "src/templates.agda") + (make-file-writable "src/templates.agda") + (invoke "make" "--jobs=1"))) + (add-after 'install 'install-cedille + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (copy-recursively + "lib" (string-append out "/lib/cedille")) + (install-file "cedille" (string-append out "/bin")) + (install-file "core/cedille-core" + (string-append out "/bin")) + #t)))))) + (home-page "https://cedille.github.io/") + (synopsis + "Language based on Calculus of Dependent Lambda Eliminations") + (description + "Cedille is an interactive theorem-prover and dependently typed +programming language, based on extrinsic (aka Curry-style) type theory. This +makes it rather different from type theories like Coq and Agda, which are +intrinsic (aka Church-style). In Cedille, terms are nothing more than +annotated versions of terms of pure untyped lambda calculus. In contrast, in +Coq or Agda, the typing annotations are intrinsic parts of terms. The typing +annotations can only be erased as an optimization under certain conditions, +not by virtue of the definition of the type theory.") + (license license:expat))) -- cgit v1.2.3 From b0985c60a0a9163ff715ef05c547e3e4e7a873da Mon Sep 17 00:00:00 2001 From: Jesse Gibbons Date: Thu, 29 Aug 2019 19:13:41 +0200 Subject: gnu: Add rednotebook. * gnu/package/rednotebook.scm: New file. * gnu/local.mk: Add it. * gnu/packages/rednotebook.scm (rednotebook): New variable. Signed-off-by: Nicolas Goaziou --- gnu/local.mk | 1 + gnu/packages/rednotebook.scm | 91 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 gnu/packages/rednotebook.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 797936d2fd..2c02b8510a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -413,6 +413,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/rdf.scm \ %D%/packages/re2c.scm \ %D%/packages/readline.scm \ + %D%/packages/rednotebook.scm \ %D%/packages/regex.scm \ %D%/packages/robotics.scm \ %D%/packages/rrdtool.scm \ diff --git a/gnu/packages/rednotebook.scm b/gnu/packages/rednotebook.scm new file mode 100644 index 0000000000..e5b1b2c7bf --- /dev/null +++ b/gnu/packages/rednotebook.scm @@ -0,0 +1,91 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019 Jesse Gibbons +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages rednotebook) + #:use-module (guix packages) + #:use-module (guix git-download) + #:use-module (guix build-system python) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages python) + #:use-module (gnu packages glib) + #:use-module (gnu packages gtk) + #:use-module (gnu packages webkit) + #:use-module (gnu packages python-xyz)) + +(define-public rednotebook + (package + (name "rednotebook") + (version "2.11.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jendrikseipp/rednotebook.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "04c7a0wgmdl88v9386y1052c38ajbkryiwhqps5lx34d4g7r6hm1")))) + (build-system python-build-system) + (arguments + ;; Tests fail to find the "_" function. + ;; It should be defined in rednotebook/info.py if '_' is not a member of + ;; 'builtins'. It is either not defined or not exported during the check + ;; phase. The program does not have this problem after it is installed. + ;; TODO: Fix tests. + `(#:tests? #f + #:imported-modules ((guix build glib-or-gtk-build-system) + ,@%python-build-system-modules) + #:modules ((ice-9 match) + (guix build python-build-system) + ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:) + (guix build utils)) + #:phases + (modify-phases %standard-phases + ;; Make sure rednotebook can find the typelibs and webkitgtk shared + ;; libraries. + (add-before 'wrap 'wrap-with-library-paths + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (gi-typelib-path (getenv "GI_TYPELIB_PATH")) + (webkitgtk-path (string-append + (assoc-ref inputs "webkitgtk") + "/lib"))) + (wrap-program (string-append out "/bin/rednotebook") + `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)) + `("LD_LIBRARY_PATH" ":" prefix (,webkitgtk-path))) + #t)))))) + (inputs + `(("gtk+" ,gtk+) + ("gtksourceview" ,gtksourceview-3) + ("python-pyyaml" ,python-pyyaml) + ("python-pygobject" ,python-pygobject) + ("webkitgtk" ,webkitgtk))) + ;; TODO: package the following for python3 (if possible), add them as + ;; dependencies, and remove them from rednotebook source: + ;; pygtkspellcheck, elib.intl, msgfmt, txt2tags + ;; TODO: package and add pyenchant for python3 and add it as a dependency. + (home-page "https://www.rednotebook.app") + (synopsis "Daily journal with calendar, templates and keyword searching") + (description + "RedNotebook is a modern desktop journal. It lets you format, tag and +search your entries. You can also add pictures, links and customizable +templates, spell check your notes, and export to plain text, HTML, Latex or +PDF.") + (license (list license:gpl2+ ; rednotebook, txt2tags + license:lgpl3+ ; elib.intl + license:gpl3+)))) ; pygtkspellcheck -- cgit v1.2.3 From 8549e0ca6fd68a57253471436de49b88b2d47e64 Mon Sep 17 00:00:00 2001 From: L p R n d n Date: Sun, 18 Aug 2019 21:24:37 +0200 Subject: gnu: Update Xfce base to 4.14.0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/xfce.scm (libxfce4util): Update to 4.14.0. * gnu/packages/xfce.scm (xfconf): Update to 4.14.1. [native-inputs] Add glib:bin. [propagated-inputs] Remove dbus and dbus-glib. * gnu/packages/xfce.scm (libxfce4ui): Update to 4.14.1. * gnu/packages/xfce.scm (exo): Update to 0.12.8. [propagated-inputs] Add gtk+-3. Remove gtk+-2. [inputs] Add gtk+-2. * gnu/packages/xfce.scm (garcon): Update to 0.6.4. [inputs] Rename gtk+ to gtk+-2. [propagated-inputs] Add gtk+-3. * gnu/packages/xfce.scm (tumbler): Update to 0.2.7. * gnu/packages/xfce.scm (xfce4-appfinder): Update to 4.14.0. [inputs] Updte gtk+ from gtk+-2 to gtk+. * gnu/packages/xfce.scm (xcfe4-panel): Update to 4.14.0 [arguments] Remove #:configure-flags [native-inputs] Add glib:bin. [inputs] Add gtk+-2, libwnck and xfconf. Remove libwnck-2. [propagated-inputs] Add gtk+-3. * gnu/packages/xfce.scm (xfce4-session): Update to 4.14.0. [inputs] Add libwnck. Remove libwnck-2. [source] Remove patch. * gnu/packages/patches/xfce4-session-fix-xfclock4.patch: Delete file. * gnu/packages/xfce.scm (xfce4-settings): Update to 4.14.0. [arguments] Add #:configure flags. * gnu/packages/xfce.scm (xfwm4): Update to 4.14.0. [inputs] Add libwnck. Remove libwnck-2. * gnu/packages/xfce.scm (xfdesktop): Update to 4.14.1. [inputs] Add libwnck. Remove libwnck-2. * gnu/packages/xfce.scm (xfce4-power-manager): Update to 4.6.5. [inputs] Add gtk+. Remove gtk+-2. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 - .../patches/xfce4-session-fix-xflock4.patch | 31 ------ gnu/packages/xfce.scm | 107 +++++++++++---------- 3 files changed, 56 insertions(+), 83 deletions(-) delete mode 100644 gnu/packages/patches/xfce4-session-fix-xflock4.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 2c02b8510a..dbae857c38 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1420,7 +1420,6 @@ dist_patch_DATA = \ %D%/packages/patches/xf86-video-tga-remove-mibstore.patch \ %D%/packages/patches/xf86-video-voodoo-pcitag.patch \ %D%/packages/patches/xfce4-panel-plugins.patch \ - %D%/packages/patches/xfce4-session-fix-xflock4.patch \ %D%/packages/patches/xfce4-settings-defaults.patch \ %D%/packages/patches/xinetd-fix-fd-leak.patch \ %D%/packages/patches/xinetd-CVE-2013-4342.patch \ diff --git a/gnu/packages/patches/xfce4-session-fix-xflock4.patch b/gnu/packages/patches/xfce4-session-fix-xflock4.patch deleted file mode 100644 index 74769e4257..0000000000 --- a/gnu/packages/patches/xfce4-session-fix-xflock4.patch +++ /dev/null @@ -1,31 +0,0 @@ -From cbb9c769316b4d32956a2c78aa01a38b473f0cfc Mon Sep 17 00:00:00 2001 -From: David Thompson -Date: Fri, 30 Oct 2015 08:30:43 -0400 -Subject: [PATCH] xflock4: Do not override PATH with hardcoded value. - -The PATH "/bin:/usr/bin" may not be a valid search path on the user's -machine. The screen locking program may be in /usr/local/bin or -elsewhere. Distros that do not conform to the FHS, such as GuixSD and -NixOS, will not have their executables in either location. Thus, we -simply leave PATH alone. ---- - scripts/xflock4 | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/scripts/xflock4 b/scripts/xflock4 -index ec4d05d..e7981ac 100644 ---- a/scripts/xflock4 -+++ b/scripts/xflock4 -@@ -21,9 +21,6 @@ - # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - # - --PATH=/bin:/usr/bin --export PATH -- - # Lock by xscreensaver or gnome-screensaver, if a respective daemon is running - for lock_cmd in \ - "xscreensaver-command -lock" \ --- -2.5.0 - diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm index 93c36dac1e..60f1586f06 100644 --- a/gnu/packages/xfce.scm +++ b/gnu/packages/xfce.scm @@ -54,6 +54,7 @@ #:use-module (gnu packages pdf) #:use-module (gnu packages polkit) #:use-module (gnu packages gstreamer) + #:use-module (gnu packages libcanberra) #:use-module (gnu packages linux) #:use-module (gnu packages photo) #:use-module (gnu packages pcre) @@ -86,7 +87,7 @@ (define-public libxfce4util (package (name "libxfce4util") - (version "4.12.1") + (version "4.14.0") (source (origin (method url-fetch) (uri (string-append "http://archive.xfce.org/xfce/" @@ -94,7 +95,7 @@ "/src/" name "-" version ".tar.bz2")) (sha256 (base32 - "07c8r3xwx5is298zk77m3r784gmr5y4mh8bbca5zdjqk5vxdwsw7")))) + "093338faqqsrlc8dkmzr7qv411ysxczg1wlg7s3gvhrfk6vpkb9j")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) @@ -110,7 +111,7 @@ Xfce Desktop Environment.") (define-public xfconf (package (name "xfconf") - (version "4.12.1") + (version "4.14.1") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/xfce/" @@ -118,7 +119,7 @@ Xfce Desktop Environment.") name "-" version ".tar.bz2")) (sha256 (base32 - "0dns190bwb615wy9ma2654sw4vz1d0rcv061zmaalkv9wmj8bx1m")))) + "0n8d55c98ff7wgwv3qa4g369sv4iasgm1w62zq10kq5f56iy14xq")))) (build-system gnu-build-system) (arguments '(#:phases @@ -136,12 +137,12 @@ Xfce Desktop Environment.") (delete 'check)))) (native-inputs `(("pkg-config" ,pkg-config) - ("intltool" ,intltool))) + ("intltool" ,intltool) + ("glib:bin" ,glib "bin") ;; for gdbus-codegen + )) (propagated-inputs ;; libxfconf-0.pc refers to all these. - `(("glib" ,glib) - ("dbus" ,dbus) - ("dbus-glib" ,dbus-glib))) + `(("glib" ,glib))) (inputs `(("libxfce4util" ,libxfce4util))) (home-page "https://www.xfce.org/") @@ -154,7 +155,7 @@ storage system.") (define-public libxfce4ui (package (name "libxfce4ui") - (version "4.12.1") + (version "4.14.1") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/xfce/" @@ -162,7 +163,7 @@ storage system.") name "-" version ".tar.bz2")) (sha256 (base32 - "0hzzhiiwmqsrbv17nninhs2x1b8ck0ym85jck2xphx5ypw8rhq9x")))) + "1npjhznmnckhnylsv3l7p1zvhckhmp9d7vifs8w12kdfmrg0fjf4")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) @@ -188,7 +189,7 @@ to share commonly used Xfce widgets among the Xfce applications.") (define-public exo (package (name "exo") - (version "0.12.6") + (version "0.12.8") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/xfce/" @@ -196,17 +197,19 @@ to share commonly used Xfce widgets among the Xfce applications.") "exo-" version ".tar.bz2")) (sha256 (base32 - "00qh8ihrf09jvd26kilybihkgvv6rvi0l1bvlldxc99jb7ygy5ql")))) + "1ppwi6n40aphh0dqsnfrk234zsp7pl4lkjnspqjxw7m49bka401l")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("intltool" ,intltool))) (propagated-inputs - ;; exo-1.pc refers to all these. - `(("gtk+" ,gtk+-2) + ;; exo-2.pc refers to all these. + `(("gtk+-3" ,gtk+) ("libxfce4util" ,libxfce4util))) (inputs - `(("libxfce4ui" ,libxfce4ui) + `(;; FIXME Refered to in exo-1.pc but conflict with gtk+-3 + ("gtk+-2" ,gtk+-2) + ("libxfce4ui" ,libxfce4ui) ("perl-uri" ,perl-uri))) (home-page "https://www.xfce.org/") (synopsis "Extension library for Xfce") @@ -220,7 +223,7 @@ development.") (define-public garcon (package (name "garcon") - (version "0.6.3") + (version "0.6.4") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/xfce/" @@ -228,16 +231,17 @@ development.") "garcon-" version ".tar.bz2")) (sha256 (base32 - "00c4g4gmbr8710k0yv1zybnm9s2gkc1rj63zfrg9qgin66jzxcbn")))) + "0bbngb4bn1m325j7y40gky36kn2nlsvqs6xp0wy76x3s0d9lfpnp")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("intltool" ,intltool) ("glib:bin" ,glib "bin"))) (inputs - `(("gtk+" ,gtk+-2))) + `(("gtk+-2" ,gtk+-2))); required by garcon-gtk2-1.pc (propagated-inputs - `(("libxfce4ui" ,libxfce4ui))) ; required by garcon-gtk2-1.pc + `(("gtk+-3" ,gtk+) ; required by garcon-gtk3-1.pc + ("libxfce4ui" ,libxfce4ui))) ; required by garcon-gtk3-1.pc (home-page "https://www.xfce.org/") (synopsis "Implementation of the freedesktop.org menu specification") (description @@ -250,7 +254,7 @@ merging features essential for loading menus modified with menu editors.") (define-public tumbler (package (name "tumbler") - (version "0.2.5") + (version "0.2.7") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/xfce/" @@ -258,7 +262,7 @@ merging features essential for loading menus modified with menu editors.") "tumbler-" version ".tar.bz2")) (sha256 (base32 - "0nfld1lvrdpsjfvm08y5487km45pm1mdr928hgqm8j0shrx6jiv4")))) + "1r0l0ghcrj71ax7yil1m4p7yjrfqm3icx0s8r7ivwv3i2rgw617p")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) @@ -286,7 +290,7 @@ management D-Bus specification.") (define-public xfce4-panel (package (name "xfce4-panel") - (version "4.12.2") + (version "4.14.0") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/xfce/" @@ -294,20 +298,22 @@ management D-Bus specification.") name "-" version ".tar.bz2")) (sha256 (base32 - "1s8cvsrgmkmmm84g6mghpj2k4777gm22g5lrsf8pdy5qh6xql1a2")) + "1x3flv86jh9vqah7mr5mmfx2991mc6icsqjygsc3j88lgsyz7y6m")) (patches (search-patches "xfce4-panel-plugins.patch")))) (build-system gnu-build-system) - (arguments - '(#:configure-flags '("--enable-gtk3"))) (native-inputs `(("pkg-config" ,pkg-config) - ("intltool" ,intltool))) + ("intltool" ,intltool) + ("glib:bin" ,glib "bin"))) (propagated-inputs - `(("libxfce4util" ,libxfce4util))) ; required by libxfce4panel-1.0.pc + `(("gtk+-3" ,gtk+) ; required by libxfce4panel-2.0.pc + ("libxfce4util" ,libxfce4util))) ; required by libxfce4panel-2.0.pc (inputs `(("exo" ,exo) + ("gtk+-2" ,gtk+-2) + ("xfconf" ,xfconf) ("garcon" ,garcon) - ("libwnck" ,libwnck-2) + ("libwnck" ,libwnck) ("libxfce4ui" ,libxfce4ui))) (native-search-paths (list (search-path-specification @@ -486,7 +492,7 @@ per window.") (define-public xfce4-appfinder (package (name "xfce4-appfinder") - (version "4.12.0") + (version "4.14.0") (source (origin (method url-fetch) (uri (string-append "http://archive.xfce.org/xfce/" @@ -494,14 +500,14 @@ per window.") "/src/" name "-" version ".tar.bz2")) (sha256 (base32 - "0ry5hin8xhgnkmm9vs7jq8blk1cnbyr0s18nm1j6nsm7360abm1a")))) + "162dibl6ipp72x0s35yhk7kkzxd4qimagg5zdkkv5kjgjpa7bhby")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("intltool" ,intltool))) (inputs `(("garcon" ,garcon) - ("gtk+" ,gtk+-2) + ("gtk+" ,gtk+) ("libxfce4ui" ,libxfce4ui))) (home-page "https://www.xfce.org/") (synopsis "Xfce application finder") @@ -513,7 +519,7 @@ your system in categories, so you can quickly find and launch them.") (define-public xfce4-session (package (name "xfce4-session") - (version "4.12.1") + (version "4.14.0") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/xfce/" @@ -521,10 +527,7 @@ your system in categories, so you can quickly find and launch them.") name "-" version ".tar.bz2")) (sha256 (base32 - "1z88klls3j161n5snpamz4l3p4823q4h87wdnqikczxgs2ig5mwp")) - (patches - ;; See: https://bugzilla.xfce.org/show_bug.cgi?id=12282 - (search-patches "xfce4-session-fix-xflock4.patch")) + "0gq4a8yiw58hb4d5dhvprxvzamqfg8qblmiqcw0b97mn9svnvyql")) (modules '((guix build utils))) (snippet '(begin @@ -549,7 +552,7 @@ your system in categories, so you can quickly find and launch them.") ("upower" ,upower) ("polkit" ,polkit) ("libsm" ,libsm) - ("libwnck" ,libwnck-2) + ("libwnck" ,libwnck) ("libxfce4ui" ,libxfce4ui))) (home-page "https://www.xfce.org/") (synopsis "Xfce session manager") @@ -561,7 +564,7 @@ allows you to shutdown the computer from Xfce.") (define-public xfce4-settings (package (name "xfce4-settings") - (version "4.12.4") + (version "4.14.0") (source (origin (method url-fetch) (uri (string-append "http://archive.xfce.org/src/xfce/" @@ -569,9 +572,13 @@ allows you to shutdown the computer from Xfce.") name "-" version ".tar.bz2")) (sha256 (base32 - "16vgidhhc19dz0p0i6fp5iiwxd53ky143j6h14a9b7mz92nlr872")) + "0g0ipkg2fyg8r1z95ynx0xjr78bp49c2dwh4mli05nmb4gb40c70")) (patches (search-patches "xfce4-settings-defaults.patch")))) (build-system gnu-build-system) + (arguments + `(#:configure-flags '("--enable-pluggable-dialogs" + "--enable-sound-settings" + "--enable-xrandr"))) (native-inputs `(("pkg-config" ,pkg-config) ("intltool" ,intltool))) @@ -659,7 +666,7 @@ and import the new pictures from your camera.") (define-public xfwm4 (package (name "xfwm4") - (version "4.12.5") + (version "4.14.0") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/xfce/" @@ -667,14 +674,14 @@ and import the new pictures from your camera.") name "-" version ".tar.bz2")) (sha256 (base32 - "1jnav0wcqlswl2v7nh61big9czg5hmnyvrvm6812sv362qic0xbp")))) + "05dn4a1i0nm6wm3nyj7qli5bvfalxghcl7x543qr5l33vkw2n65l")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("intltool" ,intltool))) (inputs `(("libdrm" ,libdrm) - ("libwnck" ,libwnck-2) + ("libwnck" ,libwnck) ("libxcomposite" ,libxcomposite) ("libxdamage" ,libxdamage) ("libxfce4ui" ,libxfce4ui) @@ -689,7 +696,7 @@ on the screen.") (define-public xfdesktop (package (name "xfdesktop") - (version "4.12.4") + (version "4.14.1") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/xfce/" @@ -697,7 +704,7 @@ on the screen.") name "-" version ".tar.bz2")) (sha256 (base32 - "1jzi851arljq5lza9inyq4ss513l62lbzbfm64a7x4320m8kb2h9")) + "10pqxgpj7b57wpcsh2k98sj4aavcgxbs1lc8qsq4mibf4hba01gp")) (modules '((guix build utils))) (snippet #~(begin @@ -735,7 +742,7 @@ on the screen.") `(("exo" ,exo) ("garcon" ,garcon) ("libnotify" ,libnotify) - ("libwnck" ,libwnck-2) + ("libwnck" ,libwnck) ("libxfce4ui" ,libxfce4ui) ("thunar" ,thunar))) (home-page "https://www.xfce.org/") @@ -831,7 +838,7 @@ system resources, while still being visually appealing and user friendly.") (define-public xfce4-power-manager (package (name "xfce4-power-manager") - (version "1.6.1") + (version "1.6.5") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/xfce/" @@ -839,16 +846,14 @@ system resources, while still being visually appealing and user friendly.") name "-" version ".tar.bz2")) (sha256 (base32 - "0sv5927q8jxvdfx7b06f8s7qyq3qa1nqn0b8c1b9bf234d2jba0y")))) + "0x3s2bdwfhp65dz5yn3k43j99ywqlsvrpz3pqmgwm0dik5wbdb8h")))) (build-system gnu-build-system) - (arguments - '(#:configure-flags '("--enable-gtk3"))) (native-inputs `(("pkg-config" ,pkg-config) ("intltool" ,intltool))) (inputs - `(("lbxrandr" ,libxrandr) - ("gtk+" ,gtk+-2) + `(("libxrandr" ,libxrandr) + ("gtk+" ,gtk+) ("upower" ,upower) ("libnotify" ,libnotify) ("libxfce4ui" ,libxfce4ui))) -- cgit v1.2.3 From bd3d71cb16de546b534be7a3d03880922f6a1c07 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 3 Sep 2019 13:15:30 +0200 Subject: gnu: hdf4: Build with libtirpc. * gnu/packages/patches/hdf4-tirpc.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/maths.scm (hdf4)[source](patches): Use it. [inputs]: Add LIBTIRPC. [arguments]: Adjust #:configure-flags accordingly. --- gnu/local.mk | 1 + gnu/packages/maths.scm | 12 +++++++++--- gnu/packages/patches/hdf4-tirpc.patch | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/hdf4-tirpc.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index fe476534c2..b40472709f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -944,6 +944,7 @@ dist_patch_DATA = \ %D%/packages/patches/hdf4-architectures.patch \ %D%/packages/patches/hdf4-reproducibility.patch \ %D%/packages/patches/hdf4-shared-fortran.patch \ + %D%/packages/patches/hdf4-tirpc.patch \ %D%/packages/patches/hdf5-config-date.patch \ %D%/packages/patches/hdf5-mpi-deprecations.patch \ %D%/packages/patches/hdf5-1.8-mpi-deprecations.patch \ diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 38bb81242f..9e515fd3d1 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -100,6 +100,7 @@ #:use-module (gnu packages mpi) #:use-module (gnu packages multiprecision) #:use-module (gnu packages netpbm) + #:use-module (gnu packages onc-rpc) #:use-module (gnu packages pcre) #:use-module (gnu packages popt) #:use-module (gnu packages perl) @@ -684,7 +685,8 @@ computations.") (base32 "1wz0586zh91pqb95wvr0pbh71a8rz358fdj6n2ksp85x2cis9lsm")) (patches (search-patches "hdf4-architectures.patch" "hdf4-reproducibility.patch" - "hdf4-shared-fortran.patch")))) + "hdf4-shared-fortran.patch" + "hdf4-tirpc.patch")))) (build-system gnu-build-system) (native-inputs `(("gfortran" ,gfortran) @@ -692,10 +694,14 @@ computations.") ("flex" ,flex))) (inputs `(("zlib" ,zlib) - ("libjpeg" ,libjpeg))) + ("libjpeg" ,libjpeg) + ("libtirpc" ,libtirpc))) (arguments `(#:parallel-tests? #f - #:configure-flags '("--enable-shared") + #:configure-flags (list "--enable-shared" + (string-append "CPPFLAGS=-I" + (assoc-ref %build-inputs "libtirpc") + "/include/tirpc")) #:phases (modify-phases %standard-phases ;; This is inspired by two of Debian's patches. diff --git a/gnu/packages/patches/hdf4-tirpc.patch b/gnu/packages/patches/hdf4-tirpc.patch new file mode 100644 index 0000000000..3f436e3887 --- /dev/null +++ b/gnu/packages/patches/hdf4-tirpc.patch @@ -0,0 +1,33 @@ +Build with libtirpc on all architectures because glibc no longer provides +SunRPC support. + +diff --git a/configure b/configure +--- a/configure ++++ b/configure +@@ -23635,10 +23635,13 @@ + *-pc-cygwin*) + LIBS="$LIBS -ltirpc" + CPPFLAGS="$CPPFLAGS -I/usr/include/tirpc" ;; ++ *-linux-gnu) ++ LIBS="$LIBS -ltirpc" ++ CPPFLAGS="$CPPFLAGS" ;; + *) ;; + esac + +-if test "X$BUILD_XDR" != "Xyes"; then ++if test "X$BUILD_XDR" = "Xyes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -23693,9 +23696,9 @@ + ## but we need to make sure that it is present on the system. Do that here, + ## The SunRPC of the glibc has been replaced by a TI-RPC (Transport Independent RPC) library for IPv6 support + case "$host" in +- *-pc-cygwin*) ++ *) + HAVE_RPC="yes" +- ac_fn_c_check_header_mongrel "$LINENO" "rpc.h" "ac_cv_header_rpc_h" "$ac_includes_default" ++ ac_fn_c_check_header_mongrel "$LINENO" "rpc/rpc.h" "ac_cv_header_rpc_h" "$ac_includes_default" + if test "x$ac_cv_header_rpc_h" = xyes; then : + : + else -- cgit v1.2.3 From f1371daa97a521d0e995599cf94fa2516c6784c9 Mon Sep 17 00:00:00 2001 From: "Jovany Leandro G.C" Date: Sun, 1 Sep 2019 05:52:09 -0500 Subject: gnu: twinkle: update to 1.10.2. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/telephony.scm (twinkle): update to 1.10.2 * gnu/packages/patches/twinkle-include-qregexpvalidator.patch: Delete it. * gnu/local.mk (dist_patch_DATA): Remove patch. Co-authored-by: Ludovic Courtès --- gnu/local.mk | 1 - .../patches/twinkle-include-qregexpvalidator.patch | 123 --------------------- gnu/packages/telephony.scm | 80 +++++++------- 3 files changed, 38 insertions(+), 166 deletions(-) delete mode 100755 gnu/packages/patches/twinkle-include-qregexpvalidator.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index dbae857c38..b7a5ef825b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1362,7 +1362,6 @@ dist_patch_DATA = \ %D%/packages/patches/totem-meson-compat.patch \ %D%/packages/patches/totem-meson-easy-codec.patch \ %D%/packages/patches/tuxpaint-stamps-path.patch \ - %D%/packages/patches/twinkle-include-qregexpvalidator.patch \ %D%/packages/patches/txr-shell.patch \ %D%/packages/patches/u-boot-fix-mkimage-header-verification.patch \ %D%/packages/patches/unzip-CVE-2014-8139.patch \ diff --git a/gnu/packages/patches/twinkle-include-qregexpvalidator.patch b/gnu/packages/patches/twinkle-include-qregexpvalidator.patch deleted file mode 100755 index 4096cc8712..0000000000 --- a/gnu/packages/patches/twinkle-include-qregexpvalidator.patch +++ /dev/null @@ -1,123 +0,0 @@ -Copied from upstream: - -https://github.com/LubosD/twinkle/commit/4b42755619011c117a76bdf98e417ebedc47e319 - -From 4b42755619011c117a76bdf98e417ebedc47e319 Mon Sep 17 00:00:00 2001 -From: Michal Kubecek -Date: Wed, 6 Jun 2018 10:07:21 +0200 -Subject: [PATCH] Include explicitly - -Since Qt 5.11, generated ui_getprofilename.h no longer includes QHeaderView -which breaks the chain that included qvalidator.h in getprofilename.cpp. -As it feels rather fragile to rely on such indirect includes, let's include - explicitly in each file using QRegExpValidator class. ---- - src/gui/diamondcardprofileform.cpp | 1 + - src/gui/getprofilenameform.cpp | 2 +- - src/gui/inviteform.cpp | 1 + - src/gui/mphoneform.cpp | 1 + - src/gui/numberconversionform.cpp | 1 + - src/gui/syssettingsform.cpp | 1 + - src/gui/userprofileform.cpp | 1 + - src/gui/wizardform.cpp | 1 + - 8 files changed, 8 insertions(+), 1 deletion(-) - -diff --git a/src/gui/diamondcardprofileform.cpp b/src/gui/diamondcardprofileform.cpp -index 6656909..517180b 100644 ---- a/src/gui/diamondcardprofileform.cpp -+++ b/src/gui/diamondcardprofileform.cpp -@@ -21,6 +21,7 @@ - - #include - #include -+#include - #include "gui.h" - #include "diamondcard.h" - #include "getprofilenameform.h" -diff --git a/src/gui/getprofilenameform.cpp b/src/gui/getprofilenameform.cpp -index 1319e1d..89c715e 100644 ---- a/src/gui/getprofilenameform.cpp -+++ b/src/gui/getprofilenameform.cpp -@@ -1,7 +1,7 @@ - #include "getprofilenameform.h" -- - #include - #include -+#include - #include "user.h" - #include "protocol.h" - -diff --git a/src/gui/inviteform.cpp b/src/gui/inviteform.cpp -index 433fb22..2a5b68d 100644 ---- a/src/gui/inviteform.cpp -+++ b/src/gui/inviteform.cpp -@@ -7,6 +7,7 @@ - #include "sys_settings.h" - #include - #include -+#include - - /* - Copyright (C) 2005-2009 Michel de Boer -diff --git a/src/gui/mphoneform.cpp b/src/gui/mphoneform.cpp -index 260fda7..c4e3c1d 100644 ---- a/src/gui/mphoneform.cpp -+++ b/src/gui/mphoneform.cpp -@@ -54,6 +54,7 @@ - #include - #include - #include -+#include - #include "buddyform.h" - #include "diamondcardprofileform.h" - #include "osd.h" -diff --git a/src/gui/numberconversionform.cpp b/src/gui/numberconversionform.cpp -index f8ae64c..8481a9b 100644 ---- a/src/gui/numberconversionform.cpp -+++ b/src/gui/numberconversionform.cpp -@@ -1,5 +1,6 @@ - #include "numberconversionform.h" - -+#include - #include "gui.h" - - /* -diff --git a/src/gui/syssettingsform.cpp b/src/gui/syssettingsform.cpp -index 216af54..355df59 100644 ---- a/src/gui/syssettingsform.cpp -+++ b/src/gui/syssettingsform.cpp -@@ -28,6 +28,7 @@ - #include "twinkle_config.h" - #include - #include -+#include - #include "syssettingsform.h" - /* - * Constructs a SysSettingsForm as a child of 'parent', with the -diff --git a/src/gui/userprofileform.cpp b/src/gui/userprofileform.cpp -index 28700a6..9ed9209 100644 ---- a/src/gui/userprofileform.cpp -+++ b/src/gui/userprofileform.cpp -@@ -31,6 +31,7 @@ - #include - #include "twinkle_config.h" - #include -+#include - #include "numberconversionform.h" - #include "util.h" - #include "userprofileform.h" -diff --git a/src/gui/wizardform.cpp b/src/gui/wizardform.cpp -index 777aa12..f925875 100644 ---- a/src/gui/wizardform.cpp -+++ b/src/gui/wizardform.cpp -@@ -23,6 +23,7 @@ - #include - #include "gui.h" - #include -+#include - #include "wizardform.h" - - #define PROV_NONE QT_TRANSLATE_NOOP("WizardForm", "None (direct IP to IP calls)") --- -2.17.0 - diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm index cf37756503..41896f2eb6 100644 --- a/gnu/packages/telephony.scm +++ b/gnu/packages/telephony.scm @@ -491,28 +491,24 @@ Mumble consists of two applications for separate usage: license:bsd-2)))) (define-public twinkle - (let ((commit "02e1d1538af3337134bd7381dcd95f8d7775b30f") - (revision "1")) (package - (name "twinkle") - (version (git-version "1.10.1" revision commit)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/LubosD/twinkle") - (commit commit))) - (patches - (search-patches "twinkle-include-qregexpvalidator.patch")) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0ds4rp4vr1wagn4m4m7ldqbsx5vgmgbfcqqgyhn1wf6s1dm0020z")))) - (build-system cmake-build-system) - (arguments - `(#:tests? #f ; no test target - #:configure-flags '("-DWITH_SPEEX=On") - #:phases - (modify-phases %standard-phases + (name "twinkle") + (version "1.10.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/LubosD/twinkle") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0s0gi03xwvzp02ah4q6j33r9jx9nbayr6dxlg2ck9pwbay1nq1hx")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f ; no test target + #:configure-flags '("-DWITH_SPEEX=On") + #:phases + (modify-phases %standard-phases (add-after 'install 'wrap-executable (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) @@ -528,30 +524,30 @@ Mumble consists of two applications for separate usage: "/lib/qt5/qml")) '("qtdeclarative" "qtquickcontrols")))) #t)))))) - (native-inputs - `(("bison" ,bison) - ("flex" ,flex) - ("readline" ,readline) - ("file" ,file) - ("ucommon" ,ucommon) - ("ccrtp" ,ccrtp) - ("libxml2" ,libxml2) - ("speex" ,speex) - ("speexdsp" ,speexdsp) - ("libsndfile" ,libsndfile) - ("alsa-lib" ,alsa-lib) - ("qttools" ,qttools))) - (inputs - `(("qtbase" ,qtbase) - ("qtdeclarative" ,qtdeclarative) - ("qtquickcontrols" ,qtquickcontrols))) - (home-page "http://twinkle.dolezel.info/") - (synopsis "Softphone for voice over IP and instant messaging") - (description "Twinkle is a softphone for your voice over IP and instant + (native-inputs + `(("bison" ,bison) + ("flex" ,flex) + ("readline" ,readline) + ("file" ,file) + ("ucommon" ,ucommon) + ("ccrtp" ,ccrtp) + ("libxml2" ,libxml2) + ("speex" ,speex) + ("speexdsp" ,speexdsp) + ("libsndfile" ,libsndfile) + ("alsa-lib" ,alsa-lib) + ("qttools" ,qttools))) + (inputs + `(("qtbase" ,qtbase) + ("qtdeclarative" ,qtdeclarative) + ("qtquickcontrols" ,qtquickcontrols))) + (home-page "http://twinkle.dolezel.info/") + (synopsis "Softphone for voice over IP and instant messaging") + (description "Twinkle is a softphone for your voice over IP and instant messaging communcations using the SIP protocol. You can use it for direct IP phone to IP phone communication or in a network using a SIP proxy to route your calls and messages") - (license license:gpl2+)))) + (license license:gpl2+))) (define-public pjproject (package -- cgit v1.2.3 From 07c0110eac24f2e1dc292e143d93f681244838a3 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 10 Sep 2019 15:26:38 +0200 Subject: gnu: weechat: Update to 2.6. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/irc.scm (weechat): Update to 2.6. [source]: Remove obsolete patch. [inputs]: Replace python-2 with python(@3). [arguments]: Remove ‘wrap’ phase. * gnu/packages/patches/weechat-python.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/irc.scm | 20 ++++++---------- gnu/packages/patches/weechat-python.patch | 40 ------------------------------- 3 files changed, 7 insertions(+), 54 deletions(-) delete mode 100644 gnu/packages/patches/weechat-python.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index b7a5ef825b..d76438ca63 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1398,7 +1398,6 @@ dist_patch_DATA = \ %D%/packages/patches/wavpack-CVE-2018-6767.patch \ %D%/packages/patches/wavpack-CVE-2018-7253.patch \ %D%/packages/patches/wavpack-CVE-2018-7254.patch \ - %D%/packages/patches/weechat-python.patch \ %D%/packages/patches/wicd-bitrate-none-fix.patch \ %D%/packages/patches/wicd-get-selected-profile-fix.patch \ %D%/packages/patches/wicd-urwid-1.3.patch \ diff --git a/gnu/packages/irc.scm b/gnu/packages/irc.scm index 622f1253d8..e3418c1fec 100644 --- a/gnu/packages/irc.scm +++ b/gnu/packages/irc.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner ;;; Copyright © 2016 ng0 ;;; Copyright © 2017 Marius Bakke -;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice +;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. ;;; @@ -166,15 +166,14 @@ SILC and ICB protocols via plugins.") (define-public weechat (package (name "weechat") - (version "2.5") + (version "2.6") (source (origin (method url-fetch) (uri (string-append "https://weechat.org/files/src/weechat-" version ".tar.xz")) (sha256 (base32 - "09sc5lf7z70x3iw87q4zh8rbyngsw89pwnzs5jk195zzqdspgj2j")) - (patches (search-patches "weechat-python.patch")))) + "0j2iflnfvv31q2l9r67r8aj3ipggqfm2r2dpy7pvdpxgwwq337ps")))) (build-system cmake-build-system) (native-inputs `(("gettext" ,gettext-minimal) @@ -187,9 +186,11 @@ SILC and ICB protocols via plugins.") ("aspell" ,aspell) ("curl" ,curl) ("gnutls" ,gnutls) + + ;; Scripting language plug-ins. ("guile" ,guile-2.0) ("lua" ,lua-5.1) - ("python" ,python-2) + ("python" ,python) ("perl" ,perl) ("tcl" ,tcl))) (arguments @@ -214,14 +215,7 @@ SILC and ICB protocols via plugins.") (substitute* "tests/scripts/test-scripts.cpp" ((".*\\{ \"(javascript|php|ruby)\", " all) (string-append "// SKIP" all))) - #t)) - (add-after 'install 'wrap - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (py2 (assoc-ref inputs "python"))) - (wrap-program (string-append out "/bin/weechat") - `("PATH" ":" prefix (,(string-append py2 "/bin")))) - #t)))))) + #t))))) (synopsis "Extensible chat client") (description "WeeChat (Wee Enhanced Environment for Chat) is an @dfn{Internet Relay Chat} (IRC) client, which is designed to be light and fast. diff --git a/gnu/packages/patches/weechat-python.patch b/gnu/packages/patches/weechat-python.patch deleted file mode 100644 index 8182636ecb..0000000000 --- a/gnu/packages/patches/weechat-python.patch +++ /dev/null @@ -1,40 +0,0 @@ -Get Python LDFLAGS from 'pkg-config'. - -The other approach is more complex and gets it wrong: it returns -"-L/path/to/python/lib/python-2.7.10/lib/python2.7/config -lpython -lwhatever"; -since that config/ sub-directory contains libpython2.7.a, we end up -statically linking Python in Weechat's python.so, which we do not want. - ---- weechat-1.3/configure.ac 2015-08-16 08:27:07.000000000 +0200 -+++ weechat-1.3/configure.ac 2015-11-29 18:18:52.975197048 +0100 -@@ -535,29 +535,7 @@ if test "x$enable_python" = "xyes" ; the - if test -r "$PYTHON_INCLUDE/Python.h"; then - PYTHON_CFLAGS="-I$PYTHON_INCLUDE" - AC_MSG_RESULT(found) -- PYTHON_LIB=`$PYTHON -c "import sys, distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_config_var('LIBPL'))"` -- PYTHON_LFLAGS="-lpython$PYTHON_VERSION "`$PYTHON -c "import sys, distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_config_var('LIBS')+' '+distutils.sysconfig.get_config_var('SYSLIBS')+' '+distutils.sysconfig.get_config_var('LINKFORSHARED'))"` -- AC_MSG_CHECKING(for Python library) -- if test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.so"; then -- PYTHON_LFLAGS="-L$PYTHON_LIB $PYTHON_LFLAGS" -- AC_MSG_RESULT(found) -- elif test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.a"; then -- PYTHON_LFLAGS="-L$PYTHON_LIB $PYTHON_LFLAGS" -- AC_MSG_RESULT(found) -- elif test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.dll.a"; then -- PYTHON_LFLAGS="-L$PYTHON_LIB $PYTHON_LFLAGS" -- AC_MSG_RESULT(found) -- elif test -r "$PYTHON_SYSPREFIX/lib/libpython$PYTHON_VERSION.so"; then -- PYTHON_LFLAGS="-L$PYTHON_SYSPREFIX/lib/ $PYTHON_LFLAGS" -- AC_MSG_RESULT(found) -- else -- AC_MSG_WARN([ --*** Python library couldn't be found on your system. --*** Try to install it with your software package manager. --*** WeeChat will be built without Python support.]) -- enable_python="no" -- not_found="$not_found python" -- fi -+ PYTHON_LFLAGS=`pkg-config python2 --libs` - else - AC_MSG_WARN([ - *** Python header files couldn't be found on your system. -- cgit v1.2.3 From 489d16577e4a6ccc30f3719d9263900089edd842 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 10 Sep 2019 19:04:51 +0200 Subject: gnu: cmake: Add package variant that knows about X.509 certificates. Fixes . * gnu/packages/patches/cmake-curl-certificates.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/cmake.scm (cmake/fixed): New variable. --- gnu/local.mk | 1 + gnu/packages/cmake.scm | 12 +++++++ gnu/packages/patches/cmake-curl-certificates.patch | 40 ++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 gnu/packages/patches/cmake-curl-certificates.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index d76438ca63..3f32b9cbf2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -744,6 +744,7 @@ dist_patch_DATA = \ %D%/packages/patches/clementine-use-openssl.patch \ %D%/packages/patches/clisp-remove-failing-test.patch \ %D%/packages/patches/clucene-pkgconfig.patch \ + %D%/packages/patches/cmake-curl-certificates.patch \ %D%/packages/patches/coda-use-system-libs.patch \ %D%/packages/patches/combinatorial-blas-awpm.patch \ %D%/packages/patches/combinatorial-blas-io-fix.patch \ diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm index 7186cf98df..95f884b36d 100644 --- a/gnu/packages/cmake.scm +++ b/gnu/packages/cmake.scm @@ -164,6 +164,18 @@ and workspaces that can be used in the compiler environment of your choice.") license:expat ; cmjsoncpp is dual MIT/public domain license:public-domain)))) ; cmlibarchive/archive_getdate.c +(define-public cmake/fixed + ;; This is a variant of CMake that fixes X.509 certificate lookup: + ;; . + (package + (inherit cmake) + (version (string-append (package-version cmake) "-1")) + (source (origin + (inherit (package-source cmake)) + (patches + (append (search-patches "cmake-curl-certificates.patch") + (origin-patches (package-source cmake)))))))) + (define-public emacs-cmake-mode (package (inherit cmake) diff --git a/gnu/packages/patches/cmake-curl-certificates.patch b/gnu/packages/patches/cmake-curl-certificates.patch new file mode 100644 index 0000000000..36252083f8 --- /dev/null +++ b/gnu/packages/patches/cmake-curl-certificates.patch @@ -0,0 +1,40 @@ +By default commands such as "ctest" would not look for certificates +at all: . + +This changes CMake such that commands honor SSL_CERT_FILE and SSL_CERT_DIR +as well as /etc/ssl/certs. + +--- cmake-3.13.1/Source/cmCurl.cxx 2019-09-10 17:27:36.926907260 +0200 ++++ cmake-3.13.1/Source/cmCurl.cxx 2019-09-10 17:52:35.475903919 +0200 +@@ -4,11 +4,8 @@ + + #include "cmThirdParty.h" + +-#if !defined(CMAKE_USE_SYSTEM_CURL) && !defined(_WIN32) && \ +- !defined(__APPLE__) && !defined(CURL_CA_BUNDLE) && !defined(CURL_CA_PATH) + # define CMAKE_FIND_CAFILE + # include "cmSystemTools.h" +-#endif + + // curl versions before 7.21.5 did not provide this error code + #if defined(LIBCURL_VERSION_NUM) && LIBCURL_VERSION_NUM < 0x071505 +@@ -29,6 +26,19 @@ std::string cmCurlSetCAInfo(::CURL* curl + ::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_CAINFO, cafile); + check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: "); + } ++ ++ /* Honor the usual environment variables. */ ++ else if (cmSystemTools::GetEnv("SSL_CERT_FILE", e)) { ++ ::CURLcode res = ++ ::curl_easy_setopt(curl, CURLOPT_CAINFO, e.c_str()); ++ check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: "); ++ } ++ else if (cmSystemTools::GetEnv("SSL_CERT_DIR", e)) { ++ ::CURLcode res = ++ ::curl_easy_setopt(curl, CURLOPT_CAPATH, e.c_str()); ++ check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: "); ++ } ++ + #ifdef CMAKE_FIND_CAFILE + # define CMAKE_CAFILE_FEDORA "/etc/pki/tls/certs/ca-bundle.crt" + else if (cmSystemTools::FileExists(CMAKE_CAFILE_FEDORA, true)) { -- cgit v1.2.3 From b938892551816aedd01fd32b7eb1d5e061afce32 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 16 Sep 2019 23:45:36 +0200 Subject: gnu: go@1.12: Skip flaky GC test. Fixes . * gnu/packages/patches/go-skip-gc-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/golang.scm (go-1.12)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/golang.scm | 6 ++++-- gnu/packages/patches/go-skip-gc-test.patch | 17 +++++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/go-skip-gc-test.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 7f288b3e7c..ce4510ae4a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -911,6 +911,7 @@ dist_patch_DATA = \ %D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \ %D%/packages/patches/gobject-introspection-cc.patch \ %D%/packages/patches/gobject-introspection-girepository.patch \ + %D%/packages/patches/go-skip-gc-test.patch \ %D%/packages/patches/gpm-glibc-2.26.patch \ %D%/packages/patches/gpsbabel-minizip.patch \ %D%/packages/patches/gpsbabel-qstring.patch \ diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index b12fc4b4bd..128e62beef 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner ;;; Copyright © 2016 Matthew Jordan ;;; Copyright © 2016 Andy Wingo -;;; Copyright © 2016 Ludovic Courtès +;;; Copyright © 2016, 2019 Ludovic Courtès ;;; Copyright © 2016, 2017 Petter ;;; Copyright © 2016, 2017, 2019 Leo Famulari ;;; Copyright © 2017 Sergei Trofimovich @@ -41,6 +41,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) #:use-module (guix build-system go) + #:use-module (gnu packages) #:use-module (gnu packages admin) #:use-module (gnu packages gcc) #:use-module (gnu packages base) @@ -408,7 +409,8 @@ in the style of communicating sequential processes (@dfn{CSP}).") name version ".src.tar.gz")) (sha256 (base32 - "04rvwj69gmw3bz8pw5pf10r21ar0pgpnswp15nkddf04dxyl9s4m")))) + "04rvwj69gmw3bz8pw5pf10r21ar0pgpnswp15nkddf04dxyl9s4m")) + (patches (search-patches "go-skip-gc-test.patch")))) (arguments (substitute-keyword-arguments (package-arguments go-1.4) ((#:phases phases) diff --git a/gnu/packages/patches/go-skip-gc-test.patch b/gnu/packages/patches/go-skip-gc-test.patch new file mode 100644 index 0000000000..2baab97580 --- /dev/null +++ b/gnu/packages/patches/go-skip-gc-test.patch @@ -0,0 +1,17 @@ +Skip a GC test known to be flaky: + + https://issues.guix.gnu.org/issue/37425 + https://github.com/golang/go/issues/27636 + +--- go/src/runtime/gc_test.go 2019-09-16 23:10:18.200680387 +0200 ++++ go/src/runtime/gc_test.go 2019-09-16 23:11:50.324360646 +0200 +@@ -27,6 +27,9 @@ func TestGcSys(t *testing.T) { + if runtime.GOOS == "linux" && runtime.GOARCH == "arm64" { + t.Skip("skipping test; GOOS=linux GOARCH=arm64 https://github.com/golang/go/issues/27636") + } ++ if runtime.GOOS == "linux" { ++ t.Skip("skipping test; GOOS=linux https://issues.guix.gnu.org/issue/37425") ++ } + got := runTestProg(t, "testprog", "GCSys") + want := "OK\n" + if got != want { -- cgit v1.2.3 From 2cde4a967d162dc46cc1f6967ed21b196c14c338 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 18 Sep 2019 21:52:18 +0200 Subject: gnu: Add python-jupyter-protocol. * gnu/packages/jupyter.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. --- gnu/local.mk | 1 + gnu/packages/jupyter.scm | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 gnu/packages/jupyter.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 3f32b9cbf2..1aaab0ebf0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -270,6 +270,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/jrnl.scm \ %D%/packages/jose.scm \ %D%/packages/julia.scm \ + %D%/packages/jupyter.scm \ %D%/packages/kawa.scm \ %D%/packages/kde.scm \ %D%/packages/kde-frameworks.scm \ diff --git a/gnu/packages/jupyter.scm b/gnu/packages/jupyter.scm new file mode 100644 index 0000000000..c7c1318808 --- /dev/null +++ b/gnu/packages/jupyter.scm @@ -0,0 +1,57 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019 Ludovic Courtès +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages jupyter) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system python) + #:use-module (gnu packages check) + #:use-module (gnu packages python) + #:use-module (gnu packages python-xyz) + #:use-module (gnu packages time)) + +(define-public python-jupyter-protocol + (package + (name "python-jupyter-protocol") + (version "0.1.1") + (source (origin + (method url-fetch) + (uri (pypi-uri "jupyter_protocol" version)) + (sha256 + (base32 + "1bk3as5yw9y5nmq6l15nr46aby34phmvsx9kxgqnm5pd5q2b5h57")))) + (build-system python-build-system) + (propagated-inputs + `(("python-dateutil" ,python-dateutil) + ("python-jupyter-core" ,python-jupyter-core) + ("python-pyzmq" ,python-pyzmq) + ("python-traitlets" ,python-traitlets))) + (native-inputs + `(("python-ipykernel" ,python-ipykernel) + ("python-ipython" ,python-ipython) + ("python-mock" ,python-mock) + ("python-pytest" ,python-pytest))) + (home-page "https://jupyter.org") + (synopsis "Jupyter protocol implementation") + (description + "This Python library is an experimental implementation of the +@uref{https://jupyter-client.readthedocs.io/en/latest/messaging.html, Jupyter +protocol} to be used by both clients and kernels.") + (license license:bsd-3) + (properties '((upstream-name . "jupyter_protocol"))))) -- cgit v1.2.3 From 52211add0b125be7e8a00bea2b3b030286109022 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Sun, 8 Sep 2019 14:36:33 -0700 Subject: gnu: Move diffoscope and trydiffoscope to new diffoscope.scm. * gnu/packages/package-management (diffoscope): Remove variable. (trydiffoscope): Remove variable. Update copyright information. * gnu/packages/diffoscope.scm: New file. (diffoscope): Add variable. (trydiffoscope): Add variable. * gnu/local.mk [GNU_SYSTEM_MODULES]: Add diffoscope.scm. --- gnu/local.mk | 1 + gnu/packages/diffoscope.scm | 231 ++++++++++++++++++++++++++++++++++++ gnu/packages/package-management.scm | 183 ---------------------------- 3 files changed, 232 insertions(+), 183 deletions(-) create mode 100644 gnu/packages/diffoscope.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 1aaab0ebf0..1062bdcafe 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -143,6 +143,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/dejagnu.scm \ %D%/packages/dico.scm \ %D%/packages/dictionaries.scm \ + %D%/packages/diffoscope.scm \ %D%/packages/digest.scm \ %D%/packages/direct-connect.scm \ %D%/packages/disk.scm \ diff --git a/gnu/packages/diffoscope.scm b/gnu/packages/diffoscope.scm new file mode 100644 index 0000000000..6eb5c1d9fe --- /dev/null +++ b/gnu/packages/diffoscope.scm @@ -0,0 +1,231 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ludovic Courtès +;;; Copyright © 2017 Ricardo Wurmus +;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice +;;; Copyright © 2018 Julien Lepiller +;;; Copyright © 2018, 2019 Rutger Helling +;;; Copyright © 2019 Vagrant Cascadian +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages diffoscope) + #:use-module (gnu packages) + #:use-module (gnu packages acl) + #:use-module (gnu packages admin) + #:use-module (gnu packages backup) + #:use-module (gnu packages base) + #:use-module (gnu packages cdrom) + #:use-module (gnu packages check) + #:use-module (gnu packages compression) + #:use-module (gnu packages cpio) + #:use-module (gnu packages dbm) + #:use-module (gnu packages gettext) + #:use-module (gnu packages ghostscript) + #:use-module (gnu packages gnome) + #:use-module (gnu packages gnupg) + #:use-module (gnu packages haskell) + #:use-module (gnu packages image) + #:use-module (gnu packages imagemagick) + #:use-module (gnu packages java) + #:use-module (gnu packages linux) + #:use-module (gnu packages llvm) + #:use-module (gnu packages mono) + #:use-module (gnu packages package-management) + #:use-module (gnu packages patchutils) + #:use-module (gnu packages pdf) + #:use-module (gnu packages python-web) + #:use-module (gnu packages python-xyz) + #:use-module (gnu packages sqlite) + #:use-module (gnu packages ssh) + #:use-module (gnu packages textutils) + #:use-module (gnu packages video) + #:use-module (gnu packages vim) + #:use-module (guix build-system python) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix utils)) + +(define-public diffoscope + (let ((version "123")) + (package + (name "diffoscope") + (version version) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://salsa.debian.org/reproducible-builds/diffoscope.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "11bxms5rkhi0v4pxx29v4qgvhp3fmf0fkzci6gn5xcv4fl1zy4wj")))) + (build-system python-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + ;; setup.py mistakenly requires python-magic from PyPi, even + ;; though the Python bindings of `file` are sufficient. + ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815844 + (add-after 'unpack 'dependency-on-python-magic + (lambda _ + (substitute* "setup.py" + (("'python-magic',") "")))) + ;; This test is broken because our `file` package has a + ;; bug in berkeley-db file type detection. + (add-after 'unpack 'remove-berkeley-test + (lambda _ + (delete-file "tests/comparators/test_berkeley_db.py") + #t)) + ;; Test is dynamically generated and may have false + ;; negatives with different ocaml versions. Further + ;; background in: https://bugs.debian.org/939386 + (add-after 'unpack 'remove-ocaml-test + (lambda _ + (delete-file "tests/comparators/test_ocaml.py") + #t)) + (add-after 'unpack 'embed-tool-references + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "diffoscope/comparators/utils/compare.py" + (("\\['xxd',") + (string-append "['" (which "xxd") "',"))) + (substitute* "diffoscope/comparators/elf.py" + (("@tool_required\\('readelf'\\)") "") + (("get_tool_name\\('readelf'\\)") + (string-append "'" (which "readelf") "'"))) + (substitute* "diffoscope/comparators/directory.py" + (("@tool_required\\('stat'\\)") "") + (("@tool_required\\('getfacl'\\)") "") + (("\\['stat',") + (string-append "['" (which "stat") "',")) + (("\\['getfacl',") + (string-append "['" (which "getfacl") "',"))) + #t)) + (add-before 'check 'writable-test-data + (lambda _ + ;; tests may need needs write access to tests + ;; directory + (for-each make-file-writable (find-files "tests")) + #t)) + (add-before 'check 'delete-failing-test + (lambda _ + ;; this requires /sbin to be on the path + (delete-file "tests/test_tools.py") + #t))))) + (inputs `(("rpm" ,rpm) ;for rpm-python + ("python-file" ,python-file) + ("python-debian" ,python-debian) + ("python-libarchive-c" ,python-libarchive-c) + ("python-tlsh" ,python-tlsh) + ("acl" ,acl) ;for getfacl + ("colordiff" ,colordiff) + ("xxd" ,xxd))) + ;; Below are modules used for tests. + (native-inputs `(("python-pytest" ,python-pytest) + ("python-chardet" ,python-chardet) + ;; test suite skips tests when tool is missing + ("bdb" ,bdb) + ("binutils" ,binutils) + ("bzip2" ,bzip2) + ("cdrtools" ,cdrtools) + ("colord" ,colord) + ("cpio" ,cpio) + ("docx2txt" ,docx2txt) + ("e2fsprogs" ,e2fsprogs) + ("ffmpeg" ,ffmpeg) + ("gettext" ,gettext-minimal) + ("ghc" ,ghc) + ("ghostscript" ,ghostscript) + ("giflib:bin" ,giflib "bin") + ("gnumeric" ,gnumeric) + ("gnupg" ,gnupg) + ("imagemagick" ,imagemagick) + ("libarchive" ,libarchive) + ("llvm" ,llvm) + ("lz4" ,lz4) + ("mono" ,mono) + ("odt2txt" ,odt2txt) + ;; no unversioned openjdk available + ("openjdk:jdk" ,openjdk12 "jdk") + ("openssh" ,openssh) + ("pgpdump" ,pgpdump) + ("poppler" ,poppler) + ("rpm" ,rpm) + ("sng" ,sng) + ("sqlite" ,sqlite) + ("squashfs-tools" ,squashfs-tools) + ("tcpdump" ,tcpdump) + ("unzip" ,unzip) + ("xxd" ,xxd) + ("xz" ,xz) + ("zip" ,zip))) + (home-page "https://diffoscope.org/") + (synopsis "Compare files, archives, and directories in depth") + (description + "Diffoscope tries to get to the bottom of what makes files or directories +different. It recursively unpacks archives of many kinds and transforms +various binary formats into more human readable forms to compare them. It can +compare two tarballs, ISO images, or PDFs just as easily.") + (license license:gpl3+)))) + +(define-public trydiffoscope + (package + (name "trydiffoscope") + (version "67.0.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://salsa.debian.org/reproducible-builds/trydiffoscope.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "03b66cjii7l2yiwffj6ym6mycd5drx7prfp4j2550281pias6mjh")))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'install 'install-doc + (lambda* (#:key outputs #:allow-other-keys) + (let* ((share (string-append (assoc-ref outputs "out") "/share/"))) + (mkdir-p (string-append share "/man/man1/" )) + (invoke "rst2man.py" + "trydiffoscope.1.rst" + (string-append share "/man/man1/trydiffoscope.1")) + (mkdir-p (string-append share "/doc/" ,name "-" ,version)) + (install-file "./README.rst" + (string-append share "/doc/" ,name "-" ,version))) + #t))))) + (propagated-inputs + `(("python-requests" ,python-requests))) + (native-inputs + `(("gzip" ,gzip) + ("python-docutils" ,python-docutils))) + (build-system python-build-system) + (home-page "https://try.diffoscope.org") + (synopsis "Client for remote diffoscope service") + (description "This is a client for the @url{https://try.diffoscope.org, +remote diffoscope service}. + +Diffoscope tries to get to the bottom of what makes files or directories +different. It recursively unpacks archives of many kinds and transforms +various binary formats into more human readable forms to compare them. It can +compare two tarballs, ISO images, or PDFs just as easily. + +Results are displayed by default, stored as local text or html files, or made +available via a URL on @url{https://try.diffoscope.org}. Results stored on the +server are purged after 30 days.") + (license license:gpl3+))) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index a56c738e78..26f1458028 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -10,7 +10,6 @@ ;;; Copyright © 2018 Sou Bunnbu ;;; Copyright © 2018, 2019 Eric Bavier ;;; Copyright © 2019 Efraim Flashner -;;; Copyright © 2019 Vagrant Cascadian ;;; Copyright © 2019 Jonathan Brielmaier ;;; ;;; This file is part of GNU Guix. @@ -31,7 +30,6 @@ (define-module (gnu packages package-management) #:use-module (gnu packages) #:use-module (gnu packages acl) - #:use-module (gnu packages admin) #:use-module (gnu packages attr) #:use-module (gnu packages avahi) #:use-module (gnu packages autotools) @@ -40,7 +38,6 @@ #:use-module (gnu packages bdw-gc) #:use-module (gnu packages bison) #:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin' - #:use-module (gnu packages cdrom) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages cpio) @@ -50,7 +47,6 @@ #:use-module (gnu packages docbook) #:use-module (gnu packages file) #:use-module (gnu packages gettext) - #:use-module (gnu packages ghostscript) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gnupg) @@ -58,19 +54,12 @@ #:use-module (gnu packages gtk) #:use-module (gnu packages guile) #:use-module (gnu packages guile-xyz) - #:use-module (gnu packages haskell) - #:use-module (gnu packages image) - #:use-module (gnu packages imagemagick) - #:use-module (gnu packages java) #:use-module (gnu packages linux) #:use-module (gnu packages lisp) - #:use-module (gnu packages llvm) #:use-module (gnu packages man) - #:use-module (gnu packages mono) #:use-module (gnu packages nettle) #:use-module (gnu packages nss) #:use-module (gnu packages patchutils) - #:use-module (gnu packages pdf) #:use-module (gnu packages perl) #:use-module (gnu packages perl-check) #:use-module (gnu packages pkg-config) @@ -82,10 +71,8 @@ #:use-module (gnu packages sqlite) #:use-module (gnu packages ssh) #:use-module (gnu packages texinfo) - #:use-module (gnu packages textutils) #:use-module (gnu packages time) #:use-module (gnu packages tls) - #:use-module (gnu packages video) #:use-module (gnu packages vim) #:use-module (gnu packages virtualization) #:use-module (gnu packages web) @@ -558,176 +545,6 @@ transactions from C or Python.") ;; The whole is GPLv2+; librpm itself is dual-licensed LGPLv2+ | GPLv2+. (license license:gpl2+))) -(define-public diffoscope - (let ((version "123")) - (package - (name "diffoscope") - (version version) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://salsa.debian.org/reproducible-builds/diffoscope.git") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "11bxms5rkhi0v4pxx29v4qgvhp3fmf0fkzci6gn5xcv4fl1zy4wj")))) - (build-system python-build-system) - (arguments - `(#:phases (modify-phases %standard-phases - ;; setup.py mistakenly requires python-magic from PyPi, even - ;; though the Python bindings of `file` are sufficient. - ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815844 - (add-after 'unpack 'dependency-on-python-magic - (lambda _ - (substitute* "setup.py" - (("'python-magic',") "")))) - ;; This test is broken because our `file` package has a - ;; bug in berkeley-db file type detection. - (add-after 'unpack 'remove-berkeley-test - (lambda _ - (delete-file "tests/comparators/test_berkeley_db.py") - #t)) - ;; Test is dynamically generated and may have false - ;; negatives with different ocaml versions. Further - ;; background in: https://bugs.debian.org/939386 - (add-after 'unpack 'remove-ocaml-test - (lambda _ - (delete-file "tests/comparators/test_ocaml.py") - #t)) - (add-after 'unpack 'embed-tool-references - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "diffoscope/comparators/utils/compare.py" - (("\\['xxd',") - (string-append "['" (which "xxd") "',"))) - (substitute* "diffoscope/comparators/elf.py" - (("@tool_required\\('readelf'\\)") "") - (("get_tool_name\\('readelf'\\)") - (string-append "'" (which "readelf") "'"))) - (substitute* "diffoscope/comparators/directory.py" - (("@tool_required\\('stat'\\)") "") - (("@tool_required\\('getfacl'\\)") "") - (("\\['stat',") - (string-append "['" (which "stat") "',")) - (("\\['getfacl',") - (string-append "['" (which "getfacl") "',"))) - #t)) - (add-before 'check 'writable-test-data - (lambda _ - ;; tests may need needs write access to tests - ;; directory - (for-each make-file-writable (find-files "tests")) - #t)) - (add-before 'check 'delete-failing-test - (lambda _ - ;; this requires /sbin to be on the path - (delete-file "tests/test_tools.py") - #t))))) - (inputs `(("rpm" ,rpm) ;for rpm-python - ("python-file" ,python-file) - ("python-debian" ,python-debian) - ("python-libarchive-c" ,python-libarchive-c) - ("python-tlsh" ,python-tlsh) - ("acl" ,acl) ;for getfacl - ("colordiff" ,colordiff) - ("xxd" ,xxd))) - ;; Below are modules used for tests. - (native-inputs `(("python-pytest" ,python-pytest) - ("python-chardet" ,python-chardet) - ;; test suite skips tests when tool is missing - ("bdb" ,bdb) - ("binutils" ,binutils) - ("bzip2" ,bzip2) - ("cdrtools" ,cdrtools) - ("colord" ,colord) - ("cpio" ,cpio) - ("docx2txt" ,docx2txt) - ("e2fsprogs" ,e2fsprogs) - ("ffmpeg" ,ffmpeg) - ("gettext" ,gettext-minimal) - ("ghc" ,ghc) - ("ghostscript" ,ghostscript) - ("giflib:bin" ,giflib "bin") - ("gnumeric" ,gnumeric) - ("gnupg" ,gnupg) - ("imagemagick" ,imagemagick) - ("libarchive" ,libarchive) - ("llvm" ,llvm) - ("lz4" ,lz4) - ("mono" ,mono) - ("odt2txt" ,odt2txt) - ;; no unversioned openjdk available - ("openjdk:jdk" ,openjdk12 "jdk") - ("openssh" ,openssh) - ("pgpdump" ,pgpdump) - ("poppler" ,poppler) - ("rpm" ,rpm) - ("sng" ,sng) - ("sqlite" ,sqlite) - ("squashfs-tools" ,squashfs-tools) - ("tcpdump" ,tcpdump) - ("unzip" ,unzip) - ("xxd" ,xxd) - ("xz" ,xz) - ("zip" ,(@ (gnu packages compression) zip)))) - (home-page "https://diffoscope.org/") - (synopsis "Compare files, archives, and directories in depth") - (description - "Diffoscope tries to get to the bottom of what makes files or directories -different. It recursively unpacks archives of many kinds and transforms -various binary formats into more human readable forms to compare them. It can -compare two tarballs, ISO images, or PDFs just as easily.") - (license license:gpl3+)))) - -(define-public trydiffoscope - (package - (name "trydiffoscope") - (version "67.0.1") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://salsa.debian.org/reproducible-builds/trydiffoscope.git") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "03b66cjii7l2yiwffj6ym6mycd5drx7prfp4j2550281pias6mjh")))) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'install 'install-doc - (lambda* (#:key outputs #:allow-other-keys) - (let* ((share (string-append (assoc-ref outputs "out") "/share/"))) - (mkdir-p (string-append share "/man/man1/" )) - (invoke "rst2man.py" - "trydiffoscope.1.rst" - (string-append share "/man/man1/trydiffoscope.1")) - (mkdir-p (string-append share "/doc/" ,name "-" ,version)) - (install-file "./README.rst" - (string-append share "/doc/" ,name "-" ,version))) - #t))))) - (propagated-inputs - `(("python-requests" ,python-requests))) - (native-inputs - `(("gzip" ,gzip) - ("python-docutils" ,python-docutils))) - (build-system python-build-system) - (home-page "https://try.diffoscope.org") - (synopsis "Client for remote diffoscope service") - (description "This is a client for the @url{https://try.diffoscope.org, -remote diffoscope service}. - -Diffoscope tries to get to the bottom of what makes files or directories -different. It recursively unpacks archives of many kinds and transforms -various binary formats into more human readable forms to compare them. It can -compare two tarballs, ISO images, or PDFs just as easily. - -Results are displayed by default, stored as local text or html files, or made -available via a URL on @url{https://try.diffoscope.org}. Results stored on the -server are purged after 30 days.") - (license license:gpl3+))) - (define-public python-anaconda-client (package (name "python-anaconda-client") -- cgit v1.2.3 From 68620d62f5cd49d6455c351f3a68e3c41dc6ce22 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Thu, 19 Sep 2019 16:43:47 -0700 Subject: gnu: Add enjarify. * gnu/packages/android (enjarify): New variable. * gnu/packages/diffoscope (diffoscope)[native-inputs]: Add enjarify. [arguments]: add enjarify to add-known-tools phase. * gnu/packages/patches/enjarify-setup-py.patch: New file. * gnu/local.mk: Add enjarify-setup-py.patch. --- gnu/local.mk | 1 + gnu/packages/android.scm | 58 ++++++++++++++++++++++++++++ gnu/packages/diffoscope.scm | 4 ++ gnu/packages/patches/enjarify-setup-py.patch | 19 +++++++++ 4 files changed, 82 insertions(+) create mode 100644 gnu/packages/patches/enjarify-setup-py.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 1062bdcafe..ad85894ebe 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -796,6 +796,7 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-undohist-ignored.patch \ %D%/packages/patches/emacs-wordnut-require-adaptive-wrap.patch \ %D%/packages/patches/emacs-zones-called-interactively.patch \ + %D%/packages/patches/enjarify-setup-py.patch \ %D%/packages/patches/enlightenment-fix-setuid-path.patch \ %D%/packages/patches/erlang-man-path.patch \ %D%/packages/patches/eudev-rules-directory.patch \ diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm index 56d5edaa75..8eb5182f51 100644 --- a/gnu/packages/android.scm +++ b/gnu/packages/android.scm @@ -39,6 +39,7 @@ #:use-module (gnu packages compression) #:use-module (gnu packages docker) #:use-module (gnu packages gnupg) + #:use-module (gnu packages java) #:use-module (gnu packages linux) #:use-module (gnu packages pcre) #:use-module (gnu packages python) @@ -934,3 +935,60 @@ these same tools to create your own additional or alternative repository for publishing, or to assist in creating, testing and submitting metadata to the main repository.") (license license:agpl3+))) + +(define-public enjarify + (package + (name "enjarify") + (version "1.0.3") + (home-page "https://github.com/Storyyeller/enjarify") + (source + (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit version))) + (file-name (git-file-name name version)) + (patches + (search-patches "enjarify-setup-py.patch")) + (sha256 + (base32 + "1nam7h1g4f1h6jla4qcjjagnyvd24dv6d5445w04q8hx07nxdapk")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'enjarify-wrapper-inherit-pythonpath + ;; enjarify sets PYTHONPATH from a shell script, overwriting + ;; PYTHONPATH set from guix. Comment out this line. + (lambda _ + (substitute* "enjarify.sh" + (("export PYTHONPATH") "# export PYTHONPATH")) + #t)) + (add-before 'check 'fixup-expected-test-results + ;; Upstream adjusted this test in commit: + ;; 3ae884a6485af82d300515813f537685b08dd800 + (lambda _ + (substitute* "tests/test2/expected.txt" + (("^20") "0")) + #t)) + (add-before 'check 'drop-java-xss-argument + ;; Upstream removed this argument in order to support 32-bit + ;; architectures. commit: 4be0111d879aa95fdc0d9f24fe529f8c664d4093 + (lambda _ + (substitute* "enjarify/runtests.py" + (("java -Xss515m") "java ")) + #t)) + (add-after 'install 'install-enjarify-wrapper + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (mkdir-p (string-append out "/bin/")) + (copy-file "enjarify.sh" (string-append out "/bin/enjarify")) + #t)))))) + (native-inputs `(("openjdk:jdk" ,openjdk12 "jdk"))) + (synopsis "Translate Dalvik bytecode to equivalent Java bytecode") + (description "Android applications are Java programs that run on a +customized virtual machine, which is part of the Android operating system, the +Dalvik VM. Their bytecode differs from the bytecode of normal Java +applications. Enjarify can translate the Dalvik bytecode back to equivalent +Java bytecode, which simplifies the analysis of Android applications.") + (license license:asl2.0))) diff --git a/gnu/packages/diffoscope.scm b/gnu/packages/diffoscope.scm index fff331ac13..8df5a9cc0e 100644 --- a/gnu/packages/diffoscope.scm +++ b/gnu/packages/diffoscope.scm @@ -92,6 +92,9 @@ ;; Patch in support for known tools (add-after 'unpack 'add-known-tools (lambda _ + (substitute* "diffoscope/external_tools.py" + (("'arch': 'enjarify'},") + "'arch': 'enjarify', 'guix': 'enjarify'},")) (substitute* "diffoscope/external_tools.py" (("'arch': 'python-jsbeautifier'},") "'arch': 'python-jsbeautifier', 'guix': 'python-jsbeautifier'},")) @@ -172,6 +175,7 @@ ("docx2txt" ,docx2txt) ("dtc" ,dtc) ("e2fsprogs" ,e2fsprogs) + ("enjarify" ,enjarify) ("ffmpeg" ,ffmpeg) ("gettext" ,gettext-minimal) ("ghc" ,ghc) diff --git a/gnu/packages/patches/enjarify-setup-py.patch b/gnu/packages/patches/enjarify-setup-py.patch new file mode 100644 index 0000000000..4b382ca320 --- /dev/null +++ b/gnu/packages/patches/enjarify-setup-py.patch @@ -0,0 +1,19 @@ +Author: Reiner Herrmann +Origin: https://salsa.debian.org/android-tools-team/enjarify/blob/master/debian/patches/setup_py.patch +Description: provides a minimal setup.py to build/install the package + +Index: enjarify/setup.py +=================================================================== +--- /dev/null ++++ enjarify/setup.py +@@ -0,0 +1,10 @@ ++#!/usr/bin/env python3 ++ ++from setuptools import setup, find_packages ++ ++setup(name='enjarify', ++ version='1.0.3', ++ url='https://github.com/google/enjarify', ++ packages=find_packages(), ++ ) ++ -- cgit v1.2.3 From dc95c8b4975b097f68e21544bead2a051e86b016 Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Tue, 10 Sep 2019 05:57:47 +0200 Subject: gnu: emacs-unpackaged-el: Update to 0-2.c0d58cf. * gnu/packages/emacs-xyz.scm (emacs-unpackaged-el): Update to 0-2.c0d58cf. * gnu/packages/patches/emacs-unpackaged-req.patch: Delete it. * gnu/local.mk (dist_patch_DATA): Remove patch. --- gnu/local.mk | 1 - gnu/packages/emacs-xyz.scm | 16 +++++++++++----- gnu/packages/patches/emacs-unpackaged-req.patch | 24 ------------------------ 3 files changed, 11 insertions(+), 30 deletions(-) delete mode 100644 gnu/packages/patches/emacs-unpackaged-req.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index ad85894ebe..8e535e208b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -792,7 +792,6 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-highlight-stages-add-gexp.patch \ %D%/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch \ %D%/packages/patches/emacs-source-date-epoch.patch \ - %D%/packages/patches/emacs-unpackaged-req.patch \ %D%/packages/patches/emacs-undohist-ignored.patch \ %D%/packages/patches/emacs-wordnut-require-adaptive-wrap.patch \ %D%/packages/patches/emacs-zones-called-interactively.patch \ diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index e30d3cea71..f0e86016e7 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -614,8 +614,8 @@ from within Emacs.") (license license:gpl3+))) (define-public emacs-unpackaged-el - (let ((commit "f4df7f8dfea715e893b2223adda32545803f5cce") - (revision "1")) + (let ((commit "c0d58cf81e531b2b6fa1bd5dd612dc1b93d4d186") + (revision "2")) (package (name "emacs-unpackaged-el") (version (git-version "0" revision commit)) @@ -628,9 +628,7 @@ from within Emacs.") (file-name (git-file-name name version)) (sha256 (base32 - "1yf3zrgqfhnr0az8gn1kqqwnhfi3nc0vbjkcagwcqwk3sp1jda86")) - (patches - (search-patches "emacs-unpackaged-req.patch")))) + "0y3sgvd51l4pb3acps92bazfk49da6nim1f1hyxzy1ravg4kbw83")))) (build-system emacs-build-system) (propagated-inputs `(("emacs-dash" ,emacs-dash) @@ -638,6 +636,14 @@ from within Emacs.") ("emacs-s" ,emacs-s) ("emacs-hydra" ,emacs-hydra) ("emacs-use-package" ,emacs-use-package))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'require-hydra + (lambda _ + (substitute* "unpackaged.el" + ((";;; Code:") ";;; Code:\n(require 'hydra)")) + #t))))) (home-page "https://github.com/alphapapa/unpackaged.el") (synopsis "Useful snippets of Emacs Lisp code") (description "This package provides Emacs Lisp utilities for a variety diff --git a/gnu/packages/patches/emacs-unpackaged-req.patch b/gnu/packages/patches/emacs-unpackaged-req.patch deleted file mode 100644 index ddb9277610..0000000000 --- a/gnu/packages/patches/emacs-unpackaged-req.patch +++ /dev/null @@ -1,24 +0,0 @@ -From e5be173e201710538464c279335bef735a327a68 Mon Sep 17 00:00:00 2001 -From: Brian Leung -Date: Tue, 18 Jun 2019 06:37:46 +0200 -Subject: [PATCH] Add missing require. - ---- - unpackaged.el | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/unpackaged.el b/unpackaged.el -index 2d46b3c..e62184a 100644 ---- a/unpackaged.el -+++ b/unpackaged.el -@@ -38,6 +38,7 @@ - (require 'dash) - (require 's) - (require 'use-package) -+(require 'hydra) - - ;;; Faces, fonts - --- -2.22.0 - -- cgit v1.2.3 From 3a2efbc8670f72a524cc7290e11559cdb42852a4 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 20 Sep 2019 12:21:19 +0200 Subject: gnu: python-libxml2, itstool: Provide crash-free variants. Fixes . * gnu/packages/patches/python-libxml2-utf8.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/xml.scm (python-libxml2/fixed): New variable. * gnu/packages/glib.scm (itstool/fixed): New variable. * gnu/packages/gnome.scm (gnumeric)[native-inputs]: Use ITSTOOL/FIXED instead of ITSTOOL. --- gnu/local.mk | 1 + gnu/packages/glib.scm | 11 +++++++ gnu/packages/gnome.scm | 2 +- gnu/packages/patches/python-libxml2-utf8.patch | 40 ++++++++++++++++++++++++++ gnu/packages/xml.scm | 15 +++++++++- 5 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/python-libxml2-utf8.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 63d55c5018..5705494090 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1252,6 +1252,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-keras-integration-test.patch \ %D%/packages/patches/python-pyfakefs-remove-bad-test.patch \ %D%/packages/patches/python-flint-includes.patch \ + %D%/packages/patches/python-libxml2-utf8.patch \ %D%/packages/patches/python-mox3-python3.6-compat.patch \ %D%/packages/patches/python-testtools.patch \ %D%/packages/patches/python-paste-remove-timing-test.patch \ diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index ad000ad838..a2f0f2fd8e 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -65,6 +65,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (srfi srfi-1) ;; Export variables up-front to allow circular dependency with the 'xorg' ;; module. @@ -495,6 +496,16 @@ information in their documents, such as whether a particular element should be translated.") (license license:gpl3+))) +(define-public itstool/fixed + ;; This variant fixes a python-libxml2 crash when processing UTF-8 + ;; sequences: . Since the issue is quite rare, + ;; create this variant here to avoid a full rebuild. + (package/inherit + itstool + (inputs + `(("python-libxml2" ,python-libxml2/fixed) + ,@(alist-delete "python-libxml2" (package-inputs itstool)))))) + (define dbus-glib (package (name "dbus-glib") diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 520d04d75f..03550b6fa8 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -2167,7 +2167,7 @@ Hints specification (EWMH).") `(("bison" ,bison) ("docbook-xml" ,docbook-xml) ("intltool" ,intltool) - ("itstool" ,itstool) + ("itstool" ,itstool/fixed) ;see ("glib:bin" ,glib "bin") ("pkg-config" ,pkg-config))) (home-page "http://www.gnumeric.org") diff --git a/gnu/packages/patches/python-libxml2-utf8.patch b/gnu/packages/patches/python-libxml2-utf8.patch new file mode 100644 index 0000000000..e39672faa1 --- /dev/null +++ b/gnu/packages/patches/python-libxml2-utf8.patch @@ -0,0 +1,40 @@ +This patch fixes a crash in the libxml2 bindings for Python 3.x +that 'itstool' stumbles upon when processing UTF-8 data: + + https://issues.guix.gnu.org/issue/37468 + +Patch by Jan Matejek +from . + +--- libxml2-2.9.5.orig/python/libxml.c ++++ libxml2-2.9.5/python/libxml.c +@@ -1620,6 +1620,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU + PyObject *message; + PyObject *result; + char str[1000]; ++ unsigned char *ptr = (unsigned char *)str; + + #ifdef DEBUG_ERROR + printf("libxml_xmlErrorFuncHandler(%p, %s, ...) called\n", ctx, msg); +@@ -1636,12 +1637,20 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU + str[999] = 0; + va_end(ap); + ++#if PY_MAJOR_VERSION >= 3 ++ /* Ensure the error string doesn't start at UTF8 continuation. */ ++ while (*ptr && (*ptr & 0xc0) == 0x80) ++ ptr++; ++#endif ++ + list = PyTuple_New(2); + PyTuple_SetItem(list, 0, libxml_xmlPythonErrorFuncCtxt); + Py_XINCREF(libxml_xmlPythonErrorFuncCtxt); +- message = libxml_charPtrConstWrap(str); ++ message = libxml_charPtrConstWrap(ptr); + PyTuple_SetItem(list, 1, message); + result = PyEval_CallObject(libxml_xmlPythonErrorFuncHandler, list); ++ /* Forget any errors caused in the error handler. */ ++ PyErr_Clear(); + Py_XDECREF(list); + Py_XDECREF(result); + } diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 78b9b713e5..b8f3774039 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2018 Ludovic Courtès +;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2019 Ludovic Courtès ;;; Copyright © 2013, 2015 Andreas Enge ;;; Copyright © 2015 Eric Bavier ;;; Copyright © 2015 Sou Bunnbu @@ -164,6 +164,7 @@ project (but it is usable outside of the Gnome platform).") (license license:x11))) (define-public python-libxml2 + ;; TODO: Merge with 'python-libxml2/fixed' on the next rebuild cycle. (package/inherit libxml2 (name "python-libxml2") (build-system python-build-system) @@ -191,6 +192,18 @@ project (but it is usable outside of the Gnome platform).") (inputs `(("libxml2" ,libxml2))) (synopsis "Python bindings for the libxml2 library"))) +(define-public python-libxml2/fixed + ;; This variant fixes a crash when processing UTF-8 sequences: + ;; + ;; TODO: Merge with 'python-libxml2' on the next rebuild cycle. + (package/inherit + python-libxml2 + (version (string-append (package-version python-libxml2) "-1")) + (source (origin + (inherit (package-source libxml2)) + (patches (cons (search-patch "python-libxml2-utf8.patch") + (origin-patches (package-source libxml2)))))))) + (define-public python2-libxml2 (package-with-python2 python-libxml2)) -- cgit v1.2.3 From 3f55b7be16c52a298b8b8d79f199119944784ca3 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 23 Sep 2019 22:15:54 +0200 Subject: gnu: glm: Update to 0.9.9.6. * gnu/packages/maths.scm (glm): Update to 0.9.9.6. [source]: Add patch. * gnu/packages/patches/glm-restore-install-target.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/maths.scm | 6 +- .../patches/glm-restore-install-target.patch | 574 +++++++++++++++++++++ 3 files changed, 578 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/glm-restore-install-target.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 8e535e208b..043469b716 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -895,6 +895,7 @@ dist_patch_DATA = \ %D%/packages/patches/glibc-versioned-locpath.patch \ %D%/packages/patches/glibc-2.27-git-fixes.patch \ %D%/packages/patches/glibc-2.28-git-fixes.patch \ + %D%/packages/patches/glm-restore-install-target.patch \ %D%/packages/patches/glusterfs-use-PATH-instead-of-hardcodes.patch \ %D%/packages/patches/gmp-arm-asm-nothumb.patch \ %D%/packages/patches/gmp-faulty-test.patch \ diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 47026ec41b..2e0883a724 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -3543,15 +3543,15 @@ Failure to do so will result in a library with poor performance.") (define-public glm (package (name "glm") - (version "0.9.9.5") + (version "0.9.9.6") (source (origin (method url-fetch) (uri (string-append "https://github.com/g-truc/glm/releases/download/" version "/glm-" version ".zip")) (sha256 - (base32 - "1vmg7hb4xvsa77zpbwiw6lqc7pyaj56dihx6xriny5b9rrh4iqsg")))) + (base32 "1l0pi1qi37mk6s0yrkrw07lspv4gcqnr9ryg3521hrl77ff37dwx")) + (patches (search-patches "glm-restore-install-target.patch")))) (build-system cmake-build-system) (native-inputs `(("unzip" ,unzip))) diff --git a/gnu/packages/patches/glm-restore-install-target.patch b/gnu/packages/patches/glm-restore-install-target.patch new file mode 100644 index 0000000000..a628030f6f --- /dev/null +++ b/gnu/packages/patches/glm-restore-install-target.patch @@ -0,0 +1,574 @@ +From: Tobias Geerinckx-Rice +Date: Mon, 23 Sep 2019 22:01:17 +0200 +Subject: [PATCH] gnu: glm: Restore ‘install’ target. + +It was removed in 0.9.9.6, making installation a tedious manual process +for no clear reason[0]. Restore it for now. + +[0]: https://github.com/g-truc/glm/issues/947 + +diff -Naur glm/cmake/CMakePackageConfigHelpers.cmake glmn/cmake/CMakePackageConfigHelpers.cmake +--- glm/cmake/CMakePackageConfigHelpers.cmake 1970-01-01 01:00:00.000000000 +0100 ++++ glmn/cmake/CMakePackageConfigHelpers.cmake 2019-09-23 00:11:21.418152249 +0200 +@@ -0,0 +1,227 @@ ++# - CONFIGURE_PACKAGE_CONFIG_FILE(), WRITE_BASIC_PACKAGE_VERSION_FILE() ++# ++# CONFIGURE_PACKAGE_CONFIG_FILE( INSTALL_DESTINATION ++# [PATH_VARS ... ] ++# [NO_SET_AND_CHECK_MACRO] ++# [NO_CHECK_REQUIRED_COMPONENTS_MACRO]) ++# ++# CONFIGURE_PACKAGE_CONFIG_FILE() should be used instead of the plain ++# CONFIGURE_FILE() command when creating the Config.cmake or -config.cmake ++# file for installing a project or library. It helps making the resulting package ++# relocatable by avoiding hardcoded paths in the installed Config.cmake file. ++# ++# In a FooConfig.cmake file there may be code like this to make the ++# install destinations know to the using project: ++# set(FOO_INCLUDE_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@" ) ++# set(FOO_DATA_DIR "@CMAKE_INSTALL_PREFIX@/@RELATIVE_DATA_INSTALL_DIR@" ) ++# set(FOO_ICONS_DIR "@CMAKE_INSTALL_PREFIX@/share/icons" ) ++# ...logic to determine installedPrefix from the own location... ++# set(FOO_CONFIG_DIR "${installedPrefix}/@CONFIG_INSTALL_DIR@" ) ++# All 4 options shown above are not sufficient, since the first 3 hardcode ++# the absolute directory locations, and the 4th case works only if the logic ++# to determine the installedPrefix is correct, and if CONFIG_INSTALL_DIR contains ++# a relative path, which in general cannot be guaranteed. ++# This has the effect that the resulting FooConfig.cmake file would work poorly ++# under Windows and OSX, where users are used to choose the install location ++# of a binary package at install time, independent from how CMAKE_INSTALL_PREFIX ++# was set at build/cmake time. ++# ++# Using CONFIGURE_PACKAGE_CONFIG_FILE() helps. If used correctly, it makes the ++# resulting FooConfig.cmake file relocatable. ++# Usage: ++# 1. write a FooConfig.cmake.in file as you are used to ++# 2. insert a line containing only the string "@PACKAGE_INIT@" ++# 3. instead of SET(FOO_DIR "@SOME_INSTALL_DIR@"), use SET(FOO_DIR "@PACKAGE_SOME_INSTALL_DIR@") ++# (this must be after the @PACKAGE_INIT@ line) ++# 4. instead of using the normal CONFIGURE_FILE(), use CONFIGURE_PACKAGE_CONFIG_FILE() ++# ++# The and arguments are the input and output file, the same way ++# as in CONFIGURE_FILE(). ++# ++# The given to INSTALL_DESTINATION must be the destination where the FooConfig.cmake ++# file will be installed to. This can either be a relative or absolute path, both work. ++# ++# The variables to given as PATH_VARS are the variables which contain ++# install destinations. For each of them the macro will create a helper variable ++# PACKAGE_. These helper variables must be used ++# in the FooConfig.cmake.in file for setting the installed location. They are calculated ++# by CONFIGURE_PACKAGE_CONFIG_FILE() so that they are always relative to the ++# installed location of the package. This works both for relative and also for absolute locations. ++# For absolute locations it works only if the absolute location is a subdirectory ++# of CMAKE_INSTALL_PREFIX. ++# ++# By default configure_package_config_file() also generates two helper macros, ++# set_and_check() and check_required_components() into the FooConfig.cmake file. ++# ++# set_and_check() should be used instead of the normal set() ++# command for setting directories and file locations. Additionally to setting the ++# variable it also checks that the referenced file or directory actually exists ++# and fails with a FATAL_ERROR otherwise. This makes sure that the created ++# FooConfig.cmake file does not contain wrong references. ++# When using the NO_SET_AND_CHECK_MACRO, this macro is not generated into the ++# FooConfig.cmake file. ++# ++# check_required_components() should be called at the end of the ++# FooConfig.cmake file if the package supports components. ++# This macro checks whether all requested, non-optional components have been found, ++# and if this is not the case, sets the Foo_FOUND variable to FALSE, so that the package ++# is considered to be not found. ++# It does that by testing the Foo__FOUND variables for all requested ++# required components. ++# When using the NO_CHECK_REQUIRED_COMPONENTS option, this macro is not generated ++# into the FooConfig.cmake file. ++# ++# For an example see below the documentation for WRITE_BASIC_PACKAGE_VERSION_FILE(). ++# ++# ++# WRITE_BASIC_PACKAGE_VERSION_FILE( filename VERSION major.minor.patch COMPATIBILITY (AnyNewerVersion|SameMajorVersion|ExactVersion) ) ++# ++# Writes a file for use as ConfigVersion.cmake file to . ++# See the documentation of FIND_PACKAGE() for details on this. ++# filename is the output filename, it should be in the build tree. ++# major.minor.patch is the version number of the project to be installed ++# The COMPATIBILITY mode AnyNewerVersion means that the installed package version ++# will be considered compatible if it is newer or exactly the same as the requested version. ++# This mode should be used for packages which are fully backward compatible, ++# also across major versions. ++# If SameMajorVersion is used instead, then the behaviour differs from AnyNewerVersion ++# in that the major version number must be the same as requested, e.g. version 2.0 will ++# not be considered compatible if 1.0 is requested. ++# This mode should be used for packages which guarantee backward compatibility within the ++# same major version. ++# If ExactVersion is used, then the package is only considered compatible if the requested ++# version matches exactly its own version number (not considering the tweak version). ++# For example, version 1.2.3 of a package is only considered compatible to requested version 1.2.3. ++# This mode is for packages without compatibility guarantees. ++# If your project has more elaborated version matching rules, you will need to write your ++# own custom ConfigVersion.cmake file instead of using this macro. ++# ++# Internally, this macro executes configure_file() to create the resulting ++# version file. Depending on the COMPATIBILITY, either the file ++# BasicConfigVersion-SameMajorVersion.cmake.in or BasicConfigVersion-AnyNewerVersion.cmake.in ++# is used. Please note that these two files are internal to CMake and you should ++# not call configure_file() on them yourself, but they can be used as starting ++# point to create more sophisticted custom ConfigVersion.cmake files. ++# ++# ++# Example using both configure_package_config_file() and write_basic_package_version_file(): ++# CMakeLists.txt: ++# set(INCLUDE_INSTALL_DIR include/ ... CACHE ) ++# set(LIB_INSTALL_DIR lib/ ... CACHE ) ++# set(SYSCONFIG_INSTALL_DIR etc/foo/ ... CACHE ) ++# ... ++# include(CMakePackageConfigHelpers) ++# configure_package_config_file(FooConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake ++# INSTALL_DESTINATION ${LIB_INSTALL_DIR}/Foo/cmake ++# PATH_VARS INCLUDE_INSTALL_DIR SYSCONFIG_INSTALL_DIR) ++# write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake ++# VERSION 1.2.3 ++# COMPATIBILITY SameMajorVersion ) ++# install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake ++# DESTINATION ${LIB_INSTALL_DIR}/Foo/cmake ) ++# ++# With a FooConfig.cmake.in: ++# set(FOO_VERSION x.y.z) ++# ... ++# @PACKAGE_INIT@ ++# ... ++# set_and_check(FOO_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") ++# set_and_check(FOO_SYSCONFIG_DIR "@PACKAGE_SYSCONFIG_INSTALL_DIR@") ++# ++# check_required_components(Foo) ++ ++ ++#============================================================================= ++# Copyright 2012 Alexander Neundorf ++# ++# Distributed under the OSI-approved BSD License (the "License"); ++# see accompanying file Copyright.txt for details. ++# ++# This software is distributed WITHOUT ANY WARRANTY; without even the ++# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ++# See the License for more information. ++#============================================================================= ++# (To distribute this file outside of CMake, substitute the full ++# License text for the above reference.) ++ ++include(CMakeParseArguments) ++ ++include(WriteBasicConfigVersionFile) ++ ++macro(WRITE_BASIC_PACKAGE_VERSION_FILE) ++ write_basic_config_version_file(${ARGN}) ++endmacro() ++ ++ ++function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile) ++ set(options NO_SET_AND_CHECK_MACRO NO_CHECK_REQUIRED_COMPONENTS_MACRO) ++ set(oneValueArgs INSTALL_DESTINATION ) ++ set(multiValueArgs PATH_VARS ) ++ ++ cmake_parse_arguments(CCF "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) ++ ++ if(CCF_UNPARSED_ARGUMENTS) ++ message(FATAL_ERROR "Unknown keywords given to CONFIGURE_PACKAGE_CONFIG_FILE(): \"${CCF_UNPARSED_ARGUMENTS}\"") ++ endif() ++ ++ if(NOT CCF_INSTALL_DESTINATION) ++ message(FATAL_ERROR "No INSTALL_DESTINATION given to CONFIGURE_PACKAGE_CONFIG_FILE()") ++ endif() ++ ++ if(IS_ABSOLUTE "${CCF_INSTALL_DESTINATION}") ++ set(absInstallDir "${CCF_INSTALL_DESTINATION}") ++ else() ++ set(absInstallDir "${CMAKE_INSTALL_PREFIX}/${CCF_INSTALL_DESTINATION}") ++ endif() ++ file(RELATIVE_PATH PACKAGE_RELATIVE_PATH "${absInstallDir}" "${CMAKE_INSTALL_PREFIX}" ) ++ ++ foreach(var ${CCF_PATH_VARS}) ++ if(NOT DEFINED ${var}) ++ message(FATAL_ERROR "Variable ${var} does not exist") ++ else() ++ if(IS_ABSOLUTE "${${var}}") ++ string(REPLACE "${CMAKE_INSTALL_PREFIX}" "\${PACKAGE_PREFIX_DIR}" ++ PACKAGE_${var} "${${var}}") ++ else() ++ set(PACKAGE_${var} "\${PACKAGE_PREFIX_DIR}/${${var}}") ++ endif() ++ endif() ++ endforeach() ++ ++ set(PACKAGE_INIT " ++####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() ####### ++get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/${PACKAGE_RELATIVE_PATH}\" ABSOLUTE) ++") ++ ++ if(NOT CCF_NO_SET_AND_CHECK_MACRO) ++ set(PACKAGE_INIT "${PACKAGE_INIT} ++macro(set_and_check _var _file) ++ set(\${_var} \"\${_file}\") ++ if(NOT EXISTS \"\${_file}\") ++ message(FATAL_ERROR \"File or directory \${_file} referenced by variable \${_var} does not exist !\") ++ endif() ++endmacro() ++") ++ endif() ++ ++ ++ if(NOT CCF_NO_CHECK_REQUIRED_COMPONENTS_MACRO) ++ set(PACKAGE_INIT "${PACKAGE_INIT} ++macro(check_required_components _NAME) ++ foreach(comp \${\${_NAME}_FIND_COMPONENTS}) ++ if(NOT \${_NAME}_\${comp}_FOUND) ++ if(\${_NAME}_FIND_REQUIRED_\${comp}) ++ set(\${_NAME}_FOUND FALSE) ++ endif() ++ endif() ++ endforeach(comp) ++endmacro() ++") ++ endif() ++ ++ set(PACKAGE_INIT "${PACKAGE_INIT} ++####################################################################################") ++ ++ configure_file("${_inputFile}" "${_outputFile}" @ONLY) ++ ++endfunction() +diff -Naur glm/cmake/glmBuildConfig.cmake.in glmn/cmake/glmBuildConfig.cmake.in +--- glm/cmake/glmBuildConfig.cmake.in 1970-01-01 01:00:00.000000000 +0100 ++++ glmn/cmake/glmBuildConfig.cmake.in 2019-09-23 00:12:08.090955650 +0200 +@@ -0,0 +1,6 @@ ++set(GLM_VERSION "@GLM_VERSION@") ++set(GLM_INCLUDE_DIRS "@CMAKE_CURRENT_SOURCE_DIR@") ++ ++if (NOT CMAKE_VERSION VERSION_LESS "3.0") ++ include("${CMAKE_CURRENT_LIST_DIR}/glmTargets.cmake") ++endif() +diff -Naur glm/cmake/glmConfig.cmake.in glmn/cmake/glmConfig.cmake.in +--- glm/cmake/glmConfig.cmake.in 1970-01-01 01:00:00.000000000 +0100 ++++ glmn/cmake/glmConfig.cmake.in 2019-09-23 00:12:14.566373412 +0200 +@@ -0,0 +1,9 @@ ++set(GLM_VERSION "@GLM_VERSION@") ++ ++@PACKAGE_INIT@ ++ ++set_and_check(GLM_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") ++ ++if (NOT CMAKE_VERSION VERSION_LESS "3.0") ++ include("${CMAKE_CURRENT_LIST_DIR}/glmTargets.cmake") ++endif() +diff -Naur glm/cmake/glm.pc.in glmn/cmake/glm.pc.in +--- glm/cmake/glm.pc.in 1970-01-01 01:00:00.000000000 +0100 ++++ glmn/cmake/glm.pc.in 2019-09-23 00:11:59.695710511 +0200 +@@ -0,0 +1,7 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++includedir=${prefix}/include ++ ++Name: GLM ++Description: OpenGL Mathematics ++Version: @GLM_VERSION@ ++Cflags: -I${includedir} +diff -Naur glm/cmake/GNUInstallDirs.cmake glmn/cmake/GNUInstallDirs.cmake +--- glm/cmake/GNUInstallDirs.cmake 1970-01-01 01:00:00.000000000 +0100 ++++ glmn/cmake/GNUInstallDirs.cmake 2019-09-23 00:11:47.363819337 +0200 +@@ -0,0 +1,188 @@ ++# - Define GNU standard installation directories ++# Provides install directory variables as defined for GNU software: ++# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html ++# Inclusion of this module defines the following variables: ++# CMAKE_INSTALL_ - destination for files of a given type ++# CMAKE_INSTALL_FULL_ - corresponding absolute path ++# where is one of: ++# BINDIR - user executables (bin) ++# SBINDIR - system admin executables (sbin) ++# LIBEXECDIR - program executables (libexec) ++# SYSCONFDIR - read-only single-machine data (etc) ++# SHAREDSTATEDIR - modifiable architecture-independent data (com) ++# LOCALSTATEDIR - modifiable single-machine data (var) ++# LIBDIR - object code libraries (lib or lib64 or lib/ on Debian) ++# INCLUDEDIR - C header files (include) ++# OLDINCLUDEDIR - C header files for non-gcc (/usr/include) ++# DATAROOTDIR - read-only architecture-independent data root (share) ++# DATADIR - read-only architecture-independent data (DATAROOTDIR) ++# INFODIR - info documentation (DATAROOTDIR/info) ++# LOCALEDIR - locale-dependent data (DATAROOTDIR/locale) ++# MANDIR - man documentation (DATAROOTDIR/man) ++# DOCDIR - documentation root (DATAROOTDIR/doc/PROJECT_NAME) ++# Each CMAKE_INSTALL_ value may be passed to the DESTINATION options of ++# install() commands for the corresponding file type. If the includer does ++# not define a value the above-shown default will be used and the value will ++# appear in the cache for editing by the user. ++# Each CMAKE_INSTALL_FULL_ value contains an absolute path constructed ++# from the corresponding destination by prepending (if necessary) the value ++# of CMAKE_INSTALL_PREFIX. ++ ++#============================================================================= ++# Copyright 2011 Nikita Krupen'ko ++# Copyright 2011 Kitware, Inc. ++# ++# Distributed under the OSI-approved BSD License (the "License"); ++# see accompanying file Copyright.txt for details. ++# ++# This software is distributed WITHOUT ANY WARRANTY; without even the ++# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ++# See the License for more information. ++#============================================================================= ++# (To distribute this file outside of CMake, substitute the full ++# License text for the above reference.) ++ ++# Installation directories ++# ++if(NOT DEFINED CMAKE_INSTALL_BINDIR) ++ set(CMAKE_INSTALL_BINDIR "bin" CACHE PATH "user executables (bin)") ++endif() ++ ++if(NOT DEFINED CMAKE_INSTALL_SBINDIR) ++ set(CMAKE_INSTALL_SBINDIR "sbin" CACHE PATH "system admin executables (sbin)") ++endif() ++ ++if(NOT DEFINED CMAKE_INSTALL_LIBEXECDIR) ++ set(CMAKE_INSTALL_LIBEXECDIR "libexec" CACHE PATH "program executables (libexec)") ++endif() ++ ++if(NOT DEFINED CMAKE_INSTALL_SYSCONFDIR) ++ set(CMAKE_INSTALL_SYSCONFDIR "etc" CACHE PATH "read-only single-machine data (etc)") ++endif() ++ ++if(NOT DEFINED CMAKE_INSTALL_SHAREDSTATEDIR) ++ set(CMAKE_INSTALL_SHAREDSTATEDIR "com" CACHE PATH "modifiable architecture-independent data (com)") ++endif() ++ ++if(NOT DEFINED CMAKE_INSTALL_LOCALSTATEDIR) ++ set(CMAKE_INSTALL_LOCALSTATEDIR "var" CACHE PATH "modifiable single-machine data (var)") ++endif() ++ ++if(NOT DEFINED CMAKE_INSTALL_LIBDIR) ++ set(_LIBDIR_DEFAULT "lib") ++ # Override this default 'lib' with 'lib64' iff: ++ # - we are on Linux system but NOT cross-compiling ++ # - we are NOT on debian ++ # - we are on a 64 bits system ++ # reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf ++ # For Debian with multiarch, use 'lib/${CMAKE_LIBRARY_ARCHITECTURE}' if ++ # CMAKE_LIBRARY_ARCHITECTURE is set (which contains e.g. "i386-linux-gnu" ++ # See http://wiki.debian.org/Multiarch ++ if((CMAKE_SYSTEM_NAME MATCHES "Linux|kFreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "GNU") ++ AND NOT CMAKE_CROSSCOMPILING) ++ if (EXISTS "/etc/debian_version") # is this a debian system ? ++ if(CMAKE_LIBRARY_ARCHITECTURE) ++ set(_LIBDIR_DEFAULT "lib/${CMAKE_LIBRARY_ARCHITECTURE}") ++ endif() ++ else() # not debian, rely on CMAKE_SIZEOF_VOID_P: ++ if(NOT DEFINED CMAKE_SIZEOF_VOID_P) ++ message(AUTHOR_WARNING ++ "Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. " ++ "Please enable at least one language before including GNUInstallDirs.") ++ else() ++ if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") ++ set(_LIBDIR_DEFAULT "lib64") ++ endif() ++ endif() ++ endif() ++ endif() ++ set(CMAKE_INSTALL_LIBDIR "${_LIBDIR_DEFAULT}" CACHE PATH "object code libraries (${_LIBDIR_DEFAULT})") ++endif() ++ ++if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR) ++ set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE PATH "C header files (include)") ++endif() ++ ++if(NOT DEFINED CMAKE_INSTALL_OLDINCLUDEDIR) ++ set(CMAKE_INSTALL_OLDINCLUDEDIR "/usr/include" CACHE PATH "C header files for non-gcc (/usr/include)") ++endif() ++ ++if(NOT DEFINED CMAKE_INSTALL_DATAROOTDIR) ++ set(CMAKE_INSTALL_DATAROOTDIR "share" CACHE PATH "read-only architecture-independent data root (share)") ++endif() ++ ++#----------------------------------------------------------------------------- ++# Values whose defaults are relative to DATAROOTDIR. Store empty values in ++# the cache and store the defaults in local variables if the cache values are ++# not set explicitly. This auto-updates the defaults as DATAROOTDIR changes. ++ ++if(NOT CMAKE_INSTALL_DATADIR) ++ set(CMAKE_INSTALL_DATADIR "" CACHE PATH "read-only architecture-independent data (DATAROOTDIR)") ++ set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATAROOTDIR}") ++endif() ++ ++if(NOT CMAKE_INSTALL_INFODIR) ++ set(CMAKE_INSTALL_INFODIR "" CACHE PATH "info documentation (DATAROOTDIR/info)") ++ set(CMAKE_INSTALL_INFODIR "${CMAKE_INSTALL_DATAROOTDIR}/info") ++endif() ++ ++if(NOT CMAKE_INSTALL_LOCALEDIR) ++ set(CMAKE_INSTALL_LOCALEDIR "" CACHE PATH "locale-dependent data (DATAROOTDIR/locale)") ++ set(CMAKE_INSTALL_LOCALEDIR "${CMAKE_INSTALL_DATAROOTDIR}/locale") ++endif() ++ ++if(NOT CMAKE_INSTALL_MANDIR) ++ set(CMAKE_INSTALL_MANDIR "" CACHE PATH "man documentation (DATAROOTDIR/man)") ++ set(CMAKE_INSTALL_MANDIR "${CMAKE_INSTALL_DATAROOTDIR}/man") ++endif() ++ ++if(NOT CMAKE_INSTALL_DOCDIR) ++ set(CMAKE_INSTALL_DOCDIR "" CACHE PATH "documentation root (DATAROOTDIR/doc/PROJECT_NAME)") ++ set(CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}") ++endif() ++ ++#----------------------------------------------------------------------------- ++ ++mark_as_advanced( ++ CMAKE_INSTALL_BINDIR ++ CMAKE_INSTALL_SBINDIR ++ CMAKE_INSTALL_LIBEXECDIR ++ CMAKE_INSTALL_SYSCONFDIR ++ CMAKE_INSTALL_SHAREDSTATEDIR ++ CMAKE_INSTALL_LOCALSTATEDIR ++ CMAKE_INSTALL_LIBDIR ++ CMAKE_INSTALL_INCLUDEDIR ++ CMAKE_INSTALL_OLDINCLUDEDIR ++ CMAKE_INSTALL_DATAROOTDIR ++ CMAKE_INSTALL_DATADIR ++ CMAKE_INSTALL_INFODIR ++ CMAKE_INSTALL_LOCALEDIR ++ CMAKE_INSTALL_MANDIR ++ CMAKE_INSTALL_DOCDIR ++ ) ++ ++# Result directories ++# ++foreach(dir ++ BINDIR ++ SBINDIR ++ LIBEXECDIR ++ SYSCONFDIR ++ SHAREDSTATEDIR ++ LOCALSTATEDIR ++ LIBDIR ++ INCLUDEDIR ++ OLDINCLUDEDIR ++ DATAROOTDIR ++ DATADIR ++ INFODIR ++ LOCALEDIR ++ MANDIR ++ DOCDIR ++ ) ++ if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_${dir}}) ++ set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}") ++ else() ++ set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_${dir}}") ++ endif() ++endforeach() +diff -Naur glm/CMakeLists.txt glmn/CMakeLists.txt +--- glm/CMakeLists.txt 2019-09-07 14:10:16.000000000 +0200 ++++ glmn/CMakeLists.txt 2019-09-23 00:10:29.559815104 +0200 +@@ -4,6 +4,11 @@ + set(GLM_VERSION "0.9.9") + project(glm VERSION ${GLM_VERSION} LANGUAGES CXX) + ++list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") ++ ++include(GNUInstallDirs) ++include(CMakePackageConfigHelpers) ++ + enable_testing() + + option(GLM_QUIET "No CMake Message" OFF) +@@ -237,3 +242,62 @@ + add_subdirectory(glm) + add_subdirectory(test) + ++set(GLM_INSTALL_CONFIGDIR "${CMAKE_INSTALL_LIBDIR}/cmake/glm") ++install(DIRECTORY glm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++ ++ ++# CMake automatically adds an architecture compatibility check to make sure ++# 32 and 64 bit code is not accidentally mixed. For a header-only library this ++# is not required. The check can be disabled by temporarily unsetting ++# CMAKE_SIZEOF_VOID_P. In CMake 3.14 and later this can be achieved more cleanly ++# with write_basic_package_version_file(ARCH_INDEPENDENT). ++# TODO: Use this once a newer CMake can be required. ++set(GLM_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P}) ++unset(CMAKE_SIZEOF_VOID_P) ++write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake" VERSION ${GLM_VERSION} COMPATIBILITY AnyNewerVersion) ++set(CMAKE_SIZEOF_VOID_P ${GLM_SIZEOF_VOID_P}) ++ ++# build tree package config ++configure_file(cmake/glmBuildConfig.cmake.in glmConfig.cmake @ONLY) ++ ++# install tree package config ++configure_package_config_file( ++ cmake/glmConfig.cmake.in ++ ${GLM_INSTALL_CONFIGDIR}/glmConfig.cmake ++ INSTALL_DESTINATION ${GLM_INSTALL_CONFIGDIR} ++ PATH_VARS CMAKE_INSTALL_INCLUDEDIR ++ NO_CHECK_REQUIRED_COMPONENTS_MACRO) ++ ++install(FILES ++ "${CMAKE_CURRENT_BINARY_DIR}/${GLM_INSTALL_CONFIGDIR}/glmConfig.cmake" ++ "${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake" ++ DESTINATION ${GLM_INSTALL_CONFIGDIR}) ++ ++add_library(glm INTERFACE) ++target_include_directories(glm INTERFACE ++ $ ++ $) ++install(TARGETS glm EXPORT glmTargets) ++ ++export(EXPORT glmTargets FILE "${CMAKE_CURRENT_BINARY_DIR}/glmTargets.cmake") ++ ++install(EXPORT glmTargets FILE glmTargets.cmake DESTINATION ${GLM_INSTALL_CONFIGDIR}) ++ ++# build pkg-config file ++configure_file("./cmake/glm.pc.in" "glm.pc" @ONLY) ++ ++# install pkg-config file ++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glm.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") ++ ++export(PACKAGE glm) ++ ++if(NOT TARGET uninstall) ++ configure_file( ++ ${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in ++ ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake ++ IMMEDIATE @ONLY) ++ ++ add_custom_target(uninstall ++ COMMAND ${CMAKE_COMMAND} -P ++ ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) ++endif() +diff -Naur glm/cmake_uninstall.cmake.in glmn/cmake_uninstall.cmake.in +--- glm/cmake_uninstall.cmake.in 1970-01-01 01:00:00.000000000 +0100 ++++ glmn/cmake_uninstall.cmake.in 2019-09-23 00:12:22.495660449 +0200 +@@ -0,0 +1,26 @@ ++if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") ++ message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") ++endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") ++ ++if (NOT DEFINED CMAKE_INSTALL_PREFIX) ++ set (CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@") ++endif () ++ message(${CMAKE_INSTALL_PREFIX}) ++ ++file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) ++string(REGEX REPLACE "\n" ";" files "${files}") ++foreach(file ${files}) ++ message(STATUS "Uninstalling $ENV{DESTDIR}${file}") ++ if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") ++ exec_program( ++ "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" ++ OUTPUT_VARIABLE rm_out ++ RETURN_VALUE rm_retval ++ ) ++ if(NOT "${rm_retval}" STREQUAL 0) ++ message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") ++ endif(NOT "${rm_retval}" STREQUAL 0) ++ else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") ++ message(STATUS "File $ENV{DESTDIR}${file} does not exist.") ++ endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") ++endforeach(file) -- cgit v1.2.3 From 3b98e71a4b8bd549736d8c30f7ddf10928217af3 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 24 Sep 2019 10:07:43 +0300 Subject: gnu: Register (gnu packages distributed). This is a follow-up to 2d25b0c8bad3f0b9c5ccb91f5c4430d8245f4061. * gnu/local.mk (GNU_SYSTEM_MODULES): Add (gnu packages distributed). --- gnu/local.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 043469b716..0e279d8303 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -146,7 +146,8 @@ GNU_SYSTEM_MODULES = \ %D%/packages/diffoscope.scm \ %D%/packages/digest.scm \ %D%/packages/direct-connect.scm \ - %D%/packages/disk.scm \ + %D%/packages/disk.scm \ + %D%/packages/distributed.scm \ %D%/packages/display-managers.scm \ %D%/packages/django.scm \ %D%/packages/djvu.scm \ -- cgit v1.2.3 From 942c7889498fc8e680a16d500e166c9ade84e640 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 23 Sep 2019 17:15:50 +0200 Subject: gnu: OpenEXR: Update to 2.4.0 [fixes CVE-2018-18443, CVE-2018-18444]. * gnu/packages/patches/ilmbase-fix-tests.patch: Adjust for new origin. * gnu/packages/patches/ilmbase-openexr-pkg-config.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/graphics.scm (ilmbase): Update to 2.4.0. [source]: Change to GIT-FETCH, as tarballs are no longer provided. Add new patch. [build-system]: Change to CMAKE-BUILD-SYSTEM. [arguments]: Add phase to enter the correct source directory. * gnu/packages/graphics.scm (openexr): Update to 2.4.0. [source]: Inherit from ILMBASE, which comes from the same repository. [build-system]: Change to CMAKE-BUILD-SYSTEM. [arguments]: Add phase to enter the correct source directory. * gnu/packages/gstreamer.scm (gst-plugins-bad)[arguments]: Enable C++11. * gnu/packages/image-processing.scm (opencv)[arguments]: Likewise. --- gnu/local.mk | 1 + gnu/packages/graphics.scm | 46 +++++++++++++--------- gnu/packages/gstreamer.scm | 5 +++ gnu/packages/image-processing.scm | 4 ++ gnu/packages/patches/ilmbase-fix-tests.patch | 12 ++---- .../patches/ilmbase-openexr-pkg-config.patch | 40 +++++++++++++++++++ 6 files changed, 81 insertions(+), 27 deletions(-) create mode 100644 gnu/packages/patches/ilmbase-openexr-pkg-config.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 0e279d8303..bf0f9de26e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -962,6 +962,7 @@ dist_patch_DATA = \ %D%/packages/patches/id3lib-CVE-2007-4460.patch \ %D%/packages/patches/idris-test-no-node.patch \ %D%/packages/patches/ilmbase-fix-tests.patch \ + %D%/packages/patches/ilmbase-openexr-pkg-config.patch \ %D%/packages/patches/intltool-perl-compatibility.patch \ %D%/packages/patches/irrlicht-use-system-libs.patch \ %D%/packages/patches/isc-dhcp-4.4.1-fixes-for-newer-bind.patch \ diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index d4e9adb84a..795e750cb5 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2019 Steve Sprang ;;; Copyright © 2019 John Soo ;;; Copyright © 2019 Pierre Neidhardt +;;; Copyright © 2019 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -327,17 +328,25 @@ many more.") (define-public ilmbase (package (name "ilmbase") - (version "2.3.0") + (version "2.4.0") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/openexr/openexr/releases" - "/download/v" version "/ilmbase-" - version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/openexr/openexr") + (commit (string-append "v" version)))) + (file-name (git-file-name "ilmbase" version)) (sha256 (base32 - "0qiq5bqq9rxhqjiym2k36sx4vq8adgrz6xf6qwizi9bqm78phsa5")) - (patches (search-patches "ilmbase-fix-tests.patch")))) - (build-system gnu-build-system) + "0g3rz11cvb7gnphp2np9z7bfl7v4dprq4w5hnsvx7yrasgsdyn8s")) + (patches (search-patches "ilmbase-fix-tests.patch" + "ilmbase-openexr-pkg-config.patch")))) + (build-system cmake-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'change-directory + (lambda _ + (chdir "IlmBase") + #t))))) (home-page "http://www.openexr.com/") (synopsis "Utility C++ libraries for threads, maths, and exceptions") (description @@ -409,27 +418,26 @@ graphics.") (define-public openexr (package (name "openexr") - (version "2.3.0") + (version (package-version ilmbase)) (source (origin - (method url-fetch) - (uri (string-append "https://github.com/openexr/openexr/releases" - "/download/v" version "/openexr-" - version ".tar.gz")) - (sha256 - (base32 - "19jywbs9qjvsbkvlvzayzi81s976k53wg53vw4xj66lcgylb6v7x")) + (inherit (package-source ilmbase)) + (file-name (git-file-name "openexr" version)) (modules '((guix build utils))) (snippet '(begin - (substitute* (find-files "." "tmpDir\\.h") + (substitute* (find-files "OpenEXR" "tmpDir\\.h") (("\"/var/tmp/\"") "\"/tmp/\"")) #t)))) - (build-system gnu-build-system) + (build-system cmake-build-system) (arguments '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'disable-broken-test + (add-after 'unpack 'change-directory + (lambda _ + (chdir "OpenEXR") + #t)) + (add-after 'change-directory 'disable-broken-test ;; This test fails on i686. Upstream developers suggest that ;; this test is broken on i686 and can be safely disabled: ;; https://github.com/openexr/openexr/issues/67#issuecomment-21169748 diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm index 13c2c2fc27..8b81cc91a0 100644 --- a/gnu/packages/gstreamer.scm +++ b/gnu/packages/gstreamer.scm @@ -286,6 +286,11 @@ developers consider to have good quality code and correct functionality.") (build-system gnu-build-system) (arguments '(#:tests? #f ; XXX: 13 of 53 tests fail + + ;; FIXME: OpenEXR 2.4.0 requires C++ 11 or later. Remove when the + ;; default compiler is >= GCC 5. + #:make-flags '("CXXFLAGS=-std=gnu++11") + #:configure-flags (list (string-append "--with-html-dir=" (assoc-ref %outputs "doc") diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm index b3972a2b76..460f35dbae 100644 --- a/gnu/packages/image-processing.scm +++ b/gnu/packages/image-processing.scm @@ -269,6 +269,10 @@ integrates with various databases on GUI toolkits such as Qt and Tk.") "-DWITH_CAROTENE=OFF" ; only visible on arm/aarch64 "-DENABLE_PRECOMPILED_HEADERS=OFF" + ;; FIXME: OpenEXR requires C++11 or later. Remove this when + ;; the default compiler is GCC 7. + "-DCMAKE_CXX_FLAGS=-std=gnu++11" + ;; CPU-Features: ;; See cmake/OpenCVCompilerOptimizations.cmake ;; (CPU_ALL_OPTIMIZATIONS) for a list of all optimizations diff --git a/gnu/packages/patches/ilmbase-fix-tests.patch b/gnu/packages/patches/ilmbase-fix-tests.patch index fcaa37d201..34d3a180c4 100644 --- a/gnu/packages/patches/ilmbase-fix-tests.patch +++ b/gnu/packages/patches/ilmbase-fix-tests.patch @@ -22,10 +22,8 @@ Date: Wed, 24 Feb 2016 01:04:11 +0000 Also fix a pre-existing typo. -Index: ilmbase/ImathTest/testBoxAlgo.cpp -=================================================================== ---- ilmbase.orig/ImathTest/testBoxAlgo.cpp -+++ ilmbase/ImathTest/testBoxAlgo.cpp +--- a/IlmBase/ImathTest/testBoxAlgo.cpp ++++ b/IlmBase/ImathTest/testBoxAlgo.cpp @@ -886,10 +886,11 @@ boxMatrixTransform () assert (approximatelyEqual (b2.min, b4.min, e)); @@ -54,10 +52,8 @@ On 32-bit x86, allow even greater discrepency at double precision, due to possible double-rounding. See https://lists.nongnu.org/archive/html/openexr-devel/2015-12/msg00001.html -Index: ilmbase/ImathTest/testBox.cpp -=================================================================== ---- ilmbase.orig/ImathTest/testBox.cpp -+++ ilmbase/ImathTest/testBox.cpp +--- a/IlmBase/ImathTest/testBox.cpp ++++ b/IlmBase/ImathTest/testBox.cpp @@ -47,6 +47,58 @@ using namespace IMATH_INTERNAL_NAMESPACE namespace { diff --git a/gnu/packages/patches/ilmbase-openexr-pkg-config.patch b/gnu/packages/patches/ilmbase-openexr-pkg-config.patch new file mode 100644 index 0000000000..99613080d8 --- /dev/null +++ b/gnu/packages/patches/ilmbase-openexr-pkg-config.patch @@ -0,0 +1,40 @@ +Fix pkg-config files when using the CMake build system. + +Upstream bug report: +https://github.com/openexr/openexr/issues/567 + +diff --git a/IlmBase/config/CMakeLists.txt b/IlmBase/config/CMakeLists.txt +index 508176a..9e6ab91 100644 +--- a/IlmBase/config/CMakeLists.txt ++++ b/IlmBase/config/CMakeLists.txt +@@ -71,9 +71,9 @@ if(ILMBASE_INSTALL_PKG_CONFIG) + # use a helper function to avoid variable pollution, but pretty simple + function(ilmbase_pkg_config_help pcinfile) + set(prefix ${CMAKE_INSTALL_PREFIX}) +- set(exec_prefix ${CMAKE_INSTALL_BINDIR}) +- set(libdir ${CMAKE_INSTALL_LIBDIR}) +- set(includedir ${CMAKE_INSTALL_INCLUDEDIR}) ++ set(exec_prefix ${CMAKE_INSTALL_FULL_BINDIR}) ++ set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) ++ set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) + set(LIB_SUFFIX_DASH ${ILMBASE_LIB_SUFFIX}) + if(TARGET Threads::Threads) + # hrm, can't use properties as they end up as generator expressions +diff --git a/OpenEXR/config/CMakeLists.txt b/OpenEXR/config/CMakeLists.txt +index 1ef829a..b8dc141 100644 +--- a/OpenEXR/config/CMakeLists.txt ++++ b/OpenEXR/config/CMakeLists.txt +@@ -72,9 +72,9 @@ if(OPENEXR_INSTALL_PKG_CONFIG) + # use a helper function to avoid variable pollution, but pretty simple + function(openexr_pkg_config_help pcinfile) + set(prefix ${CMAKE_INSTALL_PREFIX}) +- set(exec_prefix ${CMAKE_INSTALL_BINDIR}) +- set(libdir ${CMAKE_INSTALL_LIBDIR}) +- set(includedir ${CMAKE_INSTALL_INCLUDEDIR}) ++ set(exec_prefix ${CMAKE_INSTALL_FULL_BINDIR}) ++ set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) ++ set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) + set(LIB_SUFFIX_DASH ${OPENEXR_LIB_SUFFIX}) + if(TARGET Threads::Threads) + # hrm, can't use properties as they end up as generator expressions + -- cgit v1.2.3 From aa0e28bc73487f2298b494ab077526ba448a1c57 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 23 Sep 2019 17:25:00 +0200 Subject: gnu: p11-kit: Update to 0.23.17. * gnu/packages/patches/p11-kit-jks-timestamps.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/tls.scm (p11-kit): Update to 0.23.17. [source](patches): Remove. --- gnu/local.mk | 1 - gnu/packages/patches/p11-kit-jks-timestamps.patch | 42 ----------------------- gnu/packages/tls.scm | 5 ++- 3 files changed, 2 insertions(+), 46 deletions(-) delete mode 100644 gnu/packages/patches/p11-kit-jks-timestamps.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index bf0f9de26e..840ef22bdb 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1176,7 +1176,6 @@ dist_patch_DATA = \ %D%/packages/patches/osip-CVE-2017-7853.patch \ %D%/packages/patches/ots-no-include-missing-file.patch \ %D%/packages/patches/owncloud-disable-updatecheck.patch \ - %D%/packages/patches/p11-kit-jks-timestamps.patch \ %D%/packages/patches/p7zip-CVE-2016-9296.patch \ %D%/packages/patches/p7zip-CVE-2017-17969.patch \ %D%/packages/patches/p7zip-remove-unused-code.patch \ diff --git a/gnu/packages/patches/p11-kit-jks-timestamps.patch b/gnu/packages/patches/p11-kit-jks-timestamps.patch deleted file mode 100644 index 8cb8ed8684..0000000000 --- a/gnu/packages/patches/p11-kit-jks-timestamps.patch +++ /dev/null @@ -1,42 +0,0 @@ -Fix test failures induced by setting the SOURCE_DATE_EPOCH variable. - -Taken from upstream: . - -From 2a474e1fe8f4bd8b4ed7622e5cf3b2718a202562 Mon Sep 17 00:00:00 2001 -From: Daiki Ueno -Date: Mon, 28 Jan 2019 13:03:15 +0100 -Subject: [PATCH] extract-jks: Prefer _p11_extract_jks_timestamp to - SOURCE_DATE_EPOCH - -Give _p11_extract_jks_timestamp precedence over SOURCE_DATE_EPOCH so -that the test results are not affected by the envvar settings. ---- - trust/extract-jks.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/trust/extract-jks.c b/trust/extract-jks.c -index ad8dc35..a6f855f 100644 ---- a/trust/extract-jks.c -+++ b/trust/extract-jks.c -@@ -250,7 +250,9 @@ prepare_jks_buffer (p11_enumerate *ex, - * when this was this certificate was added to the keystore, however - * we don't have that information. Java uses time in milliseconds - */ -- { -+ if (_p11_extract_jks_timestamp) -+ now = _p11_extract_jks_timestamp; -+ else { - char *source_date_epoch; - source_date_epoch = secure_getenv ("SOURCE_DATE_EPOCH"); - if (source_date_epoch) { -@@ -276,9 +278,7 @@ prepare_jks_buffer (p11_enumerate *ex, - return false; - } - now = epoch; -- } else if (_p11_extract_jks_timestamp) -- now = _p11_extract_jks_timestamp; -- else -+ } else - now = time (NULL); - } - diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 45ec4f796b..c06052239f 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -122,16 +122,15 @@ in intelligent transportation networks.") (define-public p11-kit (package (name "p11-kit") - (version "0.23.15") + (version "0.23.17") (source (origin (method url-fetch) (uri (string-append "https://github.com/p11-glue/p11-kit/releases/" "download/" version "/p11-kit-" version ".tar.gz")) - (patches (search-patches "p11-kit-jks-timestamps.patch")) (sha256 (base32 - "166pwj00cffv4qq4dvx0k53zka0b0r1fa0whc49007vsqyh3khgp")))) + "07kwdlw07jk9833k43kkhv0q9gkll3vmd25wwp68cpy0crfv4isl")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) -- cgit v1.2.3 From 4780db2c935110ea3254817ba0c519c229b9461e Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Mon, 16 Sep 2019 22:20:23 -0500 Subject: gnu: idris: Update to 1.3.2. * gnu/packages/haskell-xyz.scm (ghc-network-2.8, ghc-megaparsec-7): New variables. * gnu/packages/idris.scm (idris): Update to 1.3.2. [source]: Remove patch. [inputs]: Use ghc-network-2.8 and ghc-megaparsec-7. * gnu/packages/patches/idris-test-no-node.patch: Delete. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/haskell-xyz.scm | 37 ++++++++++++++++ gnu/packages/idris.scm | 9 ++-- gnu/packages/patches/idris-test-no-node.patch | 61 --------------------------- 4 files changed, 41 insertions(+), 67 deletions(-) delete mode 100644 gnu/packages/patches/idris-test-no-node.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 840ef22bdb..da5fe09446 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -960,7 +960,6 @@ dist_patch_DATA = \ %D%/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch \ %D%/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch \ %D%/packages/patches/id3lib-CVE-2007-4460.patch \ - %D%/packages/patches/idris-test-no-node.patch \ %D%/packages/patches/ilmbase-fix-tests.patch \ %D%/packages/patches/ilmbase-openexr-pkg-config.patch \ %D%/packages/patches/intltool-perl-compatibility.patch \ diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm index a36451fa8c..2977398880 100644 --- a/gnu/packages/haskell-xyz.scm +++ b/gnu/packages/haskell-xyz.scm @@ -62,6 +62,7 @@ #:use-module (guix build-system haskell) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix utils) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages)) @@ -6070,6 +6071,24 @@ Megaparsec is a feature-rich package that strikes a nice balance between speed, flexibility, and quality of parse errors.") (license license:bsd-2))) +;;; Idris 1.3.2 requires 'megaparse>=7.0.4' but we'd like to keep the public +;;; package at the current Stackage LTS version: +(define-public ghc-megaparsec-7 + (hidden-package + (package + (inherit ghc-megaparsec) + (version "7.0.5") + (source + (origin + (method url-fetch) + (uri (string-append "https://hackage.haskell.org/package/megaparsec/" + "megaparsec-" version ".tar.gz")) + (sha256 + (base32 + "0bqx1icbmk8s7wmbcdzsgnlh607c7kzg8l80cp02dxr5valjxp7j")))) + (arguments (strip-keyword-arguments (list #:cabal-revision) + (package-arguments ghc-megaparsec)))))) + (define-public ghc-memory (package (name "ghc-memory") @@ -6740,6 +6759,24 @@ between 2 and 3 times faster than the Mersenne Twister.") "This package provides a low-level networking interface.") (license license:bsd-3))) +;;; Until we update our default GHC to >=8.6 we cannot update our ghc-network +;;; package, since the 'cabal-install' package that supports the current +;;; 'Cabal' module requires 'network==2.6.*'. Here we provide an updated +;;; version to be used for our idris package. +(define-public ghc-network-2.8 + (hidden-package + (package + (inherit ghc-network) + (version "2.8.0.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://hackage.haskell.org/package/network/" + "network-" version ".tar.gz")) + (sha256 + (base32 + "0im8k51rw3ahmr23ny10pshwbz09jfg0fdpam0hzf2hgxnzmvxb1"))))))) + (define-public ghc-network-info (package (name "ghc-network-info") diff --git a/gnu/packages/idris.scm b/gnu/packages/idris.scm index 894a19f0aa..7e6ee302b0 100644 --- a/gnu/packages/idris.scm +++ b/gnu/packages/idris.scm @@ -38,7 +38,7 @@ (define-public idris (package (name "idris") - (version "1.3.1") + (version "1.3.2") (source (origin (method url-fetch) (uri (string-append @@ -46,8 +46,7 @@ "idris-" version "/idris-" version ".tar.gz")) (sha256 (base32 - "0fn9h58l592j72njwma1ia48h8h87wi2rjqfxs7j2lfmvgfv18fi")) - (patches (search-patches "idris-test-no-node.patch")))) + "0wychzkg0yghd2pp8fqz78vp1ayzks191knfpl7mhh8igsmb6bc7")))) (build-system haskell-build-system) (native-inputs ;For tests `(("perl" ,perl) @@ -71,8 +70,8 @@ ("ghc-fsnotify" ,ghc-fsnotify) ("ghc-ieee754" ,ghc-ieee754) ("ghc-libffi" ,ghc-libffi) - ("ghc-megaparsec" ,ghc-megaparsec) - ("ghc-network" ,ghc-network) + ("ghc-megaparsec" ,ghc-megaparsec-7) + ("ghc-network" ,ghc-network-2.8) ("ghc-optparse-applicative" ,ghc-optparse-applicative) ("ghc-regex-tdfa" ,ghc-regex-tdfa) ("ghc-safe" ,ghc-safe) diff --git a/gnu/packages/patches/idris-test-no-node.patch b/gnu/packages/patches/idris-test-no-node.patch deleted file mode 100644 index c04ad41a8e..0000000000 --- a/gnu/packages/patches/idris-test-no-node.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 6c52e1b902b869c25e2fe39cff6364143a04da61 Mon Sep 17 00:00:00 2001 -From: Niklas Larsson -Date: Tue, 11 Dec 2018 19:56:22 +0100 -Subject: [PATCH] Only check for Node when required - ---- - test/TestRun.hs | 34 ++++++++++++++++++++-------------- - 1 file changed, 20 insertions(+), 14 deletions(-) - -diff --git a/test/TestRun.hs b/test/TestRun.hs -index c7db9fdcd..4809911f3 100644 ---- a/test/TestRun.hs -+++ b/test/TestRun.hs -@@ -11,6 +11,7 @@ import Data.Proxy - import Data.Typeable - import Options.Applicative - import System.Directory -+import System.Environment - import System.Exit - import System.FilePath (()) - import System.Info -@@ -103,20 +104,25 @@ runTest path flags = do - normalise (x : xs) = x : normalise xs - normalise [] = [] - -+checkNode :: IO () -+checkNode = do -+ nodePath <- findExecutable "node" -+ nodejsPath <- findExecutable "nodejs" -+ let node = nodePath <|> nodejsPath -+ case node of -+ Nothing -> do -+ putStrLn "For running the test suite against Node, node must be installed." -+ exitFailure -+ Just _ -> return () -+ - main :: IO () - main = do -- nodePath <- findExecutable "node" -- nodejsPath <- findExecutable "nodejs" -- let node = nodePath <|> nodejsPath -- case node of -- Nothing -> do -- putStrLn "For running the test suite against Node, node must be installed." -- exitFailure -- Just _ -> do -- defaultMainWithIngredients ingredients $ -+ args <- getArgs -+ when ("--node" `elem` args) checkNode -+ defaultMainWithIngredients ingredients $ - askOption $ \(NodeOpt node) -> -- let (codegen, flags) = if node then (JS, ["--codegen", "node"]) -- else (C , []) -- in -- mkGoldenTests (testFamiliesForCodegen codegen) -- (flags ++ idrisFlags) -+ let (codegen, flags) = if node then (JS, ["--codegen", "node"]) -+ else (C , []) -+ in -+ mkGoldenTests (testFamiliesForCodegen codegen) (flags ++ idrisFlags) -+ -- cgit v1.2.3 From dd2a83270bccb539439b2fc831d0db04e5276f11 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sun, 15 Sep 2019 19:16:11 +0100 Subject: services: Add the Guix Data Service. * gnu/services/guix.scm: New file. * gnu/tests/guix.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add both new files. * doc/guix.texi (Guix Services): New section documenting the Guix Data Service. --- doc/guix.texi | 52 +++++++++++++ gnu/local.mk | 2 + gnu/services/guix.scm | 212 ++++++++++++++++++++++++++++++++++++++++++++++++++ gnu/tests/guix.scm | 173 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 439 insertions(+) create mode 100644 gnu/services/guix.scm create mode 100644 gnu/tests/guix.scm (limited to 'gnu/local.mk') diff --git a/doc/guix.texi b/doc/guix.texi index 9fcce27597..71deca5aba 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -11788,6 +11788,7 @@ declaration. * Virtualization Services:: Virtualization services. * Version Control Services:: Providing remote access to Git repositories. * Game Services:: Game servers. +* Guix Services:: Services relating specifically to Guix. * Miscellaneous Services:: Other services. @end menu @@ -24327,6 +24328,57 @@ The port to bind the server to. @end table @end deftp + +@node Guix Services +@subsection Guix Services + +@subsubheading Guix Data Service +The @uref{http://data.guix.gnu.org,Guix Data Service} processes, stores +and provides data about GNU Guix. This includes information about +packages, derivations and lint warnings. + +The data is stored in a PostgreSQL database, and available through a web +interface. + +@defvar {Scheme Variable} guix-data-service-type +Service type for the Guix Data Service. Its value must be a +@code{guix-data-service-configuration} object. The service optionally +extends the getmail service, as the guix-commits mailing list is used to +find out about changes in the Guix git repository. +@end defvar + +@deftp {Data Type} guix-data-service-configuration +Data type representing the configuration of the Guix Data Service. + +@table @asis +@item @code{package} (default: @code{guix-data-service}) +The Guix Data Service package to use. + +@item @code{user} (default: @code{"guix-data-service"}) +The system user to run the service as. + +@item @code{group} (default: @code{"guix-data-service"}) +The system group to run the service as. + +@item @code{port} (default: @code{8765}) +The port to bind the web service to. + +@item @code{host} (default: @code{"127.0.0.1"}) +The host to bind the web service to. + +@item @code{getmail-idle-mailboxes} (default: @code{#f}) +If set, this is the list of mailboxes that the getmail service will be +configured to listen to. + +@item @code{commits-getmail-retriever-configuration} (default: @code{#f}) +If set, this is the @code{getmail-retriever-configuration} object with +which to configure getmail to fetch mail from the guix-commits mailing +list. + +@end table +@end deftp + + @node Miscellaneous Services @subsection Miscellaneous Services diff --git a/gnu/local.mk b/gnu/local.mk index da5fe09446..23fc317d50 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -535,6 +535,7 @@ GNU_SYSTEM_MODULES = \ %D%/services/authentication.scm \ %D%/services/games.scm \ %D%/services/getmail.scm \ + %D%/services/guix.scm \ %D%/services/kerberos.scm \ %D%/services/lirc.scm \ %D%/services/virtualization.scm \ @@ -599,6 +600,7 @@ GNU_SYSTEM_MODULES = \ %D%/tests/desktop.scm \ %D%/tests/dict.scm \ %D%/tests/docker.scm \ + %D%/tests/guix.scm \ %D%/tests/monitoring.scm \ %D%/tests/nfs.scm \ %D%/tests/install.scm \ diff --git a/gnu/services/guix.scm b/gnu/services/guix.scm new file mode 100644 index 0000000000..0f0fad39b0 --- /dev/null +++ b/gnu/services/guix.scm @@ -0,0 +1,212 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019 Christopher Baines +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation, either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services guix) + #:use-module (ice-9 match) + #:use-module (guix gexp) + #:use-module (guix records) + #:use-module ((gnu packages base) + #:select (glibc-utf8-locales)) + #:use-module (gnu packages admin) + #:use-module (gnu packages web) + #:use-module (gnu services) + #:use-module (gnu services base) + #:use-module (gnu services admin) + #:use-module (gnu services shepherd) + #:use-module (gnu services getmail) + #:use-module (gnu system shadow) + #:export ( + guix-data-service-configuration + guix-data-service-configuration? + guix-data-service-package + guix-data-service-user + guix-data-service-group + guix-data-service-port + guix-data-service-host + guix-data-service-getmail-idle-mailboxes + guix-data-service-commits-getmail-retriever-configuration + + guix-data-service-type)) + +;;;; Commentary: +;;; +;;; This module implements a service that to run instances of the Guix Data +;;; Service, which provides data about Guix over time. +;;; +;;;; Code: + +(define-record-type* + guix-data-service-configuration make-guix-data-service-configuration + guix-data-service-configuration? + (package guix-data-service-package + (default guix-data-service)) + (user guix-data-service-configuration-user + (default "guix-data-service")) + (group guix-data-service-configuration-group + (default "guix-data-service")) + (port guix-data-service-port + (default 8765)) + (host guix-data-service-host + (default "127.0.0.1")) + (getmail-idle-mailboxes + guix-data-service-getmail-idle-mailboxes + (default #f)) + (commits-getmail-retriever-configuration + guix-data-service-commits-getmail-retriever-configuration + (default #f))) + +(define (guix-data-service-profile-packages config) + "Return the guix-data-service package, this will populate the +ca-certificates.crt file in the system profile." + (list + (guix-data-service-package config))) + +(define (guix-data-service-shepherd-services config) + (match-record config + (package user group port host) + (list + (shepherd-service + (documentation "Guix Data Service web server") + (provision '(guix-data-service)) + (requirement '(postgres networking)) + (start #~(make-forkexec-constructor + (list #$(file-append package + "/bin/guix-data-service") + "--pid-file=/var/run/guix-data-service/pid" + #$(string-append "--port=" (number->string port)) + #$(string-append "--host=" host) + ;; Perform any database migrations when the + ;; service is started + "--update-database") + + #:user #$user + #:group #$group + #:pid-file "/var/run/guix-data-service/pid" + ;; Allow time for migrations to run + #:pid-file-timeout 60 + #:environment-variables + `(,(string-append + "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "LC_ALL=en_US.utf8") + #:log-file "/var/log/guix-data-service/web.log")) + (stop #~(make-kill-destructor))) + + (shepherd-service + (documentation "Guix Data Service process jobs") + (provision '(guix-data-service-process-jobs)) + (requirement '(postgres + networking + ;; Require guix-data-service, as that the database + ;; migrations are handled through this service + guix-data-service)) + (start #~(make-forkexec-constructor + (list + #$(file-append package + "/bin/guix-data-service-process-jobs")) + #:user #$user + #:group #$group + #:environment-variables + `("HOME=/var/lib/guix-data-service" + "GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt" + ,(string-append + "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "LC_ALL=en_US.utf8") + #:log-file "/var/log/guix-data-service/process-jobs.log")) + (stop #~(make-kill-destructor)))))) + +(define (guix-data-service-activation config) + #~(begin + (use-modules (guix build utils)) + + (define %user (getpw "guix-data-service")) + + (chmod "/var/lib/guix-data-service" #o755) + + (mkdir-p "/var/log/guix-data-service") + + ;; Allow writing the PID file + (mkdir-p "/var/run/guix-data-service") + (chown "/var/run/guix-data-service" + (passwd:uid %user) + (passwd:gid %user)))) + +(define (guix-data-service-account config) + (match-record config + (user group) + (list (user-group + (name group) + (system? #t)) + (user-account + (name user) + (group group) + (system? #t) + (comment "Guix Data Service user") + (home-directory "/var/lib/guix-data-service") + (shell (file-append shadow "/sbin/nologin")))))) + +(define (guix-data-service-getmail-configuration config) + (match config + (($ package user group + port host + #f #f) + '()) + (($ package user group + port host + getmail-idle-mailboxes + commits-getmail-retriever-configuration) + (list + (getmail-configuration + (name 'guix-data-service) + (user user) + (group group) + (directory "/var/lib/getmail/guix-data-service") + (rcfile + (getmail-configuration-file + (retriever commits-getmail-retriever-configuration) + (destination + (getmail-destination-configuration + (type "MDA_external") + (path (file-append + package + "/bin/guix-data-service-process-branch-updated-email")))) + (options + (getmail-options-configuration + (read-all #f) + (delivered-to #f) + (received #f))))) + (idle getmail-idle-mailboxes)))))) + +(define guix-data-service-type + (service-type + (name 'guix-data-service) + (extensions + (list + (service-extension profile-service-type + guix-data-service-profile-packages) + (service-extension shepherd-root-service-type + guix-data-service-shepherd-services) + (service-extension activation-service-type + guix-data-service-activation) + (service-extension account-service-type + guix-data-service-account) + (service-extension getmail-service-type + guix-data-service-getmail-configuration))) + (default-value + (guix-data-service-configuration)) + (description + "Run an instance of the Guix Data Service."))) diff --git a/gnu/tests/guix.scm b/gnu/tests/guix.scm new file mode 100644 index 0000000000..6139e31cf0 --- /dev/null +++ b/gnu/tests/guix.scm @@ -0,0 +1,173 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019 Christopher Baines +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu tests guix) + #:use-module (gnu tests) + #:use-module (gnu system) + #:use-module (gnu system file-systems) + #:use-module (gnu system shadow) + #:use-module (gnu system vm) + #:use-module (gnu services) + #:use-module (gnu services guix) + #:use-module (gnu services databases) + #:use-module (gnu services shepherd) + #:use-module (gnu services networking) + #:use-module (gnu packages databases) + #:use-module (guix packages) + #:use-module (guix modules) + #:use-module (guix records) + #:use-module (guix gexp) + #:use-module (guix store) + #:use-module (guix utils) + #:use-module (ice-9 match) + #:export (%test-guix-data-service)) + + +;;; +;;; Guix Data Service +;;; + +(define guix-data-service-initial-database-setup-service + (let ((user "guix_data_service") + (name "guix_data_service")) + (define start-gexp + #~(lambda () + (let ((pid (primitive-fork)) + (postgres (getpwnam "postgres"))) + (if (eq? pid 0) + (dynamic-wind + (const #t) + (lambda () + (setgid (passwd:gid postgres)) + (setuid (passwd:uid postgres)) + (primitive-exit + (if (and + (zero? + (system* #$(file-append postgresql "/bin/createuser") + #$user)) + (zero? + (system* #$(file-append postgresql "/bin/createdb") + "-O" #$user #$name))) + 0 + 1))) + (lambda () + (primitive-exit 1))) + (zero? (cdr (waitpid pid))))))) + + (shepherd-service + (requirement '(postgres)) + (provision '(guix-data-service-initial-database-setup)) + (start start-gexp) + (stop #~(const #f)) + (respawn? #f) + (one-shot? #t) + (documentation "Setup Guix Data Service database.")))) + +(define %guix-data-service-os + (simple-operating-system + (service dhcp-client-service-type) + (service postgresql-service-type + (postgresql-configuration + (config-file + (postgresql-config-file + (hba-file + (plain-file "pg_hba.conf" + " +local all all trust +host all all 127.0.0.1/32 trust +host all all ::1/128 trust")))))) + (service guix-data-service-type + (guix-data-service-configuration + (host "0.0.0.0"))) + (simple-service 'guix-data-service-database-setup + shepherd-root-service-type + (list guix-data-service-initial-database-setup-service)))) + +(define (run-guix-data-service-test) + (define os + (marionette-operating-system + %guix-data-service-os + #:imported-modules '((gnu services herd) + (guix combinators)))) + + (define forwarded-port 8080) + + (define vm + (virtual-machine + (operating-system os) + (memory-size 1024) + (port-forwardings `((,forwarded-port . 8765))))) + + (define test + (with-imported-modules '((gnu build marionette)) + #~(begin + (use-modules (srfi srfi-11) (srfi srfi-64) + (gnu build marionette) + (web uri) + (web client) + (web response)) + + (define marionette + (make-marionette (list #$vm))) + + (mkdir #$output) + (chdir #$output) + + (test-begin "guix-data-service") + + (test-assert "service running" + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (match (start-service 'guix-data-service) + (#f #f) + (('service response-parts ...) + (match (assq-ref response-parts 'running) + ((pid) (number? pid)))))) + marionette)) + + (test-assert "process jobs service running" + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (match (start-service 'guix-data-service-process-jobs) + (#f #f) + (('service response-parts ...) + (match (assq-ref response-parts 'running) + ((pid) (number? pid)))))) + marionette)) + + (test-equal "http-get" + 200 + (let-values + (((response text) + (http-get #$(simple-format + #f "http://localhost:~A/healthcheck" forwarded-port) + #:decode-body? #t))) + (response-code response))) + + (test-end) + (exit (= (test-runner-fail-count (test-runner-current)) 0))))) + + (gexp->derivation "guix-data-service-test" test)) + +(define %test-guix-data-service + (system-test + (name "guix-data-service") + (description "Connect to a running Guix Data Service.") + (value (run-guix-data-service-test)))) -- cgit v1.2.3 From 8dc3c2a7d5fbe28b6f8ae27788b053be0d87b0b6 Mon Sep 17 00:00:00 2001 From: Kei Kebrau Date: Mon, 7 Jan 2019 19:36:49 -0500 Subject: gnu: freeimage: Update to 3.18.0. * gnu/packages/image.scm (freeimage): Update to 3.18.0. [source]: Modify snippet to remove the bundled libjxr. Remove obsolete patches. [arguments]: Add libjxr include directory to #:make-flags. [inputs]: Add libjxr. * gnu/packages/patches/freeimage-CVE-2015-0852.patch, gnu/packages/patches/freeimage-CVE-2016-5684.patch, gnu/packages/patches/freeimage-fix-build-with-gcc-5.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Unregister patches. * gnu/packages/patches/freeimage-unbundle.patch: Update patch. Signed-off-by: Marius Bakke --- gnu/local.mk | 3 - gnu/packages/image.scm | 16 +- gnu/packages/patches/freeimage-CVE-2015-0852.patch | 129 -- gnu/packages/patches/freeimage-CVE-2016-5684.patch | 34 - .../patches/freeimage-fix-build-with-gcc-5.patch | 1453 -------------------- gnu/packages/patches/freeimage-unbundle.patch | 167 ++- 6 files changed, 138 insertions(+), 1664 deletions(-) delete mode 100644 gnu/packages/patches/freeimage-CVE-2015-0852.patch delete mode 100644 gnu/packages/patches/freeimage-CVE-2016-5684.patch delete mode 100644 gnu/packages/patches/freeimage-fix-build-with-gcc-5.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 23fc317d50..919e836b8c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -828,9 +828,6 @@ dist_patch_DATA = \ %D%/packages/patches/flint-ldconfig.patch \ %D%/packages/patches/foomatic-filters-CVE-2015-8327.patch \ %D%/packages/patches/foomatic-filters-CVE-2015-8560.patch \ - %D%/packages/patches/freeimage-CVE-2015-0852.patch \ - %D%/packages/patches/freeimage-CVE-2016-5684.patch \ - %D%/packages/patches/freeimage-fix-build-with-gcc-5.patch \ %D%/packages/patches/freeimage-unbundle.patch \ %D%/packages/patches/fuse-overlapping-headers.patch \ %D%/packages/patches/gawk-shell.patch \ diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index d1a4a58575..d03f4548c5 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -957,7 +957,7 @@ supplies a generic doubly-linked list and some string functions.") (define-public freeimage (package (name "freeimage") - (version "3.17.0") + (version "3.18.0") (source (origin (method url-fetch) (uri (string-append @@ -967,7 +967,7 @@ supplies a generic doubly-linked list and some string functions.") ".zip")) (sha256 (base32 - "12bz57asdcfsz3zr9i9nska0fb6h3z2aizy412qjqkixkginbz7v")) + "1z9qwi9mlq69d5jipr3v2jika2g0kszqdzilggm99nls5xl7j4zl")) (modules '((guix build utils))) (snippet '(begin @@ -975,12 +975,8 @@ supplies a generic doubly-linked list and some string functions.") (lambda (dir) (delete-file-recursively (string-append "Source/" dir))) '("LibJPEG" "LibOpenJPEG" "LibPNG" "LibRawLite" - ;; "LibJXR" - "LibWebP" "OpenEXR" "ZLib")))) - (patches (search-patches "freeimage-unbundle.patch" - "freeimage-CVE-2015-0852.patch" - "freeimage-CVE-2016-5684.patch" - "freeimage-fix-build-with-gcc-5.patch")))) + "LibJXR" "LibWebP" "OpenEXR" "ZLib")))) + (patches (search-patches "freeimage-unbundle.patch")))) (build-system gnu-build-system) (arguments '(#:phases @@ -1011,7 +1007,7 @@ supplies a generic doubly-linked list and some string functions.") ;; We need '-fpermissive' for Source/FreeImage.h. ;; libjxr doesn't have a pkg-config file. (string-append "CFLAGS+=-O2 -fPIC -fvisibility=hidden -fpermissive " - ;;"-I" (assoc-ref %build-inputs "libjxr") "/include/jxrlib" + "-I" (assoc-ref %build-inputs "libjxr") "/include/jxrlib " ;; FIXME: OpenEXR 2.4.0 requires C++11 or later. ;; Remove when the default compiler is > GCC 5. @@ -1022,7 +1018,7 @@ supplies a generic doubly-linked list and some string functions.") ("unzip" ,unzip))) (inputs `(("libjpeg" ,libjpeg) - ;("libjxr" ,libjxr) + ("libjxr" ,libjxr) ("libpng" ,libpng) ("libraw" ,libraw) ("libtiff" ,libtiff) diff --git a/gnu/packages/patches/freeimage-CVE-2015-0852.patch b/gnu/packages/patches/freeimage-CVE-2015-0852.patch deleted file mode 100644 index 34d538e925..0000000000 --- a/gnu/packages/patches/freeimage-CVE-2015-0852.patch +++ /dev/null @@ -1,129 +0,0 @@ -Copied from Debian. - -Description: fix integer overflow -Origin: upstream - http://freeimage.cvs.sourceforge.net/viewvc/freeimage/FreeImage/Source/FreeImage/PluginPCX.cpp?view=patch&r1=1.17&r2=1.18&pathrev=MAIN - http://freeimage.cvs.sourceforge.net/viewvc/freeimage/FreeImage/Source/FreeImage/PluginPCX.cpp?view=patch&r1=1.18&r2=1.19&pathrev=MAIN -Bug-Debian: https://bugs.debian.org/797165 -Last-Update: 2015-09-14 ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ -Index: freeimage/Source/FreeImage/PluginPCX.cpp -=================================================================== ---- freeimage.orig/Source/FreeImage/PluginPCX.cpp -+++ freeimage/Source/FreeImage/PluginPCX.cpp -@@ -347,12 +347,14 @@ Load(FreeImageIO *io, fi_handle handle, - - try { - // check PCX identifier -- -- long start_pos = io->tell_proc(handle); -- BOOL validated = pcx_validate(io, handle); -- io->seek_proc(handle, start_pos, SEEK_SET); -- if(!validated) { -- throw FI_MSG_ERROR_MAGIC_NUMBER; -+ // (note: should have been already validated using FreeImage_GetFileType but check again) -+ { -+ long start_pos = io->tell_proc(handle); -+ BOOL validated = pcx_validate(io, handle); -+ io->seek_proc(handle, start_pos, SEEK_SET); -+ if(!validated) { -+ throw FI_MSG_ERROR_MAGIC_NUMBER; -+ } - } - - // process the header -@@ -366,20 +368,38 @@ Load(FreeImageIO *io, fi_handle handle, - SwapHeader(&header); - #endif - -- // allocate a new DIB -+ // process the window -+ const WORD *window = header.window; // left, upper, right,lower pixel coord. -+ const int left = window[0]; -+ const int top = window[1]; -+ const int right = window[2]; -+ const int bottom = window[3]; - -- unsigned width = header.window[2] - header.window[0] + 1; -- unsigned height = header.window[3] - header.window[1] + 1; -- unsigned bitcount = header.bpp * header.planes; -- -- if (bitcount == 24) { -- dib = FreeImage_AllocateHeader(header_only, width, height, bitcount, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); -- } else { -- dib = FreeImage_AllocateHeader(header_only, width, height, bitcount); -+ // check image size -+ if((left >= right) || (top >= bottom)) { -+ throw FI_MSG_ERROR_PARSING; - } - -- // if the dib couldn't be allocated, throw an error -+ const unsigned width = right - left + 1; -+ const unsigned height = bottom - top + 1; -+ const unsigned bitcount = header.bpp * header.planes; -+ -+ // allocate a new DIB -+ switch(bitcount) { -+ case 1: -+ case 4: -+ case 8: -+ dib = FreeImage_AllocateHeader(header_only, width, height, bitcount); -+ break; -+ case 24: -+ dib = FreeImage_AllocateHeader(header_only, width, height, bitcount, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); -+ break; -+ default: -+ throw FI_MSG_ERROR_DIB_MEMORY; -+ break; -+ } - -+ // if the dib couldn't be allocated, throw an error - if (!dib) { - throw FI_MSG_ERROR_DIB_MEMORY; - } -@@ -426,19 +446,23 @@ Load(FreeImageIO *io, fi_handle handle, - - if (palette_id == 0x0C) { - BYTE *cmap = (BYTE*)malloc(768 * sizeof(BYTE)); -- io->read_proc(cmap, 768, 1, handle); - -- pal = FreeImage_GetPalette(dib); -- BYTE *pColormap = &cmap[0]; -+ if(cmap) { -+ io->read_proc(cmap, 768, 1, handle); - -- for(int i = 0; i < 256; i++) { -- pal[i].rgbRed = pColormap[0]; -- pal[i].rgbGreen = pColormap[1]; -- pal[i].rgbBlue = pColormap[2]; -- pColormap += 3; -+ pal = FreeImage_GetPalette(dib); -+ BYTE *pColormap = &cmap[0]; -+ -+ for(int i = 0; i < 256; i++) { -+ pal[i].rgbRed = pColormap[0]; -+ pal[i].rgbGreen = pColormap[1]; -+ pal[i].rgbBlue = pColormap[2]; -+ pColormap += 3; -+ } -+ -+ free(cmap); - } - -- free(cmap); - } - - // wrong palette ID, perhaps a gray scale is needed ? -@@ -466,9 +490,9 @@ Load(FreeImageIO *io, fi_handle handle, - // calculate the line length for the PCX and the DIB - - // length of raster line in bytes -- unsigned linelength = header.bytes_per_line * header.planes; -+ const unsigned linelength = header.bytes_per_line * header.planes; - // length of DIB line (rounded to DWORD) in bytes -- unsigned pitch = FreeImage_GetPitch(dib); -+ const unsigned pitch = FreeImage_GetPitch(dib); - - // run-length encoding ? - diff --git a/gnu/packages/patches/freeimage-CVE-2016-5684.patch b/gnu/packages/patches/freeimage-CVE-2016-5684.patch deleted file mode 100644 index 2fc02d7b0d..0000000000 --- a/gnu/packages/patches/freeimage-CVE-2016-5684.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Debian Science Maintainers - -Date: Mon, 10 Oct 2016 08:22:44 +0100 -Subject: CVE-2016-5684 - ---- - Source/FreeImage/PluginXPM.cpp | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/Source/FreeImage/PluginXPM.cpp b/Source/FreeImage/PluginXPM.cpp -index a698321..cc7bd07 100644 ---- a/Source/FreeImage/PluginXPM.cpp -+++ b/Source/FreeImage/PluginXPM.cpp -@@ -181,6 +181,11 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - } - free(str); - -+ // check info string -+ if((width <= 0) || (height <= 0) || (colors <= 0) || (cpp <= 0)) { -+ throw "Improperly formed info string"; -+ } -+ - if (colors > 256) { - dib = FreeImage_AllocateHeader(header_only, width, height, 24, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); - } else { -@@ -193,7 +198,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { - FILE_RGBA rgba; - - str = ReadString(io, handle); -- if(!str) -+ if(!str || (strlen(str) < (size_t)cpp)) - throw "Error reading color strings"; - - std::string chrs(str,cpp); //create a string for the color chars using the first cpp chars diff --git a/gnu/packages/patches/freeimage-fix-build-with-gcc-5.patch b/gnu/packages/patches/freeimage-fix-build-with-gcc-5.patch deleted file mode 100644 index 2c9f2c3357..0000000000 --- a/gnu/packages/patches/freeimage-fix-build-with-gcc-5.patch +++ /dev/null @@ -1,1453 +0,0 @@ -The original patch was downloaded from here: -https://chromium-review.googlesource.com/c/297211 - -The paths, file names, and line endings have been adapted. - -From eebaf97f5a1cb713d81d311308d8a48c124e5aef Mon Sep 17 00:00:00 2001 -From: James Zern -Date: Wed, 02 Sep 2015 23:21:13 -0700 -Subject: [PATCH] dsp/mips: add whitespace around stringizing operator - -fixes compile with gcc 5.1 -BUG=259 - -Change-Id: Ideb39c6290ab8569b1b6cc835bea11c822d0286c ---- - -diff --git a/Source/LibWebP/src/dsp/dsp.dec_mips_dsp_r2.c b/Source/LibWebP/src/dsp/dsp.dec_mips_dsp_r2.c -index 6590f43..40e4d82 100644 ---- a/Source/LibWebP/src/dsp/dsp.dec_mips_dsp_r2.c -+++ b/Source/LibWebP/src/dsp/dsp.dec_mips_dsp_r2.c -@@ -548,10 +548,10 @@ - // TEMP3 = SRC[D + D1 * BPS] - #define LOAD_4_BYTES(TEMP0, TEMP1, TEMP2, TEMP3, \ - A, A1, B, B1, C, C1, D, D1, SRC) \ -- "lbu %["#TEMP0"], "#A"+"#A1"*"XSTR(BPS)"(%["#SRC"]) \n\t" \ -- "lbu %["#TEMP1"], "#B"+"#B1"*"XSTR(BPS)"(%["#SRC"]) \n\t" \ -- "lbu %["#TEMP2"], "#C"+"#C1"*"XSTR(BPS)"(%["#SRC"]) \n\t" \ -- "lbu %["#TEMP3"], "#D"+"#D1"*"XSTR(BPS)"(%["#SRC"]) \n\t" \ -+ "lbu %[" #TEMP0 "], " #A "+" #A1 "*"XSTR(BPS)"(%[" #SRC "]) \n\t" \ -+ "lbu %[" #TEMP1 "], " #B "+" #B1 "*"XSTR(BPS)"(%[" #SRC "]) \n\t" \ -+ "lbu %[" #TEMP2 "], " #C "+" #C1 "*"XSTR(BPS)"(%[" #SRC "]) \n\t" \ -+ "lbu %[" #TEMP3 "], " #D "+" #D1 "*"XSTR(BPS)"(%[" #SRC "]) \n\t" \ - - static void SimpleHFilter16(uint8_t* p, int stride, int thresh) { - int i; -@@ -623,8 +623,8 @@ - // DST[A * BPS] = TEMP0 - // DST[B + C * BPS] = TEMP1 - #define STORE_8_BYTES(TEMP0, TEMP1, A, B, C, DST) \ -- "usw %["#TEMP0"], "#A"*"XSTR(BPS)"(%["#DST"]) \n\t" \ -- "usw %["#TEMP1"], "#B"+"#C"*"XSTR(BPS)"(%["#DST"]) \n\t" -+ "usw %[" #TEMP0 "], " #A "*"XSTR(BPS)"(%[" #DST "]) \n\t" \ -+ "usw %[" #TEMP1 "], " #B "+" #C "*"XSTR(BPS)"(%[" #DST "]) \n\t" - - static void VE4(uint8_t* dst) { // vertical - const uint8_t* top = dst - BPS; -@@ -725,8 +725,8 @@ - // TEMP0 = SRC[A * BPS] - // TEMP1 = SRC[B + C * BPS] - #define LOAD_8_BYTES(TEMP0, TEMP1, A, B, C, SRC) \ -- "ulw %["#TEMP0"], "#A"*"XSTR(BPS)"(%["#SRC"]) \n\t" \ -- "ulw %["#TEMP1"], "#B"+"#C"*"XSTR(BPS)"(%["#SRC"]) \n\t" -+ "ulw %[" #TEMP0 "], " #A "*"XSTR(BPS)"(%[" #SRC "]) \n\t" \ -+ "ulw %[" #TEMP1 "], " #B "+" #C "*"XSTR(BPS)"(%[" #SRC "]) \n\t" - - static void LD4(uint8_t* dst) { // Down-Left - int temp0, temp1, temp2, temp3, temp4; -@@ -873,24 +873,24 @@ - #define CLIPPING(SIZE) \ - "preceu.ph.qbl %[temp2], %[temp0] \n\t" \ - "preceu.ph.qbr %[temp0], %[temp0] \n\t" \ --".if "#SIZE" == 8 \n\t" \ -+".if " #SIZE " == 8 \n\t" \ - "preceu.ph.qbl %[temp3], %[temp1] \n\t" \ - "preceu.ph.qbr %[temp1], %[temp1] \n\t" \ - ".endif \n\t" \ - "addu.ph %[temp2], %[temp2], %[dst_1] \n\t" \ - "addu.ph %[temp0], %[temp0], %[dst_1] \n\t" \ --".if "#SIZE" == 8 \n\t" \ -+".if " #SIZE " == 8 \n\t" \ - "addu.ph %[temp3], %[temp3], %[dst_1] \n\t" \ - "addu.ph %[temp1], %[temp1], %[dst_1] \n\t" \ - ".endif \n\t" \ - "shll_s.ph %[temp2], %[temp2], 7 \n\t" \ - "shll_s.ph %[temp0], %[temp0], 7 \n\t" \ --".if "#SIZE" == 8 \n\t" \ -+".if " #SIZE " == 8 \n\t" \ - "shll_s.ph %[temp3], %[temp3], 7 \n\t" \ - "shll_s.ph %[temp1], %[temp1], 7 \n\t" \ - ".endif \n\t" \ - "precrqu_s.qb.ph %[temp0], %[temp2], %[temp0] \n\t" \ --".if "#SIZE" == 8 \n\t" \ -+".if " #SIZE " == 8 \n\t" \ - "precrqu_s.qb.ph %[temp1], %[temp3], %[temp1] \n\t" \ - ".endif \n\t" - -@@ -899,7 +899,7 @@ - int dst_1 = ((int)(DST)[-1] << 16) + (DST)[-1]; \ - int temp0, temp1, temp2, temp3; \ - __asm__ volatile ( \ -- ".if "#SIZE" < 8 \n\t" \ -+ ".if " #SIZE " < 8 \n\t" \ - "ulw %[temp0], 0(%[top]) \n\t" \ - "subu.ph %[dst_1], %[dst_1], %[top_1] \n\t" \ - CLIPPING(4) \ -@@ -911,7 +911,7 @@ - CLIPPING(8) \ - "usw %[temp0], 0(%[dst]) \n\t" \ - "usw %[temp1], 4(%[dst]) \n\t" \ -- ".if "#SIZE" == 16 \n\t" \ -+ ".if " #SIZE " == 16 \n\t" \ - "ulw %[temp0], 8(%[top]) \n\t" \ - "ulw %[temp1], 12(%[top]) \n\t" \ - CLIPPING(8) \ -diff --git a/Source/LibWebP/src/dsp/dsp.enc_mips32.c b/Source/LibWebP/src/dsp/dsp.enc_mips32.c -index c5837f1..b50e08b 100644 ---- a/Source/LibWebP/src/dsp/dsp.enc_mips32.c -+++ b/Source/LibWebP/src/dsp/dsp.enc_mips32.c -@@ -31,26 +31,26 @@ - // TEMP0..TEMP3 - registers for corresponding tmp elements - // TEMP4..TEMP5 - temporary registers - #define VERTICAL_PASS(A, B, C, D, TEMP4, TEMP0, TEMP1, TEMP2, TEMP3) \ -- "lh %[temp16], "#A"(%[temp20]) \n\t" \ -- "lh %[temp18], "#B"(%[temp20]) \n\t" \ -- "lh %[temp17], "#C"(%[temp20]) \n\t" \ -- "lh %[temp19], "#D"(%[temp20]) \n\t" \ -- "addu %["#TEMP4"], %[temp16], %[temp18] \n\t" \ -- "subu %[temp16], %[temp16], %[temp18] \n\t" \ -- "mul %["#TEMP0"], %[temp17], %[kC2] \n\t" \ -- "mul %[temp18], %[temp19], %[kC1] \n\t" \ -- "mul %[temp17], %[temp17], %[kC1] \n\t" \ -- "mul %[temp19], %[temp19], %[kC2] \n\t" \ -- "sra %["#TEMP0"], %["#TEMP0"], 16 \n\n" \ -- "sra %[temp18], %[temp18], 16 \n\n" \ -- "sra %[temp17], %[temp17], 16 \n\n" \ -- "sra %[temp19], %[temp19], 16 \n\n" \ -- "subu %["#TEMP2"], %["#TEMP0"], %[temp18] \n\t" \ -- "addu %["#TEMP3"], %[temp17], %[temp19] \n\t" \ -- "addu %["#TEMP0"], %["#TEMP4"], %["#TEMP3"] \n\t" \ -- "addu %["#TEMP1"], %[temp16], %["#TEMP2"] \n\t" \ -- "subu %["#TEMP2"], %[temp16], %["#TEMP2"] \n\t" \ -- "subu %["#TEMP3"], %["#TEMP4"], %["#TEMP3"] \n\t" -+ "lh %[temp16], " #A "(%[temp20]) \n\t" \ -+ "lh %[temp18], " #B "(%[temp20]) \n\t" \ -+ "lh %[temp17], " #C "(%[temp20]) \n\t" \ -+ "lh %[temp19], " #D "(%[temp20]) \n\t" \ -+ "addu %[" #TEMP4 "], %[temp16], %[temp18] \n\t" \ -+ "subu %[temp16], %[temp16], %[temp18] \n\t" \ -+ "mul %[" #TEMP0 "], %[temp17], %[kC2] \n\t" \ -+ "mul %[temp18], %[temp19], %[kC1] \n\t" \ -+ "mul %[temp17], %[temp17], %[kC1] \n\t" \ -+ "mul %[temp19], %[temp19], %[kC2] \n\t" \ -+ "sra %[" #TEMP0 "], %[" #TEMP0 "], 16 \n\n" \ -+ "sra %[temp18], %[temp18], 16 \n\n" \ -+ "sra %[temp17], %[temp17], 16 \n\n" \ -+ "sra %[temp19], %[temp19], 16 \n\n" \ -+ "subu %[" #TEMP2 "], %[" #TEMP0 "], %[temp18] \n\t" \ -+ "addu %[" #TEMP3 "], %[temp17], %[temp19] \n\t" \ -+ "addu %[" #TEMP0 "], %[" #TEMP4 "], %[" #TEMP3 "] \n\t" \ -+ "addu %[" #TEMP1 "], %[temp16], %[" #TEMP2 "] \n\t" \ -+ "subu %[" #TEMP2 "], %[temp16], %[" #TEMP2 "] \n\t" \ -+ "subu %[" #TEMP3 "], %[" #TEMP4 "], %[" #TEMP3 "] \n\t" - - // macro for one horizontal pass in ITransformOne - // MUL and STORE macros inlined -@@ -58,59 +58,59 @@ - // temp0..temp15 holds tmp[0]..tmp[15] - // A - offset in bytes to load from ref and store to dst buffer - // TEMP0, TEMP4, TEMP8 and TEMP12 - registers for corresponding tmp elements --#define HORIZONTAL_PASS(A, TEMP0, TEMP4, TEMP8, TEMP12) \ -- "addiu %["#TEMP0"], %["#TEMP0"], 4 \n\t" \ -- "addu %[temp16], %["#TEMP0"], %["#TEMP8"] \n\t" \ -- "subu %[temp17], %["#TEMP0"], %["#TEMP8"] \n\t" \ -- "mul %["#TEMP0"], %["#TEMP4"], %[kC2] \n\t" \ -- "mul %["#TEMP8"], %["#TEMP12"], %[kC1] \n\t" \ -- "mul %["#TEMP4"], %["#TEMP4"], %[kC1] \n\t" \ -- "mul %["#TEMP12"], %["#TEMP12"], %[kC2] \n\t" \ -- "sra %["#TEMP0"], %["#TEMP0"], 16 \n\t" \ -- "sra %["#TEMP8"], %["#TEMP8"], 16 \n\t" \ -- "sra %["#TEMP4"], %["#TEMP4"], 16 \n\t" \ -- "sra %["#TEMP12"], %["#TEMP12"], 16 \n\t" \ -- "subu %[temp18], %["#TEMP0"], %["#TEMP8"] \n\t" \ -- "addu %[temp19], %["#TEMP4"], %["#TEMP12"] \n\t" \ -- "addu %["#TEMP0"], %[temp16], %[temp19] \n\t" \ -- "addu %["#TEMP4"], %[temp17], %[temp18] \n\t" \ -- "subu %["#TEMP8"], %[temp17], %[temp18] \n\t" \ -- "subu %["#TEMP12"], %[temp16], %[temp19] \n\t" \ -- "lw %[temp20], 0(%[args]) \n\t" \ -- "sra %["#TEMP0"], %["#TEMP0"], 3 \n\t" \ -- "sra %["#TEMP4"], %["#TEMP4"], 3 \n\t" \ -- "sra %["#TEMP8"], %["#TEMP8"], 3 \n\t" \ -- "sra %["#TEMP12"], %["#TEMP12"], 3 \n\t" \ -- "lbu %[temp16], 0+"XSTR(BPS)"*"#A"(%[temp20]) \n\t" \ -- "lbu %[temp17], 1+"XSTR(BPS)"*"#A"(%[temp20]) \n\t" \ -- "lbu %[temp18], 2+"XSTR(BPS)"*"#A"(%[temp20]) \n\t" \ -- "lbu %[temp19], 3+"XSTR(BPS)"*"#A"(%[temp20]) \n\t" \ -- "addu %["#TEMP0"], %[temp16], %["#TEMP0"] \n\t" \ -- "addu %["#TEMP4"], %[temp17], %["#TEMP4"] \n\t" \ -- "addu %["#TEMP8"], %[temp18], %["#TEMP8"] \n\t" \ -- "addu %["#TEMP12"], %[temp19], %["#TEMP12"] \n\t" \ -- "slt %[temp16], %["#TEMP0"], $zero \n\t" \ -- "slt %[temp17], %["#TEMP4"], $zero \n\t" \ -- "slt %[temp18], %["#TEMP8"], $zero \n\t" \ -- "slt %[temp19], %["#TEMP12"], $zero \n\t" \ -- "movn %["#TEMP0"], $zero, %[temp16] \n\t" \ -- "movn %["#TEMP4"], $zero, %[temp17] \n\t" \ -- "movn %["#TEMP8"], $zero, %[temp18] \n\t" \ -- "movn %["#TEMP12"], $zero, %[temp19] \n\t" \ -- "addiu %[temp20], $zero, 255 \n\t" \ -- "slt %[temp16], %["#TEMP0"], %[temp20] \n\t" \ -- "slt %[temp17], %["#TEMP4"], %[temp20] \n\t" \ -- "slt %[temp18], %["#TEMP8"], %[temp20] \n\t" \ -- "slt %[temp19], %["#TEMP12"], %[temp20] \n\t" \ -- "movz %["#TEMP0"], %[temp20], %[temp16] \n\t" \ -- "movz %["#TEMP4"], %[temp20], %[temp17] \n\t" \ -- "lw %[temp16], 8(%[args]) \n\t" \ -- "movz %["#TEMP8"], %[temp20], %[temp18] \n\t" \ -- "movz %["#TEMP12"], %[temp20], %[temp19] \n\t" \ -- "sb %["#TEMP0"], 0+"XSTR(BPS)"*"#A"(%[temp16]) \n\t" \ -- "sb %["#TEMP4"], 1+"XSTR(BPS)"*"#A"(%[temp16]) \n\t" \ -- "sb %["#TEMP8"], 2+"XSTR(BPS)"*"#A"(%[temp16]) \n\t" \ -- "sb %["#TEMP12"], 3+"XSTR(BPS)"*"#A"(%[temp16]) \n\t" -+#define HORIZONTAL_PASS(A, TEMP0, TEMP4, TEMP8, TEMP12) \ -+ "addiu %[" #TEMP0 "], %[" #TEMP0 "], 4 \n\t" \ -+ "addu %[temp16], %[" #TEMP0 "], %[" #TEMP8 "] \n\t" \ -+ "subu %[temp17], %[" #TEMP0 "], %[" #TEMP8 "] \n\t" \ -+ "mul %[" #TEMP0 "], %[" #TEMP4 "], %[kC2] \n\t" \ -+ "mul %[" #TEMP8 "], %[" #TEMP12 "], %[kC1] \n\t" \ -+ "mul %[" #TEMP4 "], %[" #TEMP4 "], %[kC1] \n\t" \ -+ "mul %[" #TEMP12 "], %[" #TEMP12 "], %[kC2] \n\t" \ -+ "sra %[" #TEMP0 "], %[" #TEMP0 "], 16 \n\t" \ -+ "sra %[" #TEMP8 "], %[" #TEMP8 "], 16 \n\t" \ -+ "sra %[" #TEMP4 "], %[" #TEMP4 "], 16 \n\t" \ -+ "sra %[" #TEMP12 "], %[" #TEMP12 "], 16 \n\t" \ -+ "subu %[temp18], %[" #TEMP0 "], %[" #TEMP8 "] \n\t" \ -+ "addu %[temp19], %[" #TEMP4 "], %[" #TEMP12 "] \n\t" \ -+ "addu %[" #TEMP0 "], %[temp16], %[temp19] \n\t" \ -+ "addu %[" #TEMP4 "], %[temp17], %[temp18] \n\t" \ -+ "subu %[" #TEMP8 "], %[temp17], %[temp18] \n\t" \ -+ "subu %[" #TEMP12 "], %[temp16], %[temp19] \n\t" \ -+ "lw %[temp20], 0(%[args]) \n\t" \ -+ "sra %[" #TEMP0 "], %[" #TEMP0 "], 3 \n\t" \ -+ "sra %[" #TEMP4 "], %[" #TEMP4 "], 3 \n\t" \ -+ "sra %[" #TEMP8 "], %[" #TEMP8 "], 3 \n\t" \ -+ "sra %[" #TEMP12 "], %[" #TEMP12 "], 3 \n\t" \ -+ "lbu %[temp16], 0+"XSTR(BPS)"*" #A "(%[temp20]) \n\t" \ -+ "lbu %[temp17], 1+"XSTR(BPS)"*" #A "(%[temp20]) \n\t" \ -+ "lbu %[temp18], 2+"XSTR(BPS)"*" #A "(%[temp20]) \n\t" \ -+ "lbu %[temp19], 3+"XSTR(BPS)"*" #A "(%[temp20]) \n\t" \ -+ "addu %[" #TEMP0 "], %[temp16], %[" #TEMP0 "] \n\t" \ -+ "addu %[" #TEMP4 "], %[temp17], %[" #TEMP4 "] \n\t" \ -+ "addu %[" #TEMP8 "], %[temp18], %[" #TEMP8 "] \n\t" \ -+ "addu %[" #TEMP12 "], %[temp19], %[" #TEMP12 "] \n\t" \ -+ "slt %[temp16], %[" #TEMP0 "], $zero \n\t" \ -+ "slt %[temp17], %[" #TEMP4 "], $zero \n\t" \ -+ "slt %[temp18], %[" #TEMP8 "], $zero \n\t" \ -+ "slt %[temp19], %[" #TEMP12 "], $zero \n\t" \ -+ "movn %[" #TEMP0 "], $zero, %[temp16] \n\t" \ -+ "movn %[" #TEMP4 "], $zero, %[temp17] \n\t" \ -+ "movn %[" #TEMP8 "], $zero, %[temp18] \n\t" \ -+ "movn %[" #TEMP12 "], $zero, %[temp19] \n\t" \ -+ "addiu %[temp20], $zero, 255 \n\t" \ -+ "slt %[temp16], %[" #TEMP0 "], %[temp20] \n\t" \ -+ "slt %[temp17], %[" #TEMP4 "], %[temp20] \n\t" \ -+ "slt %[temp18], %[" #TEMP8 "], %[temp20] \n\t" \ -+ "slt %[temp19], %[" #TEMP12 "], %[temp20] \n\t" \ -+ "movz %[" #TEMP0 "], %[temp20], %[temp16] \n\t" \ -+ "movz %[" #TEMP4 "], %[temp20], %[temp17] \n\t" \ -+ "lw %[temp16], 8(%[args]) \n\t" \ -+ "movz %[" #TEMP8 "], %[temp20], %[temp18] \n\t" \ -+ "movz %[" #TEMP12 "], %[temp20], %[temp19] \n\t" \ -+ "sb %[" #TEMP0 "], 0+"XSTR(BPS)"*" #A "(%[temp16]) \n\t" \ -+ "sb %[" #TEMP4 "], 1+"XSTR(BPS)"*" #A "(%[temp16]) \n\t" \ -+ "sb %[" #TEMP8 "], 2+"XSTR(BPS)"*" #A "(%[temp16]) \n\t" \ -+ "sb %[" #TEMP12 "], 3+"XSTR(BPS)"*" #A "(%[temp16]) \n\t" - - // Does one or two inverse transforms. - static WEBP_INLINE void ITransformOne(const uint8_t* ref, const int16_t* in, -@@ -161,9 +161,9 @@ - // K - offset in bytes (kZigzag[n] * 4) - // N - offset in bytes (n * 2) - #define QUANTIZE_ONE(J, K, N) \ -- "lh %[temp0], "#J"(%[ppin]) \n\t" \ -- "lhu %[temp1], "#J"(%[ppsharpen]) \n\t" \ -- "lw %[temp2], "#K"(%[ppzthresh]) \n\t" \ -+ "lh %[temp0], " #J "(%[ppin]) \n\t" \ -+ "lhu %[temp1], " #J "(%[ppsharpen]) \n\t" \ -+ "lw %[temp2], " #K "(%[ppzthresh]) \n\t" \ - "sra %[sign], %[temp0], 15 \n\t" \ - "xor %[coeff], %[temp0], %[sign] \n\t" \ - "subu %[coeff], %[coeff], %[sign] \n\t" \ -@@ -172,9 +172,9 @@ - "addiu %[temp5], $zero, 0 \n\t" \ - "addiu %[level], $zero, 0 \n\t" \ - "beqz %[temp4], 2f \n\t" \ -- "lhu %[temp1], "#J"(%[ppiq]) \n\t" \ -- "lw %[temp2], "#K"(%[ppbias]) \n\t" \ -- "lhu %[temp3], "#J"(%[ppq]) \n\t" \ -+ "lhu %[temp1], " #J "(%[ppiq]) \n\t" \ -+ "lw %[temp2], " #K "(%[ppbias]) \n\t" \ -+ "lhu %[temp3], " #J "(%[ppq]) \n\t" \ - "mul %[level], %[coeff], %[temp1] \n\t" \ - "addu %[level], %[level], %[temp2] \n\t" \ - "sra %[level], %[level], 17 \n\t" \ -@@ -184,8 +184,8 @@ - "subu %[level], %[level], %[sign] \n\t" \ - "mul %[temp5], %[level], %[temp3] \n\t" \ - "2: \n\t" \ -- "sh %[temp5], "#J"(%[ppin]) \n\t" \ -- "sh %[level], "#N"(%[pout]) \n\t" -+ "sh %[temp5], " #J "(%[ppin]) \n\t" \ -+ "sh %[level], " #N "(%[pout]) \n\t" - - static int QuantizeBlock(int16_t in[16], int16_t out[16], - const VP8Matrix* const mtx) { -@@ -253,39 +253,39 @@ - // A - offset in bytes to load from a and b buffers - // E..H - offsets in bytes to store first results to tmp buffer - // E1..H1 - offsets in bytes to store second results to tmp buffer --#define HORIZONTAL_PASS(A, E, F, G, H, E1, F1, G1, H1) \ -- "lbu %[temp0], 0+"XSTR(BPS)"*"#A"(%[a]) \n\t" \ -- "lbu %[temp1], 1+"XSTR(BPS)"*"#A"(%[a]) \n\t" \ -- "lbu %[temp2], 2+"XSTR(BPS)"*"#A"(%[a]) \n\t" \ -- "lbu %[temp3], 3+"XSTR(BPS)"*"#A"(%[a]) \n\t" \ -- "lbu %[temp4], 0+"XSTR(BPS)"*"#A"(%[b]) \n\t" \ -- "lbu %[temp5], 1+"XSTR(BPS)"*"#A"(%[b]) \n\t" \ -- "lbu %[temp6], 2+"XSTR(BPS)"*"#A"(%[b]) \n\t" \ -- "lbu %[temp7], 3+"XSTR(BPS)"*"#A"(%[b]) \n\t" \ -- "addu %[temp8], %[temp0], %[temp2] \n\t" \ -- "subu %[temp0], %[temp0], %[temp2] \n\t" \ -- "addu %[temp2], %[temp1], %[temp3] \n\t" \ -- "subu %[temp1], %[temp1], %[temp3] \n\t" \ -- "addu %[temp3], %[temp4], %[temp6] \n\t" \ -- "subu %[temp4], %[temp4], %[temp6] \n\t" \ -- "addu %[temp6], %[temp5], %[temp7] \n\t" \ -- "subu %[temp5], %[temp5], %[temp7] \n\t" \ -- "addu %[temp7], %[temp8], %[temp2] \n\t" \ -- "subu %[temp2], %[temp8], %[temp2] \n\t" \ -- "addu %[temp8], %[temp0], %[temp1] \n\t" \ -- "subu %[temp0], %[temp0], %[temp1] \n\t" \ -- "addu %[temp1], %[temp3], %[temp6] \n\t" \ -- "subu %[temp3], %[temp3], %[temp6] \n\t" \ -- "addu %[temp6], %[temp4], %[temp5] \n\t" \ -- "subu %[temp4], %[temp4], %[temp5] \n\t" \ -- "sw %[temp7], "#E"(%[tmp]) \n\t" \ -- "sw %[temp2], "#H"(%[tmp]) \n\t" \ -- "sw %[temp8], "#F"(%[tmp]) \n\t" \ -- "sw %[temp0], "#G"(%[tmp]) \n\t" \ -- "sw %[temp1], "#E1"(%[tmp]) \n\t" \ -- "sw %[temp3], "#H1"(%[tmp]) \n\t" \ -- "sw %[temp6], "#F1"(%[tmp]) \n\t" \ -- "sw %[temp4], "#G1"(%[tmp]) \n\t" -+#define HORIZONTAL_PASS(A, E, F, G, H, E1, F1, G1, H1) \ -+ "lbu %[temp0], 0+"XSTR(BPS)"*" #A "(%[a]) \n\t" \ -+ "lbu %[temp1], 1+"XSTR(BPS)"*" #A "(%[a]) \n\t" \ -+ "lbu %[temp2], 2+"XSTR(BPS)"*" #A "(%[a]) \n\t" \ -+ "lbu %[temp3], 3+"XSTR(BPS)"*" #A "(%[a]) \n\t" \ -+ "lbu %[temp4], 0+"XSTR(BPS)"*" #A "(%[b]) \n\t" \ -+ "lbu %[temp5], 1+"XSTR(BPS)"*" #A "(%[b]) \n\t" \ -+ "lbu %[temp6], 2+"XSTR(BPS)"*" #A "(%[b]) \n\t" \ -+ "lbu %[temp7], 3+"XSTR(BPS)"*" #A "(%[b]) \n\t" \ -+ "addu %[temp8], %[temp0], %[temp2] \n\t" \ -+ "subu %[temp0], %[temp0], %[temp2] \n\t" \ -+ "addu %[temp2], %[temp1], %[temp3] \n\t" \ -+ "subu %[temp1], %[temp1], %[temp3] \n\t" \ -+ "addu %[temp3], %[temp4], %[temp6] \n\t" \ -+ "subu %[temp4], %[temp4], %[temp6] \n\t" \ -+ "addu %[temp6], %[temp5], %[temp7] \n\t" \ -+ "subu %[temp5], %[temp5], %[temp7] \n\t" \ -+ "addu %[temp7], %[temp8], %[temp2] \n\t" \ -+ "subu %[temp2], %[temp8], %[temp2] \n\t" \ -+ "addu %[temp8], %[temp0], %[temp1] \n\t" \ -+ "subu %[temp0], %[temp0], %[temp1] \n\t" \ -+ "addu %[temp1], %[temp3], %[temp6] \n\t" \ -+ "subu %[temp3], %[temp3], %[temp6] \n\t" \ -+ "addu %[temp6], %[temp4], %[temp5] \n\t" \ -+ "subu %[temp4], %[temp4], %[temp5] \n\t" \ -+ "sw %[temp7], " #E "(%[tmp]) \n\t" \ -+ "sw %[temp2], " #H "(%[tmp]) \n\t" \ -+ "sw %[temp8], " #F "(%[tmp]) \n\t" \ -+ "sw %[temp0], " #G "(%[tmp]) \n\t" \ -+ "sw %[temp1], " #E1 "(%[tmp]) \n\t" \ -+ "sw %[temp3], " #H1 "(%[tmp]) \n\t" \ -+ "sw %[temp6], " #F1 "(%[tmp]) \n\t" \ -+ "sw %[temp4], " #G1 "(%[tmp]) \n\t" - - // macro for one vertical pass in Disto4x4 (TTransform) - // two calls of function TTransform are merged into single one -@@ -300,10 +300,10 @@ - // A1..D1 - offsets in bytes to load second results from tmp buffer - // E..H - offsets in bytes to load from w buffer - #define VERTICAL_PASS(A, B, C, D, A1, B1, C1, D1, E, F, G, H) \ -- "lw %[temp0], "#A1"(%[tmp]) \n\t" \ -- "lw %[temp1], "#C1"(%[tmp]) \n\t" \ -- "lw %[temp2], "#B1"(%[tmp]) \n\t" \ -- "lw %[temp3], "#D1"(%[tmp]) \n\t" \ -+ "lw %[temp0], " #A1 "(%[tmp]) \n\t" \ -+ "lw %[temp1], " #C1 "(%[tmp]) \n\t" \ -+ "lw %[temp2], " #B1 "(%[tmp]) \n\t" \ -+ "lw %[temp3], " #D1 "(%[tmp]) \n\t" \ - "addu %[temp8], %[temp0], %[temp1] \n\t" \ - "subu %[temp0], %[temp0], %[temp1] \n\t" \ - "addu %[temp1], %[temp2], %[temp3] \n\t" \ -@@ -324,18 +324,18 @@ - "subu %[temp1], %[temp1], %[temp5] \n\t" \ - "subu %[temp0], %[temp0], %[temp6] \n\t" \ - "subu %[temp8], %[temp8], %[temp7] \n\t" \ -- "lhu %[temp4], "#E"(%[w]) \n\t" \ -- "lhu %[temp5], "#F"(%[w]) \n\t" \ -- "lhu %[temp6], "#G"(%[w]) \n\t" \ -- "lhu %[temp7], "#H"(%[w]) \n\t" \ -+ "lhu %[temp4], " #E "(%[w]) \n\t" \ -+ "lhu %[temp5], " #F "(%[w]) \n\t" \ -+ "lhu %[temp6], " #G "(%[w]) \n\t" \ -+ "lhu %[temp7], " #H "(%[w]) \n\t" \ - "madd %[temp4], %[temp3] \n\t" \ - "madd %[temp5], %[temp1] \n\t" \ - "madd %[temp6], %[temp0] \n\t" \ - "madd %[temp7], %[temp8] \n\t" \ -- "lw %[temp0], "#A"(%[tmp]) \n\t" \ -- "lw %[temp1], "#C"(%[tmp]) \n\t" \ -- "lw %[temp2], "#B"(%[tmp]) \n\t" \ -- "lw %[temp3], "#D"(%[tmp]) \n\t" \ -+ "lw %[temp0], " #A "(%[tmp]) \n\t" \ -+ "lw %[temp1], " #C "(%[tmp]) \n\t" \ -+ "lw %[temp2], " #B "(%[tmp]) \n\t" \ -+ "lw %[temp3], " #D "(%[tmp]) \n\t" \ - "addu %[temp8], %[temp0], %[temp1] \n\t" \ - "subu %[temp0], %[temp0], %[temp1] \n\t" \ - "addu %[temp1], %[temp2], %[temp3] \n\t" \ -@@ -412,71 +412,71 @@ - // temp0..temp15 holds tmp[0]..tmp[15] - // A - offset in bytes to load from src and ref buffers - // TEMP0..TEMP3 - registers for corresponding tmp elements --#define HORIZONTAL_PASS(A, TEMP0, TEMP1, TEMP2, TEMP3) \ -- "lw %["#TEMP1"], 0(%[args]) \n\t" \ -- "lw %["#TEMP2"], 4(%[args]) \n\t" \ -- "lbu %[temp16], 0+"XSTR(BPS)"*"#A"(%["#TEMP1"]) \n\t" \ -- "lbu %[temp17], 0+"XSTR(BPS)"*"#A"(%["#TEMP2"]) \n\t" \ -- "lbu %[temp18], 1+"XSTR(BPS)"*"#A"(%["#TEMP1"]) \n\t" \ -- "lbu %[temp19], 1+"XSTR(BPS)"*"#A"(%["#TEMP2"]) \n\t" \ -- "subu %[temp20], %[temp16], %[temp17] \n\t" \ -- "lbu %[temp16], 2+"XSTR(BPS)"*"#A"(%["#TEMP1"]) \n\t" \ -- "lbu %[temp17], 2+"XSTR(BPS)"*"#A"(%["#TEMP2"]) \n\t" \ -- "subu %["#TEMP0"], %[temp18], %[temp19] \n\t" \ -- "lbu %[temp18], 3+"XSTR(BPS)"*"#A"(%["#TEMP1"]) \n\t" \ -- "lbu %[temp19], 3+"XSTR(BPS)"*"#A"(%["#TEMP2"]) \n\t" \ -- "subu %["#TEMP1"], %[temp16], %[temp17] \n\t" \ -- "subu %["#TEMP2"], %[temp18], %[temp19] \n\t" \ -- "addu %["#TEMP3"], %[temp20], %["#TEMP2"] \n\t" \ -- "subu %["#TEMP2"], %[temp20], %["#TEMP2"] \n\t" \ -- "addu %[temp20], %["#TEMP0"], %["#TEMP1"] \n\t" \ -- "subu %["#TEMP0"], %["#TEMP0"], %["#TEMP1"] \n\t" \ -- "mul %[temp16], %["#TEMP2"], %[c5352] \n\t" \ -- "mul %[temp17], %["#TEMP2"], %[c2217] \n\t" \ -- "mul %[temp18], %["#TEMP0"], %[c5352] \n\t" \ -- "mul %[temp19], %["#TEMP0"], %[c2217] \n\t" \ -- "addu %["#TEMP1"], %["#TEMP3"], %[temp20] \n\t" \ -- "subu %[temp20], %["#TEMP3"], %[temp20] \n\t" \ -- "sll %["#TEMP0"], %["#TEMP1"], 3 \n\t" \ -- "sll %["#TEMP2"], %[temp20], 3 \n\t" \ -- "addiu %[temp16], %[temp16], 1812 \n\t" \ -- "addiu %[temp17], %[temp17], 937 \n\t" \ -- "addu %[temp16], %[temp16], %[temp19] \n\t" \ -- "subu %[temp17], %[temp17], %[temp18] \n\t" \ -- "sra %["#TEMP1"], %[temp16], 9 \n\t" \ -- "sra %["#TEMP3"], %[temp17], 9 \n\t" -+#define HORIZONTAL_PASS(A, TEMP0, TEMP1, TEMP2, TEMP3) \ -+ "lw %[" #TEMP1 "], 0(%[args]) \n\t" \ -+ "lw %[" #TEMP2 "], 4(%[args]) \n\t" \ -+ "lbu %[temp16], 0+"XSTR(BPS)"*" #A "(%[" #TEMP1 "]) \n\t" \ -+ "lbu %[temp17], 0+"XSTR(BPS)"*" #A "(%[" #TEMP2 "]) \n\t" \ -+ "lbu %[temp18], 1+"XSTR(BPS)"*" #A "(%[" #TEMP1 "]) \n\t" \ -+ "lbu %[temp19], 1+"XSTR(BPS)"*" #A "(%[" #TEMP2 "]) \n\t" \ -+ "subu %[temp20], %[temp16], %[temp17] \n\t" \ -+ "lbu %[temp16], 2+"XSTR(BPS)"*" #A "(%[" #TEMP1 "]) \n\t" \ -+ "lbu %[temp17], 2+"XSTR(BPS)"*" #A "(%[" #TEMP2 "]) \n\t" \ -+ "subu %[" #TEMP0 "], %[temp18], %[temp19] \n\t" \ -+ "lbu %[temp18], 3+"XSTR(BPS)"*" #A "(%[" #TEMP1 "]) \n\t" \ -+ "lbu %[temp19], 3+"XSTR(BPS)"*" #A "(%[" #TEMP2 "]) \n\t" \ -+ "subu %[" #TEMP1 "], %[temp16], %[temp17] \n\t" \ -+ "subu %[" #TEMP2 "], %[temp18], %[temp19] \n\t" \ -+ "addu %[" #TEMP3 "], %[temp20], %[" #TEMP2 "] \n\t" \ -+ "subu %[" #TEMP2 "], %[temp20], %[" #TEMP2 "] \n\t" \ -+ "addu %[temp20], %[" #TEMP0 "], %[" #TEMP1 "] \n\t" \ -+ "subu %[" #TEMP0 "], %[" #TEMP0 "], %[" #TEMP1 "] \n\t" \ -+ "mul %[temp16], %[" #TEMP2 "], %[c5352] \n\t" \ -+ "mul %[temp17], %[" #TEMP2 "], %[c2217] \n\t" \ -+ "mul %[temp18], %[" #TEMP0 "], %[c5352] \n\t" \ -+ "mul %[temp19], %[" #TEMP0 "], %[c2217] \n\t" \ -+ "addu %[" #TEMP1 "], %[" #TEMP3 "], %[temp20] \n\t" \ -+ "subu %[temp20], %[" #TEMP3 "], %[temp20] \n\t" \ -+ "sll %[" #TEMP0 "], %[" #TEMP1 "], 3 \n\t" \ -+ "sll %[" #TEMP2 "], %[temp20], 3 \n\t" \ -+ "addiu %[temp16], %[temp16], 1812 \n\t" \ -+ "addiu %[temp17], %[temp17], 937 \n\t" \ -+ "addu %[temp16], %[temp16], %[temp19] \n\t" \ -+ "subu %[temp17], %[temp17], %[temp18] \n\t" \ -+ "sra %[" #TEMP1 "], %[temp16], 9 \n\t" \ -+ "sra %[" #TEMP3 "], %[temp17], 9 \n\t" - - // macro for one vertical pass in FTransform - // temp0..temp15 holds tmp[0]..tmp[15] - // A..D - offsets in bytes to store to out buffer - // TEMP0, TEMP4, TEMP8 and TEMP12 - registers for corresponding tmp elements --#define VERTICAL_PASS(A, B, C, D, TEMP0, TEMP4, TEMP8, TEMP12) \ -- "addu %[temp16], %["#TEMP0"], %["#TEMP12"] \n\t" \ -- "subu %[temp19], %["#TEMP0"], %["#TEMP12"] \n\t" \ -- "addu %[temp17], %["#TEMP4"], %["#TEMP8"] \n\t" \ -- "subu %[temp18], %["#TEMP4"], %["#TEMP8"] \n\t" \ -- "mul %["#TEMP8"], %[temp19], %[c2217] \n\t" \ -- "mul %["#TEMP12"], %[temp18], %[c2217] \n\t" \ -- "mul %["#TEMP4"], %[temp19], %[c5352] \n\t" \ -- "mul %[temp18], %[temp18], %[c5352] \n\t" \ -- "addiu %[temp16], %[temp16], 7 \n\t" \ -- "addu %["#TEMP0"], %[temp16], %[temp17] \n\t" \ -- "sra %["#TEMP0"], %["#TEMP0"], 4 \n\t" \ -- "addu %["#TEMP12"], %["#TEMP12"], %["#TEMP4"] \n\t" \ -- "subu %["#TEMP4"], %[temp16], %[temp17] \n\t" \ -- "sra %["#TEMP4"], %["#TEMP4"], 4 \n\t" \ -- "addiu %["#TEMP8"], %["#TEMP8"], 30000 \n\t" \ -- "addiu %["#TEMP12"], %["#TEMP12"], 12000 \n\t" \ -- "addiu %["#TEMP8"], %["#TEMP8"], 21000 \n\t" \ -- "subu %["#TEMP8"], %["#TEMP8"], %[temp18] \n\t" \ -- "sra %["#TEMP12"], %["#TEMP12"], 16 \n\t" \ -- "sra %["#TEMP8"], %["#TEMP8"], 16 \n\t" \ -- "addiu %[temp16], %["#TEMP12"], 1 \n\t" \ -- "movn %["#TEMP12"], %[temp16], %[temp19] \n\t" \ -- "sh %["#TEMP0"], "#A"(%[temp20]) \n\t" \ -- "sh %["#TEMP4"], "#C"(%[temp20]) \n\t" \ -- "sh %["#TEMP8"], "#D"(%[temp20]) \n\t" \ -- "sh %["#TEMP12"], "#B"(%[temp20]) \n\t" -+#define VERTICAL_PASS(A, B, C, D, TEMP0, TEMP4, TEMP8, TEMP12) \ -+ "addu %[temp16], %[" #TEMP0 "], %[" #TEMP12 "] \n\t" \ -+ "subu %[temp19], %[" #TEMP0 "], %[" #TEMP12 "] \n\t" \ -+ "addu %[temp17], %[" #TEMP4 "], %[" #TEMP8 "] \n\t" \ -+ "subu %[temp18], %[" #TEMP4 "], %[" #TEMP8 "] \n\t" \ -+ "mul %[" #TEMP8 "], %[temp19], %[c2217] \n\t" \ -+ "mul %[" #TEMP12 "], %[temp18], %[c2217] \n\t" \ -+ "mul %[" #TEMP4 "], %[temp19], %[c5352] \n\t" \ -+ "mul %[temp18], %[temp18], %[c5352] \n\t" \ -+ "addiu %[temp16], %[temp16], 7 \n\t" \ -+ "addu %[" #TEMP0 "], %[temp16], %[temp17] \n\t" \ -+ "sra %[" #TEMP0 "], %[" #TEMP0 "], 4 \n\t" \ -+ "addu %[" #TEMP12 "], %[" #TEMP12 "], %[" #TEMP4 "] \n\t" \ -+ "subu %[" #TEMP4 "], %[temp16], %[temp17] \n\t" \ -+ "sra %[" #TEMP4 "], %[" #TEMP4 "], 4 \n\t" \ -+ "addiu %[" #TEMP8 "], %[" #TEMP8 "], 30000 \n\t" \ -+ "addiu %[" #TEMP12 "], %[" #TEMP12 "], 12000 \n\t" \ -+ "addiu %[" #TEMP8 "], %[" #TEMP8 "], 21000 \n\t" \ -+ "subu %[" #TEMP8 "], %[" #TEMP8 "], %[temp18] \n\t" \ -+ "sra %[" #TEMP12 "], %[" #TEMP12 "], 16 \n\t" \ -+ "sra %[" #TEMP8 "], %[" #TEMP8 "], 16 \n\t" \ -+ "addiu %[temp16], %[" #TEMP12 "], 1 \n\t" \ -+ "movn %[" #TEMP12 "], %[temp16], %[temp19] \n\t" \ -+ "sh %[" #TEMP0 "], " #A "(%[temp20]) \n\t" \ -+ "sh %[" #TEMP4 "], " #C "(%[temp20]) \n\t" \ -+ "sh %[" #TEMP8 "], " #D "(%[temp20]) \n\t" \ -+ "sh %[" #TEMP12 "], " #B "(%[temp20]) \n\t" - - static void FTransform(const uint8_t* src, const uint8_t* ref, int16_t* out) { - int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8; -@@ -516,14 +516,14 @@ - #if !defined(WORK_AROUND_GCC) - - #define GET_SSE_INNER(A, B, C, D) \ -- "lbu %[temp0], "#A"(%[a]) \n\t" \ -- "lbu %[temp1], "#A"(%[b]) \n\t" \ -- "lbu %[temp2], "#B"(%[a]) \n\t" \ -- "lbu %[temp3], "#B"(%[b]) \n\t" \ -- "lbu %[temp4], "#C"(%[a]) \n\t" \ -- "lbu %[temp5], "#C"(%[b]) \n\t" \ -- "lbu %[temp6], "#D"(%[a]) \n\t" \ -- "lbu %[temp7], "#D"(%[b]) \n\t" \ -+ "lbu %[temp0], " #A "(%[a]) \n\t" \ -+ "lbu %[temp1], " #A "(%[b]) \n\t" \ -+ "lbu %[temp2], " #B "(%[a]) \n\t" \ -+ "lbu %[temp3], " #B "(%[b]) \n\t" \ -+ "lbu %[temp4], " #C "(%[a]) \n\t" \ -+ "lbu %[temp5], " #C "(%[b]) \n\t" \ -+ "lbu %[temp6], " #D "(%[a]) \n\t" \ -+ "lbu %[temp7], " #D "(%[b]) \n\t" \ - "subu %[temp0], %[temp0], %[temp1] \n\t" \ - "subu %[temp2], %[temp2], %[temp3] \n\t" \ - "subu %[temp4], %[temp4], %[temp5] \n\t" \ -diff --git a/Source/LibWebP/src/dsp/dsp.enc_mips_dsp_r2.c b/Source/LibWebP/src/dsp/dsp.enc_mips_dsp_r2.c -index 56db07c..44f6fd2 100644 ---- a/Source/LibWebP/src/dsp/dsp.enc_mips_dsp_r2.c -+++ b/Source/LibWebP/src/dsp/dsp.enc_mips_dsp_r2.c -@@ -27,25 +27,25 @@ - // I - input (macro doesn't change it) - #define ADD_SUB_HALVES_X4(O0, O1, O2, O3, O4, O5, O6, O7, \ - I0, I1, I2, I3, I4, I5, I6, I7) \ -- "addq.ph %["#O0"], %["#I0"], %["#I1"] \n\t" \ -- "subq.ph %["#O1"], %["#I0"], %["#I1"] \n\t" \ -- "addq.ph %["#O2"], %["#I2"], %["#I3"] \n\t" \ -- "subq.ph %["#O3"], %["#I2"], %["#I3"] \n\t" \ -- "addq.ph %["#O4"], %["#I4"], %["#I5"] \n\t" \ -- "subq.ph %["#O5"], %["#I4"], %["#I5"] \n\t" \ -- "addq.ph %["#O6"], %["#I6"], %["#I7"] \n\t" \ -- "subq.ph %["#O7"], %["#I6"], %["#I7"] \n\t" -+ "addq.ph %[" #O0 "], %[" #I0 "], %[" #I1 "] \n\t" \ -+ "subq.ph %[" #O1 "], %[" #I0 "], %[" #I1 "] \n\t" \ -+ "addq.ph %[" #O2 "], %[" #I2 "], %[" #I3 "] \n\t" \ -+ "subq.ph %[" #O3 "], %[" #I2 "], %[" #I3 "] \n\t" \ -+ "addq.ph %[" #O4 "], %[" #I4 "], %[" #I5 "] \n\t" \ -+ "subq.ph %[" #O5 "], %[" #I4 "], %[" #I5 "] \n\t" \ -+ "addq.ph %[" #O6 "], %[" #I6 "], %[" #I7 "] \n\t" \ -+ "subq.ph %[" #O7 "], %[" #I6 "], %[" #I7 "] \n\t" - - // IO - input/output - #define ABS_X8(IO0, IO1, IO2, IO3, IO4, IO5, IO6, IO7) \ -- "absq_s.ph %["#IO0"], %["#IO0"] \n\t" \ -- "absq_s.ph %["#IO1"], %["#IO1"] \n\t" \ -- "absq_s.ph %["#IO2"], %["#IO2"] \n\t" \ -- "absq_s.ph %["#IO3"], %["#IO3"] \n\t" \ -- "absq_s.ph %["#IO4"], %["#IO4"] \n\t" \ -- "absq_s.ph %["#IO5"], %["#IO5"] \n\t" \ -- "absq_s.ph %["#IO6"], %["#IO6"] \n\t" \ -- "absq_s.ph %["#IO7"], %["#IO7"] \n\t" -+ "absq_s.ph %[" #IO0 "], %[" #IO0 "] \n\t" \ -+ "absq_s.ph %[" #IO1 "], %[" #IO1 "] \n\t" \ -+ "absq_s.ph %[" #IO2 "], %[" #IO2 "] \n\t" \ -+ "absq_s.ph %[" #IO3 "], %[" #IO3 "] \n\t" \ -+ "absq_s.ph %[" #IO4 "], %[" #IO4 "] \n\t" \ -+ "absq_s.ph %[" #IO5 "], %[" #IO5 "] \n\t" \ -+ "absq_s.ph %[" #IO6 "], %[" #IO6 "] \n\t" \ -+ "absq_s.ph %[" #IO7 "], %[" #IO7 "] \n\t" - - // dpa.w.ph $ac0 temp0 ,temp1 - // $ac += temp0[31..16] * temp1[31..16] + temp0[15..0] * temp1[15..0] -@@ -56,15 +56,15 @@ - #define MUL_HALF(O0, I0, I1, I2, I3, I4, I5, I6, I7, \ - I8, I9, I10, I11, I12, I13, I14, I15) \ - "mult $ac0, $zero, $zero \n\t" \ -- "dpa.w.ph $ac0, %["#I2"], %["#I0"] \n\t" \ -- "dpax.w.ph $ac0, %["#I5"], %["#I6"] \n\t" \ -- "dpa.w.ph $ac0, %["#I8"], %["#I9"] \n\t" \ -- "dpax.w.ph $ac0, %["#I11"], %["#I4"] \n\t" \ -- "dpa.w.ph $ac0, %["#I12"], %["#I7"] \n\t" \ -- "dpax.w.ph $ac0, %["#I13"], %["#I1"] \n\t" \ -- "dpa.w.ph $ac0, %["#I14"], %["#I3"] \n\t" \ -- "dpax.w.ph $ac0, %["#I15"], %["#I10"] \n\t" \ -- "mflo %["#O0"], $ac0 \n\t" -+ "dpa.w.ph $ac0, %[" #I2 "], %[" #I0 "] \n\t" \ -+ "dpax.w.ph $ac0, %[" #I5 "], %[" #I6 "] \n\t" \ -+ "dpa.w.ph $ac0, %[" #I8 "], %[" #I9 "] \n\t" \ -+ "dpax.w.ph $ac0, %[" #I11 "], %[" #I4 "] \n\t" \ -+ "dpa.w.ph $ac0, %[" #I12 "], %[" #I7 "] \n\t" \ -+ "dpax.w.ph $ac0, %[" #I13 "], %[" #I1 "] \n\t" \ -+ "dpa.w.ph $ac0, %[" #I14 "], %[" #I3 "] \n\t" \ -+ "dpax.w.ph $ac0, %[" #I15 "], %[" #I10 "] \n\t" \ -+ "mflo %[" #O0 "], $ac0 \n\t" - - #define OUTPUT_EARLY_CLOBBER_REGS_17() \ - OUTPUT_EARLY_CLOBBER_REGS_10(), \ -@@ -77,69 +77,69 @@ - // A - offset in bytes to load from src and ref buffers - // TEMP0..TEMP3 - registers for corresponding tmp elements - #define HORIZONTAL_PASS(A, TEMP0, TEMP1, TEMP2, TEMP3) \ -- "lw %["#TEMP0"], 0(%[args]) \n\t" \ -- "lw %["#TEMP1"], 4(%[args]) \n\t" \ -- "lw %["#TEMP2"], "XSTR(BPS)"*"#A"(%["#TEMP0"]) \n\t" \ -- "lw %["#TEMP3"], "XSTR(BPS)"*"#A"(%["#TEMP1"]) \n\t" \ -- "preceu.ph.qbl %["#TEMP0"], %["#TEMP2"] \n\t" \ -- "preceu.ph.qbl %["#TEMP1"], %["#TEMP3"] \n\t" \ -- "preceu.ph.qbr %["#TEMP2"], %["#TEMP2"] \n\t" \ -- "preceu.ph.qbr %["#TEMP3"], %["#TEMP3"] \n\t" \ -- "subq.ph %["#TEMP0"], %["#TEMP0"], %["#TEMP1"] \n\t" \ -- "subq.ph %["#TEMP2"], %["#TEMP2"], %["#TEMP3"] \n\t" \ -- "rotr %["#TEMP0"], %["#TEMP0"], 16 \n\t" \ -- "addq.ph %["#TEMP1"], %["#TEMP2"], %["#TEMP0"] \n\t" \ -- "subq.ph %["#TEMP3"], %["#TEMP2"], %["#TEMP0"] \n\t" \ -- "seh %["#TEMP0"], %["#TEMP1"] \n\t" \ -- "sra %[temp16], %["#TEMP1"], 16 \n\t" \ -- "seh %[temp19], %["#TEMP3"] \n\t" \ -- "sra %["#TEMP3"], %["#TEMP3"], 16 \n\t" \ -- "subu %["#TEMP2"], %["#TEMP0"], %[temp16] \n\t" \ -- "addu %["#TEMP0"], %["#TEMP0"], %[temp16] \n\t" \ -- "mul %[temp17], %[temp19], %[c2217] \n\t" \ -- "mul %[temp18], %["#TEMP3"], %[c5352] \n\t" \ -- "mul %["#TEMP1"], %[temp19], %[c5352] \n\t" \ -- "mul %[temp16], %["#TEMP3"], %[c2217] \n\t" \ -- "sll %["#TEMP2"], %["#TEMP2"], 3 \n\t" \ -- "sll %["#TEMP0"], %["#TEMP0"], 3 \n\t" \ -- "subu %["#TEMP3"], %[temp17], %[temp18] \n\t" \ -- "addu %["#TEMP1"], %[temp16], %["#TEMP1"] \n\t" \ -- "addiu %["#TEMP3"], %["#TEMP3"], 937 \n\t" \ -- "addiu %["#TEMP1"], %["#TEMP1"], 1812 \n\t" \ -- "sra %["#TEMP3"], %["#TEMP3"], 9 \n\t" \ -- "sra %["#TEMP1"], %["#TEMP1"], 9 \n\t" -+ "lw %[" #TEMP0 "], 0(%[args]) \n\t" \ -+ "lw %[" #TEMP1 "], 4(%[args]) \n\t" \ -+ "lw %[" #TEMP2 "], "XSTR(BPS)"*" #A "(%[" #TEMP0 "]) \n\t" \ -+ "lw %[" #TEMP3 "], "XSTR(BPS)"*" #A "(%[" #TEMP1 "]) \n\t" \ -+ "preceu.ph.qbl %[" #TEMP0 "], %[" #TEMP2 "] \n\t" \ -+ "preceu.ph.qbl %[" #TEMP1 "], %[" #TEMP3 "] \n\t" \ -+ "preceu.ph.qbr %[" #TEMP2 "], %[" #TEMP2 "] \n\t" \ -+ "preceu.ph.qbr %[" #TEMP3 "], %[" #TEMP3 "] \n\t" \ -+ "subq.ph %[" #TEMP0 "], %[" #TEMP0 "], %[" #TEMP1 "] \n\t" \ -+ "subq.ph %[" #TEMP2 "], %[" #TEMP2 "], %[" #TEMP3 "] \n\t" \ -+ "rotr %[" #TEMP0 "], %[" #TEMP0 "], 16 \n\t" \ -+ "addq.ph %[" #TEMP1 "], %[" #TEMP2 "], %[" #TEMP0 "] \n\t" \ -+ "subq.ph %[" #TEMP3 "], %[" #TEMP2 "], %[" #TEMP0 "] \n\t" \ -+ "seh %[" #TEMP0 "], %[" #TEMP1 "] \n\t" \ -+ "sra %[temp16], %[" #TEMP1 "], 16 \n\t" \ -+ "seh %[temp19], %[" #TEMP3 "] \n\t" \ -+ "sra %[" #TEMP3 "], %[" #TEMP3 "], 16 \n\t" \ -+ "subu %[" #TEMP2 "], %[" #TEMP0 "], %[temp16] \n\t" \ -+ "addu %[" #TEMP0 "], %[" #TEMP0 "], %[temp16] \n\t" \ -+ "mul %[temp17], %[temp19], %[c2217] \n\t" \ -+ "mul %[temp18], %[" #TEMP3 "], %[c5352] \n\t" \ -+ "mul %[" #TEMP1 "], %[temp19], %[c5352] \n\t" \ -+ "mul %[temp16], %[" #TEMP3 "], %[c2217] \n\t" \ -+ "sll %[" #TEMP2 "], %[" #TEMP2 "], 3 \n\t" \ -+ "sll %[" #TEMP0 "], %[" #TEMP0 "], 3 \n\t" \ -+ "subu %[" #TEMP3 "], %[temp17], %[temp18] \n\t" \ -+ "addu %[" #TEMP1 "], %[temp16], %[" #TEMP1 "] \n\t" \ -+ "addiu %[" #TEMP3 "], %[" #TEMP3 "], 937 \n\t" \ -+ "addiu %[" #TEMP1 "], %[" #TEMP1 "], 1812 \n\t" \ -+ "sra %[" #TEMP3 "], %[" #TEMP3 "], 9 \n\t" \ -+ "sra %[" #TEMP1 "], %[" #TEMP1 "], 9 \n\t" - - // macro for one vertical pass in FTransform - // temp0..temp15 holds tmp[0]..tmp[15] - // A..D - offsets in bytes to store to out buffer - // TEMP0, TEMP4, TEMP8 and TEMP12 - registers for corresponding tmp elements - #define VERTICAL_PASS(A, B, C, D, TEMP0, TEMP4, TEMP8, TEMP12) \ -- "addu %[temp16], %["#TEMP0"], %["#TEMP12"] \n\t" \ -- "subu %[temp19], %["#TEMP0"], %["#TEMP12"] \n\t" \ -- "addu %[temp17], %["#TEMP4"], %["#TEMP8"] \n\t" \ -- "subu %[temp18], %["#TEMP4"], %["#TEMP8"] \n\t" \ -- "mul %["#TEMP8"], %[temp19], %[c2217] \n\t" \ -- "mul %["#TEMP12"], %[temp18], %[c2217] \n\t" \ -- "mul %["#TEMP4"], %[temp19], %[c5352] \n\t" \ -- "mul %[temp18], %[temp18], %[c5352] \n\t" \ -- "addiu %[temp16], %[temp16], 7 \n\t" \ -- "addu %["#TEMP0"], %[temp16], %[temp17] \n\t" \ -- "sra %["#TEMP0"], %["#TEMP0"], 4 \n\t" \ -- "addu %["#TEMP12"], %["#TEMP12"], %["#TEMP4"] \n\t" \ -- "subu %["#TEMP4"], %[temp16], %[temp17] \n\t" \ -- "sra %["#TEMP4"], %["#TEMP4"], 4 \n\t" \ -- "addiu %["#TEMP8"], %["#TEMP8"], 30000 \n\t" \ -- "addiu %["#TEMP12"], %["#TEMP12"], 12000 \n\t" \ -- "addiu %["#TEMP8"], %["#TEMP8"], 21000 \n\t" \ -- "subu %["#TEMP8"], %["#TEMP8"], %[temp18] \n\t" \ -- "sra %["#TEMP12"], %["#TEMP12"], 16 \n\t" \ -- "sra %["#TEMP8"], %["#TEMP8"], 16 \n\t" \ -- "addiu %[temp16], %["#TEMP12"], 1 \n\t" \ -- "movn %["#TEMP12"], %[temp16], %[temp19] \n\t" \ -- "sh %["#TEMP0"], "#A"(%[temp20]) \n\t" \ -- "sh %["#TEMP4"], "#C"(%[temp20]) \n\t" \ -- "sh %["#TEMP8"], "#D"(%[temp20]) \n\t" \ -- "sh %["#TEMP12"], "#B"(%[temp20]) \n\t" -+ "addu %[temp16], %[" #TEMP0 "], %[" #TEMP12 "] \n\t" \ -+ "subu %[temp19], %[" #TEMP0 "], %[" #TEMP12 "] \n\t" \ -+ "addu %[temp17], %[" #TEMP4 "], %[" #TEMP8 "] \n\t" \ -+ "subu %[temp18], %[" #TEMP4 "], %[" #TEMP8 "] \n\t" \ -+ "mul %[" #TEMP8 "], %[temp19], %[c2217] \n\t" \ -+ "mul %[" #TEMP12 "], %[temp18], %[c2217] \n\t" \ -+ "mul %[" #TEMP4 "], %[temp19], %[c5352] \n\t" \ -+ "mul %[temp18], %[temp18], %[c5352] \n\t" \ -+ "addiu %[temp16], %[temp16], 7 \n\t" \ -+ "addu %[" #TEMP0 "], %[temp16], %[temp17] \n\t" \ -+ "sra %[" #TEMP0 "], %[" #TEMP0 "], 4 \n\t" \ -+ "addu %[" #TEMP12 "], %[" #TEMP12 "], %[" #TEMP4 "] \n\t" \ -+ "subu %[" #TEMP4 "], %[temp16], %[temp17] \n\t" \ -+ "sra %[" #TEMP4 "], %[" #TEMP4 "], 4 \n\t" \ -+ "addiu %[" #TEMP8 "], %[" #TEMP8 "], 30000 \n\t" \ -+ "addiu %[" #TEMP12 "], %[" #TEMP12 "], 12000 \n\t" \ -+ "addiu %[" #TEMP8 "], %[" #TEMP8 "], 21000 \n\t" \ -+ "subu %[" #TEMP8 "], %[" #TEMP8 "], %[temp18] \n\t" \ -+ "sra %[" #TEMP12 "], %[" #TEMP12 "], 16 \n\t" \ -+ "sra %[" #TEMP8 "], %[" #TEMP8 "], 16 \n\t" \ -+ "addiu %[temp16], %[" #TEMP12 "], 1 \n\t" \ -+ "movn %[" #TEMP12 "], %[temp16], %[temp19] \n\t" \ -+ "sh %[" #TEMP0 "], " #A "(%[temp20]) \n\t" \ -+ "sh %[" #TEMP4 "], " #C "(%[temp20]) \n\t" \ -+ "sh %[" #TEMP8 "], " #D "(%[temp20]) \n\t" \ -+ "sh %[" #TEMP12 "], " #B "(%[temp20]) \n\t" - - static void FTransform(const uint8_t* src, const uint8_t* ref, int16_t* out) { - const int c2217 = 2217; -@@ -329,11 +329,11 @@ - // Intra predictions - - #define FILL_PART(J, SIZE) \ -- "usw %[value], 0+"#J"*"XSTR(BPS)"(%[dst]) \n\t" \ -- "usw %[value], 4+"#J"*"XSTR(BPS)"(%[dst]) \n\t" \ -- ".if "#SIZE" == 16 \n\t" \ -- "usw %[value], 8+"#J"*"XSTR(BPS)"(%[dst]) \n\t" \ -- "usw %[value], 12+"#J"*"XSTR(BPS)"(%[dst]) \n\t" \ -+ "usw %[value], 0+" #J "*"XSTR(BPS)"(%[dst]) \n\t" \ -+ "usw %[value], 4+" #J "*"XSTR(BPS)"(%[dst]) \n\t" \ -+ ".if " #SIZE " == 16 \n\t" \ -+ "usw %[value], 8+" #J "*"XSTR(BPS)"(%[dst]) \n\t" \ -+ "usw %[value], 12+" #J "*"XSTR(BPS)"(%[dst]) \n\t" \ - ".endif \n\t" - - #define FILL_8_OR_16(DST, VALUE, SIZE) do { \ -@@ -348,7 +348,7 @@ - FILL_PART( 5, SIZE) \ - FILL_PART( 6, SIZE) \ - FILL_PART( 7, SIZE) \ -- ".if "#SIZE" == 16 \n\t" \ -+ ".if " #SIZE " == 16 \n\t" \ - FILL_PART( 8, 16) \ - FILL_PART( 9, 16) \ - FILL_PART(10, 16) \ -@@ -425,7 +425,7 @@ - CLIPPING() \ - "usw %[temp0], 0(%[dst]) \n\t" \ - "usw %[temp1], 4(%[dst]) \n\t" \ -- ".if "#SIZE" == 16 \n\t" \ -+ ".if " #SIZE " == 16 \n\t" \ - "ulw %[temp0], 8(%[top]) \n\t" \ - "ulw %[temp1], 12(%[top]) \n\t" \ - CLIPPING() \ -@@ -1060,8 +1060,8 @@ - #if !defined(WORK_AROUND_GCC) - - #define GET_SSE_INNER(A) \ -- "lw %[temp0], "#A"(%[a]) \n\t" \ -- "lw %[temp1], "#A"(%[b]) \n\t" \ -+ "lw %[temp0], " #A "(%[a]) \n\t" \ -+ "lw %[temp1], " #A "(%[b]) \n\t" \ - "preceu.ph.qbr %[temp2], %[temp0] \n\t" \ - "preceu.ph.qbl %[temp0], %[temp0] \n\t" \ - "preceu.ph.qbr %[temp3], %[temp1] \n\t" \ -@@ -1185,28 +1185,28 @@ - // N - offset in bytes (n * 2) - // N1 - offset in bytes ((n + 1) * 2) - #define QUANTIZE_ONE(J, K, N, N1) \ -- "ulw %[temp1], "#J"(%[ppin]) \n\t" \ -- "ulw %[temp2], "#J"(%[ppsharpen]) \n\t" \ -- "lhu %[temp3], "#K"(%[ppzthresh]) \n\t" \ -- "lhu %[temp6], "#K"+4(%[ppzthresh]) \n\t" \ -+ "ulw %[temp1], " #J "(%[ppin]) \n\t" \ -+ "ulw %[temp2], " #J "(%[ppsharpen]) \n\t" \ -+ "lhu %[temp3], " #K "(%[ppzthresh]) \n\t" \ -+ "lhu %[temp6], " #K "+4(%[ppzthresh]) \n\t" \ - "absq_s.ph %[temp4], %[temp1] \n\t" \ - "ins %[temp3], %[temp6], 16, 16 \n\t" \ - "addu.ph %[coeff], %[temp4], %[temp2] \n\t" \ - "shra.ph %[sign], %[temp1], 15 \n\t" \ - "li %[level], 0x10001 \n\t" \ - "cmp.lt.ph %[temp3], %[coeff] \n\t" \ -- "lhu %[temp1], "#J"(%[ppiq]) \n\t" \ -+ "lhu %[temp1], " #J "(%[ppiq]) \n\t" \ - "pick.ph %[temp5], %[level], $0 \n\t" \ -- "lw %[temp2], "#K"(%[ppbias]) \n\t" \ -+ "lw %[temp2], " #K "(%[ppbias]) \n\t" \ - "beqz %[temp5], 0f \n\t" \ -- "lhu %[temp3], "#J"(%[ppq]) \n\t" \ -+ "lhu %[temp3], " #J "(%[ppq]) \n\t" \ - "beq %[temp5], %[level], 1f \n\t" \ - "andi %[temp5], %[temp5], 0x1 \n\t" \ - "andi %[temp4], %[coeff], 0xffff \n\t" \ - "beqz %[temp5], 2f \n\t" \ - "mul %[level], %[temp4], %[temp1] \n\t" \ -- "sh $0, "#J"+2(%[ppin]) \n\t" \ -- "sh $0, "#N1"(%[pout]) \n\t" \ -+ "sh $0, " #J "+2(%[ppin]) \n\t" \ -+ "sh $0, " #N1 "(%[pout]) \n\t" \ - "addu %[level], %[level], %[temp2] \n\t" \ - "sra %[level], %[level], 17 \n\t" \ - "slt %[temp4], %[max_level], %[level] \n\t" \ -@@ -1216,15 +1216,15 @@ - "subu %[level], %[level], %[temp6] \n\t" \ - "mul %[temp5], %[level], %[temp3] \n\t" \ - "or %[ret], %[ret], %[level] \n\t" \ -- "sh %[level], "#N"(%[pout]) \n\t" \ -- "sh %[temp5], "#J"(%[ppin]) \n\t" \ -+ "sh %[level], " #N "(%[pout]) \n\t" \ -+ "sh %[temp5], " #J "(%[ppin]) \n\t" \ - "j 3f \n\t" \ - "2: \n\t" \ -- "lhu %[temp1], "#J"+2(%[ppiq]) \n\t" \ -+ "lhu %[temp1], " #J "+2(%[ppiq]) \n\t" \ - "srl %[temp5], %[coeff], 16 \n\t" \ - "mul %[level], %[temp5], %[temp1] \n\t" \ -- "lw %[temp2], "#K"+4(%[ppbias]) \n\t" \ -- "lhu %[temp3], "#J"+2(%[ppq]) \n\t" \ -+ "lw %[temp2], " #K "+4(%[ppbias]) \n\t" \ -+ "lhu %[temp3], " #J "+2(%[ppq]) \n\t" \ - "addu %[level], %[level], %[temp2] \n\t" \ - "sra %[level], %[level], 17 \n\t" \ - "srl %[temp6], %[sign], 16 \n\t" \ -@@ -1233,20 +1233,20 @@ - "xor %[level], %[level], %[temp6] \n\t" \ - "subu %[level], %[level], %[temp6] \n\t" \ - "mul %[temp5], %[level], %[temp3] \n\t" \ -- "sh $0, "#J"(%[ppin]) \n\t" \ -- "sh $0, "#N"(%[pout]) \n\t" \ -+ "sh $0, " #J "(%[ppin]) \n\t" \ -+ "sh $0, " #N "(%[pout]) \n\t" \ - "or %[ret], %[ret], %[level] \n\t" \ -- "sh %[temp5], "#J"+2(%[ppin]) \n\t" \ -- "sh %[level], "#N1"(%[pout]) \n\t" \ -+ "sh %[temp5], " #J "+2(%[ppin]) \n\t" \ -+ "sh %[level], " #N1 "(%[pout]) \n\t" \ - "j 3f \n\t" \ - "1: \n\t" \ -- "lhu %[temp1], "#J"(%[ppiq]) \n\t" \ -- "lw %[temp2], "#K"(%[ppbias]) \n\t" \ -- "ulw %[temp3], "#J"(%[ppq]) \n\t" \ -+ "lhu %[temp1], " #J "(%[ppiq]) \n\t" \ -+ "lw %[temp2], " #K "(%[ppbias]) \n\t" \ -+ "ulw %[temp3], " #J "(%[ppq]) \n\t" \ - "andi %[temp5], %[coeff], 0xffff \n\t" \ - "srl %[temp0], %[coeff], 16 \n\t" \ -- "lhu %[temp6], "#J"+2(%[ppiq]) \n\t" \ -- "lw %[coeff], "#K"+4(%[ppbias]) \n\t" \ -+ "lhu %[temp6], " #J "+2(%[ppiq]) \n\t" \ -+ "lw %[coeff], " #K "+4(%[ppbias]) \n\t" \ - "mul %[level], %[temp5], %[temp1] \n\t" \ - "mul %[temp4], %[temp0], %[temp6] \n\t" \ - "addu %[level], %[level], %[temp2] \n\t" \ -@@ -1259,15 +1259,15 @@ - "subu.ph %[level], %[level], %[sign] \n\t" \ - "mul.ph %[temp3], %[level], %[temp3] \n\t" \ - "or %[ret], %[ret], %[level] \n\t" \ -- "sh %[level], "#N"(%[pout]) \n\t" \ -+ "sh %[level], " #N "(%[pout]) \n\t" \ - "srl %[level], %[level], 16 \n\t" \ -- "sh %[level], "#N1"(%[pout]) \n\t" \ -- "usw %[temp3], "#J"(%[ppin]) \n\t" \ -+ "sh %[level], " #N1 "(%[pout]) \n\t" \ -+ "usw %[temp3], " #J "(%[ppin]) \n\t" \ - "j 3f \n\t" \ - "0: \n\t" \ -- "sh $0, "#N"(%[pout]) \n\t" \ -- "sh $0, "#N1"(%[pout]) \n\t" \ -- "usw $0, "#J"(%[ppin]) \n\t" \ -+ "sh $0, " #N "(%[pout]) \n\t" \ -+ "sh $0, " #N1 "(%[pout]) \n\t" \ -+ "usw $0, " #J "(%[ppin]) \n\t" \ - "3: \n\t" - - static int QuantizeBlock(int16_t in[16], int16_t out[16], -@@ -1326,37 +1326,37 @@ - // A, B, C, D - offset in bytes to load from in buffer - // TEMP0, TEMP1 - registers for corresponding tmp elements - #define HORIZONTAL_PASS_WHT(A, B, C, D, TEMP0, TEMP1) \ -- "lh %["#TEMP0"], "#A"(%[in]) \n\t" \ -- "lh %["#TEMP1"], "#B"(%[in]) \n\t" \ -- "lh %[temp8], "#C"(%[in]) \n\t" \ -- "lh %[temp9], "#D"(%[in]) \n\t" \ -- "ins %["#TEMP1"], %["#TEMP0"], 16, 16 \n\t" \ -+ "lh %[" #TEMP0 "], " #A "(%[in]) \n\t" \ -+ "lh %[" #TEMP1 "], " #B "(%[in]) \n\t" \ -+ "lh %[temp8], " #C "(%[in]) \n\t" \ -+ "lh %[temp9], " #D "(%[in]) \n\t" \ -+ "ins %[" #TEMP1 "], %[" #TEMP0 "], 16, 16 \n\t" \ - "ins %[temp9], %[temp8], 16, 16 \n\t" \ -- "subq.ph %[temp8], %["#TEMP1"], %[temp9] \n\t" \ -- "addq.ph %[temp9], %["#TEMP1"], %[temp9] \n\t" \ -- "precrq.ph.w %["#TEMP0"], %[temp8], %[temp9] \n\t" \ -+ "subq.ph %[temp8], %[" #TEMP1 "], %[temp9] \n\t" \ -+ "addq.ph %[temp9], %[" #TEMP1 "], %[temp9] \n\t" \ -+ "precrq.ph.w %[" #TEMP0 "], %[temp8], %[temp9] \n\t" \ - "append %[temp8], %[temp9], 16 \n\t" \ -- "subq.ph %["#TEMP1"], %["#TEMP0"], %[temp8] \n\t" \ -- "addq.ph %["#TEMP0"], %["#TEMP0"], %[temp8] \n\t" \ -- "rotr %["#TEMP1"], %["#TEMP1"], 16 \n\t" -+ "subq.ph %[" #TEMP1 "], %[" #TEMP0 "], %[temp8] \n\t" \ -+ "addq.ph %[" #TEMP0 "], %[" #TEMP0 "], %[temp8] \n\t" \ -+ "rotr %[" #TEMP1 "], %[" #TEMP1 "], 16 \n\t" - - // macro for one vertical pass in FTransformWHT - // temp0..temp7 holds tmp[0]..tmp[15] - // A, B, C, D - offsets in bytes to store to out buffer - // TEMP0, TEMP2, TEMP4 and TEMP6 - registers for corresponding tmp elements - #define VERTICAL_PASS_WHT(A, B, C, D, TEMP0, TEMP2, TEMP4, TEMP6) \ -- "addq.ph %[temp8], %["#TEMP0"], %["#TEMP4"] \n\t" \ -- "addq.ph %[temp9], %["#TEMP2"], %["#TEMP6"] \n\t" \ -- "subq.ph %["#TEMP2"], %["#TEMP2"], %["#TEMP6"] \n\t" \ -- "subq.ph %["#TEMP6"], %["#TEMP0"], %["#TEMP4"] \n\t" \ -- "addqh.ph %["#TEMP0"], %[temp8], %[temp9] \n\t" \ -- "subqh.ph %["#TEMP4"], %["#TEMP6"], %["#TEMP2"] \n\t" \ -- "addqh.ph %["#TEMP2"], %["#TEMP2"], %["#TEMP6"] \n\t" \ -- "subqh.ph %["#TEMP6"], %[temp8], %[temp9] \n\t" \ -- "usw %["#TEMP0"], "#A"(%[out]) \n\t" \ -- "usw %["#TEMP2"], "#B"(%[out]) \n\t" \ -- "usw %["#TEMP4"], "#C"(%[out]) \n\t" \ -- "usw %["#TEMP6"], "#D"(%[out]) \n\t" -+ "addq.ph %[temp8], %[" #TEMP0 "], %[" #TEMP4 "] \n\t" \ -+ "addq.ph %[temp9], %[" #TEMP2 "], %[" #TEMP6 "] \n\t" \ -+ "subq.ph %[" #TEMP2 "], %[" #TEMP2 "], %[" #TEMP6 "] \n\t" \ -+ "subq.ph %[" #TEMP6 "], %[" #TEMP0 "], %[" #TEMP4 "] \n\t" \ -+ "addqh.ph %[" #TEMP0 "], %[temp8], %[temp9] \n\t" \ -+ "subqh.ph %[" #TEMP4 "], %[" #TEMP6 "], %[" #TEMP2 "] \n\t" \ -+ "addqh.ph %[" #TEMP2 "], %[" #TEMP2 "], %[" #TEMP6 "] \n\t" \ -+ "subqh.ph %[" #TEMP6 "], %[temp8], %[temp9] \n\t" \ -+ "usw %[" #TEMP0 "], " #A "(%[out]) \n\t" \ -+ "usw %[" #TEMP2 "], " #B "(%[out]) \n\t" \ -+ "usw %[" #TEMP4 "], " #C "(%[out]) \n\t" \ -+ "usw %[" #TEMP6 "], " #D "(%[out]) \n\t" - - static void FTransformWHT(const int16_t* in, int16_t* out) { - int temp0, temp1, temp2, temp3, temp4; -@@ -1385,10 +1385,10 @@ - // convert 8 coeffs at time - // A, B, C, D - offsets in bytes to load from out buffer - #define CONVERT_COEFFS_TO_BIN(A, B, C, D) \ -- "ulw %[temp0], "#A"(%[out]) \n\t" \ -- "ulw %[temp1], "#B"(%[out]) \n\t" \ -- "ulw %[temp2], "#C"(%[out]) \n\t" \ -- "ulw %[temp3], "#D"(%[out]) \n\t" \ -+ "ulw %[temp0], " #A "(%[out]) \n\t" \ -+ "ulw %[temp1], " #B "(%[out]) \n\t" \ -+ "ulw %[temp2], " #C "(%[out]) \n\t" \ -+ "ulw %[temp3], " #D "(%[out]) \n\t" \ - "absq_s.ph %[temp0], %[temp0] \n\t" \ - "absq_s.ph %[temp1], %[temp1] \n\t" \ - "absq_s.ph %[temp2], %[temp2] \n\t" \ -diff --git a/Source/LibWebP/src/dsp/dsp.filters_mips_dsp_r2.c b/Source/LibWebP/src/dsp/dsp.filters_mips_dsp_r2.c -index 66f807d..8134af5 100644 ---- a/Source/LibWebP/src/dsp/dsp.filters_mips_dsp_r2.c -+++ b/Source/LibWebP/src/dsp/dsp.filters_mips_dsp_r2.c -@@ -48,7 +48,7 @@ - "srl %[temp0], %[length], 0x2 \n\t" \ - "beqz %[temp0], 4f \n\t" \ - " andi %[temp6], %[length], 0x3 \n\t" \ -- ".if "#INVERSE" \n\t" \ -+ ".if " #INVERSE " \n\t" \ - "lbu %[temp1], -1(%[src]) \n\t" \ - "1: \n\t" \ - "lbu %[temp2], 0(%[src]) \n\t" \ -@@ -84,7 +84,7 @@ - "lbu %[temp1], -1(%[src]) \n\t" \ - "lbu %[temp2], 0(%[src]) \n\t" \ - "addiu %[src], %[src], 1 \n\t" \ -- ".if "#INVERSE" \n\t" \ -+ ".if " #INVERSE " \n\t" \ - "addu %[temp3], %[temp1], %[temp2] \n\t" \ - "sb %[temp3], -1(%[src]) \n\t" \ - ".else \n\t" \ -@@ -131,7 +131,7 @@ - "ulw %[temp3], 4(%[src]) \n\t" \ - "ulw %[temp4], 4(%[pred]) \n\t" \ - "addiu %[src], %[src], 8 \n\t" \ -- ".if "#INVERSE" \n\t" \ -+ ".if " #INVERSE " \n\t" \ - "addu.qb %[temp5], %[temp1], %[temp2] \n\t" \ - "addu.qb %[temp6], %[temp3], %[temp4] \n\t" \ - ".else \n\t" \ -@@ -152,7 +152,7 @@ - "lbu %[temp2], 0(%[pred]) \n\t" \ - "addiu %[src], %[src], 1 \n\t" \ - "addiu %[pred], %[pred], 1 \n\t" \ -- ".if "#INVERSE" \n\t" \ -+ ".if " #INVERSE " \n\t" \ - "addu %[temp3], %[temp1], %[temp2] \n\t" \ - ".else \n\t" \ - "subu %[temp3], %[temp1], %[temp2] \n\t" \ -@@ -177,7 +177,7 @@ - __asm__ volatile ( \ - "lbu %[temp1], 0(%[src]) \n\t" \ - "lbu %[temp2], 0(%[pred]) \n\t" \ -- ".if "#INVERSE" \n\t" \ -+ ".if " #INVERSE " \n\t" \ - "addu %[temp3], %[temp1], %[temp2] \n\t" \ - ".else \n\t" \ - "subu %[temp3], %[temp1], %[temp2] \n\t" \ -diff --git a/Source/LibWebP/src/dsp/dsp.lossless_mips32.c b/Source/LibWebP/src/dsp/dsp.lossless_mips32.c -index 8ae5958..cdf0e26 100644 ---- a/Source/LibWebP/src/dsp/dsp.lossless_mips32.c -+++ b/Source/LibWebP/src/dsp/dsp.lossless_mips32.c - -@@ -278,28 +278,28 @@ - // literal_ and successive histograms could be unaligned - // so we must use ulw and usw - #define ADD_TO_OUT(A, B, C, D, E, P0, P1, P2) \ -- "ulw %[temp0], "#A"(%["#P0"]) \n\t" \ -- "ulw %[temp1], "#B"(%["#P0"]) \n\t" \ -- "ulw %[temp2], "#C"(%["#P0"]) \n\t" \ -- "ulw %[temp3], "#D"(%["#P0"]) \n\t" \ -- "ulw %[temp4], "#A"(%["#P1"]) \n\t" \ -- "ulw %[temp5], "#B"(%["#P1"]) \n\t" \ -- "ulw %[temp6], "#C"(%["#P1"]) \n\t" \ -- "ulw %[temp7], "#D"(%["#P1"]) \n\t" \ -+ "ulw %[temp0], " #A "(%[" #P0 "]) \n\t" \ -+ "ulw %[temp1], " #B "(%[" #P0 "]) \n\t" \ -+ "ulw %[temp2], " #C "(%[" #P0 "]) \n\t" \ -+ "ulw %[temp3], " #D "(%[" #P0 "]) \n\t" \ -+ "ulw %[temp4], " #A "(%[" #P1 "]) \n\t" \ -+ "ulw %[temp5], " #B "(%[" #P1 "]) \n\t" \ -+ "ulw %[temp6], " #C "(%[" #P1 "]) \n\t" \ -+ "ulw %[temp7], " #D "(%[" #P1 "]) \n\t" \ - "addu %[temp4], %[temp4], %[temp0] \n\t" \ - "addu %[temp5], %[temp5], %[temp1] \n\t" \ - "addu %[temp6], %[temp6], %[temp2] \n\t" \ - "addu %[temp7], %[temp7], %[temp3] \n\t" \ -- "addiu %["#P0"], %["#P0"], 16 \n\t" \ -- ".if "#E" == 1 \n\t" \ -- "addiu %["#P1"], %["#P1"], 16 \n\t" \ -+ "addiu %[" #P0 "], %[" #P0 "], 16 \n\t" \ -+ ".if " #E " == 1 \n\t" \ -+ "addiu %[" #P1 "], %[" #P1 "], 16 \n\t" \ - ".endif \n\t" \ -- "usw %[temp4], "#A"(%["#P2"]) \n\t" \ -- "usw %[temp5], "#B"(%["#P2"]) \n\t" \ -- "usw %[temp6], "#C"(%["#P2"]) \n\t" \ -- "usw %[temp7], "#D"(%["#P2"]) \n\t" \ -- "addiu %["#P2"], %["#P2"], 16 \n\t" \ -- "bne %["#P0"], %[LoopEnd], 1b \n\t" \ -+ "usw %[temp4], " #A "(%[" #P2 "]) \n\t" \ -+ "usw %[temp5], " #B "(%[" #P2 "]) \n\t" \ -+ "usw %[temp6], " #C "(%[" #P2 "]) \n\t" \ -+ "usw %[temp7], " #D "(%[" #P2 "]) \n\t" \ -+ "addiu %[" #P2 "], %[" #P2 "], 16 \n\t" \ -+ "bne %[" #P0 "], %[LoopEnd], 1b \n\t" \ - ".set pop \n\t" \ - - #define ASM_END_COMMON_0 \ -diff --git a/Source/LibWebP/src/dsp/dsp.lossless_mips_dsp_r2.c b/Source/LibWebP/src/dsp/dsp.lossless_mips_dsp_r2.c -index ad55f2c..90aed7f 100644 ---- a/Source/LibWebP/src/dsp/dsp.lossless_mips_dsp_r2.c -+++ b/Source/LibWebP/src/dsp/dsp.lossless_mips_dsp_r2.c -@@ -29,14 +29,14 @@ - for (x = 0; x < (width >> 2); ++x) { \ - int tmp1, tmp2, tmp3, tmp4; \ - __asm__ volatile ( \ -- ".ifc "#TYPE", uint8_t \n\t" \ -+ ".ifc " #TYPE ", uint8_t \n\t" \ - "lbu %[tmp1], 0(%[src]) \n\t" \ - "lbu %[tmp2], 1(%[src]) \n\t" \ - "lbu %[tmp3], 2(%[src]) \n\t" \ - "lbu %[tmp4], 3(%[src]) \n\t" \ - "addiu %[src], %[src], 4 \n\t" \ - ".endif \n\t" \ -- ".ifc "#TYPE", uint32_t \n\t" \ -+ ".ifc " #TYPE ", uint32_t \n\t" \ - "lw %[tmp1], 0(%[src]) \n\t" \ - "lw %[tmp2], 4(%[src]) \n\t" \ - "lw %[tmp3], 8(%[src]) \n\t" \ -@@ -55,7 +55,7 @@ - "lwx %[tmp2], %[tmp2](%[color_map]) \n\t" \ - "lwx %[tmp3], %[tmp3](%[color_map]) \n\t" \ - "lwx %[tmp4], %[tmp4](%[color_map]) \n\t" \ -- ".ifc "#TYPE", uint8_t \n\t" \ -+ ".ifc " #TYPE ", uint8_t \n\t" \ - "ext %[tmp1], %[tmp1], 8, 8 \n\t" \ - "ext %[tmp2], %[tmp2], 8, 8 \n\t" \ - "ext %[tmp3], %[tmp3], 8, 8 \n\t" \ -@@ -66,7 +66,7 @@ - "sb %[tmp4], 3(%[dst]) \n\t" \ - "addiu %[dst], %[dst], 4 \n\t" \ - ".endif \n\t" \ -- ".ifc "#TYPE", uint32_t \n\t" \ -+ ".ifc " #TYPE ", uint32_t \n\t" \ - "sw %[tmp1], 0(%[dst]) \n\t" \ - "sw %[tmp2], 4(%[dst]) \n\t" \ - "sw %[tmp3], 8(%[dst]) \n\t" \ -diff --git a/Source/LibWebP/src/dsp/mips_macro.h b/Source/LibWebP/src/dsp/mips_macro.h -index 4cfb23c..e09d2c4 100644 ---- a/Source/LibWebP/src/dsp/mips_macro.h -+++ b/Source/LibWebP/src/dsp/mips_macro.h -@@ -25,25 +25,25 @@ - // I - input (macro doesn't change it) - #define ADD_SUB_HALVES(O0, O1, \ - I0, I1) \ -- "addq.ph %["#O0"], %["#I0"], %["#I1"] \n\t" \ -- "subq.ph %["#O1"], %["#I0"], %["#I1"] \n\t" -+ "addq.ph %[" #O0 "], %[" #I0 "], %[" #I1 "] \n\t" \ -+ "subq.ph %[" #O1 "], %[" #I0 "], %[" #I1 "] \n\t" - - // O - output - // I - input (macro doesn't change it) - // I[0/1] - offset in bytes - #define LOAD_IN_X2(O0, O1, \ - I0, I1) \ -- "lh %["#O0"], "#I0"(%[in]) \n\t" \ -- "lh %["#O1"], "#I1"(%[in]) \n\t" -+ "lh %[" #O0 "], " #I0 "(%[in]) \n\t" \ -+ "lh %[" #O1 "], " #I1 "(%[in]) \n\t" - - // I0 - location - // I1..I9 - offsets in bytes - #define LOAD_WITH_OFFSET_X4(O0, O1, O2, O3, \ - I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) \ -- "ulw %["#O0"], "#I1"+"XSTR(I9)"*"#I5"(%["#I0"]) \n\t" \ -- "ulw %["#O1"], "#I2"+"XSTR(I9)"*"#I6"(%["#I0"]) \n\t" \ -- "ulw %["#O2"], "#I3"+"XSTR(I9)"*"#I7"(%["#I0"]) \n\t" \ -- "ulw %["#O3"], "#I4"+"XSTR(I9)"*"#I8"(%["#I0"]) \n\t" -+ "ulw %[" #O0 "], " #I1 "+"XSTR(I9)"*" #I5 "(%[" #I0 "]) \n\t" \ -+ "ulw %[" #O1 "], " #I2 "+"XSTR(I9)"*" #I6 "(%[" #I0 "]) \n\t" \ -+ "ulw %[" #O2 "], " #I3 "+"XSTR(I9)"*" #I7 "(%[" #I0 "]) \n\t" \ -+ "ulw %[" #O3 "], " #I4 "+"XSTR(I9)"*" #I8 "(%[" #I0 "]) \n\t" - - // O - output - // IO - input/output -@@ -51,42 +51,42 @@ - #define MUL_SHIFT_SUM(O0, O1, O2, O3, O4, O5, O6, O7, \ - IO0, IO1, IO2, IO3, \ - I0, I1, I2, I3, I4, I5, I6, I7) \ -- "mul %["#O0"], %["#I0"], %[kC2] \n\t" \ -- "mul %["#O1"], %["#I0"], %[kC1] \n\t" \ -- "mul %["#O2"], %["#I1"], %[kC2] \n\t" \ -- "mul %["#O3"], %["#I1"], %[kC1] \n\t" \ -- "mul %["#O4"], %["#I2"], %[kC2] \n\t" \ -- "mul %["#O5"], %["#I2"], %[kC1] \n\t" \ -- "mul %["#O6"], %["#I3"], %[kC2] \n\t" \ -- "mul %["#O7"], %["#I3"], %[kC1] \n\t" \ -- "sra %["#O0"], %["#O0"], 16 \n\t" \ -- "sra %["#O1"], %["#O1"], 16 \n\t" \ -- "sra %["#O2"], %["#O2"], 16 \n\t" \ -- "sra %["#O3"], %["#O3"], 16 \n\t" \ -- "sra %["#O4"], %["#O4"], 16 \n\t" \ -- "sra %["#O5"], %["#O5"], 16 \n\t" \ -- "sra %["#O6"], %["#O6"], 16 \n\t" \ -- "sra %["#O7"], %["#O7"], 16 \n\t" \ -- "addu %["#IO0"], %["#IO0"], %["#I4"] \n\t" \ -- "addu %["#IO1"], %["#IO1"], %["#I5"] \n\t" \ -- "subu %["#IO2"], %["#IO2"], %["#I6"] \n\t" \ -- "subu %["#IO3"], %["#IO3"], %["#I7"] \n\t" -+ "mul %[" #O0 "], %[" #I0 "], %[kC2] \n\t" \ -+ "mul %[" #O1 "], %[" #I0 "], %[kC1] \n\t" \ -+ "mul %[" #O2 "], %[" #I1 "], %[kC2] \n\t" \ -+ "mul %[" #O3 "], %[" #I1 "], %[kC1] \n\t" \ -+ "mul %[" #O4 "], %[" #I2 "], %[kC2] \n\t" \ -+ "mul %[" #O5 "], %[" #I2 "], %[kC1] \n\t" \ -+ "mul %[" #O6 "], %[" #I3 "], %[kC2] \n\t" \ -+ "mul %[" #O7 "], %[" #I3 "], %[kC1] \n\t" \ -+ "sra %[" #O0 "], %[" #O0 "], 16 \n\t" \ -+ "sra %[" #O1 "], %[" #O1 "], 16 \n\t" \ -+ "sra %[" #O2 "], %[" #O2 "], 16 \n\t" \ -+ "sra %[" #O3 "], %[" #O3 "], 16 \n\t" \ -+ "sra %[" #O4 "], %[" #O4 "], 16 \n\t" \ -+ "sra %[" #O5 "], %[" #O5 "], 16 \n\t" \ -+ "sra %[" #O6 "], %[" #O6 "], 16 \n\t" \ -+ "sra %[" #O7 "], %[" #O7 "], 16 \n\t" \ -+ "addu %[" #IO0 "], %[" #IO0 "], %[" #I4 "] \n\t" \ -+ "addu %[" #IO1 "], %[" #IO1 "], %[" #I5 "] \n\t" \ -+ "subu %[" #IO2 "], %[" #IO2 "], %[" #I6 "] \n\t" \ -+ "subu %[" #IO3 "], %[" #IO3 "], %[" #I7 "] \n\t" - - // O - output - // I - input (macro doesn't change it) - #define INSERT_HALF_X2(O0, O1, \ - I0, I1) \ -- "ins %["#O0"], %["#I0"], 16, 16 \n\t" \ -- "ins %["#O1"], %["#I1"], 16, 16 \n\t" -+ "ins %[" #O0 "], %[" #I0 "], 16, 16 \n\t" \ -+ "ins %[" #O1 "], %[" #I1 "], 16, 16 \n\t" - - // O - output - // I - input (macro doesn't change it) - #define SRA_16(O0, O1, O2, O3, \ - I0, I1, I2, I3) \ -- "sra %["#O0"], %["#I0"], 16 \n\t" \ -- "sra %["#O1"], %["#I1"], 16 \n\t" \ -- "sra %["#O2"], %["#I2"], 16 \n\t" \ -- "sra %["#O3"], %["#I3"], 16 \n\t" -+ "sra %[" #O0 "], %[" #I0 "], 16 \n\t" \ -+ "sra %[" #O1 "], %[" #I1 "], 16 \n\t" \ -+ "sra %[" #O2 "], %[" #I2 "], 16 \n\t" \ -+ "sra %[" #O3 "], %[" #I3 "], 16 \n\t" - - // temp0[31..16 | 15..0] = temp8[31..16 | 15..0] + temp12[31..16 | 15..0] - // temp1[31..16 | 15..0] = temp8[31..16 | 15..0] - temp12[31..16 | 15..0] -@@ -96,22 +96,22 @@ - // I - input (macro doesn't change it) - #define SHIFT_R_SUM_X2(O0, O1, O2, O3, O4, O5, O6, O7, \ - I0, I1, I2, I3, I4, I5, I6, I7) \ -- "addq.ph %["#O0"], %["#I0"], %["#I4"] \n\t" \ -- "subq.ph %["#O1"], %["#I0"], %["#I4"] \n\t" \ -- "addq.ph %["#O2"], %["#I1"], %["#I5"] \n\t" \ -- "subq.ph %["#O3"], %["#I1"], %["#I5"] \n\t" \ -- "addq.ph %["#O4"], %["#I2"], %["#I6"] \n\t" \ -- "subq.ph %["#O5"], %["#I2"], %["#I6"] \n\t" \ -- "addq.ph %["#O6"], %["#I3"], %["#I7"] \n\t" \ -- "subq.ph %["#O7"], %["#I3"], %["#I7"] \n\t" \ -- "shra.ph %["#O0"], %["#O0"], 3 \n\t" \ -- "shra.ph %["#O1"], %["#O1"], 3 \n\t" \ -- "shra.ph %["#O2"], %["#O2"], 3 \n\t" \ -- "shra.ph %["#O3"], %["#O3"], 3 \n\t" \ -- "shra.ph %["#O4"], %["#O4"], 3 \n\t" \ -- "shra.ph %["#O5"], %["#O5"], 3 \n\t" \ -- "shra.ph %["#O6"], %["#O6"], 3 \n\t" \ -- "shra.ph %["#O7"], %["#O7"], 3 \n\t" -+ "addq.ph %[" #O0 "], %[" #I0 "], %[" #I4 "] \n\t" \ -+ "subq.ph %[" #O1 "], %[" #I0 "], %[" #I4 "] \n\t" \ -+ "addq.ph %[" #O2 "], %[" #I1 "], %[" #I5 "] \n\t" \ -+ "subq.ph %[" #O3 "], %[" #I1 "], %[" #I5 "] \n\t" \ -+ "addq.ph %[" #O4 "], %[" #I2 "], %[" #I6 "] \n\t" \ -+ "subq.ph %[" #O5 "], %[" #I2 "], %[" #I6 "] \n\t" \ -+ "addq.ph %[" #O6 "], %[" #I3 "], %[" #I7 "] \n\t" \ -+ "subq.ph %[" #O7 "], %[" #I3 "], %[" #I7 "] \n\t" \ -+ "shra.ph %[" #O0 "], %[" #O0 "], 3 \n\t" \ -+ "shra.ph %[" #O1 "], %[" #O1 "], 3 \n\t" \ -+ "shra.ph %[" #O2 "], %[" #O2 "], 3 \n\t" \ -+ "shra.ph %[" #O3 "], %[" #O3 "], 3 \n\t" \ -+ "shra.ph %[" #O4 "], %[" #O4 "], 3 \n\t" \ -+ "shra.ph %[" #O5 "], %[" #O5 "], 3 \n\t" \ -+ "shra.ph %[" #O6 "], %[" #O6 "], 3 \n\t" \ -+ "shra.ph %[" #O7 "], %[" #O7 "], 3 \n\t" - - // precrq.ph.w temp0, temp8, temp2 - // temp0 = temp8[31..16] | temp2[31..16] -@@ -123,14 +123,14 @@ - #define PACK_2_HALVES_TO_WORD(O0, O1, O2, O3, \ - IO0, IO1, IO2, IO3, \ - I0, I1, I2, I3) \ -- "precrq.ph.w %["#O0"], %["#I0"], %["#IO0"] \n\t" \ -- "precrq.ph.w %["#O1"], %["#I1"], %["#IO1"] \n\t" \ -- "ins %["#IO0"], %["#I0"], 16, 16 \n\t" \ -- "ins %["#IO1"], %["#I1"], 16, 16 \n\t" \ -- "precrq.ph.w %["#O2"], %["#I2"], %["#IO2"] \n\t" \ -- "precrq.ph.w %["#O3"], %["#I3"], %["#IO3"] \n\t" \ -- "ins %["#IO2"], %["#I2"], 16, 16 \n\t" \ -- "ins %["#IO3"], %["#I3"], 16, 16 \n\t" -+ "precrq.ph.w %[" #O0 "], %[" #I0 "], %[" #IO0 "] \n\t" \ -+ "precrq.ph.w %[" #O1 "], %[" #I1 "], %[" #IO1 "] \n\t" \ -+ "ins %[" #IO0 "], %[" #I0 "], 16, 16 \n\t" \ -+ "ins %[" #IO1 "], %[" #I1 "], 16, 16 \n\t" \ -+ "precrq.ph.w %[" #O2 "], %[" #I2 "], %[" #IO2 "] \n\t" \ -+ "precrq.ph.w %[" #O3 "], %[" #I3 "], %[" #IO3 "] \n\t" \ -+ "ins %[" #IO2 "], %[" #I2 "], 16, 16 \n\t" \ -+ "ins %[" #IO3 "], %[" #I3 "], 16, 16 \n\t" - - // preceu.ph.qbr temp0, temp8 - // temp0 = 0 | 0 | temp8[23..16] | temp8[7..0] -@@ -140,14 +140,14 @@ - // I - input (macro doesn't change it) - #define CONVERT_2_BYTES_TO_HALF(O0, O1, O2, O3, O4, O5, O6, O7, \ - I0, I1, I2, I3) \ -- "preceu.ph.qbr %["#O0"], %["#I0"] \n\t" \ -- "preceu.ph.qbl %["#O1"], %["#I0"] \n\t" \ -- "preceu.ph.qbr %["#O2"], %["#I1"] \n\t" \ -- "preceu.ph.qbl %["#O3"], %["#I1"] \n\t" \ -- "preceu.ph.qbr %["#O4"], %["#I2"] \n\t" \ -- "preceu.ph.qbl %["#O5"], %["#I2"] \n\t" \ -- "preceu.ph.qbr %["#O6"], %["#I3"] \n\t" \ -- "preceu.ph.qbl %["#O7"], %["#I3"] \n\t" -+ "preceu.ph.qbr %[" #O0 "], %[" #I0 "] \n\t" \ -+ "preceu.ph.qbl %[" #O1 "], %[" #I0 "] \n\t" \ -+ "preceu.ph.qbr %[" #O2 "], %[" #I1 "] \n\t" \ -+ "preceu.ph.qbl %[" #O3 "], %[" #I1 "] \n\t" \ -+ "preceu.ph.qbr %[" #O4 "], %[" #I2 "] \n\t" \ -+ "preceu.ph.qbl %[" #O5 "], %[" #I2 "] \n\t" \ -+ "preceu.ph.qbr %[" #O6 "], %[" #I3 "] \n\t" \ -+ "preceu.ph.qbl %[" #O7 "], %[" #I3 "] \n\t" - - // temp0[31..16 | 15..0] = temp0[31..16 | 15..0] + temp8[31..16 | 15..0] - // temp0[31..16 | 15..0] = temp0[31..16 <<(s) 7 | 15..0 <<(s) 7] -@@ -160,30 +160,30 @@ - #define STORE_SAT_SUM_X2(IO0, IO1, IO2, IO3, IO4, IO5, IO6, IO7, \ - I0, I1, I2, I3, I4, I5, I6, I7, \ - I8, I9, I10, I11, I12, I13) \ -- "addq.ph %["#IO0"], %["#IO0"], %["#I0"] \n\t" \ -- "addq.ph %["#IO1"], %["#IO1"], %["#I1"] \n\t" \ -- "addq.ph %["#IO2"], %["#IO2"], %["#I2"] \n\t" \ -- "addq.ph %["#IO3"], %["#IO3"], %["#I3"] \n\t" \ -- "addq.ph %["#IO4"], %["#IO4"], %["#I4"] \n\t" \ -- "addq.ph %["#IO5"], %["#IO5"], %["#I5"] \n\t" \ -- "addq.ph %["#IO6"], %["#IO6"], %["#I6"] \n\t" \ -- "addq.ph %["#IO7"], %["#IO7"], %["#I7"] \n\t" \ -- "shll_s.ph %["#IO0"], %["#IO0"], 7 \n\t" \ -- "shll_s.ph %["#IO1"], %["#IO1"], 7 \n\t" \ -- "shll_s.ph %["#IO2"], %["#IO2"], 7 \n\t" \ -- "shll_s.ph %["#IO3"], %["#IO3"], 7 \n\t" \ -- "shll_s.ph %["#IO4"], %["#IO4"], 7 \n\t" \ -- "shll_s.ph %["#IO5"], %["#IO5"], 7 \n\t" \ -- "shll_s.ph %["#IO6"], %["#IO6"], 7 \n\t" \ -- "shll_s.ph %["#IO7"], %["#IO7"], 7 \n\t" \ -- "precrqu_s.qb.ph %["#IO0"], %["#IO1"], %["#IO0"] \n\t" \ -- "precrqu_s.qb.ph %["#IO2"], %["#IO3"], %["#IO2"] \n\t" \ -- "precrqu_s.qb.ph %["#IO4"], %["#IO5"], %["#IO4"] \n\t" \ -- "precrqu_s.qb.ph %["#IO6"], %["#IO7"], %["#IO6"] \n\t" \ -- "usw %["#IO0"], "XSTR(I13)"*"#I9"(%["#I8"]) \n\t" \ -- "usw %["#IO2"], "XSTR(I13)"*"#I10"(%["#I8"]) \n\t" \ -- "usw %["#IO4"], "XSTR(I13)"*"#I11"(%["#I8"]) \n\t" \ -- "usw %["#IO6"], "XSTR(I13)"*"#I12"(%["#I8"]) \n\t" -+ "addq.ph %[" #IO0 "], %[" #IO0 "], %[" #I0 "] \n\t" \ -+ "addq.ph %[" #IO1 "], %[" #IO1 "], %[" #I1 "] \n\t" \ -+ "addq.ph %[" #IO2 "], %[" #IO2 "], %[" #I2 "] \n\t" \ -+ "addq.ph %[" #IO3 "], %[" #IO3 "], %[" #I3 "] \n\t" \ -+ "addq.ph %[" #IO4 "], %[" #IO4 "], %[" #I4 "] \n\t" \ -+ "addq.ph %[" #IO5 "], %[" #IO5 "], %[" #I5 "] \n\t" \ -+ "addq.ph %[" #IO6 "], %[" #IO6 "], %[" #I6 "] \n\t" \ -+ "addq.ph %[" #IO7 "], %[" #IO7 "], %[" #I7 "] \n\t" \ -+ "shll_s.ph %[" #IO0 "], %[" #IO0 "], 7 \n\t" \ -+ "shll_s.ph %[" #IO1 "], %[" #IO1 "], 7 \n\t" \ -+ "shll_s.ph %[" #IO2 "], %[" #IO2 "], 7 \n\t" \ -+ "shll_s.ph %[" #IO3 "], %[" #IO3 "], 7 \n\t" \ -+ "shll_s.ph %[" #IO4 "], %[" #IO4 "], 7 \n\t" \ -+ "shll_s.ph %[" #IO5 "], %[" #IO5 "], 7 \n\t" \ -+ "shll_s.ph %[" #IO6 "], %[" #IO6 "], 7 \n\t" \ -+ "shll_s.ph %[" #IO7 "], %[" #IO7 "], 7 \n\t" \ -+ "precrqu_s.qb.ph %[" #IO0 "], %[" #IO1 "], %[" #IO0 "] \n\t" \ -+ "precrqu_s.qb.ph %[" #IO2 "], %[" #IO3 "], %[" #IO2 "] \n\t" \ -+ "precrqu_s.qb.ph %[" #IO4 "], %[" #IO5 "], %[" #IO4 "] \n\t" \ -+ "precrqu_s.qb.ph %[" #IO6 "], %[" #IO7 "], %[" #IO6 "] \n\t" \ -+ "usw %[" #IO0 "], "XSTR(I13)"*" #I9 "(%[" #I8 "]) \n\t" \ -+ "usw %[" #IO2 "], "XSTR(I13)"*" #I10 "(%[" #I8 "]) \n\t" \ -+ "usw %[" #IO4 "], "XSTR(I13)"*" #I11 "(%[" #I8 "]) \n\t" \ -+ "usw %[" #IO6 "], "XSTR(I13)"*" #I12 "(%[" #I8 "]) \n\t" - - #define OUTPUT_EARLY_CLOBBER_REGS_10() \ - : [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), \ -diff --git a/Source/LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c b/Source/LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c -index 9c9665f..46f207b 100644 ---- a/Source/LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c -+++ b/Source/LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c -@@ -34,15 +34,15 @@ - G = G - t2 + kGCst; \ - B = B + kBCst; \ - __asm__ volatile ( \ -- "shll_s.w %["#R"], %["#R"], 9 \n\t" \ -- "shll_s.w %["#G"], %["#G"], 9 \n\t" \ -- "shll_s.w %["#B"], %["#B"], 9 \n\t" \ -- "precrqu_s.qb.ph %["#R"], %["#R"], $zero \n\t" \ -- "precrqu_s.qb.ph %["#G"], %["#G"], $zero \n\t" \ -- "precrqu_s.qb.ph %["#B"], %["#B"], $zero \n\t" \ -- "srl %["#R"], %["#R"], 24 \n\t" \ -- "srl %["#G"], %["#G"], 24 \n\t" \ -- "srl %["#B"], %["#B"], 24 \n\t" \ -+ "shll_s.w %[" #R "], %[" #R "], 9 \n\t" \ -+ "shll_s.w %[" #G "], %[" #G "], 9 \n\t" \ -+ "shll_s.w %[" #B "], %[" #B "], 9 \n\t" \ -+ "precrqu_s.qb.ph %[" #R "], %[" #R "], $zero \n\t" \ -+ "precrqu_s.qb.ph %[" #G "], %[" #G "], $zero \n\t" \ -+ "precrqu_s.qb.ph %[" #B "], %[" #B "], $zero \n\t" \ -+ "srl %[" #R "], %[" #R "], 24 \n\t" \ -+ "srl %[" #G "], %[" #G "], 24 \n\t" \ -+ "srl %[" #B "], %[" #B "], 24 \n\t" \ - : [R]"+r"(R), [G]"+r"(G), [B]"+r"(B) \ - : \ - ); \ -diff --git a/Source/LibWebP/src/dsp/dsp.yuv_mips_dsp_r2.c b/Source/LibWebP/src/dsp/dsp.yuv_mips_dsp_r2.c -index 43f02cc..45a2200 100644 ---- a/Source/LibWebP/src/dsp/dsp.yuv_mips_dsp_r2.c -+++ b/Source/LibWebP/src/dsp/dsp.yuv_mips_dsp_r2.c -@@ -39,12 +39,12 @@ - "addu %[temp5], %[temp0], %[temp1] \n\t" \ - "subu %[temp6], %[temp0], %[temp2] \n\t" \ - "addu %[temp7], %[temp0], %[temp4] \n\t" \ --".if "#K" \n\t" \ -+".if " #K " \n\t" \ - "lbu %[temp0], 1(%[y]) \n\t" \ - ".endif \n\t" \ - "shll_s.w %[temp5], %[temp5], 9 \n\t" \ - "shll_s.w %[temp6], %[temp6], 9 \n\t" \ --".if "#K" \n\t" \ -+".if " #K " \n\t" \ - "mul %[temp0], %[t_con_5], %[temp0] \n\t" \ - ".endif \n\t" \ - "shll_s.w %[temp7], %[temp7], 9 \n\t" \ -@@ -54,9 +54,9 @@ - "srl %[temp5], %[temp5], 24 \n\t" \ - "srl %[temp6], %[temp6], 24 \n\t" \ - "srl %[temp7], %[temp7], 24 \n\t" \ -- "sb %[temp5], "#R"(%[dst]) \n\t" \ -- "sb %[temp6], "#G"(%[dst]) \n\t" \ -- "sb %[temp7], "#B"(%[dst]) \n\t" \ -+ "sb %[temp5], " #R "(%[dst]) \n\t" \ -+ "sb %[temp6], " #G "(%[dst]) \n\t" \ -+ "sb %[temp7], " #B "(%[dst]) \n\t" \ - - #define ASM_CLOBBER_LIST() \ - : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), \ diff --git a/gnu/packages/patches/freeimage-unbundle.patch b/gnu/packages/patches/freeimage-unbundle.patch index ca907d3276..4d9b8e25c9 100644 --- a/gnu/packages/patches/freeimage-unbundle.patch +++ b/gnu/packages/patches/freeimage-unbundle.patch @@ -1,4 +1,4 @@ -https://src.fedoraproject.org/cgit/rpms/freeimage.git/tree/FreeImage-3.17.0_unbundle.patch +https://src.fedoraproject.org/cgit/rpms/freeimage.git/tree/FreeImage_unbundle.patch diff -rupN FreeImage/genfipsrclist.sh FreeImage-new/genfipsrclist.sh --- FreeImage/genfipsrclist.sh 2015-02-20 10:52:16.000000000 +0100 @@ -25,10 +25,10 @@ diff -rupN FreeImage/gensrclist.sh FreeImage-new/gensrclist.sh #!/bin/sh -DIRLIST=". Source Source/Metadata Source/FreeImageToolkit Source/LibJPEG Source/LibPNG Source/LibTIFF4 Source/ZLib Source/LibOpenJPEG Source/OpenEXR Source/OpenEXR/Half Source/OpenEXR/Iex Source/OpenEXR/IlmImf Source/OpenEXR/IlmThread Source/OpenEXR/Imath Source/OpenEXR/IexMath Source/LibRawLite Source/LibRawLite/dcraw Source/LibRawLite/internal Source/LibRawLite/libraw Source/LibRawLite/src Source/LibWebP Source/LibJXR Source/LibJXR/common/include Source/LibJXR/image/sys Source/LibJXR/jxrgluelib" -+DIRLIST=". Source Source/Metadata Source/FreeImageToolkit Source/LibJXR Source/LibJXR/common/include Source/LibJXR/image/sys Source/LibJXR/jxrgluelib" ++DIRLIST=". Source Source/Metadata Source/FreeImageToolkit" echo "VER_MAJOR = 3" > Makefile.srcs - echo "VER_MINOR = 17.0" >> Makefile.srcs + echo "VER_MINOR = 18.0" >> Makefile.srcs diff -rupN FreeImage/Makefile.fip FreeImage-new/Makefile.fip --- FreeImage/Makefile.fip 2015-03-08 18:03:56.000000000 +0100 +++ FreeImage-new/Makefile.fip 2015-09-05 02:14:09.212684028 +0200 @@ -90,8 +90,8 @@ diff -rupN FreeImage/Makefile.gnu FreeImage-new/Makefile.gnu -# LibJXR -CXXFLAGS += -D__ANSI__ -CXXFLAGS += $(INCLUDE) -+override CFLAGS += $(INCLUDE) -D__ANSI__ $(shell pkg-config --cflags OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib) -+override LDFLAGS += -ljpeg $(shell pkg-config --libs OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib) ++override CFLAGS += $(INCLUDE) -D__ANSI__ -I/usr/include/jxrlib $(shell pkg-config --cflags OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib) ++override LDFLAGS += -ljpeg -ljpegxr -ljxrglue $(shell pkg-config --libs OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib) ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64) - CFLAGS += -fPIC @@ -215,6 +215,18 @@ diff -rupN FreeImage/Source/FreeImage/PluginJPEG.cpp FreeImage-new/Source/FreeIm } #include "FreeImage.h" +diff -rupN FreeImage/Source/FreeImage/PluginJXR.cpp FreeImage-new/Source/FreeImage/PluginJXR.cpp +--- FreeImage/Source/FreeImage/PluginJXR.cpp 2015-03-03 23:07:08.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/PluginJXR.cpp 2018-07-31 23:37:58.561953201 +0200 +@@ -23,7 +23,7 @@ + #include "Utilities.h" + #include "../Metadata/FreeImageTag.h" + +-#include "../LibJXR/jxrgluelib/JXRGlue.h" ++#include + + // ========================================================== + // Plugin Interface diff -rupN FreeImage/Source/FreeImage/PluginPNG.cpp FreeImage-new/Source/FreeImage/PluginPNG.cpp --- FreeImage/Source/FreeImage/PluginPNG.cpp 2015-03-10 20:16:12.000000000 +0100 +++ FreeImage-new/Source/FreeImage/PluginPNG.cpp 2015-09-05 02:13:52.044353363 +0200 @@ -241,38 +253,39 @@ diff -rupN FreeImage/Source/FreeImage/PluginRAW.cpp FreeImage-new/Source/FreeIma #include "FreeImage.h" #include "Utilities.h" + diff -rupN FreeImage/Source/FreeImage/PluginTIFF.cpp FreeImage-new/Source/FreeImage/PluginTIFF.cpp --- FreeImage/Source/FreeImage/PluginTIFF.cpp 2015-03-02 02:07:08.000000000 +0100 +++ FreeImage-new/Source/FreeImage/PluginTIFF.cpp 2015-09-05 02:13:52.044353363 +0200 @@ -37,9 +37,9 @@ - - #include "FreeImage.h" - #include "Utilities.h" --#include "../LibTIFF4/tiffiop.h" -+#include - #include "../Metadata/FreeImageTag.h" --#include "../OpenEXR/Half/half.h" -+#include - - #include "FreeImageIO.h" - #include "PSDParser.h" -@@ -194,16 +194,6 @@ TIFFFdOpen(thandle_t handle, const char - return tif; - } - --/** --Open a TIFF file for reading or writing --@param name --@param mode --*/ --TIFF* --TIFFOpen(const char* name, const char* mode) { -- return 0; --} -- - // ---------------------------------------------------------- - // TIFF library FreeImage-specific routines. - // ---------------------------------------------------------- + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibTIFF4/tiffiop.h" ++#include + #include "../Metadata/FreeImageTag.h" +-#include "../OpenEXR/Half/half.h" ++#include + + #include "FreeImageIO.h" + #include "PSDParser.h" +@@ -194,16 +194,6 @@ TIFFFdOpen(thandle_t handle, const char *name, const char *mode) { + return tif; + } + +-/** +-Open a TIFF file for reading or writing +-@param name +-@param mode +-*/ +-TIFF* +-TIFFOpen(const char* name, const char* mode) { +- return 0; +-} +- + // ---------------------------------------------------------- + // TIFF library FreeImage-specific routines. + // ---------------------------------------------------------- diff -rupN FreeImage/Source/FreeImage/PluginWebP.cpp FreeImage-new/Source/FreeImage/PluginWebP.cpp --- FreeImage/Source/FreeImage/PluginWebP.cpp 2015-03-02 02:07:08.000000000 +0100 +++ FreeImage-new/Source/FreeImage/PluginWebP.cpp 2015-09-05 02:13:52.044353363 +0200 @@ -282,15 +295,81 @@ diff -rupN FreeImage/Source/FreeImage/PluginWebP.cpp FreeImage-new/Source/FreeIm -#include "../LibWebP/src/webp/decode.h" -#include "../LibWebP/src/webp/encode.h" --#include "../LibWebP/src/enc/vp8enci.h" -#include "../LibWebP/src/webp/mux.h" +#include +#include -+// #include "../LibWebP/src/enc/vp8enci.h" +#include // ========================================================== // Plugin Interface + diff -rupN FreeImage/Source/FreeImage/PSDParser.cpp FreeImage-new/Source/FreeImage/PSDParser.cpp +--- FreeImage/Source/FreeImage/PSDParser.cpp 2016-02-11 03:18:02.000000000 +0100 ++++ FreeImage-new/Source/FreeImage/PSDParser.cpp 2018-08-01 00:17:18.323822675 +0200 +@@ -133,8 +133,8 @@ public: + template <> + class PSDGetValue<8> { + public: +- static inline UINT64 get(const BYTE * iprBuffer) { +- UINT64 v = ((const UINT64*)iprBuffer)[0]; ++ static inline uint64_t get(const BYTE * iprBuffer) { ++ uint64_t v = ((const uint64_t*)iprBuffer)[0]; + #ifndef FREEIMAGE_BIGENDIAN + SwapInt64(&v); + #endif +@@ -147,7 +147,7 @@ public: + + // -------------------------------------------------------------------------- + +-static UINT64 ++static uint64_t + psdReadSize(FreeImageIO *io, fi_handle handle, const psdHeaderInfo& header) { + if(header._Version == 1) { + BYTE Length[4]; +@@ -199,11 +199,11 @@ public: + template <> + class PSDSetValue<8> { + public: +- static inline void set(const BYTE * iprBuffer, UINT64 v) { ++ static inline void set(const BYTE * iprBuffer, uint64_t v) { + #ifndef FREEIMAGE_BIGENDIAN + SwapInt64(&v); + #endif +- ((UINT64*)iprBuffer)[0] = v; ++ ((uint64_t*)iprBuffer)[0] = v; + } + }; + +@@ -213,7 +213,7 @@ public: + // -------------------------------------------------------------------------- + + static inline bool +-psdWriteSize(FreeImageIO *io, fi_handle handle, const psdHeaderInfo& header, UINT64 v) { ++psdWriteSize(FreeImageIO *io, fi_handle handle, const psdHeaderInfo& header, uint64_t v) { + if(header._Version == 1) { + BYTE Length[4]; + psdSetLongValue(Length, sizeof(Length), (DWORD)v); +@@ -1063,10 +1063,10 @@ unsigned psdParser::GetChannelOffset(FIB + bool psdParser::ReadLayerAndMaskInfoSection(FreeImageIO *io, fi_handle handle) { + bool bSuccess = true; + +- UINT64 nTotalBytes = psdReadSize(io, handle, _headerInfo); ++ uint64_t nTotalBytes = psdReadSize(io, handle, _headerInfo); + + // Hack to handle large PSB files without using fseeko(). +- if (sizeof(long) < sizeof(UINT64)) { ++ if (sizeof(long) < sizeof(uint64_t)) { + const long offset = 0x10000000; + while (nTotalBytes > offset) { + if (io->seek_proc(handle, offset, SEEK_CUR) != 0) { +@@ -1672,7 +1672,7 @@ bool psdParser::WriteLayerAndMaskInfoSec + // Short section with no layers. + BYTE IntValue[4]; + +- UINT64 size; ++ uint64_t size; + if(_headerInfo._Version == 1) { + size = 8; + } else { diff -rupN FreeImage/Source/FreeImage/ZLibInterface.cpp FreeImage-new/Source/FreeImage/ZLibInterface.cpp --- FreeImage/Source/FreeImage/ZLibInterface.cpp 2015-03-02 02:07:10.000000000 +0100 +++ FreeImage-new/Source/FreeImage/ZLibInterface.cpp 2015-09-05 02:13:52.044353363 +0200 @@ -536,3 +615,21 @@ diff -rupN FreeImage/Source/Metadata/XTIFF.cpp FreeImage-new/Source/Metadata/XTI if(skip_write_field(tif, tag_id)) { // skip tags that are already handled by the LibTIFF writing process +diff -rupN FreeImage/Source/Utilities.h FreeImage-new/Source/Utilities.h +--- FreeImage/Source/Utilities.h 2016-04-11 15:15:32.000000000 +0200 ++++ FreeImage-new/Source/Utilities.h 2018-08-01 00:16:29.826825358 +0200 +@@ -446,12 +446,12 @@ SwapLong(DWORD *lp) { + } + + inline void +-SwapInt64(UINT64 *arg) { ++SwapInt64(uint64_t *arg) { + #if defined(_MSC_VER) && _MSC_VER >= 1310 + *arg = _byteswap_uint64(*arg); + #else + union Swap { +- UINT64 sv; ++ uint64_t sv; + DWORD ul[2]; + } tmp, result; + tmp.sv = *arg; -- cgit v1.2.3 From 3f3d712cc525d65c184cea4c2048a62a4ec87c73 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Thu, 26 Sep 2019 05:01:26 +0200 Subject: gnu: beets: Update to 1.4.9. * gnu/packages/music.scm (beets): Update to 1.4.9. [source]: Remove patch. [arguments]: Remove more Python 3.7 compatibility fixes. * gnu/packages/patches/beets-python-3.7-fix.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/music.scm | 11 +---- gnu/packages/patches/beets-python-3.7-fix.patch | 57 ------------------------- 3 files changed, 2 insertions(+), 67 deletions(-) delete mode 100644 gnu/packages/patches/beets-python-3.7-fix.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 919e836b8c..49dc4e7b97 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -711,7 +711,6 @@ dist_patch_DATA = \ %D%/packages/patches/bash-completion-directories.patch \ %D%/packages/patches/bastet-change-source-of-unordered_set.patch \ %D%/packages/patches/bazaar-CVE-2017-14176.patch \ - %D%/packages/patches/beets-python-3.7-fix.patch \ %D%/packages/patches/beignet-correct-file-names.patch \ %D%/packages/patches/benchmark-unbundle-googletest.patch \ %D%/packages/patches/biber-fix-encoding-write.patch \ diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index b28b375067..508f2ea3bf 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -2813,14 +2813,13 @@ Songs can be searched by artist, name or even by a part of the song text.") (define-public beets (package (name "beets") - (version "1.4.7") + (version "1.4.9") (source (origin (method url-fetch) (uri (pypi-uri "beets" version)) - (patches (search-patches "beets-python-3.7-fix.patch")) (sha256 (base32 - "0w3gz69s9gf5ih69d4sddgh7ndj7658m621bp742zldvjakdncrs")))) + "0m40rjimvfgy1dv04p8f8d5dvi2855v4ix99a9xr900cmcn476yj")))) (build-system python-build-system) (arguments `(#:phases @@ -2829,12 +2828,6 @@ Songs can be searched by artist, name or even by a part of the song text.") (lambda _ (setenv "HOME" (string-append (getcwd) "/tmp")) #t)) - (add-after 'unpack 'make-python3.7-compatible - (lambda _ - ;; See . - (substitute* "beets/autotag/hooks.py" - (("re\\._pattern_type") "re.Pattern")) - #t)) (replace 'check (lambda _ (invoke "nosetests" "-v")))))) diff --git a/gnu/packages/patches/beets-python-3.7-fix.patch b/gnu/packages/patches/beets-python-3.7-fix.patch deleted file mode 100644 index 43707cd9d0..0000000000 --- a/gnu/packages/patches/beets-python-3.7-fix.patch +++ /dev/null @@ -1,57 +0,0 @@ -Fix compatibility issue with Python 3.7: - -https://github.com/beetbox/beets/issues/2978 - -Patch copied from upstream source repository: - -https://github.com/beetbox/beets/commit/15d44f02a391764da1ce1f239caef819f08beed8 - -From 15d44f02a391764da1ce1f239caef819f08beed8 Mon Sep 17 00:00:00 2001 -From: Adrian Sampson -Date: Sun, 22 Jul 2018 12:34:19 -0400 -Subject: [PATCH] Fix Python 3.7 compatibility (#2978) - ---- - beets/autotag/hooks.py | 8 +++++++- - docs/changelog.rst | 2 ++ - 2 files changed, 9 insertions(+), 1 deletion(-) - -diff --git a/beets/autotag/hooks.py b/beets/autotag/hooks.py -index 3615a9333..1c62a54c5 100644 ---- a/beets/autotag/hooks.py -+++ b/beets/autotag/hooks.py -@@ -31,6 +31,12 @@ - - log = logging.getLogger('beets') - -+# The name of the type for patterns in re changed in Python 3.7. -+try: -+ Pattern = re._pattern_type -+except AttributeError: -+ Pattern = re.Pattern -+ - - # Classes used to represent candidate options. - -@@ -433,7 +439,7 @@ def _eq(self, value1, value2): - be a compiled regular expression, in which case it will be - matched against `value2`. - """ -- if isinstance(value1, re._pattern_type): -+ if isinstance(value1, Pattern): - return bool(value1.match(value2)) - return value1 == value2 - -#diff --git a/docs/changelog.rst b/docs/changelog.rst -#index be6de2904..d487f31f5 100644 -#--- a/docs/changelog.rst -#+++ b/docs/changelog.rst -#@@ -19,6 +19,8 @@ New features: -# -# Fixes: -# -#+* Fix compatibility Python 3.7 and its change to a name in the ``re`` module. -#+ :bug:`2978` -# * R128 normalization tags are now properly deleted from files when the values -# are missing. -# Thanks to :user:`autrimpo`. -- cgit v1.2.3 From 6eb1d20b682d1256bb4561517daa616b15fec22b Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Thu, 1 Aug 2019 15:27:28 +0200 Subject: gnu: Add debops. * gnu/packages/admin.scm (debops): New variable. * gnu/packages/patches/debops-constants-for-external-program-names.patch, gnu/packages/patches/debops-debops-defaults-fall-back-to-less.patch: New files. * gnu/local.mk: Add them. --- gnu/local.mk | 2 + gnu/packages/admin.scm | 98 ++++++++ ...bops-constants-for-external-program-names.patch | 276 +++++++++++++++++++++ .../debops-debops-defaults-fall-back-to-less.patch | 45 ++++ 4 files changed, 421 insertions(+) create mode 100644 gnu/packages/patches/debops-constants-for-external-program-names.patch create mode 100644 gnu/packages/patches/debops-debops-defaults-fall-back-to-less.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 49dc4e7b97..a6fe439904 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -765,6 +765,8 @@ dist_patch_DATA = \ %D%/packages/patches/dbus-helper-search-path.patch \ %D%/packages/patches/dbus-CVE-2019-12749.patch \ %D%/packages/patches/dealii-mpi-deprecations.patch \ + %D%/packages/patches/debops-constants-for-external-program-names.patch \ + %D%/packages/patches/debops-debops-defaults-fall-back-to-less.patch \ %D%/packages/patches/deja-dup-use-ref-keyword-for-iter.patch \ %D%/packages/patches/dfu-programmer-fix-libusb.patch \ %D%/packages/patches/diffutils-gets-undeclared.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 327abe455a..6d5e4b9fcc 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -26,6 +26,7 @@ ;;; Copyright © 2019 Brett Gilio ;;; Copyright © 2019 Björn Höfling ;;; Copyright © 2019 Jakob L. Kreuze +;;; Copyright © 2019 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -60,6 +61,7 @@ #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages check) + #:use-module (gnu packages crypto) #:use-module (gnu packages cyrus-sasl) #:use-module (gnu packages dns) #:use-module (gnu packages file) @@ -112,6 +114,7 @@ #:use-module (gnu packages boost) #:use-module (gnu packages elf) #:use-module (gnu packages mpi) + #:use-module (gnu packages version-control) #:use-module (gnu packages web)) (define-public aide @@ -1903,6 +1906,101 @@ ad hoc task execution, and multinode orchestration---including trivializing things like zero-downtime rolling updates with load balancers.") (license license:gpl3+))) +(define-public debops + (package + (name "debops") + (version "1.1.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/debops/debops") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "052b2dykdn35pdpn9s4prawl6nl6yzih8nyf54hpvhpisvjrm1v5")) + (patches + (search-patches "debops-constants-for-external-program-names.patch" + "debops-debops-defaults-fall-back-to-less.patch")))) + (build-system python-build-system) + (native-inputs + `(("git" ,git))) + (inputs + `(("ansible" ,ansible) + ("encfs" ,encfs) + ("fuse" ,fuse) + ("util-linux" ,util-linux) ;; for umount + ("findutils" ,findutils) + ("gnupg" ,gnupg) + ("which" ,which))) + (propagated-inputs + `(("python-future" ,python-future) + ("python-distro" ,python-distro))) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'nuke-debops-update + (lambda _ + (chmod "bin/debops-update" #o755) ; FIXME work-around git-fetch issue + (with-output-to-file "bin/debops-update" + (lambda () + (format #t "#!/bin/sh +echo 'debops is installed via guix. guix-update is useless in this case. +Please use `guix package -u debops` instead.'"))) + #t)) + ;; patch shebangs only in actuall scripts, not in files included in + ;; roles (which are to be delivered to the targte systems) + (delete `patch-generated-file-shebangs) + (replace 'patch-source-shebangs + (lambda _ + (for-each patch-shebang + (find-files "bin" + (lambda (file stat) + ;; Filter out symlinks. + (eq? 'regular (stat:type stat))) + #:stat lstat)))) + (add-after 'unpack 'fix-paths + (lambda _ + (define (substitute-program-names file) + ;; e.g. ANSIBLE_PLAYBOOK = '/gnu/store/…/bin/ansible-playbook' + (for-each + (lambda (name) + (let ((varname (string-upcase + (string-map + (lambda (c) (if (char=? c #\-) #\_ c)) + name)))) + (substitute* file + (((string-append "^(" varname " = )'.*'") line prefix) + (string-append prefix "'" (which name) "'"))))) + '("ansible-playbook" "encfs" "find" "fusermount" + "umount" "gpg" "ansible" "which"))) + (for-each substitute-program-names + '("bin/debops" + "bin/debops-padlock" + "bin/debops-task" + "debops/__init__.py" + "debops/cmds/__init__.py")) + #t))))) + (home-page "https://www.debops.org/") + (synopsis "Collection of general-purpose Ansible roles") + (description "The Ansible roles provided by that can be used to manage +Debian or Ubuntu hosts. In addition, a default set of Ansible playbooks can +be used to apply the provided roles in a controlled way, using Ansible +inventory groups. + +The roles are written with a high customization in mind, which can be done +using Ansible inventory. This way the role and playbook code can be shared +between multiple environments, with different configuration in to each one. + +Services can be managed on a single host, or spread between multiple hosts. +DebOps provides support for different SQL and NoSQL databases, web servers, +programming languages and specialized applications useful in a data center +environment or in a cluster. The project can also be used to deploy +virtualization environments using KVM/libvirt, Docker or LXC technologies to +manage virtual machines and/or containers.") + (license license:gpl3+))) + (define-public emacs-ansible-doc (let ((commit "86083a7bb2ed0468ca64e52076b06441a2f8e9e0")) (package diff --git a/gnu/packages/patches/debops-constants-for-external-program-names.patch b/gnu/packages/patches/debops-constants-for-external-program-names.patch new file mode 100644 index 0000000000..b3b34ed323 --- /dev/null +++ b/gnu/packages/patches/debops-constants-for-external-program-names.patch @@ -0,0 +1,276 @@ +From 78d5cddafebb28e2e54efeb781495b5607ddb356 Mon Sep 17 00:00:00 2001 +From: Hartmut Goebel +Date: Thu, 8 Aug 2019 15:19:48 +0200 +Subject: [PATCH] Scripts: Use constants for external program names. + +This makes it much, much easier to replace the program +with one using an absolute path. This is necessary for +e.g. Guix to keep references to these external programs. +--- + bin/debops | 10 +++++++--- + bin/debops-padlock | 21 +++++++++++++++------ + bin/debops-task | 7 +++++-- + bin/debops-update | 18 +++++++++++------- + debops/__init__.py | 17 ++++++++++++----- + debops/cmds/__init__.py | 6 +++++- + 6 files changed, 55 insertions(+), 24 deletions(-) + +diff --git a/bin/debops b/bin/debops +index 2b7ad3f88..caaeb892f 100755 +--- a/bin/debops ++++ b/bin/debops +@@ -59,6 +59,10 @@ ConfigFileHeader = """\ + # You can manipulate the contents of this file via `.debops.cfg`. + """ + ++# External programms used. List here for easy substitution for ++# hard-coded paths. ++ANSIBLE_PLAYBOOK = 'ansible-playbook' ++ + + def write_config(filename, config): + cfgparser = configparser.ConfigParser() +@@ -131,7 +135,7 @@ def gen_ansible_cfg(filename, config, project_root, playbooks_path, + os.path.join(playbooks_path, "roles"), + "/etc/ansible/roles"))) + +- ansible_version_out = subprocess.check_output(["ansible-playbook", ++ ansible_version_out = subprocess.check_output([ANSIBLE_PLAYBOOK, + "--version"]).decode() + + # Get first line and split by spaces to get second 'word'. +@@ -197,7 +201,7 @@ def main(cmd_args): + playbooks_path = '/nonexistent' + + # Make sure required commands are present +- require_commands('ansible-playbook') ++ require_commands(ANSIBLE_PLAYBOOK) + + # Check if user specified a potential playbook name as the first + # argument. If yes, use it as the playbook name and remove it from +@@ -256,7 +260,7 @@ def main(cmd_args): + print("Running Ansible playbooks:") + for element in play_list: + print(element) +- return subprocess.call(['ansible-playbook'] + play_list + arg_list) ++ return subprocess.call([ANSIBLE_PLAYBOOK] + play_list + arg_list) + finally: + if revert_unlock: + padlock_lock(encfs_encrypted) +diff --git a/bin/debops-padlock b/bin/debops-padlock +index bfdfb8e06..2a97716cd 100755 +--- a/bin/debops-padlock ++++ b/bin/debops-padlock +@@ -67,6 +67,14 @@ devrandom = os.environ.get('DEVRANDOM', "/dev/urandom") + + SCRIPT_FILENAME = 'padlock-script' + ++# External programms used. List here for easy substitution for ++# hard-coded paths. ++ENCFS = 'encfs' ++FIND = 'find' ++FUSERMOUNT = 'fusermount' ++UMOUNT = 'umount' ++GPG = 'gpg' ++ + # ---- DebOps environment setup ---- + + +@@ -80,9 +88,9 @@ def main(subcommand_func, **kwargs): + # Make sure required commands are present + # OS X compatibility + if sys.platform == 'darwin': +- require_commands('encfs', 'find', 'umount', 'gpg') ++ require_commands(ENCFS, FIND, UMOUNT, GPG) + else: +- require_commands('encfs', 'find', 'fusermount', 'gpg') ++ require_commands(ENCFS, FIND, FUSERMOUNT, GPG) + + inventory_path = find_inventorypath(project_root, required=False) + # If inventory hasn't been found automatically, assume it's the default +@@ -121,7 +129,7 @@ def init(encfs_decrypted, encfs_encrypted, recipients): + # Generate a random password and encrypt it with GPG keys of recipients. + print("Generating a random", ENCFS_KEYFILE_LENGTH, "char password") + pwd = gen_pwd() +- gpg = subprocess.Popen(['gpg', '--encrypt', '--armor', ++ gpg = subprocess.Popen([GPG, '--encrypt', '--armor', + '--output', encfs_keyfile] + recipients, + stdin=subprocess.PIPE) + gpg.communicate(pwd.encode('utf-8')) +@@ -133,9 +141,10 @@ def init(encfs_decrypted, encfs_encrypted, recipients): + # NB2: We can not use padlock_unlock here, because the config file + # does not yet exist. + encfs = subprocess.Popen([ +- 'encfs', encfs_encrypted, encfs_decrypted, ++ ENCFS, encfs_encrypted, encfs_decrypted, + '--extpass', +- 'gpg --decrypt --no-mdc-warning --output - '+shquote(encfs_keyfile)], ++ GPG + ' --decrypt --no-mdc-warning --output - ' ++ + shquote(encfs_keyfile)], + stdin=subprocess.PIPE) + encfs.communicate(('p\n'+pwd).encode('utf-8')) + +@@ -154,7 +163,7 @@ def init(encfs_decrypted, encfs_encrypted, recipients): + + # Protect the EncFS configuration file by also encrypting it with + # the GPG keys of recipients. +- subprocess.call(['gpg', '--encrypt', '--armor', ++ subprocess.call([GPG, '--encrypt', '--armor', + '--output', encfs_configfile+'.asc'] + + recipients + [encfs_configfile]) + os.remove(encfs_configfile) +diff --git a/bin/debops-task b/bin/debops-task +index 223e5f834..dc31ad4e6 100755 +--- a/bin/debops-task ++++ b/bin/debops-task +@@ -49,11 +49,14 @@ project_root = find_debops_project(required=True) + # todo: need to decide on semantics! + # config = read_config(project_root) + ++# External programms used. List here for easy substitution for ++# hard-coded paths. ++ANSIBLE = 'ansible' + + # ---- Main script ---- + + # Make sure required commands are present +-require_commands('ansible') ++require_commands(ANSIBLE) + + ansible_inventory = find_inventorypath(project_root) + +@@ -71,5 +74,5 @@ if INSECURE: + os.environ['ANSIBLE_HOST_KEY_CHECKING'] = 'False' + + # Run ansible with custom environment +-cmd = ['ansible'] + module + sys.argv[1:] ++cmd = [ANSIBLE] + module + sys.argv[1:] + subprocess.call(cmd) +diff --git a/bin/debops-update b/bin/debops-update +index 88c5e2c82..cc7e57cb0 100755 +--- a/bin/debops-update ++++ b/bin/debops-update +@@ -90,6 +90,10 @@ GALAXY_REQUIREMENTS = "galaxy/requirements.txt" + # Default Ansible Galaxy user account name + GALAXY_ACCOUNT = "debops" + ++# External programms used. List here for easy substitution for ++# hard-coded paths. ++GIT = 'git' ++ + + # ---- Functions ---- + +@@ -137,7 +141,7 @@ def clone_git_repository(repo_uri, branch, destination, dry_run=False): + if dry_run: + print("Cloning '%s' to %s..." % (repo_uri, destination)) + else: +- subprocess.call(['git', 'clone', '--quiet', '--branch', branch, ++ subprocess.call([GIT, 'clone', '--quiet', '--branch', branch, + repo_uri, destination]) + + +@@ -152,22 +156,22 @@ def update_git_repository(path, dry_run=False, remote_uri=False): + os.chdir(path) + + if dry_run: +- subprocess.call(['git', 'fetch']) +- subprocess.call(['git', 'diff', 'HEAD', 'origin', '--stat']) ++ subprocess.call([GIT, 'fetch']) ++ subprocess.call([GIT, 'diff', 'HEAD', 'origin', '--stat']) + else: + # Get the current sha of the head branch + current_sha = subprocess.check_output( +- ['git', 'rev-parse', 'HEAD']).strip() ++ [GIT, 'rev-parse', 'HEAD']).strip() + + # Fetch it silently and store the new sha +- subprocess.call(['git', 'fetch', '--quiet']) ++ subprocess.call([GIT, 'fetch', '--quiet']) + fetch_sha = subprocess.check_output( +- ['git', 'rev-parse', 'FETCH_HEAD']).strip() ++ [GIT, 'rev-parse', 'FETCH_HEAD']).strip() + + if current_sha != fetch_sha: + print() + print('--') +- subprocess.call(['git', 'merge', fetch_sha]) ++ subprocess.call([GIT, 'merge', fetch_sha]) + + if remote_uri: + compare_uri = (remote_uri + '/compare/' + current_sha[:7] +diff --git a/debops/__init__.py b/debops/__init__.py +index 1c2cedcb0..da8430e41 100644 +--- a/debops/__init__.py ++++ b/debops/__init__.py +@@ -93,6 +93,13 @@ ENCFS_KEYFILE = ".encfs6.keyfile" + # Length of the random EncFS password stored in encrypted keyfile + ENCFS_KEYFILE_LENGTH = 256 + ++# External programms used. List here for easy substitution for ++# hard-coded paths. ++ENCFS = 'encfs' ++FUSERMOUNT = 'fusermount' ++UMOUNT = 'umount' ++GPG = 'gpg' ++ + + # ---- Functions ---- + +@@ -180,9 +187,9 @@ def padlock_lock(encrypted_path): + return False + # OS X compatibility + if sys.platform == 'darwin': +- subprocess.call(['umount', decrypted_path]) ++ subprocess.call([UMOUNT, decrypted_path]) + else: +- subprocess.call(['fusermount', '-u', decrypted_path]) ++ subprocess.call([FUSERMOUNT, '-u', decrypted_path]) + return True + + +@@ -237,14 +244,14 @@ def padlock_unlock(encrypted_path): + # Start encfs. It will wait for input on the `configfile` named + # pipe. + encfs = subprocess.Popen([ +- 'encfs', encrypted_path, decrypted_path, ++ ENCFS, encrypted_path, decrypted_path, + '--extpass', +- 'gpg --decrypt --no-mdc-warning --output - %s' % shquote(keyfile)]) ++ GPG + ' --decrypt --no-mdc-warning --output - %s' % shquote(keyfile)]) + # now decrypt the config and write it into the named pipe + with open(configfile, 'w') as fh: + # NB: gpg must write to stdout to avoid it is asking whether + # the file should be overwritten +- subprocess.Popen(['gpg', ++ subprocess.Popen([GPG, + '--decrypt', '--no-mdc-warning', '--output', '-', + crypted_configfile], stdout=fh).wait() + encfs.wait() +diff --git a/debops/cmds/__init__.py b/debops/cmds/__init__.py +index b221fa191..9fabf43a5 100644 +--- a/debops/cmds/__init__.py ++++ b/debops/cmds/__init__.py +@@ -55,6 +55,10 @@ SCRIPT_NAME = os.path.basename(sys.argv[0]) + # command line) + INSECURE = bool(os.environ.get('INSECURE', False)) + ++# External programms used. List here for easy substitution for ++# hard-coded paths. ++WHICH = 'which' ++ + + def error_msg(message, severity="Error"): + """ +@@ -70,7 +74,7 @@ def require_commands(*cmd_names): + Check if required commands exist. + """ + def command_exists(cmd_name): +- which = "where" if platform.system() == "Windows" else "which" ++ which = "where" if platform.system() == "Windows" else WHICH + return not subprocess.call([which, cmd_name], + stdout=DEVNULL, stderr=subprocess.STDOUT) + +-- +2.21.0 + diff --git a/gnu/packages/patches/debops-debops-defaults-fall-back-to-less.patch b/gnu/packages/patches/debops-debops-defaults-fall-back-to-less.patch new file mode 100644 index 0000000000..bbb6b7c08e --- /dev/null +++ b/gnu/packages/patches/debops-debops-defaults-fall-back-to-less.patch @@ -0,0 +1,45 @@ +From 5059daf8bd59a83f520c14731173ea76ce8b8661 Mon Sep 17 00:00:00 2001 +From: Hartmut Goebel +Date: Sun, 8 Sep 2019 13:09:15 +0200 +Subject: [PATCH] [debops-defaults] If `view` is not available, try less, etc. + +--- + bin/debops-defaults | 21 +++++++++++++++------ + 1 file changed, 15 insertions(+), 6 deletions(-) + +diff --git a/bin/debops-defaults b/bin/debops-defaults +index 9dd87fe0a..3e3db4c41 100755 +--- a/bin/debops-defaults ++++ b/bin/debops-defaults +@@ -96,13 +96,22 @@ def main(role_list): + config = read_config(project_root) + playbooks_path = find_playbookpath(config, project_root, required=True) + +- # Make sure required commands are present +- require_commands('view') +- +- if sys.stdout.isatty(): ++ # Check if one of the output commands is present ++ sys.stdout = io.BytesIO() # suppress error message, if any ++ for cmd_args in (('view', '+set ft=yaml', '-'), ++ ('less', '-'), ++ ('more', '-')): ++ try: ++ require_commands(cmd_args[0]) ++ break ++ except SystemExit: ++ # this command was not found ++ cmd_args = None ++ sys.stdout = sys.__stdout__ ++ ++ if cmd_args and sys.stdout.isatty(): + # if script is run as standalone, redirect to view +- view = subprocess.Popen(['view', '+set ft=yaml', '-'], +- stdin=subprocess.PIPE) ++ view = subprocess.Popen(cmd_args, stdin=subprocess.PIPE) + try: + aggregate_defaults(playbooks_path, role_list, view.stdin) + except IOError as e: +-- +2.21.0 + -- cgit v1.2.3 From 308eb5c11a885768f81fb6136fd4d30b4639fe04 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Tue, 24 Sep 2019 20:23:31 +0200 Subject: gnu: gcc: Fix mingw cross compiler. * gnu/packages/patches/gcc-7-cross-mingw.patch: New file. * gnu/packages/cross-base.scm (cross-gcc-patches): Add XGCC parameter; update caller. Use it for target mingw and gcc >= 7. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/cross-base.scm | 13 ++++++++----- gnu/packages/patches/gcc-7-cross-mingw.patch | 24 ++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 gnu/packages/patches/gcc-7-cross-mingw.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 2fcd2648ed..e37c24a7ca 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -853,6 +853,7 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-6-cross-environment-variables.patch \ %D%/packages/patches/gcc-6-source-date-epoch-1.patch \ %D%/packages/patches/gcc-6-source-date-epoch-2.patch \ + %D%/packages/patches/gcc-7-cross-mingw.patch \ %D%/packages/patches/gcc-8-cross-environment-variables.patch \ %D%/packages/patches/gcc-8-strmov-store-file-names.patch \ %D%/packages/patches/gcc-9-asan-fix-limits-include.patch \ diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 78dae7431a..7108000f06 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès ;;; Copyright © 2014, 2015, 2018 Mark H Weaver -;;; Copyright © 2016 Jan Nieuwenhuizen +;;; Copyright © 2016, 2019 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2016 Manolis Fragkiskos Ragkousis ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2019 Marius Bakke @@ -190,13 +190,16 @@ base compiler and using LIBC (which may be either a libc package or #f.)" '("CROSS_C_INCLUDE_PATH" "CROSS_CPLUS_INCLUDE_PATH"))) #t)))))))))) -(define (cross-gcc-patches target) - "Return GCC patches needed for TARGET." +(define (cross-gcc-patches xgcc target) + "Return GCC patches needed for XGCC and TARGET." (cond ((string-prefix? "xtensa-" target) ;; Patch by Qualcomm needed to build the ath9k-htc firmware. (search-patches "ath9k-htc-firmware-gcc.patch")) ((target-mingw? target) - (search-patches "gcc-4.9.3-mingw-gthr-default.patch")) + (append (search-patches "gcc-4.9.3-mingw-gthr-default.patch") + (if (version>=? (package-version xgcc) "7.0") + (search-patches "gcc-7-cross-mingw.patch") + '()))) (else '()))) (define (cross-gcc-snippet target) @@ -229,7 +232,7 @@ target that libc." ((version>=? (package-version xgcc) "8.0") (search-patch "gcc-8-cross-environment-variables.patch")) ((version>=? (package-version xgcc) "6.0") (search-patch "gcc-6-cross-environment-variables.patch")) (else (search-patch "gcc-cross-environment-variables.patch"))) - (cross-gcc-patches target)))) + (cross-gcc-patches xgcc target)))) (modules '((guix build utils))) (snippet (cross-gcc-snippet target)))) diff --git a/gnu/packages/patches/gcc-7-cross-mingw.patch b/gnu/packages/patches/gcc-7-cross-mingw.patch new file mode 100644 index 0000000000..eec6f88953 --- /dev/null +++ b/gnu/packages/patches/gcc-7-cross-mingw.patch @@ -0,0 +1,24 @@ +This fixes + +../../../../gcc-7.4.0/libstdc++-v3/libsupc++/new_opa.cc: In function ‘void* __gnu_cxx::aligned_alloc(std::size_t, std::size_t)’: +../../../../gcc-7.4.0/libstdc++-v3/libsupc++/new_opa.cc:78:10: error: ‘memalign’ was not declared in this scope + return memalign (al, sz); + ^~~~~~~~ +../../../../gcc-7.4.0/libstdc++-v3/libsupc++/new_opa.cc:78:10: note: suggested alternative: ‘max_align_t’ + return memalign (al, sz); + ^~~~~~~~ + max_align_t + +diff --git a/libstdc++-v3/libsupc++/new_opa.cc b/libstdc++-v3/libsupc++/new_opa.cc +index 94e79cadb0e..084900e0daf 100644 +--- a/libstdc++-v3/libsupc++/new_opa.cc ++++ b/libstdc++-v3/libsupc++/new_opa.cc +@@ -39,6 +39,8 @@ extern "C" void *memalign(std::size_t boundary, std::size_t size); + # endif + #endif + ++#define memalign _aligned_malloc ++ + using std::new_handler; + using std::bad_alloc; + -- cgit v1.2.3 From 772ca8e4f62d5b74286e39652b33afb817e17ca2 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Fri, 27 Sep 2019 10:46:06 +0200 Subject: gnu: supercollider: Fix build and update to 3.10.3. * gnu/packages/patches/supercollider-boost-1.70-build-fix.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/audio.scm (supercollider): Update to 3.10.3 and apply the previous patch to fix build with boost-1.70. Remove outdated 'fix-build-with-boost-1.68 phase. --- gnu/local.mk | 1 + gnu/packages/audio.scm | 13 ++++------ .../supercollider-boost-1.70-build-fix.patch | 28 ++++++++++++++++++++++ 3 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 gnu/packages/patches/supercollider-boost-1.70-build-fix.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index e37c24a7ca..bee5b7024a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1328,6 +1328,7 @@ dist_patch_DATA = \ %D%/packages/patches/strace-ipc-tests.patch \ %D%/packages/patches/streamlink-update-test.patch \ %D%/packages/patches/stumpwm-fix-broken-read-one-line.patch \ + %D%/packages/patches/supercollider-boost-1.70-build-fix.patch \ %D%/packages/patches/superlu-dist-awpm-grid.patch \ %D%/packages/patches/superlu-dist-fix-mpi-deprecations.patch \ %D%/packages/patches/superlu-dist-scotchmetis.patch \ diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 36fc434160..f1a45bc1ca 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -22,6 +22,7 @@ ;;; Copyright © 2019 Leo Famulari ;;; Copyright © 2019 Rutger Helling ;;; Copyright © 2019 Arun Isaac +;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -2177,16 +2178,18 @@ background file post-processing.") (define-public supercollider (package (name "supercollider") - (version "3.10.2") + (version "3.10.3") (source (origin (method url-fetch) (uri (string-append "https://github.com/supercollider/supercollider" "/releases/download/Version-" version "/SuperCollider-" version "-Source-linux.tar.bz2")) + (patches + (search-patches "supercollider-boost-1.70-build-fix.patch")) (sha256 (base32 - "0ynz1ydcpsd5h57h1n4a7avm6p1cif5a8rkmz4qpr46pr8z9p6iq")))) + "0srm6wbazidkrd4ckjy4ypyhkdwcnx2i7k9msjyngalh0mrc9zz1")))) (build-system cmake-build-system) (arguments `(#:configure-flags '("-DSYSTEM_BOOST=on" "-DSYSTEM_YAMLCPP=on" @@ -2198,12 +2201,6 @@ background file post-processing.") (ice-9 ftw)) #:phases (modify-phases %standard-phases - (add-after 'unpack 'fix-build-with-boost-1.68 - (lambda _ - (substitute* "server/supernova/utilities/time_tag.hpp" - (("(time_duration offset = .+ microseconds\\().*" _ m) - (string-append m "static_cast(get_nanoseconds()/1000));\n"))) - #t)) (add-after 'unpack 'rm-bundled-libs (lambda _ ;; The build system doesn't allow us to unbundle the following diff --git a/gnu/packages/patches/supercollider-boost-1.70-build-fix.patch b/gnu/packages/patches/supercollider-boost-1.70-build-fix.patch new file mode 100644 index 0000000000..073044fccb --- /dev/null +++ b/gnu/packages/patches/supercollider-boost-1.70-build-fix.patch @@ -0,0 +1,28 @@ +Patches taken from https://gitweb.gentoo.org/repo/gentoo.git/tree/media-sound/supercollider/files/supercollider-3.10.2-boost-1.70.patch?id=a420618dc766bba0654dbe0ef67008fdc5e901c6 to fix supercollider build with boost 1.70. + +diff --git a/server/supernova/sc/sc_osc_handler.cpp b/server/supernova/sc/sc_osc_handler.cpp +index 5116a1be87..96e937ec25 100644 +--- a/server/supernova/sc/sc_osc_handler.cpp ++++ b/server/supernova/sc/sc_osc_handler.cpp +@@ -728,7 +728,8 @@ void sc_osc_handler::tcp_connection::handle_message() { + + + void sc_osc_handler::start_tcp_accept(void) { +- tcp_connection::pointer new_connection = tcp_connection::create(tcp_acceptor_.get_io_service()); ++ tcp_connection::pointer new_connection = ++ tcp_connection::create((boost::asio::io_context&)tcp_acceptor_.get_executor().context()); + + tcp_acceptor_.async_accept( + new_connection->socket(), +diff --git a/server/supernova/utilities/utils.hpp b/server/supernova/utilities/utils.hpp +index 35b8ab5ad..a7c191f2d 100644 +--- a/server/supernova/utilities/utils.hpp ++++ b/server/supernova/utilities/utils.hpp +@@ -23,6 +23,7 @@ + + #include + ++#include + #include + #include + #include -- cgit v1.2.3 From ba567cae9725f8adf717106f5b54baeb6efd89e4 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Fri, 27 Sep 2019 22:19:39 -0500 Subject: gnu: dealii: Update to 9.1.1. * gnu/packages/maths.scm (dealii): Update to 9.1.1. [source]: Remove patch no longer needed. * gnu/local.mk (dist_patch_DATA): ditto. * gnu/packages/patches/dealii-mpi-deprecations.patch: Delete it. --- gnu/local.mk | 1 - gnu/packages/maths.scm | 5 ++-- gnu/packages/patches/dealii-mpi-deprecations.patch | 28 ---------------------- 3 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 gnu/packages/patches/dealii-mpi-deprecations.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index a6fe439904..b04a5d796e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -764,7 +764,6 @@ dist_patch_DATA = \ %D%/packages/patches/darkice-workaround-fpermissive-error.patch \ %D%/packages/patches/dbus-helper-search-path.patch \ %D%/packages/patches/dbus-CVE-2019-12749.patch \ - %D%/packages/patches/dealii-mpi-deprecations.patch \ %D%/packages/patches/debops-constants-for-external-program-names.patch \ %D%/packages/patches/debops-debops-defaults-fall-back-to-less.patch \ %D%/packages/patches/deja-dup-use-ref-keyword-for-iter.patch \ diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 2e0883a724..291a367a2f 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -3636,7 +3636,7 @@ revised simplex and the branch-and-bound methods.") (define-public dealii (package (name "dealii") - (version "9.0.1") + (version "9.1.1") (source (origin (method url-fetch) @@ -3644,8 +3644,7 @@ revised simplex and the branch-and-bound methods.") "download/v" version "/dealii-" version ".tar.gz")) (sha256 (base32 - "0r7f8rhl3xr94imd372plizdcbqk0a70w73lwc3vw912dxk0sbyz")) - (patches (search-patches "dealii-mpi-deprecations.patch")) + "0xhjv0gzswpjbc43xbrpwfc5848g508l01855nszx3g5gwzlhnzw")) (modules '((guix build utils))) (snippet ;; Remove bundled sources: UMFPACK, TBB, muParser, and boost diff --git a/gnu/packages/patches/dealii-mpi-deprecations.patch b/gnu/packages/patches/dealii-mpi-deprecations.patch deleted file mode 100644 index 816d54140a..0000000000 --- a/gnu/packages/patches/dealii-mpi-deprecations.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 40538ad31a71495649d174b0f7be5f7135d0a905 Mon Sep 17 00:00:00 2001 -From: David Wells -Date: Sat, 2 Feb 2019 10:00:38 -0500 -Subject: [PATCH] Avoid calling a deprecated MPI function. - -This was deprecated a long time ago (1996) and is not present in the -latest version of openMPI (4.0): see - -https://www.open-mpi.org/faq/?category=mpi-removed - -Credit goes to Pratik Nayak for finding this issue. ---- - source/base/mpi.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/source/base/mpi.cc b/source/base/mpi.cc -index bd1f7f9846a..b8cd45e7c26 100644 ---- a/source/base/mpi.cc -+++ b/source/base/mpi.cc -@@ -448,7 +448,7 @@ namespace Utilities - MPI_Aint displacements[] = {0, offsetof(MinMaxAvg, min_index)}; - MPI_Datatype types[] = {MPI_DOUBLE, MPI_INT}; - -- ierr = MPI_Type_struct(2, lengths, displacements, types, &type); -+ ierr = MPI_Type_create_struct(2, lengths, displacements, types, &type); - AssertThrowMPI(ierr); - - ierr = MPI_Type_commit(&type); -- cgit v1.2.3 From 512c1696665fba8e6ba189dd9dc2a192cc08a1df Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 29 Sep 2019 15:25:13 +0200 Subject: gnu: mame: Update to 0.214. * gnu/packages/emulators.scm (mame): Update to 0.214. [source]: Remove unnecessary patch. * gnu/packages/patches/mame-rapidjson-fix.patch: Delete file. * gnu/local.mk: Remove reference to deleted patch. --- gnu/local.mk | 1 - gnu/packages/emulators.scm | 8 ++---- gnu/packages/patches/mame-rapidjson-fix.patch | 37 --------------------------- 3 files changed, 2 insertions(+), 44 deletions(-) delete mode 100644 gnu/packages/patches/mame-rapidjson-fix.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index b04a5d796e..d3e1dbc0ba 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1091,7 +1091,6 @@ dist_patch_DATA = \ %D%/packages/patches/lxsession-use-gapplication.patch \ %D%/packages/patches/make-glibc-compat.patch \ %D%/packages/patches/make-impure-dirs.patch \ - %D%/packages/patches/mame-rapidjson-fix.patch \ %D%/packages/patches/mariadb-client-test-32bit.patch \ %D%/packages/patches/mars-install.patch \ %D%/packages/patches/mars-sfml-2.3.patch \ diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index c6eda97473..38468cfc8d 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -1189,7 +1189,7 @@ play them on systems for which they were never designed!") (define-public mame (package (name "mame") - (version "0.212") + (version "0.214") (source (origin (method git-fetch) @@ -1199,11 +1199,7 @@ play them on systems for which they were never designed!") (file-name (git-file-name name version)) (sha256 (base32 - "0p3zcb9l624dsy2gyv23ppp1k1iwd1vrg8cbn5v4fx1s44mx7f5c")) - (patches - ;; FIXME: Remove once 0.213 is out. Applied upstream as - ;; 0b5b13cf1e28550b49c387dec93f9801f029e313. - (search-patches "mame-rapidjson-fix.patch")) + "129yk3ybcviscy2xk1mkkzxm4h4nh5p6ndfgqbmcx547p1s6hbja")) (modules '((guix build utils))) (snippet ;; Remove bundled libraries. diff --git a/gnu/packages/patches/mame-rapidjson-fix.patch b/gnu/packages/patches/mame-rapidjson-fix.patch deleted file mode 100644 index 70cf8458ea..0000000000 --- a/gnu/packages/patches/mame-rapidjson-fix.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 0b5b13cf1e28550b49c387dec93f9801f029e313 Mon Sep 17 00:00:00 2001 -From: Julian Sikorski -Date: Mon, 5 Aug 2019 21:16:54 +0200 -Subject: [PATCH] Fix building using system rapidjson - ---- - scripts/target/mame/arcade.lua | 1 + - src/mame/video/midtunit.cpp | 4 ++-- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua -index 964daa3572f..ef30ae3c2c2 100644 ---- a/scripts/target/mame/arcade.lua -+++ b/scripts/target/mame/arcade.lua -@@ -930,6 +930,7 @@ function createMAMEProjects(_target, _subtarget, _name) - ext_includedir("flac"), - ext_includedir("glm"), - ext_includedir("jpeg"), -+ ext_includedir("rapidjson"), - } - - end -diff --git a/src/mame/video/midtunit.cpp b/src/mame/video/midtunit.cpp -index b4cb98abacf..b307f3f722b 100644 ---- a/src/mame/video/midtunit.cpp -+++ b/src/mame/video/midtunit.cpp -@@ -20,8 +20,8 @@ - #include "emuopts.h" // Used by PNG logging - #include "png.h" // Used by PNG logging - --#include "rapidjson/include/rapidjson/prettywriter.h" // Used by JSON logging --#include "rapidjson/include/rapidjson/stringbuffer.h" // Used by JSON logging -+#include // Used by JSON logging -+#include // Used by JSON logging - - DEFINE_DEVICE_TYPE(MIDTUNIT_VIDEO, midtunit_video_device, "tunitvid", "Midway T-Unit Video") - DEFINE_DEVICE_TYPE(MIDWUNIT_VIDEO, midwunit_video_device, "wunitvid", "Midway W-Unit Video") -- cgit v1.2.3 From 737c83f0ff9977572516c65502bdde92abd18629 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 29 Sep 2019 12:01:51 +0200 Subject: bootstrap: bash: Update for bash-5.0. * gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch: Remove. * gnu/packages/patches/bash-reproducible-linux-pgrp-pipe.patch: New file. * gnu/packages/make-bootstrap.scm (static-bash-for-bootstrap): Update to use it. * gnu/local.mk (dist_patch_DATA): Likewise. --- gnu/local.mk | 4 +-- gnu/packages/make-bootstrap.scm | 2 +- .../patches/bash-4.4-linux-pgrp-pipe.patch | 30 ------------------- .../bash-reproducible-linux-pgrp-pipe.patch | 34 ++++++++++++++++++++++ 4 files changed, 37 insertions(+), 33 deletions(-) delete mode 100644 gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch create mode 100644 gnu/packages/patches/bash-reproducible-linux-pgrp-pipe.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 9bd1e8882b..18a25e6bc7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -11,7 +11,7 @@ # Copyright © 2016 Ben Woodcroft # Copyright © 2016, 2017, 2018, 2019 Alex Vong # Copyright © 2016, 2017, 2018, 2019 Efraim Flashner -# Copyright © 2016, 2017 Jan Nieuwenhuizen +# Copyright © 2016, 2017, 2018, 2019 Jan (janneke) Nieuwenhuizen # Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice # Copyright © 2017, 2018 Clément Lassieur # Copyright © 2017 Mathieu Othacehe @@ -706,7 +706,7 @@ dist_patch_DATA = \ %D%/packages/patches/avidemux-install-to-lib.patch \ %D%/packages/patches/awesome-reproducible-png.patch \ %D%/packages/patches/azr3.patch \ - %D%/packages/patches/bash-4.4-linux-pgrp-pipe.patch \ + %D%/packages/patches/bash-reproducible-linux-pgrp-pipe.patch \ %D%/packages/patches/bash-completion-directories.patch \ %D%/packages/patches/bastet-change-source-of-unordered_set.patch \ %D%/packages/patches/bazaar-CVE-2017-14176.patch \ diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index b1c4feb4f4..3a664fd94f 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -164,7 +164,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (source (origin (inherit (package-source static-bash)) (patches - (cons (search-patch "bash-4.4-linux-pgrp-pipe.patch") + (cons (search-patch "bash-reproducible-linux-pgrp-pipe.patch") (origin-patches (package-source static-bash)))))))) (define %static-inputs diff --git a/gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch b/gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch deleted file mode 100644 index 0d03d7ce37..0000000000 --- a/gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch +++ /dev/null @@ -1,30 +0,0 @@ -Unconditionally enable PGRP_PIPE on Linux (the kernel), regardless of -the kernel version in use on the build machine. - ---- configure.ac.orig 1969-12-31 19:00:00.000000000 -0500 -+++ configure.ac 2019-08-11 22:28:26.038841961 -0400 -@@ -1092,9 +1092,7 @@ - solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; - lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; - linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading -- case "`uname -r`" in -- 2.[[456789]]*|[[34]]*) AC_DEFINE(PGRP_PIPE) ;; -- esac ;; -+ AC_DEFINE(PGRP_PIPE) ;; - *qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;; - *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; - powerux*) LOCAL_LIBS="-lgen" ;; ---- configure.orig 1969-12-31 19:00:00.000000000 -0500 -+++ configure 2019-08-11 22:28:10.166763255 -0400 -@@ -16064,10 +16064,7 @@ - solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; - lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; - linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading -- case "`uname -r`" in -- 2.[456789]*|[34]*) $as_echo "#define PGRP_PIPE 1" >>confdefs.h -- ;; -- esac ;; -+ $as_echo "#define PGRP_PIPE 1" >>confdefs.h ;; - *qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;; - *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; - powerux*) LOCAL_LIBS="-lgen" ;; diff --git a/gnu/packages/patches/bash-reproducible-linux-pgrp-pipe.patch b/gnu/packages/patches/bash-reproducible-linux-pgrp-pipe.patch new file mode 100644 index 0000000000..8a03c4d982 --- /dev/null +++ b/gnu/packages/patches/bash-reproducible-linux-pgrp-pipe.patch @@ -0,0 +1,34 @@ +Unconditionally enable PGRP_PIPE on Linux (the kernel), regardless of +the kernel version in use on the build machine. + +diff -purN bash-5.0-orig/configure bash-5.0/configure +--- configure 1970-01-01 01:00:00.000000000 +0100 ++++ configure 2019-09-29 11:51:42.664518665 +0200 +@@ -16312,11 +16312,7 @@ solaris2.10*) LOCAL_CFLAGS=-DSOLARIS ;; + solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; + lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; + linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading +- case "`uname -r`" in +- 1.*|2.[0123]*) : ;; +- *) $as_echo "#define PGRP_PIPE 1" >>confdefs.h +- ;; +- esac ;; ++ $as_echo "#define PGRP_PIPE 1" >>confdefs.h ;; + netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; + *qnx[67]*) LOCAL_LIBS="-lncurses" ;; + *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; +diff -purN bash-5.0-orig/configure.ac bash-5.0/configure.ac +--- configure.ac 1970-01-01 01:00:00.000000000 +0100 ++++ configure.ac 2019-09-29 11:51:10.692026225 +0200 +@@ -1108,10 +1108,7 @@ solaris2.10*) LOCAL_CFLAGS=-DSOLARIS ;; + solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; + lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; + linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading +- case "`uname -r`" in +- 1.*|2.[[0123]]*) : ;; +- *) AC_DEFINE(PGRP_PIPE) ;; +- esac ;; ++ AC_DEFINE(PGRP_PIPE) ;; + netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; + *qnx[[67]]*) LOCAL_LIBS="-lncurses" ;; + *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; -- cgit v1.2.3 From 717b6ba6aa9ac876b2c2df36096e4579b19ee06c Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Tue, 17 Sep 2019 22:01:01 +1000 Subject: gnu: Add abcl. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/java.scm (abcl): New variable. * gnu/packages/patches/abcl-fix-build-xml.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/java.scm | 66 ++++++++++++++++++++++++++- gnu/packages/patches/abcl-fix-build-xml.patch | 50 ++++++++++++++++++++ 3 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/abcl-fix-build-xml.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index d3e1dbc0ba..d056a2557e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -674,6 +674,7 @@ dist_patch_DATA = \ %D%/packages/patches/a2ps-CVE-2001-1593.patch \ %D%/packages/patches/a2ps-CVE-2014-0466.patch \ %D%/packages/patches/a2ps-CVE-2015-8107.patch \ + %D%/packages/patches/abcl-fix-build-xml.patch \ %D%/packages/patches/abiword-explictly-cast-bools.patch \ %D%/packages/patches/abiword-black-drawing-with-gtk322.patch \ %D%/packages/patches/acl-fix-perl-regex.patch \ diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 403c446a82..6090dcd514 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus ;;; Copyright © 2016 Leo Famulari ;;; Copyright © 2016, 2017 Roel Janssen -;;; Copyright © 2017 Carlo Zancanaro +;;; Copyright © 2017, 2019 Carlo Zancanaro ;;; Copyright © 2017, 2018 Julien Lepiller ;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2016, 2017, 2018 Alex Vong @@ -11109,3 +11109,67 @@ network protocols, and core version control algorithms.") `(("java-javaewah" ,java-javaewah) ("java-jsch" ,java-jsch) ("java-slf4j-api" ,java-slf4j-api))))) + +(define-public abcl + (package + (name "abcl") + (version "1.5.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://abcl.org/releases/" + version "/abcl-src-" version ".tar.gz")) + (sha256 + (base32 + "1hhvcg050nfpjbdmskc1cv2j38qi6qfl77a61b5cxx576kbff3lj")) + (patches + (search-patches + "abcl-fix-build-xml.patch")))) + (build-system ant-build-system) + (native-inputs + `(("java-junit" ,java-junit))) + (arguments + `(#:build-target "abcl.jar" + #:test-target "abcl.test" + #:phases + (modify-phases %standard-phases + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((share (string-append (assoc-ref outputs "out") + "/share/java/")) + (bin (string-append (assoc-ref outputs "out") + "/bin/"))) + (mkdir-p share) + (install-file "dist/abcl.jar" share) + (install-file "dist/abcl-contrib.jar" share) + (mkdir-p bin) + (with-output-to-file (string-append bin "abcl") + (lambda _ + (let ((classpath (string-append + share "abcl.jar" + ":" + share "abcl-contrib.jar"))) + (display (string-append + "#!" (which "sh") "\n" + "if [[ -z $CLASSPATH ]]; then\n" + " cp=\"" classpath "\"\n" + "else\n" + " cp=\"" classpath ":$CLASSPATH\"\n" + "fi\n" + "exec " (which "java") + " -cp $cp org.armedbear.lisp.Main $@\n"))))) + (chmod (string-append bin "abcl") #o755) + #t)))))) + (home-page "https://abcl.org/") + (synopsis "Common Lisp Implementation on the JVM") + (description + "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common +Lisp language featuring both an interpreter and a compiler, running in the +JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine +in any Java application. Additionally, it can be used to implement (parts of) +the application using Java to Lisp integration APIs.") + (license (list license:gpl2+ + ;; named-readtables is released under 3 clause BSD + license:bsd-3 + ;; jfli is released under CPL 1.0 + license:cpl1.0)))) diff --git a/gnu/packages/patches/abcl-fix-build-xml.patch b/gnu/packages/patches/abcl-fix-build-xml.patch new file mode 100644 index 0000000000..dd315b4271 --- /dev/null +++ b/gnu/packages/patches/abcl-fix-build-xml.patch @@ -0,0 +1,50 @@ +ABCL's build calls the hostname command, and needs the internet to download +JUnit. Neither of these are really required, though, so we can patch them out +to make it build. + +We also remove the Implemetation-Build property that ends up in the manifest +file, because it stores information about the time of the build, which makes +it non-deterministic. + +--- a/build.xml ++++ b/build.xml +@@ -327,7 +327,7 @@ from ${abcl.home.dir} + + ++ depends="abcl.compile,abcl.stamp.version"> + + +@@ -455,11 +455,6 @@ from ${abcl.home.dir} + value="${abcl.version}-${abcl.version.src}"/> + + +- +- +- abcl.hostname: ${abcl.hostname} +- +- + + + +@@ -500,8 +495,6 @@ from ${abcl.home.dir} + value="ABCL"/> + +- + + + +@@ -1019,8 +1012,7 @@ ${basedir}/../cl-bench + + + +- ++ + + Date: Thu, 12 Sep 2019 19:33:45 +0000 Subject: gnu: Add tigervnc-client. * gnu/packages/tigervnc.scm: New file. (tigervnc-client): New variable. * gnu/local.mk (GNU_SYSTEM_MODULES): Add tigervnc.scm. Signed-off-by: Danny Milosavljevic --- gnu/local.mk | 1 + gnu/packages/tigervnc.scm | 84 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 gnu/packages/tigervnc.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index d056a2557e..54ae09f619 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -475,6 +475,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/tex.scm \ %D%/packages/textutils.scm \ %D%/packages/text-editors.scm \ + %D%/packages/tigervnc.scm \ %D%/packages/time.scm \ %D%/packages/tls.scm \ %D%/packages/tmux.scm \ diff --git a/gnu/packages/tigervnc.scm b/gnu/packages/tigervnc.scm new file mode 100644 index 0000000000..89aac1c63a --- /dev/null +++ b/gnu/packages/tigervnc.scm @@ -0,0 +1,84 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019 Todor Kondić +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages tigervnc) + #:use-module (gnu packages autotools) + #:use-module (gnu packages compression) + #:use-module (gnu packages gettext) + #:use-module (gnu packages tls) + #:use-module (gnu packages linux) + #:use-module (gnu packages xorg) + #:use-module (gnu packages fltk) + #:use-module (gnu packages image) + #:use-module (gnu packages cmake) + #:use-module (gnu packages perl) + #:use-module (gnu packages base) + #:use-module (gnu packages commencement) + #:use-module (guix build-system cmake) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix utils) + #:use-module ((guix licenses) #:prefix license:)) + +(define-public tigervnc-client + (package + (name "tigervnc-client") + (version "1.9.0") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/TigerVNC/tigervnc.git") + (commit (string-append "v" version)))) + (sha256 + (base32 + "0b47fg3741qs3zdpl2zr0s6jz46dypp2j6gqrappbzm3ywnnmm1x")))) + (build-system cmake-build-system) + (arguments + '(#:tests? #f ; Tests that do exists are not automated. + #:phases (modify-phases %standard-phases + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (with-directory-excursion "vncviewer" + (invoke "make" "install"))))))) + (native-inputs + `(("autoconf" ,autoconf) + ("gettext-minimal" ,gettext-minimal) + ("automake" ,automake))) + (inputs + `(("zlib" ,zlib) + ("gnutls" ,gnutls) + ("libjpeg-turbo" ,libjpeg-turbo) + ("fltk" ,fltk) + ("linux-pam" ,linux-pam) + ("libx11" ,libx11) + ("libxext" ,libxext) + ("libxtst" ,libxtst) + ("libxrandr" ,libxrandr) + ("libxdamage" ,libxdamage))) + (home-page "https://tigervnc.org/") + (synopsis "High-performance, platform-neutral +implementation of VNC (client)") + (description "TigerVNC is a client/server implementation of VNC (Virtual +Network Computing). It provides enough performance to run even 3D and video +applications. It also provides extensions for advanced authentication methods +and TLS encryption. This package installs only the VNC client, the +application which is needed to connect to VNC servers.") + (license license:gpl2))) -- cgit v1.2.3 From dd6989711370c43676edc974f86c8586f21f80f6 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 3 Oct 2019 22:22:08 +0200 Subject: gnu: linux-libre: Try to aggressively gather entropy during boot. Fixes . * gnu/packages/patches/linux-libre-active-entropy.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/linux.scm (linux-libre-5.2-source): Use it. --- gnu/local.mk | 1 + gnu/packages/linux.scm | 3 +- .../patches/linux-libre-active-entropy.patch | 86 ++++++++++++++++++++++ 3 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/linux-libre-active-entropy.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 9f8ce842b6..b9b6ea3ae7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1078,6 +1078,7 @@ dist_patch_DATA = \ %D%/packages/patches/lierolibre-remove-arch-warning.patch \ %D%/packages/patches/lierolibre-try-building-other-arch.patch \ %D%/packages/patches/linkchecker-tests-require-network.patch \ + %D%/packages/patches/linux-libre-active-entropy.patch \ %D%/packages/patches/linux-pam-no-setfsuid.patch \ %D%/packages/patches/lirc-localstatedir.patch \ %D%/packages/patches/lirc-reproducible-build.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index d7e3d7ef7f..2a6709c6fe 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -420,7 +420,8 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." (define-public linux-libre-5.2-source (source-with-patches linux-libre-5.2-pristine-source - (list %boot-logo-patch + (list (search-patch "linux-libre-active-entropy.patch") + %boot-logo-patch %linux-libre-arm-export-__sync_icache_dcache-patch))) (define-public linux-libre-4.19-source diff --git a/gnu/packages/patches/linux-libre-active-entropy.patch b/gnu/packages/patches/linux-libre-active-entropy.patch new file mode 100644 index 0000000000..8f081f4a19 --- /dev/null +++ b/gnu/packages/patches/linux-libre-active-entropy.patch @@ -0,0 +1,86 @@ +Try to actively add entropy instead of waiting forever. +Fixes . + +Taken from upstream: +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=50ee7529ec4500c88f8664560770a7a1b65db72b + +diff --git a/drivers/char/random.c b/drivers/char/random.c +index 5d5ea4ce1442..2fda6166c1dd 100644 +--- a/drivers/char/random.c ++++ b/drivers/char/random.c +@@ -1731,6 +1731,56 @@ void get_random_bytes(void *buf, int nbytes) + } + EXPORT_SYMBOL(get_random_bytes); + ++ ++/* ++ * Each time the timer fires, we expect that we got an unpredictable ++ * jump in the cycle counter. Even if the timer is running on another ++ * CPU, the timer activity will be touching the stack of the CPU that is ++ * generating entropy.. ++ * ++ * Note that we don't re-arm the timer in the timer itself - we are ++ * happy to be scheduled away, since that just makes the load more ++ * complex, but we do not want the timer to keep ticking unless the ++ * entropy loop is running. ++ * ++ * So the re-arming always happens in the entropy loop itself. ++ */ ++static void entropy_timer(struct timer_list *t) ++{ ++ credit_entropy_bits(&input_pool, 1); ++} ++ ++/* ++ * If we have an actual cycle counter, see if we can ++ * generate enough entropy with timing noise ++ */ ++static void try_to_generate_entropy(void) ++{ ++ struct { ++ unsigned long now; ++ struct timer_list timer; ++ } stack; ++ ++ stack.now = random_get_entropy(); ++ ++ /* Slow counter - or none. Don't even bother */ ++ if (stack.now == random_get_entropy()) ++ return; ++ ++ timer_setup_on_stack(&stack.timer, entropy_timer, 0); ++ while (!crng_ready()) { ++ if (!timer_pending(&stack.timer)) ++ mod_timer(&stack.timer, jiffies+1); ++ mix_pool_bytes(&input_pool, &stack.now, sizeof(stack.now)); ++ schedule(); ++ stack.now = random_get_entropy(); ++ } ++ ++ del_timer_sync(&stack.timer); ++ destroy_timer_on_stack(&stack.timer); ++ mix_pool_bytes(&input_pool, &stack.now, sizeof(stack.now)); ++} ++ + /* + * Wait for the urandom pool to be seeded and thus guaranteed to supply + * cryptographically secure random numbers. This applies to: the /dev/urandom +@@ -1745,7 +1795,17 @@ int wait_for_random_bytes(void) + { + if (likely(crng_ready())) + return 0; +- return wait_event_interruptible(crng_init_wait, crng_ready()); ++ ++ do { ++ int ret; ++ ret = wait_event_interruptible_timeout(crng_init_wait, crng_ready(), HZ); ++ if (ret) ++ return ret > 0 ? 0 : ret; ++ ++ try_to_generate_entropy(); ++ } while (!crng_ready()); ++ ++ return 0; + } + EXPORT_SYMBOL(wait_for_random_bytes); + -- cgit v1.2.3 From 7b6a8e23b0de18262a42e44432f955517d71d796 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 7 Oct 2019 11:18:45 +0300 Subject: gnu: aria2: Update to 1.35.0. * gnu/packages/bittorrent.scm (aria2): Update to 1.35.0. [source]: Use new upstream uri. Remove patch. * gnu/packages/patches/aria2-CVE-2019-3500.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/bittorrent.scm | 13 +++--- gnu/packages/patches/aria2-CVE-2019-3500.patch | 55 -------------------------- 3 files changed, 6 insertions(+), 63 deletions(-) delete mode 100644 gnu/packages/patches/aria2-CVE-2019-3500.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 54ae09f619..ffe697c2e1 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -695,7 +695,6 @@ dist_patch_DATA = \ %D%/packages/patches/antlr3-3_1-fix-java8-compilation.patch \ %D%/packages/patches/antlr3-3_3-fix-java8-compilation.patch \ %D%/packages/patches/apr-skip-getservbyname-test.patch \ - %D%/packages/patches/aria2-CVE-2019-3500.patch \ %D%/packages/patches/aspell-default-dict-dir.patch \ %D%/packages/patches/ath9k-htc-firmware-binutils.patch \ %D%/packages/patches/ath9k-htc-firmware-gcc.patch \ diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm index 50b63048e4..da01848ec7 100644 --- a/gnu/packages/bittorrent.scm +++ b/gnu/packages/bittorrent.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2016, 2017, 2018, 2019 Leo Famulari -;;; Copyright © 2016, 2017, 2018 Efraim Flashner +;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner ;;; Copyright © 2016 Tomáš Čech ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2017 Jelle Licht @@ -262,16 +262,15 @@ maintained upstream.") (define-public aria2 (package (name "aria2") - (version "1.34.0") + (version "1.35.0") (source (origin (method url-fetch) - (uri (string-append "https://github.com/tatsuhiro-t/aria2/" - "releases/download/release-" version "/" - name "-" version ".tar.xz")) - (patches (search-patches "aria2-CVE-2019-3500.patch")) + (uri (string-append "https://github.com/aria2/aria2/releases/" + "download/release-" version + "/aria2-" version ".tar.xz")) (sha256 (base32 - "18vpgr430vxlwbcc3598rr1srfmwypls6wp1m4wf21hncc1ahi1s")))) + "1zbxc517d97lb96f15xcy4l7b66grxrp3h2ids2jiwkaip87yaqy")))) (build-system gnu-build-system) (arguments `(#:configure-flags (list "--enable-libaria2" diff --git a/gnu/packages/patches/aria2-CVE-2019-3500.patch b/gnu/packages/patches/aria2-CVE-2019-3500.patch deleted file mode 100644 index 891c9047ba..0000000000 --- a/gnu/packages/patches/aria2-CVE-2019-3500.patch +++ /dev/null @@ -1,55 +0,0 @@ -Fix CVE-2019-3500: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3500 -https://github.com/aria2/aria2/issues/1329 - -Patch copied from upstream source repository: - -https://github.com/aria2/aria2/commit/37368130ca7de5491a75fd18a20c5c5cc641824a - -From 37368130ca7de5491a75fd18a20c5c5cc641824a Mon Sep 17 00:00:00 2001 -From: Tatsuhiro Tsujikawa -Date: Sat, 5 Jan 2019 09:32:40 +0900 -Subject: [PATCH] Mask headers - ---- - src/HttpConnection.cc | 18 ++++++++++++------ - 1 file changed, 12 insertions(+), 6 deletions(-) - -diff --git a/src/HttpConnection.cc b/src/HttpConnection.cc -index 77cb9d27a..be5b97723 100644 ---- a/src/HttpConnection.cc -+++ b/src/HttpConnection.cc -@@ -102,11 +102,17 @@ std::string HttpConnection::eraseConfidentialInfo(const std::string& request) - std::string result; - std::string line; - while (getline(istr, line)) { -- if (util::startsWith(line, "Authorization: Basic")) { -- result += "Authorization: Basic ********\n"; -+ if (util::istartsWith(line, "Authorization: ")) { -+ result += "Authorization: \n"; - } -- else if (util::startsWith(line, "Proxy-Authorization: Basic")) { -- result += "Proxy-Authorization: Basic ********\n"; -+ else if (util::istartsWith(line, "Proxy-Authorization: ")) { -+ result += "Proxy-Authorization: \n"; -+ } -+ else if (util::istartsWith(line, "Cookie: ")) { -+ result += "Cookie: \n"; -+ } -+ else if (util::istartsWith(line, "Set-Cookie: ")) { -+ result += "Set-Cookie: \n"; - } - else { - result += line; -@@ -154,8 +160,8 @@ std::unique_ptr HttpConnection::receiveResponse() - const auto& proc = outstandingHttpRequests_.front()->getHttpHeaderProcessor(); - if (proc->parse(socketRecvBuffer_->getBuffer(), - socketRecvBuffer_->getBufferLength())) { -- A2_LOG_INFO( -- fmt(MSG_RECEIVE_RESPONSE, cuid_, proc->getHeaderString().c_str())); -+ A2_LOG_INFO(fmt(MSG_RECEIVE_RESPONSE, cuid_, -+ eraseConfidentialInfo(proc->getHeaderString()).c_str())); - auto result = proc->getResult(); - if (result->getStatusCode() / 100 == 1) { - socketRecvBuffer_->drain(proc->getLastBytesProcessed()); -- cgit v1.2.3