From 69c15ad8a46c8e5f319a73ee5891bcd1bf0600c5 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Thu, 14 Feb 2019 00:10:01 +0100 Subject: gnu: qtbase: Restore compilation on linux kernels < 4.11. Fixes . * gnu/packages/patches/qtbase-old-kernel.patch: New file. * gnu/local.mk (dist_patch_DATA): Register patch. * gnu/packages/qt.scm (qtbase): Add patch. --- gnu/packages/patches/qtbase-old-kernel.patch | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 gnu/packages/patches/qtbase-old-kernel.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/qtbase-old-kernel.patch b/gnu/packages/patches/qtbase-old-kernel.patch new file mode 100644 index 0000000000..aa26fb6c4f --- /dev/null +++ b/gnu/packages/patches/qtbase-old-kernel.patch @@ -0,0 +1,25 @@ +https://672856.bugs.gentoo.org/attachment.cgi?id=557978 +https://bugs.gentoo.org/672856 + +The patch fixes building qtbase with linux kernels < 4.11. +See bug #34431. + +diff -Naurp a/src/corelib/global/minimum-linux_p.h b/src/corelib/global/minimum-linux_p.h +--- a/src/corelib/global/minimum-linux_p.h 2018-11-25 15:51:11.000000000 +0300 ++++ b/src/corelib/global/minimum-linux_p.h 2018-12-17 13:25:38.176823753 +0300 +@@ -75,14 +75,9 @@ QT_BEGIN_NAMESPACE + * - accept4 2.6.28 + * - renameat2 3.16 QT_CONFIG(renameat2) + * - getrandom 3.17 QT_CONFIG(getentropy) +- * - statx 4.11 QT_CONFIG(statx) + */ + +-#if QT_CONFIG(statx) +-# define MINLINUX_MAJOR 4 +-# define MINLINUX_MINOR 11 +-# define MINLINUX_PATCH 0 +-#elif QT_CONFIG(getentropy) ++#if QT_CONFIG(getentropy) + # define MINLINUX_MAJOR 3 + # define MINLINUX_MINOR 17 + # define MINLINUX_PATCH 0 -- cgit v1.2.3 From 40b114c0bb3da70a209f204e50505c8e4b987257 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Wed, 13 Feb 2019 19:04:38 -0600 Subject: gnu: dealii: Upgrade to 9.0.1. * gnu/packages/patches/dealii-mpi-deprecations.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/maths.scm (dealii)[source]: Upgrade to 9.0.1. Use patch. [arguments]: Use new MPI configuration flags. --- gnu/local.mk | 1 + gnu/packages/maths.scm | 11 ++++----- gnu/packages/patches/dealii-mpi-deprecations.patch | 28 ++++++++++++++++++++++ 3 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 gnu/packages/patches/dealii-mpi-deprecations.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index a73f10b0f8..69d157b8a7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -707,6 +707,7 @@ 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/dealii-mpi-deprecations.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/maths.scm b/gnu/packages/maths.scm index 180737001e..bf03571c45 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -3447,7 +3447,7 @@ revised simplex and the branch-and-bound methods.") (define-public dealii (package (name "dealii") - (version "8.5.1") + (version "9.0.1") (source (origin (method url-fetch) @@ -3455,7 +3455,8 @@ revised simplex and the branch-and-bound methods.") "download/v" version "/dealii-" version ".tar.gz")) (sha256 (base32 - "1bh9rsmkrg0zi70n27b11djmac9lximghsiy7mg7w7x544n82gnk")) + "0r7f8rhl3xr94imd372plizdcbqk0a70w73lwc3vw912dxk0sbyz")) + (patches (search-patches "dealii-mpi-deprecations.patch")) (modules '((guix build utils))) (snippet ;; Remove bundled sources: UMFPACK, TBB, muParser, and boost @@ -3508,10 +3509,8 @@ in finite element programs.") (arguments (substitute-keyword-arguments (package-arguments dealii) ((#:configure-flags cf) - ``("-DMPI_C_COMPILER=mpicc" - "-DMPI_CXX_COMPILER=mpicxx" - "-DMPI_Fortran_COMPILER=mpifort" - ,@,cf)) + `(cons "-DDEAL_II_WITH_MPI:BOOL=ON" + ,cf)) ((#:phases phases '%standard-phases) `(modify-phases ,phases (add-before 'check 'mpi-setup diff --git a/gnu/packages/patches/dealii-mpi-deprecations.patch b/gnu/packages/patches/dealii-mpi-deprecations.patch new file mode 100644 index 0000000000..816d54140a --- /dev/null +++ b/gnu/packages/patches/dealii-mpi-deprecations.patch @@ -0,0 +1,28 @@ +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 28cf8dab3e91fb9d7f951f43cd43fb78d0594b82 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 14 Feb 2019 20:13:05 +0000 Subject: gnu: ruby-safe-yaml: Add missing require 'time'. Patch ruby-safe-yaml to fix an issue that would lead to an error like this: uninitialized constant SafeYAML::Parse::Date::DateTime It's been reported upstream [1], and this patch was taken from the upstream Git repository. 1: https://github.com/dtao/safe_yaml/issues/80 * gnu/packages/ruby.scm (ruby-safe-yaml)[source]: Switch to the Git repository so that applying patches works and add a patch. [arguments]: Enable tests and add a phase to set the TZ environment variable, as one of the tests depends on a certian timezone. * gnu/packages/patches/ruby-safe-yaml-add-require-time.patch: New file. * gnu/local.mk (dist_patch_DATA): Add new patch file. --- gnu/local.mk | 1 + .../patches/ruby-safe-yaml-add-require-time.patch | 19 +++++++++++++ gnu/packages/ruby.scm | 33 ++++++++++++++++------ 3 files changed, 45 insertions(+), 8 deletions(-) create mode 100644 gnu/packages/patches/ruby-safe-yaml-add-require-time.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 69d157b8a7..018f395eff 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1209,6 +1209,7 @@ dist_patch_DATA = \ %D%/packages/patches/ruby-concurrent-ignore-broken-test.patch \ %D%/packages/patches/ruby-concurrent-test-arm.patch \ %D%/packages/patches/ruby-rack-ignore-failing-test.patch \ + %D%/packages/patches/ruby-safe-yaml-add-require-time.patch \ %D%/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch\ %D%/packages/patches/runc-CVE-2019-5736.patch \ %D%/packages/patches/rust-1.19-mrustc.patch \ diff --git a/gnu/packages/patches/ruby-safe-yaml-add-require-time.patch b/gnu/packages/patches/ruby-safe-yaml-add-require-time.patch new file mode 100644 index 0000000000..92e5505985 --- /dev/null +++ b/gnu/packages/patches/ruby-safe-yaml-add-require-time.patch @@ -0,0 +1,19 @@ +From 9dd1e8d9ad0396a8c9092c2e9f17d498c58e0208 Mon Sep 17 00:00:00 2001 +From: elifoster +Date: Tue, 5 Dec 2017 14:30:13 -0800 +Subject: [PATCH] Fix uninitialized constant DateTime Close #80 + +--- + lib/safe_yaml/parse/date.rb | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/lib/safe_yaml/parse/date.rb b/lib/safe_yaml/parse/date.rb +index cd3c62a..3a30a8b 100644 +--- a/lib/safe_yaml/parse/date.rb ++++ b/lib/safe_yaml/parse/date.rb +@@ -1,3 +1,5 @@ ++require 'time' ++ + module SafeYAML + class Parse + class Date diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 18c6335911..ca610b6471 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -5849,19 +5849,36 @@ indentation will probably be an issue and hence this gem.") (package (name "ruby-safe-yaml") (version "1.0.4") - (source (origin - (method url-fetch) - (uri (rubygems-uri "safe_yaml" version)) - (sha256 - (base32 - "1hly915584hyi9q9vgd968x2nsi5yag9jyf5kq60lwzi5scr7094")))) + (source + (origin + ;; TODO Fetch from the git repository so a patch can be applied + (method git-fetch) + (uri (git-reference + (url "https://github.com/dtao/safe_yaml.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1wnln8xdy8g6kwdj4amm8773xwffqxpf2sxslk6jjh2wxsy1lrig")) + (patches + (search-patches "ruby-safe-yaml-add-require-time.patch")))) (build-system ruby-build-system) (native-inputs `(("ruby-rspec" ,ruby-rspec) ("ruby-hashie" ,ruby-hashie) ("ruby-heredoc-unindent" ,ruby-heredoc-unindent))) - (arguments `(#:test-target "spec" - #:tests? #f));; FIXME: one failure + (arguments + '(#:test-target "spec" + #:phases + (modify-phases %standard-phases + (add-before 'check 'set-TZ + (lambda _ + ;; This test is dependent on the timezone + ;; spec/transform/to_date_spec.rb:35 + ;; # SafeYAML::Transform::ToDate converts times to the local + ;; timezone + (setenv "TZ" "UTC-11") + #t))))) (home-page "https://github.com/dtao/safe_yaml") (synopsis "YAML parser") (description "The SafeYAML gem provides an alternative implementation of -- cgit v1.2.3 From b2cf559772499ca96f9a678e12a50b34305b4626 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Fri, 15 Feb 2019 05:34:09 +0100 Subject: gnu: allegro@4: Update to 4.4.3. * gnu/packages/game-development.scm (allegro-4): Update to 4.4.3. [source]: Remove upstreamed patch. * gnu/packages/patches/allegro4-mesa-18.2.5-and-later.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/game-development.scm | 8 ++--- .../patches/allegro4-mesa-18.2.5-and-later.patch | 41 ---------------------- 3 files changed, 3 insertions(+), 47 deletions(-) delete mode 100644 gnu/packages/patches/allegro4-mesa-18.2.5-and-later.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 018f395eff..a2a13a5fa1 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -636,7 +636,6 @@ dist_patch_DATA = \ %D%/packages/patches/aegisub-boost68.patch \ %D%/packages/patches/agg-am_c_prototype.patch \ %D%/packages/patches/allegro-mesa-18.2.5-and-later.patch \ - %D%/packages/patches/allegro4-mesa-18.2.5-and-later.patch \ %D%/packages/patches/amule-crypto-6.patch \ %D%/packages/patches/antiword-CVE-2014-8123.patch \ %D%/packages/patches/antlr3-3_1-fix-java8-compilation.patch \ diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 6b641be0ef..c2732cac81 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -8,7 +8,7 @@ ;;; Copyright © 2016, 2017 Kei Kebreau ;;; Copyright © 2016, 2018 Ricardo Wurmus ;;; Copyright © 2016, 2017, 2018 Julian Graham -;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice +;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis ;;; Copyright © 2017 Peter Mikkelsen ;;; Copyright © 2017 Arun Isaac @@ -641,17 +641,15 @@ programming language.") (define-public allegro-4 (package (name "allegro") - (version "4.4.2") + (version "4.4.3") (source (origin (method url-fetch) (uri (string-append "https://github.com/liballeg/allegro5/" "releases/download/" version "/allegro-" version ".tar.gz")) - (patches (search-patches - "allegro4-mesa-18.2.5-and-later.patch")) (sha256 (base32 - "1p0ghkmpc4kwij1z9rzxfv7adnpy4ayi0ifahlns1bdzgmbyf88v")))) + "1d5ws3ihvpa6f4qc6a6drq31pajw6bblxifr4kcxzqj9br1nw28y")))) (build-system cmake-build-system) (arguments '(#:phases diff --git a/gnu/packages/patches/allegro4-mesa-18.2.5-and-later.patch b/gnu/packages/patches/allegro4-mesa-18.2.5-and-later.patch deleted file mode 100644 index a4944821db..0000000000 --- a/gnu/packages/patches/allegro4-mesa-18.2.5-and-later.patch +++ /dev/null @@ -1,41 +0,0 @@ -Fixes compilation with Mesa >= 18.2.5. - -Modified from upstream to work on allegro4: - -https://github.com/liballeg/allegro5/commit/a40d30e21802ecf5c9382cf34af9b01bd3781e47 - -diff --git a/addons/allegrogl/include/alleggl.h b/addons/allegrogl/include/alleggl.h -index 0f86a6768..652dd024e 100644 ---- a/addons/allegrogl/include/alleggl.h -+++ b/addons/allegrogl/include/alleggl.h -@@ -103,10 +103,14 @@ - - /* HACK: Prevent both Mesa and SGI's broken headers from screwing us */ - #define __glext_h_ -+#define __gl_glext_h_ - #define __glxext_h_ -+#define __glx_glxext_h_ - #include - #undef __glext_h_ -+#undef __gl_glext_h_ - #undef __glxext_h_ -+#undef __glx_glxext_h_ - - #endif /* ALLEGRO_MACOSX */ - -diff --git a/addons/allegrogl/include/allegrogl/GLext/glx_ext_defs.h b/addons/allegrogl/include/allegrogl/GLext/glx_ext_defs.h -index 49c502091..fba8aea5d 100644 ---- a/addons/allegrogl/include/allegrogl/GLext/glx_ext_defs.h -+++ b/addons/allegrogl/include/allegrogl/GLext/glx_ext_defs.h -@@ -1,7 +1,9 @@ - /* HACK: Prevent both Mesa and SGI's broken headers from screwing us */ - #define __glxext_h_ -+#define __glx_glxext_h_ - #include - #undef __glxext_h_ -+#undef __glx_glxext_h_ - - #ifndef GLX_VERSION_1_3 - #define _ALLEGRO_GLX_VERSION_1_3 --- -2.20.0 -- cgit v1.2.3 From d199a4c7b4c4d3320ed59e96a382f4c577630360 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 15 Feb 2019 11:28:14 +0100 Subject: gnu: LLVM, Clang: Update to 7.0.1. * gnu/packages/patches/clang-7.0-libc-search-path.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/llvm.scm (llvm, clang-runtime, clang): Update to 7.0.1. (llvm-7.0.1): Remove variable. (clang-from-llvm)[arguments]: Adjust phase to match Clang 7. (llvm-6, clang-runtime-6, clang-6): New public variables. * gnu/packages/dlang.scm (ldc)[native-inputs]: Change LLVM and CLANG to LLVM-6.0 and CLANG-6.0. * gnu/packages/gl.scm (mesa)[inputs]: Change from LLVM to LLVM-6. --- gnu/local.mk | 1 + gnu/packages/dlang.scm | 4 +- gnu/packages/gl.scm | 2 +- gnu/packages/llvm.scm | 47 +++++++------ .../patches/clang-7.0-libc-search-path.patch | 82 ++++++++++++++++++++++ 5 files changed, 113 insertions(+), 23 deletions(-) create mode 100644 gnu/packages/patches/clang-7.0-libc-search-path.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index a2a13a5fa1..0484b3e085 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -683,6 +683,7 @@ dist_patch_DATA = \ %D%/packages/patches/clang-3.5-libsanitizer-ustat-fix.patch \ %D%/packages/patches/clang-3.8-libc-search-path.patch \ %D%/packages/patches/clang-6.0-libc-search-path.patch \ + %D%/packages/patches/clang-7.0-libc-search-path.patch \ %D%/packages/patches/clang-runtime-asan-build-fixes.patch \ %D%/packages/patches/clang-runtime-esan-build-fixes.patch \ %D%/packages/patches/classpath-aarch64-support.patch \ diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm index c03c24d9e2..2530b8a3c7 100644 --- a/gnu/packages/dlang.scm +++ b/gnu/packages/dlang.scm @@ -249,8 +249,8 @@ bootstrapping more recent compilers written in D.") (setenv "CC" (string-append (assoc-ref inputs "gcc") "/bin/gcc")) (invoke "make" "test" "-j" (number->string (parallel-job-count)))))))) (native-inputs - `(("llvm" ,llvm) - ("clang" ,clang) + `(("llvm" ,llvm-6) + ("clang" ,clang-6) ("ldc" ,ldc-bootstrap) ("python-lit" ,python-lit) ("python-wrapper" ,python-wrapper) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index b673cbffe6..37b8fce7cb 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -257,7 +257,7 @@ also known as DXTn or DXTC) for Mesa.") ("libxvmc" ,libxvmc) ,@(match (%current-system) ((or "x86_64-linux" "i686-linux") - `(("llvm" ,llvm))) + `(("llvm" ,llvm-6))) ;TODO: Change to LLVM in the next rebuild cycle. (_ `())) ("makedepend" ,makedepend) diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index bea52ea480..9a4cca35d0 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2016 Dennis Mungai ;;; Copyright © 2016, 2018 Ricardo Wurmus ;;; Copyright © 2017 Roel Janssen -;;; Copyright © 2018 Marius Bakke +;;; Copyright © 2018, 2019 Marius Bakke ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Efraim Flashner ;;; Copyright © 2018 Tim Gesthuizen @@ -47,7 +47,7 @@ (define-public llvm (package (name "llvm") - (version "6.0.1") + (version "7.0.1") (source (origin (method url-fetch) @@ -55,7 +55,7 @@ version "/llvm-" version ".src.tar.xz")) (sha256 (base32 - "1qpls3vk85lydi5b4axl0809fv932qgsqgdgrk098567z4jc7mmn")))) + "16s196wqzdw4pmri15hadzqgdi926zln3an2viwyq0kini6zr3d3")))) (build-system cmake-build-system) (native-inputs `(("python" ,python-2) ;bytes->str conversion in clang>=3.7 needs python-2 @@ -95,21 +95,6 @@ languages is in development. The compiler infrastructure includes mirror sets of programming tools as well as libraries with equivalent functionality.") (license license:ncsa))) -;; TODO: Build Mesa with LLVM 7 in the next staging cycle. -;; TODO: Make LLVM 7 the default LLVM once Clang is also upgraded. -(define-public llvm-7.0.1 - (package (inherit llvm) - (name "llvm") - (version "7.0.1") - (source - (origin - (method url-fetch) - (uri (string-append "http://llvm.org/releases/" - version "/llvm-" version ".src.tar.xz")) - (sha256 - (base32 - "16s196wqzdw4pmri15hadzqgdi926zln3an2viwyq0kini6zr3d3")))))) - (define* (clang-runtime-from-llvm llvm hash #:optional (patches '())) (package @@ -190,7 +175,7 @@ compiler. In LLVM this library is called \"compiler-rt\".") (compiler-rt (assoc-ref inputs "clang-runtime"))) (case (string->number ,(version-major (package-version clang-runtime))) - ((6) + ((or 6 7) ;; Link to libclang_rt files from clang-runtime. (substitute* "lib/Driver/ToolChain.cpp" (("getDriver\\(\\)\\.ResourceDir") @@ -277,10 +262,32 @@ code analysis tools.") (define-public clang-runtime (clang-runtime-from-llvm llvm - "1fcr3jn24yr8lh36nc0c4ikli4744i2q9m1ik67p1jymwwaixkgl")) + "065ybd8fsc4h2hikbdyricj6pyv4r7r7kpcikhb2y5zf370xybkq")) (define-public clang (clang-from-llvm llvm clang-runtime + "067lwggnbg0w1dfrps790r5l6k8n5zwhlsw7zb6zvmfpwpfn4nx4" + #:patches '("clang-7.0-libc-search-path.patch"))) + +(define-public llvm-6 + (package + (inherit llvm) + (version "6.0.1") + (source (origin + (method url-fetch) + (uri (string-append "https://llvm.org/releases/" + version "/llvm-" version ".src.tar.xz")) + (sha256 + (base32 + "1qpls3vk85lydi5b4axl0809fv932qgsqgdgrk098567z4jc7mmn")))))) + +(define-public clang-runtime-6 + (clang-runtime-from-llvm + llvm-6 + "1fcr3jn24yr8lh36nc0c4ikli4744i2q9m1ik67p1jymwwaixkgl")) + +(define-public clang-6 + (clang-from-llvm llvm-6 clang-runtime "0rxn4rh7rrnsqbdgp4gzc8ishbkryhpl1kd3mpnxzpxxhla3y93w" #:patches '("clang-6.0-libc-search-path.patch"))) diff --git a/gnu/packages/patches/clang-7.0-libc-search-path.patch b/gnu/packages/patches/clang-7.0-libc-search-path.patch new file mode 100644 index 0000000000..07ff8c90bd --- /dev/null +++ b/gnu/packages/patches/clang-7.0-libc-search-path.patch @@ -0,0 +1,82 @@ +Clang attempts to guess file names based on the OS and distro (yes!), +but unfortunately, that doesn't work for us. + +This patch makes it easy to insert libc's $libdir so that Clang passes the +correct absolute file name of crt1.o etc. to 'ld'. It also disables all +the distro-specific stuff and removes the hard-coded FHS directory names +to make sure Clang also works on non-GuixSD systems. + +--- a/lib/Driver/ToolChains/Linux.cpp ++++ b/lib/Driver/ToolChains/Linux.cpp +@@ -225,7 +225,9 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + PPaths.push_back(Twine(GCCInstallation.getParentLibPath() + "/../" + + GCCInstallation.getTriple().str() + "/bin") + .str()); +- ++ // Comment out the distro-specific tweaks so that they don't bite when ++ // using Guix on a foreign distro. ++#if 0 + Distro Distro(D.getVFS()); + + if (Distro.IsAlpineLinux()) { +@@ -284,6 +286,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + + if (IsAndroid || Distro.IsOpenSUSE()) + ExtraOpts.push_back("--enable-new-dtags"); ++#endif + + // The selection of paths to try here is designed to match the patterns which + // the GCC driver itself uses, as this is part of the GCC-compatible driver. +@@ -342,7 +345,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + // the cross. Note that GCC does include some of these directories in some + // configurations but this seems somewhere between questionable and simply + // a bug. +- if (StringRef(LibPath).startswith(SysRoot)) { ++ if (0) { + addPathIfExists(D, LibPath + "/" + MultiarchTriple, Paths); + addPathIfExists(D, LibPath + "/../" + OSLibDir, Paths); + } +@@ -361,6 +364,8 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + addPathIfExists(D, SysRoot + "/lib/" + MultiarchTriple, Paths); + addPathIfExists(D, SysRoot + "/lib/../" + OSLibDir, Paths); + ++ // This requires the commented distro tweaks above. ++#if 0 + if (IsAndroid) { + // Android sysroots contain a library directory for each supported OS + // version as well as some unversioned libraries in the usual multiarch +@@ -389,10 +394,14 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + addPathIfExists(D, SysRoot + "/" + OSLibDir + "/" + ABIName, Paths); + addPathIfExists(D, SysRoot + "/usr/" + OSLibDir + "/" + ABIName, Paths); + } ++#endif + + // Try walking via the GCC triple path in case of biarch or multiarch GCC + // installations with strange symlinks. + if (GCCInstallation.isValid()) { ++ // The following code would end up adding things like ++ // "/usr/lib/x86_64-unknown-linux-gnu/../../lib64" to the search path. ++#if 0 + addPathIfExists(D, + SysRoot + "/usr/lib/" + GCCInstallation.getTriple().str() + + "/../../" + OSLibDir, +@@ -405,6 +414,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + BiarchSibling.gccSuffix(), + Paths); + } ++#endif + + // See comments above on the multilib variant for details of why this is + // included even from outside the sysroot. +@@ -429,8 +439,9 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + if (StringRef(D.Dir).startswith(SysRoot)) + addPathIfExists(D, D.Dir + "/../lib", Paths); + +- addPathIfExists(D, SysRoot + "/lib", Paths); +- addPathIfExists(D, SysRoot + "/usr/lib", Paths); ++ // Add libc's lib/ directory to the search path, so that crt1.o, crti.o, ++ // and friends can be found. ++ addPathIfExists(D, "@GLIBC_LIBDIR@", Paths); + } + + bool Linux::HasNativeLLVMSupport() const { return true; } -- cgit v1.2.3 From 4f4b37dfdf99531458df79b558b453defe9b4f17 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 16 Feb 2019 21:39:06 +0100 Subject: gnu: pius: Update to 2.2.7. * gnu/packages/gnupg.scm (pius): Update to 2.2.7. [source]: Remove upstreamed patch. * gnu/packages/patches/pius.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/gnupg.scm | 11 +++++------ gnu/packages/patches/pius.patch | 38 -------------------------------------- 3 files changed, 5 insertions(+), 45 deletions(-) delete mode 100644 gnu/packages/patches/pius.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 3d59e27e8f..508407399a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1125,7 +1125,6 @@ dist_patch_DATA = \ %D%/packages/patches/pinentry-efl.patch \ %D%/packages/patches/pingus-boost-headers.patch \ %D%/packages/patches/pingus-sdl-libs-config.patch \ - %D%/packages/patches/pius.patch \ %D%/packages/patches/pixman-CVE-2016-5296.patch \ %D%/packages/patches/plink-1.07-unclobber-i.patch \ %D%/packages/patches/plink-endian-detection.patch \ diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 7a7ff966bb..c5c99bfeb6 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -13,7 +13,7 @@ ;;; Copyright © 2016 Troy Sankey ;;; Copyright © 2017 Leo Famulari ;;; Copyright © 2017 Petter -;;; Copyright © 2018 Tobias Geerinckx-Rice +;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2018 Marius Bakke ;;; ;;; This file is part of GNU Guix. @@ -628,7 +628,7 @@ signing, decryption, verification, and key-listing parsing.") (define-public pius (package (name "pius") - (version "2.2.6") + (version "2.2.7") (source (origin (method url-fetch) (uri (string-append @@ -636,15 +636,14 @@ signing, decryption, verification, and key-listing parsing.") version "/pius-" version ".tar.bz2")) (sha256 (base32 - "1893hzpx3zv724drqv48csrn0cm98xw4ymb1zmhs2jvjj1778zfj")) - (patches (search-patches "pius.patch")))) + "1nsl7czicv95j0gfz4s82ys3g3h2mwr6cq3ilid8bpz3iy7z4ipy")))) (build-system python-build-system) - (inputs `(("perl" ,perl) ;for 'pius-party-worksheet' + (inputs `(("perl" ,perl) ; for 'pius-party-worksheet' ("gpg" ,gnupg) ("python-six" ,python2-six))) (arguments `(#:tests? #f - #:python ,python-2 ;uses the Python 2 'print' syntax + #:python ,python-2 ; uses the Python 2 'print' syntax #:phases (modify-phases %standard-phases (add-before diff --git a/gnu/packages/patches/pius.patch b/gnu/packages/patches/pius.patch deleted file mode 100644 index da39731d4d..0000000000 --- a/gnu/packages/patches/pius.patch +++ /dev/null @@ -1,38 +0,0 @@ -See https://github.com/jaymzh/pius/pull/96 - -commit 4dba0bf75ab351969622f7b9c38484657411a528 -Author: Martin Kletzander -Date: Thu May 17 17:55:27 2018 +0200 - - Don't fail on ENCRYPTION_COMPLIANCE_MODE line from too new GnuPG (#96) - - GnuPG started printing information about encryption compliance in [commit - f31dc2540acf](https://dev.gnupg.org/rGf31dc2540acf7cd7f09fd94658e815822222bfcb) - and since then signing with pius fails. - - Closes #95 - - Signed-off-by: Martin Kletzander - -diff --git a/libpius/signer.py b/libpius/signer.py -index 3c7262f..13013bb 100644 ---- a/libpius/signer.py -+++ b/libpius/signer.py -@@ -45,6 +45,7 @@ class PiusSigner(object): - GPG_PINENTRY_LAUNCHED = '[GNUPG:] PINENTRY_LAUNCHED' - GPG_KEY_CONSIDERED = '[GNUPG:] KEY_CONSIDERED' - GPG_WARN_VERSION = '[GNUPG:] WARNING server_version_mismatch' -+ GPG_ENC_COMPLIANT_MODE = '[GNUPG:] ENCRYPTION_COMPLIANCE_MODE' - - def __init__(self, signer, force_signer, mode, keyring, gpg_path, tmpdir, - outdir, encrypt_outfiles, mail, mailer, verbose, sort_keyring, -@@ -431,6 +432,9 @@ class PiusSigner(object): - if PiusSigner.GPG_ENC_BEG in line: - debug('Got GPG_ENC_BEG') - continue -+ elif PiusSigner.GPG_ENC_COMPLIANT_MODE in line: -+ debug('Got ENCRYPTION_COMPLIANCE_MODE') -+ continue - elif PiusSigner.GPG_ENC_END in line: - debug('Got GPG_ENC_END') - break -- cgit v1.2.3 From 9fd6f2a713ef7b6f0ed0873e9520dc726c8d03b9 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 17 Feb 2019 16:05:57 +0100 Subject: gnu: xf86-video-i128: Update to 1.4.0. * gnu/packages/patches/xf86-video-i128-remove-mibstore.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/xorg.scm (xf86-video-i128): Update to 1.4.0. [source](patches): Remove. --- gnu/local.mk | 1 - .../patches/xf86-video-i128-remove-mibstore.patch | 23 ---------------------- gnu/packages/xorg.scm | 5 ++--- 3 files changed, 2 insertions(+), 27 deletions(-) delete mode 100644 gnu/packages/patches/xf86-video-i128-remove-mibstore.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 508407399a..ce43db3c1d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1333,7 +1333,6 @@ dist_patch_DATA = \ %D%/packages/patches/x265-arm-flags.patch \ %D%/packages/patches/xf86-video-ark-remove-mibstore.patch \ %D%/packages/patches/xf86-video-geode-glibc-2.20.patch \ - %D%/packages/patches/xf86-video-i128-remove-mibstore.patch \ %D%/packages/patches/xf86-video-mach64-glibc-2.20.patch \ %D%/packages/patches/xf86-video-savage-xorg-compat.patch \ %D%/packages/patches/xf86-video-siliconmotion-fix-ftbfs.patch \ diff --git a/gnu/packages/patches/xf86-video-i128-remove-mibstore.patch b/gnu/packages/patches/xf86-video-i128-remove-mibstore.patch deleted file mode 100644 index b269d63473..0000000000 --- a/gnu/packages/patches/xf86-video-i128-remove-mibstore.patch +++ /dev/null @@ -1,23 +0,0 @@ -Removes references to mibstore.h and miInitializeBackingStore, which -have been removed from xorg-server. Zack Rusin -wrote: "It was a noop for at least 5 years and it has been removed." -See: http://patches.openembedded.org/patch/46133/ - ---- xf86-video-i128-1.3.6/src/i128_driver.c.~1~ 2012-07-17 01:21:15.000000000 -0400 -+++ xf86-video-i128-1.3.6/src/i128_driver.c 2014-12-19 00:47:16.140087736 -0500 -@@ -51,7 +51,6 @@ - #include "mipointer.h" - - /* All drivers implementing backing store need this */ --#include "mibstore.h" - #include "micmap.h" - - #include "xf86DDC.h" -@@ -1557,7 +1556,6 @@ - return FALSE; - } - -- miInitializeBackingStore(pScreen); - xf86SetBackingStore(pScreen); - xf86SetSilkenMouse(pScreen); - diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index 7f356c6210..12a6d3b660 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -2908,7 +2908,7 @@ X server.") (define-public xf86-video-i128 (package (name "xf86-video-i128") - (version "1.3.6") + (version "1.4.0") (source (origin (method url-fetch) @@ -2918,8 +2918,7 @@ X server.") ".tar.bz2")) (sha256 (base32 - "171b8lbxr56w3isph947dnw7x87hc46v6m3mcxdcz44gk167x0pq")) - (patches (search-patches "xf86-video-i128-remove-mibstore.patch")))) + "1snhpv1igrhifcls3r498kjd14ml6x2xvih7zk9xlsd1ymmhlb4g")))) (build-system gnu-build-system) (inputs `(("xorg-server" ,xorg-server))) (native-inputs `(("pkg-config" ,pkg-config))) -- cgit v1.2.3 From d0d207cdca1abb97db95260c804f5b8ba963f098 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 18 Feb 2019 17:50:42 +0100 Subject: gnu: tomsfastmath: Update to 0.13.1. * gnu/packages/multiprecision.scm (tomsfastmath): Update to 0.13.1. [source]: Remove patch. * gnu/packages/patches/tomsfastmath-constness.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/multiprecision.scm | 11 ++-- gnu/packages/patches/tomsfastmath-constness.patch | 76 ----------------------- 3 files changed, 5 insertions(+), 83 deletions(-) delete mode 100644 gnu/packages/patches/tomsfastmath-constness.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index ce43db3c1d..d1ccf4078a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1274,7 +1274,6 @@ dist_patch_DATA = \ %D%/packages/patches/tk-find-library.patch \ %D%/packages/patches/ttf2eot-cstddef.patch \ %D%/packages/patches/ttfautohint-source-date-epoch.patch \ - %D%/packages/patches/tomsfastmath-constness.patch \ %D%/packages/patches/totem-meson-easy-codec.patch \ %D%/packages/patches/tuxpaint-stamps-path.patch \ %D%/packages/patches/twinkle-include-qregexpvalidator.patch \ diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm index 969f0659a8..7ae3886166 100644 --- a/gnu/packages/multiprecision.scm +++ b/gnu/packages/multiprecision.scm @@ -230,17 +230,16 @@ and numerical quadrature programs are included.") (define-public tomsfastmath (package (name "tomsfastmath") - (version "0.13.0") + (version "0.13.1") (synopsis "Large integer arithmetic library") (source (origin (method url-fetch) (uri (string-append "https://github.com/libtom/tomsfastmath/" "releases/download/v" version "/" - "tfm-" (version-major+minor version) ".tar.bz2")) + "tfm-" version ".tar.xz")) (sha256 (base32 - "01rlsvp6lskk2a0gfdi24ak5h8vdwi6kqbvbwjnmb92r0zrfdvwd")) - (patches (search-patches "tomsfastmath-constness.patch")))) + "0f0pmiaskh89sp0q933pafxb914shpaj5ad8sb5rzk1wv8d7mja7")))) (build-system gnu-build-system) (native-inputs `(("libtool" ,libtool))) @@ -252,7 +251,7 @@ and numerical quadrature programs are included.") "CC=gcc") #:phases (modify-phases %standard-phases - (delete 'configure) ;no configuration + (delete 'configure) ; no configuration (replace 'check (lambda* (#:key make-flags #:allow-other-keys) (apply invoke "make" @@ -262,7 +261,7 @@ and numerical quadrature programs are included.") (invoke "./test"))) (add-before 'install 'install-nogroup (lambda _ - ;; Let permissions inherit from the current process + ;; Let permissions inherit from the current process. (substitute* "makefile.shared" (("-g \\$\\(GROUP\\) -o \\$\\(USER\\)") "")) #t)) diff --git a/gnu/packages/patches/tomsfastmath-constness.patch b/gnu/packages/patches/tomsfastmath-constness.patch deleted file mode 100644 index 7c6ab5bbec..0000000000 --- a/gnu/packages/patches/tomsfastmath-constness.patch +++ /dev/null @@ -1,76 +0,0 @@ -From dac089515901d6bf315cd15a6e744b8d2c02c1cb Mon Sep 17 00:00:00 2001 -From: Sebastian Andrzej Siewior -Date: Sat, 31 Oct 2015 22:48:07 +0100 -Subject: [PATCH] tfm: make a few functions static - -clamav expects them to be static and it does not seem bad to do so. - -Signed-off-by: Sebastian Andrzej Siewior ---- - src/bin/fp_read_radix.c | 2 +- - src/bin/fp_read_signed_bin.c | 2 +- - src/bin/fp_read_unsigned_bin.c | 2 +- - src/headers/tfm.h | 6 +++--- - 4 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/src/bin/fp_read_radix.c b/src/bin/fp_read_radix.c -index 0b5e826..431afa0 100644 ---- a/src/bin/fp_read_radix.c -+++ b/src/bin/fp_read_radix.c -@@ -9,7 +9,7 @@ - */ - #include - --int fp_read_radix(fp_int *a, char *str, int radix) -+int fp_read_radix(fp_int *a, const char *str, int radix) - { - int y, neg; - char ch; -diff --git a/src/bin/fp_read_signed_bin.c b/src/bin/fp_read_signed_bin.c -index e2b8003..6467d19 100644 ---- a/src/bin/fp_read_signed_bin.c -+++ b/src/bin/fp_read_signed_bin.c -@@ -9,7 +9,7 @@ - */ - #include - --void fp_read_signed_bin(fp_int *a, unsigned char *b, int c) -+void fp_read_signed_bin(fp_int *a, const unsigned char *b, int c) - { - /* read magnitude */ - fp_read_unsigned_bin (a, b + 1, c - 1); -diff --git a/src/bin/fp_read_unsigned_bin.c b/src/bin/fp_read_unsigned_bin.c -index 3ee64c0..2ee89cb 100644 ---- a/src/bin/fp_read_unsigned_bin.c -+++ b/src/bin/fp_read_unsigned_bin.c -@@ -9,7 +9,7 @@ - */ - #include - --void fp_read_unsigned_bin(fp_int *a, unsigned char *b, int c) -+void fp_read_unsigned_bin(fp_int *a, const unsigned char *b, int c) - { - /* zero the int */ - fp_zero (a); -diff --git a/src/headers/tfm.h b/src/headers/tfm.h -index af87b56..f406388 100644 ---- a/src/headers/tfm.h -+++ b/src/headers/tfm.h -@@ -467,14 +467,14 @@ int fp_prime_random_ex(fp_int *a, int t, int size, int flags, tfm_prime_callback - int fp_count_bits(fp_int *a); - - int fp_unsigned_bin_size(fp_int *a); --void fp_read_unsigned_bin(fp_int *a, unsigned char *b, int c); -+void fp_read_unsigned_bin(fp_int *a, const unsigned char *b, int c); - void fp_to_unsigned_bin(fp_int *a, unsigned char *b); - - int fp_signed_bin_size(fp_int *a); --void fp_read_signed_bin(fp_int *a, unsigned char *b, int c); -+void fp_read_signed_bin(fp_int *a, const unsigned char *b, int c); - void fp_to_signed_bin(fp_int *a, unsigned char *b); - --int fp_read_radix(fp_int *a, char *str, int radix); -+int fp_read_radix(fp_int *a, const char *str, int radix); - - int fp_radix_size(fp_int *a, int radix, int *size); - int fp_toradix(fp_int *a, char *str, int radix); -- cgit v1.2.3 From fa75a21363d6dd07c1dbc990b88cd75f19454324 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 19 Feb 2019 07:19:53 +0100 Subject: gnu: soundconverter: Update to 3.0.1. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/gnome.scm (soundconverter): Update to 3.0.1. [arguments]: Remove ‘fix-POTFILES.in’ phase. * gnu/packages/patches/soundconverter-remove-gconf-dependency.patch: Update. --- gnu/packages/gnome.scm | 13 +-- .../soundconverter-remove-gconf-dependency.patch | 104 +++++---------------- 2 files changed, 28 insertions(+), 89 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index e371a60131..a5ca245fe6 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -21,7 +21,7 @@ ;;; Copyright © 2016 Alex Griffin ;;; Copyright © 2016, 2017 Nils Gillmann ;;; Copyright © 2016 David Craven -;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice +;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2017 Hartmut Goebel ;;; Copyright © 2017, 2018 nee @@ -7371,7 +7371,7 @@ mp3, Ogg Vorbis and FLAC") (define-public soundconverter (package (name "soundconverter") - (version "3.0.0") + (version "3.0.1") (source (origin (method url-fetch) @@ -7380,8 +7380,7 @@ mp3, Ogg Vorbis and FLAC") "soundconverter-" version ".tar.xz")) (sha256 - (base32 - "1wrxf5py54xplrf97qp24pzbis0cvax5c6k0c7vr3z3ry8r7gd7c")) + (base32 "1d6x1yf8psqbd9zbybxivfqg55khcnngp2mn92l161dfdk9512c5")) (patches (search-patches "soundconverter-remove-gconf-dependency.patch")))) @@ -7398,12 +7397,6 @@ mp3, Ogg Vorbis and FLAC") #:phases (modify-phases %standard-phases - (add-after 'unpack 'fix-POTFILES.in - (lambda _ - (substitute* "po/POTFILES.in" - ;; This file doesn't exist, so without removing it, the 'check - ;; phase fails for the po directory - (("soundconverter/gconfstore\\.py") "")))) (add-after 'install 'wrap-soundconverter-for-python (assoc-ref python:%standard-phases 'wrap)) (add-after 'install 'wrap-soundconverter diff --git a/gnu/packages/patches/soundconverter-remove-gconf-dependency.patch b/gnu/packages/patches/soundconverter-remove-gconf-dependency.patch index f065b9a3d4..29cdeb6e8d 100644 --- a/gnu/packages/patches/soundconverter-remove-gconf-dependency.patch +++ b/gnu/packages/patches/soundconverter-remove-gconf-dependency.patch @@ -1,83 +1,29 @@ -From: Sebastian Ramacher -Date: Fri, 6 Apr 2018 13:25:35 +0200 -Subject: Only fetch profiles if GConf is still available +From: Tobias Geerinckx-Rice +Date: Tue, 19 Feb 2019 07:46:28 +0100 +Subject: [PATCH] gnu: soundconverter: Catch (and ignore) the right error. ---- - bin/soundconverter.py | 1 - - soundconverter/gstreamer.py | 44 ++++++++++++++++++++++++-------------------- - 2 files changed, 24 insertions(+), 21 deletions(-) +Without this patch and GConf: -diff --git a/bin/soundconverter.py b/bin/soundconverter.py -index 39055ce..5198443 100644 ---- a/bin/soundconverter.py -+++ b/bin/soundconverter.py -@@ -66,7 +66,6 @@ def _check_libs(): - import gi - gi.require_version('Gst', '1.0') - gi.require_version('Gtk', '3.0') -- gi.require_version('GConf', '2.0') - from gi.repository import GObject - # force GIL creation - see https://bugzilla.gnome.org/show_bug.cgi?id=710447 - import threading -diff --git a/soundconverter/gstreamer.py b/soundconverter/gstreamer.py -index 23aaa9b..211b052 100644 ---- a/soundconverter/gstreamer.py -+++ b/soundconverter/gstreamer.py -@@ -25,7 +25,7 @@ from urllib.parse import urlparse - from gettext import gettext as _ - - import gi --from gi.repository import Gst, Gtk, GObject, GConf, Gio -+from gi.repository import Gst, Gtk, GObject, Gio - - from soundconverter.fileoperations import vfs_encode_filename, file_encode_filename - from soundconverter.fileoperations import unquote_filename, vfs_makedirs, vfs_unlink -@@ -66,25 +66,29 @@ _GCONF_PROFILE_LIST_PATH = "/system/gstreamer/1.0/audio/global/profile_list" - audio_profiles_list = [] - audio_profiles_dict = {} - --_GCONF = GConf.Client.get_default() --profiles = _GCONF.all_dirs(_GCONF_PROFILE_LIST_PATH) --for name in profiles: -- if _GCONF.get_bool(_GCONF_PROFILE_PATH + name + "/active"): -- # get profile -- description = _GCONF.get_string(_GCONF_PROFILE_PATH + name + "/name") -- extension = _GCONF.get_string(_GCONF_PROFILE_PATH + name + "/extension") -- pipeline = _GCONF.get_string(_GCONF_PROFILE_PATH + name + "/pipeline") -- # check profile validity -- if not extension or not pipeline: -- continue -- if not description: -- description = extension -- if description in audio_profiles_dict: -- continue -- # store -- profile = description, extension, pipeline -- audio_profiles_list.append(profile) -- audio_profiles_dict[description] = profile -+try: -+ from gi.repository import GConf -+ _GCONF = GConf.Client.get_default() -+ profiles = _GCONF.all_dirs(_GCONF_PROFILE_LIST_PATH) -+ for name in profiles: -+ if _GCONF.get_bool(_GCONF_PROFILE_PATH + name + "/active"): -+ # get profile -+ description = _GCONF.get_string(_GCONF_PROFILE_PATH + name + "/name") -+ extension = _GCONF.get_string(_GCONF_PROFILE_PATH + name + "/extension") -+ pipeline = _GCONF.get_string(_GCONF_PROFILE_PATH + name + "/pipeline") -+ # check profile validity -+ if not extension or not pipeline: -+ continue -+ if not description: -+ description = extension -+ if description in audio_profiles_dict: -+ continue -+ # store -+ profile = description, extension, pipeline -+ audio_profiles_list.append(profile) -+ audio_profiles_dict[description] = profile -+except ImportError: -+ pass + Traceback (most recent call last): + File "/gnu/…/bin/...soundconverter-real-real-real", line 164, in + from soundconverter.batch import cli_convert_main + File "/gnu/…/lib/soundconverter/python/soundconverter/batch.py", line 31, in + from soundconverter.gstreamer import TagReader + File "/gnu/…/lib/soundconverter/python/soundconverter/gstreamer.py", line 70, in + gi.require_version('GConf', '2.0') + File "/gnu/…/lib/python3.7/site-packages/gi/__init__.py", line 130, in require_version + raise ValueError('Namespace %s not available' % namespace) + ValueError: Namespace GConf not available +--- +diff -Naur soundconverter-3.0.1/soundconverter/gstreamer.py soundconverter-3.0.1/soundconverter/gstreamer.py +--- soundconverter-3.0.1/soundconverter/gstreamer.py 2018-11-23 20:38:46.000000000 +0100 ++++ soundconverter-3.0.1/soundconverter/gstreamer.py 2019-02-19 07:42:15.767684388 +0100 +@@ -88,7 +88,7 @@ + profile = description, extension, pipeline + audio_profiles_list.append(profile) + audio_profiles_dict[description] = profile +-except ImportError: ++except ValueError: + pass required_elements = ('decodebin', 'fakesink', 'audioconvert', 'typefind', 'audiorate') - for element in required_elements: -- cgit v1.2.3 From c12b23469576fb1c3920120ef06b696daa30b855 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Fri, 15 Feb 2019 12:22:10 -0500 Subject: gnu: libgd: Fix CVE-2019-{6977,6978}. * gnu/packages/gd.scm (gd)[replacement]: New field. (gd/fixed): New variable. * gnu/packages/patches/gd-CVE-2019-6977.patch, gnu/packages/patches/gd-CVE-2019-6978.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. --- gnu/local.mk | 2 + gnu/packages/gd.scm | 11 + gnu/packages/patches/gd-CVE-2019-6977.patch | 36 ++++ gnu/packages/patches/gd-CVE-2019-6978.patch | 301 ++++++++++++++++++++++++++++ 4 files changed, 350 insertions(+) create mode 100644 gnu/packages/patches/gd-CVE-2019-6977.patch create mode 100644 gnu/packages/patches/gd-CVE-2019-6978.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 7aabf8dfd5..0a3961da02 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -795,6 +795,8 @@ dist_patch_DATA = \ %D%/packages/patches/gcr-fix-collection-tests-to-work-with-gpg-21.patch \ %D%/packages/patches/gd-CVE-2018-5711.patch \ %D%/packages/patches/gd-CVE-2018-1000222.patch \ + %D%/packages/patches/gd-CVE-2019-6977.patch \ + %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 \ diff --git a/gnu/packages/gd.scm b/gnu/packages/gd.scm index a53a4f2c2f..c08c1f6758 100644 --- a/gnu/packages/gd.scm +++ b/gnu/packages/gd.scm @@ -39,6 +39,7 @@ (define-public gd (package (name "gd") + (replacement gd/fixed) ;; Note: With libgd.org now pointing to github.com, genuine old ;; tarballs are no longer available. Notably, versions 2.0.x are ;; missing. @@ -94,6 +95,16 @@ most common applications of GD involve website development.") "See COPYING file in the distribution.")) (properties '((cpe-name . "libgd"))))) +(define-public gd/fixed + (hidden-package + (package + (inherit gd) + (source (origin + (inherit (package-source gd)) + (patches (append (origin-patches (package-source gd)) + (search-patches "gd-CVE-2019-6977.patch" + "gd-CVE-2019-6978.patch")))))))) + (define-public perl-gd (package (name "perl-gd") diff --git a/gnu/packages/patches/gd-CVE-2019-6977.patch b/gnu/packages/patches/gd-CVE-2019-6977.patch new file mode 100644 index 0000000000..b21a8ac619 --- /dev/null +++ b/gnu/packages/patches/gd-CVE-2019-6977.patch @@ -0,0 +1,36 @@ +Fix CVE-2019-6977: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-6977 + +Patch copied from Debian: + +https://salsa.debian.org/debian/libgd2/commit/2d7d3b68bb79843e5271a05543e996fd5a3a8cd1 + +Description: Heap-based buffer overflow in gdImageColorMatch +Origin: other, https://gist.github.com/cmb69/1f36d285eb297ed326f5c821d7aafced +Bug-PHP: https://bugs.php.net/bug.php?id=77270 +Bug-Debian: https://bugs.debian.org/920645 +Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2019-6977 +Forwarded: no +Author: "Christoph M. Becker" +Last-Update: 2019-02-01 + +At least some of the image reading functions may return images which +use color indexes greater than or equal to im->colorsTotal. We cater +to this by always using a buffer size which is sufficient for +`gdMaxColors` in `gdImageColorMatch()`. +--- + +--- a/src/gd_color_match.c ++++ b/src/gd_color_match.c +@@ -31,8 +31,8 @@ BGD_DECLARE(int) gdImageColorMatch (gdIm + return -4; /* At least 1 color must be allocated */ + } + +- buf = (unsigned long *)gdMalloc(sizeof(unsigned long) * 5 * im2->colorsTotal); +- memset (buf, 0, sizeof(unsigned long) * 5 * im2->colorsTotal ); ++ buf = (unsigned long *)gdMalloc(sizeof(unsigned long) * 5 * gdMaxColors); ++ memset (buf, 0, sizeof(unsigned long) * 5 * gdMaxColors ); + + for (x=0; x < im1->sx; x++) { + for( y=0; ysy; y++ ) { diff --git a/gnu/packages/patches/gd-CVE-2019-6978.patch b/gnu/packages/patches/gd-CVE-2019-6978.patch new file mode 100644 index 0000000000..69fc5056fc --- /dev/null +++ b/gnu/packages/patches/gd-CVE-2019-6978.patch @@ -0,0 +1,301 @@ +Fix CVE-2019-6978: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-6978 + +Patch copied from upstream source repository: + +https://github.com/libgd/libgd/commit/553702980ae89c83f2d6e254d62cf82e204956d0 + +From 553702980ae89c83f2d6e254d62cf82e204956d0 Mon Sep 17 00:00:00 2001 +From: "Christoph M. Becker" +Date: Thu, 17 Jan 2019 11:54:55 +0100 +Subject: [PATCH] Fix #492: Potential double-free in gdImage*Ptr() + +Whenever `gdImage*Ptr()` calls `gdImage*Ctx()` and the latter fails, we +must not call `gdDPExtractData()`; otherwise a double-free would +happen. Since `gdImage*Ctx()` are void functions, and we can't change +that for BC reasons, we're introducing static helpers which are used +internally. + +We're adding a regression test for `gdImageJpegPtr()`, but not for +`gdImageGifPtr()` and `gdImageWbmpPtr()` since we don't know how to +trigger failure of the respective `gdImage*Ctx()` calls. + +This potential security issue has been reported by Solmaz Salimi (aka. +Rooney). +--- + src/gd_gif_out.c | 18 +++++++++++++++--- + src/gd_jpeg.c | 20 ++++++++++++++++---- + src/gd_wbmp.c | 21 ++++++++++++++++++--- + tests/jpeg/.gitignore | 1 + + tests/jpeg/CMakeLists.txt | 1 + + tests/jpeg/Makemodule.am | 3 ++- + tests/jpeg/jpeg_ptr_double_free.c | 31 +++++++++++++++++++++++++++++++ + 7 files changed, 84 insertions(+), 11 deletions(-) + create mode 100644 tests/jpeg/jpeg_ptr_double_free.c + +diff --git a/src/gd_gif_out.c b/src/gd_gif_out.c +index 298a581..d5a9534 100644 +--- a/src/gd_gif_out.c ++++ b/src/gd_gif_out.c +@@ -99,6 +99,7 @@ static void char_init(GifCtx *ctx); + static void char_out(int c, GifCtx *ctx); + static void flush_char(GifCtx *ctx); + ++static int _gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out); + + + +@@ -131,8 +132,11 @@ BGD_DECLARE(void *) gdImageGifPtr(gdImagePtr im, int *size) + void *rv; + gdIOCtx *out = gdNewDynamicCtx(2048, NULL); + if (out == NULL) return NULL; +- gdImageGifCtx(im, out); +- rv = gdDPExtractData(out, size); ++ if (!_gdImageGifCtx(im, out)) { ++ rv = gdDPExtractData(out, size); ++ } else { ++ rv = NULL; ++ } + out->gd_free(out); + return rv; + } +@@ -220,6 +224,12 @@ BGD_DECLARE(void) gdImageGif(gdImagePtr im, FILE *outFile) + + */ + BGD_DECLARE(void) gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out) ++{ ++ _gdImageGifCtx(im, out); ++} ++ ++/* returns 0 on success, 1 on failure */ ++static int _gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out) + { + gdImagePtr pim = 0, tim = im; + int interlace, BitsPerPixel; +@@ -231,7 +241,7 @@ BGD_DECLARE(void) gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out) + based temporary image. */ + pim = gdImageCreatePaletteFromTrueColor(im, 1, 256); + if(!pim) { +- return; ++ return 1; + } + tim = pim; + } +@@ -247,6 +257,8 @@ BGD_DECLARE(void) gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out) + /* Destroy palette based temporary image. */ + gdImageDestroy( pim); + } ++ ++ return 0; + } + + +diff --git a/src/gd_jpeg.c b/src/gd_jpeg.c +index fc05842..96ef430 100644 +--- a/src/gd_jpeg.c ++++ b/src/gd_jpeg.c +@@ -117,6 +117,8 @@ static void fatal_jpeg_error(j_common_ptr cinfo) + exit(99); + } + ++static int _gdImageJpegCtx(gdImagePtr im, gdIOCtx *outfile, int quality); ++ + /* + * Write IM to OUTFILE as a JFIF-formatted JPEG image, using quality + * QUALITY. If QUALITY is in the range 0-100, increasing values +@@ -231,8 +233,11 @@ BGD_DECLARE(void *) gdImageJpegPtr(gdImagePtr im, int *size, int quality) + void *rv; + gdIOCtx *out = gdNewDynamicCtx(2048, NULL); + if (out == NULL) return NULL; +- gdImageJpegCtx(im, out, quality); +- rv = gdDPExtractData(out, size); ++ if (!_gdImageJpegCtx(im, out, quality)) { ++ rv = gdDPExtractData(out, size); ++ } else { ++ rv = NULL; ++ } + out->gd_free(out); + return rv; + } +@@ -253,6 +258,12 @@ void jpeg_gdIOCtx_dest(j_compress_ptr cinfo, gdIOCtx *outfile); + + */ + BGD_DECLARE(void) gdImageJpegCtx(gdImagePtr im, gdIOCtx *outfile, int quality) ++{ ++ _gdImageJpegCtx(im, outfile, quality); ++} ++ ++/* returns 0 on success, 1 on failure */ ++static int _gdImageJpegCtx(gdImagePtr im, gdIOCtx *outfile, int quality) + { + struct jpeg_compress_struct cinfo; + struct jpeg_error_mgr jerr; +@@ -287,7 +298,7 @@ BGD_DECLARE(void) gdImageJpegCtx(gdImagePtr im, gdIOCtx *outfile, int quality) + if(row) { + gdFree(row); + } +- return; ++ return 1; + } + + cinfo.err->emit_message = jpeg_emit_message; +@@ -328,7 +339,7 @@ BGD_DECLARE(void) gdImageJpegCtx(gdImagePtr im, gdIOCtx *outfile, int quality) + if(row == 0) { + gd_error("gd-jpeg: error: unable to allocate JPEG row structure: gdCalloc returns NULL\n"); + jpeg_destroy_compress(&cinfo); +- return; ++ return 1; + } + + rowptr[0] = row; +@@ -405,6 +416,7 @@ BGD_DECLARE(void) gdImageJpegCtx(gdImagePtr im, gdIOCtx *outfile, int quality) + jpeg_finish_compress(&cinfo); + jpeg_destroy_compress(&cinfo); + gdFree(row); ++ return 0; + } + + +diff --git a/src/gd_wbmp.c b/src/gd_wbmp.c +index f19a1c9..a49bdbe 100644 +--- a/src/gd_wbmp.c ++++ b/src/gd_wbmp.c +@@ -88,6 +88,8 @@ int gd_getin(void *in) + return (gdGetC((gdIOCtx *)in)); + } + ++static int _gdImageWBMPCtx(gdImagePtr image, int fg, gdIOCtx *out); ++ + /* + Function: gdImageWBMPCtx + +@@ -100,6 +102,12 @@ int gd_getin(void *in) + out - the stream where to write + */ + BGD_DECLARE(void) gdImageWBMPCtx(gdImagePtr image, int fg, gdIOCtx *out) ++{ ++ _gdImageWBMPCtx(image, fg, out); ++} ++ ++/* returns 0 on success, 1 on failure */ ++static int _gdImageWBMPCtx(gdImagePtr image, int fg, gdIOCtx *out) + { + int x, y, pos; + Wbmp *wbmp; +@@ -107,7 +115,7 @@ BGD_DECLARE(void) gdImageWBMPCtx(gdImagePtr image, int fg, gdIOCtx *out) + /* create the WBMP */ + if((wbmp = createwbmp(gdImageSX(image), gdImageSY(image), WBMP_WHITE)) == NULL) { + gd_error("Could not create WBMP\n"); +- return; ++ return 1; + } + + /* fill up the WBMP structure */ +@@ -123,11 +131,15 @@ BGD_DECLARE(void) gdImageWBMPCtx(gdImagePtr image, int fg, gdIOCtx *out) + + /* write the WBMP to a gd file descriptor */ + if(writewbmp(wbmp, &gd_putout, out)) { ++ freewbmp(wbmp); + gd_error("Could not save WBMP\n"); ++ return 1; + } + + /* des submitted this bugfix: gdFree the memory. */ + freewbmp(wbmp); ++ ++ return 0; + } + + /* +@@ -271,8 +283,11 @@ BGD_DECLARE(void *) gdImageWBMPPtr(gdImagePtr im, int *size, int fg) + void *rv; + gdIOCtx *out = gdNewDynamicCtx(2048, NULL); + if (out == NULL) return NULL; +- gdImageWBMPCtx(im, fg, out); +- rv = gdDPExtractData(out, size); ++ if (!_gdImageWBMPCtx(im, fg, out)) { ++ rv = gdDPExtractData(out, size); ++ } else { ++ rv = NULL; ++ } + out->gd_free(out); + return rv; + } +#diff --git a/tests/jpeg/.gitignore b/tests/jpeg/.gitignore +#index c28aa87..13bcf04 100644 +#--- a/tests/jpeg/.gitignore +#+++ b/tests/jpeg/.gitignore +#@@ -3,5 +3,6 @@ +# /jpeg_empty_file +# /jpeg_im2im +# /jpeg_null +#+/jpeg_ptr_double_free +# /jpeg_read +# /jpeg_resolution +diff --git a/tests/jpeg/CMakeLists.txt b/tests/jpeg/CMakeLists.txt +index 19964b0..a8d8162 100644 +--- a/tests/jpeg/CMakeLists.txt ++++ b/tests/jpeg/CMakeLists.txt +@@ -2,6 +2,7 @@ IF(JPEG_FOUND) + LIST(APPEND TESTS_FILES + jpeg_empty_file + jpeg_im2im ++ jpeg_ptr_double_free + jpeg_null + ) + +diff --git a/tests/jpeg/Makemodule.am b/tests/jpeg/Makemodule.am +index 7e5d317..b89e169 100644 +--- a/tests/jpeg/Makemodule.am ++++ b/tests/jpeg/Makemodule.am +@@ -2,7 +2,8 @@ if HAVE_LIBJPEG + libgd_test_programs += \ + jpeg/jpeg_empty_file \ + jpeg/jpeg_im2im \ +- jpeg/jpeg_null ++ jpeg/jpeg_null \ ++ jpeg/jpeg_ptr_double_free + + if HAVE_LIBPNG + libgd_test_programs += \ +diff --git a/tests/jpeg/jpeg_ptr_double_free.c b/tests/jpeg/jpeg_ptr_double_free.c +new file mode 100644 +index 0000000..df5a510 +--- /dev/null ++++ b/tests/jpeg/jpeg_ptr_double_free.c +@@ -0,0 +1,31 @@ ++/** ++ * Test that failure to convert to JPEG returns NULL ++ * ++ * We are creating an image, set its width to zero, and pass this image to ++ * `gdImageJpegPtr()` which is supposed to fail, and as such should return NULL. ++ * ++ * See also ++ */ ++ ++ ++#include "gd.h" ++#include "gdtest.h" ++ ++ ++int main() ++{ ++ gdImagePtr src, dst; ++ int size; ++ ++ src = gdImageCreateTrueColor(1, 10); ++ gdTestAssert(src != NULL); ++ ++ src->sx = 0; /* this hack forces gdImageJpegPtr() to fail */ ++ ++ dst = gdImageJpegPtr(src, &size, 0); ++ gdTestAssert(dst == NULL); ++ ++ gdImageDestroy(src); ++ ++ return gdNumFailures(); ++} +-- +2.20.1 + -- cgit v1.2.3 From 2bf50977844f02e7c888a3a4222f0c900e1fbe01 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 20 Feb 2019 16:18:21 +0100 Subject: gnu: xmodmap: Update to 1.0.10. * gnu/packages/patches/xmodmap-asprintf.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/xorg.scm (xmodmap): Update to 1.0.10. [source](patches): Remove. [home-page]: Set to source repository. --- gnu/local.mk | 3 +-- gnu/packages/patches/xmodmap-asprintf.patch | 14 -------------- gnu/packages/xorg.scm | 7 +++---- 3 files changed, 4 insertions(+), 20 deletions(-) delete mode 100644 gnu/packages/patches/xmodmap-asprintf.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 0a3961da02..faebff2e5d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1345,8 +1345,7 @@ dist_patch_DATA = \ %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 \ - %D%/packages/patches/xmodmap-asprintf.patch + %D%/packages/patches/xinetd-CVE-2013-4342.patch MISC_DISTRO_FILES = \ %D%/packages/ld-wrapper.in diff --git a/gnu/packages/patches/xmodmap-asprintf.patch b/gnu/packages/patches/xmodmap-asprintf.patch deleted file mode 100644 index 6dfe8514e5..0000000000 --- a/gnu/packages/patches/xmodmap-asprintf.patch +++ /dev/null @@ -1,14 +0,0 @@ -This patch allows the 'asprintf' declaration to be visible, by -including , which defines _GNU_SOURCE. - - ---- xmodmap-1.0.7/xmodmap.c 2013-11-25 23:25:25.000000000 +0100 -+++ xmodmap-1.0.7/xmodmap.c 2013-11-25 23:25:27.000000000 +0100 -@@ -26,6 +26,7 @@ from The Open Group. - - */ - -+#include - #include - #include - #include diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index 88598b2c35..5d3bbe3459 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -4061,7 +4061,7 @@ containing one glyph per cell.") (define-public xmodmap (package (name "xmodmap") - (version "1.0.9") + (version "1.0.10") (source (origin (method url-fetch) @@ -4071,15 +4071,14 @@ containing one glyph per cell.") ".tar.bz2")) (sha256 (base32 - "0y649an3jqfq9klkp9y5gj20xb78fw6g193f5mnzpl0hbz6fbc5p")) - (patches (search-patches "xmodmap-asprintf.patch")))) + "0z28331i2pm16x671fa9qwsfqdmr6a43bzwmp0dm17a3sx0hjgs7")))) (build-system gnu-build-system) (inputs `(("xorgproto" ,xorgproto) ("libx11" ,libx11))) (native-inputs `(("pkg-config" ,pkg-config))) - (home-page "https://www.x.org/wiki/") + (home-page "https://gitlab.freedesktop.org/xorg/app/xmodmap") (synopsis "Modify keymaps and button mappings on X server") (description "Xmodmap is used to display and edit the keyboard modifier map and -- cgit v1.2.3