From d8c317df261507ab6fe9ce58f0148ff71db3a24d Mon Sep 17 00:00:00 2001 From: 宋文武 Date: Tue, 27 Oct 2015 20:01:35 +0800 Subject: gnu: ganv, pavucontrol, jalv: Fix build by compile with C++11. * gnu/packages/audio.scm (jalv)[arguments], gnu/packages/gtk.scm (ganv)[arguments], gnu/packages/music.scm (non-sequencer)[arguments], gnu/packages/pulseaudio.scm (pavucontrol)[arguments]: Set 'CXXFLAGS' to '-std=c++11'. --- gnu/packages/pulseaudio.scm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gnu/packages/pulseaudio.scm') diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm index d832228278..2c283f0986 100644 --- a/gnu/packages/pulseaudio.scm +++ b/gnu/packages/pulseaudio.scm @@ -199,6 +199,8 @@ (define-public pavucontrol (base32 "14486c6lmmirkhscbfygz114f6yzf97h35n3h3pdr27w4mdfmlmk")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("CXXFLAGS=-std=c++11"))) ; required by gtkmm (inputs `(("libcanberra" ,libcanberra) ("gtkmm" ,gtkmm) -- cgit v1.2.3 From b416aadf7455470b702a557f4f475b04198ce698 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 29 Oct 2015 16:48:32 +0100 Subject: gnu: Move gdbm to (gnu packages databases). * gnu/packages/gdbm.scm: Remove. * gnu/packages/databases.scm (gdbm): New variable, from gdbm.scm. * gnu/packages/avahi.scm, gnu/packages/cyrus-sasl.scm, gnu/packages/guile.scm, gnu/packages/mail.scm, gnu/packages/man.scm, gnu/packages/pulseaudio.scm, gnu/packages/python.scm, gnu/packages/ruby.scm, gnu/packages/sawfish.scm: Adjust accordingly. * gnu-system.am (GNU_SYSTEM_MODULES): Remove gdbm.scm. --- gnu-system.am | 1 - gnu/packages/avahi.scm | 2 +- gnu/packages/cyrus-sasl.scm | 4 ++-- gnu/packages/databases.scm | 22 ++++++++++++++++++++++ gnu/packages/gdbm.scm | 46 --------------------------------------------- gnu/packages/guile.scm | 2 +- gnu/packages/mail.scm | 2 -- gnu/packages/man.scm | 2 +- gnu/packages/pulseaudio.scm | 2 +- gnu/packages/python.scm | 1 - gnu/packages/ruby.scm | 3 +-- gnu/packages/sawfish.scm | 2 +- 12 files changed, 30 insertions(+), 59 deletions(-) delete mode 100644 gnu/packages/gdbm.scm (limited to 'gnu/packages/pulseaudio.scm') diff --git a/gnu-system.am b/gnu-system.am index 3e976e9fb7..d8430b4732 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -121,7 +121,6 @@ GNU_SYSTEM_MODULES = \ gnu/packages/gcc.scm \ gnu/packages/gd.scm \ gnu/packages/gdb.scm \ - gnu/packages/gdbm.scm \ gnu/packages/geeqie.scm \ gnu/packages/gettext.scm \ gnu/packages/ghostscript.scm \ diff --git a/gnu/packages/avahi.scm b/gnu/packages/avahi.scm index b6eef1a6ad..2d480192af 100644 --- a/gnu/packages/avahi.scm +++ b/gnu/packages/avahi.scm @@ -23,7 +23,7 @@ (define-module (gnu packages avahi) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (gnu packages) - #:use-module (gnu packages gdbm) + #:use-module (gnu packages databases) #:use-module (gnu packages libdaemon) #:use-module (gnu packages pkg-config) #:use-module (gnu packages glib) diff --git a/gnu/packages/cyrus-sasl.scm b/gnu/packages/cyrus-sasl.scm index cd0f1bb401..8f3e1a1b70 100644 --- a/gnu/packages/cyrus-sasl.scm +++ b/gnu/packages/cyrus-sasl.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014 Ludovic Courtès +;;; Copyright © 2013, 2014, 2015 Ludovic Courtès ;;; Copyright © 2013 Andreas Enge ;;; ;;; This file is part of GNU Guix. @@ -19,7 +19,7 @@ (define-module (gnu packages cyrus-sasl) #:use-module (gnu packages) - #:use-module (gnu packages gdbm) + #:use-module (gnu packages databases) #:use-module (gnu packages mit-krb5) #:use-module (gnu packages tls) #:use-module ((guix licenses) #:prefix license:) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index a17424196a..51e2a3e058 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -53,6 +53,28 @@ (define-module (gnu packages databases) #:use-module (srfi srfi-26) #:use-module (ice-9 match)) +(define-public gdbm + (package + (name "gdbm") + (version "1.11") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/gdbm/gdbm-" + version ".tar.gz")) + (sha256 + (base32 + "1hz3jgh3pd4qzp6jy0l8pd8x01g9abw7csnrlnj1a2sxy122z4cd")))) + (arguments `(#:configure-flags '("--enable-libgdbm-compat"))) + (build-system gnu-build-system) + (home-page "http://www.gnu.org/software/gdbm/") + (synopsis + "Hash library of database functions compatible with traditional dbm") + (description + "GDBM is a library for manipulating hashed databases. It is used to +store key/value pairs in a file in a manner similar to the Unix dbm library +and provides interfaces to the traditional file format.") + (license gpl3+))) + (define-public bdb (package (name "bdb") diff --git a/gnu/packages/gdbm.scm b/gnu/packages/gdbm.scm deleted file mode 100644 index 62d02001c8..0000000000 --- a/gnu/packages/gdbm.scm +++ /dev/null @@ -1,46 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012 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 gdbm) - #:use-module (guix licenses) - #:use-module (guix packages) - #:use-module (guix download) - #:use-module (guix build-system gnu)) - -(define-public gdbm - (package - (name "gdbm") - (version "1.11") - (source - (origin - (method url-fetch) - (uri (string-append "mirror://gnu/gdbm/gdbm-" - version ".tar.gz")) - (sha256 - (base32 - "1hz3jgh3pd4qzp6jy0l8pd8x01g9abw7csnrlnj1a2sxy122z4cd")))) - (arguments `(#:configure-flags '("--enable-libgdbm-compat"))) - (build-system gnu-build-system) - (home-page "http://www.gnu.org/software/gdbm/") - (synopsis - "Hash library of database functions compatible with traditional dbm") - (description - "GDBM is a library for manipulating hashed databases. It is used to -store key/value pairs in a file in a manner similar to the Unix dbm library -and provides interfaces to the traditional file format.") - (license gpl3+))) diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index da75addc94..ac9e9c7b42 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -38,7 +38,7 @@ (define-module (gnu packages guile) #:use-module (gnu packages base) #:use-module (gnu packages texinfo) #:use-module (gnu packages gettext) - #:use-module (gnu packages gdbm) + #:use-module (gnu packages databases) #:use-module (gnu packages python) #:use-module (guix packages) #:use-module (guix download) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 25407b835a..699b8802b7 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -36,7 +36,6 @@ (define-module (gnu packages mail) #:use-module (gnu packages dejagnu) #:use-module (gnu packages emacs) #:use-module (gnu packages enchant) - #:use-module (gnu packages gdbm) #:use-module (gnu packages ghostscript) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) @@ -48,7 +47,6 @@ (define-module (gnu packages mail) #:use-module (gnu packages libidn) #:use-module (gnu packages linux) #:use-module (gnu packages m4) - #:use-module (gnu packages databases) #:use-module (gnu packages ncurses) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) diff --git a/gnu/packages/man.scm b/gnu/packages/man.scm index 46b7d8b9b0..3298268d28 100644 --- a/gnu/packages/man.scm +++ b/gnu/packages/man.scm @@ -24,9 +24,9 @@ (define-module (gnu packages man) #:use-module (guix download) #:use-module (guix packages) #:use-module (guix build-system gnu) + #:use-module (gnu packages databases) #:use-module (gnu packages flex) #:use-module (gnu packages gawk) - #:use-module (gnu packages gdbm) #:use-module (gnu packages groff) #:use-module (gnu packages less) #:use-module (gnu packages lynx) diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm index d832228278..27b269afc2 100644 --- a/gnu/packages/pulseaudio.scm +++ b/gnu/packages/pulseaudio.scm @@ -27,7 +27,7 @@ (define-module (gnu packages pulseaudio) #:use-module (gnu packages autotools) #:use-module (gnu packages avahi) #:use-module (gnu packages check) - #:use-module (gnu packages gdbm) + #:use-module (gnu packages databases) #:use-module (gnu packages glib) #:use-module (gnu packages gtk) #:use-module (gnu packages libcanberra) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 08f0146641..24a342b8d5 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -41,7 +41,6 @@ (define-module (gnu packages python) #:use-module (gnu packages databases) #:use-module (gnu packages file) #:use-module (gnu packages fontutils) - #:use-module (gnu packages gdbm) #:use-module (gnu packages gcc) #:use-module (gnu packages ghostscript) #:use-module (gnu packages glib) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 701b7ee6ef..8bf85233ea 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2015 Pjotr Prins -;;; Copyright © 2014 Ludovic Courtès +;;; Copyright © 2014, 2015 Ludovic Courtès ;;; Copyright © 2014, 2015 Mark H Weaver ;;; Copyright © 2014, 2015 David Thompson ;;; Copyright © 2015 Ricardo Wurmus @@ -30,7 +30,6 @@ (define-module (gnu packages ruby) #:use-module (gnu packages autotools) #:use-module (gnu packages java) #:use-module (gnu packages libffi) - #:use-module (gnu packages gdbm) #:use-module (gnu packages tls) #:use-module (gnu packages version-control) #:use-module (guix packages) diff --git a/gnu/packages/sawfish.scm b/gnu/packages/sawfish.scm index e2cb62c62c..9b09b6171e 100644 --- a/gnu/packages/sawfish.scm +++ b/gnu/packages/sawfish.scm @@ -22,7 +22,7 @@ (define-module (gnu packages sawfish) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (gnu packages) - #:use-module (gnu packages gdbm) + #:use-module (gnu packages databases) #:use-module (gnu packages gettext) #:use-module (gnu packages gtk) #:use-module (gnu packages libffi) -- cgit v1.2.3 From 3470fe002c6b5cd871a828b5fe90ee81bdf48d0a Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Mon, 16 Nov 2015 14:14:12 -0500 Subject: gnu: libsndfile: Add fixes for CVE-2014-9496 and CVE-2015-7805. * gnu/packages/patches/libsndfile-CVE-2014-9496.patch, gnu/packages/patches/libsndfile-CVE-2015-7805.patch: New files. * gnu-system.am (dist_patch_DATA): Add them. * gnu/packages/pulseaudio.scm (libsndfile)[source]: Add patches. --- gnu-system.am | 2 + .../patches/libsndfile-CVE-2014-9496.patch | 55 +++++++++++++ .../patches/libsndfile-CVE-2015-7805.patch | 95 ++++++++++++++++++++++ gnu/packages/pulseaudio.scm | 5 +- 4 files changed, 156 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/libsndfile-CVE-2014-9496.patch create mode 100644 gnu/packages/patches/libsndfile-CVE-2015-7805.patch (limited to 'gnu/packages/pulseaudio.scm') diff --git a/gnu-system.am b/gnu-system.am index 5396c75315..32d228693b 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -557,6 +557,8 @@ dist_patch_DATA = \ gnu/packages/patches/librsvg-tests.patch \ gnu/packages/patches/libtheora-config-guess.patch \ gnu/packages/patches/libtool-skip-tests2.patch \ + gnu/packages/patches/libsndfile-CVE-2014-9496.patch \ + gnu/packages/patches/libsndfile-CVE-2015-7805.patch \ gnu/packages/patches/libssh-CVE-2014-0017.patch \ gnu/packages/patches/libunwind-CVE-2015-3239.patch \ gnu/packages/patches/libwmf-CAN-2004-0941.patch \ diff --git a/gnu/packages/patches/libsndfile-CVE-2014-9496.patch b/gnu/packages/patches/libsndfile-CVE-2014-9496.patch new file mode 100644 index 0000000000..87d42955fb --- /dev/null +++ b/gnu/packages/patches/libsndfile-CVE-2014-9496.patch @@ -0,0 +1,55 @@ +Copied from Fedora. + +http://pkgs.fedoraproject.org/cgit/libsndfile.git/plain/libsndfile-1.0.25-cve2014_9496.patch + +diff -up libsndfile-1.0.25/src/sd2.c.cve2014_9496 libsndfile-1.0.25/src/sd2.c +--- libsndfile-1.0.25/src/sd2.c.cve2014_9496 2011-01-19 11:10:36.000000000 +0100 ++++ libsndfile-1.0.25/src/sd2.c 2015-01-13 17:00:35.920285526 +0100 +@@ -395,6 +395,21 @@ read_marker (const unsigned char * data, + return 0x666 ; + } /* read_marker */ + ++static inline int ++read_rsrc_marker (const SD2_RSRC *prsrc, int offset) ++{ const unsigned char * data = prsrc->rsrc_data ; ++ ++ if (offset < 0 || offset + 3 >= prsrc->rsrc_len) ++ return 0 ; ++ ++ if (CPU_IS_BIG_ENDIAN) ++ return (((uint32_t) data [offset]) << 24) + (data [offset + 1] << 16) + (data [offset + 2] << 8) + data [offset + 3] ; ++ if (CPU_IS_LITTLE_ENDIAN) ++ return data [offset] + (data [offset + 1] << 8) + (data [offset + 2] << 16) + (((uint32_t) data [offset + 3]) << 24) ; ++ ++ return 0 ; ++} /* read_rsrc_marker */ ++ + static void + read_str (const unsigned char * data, int offset, char * buffer, int buffer_len) + { int k ; +@@ -496,6 +511,11 @@ sd2_parse_rsrc_fork (SF_PRIVATE *psf) + + rsrc.type_offset = rsrc.map_offset + 30 ; + ++ if (rsrc.map_offset + 28 > rsrc.rsrc_len) ++ { psf_log_printf (psf, "Bad map offset.\n") ; ++ goto parse_rsrc_fork_cleanup ; ++ } ; ++ + rsrc.type_count = read_short (rsrc.rsrc_data, rsrc.map_offset + 28) + 1 ; + if (rsrc.type_count < 1) + { psf_log_printf (psf, "Bad type count.\n") ; +@@ -512,7 +532,12 @@ sd2_parse_rsrc_fork (SF_PRIVATE *psf) + + rsrc.str_index = -1 ; + for (k = 0 ; k < rsrc.type_count ; k ++) +- { marker = read_marker (rsrc.rsrc_data, rsrc.type_offset + k * 8) ; ++ { if (rsrc.type_offset + k * 8 > rsrc.rsrc_len) ++ { psf_log_printf (psf, "Bad rsrc marker.\n") ; ++ goto parse_rsrc_fork_cleanup ; ++ } ; ++ ++ marker = read_rsrc_marker (&rsrc, rsrc.type_offset + k * 8) ; + + if (marker == STR_MARKER) + { rsrc.str_index = k ; diff --git a/gnu/packages/patches/libsndfile-CVE-2015-7805.patch b/gnu/packages/patches/libsndfile-CVE-2015-7805.patch new file mode 100644 index 0000000000..d617f81e5c --- /dev/null +++ b/gnu/packages/patches/libsndfile-CVE-2015-7805.patch @@ -0,0 +1,95 @@ +Slightly modified to apply cleanly to libsndfile-1.0.25. + +From d2a87385c1ca1d72918e9a2875d24f202a5093e8 Mon Sep 17 00:00:00 2001 +From: Erik de Castro Lopo +Date: Sat, 7 Feb 2015 15:45:10 +1100 +Subject: [PATCH] src/common.c : Fix a header parsing bug. + +When the file header is bigger that SF_HEADER_LEN, the code would seek +instead of reading causing file parse errors. + +The current header parsing and writing code *badly* needs a re-write. +--- + src/common.c | 27 +++++++++++---------------- + 1 file changed, 11 insertions(+), 16 deletions(-) + +diff --git a/src/common.c b/src/common.c +index dd4edb7..c6b88cc 100644 +--- a/src/common.c ++++ b/src/common.c +@@ -1,5 +1,5 @@ + /* +-** Copyright (C) 1999-2011 Erik de Castro Lopo ++** Copyright (C) 1999-2015 Erik de Castro Lopo + ** + ** This program is free software; you can redistribute it and/or modify + ** it under the terms of the GNU Lesser General Public License as published by +@@ -800,21 +800,16 @@ header_read (SF_PRIVATE *psf, void *ptr, int bytes) + { int count = 0 ; + + if (psf->headindex >= SIGNED_SIZEOF (psf->header)) +- { memset (ptr, 0, SIGNED_SIZEOF (psf->header) - psf->headindex) ; +- +- /* This is the best that we can do. */ +- psf_fseek (psf, bytes, SEEK_CUR) ; +- return bytes ; +- } ; ++ return psf_fread (ptr, 1, bytes, psf) ; + + if (psf->headindex + bytes > SIGNED_SIZEOF (psf->header)) + { int most ; + + most = SIGNED_SIZEOF (psf->header) - psf->headindex ; + psf_fread (psf->header + psf->headend, 1, most, psf) ; +- memset ((char *) ptr + most, 0, bytes - most) ; +- +- psf_fseek (psf, bytes - most, SEEK_CUR) ; ++ memcpy (ptr, psf->header + psf->headend, most) ; ++ psf->headend = psf->headindex += most ; ++ psf_fread ((char *) ptr + most, bytes - most, 1, psf) ; + return bytes ; + } ; + +@@ -822,7 +817,7 @@ header_read (SF_PRIVATE *psf, void *ptr, int bytes) + { count = psf_fread (psf->header + psf->headend, 1, bytes - (psf->headend - psf->headindex), psf) ; + if (count != bytes - (int) (psf->headend - psf->headindex)) + { psf_log_printf (psf, "Error : psf_fread returned short count.\n") ; +- return 0 ; ++ return count ; + } ; + psf->headend += count ; + } ; +@@ -836,7 +831,6 @@ header_read (SF_PRIVATE *psf, void *ptr, int bytes) + static void + header_seek (SF_PRIVATE *psf, sf_count_t position, int whence) + { +- + switch (whence) + { case SEEK_SET : + if (position > SIGNED_SIZEOF (psf->header)) +@@ -885,8 +879,7 @@ header_seek (SF_PRIVATE *psf, sf_count_t position, int whence) + + static int + header_gets (SF_PRIVATE *psf, char *ptr, int bufsize) +-{ +- int k ; ++{ int k ; + + for (k = 0 ; k < bufsize - 1 ; k++) + { if (psf->headindex < psf->headend) +@@ -1073,8 +1066,10 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...) + case 'j' : + /* Get the seek position first. */ + count = va_arg (argptr, size_t) ; +- header_seek (psf, count, SEEK_CUR) ; +- byte_count += count ; ++ if (count) ++ { header_seek (psf, count, SEEK_CUR) ; ++ byte_count += count ; ++ } ; + break ; + + default : +-- +2.6.3 + diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm index fa656b3db6..d5e8aba272 100644 --- a/gnu/packages/pulseaudio.scm +++ b/gnu/packages/pulseaudio.scm @@ -50,7 +50,10 @@ (define libsndfile version ".tar.gz")) (sha256 (base32 - "10j8mbb65xkyl0kfy0hpzpmrp0jkr12c7mfycqipxgka6ayns0ar")))) + "10j8mbb65xkyl0kfy0hpzpmrp0jkr12c7mfycqipxgka6ayns0ar")) + (patches + (map search-patch '("libsndfile-CVE-2014-9496.patch" + "libsndfile-CVE-2015-7805.patch"))))) (build-system gnu-build-system) (inputs `(("libvorbis" ,libvorbis) -- cgit v1.2.3