From effd7198b91f85b1bf36ab87392068b3597b6ca8 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 3 Feb 2017 19:17:47 +0200 Subject: gnu: zpaq: Tune for 'generic-armv7-a' on armhf. * gnu/packages/compression.scm (zpaq)[arguments]: Change the CXXFLAGS so on armhf-linux we build with '-mtune=generic-armv7-a' and not '-mtune=generic'. --- gnu/packages/compression.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gnu/packages/compression.scm') diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 73a35030e9..fbbc32197a 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2015, 2016 Ricardo Wurmus ;;; Copyright © 2015 Leo Famulari ;;; Copyright © 2015 Jeff Mickey -;;; Copyright © 2015, 2016 Efraim Flashner +;;; Copyright © 2015, 2016, 2017 Efraim Flashner ;;; Copyright © 2016 Ben Woodcroft ;;; Copyright © 2016 Danny Milosavljevic ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice @@ -1034,11 +1034,12 @@ functionality in a C++ iostream.") (_ " -DNOJIT"))) ;; These should be safe, lowest-common-denominator instruction sets, ;; allowing for some optimisation while remaining reproducible. - (string-append "CXXFLAGS=-O3 -mtune=generic -DNDEBUG" + (string-append "CXXFLAGS=-O3 -DNDEBUG" ,(match (or (%current-target-system) (%current-system)) - ("x86_64-linux" " -march=nocona") - ("i686-linux" " -march=i686") + ("x86_64-linux" " -march=nocona -mtune=generic") + ("i686-linux" " -march=i686 -mtune=generic") + ("armhf-linux" " -mtune=generic-armv7-a") (_ ""))) (string-append "PREFIX=" (assoc-ref %outputs "out"))))) -- cgit 1.4.1 From 1ac675a5831e39968be3c137a4ff448c9f65f48e Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 3 Feb 2017 22:17:41 +0200 Subject: gnu: p7zip: Fix CVE-2016-9256. * gnu/packages/compression.scm (p7zip)[source]: Add patch. * gnu/packages/patches/p7zip-CVE-2016-9296.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/compression.scm | 3 ++- gnu/packages/patches/p7zip-CVE-2016-9296.patch | 24 ++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/p7zip-CVE-2016-9296.patch (limited to 'gnu/packages/compression.scm') diff --git a/gnu/local.mk b/gnu/local.mk index b0f6a9d432..0948321c9c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -797,6 +797,7 @@ dist_patch_DATA = \ %D%/packages/patches/openssl-c-rehash-in.patch \ %D%/packages/patches/orpheus-cast-errors-and-includes.patch \ %D%/packages/patches/ots-no-include-missing-file.patch \ + %D%/packages/patches/p7zip-CVE-2016-9296.patch \ %D%/packages/patches/p7zip-remove-unused-code.patch \ %D%/packages/patches/patchelf-page-size.patch \ %D%/packages/patches/patchelf-rework-for-arm.patch \ diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index fbbc32197a..9ef255a42d 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -924,7 +924,8 @@ for most inputs, but the resulting compressed files are anywhere from 20% to (delete-file-recursively "CPP/7zip/Archive/Rar") (delete-file-recursively "CPP/7zip/Compress/Rar") #t)) - (patches (search-patches "p7zip-remove-unused-code.patch")))) + (patches (search-patches "p7zip-CVE-2016-9296.patch" + "p7zip-remove-unused-code.patch")))) (build-system gnu-build-system) (arguments `(#:make-flags diff --git a/gnu/packages/patches/p7zip-CVE-2016-9296.patch b/gnu/packages/patches/p7zip-CVE-2016-9296.patch new file mode 100644 index 0000000000..3fa80377ad --- /dev/null +++ b/gnu/packages/patches/p7zip-CVE-2016-9296.patch @@ -0,0 +1,24 @@ +From: Robert Luberda +Date: Sat, 19 Nov 2016 08:48:08 +0100 +Subject: Fix nullptr dereference (CVE-2016-9296) + +Patch taken from https://sourceforge.net/p/p7zip/bugs/185/ +This patch file taken from Debian's patch set for p7zip +--- + CPP/7zip/Archive/7z/7zIn.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/CPP/7zip/Archive/7z/7zIn.cpp b/CPP/7zip/Archive/7z/7zIn.cpp +index b0c6b98..7c6dde2 100644 +--- a/CPP/7zip/Archive/7z/7zIn.cpp ++++ b/CPP/7zip/Archive/7z/7zIn.cpp +@@ -1097,7 +1097,8 @@ HRESULT CInArchive::ReadAndDecodePackedStreams( + if (CrcCalc(data, unpackSize) != folders.FolderCRCs.Vals[i]) + ThrowIncorrect(); + } +- HeadersSize += folders.PackPositions[folders.NumPackStreams]; ++ if (folders.PackPositions) ++ HeadersSize += folders.PackPositions[folders.NumPackStreams]; + return S_OK; + } + -- cgit 1.4.1 From 1ae60db842b13fb3057d78058757e649657f8980 Mon Sep 17 00:00:00 2001 From: ng0 Date: Fri, 3 Feb 2017 16:56:24 +0000 Subject: gnu: Add python-lz4. * gnu/packages/compression.scm (python-lz4): New variable. --- gnu/packages/compression.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'gnu/packages/compression.scm') diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 9ef255a42d..09dac4d7b0 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2016 David Craven ;;; Copyright © 2016 Kei Kebreau ;;; Copyright © 2016 Marius Bakke +;;; Copyright © 2017 ng0 ;;; ;;; This file is part of GNU Guix. ;;; @@ -38,6 +39,7 @@ #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system perl) + #:use-module (guix build-system python) #:use-module (gnu packages) #:use-module (gnu packages assembly) #:use-module (gnu packages autotools) @@ -45,6 +47,7 @@ #:use-module (gnu packages base) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python) #:use-module (gnu packages valgrind) #:use-module (ice-9 match) #:use-module ((srfi srfi-1) #:select (last))) @@ -633,6 +636,31 @@ time for compression ratio.") ;; line interface programs (lz4, fullbench, fuzzer, datagen) are GPL2+. (license (list license:bsd-2 license:gpl2+)))) +(define-public python-lz4 + (package + (name "python-lz4") + (version "0.8.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "lz4" version)) + (sha256 + (base32 + "1irad4sq4hdr30fr53smvv3zzk4rddcf9b4jx19w8s9xsxhr1x3b")))) + (build-system python-build-system) + (native-inputs + `(("python-nose" ,python-nose))) + (home-page "https://github.com/python-lz4/python-lz4") + (synopsis "LZ4 Bindings for Python") + (description + "This package provides python bindings for the lz4 compression library +by Yann Collet. The project contains bindings for the LZ4 block format and +the LZ4 frame format.") + (license license:bsd-3))) + +(define-public python2-lz4 + (package-with-python2 python-lz4)) + (define-public squashfs-tools (package (name "squashfs-tools") -- cgit 1.4.1 From 1a0a5509dd169cc87c611c6c5fe38c787d1afe89 Mon Sep 17 00:00:00 2001 From: ng0 Date: Fri, 3 Feb 2017 16:56:25 +0000 Subject: gnu: Add python-lzo. * gnu/packages/compression.scm (python-lzo): New variable. Co-authored-by: Danny Milosavljevic --- gnu/packages/compression.scm | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'gnu/packages/compression.scm') diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 09dac4d7b0..9897883184 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -365,6 +365,44 @@ LZO is written in ANSI C. Both the source code and the compressed data format are designed to be portable across platforms.") (license license:gpl2+))) +(define-public python-lzo + (package + (name "python-lzo") + (version "1.11") + (source + (origin + (method url-fetch) + (uri (pypi-uri "python-lzo" version)) + (sha256 + (base32 + "11p3ifg14p086byhhin6azx5svlkg8dzw2b5abixik97xd6fm81q")))) + (build-system python-build-system) + (arguments + `(#:test-target "check" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-setuppy + (lambda _ + (substitute* "setup.py" + (("include_dirs.append\\(.*\\)") + (string-append "include_dirs.append('" + (assoc-ref %build-inputs "lzo") + "/include/lzo" + "')"))) + #t))))) + (inputs + `(("lzo" ,lzo))) + (home-page "https://github.com/jd-boyd/python-lzo") + (synopsis "Python bindings for the LZO data compression library") + (description + "Python-LZO provides Python bindings for LZO, i.e. you can access +the LZO library from your Python scripts thereby compressing ordinary +Python strings.") + (license license:gpl2+))) + +(define-public python2-lzo + (package-with-python2 python-lzo)) + (define-public lzop (package (name "lzop") -- cgit 1.4.1