From 94b4274d0dc5768bac255980c7e785bd3dff261f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 20 Jun 2016 21:51:59 +0200 Subject: tests: Add system installation test. * gnu/tests.scm (define-os-with-source): New macro. * gnu/tests/install.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * build-aux/run-system-tests.scm (%system-tests): Likewise. --- 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 55fea0e855..150d6af553 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -409,7 +409,8 @@ GNU_SYSTEM_MODULES = \ %D%/build/vm.scm \ \ %D%/tests.scm \ - %D%/tests/base.scm + %D%/tests/base.scm \ + %D%/tests/install.scm patchdir = $(guilemoduledir)/%D%/packages/patches -- cgit v1.2.3 From 8472bdecb634e2f3015a61e16c59b62831b82ea9 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 18 Jun 2016 22:39:33 +0200 Subject: gnu: Add nasm. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/assembly.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. Co-authored-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/assembly.scm | 61 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 gnu/packages/assembly.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 150d6af553..4941414841 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -41,6 +41,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/apl.scm \ %D%/packages/apr.scm \ %D%/packages/aspell.scm \ + %D%/packages/assembly.scm \ %D%/packages/attr.scm \ %D%/packages/audacity.scm \ %D%/packages/audio.scm \ diff --git a/gnu/packages/assembly.scm b/gnu/packages/assembly.scm new file mode 100644 index 0000000000..0c0b1da344 --- /dev/null +++ b/gnu/packages/assembly.scm @@ -0,0 +1,61 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2016 Jan Nieuwenhuizen +;;; +;;; 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 assembly) + #:use-module (guix build-system gnu) + #:use-module (guix download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (gnu packages ghostscript) + #:use-module (gnu packages perl) + #:use-module (gnu packages texinfo)) + +(define-public nasm + (package + (name "nasm") + (version "2.12.01") + (source (origin + (method url-fetch) + (uri (string-append "http://www.nasm.us/pub/nasm/releasebuilds/" + version "/" name "-" version ".tar.xz")) + (sha256 + (base32 + "12bl6vc5sjp9nnhf0iwy6l27vq783y0rxrjpp8sy84h5cb7a3fwx")))) + (build-system gnu-build-system) + (native-inputs `(("ghostscript" ,ghostscript) ; ps2pdf + ("perl" ,perl) ;for test target + ("texinfo" ,texinfo))) + (arguments + `(#:test-target "test" + #:phases (modify-phases %standard-phases + (add-after 'install 'install-info + (lambda _ + ;; FIXME: The PDF and PS files are not reproducible. + (zero? (system* "make" "install_doc"))))))) + (home-page "http://www.nasm.us/") + (synopsis "80x86 and x86-64 assembler") + (description + "NASM, the Netwide Assembler, is an 80x86 and x86-64 assembler designed +for portability and modularity. It supports a range of object file formats, +including Linux and *BSD a.out, ELF, COFF, Mach-O, Microsoft 16-bit OBJ, +Windows32 and Windows64. It will also output plain binary files. Its syntax +is designed to be simple and easy to understand, similar to Intel's but less +complex. It supports all currently known x86 architectural extensions, and +has strong support for macros.") + (supported-systems '("x86_64-linux" "i686-linux")) + (license license:bsd-3))) -- cgit v1.2.3 From 15a3fffc593a2385bbac60913909833babc1625f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 21 Jun 2016 12:25:56 +0200 Subject: gnu: yasm: Move to (gnu packages assembly). * gnu/packages/yasm.scm: Remove. Move 'yasm' to... * gnu/packages/assembly.scm (yasm): ... here. New variable. * gnu/local.mk (GNU_SYSTEM_MODULES): Adjust accordingly. --- gnu/local.mk | 1 - gnu/packages/assembly.scm | 34 ++++++++++++++++++++++++++++- gnu/packages/yasm.scm | 55 ----------------------------------------------- 3 files changed, 33 insertions(+), 57 deletions(-) delete mode 100644 gnu/packages/yasm.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 4941414841..eb0ea41ca4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -364,7 +364,6 @@ GNU_SYSTEM_MODULES = \ %D%/packages/xdisorg.scm \ %D%/packages/xorg.scm \ %D%/packages/xfce.scm \ - %D%/packages/yasm.scm \ %D%/packages/yubico.scm \ %D%/packages/zile.scm \ %D%/packages/zip.scm \ diff --git a/gnu/packages/assembly.scm b/gnu/packages/assembly.scm index 0c0b1da344..575856a13e 100644 --- a/gnu/packages/assembly.scm +++ b/gnu/packages/assembly.scm @@ -1,5 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 Jan Nieuwenhuizen +;;; Copyright © 2013 Andreas Enge +;;; Copyright © 2016 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -23,7 +25,9 @@ #:use-module (guix packages) #:use-module (gnu packages ghostscript) #:use-module (gnu packages perl) - #:use-module (gnu packages texinfo)) + #:use-module (gnu packages texinfo) + #:use-module (gnu packages python) + #:use-module (gnu packages xml)) (define-public nasm (package @@ -59,3 +63,31 @@ complex. It supports all currently known x86 architectural extensions, and has strong support for macros.") (supported-systems '("x86_64-linux" "i686-linux")) (license license:bsd-3))) + +(define-public yasm + (package + (name "yasm") + (version "1.3.0") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.tortall.net/projects/yasm/releases/yasm-" + version ".tar.gz")) + (sha256 + (base32 + "0gv0slmm0qpq91za3v2v9glff3il594x5xsrbgab7xcmnh0ndkix")))) + (build-system gnu-build-system) + (inputs + `(("python" ,python-wrapper) + ("xmlto" ,xmlto))) + (home-page "http://yasm.tortall.net/") + (synopsis "Rewrite of the NASM assembler") + (description + "Yasm is a complete rewrite of the NASM assembler. + +Yasm currently supports the x86 and AMD64 instruction sets, accepts NASM +and GAS assembler syntaxes, outputs binary, ELF32, ELF64, 32 and 64-bit +Mach-O, RDOFF2, COFF, Win32, and Win64 object formats, and generates source +debugging information in STABS, DWARF 2, and CodeView 8 formats.") + (license (license:non-copyleft "file://COPYING" + "See COPYING in the distribution.")))) diff --git a/gnu/packages/yasm.scm b/gnu/packages/yasm.scm deleted file mode 100644 index 31a9083cdf..0000000000 --- a/gnu/packages/yasm.scm +++ /dev/null @@ -1,55 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013 Andreas Enge -;;; Copyright © 2016 Efraim Flashner -;;; -;;; 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 yasm) - #:use-module (gnu packages) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix packages) - #:use-module (guix download) - #:use-module (guix build-system gnu) - #:use-module (gnu packages python) - #:use-module (gnu packages xml)) - -(define-public yasm - (package - (name "yasm") - (version "1.3.0") - (source - (origin - (method url-fetch) - (uri (string-append "http://www.tortall.net/projects/yasm/releases/yasm-" - version ".tar.gz")) - (sha256 - (base32 - "0gv0slmm0qpq91za3v2v9glff3il594x5xsrbgab7xcmnh0ndkix")))) - (build-system gnu-build-system) - (inputs - `(("python" ,python-wrapper) - ("xmlto" ,xmlto))) - (home-page "http://yasm.tortall.net/") - (synopsis "Rewrite of the NASM assembler") - (description - "Yasm is a complete rewrite of the NASM assembler. - -Yasm currently supports the x86 and AMD64 instruction sets, accepts NASM -and GAS assembler syntaxes, outputs binary, ELF32, ELF64, 32 and 64-bit -Mach-O, RDOFF2, COFF, Win32, and Win64 object formats, and generates source -debugging information in STABS, DWARF 2, and CodeView 8 formats.") - (license (license:non-copyleft "file://COPYING" - "See COPYING in the distribution.")))) -- cgit v1.2.3 From 9270298f7521eb5ca654186c44a8b203f4584d62 Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Tue, 7 Jun 2016 22:03:26 +1000 Subject: gnu: Add ruby-puma. gnu/packages/ruby.scm (ruby-puma): New variable. gnu/packages/patches/ruby-puma-ignore-broken-test.patch: New file. gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + .../patches/ruby-puma-ignore-broken-test.patch | 13 +++++++ gnu/packages/ruby.scm | 41 ++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 gnu/packages/patches/ruby-puma-ignore-broken-test.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index eb0ea41ca4..1ef7ef0833 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -755,6 +755,7 @@ dist_patch_DATA = \ %D%/packages/patches/rpm-CVE-2014-8118.patch \ %D%/packages/patches/rsem-makefile.patch \ %D%/packages/patches/ruby-concurrent-ignore-broken-test.patch \ + %D%/packages/patches/ruby-puma-ignore-broken-test.patch \ %D%/packages/patches/ruby-symlinkfix.patch \ %D%/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch\ %D%/packages/patches/rush-CVE-2013-6889.patch \ diff --git a/gnu/packages/patches/ruby-puma-ignore-broken-test.patch b/gnu/packages/patches/ruby-puma-ignore-broken-test.patch new file mode 100644 index 0000000000..fb653dc0ee --- /dev/null +++ b/gnu/packages/patches/ruby-puma-ignore-broken-test.patch @@ -0,0 +1,13 @@ +diff --git a/test/test_integration.rb b/test/test_integration.rb +index d9b189c..6e21180 100644 +--- a/test/test_integration.rb ++++ b/test/test_integration.rb +@@ -115,7 +115,7 @@ class TestIntegration < Test::Unit::TestCase + assert_kind_of Thread, t.join(1), "server didn't stop" + end + +- def test_phased_restart_via_pumactl ++ def no_test_phased_restart_via_pumactl + if Puma.jruby? || Puma.windows? + assert true + return diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 2f4348a8bc..877f229fe1 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -3939,6 +3939,47 @@ part of the Prawn PDF generator.") ;; for details." (license (list license:gpl2 license:gpl3 license:ruby)))) +(define-public ruby-puma + (package + (name "ruby-puma") + (version "3.4.0") + (source + (origin + (method url-fetch) + ;; Fetch from GitHub because distributed gem does not contain tests. + (uri (string-append "https://github.com/puma/puma/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "10svyj2jk949y1dmkxyzipk1ddzl4iz9limrcws1zhpganpvq3j8")) + ;; Ignore broken test reported upstream. + ;; https://github.com/puma/puma/issues/995 + (patches (search-patches "ruby-puma-ignore-broken-test.patch")))) + (build-system ruby-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'build 'fix-gemspec + (lambda _ + (substitute* "puma.gemspec" + (("git ls-files") "find * |sort")) + #t))))) + (native-inputs + `(("ruby-hoe" ,ruby-hoe) + ("ruby-rake-compiler" ,ruby-rake-compiler) + ("ruby-hoe-git" ,ruby-hoe-git) + ("ruby-rack" ,ruby-rack))) + (synopsis "Simple, concurrent HTTP server for Ruby/Rack") + (description + "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server +for Ruby/Rack applications. Puma is intended for use in both development and +production environments. In order to get the best throughput, it is highly +recommended that you use a Ruby implementation with real threads like Rubinius +or JRuby.") + (home-page "http://puma.io") + (license license:expat))) + (define-public ruby-hoe-git (package (name "ruby-hoe-git") -- cgit v1.2.3 From a837997cab842026bde1d5c0fac3a2d5258fe06f Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Tue, 21 Jun 2016 18:51:02 +0200 Subject: gnu: nasm: Make build bit-reproducible. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/patches/nasm-no-ps-pdf.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/assembly.scm (nasm): Use it. Remove ghostscript, do not build PS or PDF docs. Makes build bit-reproducible. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/assembly.scm | 9 ++++----- gnu/packages/patches/nasm-no-ps-pdf.patch | 20 ++++++++++++++++++++ 3 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 gnu/packages/patches/nasm-no-ps-pdf.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 1ef7ef0833..f8d661e9b9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -670,6 +670,7 @@ dist_patch_DATA = \ %D%/packages/patches/mumps-build-parallelism.patch \ %D%/packages/patches/mupen64plus-ui-console-notice.patch \ %D%/packages/patches/mutt-store-references.patch \ + %D%/packages/patches/nasm-no-ps-pdf.patch \ %D%/packages/patches/net-tools-bitrot.patch \ %D%/packages/patches/netcdf-config-date.patch \ %D%/packages/patches/ngircd-handle-zombies.patch \ diff --git a/gnu/packages/assembly.scm b/gnu/packages/assembly.scm index 575856a13e..8c9b6b30fe 100644 --- a/gnu/packages/assembly.scm +++ b/gnu/packages/assembly.scm @@ -23,7 +23,7 @@ #:use-module (guix download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) - #:use-module (gnu packages ghostscript) + #:use-module (gnu packages) #:use-module (gnu packages perl) #:use-module (gnu packages texinfo) #:use-module (gnu packages python) @@ -39,17 +39,16 @@ version "/" name "-" version ".tar.xz")) (sha256 (base32 - "12bl6vc5sjp9nnhf0iwy6l27vq783y0rxrjpp8sy84h5cb7a3fwx")))) + "12bl6vc5sjp9nnhf0iwy6l27vq783y0rxrjpp8sy84h5cb7a3fwx")) + (patches (search-patches "nasm-no-ps-pdf.patch")))) (build-system gnu-build-system) - (native-inputs `(("ghostscript" ,ghostscript) ; ps2pdf - ("perl" ,perl) ;for test target + (native-inputs `(("perl" ,perl) ;for doc and test target ("texinfo" ,texinfo))) (arguments `(#:test-target "test" #:phases (modify-phases %standard-phases (add-after 'install 'install-info (lambda _ - ;; FIXME: The PDF and PS files are not reproducible. (zero? (system* "make" "install_doc"))))))) (home-page "http://www.nasm.us/") (synopsis "80x86 and x86-64 assembler") diff --git a/gnu/packages/patches/nasm-no-ps-pdf.patch b/gnu/packages/patches/nasm-no-ps-pdf.patch new file mode 100644 index 0000000000..b03b57a6ed --- /dev/null +++ b/gnu/packages/patches/nasm-no-ps-pdf.patch @@ -0,0 +1,20 @@ +Avoid building PS and PDF docs, which do not build bit-reproducible. NASM +already installs doc in info and html. + +--- nasm-2.12.01/doc/Makefile.in.orig 2016-06-21 18:02:59.483484829 +0200 ++++ nasm-2.12.01/doc/Makefile.in 2016-06-21 18:03:46.700151410 +0200 +@@ -27,7 +27,7 @@ + PS2PDF = @PS2PDF@ # Part of GhostScript + + SRCS = nasmdoc.src inslist.src changes.src +-OUT = info html nasmdoc.txt nasmdoc.ps nasmdoc.pdf ++OUT = info html nasmdoc.txt + + # exports + export srcdir +@@ -100,4 +100,4 @@ + $(INSTALL_DATA) info/* $(INSTALLROOT)$(infodir) + mkdir -p $(INSTALLROOT)$(docdir)/html + $(INSTALL_DATA) html/* $(INSTALLROOT)$(docdir)/html +- $(INSTALL_DATA) nasmdoc.ps nasmdoc.pdf nasmdoc.txt $(INSTALLROOT)$(docdir) ++ $(INSTALL_DATA) nasmdoc.txt $(INSTALLROOT)$(docdir) -- cgit v1.2.3 From 88c8d72f3ce75e77df47dc8daaf351b1792f68e0 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 22 Jun 2016 01:52:21 -0400 Subject: gnu: beets: Update to 1.3.18. * gnu/packages/patches/beets-image-test-failure.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/music.scm (beets): Update to 1.3.18. [source]: Use patch. --- gnu/local.mk | 1 + gnu/packages/music.scm | 10 +++-- .../patches/beets-image-test-failure.patch | 46 ++++++++++++++++++++++ 3 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/beets-image-test-failure.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f8d661e9b9..58f66ec878 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -442,6 +442,7 @@ dist_patch_DATA = \ %D%/packages/patches/avrdude-fix-libusb.patch \ %D%/packages/patches/awesome-reproducible-png.patch \ %D%/packages/patches/bash-completion-directories.patch \ + %D%/packages/patches/beets-image-test-failure.patch \ %D%/packages/patches/bigloo-gc-shebangs.patch \ %D%/packages/patches/binutils-ld-new-dtags.patch \ %D%/packages/patches/binutils-loongson-workaround.patch \ diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index 70757149f1..eb8bce0f6c 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -1474,13 +1474,17 @@ websites such as Libre.fm.") (define-public beets (package (name "beets") - (version "1.3.17") + (version "1.3.18") (source (origin (method url-fetch) - (uri (pypi-uri name version)) + (uri (string-append + "https://pypi.python.org/packages/" + "14/6f/c9c79c5339ab3ecced265ca18adbf5bae3d4058bae737b6164d738fb4d2c/" + name "-" version ".tar.gz")) + (patches (search-patches "beets-image-test-failure.patch")) (sha256 (base32 - "0yg7sp18sdpszkinhb0bi6yinbn316jy1baxrwiw0m4byrj3rr6c")))) + "09pgyywa5llbc36y0lrr21ywgsp8m2zx6p8ncf8hxik28knd5kld")))) (build-system python-build-system) (arguments `(#:python ,python-2 ; only Python 2 is supported diff --git a/gnu/packages/patches/beets-image-test-failure.patch b/gnu/packages/patches/beets-image-test-failure.patch new file mode 100644 index 0000000000..360d7d3ed4 --- /dev/null +++ b/gnu/packages/patches/beets-image-test-failure.patch @@ -0,0 +1,46 @@ +Fix test failure due to missing image library backend. + +Cherry-picked from upstream: +https://github.com/beetbox/beets/commit/07c95a1bf16bf86c640436208dda828cc7df0181 + +From 07c95a1bf16bf86c640436208dda828cc7df0181 Mon Sep 17 00:00:00 2001 +From: Adrian Sampson +Date: Thu, 2 Jun 2016 11:39:05 -0700 +Subject: [PATCH] Require an imaging backend for fuzzy ratio tests + +These fail outright if we don't have a way to get image sizes (e.g., +ImageMagick). +--- + test/test_art.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/test/test_art.py b/test/test_art.py +index 02d26f4..1b12b76 100644 +--- a/test/test_art.py ++++ b/test/test_art.py +@@ -561,21 +561,25 @@ def test_respect_enforce_ratio_no(self): + self._assertImageIsValidArt(self.IMG_500x490, True) + + def test_respect_enforce_ratio_px_above(self): ++ self._require_backend() + self.plugin.enforce_ratio = True + self.plugin.margin_px = 5 + self._assertImageIsValidArt(self.IMG_500x490, False) + + def test_respect_enforce_ratio_px_below(self): ++ self._require_backend() + self.plugin.enforce_ratio = True + self.plugin.margin_px = 15 + self._assertImageIsValidArt(self.IMG_500x490, True) + + def test_respect_enforce_ratio_percent_above(self): ++ self._require_backend() + self.plugin.enforce_ratio = True + self.plugin.margin_percent = (500 - 490) / 500 * 0.5 + self._assertImageIsValidArt(self.IMG_500x490, False) + + def test_respect_enforce_ratio_percent_below(self): ++ self._require_backend() + self.plugin.enforce_ratio = True + self.plugin.margin_percent = (500 - 490) / 500 * 1.5 + self._assertImageIsValidArt(self.IMG_500x490, True) -- cgit v1.2.3 From c283b22e93cbf496e13b25878be3ec8a1242fb73 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Tue, 21 Jun 2016 16:29:40 +0300 Subject: gnu: lightning: Move to (gnu packages assembly). * gnu/packages/lightning.scm: Remove. Move 'lightning' to... * gnu/packages/assembly.scm (lightning): ... here. New variable. * gnu/local.mk (GNU_SYSTEM_MODULES): Adjust accordingly. --- gnu/local.mk | 1 - gnu/packages/assembly.scm | 22 ++++++++++++++++++++++ gnu/packages/lightning.scm | 44 -------------------------------------------- 3 files changed, 22 insertions(+), 45 deletions(-) delete mode 100644 gnu/packages/lightning.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 58f66ec878..ab0cf49b24 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -206,7 +206,6 @@ GNU_SYSTEM_MODULES = \ %D%/packages/libusb.scm \ %D%/packages/libunwind.scm \ %D%/packages/libupnp.scm \ - %D%/packages/lightning.scm \ %D%/packages/links.scm \ %D%/packages/linux.scm \ %D%/packages/lirc.scm \ diff --git a/gnu/packages/assembly.scm b/gnu/packages/assembly.scm index 8c9b6b30fe..c80b8af329 100644 --- a/gnu/packages/assembly.scm +++ b/gnu/packages/assembly.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 Jan Nieuwenhuizen +;;; Copyright © 2013, 2015 Ludovic Courtès ;;; Copyright © 2013 Andreas Enge ;;; Copyright © 2016 Efraim Flashner ;;; @@ -90,3 +91,24 @@ Mach-O, RDOFF2, COFF, Win32, and Win64 object formats, and generates source debugging information in STABS, DWARF 2, and CodeView 8 formats.") (license (license:non-copyleft "file://COPYING" "See COPYING in the distribution.")))) + +(define-public lightning + (package + (name "lightning") + (version "2.1.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/lightning/lightning-" + version ".tar.gz")) + (sha256 + (base32 + "19j9nwl88k660045s40cbz5zrl1wpd2mcxnnc8qqnnaj311a58qz")))) + (build-system gnu-build-system) + (synopsis "Library for generating assembly code at runtime") + (description + "GNU Lightning is a library that generates assembly language code at +run-time. Thus, it is useful in creating Just-In-Time compilers. It +abstracts over the target CPU by exposing a standardized RISC instruction set +to the clients.") + (home-page "http://www.gnu.org/software/lightning/") + (license gpl3+))) diff --git a/gnu/packages/lightning.scm b/gnu/packages/lightning.scm deleted file mode 100644 index 7dacb8f4cd..0000000000 --- a/gnu/packages/lightning.scm +++ /dev/null @@ -1,44 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013 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 lightning) - #:use-module (guix packages) - #:use-module (guix download) - #:use-module (guix build-system gnu) - #:use-module (guix licenses)) - -(define-public lightning - (package - (name "lightning") - (version "2.1.0") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/lightning/lightning-" - version ".tar.gz")) - (sha256 - (base32 - "19j9nwl88k660045s40cbz5zrl1wpd2mcxnnc8qqnnaj311a58qz")))) - (build-system gnu-build-system) - (synopsis "Library for generating assembly code at runtime") - (description - "GNU Lightning is a library that generates assembly language code at -run-time. Thus, it is useful in creating Just-In-Time compilers. It -abstracts over the target CPU by exposing a standardized RISC instruction set -to the clients.") - (home-page "http://www.gnu.org/software/lightning/") - (license gpl3+))) -- cgit v1.2.3 From c311089b0b19f094e44d3f858c29f77d757332d1 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 22 Jun 2016 22:36:40 +0200 Subject: services: Add 'mcron-service'. * gnu/services/mcron.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/tests/base.scm (%mcron-os, %test-mcron): New variables. (run-mcron-test): New procedure. * doc/guix.texi (Scheduled Job Execution): New node. --- doc/guix.texi | 78 +++++++++++++++++++++++++++++++++ gnu/local.mk | 1 + gnu/services/mcron.scm | 115 +++++++++++++++++++++++++++++++++++++++++++++++++ gnu/tests/base.scm | 106 ++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 299 insertions(+), 1 deletion(-) create mode 100644 gnu/services/mcron.scm (limited to 'gnu/local.mk') diff --git a/doc/guix.texi b/doc/guix.texi index 0bb68bb477..7516d75b8d 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -204,6 +204,7 @@ System Configuration Services * Base Services:: Essential system services. +* Scheduled Job Execution:: The mcron service. * Networking Services:: Network setup, SSH daemon, etc. * X Window:: Graphical display. * Desktop Services:: D-Bus and desktop services. @@ -7185,6 +7186,7 @@ declaration. @menu * Base Services:: Essential system services. +* Scheduled Job Execution:: The mcron service. * Networking Services:: Network setup, SSH daemon, etc. * X Window:: Graphical display. * Desktop Services:: D-Bus and desktop services. @@ -7463,6 +7465,82 @@ archive}). If that is not the case, the service will fail to start. @end deffn +@node Scheduled Job Execution +@subsubsection Scheduled Job Execution + +@cindex cron +@cindex scheduling jobs +The @code{(gnu services mcron)} module provides an interface to +GNU@tie{}mcron, a daemon to run jobs at scheduled times (@pxref{Top,,, +mcron, GNU@tie{}mcron}). GNU@tie{}mcron is similar to the traditional +Unix @command{cron} daemon; the main difference is that it is +implemented in Guile Scheme, which provides a lot of flexibility when +specifying the scheduling of jobs and their actions. + +For example, to define an operating system that runs the +@command{updatedb} (@pxref{Invoking updatedb,,, find, Finding Files}) +and the @command{guix gc} commands (@pxref{Invoking guix gc}) daily: + +@lisp +(use-modules (guix) (gnu) (gnu services mcron)) + +(define updatedb-job + ;; Run 'updatedb' at 3 AM every day. + #~(job '(next-hour '(3)) + "updatedb --prunepaths='/tmp /var/tmp /gnu/store'")) + +(define garbage-collector-job + ;; Collect garbage 5 minutes after midnight every day. + #~(job "5 0 * * *" ;Vixie cron syntax + "guix gc -F 1G")) + +(operating-system + ;; @dots{} + (services (cons (mcron-service (list garbage-collector-job + updatedb-job)) + %base-services))) +@end lisp + +@xref{Guile Syntax, mcron job specifications,, mcron, GNU@tie{}mcron}, +for more information on mcron job specifications. Below is the +reference of the mcron service. + +@deffn {Scheme Procedure} mcron-service @var{jobs} [#:mcron @var{mcron2}] +Return an mcron service running @var{mcron} that schedules @var{jobs}, a +list of gexps denoting mcron job specifications. + +This is a shorthand for: +@example + (service mcron-service-type + (mcron-configuration (mcron mcron) (jobs jobs))) +@end example +@end deffn + +@defvr {Scheme Variable} mcron-service-type +This is the type of the @code{mcron} service, whose value is an +@code{mcron-configuration} object. + +This service type can be the target of a service extension that provides +it additional job specifications (@pxref{Service Composition}). In +other words, it is possible to define services that provide addition +mcron jobs to run. +@end defvr + +@deftp {Data Type} mcron-configuration +Data type representing the configuration of mcron. + +@table @asis +@item @code{mcron} (default: @var{mcron2}) +The mcron package to use. + +@item @code{jobs} +This is a list of gexps (@pxref{G-Expressions}), where each gexp +corresponds to an mcron job specification (@pxref{Syntax, mcron job +specifications,, mcron, GNU@tie{}mcron}). +@end table +@end deftp + + @node Networking Services @subsubsection Networking Services diff --git a/gnu/local.mk b/gnu/local.mk index ab0cf49b24..3e0082b8fa 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -377,6 +377,7 @@ GNU_SYSTEM_MODULES = \ %D%/services/dict.scm \ %D%/services/lirc.scm \ %D%/services/mail.scm \ + %D%/services/mcron.scm \ %D%/services/networking.scm \ %D%/services/shepherd.scm \ %D%/services/herd.scm \ diff --git a/gnu/services/mcron.scm b/gnu/services/mcron.scm new file mode 100644 index 0000000000..313c8364f8 --- /dev/null +++ b/gnu/services/mcron.scm @@ -0,0 +1,115 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2016 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 services mcron) + #:use-module (gnu services) + #:use-module (gnu services base) + #:use-module (gnu services shepherd) + #:autoload (gnu packages guile) (mcron2) + #:use-module (guix records) + #:use-module (guix gexp) + #:use-module (srfi srfi-1) + #:use-module (ice-9 match) + #:use-module (ice-9 vlist) + #:export (mcron-configuration + mcron-configuration? + mcron-configuration-mcron + mcron-configuration-jobs + + mcron-service-type + mcron-service)) + +;;; Commentary: +;;; +;;; This module implements a service that to run instances of GNU mcron, a +;;; periodic job execution daemon. Example of a service: +;; +;; (service mcron-service-type +;; (mcron-configuration +;; (jobs (list #~(job next-second-from +;; (lambda () +;; (call-with-output-file "/dev/console" +;; (lambda (port) +;; (display "hello!\n" port))))))))) +;;; +;;; Code: + +(define-record-type* mcron-configuration + make-mcron-configuration + mcron-configuration? + (mcron mcron-configuration-mcron ;package + (default mcron2)) + (jobs mcron-configuration-jobs ;list of + (default '()))) + +(define (job-file job) + (scheme-file "mcron-job" job)) + +(define mcron-shepherd-services + (match-lambda + (($ mcron ()) ;nothing to do! + '()) + (($ mcron jobs) + (list (shepherd-service + (provision '(mcron)) + (requirement '(user-processes)) + (modules `((srfi srfi-1) + (srfi srfi-26) + ,@%default-modules)) + (start #~(make-forkexec-constructor + (list (string-append #$mcron "/bin/mcron") + #$@(map job-file jobs)) + + ;; Disable auto-compilation of the job files and set a + ;; sane value for 'PATH'. + #:environment-variables + (cons* "GUILE_AUTO_COMPILE=0" + "PATH=/run/current-system/profile/bin" + (remove (cut string-prefix? "PATH=" <>) + (environ))))) + (stop #~(make-kill-destructor))))))) + +(define mcron-service-type + (service-type (name 'mcron) + (extensions + (list (service-extension shepherd-root-service-type + mcron-shepherd-services) + (service-extension profile-service-type + (compose list + mcron-configuration-mcron)))) + (compose concatenate) + (extend (lambda (config jobs) + (mcron-configuration + (inherit config) + (jobs (append (mcron-configuration-jobs config) + jobs))))))) + +(define* (mcron-service jobs #:optional (mcron mcron2)) + "Return an mcron service running @var{mcron} that schedules @var{jobs}, a +list of gexps denoting mcron job specifications. + +This is a shorthand for: +@example + (service mcron-service-type + (mcron-configuration (mcron mcron) (jobs jobs))) +@end example +" + (service mcron-service-type + (mcron-configuration (mcron mcron) (jobs jobs)))) + +;;; mcron.scm ends here diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm index 3dfa28f7f5..8b1fefe9f8 100644 --- a/gnu/tests/base.scm +++ b/gnu/tests/base.scm @@ -24,6 +24,7 @@ #:use-module (gnu system shadow) #:use-module (gnu system vm) #:use-module (gnu services) + #:use-module (gnu services mcron) #:use-module (gnu services shepherd) #:use-module (guix gexp) #:use-module (guix store) @@ -31,7 +32,8 @@ #:use-module (guix packages) #:use-module (srfi srfi-1) #:export (run-basic-test - %test-basic-os)) + %test-basic-os + %test-mcron)) (define %simple-os (operating-system @@ -178,3 +180,105 @@ functionality tests.") ;; 'system-qemu-image/shared-store-script'. (run-basic-test (virtualized-operating-system os '()) #~(list #$run)))))) + + +;;; +;;; Mcron. +;;; + +(define %mcron-os + ;; System with an mcron service, with one mcron job for "root" and one mcron + ;; job for an unprivileged user (note: #:user is an 'mcron2' thing.) + (let ((job1 #~(job next-second-from + (lambda () + (call-with-output-file "witness" + (lambda (port) + (display (list (getuid) (getgid)) port)))))) + (job2 #~(job next-second-from + (lambda () + (call-with-output-file "witness" + (lambda (port) + (display (list (getuid) (getgid)) port)))) + #:user "alice")) + (job3 #~(job next-second-from ;to test $PATH + "touch witness-touch"))) + (operating-system + (inherit %simple-os) + (services (cons (mcron-service (list job1 job2 job3)) + (operating-system-user-services %simple-os)))))) + +(define (run-mcron-test name) + (mlet* %store-monad ((os -> (marionette-operating-system + %mcron-os + #:imported-modules '((gnu services herd) + (guix combinators)))) + (command (system-qemu-image/shared-store-script + os #:graphic? #f))) + (define test + #~(begin + (use-modules (gnu build marionette) + (srfi srfi-64) + (ice-9 match)) + + (define marionette + (make-marionette (list #$command))) + + (define (wait-for-file file) + ;; Wait until FILE exists in the guest; 'read' its content and + ;; return it. + (marionette-eval + `(let loop ((i 10)) + (cond ((file-exists? ,file) + (call-with-input-file ,file read)) + ((> i 0) + (sleep 1) + (loop (- i 1))) + (else + (error "file didn't show up" ,file)))) + marionette)) + + (mkdir #$output) + (chdir #$output) + + (test-begin "mcron") + + (test-eq "service running" + 'running! + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (start-service 'mcron) + 'running!) + marionette)) + + ;; Make sure root's mcron job runs, has its cwd set to "/root", and + ;; runs with the right UID/GID. + (test-equal "root's job" + '(0 0) + (wait-for-file "/root/witness")) + + ;; Likewise for Alice's job. We cannot know what its GID is since + ;; it's chosen by 'groupadd', but it's strictly positive. + (test-assert "alice's job" + (match (wait-for-file "/home/alice/witness") + ((1000 gid) + (>= gid 100)))) + + ;; Last, the job that uses a command; allows us to test whether + ;; $PATH is sane. (Note that 'marionette-eval' stringifies objects + ;; that don't have a read syntax, hence the string.) + (test-equal "root's job with command" + "#" + (wait-for-file "/root/witness-touch")) + + (test-end) + (exit (= (test-runner-fail-count (test-runner-current)) 0)))) + + (gexp->derivation name test + #:modules '((gnu build marionette))))) + +(define %test-mcron + (system-test + (name "mcron") + (description "Make sure the mcron service works as advertised.") + (value (run-mcron-test name)))) -- cgit v1.2.3 From 3c6e42b3bc30371a333098e097efa033bbfd3afb Mon Sep 17 00:00:00 2001 From: Steve Sprang Date: Sat, 6 Feb 2016 12:40:53 -0800 Subject: gnu: Add erlang. * gnu/packages/erlang.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. Co-authored by: Leo Famulari Co-authored by: Pjotr Prins --- gnu/local.mk | 1 + gnu/packages/erlang.scm | 179 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 180 insertions(+) create mode 100644 gnu/packages/erlang.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 3e0082b8fa..956be9b4b5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -109,6 +109,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/engineering.scm \ %D%/packages/enlightenment.scm \ %D%/packages/entr.scm \ + %D%/packages/erlang.scm \ %D%/packages/fcitx.scm \ %D%/packages/feh.scm \ %D%/packages/figlet.scm \ diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm new file mode 100644 index 0000000000..39da7e939b --- /dev/null +++ b/gnu/packages/erlang.scm @@ -0,0 +1,179 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2016 Steve Sprang +;;; Copyright © 2016 Leo Famulari +;;; Copyright © 2016 Pjotr Prins +;;; +;;; 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 erlang) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build-system gnu) + #:use-module (guix download) + #:use-module (guix packages) + #:use-module (gnu packages autotools) + #:use-module (gnu packages fontutils) + #:use-module (gnu packages gl) + #:use-module (gnu packages ncurses) + #:use-module (gnu packages perl) + #:use-module (gnu packages tls) + #:use-module (gnu packages wxwidgets)) + +(define-public erlang + (package + (name "erlang") + ;; When updating, remember to update the hash of erlang-manpages! + (version "19.0") + (source (origin + (method url-fetch) + ;; The tarball from http://erlang.org/download contains many + ;; pre-compiled files, so we use this snapshot of the source + ;; repository. + (uri (string-append "https://github.com/erlang/otp/archive/OTP-" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1dxyz6x1yfv33fd0xfry2ihylkyfa2d655q1vxvbz8dflyd64yqh")))) + (build-system gnu-build-system) + (native-inputs + `(("perl" ,perl) + ("autoconf" ,autoconf) + ("automake" ,automake) + + ;; Erlang's documentation is distributed in a separate tarball. + ("erlang-manpages" + ,(origin + (method url-fetch) + (uri (string-append "http://erlang.org/download/otp_doc_man_" + version ".tar.gz")) + (sha256 + (base32 + "07j0l7ary936hil38xr3hvfw6j74pshkyyi98kc9cassbbcdd8y7")))))) + (inputs + `(("ncurses" ,ncurses) + ("openssl" ,openssl) + ("wxwidgets" ,wxwidgets))) + (propagated-inputs + `(("fontconfig" ,fontconfig) + ("glu" ,glu) + ("mesa" ,mesa))) + (arguments + `(#:test-target "release_tests" + #:configure-flags + (list "--disable-saved-compile-time" + "--enable-dynamic-ssl-lib" + "--enable-native-libs" + "--enable-shared-zlib" + "--enable-smp-support" + "--enable-threads" + "--enable-wx" + (string-append "--with-ssl=" (assoc-ref %build-inputs "openssl"))) + #:modules ((srfi srfi-19) ; make-time, et cetera. + (guix build utils) + (guix build gnu-build-system)) + #:phases + (modify-phases %standard-phases + ;; The are several code fragments that embed timestamps into the + ;; output. Here, we alter those fragments to use the value of + ;; SOURCE_DATE_EPOCH instead. + (add-after 'unpack 'remove-timestamps + (lambda _ + (let ((source-date-epoch + (time-utc->date + (make-time time-utc 0 (string->number + (getenv "SOURCE_DATE_EPOCH")))))) + (substitute* "lib/reltool/src/reltool_target.erl" + (("Date = date\\(\\),") + (string-append "Date = " + (date->string source-date-epoch + "'{~Y,~m,~d}',")))) + (substitute* "lib/reltool/src/reltool_target.erl" + (("Time = time\\(\\),") + (string-append "Time = " + (date->string source-date-epoch + "'{~H,~M,~S}',")))) + (substitute* '("lib/reltool/src/reltool_target.erl" + "lib/sasl/src/systools_make.erl") + (("date\\(\\), time\\(\\),") + (date->string source-date-epoch + "{~Y,~m,~d}, {~H,~M,~S},"))) + (substitute* '("lib/dialyzer/test/small_SUITE_data/src/gs_make.erl" + "lib/gs/src/gs_make.erl") + (("tuple_to_list\\(date\\(\\)\\),tuple_to_list\\(time\\(\\)\\)") + (date->string + source-date-epoch + "tuple_to_list({~Y,~m,~d}), tuple_to_list({~H,~M,~S})"))) + (substitute* "lib/snmp/src/compile/snmpc_mib_to_hrl.erl" + (("\\{Y,Mo,D\\} = date\\(\\),") + (date->string source-date-epoch + "{Y,Mo,D} = {~Y,~m,~d},"))) + (substitute* "lib/snmp/src/compile/snmpc_mib_to_hrl.erl" + (("\\{H,Mi,S\\} = time\\(\\),") + (date->string source-date-epoch + "{H,Mi,S} = {~H,~M,~S},")))))) + (add-after 'patch-source-shebangs 'patch-source-env + (lambda _ + (let ((escripts + (append + (find-files "." "\\.escript") + (find-files "lib/stdlib/test/escript_SUITE_data/") + '("erts/lib_src/utils/make_atomics_api" + "erts/preloaded/src/add_abstract_code" + "lib/diameter/bin/diameterc" + "lib/reltool/examples/display_args" + "lib/reltool/examples/mnesia_core_dump_viewer" + "lib/snmp/src/compile/snmpc.src" + "make/verify_runtime_dependencies" + "make/emd2exml.in")))) + (substitute* escripts + (("/usr/bin/env") (which "env")))))) + (add-before 'configure 'set-erl-top + (lambda _ + (setenv "ERL_TOP" (getcwd)))) + (add-before 'configure 'autoconf + (lambda _ (zero? (system* "./otp_build" "autoconf")))) + (add-after 'install 'patch-erl + ;; This only works after install. + (lambda _ + (substitute* (string-append (assoc-ref %outputs "out") "/bin/erl") + (("sed") (which "sed"))))) + (add-after 'install 'install-doc + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (manpages (assoc-ref inputs "erlang-manpages")) + (share (string-append out "/share/"))) + (mkdir-p share) + (mkdir-p (string-append share "/misc/erlang")) + (with-directory-excursion share + (and + (zero? (system* "tar" "xvf" manpages)) + (rename-file "COPYRIGHT" + (string-append share "/misc/erlang/COPYRIGHT")) + ;; Delete superfluous files. + (for-each delete-file '("PR.template" + "README")))))))))) + (home-page "http://erlang.org/") + (synopsis "The Erlang programming language") + (description + "Erlang is a programming language used to build massively +scalable soft real-time systems with requirements on high +availability. Some of its uses are in telecoms, banking, e-commerce, +computer telephony and instant messaging. Erlang's runtime system has +built-in support for concurrency, distribution and fault tolerance.") + ;; Erlang is distributed under the Apache License 2.0, but some components + ;; have other licenses. See 'system/COPYRIGHT' in the source distribution. + (license (list license:asl2.0 license:bsd-2 license:bsd-3 license:expat + license:lgpl2.0+ license:tcl/tk license:zlib)))) -- cgit v1.2.3 From 94ff31572d37e9e49813b2e1fddd323cde0103e4 Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Wed, 15 Jun 2016 12:21:20 +1000 Subject: gnu: Add khmer. * gnu/packages/bioinformatics.scm (khmer): New variable. * gnu/packages/patches/khmer-use-libraries.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/bioinformatics.scm | 78 ++++++++++++++++++++++++++ gnu/packages/patches/khmer-use-libraries.patch | 16 ++++++ 3 files changed, 95 insertions(+) create mode 100644 gnu/packages/patches/khmer-use-libraries.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 956be9b4b5..f6aa2564a3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -593,6 +593,7 @@ dist_patch_DATA = \ %D%/packages/patches/jasper-CVE-2016-2089.patch \ %D%/packages/patches/jasper-CVE-2016-2116.patch \ %D%/packages/patches/jbig2dec-ignore-testtest.patch \ + %D%/packages/patches/khmer-use-libraries.patch \ %D%/packages/patches/kmod-module-directory.patch \ %D%/packages/patches/ldc-disable-tests.patch \ %D%/packages/patches/lftp-dont-save-unknown-host-fingerprint.patch \ diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 22eba0f6a3..b34e7ba357 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -2301,6 +2301,84 @@ command, or queried for specific k-mers with @code{jellyfish query}.") ;; files such as lib/jsoncpp.cpp are released under the Expat license. (license (list license:gpl3+ license:expat)))) +(define-public khmer + (package + (name "khmer") + (version "2.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "khmer" version)) + (sha256 + (base32 + "0wb05shqh77v00256qlm68vbbx3kl76fyzihszbz5nhanl4ni33a")) + (patches (search-patches "khmer-use-libraries.patch")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'set-paths + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Delete bundled libraries. + (delete-file-recursively "third-party/zlib") + (delete-file-recursively "third-party/bzip2") + ;; Replace bundled seqan. + (let* ((seqan-all "third-party/seqan") + (seqan-include (string-append + seqan-all "/core/include"))) + (delete-file-recursively seqan-all) + (copy-recursively (string-append (assoc-ref inputs "seqan") + "/include/seqan") + (string-append seqan-include "/seqan"))) + ;; We do not replace the bundled MurmurHash as the canonical + ;; repository for this code 'SMHasher' is unsuitable for + ;; providing a library. See + ;; https://lists.gnu.org/archive/html/guix-devel/2016-06/msg00977.html + #t)) + (add-after 'unpack 'set-cc + (lambda _ + (setenv "CC" "gcc") + #t)) + ;; It is simpler to test after installation. + (delete 'check) + (add-after 'install 'post-install-check + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (setenv "PATH" + (string-append + (getenv "PATH") + ":" + (assoc-ref outputs "out") + "/bin")) + (setenv "PYTHONPATH" + (string-append + (getenv "PYTHONPATH") + ":" + out + "/lib/python" + (string-take (string-take-right + (assoc-ref inputs "python") 5) 3) + "/site-packages")) + (with-directory-excursion "build" + (zero? (system* "nosetests" "khmer" "--attr" + "!known_failing"))))))))) + (native-inputs + `(("seqan" ,seqan) + ("python-nose" ,python-nose))) + (inputs + `(("zlib" ,zlib) + ("bzip2" ,bzip2) + ("python-screed" ,python-screed) + ("python-bz2file" ,python-bz2file))) + (home-page "https://khmer.readthedocs.org/") + (synopsis "K-mer counting, filtering and graph traversal library") + (description "The khmer software is a set of command-line tools for +working with DNA shotgun sequencing data from genomes, transcriptomes, +metagenomes and single cells. Khmer can make de novo assemblies faster, and +sometimes better. Khmer can also identify and fix problems with shotgun +data.") + (license license:bsd-3))) + (define-public macs (package (name "macs") diff --git a/gnu/packages/patches/khmer-use-libraries.patch b/gnu/packages/patches/khmer-use-libraries.patch new file mode 100644 index 0000000000..47d163a99a --- /dev/null +++ b/gnu/packages/patches/khmer-use-libraries.patch @@ -0,0 +1,16 @@ +Change setup.cfg so that the bundled zlib and bzip2 are not used. This cannot +currently be achieved using "--library z,bz2" as instructed in the setup.py. + +diff --git a/setup.cfg b/setup.cfg +index c054092..080992e 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -1,7 +1,7 @@ + [build_ext] + define = SEQAN_HAS_BZIP2,SEQAN_HAS_ZLIB + undef = NO_UNIQUE_RC +-# libraries = z,bz2 ++libraries = z,bz2 + ## if using system libraries + include-dirs = lib:third-party/zlib:third-party/bzip2:third-party/seqan/core/include:third-party/smhasher + # include-dirs = lib -- cgit v1.2.3 From 7a2941a83ee8ecac9ca7a3a076b1231805b39bbd Mon Sep 17 00:00:00 2001 From: Matthew Jordan Date: Thu, 26 May 2016 08:57:16 -0400 Subject: gnu: Add Go 1.4. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/local.mk: Modified file. * gnu/packages/golang.scm: New file. Co-authored-by: Efraim Flashner Co-authored-by: Andy Wingo Co-authored-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/golang.scm | 185 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 186 insertions(+) create mode 100644 gnu/packages/golang.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f6aa2564a3..fa6c277be1 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -150,6 +150,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/gnustep.scm \ %D%/packages/gnuzilla.scm \ %D%/packages/gnu-pw-mgr.scm \ + %D%/packages/golang.scm \ %D%/packages/gperf.scm \ %D%/packages/gprolog.scm \ %D%/packages/gps.scm \ diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm new file mode 100644 index 0000000000..cc1b66f0ae --- /dev/null +++ b/gnu/packages/golang.scm @@ -0,0 +1,185 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2016 Efraim Flashner +;;; Copyright © 2016 Matthew Jordan +;;; Copyright © 2016 Andy Wingo +;;; +;;; This file is an addendum 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 golang) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix utils) + #:use-module (guix download) + #:use-module (guix packages) + #:use-module (guix build-system gnu) + #:use-module (gnu packages admin) + #:use-module (gnu packages gcc) + #:use-module (gnu packages base) + #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages pcre) + #:use-module (ice-9 match) + #:use-module (srfi srfi-1)) + +;; According to https://golang.org/doc/install/gccgo, gccgo-4.8.2 includes a +;; complete go-1.1.2 implementation, gccgo-4.9 includes a complete go-1.2 +;; implementation, and gccgo-5 a complete implementation of go-1.4. Ultimately +;; we hope to build go-1.5+ with a bootstrap process using gccgo-5. As of +;; go-1.5, go cannot be bootstrapped without go-1.4, so we need to use go-1.4 or +;; gccgo-5. Mips is not officially supported, but it should work if it is +;; bootstrapped. + +(define-public go-1.4 + (package + (name "go") + (version "1.4.3") + (source (origin + (method url-fetch) + (uri (string-append "https://storage.googleapis.com/golang/" + name version ".src.tar.gz")) + (sha256 + (base32 + "0na9yqilzpvq0bjndbibfp07wr796gf252y471cip10bbdqgqiwr")))) + (build-system gnu-build-system) + (outputs '("out" + "doc" + "tests")) + (arguments + `(#:modules ((ice-9 match) + (guix build gnu-build-system) + (guix build utils)) + #:tests? #f ; Tests are run by the all.bash script. + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'patch-generated-file-shebangs 'chdir + (lambda _ + (chdir "src"))) + (add-before 'build 'prebuild + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib")) + (ld (string-append (assoc-ref inputs "libc") "/lib")) + (loader (car (find-files ld "^ld-linux.+"))) + (net-base (assoc-ref inputs "net-base")) + (tzdata-path + (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo")) + (output (assoc-ref outputs "out"))) + + ;; Removing net/ tests, which fail when attempting to access + ;; network resources not present in the build container. + (for-each delete-file + '("net/multicast_test.go" "net/parse_test.go" + "net/port_test.go")) + + ;; Add libgcc to the RUNPATH. + (substitute* "cmd/go/build.go" + (("cgoldflags := \\[\\]string\\{\\}") + (string-append "cgoldflags := []string{" + "\"-rpath=" gcclib "\"}")) + (("ldflags := buildLdflags") + (string-append + "ldflags := buildLdflags\n" + "ldflags = append(ldflags, \"-r\")\n" + "ldflags = append(ldflags, \"" gcclib "\")\n"))) + + (substitute* "os/os_test.go" + (("/usr/bin") (getcwd)) + (("/bin/pwd") (which "pwd"))) + + ;; Disable failing tests: these tests attempt to access + ;; commands or network resources which are neither available or + ;; necessary for the build to succeed. + (for-each + (match-lambda + ((file regex) + (substitute* file + ((regex all before test_name) + (string-append before "Disabled" test_name))))) + '(("net/net_test.go" "(.+)(TestShutdownUnix.+)") + ("net/dial_test.go" "(.+)(TestDialTimeout.+)") + ("os/os_test.go" "(.+)(TestHostname.+)") + ("time/format_test.go" "(.+)(TestParseInSydney.+)") + ("os/exec/exec_test.go" "(.+)(TestEcho.+)") + ("os/exec/exec_test.go" "(.+)(TestCommandRelativeName.+)") + ("os/exec/exec_test.go" "(.+)(TestCatStdin.+)") + ("os/exec/exec_test.go" "(.+)(TestCatGoodAndBadFile.+)") + ("os/exec/exec_test.go" "(.+)(TestExitStatus.+)") + ("os/exec/exec_test.go" "(.+)(TestPipes.+)") + ("os/exec/exec_test.go" "(.+)(TestStdinClose.+)") + ("syscall/syscall_unix_test.go" "(.+)(TestPassFD\\(.+)") + ("os/exec/exec_test.go" "(.+)(TestExtraFiles.+)"))) + + (substitute* "net/lookup_unix.go" + (("/etc/protocols") (string-append net-base "/etc/protocols"))) + (substitute* "time/zoneinfo_unix.go" + (("/usr/share/zoneinfo/") tzdata-path)) + (substitute* (find-files "cmd" "asm.c") + (("/lib/ld-linux.*\\.so\\.[0-9]") loader)) + #t))) + + (replace 'build + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; FIXME: Some of the .a files are not bit-reproducible. + (let* ((output (assoc-ref outputs "out"))) + (setenv "CC" (which "gcc")) + (setenv "GOOS" "linux") + (setenv "GOROOT" (dirname (getcwd))) + (setenv "GOROOT_FINAL" output) + (setenv "CGO_ENABLED" "1") + (zero? (system* "sh" "all.bash"))))) + + (replace 'install + (lambda* (#:key outputs inputs #:allow-other-keys) + (let* ((output (assoc-ref outputs "out")) + (doc_out (assoc-ref outputs "doc")) + (bash (string-append (assoc-ref inputs "bash") "bin/bash")) + (docs (string-append doc_out "/share/doc/" ,name "-" ,version)) + (tests (string-append + (assoc-ref outputs "tests") "/share/" ,name "-" ,version))) + (mkdir-p tests) + (copy-recursively "../test" (string-append tests "/test")) + (delete-file-recursively "../test") + (mkdir-p docs) + (copy-recursively "../api" (string-append docs "/api")) + (delete-file-recursively "../api") + (copy-recursively "../doc" (string-append docs "/doc")) + (delete-file-recursively "../doc") + + (for-each (lambda (file) + (let ((file (string-append "../" file))) + (install-file file docs) + (delete-file file))) + '("README" "CONTRIBUTORS" "AUTHORS" "PATENTS" + "LICENSE" "VERSION" "robots.txt")) + (copy-recursively "../" output) + #t)))))) + (inputs + `(("tzdata" ,tzdata) + ("pcre" ,pcre) + ("gcc:lib" ,gcc "lib"))) + (native-inputs + `(("pkg-config" ,%pkg-config) + ("which" ,which) + ("net-base" ,net-base) + ("perl" ,perl))) + + (home-page "https://golang.org/") + (synopsis "Compiler and libraries for Go, a statically-typed language") + (description "Go, also commonly referred to as golang, is an imperative +programming language. Designed primarily for systems programming, it is a +compiled, statically typed language in the tradition of C and C++, with +garbage collection, various safety features and in the style of communicating +sequential processes (CSP) concurrent programming features added.") + (license license:bsd-3))) -- cgit v1.2.3 From b0069a6777121e3f52a5a9bc07c19e054d9d082b Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sat, 25 Jun 2016 09:16:23 +0200 Subject: gnu: avrdude: Use libusb-compat. * gnu/packages/patches/avrdude-fix-libusb.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/flashing-tools.scm (avrdude)[source]: Remove patch. [inputs]: Replace "libusb" with "libusb-compat". --- gnu/local.mk | 1 - gnu/packages/flashing-tools.scm | 5 +- gnu/packages/patches/avrdude-fix-libusb.patch | 256 -------------------------- 3 files changed, 2 insertions(+), 260 deletions(-) delete mode 100644 gnu/packages/patches/avrdude-fix-libusb.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index fa6c277be1..7dfda9b808 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -441,7 +441,6 @@ dist_patch_DATA = \ %D%/packages/patches/automake-regexp-syntax.patch \ %D%/packages/patches/avahi-localstatedir.patch \ %D%/packages/patches/avidemux-install-to-lib.patch \ - %D%/packages/patches/avrdude-fix-libusb.patch \ %D%/packages/patches/awesome-reproducible-png.patch \ %D%/packages/patches/bash-completion-directories.patch \ %D%/packages/patches/beets-image-test-failure.patch \ diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm index 0ab8bc57ee..e3f8d80c02 100644 --- a/gnu/packages/flashing-tools.scm +++ b/gnu/packages/flashing-tools.scm @@ -90,12 +90,11 @@ programmer devices.") version ".tar.gz")) (sha256 (base32 - "0frxg0q09nrm95z7ymzddx7ysl77ilfbdix1m81d9jjpiv5bm64y")) - (patches (search-patches "avrdude-fix-libusb.patch")))) + "0frxg0q09nrm95z7ymzddx7ysl77ilfbdix1m81d9jjpiv5bm64y")))) (build-system gnu-build-system) (inputs `(("libelf" ,libelf) - ("libusb" ,libusb) + ("libusb" ,libusb-compat) ("libftdi" ,libftdi))) (native-inputs `(("bison" ,bison) diff --git a/gnu/packages/patches/avrdude-fix-libusb.patch b/gnu/packages/patches/avrdude-fix-libusb.patch deleted file mode 100644 index 13d0eca91c..0000000000 --- a/gnu/packages/patches/avrdude-fix-libusb.patch +++ /dev/null @@ -1,256 +0,0 @@ -Avrdude cannot build with our version of libusb. This patch fixes that. -See http://savannah.nongnu.org/bugs/?41854 - -diff --git a/dfu.c b/dfu.c -index 7d349bc..0f80440 100644 ---- a/dfu.c -+++ b/dfu.c -@@ -36,13 +36,14 @@ - - #ifndef HAVE_LIBUSB - --int dfu_open(struct dfu_dev *dfu, char *port_name) { -+struct dfu_dev * dfu_open(char *port_spec) { - fprintf(stderr, "%s: Error: No USB support in this compile of avrdude\n", - progname); -- return -1; -+ return NULL; - } - --int dfu_init(struct dfu_dev *dfu, unsigned short usb_pid) { -+int dfu_init(struct dfu_dev *dfu, -+ unsigned short vid, unsigned short pid) { - return -1; - } - -diff --git a/flip1.c b/flip1.c -index b891d80..0959996 100644 ---- a/flip1.c -+++ b/flip1.c -@@ -164,6 +164,8 @@ static void flip1_setup(PROGRAMMER * pgm); - static void flip1_teardown(PROGRAMMER * pgm); - - /* INTERNAL PROGRAMMER FUNCTION PROTOTYPES */ -+#ifdef HAVE_LIBUSB -+// The internal ones are made conditional, as they're not defined further down #ifndef HAVE_LIBUSB - - static void flip1_show_info(struct flip1 *flip1); - -@@ -177,6 +179,8 @@ static const char * flip1_mem_unit_str(enum flip1_mem_unit mem_unit); - static int flip1_set_mem_page(struct dfu_dev *dfu, unsigned short page_addr); - static enum flip1_mem_unit flip1_mem_unit(const char *name); - -+#endif /* HAVE_LIBUSB */ -+ - /* THE INITPGM FUNCTION DEFINITIONS */ - - void flip1_initpgm(PROGRAMMER *pgm) -@@ -201,6 +205,7 @@ void flip1_initpgm(PROGRAMMER *pgm) - pgm->teardown = flip1_teardown; - } - -+#ifdef HAVE_LIBUSB - /* EXPORTED PROGRAMMER FUNCTION DEFINITIONS */ - - int flip1_open(PROGRAMMER *pgm, char *port_spec) -@@ -876,3 +881,82 @@ enum flip1_mem_unit flip1_mem_unit(const char *name) { - return FLIP1_MEM_UNIT_EEPROM; - return FLIP1_MEM_UNIT_UNKNOWN; - } -+#else /* HAVE_LIBUSB */ -+// Dummy functions -+int flip1_open(PROGRAMMER *pgm, char *port_spec) -+{ -+ fprintf(stderr, "%s: Error: No USB support in this compile of avrdude\n", -+ progname); -+ return NULL; -+} -+ -+int flip1_initialize(PROGRAMMER* pgm, AVRPART *part) -+{ -+ return -1; -+} -+ -+void flip1_close(PROGRAMMER* pgm) -+{ -+} -+ -+void flip1_enable(PROGRAMMER* pgm) -+{ -+} -+ -+void flip1_disable(PROGRAMMER* pgm) -+{ -+} -+ -+void flip1_display(PROGRAMMER* pgm, const char *prefix) -+{ -+} -+ -+int flip1_program_enable(PROGRAMMER* pgm, AVRPART *part) -+{ -+ return -1; -+} -+ -+int flip1_chip_erase(PROGRAMMER* pgm, AVRPART *part) -+{ -+ return -1; -+} -+ -+int flip1_read_byte(PROGRAMMER* pgm, AVRPART *part, AVRMEM *mem, -+ unsigned long addr, unsigned char *value) -+{ -+ return -1; -+} -+ -+int flip1_write_byte(PROGRAMMER* pgm, AVRPART *part, AVRMEM *mem, -+ unsigned long addr, unsigned char value) -+{ -+ return -1; -+} -+ -+int flip1_paged_load(PROGRAMMER* pgm, AVRPART *part, AVRMEM *mem, -+ unsigned int page_size, unsigned int addr, unsigned int n_bytes) -+{ -+ return -1; -+} -+ -+int flip1_paged_write(PROGRAMMER* pgm, AVRPART *part, AVRMEM *mem, -+ unsigned int page_size, unsigned int addr, unsigned int n_bytes) -+{ -+ return -1; -+} -+ -+int flip1_read_sig_bytes(PROGRAMMER* pgm, AVRPART *part, AVRMEM *mem) -+{ -+ return -1; -+} -+ -+void flip1_setup(PROGRAMMER * pgm) -+{ -+} -+ -+void flip1_teardown(PROGRAMMER * pgm) -+{ -+} -+ -+ -+#endif /* HAVE_LIBUSB */ -\ No newline at end of file - -diff --git a/flip2.c b/flip2.c -index ed8e996..16c4bf8 100644 ---- a/flip2.c -+++ b/flip2.c -@@ -151,6 +151,8 @@ static void flip2_setup(PROGRAMMER * pgm); - static void flip2_teardown(PROGRAMMER * pgm); - - /* INTERNAL PROGRAMMER FUNCTION PROTOTYPES */ -+#ifdef HAVE_LIBUSB -+// The internal ones are made conditional, as they're not defined further down #ifndef HAVE_LIBUSB - - static void flip2_show_info(struct flip2 *flip2); - -@@ -171,6 +173,8 @@ static const char * flip2_status_str(const struct dfu_status *status); - static const char * flip2_mem_unit_str(enum flip2_mem_unit mem_unit); - static enum flip2_mem_unit flip2_mem_unit(const char *name); - -+#endif /* HAVE_LIBUSB */ -+ - /* THE INITPGM FUNCTION DEFINITIONS */ - - void flip2_initpgm(PROGRAMMER *pgm) -@@ -195,6 +199,7 @@ void flip2_initpgm(PROGRAMMER *pgm) - pgm->teardown = flip2_teardown; - } - -+#ifdef HAVE_LIBUSB - /* EXPORTED PROGRAMMER FUNCTION DEFINITIONS */ - - int flip2_open(PROGRAMMER *pgm, char *port_spec) -@@ -922,3 +927,85 @@ enum flip2_mem_unit flip2_mem_unit(const char *name) { - return FLIP2_MEM_UNIT_SIGNATURE; - return FLIP2_MEM_UNIT_UNKNOWN; - } -+ -+#else /* HAVE_LIBUSB */ -+ -+/* EXPORTED PROGRAMMER FUNCTION DEFINITIONS */ -+ -+int flip2_open(PROGRAMMER *pgm, char *port_spec) -+{ -+ fprintf(stderr, "%s: Error: No USB support in this compile of avrdude\n", -+ progname); -+ return NULL; -+} -+ -+int flip2_initialize(PROGRAMMER* pgm, AVRPART *part) -+{ -+ return -1; -+} -+ -+void flip2_close(PROGRAMMER* pgm) -+{ -+} -+ -+void flip2_enable(PROGRAMMER* pgm) -+{ -+} -+ -+void flip2_disable(PROGRAMMER* pgm) -+{ -+} -+ -+void flip2_display(PROGRAMMER* pgm, const char *prefix) -+{ -+} -+ -+int flip2_program_enable(PROGRAMMER* pgm, AVRPART *part) -+{ -+ return -1; -+} -+ -+int flip2_chip_erase(PROGRAMMER* pgm, AVRPART *part) -+{ -+ return -1; -+} -+ -+int flip2_read_byte(PROGRAMMER* pgm, AVRPART *part, AVRMEM *mem, -+ unsigned long addr, unsigned char *value) -+{ -+ return -1; -+} -+ -+int flip2_write_byte(PROGRAMMER* pgm, AVRPART *part, AVRMEM *mem, -+ unsigned long addr, unsigned char value) -+{ -+ return -1; -+} -+ -+int flip2_paged_load(PROGRAMMER* pgm, AVRPART *part, AVRMEM *mem, -+ unsigned int page_size, unsigned int addr, unsigned int n_bytes) -+{ -+ return -1; -+} -+ -+int flip2_paged_write(PROGRAMMER* pgm, AVRPART *part, AVRMEM *mem, -+ unsigned int page_size, unsigned int addr, unsigned int n_bytes) -+{ -+ return -1; -+} -+ -+int flip2_read_sig_bytes(PROGRAMMER* pgm, AVRPART *part, AVRMEM *mem) -+{ -+ return -1; -+} -+ -+void flip2_setup(PROGRAMMER * pgm) -+{ -+} -+ -+void flip2_teardown(PROGRAMMER * pgm) -+{ -+} -+ -+ -+#endif /* HAVE_LIBUSB */ -- cgit v1.2.3 From 9996ab16e6c31e95a8485f1226e9301a2ecdb14f Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Fri, 1 Jul 2016 16:05:40 -0400 Subject: gnu: gimp: Fix CVE-2016-4994. * gnu/packages/patches/gimp-CVE-2016-4994.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gimp.scm (gimp): Use it. --- gnu/local.mk | 1 + gnu/packages/gimp.scm | 1 + gnu/packages/patches/gimp-CVE-2016-4994.patch | 96 +++++++++++++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 gnu/packages/patches/gimp-CVE-2016-4994.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 7dfda9b808..829693af76 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -515,6 +515,7 @@ dist_patch_DATA = \ %D%/packages/patches/geoclue-config.patch \ %D%/packages/patches/ghostscript-CVE-2015-3228.patch \ %D%/packages/patches/ghostscript-runpath.patch \ + %D%/packages/patches/gimp-CVE-2016-4994.patch \ %D%/packages/patches/glib-networking-ssl-cert-file.patch \ %D%/packages/patches/glib-tests-timer.patch \ %D%/packages/patches/glibc-CVE-2015-7547.patch \ diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm index 1cd779a9b0..d5c58e26ba 100644 --- a/gnu/packages/gimp.scm +++ b/gnu/packages/gimp.scm @@ -130,6 +130,7 @@ buffers.") (uri (string-append "http://download.gimp.org/pub/gimp/v" (version-major+minor version) "/gimp-" version ".tar.bz2")) + (patches (search-patches "gimp-CVE-2016-4994.patch")) (sha256 (base32 "1dsgazia9hmab8cw3iis7s69dvqyfj5wga7ds7w2q5mms1xqbqwm")))) diff --git a/gnu/packages/patches/gimp-CVE-2016-4994.patch b/gnu/packages/patches/gimp-CVE-2016-4994.patch new file mode 100644 index 0000000000..6c81c63386 --- /dev/null +++ b/gnu/packages/patches/gimp-CVE-2016-4994.patch @@ -0,0 +1,96 @@ +Fix CVE-2016-4994: +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-4994 + +Copied from upstream repository: +https://git.gnome.org/browse/gimp/patch/?id=e82aaa4b4ee0703c879e35ea9321fff6be3e9b6f + +From e82aaa4b4ee0703c879e35ea9321fff6be3e9b6f Mon Sep 17 00:00:00 2001 +From: Shmuel H +Date: Mon, 20 Jun 2016 17:14:41 +0300 +Subject: Bug 767873 - (CVE-2016-4994) Multiple Use-After-Free when parsing... + +...XCF channel and layer properties + +The properties PROP_ACTIVE_LAYER, PROP_FLOATING_SELECTION, +PROP_ACTIVE_CHANNEL saves the current object pointer the @info +structure. Others like PROP_SELECTION (for channel) and +PROP_GROUP_ITEM (for layer) will delete the current object and create +a new object, leaving the pointers in @info invalid (dangling). + +Therefore, if a property from the first type will come before the +second, the result will be an UaF in the last lines of xcf_load_image +(when it actually using the pointers from @info). + +I wasn't able to exploit this bug because that +g_object_instance->c_class gets cleared by the last g_object_unref and +GIMP_IS_{LAYER,CHANNEL} detects that and return FALSE. + +(cherry picked from commit 6d804bf9ae77bc86a0a97f9b944a129844df9395) +--- + app/xcf/xcf-load.c | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) + +diff --git a/app/xcf/xcf-load.c b/app/xcf/xcf-load.c +index b180377..67cc6d4 100644 +--- a/app/xcf/xcf-load.c ++++ b/app/xcf/xcf-load.c +@@ -904,6 +904,18 @@ xcf_load_layer_props (XcfInfo *info, + case PROP_GROUP_ITEM: + { + GimpLayer *group; ++ gboolean is_active_layer; ++ ++ /* We're going to delete *layer, Don't leave its pointers ++ * in @info. After that, we'll restore them back with the ++ * new pointer. See bug #767873. ++ */ ++ is_active_layer = (*layer == info->active_layer); ++ if (is_active_layer) ++ info->active_layer = NULL; ++ ++ if (*layer == info->floating_sel) ++ info->floating_sel = NULL; + + group = gimp_group_layer_new (image); + +@@ -916,6 +928,13 @@ xcf_load_layer_props (XcfInfo *info, + g_object_ref_sink (*layer); + g_object_unref (*layer); + *layer = group; ++ ++ if (is_active_layer) ++ info->active_layer = *layer; ++ ++ /* Don't restore info->floating_sel because group layers ++ * can't be floating selections ++ */ + } + break; + +@@ -986,6 +1005,12 @@ xcf_load_channel_props (XcfInfo *info, + { + GimpChannel *mask; + ++ /* We're going to delete *channel, Don't leave its pointer ++ * in @info. See bug #767873. ++ */ ++ if (*channel == info->active_channel) ++ info->active_channel = NULL; ++ + mask = + gimp_selection_new (image, + gimp_item_get_width (GIMP_ITEM (*channel)), +@@ -1000,6 +1025,10 @@ xcf_load_channel_props (XcfInfo *info, + *channel = mask; + (*channel)->boundary_known = FALSE; + (*channel)->bounds_known = FALSE; ++ ++ /* Don't restore info->active_channel because the ++ * selection can't be the active channel ++ */ + } + break; + +-- +cgit v0.12 + -- cgit v1.2.3 From 6a628e8ba712b688c67743ea8a148d5057ab5cba Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 3 Jul 2016 06:44:49 +0300 Subject: gnu: openimageio: Update to 1.6.15. * gnu/packages/graphics.scm (openimageio): Update to 1.6.15. [source]: Remove patch. * gnu/packages/patches/openimageio-boost-1.60.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/graphics.scm | 5 +-- gnu/packages/patches/openimageio-boost-1.60.patch | 47 ----------------------- 3 files changed, 2 insertions(+), 51 deletions(-) delete mode 100644 gnu/packages/patches/openimageio-boost-1.60.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 829693af76..3a0d5c2557 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -688,7 +688,6 @@ dist_patch_DATA = \ %D%/packages/patches/ocaml-CVE-2015-8869.patch \ %D%/packages/patches/ocaml-findlib-make-install.patch \ %D%/packages/patches/openexr-missing-samples.patch \ - %D%/packages/patches/openimageio-boost-1.60.patch \ %D%/packages/patches/openjpeg-CVE-2015-6581.patch \ %D%/packages/patches/openjpeg-use-after-free-fix.patch \ %D%/packages/patches/openssh-CVE-2015-8325.patch \ diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 3ba59288d4..f6298ce394 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -255,7 +255,7 @@ storage of the \"EXR\" file format for storing 16-bit floating-point images.") (define-public openimageio (package (name "openimageio") - (version "1.5.18") + (version "1.6.15") (source (origin (method url-fetch) (uri (string-append "https://github.com/OpenImageIO/oiio/" @@ -263,8 +263,7 @@ storage of the \"EXR\" file format for storing 16-bit floating-point images.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0mn7cz19mn8dcrhkq15h25gl20ammr1wz0j2j3c2vxs6ph7zn8jy")) - (patches (search-patches "openimageio-boost-1.60.patch")))) + "144crq0205d0w5aq4iglh2rhzf54a8rv3pksy6d533b75w5d7rq7")))) (build-system cmake-build-system) ;; FIXME: To run all tests successfully, test image sets from multiple ;; third party sources have to be present. For details see diff --git a/gnu/packages/patches/openimageio-boost-1.60.patch b/gnu/packages/patches/openimageio-boost-1.60.patch deleted file mode 100644 index 92fc3237bb..0000000000 --- a/gnu/packages/patches/openimageio-boost-1.60.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 875fbbd92695397bfc83d1cd5fdd4094e1d50199 Mon Sep 17 00:00:00 2001 -From: Larry Gritz -Date: Mon, 28 Dec 2015 11:46:07 -0800 -Subject: [PATCH] Python ImageCache binding fixes -- disable broken calls - -Some of these calls (thankfully undocumented and presumably unused) -are horribly broken. They compiled before, but with new Boost 1.60 -they don't even compile properly. So just comment them out on this -obsolete branch. They are fully fixed in RB-1.6 and beyond. - ---- a/src/python/py_imagecache.cpp -+++ b/src/python/py_imagecache.cpp -@@ -199,23 +199,24 @@ void declare_imagecache() - .def("destroy", &ImageCacheWrap::destroy) - .staticmethod("destroy") - .def("clear", &ImageCacheWrap::clear) -- .def("attribute", &ImageCacheWrap::attribute) -+ // .def("attribute", &ImageCacheWrap::attribute) - .def("attribute", &ImageCacheWrap::attribute_int) - .def("attribute", &ImageCacheWrap::attribute_float) -- .def("attribute", &ImageCacheWrap::attribute_double) -- .def("attribute", &ImageCacheWrap::attribute_char) -+ // .def("attribute", &ImageCacheWrap::attribute_double) -+ // .def("attribute", &ImageCacheWrap::attribute_char) - .def("attribute", &ImageCacheWrap::attribute_string) -- .def("getattribute", &ImageCacheWrap::attribute) -+ // .def("getattribute", &ImageCacheWrap::attribute) - .def("getattribute", &ImageCacheWrap::getattribute_int) - .def("getattribute", &ImageCacheWrap::getattribute_float) -- .def("getattribute", &ImageCacheWrap::getattribute_double) -- .def("getattribute", &ImageCacheWrap::getattribute_char) -+ // .def("getattribute", &ImageCacheWrap::getattribute_double) -+ // .def("getattribute", &ImageCacheWrap::getattribute_char) - .def("getattribute", &ImageCacheWrap::getattribute_string) -- .def("resolve_filename", &ImageCacheWrap::resolve_filename) -- .def("get_image_info", &ImageCacheWrap::get_image_info) -- .def("get_image_info", &ImageCacheWrap::get_image_info_old) -+ // .def("get_image_info", &ImageCacheWrap::get_image_info) -+ // .def("get_image_info", &ImageCacheWrap::get_image_info_old) - .def("get_imagespec", &ImageCacheWrap::get_imagespec) -- .def("get_pixels", &ImageCacheWrap::get_pixels) -+ // .def("get_pixels", &ImageCacheWrap::get_pixels) -+ .def("resolve_filename", &ImageCacheWrap::resolve_filename) -+ - // .def("get_tile", &ImageCacheWrap::get_tile) - // .def("release_tile", &ImageCacheWrap::release_tile) - // .def("tile_pixels", &ImageCacheWrap::tile_pixels) -- cgit v1.2.3 From 6baa83d2838d11808ad0f317fbbd276f7c5904cb Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 6 Jul 2016 07:28:09 +0300 Subject: gnu: sudo: Update to 1.8.17p1. * gnu/packages/admin.scm (sudo): Update to 1.8.17p1. [source]: Remove patch. * gnu/packages/patches/sudo-CVE-2015-5602.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/admin.scm | 9 +- gnu/packages/patches/sudo-CVE-2015-5602.patch | 372 -------------------------- 3 files changed, 4 insertions(+), 378 deletions(-) delete mode 100644 gnu/packages/patches/sudo-CVE-2015-5602.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 3a0d5c2557..947d1b0efc 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -774,7 +774,6 @@ dist_patch_DATA = \ %D%/packages/patches/slim-sigusr1.patch \ %D%/packages/patches/slurm-configure-remove-nonfree-contribs.patch \ %D%/packages/patches/soprano-find-clucene.patch \ - %D%/packages/patches/sudo-CVE-2015-5602.patch \ %D%/packages/patches/superlu-dist-scotchmetis.patch \ %D%/packages/patches/synfig-build-fix.patch \ %D%/packages/patches/t1lib-CVE-2010-2642.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 9afe1f8ee0..7ece6bdcb5 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -789,18 +789,17 @@ system administrator.") (define-public sudo (package (name "sudo") - (version "1.8.15") + (version "1.8.17p1") (source (origin (method url-fetch) (uri - (list (string-append "http://www.sudo.ws/sudo/dist/sudo-" + (list (string-append "https://www.sudo.ws/sudo/dist/sudo-" version ".tar.gz") (string-append "ftp://ftp.sudo.ws/pub/sudo/OLD/sudo-" version ".tar.gz"))) (sha256 (base32 - "0263gi6i19fyzzc488n0qw3m518i39f6a7qmrfvahk9j10bkh5j3")) - (patches (search-patches "sudo-CVE-2015-5602.patch")))) + "1k2mn65l1kmsxm8wh0gjxy496xhbpiimbpm6yv6kw6snzc3xg466")))) (build-system gnu-build-system) (arguments `(#:configure-flags @@ -849,7 +848,7 @@ system administrator.") `(("groff" ,groff) ("linux-pam" ,linux-pam) ("coreutils" ,coreutils))) - (home-page "http://www.sudo.ws/") + (home-page "https://www.sudo.ws/") (synopsis "Run commands as root") (description "Sudo (su \"do\") allows a system administrator to delegate authority to diff --git a/gnu/packages/patches/sudo-CVE-2015-5602.patch b/gnu/packages/patches/sudo-CVE-2015-5602.patch deleted file mode 100644 index 36c90fbee7..0000000000 --- a/gnu/packages/patches/sudo-CVE-2015-5602.patch +++ /dev/null @@ -1,372 +0,0 @@ -Based on the patch from https://www.sudo.ws/repos/sudo/raw-rev/c2e36a80a279 -Backported to 1.8.15 by Mark H Weaver - -# HG changeset patch -# User Todd C. Miller -# Date 1452475889 25200 -# Node ID c2e36a80a27927c32cba55afae78b8dc830cddc3 -# Parent 94ffd6b18431fa4b9ed0a0c3f0b7b9582a4f6bde -Rewritten sudoedit_checkdir support that checks all the dirs in the -path and refuses to follow symlinks in writable directories. -This is a better fix for CVE-2015-5602. -Adapted from a diff by Ben Hutchings. Bug #707 - -diff -r 94ffd6b18431 -r c2e36a80a279 doc/CONTRIBUTORS ---- a/doc/CONTRIBUTORS Mon Jan 04 10:47:11 2016 -0700 -+++ b/doc/CONTRIBUTORS Sun Jan 10 18:31:29 2016 -0700 -@@ -58,6 +58,7 @@ - Holloway, Nick - Hoover, Adam - Hunter, Michael T. -+ Hutchings, Ben - Irrgang, Eric - Jackson, Brian - Jackson, John R. -diff -r 94ffd6b18431 -r c2e36a80a279 doc/UPGRADE ---- a/doc/UPGRADE Mon Jan 04 10:47:11 2016 -0700 -+++ b/doc/UPGRADE Sun Jan 10 18:31:29 2016 -0700 -@@ -1,6 +1,15 @@ - Notes on upgrading from an older release - ======================================== - -+o Upgrading from a version prior to the post-1.8.15 fix for CVE-2015-5602. -+ -+ The meaning of the sudoedit_checkdir sudoers option has changed. -+ Previously, it would only check the parent directory -+ of the file to be edited. After the CVE fix, all directories -+ in the path to be edited are checked and sudoedit will refuse -+ to follow a symbolic link in a directory that is writable by -+ the invoking user. -+ - o Upgrading from a version prior to 1.8.15: - - Prior to version 1.8.15, when env_reset was enabled (the default) -diff -r 94ffd6b18431 -r c2e36a80a279 doc/sudoers.cat ---- a/doc/sudoers.cat Mon Jan 04 10:47:11 2016 -0700 -+++ b/doc/sudoers.cat Sun Jan 10 18:31:29 2016 -0700 -@@ -1275,12 +1275,15 @@ - system call. This flag is _o_f_f by default. - - sudoedit_checkdir -- If set, ssuuddooeeddiitt will refuse to edit files located in a -- directory that is writable by the invoking user unless -- it is run by root. On many systems, this option -- requires that the parent directory of the file to be -- edited be readable by the target user. This flag is -- _o_f_f by default. -+ If set, ssuuddooeeddiitt will check directories in the path to -+ be edited for writability by the invoking user. -+ Symbolic links will not be followed in writable -+ directories and ssuuddooeeddiitt will also refuse to edit a -+ file located in a writable directory. Theses -+ restrictions are not enforced when ssuuddooeeddiitt is invoked -+ as root. On many systems, this option requires that -+ all directories in the path to be edited be readable by -+ the target user. This flag is _o_f_f by default. - - sudoedit_follow By default, ssuuddooeeddiitt will not follow symbolic links - when opening files. The _s_u_d_o_e_d_i_t___f_o_l_l_o_w option can be -diff -r 94ffd6b18431 -r c2e36a80a279 doc/sudoers.man.in ---- a/doc/sudoers.man.in Mon Jan 04 10:47:11 2016 -0700 -+++ b/doc/sudoers.man.in Sun Jan 10 18:31:29 2016 -0700 -@@ -2715,10 +2715,16 @@ - .br - If set, - \fBsudoedit\fR --will refuse to edit files located in a directory that is writable --by the invoking user unless it is run by root. --On many systems, this option requires that the parent directory --of the file to be edited be readable by the target user. -+will check directories in the path to be edited for writability -+by the invoking user. -+Symbolic links will not be followed in writable directories and -+\fBsudoedit\fR -+will also refuse to edit a file located in a writable directory. -+Theses restrictions are not enforced when -+\fBsudoedit\fR -+is invoked as root. -+On many systems, this option requires that all directories -+in the path to be edited be readable by the target user. - This flag is - \fIoff\fR - by default. -diff -r 94ffd6b18431 -r c2e36a80a279 doc/sudoers.mdoc.in ---- a/doc/sudoers.mdoc.in Mon Jan 04 10:47:11 2016 -0700 -+++ b/doc/sudoers.mdoc.in Sun Jan 10 18:31:29 2016 -0700 -@@ -2549,10 +2549,16 @@ - .It sudoedit_checkdir - If set, - .Nm sudoedit --will refuse to edit files located in a directory that is writable --by the invoking user unless it is run by root. --On many systems, this option requires that the parent directory --of the file to be edited be readable by the target user. -+will check directories in the path to be edited for writability -+by the invoking user. -+Symbolic links will not be followed in writable directories and -+.Nm sudoedit -+will also refuse to edit a file located in a writable directory. -+Theses restrictions are not enforced when -+.Nm sudoedit -+is invoked as root. -+On many systems, this option requires that all directories -+in the path to be edited be readable by the target user. - This flag is - .Em off - by default. -diff -r 94ffd6b18431 -r c2e36a80a279 include/sudo_compat.h ---- a/include/sudo_compat.h Mon Jan 04 10:47:11 2016 -0700 -+++ b/include/sudo_compat.h Sun Jan 10 18:31:29 2016 -0700 -@@ -182,6 +182,8 @@ - # ifndef UTIME_NOW - # define UTIME_NOW -2L - # endif -+#endif -+#if !defined(HAVE_OPENAT) || (!defined(HAVE_FUTIMENS) && !defined(HAVE_UTIMENSAT)) - # ifndef AT_FDCWD - # define AT_FDCWD -100 - # endif -diff -r 94ffd6b18431 -r c2e36a80a279 src/sudo_edit.c ---- a/src/sudo_edit.c Mon Jan 04 10:47:11 2016 -0700 -+++ b/src/sudo_edit.c Sun Jan 10 18:31:29 2016 -0700 -@@ -179,13 +179,15 @@ - } - - #ifndef HAVE_OPENAT --/* This does not support AT_FDCWD... */ - static int - sudo_openat(int dfd, const char *path, int flags, mode_t mode) - { - int fd, odfd; - debug_decl(sudo_openat, SUDO_DEBUG_EDIT) - -+ if (dfd == AT_FDCWD) -+ debug_return_int(open(path, flags, mode)); -+ - /* Save cwd */ - if ((odfd = open(".", O_RDONLY)) == -1) - debug_return_int(-1); -@@ -207,6 +209,64 @@ - #define openat sudo_openat - #endif /* HAVE_OPENAT */ - -+#ifdef O_NOFOLLOW -+static int -+sudo_edit_openat_nofollow(int dfd, char *path, int oflags, mode_t mode) -+{ -+ debug_decl(sudo_edit_open_nofollow, SUDO_DEBUG_EDIT) -+ -+ debug_return_int(openat(dfd, path, oflags|O_NOFOLLOW, mode)); -+} -+#else -+/* -+ * Returns true if fd and path don't match or path is a symlink. -+ * Used on older systems without O_NOFOLLOW. -+ */ -+static bool -+sudo_edit_is_symlink(int fd, char *path) -+{ -+ struct stat sb1, sb2; -+ debug_decl(sudo_edit_is_symlink, SUDO_DEBUG_EDIT) -+ -+ /* -+ * Treat [fl]stat() failure like there was a symlink. -+ */ -+ if (fstat(fd, &sb1) == -1 || lstat(path, &sb2) == -1) -+ debug_return_bool(true); -+ -+ /* -+ * Make sure we did not open a link and that what we opened -+ * matches what is currently on the file system. -+ */ -+ if (S_ISLNK(sb2.st_mode) || -+ sb1.st_dev != sb2.st_dev || sb1.st_ino != sb2.st_ino) { -+ debug_return_bool(true); -+ } -+ -+ debug_return_bool(false); -+} -+ -+static int -+sudo_edit_openat_nofollow(char *path, int oflags, mode_t mode) -+{ -+ struct stat sb1, sb2; -+ int fd; -+ debug_decl(sudo_edit_openat_nofollow, SUDO_DEBUG_EDIT) -+ -+ fd = openat(dfd, path, oflags, mode); -+ if (fd == -1) -+ debug_return_int(-1); -+ -+ if (sudo_edit_is_symlink(fd, path)) { -+ close(fd); -+ fd = -1; -+ errno = ELOOP; -+ } -+ -+ debug_return_int(fd); -+} -+#endif /* O_NOFOLLOW */ -+ - /* - * Returns true if the directory described by sb is writable - * by the user. We treat directories with the sticky bit as -@@ -245,49 +305,94 @@ - debug_return_bool(false); - } - -+/* -+ * Directory open flags for use with openat(2) and fstat(2). -+ * Use O_PATH and O_DIRECTORY where possible. -+ */ -+#if defined(O_PATH) && defined(O_DIRECTORY) -+# define DIR_OPEN_FLAGS (O_PATH|O_DIRECTORY) -+#elif defined(O_PATH) && !defined(O_DIRECTORY) -+# define DIR_OPEN_FLAGS O_PATH -+#elif !defined(O_PATH) && defined(O_DIRECTORY) -+# define DIR_OPEN_FLAGS (O_RDONLY|O_DIRECTORY) -+#else -+# define DIR_OPEN_FLAGS (O_RDONLY|O_NONBLOCK) -+#endif -+ - static int - sudo_edit_open_nonwritable(char *path, int oflags, mode_t mode) - { -- char *base, *dir; -+ int dfd, fd, dflags = DIR_OPEN_FLAGS; -+#if defined(__linux__) && defined(O_PATH) -+ char *opath = path; -+#endif -+ bool is_writable; - struct stat sb; -- int dfd, fd; - debug_decl(sudo_edit_open_nonwritable, SUDO_DEBUG_EDIT) - -- base = strrchr(path, '/'); -- if (base != NULL) { -- *base++ = '\0'; -- dir = path; -+#if defined(__linux__) && defined(O_PATH) -+restart: -+#endif -+ if (path[0] == '/') { -+ dfd = open("/", dflags); -+ path++; - } else { -- base = path; -- dir = "."; -+ dfd = open(".", dflags); -+ if (path[0] == '.' && path[1] == '/') -+ path += 2; - } --#ifdef O_PATH -- if ((dfd = open(dir, O_PATH)) != -1) { -- /* Linux kernels < 3.6 can't do fstat on O_PATH fds. */ -- if (fstat(dfd, &sb) == -1) { -- close(dfd); -- dfd = open(dir, O_RDONLY); -- if (fstat(dfd, &sb) == -1) { -- close(dfd); -- dfd = -1; -- } -- } -- } --#else -- if ((dfd = open(dir, O_RDONLY)) != -1) { -- if (fstat(dfd, &sb) == -1) { -- close(dfd); -- dfd = -1; -- } -- } --#endif -- if (base != path) -- base[-1] = '/'; /* restore path */ - if (dfd == -1) - debug_return_int(-1); - -- if (dir_is_writable(&sb, user_details.uid, user_details.gid, -- user_details.ngroups, user_details.groups)) { -+ for (;;) { -+ char *slash; -+ int subdfd; -+ -+ /* -+ * Look up one component at a time, avoiding symbolic links in -+ * writable directories. -+ */ -+ if (fstat(dfd, &sb) == -1) { -+ close(dfd); -+#if defined(__linux__) && defined(O_PATH) -+ /* Linux prior to 3.6 can't fstat an O_PATH fd */ -+ if (ISSET(dflags, O_PATH)) { -+ CLR(dflags, O_PATH); -+ path = opath; -+ goto restart; -+ } -+#endif -+ debug_return_int(-1); -+ } -+#ifndef O_DIRECTORY -+ if (!S_ISDIR(sb.st_mode)) { -+ close(dfd); -+ errno = ENOTDIR; -+ debug_return_int(-1); -+ } -+#endif -+ is_writable = dir_is_writable(&sb, user_details.uid, user_details.gid, -+ user_details.ngroups, user_details.groups); -+ -+ while (path[0] == '/') -+ path++; -+ slash = strchr(path, '/'); -+ if (slash == NULL) -+ break; -+ *slash = '\0'; -+ if (is_writable) -+ subdfd = sudo_edit_openat_nofollow(dfd, path, dflags, 0); -+ else -+ subdfd = openat(dfd, path, dflags, 0); -+ *slash = '/'; /* restore path */ -+ close(dfd); -+ if (subdfd == -1) -+ debug_return_int(-1); -+ path = slash + 1; -+ dfd = subdfd; -+ } -+ -+ if (is_writable) { - close(dfd); - errno = EISDIR; - debug_return_int(-1); -@@ -332,27 +437,10 @@ - if (!ISSET(oflags, O_NONBLOCK)) - (void) fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) & ~O_NONBLOCK); - -- /* -- * Treat [fl]stat() failure like an open() failure. -- */ -- if (fstat(fd, &sb1) == -1 || lstat(path, &sb2) == -1) { -- const int serrno = errno; -+ if (!ISSET(sflags, CD_SUDOEDIT_FOLLOW) && sudo_edit_is_symlink(fd, path)) { - close(fd); -- errno = serrno; -- debug_return_int(-1); -- } -- -- /* -- * Make sure we did not open a link and that what we opened -- * matches what is currently on the file system. -- */ -- if (!ISSET(sflags, CD_SUDOEDIT_FOLLOW)) { -- if (S_ISLNK(sb2.st_mode) || -- sb1.st_dev != sb2.st_dev || sb1.st_ino != sb2.st_ino) { -- close(fd); -- errno = ELOOP; -- debug_return_int(-1); -- } -+ fd = -1; -+ errno = ELOOP; - } - - debug_return_int(fd); - -- cgit v1.2.3 From ec2a67de8813dc7ea31c9825c6dfe6f27ad86344 Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Sat, 23 Apr 2016 13:38:43 +1000 Subject: gnu: Add python-dendropy. * gnu/packages/bioinformatics.scm (python-dendropy, python2-dendropy): New variables. * gnu/packages/patches/python-dendropy-exclude-failing-tests.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/bioinformatics.scm | 34 ++++++++++++++++++++++ .../python-dendropy-exclude-failing-tests.patch | 21 +++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 gnu/packages/patches/python-dendropy-exclude-failing-tests.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 947d1b0efc..e95c6aedc3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -743,6 +743,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-2.7-source-date-epoch.patch \ %D%/packages/patches/python-3-deterministic-build-info.patch \ %D%/packages/patches/python-3-search-paths.patch \ + %D%/packages/patches/python-dendropy-exclude-failing-tests.patch \ %D%/packages/patches/python-disable-ssl-test.patch \ %D%/packages/patches/python-fix-tests.patch \ %D%/packages/patches/python-ipython-inputhook-ctype.patch \ diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 03e7584f54..23a4470d7a 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -1446,6 +1446,40 @@ accessing bigWig files.") (native-inputs `(("python-setuptools" ,python2-setuptools)))))) +(define-public python-dendropy + (package + (name "python-dendropy") + (version "4.1.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "DendroPy" version)) + (sha256 + (base32 + "1jfz7gp18wph311w1yygbvjanb3n5mdqal439bb6myw41dwb5m63")) + ;; There are two known test failures that will be fixed in the next + ;; release after 4.1.0. + ;; https://github.com/jeetsukumaran/DendroPy/issues/48 + (patches (search-patches + "python-dendropy-exclude-failing-tests.patch")))) + (build-system python-build-system) + (home-page "http://packages.python.org/DendroPy/") + (synopsis "Library for phylogenetics and phylogenetic computing") + (description + "DendroPy is a library for phylogenetics and phylogenetic computing: reading, +writing, simulation, processing and manipulation of phylogenetic +trees (phylogenies) and characters.") + (license license:bsd-3) + (properties `((python2-variant . ,(delay python2-dendropy)))))) + +(define-public python2-dendropy + (let ((base (package-with-python2 (strip-python2-variant python-dendropy)))) + (package + (inherit base) + (native-inputs `(("python2-setuptools" ,python2-setuptools) + ,@(package-native-inputs base)))))) + + (define-public deeptools (package (name "deeptools") diff --git a/gnu/packages/patches/python-dendropy-exclude-failing-tests.patch b/gnu/packages/patches/python-dendropy-exclude-failing-tests.patch new file mode 100644 index 0000000000..288a58b06f --- /dev/null +++ b/gnu/packages/patches/python-dendropy-exclude-failing-tests.patch @@ -0,0 +1,21 @@ +diff --git a/dendropy/test/test_phylogenetic_distance_matrix.py b/dendropy/test/test_phylogenetic_distance_matrix.py +index 10c05f5..a18ba52 100644 +--- a/dendropy/test/test_phylogenetic_distance_matrix.py ++++ b/dendropy/test/test_phylogenetic_distance_matrix.py +@@ -793,7 +793,7 @@ class PdmUpgmaTree(PdmTreeChecker, unittest.TestCase): + expected_tree=expected_tree) + + class NodeToNodeDistancesTest(unittest.TestCase): +- ++ @unittest.expectedFailure + def test_distances(self): + ## get distances from ape + # library(ape) +@@ -825,6 +825,7 @@ class NodeToNodeDistancesTest(unittest.TestCase): + e = reference_table[nd1.label, nd2.label] + self.assertAlmostEqual(d, e) + ++ @unittest.expectedFailure + def test_mrca(self): + test_runs = [ + "hiv1.newick", -- cgit v1.2.3 From 0e6ee10c07dbee9ffe18973da57a71775bfdbd28 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 10 Jul 2016 18:00:05 +0200 Subject: gnu: libmtp: Update to 1.1.11. * gnu/packages/patches/libmtp-devices.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove patch. * gnu/packages/libusb.scm (libmtp): Update to 1.1.11. --- gnu/local.mk | 1 - gnu/packages/libusb.scm | 7 +- gnu/packages/patches/libmtp-devices.patch | 554 ------------------------------ 3 files changed, 3 insertions(+), 559 deletions(-) delete mode 100644 gnu/packages/patches/libmtp-devices.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index e95c6aedc3..d011844074 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -613,7 +613,6 @@ dist_patch_DATA = \ %D%/packages/patches/libdrm-symbol-check.patch \ %D%/packages/patches/libevent-dns-tests.patch \ %D%/packages/patches/libextractor-ffmpeg-3.patch \ - %D%/packages/patches/libmtp-devices.patch \ %D%/packages/patches/liboop-mips64-deplibs-fix.patch \ %D%/packages/patches/libotr-test-auth-fix.patch \ %D%/packages/patches/liblxqt-include.patch \ diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm index 69a8ef9890..1f659c7594 100644 --- a/gnu/packages/libusb.scm +++ b/gnu/packages/libusb.scm @@ -135,15 +135,14 @@ version of libusb to run with newer libusb.") (define-public libmtp (package (name "libmtp") - (version "1.1.9") + (version "1.1.11") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/libmtp/" version "/libmtp-" version ".tar.gz")) (sha256 - (base32 - "12dinqic0ljnhrwx3rc61jc7q24ybr0mckc2ya5kh1s1np0d7w93")) - (patches (search-patches "libmtp-devices.patch")))) + (base32 + "1sc768q2cixwanlwrz95mp389iaadl4s95486caavxx4g7znvn8m")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) diff --git a/gnu/packages/patches/libmtp-devices.patch b/gnu/packages/patches/libmtp-devices.patch deleted file mode 100644 index 9b985e526d..0000000000 --- a/gnu/packages/patches/libmtp-devices.patch +++ /dev/null @@ -1,554 +0,0 @@ -Add additional devices; the patched file corresponds to git commit 8e471b, -to which one additional device has been added as reported at - http://sourceforge.net/p/libmtp/bugs/1422/ - -diff -u -r libmtp-1.1.9.orig/src/music-players.h libmtp-1.1.9/src/music-players.h ---- libmtp-1.1.9.orig/src/music-players.h 2015-09-19 22:54:24.537330594 +0200 -+++ libmtp-1.1.9/src/music-players.h 2015-09-19 23:16:41.079206331 +0200 -@@ -47,82 +47,61 @@ - * and properties. - */ - { "Creative", 0x041e, "ZEN Vision", 0x411f, -- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | -- DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL }, -+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, - { "Creative", 0x041e, "Portable Media Center", 0x4123, -- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | -- DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL }, -+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, - { "Creative", 0x041e, "ZEN Xtra (MTP mode)", 0x4128, -- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | -- DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL }, -+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, - { "Dell", 0x041e, "DJ (2nd generation)", 0x412f, -- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | -- DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL }, -+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, - { "Creative", 0x041e, "ZEN Micro (MTP mode)", 0x4130, -- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | -- DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL }, -+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, - { "Creative", 0x041e, "ZEN Touch (MTP mode)", 0x4131, -- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | -- DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL }, -+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, - { "Dell", 0x041e, "Dell Pocket DJ (MTP mode)", 0x4132, -- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | -- DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL }, -- { "Creative", 0x041e, "ZEN MicroPhoto (alternate version)", 0x4133, -- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | -- DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL }, -+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, -+ { "Creative", 0x041e, "ZEN MicroPhoto (alternate version)", 0x4133, -+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, - { "Creative", 0x041e, "ZEN Sleek (MTP mode)", 0x4137, -- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | -- DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL }, -+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, - { "Creative", 0x041e, "ZEN MicroPhoto", 0x413c, -- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | -- DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL }, -+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, - { "Creative", 0x041e, "ZEN Sleek Photo", 0x413d, -- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | -- DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL }, -+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, - { "Creative", 0x041e, "ZEN Vision:M", 0x413e, -- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | -- DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL }, -+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, - // Reported by marazm@o2.pl - { "Creative", 0x041e, "ZEN V", 0x4150, -- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | -- DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL }, -+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, - // Reported by danielw@iinet.net.au - // This version of the Vision:M needs the no release interface flag, - // unclear whether the other version above need it too or not. - { "Creative", 0x041e, "ZEN Vision:M (DVP-HD0004)", 0x4151, - DEVICE_FLAG_NO_RELEASE_INTERFACE | -- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | -- DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL }, -+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, - // Reported by Darel on the XNJB forums - { "Creative", 0x041e, "ZEN V Plus", 0x4152, -- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | -- DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL }, -+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, - { "Creative", 0x041e, "ZEN Vision W", 0x4153, -- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | -- DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL }, -+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, - // Don't add 0x4155: this is a Zen Stone device which is not MTP - // Reported by Paul Kurczaba - { "Creative", 0x041e, "ZEN", 0x4157, - DEVICE_FLAG_IGNORE_HEADER_ERRORS | - DEVICE_FLAG_BROKEN_SET_SAMPLE_DIMENSIONS | -- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | -- DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL }, -+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, - // Reported by Ringofan - { "Creative", 0x041e, "ZEN V 2GB", 0x4158, -- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | -- DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL }, -+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, - // Reported by j norment - { "Creative", 0x041e, "ZEN Mozaic", 0x4161, -- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | -- DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL }, -+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, - // Reported by Aaron F. Gonzalez - { "Creative", 0x041e, "ZEN X-Fi", 0x4162, -- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | -- DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL }, -+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, - // Reported by farmerstimuli - { "Creative", 0x041e, "ZEN X-Fi 3", 0x4169, -- DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL | -- DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL }, -+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL }, - // Reported by Todor Gyumyushev - { "ZiiLABS", 0x041e, "Zii EGG", 0x6000, - DEVICE_FLAG_UNLOAD_DRIVER | -@@ -607,8 +586,17 @@ - /* https://sourceforge.net/p/libmtp/bugs/1251/ */ - { "Acer", 0x0502, "E39", 0x3643, - DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1369/ */ -+ { "Acer", 0x0502, "liquid e700", 0x3644, -+ DEVICE_FLAGS_ANDROID_BUGS }, - { "Acer", 0x0502, "One 7", 0x3657, - DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/support-requests/183/ */ -+ { "Acer", 0x0502, "Z200", 0x3683, -+ DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1341/ */ -+ { "Acer", 0x0502, "Liquid S56", 0x3725, -+ DEVICE_FLAGS_ANDROID_BUGS }, - - /* - * SanDisk -@@ -952,6 +940,7 @@ - { "Archos", 0x0e79, "SPOD (MTP mode)", 0x1341, DEVICE_FLAG_UNLOAD_DRIVER }, - { "Archos", 0x0e79, "5S IT (MTP mode)", 0x1351, DEVICE_FLAG_UNLOAD_DRIVER }, - { "Archos", 0x0e79, "5H IT (MTP mode)", 0x1357, DEVICE_FLAG_UNLOAD_DRIVER }, -+ { "Archos", 0x0e79, "48 (MTP mode)", 0x1421, DEVICE_FLAGS_ANDROID_BUGS }, - { "Archos", 0x0e79, "Arnova Childpad", 0x1458, DEVICE_FLAGS_ANDROID_BUGS }, - { "Archos", 0x0e79, "Arnova 8c G3", 0x145e, DEVICE_FLAGS_ANDROID_BUGS }, - { "Archos", 0x0e79, "Arnova 10bG3 Tablet", 0x146b, DEVICE_FLAGS_ANDROID_BUGS }, -@@ -973,9 +962,17 @@ - { "Archos", 0x0e79, "70it2 (ID 2)", 0x1569, DEVICE_FLAGS_ANDROID_BUGS }, - { "Archos", 0x0e79, "50c", 0x2008, DEVICE_FLAGS_ANDROID_BUGS }, - { "Archos", 0x0e79, "C40", 0x31ab, DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1393/ */ -+ { "Archos", 0x0e79, "Phone", 0x31e1, DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1325/ */ -+ { "Archos", 0x0e79, "45 Neon", 0x31f3, DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1352/ */ -+ { "Archos", 0x0e79, "50 Diamond", 0x3229, DEVICE_FLAGS_ANDROID_BUGS }, - { "Archos", 0x0e79, "101 G4", 0x4002, DEVICE_FLAGS_ANDROID_BUGS }, - { "Archos (for Tesco)", 0x0e79, "Hudl (ID1)", 0x5008, DEVICE_FLAGS_ANDROID_BUGS }, - { "Archos (for Tesco)", 0x0e79, "Hudl (ID2)", 0x5009, DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1404/ */ -+ { "Archos", 0x0e79, "AC40DTI", 0x5217, DEVICE_FLAGS_ANDROID_BUGS }, - - /* - * Dunlop (OEM of EGOMAN ltd?) reported by Nanomad -@@ -1181,6 +1178,10 @@ - { "Qualcomm (for OnePlus)", 0x05c6, "One (MTP+ADB)", - 0x6765, DEVICE_FLAGS_ANDROID_BUGS }, - -+ /* https://sourceforge.net/p/libmtp/bugs/1377/ */ -+ { "Qualcomm (for Xolo)", 0x901b, "Xolo Black (MTP)", -+ 0x9039, DEVICE_FLAGS_ANDROID_BUGS }, -+ - { "Qualcomm (for PhiComm)", 0x05c6, "C230w (MTP)", - 0x9039, DEVICE_FLAGS_ANDROID_BUGS }, - -@@ -1221,6 +1222,9 @@ - // Reported by Thomas Bretthauer - { "Fujitsu, Ltd", 0x04c5, "STYLISTIC M532", 0x133b, - DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/feature-requests/137/ */ -+ { "Fujitsu, Ltd", 0x04c5, "F02-E", 0x1378, -+ DEVICE_FLAGS_ANDROID_BUGS }, - - /* - * Palm device userland program named Pocket Tunes -@@ -1247,6 +1251,9 @@ - // Reported by anonymous SourceForge user - { "Medion", 0x066f, "MD8333 (ID2)", 0x8588, - DEVICE_FLAG_UNLOAD_DRIVER | DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST }, -+ /* https://sourceforge.net/p/libmtp/bugs/1359/ */ -+ { "Verizon", 0x0408, "Ellipsis 7", 0x3899, -+ DEVICE_FLAGS_ANDROID_BUGS }, - // The vendor ID is "Quanta Computer, Inc." - // same as Olivetti Olipad 110 - // Guessing on device flags -@@ -1403,6 +1410,9 @@ - DEVICE_FLAGS_ANDROID_BUGS }, - { "LG Electronics Inc.", 0x1004, "LG2 Optimus", 0x6225, - DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1386/ */ -+ { "LG Electronics Inc.", 0x1004, "LG VS950", 0x622a, -+ DEVICE_FLAGS_ANDROID_BUGS }, - { "LG Electronics Inc.", 0x1004, "LG VS870", 0x6239, - DEVICE_FLAGS_ANDROID_BUGS }, - /* https://sourceforge.net/p/libmtp/bugs/992/ */ -@@ -1410,6 +1420,8 @@ - DEVICE_FLAGS_ANDROID_BUGS }, - { "LG Electronics Inc.", 0x1004, "VK810", 0x6265, - DEVICE_FLAGS_ANDROID_BUGS }, -+ { "LG Electronics Inc.", 0x1004, "G3", 0x627f, -+ DEVICE_FLAGS_ANDROID_BUGS }, - /* https://sourceforge.net/p/libmtp/support-requests/134/ */ - { "LG Electronics Inc.", 0x1004, "G3 (VS985)", 0x626e, - DEVICE_FLAGS_ANDROID_BUGS }, -@@ -1723,8 +1735,12 @@ - DEVICE_FLAG_NONE }, - { "SONY", 0x0fce, "Xperia M2 MTP", 0x01aa, - DEVICE_FLAG_NONE }, -+ { "SONY", 0x0fce, "Xperia M2 Dual MTP", 0x01ab, -+ DEVICE_FLAG_NONE }, - { "SONY", 0x0fce, "Xperia Z2 MTP", 0x01af, - DEVICE_FLAG_NONE }, -+ { "SONY", 0x0fce, "Xperia Z2 Tablet MTP", 0x01b1, -+ DEVICE_FLAGS_ANDROID_BUGS }, - { "SONY", 0x0fce, "Xperia Z Ultra MTP", 0x01b6, - DEVICE_FLAGS_ANDROID_BUGS }, - { "SONY", 0x0fce, "Xperia Z3 MTP", 0x01ba, -@@ -1733,6 +1749,10 @@ - DEVICE_FLAG_NONE }, - { "SONY", 0x0fce, "Xperia E3 MTP", 0x01bc, - DEVICE_FLAG_NONE }, -+ { "SONY", 0x0fce, "XPeria Z3+ MTP", 0x01c9, -+ DEVICE_FLAG_NONE }, -+ { "SONY", 0x0fce, "XPeria E4g MTP", 0x01cb, -+ DEVICE_FLAG_NONE }, - - - /* -@@ -1788,6 +1808,8 @@ - DEVICE_FLAG_NONE }, - { "SONY", 0x0fce, "Xperia M MTP+CDROM", 0x419b, - DEVICE_FLAG_NONE }, -+ { "SONY", 0x0fce, "Xperia Z Ultra MTP+CDROM (ID3)", 0x419c, -+ DEVICE_FLAG_NONE }, - { "SONY", 0x0fce, "Xperia Z1 MTP+CDROM", 0x419e, - DEVICE_FLAG_NONE }, - { "SONY", 0x0fce, "Xperia C MTP+CDROM", 0x41a3, -@@ -1796,10 +1818,20 @@ - DEVICE_FLAG_NONE }, - { "SONY", 0x0fce, "Xperia M2 MTP+CDROM", 0x41aa, - DEVICE_FLAG_NONE }, -+ { "SONY", 0x0fce, "Xperia M2 Dual MTP+CDROM", 0x41ab, -+ DEVICE_FLAG_NONE }, - { "SONY", 0x0fce, "Xperia Z2 MTP+CDROM", 0x41af, - DEVICE_FLAG_NONE }, - { "SONY", 0x0fce, "Xperia Z3 MTP+CDROM", 0x41ba, - DEVICE_FLAG_NONE }, -+ { "SONY", 0x0fce, "Xperia Z3 Compact MTP+CDROM", 0x41bb, -+ DEVICE_FLAG_NONE }, -+ { "SONY", 0x0fce, "Xperia E3 MTP+CDROM", 0x01bc, -+ DEVICE_FLAG_NONE }, -+ { "SONY", 0x0fce, "XPeria Z3+ MTP+CDROM", 0x41c9, -+ DEVICE_FLAG_NONE }, -+ { "SONY", 0x0fce, "XPeria E4g MTP+CDROM", 0x41cb, -+ DEVICE_FLAG_NONE }, - - /* - * MTP+ADB personalities of MTP devices (see above) -@@ -1888,6 +1920,8 @@ - DEVICE_FLAG_NONE }, - { "SONY", 0x0fce, "Xperia M2 MTP+ADB", 0x51aa, - DEVICE_FLAG_NONE }, -+ { "SONY", 0x0fce, "Xperia M2 Dual MTP+ADB", 0x51ab, -+ DEVICE_FLAG_NONE }, - { "SONY", 0x0fce, "Xperia Z2 MTP+ADB", 0x51af, - DEVICE_FLAG_NONE }, - { "SONY", 0x0fce, "Xperia Z Ultra MTP+ADB", 0x51b6, -@@ -1898,6 +1932,10 @@ - DEVICE_FLAG_NONE }, - { "SONY", 0x0fce, "Xperia E3 MTP+ADB", 0x51bc, - DEVICE_FLAG_NONE }, -+ { "SONY", 0x0fce, "XPeria Z3+ MTP+ADB", 0x51c9, -+ DEVICE_FLAG_NONE }, -+ { "SONY", 0x0fce, "XPeria E4g MTP+ADB", 0x51cb, -+ DEVICE_FLAG_NONE }, - - /* - * MTP+UMS modes -@@ -1936,6 +1974,9 @@ - * Motorola - * Assume DEVICE_FLAG_BROKEN_SET_OBJECT_PROPLIST on all of these. - */ -+ /* https://sourceforge.net/p/libmtp/feature-requests/136/ */ -+ { "Motorola", 0x22b8, "XT1524 (MTP)", 0x002e, -+ DEVICE_FLAGS_ANDROID_BUGS }, - // Reported by David Boyd - { "Motorola", 0x22b8, "V3m/V750 verizon", 0x2a65, - DEVICE_FLAG_BROKEN_SET_OBJECT_PROPLIST | -@@ -1952,6 +1993,9 @@ - DEVICE_FLAGS_ANDROID_BUGS }, - { "Motorola", 0x22b8, "Moto X (XT1058)", 0x2e63, - DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1323/ */ -+ { "Motorola", 0x22b8, "Moto X (XT1080)", 0x2e66, -+ DEVICE_FLAGS_ANDROID_BUGS }, - { "Motorola", 0x22b8, "Droid Maxx (XT1080)", 0x2e67, - DEVICE_FLAGS_ANDROID_BUGS }, - { "Motorola", 0x22b8, "Droid Ultra", 0x2e68, -@@ -2345,6 +2389,14 @@ - /* https://sourceforge.net/p/libmtp/bugs/1244/ */ - { "Asus", 0x0b05, "MemoPad 8 ME181 CX (MTP)", 0x5561, - DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1406/ */ -+ { "Asus", 0x0b05, "Zenfone 2 (MTP)", 0x5600, -+ DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1364/ */ -+ { "Asus", 0x0b05, "Z00AD (MTP)", 0x5601, -+ DEVICE_FLAGS_ANDROID_BUGS }, -+ { "Asus", 0x0b05, "TX201LA (MTP)", 0x561f, -+ DEVICE_FLAGS_ANDROID_BUGS }, - /* https://sourceforge.net/p/libmtp/bugs/1271/ */ - { "Asus", 0x0b05, "ZenFone 4 (MTP)", 0x580f, - DEVICE_FLAGS_ANDROID_BUGS }, -@@ -2354,9 +2406,20 @@ - /* https://sourceforge.net/p/libmtp/bugs/1258/ */ - { "Asus", 0x0b05, "A450CG (MTP)", 0x5a0f, - DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1350/ */ -+ { "Asus", 0x0b05, "Zenfone 2 ZE550ML (MTP)", 0x5f02, -+ DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1364/ */ -+ { "Asus", 0x0b05, "Zenfone 2 ZE551ML (MTP)", 0x5f03, -+ DEVICE_FLAGS_ANDROID_BUGS }, - /* https://sourceforge.net/p/libmtp/bugs/1232/ */ - { "Asus", 0x0b05, "MemoPad 7 (ME572CL)", 0x7772, - DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1351/ */ -+ { "Asus", 0x0b05, "Fonepad 7 (FE375CXG)", 0x7773, -+ DEVICE_FLAGS_ANDROID_BUGS }, -+ { "Asus", 0x0b05, "ZenFone 5 A500KL (MTP)", 0x7780, -+ DEVICE_FLAGS_ANDROID_BUGS }, - /* https://sourceforge.net/p/libmtp/bugs/1247/ */ - { "Asus", 0x0b05, "ZenFone 5 A500KL (MTP+ADB)", 0x7781, - DEVICE_FLAGS_ANDROID_BUGS }, -@@ -2365,6 +2428,12 @@ - /* - * Lenovo - */ -+ /* https://sourceforge.net/p/libmtp/support-requests/178/ */ -+ { "Lenovo", 0x17ef, "P70-A", 0x0c02, -+ DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1415/ */ -+ { "Lenovo", 0x17ef, "P70", 0x2008, -+ DEVICE_FLAGS_ANDROID_BUGS }, - // Reported by Richard Körber - { "Lenovo", 0x17ef, "K1", 0x740a, - DEVICE_FLAGS_ANDROID_BUGS }, -@@ -2407,6 +2476,9 @@ - DEVICE_FLAGS_ANDROID_BUGS }, - { "Lenovo", 0x17ef, "Toga Tablet B6000-F", 0x76f2, - DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1122/ */ -+ { "Lenovo", 0x17ef, "S930", 0x7718, -+ DEVICE_FLAGS_ANDROID_BUGS }, - /* https://sourceforge.net/p/libmtp/bugs/1250/ */ - { "Lenovo", 0x17ef, "A5500-F", 0x772b, - DEVICE_FLAGS_ANDROID_BUGS }, -@@ -2417,15 +2489,24 @@ - /* https://sourceforge.net/p/libmtp/bugs/1155/ */ - { "Lenovo", 0x17ef, "Yoga Tablet 10 B8000-H", 0x76ff, - DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1391/ */ -+ { "Lenovo", 0x17ef, "A7600-F", 0x7731, -+ DEVICE_FLAGS_ANDROID_BUGS }, - /* https://sourceforge.net/p/libmtp/bugs/1291/ */ - { "Lenovo", 0x17ef, "A3500-F", 0x7737, - DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/support-requests/186/ */ -+ { "Lenovo", 0x17ef, "Yoga Tablet 2 - 1050F", 0x77a4, -+ DEVICE_FLAGS_ANDROID_BUGS }, - /* https://sourceforge.net/p/libmtp/support-requests/168/ */ - { "Lenovo", 0x17ef, "Yoga Tablet 2 Pro", 0x77b1, - DEVICE_FLAGS_ANDROID_BUGS }, - /* https://sourceforge.net/p/libmtp/feature-requests/125/ */ - { "Lenovo", 0x17ef, "Vibe Z2", 0x77ea, - DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1360/ */ -+ { "Lenovo", 0x17ef, "K3 Note", 0x7883, -+ DEVICE_FLAGS_ANDROID_BUGS }, - - /* - * Huawei -@@ -2435,6 +2516,15 @@ - DEVICE_FLAGS_ANDROID_BUGS }, - { "Huawei", 0x12d1, "MTP device (ID2)", 0x1052, - DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1381/ */ -+ { "Huawei", 0x12d1, "H60-L11", 0x1079, -+ DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1361/ */ -+ { "Huawei", 0x12d1, "Ascend P8 ", 0x1082, -+ DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1418/ */ -+ { "Huawei", 0x12d1, "Honor 3C ", 0x2012, -+ DEVICE_FLAGS_ANDROID_BUGS }, - { "Huawei", 0x12d1, "Mediapad (mode 0)", 0x360f, - DEVICE_FLAGS_ANDROID_BUGS }, - // Reported by Bearsh -@@ -2452,6 +2542,8 @@ - /* https://sourceforge.net/p/libmtp/bugs/672/ */ - { "ZTE", 0x19d2, "Grand X In", 0x0343, DEVICE_FLAGS_ANDROID_BUGS }, - { "ZTE", 0x19d2, "V985", 0x0383, DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1328/ */ -+ { "ZTE", 0x19d2, "V5", 0xffce, DEVICE_FLAGS_ANDROID_BUGS }, - - /* - * HTC (High Tech Computer Corp) -@@ -2459,6 +2551,12 @@ - * Steven Eastland - * Kevin Cheng - */ -+ /* https://sourceforge.net/p/libmtp/support-requests/181/ */ -+ { "HTC", 0x0bb4, "HTC One M9 (MTP)", 0x040b, -+ DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1398/ */ -+ { "HTC", 0x0bb4, "Spreadtrum SH57MYZ03342 (MTP)", 0x05e3, -+ DEVICE_FLAGS_ANDROID_BUGS }, - /* reported by Mikkel Oscar Lyderik */ - { "HTC", 0x0bb4, "HTC Desire 510 (MTP+ADB)", 0x05fd, - DEVICE_FLAGS_ANDROID_BUGS }, -@@ -2545,6 +2643,9 @@ - /* https://sourceforge.net/p/libmtp/bugs/1182/ */ - { "HTC", 0x0bb4, "Desire 310 (MTP)", 0x0ec6, - DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1420/ */ -+ { "HTC", 0x0bb4, "Desire 816G (MTP)", 0x0edb, -+ DEVICE_FLAGS_ANDROID_BUGS }, - { "HTC", 0x0bb4, "HTC One (MTP+ADB+CDC)", 0x0f5f, - DEVICE_FLAGS_ANDROID_BUGS }, - { "HTC", 0x0bb4, "HTC One (MTP+CDC)", 0x0f60, -@@ -2658,6 +2759,9 @@ - DEVICE_FLAGS_ANDROID_BUGS }, - { "Amazon", 0x1949, "Kindle Fire (ID5)", 0x0012, - DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1353/ */ -+ { "Amazon", 0x1949, "Kindle Fire HD6", 0x00f2, -+ DEVICE_FLAGS_ANDROID_BUGS }, - { "Amazon", 0x1949, "Fire Phone", 0x0800, - DEVICE_FLAGS_ANDROID_BUGS }, - -@@ -2677,6 +2781,9 @@ - DEVICE_FLAGS_ANDROID_BUGS }, - { "YiFang", 0x2207, "BQ Tesla", 0x0006, - DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1354/ */ -+ { "Various", 0x2207, "Viewpia DR/bq Kepler Debugging", 0x0011, -+ DEVICE_FLAGS_ANDROID_BUGS }, - - /* - * Kobo -@@ -2708,6 +2815,8 @@ - { "Intel", 0x8087, "Foxconn iView i700", 0x0a15, DEVICE_FLAGS_ANDROID_BUGS }, - /* https://sourceforge.net/p/libmtp/bugs/1237/ */ - { "Intel", 0x8087, "Telcast Air 3G", 0x0a5e, DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1338/ */ -+ { "Intel", 0x8087, "Chuwi vi8", 0x0a5f, DEVICE_FLAGS_ANDROID_BUGS }, - - /* - * Xiaomi -@@ -2738,6 +2847,15 @@ - DEVICE_FLAGS_ANDROID_BUGS }, - { "Xiaomi", 0x2717, "Mi-2 (MTP)", 0xf003, - DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1397/ */ -+ { "Xiaomi", 0x2717, "Mi-2s (id2) (MTP)", 0xff40, -+ DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1339/ */ -+ { "Xiaomi", 0x2717, "Mi-2s (MTP)", 0xff48, -+ DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1402/ */ -+ { "Xiaomi", 0x2717, "Redmi 2 (MTP)", 0xff60, -+ DEVICE_FLAGS_ANDROID_BUGS }, - - /* - * XO Learning Tablet -@@ -2774,6 +2892,9 @@ - /* https://sourceforge.net/p/libmtp/bugs/1304/ */ - { "Alcatel", 0x1bbb, "OneTouch 5042D (MTP)", 0xa00e, - DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1401/ */ -+ { "Alcatel", 0x1bbb, "OneTouch Idol 3 (MTP)", 0xaf2b, -+ DEVICE_FLAGS_ANDROID_BUGS }, - /* https://sourceforge.net/p/libmtp/feature-requests/114/ */ - { "Alcatel", 0x1bbb, "OneTouch 6034R", 0xf003, - DEVICE_FLAGS_ANDROID_BUGS }, -@@ -2782,8 +2903,12 @@ - * Kyocera - */ - { "Kyocera", 0x0482, "Rise", 0x0571, DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/feature-requests/134/ */ -+ { "Kyocera", 0x0482, "Torque Model E6715", 0x0059a, DEVICE_FLAGS_ANDROID_BUGS }, - /* https://sourceforge.net/p/libmtp/discussion/535190/thread/6270f5ce/ */ - { "Kyocera", 0x0482, "KYL22", 0x0810, DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1345/ */ -+ { "Kyocera", 0x0482, "DuraForce", 0x0979, DEVICE_FLAGS_ANDROID_BUGS }, - - /* - * HiSense -@@ -2798,12 +2923,20 @@ - DEVICE_FLAGS_ANDROID_BUGS }, - { "Hewlett-Packard", 0x03f0, "Slate 7 2800", 0x5d1d, - DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/bugs/1366/ */ -+ { "Hewlett-Packard", 0x03f0, "Slate 10 HD", 0x7e1d, -+ DEVICE_FLAGS_ANDROID_BUGS }, - - /* - * MediaTek Inc. - */ - { "MediaTek Inc", 0x0e8d, "MT5xx and MT6xx SoCs", 0x0050, - DEVICE_FLAGS_ANDROID_BUGS }, -+ { "MediaTek Inc", 0x0e8d, "MT65xx", 0x2008, -+ DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/feature-requests/79/ */ -+ { "MediaTek Inc", 0x0e8d, "Elephone P8000", 0x201d, -+ DEVICE_FLAGS_ANDROID_BUGS }, - - /* - * Jolla -@@ -2860,6 +2993,8 @@ - { "Prestigio", 0x29e4, "5505 DUO ", 0x1103, DEVICE_FLAGS_ANDROID_BUGS }, - /* https://sourceforge.net/p/libmtp/bugs/1243/ */ - { "Prestigio", 0x29e4, "5504 DUO ", 0x1203, DEVICE_FLAGS_ANDROID_BUGS }, -+ /* https://sourceforge.net/p/libmtp/feature-requests/141/ */ -+ { "Prestigio", 0x29e4, "3405 DUO ", 0x3201, DEVICE_FLAGS_ANDROID_BUGS }, - - /* https://sourceforge.net/p/libmtp/bugs/1283/ */ - { "Megafon", 0x201e, "MFLogin3T", 0x42ab, DEVICE_FLAGS_ANDROID_BUGS }, -@@ -2867,6 +3002,8 @@ - /* https://sourceforge.net/p/libmtp/bugs/1287/ */ - { "Gensis", 0x040d, "GT-7305 ", 0x885c, DEVICE_FLAGS_ANDROID_BUGS }, - -+ /* https://sourceforge.net/p/libmtp/support-requests/182/ */ -+ { "Oppo", 0x22d9, "Find 5", 0x2764, DEVICE_FLAGS_ANDROID_BUGS }, - /* https://sourceforge.net/p/libmtp/bugs/1207/ */ - { "Oppo", 0x22d9, "Find 7 (ID 1)", 0x2765, DEVICE_FLAGS_ANDROID_BUGS }, - /* https://sourceforge.net/p/libmtp/bugs/1277/ */ -@@ -2916,6 +3053,14 @@ - /* https://sourceforge.net/p/libmtp/bugs/1314/ */ - { "BenQ", 0x1d45, "F5", 0x459d, DEVICE_FLAGS_ANDROID_BUGS }, - -+ /* https://sourceforge.net/p/libmtp/bugs/1362/ */ -+ { "TomTom", 0x1390, "Rider 40", 0x5455, DEVICE_FLAGS_ANDROID_BUGS }, -+ -+ /* https://sourceforge.net/p/libmtp/feature-requests/135/. guessed android. */ -+ { "OUYA", 0x2836, "Videogame Console", 0x0010, DEVICE_FLAGS_ANDROID_BUGS }, -+ -+ /* https://sourceforge.net/p/libmtp/bugs/1383/ */ -+ { "BLU", 0x0e8d, "Studio HD", 0x2008, DEVICE_FLAGS_ANDROID_BUGS }, - /* - * Other strange stuff. - */ -- cgit v1.2.3 From 2102ae2e30a23b3202f4eeabdc8f37eeb16de691 Mon Sep 17 00:00:00 2001 From: David Craven Date: Wed, 13 Jul 2016 18:13:11 +0200 Subject: gnu: lsh: Move to (gnu packages ssh) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/lsh.scm: Remove. Move 'lsh and liboop' to... * gnu/packages/ssh.scm (liboop, lsh): ... here. New variables. * gnu/services/ssh.scm, gnu/services/base.scm: Adjust accordingly. * gnu/local.mk (GNU_SYSTEM_MODULES): Adjust accordingly. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 - gnu/packages/lsh.scm | 159 -------------------------------------------------- gnu/packages/ssh.scm | 158 +++++++++++++++++++++++++++++++++++++++++++++---- gnu/services/base.scm | 2 +- gnu/services/ssh.scm | 2 +- 5 files changed, 148 insertions(+), 174 deletions(-) delete mode 100644 gnu/packages/lsh.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index d011844074..71409b9735 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -215,7 +215,6 @@ GNU_SYSTEM_MODULES = \ %D%/packages/llvm.scm \ %D%/packages/lout.scm \ %D%/packages/logging.scm \ - %D%/packages/lsh.scm \ %D%/packages/lsof.scm \ %D%/packages/lua.scm \ %D%/packages/lxde.scm \ diff --git a/gnu/packages/lsh.scm b/gnu/packages/lsh.scm deleted file mode 100644 index 2ea1591354..0000000000 --- a/gnu/packages/lsh.scm +++ /dev/null @@ -1,159 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016 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 lsh) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix packages) - #:use-module (guix download) - #:use-module (guix build-system gnu) - #:use-module (gnu packages) - #:use-module (gnu packages m4) - #:use-module (gnu packages linux) - #:use-module (gnu packages nettle) - #:use-module (gnu packages compression) - #:use-module (gnu packages multiprecision) - #:use-module (gnu packages readline) - #:use-module (gnu packages gperf) - #:use-module (gnu packages guile) - #:use-module (gnu packages xorg)) - -(define-public liboop - (package - (name "liboop") - (version "1.0") - (source - (origin - (method url-fetch) - (uri (string-append "http://download.ofb.net/liboop/liboop-" - version ".tar.gz")) - (sha256 - (base32 - "0z6rlalhvfca64jpvksppc9bdhs7jwhiw4y35g5ibvh91xp3rn1l")) - (patches (search-patches "liboop-mips64-deplibs-fix.patch")))) - (build-system gnu-build-system) - (home-page "http://www.lysator.liu.se/liboop/") - (synopsis "Event loop library") - (description "Liboop is a low-level event loop management library for -POSIX-based operating systems. It supports the development of modular, -multiplexed applications which may respond to events from several sources. It -replaces the \"select() loop\" and allows the registration of event handlers -for file and network I/O, timers and signals. Since processes use these -mechanisms for almost all external communication, liboop can be used as the -basis for almost any application.") - (license license:lgpl2.1+))) - -(define-public lsh - (package - (name "lsh") - (version "2.1") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/lsh/lsh-" - version ".tar.gz")) - (sha256 - (base32 - "1qqjy9zfzgny0rkb27c8c7dfsylvb6n0ld8h3an2r83pmaqr9gwb")) - (modules '((guix build utils))) - (snippet - '(begin - (substitute* "src/testsuite/functions.sh" - (("localhost") - ;; Avoid host name lookups since they don't work in - ;; chroot builds. - "127.0.0.1") - (("set -e") - ;; Make tests more verbose. - "set -e\nset -x")) - - (substitute* (find-files "src/testsuite" "-test$") - (("localhost") "127.0.0.1")) - - (substitute* "src/testsuite/login-auth-test" - (("/bin/cat") "cat")))))) - (build-system gnu-build-system) - (native-inputs - `(("m4" ,m4) - ("guile" ,guile-2.0) - ("gperf" ,gperf) - ("psmisc" ,psmisc))) ; for `killall' - (inputs - `(("nettle" ,nettle-2) - ("linux-pam" ,linux-pam) - - ;; 'rl.c' uses the 'CPPFunction' type, which is no longer in - ;; Readline 6.3. - ("readline" ,readline-6.2) - - ("liboop" ,liboop) - ("zlib" ,zlib) - ("gmp" ,gmp) - - ;; The server (lshd) invokes xauth when X11 forwarding is requested. - ;; This adds 24 MiB (or 27%) to the closure of lsh. - ("xauth" ,xauth))) - (arguments - '(;; Skip the `configure' test that checks whether /dev/ptmx & - ;; co. work as expected, because it relies on impurities (for - ;; instance, /dev/pts may be unavailable in chroots.) - #:configure-flags '("lsh_cv_sys_unix98_ptys=yes") - - ;; FIXME: Tests won't run in a chroot, presumably because - ;; /etc/profile is missing, and thus clients get an empty $PATH - ;; and nothing works. - #:tests? #f - - #:phases - (modify-phases %standard-phases - (add-before 'configure 'pre-configure - (lambda* (#:key inputs #:allow-other-keys) - (let* ((nettle (assoc-ref inputs "nettle")) - (sexp-conv (string-append nettle "/bin/sexp-conv"))) - ;; Make sure 'lsh' and 'lshd' pick 'sexp-conv' in the right place - ;; by default. - (substitute* "src/environ.h.in" - (("^#define PATH_SEXP_CONV.*") - (string-append "#define PATH_SEXP_CONV \"" - sexp-conv "\"\n"))) - - ;; Same for the 'lsh-authorize' script. - (substitute* "src/lsh-authorize" - (("=sexp-conv") - (string-append "=" sexp-conv))) - - ;; Tell lshd where 'xauth' lives. Another option would be to - ;; hardcode "/run/current-system/profile/bin/xauth", thereby - ;; reducing the closure size, but that wouldn't work on foreign - ;; distros. - (with-fluids ((%default-port-encoding "ISO-8859-1")) - (substitute* "src/server_x11.c" - (("define XAUTH_PROGRAM.*") - (string-append "define XAUTH_PROGRAM \"" - (assoc-ref inputs "xauth") - "/bin/xauth\"\n"))))) - - ;; Tests rely on $USER being set. - (setenv "USER" "guix")))))) - (home-page "http://www.lysator.liu.se/~nisse/lsh/") - (synopsis "GNU implementation of the Secure Shell (ssh) protocols") - (description - "GNU lsh is a free implementation of the SSH version 2 protocol. It is -used to create a secure line of communication between two computers, -providing shell access to the server system from the client. It provides -both the server daemon and the client application, as well as tools for -manipulating key files.") - (license license:gpl2+))) diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm index c782d4d869..71310ecf94 100644 --- a/gnu/packages/ssh.scm +++ b/gnu/packages/ssh.scm @@ -1,4 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2013, 2014 Andreas Enge ;;; Copyright © 2014, 2015, 2016 Mark H Weaver ;;; Copyright © 2015, 2016 Efraim Flashner @@ -20,27 +21,34 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages ssh) - #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages) + #:use-module (gnu packages autotools) + #:use-module (gnu packages base) + #:autoload (gnu packages boost) (boost) #:use-module (gnu packages compression) + #:use-module (gnu packages elf) #:use-module (gnu packages gnupg) + #:use-module (gnu packages gperf) #:use-module (gnu packages groff) - #:use-module (gnu packages elf) #:use-module (gnu packages guile) - #:use-module (gnu packages pkg-config) - #:use-module (gnu packages autotools) - #:use-module (gnu packages texinfo) - #:use-module (gnu packages perl) + #:use-module (gnu packages linux) + #:use-module (gnu packages m4) + #:use-module (gnu packages multiprecision) #:use-module (gnu packages ncurses) + #:use-module (gnu packages nettle) + #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) #:autoload (gnu packages protobuf) (protobuf) - #:autoload (gnu packages boost) (boost) - #:use-module (gnu packages base) + #:use-module (gnu packages readline) + #:use-module (gnu packages texinfo) #:use-module (gnu packages tls) - #:use-module (gnu packages) - #:use-module (guix packages) + #:use-module (gnu packages xorg) + #:use-module (guix build-system cmake) + #:use-module (guix build-system gnu) #:use-module (guix download) #:use-module (guix git-download) - #:use-module (guix build-system gnu) - #:use-module (guix build-system cmake)) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages)) (define-public libssh (package @@ -355,3 +363,129 @@ client. It runs on a variety of POSIX-based platforms. Dropbear is particularly useful for embedded systems, such as wireless routers.") (home-page "https://matt.ucc.asn.au/dropbear/dropbear.html") (license (license:x11-style "" "See file LICENSE.")))) + +(define-public liboop + (package + (name "liboop") + (version "1.0") + (source + (origin + (method url-fetch) + (uri (string-append "http://download.ofb.net/liboop/liboop-" + version ".tar.gz")) + (sha256 + (base32 + "0z6rlalhvfca64jpvksppc9bdhs7jwhiw4y35g5ibvh91xp3rn1l")) + (patches (search-patches "liboop-mips64-deplibs-fix.patch")))) + (build-system gnu-build-system) + (home-page "http://www.lysator.liu.se/liboop/") + (synopsis "Event loop library") + (description "Liboop is a low-level event loop management library for +POSIX-based operating systems. It supports the development of modular, +multiplexed applications which may respond to events from several sources. It +replaces the \"select() loop\" and allows the registration of event handlers +for file and network I/O, timers and signals. Since processes use these +mechanisms for almost all external communication, liboop can be used as the +basis for almost any application.") + (license license:lgpl2.1+))) + +(define-public lsh + (package + (name "lsh") + (version "2.1") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/lsh/lsh-" + version ".tar.gz")) + (sha256 + (base32 + "1qqjy9zfzgny0rkb27c8c7dfsylvb6n0ld8h3an2r83pmaqr9gwb")) + (modules '((guix build utils))) + (snippet + '(begin + (substitute* "src/testsuite/functions.sh" + (("localhost") + ;; Avoid host name lookups since they don't work in + ;; chroot builds. + "127.0.0.1") + (("set -e") + ;; Make tests more verbose. + "set -e\nset -x")) + + (substitute* (find-files "src/testsuite" "-test$") + (("localhost") "127.0.0.1")) + + (substitute* "src/testsuite/login-auth-test" + (("/bin/cat") "cat")))))) + (build-system gnu-build-system) + (native-inputs + `(("m4" ,m4) + ("guile" ,guile-2.0) + ("gperf" ,gperf) + ("psmisc" ,psmisc))) ; for `killall' + (inputs + `(("nettle" ,nettle-2) + ("linux-pam" ,linux-pam) + + ;; 'rl.c' uses the 'CPPFunction' type, which is no longer in + ;; Readline 6.3. + ("readline" ,readline-6.2) + + ("liboop" ,liboop) + ("zlib" ,zlib) + ("gmp" ,gmp) + + ;; The server (lshd) invokes xauth when X11 forwarding is requested. + ;; This adds 24 MiB (or 27%) to the closure of lsh. + ("xauth" ,xauth))) + (arguments + '(;; Skip the `configure' test that checks whether /dev/ptmx & + ;; co. work as expected, because it relies on impurities (for + ;; instance, /dev/pts may be unavailable in chroots.) + #:configure-flags '("lsh_cv_sys_unix98_ptys=yes") + + ;; FIXME: Tests won't run in a chroot, presumably because + ;; /etc/profile is missing, and thus clients get an empty $PATH + ;; and nothing works. + #:tests? #f + + #:phases + (modify-phases %standard-phases + (add-before 'configure 'pre-configure + (lambda* (#:key inputs #:allow-other-keys) + (let* ((nettle (assoc-ref inputs "nettle")) + (sexp-conv (string-append nettle "/bin/sexp-conv"))) + ;; Make sure 'lsh' and 'lshd' pick 'sexp-conv' in the right place + ;; by default. + (substitute* "src/environ.h.in" + (("^#define PATH_SEXP_CONV.*") + (string-append "#define PATH_SEXP_CONV \"" + sexp-conv "\"\n"))) + + ;; Same for the 'lsh-authorize' script. + (substitute* "src/lsh-authorize" + (("=sexp-conv") + (string-append "=" sexp-conv))) + + ;; Tell lshd where 'xauth' lives. Another option would be to + ;; hardcode "/run/current-system/profile/bin/xauth", thereby + ;; reducing the closure size, but that wouldn't work on foreign + ;; distros. + (with-fluids ((%default-port-encoding "ISO-8859-1")) + (substitute* "src/server_x11.c" + (("define XAUTH_PROGRAM.*") + (string-append "define XAUTH_PROGRAM \"" + (assoc-ref inputs "xauth") + "/bin/xauth\"\n"))))) + + ;; Tests rely on $USER being set. + (setenv "USER" "guix")))))) + (home-page "http://www.lysator.liu.se/~nisse/lsh/") + (synopsis "GNU implementation of the Secure Shell (ssh) protocols") + (description + "GNU lsh is a free implementation of the SSH version 2 protocol. It is +used to create a secure line of communication between two computers, +providing shell access to the server system from the client. It provides +both the server daemon and the client application, as well as tools for +manipulating key files.") + (license license:gpl2+))) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 02e3b41904..c9c2594533 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -36,7 +36,7 @@ #:use-module ((gnu packages base) #:select (canonical-package glibc)) #:use-module (gnu packages package-management) - #:use-module (gnu packages lsh) + #:use-module (gnu packages ssh) #:use-module (gnu packages lsof) #:use-module ((gnu build file-systems) #:select (mount-flags->bit-mask)) diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm index 33e1951a6e..1eb9382a84 100644 --- a/gnu/services/ssh.scm +++ b/gnu/services/ssh.scm @@ -22,7 +22,7 @@ #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu system pam) - #:use-module (gnu packages lsh) + #:use-module (gnu packages ssh) #:use-module (srfi srfi-26) #:export (lsh-service)) -- cgit v1.2.3 From a1537ac2bae1d7eae39188317daf1186a673e6a2 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Fri, 15 Jul 2016 14:48:09 -0400 Subject: gnu: gd: Fix CVE-2016-{5766,6128,6132,6214}. * gnu/packages/patches/gd-CVE-2016-5766.patch, gnu/packages/patches/gd-CVE-2016-6128.patch, gnu/packages/patches/gd-CVE-2016-6132.patch, gnu/packages/patches/gd-CVE-2016-6214.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/gd.scm (gd): Use patches. --- gnu/local.mk | 4 + gnu/packages/gd.scm | 4 + gnu/packages/patches/gd-CVE-2016-5766.patch | 81 +++++++++ gnu/packages/patches/gd-CVE-2016-6128.patch | 253 ++++++++++++++++++++++++++++ gnu/packages/patches/gd-CVE-2016-6132.patch | 55 ++++++ gnu/packages/patches/gd-CVE-2016-6214.patch | 66 ++++++++ 6 files changed, 463 insertions(+) create mode 100644 gnu/packages/patches/gd-CVE-2016-5766.patch create mode 100644 gnu/packages/patches/gd-CVE-2016-6128.patch create mode 100644 gnu/packages/patches/gd-CVE-2016-6132.patch create mode 100644 gnu/packages/patches/gd-CVE-2016-6214.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 71409b9735..536ecef4ea 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -510,6 +510,10 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-cross-environment-variables.patch \ %D%/packages/patches/gcc-libvtv-runpath.patch \ %D%/packages/patches/gcc-5.0-libvtv-runpath.patch \ + %D%/packages/patches/gd-CVE-2016-5766.patch \ + %D%/packages/patches/gd-CVE-2016-6128.patch \ + %D%/packages/patches/gd-CVE-2016-6132.patch \ + %D%/packages/patches/gd-CVE-2016-6214.patch \ %D%/packages/patches/gegl-CVE-2012-4433.patch \ %D%/packages/patches/geoclue-config.patch \ %D%/packages/patches/ghostscript-CVE-2015-3228.patch \ diff --git a/gnu/packages/gd.scm b/gnu/packages/gd.scm index b4e634969e..700de33a7a 100644 --- a/gnu/packages/gd.scm +++ b/gnu/packages/gd.scm @@ -47,6 +47,10 @@ (uri (string-append "https://github.com/libgd/libgd/releases/download/gd-" version "/libgd-" version ".tar.xz")) + (patches (search-patches "gd-CVE-2016-5766.patch" + "gd-CVE-2016-6128.patch" + "gd-CVE-2016-6132.patch" + "gd-CVE-2016-6214.patch")) (sha256 (base32 "1311g5mva2xlzqv3rjqjc4jjkn5lzls4skvr395h633zw1n7b7s8")))) diff --git a/gnu/packages/patches/gd-CVE-2016-5766.patch b/gnu/packages/patches/gd-CVE-2016-5766.patch new file mode 100644 index 0000000000..400cb0ab48 --- /dev/null +++ b/gnu/packages/patches/gd-CVE-2016-5766.patch @@ -0,0 +1,81 @@ +Fix CVE-2016-5766 (Integer Overflow in _gd2GetHeader() resulting in heap +overflow). + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-5766 + +Adapted from upstream commits: +https://github.com/libgd/libgd/commit/aba3db8ba159465ecec1089027a24835a6da9cc0 +https://github.com/libgd/libgd/commit/a6a0e7feabb2a9738086a5dc96348f233c87fa79 + +Since `patch` cannot apply Git binary diffs, we omit the addition of +'tests/gd2/php_bug_72339.c' and its associated binary data. + +From aba3db8ba159465ecec1089027a24835a6da9cc0 Mon Sep 17 00:00:00 2001 +From: Pierre Joye +Date: Tue, 28 Jun 2016 16:23:42 +0700 +Subject: [PATCH] fix php bug 72339 (CVE-2016-5766), Integer Overflow in + _gd2GetHeader() resulting in heap overflow + +--- + src/gd_gd2.c | 5 ++++- + tests/gd2/CMakeLists.txt | 1 + + tests/gd2/Makemodule.am | 6 ++++-- + tests/gd2/php_bug_72339.c | 21 +++++++++++++++++++++ + tests/gd2/php_bug_72339_exp.gd2 | Bin 0 -> 67108882 bytes + 5 files changed, 30 insertions(+), 3 deletions(-) + create mode 100644 tests/gd2/php_bug_72339.c + create mode 100644 tests/gd2/php_bug_72339_exp.gd2 + +diff --git a/src/gd_gd2.c b/src/gd_gd2.c +index fd1e0c9..bdbbecf 100644 +--- a/src/gd_gd2.c ++++ b/src/gd_gd2.c +@@ -154,8 +154,11 @@ _gd2GetHeader (gdIOCtxPtr in, int *sx, int *sy, + nc = (*ncx) * (*ncy); + GD2_DBG (printf ("Reading %d chunk index entries\n", nc)); + sidx = sizeof (t_chunk_info) * nc; ++ if (overflow2(sidx, nc)) { ++ goto fail1; ++ } + cidx = gdCalloc (sidx, 1); +- if (!cidx) { ++ if (cidx == NULL) { + goto fail1; + } + for (i = 0; i < nc; i++) { +From a6a0e7feabb2a9738086a5dc96348f233c87fa79 Mon Sep 17 00:00:00 2001 +From: Pierre Joye +Date: Wed, 29 Jun 2016 09:36:26 +0700 +Subject: [PATCH] fix php bug 72339 (CVE-2016-5766), Integer Overflow in + _gd2GetHeader() resulting in heap overflow. Sync with php's sync + +--- + src/gd_gd2.c | 7 ++++++- + tests/gd2/php_bug_72339.c | 2 +- + 2 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/src/gd_gd2.c b/src/gd_gd2.c +index bdbbecf..2837456 100644 +--- a/src/gd_gd2.c ++++ b/src/gd_gd2.c +@@ -152,11 +152,16 @@ _gd2GetHeader (gdIOCtxPtr in, int *sx, int *sy, + + if (gd2_compressed (*fmt)) { + nc = (*ncx) * (*ncy); ++ + GD2_DBG (printf ("Reading %d chunk index entries\n", nc)); ++ if (overflow2(sizeof(t_chunk_info), nc)) { ++ goto fail1; ++ } + sidx = sizeof (t_chunk_info) * nc; +- if (overflow2(sidx, nc)) { ++ if (sidx <= 0) { + goto fail1; + } ++ + cidx = gdCalloc (sidx, 1); + if (cidx == NULL) { + goto fail1; +-- +2.9.1 + diff --git a/gnu/packages/patches/gd-CVE-2016-6128.patch b/gnu/packages/patches/gd-CVE-2016-6128.patch new file mode 100644 index 0000000000..45ee6b0cfa --- /dev/null +++ b/gnu/packages/patches/gd-CVE-2016-6128.patch @@ -0,0 +1,253 @@ +Fix CVE-2016-6128 (invalid color index is not properly handled leading +to denial of service). + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=2016-6128 + +Copied from upstream commits: +https://github.com/libgd/libgd/compare/3fe0a7128bac5000fdcfab888bd2a75ec0c9447d...fd623025505e87bba7ec8555eeb72dae4fb0afd + +From 1ccfe21e14c4d18336f9da8515cd17db88c3de61 Mon Sep 17 00:00:00 2001 +From: Pierre Joye +Date: Mon, 27 Jun 2016 11:17:39 +0700 +Subject: [PATCH 1/8] fix php 72494, invalid color index not handled, can lead + to crash + +--- + src/gd_crop.c | 4 ++++ + tests/CMakeLists.txt | 1 + + tests/Makefile.am | 1 + + 3 files changed, 6 insertions(+) + +diff --git a/src/gd_crop.c b/src/gd_crop.c +index 0296633..532b49b 100644 +--- a/src/gd_crop.c ++++ b/src/gd_crop.c +@@ -136,6 +136,10 @@ BGD_DECLARE(gdImagePtr) gdImageCropThreshold(gdImagePtr im, const unsigned int c + return NULL; + } + ++ if (color < 0 || (!gdImageTrueColor(im) && color >= gdImageColorsTotal(im))) { ++ return NULL; ++ } ++ + /* TODO: Add gdImageGetRowPtr and works with ptr at the row level + * for the true color and palette images + * new formats will simply work with ptr +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 6f5c786..5093d52 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -31,6 +31,7 @@ if (BUILD_TEST) + gdimagecolortransparent + gdimagecopy + gdimagecopyrotated ++ gdimagecrop + gdimagefile + gdimagefill + gdimagefilledellipse +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 4f6e756..5a0ebe8 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -25,6 +25,7 @@ include gdimagecolorresolve/Makemodule.am + include gdimagecolortransparent/Makemodule.am + include gdimagecopy/Makemodule.am + include gdimagecopyrotated/Makemodule.am ++include gdimagecrop/Makemodule.am + include gdimagefile/Makemodule.am + include gdimagefill/Makemodule.am + include gdimagefilledellipse/Makemodule.am +-- +2.9.1 + +From 8c9f39c7cb1f62ea00bc7a48aff64d3811c2d6d0 Mon Sep 17 00:00:00 2001 +From: Pierre Joye +Date: Mon, 27 Jun 2016 11:20:07 +0700 +Subject: [PATCH 2/8] fix php 72494, invalid color index not handled, can lead + to crash + +--- + tests/gdimagecrop/.gitignore | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 tests/gdimagecrop/.gitignore + +diff --git a/tests/gdimagecrop/.gitignore b/tests/gdimagecrop/.gitignore +new file mode 100644 +index 0000000..8e8c9c3 +--- /dev/null ++++ b/tests/gdimagecrop/.gitignore +@@ -0,0 +1 @@ ++/php_bug_72494 +-- +2.9.1 + +From 8de370b7b6263a02268037a7cd13ddd991b43ea9 Mon Sep 17 00:00:00 2001 +From: Pierre Joye +Date: Mon, 27 Jun 2016 11:24:50 +0700 +Subject: [PATCH 3/8] fix php 72494, invalid color index not handled, can lead + to crash + +--- + tests/gdimagecrop/CMakeLists.txt | 5 +++++ + 1 file changed, 5 insertions(+) + create mode 100644 tests/gdimagecrop/CMakeLists.txt + +diff --git a/tests/gdimagecrop/CMakeLists.txt b/tests/gdimagecrop/CMakeLists.txt +new file mode 100644 +index 0000000..f7e4c7e +--- /dev/null ++++ b/tests/gdimagecrop/CMakeLists.txt +@@ -0,0 +1,5 @@ ++SET(TESTS_FILES ++ php_bug_72494 ++) ++ ++ADD_GD_TESTS() +-- +2.9.1 + +From bca12e4e11ecda8a0ea719472700ad5c2b36a0d6 Mon Sep 17 00:00:00 2001 +From: Pierre Joye +Date: Mon, 27 Jun 2016 11:25:12 +0700 +Subject: [PATCH 4/8] fix php 72494, invalid color index not handled, can lead + to crash + +--- + tests/gdimagecrop/Makemodule.am | 5 +++++ + 1 file changed, 5 insertions(+) + create mode 100644 tests/gdimagecrop/Makemodule.am + +diff --git a/tests/gdimagecrop/Makemodule.am b/tests/gdimagecrop/Makemodule.am +new file mode 100644 +index 0000000..210888b +--- /dev/null ++++ b/tests/gdimagecrop/Makemodule.am +@@ -0,0 +1,5 @@ ++libgd_test_programs += \ ++ gdimagecrop/php_bug_72494 ++ ++EXTRA_DIST += \ ++ gdimagecrop/CMakeLists.txt +-- +2.9.1 + +From 6ff72ae40c7c20ece939afb362d98cc37f4a1c96 Mon Sep 17 00:00:00 2001 +From: Pierre Joye +Date: Mon, 27 Jun 2016 11:25:40 +0700 +Subject: [PATCH 5/8] fix php 72494, invalid color index not handled, can lead + to crash + +--- + tests/gdimagecrop/php_bug_72494.c | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + create mode 100644 tests/gdimagecrop/php_bug_72494.c + +diff --git a/tests/gdimagecrop/php_bug_72494.c b/tests/gdimagecrop/php_bug_72494.c +new file mode 100644 +index 0000000..adaa379 +--- /dev/null ++++ b/tests/gdimagecrop/php_bug_72494.c +@@ -0,0 +1,23 @@ ++#include ++#include ++#include "gd.h" ++ ++#include "gdtest.h" ++ ++int main() ++{ ++ gdImagePtr im, exp; ++ int error = 0; ++ ++ im = gdImageCreate(50, 50); ++ ++ if (!im) { ++ gdTestErrorMsg("gdImageCreate failed.\n"); ++ return 1; ++ } ++ ++ gdImageCropThreshold(im, 1337, 0); ++ gdImageDestroy(im); ++ /* this bug tests a crash, it never reaches this point if the bug exists*/ ++ return 0; ++} +-- +2.9.1 + +From a0f9f8f7bd0d3a6c6afd6d180b8e75d93aadddfa Mon Sep 17 00:00:00 2001 +From: Pierre Joye +Date: Mon, 27 Jun 2016 11:38:07 +0700 +Subject: [PATCH 6/8] fix php 72494, CID 149753, color is unsigned int, remove + useless <0 comparison + +--- + src/gd_crop.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/gd_crop.c b/src/gd_crop.c +index 532b49b..d51ad67 100644 +--- a/src/gd_crop.c ++++ b/src/gd_crop.c +@@ -136,7 +136,7 @@ BGD_DECLARE(gdImagePtr) gdImageCropThreshold(gdImagePtr im, const unsigned int c + return NULL; + } + +- if (color < 0 || (!gdImageTrueColor(im) && color >= gdImageColorsTotal(im))) { ++ if (!gdImageTrueColor(im) && color >= gdImageColorsTotal(im)) { + return NULL; + } + +-- +2.9.1 + +From 907115fbb980862934d0de91af4977a216745039 Mon Sep 17 00:00:00 2001 +From: Pierre Joye +Date: Mon, 27 Jun 2016 11:51:40 +0700 +Subject: [PATCH 7/8] fix php 72494, CID 149753, color is unsigned int, remove + useless <0 comparison + +--- + tests/gdimagecrop/php_bug_72494.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/gdimagecrop/php_bug_72494.c b/tests/gdimagecrop/php_bug_72494.c +index adaa379..5cb589b 100644 +--- a/tests/gdimagecrop/php_bug_72494.c ++++ b/tests/gdimagecrop/php_bug_72494.c +@@ -6,7 +6,7 @@ + + int main() + { +- gdImagePtr im, exp; ++ gdImagePtr im; + int error = 0; + + im = gdImageCreate(50, 50); +-- +2.9.1 + +From fd623025505e87bba7ec8555eeb72dae4fb0afdc Mon Sep 17 00:00:00 2001 +From: Pierre Joye +Date: Mon, 27 Jun 2016 12:04:25 +0700 +Subject: [PATCH 8/8] fix php 72494, CID 149753, color is unsigned int, remove + useless <0 comparison + +--- + tests/gdimagecrop/php_bug_72494.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tests/gdimagecrop/php_bug_72494.c b/tests/gdimagecrop/php_bug_72494.c +index 5cb589b..3bd19be 100644 +--- a/tests/gdimagecrop/php_bug_72494.c ++++ b/tests/gdimagecrop/php_bug_72494.c +@@ -7,7 +7,6 @@ + int main() + { + gdImagePtr im; +- int error = 0; + + im = gdImageCreate(50, 50); + +-- +2.9.1 + diff --git a/gnu/packages/patches/gd-CVE-2016-6132.patch b/gnu/packages/patches/gd-CVE-2016-6132.patch new file mode 100644 index 0000000000..4c475b71b2 --- /dev/null +++ b/gnu/packages/patches/gd-CVE-2016-6132.patch @@ -0,0 +1,55 @@ +Fix CVE-2016-6132 (read out-of-bounds when parsing TGA files). + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=2016-6132 + +Copied from upstream commit: +https://github.com/libgd/libgd/commit/ead349e99868303b37f5e6e9d9d680c9dc71ff8d + +From ead349e99868303b37f5e6e9d9d680c9dc71ff8d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= +Date: Tue, 12 Jul 2016 11:24:09 +0200 +Subject: [PATCH] Fix #247, A read out-of-bands was found in the parsing of TGA + files (CVE-2016-6132) + +--- + src/gd_tga.c | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +diff --git a/src/gd_tga.c b/src/gd_tga.c +index ef20f86..20fe2d2 100644 +--- a/src/gd_tga.c ++++ b/src/gd_tga.c +@@ -237,7 +237,11 @@ int read_image_tga( gdIOCtx *ctx, oTga *tga ) + return -1; + } + +- gdGetBuf(conversion_buffer, image_block_size, ctx); ++ if (gdGetBuf(conversion_buffer, image_block_size, ctx) != image_block_size) { ++ gd_error("gd-tga: premature end of image data\n"); ++ gdFree(conversion_buffer); ++ return -1; ++ } + + while (buffer_caret < image_block_size) { + tga->bitmap[buffer_caret] = (int) conversion_buffer[buffer_caret]; +@@ -257,11 +261,16 @@ int read_image_tga( gdIOCtx *ctx, oTga *tga ) + } + conversion_buffer = (unsigned char *) gdMalloc(image_block_size * sizeof(unsigned char)); + if (conversion_buffer == NULL) { ++ gd_error("gd-tga: premature end of image data\n"); + gdFree( decompression_buffer ); + return -1; + } + +- gdGetBuf( conversion_buffer, image_block_size, ctx ); ++ if (gdGetBuf(conversion_buffer, image_block_size, ctx) != image_block_size) { ++ gdFree(conversion_buffer); ++ gdFree(decompression_buffer); ++ return -1; ++ } + + buffer_caret = 0; + +-- +2.9.1 + diff --git a/gnu/packages/patches/gd-CVE-2016-6214.patch b/gnu/packages/patches/gd-CVE-2016-6214.patch new file mode 100644 index 0000000000..7894a32bb1 --- /dev/null +++ b/gnu/packages/patches/gd-CVE-2016-6214.patch @@ -0,0 +1,66 @@ +Fix CVE-2016-6214 (read out-of-bounds when parsing TGA files). + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-6214 + +Adapted from upstream commit: +https://github.com/libgd/libgd/commit/341aa68843ceceae9ba6e083431f14a07bd92308 + +Since `patch` cannot apply Git binary diffs, we omit the addition of +'tests/tga/bug00247a.c' and its associated binary data. + +From 341aa68843ceceae9ba6e083431f14a07bd92308 Mon Sep 17 00:00:00 2001 +From: "Christoph M. Becker" +Date: Tue, 12 Jul 2016 19:23:13 +0200 +Subject: [PATCH] Unsupported TGA bpp/alphabit combinations should error + gracefully + +Currently, only 24bpp without alphabits and 32bpp with 8 alphabits are +really supported. All other combinations will be rejected with a warning. + +(cherry picked from commit cb1a0b7e54e9aa118270c23a4a6fe560e4590dc9) +--- + src/gd_tga.c | 16 ++++++---------- + tests/tga/.gitignore | 1 + + tests/tga/CMakeLists.txt | 1 + + tests/tga/Makemodule.am | 4 +++- + tests/tga/bug00247a.c | 19 +++++++++++++++++++ + tests/tga/bug00247a.tga | Bin 0 -> 36 bytes + 6 files changed, 30 insertions(+), 11 deletions(-) + create mode 100644 tests/tga/bug00247a.c + create mode 100644 tests/tga/bug00247a.tga + +diff --git a/src/gd_tga.c b/src/gd_tga.c +index 20fe2d2..b4f8fa6 100644 +--- a/src/gd_tga.c ++++ b/src/gd_tga.c +@@ -99,7 +99,7 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromTgaCtx(gdIOCtx* ctx) + if (tga->bits == TGA_BPP_24) { + *tpix = gdTrueColor(tga->bitmap[bitmap_caret + 2], tga->bitmap[bitmap_caret + 1], tga->bitmap[bitmap_caret]); + bitmap_caret += 3; +- } else if (tga->bits == TGA_BPP_32 || tga->alphabits) { ++ } else if (tga->bits == TGA_BPP_32 && tga->alphabits) { + register int a = tga->bitmap[bitmap_caret + 3]; + + *tpix = gdTrueColorAlpha(tga->bitmap[bitmap_caret + 2], tga->bitmap[bitmap_caret + 1], tga->bitmap[bitmap_caret], gdAlphaMax - (a >> 1)); +@@ -159,16 +159,12 @@ int read_header_tga(gdIOCtx *ctx, oTga *tga) + printf("wxh: %i %i\n", tga->width, tga->height); + #endif + +- switch(tga->bits) { +- case 8: +- case 16: +- case 24: +- case 32: +- break; +- default: +- gd_error("bps %i not supported", tga->bits); ++ if (!((tga->bits == TGA_BPP_24 && tga->alphabits == 0) ++ || (tga->bits == TGA_BPP_32 && tga->alphabits == 8))) ++ { ++ gd_error_ex(GD_WARNING, "gd-tga: %u bits per pixel with %u alpha bits not supported\n", ++ tga->bits, tga->alphabits); + return -1; +- break; + } + + tga->ident = NULL; -- cgit v1.2.3 From 1d14bf9f5ff43ff9097f1c5e1e2d37528eb74971 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sun, 17 Jul 2016 13:07:35 -0400 Subject: gnu: gnutls: Fix test failure. * gnu/packages/patches/gnutls-fix-stale-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/tls.scm (gnutls)[replacement]: New field. (gnutls/fixed): New variable. --- gnu/local.mk | 1 + gnu/packages/patches/gnutls-fix-stale-test.patch | 50 ++++++++++++++++++++++++ gnu/packages/tls.scm | 8 ++++ 3 files changed, 59 insertions(+) create mode 100644 gnu/packages/patches/gnutls-fix-stale-test.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 536ecef4ea..ef2eb0b173 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -533,6 +533,7 @@ dist_patch_DATA = \ %D%/packages/patches/gmp-faulty-test.patch \ %D%/packages/patches/gnome-tweak-tool-search-paths.patch \ %D%/packages/patches/gnucash-price-quotes-perl.patch \ + %D%/packages/patches/gnutls-fix-stale-test.patch \ %D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \ %D%/packages/patches/gobject-introspection-cc.patch \ %D%/packages/patches/gobject-introspection-girepository.patch \ diff --git a/gnu/packages/patches/gnutls-fix-stale-test.patch b/gnu/packages/patches/gnutls-fix-stale-test.patch new file mode 100644 index 0000000000..abb547a4d9 --- /dev/null +++ b/gnu/packages/patches/gnutls-fix-stale-test.patch @@ -0,0 +1,50 @@ +A certificate used in the GnuTLS test suite has expired, causing the +test suite to fail. + +The effect of this patch depends on whether or not the datefudge program +is available. If it is, then it is used to change the date in the test +environment. If it is not, then the test is skipped. + +At the time this patch was added to Guix, datefudge was not available, +so the test is skipped. + +Taken from upstream commit: +https://gitlab.com/gnutls/gnutls/commit/47f25d9e08d4e102572804a2aed186b01db23c65 + +From 47f25d9e08d4e102572804a2aed186b01db23c65 Mon Sep 17 00:00:00 2001 +From: Nikos Mavrogiannopoulos +Date: Wed, 29 Jun 2016 17:31:13 +0200 +Subject: [PATCH] tests: use datefudge in name-constraints test + +This avoids the expiration of the used certificate to affect the test. +--- + tests/cert-tests/name-constraints | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/tests/cert-tests/name-constraints b/tests/cert-tests/name-constraints +index 05d6e9b..59af00f 100755 +--- a/tests/cert-tests/name-constraints ++++ b/tests/cert-tests/name-constraints +@@ -28,7 +28,18 @@ if ! test -z "${VALGRIND}"; then + fi + TMPFILE=tmp.$$.pem + +-${VALGRIND} "${CERTTOOL}" -e --infile "${srcdir}/name-constraints-ip.pem" ++export TZ="UTC" ++ ++# Check for datefudge ++TSTAMP=`datefudge -s "2006-09-23" date -u +%s || true` ++if test "$TSTAMP" != "1158969600"; then ++ echo $TSTAMP ++ echo "You need datefudge to run this test" ++ exit 77 ++fi ++ ++datefudge -s "2016-04-22" \ ++ ${VALGRIND} "${CERTTOOL}" -e --infile "${srcdir}/name-constraints-ip.pem" + rc=$? + + if test "${rc}" != "0"; then +-- +2.9.1 + diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index bdc1d7c997..6ba1776636 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -122,6 +122,7 @@ living in the same process.") (define-public gnutls (package (name "gnutls") + (replacement gnutls/fixed) (version "3.4.7") (source (origin (method url-fetch) @@ -194,6 +195,13 @@ required structures.") (properties '((ftp-server . "ftp.gnutls.org") (ftp-directory . "/gcrypt/gnutls"))))) +(define-public gnutls/fixed + (package + (inherit gnutls) + (source (origin + (inherit (package-source gnutls)) + (patches (search-patches "gnutls-fix-stale-test.patch")))))) + (define-public openssl (package (name "openssl") -- cgit v1.2.3 From 273260646d90bbe78aaf2f07bc22723818201fe9 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Mon, 18 Jul 2016 12:32:19 -0400 Subject: gnu: gd: Fix failing test on i686. * gnu/packages/patches/gd-fix-test-on-i686.patch: New file. * gnu/local.mk (dist_PATCH_DATA): Add it. * gnu/packages/gd.scm (gd)[source]: Add the patch. --- gnu/local.mk | 1 + gnu/packages/gd.scm | 5 ++-- gnu/packages/patches/gd-fix-test-on-i686.patch | 34 ++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/gd-fix-test-on-i686.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index ef2eb0b173..3257a326d2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -514,6 +514,7 @@ dist_patch_DATA = \ %D%/packages/patches/gd-CVE-2016-6128.patch \ %D%/packages/patches/gd-CVE-2016-6132.patch \ %D%/packages/patches/gd-CVE-2016-6214.patch \ + %D%/packages/patches/gd-fix-test-on-i686.patch \ %D%/packages/patches/gegl-CVE-2012-4433.patch \ %D%/packages/patches/geoclue-config.patch \ %D%/packages/patches/ghostscript-CVE-2015-3228.patch \ diff --git a/gnu/packages/gd.scm b/gnu/packages/gd.scm index 700de33a7a..3313ee68f2 100644 --- a/gnu/packages/gd.scm +++ b/gnu/packages/gd.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2016 Ludovic Courtès -;;; Copyright © 2015 Mark H Weaver +;;; Copyright © 2015, 2016 Mark H Weaver ;;; Copyright © 2015 Eric Bavier ;;; Copyright © 2016 Leo Famulari ;;; @@ -47,7 +47,8 @@ (uri (string-append "https://github.com/libgd/libgd/releases/download/gd-" version "/libgd-" version ".tar.xz")) - (patches (search-patches "gd-CVE-2016-5766.patch" + (patches (search-patches "gd-fix-test-on-i686.patch" + "gd-CVE-2016-5766.patch" "gd-CVE-2016-6128.patch" "gd-CVE-2016-6132.patch" "gd-CVE-2016-6214.patch")) diff --git a/gnu/packages/patches/gd-fix-test-on-i686.patch b/gnu/packages/patches/gd-fix-test-on-i686.patch new file mode 100644 index 0000000000..6dd2e0fb03 --- /dev/null +++ b/gnu/packages/patches/gd-fix-test-on-i686.patch @@ -0,0 +1,34 @@ +Disable part of the gdimagerotate test on architectures such as i686 +where intermediate floating-point operations are done with 80-bit long +doubles, and typically later rounded to 64-bit doubles. This double +rounding causes small differences in the resulting pixel values +compared with other architectures, causing the image comparison to +fail. + +Patch by Mark H Weaver . + +--- libgd-2.2.2/tests/gdimagerotate/bug00067.c 1969-12-31 19:00:00.000000000 -0500 ++++ libgd-2.2.2/tests/gdimagerotate/bug00067.c 2016-07-18 12:19:19.885423132 -0400 +@@ -1,5 +1,6 @@ + #include + #include ++#include + #include "gd.h" + + #include "gdtest.h" +@@ -41,6 +42,7 @@ + return 1; + } + ++#if FLT_EVAL_METHOD != 2 + sprintf(filename, "bug00067_%03d_exp.png", angle); + path = gdTestFilePath2("gdimagerotate", filename); + if (!gdAssertImageEqualsToFile(path, exp)) { +@@ -48,6 +50,7 @@ + error += 1; + } + free(path); ++#endif + + gdImageDestroy(exp); + } -- cgit v1.2.3 From 2d656a93db5e5c67c47fe8a9cca44ca5fb2a4edf Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 18 Jul 2016 12:47:13 -0400 Subject: Revert "gnu: gnutls: Fix test failure." This reverts commit 1d14bf9f5ff43ff9097f1c5e1e2d37528eb74971. --- gnu/local.mk | 1 - gnu/packages/patches/gnutls-fix-stale-test.patch | 50 ------------------------ gnu/packages/tls.scm | 8 ---- 3 files changed, 59 deletions(-) delete mode 100644 gnu/packages/patches/gnutls-fix-stale-test.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 3257a326d2..d44a52be95 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -534,7 +534,6 @@ dist_patch_DATA = \ %D%/packages/patches/gmp-faulty-test.patch \ %D%/packages/patches/gnome-tweak-tool-search-paths.patch \ %D%/packages/patches/gnucash-price-quotes-perl.patch \ - %D%/packages/patches/gnutls-fix-stale-test.patch \ %D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \ %D%/packages/patches/gobject-introspection-cc.patch \ %D%/packages/patches/gobject-introspection-girepository.patch \ diff --git a/gnu/packages/patches/gnutls-fix-stale-test.patch b/gnu/packages/patches/gnutls-fix-stale-test.patch deleted file mode 100644 index abb547a4d9..0000000000 --- a/gnu/packages/patches/gnutls-fix-stale-test.patch +++ /dev/null @@ -1,50 +0,0 @@ -A certificate used in the GnuTLS test suite has expired, causing the -test suite to fail. - -The effect of this patch depends on whether or not the datefudge program -is available. If it is, then it is used to change the date in the test -environment. If it is not, then the test is skipped. - -At the time this patch was added to Guix, datefudge was not available, -so the test is skipped. - -Taken from upstream commit: -https://gitlab.com/gnutls/gnutls/commit/47f25d9e08d4e102572804a2aed186b01db23c65 - -From 47f25d9e08d4e102572804a2aed186b01db23c65 Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Wed, 29 Jun 2016 17:31:13 +0200 -Subject: [PATCH] tests: use datefudge in name-constraints test - -This avoids the expiration of the used certificate to affect the test. ---- - tests/cert-tests/name-constraints | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -diff --git a/tests/cert-tests/name-constraints b/tests/cert-tests/name-constraints -index 05d6e9b..59af00f 100755 ---- a/tests/cert-tests/name-constraints -+++ b/tests/cert-tests/name-constraints -@@ -28,7 +28,18 @@ if ! test -z "${VALGRIND}"; then - fi - TMPFILE=tmp.$$.pem - --${VALGRIND} "${CERTTOOL}" -e --infile "${srcdir}/name-constraints-ip.pem" -+export TZ="UTC" -+ -+# Check for datefudge -+TSTAMP=`datefudge -s "2006-09-23" date -u +%s || true` -+if test "$TSTAMP" != "1158969600"; then -+ echo $TSTAMP -+ echo "You need datefudge to run this test" -+ exit 77 -+fi -+ -+datefudge -s "2016-04-22" \ -+ ${VALGRIND} "${CERTTOOL}" -e --infile "${srcdir}/name-constraints-ip.pem" - rc=$? - - if test "${rc}" != "0"; then --- -2.9.1 - diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 6ba1776636..bdc1d7c997 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -122,7 +122,6 @@ living in the same process.") (define-public gnutls (package (name "gnutls") - (replacement gnutls/fixed) (version "3.4.7") (source (origin (method url-fetch) @@ -195,13 +194,6 @@ required structures.") (properties '((ftp-server . "ftp.gnutls.org") (ftp-directory . "/gcrypt/gnutls"))))) -(define-public gnutls/fixed - (package - (inherit gnutls) - (source (origin - (inherit (package-source gnutls)) - (patches (search-patches "gnutls-fix-stale-test.patch")))))) - (define-public openssl (package (name "openssl") -- cgit v1.2.3 From 3b956a3392fc277e80ffe0477592c1d00664f513 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Thu, 7 Jul 2016 00:06:44 -0500 Subject: gnu: llvm: Update to 3.8.1. * gnu/packages/llvm.scm (llvm, clang-runtime, clang): Update to 3.8.1. (llvm-3.7, clang-runtime-3.7, clang-3.7): New variables. (clang-runtime-from-llvm)[arguments]: Disable tests, which were not being run for previous versions anyhow but now fail hard. (clang-from-llvm): Add #:patches keyword argument. * gnu/packages/patches/clang-3.8-libc-search-path.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add it. Co-authored-by: Dennis Mungai --- gnu/local.mk | 1 + gnu/packages/llvm.scm | 37 +++++++++--- .../patches/clang-3.8-libc-search-path.patch | 69 ++++++++++++++++++++++ 3 files changed, 100 insertions(+), 7 deletions(-) create mode 100644 gnu/packages/patches/clang-3.8-libc-search-path.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index d44a52be95..5e32d872b8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -452,6 +452,7 @@ dist_patch_DATA = \ %D%/packages/patches/cdparanoia-fpic.patch \ %D%/packages/patches/chmlib-inttypes.patch \ %D%/packages/patches/clang-libc-search-path.patch \ + %D%/packages/patches/clang-3.8-libc-search-path.patch \ %D%/packages/patches/clucene-pkgconfig.patch \ %D%/packages/patches/cmake-fix-tests.patch \ %D%/packages/patches/cpio-gets-undeclared.patch \ diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 65b0ef38ca..beb09fa86e 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -38,7 +38,7 @@ (define-public llvm (package (name "llvm") - (version "3.7.1") + (version "3.8.1") (source (origin (method url-fetch) @@ -46,7 +46,7 @@ version "/llvm-" version ".src.tar.xz")) (sha256 (base32 - "1masakdp9g2dan1yrazg7md5am2vacbkb3nahb3dchpc1knr8xxy")))) + "1ybmnid4pw2hxn12ax5qa5kl1ldfns0njg8533y3mzslvd5cx0kf")))) (build-system cmake-build-system) (native-inputs `(("python" ,python-2) ;bytes->str conversion in clang>=3.7 needs python-2 @@ -85,8 +85,8 @@ of programming tools as well as libraries with equivalent functionality.") `(("llvm" ,llvm))) (arguments `(;; Don't use '-g' during the build to save space. - #:build-type "Release")) - + #:build-type "Release" + #:tests? #f)) ; Tests require gtest (home-page "http://compiler-rt.llvm.org") (synopsis "Runtime library for Clang/LLVM") (description @@ -99,7 +99,8 @@ compiler. In LLVM this library is called \"compiler-rt\".") ;; doesn't list MIPS as supported. (supported-systems (delete "mips64el-linux" %supported-systems)))) -(define (clang-from-llvm llvm clang-runtime hash) +(define* (clang-from-llvm llvm clang-runtime hash + #:key (patches '("clang-libc-search-path.patch"))) (package (name "clang") (version (package-version llvm)) @@ -109,7 +110,7 @@ compiler. In LLVM this library is called \"compiler-rt\".") (uri (string-append "http://llvm.org/releases/" version "/cfe-" version ".src.tar.xz")) (sha256 (base32 hash)) - (patches (search-patches "clang-libc-search-path.patch")))) + (patches (map search-patch patches)))) ;; Using cmake allows us to treat llvm as an external library. There ;; doesn't seem to be any way to do this with clang's autotools-based ;; build system. @@ -182,10 +183,32 @@ code analysis tools.") (define-public clang-runtime (clang-runtime-from-llvm llvm - "10c1mz2q4bdq9bqfgr3dirc6hz1h3sq8573srd5q5lr7m7j6jiwx")) + "0p0y85c7izndbpg2l816z7z7558axq11d5pwkm4h11sdw7d13w0d")) (define-public clang (clang-from-llvm llvm clang-runtime + "1prc72xmkgx8wrzmrr337776676nhsp1qd3mw2bvb22bzdnq7lsc" + #:patches '("clang-3.8-libc-search-path.patch"))) + +(define-public llvm-3.7 + (package (inherit llvm) + (version "3.7.1") + (source + (origin + (method url-fetch) + (uri (string-append "http://llvm.org/releases/" + version "/llvm-" version ".src.tar.xz")) + (sha256 + (base32 + "1masakdp9g2dan1yrazg7md5am2vacbkb3nahb3dchpc1knr8xxy")))))) + +(define-public clang-runtime-3.7 + (clang-runtime-from-llvm + llvm-3.7 + "10c1mz2q4bdq9bqfgr3dirc6hz1h3sq8573srd5q5lr7m7j6jiwx")) + +(define-public clang-3.7 + (clang-from-llvm llvm-3.7 clang-runtime-3.7 "0x065d0w9b51xvdjxwfzjxng0gzpbx45fgiaxpap45ragi61dqjn")) (define-public llvm-3.6 diff --git a/gnu/packages/patches/clang-3.8-libc-search-path.patch b/gnu/packages/patches/clang-3.8-libc-search-path.patch new file mode 100644 index 0000000000..0f7d0a4add --- /dev/null +++ b/gnu/packages/patches/clang-3.8-libc-search-path.patch @@ -0,0 +1,69 @@ +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. + +This patch makes slight adjustments over "clang-libc-search-path.patch" for +changes in clang 3.8. + +--- cfe-3.8.0.src/lib/Driver/ToolChains.cpp ++++ cfe-3.8.0.src/lib/Driver/ToolChains.cpp +@@ -3661,6 +3661,9 @@ + 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 = DetectDistro(D, Arch); + + if (IsOpenSUSE(Distro) || IsUbuntu(Distro)) { +@@ -3702,6 +3705,7 @@ + + if (IsOpenSUSE(Distro)) + 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. +@@ -3771,14 +3775,12 @@ + addPathIfExists(D, D.Dir + "/../" + OSLibDir, Paths); + } + +- addPathIfExists(D, SysRoot + "/lib/" + MultiarchTriple, Paths); +- addPathIfExists(D, SysRoot + "/lib/../" + OSLibDir, Paths); +- addPathIfExists(D, SysRoot + "/usr/lib/" + MultiarchTriple, Paths); +- addPathIfExists(D, SysRoot + "/usr/lib/../" + OSLibDir, Paths); +- + // 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, +@@ -3791,6 +3793,7 @@ + BiarchSibling.gccSuffix(), + Paths); + } ++#endif + + // See comments above on the multilib variant for details of why this is + // included even from outside the sysroot. +@@ -3815,8 +3818,9 @@ + 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